autoupdate
[gnulib.git] / ChangeLog
blobb941c7449d3f9b24b0e8622c11977aa6253b58b9
1 2024-02-18  Jim Meyering  <meyering@meta.com>
3         maint.mk: improve new syntax-check rule
4         * top/maint.mk (sc_prefer_angle_bracket_headers): Rename from
5         sc_verify_absolute_include_headers.  Simplify to run a single
6         invocation of grep, rather than usually many.  Derive a regular
7         expression matching the selected headers, and warn about any
8         offending matches via what is usually a single grep invocation.
10 2024-02-18  Collin Funk  <collin.funk1@gmail.com>
12         gnulib-tool.py: Fix function call on incorrect object.
13         * pygnulib/GLImport.py: Call checkInclTestCategory on the
14         GLConfig member instead of the GLImport object itself.
15         * pygnulib/__init__.py: Update copyright dates.
16         * pygnulib/constants.py: Update copyright dates.
18 2024-02-18  Bruno Haible  <bruno@clisp.org>
20         maint.mk: Add more comments.
21         * top/maint.mk: Reference the Gnulib documentation where suitable.
23 2024-02-18  Collin Funk  <collin.funk1@gmail.com>
25         maint.mk: Add syntax-check rule to check for #include syntax.
26         * top/maint.mk (sc_verify_absolute_include_headers): New rule
27         to check for #includes that might cause
28         -Winclude-next-absolute-path warnings.
30 2024-02-18  Bruno Haible  <bruno@clisp.org>
32         doc: Mention requirement regarding #include syntax.
33         * doc/gnulib-tool.texi (-I options, Include <config.h>,
34         Style of #include statements): New subsections.
36 2024-02-17  Paul Eggert  <eggert@cs.ucla.edu>
38         qsort_r-tests: minor visibility cleanup
39         * tests/test-qsort_r.c (cmp): Now static.
41         savedir: work around GCC bug 113963
42         * lib/savedir.c: Ignore -Wanalyzer-malloc-leak and
43         -Wanalyzer-null-dereference.
45         Solaris EOL update
46         * doc/solaris-versions: Solaris 11.4 EOL update.  Also mention 11.3.
48 2024-02-17  Collin Funk  <collin.funk1@gmail.com>
50         math: More clang -Winclude-next-absolute-path silencing.
51         * lib/math.c: Write #include <math.h> instead of #include "math.h".
53 2024-02-17  Bruno Haible  <bruno@clisp.org>
55         error: More clang -Winclude-next-absolute-path silencing.
56         * modules/error-h (Include): Suggest <error.h>, not "error.h".
57         * m4/error_h.m4: Write #include <error.h>.
59 2024-02-15  Bruno Haible  <bruno@clisp.org>
61         nstrftime: Optimize module dependencies.
62         * modules/nstrftime (Depends-on): Remove localename-unsafe. Add
63         localename-unsafe-limited.
65 2024-02-15  Bruno Haible  <bruno@clisp.org>
67         localename-unsafe-limited: New module.
68         * m4/localename.m4 (gl_LOCALENAME_UNSAFE_LIMITED): New macro.
69         * modules/localename-unsafe-limited: New file.
70         * modules/localename-unsafe (Depends-on): Add localename-unsafe-limited.
71         (Makefile.am): Compile localename-unsafe.c only if the module
72         localename-unsafe-limited does not already do it.
74 2024-02-15  Bruno Haible  <bruno@clisp.org>
76         nstrftime, fprintftime: Optimize.
77         * lib/strftime.c (should_remove_ampm): Call gl_locale_name_unsafe
78         instead of gl_locale_name.
79         * modules/nstrftime (Depends-on): Remove localename. Add
80         localename-unsafe.
82 2024-02-15  Bruno Haible  <bruno@clisp.org>
84         localename-unsafe: Optimize.
85         * lib/localename-unsafe.c (gl_locale_name_posix_unsafe): Call
86         setlocale_null_unlocked instead of setlocale_null.
87         * modules/localename-unsafe (Depends-on): Add setlocale-null-unlocked.
89 2024-02-15  Bruno Haible  <bruno@clisp.org>
91         setlocale_null-unlocked: Add tests.
92         * tests/test-setlocale_null-unlocked.c: New file, based on
93         tests/test-setlocale_null.c.
94         * modules/setlocale-null-unlocked-tests: New file.
96         setlocale_null-unlocked: New module.
97         * lib/setlocale_null.h (setlocale_null_r_unlocked,
98         setlocale_null_unlocked): New declarations.
99         * lib/setlocale_null-unlocked.c: New file, based on
100         lib/setlocale_null.c.
101         * lib/setlocale_null.c: Don't include <wchar.h>.
102         (setlocale_null_unlocked, setlocale_null_r_unlocked): Remove functions.
103         * modules/setlocale-null-unlocked: New file.
104         * modules/setlocale-null (Depends-on): Add setlocale-null-unlocked.
106 2024-02-15  Bruno Haible  <bruno@clisp.org>
108         setlocale-null: Refactor.
109         * lib/setlocale_null.c
110         (setlocale_null_r_with_lock): Renamed from setlocale_null_with_lock.
111         (setlocale_null_r_unlocked): Renamed from setlocale_null_unlocked.
112         (setlocale_null_unlocked): Renamed from setlocale_null_androidfix.
114 2024-02-15  Bruno Haible  <bruno@clisp.org>
116         localename-unsafe: New module.
117         * lib/localename.h (gl_locale_name_unsafe, gl_locale_name_thread_unsafe,
118         gl_locale_name_posix_unsafe): New declarations.
119         * lib/localename-unsafe.c: New file, based on lib/localename.c.
120         (gl_locale_name_thread_unsafe): Renamed from gl_locale_name_thread.
121         (gl_locale_name_posix_unsafe): Renamed from gl_locale_name_posix.
122         (gl_locale_name_unsafe): Renamed from gl_locale_name.
123         (struniq): Define only on platforms that need it.
124         * lib/localename.c: Remove code that was moved to
125         lib/localename-unsafe.c.
126         (gl_locale_name_thread): Just call gl_locale_name_thread_unsafe and
127         struniq.
128         (gl_locale_name_posix): Just call gl_locale_name_posix_unsafe and
129         struniq.
130         * lib/locale.in.h: Test @GNULIB_LOCALENAME_UNSAFE@ instead of
131         @GNULIB_LOCALENAME@.
132         * m4/locale_h.m4 (gl_LOCALE_H_REQUIRE_DEFAULTS): Initialize
133         GNULIB_LOCALENAME_UNSAFE instead of GNULIB_LOCALENAME.
134         * modules/locale (Makefile.am): Substitute GNULIB_LOCALENAME_UNSAFE
135         instead of GNULIB_LOCALENAME.
136         * m4/localename.m4 (gl_LOCALENAME_UNSAFE): Renamed from gl_LOCALENAME.
137         * modules/localename-unsafe: New file, based on modules/localename.
138         * modules/localename: Greatly simplify.
139         (Depends-on): Add localename-unsafe.
141 2024-02-15  Bruno Haible  <bruno@clisp.org>
143         localename: Refactor.
144         * lib/struniq.h: New file, extracted from lib/localename.c.
145         * lib/localename.c: Include it.
146         * modules/localename (Files): Add lib/struniq.h.
148 2024-02-15  Bruno Haible  <bruno@clisp.org>
150         localename: Speed up lookup of the LC_MESSAGES name on AIX ≥ 7.2.
151         * m4/intl-thread-locale.m4 (gt_INTL_THREAD_LOCALE_NAME): On AIX, test
152         for the 'locale_name' member.
153         * lib/localename.c (get_locale_t_name): For the LC_MESSAGES category,
154         use the 'locale_name' member if available.
156 2024-02-15  Bruno Haible  <bruno@clisp.org>
158         localename: Add more comments.
159         * m4/intl-thread-locale.m4: Document expected configuration results.
160         * doc/posix-functions/uselocale.texi: Update platforms list.
161         * lib/localename.c: Likewise.
163 2024-02-15  Bruno Haible  <bruno@clisp.org>
165         localename: Add parameter validation.
166         * lib/localename.c (get_locale_t_name, gl_locale_name_thread_unsafe,
167         gl_locale_name_thread, gl_locale_name_posix, gl_locale_name): Verify
168         that the category argument is not LC_ALL.
170 2024-02-14  Bruno Haible  <bruno@clisp.org>
172         localename: Notice setlocale() invocations on more platforms.
173         * lib/localename.c (HAVE_LOCALE_NULL): Define also on musl, FreeBSD,
174         NetBSD, Solaris, Haiku.
175         * modules/localename (Files): Add m4/musl.m4.
176         (configure.ac): Invoke gl_MUSL_LIBC.
177         * tests/test-localename.c (C_CANONICALIZED): New macro, for Haiku.
178         (is_default): New function, for musl libc and Haiku.
179         (test_locale_name, test_locale_name_posix): Use these definitions.
180         * modules/localename-tests (Files): Add m4/musl.m4.
181         (configure.ac): Invoke gl_MUSL_LIBC.
183 2024-02-14  Bruno Haible  <bruno@clisp.org>
185         Don't treat Apple's new Citrus/FreeBSD-based iconv like GNU libiconv.
186         * m4/iconv_open.m4 (gl_FUNC_ICONV_OPEN): Don't treat the bastard Apple
187         iconv like GNU libiconv.
188         * lib/striconv.c (mem_cd_iconv, str_cd_iconv): Likewise.
189         * lib/striconveh.c (iconv_carefully, iconv_carefully_1,
190         mem_cd_iconveh_internal): Likewise.
191         * lib/propername.c (proper_name_utf8): Likewise.
192         * lib/unicodeio.c (unicode_to_mb): Likewise.
193         * lib/uniconv/u16-conv-from-enc.c (UTF16_NAME): Likewise.
194         * lib/uniconv/u16-conv-to-enc.c (UTF16_NAME): Likewise.
195         * lib/uniconv/u16-strconv-to-enc.c (UTF16_NAME): Likewise.
196         * lib/uniconv/u32-conv-from-enc.c (UTF32_NAME): Likewise.
197         * lib/uniconv/u32-conv-to-enc.c (UTF32_NAME): Likewise.
198         * lib/uniconv/u32-strconv-to-enc.c (UTF32_NAME): Likewise.
199         * tests/test-striconveh.c (main): Likewise.
200         * tests/test-striconveha.c (main): Likewise.
201         * tests/uniconv/test-u8-conv-from-enc.c (main): Likewise.
202         * tests/uniconv/test-u8-strconv-from-enc.c (main): Likewise.
203         * tests/uniconv/test-u16-conv-from-enc.c (main): Likewise.
204         * tests/uniconv/test-u16-strconv-from-enc.c (main): Likewise.
205         * tests/uniconv/test-u32-conv-from-enc.c (main): Likewise.
206         * tests/uniconv/test-u32-strconv-from-enc.c (main): Likewise.
208 2024-02-14  Bruno Haible  <bruno@clisp.org>
210         Improve support of Citrus/FreeBSD iconv.
211         * lib/striconveh.c (iconveh_open): Use //TRANSLIT with all iconv
212         implementations that support it.
213         * lib/striconveha.c (mem_iconveha, str_iconveha): Likewise.
214         * lib/propername.c (proper_name_utf8): Likewise.
216 2024-02-14  Bruno Haible  <bruno@clisp.org>
218         isnan: Fix compilation error in C++ mode on macOS 14.4 / Xcode 15.2.
219         Reported by Paul E Reimer <reimer@anl.gov> in
220         <https://lists.gnu.org/archive/html/bug-gettext/2024-02/msg00002.html>.
221         * lib/math.in.h (GNULIB_NAMESPACE_LACKS_ISNAN): Define also on macOS
222         with clang ≥ 14.
224 2024-02-13  Paul Eggert  <eggert@cs.ucla.edu>
226         nstrftime: allow opt-out of AM/PM adjustment
227         For Emacs I would rather avoid bringing in the Gnulib locking code,
228         since Emacs has its own idea about locks and its main engine is
229         single-threaded anyway.
230         Provide a way to use the nstrftime module while avoiding its
231         recently-added localename dependency, which entails locking code.
232         (It’s not clear to me that the locking code is needed for nstrftime,
233         as NetBSD has strftime_z and Solaris locales could be inspected in
234         some thread-safe way, e.g., by probing strftime month names.
235         Anyway, all that’s more hassle than I want to put up with right now
236         for the trivial matter of AM/PM behavior.)
237         * lib/strftime.c (REQUIRE_GNUISH_STRFTIME_AM_PM):
238         New macro, which can be overridden by config.h.
239         (should_remove_ampm, __strftime_internal):
240         Use it instead of !USE_C_LOCALE when deciding to
241         implement Gnuish AM/PM behavior.
243 2024-02-13  Bruno Haible  <bruno@clisp.org>
245         uniwidth/width tests: Update unit test for last commit.
246         * tests/uniwidth/test-uc_width2.sh: Update expected test result.
248 2024-02-12  Bruno Haible  <bruno@clisp.org>
250         uniwidth/width: Assign width 1 to prepended concatenation marks.
251         Suggested by Jules Bertholet <julesbertholet@quoi.xyz> in
252         <https://lists.gnu.org/archive/html/bug-gnulib/2024-02/msg00093.html>.
253         * lib/gen-uni-tables.c (is_nonspacing): For characters with property
254         Prepended_Concatenation_Mark, return false instead of true.
255         * lib/uniwidth/width0.h: Regenerated. This assigns width 1 to the
256         characters U+0600..U+0605, U+06DD, U+070F, U+0890..U+0891, U+08E2,
257         U+110BD, U+110CD.
258         * modules/uniwidth/width (configure.ac): Bump required libunistring
259         version.
260         * modules/uniwidth/u8-width (configure.ac): Likewise.
261         * modules/uniwidth/u8-strwidth (configure.ac): Likewise.
262         * modules/uniwidth/u16-width (configure.ac): Likewise.
263         * modules/uniwidth/u16-strwidth (configure.ac): Likewise.
264         * modules/uniwidth/u32-width (configure.ac): Likewise.
265         * modules/uniwidth/u32-strwidth (configure.ac): Likewise.
267 2024-02-12  Bruno Haible  <bruno@clisp.org>
269         Implement a new property, added by Unicode 9.0.0.
270         * lib/gen-uni-tables.c (is_property_prepended_concatenation_mark): New
271         function.
272         (output_properties): Output also the property
273         prepended_concatenation_mark.
274         * lib/unictype.in.h (UC_PROPERTY_PREPENDED_CONCATENATION_MARK,
275         uc_is_property_prepended_concatenation_mark): New declarations.
276         * m4/unictype_h.m4 (gl_UNICTYPE_H_REQUIRE_DEFAULTS): Initialize
277         GNULIB_UNICTYPE_PROPERTY_PREPENDED_CONCATENATION_MARK.
278         * modules/unictype/base (Makefile.am): Substitute
279         GNULIB_UNICTYPE_PROPERTY_PREPENDED_CONCATENATION_MARK.
280         * lib/unictype/pr_prepended_concatenation_mark.c: New file.
281         * lib/unictype/pr_prepended_concatenation_mark.h: New generated file.
282         * modules/unictype/property-prepended-concatenation-mark: New file.
283         * tests/unictype/test-pr_prepended_concatenation_mark.c: New generated
284         file.
285         * modules/unictype/property-prepended-concatenation-mark-tests: New
286         file.
287         * lib/unictype/pr_byname.gperf: Add prepended_concatenation_mark.
288         * lib/unictype/pr_byname.c
289         (UC_PROPERTY_INDEX_PREPENDED_CONCATENATION_MARK): New enum item.
290         (uc_property_byname): Handle it.
291         * modules/unictype/property-byname (Depends-on): Add
292         unictype/property-prepended-concatenation-mark.
293         * modules/unictype/property-all (Depends-on): Likewise.
294         * MODULES.html.sh (func_all_modules): Add
295         unictype/property-prepended-concatenation-mark.
297 2024-02-12  Bruno Haible  <bruno@clisp.org>
299         posixtm tests: Fix reference to undefined module (regr. 2024-02-09).
300         * modules/posixtm-tests (Depends-on): Remove strftime. Add
301         strftime-fixes.
303 2024-02-12  Bruno Haible  <bruno@clisp.org>
305         limits-h: Fix BOOL_MAX value.
306         * lib/limits.in.h (BOOL_MAX): Define to 1, not to 2^BOOL_WIDTH-1.
307         * tests/test-limits-h.c (main): Change expected value of BOOL_MAX.
309 2024-02-12  Bruno Haible  <bruno@clisp.org>
311         stdalign: Document a clang 17 bug.
312         * doc/posix-headers/stdalign.texi: Mention a clang 17 bug.
314 2024-02-12  Bruno Haible  <bruno@clisp.org>
316         getcwd, getcwd-lgpl: Fix configure test.
317         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Don't redeclare getcwd().
319 2024-02-12  Florian Weimer  <fweimer@redhat.com>
321         pthread_mutex_timedlock, pthread-spin: Fix configure test.
322         * m4/pthread_mutex_timedlock.m4 (gl_FUNC_PTHREAD_MUTEX_TIMEDLOCK): Pass
323         a pointer of the correct type to pthread_mutex_timedlock.
324         * m4/pthread-spin.m4 (gl_PTHREAD_SPIN): Pass a pointer of the correct
325         type to pthread_spin_init.
327 2024-02-11  Bruno Haible  <bruno@clisp.org>
329         Fulfil the obligations of the Unicode license.
330         * lib/gen-uni-tables.c: Prepend the Unicode license when copying
331         NameAliases.txt, UnicodeData.txt, NormalizationTest.txt,
332         GraphemeBreakTest.txt, WordBreakTest.txt.
333         * tests/unigbrk/GraphemeBreakTest.txt: Prepend the Unicode license.
334         * tests/uniname/NameAliases.txt: Likewise.
335         * tests/uniname/UnicodeData.txt: Likewise.
336         * tests/uninorm/NormalizationTest.txt: Likewise.
337         * tests/uniwbrk/WordBreakTest.txt: Likewise.
338         * tests/uniname/HangulSyllableNames.txt: Add public-domain notice.
340 2024-02-11  Bruno Haible  <bruno@clisp.org>
342         time_r: Add tests.
343         * lib/time_r.c: Add comment.
344         * tests/test-gmtime_r.c: New file.
345         * tests/test-gmtime_r-mt.c: New file, based on
346         tests/test-nl_langinfo-mt.c.
347         * tests/test-localtime_r.c: New file.
348         * tests/test-localtime_r-mt.c: New file, based on
349         tests/test-nl_langinfo-mt.c.
350         * modules/time_r-tests: New file.
352 2024-02-10  Paul Eggert  <eggert@cs.ucla.edu>
354         doc: improve warnings about ctime etc.
355         * doc/posix-functions/asctime.texi (asctime):
356         * doc/posix-functions/asctime_r.texi (asctime_r):
357         Say why these functions are typically used mistakenly.
358         * doc/posix-functions/ctime.texi (ctime):
359         * doc/posix-functions/ctime_r.texi (ctimef):
360         Say that they can dump core due to an internal null pointer, too.
361         * doc/posix-functions/ctime.texi (ctime):
362         Don’t recommend ctime_r.
364 2024-02-10  Bruno Haible  <bruno@clisp.org>
366         havelib: Add support for NetBSD/sparc64.
367         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): On NetBSD/sparc64 in
368         32-bit mode, search for libraries in /usr/lib/sparc.
370 2024-02-09  Bruno Haible  <bruno@clisp.org>
372         ctime, localtime, tzset, wcsftime: Make multithread-safe.
373         * lib/ctime.c: Include <wchar.h>.
374         (rpl_ctime): Modify _environ and _wenviron without using _putenv.
375         * lib/localtime.c: Include <wchar.h>.
376         (rpl_localtime): Modify _environ and _wenviron without using _putenv.
377         * lib/tzset.c: Include <wchar.h>.
378         (rpl_tzset): Modify _environ and _wenviron without using _putenv.
379         * lib/wcsftime.c (rpl_wcsftime): Likewise.
381 2024-02-09  Bruno Haible  <bruno@clisp.org>
383         strftime: Remove module, deprecated in 2017.
384         * modules/strftime: Remove file.
385         * NEWS: Mention it.
387 2024-02-09  Bruno Haible  <bruno@clisp.org>
389         Avoid suboptimal definition of _GL_HAS_ATTRIBUTE on FreeBSD/sparc64.
390         * m4/gnulib-common.m4 (gl_COMMON_BODY): Define _GL_HAS_ATTRIBUTE only
391         once.
393 2024-02-08  Bruno Haible  <bruno@clisp.org>
395         nstrtime, c-nstrftime tests: Strengthen the tests.
396         * tests/test-nstrftime.h (FUNC_CHECKED): New function.
397         (posixtm_test, tzalloc_test, quarter_test, errno_test, locales_test):
398         Invoke FUNC_CHECKED instead of FUNC.
400 2024-02-08  Bruno Haible  <bruno@clisp.org>
402         nstrtime: Fix %p, %P, %r directives' results on NetBSD, Solaris.
403         * lib/strftime.c: Include <locale.h>, localename.h.
404         (should_remove_ampm): New function.
405         (__strftime_internal): On NetBSD and Solaris, remove the AM/PM indicator
406         from the %p, %r directives' results in specific locales.
407         * modules/nstrftime (Depends-on): Add localename.
408         * tests/test-nstrftime.h (locales_test): Update the expected result of
409         the %r directive.
410         * doc/posix-functions/strftime.texi: Mention the problem of the %p and
411         %r directives on NetBSD and Solaris.
413 2024-02-08  Bruno Haible  <bruno@clisp.org>
415         nstrtime, c-nstrftime: Fix %c directive's result on NetBSD, Solaris.
416         * lib/strftime.c (__strftime_internal): On NetBSD and Solaris, remove
417         the last word of the %c directive's result if it looks like a time zone.
418         * doc/posix-functions/strftime.texi: Mention this as a restriction of
419         strftime.
421 2024-02-07  Bruno Haible  <bruno@clisp.org>
423         c-nstrftime: Add tests.
424         * tests/test-c-nstrftime.c: New file, based on tests/test-nstrftime.c.
425         * tests/test-c-nstrftime-1.sh: New file, based on
426         tests/test-nstrftime-1.sh.
427         * tests/test-c-nstrftime-2.sh: New file, based on
428         tests/test-nstrftime-2.sh.
429         * modules/c-nstrftime-tests: New file.
431         c-nstrftime: New module.
432         Suggested by Paul Eggert.
433         * lib/strftime.h (c_nstrftime): New declaration.
434         * lib/c-nstrftime.c: New file.
435         * lib/strftime.c (FPRINTFTIME): Move fallback definition before its
436         first use.
437         (USE_C_LOCALE): Add fallback definition.
438         If USE_C_LOCALE is set, include c-ctype.h instead of <ctype.h>.
439         Conditionally include <locale.h>.
440         (TOUPPER, TOLOWER): Define differently if USE_C_LOCALE is set.
441         (c_locale_cache, c_locale): New definitions, copied from lib/c-strtod.c.
442         (c_weekday_names, c_month_names): New variables, based on
443         glibc/time/strftime_l.c.
444         (__strftime_internal): Define a_wkday, aw_len, f_wkday, a_month, am_len,
445         f_month, ampm, ap_len differently for USE_C_LOCALE. Avoid a
446         'goto underlying_strftime' if USE_C_LOCALE && !HAVE_STRFTIME_L. If
447         USE_C_LOCALE, use strftime_l() with the C locale object instead of
448         strftime().
449         * m4/c-nstrftime.m4: New file, based on m4/nstrftime.m4.
450         * modules/c-nstrftime: New file, based on modules/nstrftime.
452 2024-02-07  Bruno Haible  <bruno@clisp.org>
454         nstrftime: Add tests of all directives, also in non-trivial locales.
455         * tests/test-nstrftime.h (language_t): New type.
456         (locales_test): New function.
457         * tests/test-nstrftime.c: Include <locale.h>, <stdlib.h>.
458         (main): Invoke setlocale and locales_test.
459         * tests/test-nstrftime-1.sh: New file.
460         * tests/test-nstrftime-2.sh: New file, based on tests/test-strtod1.sh.
461         * modules/nstrftime-tests (Files): Add them. Add m4/locale-fr.m4,
462         m4/codeset.m4, m4/musl.m4.
463         (configure.ac): Invoke gt_LOCALE_FR, gt_LOCALE_FR_UTF8, gl_MUSL_LIBC.
464         (Makefile.am): Link test-nstrftime with $(SETLOCALE_LIB). Test
465         test-nstrftime-*.sh instead of test-nstrftime.
467 2024-02-07  Bruno Haible  <bruno@clisp.org>
469         nstrftime: Work around strftime bug with %r on macOS and FreeBSD.
470         * lib/strftime.c (__strftime_internal): For %r, don't use the underlying
471         strftime() directly.
472         * doc/posix-functions/strftime.texi: Mention the %r bug.
474 2024-02-07  Paul Eggert  <eggert@cs.ucla.edu>
476         Assume ‘long long’ support
477         * modules/strtoimax, modules/strtoumax (Depends-on):
478         Assume the compiler supports ‘long long’.
479         This was overlooked in the 2019-12-22 patch
480         <https://lists.gnu.org/r/bug-gnulib/2019-12/msg00190.html>.
482 2024-02-07  Bruno Haible  <bruno@clisp.org>
484         nstrftime: Fix typo in documentation.
485         Reported by Tim Rice <tim@multitalents.net>.
486         * lib/strftime.h (nstrftime): Fix typo in comment.
488 2024-02-07  Bruno Haible  <bruno@clisp.org>
490         nstrftime tests: Avoid test failures on DragonFly BSD.
491         * tests/test-nstrftime.h (LT): Disable specific test cases also on
492         DragonFly BSD.
494 2024-02-07  Bruno Haible  <bruno@clisp.org>
496         nstrftime: Modernize.
497         * lib/strftime.c (__strftime_internal): Make the strftime fallback
498         declaration ISO C 23 compliant.
500 2024-02-07  Bruno Haible  <bruno@clisp.org>
502         nstrftime tests: Avoid test failures on FreeBSD, NetBSD, Android.
503         * tests/test-nstrftime.h (LT): Disable specific test cases on FreeBSD,
504         NetBSD, Android.
506 2024-02-07  Bruno Haible  <bruno@clisp.org>
508         nstrftime tests: Allow reuse with another function.
509         * tests/test-nstrftime.h: New file, extracted from
510         tests/test-nstrftime.c.
511         (FUNC_NAME, STRINGIFY): New macros.
512         (posixtm_test, tzalloc_test, quarter_test, errno_test): Use FUNC or
513         FUNC_NAME instead of nstrftime.
514         (quarter_test): Rename local variable 'result' to 'fail'.
515         * tests/test-nstrftime.c: Remove code that moved to test-nstrftime.h.
516         Include test-nstrftime.h.
517         (STREQ): Remove redundant macro.
518         * modules/nstrftime-tests (Files): Add tests/test-nstrftime.h.
520 2024-02-07  Bruno Haible  <bruno@clisp.org>
522         nstrftime: Document the nstrftime function.
523         * lib/strftime.h (nstrftime): Add more comments.
525 2024-02-06  Bruno Haible  <bruno@clisp.org>
527         nl_langinfo: Fix fallback list of month names (regression 2014-07-07).
528         * lib/nl_langinfo.c (nl_langinfo): In the implementation for native
529         Windows, fix the results for MON_8..MON_12, ALTMON_8..ALTMON_12,
530         ABMON_8..ABMON_12.
532 2024-02-06  Bruno Haible  <bruno@clisp.org>
534         nstrftime: Merge glibc strftime changes.
535         This incorporates:
536         2023-02-07 Use 64-bit time_t interfaces in strftime and strptime
537         * lib/strftime.c [_LIBC] (time_t, __gmtime_r, mktime): Define as macros.
538         * config/srclist.txt: Update comment regarding glibc/time/strftime_l.c.
540 2024-02-06  Bruno Haible  <bruno@clisp.org>
542         nstrftime, fprintftime: Simplify.
543         * lib/strftime.c: Renamed from lib/nstrftime.c.
544         (my_strftime): Don't define here.
545         * lib/nstrftime.c: New file.
546         * lib/fprintftime.c (my_strftime): New macro.
547         Include strftime.c, not nstrftime.c.
548         * m4/nstrftime.m4 (gl_FUNC_GNU_STRFTIME): Don't define my_strftime in
549         config.h.
550         * modules/nstrftime (Files): Add lib/strftime.c.
551         * modules/fprintftime (Files): Likewise.
552         * config/srclist.txt: Update comment regarding glibc/time/strftime.c.
554 2024-02-06  Bruno Haible  <bruno@clisp.org>
556         Further improve cross-compilation for midipix.
557         Reported by Ørjan Malde <red@foxi.me>.
558         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Improve cross-compilation guess
559         for midipix.
561 2024-02-05  Paul Eggert  <eggert@cs.ucla.edu>
563         ctime: improve doc
564         * doc/posix-functions/asctime.texi (asctime):
565         * doc/posix-functions/asctime_r.texi (asctime_r):
566         * doc/posix-functions/ctime_r.texi (ctime_r):
567         * doc/posix-functions/ctime.texi (ctime):
568         Mention locale problem of strftime more consistently.  Improve
569         wording.  For ctime and ctime_r, mention that localtime_r can
570         fail.
571         * doc/posix-functions/ctime.texi (ctime): Move history section
572         to end and spiff up a bit.
573         * doc/posix-functions/ctime_r.texi (ctime_r): Omit commentary that
574         assumes traditional SunOS ctime_r API; it was confusing and not
575         useful for Gnulib apps, which assume the POSIX API.
577 2024-02-05  Bruno Haible  <bruno@clisp.org>
579         Further improve cross-compilation for midipix.
580         Based on patch by Ørjan Malde <red@foxi.me> from
581         <https://lists.gnu.org/archive/html/bug-gnulib/2024-02/msg00004.html>.
582         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Add cross-compilation guess for
583         midipix.
584         * m4/rename.m4 (gl_FUNC_RENAME): Likewise.
585         * m4/truncate.m4 (gl_FUNC_TRUNCATE): Likewise.
586         * m4/utime.m4 (gl_FUNC_UTIME): Likewise.
587         * m4/utimens.m4 (gl_UTIMENS): Likewise.
588         * m4/utimensat.m4 (gl_FUNC_UTIMENSAT): Likewise.
590 2024-02-05  Paul Eggert  <eggert@cs.ucla.edu>
592         doc: Extend doc of *ctime functions.
593         * doc/posix-functions/ctime.texi (ctime): Document why we got into
594         this mess.
595         * doc/posix-functions/asctime.texi (asctime):
596         * doc/posix-functions/asctime_r.texi (asctime_r):
597         * doc/posix-functions/ctime_r.texi (ctime_r):
598         Refer to ctime’s buffer overflow doc.
600 2024-02-05  Bruno Haible  <bruno@clisp.org>
602         snippet/warn-on-use: Add comment.
603         * lib/warn-on-use.h: Document a restriction of _GL_WARN_ON_USE.
605 2024-02-03  Paul Eggert  <eggert@cs.ucla.edu>
607         xalloc-oversized: omit unnecessary cast
608         * lib/xalloc-oversized.h (__xalloc_oversized): Omit unnecessary
609         cast of a positive in-range value to size_t.  This seems to be
610         left over from an older version of the code.
612         glob: port better to C23
613         * lib/glob.c: Include <stdckdint.h>.
614         (size_add_wrapv): Remove.  All uses replaced by ckd_add.
615         * modules/glob: Depend on stdckdint.
617         ctime: fix false positive
618         Problem reported by Bjarni Ingi Gislason in:
619         https://lists.gnu.org/r/bug-gnulib/2024-02/msg00006.html
620         * lib/time.in.h (ctime): Do not warn about ctime portability,
621         as there is a more serious warning about it crashing,
622         and the two warning directives can cause false alarms.
624 2024-01-31  Bruno Haible  <bruno@clisp.org>
626         Implement 3 new properties, added by Unicode 15.1.0.
627         * lib/gen-uni-tables.c (is_property_id_compat_math_start,
628         is_property_id_compat_math_continue, is_property_ids_unary_operator):
629         New functions.
630         (output_properties): Output also the properties id_compat_math_start,
631         id_compat_math_continue, ids_unary_operator.
632         * lib/unictype.in.h (UC_PROPERTY_ID_COMPAT_MATH_START,
633         UC_PROPERTY_ID_COMPAT_MATH_CONTINUE, UC_PROPERTY_IDS_UNARY_OPERATOR,
634         uc_is_property_id_compat_math_start,
635         uc_is_property_id_compat_math_continue,
636         uc_is_property_ids_unary_operator): New declarations.
637         * m4/unictype_h.m4 (gl_UNICTYPE_H_REQUIRE_DEFAULTS): Initialize
638         GNULIB_UNICTYPE_PROPERTY_ID_COMPAT_MATH_START_DLL_VARIABLE,
639         GNULIB_UNICTYPE_PROPERTY_ID_COMPAT_MATH_CONTINUE_DLL_VARIABLE,
640         GNULIB_UNICTYPE_PROPERTY_IDS_UNARY_OPERATOR_DLL_VARIABLE.
641         * modules/unictype/base (Makefile.am): Substitute
642         GNULIB_UNICTYPE_PROPERTY_ID_COMPAT_MATH_START_DLL_VARIABLE,
643         GNULIB_UNICTYPE_PROPERTY_ID_COMPAT_MATH_CONTINUE_DLL_VARIABLE,
644         GNULIB_UNICTYPE_PROPERTY_IDS_UNARY_OPERATOR_DLL_VARIABLE.
645         * lib/unictype/pr_id_compat_math_continue.c: New file.
646         * lib/unictype/pr_id_compat_math_continue.h: New generated file.
647         * lib/unictype/pr_id_compat_math_start.c: New file.
648         * lib/unictype/pr_id_compat_math_start.h: New generated file.
649         * lib/unictype/pr_ids_unary_operator.c: New file.
650         * modules/unictype/property-id-compat-math-continue: New file.
651         * modules/unictype/property-id-compat-math-start: New file.
652         * modules/unictype/property-ids-unary-operator: New file.
653         * tests/unictype/test-pr_id_compat_math_continue.c: New generated file.
654         * tests/unictype/test-pr_id_compat_math_start.c: New generated file.
655         * tests/unictype/test-pr_ids_unary_operator.c: New generated file.
656         * modules/unictype/property-id-compat-math-continue-tests: New file.
657         * modules/unictype/property-id-compat-math-start-tests: New file.
658         * modules/unictype/property-ids-unary-operator-tests: New file.
659         * lib/unictype/pr_byname.gperf: Add id_compat_math_start,
660         id_compat_math_continue, ids_unary_operator.
661         * lib/unictype/pr_byname.c (UC_PROPERTY_INDEX_ID_COMPAT_MATH_START,
662         UC_PROPERTY_INDEX_ID_COMPAT_MATH_CONTINUE,
663         UC_PROPERTY_INDEX_IDS_UNARY_OPERATOR): New enum items.
664         (uc_property_byname): Handle them.
665         * modules/unictype/property-byname (Depends-on): Add
666         unictype/property-id-compat-math-continue,
667         unictype/property-id-compat-math-start,
668         unictype/property-ids-unary-operator.
669         * modules/unictype/property-all (Depends-on): Likewise.
670         * MODULES.html.sh (func_all_modules): Add
671         unictype/property-id-compat-math-continue,
672         unictype/property-id-compat-math-start,
673         unictype/property-ids-unary-operator.
675 2024-01-30  Bruno Haible  <bruno@clisp.org>
677         Update to Unicode 15.1.0.
679         * lib/gen-uni-tables.c (PROP_SENTENCE_TERMINAL): Renamed from
680         PROP_STERM.
681         (PROP_IDS_UNARY_OPERATOR, PROP_ID_COMPAT_MATH_CONTINUE,
682         PROP_ID_COMPAT_MATH_START): New enum items.
683         (UC_INDIC_CONJUNCT_BREAK_*): New enum items.
684         (unicode_indic_conjunct_break): New variable.
685         (fill_properties): Rename local variable propvalue to propcode. Handle
686         the properties IDS_Unary_Operator, ID_Compat_Math_Continue,
687         ID_Compat_Math_Start. Parse the InCB values from file
688         DerivedCoreProperties.txt.
689         (indic_conjunct_break_as_c_identifier,
690         output_indic_conjunct_break_test): New functions.
691         (indic_conjunct_break_table): New variable.
692         (output_indic_conjunct_break): New function.
693         (fill_width): Accept spaces at the end of field0 and at the start and
694         end of field1.
695         (LBP_QU1, LBP_QU2, LBP_QU3): New enum items, for Unicode TR #14 rules
696         (LB15a) and (LB15b).
697         (LBP_AP, LBP_AK, LBP_AS, LBP_VI, LBP_VF): New enum items, for Brahmic
698         scripts.
699         (get_lbp): Update such that unilbrk/lbrkprop.txt comes out as expected.
700         (debug_output_lbp): Print either LBP_QU1 or LBP_QU2 or LBP_QU3 as
701         LBP_QU. Handle LBP_AP, LBP_AK, LBP_AS, LBP_VI, LBP_VF.
702         (fill_org_lbp): Accept spaces at the end of field0 and at the start and
703         end of field1. Recognize LBP_AP, LBP_AK, LBP_AS, LBP_VI, LBP_VF.
704         (debug_output_org_lbp): Handle LBP_AP, LBP_AK, LBP_AS, LBP_VI, LBP_VF.
705         (lbp_value_to_string): Handle LBP_QU1, LBP_QU2, LBP_QU3 instead of
706         LBP_QU. Handle LBP_AP, LBP_AK, LBP_AS, LBP_VI, LBP_VF.
707         (output_lbrk_rules_as_tables): Treat LBP_QU as macro that maps to three
708         table rows/columns. Replace rule (LB15) with rules (LB15b) and (LB15a).
709         (get_wbp): Update such that uniwbrk/wbrkprop.txt comes out as expected.
710         (main): Invoke output_indic_conjunct_break_test and
711         output_indic_conjunct_break.
713         * All generated files under lib/uni* and tests/uni*: Regenerate.
714         * tests/uniname/NameAliases.txt: Update.
715         * tests/uniname/UnicodeData.txt: Update.
716         * tests/uninorm/NormalizationTest.txt: Update.
717         * tests/unigbrk/GraphemeBreakTest.txt: Update.
718         * tests/uniwbrk/WordBreakTest.txt: Update.
720         * lib/unilbrk/lbrktables.h (LBP_QU1, LBP_QU2, LBP_QU3): New enum items,
721         for Unicode TR #14 rules (LB15a) and (LB15b).
722         (LBP_QU): Remove enum item.
723         (LBP_AP, LBP_AK, LBP_AS, LBP_VI, LBP_VF): New enum items, for Brahmic
724         scripts.
725         (unilbrk_table): Update array bounds.
726         * lib/unilbrk/u8-possible-linebreaks.c (u8_possible_linebreaks_loop):
727         Conditionally replace LBP_QU2 with LBP_QU1, for rule (LB15a).
728         Conditionally replace LBP_QU3 with LBP_QU1, for rule (LB15b).
729         * lib/unilbrk/u16-possible-linebreaks.c (u16_possible_linebreaks_loop):
730         Likewise.
731         * lib/unilbrk/u32-possible-linebreaks.c (u32_possible_linebreaks_loop):
732         Likewise.
734         * lib/unictype.in.h (UC_INDIC_CONJUNCT_BREAK_*): New enum values.
735         (uc_indic_conjunct_break_name, uc_indic_conjunct_break_byname,
736         uc_indic_conjunct_break): New declarations.
737         * lib/unictype/incb_byname.c: New file.
738         * lib/unictype/incb_byname.gperf: New file.
739         * lib/unictype/incb_name.c: New file.
740         * lib/unictype/incb_name.h: New file.
741         * lib/unictype/incb_of.c: New file.
742         * lib/unictype/incb_of.h: New generated file.
743         * modules/unictype/incb-all: New file.
744         * modules/unictype/incb-byname: New file.
745         * modules/unictype/incb-name: New file.
746         * modules/unictype/incb-of: New file.
747         * tests/unictype/test-incb_byname.c: New file.
748         * tests/unictype/test-incb_name.c: New file.
749         * tests/unictype/test-incb_of.c: New file.
750         * tests/unictype/test-incb_of.h: New generated file.
751         * modules/unictype/incb-byname-tests: New file.
752         * modules/unictype/incb-name-tests: New file.
753         * modules/unictype/incb-of-tests: New file.
755         * lib/unigbrk.in.h (uc_is_grapheme_break, u*_grapheme_next,
756         u*_grapheme_prev): Add comments.
757         * lib/unigbrk/u-grapheme-breaks.h (FUNC): Add local variables
758         incb_consonant_extended, incb_consonant_extended_linker,
759         incb_consonant_extended_linker_extended. Implement rule (GB9c).
760         * modules/unigbrk/u8-grapheme-breaks (Depends-on): Add unictype/incb-of.
761         * modules/unigbrk/u16-grapheme-breaks (Depends-on): Likewise.
762         * modules/unigbrk/u32-grapheme-breaks (Depends-on): Likewise.
763         * modules/unigbrk/uc-grapheme-breaks (Depends-on): Likewise.
764         * tests/unigbrk/test-uc-is-grapheme-break.c (main): Add local variables
765         incb_consonant_extended, incb_consonant_extended_linker,
766         incb_consonant_extended_linker_extended. Skip test cases that match rule
767         (GB9c).
768         * modules/unigbrk/uc-is-grapheme-break-tests (Depends-on): Add
769         unictype/incb-of.
771         * All the affected modules: Bump required libunistring version.
773 2024-01-30  Bruno Haible  <bruno@clisp.org>
775         unigbrk/uc-is-grapheme-break tests: Reduce verbosity.
776         * tests/unigbrk/test-uc-is-grapheme-break.c
777         (graphemebreakproperty_to_string): Don't print gbp to stdout.
779 2024-01-30  Bruno Haible  <bruno@clisp.org>
781         gen-uni-tables: Update copyright year in output.
782         * lib/gen-uni-tables.c (output_predicate_test, output_predicate,
783         output_category, output_combclass, output_bidi_category,
784         output_decimal_digit_test, output_decimal_digit, output_digit_test,
785         output_digit, output_numeric_test, output_numeric, output_mirror,
786         output_joining_type_test, output_joining_type,
787         output_joining_group_test, output_joining_group, output_scripts,
788         output_scripts_byname, output_blocks, output_ident_category,
789         output_nonspacing_property, output_lbrk_tables,
790         output_lbrk_rules_as_tables, output_wbrk_tables, output_gbp_test,
791         output_gbp_table, output_decomposition_tables,
792         output_composition_tables, output_simple_mapping_test,
793         output_simple_mapping, output_casing_rules): Bump copyright year in
794         output.
795         * lib/uniname/gen-uninames.lisp (main): Likewise.
797 2024-01-30  Bruno Haible  <bruno@clisp.org>
799         gen-uni-tables: Refactor, based on UAX #14 version 49.
800         * lib/gen-uni-tables.c (get_lbp): Reorder, based on
801         <https://www.unicode.org/reports/tr14/tr14-49.html#DescriptionOfProperties>.
802         For LBP_EB, use the "emoji modifier base" property.
804 2024-01-30  Bruno Haible  <bruno@clisp.org>
806         unigbrk tests: Tweak error reporting.
807         * tests/unigbrk/test-ulc-grapheme-breaks.c (main): Print byte values in
808         upper-case hexadecimal.
809         * tests/unigbrk/test-u8-grapheme-breaks.c (test_u8_grapheme_breaks):
810         Print unit values in upper-case hexadecimal.
811         * tests/unigbrk/test-u16-grapheme-breaks.c (test_u16_grapheme_breaks):
812         Print unit values with at least 4 hexadecimal digits.
813         * tests/unigbrk/test-u32-grapheme-breaks.c (test_u32_grapheme_breaks):
814         Likewise.
815         * tests/unigbrk/test-uc-grapheme-breaks.c (test_uc_grapheme_breaks):
816         Print characters with at least 4 hexadecimal digits.
818 2024-01-30  Bruno Haible  <bruno@clisp.org>
820         Update copyright year in tests/unictype/*.
821         * tests/unictype/*: Bump copyright years range to include 2024.
822         * Makefile (update-copyright): Don't exclude the tests/unictype
823         directory.
825 2024-01-29  Patrice Dumas  <pertusus@free.fr>
827         gendocs: get only targetted manual source and includes, when possible
828         * build-aux/gendocs.sh: if makeinfo, based on version, has the
829         --trace-includes option, gather only the targetted manual srcfile and
830         the included files obtained with makeinfo --trace-includes. In that
831         case output include files to tar stdin and use -T-. Bruno Haible for
832         the version comparison and use of tar.
834 2024-01-29  Bruno Haible  <bruno@clisp.org>
836         Port FALLTHROUGH to Mac OS X 10.9.
837         Report and fix by Ryan Carsten Schmidt <gnulib@ryandesign.com>
838         at <https://savannah.gnu.org/bugs/?63866>.
839         * m4/gnulib-common.m4 (gl_COMMON_BODY): For _GL_HAS_ATTRIBUTE, don't use
840         __has_attribute for Apple clang versions < 7000000.
841         * lib/cdefs.h (__glibc_has_attribute): Don't use __has_attribute for
842         Apple clang versions < 7000000.
844 2024-01-29  Bruno Haible  <bruno@clisp.org>
846         libc-config: Apply lesson learned on 2023-01-13.
847         * lib/cdefs.h (__glibc_has_attribute): On non-Apple platforms, don't
848         use __has_attribute for clang versions < 5.0.
850 2024-01-28  Bruno Haible  <bruno@clisp.org>
852         host-cpu-c-abi: Let gl_HOST_CPU_C_ABI_32BIT never return 'unknown'.
853         Reported by Mohammad-Reza Nabipoor <mnabipoor@gnu.org>.
854         * m4/host-cpu-c-abi.m4 (gl_HOST_CPU_C_ABI_32BIT): Use the list of
855         always-32-bit CPUs and the list of always-64-bit CPUs also when
856         gl_HOST_CPU_C_ABI has already been run. As a fallback, use a test of
857         'sizeof (void *)' to always return 'yes' or 'no', never 'unknown'.
859 2024-01-27  Paul Eggert  <eggert@cs.ucla.edu>
861         gendocs: allow other chars in source file names
862         * build-aux/gendocs.sh: Generalize to also allow leading ‘-’
863         and newlines (!) in source file names.  Exit if there
864         is an error creating the tarball.
866 2024-01-27  Patrice Dumas  <pertusus@free.fr>
868         gendocs: allow spaces, metacharacters and quotes in source file names
869         * build-aux/gendocs.sh: output files to tar stdin and use -T- to allow
870         spaces, metacharacters and quotes in file names.  Bruno Haible
871         solution.
873 2024-01-27  Patrice Dumas  <pertusus@free.fr>
875         gendocs: fix --no-html
876         * build-aux/gendocs.sh: fix typo in variable name set by --no-html.
878 2024-01-25  Bruno Haible  <bruno@clisp.org>
880         execute tests: Avoid test failure on macOS 14.
881         Reported by Guangyu Li <gl343@cornell.edu> in
882         <https://lists.gnu.org/archive/html/bug-gettext/2024-01/msg00006.html>.
883         * tests/test-execute-main.c (main): In the tests 17, 18, 19, 20, use the
884         file descriptors 15, 16 instead of 10, 11, respectively.
885         * tests/test-execute-child.c (main): Likewise.
887 2024-01-25  Bruno Haible  <bruno@clisp.org>
889         Resolve conflicts for functions introduced in Android API level 35.
891         * lib/time.in.h (timespec_getres): Consider REPLACE_TIMESPEC_GETRES.
892         * m4/time_h.m4 (gl_TIME_H_DEFAULTS): Initialize REPLACE_TIMESPEC_GETRES.
893         * modules/time-h (Makefile.am): Substitute REPLACE_TIMESPEC_GETRES.
894         * m4/timespec_getres.m4 (gl_FUNC_TIMESPEC_GETRES): Test for
895         timespec_getres using gl_CHECK_FUNCS_ANDROID instead of
896         AC_CHECK_FUNCS_ONCE. Conditionally set REPLACE_TIMESPEC_GETRES.
897         * modules/timespec_getres (Depends-on, configure.ac): Consider
898         REPLACE_TIMESPEC_GETRES.
899         * m4/gettime.m4 (gl_GETTIME_RES): Test for timespec_getres using
900         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
901         * doc/posix-functions/timespec_getres.texi: Mention the Android API
902         levels.
904 2024-01-25  Bruno Haible  <bruno@clisp.org>
906         Resolve conflicts for functions introduced in Android API level 34.
908         * m4/copy-file-range.m4 (gl_FUNC_COPY_FILE_RANGE): On platforms without
909         glibc, test for copy_file_range using gl_CHECK_FUNCS_ANDROID instead of
910         AC_CHECK_FUNCS_ONCE. Conditionally set REPLACE_COPY_FILE_RANGE.
911         * doc/glibc-functions/copy_file_range.texi: Mention the Android API
912         levels.
914         * m4/posix_spawn.m4 (gl_POSIX_SPAWN_BODY): Test for
915         posix_spawn_file_actions_addchdir_np and
916         posix_spawn_file_actions_addfchdir_np using gl_CHECK_FUNCS_ANDROID
917         instead of AC_CHECK_FUNCS_ONCE.
918         * m4/posix_spawn_faction_addchdir.m4
919         (gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR): Test for
920         posix_spawn_file_actions_addchdir_np using gl_CHECK_FUNCS_ANDROID
921         instead of AC_CHECK_FUNCS_ONCE.
922         * m4/posix_spawn_faction_addfchdir.m4
923         (gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR): Test for
924         posix_spawn_file_actions_addfchdir_np using gl_CHECK_FUNCS_ANDROID
925         instead of AC_CHECK_FUNCS_ONCE.
926         * doc/glibc-functions/posix_spawn_file_actions_addchdir_np.texi: Mention
927         the Android API levels.
928         * doc/glibc-functions/posix_spawn_file_actions_addfchdir_np.texi:
929         Likewise.
931         * lib/string.in.h (memset_explicit): Consider REPLACE_MEMSET_EXPLICIT.
932         * m4/string_h.m4 (gl_STRING_H_DEFAULTS): Initialize
933         REPLACE_MEMSET_EXPLICIT.
934         * modules/string (Makefile.am): Substitute REPLACE_MEMSET_EXPLICIT.
935         * m4/memset_explicit.m4 (gl_FUNC_MEMSET_EXPLICIT): Test for
936         memset_explicit using gl_CHECK_FUNCS_ANDROID instead of
937         AC_CHECK_FUNCS_ONCE. Conditionally set REPLACE_MEMSET_EXPLICIT.
938         * modules/memset_explicit (configure.ac): Consider
939         REPLACE_MEMSET_EXPLICIT.
940         * doc/posix-functions/memset_explicit.texi: Mention the Android API
941         levels.
943         * m4/freadahead.m4 (gl_FUNC_FREADAHEAD): Test for __freadahead using
944         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
945         * lib/freadahead.h: Update comment.
947 2024-01-25  Bruno Haible  <bruno@clisp.org>
949         Doc regarding functions introduced in Android API level 33.
950         * doc/glibc-functions/backtrace.texi: Mention the Android API levels.
951         * doc/glibc-functions/backtrace_symbols.texi: Likewise.
952         * doc/glibc-functions/backtrace_symbols_fd.texi: Likewise.
953         * doc/glibc-functions/preadv2.texi: Likewise.
954         * doc/glibc-functions/pwritev2.texi: Likewise.
956 2024-01-25  Bruno Haible  <bruno@clisp.org>
958         Resolve conflicts for functions introduced in Android API level 30.
960         * doc/glibc-functions/memfd_create.texi: Mention the Android API levels.
961         * doc/glibc-functions/mlock2.texi: Likewise.
962         * doc/glibc-functions/pthread_cond_clockwait.texi: Likewise.
963         * doc/glibc-functions/pthread_mutex_clocklock.texi: Likewise.
964         * doc/glibc-functions/pthread_rwlock_clockrdlock.texi: Likewise.
965         * doc/glibc-functions/pthread_rwlock_clockwrlock.texi: Likewise.
966         * doc/glibc-functions/renameat2.texi: Likewise.
967         * doc/glibc-functions/sem_clockwait.texi: Likewise.
968         * doc/glibc-functions/statx.texi: Likewise.
970         * lib/threads.in.h (thrd_sleep): Consider REPLACE_THRD_SLEEP.
971         (thrd_yield): Consider REPLACE_THRD_YIELD.
972         (mtx_init): Consider REPLACE_MTX_INIT.
973         (mtx_lock): Consider REPLACE_MTX_LOCK.
974         (mtx_trylock): Consider REPLACE_MTX_TRYLOCK.
975         (mtx_timedlock): Consider REPLACE_MTX_TIMEDLOCK.
976         (mtx_unlock): Consider REPLACE_MTX_UNLOCK.
977         (mtx_destroy): Consider REPLACE_MTX_DESTROY.
978         (call_once): Consider REPLACE_CALL_ONCE. Fix warning message.
979         (cnd_init): Consider REPLACE_CND_INIT.
980         (cnd_wait): Consider REPLACE_CND_WAIT.
981         (cnd_timedwait): Consider REPLACE_CND_TIMEDWAIT.
982         (cnd_signal): Consider REPLACE_CND_SIGNAL.
983         (cnd_broadcast): Consider REPLACE_CND_BROADCAST.
984         (cnd_destroy): Consider REPLACE_CND_DESTROY.
985         (tss_create): Consider REPLACE_TSS_CREATE.
986         (tss_set): Consider REPLACE_TSS_SET.
987         (tss_get): Consider REPLACE_TSS_GET.
988         (tss_delete): Consider REPLACE_TSS_DELETE.
989         * m4/threads_h.m4 (gl_THREADS_H_DEFAULTS): Initialize REPLACE_CALL_ONCE,
990         REPLACE_CND_BROADCAST, REPLACE_CND_DESTROY, REPLACE_CND_INIT,
991         REPLACE_CND_SIGNAL, REPLACE_CND_TIMEDWAIT, REPLACE_CND_WAIT,
992         REPLACE_MTX_DESTROY, REPLACE_MTX_INIT, REPLACE_MTX_LOCK,
993         REPLACE_MTX_TIMEDLOCK, REPLACE_MTX_TRYLOCK, REPLACE_MTX_UNLOCK,
994         REPLACE_THRD_SLEEP, REPLACE_THRD_YIELD, REPLACE_TSS_CREATE,
995         REPLACE_TSS_DELETE, REPLACE_TSS_GET, REPLACE_TSS_SET.
996         * modules/threads-h (Makefile.am): Substitute REPLACE_CALL_ONCE,
997         REPLACE_CND_BROADCAST, REPLACE_CND_DESTROY, REPLACE_CND_INIT,
998         REPLACE_CND_SIGNAL, REPLACE_CND_TIMEDWAIT, REPLACE_CND_WAIT,
999         REPLACE_MTX_DESTROY, REPLACE_MTX_INIT, REPLACE_MTX_LOCK,
1000         REPLACE_MTX_TIMEDLOCK, REPLACE_MTX_TRYLOCK, REPLACE_MTX_UNLOCK,
1001         REPLACE_THRD_SLEEP, REPLACE_THRD_YIELD, REPLACE_TSS_CREATE,
1002         REPLACE_TSS_DELETE, REPLACE_TSS_GET, REPLACE_TSS_SET.
1003         * m4/thrd.m4 (gl_FUNC_THRD_CREATE): New macro.
1004         * modules/thrd (configure.ac): Invoke gl_FUNC_THRD_CREATE.
1005         * m4/call_once.m4: New file.
1006         * modules/call_once (Files): Add m4/call_once.m4.
1007         (configure.ac): Invoke gl_FUNC_CALL_ONCE. Consider REPLACE_CALL_ONCE.
1008         * m4/cnd.m4: New file.
1009         * modules/cnd (Files): Add m4/cnd.m4.
1010         (configure.ac): Invoke gl_FUNC_CND_INIT. Consider REPLACE_CND_INIT.
1011         * m4/mtx.m4: New file.
1012         * modules/mtx (Files): Add m4/mtx.m4.
1013         (configure.ac): Invoke gl_FUNC_MTX_INIT. Consider REPLACE_MTX_INIT.
1014         * m4/tss.m4: New file.
1015         * modules/tss (Files): Add m4/tss.m4.
1016         (configure.ac): Invoke gl_FUNC_TSS_CREATE. Consider REPLACE_TSS_CREATE.
1017         * doc/posix-functions/call_once.texi: Mention the Android API levels.
1018         * doc/posix-functions/cnd_broadcast.texi: Likewise.
1019         * doc/posix-functions/cnd_destroy.texi: Likewise.
1020         * doc/posix-functions/cnd_init.texi: Likewise.
1021         * doc/posix-functions/cnd_signal.texi: Likewise.
1022         * doc/posix-functions/cnd_timedwait.texi: Likewise.
1023         * doc/posix-functions/cnd_wait.texi: Likewise.
1024         * doc/posix-functions/mtx_destroy.texi: Likewise.
1025         * doc/posix-functions/mtx_init.texi: Likewise.
1026         * doc/posix-functions/mtx_lock.texi: Likewise.
1027         * doc/posix-functions/mtx_timedlock.texi: Likewise.
1028         * doc/posix-functions/mtx_trylock.texi: Likewise.
1029         * doc/posix-functions/mtx_unlock.texi: Likewise.
1030         * doc/posix-functions/thrd_create.texi: Likewise.
1031         * doc/posix-functions/thrd_current.texi: Likewise.
1032         * doc/posix-functions/thrd_detach.texi: Likewise.
1033         * doc/posix-functions/thrd_equal.texi: Likewise.
1034         * doc/posix-functions/thrd_exit.texi: Likewise.
1035         * doc/posix-functions/thrd_join.texi: Likewise.
1036         * doc/posix-functions/thrd_sleep.texi: Likewise.
1037         * doc/posix-functions/thrd_yield.texi: Likewise.
1038         * doc/posix-functions/tss_create.texi: Likewise.
1039         * doc/posix-functions/tss_delete.texi: Likewise.
1040         * doc/posix-functions/tss_get.texi: Likewise.
1041         * doc/posix-functions/tss_set.texi: Likewise.
1043 2024-01-21  Bruno Haible  <bruno@clisp.org>
1045         readutmp, boot-time: Port to Android NDK r26.
1046         Reported by Po Lu <luangruo@yahoo.com> in
1047         <https://lists.gnu.org/archive/html/bug-gnulib/2024-01/msg00063.html>.
1048         * lib/readutmp.h: Update comments.
1049         (UTMP_NAME_FUNCTION): Define as a no-op for Android with HAVE_UTMPX_H.
1051 2024-01-21  Bruno Haible  <bruno@clisp.org>
1053         asyncsafe-spin: Fix link error on various platforms.
1054         * m4/atomic-cas.m4: New file.
1055         * lib/asyncsafe-spin.c: Test HAVE_ATOMIC_COMPARE_AND_SWAP_GCC41 instead
1056         of a condition that considers only __sparc__, __ANDROID__, __ibmxl__.
1057         * lib/pthread-spin.c: Likewise.
1058         * lib/simple-atomic.c: Likewise.
1059         * modules/asyncsafe-spin (Files): Add m4/atomic-cas.m4.
1060         (configure.ac): Require gl_ATOMIC_COMPARE_AND_SWAP.
1061         * modules/pthread-spin: Likewise.
1062         * modules/simple-atomic: Likewise.
1064 2024-01-19  Bruno Haible  <bruno@clisp.org>
1066         fenv-environment: Fix for NetBSD/powerpc.
1067         * m4/fenv-environment.m4 (gl_FENV_ENVIRONMENT): For feupdateenv, use
1068         the same configure test on NetBSD/powerpc as on glibc/hppa.
1069         * doc/posix-functions/feupdateenv.texi: Mention the NetBSD/powerpc bug.
1071         fenv-exceptions-trapping: Avoid a test failure on *BSD/powerpc*.
1072         * tests/test-fenv-except-trapping-2.c (main): Skip the '4' tests also on
1073         FreeBSD/powerpc* and NetBSD/powerpc*.
1075         fenv-exceptions-state-c99: Fix for FreeBSD/powerpc64 and NetBSD/powerpc.
1076         * m4/fenv-exceptions-state.m4 (gl_FENV_EXCEPTIONS_STATE): On
1077         FreeBSD/powerpc64 and NetBSD/powerpc, set REPLACE_FESETEXCEPTFLAG.
1078         * doc/posix-functions/fesetexceptflag.texi: Mention the FreeBSD and
1079         NetBSD bug.
1081         fenv-*: Avoid test failures on FreeBSD/powerpc64 and NetBSD/powerpc.
1082         On these platforms, FE_ALL_EXCEPT contains additional bits.
1083         * tests/test-fenv-except-tracking-1.c (FE_VXSOFT, FE_VXZDZ): Define
1084         fallbacks.
1085         (main): Allow fetestexcept(FE_ALL_EXCEPT) to contain FE_VXSOFT or
1086         FE_VXZDZ in addition to FE_INVALID.
1087         * tests/test-fenv-except-tracking-4.c (FE_VXSOFT): Define fallback.
1088         (main): Allow fetestexcept(FE_ALL_EXCEPT) to contain FE_VXSOFT in
1089         addition to FE_INVALID.
1090         * tests/test-fenv-env-2.c: Likewise.
1091         * tests/test-fenv-env-3.c: Likewise.
1092         * tests/test-fenv-env-4.c: Likewise.
1093         * tests/test-fenv-env-5.c: Likewise.
1095 2024-01-19  Bruno Haible  <bruno@clisp.org>
1097         fenv-*: Fix test failures on NetBSD 9.3/arm64.
1098         * m4/fenv-exceptions-trapping.m4 (gl_FENV_EXCEPTIONS_TRAPPING): Override
1099         feenableexcept() also on NetBSD/arm64.
1100         * doc/glibc-functions/feenableexcept.texi: Update platforms list.
1102 2024-01-19  Bruno Haible  <bruno@clisp.org>
1104         fenv-*: Avoid test failures on OpenBSD/sparc64.
1105         * tests/test-fenv-except-tracking-2.c (main): On OpenBSD/sparc64, skip
1106         the 'long double' test.
1107         * tests/test-fenv-except-trapping-2.c (main): Skip the 'long double'
1108         tests also on OpenBSD/sparc64.
1110 2024-01-18  Bruno Haible  <bruno@clisp.org>
1112         fenv-rounding: Avoid a test failure on OpenBSD/arm64.
1113         * tests/test-fenv-round.c (test_towardzero, test_upward, test_downward):
1114         Skip the 'long double' tests on OpenBSD/arm64.
1115         * doc/posix-functions/fesetround.texi: Update platforms list.
1117 2024-01-18  Bruno Haible  <bruno@clisp.org>
1119         Avoid test failures in FreeBSD's GB18030 locale.
1120         The FreeBSD 14.0 iconv converter (GB18030 → UTF-8) cannot convert e.g.
1121         0x94 0x32 0xBB 0x34 to U+1D100.
1122         * tests/test-c32isalnum.c (main): Skip the GB18030 locale tests on
1123         FreeBSD, if GL_CHAR32_T_IS_UNICODE (or, equivalently,
1124         GL_CHAR32_T_VS_WCHAR_T_NEEDS_CONVERSION) is defined.
1125         * tests/test-c32isalpha.c (main): Likewise.
1126         * tests/test-c32isblank.c (main): Likewise.
1127         * tests/test-c32iscntrl.c (main): Likewise.
1128         * tests/test-c32isdigit.c (main): Likewise.
1129         * tests/test-c32islower.c (main): Likewise.
1130         * tests/test-c32ispunct.c (main): Likewise.
1131         * tests/test-c32isspace.c (main): Likewise.
1132         * tests/test-c32isupper.c (main): Likewise.
1133         * tests/test-c32isxdigit.c (main): Likewise.
1134         * tests/test-c32rtomb.c (main): Likewise.
1135         * tests/test-c32snrtombs.c (main): Likewise.
1136         * tests/test-c32srtombs.c (main): Likewise.
1137         * tests/test-c32stombs.c (main): Likewise.
1138         * tests/test-c32tolower.c (main): Likewise.
1139         * tests/test-c32toupper.c (main): Likewise.
1140         * tests/test-mbrtoc16.c (main): Likewise.
1141         * tests/test-mbrtoc32.c (main): Likewise.
1142         * tests/test-mbsnrtoc32s.c (main): Likewise.
1143         * tests/test-mbsrtoc32s.c (main): Likewise.
1144         * tests/test-mbstoc32s.c (main): Likewise.
1146 2024-01-18  Bruno Haible  <bruno@clisp.org>
1148         get-rusage-data: Avoid test failure on NetBSD 9.3.
1149         * tests/test-get-rusage-data.c (main): Don't expect a strict increase on
1150         NetBSD systems.
1152 2024-01-18  Bruno Haible  <bruno@clisp.org>
1154         log10l: Work around bug on NetBSD 9.3/arm64.
1155         * m4/log10l.m4 (gl_FUNC_LOG10L_WORKS): Add another test case, taken from
1156         the unit test.
1158 2024-01-18  Bruno Haible  <bruno@clisp.org>
1160         doc: Update regarding <math.h> *l functions on NetBSD 9.3.
1161         * doc/posix-functions/acoshl.texi: Mention the buggy implementation on
1162         NetBSD.
1163         * doc/posix-functions/acosl.texi: Likewise.
1164         * doc/posix-functions/asinhl.texi: Likewise.
1165         * doc/posix-functions/asinl.texi: Likewise.
1166         * doc/posix-functions/atan2l.texi: Likewise.
1167         * doc/posix-functions/atanhl.texi: Likewise.
1168         * doc/posix-functions/atanl.texi: Likewise.
1169         * doc/posix-functions/coshl.texi: Likewise.
1170         * doc/posix-functions/cosl.texi: Likewise.
1171         * doc/posix-functions/erfcl.texi: Likewise.
1172         * doc/posix-functions/erfl.texi: Likewise.
1173         * doc/posix-functions/powl.texi: Likewise.
1174         * doc/posix-functions/sinhl.texi: Likewise.
1175         * doc/posix-functions/sinl.texi: Likewise.
1176         * doc/posix-functions/tanhl.texi: Likewise.
1177         * doc/posix-functions/tanl.texi: Likewise.
1178         * doc/posix-functions/expl.texi: Update NetBSD version info.
1179         * doc/posix-functions/exp2l.texi: Likewise.
1180         * doc/posix-functions/hypotl.texi: Likewise.
1181         * doc/posix-functions/logl.texi: Likewise.
1182         * doc/posix-functions/log10l.texi: Likewise.
1183         * m4/expl.m4 (gl_FUNC_EXPL): Update comments.
1184         * m4/exp2l.m4 (gl_FUNC_EXP2L): Likewise.
1185         * m4/hypotl.m4 (gl_FUNC_HYPOTL_WORKS): Likewise.
1186         * m4/logl.m4 (gl_FUNC_LOGL_WORKS): Likewise.
1187         * m4/log10l.m4 (gl_FUNC_LOG10L_WORKS): Likewise.
1189 2024-01-18  Bruno Haible  <bruno@clisp.org>
1191         modfl: Work around bug on NetBSD 9.3/arm64.
1192         * m4/modfl.m4 (gl_FUNC_MODFL): Add test whether modfl basically works.
1193         * doc/posix-functions/modfl.texi: Mention the NetBSD bug.
1195 2024-01-18  Bruno Haible  <bruno@clisp.org>
1197         isnanl: Avoid autoconf warning.
1198         * m4/isnanl.m4 (gl_FUNC_ISNANL): Declare through AC_DEFUN_ONCE.
1200 2024-01-18  Bruno Haible  <bruno@clisp.org>
1202         fmaf, fma, fmal: Work around bugs on OpenBSD 7.4/arm64.
1203         * m4/fmaf.m4 (gl_FUNC_FMAF_WORKS): Use a volatile function pointer
1204         variable to disable clang's inlining.
1205         * m4/fma.m4 (gl_FUNC_FMA_WORKS): Likewise.
1206         * m4/fmal.m4 (gl_FUNC_FMAL_WORKS): Likewise.
1207         * doc/posix-functions/fmaf.texi: Mention the OpenBSD bug.
1208         * doc/posix-functions/fma.texi: Likewise.
1209         * doc/posix-functions/fmal.texi: Likewise.
1211 2024-01-18  Bruno Haible  <bruno@clisp.org>
1213         doc: Update regarding stable branches.
1214         * doc/gnulib-readme.texi (Stable Branches): Mention new branch
1215         stable-202401. Mention that stable-202301 is no longer updated.
1217 2024-01-17  Bruno Haible  <bruno@clisp.org>
1219         getopt-gnu: Fix out-of-bounds access (regression 2023-12-11).
1220         * lib/getopt.c (process_long_option): Don't set ambig_set[option_index]
1221         if ambig_set is &ambig_fallback.
1223 2024-01-17  Bruno Haible  <bruno@clisp.org>
1225         Improve naming of local variables.
1226         * gnulib-tool, posix-modules, build-aux/relocatable.sh.in,
1227         build-aux/reloc-ldflags, build-aux/install-reloc, tests/init.sh,
1228         m4/argz.m4: Rename save_IFS to saved_IFS.
1229         * m4/*.m4: Rename save_LIBS to saved_LIBS.
1230         * m4/00gnulib.m4, m4/gnulib-common.m4, m4/warn-on-use.m4, m4/wchar_h.m4:
1231         Rename save_ac_compile to saved_ac_compile.
1232         * m4/00gnulib.m4: Rename ac_save_ac_compile to ac_saved_ac_compile.
1233         * m4/gnulib-common.m4: Rename save_ac_compile_for_check_decl to
1234         saved_ac_compile_for_check_decl.
1235         * m4/assert_h.m4, m4/manywarnings.m4, m4/stdalign.m4, m4/visibility.m4:
1236         Rename gl_save_CFLAGS to gl_saved_CFLAGS.
1237         * m4/dirfd.m4: Rename dirfd_save_CFLAGS to gl_saved_CFLAGS.
1238         * m4/include_next.m4, m4/pread.m4, m4/pwrite.m4, m4/termcap.m4,
1239         m4/terminfo.m4: Rename gl_save_CPPFLAGS to gl_saved_CPPFLAGS.
1240         * m4/lib-link.m4: Rename ac_save_CPPFLAGS to acl_save_CPPFLAGS.
1241         * m4/iconv.m4, m4/readline.m4: Rename am_save_CPPFLAGS to
1242         gl_saved_CPPFLAGS.
1243         * m4/gettext.m4: Rename gt_save_CPPFLAGS to gt_saved_CPPFLAGS.
1244         * m4/ansi-c++.m4: Rename gl_save_CXX to gl_saved_CXX.
1245         * m4/manywarnings-c++.m4: Rename gl_save_CXXFLAGS to gl_saved_CXXFLAGS.
1246         * m4/lib-link.m4: Rename acl_save_ifs to acl_saved_IFS.
1247         * m4/lib-prefix.m4: Rename acl_save_IFS to acl_saved_IFS.
1248         * m4/progtest.m4: Rename ac_save_IFS to gt_saved_IFS.
1249         * m4/lib-link.m4: Rename save_libdir to saved_libdir, acl_save_libdir to
1250         acl_saved_libdir.
1251         * m4/ld-version-script.m4: Rename save_LDFLAGS to saved_LDFLAGS.
1252         * m4/acl.m4, m4/getgroups.m4: Rename ac_save_LIBS to gl_saved_LIBS.
1253         * m4/lib-link.m4: Rename ac_save_LIBS to acl_saved_LIBS.
1254         * m4/getdomainname.m4, m4/gethostname.m4, m4/getloadavg.m4,
1255         m4/hostent.m4, m4/inet_ntop.m4, m4/inet_pton.m4,
1256         m4/pthread_mutex_timedlock.m4, m4/pthread_sigmask.m4,
1257         m4/pthread-spin.m4, m4/readutmp.m4, m4/selinux-selinux-h.m4,
1258         m4/servent.m4, m4/socketlib.m4, m4/termcap.m4, m4/terminfo.m4,
1259         m4/thread.m4: Rename gl_save_LIBS to gl_saved_LIBS.
1260         * m4/getaddrinfo.m4, m4/iconv.m4, m4/readline.m4: Rename am_save_LIBS to
1261         gl_saved_LIBS.
1262         * m4/gettext.m4, m4/intlmacosx.m4: Rename gt_save_LIBS to gt_saved_LIBS.
1263         * m4/libunistring.m4: Rename glus_save_LIBS to glus_saved_LIBS.
1264         * m4/nanosleep.m4: Rename nanosleep_save_libs to gl_saved_LIBS.
1265         * m4/lib-prefix.m4: Rename acl_save_prefix to acl_saved_prefix,
1266         acl_save_exec_prefix to acl_saved_exec_prefix.
1267         * m4/configmake.m4: Rename gl_save_<variable> to gl_saved_<variable>.
1268         * m4/terminfo.m4: Likewise.
1269         * m4/gettext.m4: Rename gt_save_<variable> to gt_saved_<variable>.
1270         * m4/javaexec.m4: Rename save_CLASSPATH to gt_saved_CLASSPATH.
1271         * m4/warnings.m4: Rename gl_save_compiler_FLAGS to
1272         gl_saved_compiler_FLAGS.
1273         * lib/pread.c, lib/pwrite.c, lib/read-file.c, lib/tempname.c: Rename
1274         save_errno to saved_errno.
1275         * lib/read-file.c: Rename save_alloc to saved_alloc.
1276         * lib/strptime.c: Rename save_wday to saved_wday, save_mday to
1277         saved_mday, save_mon to saved_mon.
1279 2024-01-16  Paul Eggert  <eggert@cs.ucla.edu>
1281         posixtm: pacify clang 18
1282         Problem reported by Khem Raj in:
1283         https://lists.gnu.org/r/bug-gnulib/2024-01/msg00045.html
1284         * lib/posixtm.c (posixtime): Pacify clang 18 by converting bool to int.
1285         Arguably this is a bug in draft C2x, since the non-pointer args to
1286         ckd_add should promote just like any other expressions do;
1287         but that’s not clang’s fault.
1289 2024-01-07  Jim Meyering  <meyering@meta.com>
1291         update-copyright: handle more cases
1292         * build-aux/update-copyright: Handle cases like gunzip.in
1293         with its two copyright lines.
1294         Making it work required two changes: don't stop upon first match.
1295         And then, when continuing, a little trickiness: knowing that the
1296         final substitution would reset m{}g's "pos()", so save and restore
1297         that, to avoid an infinite loop in some cases.
1298         * tests/test-update-copyright.sh: Add a test for this.
1300 2024-01-15  Paul Eggert  <eggert@cs.ucla.edu>
1302         test-framework-sh: fix spelling typo
1303         * tests/init.sh (setup_): Name local var consistently with
1304         elsewhere in Gnulib, fixing a typo.
1306 2024-01-15  Bruno Haible  <bruno@clisp.org>
1308         test-framework-sh: Improve portability to native Windows and OS/2.
1309         Reported by KO Myung-Hun <komh78@gmail.com> in
1310         <https://lists.gnu.org/archive/html/bug-gnulib/2024-01/msg00037.html>.
1311         * tests/init.sh (setup_): Test for an absolute directory name like
1312         Autoconf does.
1314         test-framework-sh: Improve portability to native Windows and OS/2.
1315         Reported by KO Myung-Hun <komh78@gmail.com> in
1316         <https://lists.gnu.org/archive/html/bug-gnulib/2024-01/msg00037.html>.
1317         * tests/init.sh (setup_): In new_PATH, use $PATH_SEPARATOR instead of
1318         ':'.
1320         test-framework-sh: Improve portability to native Windows and OS/2.
1321         Reported by KO Myung-Hun <komh78@gmail.com> in
1322         <https://lists.gnu.org/archive/html/bug-gnulib/2024-01/msg00037.html>.
1323         * tests/init.sh (setup_): Set IFS, like in Autoconf's _AS_PATH_WALK and
1324         in build-aux/relocatable.sh.in.
1326 2024-01-12  Bruno Haible  <bruno@clisp.org>
1328         jit/cache tests: Fix link error.
1329         * modules/jit/cache-tests (Makefile.am): Link test-cache with
1330         $(LIBINTL).
1332 2024-01-12  Bruno Haible  <bruno@clisp.org>
1334         qsort_r: Fix compilation error in C++ mode on FreeBSD 14.0/powerpc64.
1335         * lib/stdlib.in.h (qsort_r): Enable the C++ alias warning only on glibc
1336         systems.
1338 2024-01-11  Bruno Haible  <bruno@clisp.org>
1340         time: Fix test failure on FreeBSD 12.2/sparc64.
1341         * m4/time.m4 (gl_FUNC_TIME): Guess that it does not work on
1342         FreeBSD/sparc.
1343         * doc/posix-functions/time.texi: Mention the bug on FreeBSD/sparc.
1345 2024-01-11  Bruno Haible  <bruno@clisp.org>
1347         gnulib-tool: Reject broken 'join' program as seen in macOS, FreeBSD etc.
1348         Reported by Avinash Sonawane <rootkea@gmail.com> in
1349         <https://lists.gnu.org/archive/html/bug-gnulib/2024-01/msg00028.html>.
1350         * gnulib-tool: Move the func_gnulib_dir and func_tmpdir invocations
1351         ahead. If the 'join' program exists but does not handle missing fields,
1352         bail out.
1354 2024-01-10  Bruno Haible  <bruno@clisp.org>
1356         jit/cache tests: Fix for powerpc64le CPUs.
1357         * tests/jit/test-cache.c: Treat Linux/powerpc64le *not* like AIX.
1359 2024-01-10  Bruno Haible  <bruno@clisp.org>
1361         jit/cache tests: Avoid gcc -Wstrict-aliasing warning on Linux/powerpc64.
1362         * tests/jit/test-cache.c (funcptr_to_structptr): Turn into an inline
1363         function.
1365 2024-01-10  Bruno Haible  <bruno@clisp.org>
1367         jit/cache tests: Fix for arm CPUs with GCC target arm-linux-gnueabihf.
1368         * tests/jit/test-cache.c (CODE): Define differently on arm.
1369         (SET_CODE, IS, SET_IS): New macros.
1370         (main): New variables is_of_return1, is_of_return2. Use the SET_CODE and
1371         SET_IS macros.
1373 2024-01-10  Bruno Haible  <bruno@clisp.org>
1375         jit/cache tests: Avoid compiler warnings on OpenBSD.
1376         * tests/jit/test-cache.c (main): New variables size_of_return1,
1377         size_of_return2.
1379 2024-01-09  Bruno Haible  <bruno@clisp.org>
1381         jit/cache: Fix for ia64 CPUs.
1382         * lib/jit/cache.h (clear_cache): On ia64 CPUs, use the 'fc', 'sync',
1383         'srlz' instructions.
1385 2024-01-09  Bruno Haible  <bruno@clisp.org>
1387         jit/cache: Fix for hppa CPUs.
1388         * lib/jit/cache.h (clear_cache): On hppa CPUs, use the 'fdc' and 'fic'
1389         instructions.
1391         jit/cache tests: Avoid test failure on OpenBSD.
1392         * tests/jit/test-cache.c (return1_code, return2_code): New constants.
1393         (main): On OpenBSD, use return1_code and return2_code instead of
1394         CODE (return1) and CODE (return2), since the latter may not be in a
1395         readable memory area.
1397         jit/cache tests: Avoid test failure on hppa CPUs.
1398         * tests/jit/test-cache.c (FUNCPTR_BIAS): New macro.
1399         (structptr_to_funcptr, funcptr_to_structptr): New functions/macros.
1400         (xcopy_structptr): Renamed from xcopy_funcptr. Mark as inline.
1401         (COPY_FUNCPTR, CODE): Use structptr_to_funcptr, funcptr_to_structptr.
1402         * modules/jit/cache-tests (configure.ac): Require AC_C_INLINE.
1404 2024-01-08  Bruno Haible  <bruno@clisp.org>
1406         jit/cache tests: Fix for powerpc*, ia64, hppa* CPUs.
1407         * modules/jit/cache-tests (Depends-on): Add xalloc.
1408         * tests/jit/test-cache.c: Include xalloc.h.
1409         (FUNCPTR_POINTS_TO_CODE, COPY_FUNCPTR): New macros.
1410         (xcopy_funcptr): New function.
1411         (main): Create a copy of the function pointer return1, so as not to
1412         destructively modify return1. Fix memcpy argument.
1414 2024-01-08  Bruno Haible  <bruno@clisp.org>
1416         jit/cache tests: Port to native Windows.
1417         * tests/jit/test-cache.c (main): On native Windows, use VirtualAlloc
1418         instead of mmap.
1420 2024-01-08  Bruno Haible  <bruno@clisp.org>
1422         jit/cache tests: Avoid test failure on OpenBSD.
1423         * modules/jit/cache-tests (Files): Add m4/warnings.m4.
1424         (configure.ac): Set and substitute DISABLE_OPENBSD_RETGUARD.
1425         (Makefile.am): Set test_cache_CFLAGS.
1426         * tests/jit/test-cache.c (main): If the compiler defines _RET_PROTECTOR,
1427         skip the test.
1429 2024-01-08  Bruno Haible  <bruno@clisp.org>
1431         jit/cache tests: Avoid test failure on CentOS, *BSD, macOS.
1432         * tests/jit/test-cache.c: Include <fcntl.h>, <stdio.h>, <stdlib.h>.
1433         Don't include pagealign_alloc.h. Include clean-temp-simple.h. Don't test
1434         HAVE_MPROTECT.
1435         (struct func): Fix #if conditions.
1436         (main): Don't invoke pagealign_xalloc and mprotect. Instead, invoke mmap,
1437         using a temporary file if needed.
1438         * modules/jit/cache-tests (Files): Add m4/mmap-anon.m4.
1439         (Depends-on): Add clean-temp-simple. Remove pagealign_alloc.
1440         (configure.ac): Invoke gl_FUNC_MMAP_ANON. Don't test for mprotect.
1442 2024-01-07  Paul Eggert  <eggert@cs.ucla.edu>
1444         doc: adjust to texinfo 7.1
1445         * doc/Makefile (MAKEINFO): Adjust to texinfo 7.1, where makeinfo
1446         by default outputs ASCII approximations to characters.
1448 2024-01-02  Bruno Haible  <bruno@clisp.org>
1450         strverscmp: Work around bug in musl libc 1.2.3 and in Cygwin.
1451         Reported by Dmitry Bogatov <KAction@gnu.org> via Simon Josefsson in
1452         <https://lists.gnu.org/archive/html/bug-gnulib/2024-01/msg00002.html>.
1453         * m4/string_h.m4 (gl_STRING_H_DEFAULTS): Initialize REPLACE_STRVERSCMP.
1454         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP): Test whether strverscmp works
1455         and set REPLACE_STRVERSCMP if not.
1456         * lib/string.in.h (strverscmp): Consider REPLACE_STRVERSCMP.
1457         * modules/strverscmp (Depends-on, configure.ac): Likewise.
1458         * modules/string (Makefile.am): Substitute REPLACE_STRVERSCMP.
1459         * tests/test-strverscmp.c (main): Add test cases suggested by Dmitry
1460         Bogatov and by Simon Josefsson.
1461         * doc/glibc-functions/strverscmp.texi: Mention the musl and Cygwin bug.
1462         Update version info regarding FreeBSD.
1464 2024-01-01  Paul Eggert  <eggert@cs.ucla.edu>
1466         update-copyright-tests: immunize against self
1467         Problem reported by Bernhard Voelker in:
1468         https://lists.gnu.org/r/bug-gnulib/2024-01/msg00003.html
1469         * tests/test-update-copyright.sh (ight): New var.
1470         Use it in tests, to prevent update-copyright from
1471         messing with the test data.
1473 2023-12-29  Paul Eggert  <eggert@cs.ucla.edu>
1475         tests: don’t skip if LONG_MAX < pid
1476         * modules/pthread_sigmask-tests, modules/sigprocmask-tests:
1477         (Depends-on): Add inttypes.
1478         * tests/test-pthread_sigmask1.c, tests/test-sigprocmask.c:
1479         Include inttypes.h.
1480         (main): Don’t skip test if pid exceeds LONG_MAX.
1482         Omit no-longer-needed pragmas
1483         * lib/anytostr.c, lib/poll.c, lib/regex.c:
1484         Omit pragmas that should no longer be needed.
1486         gnulib-common: suppress -Wtautological-constant-out-of-range-compare
1487         * m4/gnulib-common.m4 (gl_CC_GNULIB_WARNINGS): Pass
1488         -Wno-tautological-constant-out-of-range-compare to clang, as it’s
1489         the warning is enabled by default and in portable code where type
1490         ranges are platform dependent it is generally more trouble than
1491         it’s worth.
1493 2023-12-29  Simon Josefsson  <simon@josefsson.org>
1495         announce-gen: Improve links.
1496         * build-aux/announce-gen: Use https:// URLs.
1498 2023-12-29  Bruno Haible  <bruno@clisp.org>
1500         error: More clang -Winclude-next-absolute-path silencing.
1501         * modules/error (Include): Suggest <error.h>, not "error.h".
1502         * tests/test-error.c: Write #include <error.h>.
1503         * tests/test-exclude.c: Likewise.
1504         * tests/test-verror.c: Likewise.
1505         * tests/test-xstrtol.c: Likewise.
1507 2023-12-28  Paul Eggert  <eggert@cs.ucla.edu>
1509         include_next: pacify clang -Winclude-next-absolute-path
1510         Without this change, Ubuntu clang version 16.0.6 (15) issues
1511         warnings like this: “In file included from xalloc-die.c:25:
1512         ./error.h:28:3: warning: #include_next in file found relative to
1513         primary source file or found by absolute path; will search from
1514         start of include path [-Winclude-next-absolute-path]”.
1515         And sure enough, each file includes itself rather than the
1516         next include file and it’s only the subsidiary include that
1517         gets around to including the next include file.
1518         * lib/argmatch.c, lib/chdir-long.c, lib/clean-temp-simple.c:
1519         * lib/clean-temp.c, lib/closein.c, lib/closeout.c, lib/copy-acl.c:
1520         * lib/copy-file.c, lib/creat.c, lib/csharpcomp.c:
1521         * lib/csharpexec.c, lib/error.c, lib/exclude.c, lib/execute.c:
1522         * lib/faccessat.c, lib/fopen.c, lib/freopen.c, lib/getopt.c:
1523         * lib/getopt1.c, lib/git-merge-changelog.c, lib/javacomp.c:
1524         * lib/javaexec.c, lib/javaversion.c, lib/mkdir-p.c, lib/open.c:
1525         * lib/openat-die.c, lib/openat.c, lib/os2-spawn.c:
1526         * lib/pagealign_alloc.c, lib/pipe-filter-gi.c:
1527         * lib/pipe-filter-ii.c, lib/same.c, lib/set-acl.c:
1528         * lib/sigpipe-die.c, lib/spawn-pipe.c, lib/sys_socket.c, lib/truncate.c:
1529         * lib/unistd.c, lib/verror.c, lib/wait-process.c, lib/wctype-h.c:
1530         * lib/xalloc-die.c, lib/xfreopen.c, lib/xmemcoll.c, lib/xprintf.c:
1531         * lib/xsetenv.c, lib/xstdopen.c, lib/xstrtol-error.c:
1532         Use ‘#include <foo.h>’ instead of ‘#include "foo.h"’ if foo.h
1533         possibly uses #include_next.  (However, don’t do this on OSF/1
1534         which has its own problems.)
1536         stat-time: fix macOS bug with negative file times
1537         macOS has a bug similar (but not identical) to Solaris when
1538         file timestamps are negative: tv_nsec might go negative.
1539         Problem reported on Darwin 8.11.0 for GNU Tar by Gordon Steemson in:
1540         https://lists.gnu.org/r/bug-tar/2023-12/msg00001.html
1541         This was evidently Mac OS X 10.4.11; I reproduced it on
1542         Darwin 21.6.0 (macOS 12.6 build 21G115).
1543         * lib/stat-time.h (STAT_TIMESPEC_OFFSETOF): New macro.
1544         (stat_time_normalize): Also normalize timestamps on macOS.
1545         * m4/fstat.m4 (gl_FUNC_FSTAT):
1546         * m4/fstatat.m4 (gl_FUNC_FSTATAT):
1547         * m4/lstat.m4 (gl_FUNC_LSTAT):
1548         * m4/stat.m4 (gl_FUNC_STAT):
1549         Also replace on macOS.
1551 2023-12-19  Bruno Haible  <bruno@clisp.org>
1553         jit/cache: Fix compilation error on m68k, sparc, etc.
1554         * lib/jit/cache.h: Include <stdint.h>.
1555         * modules/jit/cache (Depends-on): Add stdint.
1557 2023-12-19  Marc Nieper-Wißkirchen  <marc@nieper-wisskirchen.de>
1559         jit/cache tests: Make more portable.
1560         * tests/jit/test-cache.c (CODE): New macro.
1561         (struct func): New type.
1562         (main): Initialize f more carefully.
1563         * modules/jit/cache-tests (Depends-on): Add host-cpu-c-abi.
1565 2023-12-19  Christian Göttsche  <cgzones@googlemail.com>
1567         selinux-h: add stubs and wrappers for raw counterparts
1568         Add stubs and wrappers of already covered libselinux interfaces for
1569         their `raw` counterparts.  These counterparts perform the same
1570         operation except for context translation.  Context translation is used
1571         to convert SELinux labels to human readable form, see mcstransd(8).
1572         * lib/se-selinux.in.h: Add declarations for raw variants.
1573         * lib/se-label.in.h: Likewise.
1574         * lib/getfilecon.c: Add wrappers for problematic raw variants.
1575         * m4/selinux-selinux-h.m4: Use wrappers for problematic raw variants.
1577 2023-12-14  Paul Eggert  <eggert@cs.ucla.edu>
1579         mcel-tests: fix thinko in test
1580         * tests/test-mcel.c (main): Fix typo in mcel_scanz test.
1581         Problem reported by Bruno Haible in:
1582         https://lists.gnu.org/r/bug-gnulib/2023-12/msg00034.html
1584 2023-12-11  Paul Eggert  <eggert@cs.ucla.edu>
1586         savedir: scale better when sorting by name
1587         * lib/savedir.c: Include attribute.h.
1588         (direntry_t): The ‘name’ member is now idx_t, not char *,
1589         so that it survives name_space relocation.
1590         (direntry_cmp_name, direntry_cmp_inode, comparison_function):
1591         Adjust to qsort_r API, and to direntry_t layout change.
1592         (streamsavedir): Redo to avoid need for xstrdup on each directory
1593         entry.  Instead, copy the string data into name_space; this
1594         typically scales better as the memory allocator is called O(log N)
1595         rather than O(N) times.  Use qsort_r so that name_space can be
1596         passed to the comparison functions.  Simplify calls to ‘free’ so
1597         that lack of leakage is more obvious.
1598         * modules/savedir (Depends-on): Add attribute, qsort_r.
1600         getopt: pacify gcc -Wanalyzer-null-dereference
1601         * lib/getopt.c (process_long_option): Simplify logic slightly.
1602         This pacifies gcc -flto -Wanalyzer-null-dereference when compiling
1603         GNU tar on x86-64 with gcc 13.2.1 20231205 (Red Hat 13.2.1-6).
1605 2023-12-10  Pádraig Brady  <P@draigBrady.com>
1607         bootstrap: fix option propagation with --bootstrap-sync
1608         * top/bootstrap: Ensure options are propagated through
1609         upgrade_bootstrap().
1610         * top/bootstrap-funclib.sh: Likewise.
1611         * build-aux/bootstrap: Auto generated with `make build-aux/bootstrap`.
1612         Fixes https://bugs.gnu.org/67731
1614 2023-12-01  Paul Eggert  <eggert@cs.ucla.edu>
1616         frexp, frexpf: pacify clang re address-of-volatile
1617         Problem reported by Sam James in:
1618         https://lists.gnu.org/r/bug-gnulib/2023-12/msg00013.html
1619         * m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Don’t try to convert
1620         ‘double volatile *’ to ‘void const *’ as the C standard
1621         doesn’t allow accessing volatile variables through
1622         pointer-to-nonvolatile.
1623         * m4/frexpf.m4 (gl_FUNC_FREXPF_WORKS): Likewise.
1625         Update portability doc for CHERI, C23
1626         * doc/gnulib-readme.texi:
1627         Prefer “null pointer” to “@code{NULL}” since C23 has nullptr.
1628         (Portability guidelines): Mention C99 instead of C89 for what
1629         Gnulib assumes of headers.
1630         (C99 features avoided): Mention CHERI issue with intptr_t etc.
1631         (Other portability assumptions): Say that C23 requires two’s
1632         complement.  Mention CHERI’s holes.
1634 2023-12-01  Bruno Haible  <bruno@clisp.org>
1636         obstack: Avoid undefined behaviour.
1637         Reported by Alexey Palienko <Alexey.Palienko@cma.se> in
1638         <https://lists.gnu.org/archive/html/bug-m4/2023-02/msg00000.html>.
1639         * lib/obstack.in.h: Include <stdint.h>.
1640         (__BPTR_ALIGN): Remove macro.
1641         (__PTR_ALIGN): For the optimized case, compute the alignment through
1642         uintptr_t, instead of computing NULL + something.
1644 2023-12-01  Bruno Haible  <bruno@clisp.org>
1646         doc: Update for FreeBSD 14.0.
1647         * doc/posix-headers/*.texi: Update.
1648         * doc/glibc-headers/*.texi: Likewise.
1649         * doc/posix-functions/*.texi: Likewise.
1650         * doc/pastposix-functions/*.texi: Likewise.
1651         * doc/glibc-functions/*.texi: Likewise.
1652         * m4/printf.m4: Update comments.
1654 2023-12-01  Bruno Haible  <bruno@clisp.org>
1656         sethostname tests: Fix a compilation error on FreeBSD 14.0.
1657         * tests/test-sethostname1.c: Skip the SIGNATURE_CHECK on some platforms.
1658         * doc/glibc-functions/sethostname.texi: Update platforms list.
1660 2023-11-27  Marc Nieper-Wißkirchen  <marc@nieper-wisskirchen.de>
1662         stack: Fix documentation in header file.
1663         * lib/stack.h: Correct documentation on `stack_current_base'.
1665 2023-11-27  Marc Nieper-Wißkirchen  <marc@nieper-wisskirchen.de>
1667         jit/cache-tests: Fix include guard.
1668         * tests/jit/test-cache.c (main): Extend range of include guard.
1670 2023-11-25  Marc Nieper-Wißkirchen  <marc@nieper-wisskirchen.de>
1672         jit/cache-tests: New module.
1673         * tests/jit/test-cache.c: New file.
1674         * modules/jit/cache-tests: New file.  Mark the test as unportable
1675         for now.
1677 2023-11-25  Marc Nieper-Wißkirchen  <marc@nieper-wisskirchen.de>
1679         jit/cache: Fix configure error.
1680         * m4/valgrind-helper.m4: Unconditionally set support_valgrind.
1682 2023-11-24  Bruno Haible  <bruno@clisp.org>
1684         floorf, ceilf tests: Strengthen against compiler optimizations.
1685         Reported by René Rebe <rene@t2-project.org>.
1686         * tests/test-floorf1.c (main): Mark my_floorf as 'volatile'.
1687         * tests/test-floorf-ieee.c (main): Likewise.
1688         * tests/test-ceilf1.c (main): Mark my_ceilf as 'volatile'.
1689         * tests/test-ceilf-ieee.c (main): Likewise.
1691 2023-11-21  Bruno Haible  <bruno@clisp.org>
1693         strerrorname_np: Work around glibc bug on HPPA systems.
1694         * m4/strerrorname_np.m4 (gl_FUNC_STRERRORNAME_NP): Test also
1695         strerrorname_np (ENOSYM).
1696         * lib/strerrorname_np.c (strerrorname_np): Update comments.
1697         * tests/test-strerrorname_np.c (main): Likewise.
1698         * doc/glibc-functions/strerrorname_np.texi: Mention that glibc 2.37
1699         still needs a workaround.
1701 2023-11-21  Bruno Haible  <bruno@clisp.org>
1703         rand: Use the usual patterns for overriding a function.
1704         * lib/stdlib.in.h (RAND_MAX): Override also if module 'rand' is present.
1705         (rand): New declaration.
1706         * m4/stdlib_h.m4 (gl_STDLIB_H_REQUIRE_DEFAULTS): Initialize GNULIB_RAND.
1707         (gl_STDLIB_H_DEFAULTS): Initialize REPLACE_RAND.
1708         * modules/stdlib (Makefile.am): Substitute GNULIB_RAND and REPLACE_RAND.
1710 2023-11-18  Bruno Haible  <bruno@clisp.org>
1712         nan, snan tests: Don't include these tests by default.
1713         * modules/nan-tests (Status): Mark the test as unportable.
1714         * modules/snan-tests (Status): Likewise.
1716 2023-11-17  Bruno Haible  <bruno@clisp.org>
1718         realloc-gnu: Fix wrong configure test result with optimizing ibm-clang.
1719         * m4/realloc.m4 (_AC_FUNC_REALLOC_IF): Use 'volatile', to defeat an
1720         ibm-clang optimization.
1721         * m4/malloc.m4 (_AC_FUNC_MALLOC_IF): Likewise.
1723 2023-11-17  Bruno Haible  <bruno@clisp.org>
1725         mbrtowc, mbrtoc32, nl_langinfo, setlocale-null: Obey --disable-threads.
1726         Reported by David Edelsohn <dje.gcc@gmail.com> in
1727         <https://gcc.gnu.org/pipermail/gcc-patches/2023-November/636830.html>,
1728         <https://gcc.gnu.org/pipermail/gcc-patches/2023-November/636843.html>.
1729         * m4/threadlib.m4 (gl_THREADLIB_BODY): If --disable-threads was
1730         specified, define AVOID_ANY_THREADS to 1.
1731         * lib/mbtowc-lock.c: Omit all code if --disable-threads was specified.
1732         * lib/nl_langinfo-lock.c: Likewise.
1733         * lib/setlocale-lock.c: Likewise.
1734         * lib/mbtowc-lock.h: Omit locking code if --disable-threads was
1735         specified.
1736         * lib/nl_langinfo.c: Likewise.
1737         * lib/setlocale_null.c: Likewise.
1738         * lib/mbrtowc.c: Don't include any multithreading headers if
1739         --disable-threads was specified.
1740         * lib/mbrtoc32.c: Likewise.
1742 2023-11-17  Bruno Haible  <bruno@clisp.org>
1744         gettext: Recognize a statically built libintl on macOS and AIX.
1745         Reported by David Edelsohn <dje.gcc@gmail.com> in
1746         <https://gcc.gnu.org/pipermail/gcc-patches/2023-November/636558.html>.
1747         * m4/gettext.m4 (AM_GNU_GETTEXT): In the
1748         "checking for GNU gettext in libintl..." test, add also the special
1749         system library dependencies needed on macOS and AIX.
1751 2023-11-16  Bruno Haible  <bruno@clisp.org>
1753         boot-time: Make it work on Adélie Linux.
1754         * lib/boot-time.c (get_boot_time_uncached): Invoke Linux fallbacks also
1755         on Linux systems that have neither <utmp.h> nor <utmpx.h>.
1757 2023-11-15  Bruno Haible  <bruno@clisp.org>
1759         obstack: Modernize, fixing several problems.
1760         * lib/obstack.in.h: Renamed from lib/obstack.h. Add reference to the
1761         glibc documentation.
1762         (_OBSTACK_INTERFACE_VERSION): Remove macro.
1763         (_OBSTACK_SIZE_T, _CHUNK_SIZE_T, _OBSTACK_CAST): Mark old values with
1764         _LIBC.
1765         (_obstack_newchunk, _obstack_free, _obstack_begin, _obstack_begin_1,
1766         _obstack_memory_used, _obstack_allocated_p): Override if REPLACE_OBSTACK
1767         is 1.
1768         * lib/obstack.c: Don't include <gnu-versions.h>.
1769         (_OBSTACK_ELIDE_CODE): Remove macro.
1770         * m4/obstack.m4 (gl_FUNC_OBSTACK): Test whether obstack.h exists. Don't
1771         define HAVE_OBSTACK any more. Set HAVE_OBSTACK, REPLACE_OBSTACK,
1772         GL_GENERATE_OBSTACK_H.
1773         * modules/obstack (Files): Remove obstack.h. Add obstack.in.h.
1774         (Depends-on): Add gen-header. Add conditions.
1775         (configure.ac): Consider HAVE_OBSTACK, REPLACE_OBSTACK. Invoke
1776         gl_CONDITIONAL_HEADER and AC_PROG_MKDIR_P.
1777         (Makefile.am): Generate obstack.h. Augment BUILT_SOURCES and
1778         MOSTLYCLEANFILES.
1780 2023-11-15  Paul Eggert  <eggert@cs.ucla.edu>
1782         striconveha: pacify gcc -Wcast-align
1783         * lib/striconveha.c (uniconv_register_autodetect): Rewrite to
1784         avoid the need to cast from char * to a pointer to a more strictly
1785         aligned type.  Use decls after statements to avoid some repetition.
1787 2023-11-14  Bruno Haible  <bruno@clisp.org>
1789         doc: Mention a 'random' limitation on OpenBSD.
1790         Reported by Corinna Vinschen <vinschen@redhat.com>.
1791         * doc/posix-functions/random.texi: Mention the OpenBSD limitation.
1793 2023-11-14  Bruno Haible  <bruno@clisp.org>
1795         rand: Mark as obsolete.
1796         * modules/rand (Status, Notice): New sections.
1798 2023-11-14  Bruno Haible  <bruno@clisp.org>
1800         *printf-posix: Revert expectations of %lc of 0.
1801         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_LC): Expect a NUL byte in the
1802         output.
1803         * lib/vasnprintf.c (VASNPRINTF): In the %lc implementation, don't
1804         special-case the NUL wide character.
1805         * tests/test-vasnprintf-posix.c (test_function): Change expected result
1806         for %lc of L'\0'.
1807         * tests/test-vasprintf-posix.c (test_function): Likewise.
1808         * tests/test-snprintf-posix.h (test_function): Likewise.
1809         * tests/test-sprintf-posix.h (test_function): Likewise.
1810         * doc/posix-functions/dprintf.texi: Update platform list regarding %lc
1811         of 0 bug.
1812         * doc/posix-functions/fprintf.texi: Likewise.
1813         * doc/posix-functions/printf.texi: Likewise.
1814         * doc/posix-functions/snprintf.texi: Likewise.
1815         * doc/posix-functions/sprintf.texi: Likewise.
1816         * doc/posix-functions/vdprintf.texi: Likewise.
1817         * doc/posix-functions/vfprintf.texi: Likewise.
1818         * doc/posix-functions/vprintf.texi: Likewise.
1819         * doc/posix-functions/vsnprintf.texi: Likewise.
1820         * doc/posix-functions/vsprintf.texi: Likewise.
1821         * doc/glibc-functions/asprintf.texi: Likewise.
1822         * doc/glibc-functions/vasprintf.texi: Likewise.
1823         * doc/glibc-functions/obstack_printf.texi: Likewise.
1824         * doc/glibc-functions/obstack_vprintf.texi: Likewise.
1826 2023-11-13  Bruno Haible  <bruno@clisp.org>
1828         doc: Add a note.
1829         * doc/posix-headers/stdatomic.texi: Add a note about the memory model.
1831 2023-11-13  Bruno Haible  <bruno@clisp.org>
1833         Don't use CHERI facilities with CC="clang -march=morello".
1834         Suggested by Jessica Clarke <jrtc27@jrtc27.com> in
1835         <https://lists.gnu.org/archive/html/bug-gnulib/2023-11/msg00116.html>.
1836         * lib/alignalloc.h (alignalloc): Test __CHERI_PURE_CAPABILITY__, not
1837         __CHERI__.
1838         * lib/eealloc.h (eemalloc, eerealloc): Likewise.
1839         * lib/ialloc.h (irealloc, ireallocarray): Likewise.
1840         * lib/malloca.h (malloca): Likewise.
1841         * lib/malloca.c (small_t, mmalloca, freea): Likewise.
1842         * lib/rawmemchr.c (rawmemchr): Likewise.
1843         * lib/safe-alloc.h (safe_alloc_realloc_n): Likewise.
1844         * lib/sigsegv.c (SIGSEGV_FAULT_STACKPOINTER): Likewise.
1845         * lib/ssfmalloc.h (struct dissected_page_header, init_small_block_page,
1846         init_medium_block_page, free_block_from_pool, allocate_block): Likewise.
1847         * tests/test-stdint.c: Likewise.
1849 2023-11-13  Bruno Haible  <bruno@clisp.org>
1851         jit/cache: Fix configure test.
1852         * m4/valgrind-helper.m4 (gl_VALGRIND_HELPER): Check already at configure
1853         time whether <valgrind/valgrind.h> exists. Fix AC_DEFINE_UNQUOTED
1854         invocation.
1856 2023-11-12  Paul Eggert  <eggert@cs.ucla.edu>
1858         rawmemchr: speed up, particularly on CHERI
1859         * lib/rawmemchr.c (rawmemchr) [__CHERI__]: Use memchr instead of
1860         one-byte reads.  This sped up a simple benchmark (rawmemchr on
1861         100,000 bytes) by 6x on a Research Morello SoC r0p0 on CheriBSD 14.
1862         [!__CHERI__]: Use sizeof, not alignof, as better alignment
1863         should help performance a bit on some platforms.
1864         * modules/rawmemchr (Depends-on): Remove alignasof.
1866 2023-11-12  Bruno Haible  <bruno@clisp.org>
1868         jit/cache: New module.
1869         * lib/jit/cache.h: New file.
1870         * m4/valgrind-helper.m4: New file.
1871         * modules/jit/cache: New file.
1873 2023-11-11  Bruno Haible  <bruno@clisp.org>
1875         ssfmalloc: Take advantage of CHERI bounds-checking.
1876         * lib/ssfmalloc.h: Include <cheri.h>.
1877         (struct dissected_page_header) [CHERI]: Add field 'whole_page'.
1878         (init_small_block_page, init_medium_block_page) [CHERI]: Initialize it.
1879         (free_block_from_pool) [CHERI]: Use this field to initialize
1880         pool->freeable_page.
1881         (allocate_block) [CHERI]: Return a pointer with a tight upper bound.
1883 2023-11-11  Johannes Schindelin  <johannes.schindelin@gmx.de>
1885         vasnprintf: Re-enable parsing of directive with I64 (regr. 2023-03-24).
1886         * lib/printf-parse.c (PRINTF_PARSE): When parsing a size specifier
1887         "I64", increment cp by 3, not 1.
1889 2023-11-11  Bruno Haible  <bruno@clisp.org>
1891         malloca: Take advantage of CHERI bounds-checking.
1892         * lib/malloca.h: Include <cheri.h>.
1893         (malloca) [CHERI]: In the stack-allocation case, return a pointer with
1894         a tight lower bound and a tight upper bound.
1895         * lib/malloca.c: Include <cheri.h>.
1896         (small_t) [CHERI]: Define as uintptr_t.
1897         (mmalloca) [CHERI]: Return a pointer with a tight upper bound.
1898         (freea) [CHERI]: Update.
1900 2023-11-11  Bruno Haible  <bruno@clisp.org>
1902         safe-alloc: Take advantage of CHERI bounds-checking.
1903         * lib/safe-alloc.h: Include <cheri.h>.
1904         (safe_alloc_realloc_n): When count or size is 0, return a pointer whose
1905         bounds are of size 0, not 1.
1907 2023-11-11  Bruno Haible  <bruno@clisp.org>
1909         ialloc: Take advantage of CHERI bounds-checking.
1910         * lib/ialloc.h: Include <cheri.h>.
1911         (irealloc): When s is 0, return a pointer whose bounds are of size 0,
1912         not 1.
1913         (ireallocarray): When n or s is 0, return a pointer whose bounds are of
1914         size 0, not 1.
1916 2023-11-11  Bruno Haible  <bruno@clisp.org>
1918         eealloc: Take advantage of CHERI bounds-checking.
1919         * lib/eealloc.h: Include <cheri.h>.
1920         (eemalloc): When n is 0, return a pointer whose bounds are of size 0,
1921         not 1.
1922         (eerealloc): Likewise.
1924 2023-11-11  Bruno Haible  <bruno@clisp.org>
1926         alignalloc: Take advantage of CHERI bounds-checking.
1927         * lib/alignalloc.h: Include <cheri.h>.
1928         (alignalloc): When size is 0, return a pointer whose bounds are of
1929         size 0, not 1.
1931 2023-11-11  Bruno Haible  <bruno@clisp.org>
1933         rawmemchr tests: Add test case for last commit.
1934         * tests/test-rawmemchr.c (main): Add test case for aligned oversized
1935         read.
1937 2023-11-11  Paul Eggert  <eggert@cs.ucla.edu>
1939         rawmemchr: port better to CHERI
1940         * lib/rawmemchr.c (rawmemchr): Use unsigned char for longword,
1941         since CHERI doesn’t allow the aligned-word trick to speed up
1942         performance.
1944 2023-11-10  Paul Eggert  <eggert@cs.ucla.edu>
1946         di-set: port better to CHERI-64
1947         * lib/di-set.c: Include stdint.h.
1948         (hashint): Make it uintptr_t, not size_t, since it’s for use
1949         when converting to pointer and back again.  This suppresses
1950         a false positive on CHERI-64.
1951         * modules/di-set (Depends-on): Add stdint.
1953         stdio: fix port to older macOS
1954         * lib/stdio.in.h: It’s pre macOS 13, not pre macOS 10.13.
1955         Problem reported by Sevan Janiyan in:
1956         https://lists.gnu.org/r/bug-gnulib/2023-11/msg00066.html
1957         et seq.
1959 2023-11-10  Bruno Haible  <bruno@clisp.org>
1961         doc: Mention rand and srand limitations.
1962         * doc/posix-functions/rand.texi: Mention multithread-safety problem.
1963         * doc/posix-functions/srand.texi: Mention a Cygwin bug.
1965 2023-11-10  Bruno Haible  <bruno@clisp.org>
1967         tests: In multithreaded tests, use random() instead of rand().
1968         * tests/test-asyncsafe-spin2.c (random_account, lock_mutator_thread):
1969         Use random() instead of rand().
1970         * tests/test-lock.c (random_account, lock_mutator_thread,
1971         rwlock_mutator_thread, recshuffle): Likewise.
1972         * tests/test-mtx.c (random_account, lock_mutator_thread, recshuffle):
1973         Likewise.
1974         * tests/test-pthread-mutex.c (random_account, lock_mutator_thread,
1975         recshuffle): Likewise.
1976         * tests/test-pthread-rwlock.c (random_account, rwlock_mutator_thread):
1977         Likewise.
1978         * tests/test-pthread-spin.c (random_account, lock_mutator_thread):
1979         Likewise.
1980         * tests/test-pthread-tss.c (perhaps_yield, worker_thread,
1981         racecheck_thread): Likewise.
1982         * tests/test-thread_local.c (perhaps_yield, worker_thread): Likewise.
1983         * tests/test-tls.c (perhaps_yield, worker_thread, racecheck_thread):
1984         Likewise.
1985         * tests/test-tss.c (perhaps_yield, worker_thread, racecheck_thread):
1986         Likewise.
1987         * asyncsafe-spin-tests (Depends-on): Add random.
1988         * lock-tests (Depends-on): Likewise.
1989         * mtx-tests (Depends-on): Likewise.
1990         * pthread-mutex-tests (Depends-on): Likewise.
1991         * pthread-rwlock-tests (Depends-on): Likewise.
1992         * pthread-spin-tests (Depends-on): Likewise.
1993         * pthread-tss-tests (Depends-on): Likewise.
1994         * threads-h-tests (Depends-on): Likewise.
1995         * tls-tests (Depends-on): Likewise.
1996         * tss-tests (Depends-on): Likewise.
1998 2023-11-10  Bruno Haible  <bruno@clisp.org>
2000         doc: Mention an srandom limitation on OpenBSD.
2001         * doc/posix-functions/srandom.texi: Mention the OpenBSD limitation.
2003 2023-11-10  Bruno Haible  <bruno@clisp.org>
2005         random tests: Add multithread-safety test.
2006         * tests/test-random-mt.c: New file.
2007         * modules/random-tests (Files): Add it.
2008         (Depends-on): Add xalloc, thread, yield.
2009         (Makefile.am): Also build and test test-random-mt.
2011         random: Fix multithread-safety bug in general.
2012         * m4/random.m4 (gl_FUNC_RANDOM): Override also macOS, FreeBSD, Solaris,
2013         Cygwin, Haiku.
2014         * doc/posix-functions/random.texi: Mention the wider scope of the
2015         multithread-safety bug.
2017 2023-11-09  Bruno Haible  <bruno@clisp.org>
2019         sigsegv: Improve port to CHERI.
2020         * lib/sigsegv.c (SIGSEGV_FAULT_STACKPOINTER): Define also on CheriBSD.
2022         sigsegv: Port to CHERI.
2023         * lib/sigsegv.c: Treat __aarch64__ like __arm64__.
2024         (SIGSEGV_FOR_ALL_SIGNALS): Treat SIGPROT like SIGSEGV and SIGBUS.
2026 2023-11-09  Paul Eggert  <eggert@cs.ucla.edu>
2028         stdio: port better to older macOS
2029         * lib/stdio.in.h: Do not define _POSIX_C_SOURCE on older macOS,
2030         as it is not needed and defining it causes other problems.
2031         Problem reported by Sevan Janiyan in:
2032         https://mail.gnu.org/r/bug-gnulib/2023-11/msg00039.html
2034 2023-11-09  Bruno Haible  <bruno@clisp.org>
2036         rand: Add tests.
2037         * tests/test-rand.c: New file.
2038         * modules/rand-tests: New file.
2040         rand: New module.
2041         * lib/rand.c: New file, based on glibc/stdlib/rand.c.
2042         * m4/rand.m4: New file.
2043         * modules/rand: New file.
2044         * doc/posix-functions/rand.texi: Mention the new module.
2046 2023-11-09  Bruno Haible  <bruno@clisp.org>
2048         random: Fix multithread-safety bug on CheriBSD.
2049         * m4/random.m4 (gl_FUNC_RANDOM): Override on CheriBSD.
2050         * lib/random.c: Include glthread/lock.h.
2051         (__libc_lock_define_initialized, __libc_lock_lock, __libc_lock_unlock):
2052         Define to do real locking.
2053         * modules/random (Depends-on): Add lock.
2054         * doc/posix-functions/random.texi: Mention the multithread-safety
2055         problem.
2057 2023-11-09  Bruno Haible  <bruno@clisp.org>
2059         host-cpu-c-abi: Port to CHERI.
2060         * m4/host-cpu-c-abi.m4 (gl_HOST_CPU_C_ABI_32BIT): Treat aarch64c like
2061         aarch64.
2063 2023-11-08  Bruno Haible  <bruno@clisp.org>
2065         pthread-rwlock: Port to Mac OS X 10.4.
2066         Reported by Sevan Janiyan <venture37@geeklan.co.uk>.
2067         * m4/pthread-rwlock.m4 (gl_PTHREAD_RWLOCK): On macOS, test for the
2068         presence of PTHREAD_RWLOCK_INITIALIZER. If it is not defined, don't
2069         attempt to use pthread_rwlock_init.
2071 2023-11-07  Bruno Haible  <bruno@clisp.org>
2073         fenv-environment tests: Add a test of the link dependencies.
2074         * tests/test-fenv-env-6.c: Renamed from tests/test-fenv-env-5.c.
2075         * tests/test-fenv-env-5.c: Renamed from tests/test-fenv-env-4.c.
2076         * tests/test-fenv-env-4.c: Renamed from tests/test-fenv-env-3.c.
2077         * tests/test-fenv-env-3.c: Renamed from tests/test-fenv-env-2.c.
2078         * tests/test-fenv-env-2.c: Renamed from tests/test-fenv-env-1.c.
2079         * tests/test-fenv-env-1.c: New file.
2080         * tests/test-fenv-env-6.sh: Renamed from tests/test-fenv-env-5.sh. Update.
2081         * modules/fenv-environment-tests: Update. Add test-fenv-env-1 unit test.
2083 2023-11-07  Bruno Haible  <bruno@clisp.org>
2085         fenv-exceptions-state-c99 tests: Add a test of the link dependencies.
2086         * tests/test-fenv-except-state-4.c: Renamed from
2087         tests/test-fenv-except-state-3.c.
2088         * tests/test-fenv-except-state-3.c: Renamed from
2089         tests/test-fenv-except-state-2.c.
2090         * tests/test-fenv-except-state-2.c: Renamed from
2091         tests/test-fenv-except-state-1.c.
2092         * tests/test-fenv-except-state-1.c: New file.
2093         * modules/fenv-exceptions-state-c23-tests: Update.
2094         * modules/fenv-exceptions-state-c99-tests: Update. Add
2095         test-fenv-except-state-1 unit test.
2097 2023-11-07  Bruno Haible  <bruno@clisp.org>
2099         fenv-exceptions-trapping tests: Comments.
2100         * tests/test-fenv-except-trapping-1.c (main): Add a comment.
2102 2023-11-07  Paul Eggert  <eggert@cs.ucla.edu>
2104         malloca: pacify -Wcheri-provenance
2105         This shouldn’t affect generated code when optimizing.
2106         * lib/malloca.c (mmalloca): Pacify -Wcheri-provenance on CHERI-64 cc.
2107         (freea): Assign to temporaries to simplify debugging and avoid casts.
2109 2023-11-07  Bruno Haible  <bruno@clisp.org>
2111         rawmemchr: Port to CHERI.
2112         * lib/rawmemchr.c (rawmemchr): Use 'unsigned long' instead of uintptr_t.
2114 2023-11-06  Paul Eggert  <eggert@cs.ucla.edu>
2116         stdint: port intptr_t to CHERI
2117         * lib/stdint.in.h: Do not redefine intptr_t/uintptr_t
2118         if __INTPTR_WIDTH__ says otherwise.  This is needed on CHERI.
2120         stdint-tests: port to CHERI etc
2121         * tests/test-stdint.c: Test intptr_t only if INTPTR_MAX is
2122         defined, since the type is optional.  Similarly for uintptr_t.
2123         If CHERI, don’t assume TYPE_MINIMUM and TYPE_MAXIMUM works on
2124         intptr_t, and similarly for TYPE_MAXIMUM and uintptr_t.
2126         posix_memalign-tests: port to CHERI-64
2127         * tests/test-posix_memalign.c (main):
2128         Don’t assume sizeof (void *) <= 8.
2130         mcel-tests: fix read overrun in test case
2131         * tests/test-mcel.c (main): Don’t overrun test input buffer.
2132         Problem reported by Bruno Haible; found on CHERI-64.
2134 2023-11-06  Bruno Haible  <bruno@clisp.org>
2136         fenv-exceptions-tracking-c99 tests: Fix typo.
2137         Found by coverity.
2138         * tests/test-fenv-except-tracking-1.c (main): Write & ~, not & !.
2140 2023-11-06  Bruno Haible  <bruno@clisp.org>
2142         snan: Avoid test failures on OpenBSD/mips64.
2143         * tests/test-snan-1.c (main): Skip the 'long double' test on
2144         OpenBSD/mips64.
2145         * tests/test-snan-2.c (main): Likewise.
2147         fenv-*: Avoid test failures on OpenBSD/mips64.
2148         * tests/test-fenv-round.c (test_towardzero, test_upward, test_downward):
2149         Skip the 'long double' tests on OpenBSD/mips64.
2150         * tests/test-fenv-except-tracking-2.c (main): On OpenBSD/mips64, skip
2151         the 'long double' test.
2152         * tests/test-fenv-except-trapping-2.c (main): Skip the '4' tests and the
2153         'long double' tests also on OpenBSD/mips64.
2154         * doc/posix-functions/fesetround.texi: Mention OpenBSD/mips64 here too.
2156         fenv-exceptions-tracking-c99: Fix test failures on OpenBSD/mips64.
2157         * m4/fenv-exceptions-tracking.m4 (gl_FENV_EXCEPTIONS_TRACKING): On
2158         OpenBSD/mips, set REPLACE_FECLEAREXCEPT to 1.
2159         * doc/posix-functions/feclearexcept.texi: Mention the OpenBSD/mips64
2160         bug.
2161         * m4/fenv-exceptions-state.m4 (gl_FENV_EXCEPTIONS_STATE): No need to set
2162         gl_cv_func_fesetexceptflag_works1 to 'no' on OpenBSD/mips.
2164 2023-11-06  Bruno Haible  <bruno@clisp.org>
2166         nan: Defeat clang's incorrect -O2 optimization on mips64.
2167         * lib/nan.h (NaNf, NaNd, NaNl): Use 'volatile' to disable a clang
2168         optimization.
2170 2023-11-06  Bruno Haible  <bruno@clisp.org>
2172         nan: Work around clang's incorrect constant-folding on mips64.
2173         * lib/nan.h (NaNf, NaNd, NaNl): On mips platforms, avoid the compiler's
2174         constant-folding for 0.0f/0.0f, 0.0/0.0, 0.0L/0.0L.
2176 2023-11-06  Bruno Haible  <bruno@clisp.org>
2178         snan: Add more info for mips-based platforms.
2179         * m4/nan-mips.m4: New file.
2180         * lib/snan.h: Add comments regarding mips.
2181         * modules/snan (Files): Add m4/nan-mips.m4.
2182         (configure.ac): Invoke gl_NAN_MIPS.
2183         * m4/snan.m4: Update comment.
2185 2023-11-06  Bruno Haible  <bruno@clisp.org>
2187         fenv-exceptions-state-c99: Update doc regarding Minix.
2188         * doc/posix-functions/fesetexceptflag.texi: Mention the Minix bug.
2190 2023-11-05  Bruno Haible  <bruno@clisp.org>
2192         fenv-exceptions-trapping: Avoid test failure on Minix.
2193         * tests/test-fenv-except-trapping-2.c (main): Skip the '4' tests also on
2194         Minix.
2196         fenv-exceptions-tracking-c99: Fix test failures on Minix.
2197         * m4/fenv-exceptions-tracking.m4 (gl_FENV_EXCEPTIONS_TRACKING): On
2198         Minix, set REPLACE_FECLEAREXCEPT and REPLACE_FETESTEXCEPT to 1.
2199         * doc/posix-functions/feclearexcept.texi: Mention the Minix bug.
2200         * doc/posix-functions/fetestexcept.texi: Likewise.
2202 2023-11-05  Bruno Haible  <bruno@clisp.org>
2204         fenv-exceptions-trapping: Avoid test failure on Haiku/i386.
2205         * tests/test-fenv-except-trapping-2.c (main): Skip the '4' tests also on
2206         Haiku/i386.
2208         fenv-exceptions-state: Fix test failure on Haiku/i386 and Haiku/x86_64.
2209         * m4/fenv-exceptions-state.m4 (gl_FENV_EXCEPTIONS_STATE): Arrange to
2210         override fesetexceptflag() on Haiku.
2211         * doc/posix-functions/fesetexceptflag.texi: Mention the Haiku bug.
2213 2023-11-05  Bruno Haible  <bruno@clisp.org>
2215         fenv: Add C++ tests.
2216         * tests/test-fenv-c++.cc: New file.
2217         * modules/fenv-c++-tests: New file.
2218         * modules/fenv-tests (Depends-on): Add it.
2220 2023-11-05  Bruno Haible  <bruno@clisp.org>
2222         fenv-environment: Add tests.
2223         * tests/test-fenv-env-1.c: New file.
2224         * tests/test-fenv-env-2.c: New file.
2225         * tests/test-fenv-env-3.c: New file.
2226         * tests/test-fenv-env-4.c: New file.
2227         * tests/test-fenv-env-5.sh: New file.
2228         * tests/test-fenv-env-5.c: New file.
2229         * modules/fenv-environment-tests: New file.
2231         fenv-environment: New module.
2232         * lib/fenv.in.h (fenv_t) [hppa]: Remove the __exception field.
2233         (FE_DFL_ENV): Override if <fenv.h> exists but HAVE_FE_DFL_ENV is not
2234         defined.
2235         (fegetenv, fesetenv, feupdateenv, feholdexcept): New declarations.
2236         * lib/fenv-env.c: New file, based on glibc.
2237         * lib/fenv-env-hold.c: New file.
2238         * lib/fenv-env-update.c: New file.
2239         * m4/fenv-environment.m4: New file.
2240         * m4/mathfunc.m4 (gl_MATHFUNC): Handle also the 'fenv_t *' type.
2241         * m4/fenv_h.m4 (gl_FENV_H_DEFAULTS): Initialize REPLACE_FEGETENV,
2242         REPLACE_FEHOLDEXCEPT, REPLACE_FESETENV, REPLACE_FEUPDATEENV.
2243         * modules/fenv (Makefile.am): Substitute REPLACE_FEGETENV,
2244         REPLACE_FEHOLDEXCEPT, REPLACE_FESETENV, REPLACE_FEUPDATEENV.
2245         * modules/fenv-environment: New file.
2246         * doc/posix-functions/fegetenv.texi: Mention the new module and the bugs
2247         on glibc, macOS, AIX.
2248         * doc/posix-functions/feholdexcept.texi: Mention the new module and the
2249         bugs on glibc, musl libc, FreeBSD, AIX, mingw, MSVC.
2250         * doc/posix-functions/fesetenv.texi: Mention the new module and the bugs
2251         on musl libc, FreeBSD, NetBSD, AIX, Solaris, Cygwin, mingw, MSVC.
2252         * doc/posix-functions/feupdateenv.texi: Mention the new module and the
2253         bugs on glibc, musl libc, macOS, FreeBSD, AIX, Solaris, mingw, MSVC.
2255 2023-11-05  Bruno Haible  <bruno@clisp.org>
2257         fenv-exceptions-tracking-c99 tests: Enhance tests.
2258         * tests/test-fenv-except-tracking-3.sh: Test not only FE_INVALID, but
2259         also FE_DIVBYZERO, FE_OVERFLOW, FE_UNDERFLOW, FE_INEXACT.
2260         * tests/test-fenv-except-tracking-3.c: Include <stdlib.h>, <string.h>.
2261         Don't include fpe-trapping.h. Assume HAVE_FPE_TRAPPING is 1.
2262         (main): Receive the exception to test as first argument.
2264 2023-11-05  Bruno Haible  <bruno@clisp.org>
2266         fpe-trapping: Simplify.
2267         * lib/fpe-trapping.h (sigfpe_on_invalid): Remove all platform specific
2268         code. Just rely on feclearexcept and feenableexcept.
2269         * m4/fpe-trapping.m4: Renamed from m4/fpe.m4.
2270         (gl_FPE_TRAPPING): Greatly simplify.
2271         * modules/fpe-trapping (Files): Use m4/fpe-trapping.m4 instead of
2272         m4/fpe.m4. Remove m4/mathfunc.m4, m4/musl.m4.
2273         (Depends-on): Add fenv-exceptions-trapping.
2274         * tests/test-fenv-except-state-2.c (main): Update skip message.
2275         * tests/test-fenv-except-tracking-2.c (main): Likewise.
2276         * tests/test-fenv-except-tracking-3.c (main): Likewise.
2277         * tests/test-fenv-except-tracking-5.c (main): Likewise.
2278         * tests/test-nan-2.c (main): Likewise.
2279         * tests/test-snan-2.c (main): Likewise.
2281 2023-11-05  Bruno Haible  <bruno@clisp.org>
2283         fpe-tracking: Remove module.
2284         * modules/fpe-tracking: Remove file.
2285         * m4/fpe.m4 (gl_FPE_TRACKING): Remove macro.
2286         (gl_FPE_TRAPPING): Require gl_FENV_EXCEPTIONS_TRACKING instead of
2287         gl_FPE_TRACKING. Use FENV_EXCEPTIONS_TRACKING_LIBM instead of
2288         FPE_TRACKING_LIBM.
2289         * modules/nan-tests (Depends-on): Add fenv-exceptions-tracking-c99.
2290         Remove fpe-tracking.
2291         (Makefile.am): Use FENV_EXCEPTIONS_TRACKING_LIBM instead of
2292         FPE_TRACKING_LIBM.
2293         * modules/snan-tests (Depends-on): Add fenv-exceptions-tracking-c99.
2294         Remove fpe-tracking.
2295         (Makefile.am): Use FENV_EXCEPTIONS_TRACKING_LIBM instead of
2296         FPE_TRACKING_LIBM.
2297         * tests/test-nan-1.c: Assume HAVE_FE_INVALID is 1.
2298         * tests/test-snan-1.c: Likewise.
2300 2023-11-05  Bruno Haible  <bruno@clisp.org>
2302         fenv-exceptions-trapping: Avoid test failure on NetBSD/sparc.
2303         * tests/test-fenv-except-trapping-2.c (main): Skip the 'long double'
2304         tests also on NetBSD/sparc.
2306 2023-11-05  Bruno Haible  <bruno@clisp.org>
2308         fenv-exceptions-trapping: Update documentation.
2309         * doc/glibc-functions/feenableexcept.texi: Document the Linux/hppa
2310         problem.
2312 2023-11-05  Bruno Haible  <bruno@clisp.org>
2314         fenv-exceptions-trapping: Avoid test failure on older systems.
2315         * tests/test-fenv-except-trapping-2.c (main): Skip the test also on x86
2316         systems with gcc < 8.
2318 2023-11-04  Bruno Haible  <bruno@clisp.org>
2320         fenv-exceptions-trapping: Fix for powerpc* platforms.
2321         * lib/fenv-except-trapping.c (feenableexcept, fedisableexcept)
2322         [powerpc]: Use the correct bit mask for the trap bits.
2323         * tests/test-fenv-except-trapping-2.c (main): Reenable the '9' tests on
2324         powerpc platforms.
2326 2023-11-04  Bruno Haible  <bruno@clisp.org>
2328         fenv-exceptions-state-c99: Fix compilation error on FreeBSD.
2329         * lib/fenv.in.h (fegetexceptflag, fesetexceptflag): On FreeBSD, use an
2330         rpl_ prefix, to avoid a conflict with an inline definition in FreeBSD's
2331         <fenv.h>.
2333 2023-11-04  Bruno Haible  <bruno@clisp.org>
2335         doc: Update info about Cygwin feraiseexcept bug.
2336         * doc/posix-functions/feraiseexcept.texi: Update info regarding Cygwin.
2338 2023-11-04  Bruno Haible  <bruno@clisp.org>
2340         fenv-exceptions-tracking-c99 tests: Avoid test failure on NetBSD/sparc.
2341         * tests/test-fenv-except-tracking-2.c (main): On NetBSD/sparc, skip the
2342         'long double' test.
2344 2023-11-04  Bruno Haible  <bruno@clisp.org>
2346         fenv-exceptions-tracking-c99: Fix fetestexcept() override for AIX.
2347         * lib/fenv-except-tracking-test.c (fetestexcept): On AIX, use
2348         fp_read_flag() rather than the fpscr register.
2350 2023-11-04  Bruno Haible  <bruno@clisp.org>
2352         fenv-exceptions-tracking-c99: Work around a NetBSD/x86_64 bug.
2353         * m4/fenv-exceptions-tracking.m4 (gl_FENV_EXCEPTIONS_TRACKING): On
2354         NetBSD/x86_64, set REPLACE_FETESTEXCEPT to 1.
2355         * doc/posix-functions/fetestexcept.texi: Document the NetBSD bug.
2357 2023-11-04  Bruno Haible  <bruno@clisp.org>
2359         fenv-rounding: Avoid a test failure on NetBSD/sparc64.
2360         * tests/test-fenv-round.c (test_towardzero, test_upward, test_downward):
2361         Skip the 'long double' tests on NetBSD/sparc64.
2362         * doc/posix-functions/fesetround.texi: Mention the problem with
2363         'long double' operations on some platforms.
2365 2023-11-04  Bruno Haible  <bruno@clisp.org>
2367         fenv-rounding: Improve code for MSVC.
2368         * lib/fenv-round.c (fegetround) [MSVC]: Use the rounding direction from
2369         the SSE unit. Don't assume stable values for FE_UPWARD and FE_DOWNWARD.
2370         (fesetround) [MSVC]: Set the rounding direction only in the SSE unit.
2371         Don't assume stable values for FE_UPWARD and FE_DOWNWARD.
2373 2023-11-04  Bruno Haible  <bruno@clisp.org>
2375         fenv-rounding et al.: Require AC_CANONICAL_HOST before accessing $host.
2376         * m4/fenv-rounding.m4 (gl_FENV_ROUNDING): Require AC_CANONICAL_HOST.
2377         * m4/c32rtomb.m4 (gl_FUNC_C32RTOMB): Likewise.
2378         * m4/getrandom.m4 (gl_FUNC_GETRANDOM): Likewise.
2379         * m4/iswdigit.m4 (gl_FUNC_ISWDIGIT): Likewise.
2380         * m4/iswpunct.m4 (gl_FUNC_ISWPUNCT): Likewise.
2381         * m4/iswxdigit.m4 (gl_FUNC_ISWXDIGIT): Likewise.
2382         * m4/strerrorname_np.m4 (gl_FUNC_STRERRORNAME_NP): Likewise.
2383         * m4/strfmon_l.m4 (gl_FUNC_STRFMON_L): Likewise.
2384         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Likewise.
2385         * m4/vasnprintf.m4 (gl_PREREQ_VASNWPRINTF): Likewise.
2386         * m4/wcscmp.m4 (gl_FUNC_WCSCMP): Likewise.
2387         * m4/wcsncmp.m4 (gl_FUNC_WCSNCMP): Likewise.
2389 2023-11-04  Bruno Haible  <bruno@clisp.org>
2391         fenv: Document an ABI break on MSVC.
2392         * doc/posix-headers/fenv.texi: Document why fegetround and fesetround
2393         are seemingly broken on MSVC.
2395 2023-10-31  Bruno Haible  <bruno@clisp.org>
2397         fenv-exceptions-trapping: Add tests.
2398         * tests/test-fenv-except-trapping-1.c: New file.
2399         * tests/test-fenv-except-trapping-2.sh: New file.
2400         * tests/test-fenv-except-trapping-2.c: New file.
2401         * modules/fenv-exceptions-trapping-tests: New file.
2403         fenv-exceptions-trapping: New module.
2404         * lib/fenv.in.h (feenableexcept, fedisableexcept, fegetexcept): New
2405         declarations.
2406         * lib/fenv-except-trapping.c: New file, based on glibc.
2407         * m4/fenv_h.m4 (gl_FENV_H): Test also whether fegetexcept is declared.
2408         * m4/fenv-exceptions-trapping.m4: New file.
2409         * modules/fenv-exceptions-trapping: New file.
2410         * doc/glibc-functions/fegetexcept.texi: Mention the new module.
2411         * doc/glibc-functions/fedisableexcept.texi: Likewise.
2412         * doc/glibc-functions/feenableexcept.texi: Likewise. Mention the glibc,
2413         macOS, FreeBSD bugs.
2415 2023-10-30  Bruno Haible  <bruno@clisp.org>
2417         fenv-exceptions-state-c99: Fix the x86_64 and i386 case.
2418         * lib/fenv-except-state-set.c (fesetexceptflag): Make sure to restore
2419         the exception trap bits in all cases.
2421 2023-10-30  Bruno Haible  <bruno@clisp.org>
2423         fenv-exceptions-state-c23: Add tests.
2424         * tests/test-fenv-except-state-3.c: New file.
2425         * modules/fenv-exceptions-state-c23-tests: New file.
2427         fenv-exceptions-state-c23: New module.
2428         * lib/fenv.in.h (fetestexceptflag): New declaration.
2429         * lib/fenv-except-state-test.c: New file, based on glibc.
2430         * m4/fenv-exceptions-state-c23.m4: New file.
2431         * modules/fenv-exceptions-state-c23: New file.
2432         * doc/posix-functions/fetestexceptflag.texi: Mention the new module.
2434 2023-10-30  Bruno Haible  <bruno@clisp.org>
2436         fenv-exceptions-state-c99: Add tests.
2437         * tests/test-fenv-except-state-1.c: New file.
2438         * tests/test-fenv-except-state-2.c: New file.
2439         * modules/fenv-exceptions-state-c99-tests: New file.
2441         fenv-exceptions-state-c99: New module.
2442         * lib/fenv.in.h (fegetexceptflag, fesetexceptflag): New declarations.
2443         * lib/fenv-except-state-get.c: New file, based on glibc.
2444         * lib/fenv-except-state-set.c: New file, based on glibc.
2445         * m4/mathfunc.m4 (gl_MATHFUNC): Handle also the 'fexcept_t *' type.
2446         * m4/fenv-exceptions-state.m4: New file.
2447         * modules/fenv-exceptions-state-c99: New file.
2448         * doc/posix-functions/fegetexceptflag.texi: Mention the new module.
2449         * doc/posix-functions/fesetexceptflag.texi: Mention the new module and
2450         the glibc, musl libc, macOS, AIX, mingw bugs.
2452 2023-10-30  Bruno Haible  <bruno@clisp.org>
2454         fenv-exceptions-tracking-{c99,c23}: Fix the x86_64 and i386 case.
2455         * lib/fenv-except-tracking-clear.c (feclearexcept): Make sure to restore
2456         the exception trap bits in all cases.
2457         * lib/fenv-except-tracking-raise.c (feraiseexcept): Likewise.
2458         * lib/fenv-except-tracking-set.c (fesetexcept): Likewise.
2460 2023-10-29  Bruno Haible  <bruno@clisp.org>
2462         fenv-exceptions-tracking-c23: Add tests.
2463         * tests/test-fenv-except-tracking-4.c: New file.
2464         * tests/test-fenv-except-tracking-5.c: New file.
2465         * modules/fenv-exceptions-tracking-c23-tests: New file.
2467         fenv-exceptions-tracking-c23: New module.
2468         * lib/fenv.in.h (fesetexcept): New declaration.
2469         * lib/fenv-except-tracking-set.c: New file, based on glibc.
2470         * lib/fenv-private.h (_GETMSR, _SETMSR, MSR_FP_EXC_MASK, PR_SET_FPEXC,
2471         PR_FP_EXC_DISABLED, PR_FP_EXC_NONRECOV, PR_FP_EXC_ASYNC,
2472         PR_FP_EXC_PRECISE, prctl) [NetBSD/powerpc]: New macros.
2473         * m4/fenv-exceptions-tracking-c23.m4: New file.
2474         * modules/fenv-exceptions-tracking-c23: New file.
2475         * doc/posix-functions/fesetexcept.texi: Mention the new module and the
2476         glibc bugs.
2478 2023-10-28  Bruno Haible  <bruno@clisp.org>
2480         fenv-exceptions-tracking-c99: Fix feraiseexcept (FE_OVERFLOW) on MSVC.
2481         * lib/fenv-except-tracking-raise.c (feraiseexcept): Use the generic
2482         approach for all exceptions.
2484 2023-10-28  Bruno Haible  <bruno@clisp.org>
2486         fpe-trapping: Always clear the FE_INVALID exception flag first.
2487         * lib/fpe-trapping.h: Include <fenv.h> on all platforms.
2488         (sigfpe_on_invalid) [AIX, HP-UX, IRIX, Solaris] : Clear the FE_INVALID
2489         exception flag first.
2490         * modules/fpe-trapping (Depends-on): Add fenv-exceptions-tracking-c99.
2492 2023-10-28  Bruno Haible  <bruno@clisp.org>
2494         fenv-exceptions-tracking-c99: Add tests.
2495         * tests/test-fenv-except-tracking-1.c: New file.
2496         * tests/test-fenv-except-tracking-2.sh: New file.
2497         * tests/test-fenv-except-tracking-2.c: New file.
2498         * tests/test-fenv-except-tracking-3.sh: New file.
2499         * tests/test-fenv-except-tracking-3.c: New file.
2500         * modules/fenv-exceptions-tracking-c99-tests: New file.
2502         fenv-exceptions-tracking-c99: New module.
2503         * lib/fenv.in.h (feclearexcept, feraiseexcept, fetestexcept): New
2504         declarations.
2505         * lib/fenv-except-tracking-clear.c: New file, based on glibc.
2506         * lib/fenv-except-tracking-raise.c: New file, based on glibc.
2507         * lib/fenv-except-tracking-test.c: New file, based on glibc.
2508         * m4/fenv-exceptions-tracking.m4: New file.
2509         * m4/fenv-exceptions.m4: New file.
2510         * modules/fenv-exceptions-tracking-c99: New file.
2511         * doc/posix-functions/feclearexcept.texi: Mention the new module.
2512         * doc/posix-functions/fetestexcept.texi: Likewise.
2513         * doc/posix-functions/feraiseexcept.texi: Likewise. Mention the glibc
2514         and Cygwin bugs.
2516 2023-10-27  Bruno Haible  <bruno@clisp.org>
2518         fenv-rounding: Add tests.
2519         * tests/test-fenv-round.c: New file.
2520         * modules/fenv-rounding-tests: New file.
2522         fenv-rounding: New module.
2523         * lib/fenv.in.h (fegetround, fesetround): New declarations.
2524         * lib/fenv-private.h: New file, based on glibc.
2525         * lib/fenv-round.c: New file, based on glibc.
2526         * m4/mathfunc.m4 (gl_MATHFUNC): Handle also the type fp_rnd.
2527         * m4/fenv-rounding.m4: New file.
2528         * modules/fenv (Depends-on): Add snippet/c++defs.
2529         (Makefile.am): Substitute $(CXXDEFS_H) into fenv.h.
2530         * modules/fenv-rounding: New file.
2531         * doc/posix-functions/fegetround.texi: Mention the new module.
2532         * doc/posix-functions/fesetround.texi: Likewise.
2534 2023-10-27  Bruno Haible  <bruno@clisp.org>
2536         tests: Use C99 initializer syntax for memory_long_double.
2537         * tests/test-isfinite.c (test_isfinitel): Use '.word = ...' syntax when
2538         initializing memory_long_double variables.
2539         * tests/test-isinf.c (test_isinfl): Likewise.
2540         * tests/test-isnan.c (test_long_double): Likewise.
2541         * tests/test-snprintf-posix.h (test_function): Likewise.
2542         * tests/test-sprintf-posix.h (test_function): Likewise.
2543         * tests/test-vasnprintf-posix.c (test_function): Likewise.
2544         * tests/test-vasnwprintf-posix.c (test_function): Likewise.
2545         * tests/test-vasprintf-posix.c (test_function): Likewise.
2546         * modules/isfinite-tests (Depends-on): Add c99.
2547         * modules/isinf-tests (Depends-on): Likewise.
2548         * modules/isnan-tests (Depends-on): Likewise.
2549         * modules/isnanl-nolibm-tests (Depends-on): Likewise.
2550         * modules/isnanl-tests (Depends-on): Likewise.
2551         * modules/pipe-filter-gi-tests (Depends-on): Likewise.
2552         * modules/pipe-filter-ii-tests (Depends-on): Likewise.
2553         * modules/snprintf-posix-tests (Depends-on): Likewise.
2554         * modules/sprintf-posix-tests (Depends-on): Likewise.
2555         * modules/vasnprintf-posix-tests (Depends-on): Likewise.
2556         * modules/vasnwprintf-posix-tests (Depends-on): Likewise.
2557         * modules/vasprintf-posix-tests (Depends-on): Likewise.
2558         * modules/vsnprintf-posix-tests (Depends-on): Likewise.
2559         * modules/vsprintf-posix-tests (Depends-on): Likewise.
2561 2023-10-26  Pádraig Brady  <P@draigBrady.com>
2563         base32, base64: disallow non-canonical encodings
2564         * lib/base32.c: Check that discarded bits in the encoding are zero.
2565         * lib/base64.c: Likewise.
2566         * tests/test-base32.c: Add test cases.
2567         * tests/test-base64.c: Likewise.
2569 2023-10-26  Bruno Haible  <bruno@clisp.org>
2571         fenv: Add tests.
2572         * tests/test-fenv.c: New file.
2573         * modules/fenv-tests: New file.
2575         fenv: New module.
2576         * lib/fenv.in.h: New file, based on glibc.
2577         * m4/fenv_h.m4: New file.
2578         * modules/fenv: New file.
2579         * doc/posix-headers/fenv.texi: Mention the new module.
2581 2023-10-25  Paul Eggert  <eggert@cs.ucla.edu>
2583         base32: new function isubase32; also, tune.
2584         * lib/base32.c (BASE32_INLINE): Define.
2585         (base32_to_int): Rename from b32 and make it extern.  All uses changed.
2586         (uchar_in_range): Remove.  All uses removed.
2587         (isbase32, base32_decode_ctx_init):
2588         Move to lib/base32.h and make inline.
2589         * lib/base32.h: Ignore -Wtype-limits, so that we needn’t
2590         worry about uchar_in_range.
2591         (BASE32_INLINE): Define, and use _GL_INLINE_HEADER_BEGIN.
2592         (isubase32): New function, useful as it as a different signature.
2593         (isbase32): Define in terms of isubase32.
2594         * modules/base32 (Depends-on): Add extern-inline.
2596         base64: new function isubase64; also, tune.
2597         * lib/base64.c (BASE64_INLINE): Define.
2598         (base64_to_int): Rename from b64 and make it extern.  All uses changed.
2599         (uchar_in_range): Remove.  All uses removed.
2600         (isbase64, base64_decode_ctx_init):
2601         Move to lib/base64.h and make inline.
2602         * lib/base64.h: Ignore -Wtype-limits, so that we needn’t
2603         worry about uchar_in_range.
2604         (BASE64_INLINE): Define, and use _GL_INLINE_HEADER_BEGIN.
2605         (isubase64): New function, useful as it as a different signature.
2606         (isbase64): Define in terms of isubase64.
2607         * modules/base64 (Depends-on): Add extern-inline.
2609 2023-10-24  Paul Eggert  <eggert@cs.ucla.edu>
2611         tests/unistr/u16-chr-tests: pacify -Wcast-align
2612         * tests/unistr/test-chr.h (main): Redo types to pacify
2613         gcc -Wcast-align.
2615         isnanl-tests, stdio-tests: pacify GCC -Wshadow
2616         * tests/test-isnanl.h (NWORDS): Remove.
2617         (memory_long_double): Do not redefine in an inner scope.
2618         All uses changed to use the snan.h memory_long_double.
2619         * tests/test-stdio.c (NWORDS): Remove.
2620         (memory_long_double): Do not redefine in an inner scope.
2621         The snan.h memory_long_double is fine here.
2623         explicit_bzero-tests: pacify GCC 13.2.1
2624         * tests/test-explicit_bzero.c:
2625         * tests/test-memset_explicit.c:
2626         Ignore -Wdangling pointer.
2628 2023-10-22  Bruno Haible  <bruno@clisp.org>
2630         memset_explicit, explicit_bzero tests: Fix test failures with new gcc.
2631         Reported by Sam James <sam@gentoo.org> in
2632         <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111904>.
2633         Fix by Alexandre Oliva <aoliva@gcc.gnu.org>.
2634         * tests/test-memset_explicit.c (do_secret_stuff): Declare with
2635         attributes 'noclone' and 'noipa'.
2636         * tests/test-explicit_bzero.c (do_secret_stuff): Likewise.
2638 2023-10-15  Bruno Haible  <bruno@clisp.org>
2640         net_if tests: Fix gcc warning.
2641         * tests/test-net_if.c: Include <string.h>.
2643 2023-10-15  Bruno Haible  <bruno@clisp.org>
2645         mbspbrk: Fix gcc warning (regression 2023-09-26).
2646         * lib/mbspbrk.c (mbspbrk): Fix gcc warning in GNULIB_MCEL_PREFER mode.
2648 2023-10-15  Bruno Haible  <bruno@clisp.org>
2650         pthread-spin: Fix warnings on FreeBSD 5.2.1/i386.
2651         * lib/pthread.in.h (pthread_spinlock_t): Override if <pthread.h> defines
2652         pthread_spinlock_t but we need to approximate spinlocks with mutexes.
2653         * m4/pthread-spin.m4 (gl_PTHREAD_SPIN): When the pthread_spin_*
2654         functions are declared but don't exist, mark them as REPLACEd.
2656         pthread-spin: Fix link errors on FreeBSD 5.2.1/i386.
2657         * m4/pthread-spin.m4 (gl_PTHREAD_SPIN): Test not only whether
2658         <pthread.h> defines the pthread_spinlock_t type, but also whether the
2659         function pthread_spin_init is actually defined.
2661 2023-10-15  Bruno Haible  <bruno@clisp.org>
2663         pthread_mutex_timedlock: Fix link errors on FreeBSD 5.2.1/i386.
2664         * m4/pthread_mutex_timedlock.m4 (gl_FUNC_PTHREAD_MUTEX_TIMEDLOCK): Test
2665         not only whether pthread_mutex_timedlock is declared, but also whether
2666         it is actually defined.
2668 2023-10-15  Bruno Haible  <bruno@clisp.org>
2670         threadlib: Fix link errors on FreeBSD 5.2.1/i386.
2671         * m4/threadlib.m4 (gl_PTHREADLIB_BODY): When pthread_kill could not be
2672         found in -lpthread, try -lthr.
2674 2023-10-15  Bruno Haible  <bruno@clisp.org>
2676         lock: Make Autoconf macro more robust.
2677         * m4/pthread_rwlock_rdlock.m4 (gl_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER):
2678         Require gl_THREADLIB, not gl_THREADLIB_EARLY. Needed to get the value of
2679         LIBMULTITHREAD.
2681 2023-10-15  Bruno Haible  <bruno@clisp.org>
2683         totalorder-bench-tests: New module.
2684         * tests/bench-totalorder.c: New file, based on tests/test-totalorder.h.
2685         * modules/totalorder-bench-tests: New file.
2687 2023-10-15  Bruno Haible  <bruno@clisp.org>
2689         snan: Simplify a type.
2690         * lib/snan.h (memory_long_double): Put the 'value' field first.
2691         * tests/test-totalorder.h (main): No need for designated initializer
2692         syntax any more.
2694 2023-10-15  Bruno Haible  <bruno@clisp.org>
2696         vma-iter: Fix compilation error on FreeBSD 5.2.1.
2697         * lib/vma-iter.c [FreeBSD]: Include <sys/param.h>.
2699 2023-10-14  Bruno Haible  <bruno@clisp.org>
2701         totalorder*: Document glibc bug on SH4.
2702         * doc/posix-functions/totalorder.texi: Mention the glibc bug on SH4.
2703         * doc/posix-functions/totalorderf.texi: Likewise.
2704         * doc/posix-functions/totalorderl.texi: Likewise.
2706         totalorder*: Fix test failures on SH4.
2707         * lib/snan.h: Update comment.
2708         * lib/totalorderf.c (totalorderf): On sh4, invert bit 22 before
2709         comparing two NaNs.
2710         * lib/totalorder.c (totalorder): On sh4, invert bit 51 before comparing
2711         two NaNs.
2712         * lib/totalorderl.c (totalorderl): On sh4, invert bit 51 or 47 of the
2713         xhi, yhi parts before comparing two NaNs.
2715         totalorder*: Fix test failures on PA-RISC and MIPS CPUs.
2716         * lib/totalorderf.c (totalorderf): On hppa and mips, invert bit 22
2717         before comparing two NaNs.
2718         * lib/totalorder.c (totalorder): On hppa and mips, invert bit 51 before
2719         comparing two NaNs.
2720         * lib/totalorderl.c: Include <float.h>.
2721         (totalorderl): On hppa and mips, invert bit 51 or 47 of the xhi, yhi
2722         parts before comparing two NaNs.
2723         * modules/totalorderl (Depends-on): Add 'float'.
2725 2023-10-14  Bruno Haible  <bruno@clisp.org>
2727         totalorder* tests: Test also the signalling NaNs.
2728         * tests/test-totalorder.h: Include signed-snan.h.
2729         (main): Change the array initializer to contain memory_* objects rather
2730         than floating-point numbers. This is needed for i386 and x86_64 CPUs.
2731         * tests/test-totalorder.c (TOTALORDER_TYPE): Use memory_double.
2732         (TOTALORDER_HAVE_SNAN, TOTALORDER_POSITIVE_SNAN,
2733         TOTALORDER_NEGATIVE_SNAN): New macros.
2734         * tests/test-totalorderf.c (TOTALORDER_TYPE): Use memory_float.
2735         (TOTALORDER_HAVE_SNAN, TOTALORDER_POSITIVE_SNAN,
2736         TOTALORDER_NEGATIVE_SNAN): New macros.
2737         * tests/test-totalorderl.c (TOTALORDER_TYPE): Use memory_long_double.
2738         (TOTALORDER_HAVE_SNAN, TOTALORDER_POSITIVE_SNAN,
2739         TOTALORDER_NEGATIVE_SNAN): New macros.
2740         * modules/totalorder-tests (Depends-on): Add signed-snan.
2741         * modules/totalorderf-tests (Depends-on): Likewise.
2742         * modules/totalorderl-tests (Depends-on): Likewise.
2744 2023-10-14  Bruno Haible  <bruno@clisp.org>
2746         totalorder* tests: Make it easier to debug failures.
2747         * tests/test-totalorder.h: Include <stdio.h>.
2748         (main): Print array indices of all failures.
2750 2023-10-14  Bruno Haible  <bruno@clisp.org>
2752         totalorder* tests: Verify also the function signatures.
2753         * tests/test-totalorder.h: New file, based on tests/test-totalorder.c.
2754         * tests/test-totalorder.c: Check the signature. Include
2755         test-totalorder.h for the rest.
2756         * tests/test-totalorderf.c: Include <config.h>, <math.h>. Check the
2757         signature. Include test-totalorder.h instead of test-totalorder.c.
2758         * tests/test-totalorderl.c: Likewise.
2759         * modules/totalorder-tests (Files): Add test-totalorder.h, signature.h.
2760         * modules/totalorderf-tests (Files): Add test-totalorder.h, signature.h.
2761         Remove test-totalorder.c.
2762         * modules/totalorderl-tests (Files): Likewise.
2764 2023-10-14  Bruno Haible  <bruno@clisp.org>
2766         totalorder*: Improve documentation.
2767         * doc/posix-functions/totalorder.texi: Reference the specification.
2768         * doc/posix-functions/totalorderf.texi: Likewise.
2769         * doc/posix-functions/totalorderl.texi: Likewise.
2771 2023-10-14  Bruno Haible  <bruno@clisp.org>
2773         snan, signed-snan: Add API that works also on x86 and x86_64 CPUs.
2774         * lib/snan.h (memory_float, memory_double, memory_long_double): New
2775         types.
2776         (construct_memory_SNaNf, memory_SNaNf, construct_memory_SNaNd,
2777         memory_SNaNd, construct_memory_SNaNl, memory_SNaNl): New functions.
2778         * lib/signed-snan.h (memory_positive_SNaNf, memory_negative_SNaNf,
2779         memory_positive_SNaNd, memory_negative_SNaNd, memory_positive_SNaNl,
2780         memory_negative_SNaNl): New functions.
2782 2023-10-14  Bruno Haible  <bruno@clisp.org>
2784         snan tests: Fix "unused variable" warnings on i386.
2785         * tests/test-snan-1.c (main): Mark nanf, nand, nanl as possibly unused.
2786         * tests/test-snan-2.c (main): Likewise.
2788 2023-10-14  Bruno Haible  <bruno@clisp.org>
2790         snan: Avoid test failures with CC="gcc -mfpmath=387".
2791         * tests/test-snan-1.c (main): Treat x86_64 CPU with
2792         __FLT_EVAL_METHOD__ == 2 like i386 CPU. Update comments.
2793         * tests/test-snan-2.c (main): Likewise.
2795 2023-10-14  Bruno Haible  <bruno@clisp.org>
2797         snan: Fix the value of SNaNl() on i386, x86_64, ia64 CPUs.
2798         * lib/snan.h (construct_SNaNl): On i386, x86_64, ia64 CPUs, invert
2799         bit 62, not bit 63, of the mantissa.
2800         * m4/snan.m4 (gl_SNAN): Require gl_LONG_DOUBLE_VS_DOUBLE.
2801         * modules/snan (Files): Add m4/math_h.m4.
2803 2023-10-13  Bruno Haible  <bruno@clisp.org>
2805         tests: Make use of signed signalling NaNs.
2806         * tests/test-signbit.c: Include signed-snan.h instead of snan.h.
2807         (test_signbitf): Test positive_SNaNf, negative_SNaNf, instead of only
2808         SNaNf.
2809         (test_signbitd): Test positive_SNaNd, negative_SNaNd, instead of only
2810         SNaNd.
2811         (test_signbitl): Test positive_SNaNl, negative_SNaNl, instead of only
2812         SNaNl.
2813         * tests/test-stdio.c: Include signed-snan.h instead of snan.h.
2814         (main): Test positive_SNaNd, negative_SNaNd, instead of only SNaNd.
2815         Also, test positive_NaNd, negative_NaNd, instead of NaNd.
2816         * modules/signbit-tests (Depends-on): Add signed-snan. Remove snan.
2817         * modules/stdio-tests (Depends-on): Likewise.
2819 2023-10-13  Bruno Haible  <bruno@clisp.org>
2821         signed-snan: New module.
2822         * lib/snan.h (construct_SNaNf): New function, extracted from SNaNf.
2823         (SNaNf): Use it.
2824         (construct_SNaNd): New function, extracted from SNaNd.
2825         (SNaNd): Use it.
2826         (construct_SNaNl): New function, extracted from SNaNl.
2827         (SNaNl): Use it.
2828         * lib/signed-snan.h: New file.
2829         * modules/signed-snan: New file.
2831 2023-10-13  Bruno Haible  <bruno@clisp.org>
2833         signed-nan: New module, renamed from qnan.
2834         * lib/signed-nan.h: Renamed from lib/qnan.h. Update double-inclusion
2835         guard.
2836         * modules/signed-nan: Renamed from modules/qnan. Update.
2837         * tests/test-signbit.c: Update.
2838         * tests/test-stdio.c: Likewise.
2839         * tests/test-totalorder.c: Likewise.
2840         * modules/*-tests: Update.
2842 2023-10-13  Bruno Haible  <bruno@clisp.org>
2844         access: Fix test failure on native Windows.
2845         * lib/access.c (access): Do the trailing slash workaround also on
2846         native Windows.
2847         * modules/access (Depends-on): Add stat.
2849 2023-10-13  Bruno Haible  <bruno@clisp.org>
2851         isnanf, isnand: Fix conflict with Solaris <ieeefp.h>.
2852         * lib/math.in.h (isnanf, isnand): On Solaris and IRIX, declare this
2853         function, instead of defining it as a macro.
2855 2023-10-12  Bruno Haible  <bruno@clisp.org>
2857         *printf tests: Test printing of signalling NaNs.
2858         These tests run without sigfpe_on_invalid(), therefore they won't crash.
2859         * tests/test-vasnprintf-posix.c: Include snan.h.
2860         (test_function): For each test case that uses NaNd or NaNl, add a test
2861         case with SNaNd or SNaNl, respectively.
2862         * tests/test-vasprintf-posix.c: Likewise.
2863         * tests/test-snprintf-posix.h: Likewise.
2864         * tests/test-sprintf-posix.h: Likewise.
2865         * tests/test-vasnwprintf-posix.c: Likewise.
2866         * modules/vasnprintf-posix-tests (Depends-on): Add snan.
2867         * modules/vasprintf-posix-tests (Depends-on): Likewise.
2868         * modules/vsnprintf-posix-tests (Depends-on): Likewise.
2869         * modules/snprintf-posix-tests (Depends-on): Likewise.
2870         * modules/vsprintf-posix-tests (Depends-on): Likewise.
2871         * modules/sprintf-posix-tests (Depends-on): Likewise.
2872         * modules/vasnwprintf-posix-tests (Depends-on): Likewise.
2873         * modules/pipe-filter-gi-tests (Depends-on): Likewise.
2874         * modules/pipe-filter-ii-tests (Depends-on): Likewise.
2876 2023-10-12  Bruno Haible  <bruno@clisp.org>
2878         nan, snan tests: Avoid test failures.
2879         * tests/test-nan-1.c (main): Special handling of arm CPUs with software
2880         floating-point emulation.
2881         * tests/test-snan-1.c (main): Likewise. Disable tests that are known to
2882         fail.
2883         * tests/test-snan-2.c (main): Skip tests that are known to fail.
2884         * modules/snan-tests (Files): Add m4/math_h.m4.
2885         (configure.ac): Require gl_LONG_DOUBLE_VS_DOUBLE.
2886         * m4/math_h.m4 (gl_LONG_DOUBLE_VS_DOUBLE): Mention also NetBSD/sparc32.
2888 2023-10-12  Bruno Haible  <bruno@clisp.org>
2890         snan: Add tests.
2891         * tests/test-snan-1.c: New file.
2892         * tests/test-snan-2.sh: New file.
2893         * tests/test-snan-2.c: New file.
2894         * modules/snan-tests: New file.
2896 2023-10-12  Bruno Haible  <bruno@clisp.org>
2898         nan: Add tests.
2899         * tests/test-nan-1.c: New file.
2900         * tests/test-nan-2.c: New file.
2901         * modules/nan-tests: New file.
2903 2023-10-12  Bruno Haible  <bruno@clisp.org>
2905         fpe-tracking, fpe-trapping: New modules.
2906         * lib/fpe-trapping.h: New file.
2907         * m4/mathfunc.m4 (gl_MATHFUNC): Handle also the type fp_except_t.
2908         * m4/fpe.m4: New file.
2909         * modules/fpe-tracking: New file.
2910         * modules/fpe-trapping: New file.
2912 2023-10-12  Bruno Haible  <bruno@clisp.org>
2914         snan: Comments.
2915         * lib/snan.h: Add more comments.
2917 2023-10-12  Bruno Haible  <bruno@clisp.org>
2919         snan: New module.
2920         * lib/snan.h: Renamed from tests/snan.h. Add double-inclusion guard.
2921         * m4/snan.m4: New file.
2922         * modules/snan: New file.
2923         * isfinite-tests (Files): Remove tests/snan.h, m4/exponent*.m4.
2924         (Depends-on): Add snan.
2925         (configure.ac): Don't invoke gl_FLOAT_EXPONENT_LOCATION,
2926         gl_DOUBLE_EXPONENT_LOCATION, gl_LONG_DOUBLE_EXPONENT_LOCATION.
2927         * isinf-tests (Files): Remove tests/snan.h, m4/exponent*.m4.
2928         (Depends-on): Add snan.
2929         (configure.ac): Don't invoke gl_FLOAT_EXPONENT_LOCATION,
2930         gl_DOUBLE_EXPONENT_LOCATION, gl_LONG_DOUBLE_EXPONENT_LOCATION.
2931         * isnan-tests (Files): Remove tests/snan.h, m4/exponent*.m4.
2932         (Depends-on): Add snan.
2933         (configure.ac): Don't invoke gl_FLOAT_EXPONENT_LOCATION,
2934         gl_DOUBLE_EXPONENT_LOCATION, gl_LONG_DOUBLE_EXPONENT_LOCATION.
2935         * isnanf-nolibm-tests (Files): Remove tests/snan.h, m4/exponentf.m4.
2936         (Depends-on): Add snan.
2937         (configure.ac): Don't invoke gl_FLOAT_EXPONENT_LOCATION.
2938         * isnanf-tests (Files): Remove tests/snan.h, m4/exponentf.m4.
2939         (Depends-on): Add snan.
2940         (configure.ac): Don't invoke gl_FLOAT_EXPONENT_LOCATION.
2941         * isnand-nolibm-tests (Files): Remove tests/snan.h, m4/exponentd.m4.
2942         (Depends-on): Add snan.
2943         (configure.ac): Don't invoke gl_DOUBLE_EXPONENT_LOCATION.
2944         * isnand-tests (Files): Remove tests/snan.h, m4/exponentd.m4.
2945         (Depends-on): Add snan.
2946         (configure.ac): Don't invoke gl_DOUBLE_EXPONENT_LOCATION.
2947         * isnanl-nolibm-tests (Files): Remove tests/snan.h, m4/exponentl.m4.
2948         (Depends-on): Add snan.
2949         (configure.ac): Don't invoke gl_LONG_DOUBLE_EXPONENT_LOCATION.
2950         * isnanl-tests (Files): Remove tests/snan.h, m4/exponentl.m4.
2951         (Depends-on): Add snan.
2952         (configure.ac): Don't invoke gl_LONG_DOUBLE_EXPONENT_LOCATION.
2953         * signbit-tests (Files): Remove tests/snan.h, m4/exponent*.m4.
2954         (Depends-on): Add snan.
2955         (configure.ac): Don't invoke gl_FLOAT_EXPONENT_LOCATION,
2956         gl_DOUBLE_EXPONENT_LOCATION, gl_LONG_DOUBLE_EXPONENT_LOCATION.
2957         * stdio-tests (Files): Remove tests/snan.h
2958         (Depends-on): Add snan.
2960 2023-10-12  Bruno Haible  <bruno@clisp.org>
2962         qnan: New module.
2963         * lib/qnan.h: Renamed from tests/qnan.h. Add double-inclusion guard.
2964         * modules/qnan: New file.
2965         * modules/signbit-tests (Files): Remove tests/qnan.h.
2966         (Depends-on): Add qnan. Remove nan.
2967         * modules/stdio-tests (Files): Remove tests/qnan.h.
2968         (Depends-on): Add qnan. Remove nan.
2969         * modules/totalorder-tests (Files): Remove tests/qnan.h.
2970         (Depends-on): Add qnan. Remove nan, signbit.
2971         * modules/totalorderf-tests (Files): Remove tests/qnan.h.
2972         (Depends-on): Add qnan. Remove nan, signbit.
2973         * modules/totalorderl-tests (Files): Remove tests/qnan.h.
2974         (Depends-on): Add qnan. Remove nan, signbit.
2976 2023-10-12  Bruno Haible  <bruno@clisp.org>
2978         nan: New module.
2979         * lib/nan.h: Renamed from tests/nan.h. Change double-inclusion guard.
2980         * modules/nan: New file.
2981         * modules/*-tests: Depend on this module instead of embedding
2982         tests/nan.h.
2984 2023-10-11  Bruno Haible  <bruno@clisp.org>
2986         unictype/category-and-not: Add more tests.
2987         Suggested by Arindam Sharma <arindam.sharma@imperial.ac.uk>.
2988         * tests/unictype/test-categ_and_not.c (main): Add two more test cases.
2989         * modules/unictype/category-and-not-tests (Depends-on): Add
2990         unictype/category-Cc.
2992 2023-10-09  Bruno Haible  <bruno@clisp.org>
2994         tests: Refactor functions for signalling NaNs.
2995         * tests/snan.h: New file, based on tests/test-isnanf.h,
2996         tests/test-isnand.h, tests/test-isnanl.h.
2997         * tests/test-isfinite.c: Include snan.h.
2998         (test_isfinitef, test_isfinited, test_isfinitel): Simplify.
2999         * tests/test-isinf.c: Include snan.h.
3000         (test_isinff, test_isinfd, test_isinfl): Simplify.
3001         * tests/test-isnan.c: Include snan.h.
3002         (test_float, test_double, test_long_double): Simplify.
3003         * tests/test-isnanf.h: Include snan.h.
3004         (main): Simplify.
3005         * tests/test-isnand.h: Include snan.h.
3006         (main): Simplify.
3007         * tests/test-isnanl.h: Include snan.h.
3008         (main): Simplify.
3009         * tests/test-signbit.c: Include snan.h.
3010         (test_signbitf, test_signbitd, test_signbitl): Simplify.
3011         * tests/test-stdio.c: Include qnan.h, snan.h instead of nan.h.
3012         (main): Test quiet NaNs always. Also test a signalling NaN.
3013         * modules/isfinite-tests (Files): Add tests/nan.h, tests/snan.h.
3014         * modules/isinf-tests (Files): Likewise.
3015         * modules/isnan-tests (Files): Add tests/snan.h.
3016         * modules/isnanf-tests (Files): Likewise.
3017         * modules/isnanf-nolibm-tests (Files): Likewise.
3018         * modules/isnand-tests (Files): Likewise.
3019         * modules/isnand-nolibm-tests (Files): Likewise.
3020         * modules/isnanl-tests (Files): Likewise.
3021         * modules/isnanl-nolibm-tests (Files): Likewise.
3022         * modules/signbit-tests (Files): Likewise.
3023         * modules/stdio-tests (Files): Add tests/qnan.h, tests/snan.h.
3025 2023-10-08  Bruno Haible  <bruno@clisp.org>
3027         isfinite: Work around a bug with 'long double' in glibc 2.5/ia64.
3028         * m4/isfinite.m4 (gl_ISFINITEL_WORKS): Require
3029         gl_LONG_DOUBLE_EXPONENT_LOCATION. Test also another NaN value.
3030         * modules/isfinite (Files): Add m4/exponentl.m4.
3031         * doc/posix-functions/isfinite.texi: Mention also a 'long double'
3032         problem on ia64.
3034 2023-10-07  Bruno Haible  <bruno@clisp.org>
3036         tests: Refactor functions for quiet NaNs.
3037         * tests/qnan.h: New file, based on tests/totalorder.c.
3038         * tests/nan.h: Add double-inclusion guard.
3039         * tests/test-signbit.c: Include qnan.h.
3040         (test_signbitf, test_signbitd, test_signbitl): Simplify.
3041         * tests/test-totalorder.c: Include qnan.h instead of NaN.h.
3042         (TOTALORDER_NAN): Remove macro.
3043         (TOTALORDER_POSITIVE_NAN, TOTALORDER_NEGATIVE_NAN): New macros.
3044         (positive_nan, negative_nan): Remove functions.
3045         (main): Update.
3046         * tests/test-totalorderf.c (TOTALORDER_NAN): Remove macro.
3047         (TOTALORDER_POSITIVE_NAN, TOTALORDER_NEGATIVE_NAN): New macros.
3048         * tests/test-totalorderl.c (TOTALORDER_NAN): Remove macro.
3049         (TOTALORDER_POSITIVE_NAN, TOTALORDER_NEGATIVE_NAN): New macros.
3050         * modules/signbit-tests (Files): Add tests/nan.h, tests/qnan.h.
3051         * modules/totalorder-tests (Files): Add tests/qnan.h.
3052         (Depends-on): Add signbit.
3053         * modules/totalorderf-tests (Files): Add tests/qnan.h.
3054         (Depends-on): Add signbit.
3055         * modules/totalorderl-tests (Files): Add tests/qnan.h.
3056         (Depends-on): Add signbit.
3058 2023-10-07  Bruno Haible  <bruno@clisp.org>
3060         totalorder*: Fix compilation error on glibc 2.25..2.30.
3061         * m4/totalorder.m4 (gl_FUNC_TOTALORDERF): Test whether <math.h> has an
3062         incompatible declaration of totalorderf, and set REPLACE_TOTALORDERF
3063         to 1 if so.
3064         (gl_FUNC_TOTALORDER): Test whether <math.h> has an incompatible
3065         declaration of totalorder, and set REPLACE_TOTALORDER to 1 if so.
3066         (gl_FUNC_TOTALORDERL): Test whether <math.h> has an incompatible
3067         declaration of totalorderl, and set REPLACE_TOTALORDERL to 1 if so.
3069 2023-10-07  Bruno Haible  <bruno@clisp.org>
3071         isnan: Avoid dangerous shell coding pattern.
3072         * m4/isnand.m4 (gl_FUNC_ISNAND): Use 'test -n "$arg"', not
3073         'test "$arg"'.
3074         * m4/isnanf.m4 (gl_FUNC_ISNANF): Likewise.
3075         * m4/isnanl.m4 (gl_FUNC_ISNANL): Likewise.
3077 2023-10-05  Bruno Haible  <bruno@clisp.org>
3079         doc: Mention xstrerror.
3080         * doc/posix-functions/strerror_r.texi: Mention xstrerror.
3082         xstrerror: Add tests.
3083         * tests/test-xstrerror.c: New file.
3084         * modules/xstrerror-tests: New file.
3086         xstrerror: New module.
3087         * lib/xstrerror.h: New file.
3088         * lib/xstrerror.c: New file.
3089         * modules/xstrerror: New file.
3090         * modules/strerror_r-posix (configure.ac): Update comment.
3092 2023-10-05  Paul Eggert  <eggert@cs.ucla.edu>
3094         isnan: slightly simplify configuration
3095         * m4/isnand.m4 (gl_FUNC_ISNAND):
3096         * m4/isnanf.m4 (gl_FUNC_ISNANF):
3097         * m4/isnanl.m4 (gl_FUNC_ISNANL):
3098         Slightly simplify shell ‘if’.  This should simplify future changes.
3100         totalorder: speed up configuration
3101         * m4/totalorder.m4 (gl_FUNC_TOTALORDERF, gl_FUNC_TOTALORDER)
3102         (gl_FUNC_TOTALORDERL): Avoid unnecessary call to AC_SEARCH_LIBS,
3103         since the information is already available in shell vars.
3105         totalorderl: minor porting fixes
3106         * lib/totalorderl.c (LDBL_SIGNBIT_WORD): Define to -1 if not defined.
3107         (totalorderl): Avoid unused local zu by preferring ‘if’ to ‘ifdef’.
3108         Don’t assume sizeof (unsigned long long) == 2 * sizeof (unsigned).
3110 2023-10-04  Bruno Haible  <bruno@clisp.org>
3112         totalorder* tests: Refactor.
3113         * tests/test-totalorder.c (positive_nan, negative_nan): New functions,
3114         extracted from main.
3115         (main): Use them when initializing the array.
3117 2023-10-04  Bruno Haible  <bruno@clisp.org>
3119         totalorderl: Optimize.
3120         * modules/totalorderl (Files): Add m4/signbit.m4.
3121         * m4/totalorder.m4 (gl_FUNC_TOTALORDERL): Invoke
3122         gl_LONG_DOUBLE_SIGN_LOCATION.
3123         * lib/totalorderl.c (totalorderl): If LDBL_SIGNBIT_WORD is known,
3124         use it, so that 'bigendian' becomes a constant.
3126 2023-10-04  Bruno Haible  <bruno@clisp.org>
3128         totalorderl: Work around Solaris cc bug.
3129         * lib/totalorderl.c (totalorderl): Initialize xu, yu, zu using a
3130         different syntax.
3132 2023-10-04  Bruno Haible  <bruno@clisp.org>
3134         signbit tests: Strengthen tests.
3135         * tests/test-signbit.c (test_signbitf, test_signbitd, test_signbitl):
3136         Test the sign bit both of a NaN value and of its negative.
3138 2023-10-03  Bruno Haible  <bruno@clisp.org>
3140         doc: Document portability of __VA_ARGS__.
3141         * doc/gnulib-readme.texi (C99 features assumed): Add a note about
3142         __VA_ARGS__.
3144 2023-10-03  Bruno Haible  <bruno@clisp.org>
3146         ilogb: Document a Mac OS X bug.
3147         * doc/posix-functions/ilogb.texi: Mention a bug that affects Mac OS X.
3148         * m4/ilogb.m4 (gl_FUNC_ILOGB): Update comments.
3150 2023-10-03  Bruno Haible  <bruno@clisp.org>
3152         *printf-posix: Work around bug with %#.0x on Mac OS X 10.6.
3153         * lib/vasnprintf.c (VASNPRINTF): Enable NEED_PRINTF_UNBOUNDED_PRECISION-
3154         guarded code also for NEED_PRINTF_FLAG_ALT_PRECISION_ZERO. Set
3155         prec_ourselves to 1 if NEED_PRINTF_FLAG_ALT_PRECISION_ZERO, precision is
3156         0, and the directive is 'x' or 'X'. If prec_ourselves, remove the "0"
3157         output if required.
3158         * m4/printf.m4 (gl_PRINTF_FLAG_ALT_PRECISION_ZERO): New macro.
3159         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_FLAG_ALT_PRECISION_ZERO): New
3160         macro.
3161         (gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS): Invoke it.
3162         * m4/dprintf-posix.m4 (gl_FUNC_DPRINTF_IS_POSIX): Require
3163         gl_PRINTF_FLAG_ALT_PRECISION_ZERO and test its result.
3164         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_IS_POSIX): Likewise.
3165         * m4/obstack-printf-posix.m4 (gl_FUNC_OBSTACK_PRINTF_IS_POSIX):
3166         Likewise.
3167         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_IS_POSIX): Likewise.
3168         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_IS_POSIX): Likewise.
3169         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_IS_POSIX): Likewise.
3170         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_IS_POSIX): Likewise.
3171         * m4/vdprintf-posix.m4 (gl_FUNC_VDPRINTF_IS_POSIX): Likewise.
3172         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_IS_POSIX): Likewise.
3173         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_IS_POSIX): Likewise.
3174         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_IS_POSIX): Likewise.
3175         * doc/glibc-functions/asprintf.texi: Mention the %#.0x bug.
3176         * doc/glibc-functions/obstack_printf.texi: Likewise.
3177         * doc/glibc-functions/obstack_vprintf.texi: Likewise.
3178         * doc/glibc-functions/vasprintf.texi: Likewise.
3179         * doc/posix-functions/dprintf.texi: Likewise.
3180         * doc/posix-functions/fprintf.texi: Likewise.
3181         * doc/posix-functions/fwprintf.texi: Likewise.
3182         * doc/posix-functions/printf.texi: Likewise.
3183         * doc/posix-functions/snprintf.texi: Likewise.
3184         * doc/posix-functions/sprintf.texi: Likewise.
3185         * doc/posix-functions/swprintf.texi: Likewise.
3186         * doc/posix-functions/vdprintf.texi: Likewise.
3187         * doc/posix-functions/vfprintf.texi: Likewise.
3188         * doc/posix-functions/vfwprintf.texi: Likewise.
3189         * doc/posix-functions/vprintf.texi: Likewise.
3190         * doc/posix-functions/vsnprintf.texi: Likewise.
3191         * doc/posix-functions/vsprintf.texi: Likewise.
3192         * doc/posix-functions/vswprintf.texi: Likewise.
3193         * doc/posix-functions/vwprintf.texi: Likewise.
3194         * doc/posix-functions/wprintf.texi: Likewise.
3196 2023-10-03  Bruno Haible  <bruno@clisp.org>
3198         faccessat tests: Strengthen tests.
3199         * tests/test-faccessat.c (main): Test other modes than F_OK. Check errno
3200         values.
3202 2023-10-03  Bruno Haible  <bruno@clisp.org>
3204         euidaccess: Reject trailing slashes on symlinks to non-directories.
3205         * modules/euidaccess (Depends-on): Add access.
3207         euidaccess: Add tests.
3208         * tests/test-access.h: New file, extracted from tests/test-access.c.
3209         * tests/test-access.c: Moved most code to tests/test-access.h.
3210         Include test-access.h.
3211         (main): Invoke test_access.
3212         * tests/test-euidaccess.c: New file, based on tests/test-access.c.
3213         * modules/access-tests (Files): Add tests/test-access.h.
3214         * modules/euidaccess-tests: New file, based on modules/access-tests.
3216 2023-10-03  Bruno Haible  <bruno@clisp.org>
3218         access: Make last change work also when module 'stat' is in use.
3219         * lib/access.c (access): When stat() returns -1 with errno != EOVERFLOW,
3220         fail.
3222         access: Work around trailing slash bug on Mac OS X 10.5.
3223         * m4/access.m4 (gl_FUNC_ACCESS): Test whether access honors a trailing
3224         slash. Set REPLACE_ACCESS to 1 and define ACCESS_TRAILING_SLASH_BUG if
3225         not.
3226         * lib/access.c (access): Add an implementation for Unix-like platforms.
3227         * tests/test-access.c (main): Test for result if the argument has a
3228         trailing slash.
3229         * modules/access-tests (Depends-on): Add 'symlink'.
3230         * doc/posix-functions/access.texi: Mention the Mac OS X bug.
3232 2023-10-03  Bruno Haible  <bruno@clisp.org>
3234         update-copyright tests: Fix test failure (regression 2023-06-18).
3235         * build-aux/update-copyright: Add "use re 'eval';" declaration.
3237 2023-10-03  Bruno Haible  <bruno@clisp.org>
3239         Update re *-*-windows*-gnu* config triplets, withdrawn on 2023-09-19.
3240         * m4/*.m4: Don't recognize windows*-gnu* as equivalent to mingw*.
3242 2023-10-03  Bruno Haible  <bruno@clisp.org>
3244         string-c++-tests, uchar-c++-tests: Fix link errors on Mac OS X.
3245         * modules/string-c++-tests (Makefile.am): Link test-string-c++ with
3246         $(LIBC32CONV).
3247         * modules/uchar-c++-tests (Makefile.am): Link test-uchar-c++ with
3248         $(LIBC32CONV).
3250 2023-10-03  Bruno Haible  <bruno@clisp.org>
3252         mcel tests: Fix link error.
3253         * modules/mcel-tests (Makefile.am): Link test-mcel with $(LIBUNISTRING)
3254         $(SETLOCALE_LIB) $(MBRTOWC_LIB) $(LIBC32CONV).
3256 2023-10-03  Bruno Haible  <bruno@clisp.org>
3258         mcel: Fix compilation error in tests.
3259         * lib/mcel.h (mcel_scan): Undefine 'mbs' after use.
3261 2023-10-02  Bruno Haible  <bruno@clisp.org>
3263         localename, gettext: Avoid crash on macOS 14.
3264         Reported by Shupeng Xue <dspxue@gmail.com> at
3265         <https://lists.gnu.org/archive/html/bug-gettext/2023-10/msg00001.html>.
3266         Cf <https://github.com/aria2/aria2/issues/2083#issuecomment-1694662007>.
3267         * m4/intlmacosx.m4 (gt_INTL_MACOSX): Link with the CoreServices
3268         framework in addition to the CoreFoundation framework.
3270 2023-10-02  Bruno Haible  <bruno@clisp.org>
3272         localcharset: Avoid internal compiler error with -Wextra on macOS 10.5.
3273         * lib/localcharset.c (locale_charset): Use an empty compound statement
3274         instead of a null statement.
3276 2023-10-02  KO Myung-Hun  <komh78@gmail.com>
3278         fchdir: Fix a compilation error on OS/2 kLIBC (regression 2023-09-29).
3279         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Define REPLACE_FCHDIR macro to 1 if
3280         REPLACE_FCHDIR is 1.
3282 2023-10-02  Bruno Haible  <bruno@clisp.org>
3284         totalorder, totalorderf, totalorderl: Fix some typos.
3285         * m4/totalorder.m4 (gl_FUNC_TOTALORDERF): Assign TOTALORDERF_LIBM, not
3286         TOTALORDER_LIBM.
3287         * modules/totalorder (Description): Fix copy&paste mistake.
3288         (Depends-on): Fix conditions.
3289         * modules/totalorderf (Depends-on): Likewise.
3290         * modules/totalorderl (Depends-on): Likewise.
3292 2023-10-01  Paul Eggert  <eggert@cs.ucla.edu>
3294         totalorder, totalorderf, totalorderl: new modules
3295         * lib/math.in.h: Declare totalorderf, totalorder, totalorderl.
3296         * lib/totalorder.c, lib/totalorderf.c, lib/totalorderl.c:
3297         * m4/totalorder.m4, modules/totalorder, modules/totalorder-tests:
3298         * modules/totalorderf, modules/totalorderf-tests:
3299         * modules/totalorderl, modules/totalorderl-tests:
3300         * tests/test-totalorder.c, tests/test-totalorderf.c:
3301         * tests/test-totalorderl.c: New files.
3302         * m4/math_h.m4 (gl_MATH_H, gl_MATH_H_REQUIRE_DEFAULTS)
3303         (gl_MATH_H_DEFAULTS):
3304         * modules/math (math.h): Set up totalorder, totalorderf, totalorderl.
3305         * m4/mathfunc.m4 (gl_MATHFUNC): Also support pointer-to-const.
3307 2023-09-30  Paul Eggert  <eggert@cs.ucla.edu>
3309         regex-quote: fix recently-introduced typo
3310         Problem reported by Bruno Haible in:
3311         https://lists.gnu.org/r/bug-gnulib/2023-09/msg00146.html
3312         * lib/regex-quote.c (regex_quote_copy): Add missing #endif.
3314 2023-09-30  Bruno Haible  <bruno@clisp.org>
3316         wgetcwd-lgpl: Add tests.
3317         * tests/test-wgetcwd-lgpl.c: New file, based on
3318         tests/test-getcwd-lgpl.c.
3319         * modules/wgetcwd-lgpl-tests: New file, based on
3320         modules/getcwd-lgpl-tests.
3322         wgetcwd-lgpl: New module.
3323         * lib/wchar.in.h (wgetcwd): New declaration.
3324         * lib/wgetcwd-lgpl.c: New file, based on lib/getcwd-lgpl.c.
3325         * m4/wchar_h.m4 (gl_WCHAR_H_REQUIRE_DEFAULTS): Initialize
3326         GNULIB_WGETCWD.
3327         * modules/wchar (Makefile.am): Substitute GNULIB_WGETCWD.
3328         * modules/wgetcwd-lgpl: New file.
3330 2023-09-30  Bruno Haible  <bruno@clisp.org>
3332         getcwd-lgpl: Tweaks.
3333         * lib/unistd.in.h (getcwd): Mention the module 'getcwd-lgpl'.
3334         * lib/getcwd-lgpl.c (rpl_getcwd): Minimize scope of local variables.
3335         * tests/test-getcwd-lgpl.c (main): Use GNU coding style.
3337 2023-09-29  Bruno Haible  <bruno@clisp.org>
3339         Allow different --libtool options from multiple gnulib-tool invocations.
3340         * modules/crypto/gc (Makefile.am): Don't test GL_COND_LIBTOOL, since
3341         gnulib-tool already eliminates lib_LDFLAGS augmentations for non-libtool
3342         libraries.
3343         * modules/striconv (Makefile.am): Likewise.
3344         * modules/striconveh (Makefile.am): Likewise.
3345         * modules/termcap (Makefile.am): Likewise.
3346         * modules/terminfo (Makefile.am): Likewise.
3348 2023-09-29  KO Myung-Hun  <komh78@gmail.com>
3350         stdlib: Cast putenv() on OS/2 kLIBC
3351         * lib/stdlib.in.h (putenv) [kLIBC]: Cast with _GL_CXXALIAS_SYS_CAST().
3353 2023-09-29  Bruno Haible  <bruno@clisp.org>
3355         fchdir: Override properly on OS/2 kLIBC.
3356         * lib/unistd.in.h (fchdir): Override if REPLACE_FCHDIR is 1.
3357         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize REPLACE_FCHDIR.
3358         * modules/unistd (Makefile.am): Substitute REPLACE_FCHDIR.
3359         * modules/fchdir (Depends-on, configure.ac): Test REPLACE_FCHDIR.
3360         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Instead of setting HAVE_FCHDIR to 0,
3361         set REPLACE_FCHDIR to 1.
3363 2023-09-29  KO Myung-Hun  <komh78@gmail.com>
3365         fdopendir: Use Windows code path on OS/2 kLIBC
3366         * lib/closedir.c (closedir): Use Windows code path.
3367         * lib/dirent.in.h (_gl_register_dirp_fd, _gl_unregister_dirp_fd):
3368         Remove.
3369         * lib/dirfd.c (_gl_register_dirp_fd, _gl_unregister_dirp_fd): Remove.
3370         (dirfd): Use Windows code path.
3371         * lib/fdopendir.c (fdopendir): Use Windows code path.
3372         * lib/opendir.c (opendir): Use Windows code path.
3373         * m4/closedir.m4 (REPLACE_CLOSEDIR): Use Windows code path.
3374         * m4/dirent_h.m4 (DIR_HAS_FD_MEMBER): Use Windows code path.
3375         * m4/dirfd.m4 (REPLACE_DIRFD): Use Windows code path.
3376         * m4/fchdir.m4 (HAVE_FCHDIR): Replace fchdir() if dirfd() does not work.
3377         * m4/opendir.m4 (REPLACE_OPENDIR): Use Windows code path.
3378         * m4/readdir.m4 (REPLACE_READDIR): Use Windows code path.
3379         * m4/rewinddir.m4 (REPLACE_REWINDDIR): Use Windows code path.
3380         * modules/fchdir (Depends-on): Include dirent always.
3382 2023-09-26  Paul Eggert  <eggert@cs.ucla.edu>
3384         mcel-bench-tests: fix typo
3385         * tests/bench-mcel.c (main): Fix typo in usage message.
3387         Remaining support for GNULIB_MCEL_PREFER
3388         Support mcel API in remaining modules where this might matter,
3389         for apps that prefer it.
3390         * lib/mbmemcasecmp.c, lib/mbscspn.c, lib/mbsncasecmp.c, lib/mbsnlen.c:
3391         * lib/mbspbrk.c, lib/mbspcasecmp.c, lib/mbssep.c, lib/mbsspn.c:
3392         * lib/regex-quote.c:
3393         Include mcel.h instead of mbiterf.h or mbuiterf.h,
3394         if GNULIB_MCEL_PREFER.
3395         * lib/mbmemcasecmp.c (mbmemcasecmp), lib/mbscspn.c (mbscspn):
3396         * lib/mbsncasecmp.c (mbsncasecmp), lib/mbsnlen.c (mbsnlen):
3397         * lib/mbspbrk.c (mbspbrk), lib/mbspcasecmp.c (mbspcasecmp):
3398         * lib/mbssep.c (mbssep), lib/mbsspn.c (mbsspn):
3399         * lib/regex-quote.c (regex_quote_length, regex_quote_copy):
3400         Use mcel API, if GNULIB_MCEL_PREFER.
3401         * lib/mbscspn.c, lib/mbspbrk.c, lib/mbspcasecmp.c, lib/mbsspn.c:
3402         Include stdlib.h, for MB_CUR_MAX.
3403         * modules/mbmemcasecmp, modules/mbsncasecmp, modules/mbspcasecmp:
3404         Depend on c32tolower.
3405         * modules/regex-quote: Depend on mempcpy.
3407 2023-09-25  Paul Eggert  <eggert@cs.ucla.edu>
3409         mbscasestr: support GNULIB_MCEL_PREFER
3410         Support mcel API for apps that prefer it.
3411         This mirrors the recent changes to mbsstr.
3412         * lib/mbscasestr.c [GNULIB_MCEL_PREFER]: Include mcel.h not mbuiter.h.
3413         (mbchar_t, mb_equal) [GNULIB_MCEL_PREFER]: New type and function,
3414         to make it easier to use common code.
3415         (knuth_morris_pratt_multibyte): Don't assume mbchar_t's alignment
3416         is at least that of size_t.
3417         (knuth_morris_pratt_multibyte, mbscasestr) [GNULIB_MCEL_PREFER]:
3418         Use mcel API.
3419         * modules/mbscasestr (Depends-on): Add alignasof.
3421 2023-09-24  Bernhard Voelker  <mail@bernhard-voelker.de>
3423         maintainer-makefile: Fix syntax-check rules wrt README.
3424         * top/maint.mk (sc_readme_link_install): Change the value of the
3425         variable in_vc_files to contain a pattern for the README file.
3426         (sc_readme_link_copying): Likewise.
3427         Previously, the above rules always passed, because the generated
3428         list of files was empty.  Bug introduced when adding the rules
3429         in commit 53b4bf3018.
3431 2023-09-22  Bruno Haible  <bruno@clisp.org>
3433         striconveh, *vasnprintf, vasnwprintf: Make more virtual-memory friendly.
3434         * lib/striconveh.c (mem_cd_iconveh_internal): Mark hex as 'const'.
3435         * lib/vasnprintf.c (wctomb_fallback): Likewise.
3437 2023-09-21  Paul Eggert  <eggert@cs.ucla.edu>
3439         mbschr, mbsrchr: support GNULIB_MCEL_PREFER
3440         Support mcel API for apps that prefer it.
3441         The following changes are in effect only if GNULIB_MCEL_PREFER.
3442         * lib/mbschr.c, lib/mbsrchr.c: Include stdlib.h, for MB_CUR_MAX.
3443         [GNULIB_MCEL_PREFER]: Include mcel.h instead of mbuiterf.h.
3444         (mbschr, mbsrchr) [GNULIB_MCEL_PREFER]: Use mcel API.
3446         gnulib-common: don’t suppress -Wpedantic
3447         Problem reported by Pádraig Brady in:
3448         https://lists.gnu.org/r/bug-gnulib/2023-09/msg00130.html
3449         * m4/gnulib-common.m4 (_GL_HAVE___HAS_C_ATTRIBUTE): New macro.
3450         Use it instead of ‘defined __has_c_attribute’.
3452         crypto/sm3: rename gl_cv_* variable for clarity
3453         * m4/gc-sm3.m4 (gl_cv_libgcrypt_md_sm3):
3454         Rename from gl_cv_libcrypt_md_sm3 since this is unrelated to libcrypt.
3456 2023-09-17  Paul Eggert  <eggert@cs.ucla.edu>
3458         intprops: pacify GCC -Wtype-limits
3459         * lib/intprops-internal.h: Pacify gcc (GCC) 13.2.1 20230728 (Red
3460         Hat 13.2.1-1) x86-64 -Wtype-limits on bleeding-edge diffutils.
3462 2023-09-16  Bruno Haible  <bruno@clisp.org>
3464         lib-symbol-visibility: Fix a misnomer.
3465         * doc/lib-symbol-visibility.texi: Rename LIBFOO_DLL_EXPORTED to
3466         LIBFOO_SHLIB_EXPORTED. Prefer the term "shared library", since the term
3467         "DLL" applies only to Windows.
3468         * lib/relocatable.h (RELOCATABLE_SHLIB_EXPORTED): Renamed from
3469         RELOCATABLE_DLL_EXPORTED. Prefer the term "shared library", since the
3470         term "DLL" applies only to Windows.
3471         * lib/mbtowc-lock.c (SHLIB_EXPORTED): Renamed from DLL_EXPORTED.
3472         * lib/nl_langinfo-lock.c (SHLIB_EXPORTED): Likewise.
3473         * lib/setlocale-lock.c (SHLIB_EXPORTED): Likewise.
3475 2023-09-15  Bruno Haible  <bruno@clisp.org>
3477         acl-permissions: Fix compilation error on Solaris 11 (regr. 2023-09-04).
3478         * lib/set-permissions.c: Include minmax.h.
3479         * modules/acl-permissions (Depends-on): Add minmax.
3481 2023-09-15  Bruno Haible  <bruno@clisp.org>
3483         readutmp: Fix crash when gdm is in use.
3484         Reported by Thorsten Kukuk <kukuk@suse.com> in
3485         <https://lists.gnu.org/archive/html/bug-gnulib/2023-09/msg00093.html>.
3486         * lib/readutmp.c (read_utmp_from_systemd): Don't use the value returned
3487         by sd_session_get_display if it is NULL.
3489 2023-09-14  Bruno Haible  <bruno@clisp.org>
3491         doc: Mention libucontext.
3492         * doc/pastposix-functions/getcontext.texi: Mention libucontext.
3493         * doc/pastposix-functions/makecontext.texi: Likewise.
3494         * doc/pastposix-functions/setcontext.texi: Likewise.
3495         * doc/pastposix-functions/swapcontext.texi: Likewise.
3497 2023-09-13  Bruno Haible  <bruno@clisp.org>
3499         mbfile: Add tests.
3500         * tests/test-mbfile.sh: New file.
3501         * tests/test-mbfile.c: New file.
3502         * modules/mbfile-tests: New file.
3504         mbfile: Fix major bug (regression 2023-07-04).
3505         Reported by Gleb Fotengauer-Malinovskiy <glebfm@altlinux.org> in
3506         <https://lists.gnu.org/archive/html/bug-gnulib/2023-09/msg00088.html>.
3507         * lib/mbfile.h (mbfile_multi_getc): If bytes != -1, -2, -3, add the
3508         previous mbf->bufcount to bytes.
3510 2023-09-11  Pádraig Brady  <P@draigBrady.com>
3512         gnu-web-doc-update: fix updating of manual directory
3513         * build-aux/gnu-web-doc-update: Change to the 'manual' directory,
3514         since $tmp is a relative path.  This avoids removing files
3515         outside of the 'manual' directory.
3517 2023-09-10  Bruno Haible  <bruno@clisp.org>
3519         Fix clang errors "different exception specifier" (regr. 2023-09-04).
3520         * lib/malloc.in.h (memalign): Don't use _GL_ATTRIBUTE_NOTHROW on
3521         platforms other than glibc systems.
3522         * lib/stdio.in.h (fdopen): Likewise.
3523         * lib/stdlib.in.h (aligned_alloc, calloc, canonicalize_file_name,
3524         malloc, realloc): Likewise.
3525         * lib/string.in.h (strdup, strndup): Likewise.
3526         * lib/sys_stat.in.h (getumask): Likewise.
3527         * lib/wchar.in.h (wcsdup): Likewise.
3529 2023-09-09  Paul Eggert  <eggert@cs.ucla.edu>
3531         propername: support GNULIB_MCEL_PREFER
3532         Support mcel API for apps that prefer it.
3533         The following changes are in effect only if GNULIB_MCEL_PREFER.
3534         * lib/propername.c: Include mcel.h, not mbchar.h and mbuiter.h.
3535         (mbsstr_trimmed_wordbounded): Use mcel API.
3536         * modules/propername (Depends-on): Add c32isalnum.
3538         trim: support GNULIB_MCEL_PREFER
3539         Support mcel API for apps that prefer it.
3540         The following changes are in effect only if GNULIB_MCEL_PREFER.
3541         * lib/trim.c: Include mcel.h, not mbchar.h and mbuiterf.h.
3542         (trim2): Use mcel API.
3543         * modules/trim (Depends-on): Add c32isspace.
3545         mbsstr: support GNULIB_MCEL_PREFER
3546         Support mcel API for apps that prefer it.
3547         * lib/mbsstr.c [GNULIB_MCEL_PREFER]: Include mcel.h not mbuiter.h.
3548         (mbchar_t, mb_equal) [GNULIB_MCEL_PREFER]: New type and function,
3549         to make it easier to use common code.
3550         (knuth_morris_pratt_multibyte): Don't assume mbchar_t's alignment
3551         is at least that of size_t.
3552         (knuth_morris_pratt_multibyte, mbsstr) [GNULIB_MCEL_PREFER]:
3553         Use mcel API.
3554         * modules/mbsstr (Depends-on): Add alignasof.
3556         mbslen: support GNULIB_MCEL_PREFER
3557         Support mcel API for apps that prefer it.
3558         The following changes are in effect only if GNULIB_MCEL_PREFER.
3559         * lib/mbslen.c: Include mcel.h instead of mbuiterf.h.
3560         (mbslen): Use mcel API.
3562         chown: work around symlink issues on odd platforms
3563         Problem reported by Jordi Sanfeliu in:
3564         https://lists.gnu.org/archive/html/bug-gnulib/2023-07/msg00116.html
3565         * lib/chown.c (rpl_chown) [CHOWN_MODIFIES_SYMLINK]:
3566         Do not declare unused locals st, stat_valid.
3567         Redo to just call chown if arg is a symlink.
3568         This induces a race but is perhaps the best we can do easily
3569         on oddball platforms where chown does not follow symlinks.
3571 2023-09-09  Bruno Haible  <bruno@clisp.org>
3573         chown, lchown: Revisit platforms.
3574         * doc/posix-functions/chown.texi: Update platforms list.
3575         * doc/posix-functions/lchown.texi: Likewise.
3576         * lib/chown.c (rpl_chown): Add platform comments.
3577         * lib/lchown.c: Likewise.
3579 2023-09-07  Paul Eggert  <eggert@cs.ucla.edu>
3581         mbscasecmp: support GNULIB_MCEL_PREFER
3582         * lib/mbscasecmp.c: Include stdlib.h, since we use MB_CUR_MAX.
3583         Include uchar.h, for c32tolower.
3584         (GNULIB_MCEL_PREFER): Include mcel.h instead of mbuiterf.h.
3585         (mbscasecmp) [GNULIB_MCEL_PREFER]: Use mcel instead of mbuiterf.
3586         * modules/mbscasecmp (Depends-on): Add c32tolower, stdlib, uchar.
3587         Depend on mbuiterf only if not preferring mcel.
3589         exclude: support GNULIB_MCEL_PREFER
3590         Support mcel API for apps that prefer it.
3591         The following changes are in effect only if GNULIB_MCEL_PREFER.
3592         * lib/exclude.c: Include mcel.h instead of mbuiter.h.
3593         (string_hasher_ci): Use mcel_scanz instead of mbui_init,
3594         mbui_avail, mbui_cur, and mbui_advance.
3595         * modules/exclude: Do not depend on mbuiter.
3597         mcel-prefer: new module
3598         * modules/mcel-prefer: New file.
3600         mcel-bench-tests: new module
3601         * modules/mcel-bench-tests, tests/bench-mcel.c: New files.
3602         * tests/bench-multibyte.h (TEXT_LATIN_ASCII_LINE1)
3603         (TEXT_FRENCH_UTF8_LINE1, TEXT_GREEK_UTF8_LINE1)
3604         (TEXT_CHINESE_UTF8_LINE1): New macros.
3605         (text_random_bytes): New constant.
3606         * tests/bench.h (timing_output): Mark with _GL_UNUSED,
3607         since bench-mcel.c does not use it.
3609         mcel-tests: new module
3610         * modules/mcel-tests, tests/test-mcel.c: New files
3612         mcel: new module
3613         * lib/mcel.c, lib/mcel.h, modules/mcel: New files.
3615 2023-09-07  Bruno Haible  <bruno@clisp.org>
3617         Don't use 'throw ()' in C++ 11 or newer.
3618         * lib/stddef.in.h (_GL_ATTRIBUTE_NOTHROW):  Provide fallback definition.
3619         (abort): Declare with _GL_ATTRIBUTE_NOTHROW instead of throw().
3620         * lib/malloc.in.h (rpl_free, free): Likewise.
3621         * lib/stdlib.in.h (free): Likewise.
3622         * lib/string.in.h (rpl_free, free, memchr, memrchr, rawmemchr,
3623         strchrnul, strpbrk, strstr, strcasestr): Likewise.
3624         * lib/wchar.in.h (rpl_free, free): Likewise.
3625         * lib/getopt-cdefs.in.h (__THROW): Define to noexcept(true) for C++ 11
3626         or newer.
3627         * lib/md5.h (__THROW): Likewise.
3629 2023-09-07  Bruno Haible  <bruno@clisp.org>
3631         Add info about recommended warning options with clang.
3632         * HACKING (Warning Options): Add info regarding clang.
3634 2023-09-07  Bruno Haible  <bruno@clisp.org>
3636         uchar: Fix references to overridden functions with GNULIB_NAMESPACE.
3637         * lib/uchar.in.h (btoc32, c32isalnum, c32isalpha, c32isblank,
3638         c32iscntrl, c32isdigit, c32isgraph, c32islower, c32isprint, c32ispunct,
3639         c32isspace, c32isupper, c32isxdigit, c32tolower, c32toupper, c32width,
3640         c32snrtombs, c32srtombs, c32swidth, c32tob, mbsnrtoc32s, mbsrtoc32s,
3641         c32_get_type_test, c32_apply_type_test, c32_get_mapping,
3642         c32_apply_mapping): Use GNULIB_NAMESPACE:: prefix to refer to the gnulib
3643         overridden function.
3644         * modules/uchar (Depends-on): Add wctype-h.
3645         (Makefile.am): Substitute GNULIB_BTOWC, GNULIB_ISWDIGIT,
3646         GNULIB_ISWXDIGIT, GNULIB_WCWIDTH, GNULIB_WCSNRTOMBS, GNULIB_WCSRTOMBS,
3647         GNULIB_WCSWIDTH, GNULIB_WCTOB, GNULIB_MBSNRTOWCS, GNULIB_MBSRTOWCS,
3648         GNULIB_WCTYPE, GNULIB_ISWCTYPE, GNULIB_WCTRANS, GNULIB_TOWCTRANS.
3650 2023-09-07  Bruno Haible  <bruno@clisp.org>
3652         tests: Fix some clang -Wimplicit-fallthrough warnings.
3653         * tests/test-execute-main.c (main): Add 'break' statement.
3654         * tests/test-sys_file.c (main): Likewise.
3656         unictype/category-none: Fix clang -Wpedantic warning.
3657         * lib/unictype/categ_none.c (_UC_CATEGORY_NONE): Use ISO C designated
3658         initializer syntax to initialize the intended field of the union.
3660         c-*snprintf: Fix some clang -Wmissing-prototypes warnings.
3661         * lib/c-snprintf.c: Include c-snprintf.h instead of <stdio.h>.
3662         * lib/c-vsnprintf.c: Include c-vsnprintf.h instead of <stdio.h>.
3663         * lib/c-vasnprintf.c: Include c-vasnprintf.h.
3665 2023-09-06  Bruno Haible  <bruno@clisp.org>
3667         argp: Fix clang -Wextra-semi-stmt warning.
3668         * lib/argp-help.c (SKIPWS): Remove trailing semicolon.
3670 2023-09-06  Bruno Haible  <bruno@clisp.org>
3672         doc: Refine documentation of MSVC support for shared libraries.
3673         * doc/lib-symbol-visibility.texi (Exported Symbols of Shared Libraries):
3674         Recommend to define BUILDING_SHARED as an Autoconf variable. Recommend
3675         to test DLL_EXPORT.
3677 2023-09-06  Bruno Haible  <bruno@clisp.org>
3679         doc: Fix syntax error (regression 2023-09-03).
3680         * doc/posix-headers/sys_stat.texi: Correct @itemize / @end itemize
3681         nesting.
3683 2023-09-05  Bruno Haible  <bruno@clisp.org>
3685         relocatable-lib-lgpl: Don't export symbols from static MSVC .obj files.
3686         Reported by Dmitry Bely <dmitry.bely@gmail.com> in
3687         <https://lists.gnu.org/archive/html/bug-gnu-libiconv/2023-08/msg00002.html>.
3688         * lib/relocatable.h (RELOCATABLE_DLL_EXPORTED): Don't use
3689         __declspec(dllexport) when creating static .obj files with MSVC.
3691 2023-09-05  Bruno Haible  <bruno@clisp.org>
3693         unigbrk/u8-grapheme-{next,prev} tests: Fix gcc -Wformat warnings.
3694         * tests/unigbrk/test-u8-grapheme-next.c (test_u8_grapheme_next): Use
3695         %tu, not %zu, to print a pointer difference.
3696         * tests/unigbrk/test-u16-grapheme-next.c (test_u16_grapheme_next):
3697         Likewise.
3698         * tests/unigbrk/test-u32-grapheme-next.c (test_u32_grapheme_next):
3699         Likewise.
3700         * tests/unigbrk/test-u8-grapheme-prev.c (test_u8_grapheme_prev):
3701         Likewise.
3702         * tests/unigbrk/test-u16-grapheme-prev.c (test_u16_grapheme_prev):
3703         Likewise.
3704         * tests/unigbrk/test-u32-grapheme-prev.c (test_u32_grapheme_prev):
3705         Likewise.
3707 2023-09-05  Bruno Haible  <bruno@clisp.org>
3709         stdint, *printf: Update doc about MSVC.
3710         * doc/posix-headers/stdint.texi: MSVC 14 has <stdint.h>.
3711         * doc/posix-functions/*printf.texi: Current mingw and MSVC 14 support
3712         the j, t, z size specifiers.
3713         * doc/glibc-functions/obstack_*printf.texi: Likewise.
3715 2023-09-05  Bruno Haible  <bruno@clisp.org>
3717         tests: Ensure stderr output is displayed before abort().
3718         * tests/atomic-int-gnulib.h (init_atomic_int): Call fflush(stderr)
3719         before abort().
3720         * tests/atomic-int-isoc.h (init_atomic_int): Likewise.
3721         * tests/atomic-int-posix.h (init_atomic_int): Likewise.
3722         * tests/unigbrk/test-u8-grapheme-breaks.c (test_u8_grapheme_breaks):
3723         Likewise.
3724         * tests/unigbrk/test-u16-grapheme-breaks.c (test_u16_grapheme_breaks):
3725         Likewise.
3726         * tests/unigbrk/test-u32-grapheme-breaks.c (test_u32_grapheme_breaks):
3727         Likewise.
3728         * tests/unigbrk/test-uc-grapheme-breaks.c (test_uc_grapheme_breaks):
3729         Likewise.
3730         * tests/unigbrk/test-ulc-grapheme-breaks.c (main): Likewise.
3731         * tests/unigbrk/test-u8-grapheme-next.c (test_u8_grapheme_next):
3732         Likewise.
3733         * tests/unigbrk/test-u16-grapheme-next.c (test_u16_grapheme_next):
3734         Likewise.
3735         * tests/unigbrk/test-u32-grapheme-next.c (test_u32_grapheme_next):
3736         Likewise.
3737         * tests/unigbrk/test-u8-grapheme-prev.c (test_u8_grapheme_prev):
3738         Likewise.
3739         * tests/unigbrk/test-u16-grapheme-prev.c (test_u16_grapheme_prev):
3740         Likewise.
3741         * tests/unigbrk/test-u32-grapheme-prev.c (test_u32_grapheme_prev):
3742         Likewise.
3744 2023-09-05  Bruno Haible  <bruno@clisp.org>
3746         threads-h: Modernize configure test.
3747         * m4/threads_h.m4 (gl_THREADS_H): In the test program, put the
3748         '_Thread_local' storage class specifier before the type.
3750 2023-09-05  Bruno Haible  <bruno@clisp.org>
3752         Add info about recommended warning options.
3753         * HACKING: New section "Warning Options".
3755 2023-09-04  Bruno Haible  <bruno@clisp.org>
3757         string-buffer tests: Fix a compilation error (regression from today).
3758         * tests/test-string-buffer.c: Include <wchar.h>.
3760         unistr/u{8,16,32}-strtok tests: Fix -Wanalyzer-allocation-size warnings.
3761         * tests/unistr/test-u-strtok.h (test_u_strtok): Correct values of
3762         input_len and delim_len.
3764         sigpipe tests: Fix -Wanalyzer-unsafe-call-within-signal-handler warning.
3765         * tests/test-sigpipe.c (handler): Invoke _exit, not exit.
3766         * tests/test-raise.c (handler): Update comments after 2020-11-25 change.
3768         argp: Distinguish NULL and '\0' from 0.
3769         * lib/argp-pin.c: Include <stddef.h>.
3770         (program_invocation_short_name, program_invocation_name): Use NULL
3771         instead of 0.
3772         * lib/argp-parse.c (convert_options, __argp_parse, __argp_input):
3773         Likewise.
3774         * lib/argp-fmtstream.c (__argp_make_fmtstream): Likewise.
3775         * lib/argp-help.c (make_hol, hol_entry_first_long, hol_find_entry,
3776         hol_append, hol_entry_help, argp_doc, _help): Likewise.
3777         (hol_usage): Use '\0' instead of 0.
3779         argp: Fix gcc -Wanalyzer-use-of-uninitialized-value warning.
3780         * lib/argp-help.c (hol_find_entry): Access hol->entries only after
3781         having verified that hol->num_entries > 0.
3783         unictype/category-byname tests: Fix gcc -Wunused-value warning.
3784         * tests/unictype/test-categ_byname.c (main): Add some tests for category
3785         Nl.
3787         unigbrk/uc-grapheme-breaks tests: Fix gcc -Wunused-function warning.
3788         * tests/unigbrk/test-uc-grapheme-breaks.c
3789         (graphemebreakproperty_to_string): Mark as possibly unused.
3791         bitset, nonblocking-* tests: Fix gcc -Wunused-but-set-variable warnings.
3792         * tests/test-bitset.c (check_zero): Mark 'i' as possibly unused.
3793         * tests/test-nonblocking-reader.h (full_read): Mark 'spent_time' as
3794         possibly unused.
3796 2023-09-04  Bruno Haible  <bruno@clisp.org>
3798         Use statement-expressions without warnings, even in strict ISO C mode.
3799         Suggested by Eric Blake <eblake@redhat.com> in
3800         <https://lists.gnu.org/archive/html/bug-gnulib/2023-09/msg00025.html>.
3801         * lib/error.in.h (__gl_error_call): Use the variant with obvious control
3802         flow also with clang. Use '__extension__' to avoid -Wpedantic warnings.
3803         * lib/math.in.h (gl_signbitf, gl_signbitd, gl_signbitl): Define as
3804         macros even when __STRICT_ANSI__ is defined. But use '__extension__' to
3805         avoid -Wpedantic warnings.
3806         * lib/setenv.c (KNOWN_VALUE): Use '__extension__' to avoid -Wpedantic
3807         warnings.
3808         * lib/xalloc-oversized.h (xalloc_oversized): Use optimized variant even
3809         when __STRICT_ANSI__ is defined. But use '__extension__' to avoid
3810         -Wpedantic warnings.
3812 2023-09-04  Bruno Haible  <bruno@clisp.org>
3814         Fix some g++ warnings "has a different exception specifier".
3815         * m4/gnulib-common.m4 (gl_COMMON_BODY): Make _GL_ATTRIBUTE_NOTHROW
3816         effective in C++ mode.
3817         * lib/attribute.h (ATTRIBUTE_NOTHROW): Add a comment.
3818         * lib/malloc.in.h (_GL_ATTRIBUTE_NOTHROW): Provide fallback definition.
3819         (memalign): Invoke _GL_FUNCDECL_SYS with _GL_ATTRIBUTE_NOTHROW.
3820         * lib/stdio.in.h (_GL_ATTRIBUTE_NOTHROW): Provide fallback definition.
3821         (fdopen): Invoke _GL_FUNCDECL_SYS with _GL_ATTRIBUTE_NOTHROW.
3822         * lib/stdlib.in.h (_GL_ATTRIBUTE_NOTHROW): Provide fallback definition.
3823         (aligned_alloc, calloc, canonicalize_file_name, malloc, realloc): Invoke
3824         _GL_FUNCDECL_SYS with _GL_ATTRIBUTE_NOTHROW.
3825         * lib/string.in.h (_GL_ATTRIBUTE_NOTHROW): Provide fallback definition.
3826         (strdup, strndup): Invoke _GL_FUNCDECL_SYS with _GL_ATTRIBUTE_NOTHROW.
3827         * lib/sys_stat.in.h (_GL_ATTRIBUTE_NOTHROW): Provide fallback
3828         definition.
3829         (getumask): Invoke _GL_FUNCDECL_SYS with _GL_ATTRIBUTE_NOTHROW.
3830         * lib/wchar.in.h (_GL_ATTRIBUTE_NOTHROW): Provide fallback definition.
3831         (wcsdup): Invoke _GL_FUNCDECL_SYS with _GL_ATTRIBUTE_NOTHROW.
3833 2023-09-04  Bruno Haible  <bruno@clisp.org>
3835         unistr/u{8,16,32}-strchr tests: Fix some gcc -Wshadow warnings.
3836         * tests/unistr/test-strchr.h (test_strchr): Reduce of scope of local
3837         variable 'i'.
3839         unistr/u{8,16,32}-chr tests: Fix some gcc -Wshadow warnings.
3840         * tests/unistr/test-chr.h (main): Reduce of scope of local variables
3841         'i' and 'page_boundary'.
3843         pipe-filter-gi, pipe-filter-ii tests: Fix some gcc -Wshadow warnings.
3844         * tests/test-pipe-filter-gi1.c (main): Rename local variable 'argv' to
3845         'tr_argv'.
3846         * tests/test-pipe-filter-ii1.c (main): Likewise.
3848         argv-iter tests: Avoid gcc -Wanalyzer-out-of-bounds warning.
3849         * tests/test-argv-iter.c (main): Simplify logic.
3851         crypto/{gc-rijndael,rijndael} tests: Fix some gcc -Wshadow warnings.
3852         * tests/test-gc-rijndael.c (main): Rename local variable 'i' to 'round'.
3853         * tests/test-rijndael.c (main): Likewise.
3855         threads-h tests: Fix gcc -Wold-style-declaration warning.
3856         * tests/test-thread_local.c (value0, value1, value2, value3): Put the
3857         'thread_local' storage class specifier before the type.
3859         ieee754-h tests: Fix some gcc -Wmissing-field-initializers warnings.
3860         * tests/test-ieee754-h.c (float_tests): Use float literals.
3861         (double_tests): Use double literals. Initialize frac_lo.
3863         string-buffer tests: Fix a gcc -Wformat warning.
3864         * tests/test-string-buffer.c: Don't assume that wint_t has the same size
3865         as 'int'.
3867         crypto/* tests: Fix some gcc -Wdiscarded-qualifiers warnings.
3868         * tests/test-gc-hmac-md5.c (main): Change type of variables with a
3869         string literal initializer to 'const char *'.
3870         * tests/test-gc-hmac-sha1.c (main): Likewise.
3871         * tests/test-gc-hmac-sha256.c (main): Likewise.
3872         * tests/test-gc-hmac-sha512.c (main): Likewise.
3873         * tests/test-gc-md2.c (main): Likewise.
3874         * tests/test-gc-md5.c (main): Likewise.
3875         * tests/test-gc-sha1.c (main): Likewise.
3876         * tests/test-gc-sha256.c (main): Likewise.
3877         * tests/test-gc-sha512.c (main): Likewise.
3878         * tests/test-hmac-md5.c (main): Likewise.
3879         * tests/test-hmac-sha1.c (main): Likewise.
3880         * tests/test-hmac-sha256.c (main): Likewise.
3881         * tests/test-hmac-sha512.c (main): Likewise.
3883         file-has-acl: Avoid gcc warning.
3884         * lib/acl-internal.h (MIN): Remove definition.
3886 2023-09-03  Paul Eggert  <eggert@cs.ucla.edu>
3888         same-inode, stat-size: support pointers too
3889         Add functions and macros so that we can test pointers to struct
3890         stat as well as plain struct stat.  This lets coreutils deal with
3891         structs that are only partly initialized, without relying on
3892         undefined behavior.
3893         * NEWS: Mention this.
3894         * doc/posix-headers/sys_stat.texi, doc/stat-size.texi:
3895         Mention this and modernize.
3896         * lib/at-func2.c (at_func2):
3897         * lib/fts.c (same_fd):
3898         * lib/rename.c (rpl_rename) [RENAME_HARD_LINK_BUG]:
3899         * lib/same-inode.c: New file.
3900         * lib/same.c (same_nameat):
3901         * lib/term-style-control.c (activate_term_style_controller):
3902         Prefer psame_inode (a, b) to SAME_INODE (*a, *b).
3903         * lib/hash-triple-simple.c (triple_compare_ino_str):
3904         * lib/hash-triple.c (triple_compare):
3905         Prefer PSAME_INODE (a, b) to SAME_INODE (*a, *b).
3906         psame_inode is not suitable since the args are not struct stat *.
3907         * lib/same-inode.h: Check that config.h is included first.
3908         (SAME_INODE_INLINE, PSAME_INODE): New macros.
3909         (SAME_INODE): Reimplement in terms of PSAME_INODE.
3910         (psame_inode): New function.
3911         * lib/stat-size.h (STP_BLKSIZE, STP_NBLOCKS): New macros.
3912         (ST_BLKSIZE, ST_NBLOCKS): Use them.
3913         * lib/term-style-control.c (log_signal_handler_called):
3914         Always define as a function, to pacify -Wunused*.
3915         * modules/canonicalize-lgpl-tests (Files): Add m4/musl.m4.
3916         (Depends-on): Call gl_MUSL_LIBC.
3917         * modules/same-inode (Files): Add same-inode.c.
3918         (Depends-on): Add extern-inline, stdbool.
3919         (lib_SOURCES): New macro.
3920         * tests/test-binary-io.c, tests/test-canonicalize-lgpl.c:
3921         * tests/test-canonicalize.c, tests/test-cloexec.c:
3922         * tests/test-dup-safer.c, tests/test-dup2.c, tests/test-error.c:
3923         * tests/test-fcntl.c, tests/test-fdopendir.c, tests/test-fgetc.c:
3924         * tests/test-fputc.c, tests/test-fread.c, tests/test-fstat.c:
3925         * tests/test-fstatat.c, tests/test-ftruncate.c:
3926         * tests/test-fwrite.c, tests/test-getcwd.c:
3927         * tests/test-getdtablesize.c, tests/test-isblank.c:
3928         * tests/test-linkat.c, tests/test-lock.c, tests/test-lstat.h:
3929         * tests/test-malloc-gnu.c, tests/test-openat.c:
3930         * tests/test-pthread-thread.c, tests/test-pthread_sigmask1.c:
3931         * tests/test-pthread_sigmask2.c, tests/test-ptsname.c:
3932         * tests/test-ptsname_r.c, tests/test-raise.c:
3933         * tests/test-realloc-gnu.c, tests/test-rwlock1.c:
3934         * tests/test-sigprocmask.c, tests/test-snprintf.c:
3935         * tests/test-stat.h, tests/test-term-style-control-hello.c:
3936         * tests/test-term-style-control-yes.c, tests/test-thread_create.c:
3937         * tests/test-unlinkat.c, tests/test-vasnprintf.c:
3938         * tests/test-xalloc-die.c:
3939         Adjust to these changes, and fix some warnings elicited by
3940         -Wall -Wextra that I ran into while testing.
3941         * top/maint.mk (sc_prohibit_stat_st_blocks): Mention STP_NBLOCKS.
3943 2023-09-02  Bruno Haible  <bruno@clisp.org>
3945         alignalloc: Fix license header.
3946         Suggested by Paul Eggert in
3947         <https://lists.gnu.org/archive/html/bug-gnulib/2023-08/msg00170.html>.
3948         * lib/alignalloc.h: Make license header consistent with module
3949         description.
3950         * lib/alignalloc.c: Likewise.
3952 2023-09-01  Bruno Haible  <bruno@clisp.org>
3954         crypto/{sha*,md5}-buffer: Add comment.
3955         * m4/gl-openssl.m4 (gl_CRYPTO_CHECK): Add comment regarding license.
3957 2023-09-01  Bruno Haible  <bruno@clisp.org>
3959         crypto/{sha*,md5,sm3}-buffer: Fix --with-openssl (regr. 2023-08-26).
3960         Reported by Agostino Sarubbo via Sam James <sam@gentoo.org> in
3961         <https://lists.gnu.org/archive/html/bug-gnulib/2023-09/msg00000.html>.
3962         * lib/sha1.h: Test the OpenSSL major version before attempting to
3963         include <openssl/configuration.h>.
3964         * lib/sha256.h: Likewise.
3965         * lib/sha512.h: Likewise.
3966         * lib/md5.h: Likewise.
3967         * lib/sm3.h: Likewise.
3969 2023-08-31  Bruno Haible  <bruno@clisp.org>
3971         readutmp: Fix memory leak introduced by last commit.
3972         * lib/readutmp.c (read_utmp_from_systemd): If num_sessions == 0 and
3973         sessions != NULL, do call free (sessions).
3975 2023-08-30  Paul Eggert  <eggert@cs.ucla.edu>
3977         readutmp: fix core dump if --enable-systemd
3978         Problem reported by Thorsten Kukuk <https://bugs.gnu.org/65617>.
3979         * lib/readutmp.c (read_utmp_from_systemd):
3980         Don’t assume session_ptr != NULL if num_sessions == 0.
3981         In practice it can be null, and the man page OKs this behavior.
3983 2023-08-30  Bruno Haible  <bruno@clisp.org>
3985         doc: Mention the module 'wchar-single'.
3986         * doc/multithread.texi: Mention the module 'wchar-single'.
3988 2023-08-30  Paul Eggert  <eggert@cs.ucla.edu>
3990         wchar-single: fix module broken since 2021
3991         Adjust to 2021-03-07 change “Rename GNULIB_WCHAR_SINGLE to
3992         GNULIB_WCHAR_SINGLE_LOCALE”.  Apparently nobody noticed that
3993         the module was broken.  Perhaps we should obsolete the module?
3994         * modules/wchar-single (GNULIB_WCHAR_SINGLE_LOCALE): Define.
3996 2023-08-29  Bruno Haible  <bruno@clisp.org>
3998         wctype: Rely on module iswpunct.
3999         * m4/wctype.m4 (gl_FUNC_WCTYPE): Also test whether the "punct" class
4000         works.
4001         * modules/wctype (Depends-on): Add iswpunct.
4002         * tests/test-iswctype.c (main): Add more tests of the "punct" class.
4003         * doc/posix-functions/wctype.texi: Mention the Android problem.
4005         c32ispunct: Rely on module iswpunct.
4006         * modules/c32ispunct (Depends-on): Add iswpunct.
4007         * tests/test-c32ispunct.c (main): Add a few more tests in the "C"
4008         locale.
4010         iswpunct: Add tests.
4011         * tests/test-iswpunct.c: New file, based on tests/test-iswdigit.c and
4012         tests/test-c32ispunct.c.
4013         * tests/test-iswpunct.sh: New file, based on tests/test-iswdigit.sh.
4014         * modules/iswpunct-tests: New file.
4016         iswpunct: New module.
4017         * lib/wctype.in.h (iswpunct): New declaration.
4018         * lib/iswpunct.c: New file.
4019         * m4/iswpunct.m4: New file.
4020         * m4/wctype_h.m4 (gl_WCTYPE_H_REQUIRE_DEFAULTS): Initialize
4021         GNULIB_ISWPUNCT.
4022         (gl_WCTYPE_H_DEFAULTS): Initialize REPLACE_ISWPUNCT.
4023         * modules/wctype-h (Makefile.am): Substitute GNULIB_ISWPUNCT,
4024         REPLACE_ISWPUNCT.
4025         * modules/iswpunct: New file.
4026         * doc/posix-functions/iswpunct.texi: Mention the new module.
4028         wctype-h tests: Add more tests.
4029         * tests/test-wctype-h.c (main): Add a sanity check of iswpunct.
4031 2023-08-29  Bruno Haible  <bruno@clisp.org>
4033         iswdigit, iswxdigit: Fix documentation.
4034         * doc/posix-functions/iswdigit.texi: Mention the module 'iswdigit'.
4035         * doc/posix-functions/iswxdigit.texi: Mention the module 'iswxdigit'.
4037 2023-08-29  Bruno Haible  <bruno@clisp.org>
4039         wctype: Fix documentation (mistake 2023-07-26).
4040         * doc/posix-functions/wctype.texi: The "blank" argument problem on mingw
4041         is now worked around by Gnulib.
4043 2023-08-26  Paul Eggert  <eggert@cs.ucla.edu>
4045         trim: do not over-allocate result
4046         * lib/trim.c: Include mbuiterf.h, not mbiterf.h, since we no
4047         longer compute strlen at first.
4048         (trim2): Do not over-allocate result and then trim the parts we
4049         don’t want.  Instead, skip unwanted input before allocating,
4050         so that the result is just the right size.  Use mempcpy
4051         instead of memmove.  Simplify.
4052         * modules/trim (Depends-on): Remove mbiterf, memmove, strdup, xalloc.
4053         Add mbuiterf, mempcpy, xalloc-die.
4055 2023-08-26  Paul Eggert  <eggert@cs.ucla.edu>
4057         propername: tune single-byte code
4058         * lib/propername.c (mbsstr_trimmed_wordbounded): Cache MB_CUR_MAX.
4059         Simplify word boundary detection in single-byte code.
4061 2023-08-26  Paul Eggert  <eggert@cs.ucla.edu>
4063         Tune single-byte code involving tolower
4064         * lib/mbmemcasecmp.c (mbmemcasecmp):
4065         * lib/mbscasecmp.c (mbscasecmp):
4066         * lib/mbscasestr.c (mbscasestr):
4067         * lib/mbsncasecmp.c (mbsncasecmp):
4068         * lib/mbspcasecmp.c (mbspcasecmp):
4069         Avoid some unnecessary calls to tolower.  For example, if the two
4070         single-byte characters are equal before downcasing there is no
4071         need to call tolower on either character.
4073 2023-08-26  Bruno Haible  <bruno@clisp.org>
4075         c32width tests: Avoid failure on FreeBSD 12.
4076         * tests/test-c32width.c (main): Skip two tests on FreeBSD < 13.
4078 2023-08-26  Bruno Haible  <bruno@clisp.org>
4080         crypto/{sha*,md5,sm3}-buffer: Ignore too old OpenSSL versions.
4081         * lib/sha1.h: If <openssl/macros.h> would give a compile-time error,
4082         undefine HAVE_OPENSSL_SHA1.
4083         * lib/sha256.h: If <openssl/macros.h> would give a compile-time error,
4084         undefine HAVE_OPENSSL_SHA256.
4085         * lib/sha512.h: If <openssl/macros.h> would give a compile-time error,
4086         undefine HAVE_OPENSSL_SHA512.
4087         * lib/md5.h: If <openssl/macros.h> would give a compile-time error,
4088         undefine HAVE_OPENSSL_MD5.
4089         * lib/sm3.h: If <openssl/macros.h> would give a compile-time error,
4090         undefine HAVE_OPENSSL_SM3.
4092 2023-08-26  Bruno Haible  <bruno@clisp.org>
4094         selinux-h: Add a comment.
4095         * lib/se-selinux.in.h: Clarify which #endif belongs to the
4096         double-inclusion guard.
4098 2023-08-26  Bruno Haible  <bruno@clisp.org>
4100         sys_utsname: Make double-inclusion guard more robust.
4101         * lib/sys_utsname.in.h: Test the guard symbol a second time.
4103 2023-08-26  Bruno Haible  <bruno@clisp.org>
4105         sys_times: Make double-inclusion guard more robust.
4106         * lib/sys_times.in.h: Test the guard symbol a second time.
4108 2023-08-26  Bruno Haible  <bruno@clisp.org>
4110         uchar: Make #include_next work right.
4111         * lib/uchar.in.h: Use a split double-inclusion guard.
4113 2023-08-26  Paul Eggert  <eggert@cs.ucla.edu>
4115         utimens: update FIXME date
4116         * lib/utimens.c (fdutimens): Change FIXME date to agree with
4117         similar FIXME in utimensat.c.
4119 2023-08-24  Paul Eggert  <eggert@cs.ucla.edu>
4121         exclude: refactor for more-modern style
4122         * lib/exclude.c: Sort include directives.
4123         (fnmatch_pattern_has_wildcards, file_name_matches):
4124         Prefer ‘true’ to ‘1’.
4125         (string_hasher, string_compare, string_compare_ci):
4126         Avoid unnecessary locals.
4127         (string_free): Remove.  All callers changed to just use ‘free’.
4128         (new_exclude_segment): Prefer xmalloc to xzalloc when it’s
4129         clearer to initialize ourselves.
4130         (new_exclude_segment, exclude_patopts, add_exclude_fp):
4131         Prefer nullptr to NULL.
4132         (free_exclude_segment, file_pattern_matches):
4133         Avoid unnecessary nesting.
4134         (free_exclude, fnmatch_no_wildcards, exclude_fnmatch)
4135         (excluded_file_name, add_exclude, add_exclude_fp):
4136         Assume C99 decl syntax.
4137         (fnmatch_no_wildcards): Prefer idx_t to size_t.
4138         (exclude_fnmatch, add_exclude_fp): Prefer ‘f (x)’ to ‘(*f) (x)’.
4139         (add_exclude): Help compiler by refactoring search for
4140         trailing slashes.  Avoid unnecessary cast to char *.
4141         * modules/exclude (Depends-on): Add nullptr.
4143 2023-08-21  Paul Eggert  <eggert@cs.ucla.edu>
4145         unlocked-io: fix getc_unlocked typo
4146         * lib/unlocked-io.h (getc): Fix misspelling of ‘getc_unlocked’.
4148 2023-08-21  Bruno Haible  <bruno@clisp.org>
4150         alignasof, stdalign: Fix a compilation error in C++ mode on FreeBSD 12.
4151         * m4/stdalign.m4 (gl_ALIGNASOF): In C++ mode, prefer __builtin_offsetof
4152         over offsetof when possible, since __builtin_offsetof works also when
4153         <stddef.h> has not been fully included yet.
4155 2023-08-21  Bruno Haible  <bruno@clisp.org>
4157         wcsstr: Relicense under LGPLv2+.
4158         * modules/wcsstr (License): Change to LGPLv2+.
4160         wcsstr-simple: Relicense under LGPLv2+.
4161         * modules/wcsstr-simple (License): Change to LGPLv2+.
4162         * lib/wcsstr.c: Update license notice.
4163         * lib/wcsstr-impl.h: Update license notice. The code added here on
4164         2023-03-27 was under LGPLv2+.
4166         wmemcmp: Relicense under LGPLv2+.
4167         * modules/wmemcmp (License): Change to LGPLv2+.
4168         * lib/wmemcmp.c: Update license notice.
4169         * lib/wmemcmp-impl.h: Likewise.
4171         wcschr: Relicense under LGPLv2+.
4172         * modules/wcschr (License): Change to LGPLv2+.
4173         * lib/wcschr.c: Update license notice.
4174         * lib/wcschr-impl.h: Likewise.
4176 2023-08-21  Bruno Haible  <bruno@clisp.org>
4178         unistr/u32-strlen: Complete license change from 2023-07-23.
4179         * lib/unistr/u-strlen.h: Update license notice.
4181 2023-08-21  Bruno Haible  <bruno@clisp.org>
4183         isnanl: Relicense under LGPLv2+.
4184         * modules/isnanl (License): Change to LGPLv2+.
4186 2023-08-20  Paul Eggert  <eggert@cs.ucla.edu>
4188         ldexp: port to non-two’s complement
4189         * lib/ldexp.c (FUNC): Don’t assume two’s-complement.
4191 2023-08-20  Bruno Haible  <bruno@clisp.org>
4193         readutmp, boot-time: Fix the result on runit and s6 init systems.
4194         * lib/boot-time-aux.h (get_linux_boot_time_fallback): Try also
4195         /var/lib/urandom/random-seed. Try /var/run/utmp last.
4197 2023-08-20  Paul Eggert  <eggert@cs.ucla.edu>
4199         ldexp: fix INT_MIN infloop
4200         * lib/ldexp.c (FUNC): Instead of converting EXP to unsigned,
4201         work on it directly.  This simplifies the code and avoids
4202         an infinite loop when EXP == INT_MIN.
4203         * modules/ldexp, modules/ldexpl: Depend on stdbool.
4204         * tests/test-ldexp.h: Include <limits.h> for INT_MIN.
4205         (test_function): Test for infloop.
4207 2023-08-20  Bruno Haible  <bruno@clisp.org>
4209         ldexp: Fix compilation error in C++ mode.
4210         * lib/math.in.h (ldexp): Use _GL_CXXALIASWARN1, not _GL_CXXALIASWARN.
4212 2023-08-19  Bruno Haible  <bruno@clisp.org>
4214         ldexp: Work around OpenBSD/mips64 bug.
4215         * lib/math.in.h (ldexp): New declaration.
4216         * lib/ldexp.c: New file, based on lib/ldexpl.c.
4217         * lib/ldexpl.c: Moved the implementation to lib/ldexp.c. Just include
4218         it.
4219         * m4/math_h.m4 (gl_MATH_H_REQUIRE_DEFAULTS): Initialize GNULIB_LDEXP.
4220         (gl_MATH_H_DEFAULTS): Initialize REPLACE_LDEXP.
4221         * m4/ldexp.m4 (gl_FUNC_LDEXP): Require gl_MATH_H_DEFAULTS and
4222         gl_FUNC_ISNAND. Invoke gl_FUNC_LDEXP_WORKS. Set REPLACE_LDEXP. Consider
4223         it when setting LDEXP_LIBM.
4224         (gl_FUNC_LDEXP_WORKS): New macro.
4225         * modules/math (Makefile.am): Substitute GNULIB_LDEXP, REPLACE_LDEXP.
4226         * modules/ldexp (Files): Add lib/ldexp.c.
4227         (Depends-on): Add math, isnand.
4228         (configure.ac): Set GL_COND_OBJ_LDEXP. Invoke gl_MATH_MODULE_INDICATOR.
4229         (Makefile.am): Conditionally compile ldexp.c.
4230         * modules/ldexpl (Files): Add lib/ldexp.c.
4231         * doc/posix-functions/ldexp.texi: Mention the OpenBSD bug.
4233 2023-08-19  Bruno Haible  <bruno@clisp.org>
4235         ldexpl: Relicense under LGPLv2+.
4236         * modules/ldexpl (License): Change to LGPLv2+.
4237         * lib/ldexpl.c: Update license notice.
4239 2023-08-19  Bruno Haible  <bruno@clisp.org>
4241         isnand: Relicense under LGPLv2+.
4242         * modules/isnand (License): Change to LGPLv2+.
4244 2023-08-19  Bruno Haible  <bruno@clisp.org>
4246         ldexpl: Avoid possible -Wshadow warning.
4247         * lib/ldexpl.c (exp): Locally rename to 'exponent'.
4249         ldexpl: Fix signed integer overflow.
4250         * lib/ldexpl.c (ldexpl): Use an 'unsigned int' variable to represent the
4251         absolute value of exp without overflow.
4253 2023-08-19  Bruno Haible  <bruno@clisp.org>
4255         logbl: Work around endless loop on OpenBSD 7.3/mips64.
4256         * m4/logbl.m4 (gl_FUNC_LOGBL_WORKS): Terminate the test program if it
4257         takes longer than 5 seconds.
4258         * doc/posix-functions/logbl.texi: Mention the OpenBSD bug.
4260 2023-08-18  Bruno Haible  <bruno@clisp.org>
4262         thrd: Work around thrd_join bug on AIX 7.3.1.
4263         * m4/threads_h.m4 (gl_THREADS_H): Test against AIX 7 thrd_join bug. Set
4264         BROKEN_THRD_JOIN.
4265         (gl_THREADS_H_DEFAULTS): Initialize BROKEN_THRD_JOIN.
4266         * m4/thrd.m4 (gl_FUNC_THRD_JOIN): Set REPLACE_THRD_* to 1 also if
4267         BROKEN_THRD_JOIN is 1. Define BROKEN_THRD_START_T_OR_JOIN instead of
4268         BROKEN_THRD_START_T.
4269         * modules/threads-h (Makefile.am): Substitute BROKEN_THRD_JOIN.
4270         * lib/threads.in.h (rpl_thrd_t, thrd_t): Define also if BROKEN_THRD_JOIN
4271         is 1.
4272         * lib/thrd.c: Test BROKEN_THRD_START_T_OR_JOIN instead of
4273         BROKEN_THRD_START_T.
4274         * doc/posix-functions/thrd_join.texi: Update.
4275         * doc/posix-functions/thrd_exit.texi: Likewise.
4277         thrd: Refactor.
4278         * m4/thrd.m4 (gl_FUNC_THRD_JOIN): Define BROKEN_THRD_JOIN_NULL, not
4279         BROKEN_THRD_JOIN. Rename gl_cv_func_thrd_join_works to
4280         gl_cv_func_thrd_join_null_works.
4281         * lib/thrd.c: Test BROKEN_THRD_JOIN_NULL instead of BROKEN_THRD_JOIN.
4283 2023-08-18  Bruno Haible  <bruno@clisp.org>
4285         thrd tests: Add unit test for thrd_exit.
4286         * tests/test-thrd_exit.c: New file, based on tests/test-thrd_create.c.
4287         * modules/thrd-tests (Files): Add it.
4288         (Makefile.am): Compile and run it.
4290         thrd: On AIX 7.1 and 7.2, override also thrd_exit.
4291         * lib/threads.in.h (thrd_exit): Consider REPLACE_THRD_EXIT.
4292         * lib/thrd.c (rpl_thrd_exit): New function.
4293         * m4/threads_h.m4 (gl_THREADS_H_DEFAULTS): Initialize REPLACE_THRD_EXIT.
4294         * m4/thrd.m4 (gl_FUNC_THRD_JOIN): Set also REPLACE_THRD_EXIT and adjust
4295         LIBSTDTHREAD.
4296         * modules/threads-h (Makefile.am): Substitute REPLACE_THRD_EXIT.
4297         * doc/posix-functions/thrd_exit.texi: Mention the AIX thrd_join problem
4298         also here.
4300 2023-08-18  Bruno Haible  <bruno@clisp.org>
4302         aligned_alloc: Fix test failure on AIX 7.3 with ibm-clang.
4303         * m4/aligned_alloc.m4 (gl_FUNC_ALIGNED_ALLOC): Use 'volatile', to
4304         disable optimization of ibm-clang -O2.
4305         * doc/posix-functions/aligned_alloc.texi: Update version info.
4307 2023-08-18  Bruno Haible  <bruno@clisp.org>
4309         sys_socket: Fix compilation errors in C++ mode on AIX 7.3 with gcc.
4310         * lib/sys_socket.in.h (accept, getpeername, getsockname, recvfrom):
4311         Disable _GL_CXXALIASWARN invocation on non-glibc systems.
4313 2023-08-18  Bruno Haible  <bruno@clisp.org>
4315         stddef: Don't unnecessarily override max_align_t on AIX 7.3 with gcc.
4316         * lib/stddef.in.h (max_align_t, GNULIB_defined_max_align_t): Don't
4317         define or override if HAVE_MAX_ALIGN_T is 1.
4319 2023-08-18  Bruno Haible  <bruno@clisp.org>
4321         uptime: Deprecate.
4322         Suggested by Paul Eggert in
4323         <https://lists.gnu.org/archive/html/bug-coreutils/2023-08/msg00070.html>.
4324         * modules/uptime (Status, Notice): New sections.
4326 2023-08-17  Bruno Haible  <bruno@clisp.org>
4328         Recognize the *-*-windows* config triplets introduced on 2023-06-26.
4329         * m4/*.m4: Treat windows* as equivalent to mingw*.
4330         * modules/*: Likewise.
4332 2023-08-16  Bruno Haible  <bruno@clisp.org>
4334         mbrtoc32-regular: Make it work as expected on glibc 2.12.
4335         * lib/mbrtoc32.c (mbrtoc32): If necessary, clear the mbstate_t after
4336         mbrtowc() returned.
4338 2023-08-16  Bruno Haible  <bruno@clisp.org>
4340         fnmatch: Override fnmatch from glibc versions < 2.22.
4341         * m4/fnmatch.m4 (gl_FUNC_FNMATCH_POSIX): Force REPLACE_FNMATCH=1 in
4342         glibc versions < 2.22.
4344 2023-08-16  Bruno Haible  <bruno@clisp.org>
4346         tests: Avoid some test failures on Slackware 13.37.
4347         * tests/test-c32isalnum.c (main): Disable GB18030 tests on
4348         glibc 2.13..2.15.
4349         * tests/test-c32isalpha.c (main): Likewise.
4350         * tests/test-c32isblank.c (main): Likewise.
4351         * tests/test-c32iscntrl.c (main): Likewise.
4352         * tests/test-c32isdigit.c (main): Likewise.
4353         * tests/test-c32isgraph.c (main): Likewise.
4354         * tests/test-c32islower.c (main): Likewise.
4355         * tests/test-c32isprint.c (main): Likewise.
4356         * tests/test-c32ispunct.c (main): Likewise.
4357         * tests/test-c32isspace.c (main): Likewise.
4358         * tests/test-c32isupper.c (main): Likewise.
4359         * tests/test-c32isxdigit.c (main): Likewise.
4360         * tests/test-c32rtomb.c (main): Likewise.
4361         * tests/test-c32snrtombs.c (main): Likewise.
4362         * tests/test-c32srtombs.c (main): Likewise.
4363         * tests/test-c32stombs.c (main): Likewise.
4364         * tests/test-c32tolower.c (main): Likewise.
4365         * tests/test-c32toupper.c (main): Likewise.
4366         * tests/test-fnmatch.c (main): Likewise.
4367         * tests/test-mbrtoc16.c (main): Likewise.
4368         * tests/test-mbrtoc32.c (main): Likewise.
4369         * tests/test-mbsnrtoc32s.c (main): Likewise.
4370         * tests/test-mbsrtoc32s.c (main): Likewise.
4371         * tests/test-mbstoc32s.c (main): Likewise.
4373 2023-08-15  Bruno Haible  <bruno@clisp.org>
4375         readutmp tests: Add test against today's bug.
4376         * tests/test-readutmp.c (main): Verify that there is exactly one
4377         BOOT_TIME entry.
4379         readutmp: Fix for platforms without ut_type (regression 2023-08-08).
4380         * lib/readutmp.h (UT_TYPE_BOOT_TIME, UT_TYPE_USER_PROCESS): Don't use
4381         UT_TYPE_EQ macro.
4382         (IS_USER_PROCESS): Don't use UT_USER, UT_TYPE_NOT_DEFINED macros.
4383         * lib/readutmp.c (IS_USER_PROCESS): Don't override.
4385 2023-08-14  Bruno Haible  <bruno@clisp.org>
4387         readutmp, boot-time: Don't use __UT_* symbols (regression 2023-08-11).
4388         * lib/readutmp.h (_GL_UT_USER_SIZE, _GL_UT_ID_SIZE, _GL_UT_LINE_SIZE,
4389         _GL_UT_HOST_SIZE): New macros.
4390         (struct utmpx32): Use them.
4392 2023-08-14  Bruno Haible  <bruno@clisp.org>
4394         readutmp, boot-time: Fix build on 32-bit glibc (regression 2023-08-11).
4395         Reported by Andreas Schwab <schwab@suse.de> in
4396         <https://lists.gnu.org/archive/html/bug-gnulib/2023-08/msg00125.html>.
4397         * lib/readutmp.h (struct utmpx32): Reference __UT_NAMESIZE, not
4398         __UT_USERSIZE.
4400 2023-08-13  Bruno Haible  <bruno@clisp.org>
4402         stdint: Fix configure test result with gcc 4.7 or 4.8.
4403         * m4/stdint.m4 (gl_STDINT_H): Don't assume that _Generic works with
4404         GCC versions < 4.9 with -std=gnu11.
4406 2023-08-13  Bruno Haible  <bruno@clisp.org>
4408         Fix some test module descriptions.
4409         * modules/boot-time-tests (Files): Add tests/macros.h.
4410         * modules/dprintf-gnu-tests (Files): Likewise.
4411         * modules/fclose-tests (Files): Likewise.
4412         * modules/getcwd-tests (Files): Likewise.
4413         * modules/lock-tests (Files): Likewise.
4414         * modules/nullptr-c++-tests (Files): Likewise.
4415         * modules/posix_spawn-tests (Files): Likewise.
4416         * modules/posix_spawnp-tests (Files): Likewise.
4417         * modules/readutmp-tests (Files): Likewise.
4418         * modules/sh-quote-tests (Files): Likewise.
4419         * modules/unigbrk/u16-grapheme-breaks-tests (Files): Likewise.
4420         * modules/unigbrk/u16-grapheme-next-tests (Files): Likewise.
4421         * modules/unigbrk/u16-grapheme-prev-tests (Files): Likewise.
4422         * modules/unigbrk/u32-grapheme-breaks-tests (Files): Likewise.
4423         * modules/unigbrk/u32-grapheme-next-tests (Files): Likewise.
4424         * modules/unigbrk/u32-grapheme-prev-tests (Files): Likewise.
4425         * modules/unigbrk/u8-grapheme-breaks-tests (Files): Likewise.
4426         * modules/unigbrk/u8-grapheme-next-tests (Files): Likewise.
4427         * modules/unigbrk/u8-grapheme-prev-tests (Files): Likewise.
4428         * modules/unigbrk/uc-grapheme-breaks-tests (Files): Likewise.
4430 2023-08-13  Bruno Haible  <bruno@clisp.org>
4432         nproc, physmem: Use sysctl() as a fallback on GNU/kFreeBSD.
4433         * lib/nproc.c: Do include <sys/sysctl.h> on GNU/kFreeBSD.
4434         (num_processors_ignoring_omp): Call sysctl on GNU/kFreeBSD.
4435         * lib/physmem.c: Do include <sys/sysctl.h> on GNU/kFreeBSD.
4436         (physmem_total, physmem_available): Call sysctl on GNU/kFreeBSD.
4438 2023-08-13  Bruno Haible  <bruno@clisp.org>
4440         physmem: Add tests.
4441         * tests/test-physmem.c: New file.
4442         * modules/physmem-tests: New file.
4444 2023-08-13  Bruno Haible  <bruno@clisp.org>
4446         readutmp, boot-time: Fix warning on glibc 2.30..2.31 on Linux.
4447         Reported by Pádraig Brady in
4448         <https://lists.gnu.org/archive/html/bug-gnulib/2023-08/msg00110.html>.
4449         * lib/readutmp.c: Don't include <sys/sysctl.h> on glibc/Linux.
4450         * lib/boot-time.c: Likewise.
4452 2023-08-13  Paul Eggert  <eggert@cs.ucla.edu>
4454         fts: improve memory-allocation errno handling
4455         * lib/fts.c (fts_read, fts_build): When enter_dir or setup_dir
4456         fails, report its errno value back to the user.
4457         (internal_function): Preserve errno.
4458         * modules/fts (Depends-on): Add calloc-posix, free-posix,
4459         malloc-posix, and realloc-posix, for better errno handling
4460         on allocation failures.
4462         hash: set errno on failure
4463         * lib/hash.c: Include errno.h.
4464         (compute_bucket_size, hash_initialize, hash_rehash)
4465         (hash_insert_if_absent): Set errno reliably on failure.
4466         (hash_free): Preserve errno, like plain 'free'.
4467         * modules/hash (Depends-on): Depend on calloc-posix,
4468         free-posix, malloc-posix, so that errno is set reliably.
4470 2023-08-13  Bruno Haible  <bruno@clisp.org>
4472         readutmp, boot-time: Fix compilation error on old Android.
4473         Reported by Po Lu in
4474         <https://lists.gnu.org/archive/html/bug-gnulib/2023-08/msg00108.html>.
4475         * lib/readutmp.h (BOOT_TIME): Add fallback.
4477 2023-08-13  Bruno Haible  <bruno@clisp.org>
4479         readutmp, boot-time: Fix compilation error on Android API 8.
4480         Reported by Po Lu in
4481         <https://lists.gnu.org/archive/html/bug-gnulib/2023-08/msg00108.html>.
4482         * m4/readutmp.m4 (gl_PREREQ_READUTMP_H): Test whether sysinfo is
4483         declared.
4484         * lib/boot-time-aux.h (get_linux_uptime): Invoke sysinfo only if it is
4485         declared.
4486         * doc/glibc-functions/sysinfo.texi: Mention the Android problem.
4488 2023-08-13  Bruno Haible  <bruno@clisp.org>
4490         readutmp, boot-time: Fix compilation error on old Android.
4491         Reported by Po Lu in
4492         <https://lists.gnu.org/archive/html/bug-gnulib/2023-08/msg00108.html>.
4493         * lib/readutmp.c (endutent): New fallback declaration, for Android.
4494         (getutent): Remove Ultrix workaround from 2000-04-05.
4495         * lib/boot-time.c: Likewise.
4496         * m4/readutmp.m4 (gl_PREREQ_READUTMP_H): Test whether endutent is
4497         declared, not getutent.
4498         * doc/glibc-functions/endutent.texi: Mention the Android bug.
4500 2023-08-12  Paul Eggert  <eggert@cs.ucla.edu>
4502         boot-time,readutmp: do not depend on c-strtod
4503         * lib/boot-time-aux.h (get_linux_uptime): Compute struct timespec
4504         using integer arithmetic rather than double.
4505         * lib/boot-time.c, lib/readutmp.c: Don’t include c-strtod.h.
4506         * modules/boot-time, modules/readutmp (Depends-on): Remove c-strtod.
4508         boot-time,readutmp: remove -lrt usage
4509         This code uses clock-relevant functions only on platforms
4510         that do not need -lrt.
4511         * m4/readutmp.m4 (gl_READUTMP): Do not require gl_CLOCK_TIME
4512         or add CLOCK_TIME_LIB to READUTMP_LIB.
4513         * modules/boot-time (Link): No need to link with CLOCK_TIME_LIB.
4515         boot-time,readutmp: do not depend on fopen-gnu
4516         These modules should work well enough even if fopen is not fixed
4517         to conform to fopen-gnu standards.  The only gotcha I can see is
4518         older fopen implementations that lack support for "e", and
4519         a potential O_CLOEXEC leak is not worth worrying about.
4520         * modules/boot-time (Depends-on):
4521         * modules/readutmp (Depends-on):
4522         Remove fopen-gnu.
4524         readutmp: do not depend on timespec_get
4525         boot-time code no longer needs it.
4526         * modules/readutmp (Depends-on): Remove timespec_get.
4528         boot-time: do not depend on timespec_get
4529         This is for Emacs, which does not use timespec_get now
4530         and which likes to minimize dependencies.
4531         Also, treat musl libc like recent glibc,
4532         and fix a timespec_get return value typo.
4533         * lib/boot-time-aux.h (get_linux_uptime):
4534         Assume musl libc supports CLOCK_BOOTTIME.
4535         (get_linux_boot_time_final_fallback):
4536         Likewise for musl libc and CLOCK_REALTIME.
4537         Do not rely on the timespec_get module, to break the dependency.
4538         Consider 0 to be a failure return from timespec_get.
4539         Fall back on gettimeofday if timespec_get does not exist.
4540         * modules/boot-time (Depends-on): Remove timespec_get.
4542 2023-08-12  Bruno Haible  <bruno@clisp.org>
4544         readutmp, boot-time: Fix parsing of /proc/uptime.
4545         * lib/boot-time-aux.h (get_linux_uptime): Use c_strtod, not strtod.
4546         * lib/readutmp.c: Include c-strtod.h.
4547         * lib/boot-time.c: Likewise.
4548         * modules/readutmp (Depends-on): Add c-strtod.
4549         * modules/boot-time (Depends-on): Likewise.
4551 2023-08-12  Bruno Haible  <bruno@clisp.org>
4553         readutmp: On Linux, don't fail if /var/run/utmp is not accessible.
4554         * lib/boot-time-aux.h (get_linux_boot_time_final_fallback): Don't test
4555         NEED_BOOT_TIME_FINAL_FALLBACK.
4556         * lib/boot-time.c (NEED_BOOT_TIME_FINAL_FALLBACK): Remove macro.
4557         * lib/readutmp.c (NEED_BOOT_TIME_FINAL_FALLBACK): Remove macro.
4558         (read_utmp_from_file): As a fallback on Linux, invoke
4559         get_linux_boot_time_final_fallback.
4560         (get_boot_time_uncached): Don't do it here.
4561         * m4/readutmp.m4 (gl_READUTMP): Add $CLOCK_TIME_LIB to READUTMP_LIB.
4563 2023-08-12  Bruno Haible  <bruno@clisp.org>
4565         readutmp, boot-time: On Haiku, return the boot time.
4566         * m4/readutmp.m4 (gl_PREREQ_READUTMP_H): Test whether <OS.h> exists.
4567         * lib/boot-time-aux.h (get_haiku_boot_time,
4568         get_haiku_boot_time_final_fallback): New functions.
4569         * lib/readutmp.c: Include <OS.h>.
4570         (read_utmp_from_file): If opening UTMP_FILE fails, continue processing
4571         instead of failing. Invoke get_haiku_boot_time and
4572         get_haiku_boot_time_final_fallback.
4573         * lib/boot-time.c: Include <OS.h>.
4574         (get_boot_time_uncached): Invoke get_haiku_boot_time and
4575         get_haiku_boot_time_final_fallback.
4577 2023-08-12  Bruno Haible  <bruno@clisp.org>
4579         readutmp: Reduce code duplication.
4580         * lib/readutmp.c (have_boot_time): New function.
4581         (read_utmp_from_file): Invoke it, instead of duplicating the same loop.
4583 2023-08-12  Paul Eggert  <eggert@cs.ucla.edu>
4585         c-file-type: new module
4586         * lib/c-file-type.c: New file, containing all of the
4587         old file-type except for the gettext call.
4588         * lib/file-type.c (_): Remove; no longer used.
4589         (file_type): Call c_file_type for most of the work.
4590         * modules/c-file-type: New module.
4591         * modules/file-type (Depends-on): Add c-file-type.
4593 2023-08-12  Bruno Haible  <bruno@clisp.org>
4595         readutmp, boot-time: Use the BSD sysctl as fallback.
4596         * m4/readutmp.m4 (gl_PREREQ_READUTMP_H): Test for <sys/param.h>,
4597         <sys/sysctl.h>, sysctl.
4598         * lib/boot-time-aux.h (get_bsd_boot_time_final_fallback): New function.
4599         * lib/readutmp.c: Include <sys/param.h> and <sys/sysctl.h>.
4600         (read_utmp_from_file): Invoke get_bsd_boot_time_final_fallback as a
4601         fallback.
4602         * lib/boot-time.c: Include <sys/param.h> and <sys/sysctl.h>.
4603         (get_boot_time_uncached): Invoke get_bsd_boot_time_final_fallback as a
4604         fallback.
4606 2023-08-12  Bruno Haible  <bruno@clisp.org>
4608         readutmp: Fix compilation error on OpenBSD (regression 2023-08-11).
4609         * lib/readutmp.c (read_utmp_from_file): Remove extraneous 'break'
4610         statement.
4612 2023-08-11  Bruno Haible  <bruno@clisp.org>
4614         boot-time: Add comment about multithread-safety.
4615         * lib/boot-time.h (get_boot_time): Add comment, same as in readutmp.h.
4617 2023-08-11  Bruno Haible  <bruno@clisp.org>
4619         boot-time: Simplify execution.
4620         * lib/boot-time.c: Include <stdio.h>, <string.h>, <sys/types.h>,
4621         <sys/stat.h>, <sys/sysinfo.h>, <time.h>, stat-time.h, unlocked-io.h,
4622         boot-time-aux.h.
4623         (UT_USER): New macro, from lib/readutmp.c.
4624         (getutent): New declaration.
4625         (get_boot_time_uncached): New function, containing a simplified code
4626         from lib/readutmp.c.
4627         (get_boot_time): Don't invoke read_utmp. Instead, invoke
4628         get_boot_time_uncached and cache the result.
4629         * modules/boot-time (Files): Add lib/boot-time-aux.h, lib/readutmp.h,
4630         m4/readutmp.m4.
4631         (Depends-on): Remove readutmp. Add extensions, fopen-gnu, stat-time,
4632         stdbool, time-h, timespec_get, unlocked-io-internal.
4633         (configure.ac): Invoke gl_PREREQ_READUTMP_H.
4634         (Link): Remove $(READUTMP_LIB). Add $(CLOCK_TIME_LIB).
4635         * modules/boot-time-tests (Makefile.am): Link test-boot-time with
4636         $(CLOCK_TIME_LIB), not with $(READUTMP_LIB).
4638 2023-08-11  Bruno Haible  <bruno@clisp.org>
4640         readutmp: Refactor boot time determination code.
4641         * lib/boot-time-aux.h: New file, extracted from lib/readutmp.c.
4642         * lib/readutmp.c: On Linux, include <sys/sysinfo.h> even if
4643         !READUTMP_USE_SYSTEMD.
4644         Include boot-time-aux.h.
4645         (SIZEOF): Remove macro, moved to boot-time-aux.h.
4646         (get_linux_uptime): Remove function, moved to boot-time-aux.h.
4647         (read_utmp_from_file): Invoke get_linux_boot_time_fallback,
4648         get_android_boot_time, get_openbsd_boot_time, get_windows_boot_time.
4649         Code moved to boot-time-aux.h.
4650         (get_boot_time_uncached: Invoke get_linux_boot_time_final_fallback.
4651         Code moved to boot-time-aux.h.
4652         * m4/readutmp.m4 (gl_PREREQ_READUTMP_H): New macro, extracted from
4653         gl_READUTMP.
4654         (gl_READUTMP): Invoke it.
4655         * modules/readutmp (Files): Add lib/boot-time-aux.h.
4657 2023-08-11  Bruno Haible  <bruno@clisp.org>
4659         readutmp: Make 'struct utmpx32' usable by other code.
4660         * lib/readutmp.h (struct utmpx32): Moved to here from lib/readutmp.c.
4661         (UTMP_STRUCT_NAME): Define as utmpx32 if needed.
4662         * lib/readutmp.c (read_utmp_from_file): Simply use UTMP_STRUCT_NAME.
4664 2023-08-11  Bruno Haible  <bruno@clisp.org>
4666         readutmp tests: Fix link error.
4667         * modules/readutmp-tests (Makefile.am): Link test-readutmp with
4668         $(LIBINTL).
4670 2023-08-11  Bruno Haible  <bruno@clisp.org>
4672         readutmp: Fix the boot time returned on Minix.
4673         * lib/readutmp.c (read_utmp_from_file): [__minix] When the time of the
4674         BOOT_TIME entry is very close to the Epoch, replace it with the time
4675         from the "run-level m" entry.
4677 2023-08-11  Bruno Haible  <bruno@clisp.org>
4679         readutmp: On Cygwin and Windows, return the boot time.
4680         * lib/readutmp.h (READ_UTMP_SUPPORTED): Define also on native Windows.
4681         * lib/readutmp.c (desirable_utmp_entry): Ignore READ_UTMP_CHECK_PIDS on
4682         Windows.
4683         (read_utmp_from_file): Add a BOOT_TIME entry on Windows.
4685 2023-08-11  Bruno Haible  <bruno@clisp.org>
4687         clock-time: On mingw, avoid buggy clock_gettime from libwinpthread.
4688         * m4/clock_time.m4 (gl_CLOCK_TIME): Require AC_CANONICAL_HOST. On
4689         native Windows, avoid using clock_getres clock_gettime clock_settime
4690         from mingw's libwinpthread.
4691         * doc/posix-functions/clock_gettime.texi: Mention the mingw bug.
4693 2023-08-10  Bruno Haible  <bruno@clisp.org>
4695         readutmp: Make the header file includable from C++.
4696         * lib/readutmp.h: Add extern "C" block.
4698 2023-08-10  Bruno Haible  <bruno@clisp.org>
4700         readutmp: Tweak the Android specific addition.
4701         * lib/readutmp.c (read_utmp_from_file) [__ANDROID__]: Don't fake a
4702         BOOT_TIME entry if the options request to omit it or if a BOOT_TIME
4703         entry is already present.
4705 2023-08-10  Bruno Haible  <bruno@clisp.org>
4707         readutmp: Fix the boot time returned on Raspbian.
4708         * lib/readutmp.c (read_utmp_from_file): When the time of the BOOT_TIME
4709         entry is very close to the Epoch, replace it with the time from the
4710         "runlevel"/"~" entry.
4712 2023-08-10  Bruno Haible  <bruno@clisp.org>
4714         boot-time: Add tests.
4715         * tests/test-boot-time.c: New file.
4716         * modules/boot-time-tests: New file.
4718         boot-time: New module.
4719         * lib/boot-time.h: New file.
4720         * lib/boot-time.c: New file.
4721         * modules/boot-time: New file.
4723 2023-08-10  Bruno Haible  <bruno@clisp.org>
4725         readutmp: Return a boot time also on Android.
4726         * lib/readutmp.c (get_linux_uptime): New function, extracted from
4727         get_boot_time_uncached.
4728         (read_utmp_from_file): Don't look for file time stamps on Android.
4729         Instead, use get_linux_uptime.
4730         (get_boot_time_uncached): Use get_linux_uptime.
4732 2023-08-09  Bruno Haible  <bruno@clisp.org>
4734         readutmp: Fix a mistake (regression 2023-08-08).
4735         * lib/readutmp.c (UT_TYPE_EQ, UT_TYPE_NOT_DEFINED): Fix a typo.
4737         readutmp: Return a boot time also on OpenBSD.
4738         * lib/readutmp.h (BOOT_TIME, USER_PROCESS): Provide fallback
4739         definitions.
4740         * lib/readutmp.c (read_utmp_from_file) [__OpenBSD__]: Fake a BOOT_TIME
4741         entry by looking at the time stamp of a specific file.
4743         readutmp: Return a boot time also on Alpine Linux.
4744         * lib/readutmp.c: Include stat-time.h.
4745         (SIZEOF): New macro.
4746         (read_utmp_from_file) [__linux__]: Fake a BOOT_TIME entry by looking
4747         at the time stamp of a specific file.
4748         * modules/readutmp (Depends-on): Add stat-time.
4750         readutmp: Fix boot time in VMs after sleep state and date update.
4751         * lib/readutmp.c (read_utmp_from_file): New function, extracted from
4752         read_utmp.
4753         (get_boot_time_uncached): Before all other approaches, try to find the
4754         boot time in the /var/run/utmp file.
4755         (read_utmp): Invoke read_utmp_from_file.
4757         readutmp: Make it easier to filter for/against the boot-time entry.
4758         * lib/readutmp.h (READ_UTMP_BOOT_TIME, READ_UTMP_NO_BOOT_TIME): New
4759         enum items.
4760         * lib/readutmp.c (desirable_utmp_entry, read_utmp_from_systemd):
4761         Implement them.
4762         (read_utmp): If no entries can match the given options, return
4763         immediately.
4765 2023-08-08  Paul Eggert  <eggert@cs.ucla.edu>
4767         readutmp: omit pragma
4768         * lib/readutmp.c: Omit -Wstringop-overread pragma.
4769         It’s no longer needed now that extract_trimmed_name
4770         no longer calls strnlen.
4772 2023-08-08  Bruno Haible  <bruno@clisp.org>
4774         readutmp: Use classical implementation for files != /var/run/utmp.
4775         * lib/readutmp.c (read_utmp_from_systemd): Renamed from read_utmp
4776         [READUTMP_USE_SYSTEMD]. Remove file argument.
4777         (read_utmp): Call it when the file argument is "/var/run/utmp".
4779 2023-08-08  Bruno Haible  <bruno@clisp.org>
4781         readutmp: Get the boot time with higher precision.
4782         Suggested by Thorsten Kukuk <kukuk@suse.com> in
4783         <https://github.com/thkukuk/utmpx/blob/main/utmp-to-logind.md#determine-boot-time>.
4784         * lib/readutmp.c (get_boot_time_uncached): Try clock_gettime first.
4786 2023-08-08  Bruno Haible  <bruno@clisp.org>
4788         readutmp: Add comment about multithread-safety.
4789         * lib/readutmp.h (read_utmp): Add comment.
4791 2023-08-08  Bruno Haible  <bruno@clisp.org>
4793         readutmp: Return entries with unbounded strings on all platforms.
4794         Suggested  by Paul Eggert in
4795         <https://lists.gnu.org/archive/html/bug-gnulib/2023-07/msg00165.html>.
4796         * m4/readutmp.m4 (gl_READUTMP): Test also whether struct utmp has an
4797         ut_tv member, and whether struct utmp and struct utmpx have an
4798         ut_session member.
4799         * lib/readutmp.h (struct gl_utmp): Define always. Add ut_exit field.
4800         (HAVE_GL_UTMP): Remove macro.
4801         (UT_USER, UT_TIME_MEMBER, UT_PID, UT_TYPE_EQ, UT_TYPE_NOT_DEFINED,
4802         UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT, STRUCT_UTMP): Define w.r.t.
4803         struct gl_utmp.
4804         (UT_USER_SIZE, UT_ID_SIZE, UT_LINE_SIZE, UT_HOST_SIZE): Define to -1
4805         always.
4806         (getutent): Remove declaration.
4807         (HAVE_STRUCT_XTMP_UT_EXIT): Remove unused macro.
4808         (HAVE_STRUCT_XTMP_UT_ID, HAVE_STRUCT_XTMP_UT_PID,
4809         HAVE_STRUCT_XTMP_UT_HOST): Change to match the way coreutils uses these
4810         macros.
4811         * lib/readutmp.c (UT_USER, UT_TIME_MEMBER, UT_PID, UT_TYPE_EQ,
4812         UT_TYPE_NOT_DEFINED, IS_USER_PROCESS, UT_EXIT_E_TERMINATION,
4813         UT_EXIT_E_EXIT, UT_USER_SIZE, UT_ID_SIZE, UT_LINE_SIZE, UT_HOST_SIZE):
4814         Define w.r.t. struct utmpx or struct utmp.
4815         (extract_trimmed_name): Don't use UT_USER or UT_USER_SIZE here.
4816         (desirable_utmp_entry): Don't use UT_TIME_MEMBER or UT_USER here.
4817         (struct utmp_alloc): Define always.
4818         (add_utmp): Likewise. Add user_len, id_len, line_len, host_len,
4819         termination, exit arguments. Don't require that user, id, line, host are
4820         NUL-terminated. Assume user and host are non-NULL.
4821         (finish_utmp): New function, extracted from read_utmp.
4822         (read_utmp) [READUTMP_USE_SYSTEMD]: Update add_utmp invocations. Pass a
4823         non-NULL user and a non-NULL host. Call finish_utmp.
4824         (getutent): Move declaration from readutmp.h to here.
4825         (copy_utmp_entry): Remove function.
4826         (read_utmp) [UTMP_NAME_FUNCTION]: Replace variables n_read, n_alloc,
4827         utmp with a 'struct utmp_alloc'. Use 'struct utmpx32' from
4828         copy_utmp_entry here. Invoke add_utmp and finish_utmp.
4829         (read_utmp) [!UTMP_NAME_FUNCTION]: Replace variables n_read, n_alloc,
4830         utmp with a 'struct utmp_alloc'. Invoke add_utmp and finish_utmp.
4831         * NEWS: Mention the API change.
4833 2023-08-08  Bruno Haible  <bruno@clisp.org>
4835         readutmp: Fix compilation error on OpenBSD and AIX (regr. 2023-08-03).
4836         * lib/readutmp.h (UT_TIME_MEMBER) [HAVE_UTMP_H]: Revert last change.
4838 2023-08-08  Bruno Haible  <bruno@clisp.org>
4840         readutmp: Fix compilation error on OpenBSD (regr. 2023-08-02).
4841         * lib/readutmp.h (UT_ID_SIZE): Define to a dummy if there is no ut_id
4842         field.
4844 2023-08-07  Paul Eggert  <eggert@cs.ucla.edu>
4846         quotearg: fix obsolete comment
4847         * lib/quotearg.h: Fix comment to match behavior.
4848         This fixes a commentary bug introduced in
4849         commit 1a43a982c927eaf26bbc2701a872009d9be4b33b
4850         "quotearg: do not use grave accent for left quote"
4851         dated 2011-12-18 15:44:17+01, where the comment
4852         was not updated to match the changed behavior.
4854 2023-08-06  Paul Eggert  <eggert@cs.ucla.edu>
4856         readutmp: fix comment bug ID
4857         * lib/readutmp.c: Fix comment (thanks to Bruno Haible).
4859         doc: Document lack of printf "%n" on Android, OpenBSD.
4860         * doc/posix/functions/*printf.texi: Document that the POSIX-specified
4861         printf functions do not support the %n format on Android and OpenBSD.
4862         This lack of support is deliberate, as %n is a common target of attacks
4863         on security.
4865 2023-08-05  Paul Eggert  <eggert@cs.ucla.edu>
4867         readutmp: anticipate Y2038 hack for utmp
4868         * lib/readutmp.c (struct utmpx32): Use unsigned int for tv_sec,
4869         not int, as that is more likely to work after 2038.
4870         Suggested by Andreas Schwab in:
4871         https://sourceware.org/pipermail/libc-alpha/2023-August/150661.html
4873         diffseq: simplify lint removal
4874         * lib/diffseq.h (IF_LINT): Remove.
4875         Instead, always ignore the diagnostic, as that’s simpler
4876         now that we have the pragma change installed in May.
4877         This removes the last IF_LINT from diffutils, though not
4878         the last use of GCC_LINT.
4880 2023-08-04  Bruno Haible  <bruno@clisp.org>
4882         unistr/{u8-mbtouc,u8-mbsnlen}: Fix test failures (regr. 2023-07-25).
4883         * modules/unistr/u8-mbtouc (configure.ac): Compile this code if the
4884         preinstalled libunistring version is >= 0.9.4, < 1.2.
4885         * modules/unistr/u8-mbsnlen (configure.ac): Likewise.
4887         unistr/*-pcpy: Fix compilation errors (regression 2023-07-21).
4888         * modules/unistr/base (configure.ac): Generate unistr.h if the
4889         preinstalled libunistring version is >= 0.9.11, < 1.2.
4891 2023-08-04  Bruno Haible  <bruno@clisp.org>
4893         readutmp: In systemd mode, fix the ut_host contents (regr. yesterday).
4894         * lib/readutmp.c (add_utmp): Fix ut_host contents.
4895         * tests/test-readutmp.c (main): Show also the contents of the ut_host
4896         field.
4898 2023-08-04  Bruno Haible  <bruno@clisp.org>
4900         readutmp: Ensure multithread-safety.
4901         * lib/readutmp.c (get_boot_time): Initialize 'cached' after 'boot_time',
4902         not before. Also declare both as volatile.
4904 2023-08-04  Bruno Haible  <bruno@clisp.org>
4906         readutmp tests: Fix gcc warning (regression from yesterday).
4907         * tests/test-readutmp.c: Include idx.h.
4908         (main): Use idx_t instead of size_t.
4910 2023-08-03  Paul Eggert  <eggert@cs.ucla.edu>
4912         readutmp: systemd supports only UTMP_FILE
4913         * lib/readutmp.c (read_utmp): Fail if not UTMP_FILE.
4914         * m4/systemd.m4 (gl_SYSTEMD_CHOICE): Default to no for now,
4915         since yes means "who /var/log/wtmp" stops working.
4917         readutmp: switch new struct to struct timespec
4918         * lib/readutmp.c (get_boot_time_uncached, get_boot_time)
4919         (add_utmp, read_utmp):
4920         Use struct timespec, not struct timeval.
4921         * lib/readutmp.h: Always include <time.h>, for struct timespec.
4922         Simplify when utmp.h and utmpx.h are included.
4923         (struct gl_utmp): Use the same struct for both the
4924         systemd and the dummy version.  Reorder members, and
4925         use proper pid_t type for ut_session.  Rename ut_tv to ut_ts
4926         and make it a struct timespec.  All uses changed.
4927         (HAVE_GL_UTMP): New macro.  Use it where appropriate, instead
4928         of READUTMP_USE_SYSTEMD.
4929         (UT_USER, HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID)
4930         (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_HOST):
4931         Simplify.
4932         * modules/readutmp (Depends-on): Add time-h, timespec_get.
4933         Remove sys_type.  Sort.
4935         readutmp: fix # indentation
4936         * lib/readutmp.h: Change # indentation to standard Gnulib style.
4938         readutmp: pacify -Wstrict-prototypes
4939         * lib/readutmp.c (get_boot_time_uncached, get_boot_time):
4940         Pacify gcc 13 -Wstrict-prototypes.
4942         readutmp: fix idx_t FIXME in API
4943         * lib/readutmp.c (read_utmp): 2nd arg is now idx_t *, not
4944         size_t *.
4945         * lib/readutmp.h: Include idx.h, for idx_t.
4946         * modules/readutmp (Depends-on): Add idx.
4948         readutmp: go back to simple ‘free’
4949         Omit the new free_utmp function.  Instead, allocate storage
4950         in one block, so that using code can still just call ‘free’.
4951         * lib/readutmp.c (struct utmp_alloc) [READUTMP_USE_SYSTEMD]: New type.
4952         (add_utmp) [READUTMP_USE_SYSTEMD]: New function.
4953         (read_utmp) [READUTMP_USE_SYSTEMD]: Use it.
4954         Also, use malloc a bit less heavily.
4955         (free_utmp): Remove.
4956         * tests/test-readutmp.c (main): Call free, not free_utmp.
4958         readutmp: simplify extract_trimmed_name via ximemdup0
4959         * lib/readutmp.c (extract_trimmed_name): Simplify.
4960         * modules/readutmp (Depends-on):
4961         Add strnlen, which was a missing dependency.
4963 2023-08-03  Bruno Haible  <bruno@clisp.org>
4965         alignasof, stdalign: Avoid some -Wundef warnings from config.h.
4966         Reported by Tim Rühsen <tim.ruehsen@gmx.de> in
4967         <https://lists.gnu.org/archive/html/bug-gnulib/2023-08/msg00012.html>.
4968         * m4/stdalign.m4 (gl_ALIGNASOF): Test whether __cplusplus is defined
4969         before evaluating it. Assume HAVE_STDALIGN_H, _GL_STDALIGN_NEEDS_STDDEF
4970         are never defined to 0.
4972 2023-08-03  Bruno Haible  <bruno@clisp.org>
4974         doc: More platform detail.
4975         * doc/posix-functions/fnmatch.texi: Mention Solaris OpenIndiana here,
4976         since it behaves differently than Solaris 11.4.
4978 2023-08-03  Bruno Haible  <bruno@clisp.org>
4980         doc: Add references to FreeBSD bugs.
4981         * doc/posix-functions/fnmatch.texi: Add commented reference to FreeBSD
4982         bug.
4983         * doc/posix-functions/wcscmp.texi: Likewise.
4984         * doc/posix-functions/wcsncmp.texi: Likewise.
4986 2023-08-02  Bruno Haible  <bruno@clisp.org>
4988         readutmp: In systemd mode, put the X11 display into the ut_host field.
4989         * lib/readutmp.c (read_utmp): In sessions of type "x11", use the X11
4990         display as host.
4992 2023-08-02  Bruno Haible  <bruno@clisp.org>
4994         readutmp: Small change to reduce the code size on the coreutils side.
4995         * lib/readutmp.h (UT_ID_SIZE): New constant and macro.
4997 2023-08-01  Bruno Haible  <bruno@clisp.org>
4999         readutmp: Small changes to reduce the code size on the coreutils side.
5000         * m4/readutmp.m4 (gl_READUTMP): Test also for the ut_host field in
5001         'struct utmpx' and 'struct utmp'.
5002         * lib/readutmp.h (HAVE_STRUCT_XTMP_UT_HOST): New macro.
5003         (UT_USER_SIZE): Define also as a macro. Set to -1 if
5004         READUTMP_USE_SYSTEMD.
5005         (UT_LINE_SIZE, UT_HOST_SIZE): New constants and macros.
5007 2023-08-01  Bruno Haible  <bruno@clisp.org>
5009         readutmp: For year-2038 safety on Linux/{x86,arm}, use systemd APIs.
5010         Suggested by Thorsten Kukuk <kukuk@suse.com> in
5011         <https://www.thkukuk.de/blog/Y2038_glibc_utmp_64bit/> and
5012         <https://github.com/thkukuk/utmpx/blob/main/utmp-to-logind.md>.
5013         * m4/systemd.m4: New file.
5014         * m4/readutmp.m4 (gl_READUTMP): Require gl_SYSTEMD_CHOICE. Set
5015         READUTMP_LIB. Conditionally define READUTMP_USE_SYSTEMD.
5016         * lib/readutmp.h: For READUTMP_USE_SYSTEMD, include <sys/time.h> and
5017         <utmpx.h>.
5018         (struct gl_utmp): New type.
5019         (UTMP_STRUCT_NAME, UT_TIME_MEMBER, UT_EXIT_E_TERMINATION,
5020         UT_EXIT_E_EXIT, UT_USER, HAVE_STRUCT_XTMP_UT_EXIT,
5021         HAVE_STRUCT_XTMP_UT_ID, HAVE_STRUCT_XTMP_UT_PID): Define differently for
5022         READUTMP_USE_SYSTEMD.
5023         (UT_USER_SIZE): Don't define for READUTMP_USE_SYSTEMD.
5024         (UT_TYPE_EQ, UT_TYPE_NOT_DEFINED, READ_UTMP_SUPPORTED): Define also for
5025         READUTMP_USE_SYSTEMD.
5026         (free_utmp): New declaration.
5027         * lib/readutmp.c: Add new includes for READUTMP_USE_SYSTEMD.
5028         (extract_trimmed_name): Adapt to READUTMP_USE_SYSTEMD.
5029         (get_boot_time_uncached, get_boot_time, guess_pty_name): New functions.
5030         (read_utmp): New implementation for READUTMP_USE_SYSTEMD.
5031         (free_utmp): New function.
5032         * tests/test-readutmp.c (main): At the end, invoke free_utmp.
5033         * modules/readutmp (Files): Add m4/systemd.m4.
5034         (Link): New section.
5035         * modules/readutmp-tests (Makefile.am): Link test-readutmp with
5036         READUTMP_LIB.
5037         * NEWS: Mention the free_utmp function and the READUTMP_LIB link
5038         requirement.
5040 2023-08-01  Bruno Haible  <bruno@clisp.org>
5042         readutmp: Trivial simplification.
5043         * lib/readutmp.c (extract_trimmed_name): Use constant UT_USER_SIZE.
5045 2023-07-31  Bruno Haible  <bruno@clisp.org>
5047         readutmp tests: Show also the ut_line field.
5048         * tests/test-readutmp.c (main): Add a "Device" column to the table.
5049         Adjust the column widths. Flush stdout before possibly calling abort().
5051 2023-07-31  Bruno Haible  <bruno@clisp.org>
5053         readutmp: Fix test failure on OpenBSD.
5054         * lib/readutmp.c (desirable_utmp_entry): On OpenBSD, eliminate entirely
5055         empty entries.
5057 2023-07-31  Bruno Haible  <bruno@clisp.org>
5059         readutmp: Revisit portability.
5060         * m4/readutmp.m4 (gl_READUTMP): Don't test for struct utmp.ut_exit.ut_*,
5061         since no platform has these.
5062         * lib/readutmp.h (UT_EXIT_E_TERMINATION): Don't test
5063         HAVE_STRUCT_UTMP_UT_EXIT_UT_TERMINATION.
5064         (UT_EXIT_E_EXIT): Don't test HAVE_STRUCT_UTMP_UT_EXIT_UT_EXIT.
5065         * doc/posix-headers/utmpx.texi: Update platforms list. Mention
5066         portability problems of specific 'struct utmpx' fields.
5067         * doc/glibc-headers/utmp.texi: Update platforms list. Mention
5068         portability problems of specific 'struct utmp' fields.
5070 2023-07-31  Bruno Haible  <bruno@clisp.org>
5072         readutmp: Make argument names consistent.
5073         * lib/readutmp.h (UT_TIME_MEMBER, UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT,
5074         UT_USER, UT_PID, UT_TYPE_EQ, UT_TYPE_BOOT_TIME, UT_TYPE_USER_PROCESS,
5075         IS_USER_PROCESS): Rename parameter to 'UT'.
5076         * lib/readutmp.c (desirable_utmp_entry, read_utmp): Rename local
5077         variable 'u' to 'ut'.
5079 2023-07-31  Bruno Haible  <bruno@clisp.org>
5081         readutmp: Make the header file and function usable on all platforms.
5082         * lib/readutmp.h (struct gl_utmp, UTMP_STRUCT_NAME, UT_TIME_MEMBER,
5083         UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT, UT_USER): Provide fallback
5084         definitions.
5085         (READ_UTMP_SUPPORTED): New macro.
5086         * lib/readutmp.c (read_utmp) [!READ_UTMP_SUPPORTED]: Provide a dummy
5087         definition.
5088         * modules/readutmp (Depends-on): Add sys_time.
5089         (configure.ac): Remove conditional.
5090         (Makefile.am): Compile readutmp.c on all platforms.
5091         (Include): Include readutmp.h on all platforms.
5092         * tests/test-readutmp.c: Include readutmp.h on all platforms.
5093         (main): Invoke read_utmp on all platforms.
5095 2023-07-30  Bruno Haible  <bruno@clisp.org>
5097         readutmp: Add tests.
5098         * tests/test-readutmp.c: New file.
5099         * modules/readutmp-tests: New file.
5101         readutmp: Improve comments. Fix module description.
5102         * lib/readutmp.h (extract_trimmed_name): Add specification comment.
5103         (read_utmp): Move specification comment from lib/readutmp.c to here.
5104         Mention also UTMP_FILE and READ_UTMP_USER_PROCESS.
5105         * lib/readutmp.c (extract_trimmed_name): Fix comment.
5106         * modules/readutmp (Include): Only include the .h file if
5107         HAVE_UTMPX_H || HAVE_UTMP_H.
5109 2023-07-29  Paul Eggert  <eggert@cs.ucla.edu>
5111         readutmp: work around glibc utmpx bug
5112         When compiled with _TIME_BITS=64, glibc <utmpx.h> does not work,
5113         because the files use 32-bit time_t and the code passes this to
5114         the user unmodified, but <utmpx.h> defines a struct with 64-bit
5115         time_t.  Work around this compatibility bug.
5116         * lib/readutmp.c (copy_utmp_entry): New function.
5117         (read_utmp): Use it.
5119 2023-07-29  Bruno Haible  <bruno@clisp.org>
5121         wcsrtombs tests: Renumber tests.
5122         * tests/test-wcsrtombs*.sh: Renamed 1 -> 2 -> 3 -> 4 -> 5.
5123         * tests/test-wcsrtombs.c: Update.
5124         * modules/wcsrtombs-tests: Update.
5126         wcsnrtombs tests: Renumber tests.
5127         * tests/test-wcsnrtombs*.sh: Renamed 1 -> 2 -> 3 -> 4 -> 5.
5128         * tests/test-wcsnrtombs.c: Update.
5129         * modules/wcsnrtombs-tests: Update.
5131         wcrtomb tests: Renumber tests.
5132         * tests/test-wcrtomb.sh: Renamed 1 -> 2 -> 3 -> 4 -> 5 -> 1.
5133         * tests/test-wcrtomb.c: Update.
5134         * tests/test-wcrtomb-w32-*.sh: Renamed 1 -> 2 -> 3 -> 5 -> 7 -> 4 -> 6
5135         -> 8.
5136         * tests/test-wcrtomb-w32.c: Update.
5137         * modules/wcrtomb-tests: Update.
5139         mbstoc32s tests: Renumber tests.
5140         * tests/test-mbstoc32s-*.sh: Renamed 1 -> 2 -> 3 -> 4 -> 5 -> 1.
5141         * tests/test-mbstoc32s.c: Update.
5143         mbsrtoc32s tests: Renumber tests.
5144         * tests/test-mbsrtoc32s-*.sh: Renamed 1 -> 2 -> 3 -> 4 -> 5 -> 1.
5145         * tests/test-mbsrtoc32s.c: Update.
5147         mbsnrtoc32s tests: Renumber tests.
5148         * tests/test-mbsnrtoc32s-*.sh: Renamed 1 -> 2 -> 3 -> 4 -> 5 -> 1.
5149         * tests/test-mbsnrtoc32s.c: Update.
5151         mbstowcs tests: Renumber tests.
5152         * tests/test-mbstowcs*.sh: Renamed 1 -> 2 -> 3 -> 4 -> 5 -> 1.
5153         * tests/test-mbstowcs.c: Update.
5154         * modules/mbstowcs-tests: Update.
5156         mbsrtowcs tests: Renumber tests.
5157         * tests/test-mbsrtowcs*.sh: Renamed 1 -> 2 -> 3 -> 4 -> 5 -> 1.
5158         * tests/test-mbsrtowcs.c: Update.
5159         * modules/mbsrtowcs-tests: Update.
5161         mbsnrtowcs tests: Renumber tests.
5162         * tests/test-mbsnrtowcs*.sh: Renamed 1 -> 2 -> 3 -> 4 -> 5 -> 1.
5163         * tests/test-mbsnrtowcs.c: Update.
5164         * modules/mbsnrtowcs-tests: Update.
5166         mbrtoc16 tests: Renumber tests.
5167         * tests/test-mbrtoc16-*.sh: Renamed 1 -> 2 -> 3 -> 4 -> 5 -> 1.
5168         * tests/test-mbrtoc16.c: Update.
5169         * tests/test-mbrtoc16-w32-*.sh: Renamed 1 -> 2 -> 3 -> 5 -> 7 -> 4 -> 6
5170         -> 8.
5171         * tests/test-mbrtoc16-w32.c: Update.
5172         * modules/mbrtoc16-tests: Update.
5174         mbrtoc32 tests: Renumber tests.
5175         * tests/test-mbrtoc32-*.sh: Renamed 1 -> 2 -> 3 -> 4 -> 5 -> 1.
5176         * tests/test-mbrtoc32.c: Update.
5177         * tests/test-mbrtoc32-w32-*.sh: Renamed 1 -> 2 -> 3 -> 5 -> 7 -> 4 -> 6
5178         -> 8.
5179         * tests/test-mbrtoc32-w32.c: Update.
5180         * modules/mbrtoc32-tests: Update.
5182         mbrtowc tests: Renumber tests.
5183         * tests/test-mbrtowc*.sh: Renamed 1 -> 2 -> 3 -> 4 -> 5 -> 1.
5184         * tests/test-mbrtowc.c: Update.
5185         * tests/test-mbrtowc-w32-*.sh: Renamed 1 -> 2 -> 3 -> 5 -> 7 -> 4 -> 6
5186         -> 8.
5187         * tests/test-mbrtowc-w32.c: Update.
5188         * modules/mbrtowc-tests: Update.
5190         mbrlen tests: Renumber tests.
5191         * tests/test-mbrlen*.sh: Renamed 1 -> 2 -> 3 -> 4 -> 5 -> 1.
5192         * tests/test-mbrlen.c: Update.
5193         * tests/test-mbrlen-w32-*.sh: Renamed 1 -> 2 -> 3 -> 5 -> 7 -> 4 -> 6
5194         -> 8.
5195         * tests/test-mbrlen-w32.c: Update.
5196         * modules/mbrlen-tests: Update.
5198         mbmemcasecoll tests: Renumber tests.
5199         * tests/test-mbmemcasecoll*.sh: Renamed 1 -> 2 -> 3 -> 4.
5200         * tests/test-mbmemcasecoll.c: Update.
5201         * modules/mbmemcasecoll-tests: Update.
5203         mbmemcasecmp tests: Renumber tests.
5204         * tests/test-mbmemcasecmp*.sh: Renamed 1 -> 2 -> 3 -> 4.
5205         * tests/test-mbmemcasecmp.c: Update.
5206         * modules/mbmemcasecmp-tests: Update.
5208         fnmatch tests: Renumber tests.
5209         * tests/test-fnmatch-w32-*.sh: Renamed 1 -> 2 -> 3 -> 5 -> 7 -> 4 -> 6
5210         -> 8.
5211         * tests/test-fnmatch-w32.c: Update.
5212         * modules/fnmatch-tests: Update.
5214         c32stombs tests: Renumber tests.
5215         * tests/test-c32stombs-*.sh: Renamed 1 -> 2 -> 3 -> 4 -> 5.
5216         * tests/test-c32stombs.c: Update.
5217         * modules/c32stombs-tests: Update.
5219         c32srtombs tests: Renumber tests.
5220         * tests/test-c32srtombs-*.sh: Renamed 1 -> 2 -> 3 -> 4 -> 5.
5221         * tests/test-c32srtombs.c: Update.
5222         * modules/c32srtombs-tests: Update.
5224         c32snrtombs tests: Renumber tests.
5225         * tests/test-c32snrtombs-*.sh: Renamed 1 -> 2 -> 3 -> 4 -> 5.
5226         * tests/test-c32snrtombs.c: Update.
5227         * modules/c32snrtombs-tests: Update.
5229         c32rtomb tests: Renumber tests.
5230         * tests/test-c32rtomb.sh: Renamed 1 -> 2 -> 3 -> 4 -> 5 -> 1.
5231         * tests/test-c32rtomb.c: Update.
5232         * tests/test-c32rtomb-w32-*.sh: Renamed 1 -> 2 -> 3 -> 5 -> 7 -> 4 -> 6
5233         -> 8.
5234         * tests/test-c32rtomb-w32.c: Update.
5235         * modules/c32rtomb-tests: Update.
5237         btoc32 tests: Renumber tests.
5238         * tests/test-btoc32-*.sh: Renamed 1 -> 2 -> 3 -> 1.
5239         * tests/test-btoc32.c: Update.
5241         btowc tests: Renumber tests.
5242         * tests/test-btowc*.sh: Renamed 1 -> 2 -> 3 -> 1.
5243         * tests/test-btowc.c: Update.
5244         * modules/btowc-tests: Update.
5246 2023-07-29  Bruno Haible  <bruno@clisp.org>
5248         time-h: Simplify after 2017-05-01 change.
5249         * m4/time_h.m4 (gl_TIME_H_DEFAULTS): Don't provide a default value for
5250         GNULIB_GETTIMEOFDAY.
5252         time-h: Obey GNULIB_POSIXCHECK, not GNULIB_PORTCHECK.
5253         * lib/time.in.h (timespec_get, timespec_getres, time, nanosleep, tzset,
5254         mktime, localtime_r, gmtime_r, localtime, strptime, ctime, strftime,
5255         timegm): Add _GL_WARN_ON_USE invocation.
5256         (asctime, ctime): Don't assume that these functions are declared, since
5257         POSIX obsoletes them.
5258         * m4/time_h.m4 (gl_TIME_H): Test for the declarations of asctime, ctime,
5259         gmtime_r, localtime, localtime_r, mktime, nanosleep, strftime, strptime,
5260         time, timegm, timespec_get, timespec_getres, tzset.
5261         (gl_TIME_H_DEFAULTS): Initialize REPLACE_CTIME, REPLACE_LOCALTIME_R,
5262         REPLACE_MKTIME, REPLACE_NANOSLEEP, REPLACE_STRFTIME, REPLACE_TIMEGM,
5263         REPLACE_TIMESPEC_GET, REPLACE_TZSET with 0 instead of GNULIB_PORTCHECK.
5264         * m4/ctime.m4 (gl_FUNC_CTIME): Don't re-initialize REPLACE_CTIME.
5265         * m4/time_r.m4 (gl_TIME_R): Don't re-initialize REPLACE_LOCALTIME_R.
5266         * m4/mktime.m4 (gl_FUNC_MKTIME): Don't re-initialize REPLACE_MKTIME.
5267         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Don't re-initialize
5268         REPLACE_NANOSLEEP.
5269         * m4/strftime-fixes.m4 (gl_FUNC_STRFTIME): Don't re-initialize
5270         REPLACE_STRFTIME.
5271         * m4/timegm.m4 (gl_FUNC_TIMEGM): Don't re-initialize REPLACE_TIMEGM.
5272         * m4/timespec_get.m4 (gl_FUNC_TIMESPEC_GET): Don't re-initialize
5273         REPLACE_TIMESPEC_GET.
5274         * m4/tzset.m4 (gl_FUNC_TZSET: Don't re-initialize REPLACE_TZSET.
5276 2023-07-28  Bruno Haible  <bruno@clisp.org>
5278         fnmatch: Ensure that on Cygwin ≥ 3.5.0, Cygwin's native fnmatch is used.
5279         Tested by Corinna Vinschen in
5280         <https://cygwin.com/pipermail/cygwin/2023-July/254036.html>.
5281         * m4/fnmatch.m4 (gl_FUNC_FNMATCH_POSIX): On Cygwin, don't force
5282         REPLACE_FNMATCH to 1 just because wchar_t is small.
5284 2023-07-28  Bruno Haible  <bruno@clisp.org>
5286         posixcheck: Fix dependencies.
5287         * modules/posixcheck (Depends-on): Add malloc-h, pthread-h, sched,
5288         sys_random, threads-h, uchar, utmp.
5290 2023-07-28  Bruno Haible  <bruno@clisp.org>
5292         uchar: Include the necessary snippets.
5293         * lib/uchar.in.h: Add insertion points for _GL_ARG_NONNULL and
5294         _GL_WARN_ON_USE.
5295         * modules/uchar (Depends-on): Add snippet/arg-nonnull,
5296         snippet/warn-on-use.
5297         (Makefile.am): In uchar.h, include the ARG_NONNULL_H and WARN_ON_USE_H
5298         snippets.
5300 2023-07-28  Bruno Haible  <bruno@clisp.org>
5302         mbmemcasecmp, mbmemcasecoll: Avoid test failure on MSVC.
5303         * tests/test-mbmemcasecmp.h (test_utf_8): Disable two tests on platforms
5304         that don't have the upper/lower mappings for 'ü'/'Ü'.
5305         * tests/test-mbmemcasecmp.c: Include <wchar.h>, <wctype.h>.
5306         * tests/test-mbmemcasecoll.c: Likewise.
5307         * modules/mbmemcasecmp-tests (Depends-on): Add mbrtowc, wctype-h.
5308         * modules/mbmemcasecoll-tests (Depends-on): Likewise.
5310 2023-07-27  Bruno Haible  <bruno@clisp.org>
5312         gnulib-tool: Include ftruncate in testdirs.
5313         * gnulib-tool (func_create_testdir): Don't exclude module 'ftruncate'
5314         from testdirs by default.
5315         * pygnulib/GLTestDir.py (GLTestDir.execute): Likewise.
5317 2023-07-27  Bruno Haible  <bruno@clisp.org>
5319         fnmatch-h, glob-h tests: Fix link errors (regression 2023-07-24).
5320         * modules/fnmatch-h-c++-tests (Makefile.am): Link test-fnmatch-h-c++
5321         with $(LIBUNISTRING).
5322         * modules/glob-h-c++-tests (Makefile.am): Link test-glob-h-c++ with
5323         $(LIBUNISTRING).
5325         fnmatch, glob tests: Fix link errors (regression 2023-07-24).
5326         * modules/fnmatch-tests (Makefile.am): Link test-fnmatch-w32 with the
5327         same libraries as test-fnmatch.
5328         * modules/glob (Link): Add $(LIBUNISTRING).
5329         * modules/glob-tests (Makefile.am): Link test-glob with $(LIBUNISTRING).
5331 2023-07-26  Bruno Haible  <bruno@clisp.org>
5333         wctrans: Work around bug on NetBSD.
5334         * lib/wctype.in.h (rpl_wctrans_t, wctrans_t, GNULIB_defined_wctrans_t):
5335         Define if REPLACE_WCTRANS is 1.
5336         (wctrans): Consider REPLACE_WCTRANS.
5337         (towctrans): Override if REPLACE_WCTRANS is 1.
5338         * m4/wctype_h.m4 (gl_WCTYPE_H_DEFAULTS): Initialize REPLACE_WCTRANS.
5339         * m4/wctrans.m4 (gl_FUNC_WCTRANS): Define through AC_DEFUN_ONCE. Test
5340         whether wctrans supports the "tolower" character mapping. Set
5341         REPLACE_WCTRANS if not.
5342         * m4/towctrans.m4 (gl_FUNC_TOWCTRANS): Require gl_FUNC_WCTRANS.
5343         * modules/wctrans (Depends-on): Add towctrans.
5344         (configure.ac): Consider REPLACE_WCTRANS.
5345         * modules/towctrans (Files): Add m4/wctrans.m4.
5346         (configure.ac): Override also if REPLACE_WCTRANS is 1.
5347         * modules/wctype-h (Makefile.am): Substitute REPLACE_WCTRANS.
5348         * doc/posix-functions/wctrans.texi: Mention the NetBSD bug.
5350 2023-07-26  Bruno Haible  <bruno@clisp.org>
5352         towctrans: Add tests.
5353         * tests/test-towctrans.c: New file, based on
5354         tests/test-c32_apply_mapping.c.
5355         * modules/towctrans-tests: New file.
5357         wctrans: Add tests.
5358         * tests/test-wctrans.c: New file, based on tests/test-c32_get_mapping.c.
5359         * modules/wctrans-tests: New file.
5361 2023-07-26  Bruno Haible  <bruno@clisp.org>
5363         fnmatch: Update dependencies.
5364         * modules/fnmatch (Depends-on): Add wctype.
5366 2023-07-26  Bruno Haible  <bruno@clisp.org>
5368         wctype: Work around wctype+iswctype bug on MSVC.
5369         * m4/wctype.m4 (gl_FUNC_WCTYPE): In the test program, test also for the
5370         MSVC bug. Update cross-compilation guess.
5371         * doc/posix-functions/wctype.texi: Mention the MSVC bug.
5373 2023-07-26  Bruno Haible  <bruno@clisp.org>
5375         wctype: Work around wctype bug on mingw.
5376         * lib/wctype.in.h (rpl_wctype_t, wctype_t, GNULIB_defined_wctype_t):
5377         Define if REPLACE_WCTYPE is 1.
5378         (wctype): Consider REPLACE_WCTYPE.
5379         (iswctype): Override also if REPLACE_WCTYPE is 1.
5380         * lib/iswctype.c: If GNULIB_defined_wctype_t is defined, use the
5381         function-pointer based implementation.
5382         * m4/wctype_h.m4 (gl_WCTYPE_H_DEFAULTS): Initialize REPLACE_WCTYPE.
5383         * m4/wctype.m4 (gl_FUNC_WCTYPE): Define through AC_DEFUN_ONCE. Test
5384         whether wctype supports the "blank" character class. Set REPLACE_WCTYPE
5385         if not.
5386         * m4/iswctype.m4 (gl_FUNC_ISWCTYPE): Require gl_FUNC_WCTYPE.
5387         * modules/wctype (Status, Notice): Remove.
5388         (Depends-on): Add iswctype. Consider REPLACE_WCTYPE.
5389         (configure.ac): Consider REPLACE_WCTYPE.
5390         * modules/iswctype (Status, Notice): Remove.
5391         (Files): Add m4/wctype.m4.
5392         (configure.ac): Override also if REPLACE_WCTYPE is 1.
5393         * modules/wctype-h (Makefile.am): Substitute REPLACE_WCTYPE.
5394         * doc/posix-functions/wctype.texi: Mention the mingw bug.
5396 2023-07-26  Bruno Haible  <bruno@clisp.org>
5398         wctype-h: Work around iswprint bug on mingw.
5399         * lib/wctype.in.h (rpl_iswprint): On mingw, don't use the system's
5400         iswprint function.
5401         * tests/test-wctype-h.c (main): Verify that this character class
5402         contains the ASCII space but not tab and newline.
5403         * tests/test-c32isprint.c (main): For tab, \v, \f, expect the same value
5404         on native Windows as on other platforms.
5405         * doc/posix-functions/iswprint.texi: Mention the mingw bug.
5407 2023-07-26  Bruno Haible  <bruno@clisp.org>
5409         iswblank tests: Add more tests.
5410         * tests/test-iswblank.c (main): Verify that this character class
5411         contains the ASCII space and tab, but not newline.
5413 2023-07-26  Bruno Haible  <bruno@clisp.org>
5415         wctype, wctrans: Require a non-NULL argument.
5416         * lib/wctype.in.h: Add placeholder for definition of _GL_ARG_NONNULL.
5417         (wctype, wctrans): Mark with _GL_ARG_NONNULL ((1)).
5418         * modules/wctype-h (Depends-on): Add snippet/arg-nonnull.
5419         (Makefile.am): Substitute $(ARG_NONNULL_H) into wctype.h.
5421 2023-07-25  Bruno Haible  <bruno@clisp.org>
5423         iswctype: Add tests.
5424         * tests/test-iswctype.c: New file, based on
5425         tests/test-c32_apply_type_test.c.
5426         * tests/test-c32_apply_type_test.c (main): Update accordingly.
5427         * modules/iswctype-tests: New file.
5429         wctype: Add tests.
5430         * tests/test-wctype.c: New file, based on
5431         tests/test-c32_get_type_test.c.
5432         * modules/wctype-tests: New file.
5434 2023-07-25  Bruno Haible  <bruno@clisp.org>
5436         Compile benchmark programs without assertions.
5437         * modules/mbiter-bench-tests (Makefile.am): Compile bench-mbiter with
5438         -DNDEBUG.
5439         * modules/mbiterf-bench-tests (Makefile.am): Compile bench-mbiterf with
5440         -DNDEBUG.
5441         * modules/mbuiter-bench-tests (Makefile.am): Compile bench-mbuiter with
5442         -DNDEBUG.
5443         * modules/mbuiterf-bench-tests (Makefile.am): Compile bench-mbuiterf
5444         with -DNDEBUG.
5445         * modules/mbswidth-bench-tests (Makefile.am): Compile bench-mbswidth
5446         with -DNDEBUG.
5447         * modules/crypto/md5-buffer-tests (Makefile.am): Compile bench-md5 with
5448         -DNDEBUG.
5449         * modules/crypto/sha1-buffer-tests (Makefile.am): Compile bench-sha1
5450         with -DNDEBUG.
5451         * modules/crypto/sha256-buffer-tests (Makefile.am): Compile bench-sha224
5452         and bench-sha256 with -DNDEBUG.
5453         * modules/crypto/sha512-buffer-tests (Makefile.am): Compile bench-sha384
5454         and bench-sha512 with -DNDEBUG.
5456 2023-07-25  Bruno Haible  <bruno@clisp.org>
5458         unistr/u8-*: Make Unicode decoder more Unicode Standard compliant.
5459         Based on a remark by Paul Eggert in
5460         <https://lists.gnu.org/archive/html/bug-gnulib/2023-07/msg00120.html>.
5461         * tests/unistr/test-u8-mbtouc.c (test_safe_function): Change expected
5462         results for "non-shortest form" or out-of-range byte sequences. Add new
5463         test cases of incomplete well-formed byte sequences.
5464         * tests/unistr/test-u8-mbsnlen.c (main): Likewise.
5465         * lib/unistr/u8-mbtouc-aux.c (u8_mbtouc_aux): Reject a first byte in the
5466         range 0xF5..0xF7 as invalid. Distinguish incomplete from invalid byte
5467         sequences correctly. For the former, return only the number of bytes in
5468         the maximal well-formed subpart.
5469         * lib/unistr/u8-mbtouc.c (u8_mbtouc): Likewise.
5470         * lib/unistr/u8-check.c (u8_check): Reject a first byte in the range
5471         0xF5..0xF7 as invalid.
5472         * lib/unistr/u8-mblen.c (u8_mblen): Likewise.
5473         * lib/unistr/u8-mbtoucr.c (u8_mbtoucr): Likewise.
5474         * lib/unistr/u8-strmbtouc.c (u8_strmbtouc): Likewise.
5475         * lib/unistr/u8-strmblen.c (u8_strmblen): Likewise.
5476         * lib/unistr/u8-prev.c (u8_prev): Likewise.
5478 2023-07-24  Bruno Haible  <bruno@clisp.org>
5480         fnmatch: Overcome wchar_t limitations.
5481         * m4/fnmatch.m4 (gl_FUNC_FNMATCH_POSIX): Set REPLACE_FNMATCH to 1 on
5482         AIX in 32-bit mode.
5483         * lib/fnmatch.c: Include <uchar.h>. Conditionally include unistr.h.
5484         (UCHAR_TO_WCHAR): Renamed from BTOWC.
5485         (WCHAR_T, WINT_T, BTOWC, MBSRTOWCS, WCSLEN, WCSCAT, WMEMPCPY, WMEMCHR,
5486         TOWLOWER, WCTYPE_T, WCTYPE, ISWCTYPE): New macros.
5487         (IS_CHAR_CLASS): Use WCTYPE instead of wctype.
5488         (UCHAR_TO_WCHAR): Use BTOWC instead of btowc.
5489         (FOLD): Use TOWLOWER instead of towlower.
5490         (CHAR): Use WCHAR_T instead of wchar_t.
5491         (UCHAR, INT): Use WINT_T instead of wint_t.
5492         (STRLEN): Use WCSLEN instead of wcslen.
5493         (STRCAT): Use WCSCAT instead of wcscat.
5494         (MEMPCPY): Use WMEMPCPY instead of wmempcpy.
5495         (MEMCHR): Use WMEMCHR instead of wmemchr.
5496         (is_char_class): Use WCTYPE_T instead of wctype_t, WCHAR_T instead of
5497         wchar_t, WCTYPE instead of wctype.
5498         (fnmatch): Use WCHAR_T instead of wchar_t, MBSRTOWCS instead of
5499         mbsrtowcs.
5500         * lib/fnmatch_loop.c (FCT): Use WCTYPE_T instead of wctype_t, ISWCTYPE
5501         instead of iswctype. Update for renamed BTOWC.
5502         * modules/fnmatch (Depends-on): Add btoc32, c32tolower,
5503         c32_get_type_test, c32_apply_type_test, mbsrtoc32s, unistr/u32-chr,
5504         unistr/u32-pcpy, unistr/u32-strcat, unistr/u32-strlen.
5505         (Link): Add $(LIBUNISTRING).
5506         * modules/fnmatch-tests (Makefile.am): Link test-fnmatch with
5507         $(LIBUNISTRING).
5508         * doc/posix-functions/fnmatch.texi: Move the Cygwin, mingw, MSVC, AIX
5509         bug descriptions to the "fixed by Gnulib" section.
5511 2023-07-24  Bruno Haible  <bruno@clisp.org>
5513         fnmatch: Update doc regarding Solaris 10.
5514         * doc/posix-functions/fnmatch.texi: Move the Solaris 10 bug description
5515         to the "fixed by Gnulib" section.
5517 2023-07-23  Paul Eggert  <eggert@cs.ucla.edu>
5519         timespec_get: port to Ubuntu 23.04
5520         * m4/timespec_get.m4 (gl_FUNC_TIMESPEC_GET):
5521         Default REPLACE_TIMESPEC_GET to 0, fixing a typo.
5523 2023-07-23  Bruno Haible  <bruno@clisp.org>
5525         unistr/u32-strcat: Relicense under LGPLv2+.
5526         * modules/unistr/u32-strcat (License): Change to LGPLv2+.
5527         * lib/unistr/u32-strcat.c: Update license notice.
5528         * lib/unistr/u-strcat.h: Likewise.
5530 2023-07-23  Bruno Haible  <bruno@clisp.org>
5532         unistr/u32-strlen: Relicense under LGPLv2+.
5533         * modules/unistr/u32-strlen (License): Change to LGPLv2+.
5534         * lib/unistr/u32-strlen.c: Update license notice.
5536 2023-07-23  Bruno Haible  <bruno@clisp.org>
5538         unistr/u32-chr: Relicense under LGPLv2+.
5539         * modules/unistr/u32-chr (License): Change to LGPLv2+.
5540         * lib/unistr/u32-chr.c: Update license notice.
5542 2023-07-23  Paul Eggert  <eggert@cs.ucla.edu>
5544         utimecmp: clean up old spare1 cruft
5545         * lib/utimecmp.c: Remove a ‘defined HAVE_STRUCT_STAT_ST_SPARE1’
5546         that has been false since 2007.
5548 2023-07-23  Bruno Haible  <bruno@clisp.org>
5550         fnmatch tests: Avoid a test failure on FreeBSD.
5551         * tests/test-fnmatch.c (main): In a GB18030 locale, test the towupper()
5552         mapping of 'ö', not of 'ü'.
5554 2023-07-23  Bruno Haible  <bruno@clisp.org>
5556         fnmatch: Work around bugs on FreeBSD, NetBSD, Solaris, Cygwin, Android.
5557         * m4/fnmatch.m4 (gl_FUNC_FNMATCH_POSIX): Add three more test cases to
5558         the test program. Reorganize its return values.
5559         * tests/test-fnmatch.c (main): Reflect the changes done in fnmatch.m4.
5560         * doc/posix-functions/fnmatch.texi: Move the corresponding bug
5561         descriptions to the "fixed by Gnulib" section.
5563 2023-07-23  Bruno Haible  <bruno@clisp.org>
5565         fnmatch, fnmatch-gnu: Document known bugs.
5566         * doc/posix-headers/fnmatch.texi: Mention the macros FNM_LEADING_DIR,
5567         FNM_CASEFOLD, FNM_EXTMATCH, FNM_FILE_NAME.
5568         * doc/posix-functions/fnmatch.texi: Reference the glibc documentation
5569         and the Linux man page. Document the effects of the two modules and all
5570         the known bugs in detail.
5572 2023-07-22  Bruno Haible  <bruno@clisp.org>
5574         fnmatch tests: Add many more test cases.
5575         * lib/fnmatch.in.h (GNULIB_defined_fnmatch_function): New macro.
5576         * tests/test-fnmatch.c: Add many more test cases.
5577         * tests/test-fnmatch-1.sh: New file, based on tests/test-mbrtoc32-5.sh.
5578         * tests/test-fnmatch-2.sh: New file, based on tests/test-mbrtoc32-1.sh.
5579         * tests/test-fnmatch-3.sh: New file, based on tests/test-mbrtoc32-2.sh.
5580         * tests/test-fnmatch-4.sh: New file, based on tests/test-mbrtoc32-3.sh.
5581         * tests/test-fnmatch-5.sh: New file, based on tests/test-mbrtoc32-4.sh.
5582         * tests/test-fnmatch-w32.c: New file, based on tests/test-mbrtoc32-w32.c
5583         and tests/test-fnmatch.c.
5584         * tests/test-fnmatch-w32-1.sh: New file, based on
5585         tests/test-mbrtoc32-w32-1.sh.
5586         * tests/test-fnmatch-w32-2.sh: New file, based on
5587         tests/test-mbrtoc32-w32-2.sh.
5588         * tests/test-fnmatch-w32-3.sh: New file, based on
5589         tests/test-mbrtoc32-w32-3.sh.
5590         * tests/test-fnmatch-w32-4.sh: New file, based on
5591         tests/test-mbrtoc32-w32-4.sh.
5592         * tests/test-fnmatch-w32-5.sh: New file, based on
5593         tests/test-mbrtoc32-w32-5.sh.
5594         * tests/test-fnmatch-w32-6.sh: New file, based on
5595         tests/test-mbrtoc32-w32-6.sh.
5596         * tests/test-fnmatch-w32-7.sh: New file, based on
5597         tests/test-mbrtoc32-w32-7.sh.
5598         * modules/fnmatch-tests: Add the new program and shell scripts.
5600 2023-07-22  Bruno Haible  <bruno@clisp.org>
5602         doc: Mention a wctype bug.
5603         * doc/posix-functions/wctype.texi: Mention a bug on mingw.
5605 2023-07-21  Bruno Haible  <bruno@clisp.org>
5607         unistr/u8-pcpy, unistr/u16-pcpy, unistr/u32-pcpy: Add tests.
5608         * tests/unistr/test-pcpy.h: New file, based on tests/unistr/test-cpy.h.
5609         * tests/unistr/test-u8-pcpy.c: New file, based on
5610         tests/unistr/test-u8-cpy.c.
5611         * tests/unistr/test-u16-pcpy.c: New file, based on
5612         tests/unistr/test-u16-cpy.c.
5613         * tests/unistr/test-u32-pcpy.c: New file, based on
5614         tests/unistr/test-u32-cpy.c.
5615         * modules/unistr/u8-pcpy-tests: New file, based on
5616         modules/unistr/u8-cpy-tests.
5617         * modules/unistr/u16-pcpy-tests: New file, based on
5618         modules/unistr/u16-cpy-tests.
5619         * modules/unistr/u32-pcpy-tests: New file, based on
5620         modules/unistr/u32-cpy-tests.
5622         unistr/u8-pcpy, unistr/u16-pcpy, unistr/u32-pcpy: New modules.
5623         * lib/unistr.in.h (u8_pcpy, u16_pcpy, u32_pcpy): New declarations.
5624         * lib/unistr/u-pcpy.h: New file, based on lib/wmempcpy.c.
5625         * lib/unistr/u8-pcpy.c: New file, based on lib/unistr/u8-cpy.c.
5626         * lib/unistr/u16-pcpy.c: New file, based on lib/unistr/u16-cpy.c.
5627         * lib/unistr/u32-pcpy.c: New file, based on lib/unistr/u32-cpy.c.
5628         * modules/unistr/u8-pcpy: New file, based on modules/unistr/u8-cpy.
5629         * modules/unistr/u16-pcpy: New file, based on modules/unistr/u16-cpy.
5630         * modules/unistr/u32-pcpy: New file, based on modules/unistr/u32-cpy.
5632 2023-07-20  Bruno Haible  <bruno@clisp.org>
5634         error-h: Fix dependencies.
5635         Reported by <cbh34680@gmail.com> in
5636         <https://lists.gnu.org/archive/html/bug-gnulib/2023-07/msg00111.html>.
5637         * modules/error-h (Depends-on): Add include_next.
5639 2023-07-20  Pádraig Brady  <P@draigBrady.com>
5641         fts: fix compilation errors with fts_cross_check()
5642         * lib/fts.c: Fix printf format chars.
5643         * lib/fts_.h: Provide a declaration for users.
5645 2023-07-19  Bruno Haible  <bruno@clisp.org>
5647         Document migration path for obsolescent functions.
5648         * doc/glibc-functions/timespec_get.texi: Add reference to ISO C.
5649         * doc/posix-functions/_tolower.texi: Recommend use of tolower.
5650         * doc/posix-functions/_toupper.texi: Recommend use of toupper.
5651         * doc/posix-functions/asctime.texi: Recommend use of strftime.
5652         * doc/posix-functions/asctime_r.texi: Likewise.
5653         * doc/posix-functions/ctime.texi: Recommend use of localtime_r and
5654         strftime.
5655         * doc/posix-functions/ctime_r.texi: Likewise.
5656         * doc/posix-functions/ftw.texi: Recommend use of fts.
5657         * doc/posix-functions/getitimer.texi: Recommend use of timer_gettime.
5658         * doc/posix-functions/gets.texi: Recommend use of fgets.
5659         * doc/posix-functions/gettimeofday.texi: Recommend use of gettime or
5660         timespec_get.
5661         * doc/posix-functions/inet_addr.texi: Recommend use of inet_pton.
5662         * doc/posix-functions/inet_ntoa.texi: Recommend use of inet_ntop.
5663         * doc/posix-functions/pthread_getconcurrency.texi: Recommend no-op.
5664         * doc/posix-functions/pthread_setconcurrency.texi: Recommend no-op.
5665         * doc/posix-functions/rand_r.texi: Recommend use of random_r.
5666         * doc/posix-functions/setitimer.texi: Recommend use of timer_create and
5667         timer_settime.
5668         * doc/posix-functions/setpgrp.texi: Recommend use of setpgid or setsid.
5669         * doc/posix-functions/sighold.texi: Recommend use of sigprocmask.
5670         * doc/posix-functions/sigignore.texi: Recommend use of sigaction.
5671         * doc/posix-functions/siginterrupt.texi: Recommend use of sigaction.
5672         * doc/posix-functions/sigpause.texi: Recommend use of sigsuspend.
5673         * doc/posix-functions/sigrelse.texi: Recommend use of sigprocmask.
5674         * doc/posix-functions/sigset.texi: Recommend use of sigaction.
5675         * doc/posix-functions/tempnam.texi: Recommend use of mkstemp.
5676         * doc/posix-functions/ulimit.texi: Recommend use of getrlimit and
5677         setrlimit.
5678         * doc/posix-functions/utime.texi: Recommend use of utimens.
5680 2023-07-19  Paul Eggert  <eggert@cs.ucla.edu>
5682         Document POSIX obsolescence
5683         * doc/posix-functions/_longjmp.texi, doc/posix-functions/_setjmp.texi:
5684         * doc/posix-functions/_tolower.texi, doc/posix-functions/_toupper.texi:
5685         * doc/posix-functions/asctime.texi, doc/posix-functions/asctime_r.texi:
5686         * doc/posix-functions/ctime.texi, doc/posix-functions/ctime_r.texi:
5687         * doc/posix-functions/encrypt.texi, doc/posix-functions/ftw.texi:
5688         * doc/posix-functions/getitimer.texi, doc/posix-functions/gets.texi:
5689         * doc/posix-functions/gettimeofday.texi:
5690         * doc/posix-functions/inet_addr.texi:
5691         * doc/posix-functions/inet_ntoa.texi, doc/posix-functions/isascii.texi:
5692         * doc/posix-functions/pthread_getconcurrency.texi:
5693         * doc/posix-functions/pthread_setconcurrency.texi:
5694         * doc/posix-functions/rand_r.texi, doc/posix-functions/setitimer.texi:
5695         * doc/posix-functions/setkey.texi, doc/posix-functions/setpgrp.texi:
5696         * doc/posix-functions/sighold.texi, doc/posix-functions/sigignore.texi:
5697         * doc/posix-functions/siginterrupt.texi:
5698         * doc/posix-functions/sigpause.texi, doc/posix-functions/sigrelse.texi:
5699         * doc/posix-functions/sigset.texi, doc/posix-functions/tempnam.texi:
5700         * doc/posix-functions/toascii.texi, doc/posix-functions/ulimit.texi:
5701         * doc/posix-functions/utime.texi:
5702         Update as per draft 3 of POSIX 10003.1-202x.
5704 2023-07-19  Paul Eggert  <eggert@cs.ucla.edu>
5706         Don’t worry about Version 7 tolower
5707         Some code ported back to pre-C89 libraries where tolower (C) had
5708         undefined behavior if C is not an upper case character.
5709         Nowadays that function is _tolower which is itself obsolete,
5710         and much Gnulib code already assumes this part of C89 anyway.
5711         Assume C89 or better tolower, which simplifies the code
5712         and should improve performance slightly.
5713         * lib/mbmemcasecmp.c, lib/mbmemcasecoll.c, lib/mbscasecmp.c:
5714         * lib/mbscasestr.c, lib/mbsncasecmp.c, lib/mbspcasecmp.c:
5715         * lib/strcasecmp.c, lib/strcasestr.c, lib/strncasecmp.c:
5716         (TOLOWER): Remove.  All uses replaced by tolower.
5718 2023-07-19  Bruno Haible  <bruno@clisp.org>
5720         c32swidth, mbszero: Fix file list.
5721         * modules/c32swidth (Files): Add locale-ja.m4, locale-zh.m4, codeset.m4.
5722         * modules/mbszero (Files): Likewise.
5724 2023-07-19  Bruno Haible  <bruno@clisp.org>
5726         wcsnrtombs: Fix file list.
5727         * modules/wcsnrtombs (Files): Add locale-fr.m4.
5729 2023-07-19  Bruno Haible  <bruno@clisp.org>
5731         mbsnrtowcs: Fix file list.
5732         * modules/mbsnrtowcs (Files): Add locale-fr.m4, codeset.m4.
5734 2023-07-19  Bruno Haible  <bruno@clisp.org>
5736         mbrtoc16: Fix file list.
5737         * modules/mbrtoc16 (Files): Add locale-zh.m4.
5739 2023-07-19  Bruno Haible  <bruno@clisp.org>
5741         mbrlen: Fix file list.
5742         * modules/mbrlen (Files): Add locale-fr.m4, locale-ja.m4, locale-zh.m4,
5743         codeset.m4.
5745 2023-07-18  Paul Eggert  <eggert@cs.ucla.edu>
5747         mbiterf, mbuiterf: port to strict C17
5748         I ran into this problem on NetBSD 9.3.
5749         * lib/mbiterf.h (mbiterf_next) [!GNULIB_MBRTOC32_REGULAR]:
5750         * lib/mbuiterf.h (mbuiterf_next) [!GNULIB_MBRTOC32_REGULAR]:
5751         Don’t label a declaration.
5753 2023-07-18  Bruno Haible  <bruno@clisp.org>
5755         mbiter, mbiterf, mbuiter, mbuiterf: Force inlining with clang.
5756         * lib/mbiter.h (MBITER_INLINE): Use _GL_ATTRIBUTE_ALWAYS_INLINE.
5757         * lib/mbiterf.h (MBITERF_INLINE): Likewise.
5758         * lib/mbuiter.h (MBUITER_INLINE): Likewise.
5759         * lib/mbuiterf.h (MBUITERF_INLINE): Likewise.
5761 2023-07-18  Bruno Haible  <bruno@clisp.org>
5763         mbsspn: Optimize.
5764         * lib/mbsspn.c: Include mbuiterf.h instead of mbuiter.h.
5765         (mbsspn): Use mbuif_* macros instead of mbui_* macros.
5766         * modules/mbsspn (Depends-on): Add mbuiterf. Remove mbuiter.
5768         mbscspn: Optimize.
5769         * lib/mbscspn.c: Include mbuiterf.h instead of mbuiter.h.
5770         (mbscspn): Use mbuif_* macros instead of mbui_* macros.
5771         * modules/mbscspn (Depends-on): Add mbuiterf. Remove mbuiter.
5773         mbspbrk: Optimize.
5774         * lib/mbspbrk.c: Include mbuiterf.h instead of mbuiter.h.
5775         (mbspbrk): Use mbuif_* macros instead of mbui_* macros.
5776         * modules/mbspbrk (Depends-on): Add mbuiterf. Remove mbuiter.
5778         mbspcasecmp: Optimize.
5779         * lib/mbspcasecmp.c: Include mbuiterf.h instead of mbuiter.h.
5780         (mbspcasecmp): Use mbuif_* macros instead of mbui_* macros.
5781         * modules/mbspcasecmp (Depends-on): Add mbuiterf. Remove mbuiter.
5783         mbsncasecmp: Optimize.
5784         * lib/mbsncasecmp.c: Include mbuiterf.h instead of mbuiter.h.
5785         (mbsncasecmp): Use mbuif_* macros instead of mbui_* macros.
5786         * modules/mbsncasecmp (Depends-on): Add mbuiterf. Remove mbuiter.
5788         mbscasecmp: Optimize.
5789         * lib/mbscasecmp.c: Include mbuiterf.h instead of mbuiter.h.
5790         (mbscasecmp): Use mbuif_* macros instead of mbui_* macros.
5791         * modules/mbscasecmp (Depends-on): Add mbuiterf. Remove mbuiter.
5793         mbssep: Optimize.
5794         * lib/mbssep.c: Include mbuiterf.h instead of mbuiter.h.
5795         (mbssep): Use mbuif_* macros instead of mbui_* macros.
5796         * modules/mbssep (Depends-on): Add mbuiterf. Remove mbuiter.
5798         mbsrchr: Optimize.
5799         * lib/mbsrchr.c: Include mbuiterf.h instead of mbuiter.h.
5800         (mbsrchr): Use mbuif_* macros instead of mbui_* macros.
5801         * modules/mbsrchr (Depends-on): Add mbuiterf. Remove mbuiter.
5803         mbschr: Optimize.
5804         * lib/mbschr.c: Include mbuiterf.h instead of mbuiter.h.
5805         (mbschr): Use mbuif_* macros instead of mbui_* macros.
5806         * modules/mbschr (Depends-on): Add mbuiterf. Remove mbuiter.
5808         mbslen: Optimize.
5809         * lib/mbslen.c: Include mbuiterf.h instead of mbuiter.h.
5810         (mbslen): Use mbuif_* macros instead of mbui_* macros.
5811         * modules/mbslen (Depends-on): Add mbuiterf. Remove mbuiter.
5813         mbuiterf: Add a benchmark.
5814         * tests/bench-mbuiterf.c: New file, based on tests/bench-mbuiter.c.
5815         * modules/mbuiterf-bench-tests: New file, based on
5816         modules/mbuiter-bench-tests.
5818         mbuiterf: New module.
5819         * lib/mbuiterf.h: New file, based on lib/mbuiter.h.
5820         * lib/mbuiterf.c: New file, based on lib/mbuiter.c.
5821         * modules/mbuiterf: New file, based on modules/mbuiter.
5823 2023-07-18  Bruno Haible  <bruno@clisp.org>
5825         mbiterf: Fix compiler warnings.
5826         * lib/mbiterf.h (mbiterf_next): Use C99 designated initializer syntax.
5827         * tests/bench-mbiterf.c (do_test): Use a 'const char *' pointer.
5829         trim: Optimize.
5830         * lib/trim.c: Include mbiterf.h instead of mbiter.h.
5831         (trim2): Use mbif_* macros instead of mbi_* macros.
5832         * modules/trim (Depends-on): Add mbiterf. Remove mbiter.
5834         mbmemcasecmp: Optimize.
5835         * lib/mbmemcasecmp.c: Include mbiterf.h instead of mbiter.h.
5836         (mbmemcasecmp): Use mbif_* macros instead of mbi_* macros.
5837         * modules/mbmemcasecmp (Depends-on): Add mbiterf. Remove mbiter.
5839         mbsnlen: Optimize.
5840         * lib/mbsnlen.c: Include mbiterf.h instead of mbiter.h.
5841         (mbsnlen): Use mbif_* macros instead of mbi_* macros.
5842         * modules/mbsnlen (Depends-on): Add mbiterf. Remove mbiter.
5844         mbiterf: Add a benchmark.
5845         * tests/bench-mbiterf.c: New file, based on tests/bench-mbiter.c.
5846         * modules/mbiterf-bench-tests: New file, based on
5847         modules/mbiter-bench-tests.
5849         mbiterf: New module.
5850         * lib/mbiterf.h: New file, based on lib/mbiter.h.
5851         * lib/mbiterf.c: New file, based on lib/mbiter.c.
5852         * modules/mbiterf: New file, based on modules/mbiter.
5854 2023-07-18  Bruno Haible  <bruno@clisp.org>
5856         mbstok_r: Simplify dependencies.
5857         * lib/mbstok_r.c: Include <stdlib.h> instead of mbuiter.h.
5858         * modules/mbstok_r (Depends-on): Remove mbuiter.
5860 2023-07-17  Simon Josefsson  <simon@josefsson.org>
5862         announce-gen: Allow using local git user.name.
5863         * build-aux/announce-gen (readable_interval): Remove --global
5864         parameter to 'git config' call.
5866 2023-07-17  Bruno Haible  <bruno@clisp.org>
5868         mbuiter: Optimize.
5869         * lib/mbuiter.h (struct mbuiter_multi): Add cur_max field.
5870         (mbui_init): Initialize it.
5871         (mbuiter_multi_next): Use it instead of MB_CUR_MAX.
5872         (mbuiter_multi_copy): Update.
5874 2023-07-17  Bruno Haible  <bruno@clisp.org>
5876         mbchar: Reduce size of 'struct mbchar'.
5877         * modules/mbfile (configure.ac): Define GNULIB_MBFILE as an indicator.
5878         * lib/mbchar.h (MBCHAR_BUF_SIZE): Set to 4.
5879         (struct mbchar): Disable member 'buf' if the module 'mbfile' is not in
5880         use.
5881         (mb_setascii): Disable if the module 'mbfile' is not in use.
5882         (mb_copy): Update.
5884 2023-07-17  Bruno Haible  <bruno@clisp.org>
5886         mbszero: Fix for Minix.
5887         * lib/wchar.in.h: (_GL_MBSTATE_INIT_SIZE): Don't define on Minix.
5888         (_GL_MBSTATE_ZERO_SIZE): Define to 4 on Minix.
5890 2023-07-17  Bruno Haible  <bruno@clisp.org>
5892         mbszero: Source code tweaks.
5893         Suggested by Paul Eggert in
5894         <https://lists.gnu.org/archive/html/bug-gnulib/2023-07/msg00084.html>.
5895         * lib/wchar.in.h: Comment changes.
5896         (_GL_MBSTATE_INIT_SIZE): Don't define on NetBSD, Solaris, native
5897         Windows. Use a safe default at the end.
5898         (_GL_MBSTATE_ZERO_SIZE): Don't define on AIX, IRIX, Solaris, native
5899         Windows. Use a safe default at the end.
5900         * lib/mbrtoc16.c: Update comments accordingly.
5902 2023-07-16  Bruno Haible  <bruno@clisp.org>
5904         dfa: Optimize clearing an mbstate_t.
5905         * lib/dfa.c (mbszero) [GAWK]: Add fallback definition.
5906         (mbs_to_wchar, lex, addtok_wc, dfaexec_main): Use mbszero.
5907         * modules/dfa (Depends-on): Add mbszero.
5909 2023-07-16  Bruno Haible  <bruno@clisp.org>
5911         uchar-c23: Optimize clearing an mbstate_t.
5912         * lib/lc-charset-unicode.c (locale_encoding_to_unicode,
5913         unicode_to_locale_encoding): Use mbszero.
5914         * modules/uchar-c23 (Depends-on): Add mbszero.
5916 2023-07-16  Bruno Haible  <bruno@clisp.org>
5918         quotearg: Optimize clearing an mbstate_t.
5919         * lib/quotearg.c: Include <wchar.h>.
5920         (quotearg_buffer_restyled): Use mbszero.
5921         * modules/quotearg (Depends-on): Add mbszero.
5923 2023-07-16  Bruno Haible  <bruno@clisp.org>
5925         vasnprintf, vasnwprintf: Optimize clearing an mbstate_t.
5926         * lib/vasnprintf.c (VASNPRINTF): Use mbszero.
5927         * modules/vasnprintf (Depends-on): Add mbszero.
5928         * modules/vasnwprintf (Depends-on): Likewise.
5929         * modules/c-vasnprintf (Depends-on): Likewise.
5930         * modules/unistdio/u8-vasnprintf (Depends-on): Likewise.
5931         * modules/unistdio/u8-u8-vasnprintf (Depends-on): Likewise.
5932         * modules/unistdio/u16-vasnprintf (Depends-on): Likewise.
5933         * modules/unistdio/u16-u16-vasnprintf (Depends-on): Likewise.
5934         * modules/unistdio/u32-vasnprintf (Depends-on): Likewise.
5935         * modules/unistdio/u32-u32-vasnprintf (Depends-on): Likewise.
5936         * modules/unistdio/ulc-vasnprintf (Depends-on): Likewise.
5938 2023-07-16  Bruno Haible  <bruno@clisp.org>
5940         mbmemcasecoll: Optimize clearing an mbstate_t.
5941         * lib/mbmemcasecoll.c (apply_c32tolower): Use mbszero.
5942         * modules/mbmemcasecoll (Depends-on): Add mbszero.
5944 2023-07-16  Bruno Haible  <bruno@clisp.org>
5946         mbswidth: Optimize clearing an mbstate_t.
5947         * lib/mbswidth.c (mbsnwidth): Use mbszero.
5948         * modules/mbswidth (Depends-on): Add mbszero.
5950 2023-07-16  Bruno Haible  <bruno@clisp.org>
5952         mbfile: Optimize clearing an mbstate_t.
5953         * lib/mbfile.h (mbfile_multi_getc, mbf_init): Use mbszero.
5954         * modules/mbfile (Depends-on): Add mbszero.
5956 2023-07-16  Bruno Haible  <bruno@clisp.org>
5958         mbuiter: Optimize clearing an mbstate_t.
5959         * lib/mbuiter.h: Include <wchar.h>.
5960         (mbuiter_multi_next, mbuiter_multi_copy, mbui_init): Use mbszero.
5961         * modules/mbuiter (Depends-on): Add mbszero.
5963 2023-07-16  Bruno Haible  <bruno@clisp.org>
5965         mbiter: Optimize clearing an mbstate_t.
5966         * lib/mbiter.h: Include <wchar.h>.
5967         (mbiter_multi_next, mbiter_multi_copy, mbi_init): Use mbszero.
5968         * modules/mbiter (Depends-on): Add mbszero.
5970 2023-07-16  Bruno Haible  <bruno@clisp.org>
5972         c32stombs: Optimize clearing an mbstate_t.
5973         * lib/c32stombs.c (c32stombs): Use mbszero.
5974         * lib/uchar.in.h (c32stombs): Likewise.
5975         * modules/c32stombs (Depends-on): Add mbszero.
5977 2023-07-16  Bruno Haible  <bruno@clisp.org>
5979         mbstoc32s: Optimize clearing an mbstate_t.
5980         * lib/mbstoc32s.c (mbstoc32s): Use mbszero.
5981         * lib/uchar.in.h (mbstoc32s): Likewise.
5982         * modules/mbstoc32s (Depends-on): Add mbszero.
5984 2023-07-16  Bruno Haible  <bruno@clisp.org>
5986         mbstowcs: Optimize clearing an mbstate_t.
5987         * lib/mbstowcs.c (mbstowcs): Use mbszero.
5988         * modules/mbstowcs (Depends-on): Add mbszero.
5990 2023-07-16  Bruno Haible  <bruno@clisp.org>
5992         c32tob: Optimize clearing an mbstate_t.
5993         * lib/c32tob.c (c32tob): Use mbszero.
5994         * modules/c32tob (Depends-on): Add mbszero.
5996 2023-07-16  Bruno Haible  <bruno@clisp.org>
5998         wctomb: Optimize clearing an mbstate_t.
5999         * lib/wctomb-impl.h (wctomb): Use mbszero.
6000         * modules/wctomb (Depends-on): Add mbszero.
6002 2023-07-16  Bruno Haible  <bruno@clisp.org>
6004         btoc32: Optimize clearing an mbstate_t.
6005         * lib/btoc32.c: Include <wchar.h>.
6006         (btoc32): Use mbszero.
6007         * modules/btoc32 (Depends-on): Add mbszero.
6009 2023-07-16  Bruno Haible  <bruno@clisp.org>
6011         btowc: Optimize clearing an mbstate_t.
6012         * lib/btowc.c (btowc): Use mbszero.
6013         * modules/btowc (Depends-on): Add mbszero.
6015 2023-07-16  Bruno Haible  <bruno@clisp.org>
6017         mbrtoc32: Optimize clearing an mbstate_t.
6018         * lib/mbrtoc32.c (mbrtoc32): Use mbszero.
6019         * modules/mbrtoc32 (Depends-on): Add mbsinit, mbszero.
6021 2023-07-16  Bruno Haible  <bruno@clisp.org>
6023         mbtowc: Optimize clearing an mbstate_t.
6024         * lib/mbtowc-impl.h (mbtowc): Use mbszero.
6025         * modules/mbtowc (Depends-on): Add mbszero.
6027 2023-07-16  Bruno Haible  <bruno@clisp.org>
6029         mbszero: New module.
6030         * lib/wchar.in.h: Include <string.h>.
6031         (_GL_MBSTATE_INIT_SIZE, _GL_MBSTATE_ZERO_SIZE): New macros.
6032         (mbszero): New declaration.
6033         * lib/mbrtoc16.c: Update comments.
6034         * lib/mbszero.c: New file.
6035         * m4/wchar_h.m4 (gl_WCHAR_H_REQUIRE_DEFAULTS): Initialize
6036         GNULIB_MBSZERO.
6037         * modules/wchar (Depends-on): Add extern-inline.
6038         (Makefile.am): Substitute GNULIB_MBSZERO.
6039         * modules/mbszero: New file.
6041 2023-07-15  Bruno Haible  <bruno@clisp.org>
6043         mbsinit: Fix module description.
6044         * modules/mbsinit (Files): Add m4/mbrtowc.m4.
6046 2023-07-15  Bruno Haible  <bruno@clisp.org>
6048         c32_apply_type_test: Fix compilation error with GCC < 9.
6049         * lib/uchar.in.h (c32_apply_type_test) [_GL_WCHAR_T_IS_UCS4]: Remove
6050         _GL_ARG_NONNULL attribute.
6052 2023-07-13  Bruno Haible  <bruno@clisp.org>
6054         mbchar: Optimize is_basic.
6055         * lib/mbchar.h (is_basic_table): Remove declaration.
6056         (is_basic) [IS_BASIC_ASCII]: Define through a simple range test.
6057         * lib/mbchar.c (is_basic_table): Remove array.
6059         localcharset: Clean up locale encodings used by glibc.
6060         * lib/localcharset.h: Remove VISCII from the list, since never supported
6061         in glibc/localedata/SUPPORTED. JOHAB is not supported by glibc any more
6062         since 2000-09-25. TCVN5712-1 is not supported by glibc any more since
6063         2012-05-21.
6065 2023-07-13  Bruno Haible  <bruno@clisp.org>
6067         doc: Mention c32_get_mapping, c32_apply_mapping.
6068         * doc/posix-functions/wctrans.texi: Mention c32_get_mapping.
6069         * doc/posix-functions/towctrans.texi: Mention c32_apply_mapping.
6070         * doc/strings.texi (Comparison of character APIs): Mention both.
6072         c32_apply_mapping: Add tests.
6073         * tests/test-c32_apply_mapping.c: New file.
6074         * modules/c32_apply_mapping-tests: New file.
6076         c32_apply_mapping: New module.
6077         * lib/uchar.in.h (c32_apply_mapping): New declaration.
6078         * lib/c32_apply_mapping.c: New file.
6079         * m4/uchar_h.m4 (gl_UCHAR_H_REQUIRE_DEFAULTS): Initialize
6080         GNULIB_C32_APPLY_MAPPING.
6081         * modules/uchar (Makefile.am): Substitute GNULIB_C32_APPLY_MAPPING.
6082         * modules/c32_apply_mapping: New file.
6084         c32_get_mapping: Add tests.
6085         * tests/test-c32_get_mapping.c: New file.
6086         * modules/c32_get_mapping-tests: New file.
6088         c32_get_mapping: New module.
6089         * lib/uchar.in.h (c32_mapping_t): New type.
6090         (c32_get_mapping): New declaration.
6091         * lib/c32_get_mapping.c: New file, based on lib/wctrans-impl.h.
6092         * m4/uchar_h.m4 (gl_UCHAR_H_REQUIRE_DEFAULTS): Initialize
6093         GNULIB_C32_GET_MAPPING.
6094         * modules/uchar (Makefile.am): Substitute GNULIB_C32_GET_MAPPING.
6095         * modules/c32_get_mapping: New file.
6097         towctrans: Relax license.
6098         * modules/towctrans (License): Change to LGPLv2+.
6099         * lib/towctrans.c: Update license notice.
6100         * lib/towctrans-impl.h: Likewise.
6102         wctrans: Relax license.
6103         * modules/wctrans (License): Change to LGPLv2+.
6104         * lib/wctrans.c: Update license notice.
6105         * lib/wctrans-impl.h: Likewise.
6107 2023-07-12  Bruno Haible  <bruno@clisp.org>
6109         doc: Mention c32_get_type_test, c32_apply_type_test.
6110         * doc/posix-functions/wctype.texi: Mention c32_get_type_test.
6111         * doc/posix-functions/iswctype.texi: Mention c32_apply_type_test.
6112         * doc/strings.texi (Comparison of character APIs): Mention both.
6114         c32_apply_type_test: Add tests.
6115         * tests/test-c32_apply_type_test.c: New file.
6116         * modules/c32_apply_type_test-tests: New file.
6118         c32_apply_type_test: New module.
6119         * lib/uchar.in.h (c32_apply_type_test): New declaration.
6120         * lib/c32_apply_type_test.c: New file.
6121         * m4/uchar_h.m4 (gl_UCHAR_H_REQUIRE_DEFAULTS): Initialize
6122         GNULIB_C32_APPLY_TYPE_TEST.
6123         * modules/uchar (Makefile.am): Substitute GNULIB_C32_APPLY_TYPE_TEST.
6124         * modules/c32_apply_type_test: New file.
6126         c32_get_type_test: Add tests.
6127         * tests/test-c32_get_type_test.c: New file.
6128         * modules/c32_get_type_test-tests: New file.
6130         c32_get_type_test: New module.
6131         * lib/uchar.in.h (c32_type_test_t): New type.
6132         (c32_get_type_test): New declaration.
6133         * lib/c32_get_type_test.c: New file, based on lib/wctype-impl.h.
6134         * m4/uchar_h.m4 (gl_UCHAR_H_REQUIRE_DEFAULTS): Initialize
6135         GNULIB_C32_GET_TYPE_TEST.
6136         * modules/uchar (Makefile.am): Substitute GNULIB_C32_GET_TYPE_TEST.
6137         * modules/c32_get_type_test: New file.
6139         iswctype: Relax license.
6140         * modules/iswctype (License): Change to LGPLv2+.
6141         * lib/iswctype.c: Update license notice.
6142         * lib/iswctype-impl.h: Likewise.
6144         wctype: Relax license.
6145         * modules/wctype (License): Change to LGPLv2+.
6146         * lib/wctype.c: Update license notice.
6147         * lib/wctype-impl.h: Likewise.
6149 2023-07-12  Bruno Haible  <bruno@clisp.org>
6151         mbiter, mbuiter: Small optimization.
6152         * lib/mbiter.h: Optimize away the in_shift field when the module
6153         'mbrtoc32-regular' is in use.
6154         * lib/mbuiter.h: Likewise.
6156 2023-07-12  Gavin Smith  <gavinsmith0123@gmail.com>
6158         gendocs: support chapter- and section-level split
6159         * doc/gendocs_template: Add lines to mark parts of file to output
6160         only when splitting HTML by node.
6161         Remove obsolete comment about ranges of years in copyright notice
6162         (as per Karl).
6163         * build-aux/gendocs.sh
6164         [!texi2html]: Strip out parts of the template depending on --split.
6165         [texi2html] Include all of the template as before.
6167 2023-07-11  Bruno Haible  <bruno@clisp.org>
6169         mbsrtoc32s, mbsnrtoc32s: Small optimization.
6170         * lib/mbsrtoc32s.c (USES_C32): Set to 0 when the module
6171         'mbrtoc32-regular' is in use.
6172         * lib/mbsnrtoc32s.c (USES_C32): Likewise.
6174 2023-07-11  Bruno Haible  <bruno@clisp.org>
6176         mbswidth: Add a benchmark.
6177         * tests/bench-mbswidth.c: New file, based on tests/bench-mbiter.c.
6178         * modules/mbswidth-bench-tests: New file.
6180         mbuiter: Add a benchmark.
6181         * tests/bench-mbuiter.c: New file, based on tests/bench-mbiter.c.
6182         * modules/mbuiter-bench-tests: New file.
6184         mbiter: Add a benchmark.
6185         * tests/bench-mbiter.c: New file.
6186         * tests/bench-multibyte.h: New file.
6187         * modules/mbiter-bench-tests: New file.
6189         tests: Create new file bench.h.
6190         * tests/bench.h: New file, extracted from tests/bench-digest.h.
6191         * tests/bench-digest.h: Include it.
6192         * modules/crypto/md5-buffer-tests (Files): Add tests/bench.h.
6193         * modules/crypto/sha1-buffer-tests (Files): Likewise.
6194         * modules/crypto/sha256-buffer-tests (Files): Likewise.
6195         * modules/crypto/sha512-buffer-tests (Files): Likewise.
6197 2023-07-11  Bruno Haible  <bruno@clisp.org>
6199         Optimize away some mbsinit calls.
6200         * lib/mbiter.h (mbiter_multi_next): When the module 'mbrtoc32-regular'
6201         is in use, don't invoke mbsinit and don't compare the mbrtoc32 result
6202         against (size_t)(-3).
6203         * lib/mbuiter.h (mbuiter_multi_next): Likewise.
6204         * lib/mbfile.h (mbfile_multi_getc): Likewise.
6205         * lib/mbswidth.c (mbsnwidth): Likewise.
6206         * lib/mbmemcasecoll.c (apply_c32tolower): Likewise.
6207         * lib/quotearg.c (quotearg_buffer_restyled): Likewise.
6209 2023-07-11  Bruno Haible  <bruno@clisp.org>
6211         Fix build errors on Linux/hppa.
6212         * modules/math (Makefile.am): Split long pipe command into several
6213         smaller commands.
6214         * modules/pthread-h (Makefile.am): Likewise.
6215         * modules/stdio (Makefile.am): Likewise.
6216         * modules/stdlib (Makefile.am): Likewise.
6217         * modules/string (Makefile.am): Likewise.
6218         * modules/unictype/base (Makefile.am): Likewise.
6219         * modules/unistd (Makefile.am): Likewise.
6220         * modules/wchar (Makefile.am): Likewise.
6222 2023-07-11  Paul Eggert  <eggert@cs.ucla.edu>
6224         quotearg: update Solaris-related comments
6225         * doc/solaris-versions: Modernize.
6226         * lib/quotearg.c: Update comments.
6228 2023-07-10  Bruno Haible  <bruno@clisp.org>
6230         dfa: Overcome wchar_t limitations.
6231         * lib/localeinfo.h: Include <uchar.h>. Add special definitions for GAWK.
6232         (case_folded_counterparts): Change array element type to char32_t.
6233         * lib/localeinfo.c: Include <uchar.h>. Add special definitions for GAWK.
6234         (is_using_utf8, init_localeinfo): Use mbrtoc32 instead of mbrtowc.
6235         (lonesome_lower): Change element type to 'unsigned short'.
6236         (case_folded_counterparts): Change array element type to char32_t. Use
6237         c32toupper instead of towupper. Use c32tolower instead of towlower.
6238         * lib/dfa.c: Include <uchar.h>. Add special definitions for GAWK.
6239         (struct mb_char_classes): Change element type of 'chars' to char32_t.
6240         (mbs_to_wchar): Use mbrtoc32 instead of mbrtowc.
6241         (setbit_wc): Change type of first argument to char32_t. Use c32tob
6242         instead of wctob.
6243         (parse_bracket_exp): Update.
6244         (lex): Use c32isprint instead of iswprint. Use c32isspace instead of
6245         iswspace. Use c32rtomb instead of a %lc directive.
6246         (addtok_wc): Use c32rtomb instead of wcrtomb.
6247         (atom): Update.
6248         * modules/dfa (Depends-on): Remove wctype-h. Add uchar,
6249         mbrtoc32-regular, c32rtomb, c32tob, c32tolower, c32toupper, c32isprint,
6250         c32isspace.
6251         (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
6252         * modules/dfa-tests (Makefile.am): Link test-dfa-match-aux with
6253         $(LIBUNISTRING) $(LIBC32CONV).
6254         * NEWS: Mention the change.
6256 2023-07-10  Bruno Haible  <bruno@clisp.org>
6258         mbrtoc32-regular: Add tests.
6259         * tests/test-mbrtoc32-regular.c: New file.
6260         * modules/mbrtoc32-regular-tests: New file.
6262         mbrtoc32-regular: New module.
6263         * modules/mbrtoc32-regular: New file.
6264         * lib/mbrtoc32.c (mbrtoc32): If the module 'mbrtoc32-regular' is present
6265         and the system's mbrtoc32 returned a char32_t, clear the mbstate_t.
6266         * doc/posix-functions/mbrtoc32.texi: Mention the new module.
6268 2023-07-10  Bruno Haible  <bruno@clisp.org>
6270         Apply the last change to all locale-*.m4 files.
6271         * m4/locale-ar.m4 (gt_LOCALE_AR): Reject locale name that might cause
6272         trouble with sh or make.
6273         * m4/locale-tr.m4 (gt_LOCALE_TR_UTF8): Likewise.
6275 2023-07-09  Paul Eggert  <eggert@cs.ucla.edu>
6277         c32width: protect against bad configure args
6278         Avoid ‘test’ misuse with ‘./configure gt_cv_locale_fr=""’.
6279         Possible problem of this sort reported by Angelo Graziosi in:
6280         https://lists.gnu.org/r/emacs-devel/2023-07/msg00329.html
6281         * m4/locale-fr.m4 (gt_LOCALE_FR_UTF8, gt_LOCALE_FR_UTF8):
6282         * m4/locale-ja.m4 (gt_LOCALE_JA):
6283         * m4/locale-zh.m4 (gt_LOCALE_ZH_CN):
6284         Reject locale names that might cause trouble with sh or make.
6286 2023-07-06  Bruno Haible  <bruno@clisp.org>
6288         wcscmp: Work around a glibc bug.
6289         Reported by مصعب الزعبي (Mosab Al-Zoubi) <moceap@hotmail.com> in
6290         <https://lists.gnu.org/archive/html/bug-gnulib/2023-07/msg00029.html>.
6291         * m4/wcscmp.m4 (gl_FUNC_WCSCMP): Test against a glibc/arm* bug.
6292         * doc/posix-functions/wcscmp.texi: Mention the glibc/arm* bug.
6294 2023-07-04  Bruno Haible  <bruno@clisp.org>
6296         mbiter, mbfile, mbmemcasecoll: Improve handling of mbrtoc32 result.
6297         * lib/mbiter.h (mbi_avail): If cur.ptr has reached the limit but
6298         in_shift is true, call mbiter_multi_next.
6299         (mbiter_multi_next): Set in_shift to false after an incomplete multibyte
6300         character.
6301         * lib/mbfile.h (mbfile_multi_getc): Pass the input bytes incrementally
6302         into mbrtoc32. When mbf->state is not in the initial state, call
6303         mbrtoc32 again.
6304         * lib/mbmemcasecoll.c (apply_c32tolower): When the state is not in the
6305         initial state, call mbrtoc32 again.
6307 2023-07-04  Bruno Haible  <bruno@clisp.org>
6309         mbiter, mbuiter, mbfile: Improve state handling after invalid input.
6310         * lib/mbiter.h (mbiter_multi_next): After an invalid multibyte sequence
6311         was encountered, clear the state.
6312         * lib/mbuiter.h (mbuiter_multi_next): Likewise.
6313         * lib/mbfile.h (mbfile_multi_getc): Likewise.
6315 2023-07-04  Bruno Haible  <bruno@clisp.org>
6317         mbchar: Optimize all chars from the POSIX "portable character set".
6318         * lib/mbchar.h (is_basic): Include all the characters from the POSIX
6319         "portable character set".
6320         * lib/mbchar.c (is_basic_table): Likewise.
6321         * lib/mbiter.h (mbiter_multi_next): Update comment.
6322         * lib/mbuiter.h (mbuiter_multi_next): Likewise.
6323         * lib/mbfile.h (mbfile_multi_getc): Likewise.
6325 2023-07-04  Paul Eggert  <eggert@cs.ucla.edu>
6327         mbchar: treat @, $, ` as basic
6328         The C standard says that @, $, ` must have a single-byte
6329         representation so they count as basic as far as multibyte
6330         character processing goes.
6331         * lib/mbchar.c (is_basic_table):
6332         * lib/mbchar.h (is_basic):
6333         * lib/mbswidth.c (mbsnwidth):
6334         Treat @, $, ` as basic too.
6336 2023-07-03  Bruno Haible  <bruno@clisp.org>
6338         mbrtoc32: Document another glibc bug.
6339         * doc/posix-functions/mbrtoc32.texi: Reference the glibc bug in
6340         BIG5-HKSCS locales.
6342 2023-07-03  Paul Eggert  <eggert@cs.ucla.edu>
6344         mbrtoc32: document (size_t) -3 issue
6345         * doc/posix-functions/mbrtoc32.texi (mbrtoc32):
6346         Say (size_t) -3 might not be worth bothering about.
6348 2023-07-02  Bruno Haible  <bruno@clisp.org>
6350         mbsrtoc32s: Accommodate a difference between mbrtowc and mbrtoc32.
6351         * lib/mbsrtoc32s.c (USES_C32): New macro.
6352         * lib/mbsrtowcs.c (USES_C32): New macro.
6353         * lib/mbsrtowcs-impl.h (FUNC): If USES_C32 and mbrtoc32 returned
6354         (size_t)(-3), don't increment the pointer.
6356 2023-07-02  Bruno Haible  <bruno@clisp.org>
6358         mbsnrtoc32s: Accommodate a difference between mbrtowc and mbrtoc32.
6359         * lib/mbsnrtoc32s.c (USES_C32): New macro.
6360         * lib/mbsnrtowcs.c (USES_C32): New macro.
6361         * lib/mbsnrtowcs-impl.h (FUNC): If USES_C32 and mbrtoc32 returned
6362         (size_t)(-3), don't increment the pointer.
6364 2023-07-02  Bruno Haible  <bruno@clisp.org>
6366         mbmemcasecoll: Overcome wchar_t limitations.
6367         * lib/mbmemcasecoll.c: Include <uchar.h> instead of <wctype.h>.
6368         (apply_c32tolower): Renamed from apply_towlower. Use mbrtoc32 instead of
6369         mbrtowc. Use c32tolower instead of towlower. Use c32rtomb instead of
6370         wcrtomb.
6371         * modules/mbmemcasecoll (Depends-on): Remove mbrtowc, wcrtomb. Add
6372         uchar, mbrtoc32, c32rtomb, c32tolower.
6373         (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
6374         * modules/mbmemcasecoll-tests (Makefile.am): Link test-mbmemcasecoll
6375         with $(LIBUNISTRING) $(LIBC32CONV).
6377 2023-07-02  Bruno Haible  <bruno@clisp.org>
6379         mbswidth: Overcome wchar_t limitations.
6380         * lib/mbswidth.c: Include <uchar.h> instead of <wctype.h>.
6381         (mbsnwidth): Use mbrtoc32 instead of mbrtowc. Use c32width instead of
6382         wcwidth. Use c32iscntrl instead of iswcntrl.
6383         * modules/mbswidth (Depends-on): Remove wctype-h, mbrtowc, wcwidth. Add
6384         uchar, mbrtoc32, c32width, c32iscntrl.
6385         (Link): Add $(LIBC32CONV).
6387 2023-07-01  Paul Eggert  <eggert@cs.ucla.edu>
6389         Fix long bootstrap lines
6390         * top/bootstrap:
6391         * top/bootstrap-funclib.sh: Reformat to fit into 80 columns,
6392         for coreutils ‘make syntax-check’.
6394 2023-07-01  Bruno Haible  <bruno@clisp.org>
6396         doc: Update regarding stable branches.
6397         * doc/gnulib-readme.texi (Stable Branches): Mention new branch
6398         stable-202307. Mention that stable-202207 is no longer updated.
6400 2023-07-01  Paul Eggert  <eggert@cs.ucla.edu>
6402         maint.mk: Modernize stddef.h checks for C23
6403         * top/maint.mk (_stddef_syms_re): Modernize for C23.
6405 2023-07-01  Bruno Haible  <bruno@clisp.org>
6407         quotearg: Overcome wchar_t limitations.
6408         * lib/quotearg.c: Include <uchar.h> instead of <wchar.h>, <wctype.h>.
6409         (quotearg_buffer_restyled): Use mbrtoc32, c32isprint instead of mbrtowc,
6410         iswprint.
6411         * modules/quotearg (Files): Remove m4/mbstate_t.m4, m4/mbrtowc.m4
6412         (redundant).
6413         (Depends-on): Add uchar, mbrtoc32, c32isprint. Remove wchar, wctype-h,
6414         mbrtowc.
6415         (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
6416         * modules/quotearg-tests (Makefile.am): Link test-quotearg with
6417         $(LIBUNISTRING) $(LIBC32CONV).
6418         * modules/quotearg-simple (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
6419         * modules/quotearg-simple-tests (Makefile.am): Link test-quotearg-simple
6420         with $(LIBUNISTRING) $(LIBC32CONV).
6421         --
6422         * modules/quote (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
6423         --
6424         * modules/acl (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
6425         * modules/acl-tests (Makefile.am): Link test-set-mode-acl and
6426         test-copy-acl with $(LIBUNISTRING) $(LIBC32CONV).
6427         * modules/copy-file (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
6428         * modules/copy-file-tests (Makefile.am): Link test-copy-file with
6429         $(LIBUNISTRING) $(LIBC32CONV).
6430         --
6431         * modules/argmatch (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
6432         * modules/argmatch-tests (Makefile.am): Link test-argmatch with
6433         $(LIBUNISTRING) $(LIBC32CONV).
6434         * modules/backup-rename (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
6435         * modules/backupfile (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
6436         * modules/human (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
6437         --
6438         * modules/sh-quote (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
6439         * modules/sh-quote-tests (Makefile.am): Link test-sh-quote with
6440         $(LIBUNISTRING) $(LIBC32CONV).
6441         * modules/system-quote (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
6442         * modules/system-quote-tests (Makefile.am): Link test-system-quote-main
6443         with $(LIBUNISTRING) $(LIBC32CONV).
6444         * modules/csharpcomp (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
6445         * modules/csharpexec (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
6446         * modules/javacomp (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
6447         * modules/javaexec (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
6448         --
6449         * modules/string-desc-quotearg (Link): New section.
6450         * modules/string-desc-quotearg-tests (Makefile.am): Link
6451         test-string-desc-quotearg with $(LIBUNISTRING) $(LIBC32CONV).
6452         --
6453         * modules/xmemcoll (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
6454         --
6455         * modules/closeout (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
6456         * modules/readtokens-tests (Makefile.am): Link test-readtokens with
6457         $(LIBUNISTRING) $(LIBC32CONV).
6458         --
6459         * modules/closein (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
6460         * modules/closein-tests (Makefile.am): Link test-closein with
6461         $(LIBUNISTRING) $(LIBC32CONV).
6462         * modules/yesno-tests (Makefile.am): Link test-yesno with
6463         $(LIBUNISTRING) $(LIBC32CONV).
6465 2023-06-30  Bruno Haible  <bruno@clisp.org>
6467         Accommodate a difference between mbrtowc and mbrtoc32.
6468         * lib/mbiter.h (mbiter_multi_next): Handle the mbrtoc32 return value
6469         (size_t)(-3).
6470         * lib/mbuiter.h (mbuiter_multi_next): Likewise.
6471         * lib/mbfile.h (mbfile_multi_getc): Likewise.
6473 2023-06-30  Bruno Haible  <bruno@clisp.org>
6475         doc: Reference some reported bugs (in comments).
6476         * doc/posix-functions/mbrlen.texi: Add references to bug reports.
6477         * doc/posix-functions/mbrtoc16.texi: Likewise.
6478         * doc/posix-functions/mbrtoc32.texi: Likewise.
6479         * doc/posix-functions/mbrtowc.texi: Likewise.
6480         * doc/posix-functions/mbsnrtowcs.texi: Likewise.
6481         * doc/posix-functions/mbsrtowcs.texi: Likewise.
6482         * doc/posix-functions/mbstowcs.texi: Likewise.
6484 2023-06-29  Paul Eggert  <eggert@cs.ucla.edu>
6486         assert-tests: pacify gcc -Wunused-function
6487         * tests/test-assert.c (main): Call f, so that the test
6488         works even if NDEBUG is defined.
6490         stddef-tests: pacify gcc -Wshadow
6491         * tests/test-stddef.c (mat): Rename from ‘x’.
6493         nullptr-tests: pacify gcc -Wmissing-declarations
6494         * tests/test-nullptr.c (varargs_callee): Now static.
6496 2023-06-29  Bruno Haible  <bruno@clisp.org>
6498         libtextstyle-optional: Update to gettext 0.22.
6499         * lib/textstyle.in.h: Declare all functions that were added in
6500         textstyle.h from gettext-0.22.
6502         libtextstyle-optional: Update to gettext 0.21.
6503         * lib/textstyle.in.h: Declare all functions that exist in textstyle.h
6504         from gettext-0.21, independently of iconv.
6506 2023-06-28  Bruno Haible  <bruno@clisp.org>
6508         doc: Mention c8rtomb and mbrtoc8 from ISO C 23.
6509         * doc/posix-functions/c8rtomb.texi: New file.
6510         * doc/posix-functions/mbrtoc8.texi: New file.
6511         * doc/gnulib.texi (Function Substitutes): Include them.
6513 2023-06-28  Bruno Haible  <bruno@clisp.org>
6515         mbrtoc16: Add tests.
6516         * tests/test-mbrtoc16.c: New file, based on tests/test-mbrtoc32.c.
6517         * tests/test-mbrtoc16-1.sh: New file, based on tests/test-mbrtoc32-1.sh.
6518         * tests/test-mbrtoc16-2.sh: New file, based on tests/test-mbrtoc32-2.sh.
6519         * tests/test-mbrtoc16-3.sh: New file, based on tests/test-mbrtoc32-3.sh.
6520         * tests/test-mbrtoc16-4.sh: New file, based on tests/test-mbrtoc32-4.sh.
6521         * tests/test-mbrtoc16-5.sh: New file, based on tests/test-mbrtoc32-5.sh.
6522         * tests/test-mbrtoc16-w32.c: New file, based on
6523         tests/test-mbrtoc32-w32.c.
6524         * tests/test-mbrtoc16-w32-1.sh: New file, based on
6525         tests/test-mbrtoc32-w32-1.sh.
6526         * tests/test-mbrtoc16-w32-2.sh: New file, based on
6527         tests/test-mbrtoc32-w32-2.sh.
6528         * tests/test-mbrtoc16-w32-3.sh: New file, based on
6529         tests/test-mbrtoc32-w32-3.sh.
6530         * tests/test-mbrtoc16-w32-4.sh: New file, based on
6531         tests/test-mbrtoc32-w32-4.sh.
6532         * tests/test-mbrtoc16-w32-5.sh: New file, based on
6533         tests/test-mbrtoc32-w32-5.sh.
6534         * tests/test-mbrtoc16-w32-6.sh: New file, based on
6535         tests/test-mbrtoc32-w32-6.sh.
6536         * tests/test-mbrtoc16-w32-7.sh: New file, based on
6537         tests/test-mbrtoc32-w32-7.sh.
6538         * modules/mbrtoc16-tests: New file, based on modules/mbrtoc32-tests.
6540         mbrtoc16: New module.
6541         * lib/uchar.in.h (mbrtoc16): New declaration.
6542         * lib/mbrtoc16.c: New file.
6543         * m4/mbrtoc16.m4: New file, based on m4/mbrtoc32.m4.
6544         * modules/mbrtoc16: New file.
6545         * m4/uchar_h.m4 (gl_UCHAR_H): Test whether mbrtoc16 is declared.
6546         (gl_UCHAR_H_REQUIRE_DEFAULTS): Initialize GNULIB_MBRTOC16.
6547         (gl_UCHAR_H_DEFAULTS): Initialize HAVE_MBRTOC16, REPLACE_MBRTOC16.
6548         * modules/uchar (Makefile.am): Substitute GNULIB_MBRTOC16,
6549         HAVE_MBRTOC16, REPLACE_MBRTOC16.
6550         * doc/posix-functions/mbrtoc16.texi: Mention the mbrtoc16 module and the
6551         mbsinit related limitation.
6552         * doc/posix-functions/mbsinit.texi: Mention the mbrtoc16 related
6553         limitation.
6555 2023-06-28  Bruno Haible  <bruno@clisp.org>
6557         c32*: Update comment.
6558         * lib/c32is-impl.h (FUNC): Add comment regarding Android.
6559         * lib/c32to-impl.h (FUNC): Likewise.
6560         * lib/c32width.c (c32width): Likewise.
6562 2023-06-28  Bruno Haible  <bruno@clisp.org>
6564         mbrtoc32: Doc tweak.
6565         * doc/posix-functions/mbrtoc32.texi: Mention that mingw and Android have
6566         the empty input bug.
6567         * m4/mbrtoc32.m4 (gl_MBRTOC32_EMPTY_INPUT): Update cross-compilation
6568         guess.
6570 2023-06-28  Bruno Haible  <bruno@clisp.org>
6572         mbrtowc: Doc tweak.
6573         * doc/posix-functions/mbrtowc.texi: Mention that MSVC has the empty
6574         input bug and the return value bug. Mention that Android has the empty
6575         input bug.
6576         * m4/mbrtowc.m4 (gl_MBRTOC32_EMPTY_INPUT): Update cross-compilation
6577         guess.
6579 2023-06-28  Bruno Haible  <bruno@clisp.org>
6581         mbrtowc, mbrtoc32: Simplify autoconf macros.
6582         * m4/mbrtowc.m4 (gl_MBRTOWC_EMPTY_INPUT, gl_MBRTOWC_C_LOCALE): Put
6583         cross-compilation guess at the usual place.
6584         * m4/mbrtoc32.m4 (gl_MBRTOC32_EMPTY_INPUT, gl_MBRTOC32_C_LOCALE):
6585         Likewise.
6587 2023-06-27  Bruno Haible  <bruno@clisp.org>
6589         c32*: Optionally enforce ISO C 23 semantics of char32_t.
6590         * lib/lc-charset-unicode.h: New file.
6591         * lib/lc-charset-unicode.c: New file.
6592         * modules/uchar-c23: New file.
6593         * lib/uchar.in.h (char32_t): Add comment.
6594         * lib/mbrtoc32.c: Include lc-charset-unicode.h.
6595         (mbrtoc32): If char32_t is Unicode and wchar_t is not, invoke
6596         locale_encoding_to_unicode.
6597         * lib/btoc32.c: Include lc-charset-unicode.h.
6598         (btoc32): If char32_t is Unicode and wchar_t is not, invoke
6599         locale_encoding_to_unicode.
6600         * lib/c32rtomb.c: Include lc-charset-unicode.h.
6601         (c32rtomb): If char32_t is Unicode and wchar_t is not, invoke
6602         unicode_to_locale_encoding.
6603         * lib/c32tob.c: Include lc-charset-unicode.h.
6604         (c32tob): If char32_t is Unicode and wchar_t is not, invoke
6605         unicode_to_locale_encoding.
6606         * lib/mbsnrtoc32s.c: If char32_t is Unicode and wchar_t is not, don't
6607         use mbsnrtowcs.
6608         * lib/mbsrtoc32s.c: If char32_t is Unicode and wchar_t is not, don't use
6609         mbsrtowcs.
6610         * lib/c32snrtombs.c: If char32_t is Unicode and wchar_t is not, don't
6611         use wcsnrtombs.
6612         * lib/c32srtombs.c: If char32_t is Unicode and wchar_t is not, don't use
6613         wcsrtombs.
6614         * lib/c32is-impl.h: Include lc-charset-unicode.h.
6615         (FUNC): If char32_t is Unicode and wchar_t is not, use UCS_FUNC.
6616         * lib/c32to-impl.h: Include lc-charset-unicode.h.
6617         (FUNC): If char32_t is Unicode and wchar_t is not, use UCS_FUNC.
6618         * lib/c32width.c: Include lc-charset-unicode.h.
6619         (c32width): If char32_t is Unicode and wchar_t is not, use uc_width.
6620         * tests/test-mbrtoc32.c: Include <wchar.h>.
6621         (main): Skip GB18030 tests on NetBSD and Solaris. If
6622         GL_CHAR32_T_IS_UNICODE, expect Unicode encoding for the char32_t values.
6623         * tests/test-mbrtoc32-w32.c: Include <wchar.h>.
6624         (test_one_locale): Simplify.
6625         * tests/test-c32rtomb.c (main): Skip GB18030 tests on NetBSD and
6626         Solaris.
6627         * tests/test-c32rtomb.sh: Update.
6628         * tests/test-mbsnrtoc32s.c: Include <wchar.h>.
6629         (main): Skip GB18030 tests on NetBSD and Solaris.
6630         * tests/test-mbsrtoc32s.c: Include <wchar.h>.
6631         (main): Skip GB18030 tests on NetBSD and Solaris.
6632         * tests/test-mbstoc32s.c (main): Skip GB18030 tests on NetBSD and
6633         Solaris.
6634         * tests/test-c32snrtombs.c (main): Skip GB18030 tests on NetBSD and
6635         Solaris.
6636         * tests/test-c32srtombs.c (main): Skip GB18030 tests on NetBSD and
6637         Solaris.
6638         * tests/test-c32stombs.c (main): Skip GB18030 tests on NetBSD and
6639         Solaris.
6640         * tests/test-c32isalnum.c (main): Skip GB18030 tests on NetBSD and
6641         Solaris.
6642         * tests/test-c32isalnum.sh: Update.
6643         * tests/test-c32isalpha.c (main): Skip GB18030 tests on NetBSD and
6644         Solaris. Disable tests that would fail on macOS, FreeBSD, NetBSD,
6645         Solaris.
6646         * tests/test-c32isalpha.sh: Update.
6647         * tests/test-c32isblank.c (main): Skip GB18030 tests on NetBSD and
6648         Solaris.
6649         * tests/test-c32isblank.sh: Update.
6650         * tests/test-c32iscntrl.c (main): Skip GB18030 tests on NetBSD and
6651         Solaris. Disable tests that would fail on macOS, FreeBSD, NetBSD,
6652         Solaris.
6653         * tests/test-c32iscntrl.sh: Update.
6654         * tests/test-c32isdigit.c (main): Skip GB18030 tests on NetBSD and
6655         Solaris.
6656         * tests/test-c32isdigit.sh: Update.
6657         * tests/test-c32isgraph.c (main): Skip GB18030 tests on NetBSD and
6658         Solaris. Disable tests that would fail on macOS, FreeBSD, NetBSD,
6659         Solaris.
6660         * tests/test-c32isgraph.sh: Update.
6661         * tests/test-c32islower.c (main): Skip GB18030 tests on NetBSD and
6662         Solaris. Disable tests that would fail on macOS, FreeBSD, NetBSD,
6663         Solaris.
6664         * tests/test-c32islower.sh: Update.
6665         * tests/test-c32isprint.c (main): Skip GB18030 tests on NetBSD and
6666         Solaris. Disable tests that would fail on macOS, FreeBSD, NetBSD,
6667         Solaris.
6668         * tests/test-c32isprint.sh: Update.
6669         * tests/test-c32ispunct.c (main): Skip GB18030 tests on NetBSD and
6670         Solaris. Disable tests that would fail on macOS, FreeBSD, NetBSD,
6671         Solaris.
6672         * tests/test-c32ispunct.sh: Update.
6673         * tests/test-c32isspace.c (main): Skip GB18030 tests on NetBSD and
6674         Solaris.
6675         * tests/test-c32isspace.sh: Update.
6676         * tests/test-c32isupper.c (main): Skip GB18030 tests on NetBSD and
6677         Solaris.
6678         * tests/test-c32isupper.sh: Update.
6679         * tests/test-c32isxdigit.c (main): Skip GB18030 tests on NetBSD and
6680         Solaris.
6681         * tests/test-c32isxdigit.sh: Update.
6682         * tests/test-c32tolower.c (main): Skip GB18030 tests on NetBSD and
6683         Solaris.
6684         * tests/test-c32tolower.sh: Update.
6685         * tests/test-c32toupper.c (main): Skip GB18030 tests on NetBSD and
6686         Solaris. Disable tests that would fail on macOS, FreeBSD, NetBSD,
6687         Solaris.
6688         * tests/test-c32toupper.sh: Update.
6689         * modules/mbrtoc32 (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
6690         * modules/mbrtoc32-tests (Makefile.am): Link test-mbrtoc32 with
6691         $(LIBUNISTRING) $(LIBC32CONV).
6692         * modules/btoc32 (Link): New section.
6693         * modules/btoc32-tests (Makefile.am): Link test-btoc32 with
6694         $(LIBUNISTRING) $(LIBC32CONV).
6695         * modules/c32rtomb (Link): New section.
6696         * modules/c32rtomb-tests (Makefile.am): Link test-c32rtomb with
6697         $(LIBUNISTRING) $(LIBC32CONV).
6698         * modules/c32tob (Link): New section.
6699         * modules/mbsnrtoc32s (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
6700         * modules/mbsnrtoc32s-tests (Makefile.am): Link test-mbsnrtoc32s with
6701         $(LIBUNISTRING) $(LIBC32CONV).
6702         * modules/mbsrtoc32s (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
6703         * modules/mbsrtoc32s-tests (Makefile.am): Link test-mbsrtoc32s with
6704         $(LIBUNISTRING) $(LIBC32CONV).
6705         * modules/mbstoc32s (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
6706         * modules/mbstoc32s-tests (Makefile.am): Link test-mbstoc32s with
6707         $(LIBUNISTRING) $(LIBC32CONV).
6708         * modules/c32snrtombs (Link): New section.
6709         * modules/c32snrtombs-tests (Makefile.am): Link test-c32snrtombs with
6710         $(LIBUNISTRING) $(LIBC32CONV).
6711         * modules/c32srtombs (Link): New section.
6712         * modules/c32srtombs-tests (Makefile.am): Link test-c32srtombs with
6713         $(LIBUNISTRING) $(LIBC32CONV).
6714         * modules/c32stombs (Link): New section.
6715         * modules/c32stombs-tests (Makefile.am): Link test-c32stombs with
6716         $(LIBUNISTRING) $(LIBC32CONV).
6717         * modules/c32isalnum (Link): Add $(LIBC32CONV).
6718         * modules/c32isalnum-tests (Makefile.am): Link test-c32isalnum with
6719         $(LIBC32CONV).
6720         * modules/c32isalpha (Link): Add $(LIBC32CONV).
6721         * modules/c32isalpha-tests (Makefile.am): Link test-c32isalpha with
6722         $(LIBC32CONV).
6723         * modules/c32isblank (Link): Add $(LIBC32CONV).
6724         * modules/c32isblank-tests (Makefile.am): Link test-c32isblank with
6725         $(LIBC32CONV).
6726         * modules/c32iscntrl (Link): Add $(LIBC32CONV).
6727         * modules/c32iscntrl-tests (Makefile.am): Link test-c32iscntrl with
6728         $(LIBC32CONV).
6729         * modules/c32isdigit (Link): Add $(LIBC32CONV).
6730         * modules/c32isdigit-tests (Makefile.am): Link test-c32isdigit with
6731         $(LIBC32CONV).
6732         * modules/c32isgraph (Link): Add $(LIBC32CONV).
6733         * modules/c32isgraph-tests (Makefile.am): Link test-c32isgraph with
6734         $(LIBC32CONV).
6735         * modules/c32islower (Link): Add $(LIBC32CONV).
6736         * modules/c32islower-tests (Makefile.am): Link test-c32islower with
6737         $(LIBC32CONV).
6738         * modules/c32isprint (Link): Add $(LIBC32CONV).
6739         * modules/c32isprint-tests (Makefile.am): Link test-c32isprint with
6740         $(LIBC32CONV).
6741         * modules/c32ispunct (Link): Add $(LIBC32CONV).
6742         * modules/c32ispunct-tests (Makefile.am): Link test-c32ispunct with
6743         $(LIBC32CONV).
6744         * modules/c32isspace (Link): Add $(LIBC32CONV).
6745         * modules/c32isspace-tests (Makefile.am): Link test-c32isspace with
6746         $(LIBC32CONV).
6747         * modules/c32isupper (Link): Add $(LIBC32CONV).
6748         * modules/c32isupper-tests (Makefile.am): Link test-c32isupper with
6749         $(LIBC32CONV).
6750         * modules/c32isxdigit (Link): Add $(LIBC32CONV).
6751         * modules/c32isxdigit-tests (Makefile.am): Link test-c32isxdigit with
6752         $(LIBC32CONV).
6753         * modules/c32tolower (Link): Add $(LIBC32CONV).
6754         * modules/c32tolower-tests (Makefile.am): Link test-c32tolower with
6755         $(LIBC32CONV).
6756         * modules/c32toupper (Link): Add $(LIBC32CONV).
6757         * modules/c32toupper-tests (Makefile.am): Link test-c32toupper with
6758         $(LIBC32CONV).
6759         * modules/c32width (Link): Add $(LIBC32CONV).
6760         * modules/c32width-tests (Makefile.am): Link test-c32width with
6761         $(LIBC32CONV).
6762         * modules/c32swidth (Link): Add $(LIBC32CONV).
6763         * modules/c32swidth-tests (Makefile.am): Link test-c32swidth with
6764         $(LIBC32CONV).
6765         * modules/mbchar (Link): Add $(LIBC32CONV).
6766         * modules/mbiter (Link): Add $(LIBC32CONV).
6767         * modules/mbuiter (Link): Add $(LIBC32CONV).
6768         * modules/mbfile (Link): Add $(LIBC32CONV).
6769         * modules/mbmemcasecmp (Link): Add $(LIBC32CONV).
6770         * modules/mbmemcasecmp-tests (Makefile.am): Link test-mbmemcasecmp with
6771         $(LIBC32CONV).
6772         * modules/mbscasecmp (Link): Add $(LIBC32CONV).
6773         * modules/mbscasecmp-tests (Makefile.am): Link test-mbscasecmp with
6774         $(LIBC32CONV).
6775         * modules/mbscasestr (Link): Add $(LIBC32CONV).
6776         * modules/mbscasestr-tests (Makefile.am): Link test-mbscasestr1,
6777         test-mbscasestr2, test-mbscasestr3, test-mbscasestr4 with $(LIBC32CONV).
6778         * modules/mbschr (Link): Add $(LIBC32CONV).
6779         * modules/mbschr-tests (Makefile.am): Link test-mbschr with
6780         $(LIBC32CONV).
6781         * modules/mbscspn (Link): Add $(LIBC32CONV).
6782         * modules/mbscspn-tests (Makefile.am): Link test-mbscspn with
6783         $(LIBC32CONV).
6784         * modules/mbslen (Link): Add $(LIBC32CONV).
6785         * modules/mbsncasecmp (Link): Add $(LIBC32CONV).
6786         * modules/mbsncasecmp-tests (Makefile.am): Link test-mbsncasecmp with
6787         $(LIBC32CONV).
6788         * modules/mbsnlen (Link): Add $(LIBC32CONV).
6789         * modules/mbspbrk (Link): Add $(LIBC32CONV).
6790         * modules/mbspbrk-tests (Makefile.am): Link test-mbspbrk with
6791         $(LIBC32CONV).
6792         * modules/mbspcasecmp (Link): Add $(LIBC32CONV).
6793         * modules/mbspcasecmp-tests (Makefile.am): Link test-mbspcasecmp with
6794         $(LIBC32CONV).
6795         * modules/mbsrchr (Link): Add $(LIBC32CONV).
6796         * modules/mbsrchr-tests (Makefile.am): Link test-mbsrchr with
6797         $(LIBC32CONV).
6798         * modules/mbssep (Link): Add $(LIBC32CONV).
6799         * modules/mbsspn (Link): Add $(LIBC32CONV).
6800         * modules/mbsspn-tests (Makefile.am): Link test-mbsspn with
6801         $(LIBC32CONV).
6802         * modules/mbsstr (Link): Add $(LIBC32CONV).
6803         * modules/mbsstr-tests (Makefile.am): Link test-mbsstr1, test-mbsstr2,
6804         test-mbsstr3 with $(LIBC32CONV).
6805         * modules/mbstok_r (Link): Add $(LIBC32CONV).
6806         * modules/propername (Link): Add $(LIBC32CONV).
6807         * modules/regex-quote (Link): Add $(LIBC32CONV).
6808         * modules/regex-quote-tests (Makefile.am): Link test-regex-quote with
6809         $(LIBC32CONV).
6810         * modules/trim (Link): Add $(LIBC32CONV).
6811         * modules/trim-tests (Makefile.am): Link test-trim with $(LIBC32CONV).
6812         * modules/exclude (Link): Add $(LIBC32CONV).
6813         * modules/exclude-tests (Makefile.am): Link test-exclude with
6814         $(LIBC32CONV).
6815         * doc/posix-headers/uchar.texi: Mention the uchar-c23 module.
6816         * doc/posix-functions/mbrtoc32.texi: Likewise.
6817         * doc/strings.texi (The char32_t type): Likewise.
6819 2023-06-27  Bruno Haible  <bruno@clisp.org>
6821         striconveh: Fix module description.
6822         * modules/striconveh (Link): Add $(LIBUNISTRING).
6823         * modules/striconveha (Link): New section.
6824         * modules/xstriconveh (Link): New section.
6826 2023-06-25  Bruno Haible  <bruno@clisp.org>
6828         strncat: Update doc regarding Solaris 11.4.
6829         * doc/posix-functions/strncat.texi: Mention that the bug still exists on
6830         Solaris 11.4.
6831         * m4/strncat.m4 (gl_FUNC_STRNCAT): Update comments.
6833 2023-06-25  Bruno Haible  <bruno@clisp.org>
6835         thread: Avoid compiler warnings on Solaris.
6836         * lib/glthread/thread.h: Include <stdint.h>.
6837         (gl_thread_self_pointer): Do the cast from pthread_t to 'void *' via
6838         intptr_t.
6839         * modules/thread (Depends-on): Add stdint.
6841 2023-06-25  Bruno Haible  <bruno@clisp.org>
6843         strerrorname_np: Add support for Solaris 11.4/sparc.
6844         * lib/strerrorname_np.c (strerrorname_np): Consider ECKSUM, EFRAGS.
6845         Allow ENOANO to be overloaded to another value.
6846         * tests/test-strerrorname_np.c (main): Likewise.
6848 2023-06-25  Jim Meyering  <meyering@meta.com>
6850         doc: correct doubled "on on"
6851         * doc/glibc-functions/initstate_r.texi: As above.
6852         * doc/posix-functions/initstate.texi: As above.
6854 2023-06-25  Bruno Haible  <bruno@clisp.org>
6856         sigdescr_np tests: Avoid test failure on glibc/sparc.
6857         * tests/test-sigdescr_np.c (main): Accept the glibc result for SIGEMT.
6858         * doc/glibc-functions/sigdescr_np.texi: Mention two glibc deficiencies.
6860 2023-06-25  Bruno Haible  <bruno@clisp.org>
6862         strerrorname_np: Work around glibc bug on PowerPC, SPARC systems.
6863         * m4/strerrorname_np.m4 (gl_FUNC_STRERRORNAME_NP): Test also
6864         strerrorname_np (EDEADLOCK).
6865         * doc/glibc-functions/strerrorname_np.texi: Mention that glibc 2.36
6866         still needs a workaround.
6868 2023-06-25  Bruno Haible  <bruno@clisp.org>
6870         doc: Mention glibc initstate, initstate_r bug.
6871         * doc/posix-functions/initstate.texi: Mention glibc bug.
6872         * doc/glibc-functions/initstate_r.texi: Likewise.
6873         * tests/test-random_r.c: Add a comment.
6875 2023-06-25  Bruno Haible  <bruno@clisp.org>
6877         doc: Update doc regarding 'setstate'.
6878         * doc/posix-functions/setstate.texi: Mention also Solaris 11.4.
6880 2023-06-25  Bruno Haible  <bruno@clisp.org>
6882         doc: Update doc regarding <ieee754.h>.
6883         * doc/glibc-headers/ieee754.texi: Mention that it's not present on
6884         glibc/sparc64 in 32-bit mode.
6886 2023-06-25  Bruno Haible  <bruno@clisp.org>
6888         exclude: Complete last change.
6889         * lib/exclude.c: Include <uchar.h> instead of <wctype.h>.
6891 2023-06-24  Bruno Haible  <bruno@clisp.org>
6893         mbchar, mbiter, mbuiter: Overcome wchar_t limitations.
6894         * lib/mbchar.h: Include <uchar.h> instead of <wchar.h>, <wctype.h>.
6895         (struct mbchar): Use char32_t instead of wchar_t.
6896         (mb_casecmp, mb_caseequal): Use c32tolower instead of towlower.
6897         (mb_isalnum): Use c32isalnum instead of iswalnum.
6898         (mb_isalpha): Use c32isalpha instead of iswalpha.
6899         (mb_isblank): Use c32isblank instead of iswblank.
6900         (mb_iscntrl): Use c32iscntrl instead of iswcntrl.
6901         (mb_isdigit): Use c32isdigit instead of iswdigit.
6902         (mb_isgraph): Use c32isgraph instead of iswgraph.
6903         (mb_islower): Use c32islower instead of iswlower.
6904         (mb_isprint): Use c32isprint instead of iswprint.
6905         (mb_ispunct): Use c32ispunct instead of iswpunct.
6906         (mb_isspace): Use c32isspace instead of iswspace.
6907         (mb_isupper): Use c32isupper instead of iswupper.
6908         (mb_isxdigit): Use c32isxdigit instead of iswxdigit.
6909         (mb_width_aux): Use c32width, c32iscntrl instead of wcwidth, iswcntrl.
6910         * lib/mbiter.h: Include <uchar.h> instead of <wchar.h>.
6911         (mbiter_multi_next): Use mbrtoc32 instead of mbrtowc.
6912         * lib/mbuiter.h: Include <uchar.h> instead of <wchar.h>.
6913         (mbuiter_multi_next): Use mbrtoc32 instead of mbrtowc.
6914         * lib/mbfile.h (mbfile_multi_getc): Use mbrtoc32 instead of mbrtowc.
6915         * lib/mbscasestr.c (knuth_morris_pratt_multibyte, mbscasestr): Use
6916         c32tolower instead of towlower.
6917         * lib/exclude.c (string_hasher_ci): Use char32_t, c32tolower instead of
6918         wchar_t, towlower.
6919         * modules/mbchar (Depends-on): Add uchar, c32isalnum, c32isalpha,
6920         c32isblank, c32iscntrl, c32isdigit, c32isgraph, c32islower, c32isprint,
6921         c32ispunct, c32isspace, c32isupper, c32isxdigit, c32tolower, c32width.
6922         Remove wchar, wctype-h, iswblank, iswdigit, iswxdigit, wcwidth.
6923         * modules/mbiter (Depends-on): Add mbrtoc32, uchar. Remove mbrtowc,
6924         wchar.
6925         * modules/mbuiter (Depends-on): Likewise.
6926         * modules/mbscasestr (Depends-on): Add c32tolower.
6927         * modules/exclude (Depends-on): Add c32tolower.
6928         * doc/strings.texi (C strings): Fix typo.
6930 2023-06-22  Bruno Haible  <bruno@clisp.org>
6932         doc: Use makeinfo option to check menu structure.
6933         Trick revealed by Patrice Dumas <pertusus@free.fr> in
6934         <https://lists.gnu.org/archive/html/bug-texinfo/2023-06/msg00015.html>.
6935         * doc/Makefile (MAKEINFO): Enforce checking of menu structure.
6937 2023-06-22  Bruno Haible  <bruno@clisp.org>
6939         doc: Correct info menu structure.
6940         Reported by Elijah Zarezky <elijah@zarezky.spb.ru> in
6941         <https://lists.gnu.org/archive/html/bug-gnulib/2023-06/msg00105.html>.
6942         * doc/strings.texi (Strings): Add missing @menu item.
6944 2023-06-20  Paul Eggert  <eggert@cs.ucla.edu>
6946         doc: INSTALL uses UTF-8 now
6947         * doc/Makefile (INSTALL.ISO, INSTALL.UTF-8):
6948         Adjust to the fact that INSTALL now uses UTF-8.
6949         INSTALL.UTF-8 is now obsolescent since it is identical.
6950         (INSTALL.ISO): Transliterate all non-ASCII characters,
6951         not just single quotes.
6952         * doc/INSTALL.ISO: Regenerate.
6954 2023-06-19  Paul Eggert  <eggert@cs.ucla.edu>
6956         largefile: port to GNU/Linux s390x and alpha
6957         This patch syncs from Autoconf master.
6958         Problem reported by Matoro <https://bugs.gnu.org/64123>.
6959         * lib/autoconf/specific.m4 (_AC_SYS_LARGEFILE_TEST_CODE):
6960         New overridable macro FTYPE, to test types other than off_t.
6961         (_AC_SYS_LARGEFILE_TEST_CODE): Test ino_t for
6962         -D_FILE_OFFSETBITS=64 too, if no flags are needed for off_t.
6963         Needed for GNU/Linux on alpha and s390x.
6965 2023-06-19  Bruno Haible  <bruno@clisp.org>
6967         doc: Corrections to the "Strings and Characters" chapter.
6968         Suggested by Paul Eggert.
6969         * doc/strings.texi: Corrections: GB18030 is rarely used nowadays.
6970         <ctype.h> functions can be useful for specific data.
6972 2023-06-19  Bruno Haible  <bruno@clisp.org>
6974         doc: Use "spaced en dash" style instead of "spaced em dash" style.
6975         Suggested by Paul Eggert.
6976         * doc/gnulib.texi: At sentence level, use "spaced en dash" style instead
6977         of "spaced em dash" style.
6978         * doc/gnulib-intro.texi: Likewise.
6979         * doc/multithread.texi: Likewise.
6980         * doc/strings.texi: Likewise.
6982 2023-06-19  Bruno Haible  <bruno@clisp.org>
6984         setenv: Simplify m4 requires.
6985         * m4/setenv.m4 (gl_PREREQ_SETENV): Don't require AC_FUNC_ALLOCA.
6987 2023-06-18  Bruno Haible  <bruno@clisp.org>
6989         configmake: Bypass the unusable 'echo' command of some shells.
6990         Reported by Brian Inglis <Brian.Inglis@Shaw.ca> in
6991         <https://lists.gnu.org/archive/html/bug-gettext/2023-06/msg00054.html>.
6992         * m4/build-to-host.m4 (gl_BUILD_TO_HOST): Use 'printf' instead of
6993         'echo', because the "dash" shell has a SystemV compatible 'echo'
6994         command. Also, be sure to remove trailing CRs.
6996 2023-06-18  Paul Eggert  <eggert@cs.ucla.edu>
6998         update-copyright tests: fix to match behavior
6999         * tests/test-update-copyright.sh: Change tests to match new behavior.
7001 2023-06-18  Bruno Haible  <bruno@clisp.org>
7003         update-copyright tests: Add tests for man pages.
7004         * tests/test-update-copyright.sh: Add 4 tests that use man page syntax.
7006 2023-06-18  Bruno Haible  <bruno@clisp.org>
7008         gettext: Clarify the purpose of this module.
7009         Suggested by Paul Eggert in
7010         <https://lists.gnu.org/archive/html/bug-gnulib/2023-06/msg00089.html>.
7011         * modules/gettext (Description): Clarify the purpose.
7012         (Makefile.am): Remove outdated comment. "gettextize --intl" is no longer
7013         possible since 2019.
7015 2023-06-18  Paul Eggert  <eggert@cs.ucla.edu>
7017         Update \(en in copyright notices
7018         * build-aux/update-copyright (ndash_re): New var, matching \(en too.
7019         (stmt_remainder_re, stmt): Use it.
7020         (stmt): Match year in constructs like "\(en2023".
7021         (ndash): Now \(en in man pages.
7023 2023-06-17  Bruno Haible  <bruno@clisp.org>
7025         gettext: Update to gettext 0.22.
7026         * modules/gettext (Files): Add m4/build-to-host.m4.
7027         (configure.ac): Request infrastructure compatible with gettext 0.22.
7028         * m4/gettext.m4: Update from gettext 0.22.
7029         * m4/po.m4: Likewise.
7031 2023-06-15  Bruno Haible  <bruno@clisp.org>
7033         aligned-malloc, rmdir-errno: Sanitize configuration test result.
7034         * m4/malloc-align.m4 (gl_MALLOC_ALIGNMENT): Don't put a newline at the
7035         end of the conftest.out file.
7036         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Don't put a newline at the
7037         end of the confdir2/errno file.
7039 2023-06-13  Bruno Haible  <bruno@clisp.org>
7041         Make internationalization tests stricter on musl systems.
7042         --
7043         * m4/locale-fr.m4 (gt_LOCALE_FR): On musl systems, set LOCALE_FR_UTF8 to
7044         "fr_FR.UTF-8" instead of "none". Set and substitute
7045         LC_COLLATE_IMPLEMENTED, LC_NUMERIC_IMPLEMENTED, LC_TIME_IMPLEMENTED,
7046         LC_MONETARY_IMPLEMENTED.
7047         * m4/iswdigit.m4 (gl_FUNC_ISWDIGIT): Skip testing a certain locale if
7048         that locale is "none".
7049         * m4/iswxdigit.m4 (gl_FUNC_ISWXDIGIT): Likewise.
7050         * m4/mbrlen.m4 (gl_MBRLEN_RETVAL): Likewise.
7051         * m4/mbrtowc.m4 (gl_MBRTOWC_RETVAL): Likewise.
7052         * m4/mbrtoc32.m4 (gl_MBRTOC32_SANITYCHECK): Likewise.
7053         * m4/mbsrtowcs.m4 (gl_MBSRTOWCS_WORKS): Likewise.
7054         * m4/wcrtomb.m4 (gl_FUNC_WCRTOMB): Likewise.
7055         --
7056         * tests/test-c32isalpha.c (main): On musl libc, disable tests that fail.
7057         * tests/test-c32iscntrl.c (main): Likewise.
7058         * tests/test-c32isgraph.c (main): Likewise.
7059         * tests/test-c32islower.c (main): Likewise.
7060         * tests/test-c32isprint.c (main): Likewise.
7061         * tests/test-c32toupper.c (main): Likewise.
7062         * tests/test-nl_langinfo1.c (main): Likewise.
7063         * tests/test-nl_langinfo2.c (main): Likewise.
7064         * modules/c32isalpha-tests (Files): Add musl.m4.
7065         (configure.ac): Invoke gl_MUSL_LIBC.
7066         * modules/c32iscntrl-tests (Files): Add musl.m4.
7067         (configure.ac): Invoke gl_MUSL_LIBC.
7068         * modules/c32isgraph-tests (Files): Add musl.m4.
7069         (configure.ac): Invoke gl_MUSL_LIBC.
7070         * modules/c32islower-tests (Files): Add musl.m4.
7071         (configure.ac): Invoke gl_MUSL_LIBC.
7072         * modules/c32isprint-tests (Files): Add musl.m4.
7073         (configure.ac): Invoke gl_MUSL_LIBC.
7074         * modules/c32toupper-tests (Files): Add musl.m4.
7075         (configure.ac): Invoke gl_MUSL_LIBC.
7076         * modules/nl_langinfo-tests (Files): Add musl.m4.
7077         (configure.ac): Invoke gl_MUSL_LIBC.
7078         --
7079         * tests/test-strtod1.sh: Skip the test if LC_NUMERIC_IMPLEMENTED is
7080         false.
7081         * tests/test-strtold1.sh: Likewise.
7082         * tests/test-vasnprintf-posix2.sh: Likewise.
7083         * tests/test-vasnwprintf-posix2.sh: Likewise.
7084         * modules/strtod-tests (Makefile.am): Set LC_NUMERIC_IMPLEMENTED in the
7085         tests environment.
7086         * modules/strtold-tests (Makefile.am): Likewise.
7087         * modules/vasnprintf-posix-tests (Makefile.am): Likewise.
7088         * modules/vasnwprintf-posix-tests (Makefile.am): Likewise.
7090 2023-06-12  Bruno Haible  <bruno@clisp.org>
7092         vasnwprintf-posix: Work around another musl libc bug.
7093         * m4/printf.m4 (gl_SWPRINTF_DIRECTIVE_LC): New macro.
7094         * m4/vasnprintf.m4 (gl_PREREQ_VASNWPRINTF): Invoke it, and set
7095         NEED_WPRINTF_DIRECTIVE_LC if the %lc test failed.
7096         * lib/vasnprintf.c (VASNPRINTF): If NEED_WPRINTF_DIRECTIVE_LC is set, do
7097         the processing for %lc and %ls ourselves.
7098         (local_wcslen): Update condition.
7099         * doc/posix-functions/swprintf.texi: Mention the %lc problem.
7101 2023-06-12  Bruno Haible  <bruno@clisp.org>
7103         vasnwprintf-posix: Work around a musl libc bug.
7104         * m4/vasnprintf.m4 (gl_PREREQ_VASNWPRINTF): Test also whether swprintf
7105         in the C locale is free of encoding errors, and set
7106         NEED_WPRINTF_DIRECTIVE_C if not.
7107         * doc/posix-functions/swprintf.texi: Clarify the list of platforms for
7108         the %c problem.
7110 2023-06-12  Bruno Haible  <bruno@clisp.org>
7112         vasnwprintf: Fix some cross-compilation results.
7113         * m4/printf.m4 (gl_SWPRINTF_WORKS): Fix cross-compilation result for
7114         musl.
7115         (gl_SWPRINTF_DIRECTIVE_LA): Fix cross-compilation result for Android.
7117 2023-06-12  Bruno Haible  <bruno@clisp.org>
7119         warnings: Save memory and CPU time when inhibiting all warnings.
7120         * m4/warnings.m4 (gl_WARN_ADD): Improve comments.
7121         (gl_CC_INHIBIT_WARNINGS): Add also '-fno-analyzer' to
7122         GL_CFLAG_INHIBIT_WARNINGS.
7123         (gl_CXX_INHIBIT_WARNINGS): Add also '-fno-analyzer' to
7124         GL_CXXFLAG_INHIBIT_WARNINGS.
7126 2023-06-11  Bruno Haible  <bruno@clisp.org>
7128         javacomp-script, javacomp: Document effects of yesterday's change.
7129         * NEWS: Mention yesterday's change.
7131 2023-06-11  Bruno Haible  <bruno@clisp.org>
7133         javacomp-script, javacomp: Silence javac warnings regarding [options].
7134         * m4/javacomp.m4 (gt_JAVACOMP): Use option '-Xlint:-options' by default
7135         and omit it only when it does not work.
7136         * lib/javacomp.c (compile_using_javac): Add nowarn_option parameter.
7137         (is_envjavac_usable): Add nowarn_option_out parameter. Use option
7138         '-Xlint:-options' by default and omit it only when it does not work.
7139         (is_javac_usable): Likewise.
7140         (compile_java_class): Store the nowarn_option returned from
7141         is_envjavac_usable and use it when invoking compile_using_envjavac.
7142         Store the nowarn_option returned from is_javac_usable and use it when
7143         invoking compile_using_javac.
7145 2023-06-10  Bruno Haible  <bruno@clisp.org>
7147         javacomp-script, javacomp: Add support for javac versions > 11.
7148         Reported by Adrian Bunk <bunk-gnu@fs.tum.de> in
7149         <https://savannah.gnu.org/bugs/?63385>.
7150         * m4/javacomp.m4 (gt_JAVACOMP): When the java version is > 11, use that
7151         version as target_version, not 11. When the java version is > 17, don't
7152         warn. Remove goodcode, failcode variables. Don't bail out if the
7153         source-version argument or the target-version argument is in the range
7154         12..99. Use a heuristic that works with javac versions 11..20 at least.
7155         Update comments.
7156         * lib/javacomp.h (compile_java_class): State that source-version and
7157         target-version may be larger than 11.
7158         * lib/javacomp.c (default_target_version): Accommodate versions up to
7159         99.
7160         (SOURCE_VERSION_BOUND): Increase to 94.
7161         (source_version_index): Accept versions up to 99.
7162         (get_goodcode_snippet, get_failcode_snippet): Remove functions.
7163         (TARGET_VERSION_BOUND): Increase to 94.
7164         (target_version_index): Accept versions up to 99.
7165         (corresponding_classfile_version): Remove function.
7166         (execute_and_read_line): New function, based on lib/javaversion.c.
7167         (get_compiler_version): New function.
7168         (is_envjavac_usable): Add parameters source_option_out,
7169         target_option_out. Use a heuristic that works with javac versions 11..20
7170         at least. Call cleanup_temp_dir.
7171         (is_javac_usable): Likewise.
7172         (compile_java_class): Update.
7174 2023-06-10  Bruno Haible  <bruno@clisp.org>
7176         javacomp-script, javacomp: Remove support for javac versions < 1.6.
7177         * m4/javacomp.m4 (gt_JAVACOMP): State that the minimum source_version
7178         and the minimum target_version are 1.6. Map smaller values to 1.6.
7179         Complain if the java version is < 1.6. Use 1.6 as default, instead of
7180         1.1. Don't bother trying the -target option alone.
7181         * lib/javacomp.h (compile_java_class): State that the minimum
7182         source_version and the minimum target_version are 1.6.
7183         * lib/javacomp.c (default_target_version): Complain if the java version
7184         is < 1.6. Use 1.6 as default, instead of 1.1.
7185         (SOURCE_VERSION_BOUND, source_version_index, get_goodcode_snippet,
7186         get_failcode_snippet): Adjust to the new minimum source_version = 1.6.
7187         (TARGET_VERSION_BOUND, target_version_index,
7188         corresponding_classfile_version): Adjust to the new minimum
7189         target_version = 1.6.
7190         (get_source_version_for_javac): Remove function.
7191         (is_envjavac_usable): Remove source_version_for_javac parameter. Don't
7192         bother trying the -target option alone.
7193         (is_javac_usable): Likewise.
7194         (compile_java_class): Map source_version < 1.6 to 1.6. Map
7195         target_version < 1.6 to 1.6. Use source_version instead of calling
7196         get_source_version_for_javac.
7198 2023-06-10  Bruno Haible  <bruno@clisp.org>
7200         javacomp: Simplify after gcj support was removed.
7201         * m4/javacomp.m4 (gt_JAVACOMP): Don't create conftestlib.java.
7202         * lib/javacomp.c (compile_java_class): Remove local variables
7203         no_assert_option, fsource_option, ftarget_option.
7205 2023-06-09  Bruno Haible  <bruno@clisp.org>
7207         doc: Document <stdatomic.h>.
7208         * doc/posix-headers/stdatomic.texi: New file.
7209         * doc/gnulib.texi (Header File Substitutes): Include it.
7211 2023-06-09  Jim Meyering  <meyering@meta.com>
7213         maint.mk: sc_prohibit_xalloc_without_use: also match alloc_die
7214         * top/maint.mk (sc_prohibit_xalloc_without_use):
7215         Adjust in-comment command's regexp so it also finds alloc_die,
7216         whose declaration has a prefix of "_Noreturn ".
7217         Also delete some now-obsolete commentary.
7218         (_xa1): Regenerate the regexp using that command.
7219         Reported by Pádraig Brady in
7220         <https://lists.gnu.org/r/bug-gnulib/2023-06/msg00062.html>.
7222 2023-06-09  Paul Eggert  <eggert@cs.ucla.edu>
7224         xalloc-die: omit /*extern*/
7225         * lib/xalloc.h (xalloc_die): Omit leading "/*extern*/".
7226         It complicates syntax checking; see:
7227         https://lists.gnu.org/r/bug-gnulib/2023-06/msg00062.html
7228         Plus, it’s inconsistent style: the other function declarations in
7229         xalloc.h don’t use ‘extern’. (I’m not a fan of using ‘extern’ when
7230         it’s just noise, as is the case here.)
7232 2023-06-09  Bruno Haible  <bruno@clisp.org>
7234         javaversion: Update comments.
7235         * lib/javaversion.h (javaexec_version): Document the possible results up
7236         to OpenJDK 20.
7238 2023-06-09  Bruno Haible  <bruno@clisp.org>
7240         javacomp: Remove support for 'jikes'.
7241         * lib/javacomp.c (compile_using_jikes, is_jikes_present): Remove
7242         functions.
7243         (compile_java_class): Remove jikes related code.
7245         javacomp-script: Remove support for 'jikes'.
7246         * build-aux/javacomp.sh.in: Don't test HAVE_JIKES.
7247         * m4/javacomp.m4 (gt_JAVACOMP): Don't set HAVE_JIKES. Don't set
7248         CONF_JAVAC to 'jikes'. Update comment.
7249         (gt_JAVACOMP_DISABLED): Don't set HAVE_JIKES.
7251 2023-06-09  Bruno Haible  <bruno@clisp.org>
7253         javacomp: Remove support for 'gcj'.
7254         * lib/javacomp.h: Update comment.
7255         * lib/javacomp.c (compile_using_gcj, is_envjavac_gcj, is_envjavac_gcj43,
7256         is_envjavac_gcj43_usable, is_envjavac_oldgcj_14_14_usable,
7257         is_envjavac_oldgcj_14_13_usable, is_gcj_present, is_gcj_43,
7258         is_gcj43_usable, is_oldgcj_14_14_usable, is_oldgcj_14_13_usable): Remove
7259         functions.
7260         (is_envjavac_usable): Renamed from is_envjavac_nongcj_usable.
7261         (compile_java_class): Remove gcj related code.
7263         javacomp-script: Remove support for 'gcj'.
7264         * build-aux/javacomp.sh.in: Don't test HAVE_GCJ_C.
7265         * m4/javacomp.m4 (gt_JAVACOMP): Don't set HAVE_GCJ_C. Don't test whether
7266         $JAVAC is gcj. Don't set CONF_JAVAC to 'gcj -C'. Update comment.
7267         (gt_JAVACOMP_DISABLED): Don't set HAVE_GCJ_C.
7269         javaexec: Remove support for 'gij'.
7270         * lib/javaexec.c (execute_java_class): Don't test for gij.
7272         javaexec-script: Remove support for 'gij'.
7273         * build-aux/javaexec.sh.in: Don't test HAVE_GIJ.
7274         * m4/javaexec.m4 (gt_JAVAEXEC): Don't set HAVE_GIJ. Don't set CONF_JAVA
7275         to 'gij'.
7276         * m4/javacomp.m4: Update comment.
7278 2023-06-09  Bruno Haible  <bruno@clisp.org>
7280         javaexec: Remove support for 'jview'.
7281         * lib/javaexec.c (execute_java_class): Don't test for jview.
7283         javaexec-script: Remove support for 'jview'.
7284         * build-aux/javaexec.sh.in: Don't test HAVE_JVIEW.
7285         * m4/javaexec.m4 (gt_JAVAEXEC): Don't set HAVE_JVIEW. Don't set
7286         CONF_JAVA to 'jview'.
7287         (gt_JAVAEXEC_DISABLED): Don't set HAVE_JVIEW.
7288         * m4/javacomp.m4: Update comment.
7290 2023-06-06  Jim Meyering  <meyering@meta.com>
7292         maint.mk: regenerate regex to reflect new functions in xalloc.h
7293         * top/maint.mk (sc_prohibit_xalloc_without_use) [_xa1]:
7294         Regenerate using the command listed in the comment.
7296 2023-06-06  Paul Eggert  <eggert@cs.ucla.edu>
7298         propername: pacify po_check
7299         Problem reported by Bruno Haible <https://bugs.gnu.org/63933>.
7300         * lib/propername.h: Change comment.
7302         Put "/" at end of .gitignore directory names
7303         * build-aux/bootstrap: Regenerate.
7304         * top/bootstrap-funclib.sh (symlink_to_dir, autogen):
7305         Put slashes after .gitignore entries that name directories.
7307 2023-06-06  Jose E. Marchesi  <jemarch@gnu.org>
7309         maintainer-makefile: Enforce the GNU Coding Standards in the README.
7310         * top/maint.mk (sc_readme_link_install): New rule.
7311         (sc_readme_link_copying): Likewise.
7313 2023-06-05  Paul Eggert  <eggert@cs.ucla.edu>
7315         copy-file-range: support building for older kernels
7316         * m4/copy-file-range.m4 (gl_FUNC_COPY_FILE_RANGE):
7317         Remove static check, to support the dubious practice of
7318         building for platforms that predate the build platform.
7319         On working kernels this adds an extra syscall the first time
7320         that copy_file_range is used.  Problem reported for Gentoo by
7321         Sam James <https://bugs.gnu.org/63850>.
7323         manywarnings: more nuance about optimization
7324         * doc/manywarnings.texi (manywarnings): Suggest compiling with the
7325         optimization flags commonly used, as opposed to -O2 and -O0
7326         specifically.  -ggdb shouldn’t affect warnings so don’t mention it.
7328 2023-06-05  Bruno Haible  <bruno@clisp.org>
7330         posix_spawn-internal: Fix a warning (regression 2022-11-20).
7331         * lib/spawni.c: Don't use this particular #pragma for gcc < 4.2.
7333 2023-06-05  Bruno Haible  <bruno@clisp.org>
7335         file-has-acl: Fix compilation error on Slackware 13 (regr. 2023-05-12).
7336         * lib/file-has-acl.c (XATTR_NAME_POSIX_ACL_ACCESS,
7337         XATTR_NAME_POSIX_ACL_DEFAULT): Add fallback definitions.
7339 2023-06-05  Bruno Haible  <bruno@clisp.org>
7341         Fix bugs on mingw when module dirfd is in use (regression 2023-04-26).
7342         * lib/getcwd.c: When GNULIB_defined_DIR, revert to the system's
7343         definitions of opendir, closedir, readdir, rewinddir.
7344         * lib/mountlist.c: When GNULIB_defined_DIR, revert to the system's
7345         definitions of opendir, closedir, readdir.
7346         * lib/scandir.c: Likewise.
7347         * lib/glob.c: Fix comment. When GNULIB_defined_DIR, don't undefine
7348         opendir, closedir.
7350 2023-06-04  Bruno Haible  <bruno@clisp.org>
7352         manywarnings: Overhaul documentation.
7353         * doc/manywarnings.texi: In the example, put all unwanted warning
7354         options into 'nw', and use a second gl_MANYWARN_COMPLEMENT invocation to
7355         sort out how these options need to get added to WARN_FLAGS.
7356         Describe the first-time use in more detail: Recommend a new GCC.
7357         Recommend to test builds with -O2 and with -O0. Suggest to sort the
7358         warning by warning option. Add reference to the GCC pragma's
7359         documentation.
7361 2023-06-04  Bruno Haible  <bruno@clisp.org>
7363         error: Fix support for library namespacing (regression 2023-05-27).
7364         * lib/error.in.h (error): If error is defined as a macro, define a
7365         static inline function _gl_inline_error that invokes it, and let the
7366         new error macro invoke that function.
7367         (error_at_line): If error_at_line is defined as a macro, define a static
7368         inline function _gl_inline_error_at_line that invokes it, and let the
7369         new error_at_line macro invoke that function.
7371 2023-06-04  Bruno Haible  <bruno@clisp.org>
7373         terminfo, termcap: Fix "discards 'const' qualifier" warnings.
7374         * lib/tparm.c (tparm): Change type of 'fmt'. New local variable 'fmtp'.
7376 2023-06-04  Bruno Haible  <bruno@clisp.org>
7378         uniname/uniname: Add comments.
7379         * modules/uniname/uniname (Makefile.am): Explain how to work around a
7380         GCC bug.
7382 2023-06-04  Bruno Haible  <bruno@clisp.org>
7384         uniname/uniname: Fix -Wformat-signedness warning.
7385         * lib/uniname/uniname.c (unicode_character_name): Use %u instead of %d
7386         in format string.
7388 2023-06-04  Bruno Haible  <bruno@clisp.org>
7390         uniname/uniname: Improve comments.
7391         * lib/uniname/uniname.c (unicode_character_name): Fix comments.
7393 2023-06-03  Bruno Haible  <bruno@clisp.org>
7395         classpath, csharpexec: Avoid "candidate for attribute 'malloc'" warning.
7396         * lib/classpath.h (set_classpath): Mark with attribute 'malloc'.
7398 2023-06-03  Bruno Haible  <bruno@clisp.org>
7400         propername-lite: Improve documentation.
7401         * lib/propername.h: Describe functional differences between
7402         proper_name_lite and proper_name_utf8.
7404 2023-06-03  Bruno Haible  <bruno@clisp.org>
7406         gnulib-tool: Keep in sync with last change to gnulib-tool.py.
7407         * gnulib-tool (func_emit_po_Makevars): Treat proper_name_lite like
7408         proper_name_utf8.
7410 2023-06-03  Bruno Haible  <bruno@clisp.org>
7412         error: Improve comments.
7413         * lib/error.in.h (__gl_error_call): Add more comments.
7415 2023-06-02  Paul Eggert  <eggert@cs.ucla.edu>
7417         error: do not evaluate status twice
7418         Do this in a different way, so that the status is evaluated
7419         once even when not optimizing and when using GCC.
7420         * lib/error.in.h (__gl_error_call1) [__GNUC__]: New macro.
7421         (__gl_error_call) [__GNUC__]: Use it.
7423 2023-06-02  Bruno Haible  <bruno@clisp.org>
7425         warnings: Add ability to inhibit all warnings.
7426         * m4/warnings.m4 (gl_CC_INHIBIT_WARNINGS, gl_CXX_INHIBIT_WARNINGS): New
7427         macros, based on gl_CC_ALLOW_WARNINGS and gl_CXX_ALLOW_WARNINGS in
7428         m4/gnulib-common.m4.
7430 2023-06-02  Paul Eggert  <eggert@cs.ucla.edu>
7432         propername-lite: new module
7433         propername_lite acts like propername_utf8 but needs less
7434         infrastructure, e.g., it does not worry about memory allocation.
7435         * MODULES.html.sh (func_all_modules): Mention it.
7436         * lib/propername.h (proper_name_lite): New decl.
7437         * lib/propername-lite.c, modules/propername-lite: New files.
7438         * pygnulib/GLEmiter.py (GLEmiter.po_Makevars):
7439         Treat proper_name_lite like proper_name_utf8.
7441 2023-06-02  Bruno Haible  <bruno@clisp.org>
7443         openmp-init: Silence "no previous prototype for 'openmp_init'" warning.
7444         * lib/omp.in.h: Test _OPENMP.
7445         * lib/omp-init.c: Include <omp.h> always.
7446         * modules/openmp-init (Include): Allow <omp.h> to be included always.
7448 2023-06-02  Bruno Haible  <bruno@clisp.org>
7450         term-style-control: Silence -Wshadow warning.
7451         * lib/term-style-control.c (continuing_signal_handler): Rename
7452         parameter.
7454 2023-06-02  Bruno Haible  <bruno@clisp.org>
7456         pipe-filter-gi, pipe-filter-ii: Silence -Wunused-macro warning.
7457         * lib/pipe-filter-aux.c: Remove many unnecessary includes.
7458         (_): Remove macro.
7460 2023-06-02  Bruno Haible  <bruno@clisp.org>
7462         javacomp: Silence -Wanalyzer-possible-null-argument warning.
7463         * lib/javacomp.c: Include verify.h.
7464         (is_envjavac_gcj43_usable, is_envjavac_oldgcj_14_13_usable,
7465         is_envjavac_nongcj_usable, compile_java_class): Assert that the
7466         xasprintf results are non-NULL. This is possible since all involved
7467         format strings are valid and don't use %ls, and all argument strings
7468         are small compared to INT_MAX.
7469         * modules/javacomp (Depends-on): Add verify.
7471 2023-06-02  Bruno Haible  <bruno@clisp.org>
7473         striconveha: Don't crash if malloc() returns NULL.
7474         * lib/striconveha.c (mem_iconveha, str_iconveha): Check malloca() return
7475         value.
7477 2023-06-02  Bruno Haible  <bruno@clisp.org>
7479         setenv: Don't crash if malloc() returns NULL.
7480         * lib/setenv.c (rpl_setenv): Check malloca() return value.
7482 2023-06-02  Bruno Haible  <bruno@clisp.org>
7484         error: Avoid implicit-fallthrough warnings with -O0 (regr. 2023-05-30).
7485         * lib/error.in.h (__gl_error_call): Parenthesize status. When not
7486         optimizing, expand to code without compound statements.
7488 2023-06-01  Bruno Haible  <bruno@clisp.org>
7490         getprogname: Add support for ASCII-compatible environments in z/OS.
7491         Reported by Mike Fulton <mikefultonpersonal@gmail.com> in
7492         <https://lists.gnu.org/archive/html/bug-gnulib/2023-05/msg00198.html>.
7493         * lib/getprogname.c (getprogname): On z/OS, when compiling for an
7494         ASCII-compatible environment, convert the result from EBCDIC to ASCII.
7496 2023-06-01  Mitch Capper  <mitch.capper@gmail.com>
7498         gnulib-tool.py: Fix a format string mistake.
7499         * pygnulib/GLImport.py (GLImport.execute): Fix a typo in a format
7500         string.
7501         Copyright-paperwork-exempt: Yes
7503 2023-06-01  Bruno Haible  <bruno@clisp.org>
7505         Add info for maintainers and contributors.
7506         * HACKING: New file.
7508 2023-05-30  Nick Bowler  <nbowler@draconx.ca>
7510         readline: fix memory leak in replacement readline.
7511         * lib/readline.c (readline): Free memory after getline failure.
7512         Copyright-paperwork-exempt: true
7514 2023-05-30  Paul Eggert  <eggert@cs.ucla.edu>
7516         error: don’t call ‘exit’
7517         Let the underlying functions call ‘exit’, instead of having the
7518         Gnulib replacement macros do it.  Use ‘unreachable’ to tell the
7519         compiler that those functions exit when the status is nonzero.
7520         This saves a function call.
7521         * lib/error.in.h: Include stddef.h, not stdlib.h.
7522         (__gl_error_call): Rely on the function to exit, using
7523         ‘unreachable’ to tell the compiler that the function does not return.
7524         * modules/error (Depends-on): Add stddef.
7526         error: don’t evaluate status arg twice
7527         This avoids potential issues if the first argument has a side effect.
7528         * lib/error.in.h (__gl_error_call): New macro, which evaluates its
7529         status arg only once, by using a statement expression if GNU C -
7530         the only platform we need to worry about pacifying - and by simply
7531         calling ‘error’ otherwise.
7532         (error, error_at_line): Use it.
7534 2023-05-28  Bruno Haible  <bruno@clisp.org>
7536         warnings, manywarnings: Assume autoconf >= 2.64.
7537         * m4/warnings.m4 (gl_AS_VAR_APPEND): Remove macro.
7538         (gl_COMPILER_OPTION_IF, gl_WARN_ADD): Use AS_VAR_APPEND instead of
7539         gl_AS_VAR_APPEND.
7540         * m4/manywarnings.m4: Likewise.
7542 2023-05-28  Jim Meyering  <meyering@fb.com>
7544         file-has-acl: avoid warning from bleeding-edge GCC
7545         * lib/file-has-acl.c: Include attribute.h.
7546         (have_xattr): Declare with ATTRIBUTE_PURE,
7547         to avoid new warning from GCC14-to-be.
7548         * modules/file-has-acl (Depends-on): Add attribute.
7549         Spotted while building coreutils with this:
7550         gcc version 14.0.0 20230526 (experimental)
7552 2023-05-28  Bruno Haible  <bruno@clisp.org>
7554         error: Avoid -Wint-in-bool-context warning.
7555         Reported by Pádraig Brady in
7556         <https://lists.gnu.org/archive/html/bug-gnulib/2023-05/msg00178.html>.
7557         * lib/error.in.h (error, error_at_line): Use 'status != 0', since status
7558         is expected to be an int, not a bool value.
7560 2023-05-27  Bruno Haible  <bruno@clisp.org>
7562         error: Support the compiler's control flow analysis better.
7563         * lib/error.in.h: Remove @PRAGMA_SYSTEM_HEADER@. Include <stdlib.h>.
7564         (error): Define as a macro that explicitly invokes exit().
7565         (error_at_line): Likewise.
7566         * lib/error.c (_GL_NO_INLINE_ERROR): Define before including error.h.
7567         * modules/error-h (configure.ac): Don't invoke gl_CONDITIONAL_HEADER.
7568         (Makefile.am): Generate error.h always. Don't substitute
7569         PRAGMA_SYSTEM_HEADER.
7570         * m4/error_h.m4 (gl_ERROR_H): Set COMPILE_ERROR_C instead of
7571         GL_GENERATE_ERROR_H.
7572         * modules/error (configure.ac, Depends-on): Test COMPILE_ERROR_C instead
7573         of GL_GENERATE_ERROR_H.
7574         * lib/copy-file.c: Revert the last change.
7576 2023-05-26  Bruno Haible  <bruno@clisp.org>
7578         flexmember: Make it easier to use.
7579         * lib/flexmember.h (FLEXNSIZEOF): New macro.
7580         * lib/hamt.c (alloc_bucket, alloc_subtrie): Fix FLEXSIZEOF invocation.
7581         Use FLEXNSIZEOF instead of FLEXSIZEOF.
7582         * lib/ssfmalloc.h (init_small_block_page_pool): Use FLEXNSIZEOF instead
7583         of FLEXSIZEOF.
7585 2023-05-26  Bruno Haible  <bruno@clisp.org>
7587         diffseq: Silence another gcc warning.
7588         * lib/diffseq.h (compareseq): Move into the scope of the '#pragma GCC
7589         diagnostic'.
7591 2023-05-26  Bruno Haible  <bruno@clisp.org>
7593         copy-file: Silence gcc warnings.
7594         * lib/copy-file.c: Add #pragma GCC diagnostic.
7596 2023-05-26  Bruno Haible  <bruno@clisp.org>
7598         diffseq: Silence gcc warning.
7599         * lib/diffseq.h: Add #pragma GCC diagnostic.
7601 2023-05-24  Paul Eggert  <eggert@cs.ucla.edu>
7603         manywarnings: speed up nomfi test
7604         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Simplify and speed up
7605         on current platforms, by seeing first whether
7606         -Wno-missing-field-initializers is needed (it isn’t), so that
7607         later we don’t need to determine whether it’s supported.
7609         Simplify -Wno-missing-field-initializers checking
7610         * m4/gnulib-common.m4 (gl_CC_GNULIB_WARNINGS): Don’t worry about
7611         -Wmissing-field-initializers, as this is no longer needed now that
7612         gl_MANYWARN_ALL_GCC is fixed.
7614         manywarnings: port better to GCC 11.2 and earlier
7615         Problem reported by Bruno Haible in:
7616         https://lists.gnu.org/r/bug-diffutils/2023-05/msg00015.html
7617         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC):
7618         Also test for GCC bug 82283
7619         <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82283>.
7621 2023-05-24  Bruno Haible  <bruno@clisp.org>
7623         asyncsafe-spin, simple-atomic: Don't use -mcpu-v9 on NetBSD/sparc.
7624         Reported by Brandon Applegate in
7625         <https://lists.gnu.org/archive/html/bug-gettext/2023-05/msg00042.html>.
7626         * lib/asyncsafe-spin.c: Limit the SPARC workaround to Solaris.
7627         * lib/simple-atomic.c: Likewise.
7628         * m4/sparcv8+.m4 (gl_SPARC_V8PLUS): Likewise.
7630 2023-05-23  Paul Eggert  <eggert@cs.ucla.edu>
7632         nstrftime: wmemmove → __wmemmove in glibc part
7633         https://sourceware.org/pipermail/libc-alpha/2023-May/148435.html
7634         * lib/nstrftime.c (__strftime_internal) [COMPILE_WIDE]:
7635         Use __wmemmove, not wmemmove, to keep in better sync with draft glibc.
7637 2023-05-22  Bruno Haible  <bruno@clisp.org>
7639         git-merge-changelog: Code style changes.
7640         * lib/git-merge-changelog.c: Don't make side effects to variables
7641         inside parenthesized expressions. Write (size_t)(-1), for consistency
7642         with gl_list.h.
7643         (compute_mapping): Rename variable in2 to jrev.
7645 2023-05-21  Paul Eggert  <eggert@cs.ucla.edu>
7647         strtol: match 'configure' to 'make check'
7648         Inferred from report by Tomasz Kłoczko <https://bugs.gnu.org/63632>.
7649         * m4/strtol.m4 (gl_FUNC_STRTOL):
7650         * m4/strtoll.m4 (gl_FUNC_STRTOLL):
7651         Also test "0b", since the test cases check it.
7653         git-merge-changelog: port to size_t padding
7654         * lib/git-merge-changelog (entry_hashcode):
7655         As a nicety, Prefer SIZE_WIDTH to computing it ourselves.
7657         git-merge-changelog: prefer idx_t
7658         * lib/git-merge-changelog.c: Include idx.h.
7659         (struct entry, entry_create, entry_hashcode)
7660         (struct changelog_file, read_changelog_file)
7661         (entries_mapping_get, entries_mapping_reverse_get)
7662         (compute_mapping, struct edit, struct differences)
7663         (compute_differences, find_paragraph_end)
7664         (try_split_merged_entry, struct conflict, conflict_write, main):
7665         Prefer idx_t to ptrdiff_t and size_t when the value is a
7666         nonnegative index or size.  Change a few for-loops so that
7667         the index never goes negative.
7668         * modules/git-merge-changelog (Depends-on): Add idx.
7670         git-merge-changelog: ssize_t → ptrdiff_t
7671         Prefer ptrdiff_t to ssize_t, as per
7672         <https://lists.gnu.org/archive/html/emacs-devel/2014-10/msg00019.html>.
7673         * lib/git-merge-changelog.c (struct entries_mapping)
7674         (entries_mapping_get, entries_mapping_reverse_get)
7675         (compute_mapping, struct edit, struct differences, OFFSET)
7676         (OFFSET_MAX, EXTRA_CONTEXT_FIELDS, compute_differences, main):
7677         Use ptrdiff_t, not ssize_t.
7678         * modules/git-merge-changelog (Depends-on): Add stdint for PTRDIFF_MAX.
7680         git-merge-changelog: port to ssize_t padding
7681         * lib/git-merge-changelog.c (OFFSET_MAX): New macro, as a nicety.
7683 2023-05-21  Bruno Haible  <bruno@clisp.org>
7685         limits-h tests: Check the value of SSIZE_MAX.
7686         * tests/test-limits-h.c (limits12): New variable.
7687         Include <sys/types.h> and check the value of SSIZE_MAX.
7688         * modules/limits-h-tests (Depends-on): Add sys_types.
7690 2023-05-21  Bruno Haible  <bruno@clisp.org>
7692         ssize_t: Fix replacement on 64-bit Windows.
7693         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Use prefix 'gl_' instead of 'gt_'.
7694         Define ssize_t to 'long long' or 'long', depending on the width of
7695         'size_t'.
7697 2023-05-20  Paul Eggert  <eggert@cs.ucla.edu>
7699         limits-h: other modules can rely on SSIZE_MAX
7700         * lib/areadlink-with-size.c, lib/areadlinkat-with-size.c:
7701         * lib/careadlinkat.c, lib/getdelim.c, lib/getndelim2.c:
7702         * lib/regex_internal.h:
7703         (SSIZE_MAX): Do not define.
7704         * modules/areadlink-with-size, modules/areadlinkat-with-size:
7705         * modules/careadlinkat, modules/getdelim, modules/getndelim2:
7706         * modules/regex:
7707         (Depends-on) Add limits-h.
7709         limits-h: define SSIZE_MAX
7710         * doc/posix-headers/limits.texi (limits.h): Document this.
7711         * lib/limits.in.h (SSIZE_MAX): Define if not already defined.
7712         * m4/limits-h.m4 (gl_LIMITS_H): Also generate limits.h
7713         if <limits.h> does not define SSIZE_MAX.
7715         diffseq: backward compatibility for OFFSET_MAX
7716         * lib/diffseq.h (OFFSET_MAX): Define only if not already defined.
7718 2023-05-19  Bruno Haible  <bruno@clisp.org>
7720         careadlinkat: Silence gcc warning for GCC ≥ 12.
7721         * lib/careadlinkat.c: For GCC 12 or newer, use
7722         "#pragma GCC diagnostic ignored" to silence the warning.
7724 2023-05-19  Pádraig Brady  <P@draigBrady.com>
7726         modechange: pacify gcc -Wsuggest-attribute=pure
7727         * lib/modechange.h (mode_adjust): Add _GL_ATTRIBUTE_PURE
7728         suggested with GCC 12 with -flto.
7730 2023-05-19  Paul Eggert  <eggert@cs.ucla.edu>
7732         diffseq: don’t assume integers lack padding
7733         * NEWS: Mention this.
7734         * lib/diffseq.h (OFFSET_MAX): Don’t define;
7735         this is now the user’s responsibility.
7736         * lib/fstrcmp.c (OFFSET_MAX): Define to PTRDIFF_MAX.
7738 2023-05-18  Bruno Haible  <bruno@clisp.org>
7740         getndelim2: Silence gcc warning.
7741         * lib/getndelim2.c: Add #pragma GCC diagnostic.
7742         (IF_LINT): Remove macro.
7743         (getndelim2): Remove use of IF_LINT.
7745 2023-05-18  Bruno Haible  <bruno@clisp.org>
7747         canonicalize: Silence gcc warning.
7748         * lib/canonicalize.c: Add #pragma GCC diagnostic.
7749         (IF_LINT): Remove macro.
7750         (canonicalize_filename_mode_stk): Remove use of IF_LINT.
7752 2023-05-18  Bruno Haible  <bruno@clisp.org>
7754         vasnprintf, c-vasnprintf: Silence gcc warning.
7755         * lib/vasnprintf.c: Add #pragma GCC diagnostic.
7757 2023-05-18  Bruno Haible  <bruno@clisp.org>
7759         nstrftime: Silence gcc warning.
7760         * lib/nstrftime.c: Add #pragma GCC diagnostic.
7762 2023-05-18  Bruno Haible  <bruno@clisp.org>
7764         astrxfrm: Silence gcc warning.
7765         * lib/astrxfrm.c: Add #pragma GCC diagnostic.
7767 2023-05-18  Bruno Haible  <bruno@clisp.org>
7769         vasnprintf, c-vasnprintf: Silence gcc warnings.
7770         * lib/vasnprintf.c (scale10_round_decimal_decoded): Remove memory==NULL
7771         test.
7772         (scale10_round_decimal_long_double, scale10_round_decimal_double): Test
7773         for memory==NULL here. Remove use of IF_LINT.
7775 2023-05-18  Bruno Haible  <bruno@clisp.org>
7777         bitset: Silence gcc warning.
7778         * lib/bitset/list.c (lbitset_copy_): Remove redundant test from the
7779         loop's first iteration.
7781 2023-05-18  Bruno Haible  <bruno@clisp.org>
7783         stack: Silence gcc warning in tests.
7784         * lib/stack.h (init, destroy, empty, current_base, push, pop, discard,
7785         top, size): Mark as possibly unused.
7787 2023-05-18  Bruno Haible  <bruno@clisp.org>
7789         hamt: Silence gcc warning.
7790         * lib/hamt.c (init_element): Mark as possibly unused.
7792 2023-05-18  Bruno Haible  <bruno@clisp.org>
7794         get-rusage-data: Silence gcc warning.
7795         * lib/get-rusage-data.c (get_rusage_data_via_iterator): Mark as possibly
7796         unused.
7798 2023-05-18  Bruno Haible  <bruno@clisp.org>
7800         astrxfrm: Fix use-after-free bug.
7801         * lib/astrxfrm.c (astrxfrm): Don't use memcpy after realloc succeeded.
7803 2023-05-18  Bruno Haible  <bruno@clisp.org>
7805         gnulib-tool: Ignore .orig and .rej files under modules/.
7806         * gnulib-tool (func_sanitize_modulelist): Exclude also files whose name
7807         ends in .orig or .rej.
7808         * pygnulib/GLModuleSystem.py (GLModuleSystem.file_is_module): Likewise.
7810 2023-05-18  Bruno Haible  <bruno@clisp.org>
7812         uchar: Fix error when <uchar.h> is included twice.
7813         * lib/uchar.in.h: Fix double-inclusion guard.
7815 2023-05-17  Paul Eggert  <eggert@cs.ucla.edu>
7817         stdckdint: use in more modules
7818         * lib/nstrftime.c (__strftime_internal):
7819         * lib/parse-datetime.y (apply_relative_time, zone, date)
7820         (iso_8601_date, relunit, relunit_snumber, time_zone_hhmm)
7821         (to_tm_year, yylex, parse_datetime_body):
7822         * lib/timespec-add.c (timespec_add):
7823         * lib/timespec-sub.c (timespec_sub):
7824         * lib/xstrtol.c (bkm_scale):
7825         Prefer ckd_add to INT_ADD_WRAPV etc., and include stdckdint.h.
7826         * modules/nstrftime, modules/parse-datetime:
7827         * modules/timespec-add, modules/timespec-sub, modules/xstrtol:
7828         (Depends-on): Add stdckdint.
7830         nstrftime: suggest to glibc how to avoid alloca
7831         * lib/nstrftime.c (widen) [COMPILE_WIDE]: Remove.
7832         (__strftime_internal) [COMPILE_WIDE): Instead of converting the
7833         multibyte time zone abbreviation into a potentially unbounded
7834         alloca buffer, convert it directly into the output buffer.
7835         Although this code is not used in Gnulib, this can help the glibc
7836         developers avoid the problem on the glibc side.
7838 2023-05-15  Bruno Haible  <bruno@clisp.org>
7840         doc: New chapter "Strings and Characters".
7841         * doc/strings.texi: New file.
7842         * doc/gnulib.texi (POSIXURL): New variable.
7843         (posixheader, posixfunc, func): New macros, from GNU libunistring's
7844         documentation.
7845         Include strings.texi.
7846         (Particular Modules): Don't include c-locale.texi here.
7847         * doc/c-locale.texi: Sections become subsections, subsections become
7848         subsubsections.
7849         * doc/posix-functions/isalnum.texi: Mention c32isalnum.
7850         * doc/posix-functions/isalpha.texi: Mention c32isalpha.
7851         * doc/posix-functions/isblank.texi: Mention c32isblank.
7852         * doc/posix-functions/iscntrl.texi: Mention c32iscntrl.
7853         * doc/posix-functions/isdigit.texi: Mention c32isdigit.
7854         * doc/posix-functions/isgraph.texi: Mention c32isgraph.
7855         * doc/posix-functions/islower.texi: Mention c32islower.
7856         * doc/posix-functions/isprint.texi: Mention c32isprint.
7857         * doc/posix-functions/ispunct.texi: Mention c32ispunct.
7858         * doc/posix-functions/isspace.texi: Mention c32isspace.
7859         * doc/posix-functions/isupper.texi: Mention c32isupper.
7860         * doc/posix-functions/isxdigit.texi: Mention c32isxdigit.
7861         * doc/posix-functions/tolower.texi: Mention alternative APIs.
7862         * doc/posix-functions/toupper.texi: Likewise.
7863         * doc/posix-functions/towlower.texi: Mention c32tolower.
7864         * doc/posix-functions/towupper.texi: Mention c32toupper.
7865         * doc/posix-functions/wcswidth.texi: Mention c32swidth.
7866         * doc/posix-functions/wcwidth.texi: Mention c32width.
7868 2023-05-15  Bruno Haible  <bruno@clisp.org>
7870         sigsegv: Add tentative support for Hurd/x86_64.
7871         Based on explanations by Sergey Bugaev <bugaevc@gmail.com>.
7872         * lib/sigsegv.c: Update from libsigsegv/src/fault-hurd-i386-old.h.
7874 2023-05-15  Paul Eggert  <eggert@cs.ucla.edu>
7876         file-has-acl: improve port to Fedora 39
7877         Problem reported by Ondrej Valousek in:
7878         https://lists.gnu.org/r/bug-gnulib/2023-05/msg00078.html
7879         * lib/file-has-acl.c: Include minmax.h.
7880         [USE_ACL && HAVE_LINUX_XATTR_H && HAVE_LISTXATTR]: Include stdckdint.h.
7881         (file_has_acl) [USE_ACL && HAVE_LINUX_XATTR_H && HAVE_LISTXATTR]:
7882         If the file has NFSv4 ACLs, ignore any POSIX ACLs, for Fedora 39.
7883         Return a bit faster when listxattr returns 0.
7884         Don’t loop forever if an attacker is fiddling with ACLs.
7885         * modules/file-has-acl (Depends-on): Add minmax, stdckdint.
7887 2023-05-15  Bruno Haible  <bruno@clisp.org>
7889         Work around https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82283 .
7890         Reported by Pádraig Brady <P@draigBrady.com> in
7891         <https://lists.gnu.org/archive/html/bug-gnulib/2023-05/msg00077.html>.
7892         * m4/gnulib-common.m4 (gl_CC_GNULIB_WARNINGS): Add
7893         -Wno-missing-field-initializers for GCC < 11.
7895 2023-05-15  Bruno Haible  <bruno@clisp.org>
7897         gettimeofday, pthread-*, thread, thrd: Don't omit intended initializers.
7898         * lib/gettimeofday.c (gettimeofday): List the initializers of both
7899         tv_sec and tv_usec.
7900         * lib/glthread/thread.c (gl_thread_self): List the initializers of both
7901         tv_sec and tv_nsec.
7902         * lib/pthread-cond.c (pthread_cond_wait): Likewise.
7903         * lib/thrd.c (rpl_thrd_current): Likewise.
7904         * lib/pthread-rwlock.c (MIN): New macro.
7905         (pthread_rwlock_timedrdlock, pthread_rwlock_timedwrlock): List the
7906         initializers of both tv_sec and tv_nsec. Don't modify the duration after
7907         having initialized it.
7908         * lib/pthread_mutex_timedlock.c (MIN): New macro.
7909         (pthread_mutex_timedlock): List the initializers of both tv_sec and
7910         tv_nsec. Don't modify the duration after having initialized it.
7912         select: Fix compilation error (regression from yesterday).
7913         * lib/select.c (rpl_select): Revert last change.
7915         poll: Fix syntax error (regression from yesterday).
7916         * lib/poll.c (poll): Remove semicolon inside braces.
7918 2023-05-14  Paul Eggert  <eggert@cs.ucla.edu>
7920         timespec: fill in other members
7921         This problem was found when compiling GNU Emacs with
7922         --enable-gcc-warnings on a platform where tv_sec is 64 bits and
7923         tv_nsec is 32 bits, and struct timespec has padding.  GCC
7924         -Wuse-of-uninitialized-value complained when a struct timespec
7925         initialized only via assigning to tv_sec and tv_nsec was copied
7926         via assignment (this was in lib/timespec.h’s make_timespec).
7927         Although behavior is well-defined on this platform, the warning is
7928         annoying and the behavior might not be well-defined on theoretical
7929         platforms where struct timespec has other members.  To work around
7930         this, initialize all the struct’s members.
7931         * lib/getsockopt.c (rpl_getsockopt):
7932         * lib/gettime.c (gettime):
7933         * lib/gettimeofday.c (gettimeofday):
7934         * lib/glthread/thread.c (gl_thread_self):
7935         * lib/nanosleep.c (nanosleep):
7936         * lib/parse-datetime.y (digits_to_date_time, set_hhmmss)
7937         (signed_seconds, unsigned_seconds, yylex, parse_datetime_body):
7938         * lib/poll.c (poll):
7939         * lib/pselect.c (pselect):
7940         * lib/pthread-cond.c (endlessly, pthread_cond_timedwait):
7941         * lib/pthread-rwlock.c (pthread_rwlock_timedrdlock)
7942         (pthread_rwlock_timedwrlock):
7943         * lib/pthread_mutex_timedlock.c (pthread_mutex_timedlock):
7944         * lib/select.c (rpl_select):
7945         * lib/settime.c (settime):
7946         * lib/stat-time.h (get_stat_atime, get_stat_ctime)
7947         (get_stat_mtime, get_stat_birthtime):
7948         * lib/thrd.c (rpl_thrd_current):
7949         * lib/timespec.h (make_timespec):
7950         * lib/timespec_getres.c (timespec_getres):
7951         * lib/utimecmp.c (utimecmpat):
7952         * lib/utimens.c (fdutimens):
7953         When filling in a struct timespec or similar time-related structure
7954         that might be copied elsewhere, also assign to any storage other
7955         than tv_sec and tv_nsec, to avoid undefined behavior on (likely
7956         theoretical) platforms where struct timespec has other members,
7957         and also to avoid warnings from GCC and/or valgrind.
7959         year2038-recommended: Improve failure diagnostic.
7960         * m4/largefile.m4 (AC_SYS_YEAR2038_RECOMMENDED): Sync from Autoconf.
7962 2023-05-13  Paul Eggert  <eggert@cs.ucla.edu>
7964         stdio: use _GL_ATTRIBUTE_MALLOC
7965         * lib/stdio.in.h (fdopen, fopen, popen, tmpfile): Declare with
7966         _GL_ATTRIBUTE_MALLOC, for consistency with glibc, and so that
7967         building the fopen module with ‘gcc -O2 -Wsuggest-attribute=malloc
7968         -Wsystem-headers -Werror’ does not fail with “stdio.h: In function
7969         ‘rpl_fopen’: stdio.h:970:1: error: function might be candidate for
7970         attribute ‘malloc’ [-Werror=suggest-attribute=malloc]”, a problem
7971         I noticed on both Fedora 38 and Ubuntu 23.04.
7973 2023-05-12  Bruno Haible  <bruno@clisp.org>
7975         sigsegv: Add tentative support for Hurd/x86_64.
7976         Reported by Samuel Thibault <samuel.thibault@ens-lyon.org>.
7977         * lib/sigsegv.c: Update from libsigsegv/src/fault-hurd-i386.h.
7979 2023-05-12  Paul Eggert  <eggert@cs.ucla.edu>
7981         file-has-acl: port to Fedora 39
7982         Fedora 39 getxattr with XATTR_NAME_POSIX_ACL_ACCESS either
7983         succeeds or fails with ENODATA, so it is no longer possible to
7984         detect from its failure that the filesystem might support NFSv4 ACLs.
7985         Problem reported by Ondrej Valousek in:
7986         https://lists.gnu.org/r/bug-gnulib/2023-04/msg00228.html
7987         Instead, use listxattr to determine whether NFSv4 ACLs are in play.
7988         This typically saves syscalls anyway.
7989         * lib/file-has-acl.c: In #if, use (HAVE_LINUX_XATTR_H &&
7990         HAVE_LISTXATTR) instead of GETXATTR_WITH_POSIX_ACLS.
7991         The following changes apply when (USE_ACL && HAVE_LINUX_XATTR_H &&
7992         HAVE_LISTXATTR):
7993         Include minmax.h.
7994         (have_xattr): New function.
7995         (file_has_acl): Try listxattr first; typically this means we need
7996         to do no other syscall.  Call getxattr only if there are NFSv4
7997         ACLs but not POSIX ACLs.
7998         * m4/acl.m4 (gl_FILE_HAS_ACL): Simplify by merely testing for
7999         linux/xattr.h and listxattr.  All uses changed.
8001 2023-05-10  Josh Soref  <jsoref@gmail.com>
8003         bootstrap: spelling/grammar fix in comment
8004         * build-aux/bootstrap: As above.
8006 2023-05-07  Paul Eggert  <eggert@cs.ucla.edu>
8008         Warn against bogus TZ settings
8009         * doc/parse-datetime.texi (Specifying time zone rules):
8010         Warn against TZ="UTC=5".
8012 2023-05-05  Bruno Haible  <bruno@clisp.org>
8014         dirfd: Add tests.
8015         * tests/test-dirfd.c: New file.
8016         * modules/dirfd-tests: New file.
8018 2023-05-05  Bruno Haible  <bruno@clisp.org>
8020         dirfd: Fix bogus override (regression 2023-04-26).
8021         Reported by Bjarni Ingi Gislason <bjarniig@simnet.is> in
8022         <https://lists.gnu.org/archive/html/bug-gnulib/2023-05/msg00040.html>.
8023         * m4/dirfd.m4 (gl_FUNC_DIRFD): Fix mistake in last change.
8025 2023-05-04  Bruno Haible  <bruno@clisp.org>
8027         c32swidth: Add tests.
8028         * tests/test-c32swidth.c: New file, based on tests/test-c32width.c.
8029         * modules/c32swidth-tests: New file.
8031         c32swidth: New module.
8032         * lib/uchar.in.h (c32swidth): New declaration.
8033         * lib/wcswidth-impl.h: Use macros FUNC, UNIT, CHARACTER_WIDTH.
8034         * lib/wcswidth.c: Define FUNC, UNIT, CHARACTER_WIDTH before including
8035         wcswidth-impl.h.
8036         * lib/c32swidth.c: New file.
8037         * modules/c32swidth: New file.
8038         * m4/uchar_h.m4 (gl_UCHAR_H_REQUIRE_DEFAULTS): Initialize
8039         GNULIB_C32SWIDTH.
8040         * modules/uchar (Makefile.am): Substitute GNULIB_C32SWIDTH.
8042 2023-05-04  Bruno Haible  <bruno@clisp.org>
8044         wcswidth: Fix result in case of overflow.
8045         * lib/wcswidth-impl.h (wcswidth): Continue searching for a non-printing
8046         wide character after the total width has become > INT_MAX.
8048 2023-05-04  Bruno Haible  <bruno@clisp.org>
8050         wcswidth: Relax license.
8051         * modules/wcswidth (License): Change to LGPLv2+.
8052         * lib/wcswidth.c: Update license notice.
8053         * lib/wcswidth-impl.h: Likewise.
8055 2023-05-04  Bruno Haible  <bruno@clisp.org>
8057         c32width: Relax license.
8058         * modules/c32width (License): Change to LGPLv2+.
8059         * lib/c32width.c: Update license notice.
8061 2023-05-04  Bruno Haible  <bruno@clisp.org>
8063         c32to*: Relax license.
8064         * modules/c32tolower (License): Change to LGPLv2+.
8065         * modules/c32toupper (License): Likewise.
8066         * lib/c32tolower.c: Update license notice.
8067         * lib/c32toupper.c: Likewise.
8068         * lib/c32to-impl.h: Likewise.
8070         unicase/tolower, unicase/toupper: Relax license.
8071         * lib/gen-uni-tables.c (output_simple_mapping): Bump copyright year. For
8072         unicase/tolower.h and unicase/toupper.h, use the LGPLv2+.
8073         * lib/unicase/tolower.h: Regenerated.
8074         * lib/unicase/toupper.h: Likewise.
8075         * lib/unicase/simple-mapping.h: Update license notice.
8076         * lib/unicase/tolower.c: Likewise.
8077         * lib/unicase/toupper.c: Likewise.
8078         * modules/unicase/tolower (License): Change to LGPLv2+.
8079         * modules/unicase/toupper (License): Likewise.
8081         unicase/base: Relax license.
8082         * modules/unicase/base (License): Change to LGPLv2+.
8083         * lib/unicase.in.h: Update license notice.
8085 2023-05-04  Bruno Haible  <bruno@clisp.org>
8087         c32is*: Relax license.
8088         * modules/c32isalnum (License): Change to LGPLv2+.
8089         * modules/c32isalpha (License): Likewise.
8090         * modules/c32isblank (License): Likewise.
8091         * modules/c32iscntrl (License): Likewise.
8092         * modules/c32isdigit (License): Likewise.
8093         * modules/c32isgraph (License): Likewise.
8094         * modules/c32islower (License): Likewise.
8095         * modules/c32isprint (License): Likewise.
8096         * modules/c32ispunct (License): Likewise.
8097         * modules/c32isspace (License): Likewise.
8098         * modules/c32isupper (License): Likewise.
8099         * modules/c32isxdigit (License): Likewise.
8100         * lib/c32isalnum.c: Update license notice.
8101         * lib/c32isalpha.c: Likewise.
8102         * lib/c32isblank.c: Likewise.
8103         * lib/c32iscntrl.c: Likewise.
8104         * lib/c32isdigit.c: Likewise.
8105         * lib/c32isgraph.c: Likewise.
8106         * lib/c32islower.c: Likewise.
8107         * lib/c32isprint.c: Likewise.
8108         * lib/c32ispunct.c: Likewise.
8109         * lib/c32isspace.c: Likewise.
8110         * lib/c32isupper.c: Likewise.
8111         * lib/c32isxdigit.c: Likewise.
8112         * lib/c32is-impl.h: Likewise.
8114         unictype/ctype-*: Relax license.
8115         * lib/gen-uni-tables.c (output_predicate): Bump copyright year. For
8116         unictype/ctype_*, use the LGPLv2+.
8117         * lib/unictype/ctype_*.h: Regenerated.
8118         * lib/unictype/ctype_*.c: Update license notice.
8119         * modules/unictype/ctype-alnum (License): Change to LGPLv2+.
8120         * modules/unictype/ctype-alpha (License): Likewise.
8121         * modules/unictype/ctype-blank (License): Likewise.
8122         * modules/unictype/ctype-cntrl (License): Likewise.
8123         * modules/unictype/ctype-digit (License): Likewise.
8124         * modules/unictype/ctype-graph (License): Likewise.
8125         * modules/unictype/ctype-lower (License): Likewise.
8126         * modules/unictype/ctype-print (License): Likewise.
8127         * modules/unictype/ctype-punct (License): Likewise.
8128         * modules/unictype/ctype-space (License): Likewise.
8129         * modules/unictype/ctype-upper (License): Likewise.
8130         * modules/unictype/ctype-xdigit (License): Likewise.
8132 2023-05-04  Bruno Haible  <bruno@clisp.org>
8134         c32width: Add tests.
8135         * tests/test-c32width.c: New file, based on tests/test-wcwidth.c.
8136         * modules/c32width-tests: New file.
8138         c32width: New module.
8139         * lib/uchar.in.h (c32width): New declaration.
8140         * lib/c32width.c: New file, based on lib/c32is-impl.h.
8141         * modules/c32width: New file.
8142         * m4/uchar_h.m4 (gl_UCHAR_H_REQUIRE_DEFAULTS): Initialize
8143         GNULIB_C32WIDTH.
8144         * modules/uchar (Makefile.am): Substitute GNULIB_C32WIDTH.
8146 2023-05-04  Bruno Haible  <bruno@clisp.org>
8148         doc: Mention macOS wcwidth bug.
8149         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Mention macOS bugs.
8150         * doc/posix-functions/wcwidth.texi: Update regarding macOS.
8152 2023-05-03  Bruno Haible  <bruno@clisp.org>
8154         vasnprintf, vasnwprintf: Make '0' flag handling more ISO C compliant.
8155         * lib/vasnprintf.c (VASNPRINTF): When doing the padding ourselves,
8156         ignore the '0' flag if a precision is specified and the conversion is
8157         one of d, i, o, u, x, X, b, B.
8158         * tests/test-vasnprintf-posix.c (test_function): Update expected results
8159         accordingly.
8160         * tests/test-vasprintf-posix.c (test_function): Likewise.
8161         * tests/test-snprintf-posix.h (test_function): Likewise.
8162         * tests/test-sprintf-posix.h (test_function): Likewise.
8163         * tests/test-vasnwprintf-posix.c (test_function): Likewise.
8165 2023-05-02  Paul Eggert  <eggert@cs.ucla.edu>
8167         mktime: include <intprops.h>
8168         * lib/mktime.c: Include <intprops.h> again,
8169         fixing a typo noted by Bruno Haible in:
8170         https://lists.gnu.org/r/bug-gnulib/2023-05/msg00014.html
8172 2023-05-02  Bruno Haible  <bruno@clisp.org>
8174         fopen: Silence a gcc warning.
8175         * lib/fopen.c (rpl_fopen): Mark open_direction as used.
8177 2023-05-01  Paul Eggert  <eggert@cs.ucla.edu>
8179         extern-inline: port to pcc
8180         * m4/extern-inline.m4 (gl_EXTERN_INLINE): Port to pcc
8181         1.2.0.DEVEL 20220331, which doesn’t support extern inline
8182         even though it claims to be GCC 4.3 and to support C11.
8184         regex: prefer C23 style overflow checking
8185         * lib/regex_internal.h: Include stdckdint.h.
8186         * lib/regexec.c (re_search_2_stub):
8187         * modules/regex (Depends-on): Add stdckdint.
8188         Prefer stdckdint.h to intprops.h macros.
8190         dynarray: prefer C23 style overflow checking
8191         * lib/malloc/dynarray_emplace_enlarge.c, lib/malloc/dynarray_resize.c:
8192         Include stdckdint.h, not intprops.h.
8193         * lib/malloc/dynarray_emplace_enlarge.c:
8194         (__libc_dynarray_emplace_enlarge):
8195         * lib/malloc/dynarray_resize.c (__libc_dynarray_resize):
8196         Prefer stdckdint.h to intprops.h macros.
8197         * modules/glibc-internal/dynarray (Depends-on):
8198         Depend on stdckdint, not intprops.
8200         mktime: prefer C23 style overflow checking
8201         Prefer stdckdint.h macros to intprops.h macros where either will do,
8202         as this is the C23 standard.  Also, it ports around a pcc bug.
8203         * config/srclist.txt: Comment out mktime.c.
8204         * lib/mktime.c: Include stdckdint.h, not intprops.h.
8205         (__mktime_internal): Prefer stdckdint.h to intprops.h macros.
8206         * modules/mktime (Depends-on): Add stdckdint.
8208         limits-h: port to pcc
8209         * doc/posix-headers/limits.texi: Document the issue.
8210         * lib/limits.in.h (MB_LEN_MAX): New macro, if not already defined.
8211         * m4/limits-h.m4 (gl_LIMITS_H): Test for MB_LEN_MAX.
8212         * tests/test-limits-h.c: Check that it’s positive.
8214 2023-04-28  Paul Eggert  <eggert@cs.ucla.edu>
8216         year2038-recommended: new module
8217         Remove year2038-required and largefile-required, replacing
8218         the former with year2038-recommended and simply removing
8219         the latter.  This syncs with Autoconf master.
8220         * MODULES.html.sh, NEWS, doc/largefile.texi:
8221         * all-modules (exclude): Exclude year2038-recommended, not -required.
8222         * doc/posix-headers/sys_types.texi, doc/posix-headers/time.texi:
8223         * doc/year2038.texi: Mention this.
8224         * m4/largefile.m4: Sync from Autoconf.  Override existing macros
8225         if AC_SYS_YEAR2038_RECOMMENDED is not defined, rather than if
8226         AC_SYS_LARGEFILE_REQUIRED is not defined.
8227         * modules/largefile-required, modules/year2038-required: Removed.
8228         * modules/year2038: Do not depend on largefile; simply
8229         use m4/largefile.m4, since we shouldn’t need the extra goodies
8230         largefile supplies.
8231         * modules/year2038-recommended: New module.
8233 2023-04-28  Bruno Haible  <bruno@clisp.org>
8235         stdio: Avoid different configure results in different testdirs.
8236         * m4/stdio_h.m4 (gl_STDIO_H_EARLY): New macro, extracted from
8237         gl_STDIO_H.
8238         (gl_STDIO_H): Move the code that sets __USE_MINGW_ANSI_STDIO to
8239         gl_STDIO_H_EARLY.
8240         * modules/stdio (configure.ac-early): New section.
8242 2023-04-28  Bruno Haible  <bruno@clisp.org>
8244         stdbool tests: Avoid compilation error with Sun C on Solaris 10.
8245         * tests/test-stdbool.c (WORKING_BOOL): Set to 0 on Sun C.
8247 2023-04-28  Bruno Haible  <bruno@clisp.org>
8249         hamt tests: Fix test failure with Sun C on Solaris 10/SPARC.
8250         * tests/test-hamt.c (main): Finish with exit code 0.
8252 2023-04-27  Bruno Haible  <bruno@clisp.org>
8254         localeconv: Work around a mingw bug.
8255         * m4/localeconv.m4 (gl_FUNC_LOCALECONV): Test whether fields of type
8256         'char' are filled correctly.
8257         (gl_PREREQ_LOCALECONV): Test whether 'struct lconv' has the int_{p,n}_*
8258         members.
8259         * lib/localeconv.c (FIX_CHAR_VALUE): New macro.
8260         (localeconv): Replace negative field values with CHAR_MAX.
8261         * doc/posix-functions/localeconv.texi: Mention the mingw bug.
8263 2023-04-27  Bruno Haible  <bruno@clisp.org>
8265         stdlib: Fix error when cross-compiling (regression 2023-04-04).
8266         Reported by Pierre Labastie <pierre.labastie@neuf.fr> in
8267         <https://lists.gnu.org/archive/html/bug-gnulib/2023-04/msg00220.html>.
8268         * m4/stdlib_h.m4 (gl_STDLIB_H): Provide a 4th argument to AC_RUN_IFELSE.
8270 2023-04-26  Paul Eggert  <eggert@cs.ucla.edu>
8272         freopen-safer: pacify GCC 13
8273         * lib/freopen-safer.c: Ignore -Wanalyzer-fd-leak.
8275 2023-04-26  Bruno Haible  <bruno@clisp.org>
8277         fdopendir: Fix fd leak and test failure on native Windows.
8278         --
8279         * lib/dirent-private.h: On mingw, define 'struct gl_directory' as a
8280         wrapper around the original DIR. On MSVC, add an 'fd_to_close' field to
8281         'struct gl_directory'.
8282         * lib/dirent.in.h (DIR): Define when DIR_HAS_FD_MEMBER is 0, i.e. on
8283         both mingw and MSVC.
8284         (GNULIB_defined_DIR): New macro.
8285         (opendir): Avoid incompatible redeclaration.
8286         (readdir): Consider REPLACE_READDIR.
8287         (rewinddir): Consider REPLACE_REWINDDIR.
8288         * m4/dirent_h.m4 (gl_DIRENT_DIR): New macro.
8289         (gl_DIRENT_H): Invoke it.
8290         (gl_DIRENT_H_DEFAULTS): Initialize REPLACE_READDIR, REPLACE_REWINDDIR.
8291         * modules/dirent (Makefile.am): Substitute DIR_HAS_FD_MEMBER,
8292         REPLACE_READDIR, REPLACE_REWINDDIR.
8293         --
8294         * lib/dirfd.c (dirfd): If GNULIB_defined_DIR, just use the
8295         'fd_to_close' field.
8296         * m4/dirfd.m4 (gl_FUNC_DIRFD): Set HAVE_DIRFD. Don't set REPLACE_DIRFD
8297         to 1 if HAVE_DIRFD is 0. If DIR_HAS_FD_MEMBER is 0, ensure dirfd.c gets
8298         compiled.
8299         * modules/dirfd (Files): Add lib/dirent-private.h.
8300         (Depends-on, configure.ac): Simplify conditions.
8301         --
8302         * lib/closedir.c: Include <stdlib.h> always, for free().
8303         (closedir): If GNULIB_defined_DIR, arrange to call close(dirfd(dirp)) at
8304         the end. On mingw, call free() of dirp. Prefer testing HAVE_DIRENT_H,
8305         for consistency with dirent.h.
8306         * m4/closedir.m4 (gl_FUNC_CLOSEDIR): Don't set REPLACE_CLOSEDIR to 1 if
8307         HAVE_CLOSEDIR is 0. If DIR_HAS_FD_MEMBER is 0, ensure closedir.c gets
8308         compiled.
8309         --
8310         * lib/opendir.c: Include <stdlib.h> always. Include <string.h>.
8311         (opendir): On mingw, allocate the 'struct gl_directory' through malloc.
8312         If GNULIB_defined_DIR, set the 'fd_to_close' field to -1. Prefer
8313         testing HAVE_DIRENT_H, for consistency with dirent.h.
8314         * m4/opendir.m4 (gl_FUNC_OPENDIR): Don't set REPLACE_OPENDIR to 1 if
8315         HAVE_OPENDIR is 0. If DIR_HAS_FD_MEMBER is 0, ensure opendir.c gets
8316         compiled.
8317         --
8318         * lib/fdopendir.c (fdopendir): If GNULIB_defined_DIR, use a simple
8319         implementation based on opendir and the fchdir module. If __KLIBC__,
8320         don't define unused auxiliary functions.
8321         * modules/fdopendir (Files): Add lib/dirent-private.h.
8322         --
8323         * lib/readdir.c (readdir): On mingw, redirect to the original readdir
8324         function. Prefer testing HAVE_DIRENT_H, for consistency with dirent.h.
8325         * m4/readdir.m4 (gl_FUNC_READDIR): If DIR_HAS_FD_MEMBER is 0, ensure
8326         readdir.c gets compiled.
8327         * modules/readdir (configure.ac): Consider REPLACE_READDIR.
8328         --
8329         * lib/rewinddir.c (rewinddir): On mingw, redirect to the original
8330         rewinddir function. Prefer testing HAVE_DIRENT_H, for consistency with
8331         dirent.h.
8332         * m4/rewinddir.m4 (gl_FUNC_REWINDDIR): If DIR_HAS_FD_MEMBER is 0, ensure
8333         rewinddir.c gets compiled.
8334         * modules/rewinddir (configure.ac): Consider REPLACE_REWINDDIR.
8335         --
8336         * lib/fchdir.c (dir_info_t): Remove a FIXME.
8338 2023-04-26  Bruno Haible  <bruno@clisp.org>
8340         fchdir tests: Fix test failure on native Windows.
8341         * modules/fchdir-tests (Depends-on): Add dup.
8343 2023-04-26  Bruno Haible  <bruno@clisp.org>
8345         fclose: Make last change more maintainable.
8346         * m4/fclose.m4 (gl_FUNC_FCLOSE): Define through AC_DEFUN_ONCE. Don't
8347         modify REPLACE_FOPEN.
8348         * modules/fclose (Depends-on): Add comment.
8349         (configure.ac): Don't modify REPLACE_FOPEN. Don't duplicate actions of
8350         module 'fopen'.
8351         * m4/fopen.m4 (gl_FUNC_FOPEN_ITSELF): Renamed from gl_FUNC_FOPEN.
8352         (gl_FUNC_FOPEN): New macro.
8353         * modules/fopen (Files): Add m4/fclose.m4, m4/fflush.m4.
8354         * m4/close.m4 (gl_FUNC_CLOSE): Define through AC_DEFUN_ONCE.
8356 2023-04-26  Po Lu  <luangruo@yahoo.com>  (tiny change)
8357             Bruno Haible  <bruno@clisp.org>
8359         gnulib-tool: For conditional dependencies, generate portable sh code.
8360         * gnulib-tool (func_emit_autoconf_snippets): Avoid sh syntax
8361         'if ! variable', that does not work with Solaris /bin/sh.
8362         * pygnulib/GLEmiter.py (GLEmiter.autoconfSnippets): Likewise.
8364 2023-04-25  Bruno Haible  <bruno@clisp.org>
8366         expm1 tests: Avoid test failure on 32-bit mingw.
8367         * tests/test-expm1.h (test_function): Mark y as 'volatile'.
8369 2023-04-25  Bruno Haible  <bruno@clisp.org>
8371         poll tests: Avoid test failure on native Windows.
8372         * tests/test-poll.c (test_pipe): Disable the POLLHUP check also on
8373         native Windows.
8374         * doc/posix-functions/poll.texi: Mention also native Windows w.r.t.
8375         POLLHUP.
8377 2023-04-25  Bruno Haible  <bruno@clisp.org>
8379         dfa tests: Fix compilation error (regression 2023-04-22).
8380         * tests/test-dfa-match-aux.c: Include unistd.h.
8381         * modules/dfa-tests (Depends-on): Add unistd.
8383 2023-04-24  Bruno Haible  <bruno@clisp.org>
8385         tests: Suppress ‘#pragma GCC diagnostic’ warnings with GCC < 13.
8386         * tests/test-localename.c: Disable #pragma for GCC < 12.
8387         * tests/test-dup2.c: Disable #pragma for GCC < 13.
8388         * tests/test-fcntl.c: Likewise.
8389         * tests/test-getdtablesize.c: Likewise.
8390         * tests/test-listen.c: Likewise.
8391         * tests/test-open.h: Likewise.
8392         * tests/test-perror2.c: Likewise.
8393         * tests/test-select.h: Likewise.
8395 2023-04-24  Bruno Haible  <bruno@clisp.org>
8397         select, pselect: Fix test failure on native Windows.
8398         * lib/select.c (rpl_select): Fail if nfds is out-of-range.
8399         * lib/pselect.c (pselect): Likewise.
8401 2023-04-24  Paul Eggert  <eggert@cs.ucla.edu>
8403         fclose: pacify gcc -Wanalyzer-file-leak
8404         Without this patch, building coreutils with
8405         --enable-gcc-checking=expensive would fail with a message like
8406         “lib/exclude.c:682:6: error: leak of FILE 'in' [CWE-775]
8407         [-Werror=analyzer-file-leak]”, because Gnulib replaced fclose but
8408         not fopen, and GCC saw a call to fopen followed by a call to
8409         rpl_fclose.  The patch causes GCC to instead see a call to
8410         rpl_fopen followed by rpl_fclose.
8411         * m4/fclose.m4 (gl_FUNC_FCLOSE): Replace fopen when replacing
8412         fclose.
8413         * modules/fclose (Depends-on): Add fopen.
8414         (configure.ac): Replace fopen when replacing fclose.
8416         unsetenv-tests: pacify -Wanalyzer-putenv-of-auto-var
8417         * tests/test-unsetenv.c (main): Make entry static.  Even with this
8418         change, it’s unclear whether this test is portable POSIX code, but
8419         that’s a different matter.
8421         tests: suppress some unwanted -fanalyzer checking
8422         * tests/test-dup2.c, tests/test-fcntl.c, tests/test-fopen.h:
8423         * tests/test-getdtablesize.c, tests/test-listen.c:
8424         * tests/test-localename.c, tests/test-open.h, tests/test-perror2.c:
8425         * tests/test-select.h:
8426         Add pragmas to disable unwanted -fanalyzer checking.
8428 2023-04-24  Bruno Haible  <bruno@clisp.org>
8430         ftell, ftello: Fix recognition of pipes on native Windows.
8431         * m4/lseek.m4 (gl_FUNC_LSEEK): Update comment.
8432         * m4/ftello.m4 (gl_FUNC_FTELLO): On native Windows, set REPLACE_FTELLO=1
8433         always.
8434         * doc/posix-functions/ftello.texi: Mention the behaviour on pipes.
8435         * doc/posix-functions/ftell.texi: Likewise.
8436         * doc/posix-functions/fgetpos.texi: Likewise.
8438 2023-04-24  Bruno Haible  <bruno@clisp.org>
8440         lseek: Fix module dependencies (regression 2021-11-15).
8441         * modules/lseek (Depends-on): Re-enable the msvc-nothrow dependency
8442         also when WINDOWS_64_BIT_OFF_T is 0.
8444 2023-04-24  Bruno Haible  <bruno@clisp.org>
8446         system-quote: Fix memory overrun bug on native Windows.
8447         * lib/system-quote.c (system_quote): Allocate enough space for the
8448         result.
8450 2023-04-24  Bruno Haible  <bruno@clisp.org>
8452         unicodeio tests: Avoid test failures on native Windows.
8453         * tests/test-unicodeio.c: Include localcharset.h.
8454         (main): Handle C locales whose encoding is CP1252 or similar.
8455         * modules/unicodeio-tests (Depends-on): Add localcharset.
8457 2023-04-24  Bruno Haible  <bruno@clisp.org>
8459         *sprintf tests: Avoid test failures on mingw 10.
8460         * tests/test-vasnprintf-posix.c (test_function): On newer mingw, expect
8461         the de-facto standard result.
8462         * tests/test-vasprintf-posix.c (test_function): Likewise.
8463         * tests/test-snprintf-posix.h (test_function): Likewise.
8464         * tests/test-sprintf-posix.h (test_function): Likewise.
8466 2023-04-23  Bruno Haible  <bruno@clisp.org>
8468         Improve quoting of AS_HELP_STRING's first argument.
8469         * m4/acl.m4 (gl_FUNC_ACL_ARG): Don't underquote AS_HELP_STRING's first
8470         argument.
8471         * m4/assert.m4 (gl_ASSERT): Likewise.
8472         * m4/gc.m4 (gl_GC): Likewise.
8473         * m4/gnulib-common.m4 (gl_COMMON_BODY): Likewise.
8474         * m4/ld-version-script.m4 (gl_LD_VERSION_SCRIPT): Likewise.
8475         * m4/lib-ld.m4 (AC_LIB_PROG_LD): Likewise.
8476         * m4/libgmp.m4 (gl_LIBGMP): Likewise.
8477         * m4/regex.m4 (gl_REGEX): Likewise.
8478         * m4/relocatable-lib.m4 (gl_RELOCATABLE_NOP): Likewise.
8479         * m4/selinux-selinux-h.m4 (gl_LIBSELINUX): Likewise.
8480         * m4/sigsegv.m4 (gl_SIGSEGV): Likewise.
8481         * m4/threadlib.m4 (gl_THREADLIB_EARLY_BODY): Likewise.
8482         * m4/valgrind-tests.m4 (gl_VALGRIND_TESTS): Likewise.
8483         * m4/version-etc.m4 (gl_VERSION_ETC_FLAG): Likewise.
8484         * m4/xattr.m4 (gl_FUNC_XATTR): Likewise.
8485         * doc/manywarnings.texi (manywarnings): Likewise. This avoids the use of
8486         quadrigraphs.
8488 2023-04-23  Bruno Haible  <bruno@clisp.org>
8490         category-none: Fix link errors on MSVC, when libunistring is installed.
8491         * modules/unictype/category-none (configure.ac): Remove
8492         gl_LIBUNISTRING_MODULE invocation.
8493         (Makefile.am): Compile unictype/categ_none.c always.
8495 2023-04-23  Paul Eggert  <eggert@cs.ucla.edu>
8497         manywarnings: use AS_IF
8498         * m4/manywarnings.m4 (gl_MANYWARN_COMPLEMENT):
8499         Use AS_IF when the body contains Autoconf macros that could
8500         conceivably require something.
8502         manywarnings: update C warnings for GCC 13
8503         Adjust for C programs compiled by GCC 13.
8504         (A C++ expert still needs to look at manywarnings-c++.m4.)
8505         * build-aux/gcc-warning.spec: Add warnings introduced in GCC 13.
8506         * doc/manywarnings.texi (manywarnings): Document flex arrays.
8507         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Add
8508         -fstrict-flex-arrays and -Wstrict-flex-arrays as these should be
8509         suitable for Gnulib-using code.
8511         manywarnings: bring doc up to date
8512         * doc/manywarnings.texi: Bring doc up to date for GCC 12.
8514         manywarnings: omit -fno-common in GCC 10+
8515         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Omit -fno-common
8516         in GCC 10 and later, as it is the default there.
8517         Check exit status of ‘gcc --version’.
8519 2023-04-23  Bruno Haible  <bruno@clisp.org>
8521         libunistring: Fix build on Windows, when a libunistring is installed.
8522         * lib/unicase.in.h: Include <unistring/woe32dll.h>.
8523         (unicase_empty_prefix_context, unicase_empty_suffix_context): Declare
8524         with GNULIB_UNICASE_..._DLL_VARIABLE.
8525         * lib/unictype.in.h: Include <unistring/woe32dll.h>.
8526         (UC_CATEGORY_*, UC_PROPERTY_*): Declare with
8527         GNULIB_UNICTYPE_..._DLL_VARIABLE.
8528         * lib/uninorm.in.h: Include <unistring/woe32dll.h>.
8529         (unicode_normalization_form uninorm_nf*): Declare with
8530         GNULIB_UNINORM_..._DLL_VARIABLE.
8531         * m4/libunistring-base.m4 (gl_LIBUNISTRING_MODULE_WITH_VARIABLE): New
8532         macro.
8533         (gl_LIBUNISTRING_LIB_PREPARE): Set HAVE_UNISTRING_WOE32DLL_H.
8534         * m4/unicase_h.m4: New file.
8535         * m4/unictype_h.m4: New file.
8536         * m4/uninorm_h.m4: New file.
8537         * modules/unicase/base (Files): Add m4/unicase_h.m4.
8538         (configure.ac): Bump version number. Invoke gl_UNICASE_H,
8539         gl_UNICASE_H_REQUIRE_DEFAULTS.
8540         (Makefile.am): Substitute all GNULIB_UNICASE_*_DLL_VARIABLE.
8541         * modules/unicase/empty-*-context (configure.ac): Invoke
8542         gl_UNICASE_H_REQUIRE_DEFAULTS. Use gl_LIBUNISTRING_MODULE_WITH_VARIABLE.
8543         * modules/unictype/base (Files): Add m4/unictype_h.m4.
8544         (configure.ac): Bump version number. Invoke gl_UNICTYPE_H,
8545         gl_UNICTYPE_H_REQUIRE_DEFAULTS.
8546         (Makefile.am): Substitute all GNULIB_UNICTYPE_*_DLL_VARIABLE.
8547         * modules/unictype/category-* (configure.ac): Invoke
8548         gl_UNICTYPE_H_REQUIRE_DEFAULTS. Use
8549         gl_LIBUNISTRING_MODULE_WITH_VARIABLE.
8550         * modules/unictype/property-* (configure.ac): Likewise.
8551         * modules/uninorm/base (Files): Add m4/uninorm_h.m4.
8552         (configure.ac): Bump version number. Invoke gl_UNINORM_H,
8553         gl_UNINORM_H_REQUIRE_DEFAULTS.
8554         (Makefile.am): Substitute all GNULIB_UNINORM_*_DLL_VARIABLE.
8555         * modules/uninorm/nf* (configure.ac): Invoke
8556         gl_UNINORM_H_REQUIRE_DEFAULTS. Use gl_LIBUNISTRING_MODULE_WITH_VARIABLE.
8558 2023-04-22  Bruno Haible  <bruno@clisp.org>
8560         Avoid some Autoconf "was expanded before it was required" warnings.
8561         * m4/locale-ar.m4 (gt_LOCALE_AR): Define through AC_DEFUN_ONCE.
8562         * m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): Likewise.
8563         * m4/locale-ja.m4 (gt_LOCALE_JA): Likewise.
8564         * m4/locale-tr.m4 (gt_LOCALE_TR_UTF8): Likewise.
8565         * m4/locale-zh.m4 (gt_LOCALE_ZH_CN): Likewise.
8567 2023-04-22  Bruno Haible  <bruno@clisp.org>
8569         string-desc tests: Avoid test failure on native Windows.
8570         * tests/test-string-desc.c: Include <fcntl.h>, <unistd.h>.
8571         (main): Expect a file name argument. Write to this file, instead of to
8572         fd 3.
8573         * tests/test-string-desc.sh: Pass a file name as argument, instead of
8574         using '3>'.
8575         * modules/string-desc-tests (Depends-on): Add close.
8577 2023-04-22  Bruno Haible  <bruno@clisp.org>
8579         threadlib, pthread-h, threads-h: Avoid mingw's libwinpthread by default.
8580         * m4/threadlib.m4 (gl_THREADLIB_EARLY_BODY): Set
8581         gl_use_winpthreads_default to 'no' by default.
8582         (gl_AVOID_WINPTHREAD): Update comments.
8584 2023-04-22  Bruno Haible  <bruno@clisp.org>
8586         posixtm tests: Avoid test failure on native Windows.
8587         * tests/test-posixtm.c (T): On native Windows, disable test cases that
8588         would fail.
8590 2023-04-22  Bruno Haible  <bruno@clisp.org>
8592         dfa tests: Fix test failure on mingw differently.
8593         Suggested by Paul Eggert.
8594         * tests/test-dfa-invalid-char-class.sh: Revert last change.
8595         * tests/test-dfa-match-aux.c: Include binary-io.h.
8596         (main): Put stdout into binary mode.
8597         * modules/dfa-tests (Depends-on): Add binary-io.
8599 2023-04-20  Bruno Haible  <bruno@clisp.org>
8601         getumask: Make it work on native Windows.
8602         * lib/getumask.c (getumask): When TMPDIR is unset, try TMP and TEMP.
8603         * tests/test-getumask.c (ASSUME_UMASK_CONSTANT): Define to 1 on native
8604         Windows.
8606 2023-04-20  Bruno Haible  <bruno@clisp.org>
8608         posixtm tests: Fix link error.
8609         * modules/posixtm-tests (Depends-on): Add stpcpy.
8611 2023-04-20  Bruno Haible  <bruno@clisp.org>
8613         readtokens tests: Fix test failure on mingw.
8614         * tests/test-readtokens.sh: Transform CRLF to LF in the output, before
8615         comparing with the expected output.
8617         parse-duration tests: Fix test failure on mingw.
8618         * tests/test-parse-duration.sh: Transform CRLF to LF in the output,
8619         before analyzing the output.
8621         dfa tests: Fix test failure on mingw.
8622         * tests/test-dfa-invalid-char-class.sh: Transform CRLF to LF in the
8623         output, before comparing with the expected output.
8625 2023-04-20  Bruno Haible  <bruno@clisp.org>
8627         Fix uses of libwinpthread on mingw 10.
8628         * m4/threadlib.m4 (gl_WEAK_SYMBOLS): On mingw, set the result to
8629         "guessing no".
8631 2023-04-20  Bruno Haible  <bruno@clisp.org>
8633         Move remaining call_once tests from mtx-tests to call_once-tests.
8634         * tests/test-call_once1.c: Renamed from tests/test-call_once.c.
8635         * tests/test-call_once2.c: New file, based on tests/test-mtx.c.
8636         * tests/test-mtx.c: Remove the code that was testing call_once.
8637         * modules/call_once-tests (Files): Add test-call_once1.c,
8638         test-call_once2.c. Remove test-call_once.c.
8639         (Depends-on): Add thrd, lock, stdint.
8640         (configure.ac): Check for alarm.
8641         (Makefile.am): Test test-call_once1 instead of test-call_once. Also test
8642         test-call_once2.
8644 2023-04-20  Bruno Haible  <bruno@clisp.org>
8646         execute tests: Fix compilation error on mingw (regression 2023-01-17).
8647         * tests/test-execute-main.c (main): Don't use SIGPIPE if it's not
8648         defined.
8650 2023-04-20  Bruno Haible  <bruno@clisp.org>
8652         assert-h, verify: Fix compilation error in C++ mode with MSVC 14.30.
8653         * lib/verify.h (_Static_assert): In C++ mode with MSVC 14.1 or newer,
8654         define merely to static_assert.
8655         (static_assert): In C++ mode with MSVC 14.1 or newer, don't define.
8657 2023-04-19  Bruno Haible  <bruno@clisp.org>
8659         chown, lchown tests: Fix link error on mingw 10.
8660         * modules/chown-tests (configure.ac): Test whether getgid() exists.
8661         * modules/lchown-tests (configure.ac): Likewise.
8662         * modules/fchownat-tests (configure.ac): Likewise.
8663         * tests/test-chown.h (getgid): Define a fallback.
8664         * tests/test-lchown.h (getgid): Likewise.
8666 2023-04-19  Bruno Haible  <bruno@clisp.org>
8668         ctime: Fix compilation errors in C++ mode on mingw 10.
8669         * lib/c++defs.h (_GL_FUNCDECL_RPL): Add a comment.
8670         * lib/time.in.h (ctime): Don't use _GL_ATTRIBUTE_DEPRECATED before
8671         _GL_FUNCDECL_RPL in C++ mode.
8673 2023-04-19  Bruno Haible  <bruno@clisp.org>
8675         random: Fix compilation errors in C++ mode on mingw 10.
8676         * lib/stdlib.in.h (random, srandom): Disable _GL_CXXALIASWARN invocation
8677         on non-glibc systems.
8679 2023-04-19  Bruno Haible  <bruno@clisp.org>
8681         year2038-required: Fix configure failure with MSVC.
8682         * m4/largefile.m4 (_AC_SYS_LARGEFILE_PROBE): Distinguish the results
8683         "support not detected" and "supported through gnulib". If the result is
8684         "supported through gnulib", don't fail.
8686 2023-04-19  Bruno Haible  <bruno@clisp.org>
8688         doc: Add references to changes accepted for future POSIX revisions.
8689         * doc/glibc-functions/bind_textdomain_codeset.texi: Add reference to
8690         www.austingroupbugs.net issue.
8691         * doc/glibc-functions/bindtextdomain.texi: Likewise.
8692         * doc/glibc-functions/dcgettext.texi: Likewise.
8693         * doc/glibc-functions/dcngettext.texi: Likewise.
8694         * doc/glibc-functions/dgettext.texi: Likewise.
8695         * doc/glibc-functions/dngettext.texi: Likewise.
8696         * doc/glibc-functions/getentropy.texi: Likewise.
8697         * doc/glibc-functions/getresgid.texi: Likewise.
8698         * doc/glibc-functions/getresuid.texi: Likewise.
8699         * doc/glibc-functions/gettext.texi: Likewise.
8700         * doc/glibc-functions/ngettext.texi: Likewise.
8701         * doc/glibc-functions/posix_spawn_file_actions_addchdir_np.texi:
8702         Likewise.
8703         * doc/glibc-functions/posix_spawn_file_actions_addfchdir_np.texi:
8704         Likewise.
8705         * doc/glibc-functions/setresgid.texi: Likewise.
8706         * doc/glibc-functions/setresuid.texi: Likewise.
8707         * doc/glibc-functions/textdomain.texi: Likewise.
8708         * doc/posix-functions/asctime_r.texi: Likewise.
8709         * doc/posix-functions/ctime_r.texi: Likewise.
8711 2023-04-19  Bruno Haible  <bruno@clisp.org>
8713         wcsncmp: Add tests.
8714         * tests/test-wcsncmp.c: New file, based on tests/unistr/test-strncmp.h
8715         and tests/test-wcscmp.c.
8716         * modules/wcsncmp-tests: New file.
8718         wcsncmp: Work around two ISO C compliance bugs on several platforms.
8719         * lib/wchar.in.h (wcsncmp): Consider REPLACE_WCSNCMP.
8720         * lib/wcsncmp-impl.h (wcsncmp): Don't assume that the two wide
8721         characters are in the range 0..INT_MAX.
8722         * m4/wcsncmp.m4 (gl_FUNC_WCSNCMP): Test whether wcsncmp works for all
8723         wide characters. Set REPLACE_WCSNCMP.
8724         * m4/wchar_h.m4 (gl_WCHAR_H_DEFAULTS): Initialize REPLACE_WCSNCMP.
8725         * modules/wchar (Makefile.am): Substitute REPLACE_WCSNCMP.
8726         * modules/wcsncmp (Status, Notice): Un-obsolete this module.
8727         (configure.ac): Consider REPLACE_WCSNCMP.
8728         * doc/posix-functions/wcsncmp.texi: Mention the two bugs.
8730 2023-04-18  Bruno Haible  <bruno@clisp.org>
8732         wcscmp: Add tests.
8733         * tests/test-wcscmp.c: New file, based on tests/unistr/test-strcmp.h.
8734         * modules/wcscmp-tests: New file.
8736         wcscmp: Work around two ISO C compliance bugs on several platforms.
8737         * lib/wchar.in.h (wcscmp): Consider REPLACE_WCSCMP.
8738         * lib/wcscmp-impl.h (wcscmp): Don't assume that the two wide characters
8739         are in the range 0..INT_MAX.
8740         * m4/wcscmp.m4 (gl_FUNC_WCSCMP): Test whether wcscmp works for all wide
8741         characters. Set REPLACE_WCSCMP.
8742         * m4/wchar_h.m4 (gl_WCHAR_H_DEFAULTS): Initialize REPLACE_WCSCMP.
8743         * modules/wchar (Makefile.am): Substitute REPLACE_WCSCMP.
8744         * modules/wcscmp (Status, Notice): Un-obsolete this module.
8745         (configure.ac): Consider REPLACE_WCSCMP.
8746         * doc/posix-functions/wcscmp.texi: Mention the two bugs.
8748 2023-04-18  Bruno Haible  <bruno@clisp.org>
8750         wmemcmp: Add tests.
8751         * tests/test-wmemcmp.c: New file, based on tests/unistr/test-cmp.h.
8752         * modules/wmemcmp-tests: New file.
8754         wmemcmp: Work around ISO C compliance bug on several platforms.
8755         * lib/wchar.in.h (wmemcmp): Consider REPLACE_WMEMCMP.
8756         * lib/wmemcmp-impl.h (wmemcmp): Don't assume that the two wide
8757         characters are in the range 0..INT_MAX.
8758         * m4/wmemcmp.m4 (gl_FUNC_WMEMCMP): Test whether wmemcmp works for all
8759         wide characters. Set REPLACE_WMEMCMP.
8760         * m4/wchar_h.m4 (gl_WCHAR_H_DEFAULTS): Initialize REPLACE_WMEMCMP.
8761         * modules/wchar (Makefile.am): Substitute REPLACE_WMEMCMP.
8762         * modules/wmemcmp (configure.ac): Consider REPLACE_WMEMCMP.
8763         * doc/posix-functions/wmemcmp.texi: Mention the bug.
8765 2023-04-18  Bruno Haible  <bruno@clisp.org>
8767         doc: Update platform list for posix_spawnp.
8768         * doc/posix-functions/posix_spawnp.texi: Update platform list.
8770 2023-04-18  Paul Eggert  <eggert@cs.ucla.edu>
8772         Go back to dynamic largefile, year2038 tests
8773         Problem reported by Bruno Haible in:
8774         https://lists.gnu.org/r/bug-gnulib/2023-04/msg00134.html
8775         * modules/largefile-tests, modules/year2038-tests (Depends-on):
8776         Remove assert-h.
8777         * tests/test-largefile.c, tests/test-year2038.c:
8778         Test dynamically, not via static_assert.
8780         doc: mention when O_* defaults to 0
8781         * doc/posix-headers/fcntl.texi: Document in more detail which O_*
8782         macros default to 0 in Gnulib.
8784 2023-04-18  Bruno Haible  <bruno@clisp.org>
8786         doc: Mention a Cygwin 3.4.6 bug.
8787         * doc/posix-functions/readlinkat.texi: Mention a readlinkat bug on
8788         Cygwin < 3.4.7.
8790 2023-04-18  Bruno Haible  <bruno@clisp.org>
8792         ilogbl: Work around a Cygwin 3.4.6 bug.
8793         * m4/ilogbl.m4 (gl_FUNC_ILOGBL_WORKS): Also test the value of
8794         ilogbl(NaN).
8795         * doc/posix-functions/ilogbl.texi: Mention the new Cygwin bug.
8797 2023-04-18  Bruno Haible  <bruno@clisp.org>
8799         file-has-acl tests: Avoid test failures on Cygwin 3.4.6.
8800         * tests/test-file-has-acl.sh: Fix distinction between Linux setfacl and
8801         Cygwin setfacl.
8803 2023-04-18  Bruno Haible  <bruno@clisp.org>
8805         c32isgraph tests: Avoid test failure on Cygwin 3.4.6.
8806         * tests/test-c32isgraph.c (main): Skip U+00A0 test on Cygwin.
8808 2023-04-17  Paul Eggert  <eggert@cs.ucla.edu>
8810         Slightly nicer largefile, year2038 tests
8811         * modules/largefile-tests, modules/year2038-tests (Depends-on):
8812         Add assert-h, intprops.
8813         * tests/test-largefile.c, tests/test-year2038.c:
8814         Prefer compile-time to run-time tests.
8815         Don’t assume CHAR_BIT == 8.
8817 2023-04-17  Bruno Haible  <bruno@clisp.org>
8819         MODULES.html.sh: Ensure hyperlinked files are displayable.
8820         * MODULES.html.sh (repo_url_prefix): Use cgit instead of gitweb.
8822         MODULES.html.sh: Avoid a HTTP redirect.
8823         * MODULES.html.sh (repo_url_prefix): Use the unabbreviated name of the
8824         git repository server.
8826 2023-04-16  Bruno Haible  <bruno@clisp.org>
8828         year2038: Add tests.
8829         * tests/test-year2038.c: New file.
8830         * modules/year2038-tests: New file.
8832 2023-04-16  Bruno Haible  <bruno@clisp.org>
8834         largefile: Add tests.
8835         * tests/test-largefile.c: New file.
8836         * modules/largefile-tests: New file.
8838 2023-04-16  Bruno Haible  <bruno@clisp.org>
8840         year2038: Revert the added module dependencies.
8841         Suggested by Paul Eggert in
8842         <https://lists.gnu.org/archive/html/bug-gnulib/2023-04/msg00117.html>.
8843         * modules/year2038 (Depends-on): Remove sched, sys_msg, sys_select,
8844         sys_sem, sys_shm, sys_stat, sys_time, sys_types, time-h, utime-h.
8846 2023-04-16  Bruno Haible  <bruno@clisp.org>
8848         posix_spawn_file_actions_addclose tests: Avoid test failure on Cygwin.
8849         * tests/test-posix_spawn_file_actions_addclose.c (main): Skip an
8850         unportable test also on Cygwin.
8852 2023-04-15  Bruno Haible  <bruno@clisp.org>
8854         Fix compilation errors of list, set, oset, map, omap in C++ mode.
8855         * m4/gnulib-common.m4 (gl_COMMON_BODY): Define
8856         _GL_BRACKET_BEFORE_ATTRIBUTE. In _GL_ATTRIBUTE_DEPRECATED,
8857         _GL_ATTRIBUTE_MAYBE_UNUSED, _GL_ATTRIBUTE_NODISCARD, don't use the
8858         bracket syntax if _GL_BRACKET_BEFORE_ATTRIBUTE is defined.
8860 2023-04-15  Bruno Haible  <bruno@clisp.org>
8862         Don't include module 'year2038-required' in all-of-gnulib testdirs.
8863         * all-modules (exclude): Add year2038-required.
8865 2023-04-15  Bruno Haible  <bruno@clisp.org>
8867         selinux-h: Fix compilation error (regression 2023-04-13).
8868         * m4/selinux-selinux-h.m4 (gl_HEADERS_SELINUX_SELINUX_H): Instead of
8869         defining the C macro HAVE_SELINUX_SELINUX_H to 0, set the Autoconf
8870         variable HAVE_SELINUX_SELINUX_H to 0.
8872 2023-04-14  Bruno Haible  <bruno@clisp.org>
8874         year2038: Fix configure failure on 32-bit mingw.
8875         * m4/largefile.m4 (_AC_SYS_YEAR2038_PROBE): Use the same option
8876         spelling as in _AC_SYS_YEAR2038_OPTIONS.
8878 2023-04-14  Bruno Haible  <bruno@clisp.org>
8880         isnan: Fix compilation error in C++ mode on FreeBSD 13.2.
8881         * lib/math.in.h (isnan): On FreeBSD 13.2 or newer, don't declare isnan
8882         through _GL_MATH_CXX_REAL_FLOATING_DECL_2.
8884 2023-04-14  Bruno Haible  <bruno@clisp.org>
8886         filemode: Fix double-inclusion guard.
8887         * lib/filemode.h: Make the double-inclusion guard actually work.
8889 2023-04-14  Bruno Haible  <bruno@clisp.org>
8891         year2038: Add reminder to include <config.h> before time_t gets defined.
8892         * lib/sched.in.h: Check that config.h was already included before the
8893         #include_next.
8894         * lib/sys_select.in.h: Likewise.
8895         * lib/sys_stat.in.h: Likewise.
8896         * lib/sys_time.in.h: Likewise.
8897         * lib/sys_types.in.h: Likewise.
8898         * lib/time.in.h: Likewise.
8899         * lib/utime.in.h: Likewise.
8900         * modules/year2038 (Depends-on): Add sched, sys_msg, sys_select,
8901         sys_sem, sys_shm, sys_stat, sys_time, sys_types, time-h, utime-h.
8903         sys_shm: New module.
8904         * lib/sys_shm.in.h: New file.
8905         * m4/sys_shm_h.m4: New file.
8906         * modules/sys_shm: New file.
8907         * doc/posix-headers/sys_shm.texi: Mention the new module.
8909         sys_sem: New module.
8910         * lib/sys_sem.in.h: New file.
8911         * m4/sys_sem_h.m4: New file.
8912         * modules/sys_sem: New file.
8913         * doc/posix-headers/sys_sem.texi: Mention the new module.
8915         sys_msg: New module.
8916         * lib/sys_msg.in.h: New file.
8917         * m4/sys_msg_h.m4: New file.
8918         * modules/sys_msg: New file.
8919         * doc/posix-headers/sys_msg.texi: Mention the new module.
8921 2023-04-13  Bruno Haible  <bruno@clisp.org>
8923         Add more reminders to include <config.h>.
8924         * lib/aligned-malloc.h: Check that config.h was already included.
8925         * lib/careadlinkat.h: Likewise.
8926         * lib/filemode.h: Likewise.
8927         * lib/freadptr.h: Likewise.
8928         * lib/fseterr.h: Likewise.
8929         * lib/glthread/lock.h: Likewise.
8930         * lib/glthread/tls.h: Likewise.
8931         * lib/immutable.h: Likewise.
8932         * lib/isapipe.h: Likewise.
8933         * lib/isnand-nolibm.h: Likewise.
8934         * lib/isnanf-nolibm.h: Likewise.
8935         * lib/isnanl-nolibm.h: Likewise.
8936         * lib/mbswidth.h: Likewise.
8937         * lib/md5.h: Likewise.
8938         * lib/minmax.h: Likewise.
8939         * lib/msvc-inval.h: Likewise.
8940         * lib/msvc-nothrow.h: Likewise.
8941         * lib/pathmax.h: Likewise.
8942         * lib/sha1.h: Likewise.
8943         * lib/sha256.h: Likewise.
8944         * lib/sha512.h: Likewise.
8945         * lib/size_max.h: Likewise.
8946         * lib/sm3.h: Likewise.
8947         * lib/stat-size.h: Likewise.
8948         * lib/termcap.h: Likewise.
8949         * lib/terminfo.h: Likewise.
8950         * lib/thread-optim.h: Likewise.
8951         * lib/unlocked-io.h: Likewise.
8952         * lib/vma-iter.h: Likewise.
8954 2023-04-13  Bruno Haible  <bruno@clisp.org>
8956         Adjust comments in <config.h> reminders.
8957         * lib/*.h: In the comments, mention also HAVE_*.
8959 2023-04-13  Bruno Haible  <bruno@clisp.org>
8961         Adjust comments in <config.h> reminders.
8962         * lib/*.in.h: In the comments, mention also HAVE_RAW_DECL_*.
8963         * Makefile (sc_check_config_h_reminder): Search also for HAVE_RAW_DECL_.
8965 2023-04-13  Bruno Haible  <bruno@clisp.org>
8967         utmp: Avoid using HAVE_* macros in *.in.h files.
8968         * m4/pty_h.m4 (gl_PTY_CHECK_UTIL_H): New macro, extracted from gl_PTY_H.
8969         (gl_PTY_H): Invoke it.
8970         * m4/utmp_h.m4 (gl_UTMP_H): Invoke gl_PTY_CHECK_UTIL_H and set
8971         HAVE_TERMIOS_H.
8972         (gl_UTMP_H_DEFAULTS): Require gl_PTY_H_DEFAULTS, gl_TERMIOS_H_DEFAULTS.
8973         * modules/utmp (Files): Add m4/pty_h.m4, m4/termios_h.m4.
8974         (Makefile.am): Substitute also HAVE_UTIL_H, HAVE_LIBUTIL_H,
8975         HAVE_TERMIOS_H.
8976         * lib/utmp.in.h: Test HAVE_UTIL_H, HAVE_LIBUTIL_H, HAVE_TERMIOS_H as
8977         Autoconf variables.
8979 2023-04-13  Bruno Haible  <bruno@clisp.org>
8981         getprogname: Avoid using HAVE_* macros in *.in.h files.
8982         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize
8983         HAVE_DECL_PROGRAM_INVOCATION_NAME.
8984         * m4/getprogname.m4 (gl_FUNC_GETPROGNAME): Require gl_STDLIB_H_DEFAULTS
8985         and gl_USE_SYSTEM_EXTENSIONS. Set HAVE_DECL_PROGRAM_INVOCATION_NAME.
8986         * modules/stdlib (Makefile.am): Substitute
8987         HAVE_DECL_PROGRAM_INVOCATION_NAME.
8988         * lib/stdlib.in.h (getprogname): Test HAVE_DECL_PROGRAM_INVOCATION_NAME
8989         as an Autoconf variable.
8991 2023-04-13  Bruno Haible  <bruno@clisp.org>
8993         selinux-h: Avoid using HAVE_* macros in *.in.h files.
8994         * m4/selinux-selinux-h.m4 (gl_HEADERS_SELINUX_SELINUX_H): Initialize
8995         HAVE_SELINUX_SELINUX_H.
8996         * modules/selinux-h (Makefile.am): Substitute HAVE_SELINUX_SELINUX_H.
8997         * lib/se-selinux.in.h: Test HAVE_SELINUX_SELINUX_H as an Autoconf
8998         variable.
9000 2023-04-13  Bruno Haible  <bruno@clisp.org>
9002         ialloc, gethrxtime: Restore GCC diagnostics options.
9003         * lib/ialloc.h: Invoke _GL_INLINE_HEADER_END.
9004         * lib/xtime.h: Likewise.
9005         * Makefile (sc_check_GL_INLINE_HEADER_use): New rule.
9007 2023-04-13  Bruno Haible  <bruno@clisp.org>
9009         flexmember: Fix module description (regression 2016-09-07).
9010         * modules/flexmember (Include): Add "flexmember.h".
9012 2023-04-12  Paul Eggert  <eggert@cs.ucla.edu>
9014         doc: year2038 MIPS o32 nudge
9015         * doc/year2038.texi: Use more-common "o32" name for
9016         32-bit MIPS ABI.
9018 2023-04-12  Bruno Haible  <bruno@clisp.org>
9020         Add more reminders to include <config.h>.
9021         * m4/gnulib-common.m4 (gl_COMMON): In config.h, define
9022         _GL_CONFIG_H_INCLUDED.
9023         * lib/acl-internal.h: Test _GL_CONFIG_H_INCLUDED instead of
9024         _GL_INLINE_HEADER_BEGIN.
9025         * lib/alignalloc.h: Likewise.
9026         * lib/argp-fmtstream.h: Likewise.
9027         * lib/argp.h: Likewise.
9028         * lib/binary-io.h: Likewise.
9029         * lib/bitrotate.h: Likewise.
9030         * lib/c-ctype.h: Likewise.
9031         * lib/count-leading-zeros.h: Likewise.
9032         * lib/count-one-bits.h: Likewise.
9033         * lib/count-trailing-zeros.h: Likewise.
9034         * lib/eealloc.h: Likewise.
9035         * lib/execinfo.in.h: Likewise.
9036         * lib/gethrxtime.h: Likewise.
9037         * lib/gl_list.h: Likewise.
9038         * lib/gl_map.h: Likewise.
9039         * lib/gl_omap.h: Likewise.
9040         * lib/gl_openssl.h: Likewise.
9041         * lib/gl_oset.h: Likewise.
9042         * lib/gl_set.h: Likewise.
9043         * lib/gl_xlist.h: Likewise.
9044         * lib/gl_xmap.h: Likewise.
9045         * lib/gl_xomap.h: Likewise.
9046         * lib/gl_xoset.h: Likewise.
9047         * lib/gl_xset.h: Likewise.
9048         * lib/gl_xsublist.h: Likewise.
9049         * lib/glthread/cond.h: Likewise.
9050         * lib/hamt.h: Likewise.
9051         * lib/ialloc.h: Likewise.
9052         * lib/math.in.h: Likewise.
9053         * lib/mbchar.h: Likewise.
9054         * lib/mbfile.h: Likewise.
9055         * lib/mbiter.h: Likewise.
9056         * lib/mbuiter.h: Likewise.
9057         * lib/openat.h: Likewise.
9058         * lib/pipe-filter-aux.h: Likewise.
9059         * lib/priv-set.h: Likewise.
9060         * lib/safe-alloc.h: Likewise.
9061         * lib/savewd.h: Likewise.
9062         * lib/se-context.in.h: Likewise.
9063         * lib/se-label.in.h: Likewise.
9064         * lib/se-selinux.in.h: Likewise.
9065         * lib/sig-handler.h: Likewise.
9066         * lib/stat-time.h: Likewise.
9067         * lib/string-desc-quotearg.h: Likewise.
9068         * lib/string-desc.h: Likewise.
9069         * lib/sys_socket.in.h: Likewise.
9070         * lib/timespec.h: Likewise.
9071         * lib/u64.h: Likewise.
9072         * lib/uchar.in.h: Likewise.
9073         * lib/unistd.in.h: Likewise.
9074         * lib/utimens.h: Likewise.
9075         * lib/wctype.in.h: Likewise.
9076         * lib/xalloc.h: Likewise.
9077         * lib/xbinary-io.h: Likewise.
9078         * lib/xsize.h: Likewise.
9079         * lib/xstring-desc.h: Likewise.
9080         * lib/xtime.h: Likewise.
9081         * lib/acl.h: Check that config.h was already included.
9082         * lib/alignof.h: Likewise.
9083         * lib/argmatch.h: Likewise.
9084         * lib/argv-iter.h: Likewise.
9085         * lib/arpa_inet.in.h: Likewise.
9086         * lib/attribute.h: Likewise.
9087         * lib/backupfile.h: Likewise.
9088         * lib/base32.h: Likewise.
9089         * lib/base64.h: Likewise.
9090         * lib/basename-lgpl.h: Likewise.
9091         * lib/bitset.h: Likewise.
9092         * lib/bitsetv.h: Likewise.
9093         * lib/c-snprintf.h: Likewise.
9094         * lib/c-stack.h: Likewise.
9095         * lib/c-strcase.h: Likewise.
9096         * lib/c-vasnprintf.h: Likewise.
9097         * lib/c-vasprintf.h: Likewise.
9098         * lib/c-vsnprintf.h: Likewise.
9099         * lib/c-xvasprintf.h: Likewise.
9100         * lib/canon-host.h: Likewise.
9101         * lib/canonicalize.h: Likewise.
9102         * lib/clean-temp.h: Likewise.
9103         * lib/concat-filename.h: Likewise.
9104         * lib/ctype.in.h: Likewise.
9105         * lib/dfa.h: Likewise.
9106         * lib/di-set.h: Likewise.
9107         * lib/dirent-safer.h: Likewise.
9108         * lib/dirent.in.h: Likewise.
9109         * lib/dirname.h: Likewise.
9110         * lib/eloop-threshold.h: Likewise.
9111         * lib/error.in.h: Likewise.
9112         * lib/exclude.h: Likewise.
9113         * lib/fatal-signal.h: Likewise.
9114         * lib/fcntl.in.h: Likewise.
9115         * lib/file-type.h: Likewise.
9116         * lib/filenamecat.h: Likewise.
9117         * lib/filevercmp.h: Likewise.
9118         * lib/flexmember.h: Likewise.
9119         * lib/fnmatch.in.h: Likewise.
9120         * lib/fpending.h: Likewise.
9121         * lib/freadable.h: Likewise.
9122         * lib/freadahead.h: Likewise.
9123         * lib/freading.h: Likewise.
9124         * lib/fts_.h: Likewise.
9125         * lib/fwritable.h: Likewise.
9126         * lib/fwriting.h: Likewise.
9127         * lib/gc.h: Likewise.
9128         * lib/get_progname_of.h: Likewise.
9129         * lib/glob.in.h: Likewise.
9130         * lib/glthread/thread.h: Likewise.
9131         * lib/hash-pjw-bare.h: Likewise.
9132         * lib/hash-pjw.h: Likewise.
9133         * lib/hash-triple.h: Likewise.
9134         * lib/hash.h: Likewise.
9135         * lib/i-ring.h: Likewise.
9136         * lib/iconv.in.h: Likewise.
9137         * lib/ino-map.h: Likewise.
9138         * lib/inttostr.h: Likewise.
9139         * lib/inttypes.in.h: Likewise.
9140         * lib/javaversion.h: Likewise.
9141         * lib/langinfo.in.h: Likewise.
9142         * lib/locale.in.h: Likewise.
9143         * lib/localename.h: Likewise.
9144         * lib/malloc.in.h: Likewise.
9145         * lib/malloca.h: Likewise.
9146         * lib/memcasecmp.h: Likewise.
9147         * lib/memchr2.h: Likewise.
9148         * lib/memcmp2.h: Likewise.
9149         * lib/modechange.h: Likewise.
9150         * lib/monetary.in.h: Likewise.
9151         * lib/mountlist.h: Likewise.
9152         * lib/netdb.in.h: Likewise.
9153         * lib/obstack.h: Likewise.
9154         * lib/opendirat.h: Likewise.
9155         * lib/pagealign_alloc.h: Likewise.
9156         * lib/pipe-filter.h: Likewise.
9157         * lib/poll.in.h: Likewise.
9158         * lib/pthread.in.h: Likewise.
9159         * lib/pty.in.h: Likewise.
9160         * lib/quotearg.h: Likewise.
9161         * lib/read-file.h: Likewise.
9162         * lib/readline.h: Likewise.
9163         * lib/readutmp.h: Likewise.
9164         * lib/regex-quote.h: Likewise.
9165         * lib/relocatable.h: Likewise.
9166         * lib/savedir.h: Likewise.
9167         * lib/sched.in.h: Likewise.
9168         * lib/search.in.h: Likewise.
9169         * lib/sh-quote.h: Likewise.
9170         * lib/signal.in.h: Likewise.
9171         * lib/sigpipe-die.h: Likewise.
9172         * lib/sockets.h: Likewise.
9173         * lib/spawn.in.h: Likewise.
9174         * lib/ssfmalloc.h: Likewise.
9175         * lib/stack.h: Likewise.
9176         * lib/stdalign.in.h: Likewise.
9177         * lib/stdarg.in.h: Likewise.
9178         * lib/stddef.in.h: Likewise.
9179         * lib/stdio-safer.h: Likewise.
9180         * lib/stdio.in.h: Likewise.
9181         * lib/stdlib.in.h: Likewise.
9182         * lib/stdnoreturn.in.h: Likewise.
9183         * lib/strerror-override.h: Likewise.
9184         * lib/striconv.h: Likewise.
9185         * lib/striconveh.h: Likewise.
9186         * lib/striconveha.h: Likewise.
9187         * lib/string-buffer.h: Likewise.
9188         * lib/string.in.h: Likewise.
9189         * lib/strings.in.h: Likewise.
9190         * lib/strnlen1.h: Likewise.
9191         * lib/sys_file.in.h: Likewise.
9192         * lib/sys_ioctl.in.h: Likewise.
9193         * lib/sys_random.in.h: Likewise.
9194         * lib/sys_resource.in.h: Likewise.
9195         * lib/sys_select.in.h: Likewise.
9196         * lib/sys_stat.in.h: Likewise.
9197         * lib/sys_time.in.h: Likewise.
9198         * lib/sys_times.in.h: Likewise.
9199         * lib/sys_utsname.in.h: Likewise.
9200         * lib/sys_wait.in.h: Likewise.
9201         * lib/system-quote.h: Likewise.
9202         * lib/term-style-control.h: Likewise.
9203         * lib/termios.in.h: Likewise.
9204         * lib/textstyle.in.h: Likewise.
9205         * lib/threads.in.h: Likewise.
9206         * lib/time.in.h: Likewise.
9207         * lib/trim.h: Likewise.
9208         * lib/utime.in.h: Likewise.
9209         * lib/utmp.in.h: Likewise.
9210         * lib/vasnprintf.h: Likewise.
9211         * lib/verror.h: Likewise.
9212         * lib/version-etc.h: Likewise.
9213         * lib/wchar.in.h: Likewise.
9214         * lib/windows-spawn.h: Likewise.
9215         * lib/windows-thread.h: Likewise.
9216         * lib/xgetcwd.h: Likewise.
9217         * lib/xgetdomainname.h: Likewise.
9218         * lib/xgethostname.h: Likewise.
9219         * lib/xmalloca.h: Likewise.
9220         * lib/xmemdup0.h: Likewise.
9221         * lib/xprintf.h: Likewise.
9222         * lib/xreadlink.h: Likewise.
9223         * lib/xstriconv.h: Likewise.
9224         * lib/xstriconveh.h: Likewise.
9225         * lib/xstrndup.h: Likewise.
9226         * lib/xstrtol-error.h: Likewise.
9227         * lib/xvasprintf.h: Likewise.
9228         * Makefile (config_h_MACROS*): New variables.
9229         (sc_check_config_h_reminder): New rule.
9231 2023-04-11  Paul Eggert  <eggert@cs.ucla.edu>
9233         doc: update year2038 list further
9234         Prompted by Adhemerval Zanella Netto’s email in:
9235         https://lists.gnu.org/r/bug-gnulib/2023-04/msg00083.html
9236         Also, mention 32-bit Android.
9237         * doc/year2038.texi: Mention Linux/ork1 and Android.
9238         Append "32" to powerpc and sparc names.
9240 2023-04-11  Bruno Haible  <bruno@clisp.org>
9242         Fix the "make sc_prohibit_AC_LIBOBJ_in_m4" findings.
9243         * Makefile (allow_AC_LIBOBJ): Update after 2023-03-24 change. Add
9244         termcap, terminfo.
9246 2023-04-11  Bruno Haible  <bruno@clisp.org>
9248         Fix some "make sc_prohibit_leading_TABs" findings.
9249         * tests/test-calloc-gnu.c: Expand tabs.
9250         * tests/test-regex.c: Likewise.
9252 2023-04-11  Bruno Haible  <bruno@clisp.org>
9254         Makefile: Fix a syntax alert.
9255         * Makefile: Indent commands with tabs, not spaces.
9257 2023-04-10  Bruno Haible  <bruno@clisp.org>
9259         alignasof: Ensure a correct _Alignas (regression 2023-01-15).
9260         * m4/stdalign.m4 (gl_ALIGNASOF): Define _Alignas also when <stdalign.h>
9261         exists.
9263 2023-04-10  Paul Eggert  <eggert@cs.ucla.edu>
9265         doc: update list of year2038 platforms
9266         * doc/year2038.texi: Update list of platforms
9267         by adding dates and version numbers and fixing some that
9268         appear to have been misfiled.  Also, list working systems
9269         and versions first, as that helps shorten the list of
9270         failing systems by saying "older versions".
9272         doc: moved year2038 para up
9273         * doc/year2038.texi: Move a paragraph up,
9274         as it’s lonely at the end.
9276         doc: document year2038 first
9277         * doc/year2038.texi: Document year2038 first, then
9278         year2038-required.
9280 2023-04-10  Bruno Haible  <bruno@clisp.org>
9282         doc: Clarify list of platforms for year2038 support.
9283         * doc/year2038.texi (Avoiding the year 2038 problem): List the platforms
9284         on which year2038-required is known to fail vs. known to succeed.
9286 2023-04-10  Bruno Haible  <bruno@clisp.org>
9288         doc: Avoid ambiguous wording.
9289         * doc/posix-headers/time.texi: Say "or" not "and".
9291 2023-04-09  Bruno Haible  <bruno@clisp.org>
9293         doc: Fix a typo.
9294         * doc/posix-headers/time.texi: Fix typo in module name.
9296 2023-04-09  Paul Eggert  <eggert@cs.ucla.edu>
9298         largefile: sync from Autoconf master
9299         * modules/largefile-required, modules/year2038-required: New modules.
9300         * MODULES.html.sh, doc/largefile.texi, doc/posix-headers/time.texi:
9301         * doc/year2038.texi: Document this.
9302         * m4/largefile.m4: Sync from Autoconf master.
9303         Conditionalize the workaround on AC_SYS_LARGEFILE_REQUIRED rather
9304         than on AC_SYS_YEAR2038 so that we replace older but still
9305         unreleased Autoconf.
9306         (AC_SYS_LARGEFILE_REQUIRED, AC_SYS_YEAR2038_REQUIRED): New macros.
9308         year2038: configure earlier
9309         * modules/year2038: Put AC_SYS_YEAR2038 in configure.ac-early
9310         since it can affect later compilations with _TIME_BITS=64.
9312 2023-04-09  Bruno Haible  <bruno@clisp.org>
9314         c32toupper: Add tests.
9315         * tests/test-c32toupper.sh: New file.
9316         * tests/test-c32toupper.c: New file, based on tests/test-c32islower.c.
9317         * modules/c32toupper-tests: New file.
9319         c32toupper: New module.
9320         * lib/uchar.in.h (c32toupper): New declaration.
9321         * lib/c32toupper.c: New file.
9322         * modules/c32toupper: New file.
9323         * m4/uchar_h.m4 (gl_UCHAR_H_REQUIRE_DEFAULTS): Initialize
9324         GNULIB_C32TOUPPER.
9325         * modules/uchar (Makefile.am): Substitute GNULIB_C32TOUPPER.
9327 2023-04-09  Bruno Haible  <bruno@clisp.org>
9329         c32tolower: Add tests.
9330         * tests/test-c32tolower.sh: New file.
9331         * tests/test-c32tolower.c: New file, based on tests/test-c32isupper.c.
9332         * modules/c32tolower-tests: New file.
9334         c32tolower: New module.
9335         * lib/uchar.in.h (c32tolower): New declaration.
9336         * lib/c32tolower.c: New file.
9337         * lib/c32to-impl.h: New file, based on lib/c32is-impl.h.
9338         * modules/c32tolower: New file.
9339         * m4/uchar_h.m4 (gl_UCHAR_H_REQUIRE_DEFAULTS): Initialize
9340         GNULIB_C32TOLOWER.
9341         * modules/uchar (Makefile.am): Substitute GNULIB_C32TOLOWER.
9343 2023-04-09  Bruno Haible  <bruno@clisp.org>
9345         c32is*: Ensure GNULIB_defined_mbstate_t is defined on AIX.
9346         * m4/mbrtowc.m4 (gl_MBSTATE_T_BROKEN): Define through AC_DEFUN_ONCE.
9347         * m4/mbrtoc32.m4 (gl_FUNC_MBRTOC32): Require it.
9348         * modules/c32isalnum (Files): Add m4/mbrtowc.m4, m4/locale-ja.m4.
9349         (configure.ac): Require gl_MBSTATE_T_BROKEN.
9350         * modules/c32isalpha: Likewise.
9351         * modules/c32isblank: Likewise.
9352         * modules/c32iscntrl: Likewise.
9353         * modules/c32isdigit: Likewise.
9354         * modules/c32isgraph: Likewise.
9355         * modules/c32islower: Likewise.
9356         * modules/c32isprint: Likewise.
9357         * modules/c32ispunct: Likewise.
9358         * modules/c32isspace: Likewise.
9359         * modules/c32isupper: Likewise.
9360         * modules/c32isxdigit: Likewise.
9362 2023-04-09  Bruno Haible  <bruno@clisp.org>
9364         mbrtoc32: Add comments.
9365         * lib/mbrtoc32.c: Add comment regarding AIX.
9366         * m4/mbrtoc32.m4 (gl_FUNC_MBRTOC32): Add comment regarding
9367         GNULIB_defined_mbstate_t.
9369 2023-04-09  Bruno Haible  <bruno@clisp.org>
9371         doc: Mention a NetBSD bug.
9372         * doc/posix-functions/towlower.texi: Mention NetBSD bug 57339.
9373         * doc/posix-functions/towupper.texi: Likewise.
9375 2023-04-09  Bruno Haible  <bruno@clisp.org>
9377         vasnwprintf-posix: More details about the glibc bug.
9378         * doc/posix-functions/swprintf.texi: Add comment.
9379         * m4/printf.m4 (gl_SWPRINTF_DIRECTIVE_LA): Update cross-compilation
9380         guess.
9382 2023-04-08  Bruno Haible  <bruno@clisp.org>
9384         doc: Mention another Haiku bug.
9385         * doc/posix-functions/open.texi: Mention a Haiku bug with symlinks.
9387 2023-04-08  Bruno Haible  <bruno@clisp.org>
9389         Avoid Autoconf "was expanded before it was required" warning.
9390         * m4/exponentf.m4 (gl_FLOAT_EXPONENT_LOCATION): Define through
9391         AC_DEFUN_ONCE.
9392         * m4/exponentd.m4 (gl_DOUBLE_EXPONENT_LOCATION): Likewise.
9393         * m4/exponentl.m4 (gl_LONG_DOUBLE_EXPONENT_LOCATION): Likewise.
9395 2023-04-08  Bruno Haible  <bruno@clisp.org>
9397         striconveh tests: Avoid test failure on glibc 2.15.
9398         * tests/test-striconveh.c (main): Skip some of the GB18030 tests on
9399         glibc < 2.16.
9401 2023-04-08  Bruno Haible  <bruno@clisp.org>
9403         vasnwprintf-posix: Really work around %La bug in glibc 2.15 and Haiku.
9404         * m4/vasnprintf.m4 (gl_PREREQ_VASNWPRINTF): Fix a copy&paste bug.
9406 2023-04-08  Bruno Haible  <bruno@clisp.org>
9408         login_tty: Fix compilation error in C++ mode on Solaris 11.4.
9409         * m4/login_tty.m4 (gl_FUNC_LOGIN_TTY): Test whether <termios.h> exists.
9410         Consider it when testing whether login_tty is declared.
9411         * lib/utmp.in.h: If none of <util.h> and <libutil.h> exists, include
9412         <termios.h> instead.
9413         * doc/glibc-functions/login_tty.texi: Document the Solaris 11.4 problem.
9415 2023-04-08  Bruno Haible  <bruno@clisp.org>
9417         time: Fix compilation error in C++ mode on Solaris 11.
9418         * lib/time.in.h (time): Disable _GL_CXXALIASWARN invocation on non-glibc
9419         systems.
9421 2023-04-07  Bruno Haible  <bruno@clisp.org>
9423         unistdio/*: Fix test failures (regression 2023-01-28).
9424         * modules/unistdio/*printf (configure.ac): Bump required libunistring
9425         version number.
9427 2023-04-07  Bruno Haible  <bruno@clisp.org>
9429         trim tests: Fix link error.
9430         * modules/trim-tests (Makefile.am): Link test-trim also against libintl.
9432 2023-04-07  Bruno Haible  <bruno@clisp.org>
9434         stdio: Fix the value of _PRINTF_NAN_LEN_MAX on OpenBSD.
9435         * lib/stdio.in.h (_PRINTF_NAN_LEN_MAX): Define to 4 on OpenBSD.
9437 2023-04-07  Bruno Haible  <bruno@clisp.org>
9439         vasnwprintf-posix: Work around %La bug in glibc 2.15 and Haiku.
9440         * m4/printf.m4 (gl_SWPRINTF_DIRECTIVE_LA): New macro.
9441         * m4/vasnprintf.m4 (gl_PREREQ_VASNWPRINTF): Invoke
9442         gl_SWPRINTF_DIRECTIVE_LA and define NEED_WPRINTF_DIRECTIVE_LA
9443         accordingly.
9444         * lib/vasnprintf.c: When compiling vasnwprintf, if
9445         NEED_WPRINTF_DIRECTIVE_LA, handle the %La and %LA directives ourselves.
9446         * doc/posix-functions/swprintf.texi: Mention the %La bug.
9448 2023-04-07  Bruno Haible  <bruno@clisp.org>
9450         stdio: Fix compilation error in C++ mode on macOS.
9451         * lib/stdio.in.h (getw, putw): Repeat the declaration even if the
9452         function is already supposed to be declared.
9454 2023-04-07  Bruno Haible  <bruno@clisp.org>
9456         vasnwprintf-posix tests: Avoid test failure on mingw.
9457         * tests/test-vasnwprintf-posix.c (test_function): For mingw, change two
9458         expected test results.
9460 2023-04-06  Bruno Haible  <bruno@clisp.org>
9462         uchar: Inline functions with C linkage in C++ mode (regr. 2023-04-04).
9463         * m4/gnulib-common.m4 (gl_COMMON_BODY): Put definitions of
9464         _GL_BEGIN_C_LINKAGE, _GL_END_C_LINKAGE into config.h.
9465         * lib/uchar.in.h: Enclose all inline functions in _GL_BEGIN_C_LINKAGE /
9466         _GL_END_C_LINKAGE.
9468 2023-04-06  Bruno Haible  <bruno@clisp.org>
9470         alignalloc: Fix link error on glibc 2.15 systems.
9471         * lib/alignalloc.h (ALIGNALLOC_VIA_ALIGNED_ALLOC): Set to 0 on
9472         glibc 2.15 systems.
9474 2023-04-05  Bruno Haible  <bruno@clisp.org>
9476         doc: Add references to registered Haiku bugs.
9477         * doc/posix-functions/call_once.texi: Mention Haiku bug.
9478         * doc/posix-functions/duplocale.texi: Likewise.
9479         * doc/posix-functions/freelocale.texi: Likewise.
9480         * doc/posix-functions/getlogin_r.texi: Likewise.
9481         * doc/posix-functions/initstate.texi: Likewise.
9482         * doc/posix-functions/mbrtoc32.texi: Likewise.
9483         * doc/posix-functions/strxfrm.texi: Likewise.
9484         * doc/posix-headers/math.texi: Update.
9486 2023-04-05  Bruno Haible  <bruno@clisp.org>
9488         string-desc-quotearg tests: Avoid a test failure on Haiku.
9489         * tests/test-string-desc-quotearg.c (main): For the
9490         clocale_quoting_style, accept also the U+2018 and U+2019 characters in
9491         UTF-8 encoding.
9493 2023-04-05  Bruno Haible  <bruno@clisp.org>
9495         random_r: Fix compilation error on Haiku.
9496         * lib/stdlib.in.h: For random_r, include <stdint.h> always.
9497         * modules/random_r (Depends-on): Depend on 'stdint' always.
9499 2023-04-05  Bruno Haible  <bruno@clisp.org>
9501         forkpty, openpty, login_tty: Fix link errors of the tests.
9502         * m4/pty.m4 (gl_PTY_LIB): On Haiku, set PTY_LIB to '-lbsd'.
9504 2023-04-05  Bruno Haible  <bruno@clisp.org>
9506         strerrorname_np: Fix compilation error on Haiku.
9507         * lib/strerrorname_np.c (strerrorname_np): Avoid conflict between
9508         EDOOFUS and EINVAL.
9509         * tests/test-strerrorname_np.c (main): Likewise.
9511 2023-04-05  Bruno Haible  <bruno@clisp.org>
9513         uchar: Fix recent change.
9514         * lib/uchar.in.h: Include <string.h>, <wctype.h>.
9516 2023-04-05  Bruno Haible  <bruno@clisp.org>
9518         localename tests: Work around a Haiku bug.
9519         * tests/test-localename.c (freelocale): New macro.
9521 2023-04-05  Bruno Haible  <bruno@clisp.org>
9523         localename: Add support for Haiku's per-thread locales.
9524         * lib/localename.c: Include <dlfcn.h>.
9525         (gl_locale_name_thread_unsafe): Add special code for Haiku.
9527 2023-04-05  Bruno Haible  <bruno@clisp.org>
9529         uchar: Work around Haiku bug.
9530         * m4/uchar_h.m4 (gl_UCHAR_H, gl_TYPE_CHAR8_T, gl_TYPE_CHAR16_T,
9531         gl_TYPE_CHAR32_T): Before including <uchar.h>, on Haiku, first include
9532         <stdint.h>.
9533         * m4/c32rtomb.m4 (gl_FUNC_C32RTOMB): Likewise.
9534         * m4/mbrtoc32.m4 (gl_FUNC_MBRTOC32, gl_CHECK_FUNC_MBRTOC32,
9535         gl_MBRTOC32_EMPTY_INPUT, gl_MBRTOC32_C_LOCALE, gl_MBRTOC32_SANITYCHECK):
9536         Likewise.
9537         * lib/uchar.in.h: On Haiku, include <stdint.h> before the include_next.
9538         * doc/posix-headers/uchar.texi: Mention the Haiku bug.
9540 2023-04-05  Bruno Haible  <bruno@clisp.org>
9542         stdlib, btowc: Fix file lists.
9543         * modules/stdlib (Files): Add m4/codeset.m4.
9544         * modules/btowc (Files): Likewise.
9545         * modules/c-dtoastr-tests (Files): Likewise.
9546         * modules/c-ldtoastr-tests (Files): Likewise.
9547         * modules/c-snprintf-tests (Files): Likewise.
9548         * modules/c-vasprintf-tests (Files): Likewise.
9549         * modules/c-vsnprintf-tests (Files): Likewise.
9550         * modules/c-xvasprintf-tests (Files): Likewise.
9551         * modules/nl_langinfo-tests (Files): Likewise.
9553 2023-04-04  Bruno Haible  <bruno@clisp.org>
9555         duplocale: Fix compilation error on Haiku (regression 2023-01-22).
9556         * lib/locale.in.h (duplocale): If HAVE_DUPLOCALE = 0, don't declare it,
9557         even if REPLACE_DUPLOCALE = 1.
9558         * modules/duplocale (Depends-on, configure.ac): Don't compile a
9559         replacement if HAVE_DUPLOCALE = 0 and REPLACE_DUPLOCALE = 1.
9561 2023-04-04  Bruno Haible  <bruno@clisp.org>
9563         c32tob, c32is*, c32rtomb, mbrtoc32: Fix file lists.
9564         * modules/c32tob (Files): Add m4/locale-fr.m4, m4/locale-zh.m4,
9565         m4/codeset.m4.
9566         * modules/c32isalnum (Files): Likewise.
9567         * modules/c32isalpha (Files): Likewise.
9568         * modules/c32isblank (Files): Likewise.
9569         * modules/c32iscntrl (Files): Likewise.
9570         * modules/c32isdigit (Files): Likewise.
9571         * modules/c32isgraph (Files): Likewise.
9572         * modules/c32islower (Files): Likewise.
9573         * modules/c32isprint (Files): Likewise.
9574         * modules/c32ispunct (Files): Likewise.
9575         * modules/c32isspace (Files): Likewise.
9576         * modules/c32isupper (Files): Likewise.
9577         * modules/c32isxdigit (Files): Likewise.
9578         * modules/c32rtomb (Files): Likewise.
9579         * modules/mbrtoc32 (Files): Likewise.
9581 2023-04-04  Bruno Haible  <bruno@clisp.org>
9583         stdlib: Work around MB_CUR_MAX bug on Solaris 10.
9584         * lib/stdlib.in.h (gl_MB_CUR_MAX): New function.
9585         (MB_CUR_MAX, GNULIB_defined_MB_CUR_MAX): New macros.
9586         * m4/stdlib_h.m4 (gl_STDLIB_H): Test whether MB_CUR_MAX is correct.
9587         (gl_STDLIB_H_DEFAULTS): Initialize REPLACE_MB_CUR_MAX.
9588         * modules/stdlib (Files): Add m4/locale-fr.m4.
9589         (Makefile.am): Substitute REPLACE_MB_CUR_MAX.
9590         * doc/posix-headers/stdlib.texi: Mention the Solaris 10 bug.
9592 2023-04-04  Bruno Haible  <bruno@clisp.org>
9594         *c32*: Inline most functions on glibc and musl libc.
9595         * lib/uchar.in.h: Invoke _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
9596         (btoc32): Inline if _GL_WCHAR_T_IS_UCS4.
9597         (c32isalnum, c32isalpha, c32isblank, c32iscntrl, c32isdigit, c32isgraph,
9598         c32islower, c32isprint, c32ispunct, c32isspace, c32isupper,
9599         c32isxdigit): Inline if
9600         _GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t.
9601         (c32snrtombs, c32srtombs, c32stombs, c32tob, mbsnrtoc32s, mbsrtoc32s,
9602         mbstoc32s): Inline if _GL_WCHAR_T_IS_UCS4.
9603         * lib/btoc32.c: Define compilation unit marker.
9604         (btoc32): Conditionally mark as _GL_EXTERN_INLINE.
9605         * lib/c32isalnum.c: Define compilation unit marker.
9606         * lib/c32isalpha.c: Likewise.
9607         * lib/c32isblank.c: Likewise.
9608         * lib/c32iscntrl.c: Likewise.
9609         * lib/c32isdigit.c: Likewise.
9610         * lib/c32isgraph.c: Likewise.
9611         * lib/c32islower.c: Likewise.
9612         * lib/c32isprint.c: Likewise.
9613         * lib/c32ispunct.c: Likewise.
9614         * lib/c32isspace.c: Likewise.
9615         * lib/c32isupper.c: Likewise.
9616         * lib/c32isxdigit.c: Likewise.
9617         * lib/c32is-impl.h (FUNC): Conditionally mark as _GL_EXTERN_INLINE.
9618         * lib/c32snrtombs.c: Define compilation unit marker.
9619         (c32snrtombs): Conditionally mark as _GL_EXTERN_INLINE.
9620         * lib/c32srtombs.c: Define compilation unit marker.
9621         (c32srtombs): Conditionally mark as _GL_EXTERN_INLINE.
9622         * lib/c32stombs.c: Define compilation unit marker.
9623         (c32stombs): Conditionally mark as _GL_EXTERN_INLINE.
9624         * lib/c32tob.c: Define compilation unit marker.
9625         (c32tob): Conditionally mark as _GL_EXTERN_INLINE.
9626         * lib/mbsnrtoc32s.c: Define compilation unit marker.
9627         (mbsnrtoc32s): Conditionally mark as _GL_EXTERN_INLINE.
9628         * lib/mbsrtoc32s.c: Define compilation unit marker.
9629         (mbsrtoc32s): Conditionally mark as _GL_EXTERN_INLINE.
9630         * lib/mbstoc32s.c: Define compilation unit marker.
9631         (mbstoc32s): Conditionally mark as _GL_EXTERN_INLINE.
9632         * modules/uchar (Depends-on): Add extern-inline.
9634 2023-04-04  Pádraig Brady  <P@draigBrady.com>
9636         backupfile: fix bug when renaming from subdirectory
9637         * lib/backupfile.c (backup_internal): Ensure we use the
9638         appropriate offset if operating on a subdirectory,
9639         i.e., on an updated sdir.
9640         Fixes https://bugs.gnu.org/62607
9642 2023-04-04  Bruno Haible  <bruno@clisp.org>
9644         *c32*: Optimize on musl libc like on glibc.
9645         * lib/uchar.in.h (_GL_WCHAR_T_IS_UCS4): New macro.
9646         * lib/btoc32.c (btoc32): Test _GL_WCHAR_T_IS_UCS4 instead of __GLIBC__.
9647         * lib/mbsrtoc32s.c: Likewise.
9648         * lib/mbsnrtoc32s.c: Likewise.
9649         * lib/c32tob.c (c32tob): Likewise.
9650         * lib/c32srtombs.c: Likewise.
9651         * lib/c32snrtombs.c: Likewise.
9652         * lib/c32is-impl.h (FUNC): Likewise.
9654 2023-04-04  Bruno Haible  <bruno@clisp.org>
9656         uchar: Rename _GL_LARGE_CHAR32_T to _GL_SMALL_WCHAR_T.
9657         * lib/uchar.in.h (_GL_SMALL_WCHAR_T): Renamed from _GL_LARGE_CHAR32_T.
9658         * lib/mbrtoc32.c: Update.
9659         * lib/mbsrtoc32s.c: Update.
9660         * lib/mbsnrtoc32s.c: Update.
9661         * lib/c32tob.c: Update.
9662         * lib/c32rtomb.c: Update.
9663         * lib/c32srtombs.c: Update.
9664         * lib/c32snrtombs.c: Update.
9665         * lib/c32is-impl.h: Update.
9666         * tests/test-uchar.c: Update.
9668 2023-04-04  Bruno Haible  <bruno@clisp.org>
9670         c32rtomb: Fix an autoconf test.
9671         * m4/c32rtomb.m4 (gl_FUNC_C32RTOMB): In a test program, include
9672         <stddef.h>, for NULL.
9674 2023-04-03  Bruno Haible  <bruno@clisp.org>
9676         tests: Set executable bit on more tests.
9677         * tests/test-c-dtoastr.sh: Make executable.
9678         * tests/test-c-ldtoastr.sh: Likewise.
9679         * tests/test-immutable.sh: Likewise.
9680         * tests/test-vasnwprintf-posix2.sh: Likewise.
9682 2023-04-03  Jim Meyering  <meyering@fb.com>
9684         tests: set executable bit in test-trim[1-3].sh
9685         This avoids a test failure for each new file.
9686         * tests/test-trim1.sh: Make this file executable.
9687         * tests/test-trim2.sh: Likewise.
9688         * tests/test-trim3.sh: Likewise.
9690 2023-04-03  Bruno Haible  <bruno@clisp.org>
9692         Use the 'extern-inline' module explicitly where needed.
9693         I found the list of affected modules through this command:
9694           for m in $(for f in `grep -Fl _GL_INLINE_HEADER_BEGIN lib/*.h | sort`
9695                      do ./gnulib-tool --find $f; done)
9696           do grep '^extern-inline' modules/$m > /dev/null || echo $m
9697           done
9698         * modules/fdutimensat (Depends-on): Add extern-inline.
9699         * modules/file-has-acl (Depends-on): Likewise.
9700         * modules/hamt (Depends-on): Likewise.
9701         * modules/relocatable-prog-wrapper (Depends-on): Likewise.
9702         * modules/safe-alloc (Depends-on): Likewise.
9703         * modules/string-desc (Depends-on): Likewise.
9704         * modules/string-desc-quotearg (Depends-on): Likewise.
9705         * modules/xstring-desc (Depends-on): Likewise.
9706         * modules/xvasprintf (Depends-on): Likewise.
9708 2023-04-03  Bruno Haible  <bruno@clisp.org>
9710         vasnprintf-posix: Fix harmless mistake (regression 2023-03-24).
9711         Found by Coverity.
9712         * lib/vasnprintf.c (MAX_ROOM_NEEDED): Insert 'break;' statement.
9714 2023-04-03  Bruno Haible  <bruno@clisp.org>
9716         mbstoc32s tests: Check behaviour in the C locale.
9717         * tests/test-mbstoc32s.c (main): Test behaviour in the C locale. Based
9718         on tests/test-mbstowcs.c.
9719         * tests/test-mbstoc32s-5.sh: New file, based on tests/test-mbstowcs5.sh.
9720         * modules/mbstoc32s-tests (Files): Add it.
9721         (Depends-on): Add btoc32.
9722         (Makefile.am): Run test-mbstoc32s-5.sh.
9724 2023-04-03  Bruno Haible  <bruno@clisp.org>
9726         mbsnrtoc32s tests: Check behaviour in the C locale.
9727         * tests/test-mbsnrtoc32s.c (main): Test behaviour in the C locale. Based
9728         on tests/test-mbsnrtowcs.c.
9729         * tests/test-mbsnrtoc32s-5.sh: New file, based on
9730         tests/test-mbsrtowcs5.sh.
9731         * modules/mbsnrtoc32s-tests (Files): Add it.
9732         (Depends-on): Add btoc32.
9733         (Makefile.am): Run test-mbsnrtoc32s-5.sh.
9735 2023-04-03  Bruno Haible  <bruno@clisp.org>
9737         mbsrtoc32s tests: Check behaviour in the C locale.
9738         * tests/test-mbsrtoc32s.c (main): Test behaviour in the C locale. Based
9739         on tests/test-mbsrtowcs.c.
9740         * tests/test-mbsrtoc32s-5.sh: New file, based on
9741         tests/test-mbsrtowcs5.sh.
9742         * modules/mbsrtoc32s-tests (Files): Add it.
9743         (Depends-on): Add btoc32.
9744         (Makefile.am): Run test-mbsrtoc32s-5.sh.
9746 2023-04-03  Bruno Haible  <bruno@clisp.org>
9748         btoc32 tests: Check behaviour in the C locale.
9749         * tests/test-btoc32.c (main): Test behaviour in the C locale. Based on
9750         tests/test-btowc.c.
9751         * tests/test-btoc32-3.sh: New file, based on tests/test-btowc3.sh.
9752         * modules/btoc32-tests (Files): Add it.
9753         (Makefile.am): Test it.
9755 2023-04-03  Bruno Haible  <bruno@clisp.org>
9757         mbrtoc32 tests: Prefer *c32* functions.
9758         * tests/test-mbrtoc32.c (main): Use btoc32 instead of btowc.
9759         * modules/mbrtoc32-tests (Depends-on): Add btoc32.
9761 2023-04-03  Bruno Haible  <bruno@clisp.org>
9763         mbrtoc32 tests: Add comment.
9764         * m4/mbrtowc.m4 (gl_MBRTOWC_C_LOCALE): Add comment.
9765         * m4/mbrtoc32.m4 (gl_MBRTOC32_C_LOCALE): Add comment.
9766         * tests/test-mbrtoc32.c: Add comment.
9767         * tests/test-mbrtoc32-5.sh: Use symmetric coding style.
9768         * doc/posix-functions/mbrtoc32.texi: Update.
9770 2023-04-02  Bruno Haible  <bruno@clisp.org>
9772         trim: Fix trim_trailing result in multibyte locales.
9773         * lib/trim.c (trim2): Simplify algorithm for trim_trailing in multibyte
9774         locales, to use 2 instead of 3 states.
9775         (IF_LINT): Remove macro.
9777         trim: Add tests.
9778         * tests/test-trim.c: New file.
9779         * tests/test-trim1.sh: New file.
9780         * tests/test-trim2.sh: New file.
9781         * tests/test-trim3.sh: New file.
9782         * modules/trim-tests: New file.
9784 2023-04-02  Bruno Haible  <bruno@clisp.org>
9786         unistr/u8-strstr: Simplify code.
9787         * lib/unistr/u8-strstr.c: Inline the contents of lib/unistr/u-strstr.h.
9788         * lib/unistr/u-strstr.h: Remove file.
9789         * modules/unistr/u8-strstr (Files): Remove it.
9791         unistr/u{16,32}-strstr: Use two-way algorithm (no memory allocation).
9792         * lib/wcs-two-way.h: Use UNIT instead of wchar_t. Don't undefine
9793         RETURN_TYPE.
9794         * lib/wcsstr-impl.h: Move the non-linear implementation away. Use UNIT
9795         instead of wchar_t, RETURN_TYPE instead of 'wchar_t *', FUNC instead of
9796         wcsstr.
9797         (AVAILABLE): Use MEMCHR0 instead of wmemchr.
9798         (FUNC): Use STRCHR instead of wcschr.
9799         * lib/wcsstr.c: Moved the non-linear implementation to here.
9800         (FUNC, UNIT, RETURN_TYPE, MEMCHR0, STRCHR): New macros.
9801         * lib/unistr/u16-strstr.c: Don't include malloca.h, str-kmp.h,
9802         u-strstr.h. Instead, include wcsstr-impl.h.
9803         * lib/unistr/u32-strstr.c: Likewise.
9804         * modules/unistr/u16-strstr (Files): Remove u-strstr.h, str-kmp.h. Add
9805         wcsstr-impl.h, wcs-two-way.h.
9806         (Depends-on): Remove u16-strmbtouc, u16-strlen, u16-strnlen, malloca.
9807         Add u16-chr, u16-cmp.
9808         * modules/unistr/u32-strstr (Files): Remove u-strstr.h, str-kmp.h. Add
9809         wcsstr-impl.h, wcs-two-way.h.
9810         (Depends-on): Remove u32-strlen, u32-strnlen, malloca. Add u32-chr,
9811         u32-cmp.
9813 2023-04-02  Bruno Haible  <bruno@clisp.org>
9815         unistr/u*strstr tests: Add more tests.
9816         * tests/unistr/test-u-strstr.h (test_u_strstr): Add the two latest tests
9817         from tests/test-strstr.c.
9818         * tests/unistr/test-u8-strstr.c (U_SET): New macro.
9819         * tests/unistr/test-u16-strstr.c (U_SET): New macro.
9820         * tests/unistr/test-u32-strstr.c (U_SET): New macro.
9821         * modules/unistr/u8-strstr-tests (Depends-on): Add unistr/u8-set.
9822         * modules/unistr/u16-strstr-tests (Depends-on): Add unistr/u16-set.
9823         * modules/unistr/u32-strstr-tests (Depends-on): Add unistr/u32-set.
9825 2023-04-01  Bruno Haible  <bruno@clisp.org>
9827         vasnwprintf-posix: Fix behaviour in the C locale.
9828         * lib/vasnprintf.c (VASNPRINTF): If NEED_WPRINTF_DIRECTIVE_C is set,
9829         implement the 'c' directive here.
9830         * m4/vasnprintf.m4 (gl_PREREQ_VASNWPRINTF): Invoke gl_MBRTOWC_C_LOCALE.
9831         If mbrtowc is buggy in the C locale, define NEED_WPRINTF_DIRECTIVE_C.
9832         * modules/vasnwprintf (Files): Add m4/mbrtowc.m4.
9833         * tests/test-vasnwprintf-posix.c (test_function): Add tests of %s and %c
9834         in the C locale.
9835         * doc/posix-functions/fwprintf.texi: Mention the C locale behaviour bug.
9836         * doc/posix-functions/swprintf.texi: Likewise.
9837         * doc/posix-functions/vfwprintf.texi: Likewise.
9838         * doc/posix-functions/vswprintf.texi: Likewise.
9839         * doc/posix-functions/vwprintf.texi: Likewise.
9840         * doc/posix-functions/wprintf.texi: Likewise.
9842 2023-04-01  Bruno Haible  <bruno@clisp.org>
9844         vasnprintf-posix: Fix crash in narrow %lc directive (regr. 2023-03-21).
9845         * lib/vasnprintf.c (VASNPRINTF): Negative results of local_wcrtomb can
9846         now occur; handle them.
9847         * tests/test-vasnprintf-posix.c (test_function): Test %lc directive with
9848         a wint_t argument that is not a valid wide character.
9849         * tests/test-snprintf-posix.h (test_function): Likewise.
9850         * tests/test-sprintf-posix.h (test_function): Likewise.
9851         * tests/test-vasnwprintf-posix.c (test_function): Likewise.
9852         * tests/test-vasprintf-posix.c (test_function): Likewise.
9854 2023-04-01  Bruno Haible  <bruno@clisp.org>
9856         stddef: Fix __need_wint_t handling in case of two stddef.h overrides.
9857         * lib/stddef.in.h: Replace _GL_STDDEF_WINT_T with a symbol that depends
9858         on the @GUARD_PREFIX@.
9860 2023-03-31  Bruno Haible  <bruno@clisp.org>
9862         vasnwprintf: Fix crash upon conversion failure when processing %s.
9863         * lib/vasnprintf.c (VASNPRINTF): When processing %s with !has_precision
9864         and !has_width, don't call abort() if there is a conversion failure.
9866 2023-03-30  Bruno Haible  <bruno@clisp.org>
9868         Avoid test failures on Android.
9869         * tests/test-btowc.c (main): Treat C locale like in
9870         tests/test-mbrtowc.c.
9871         * tests/test-mbsrtowcs.c (main): Likewise.
9872         * tests/test-mbsnrtowcs.c (main): Likewise.
9873         * tests/test-mbstowcs.c (main): Likewise.
9875 2023-03-30  Bruno Haible  <bruno@clisp.org>
9877         mbstowcs: Add tests.
9878         * tests/test-mbstowcs1.sh: New file, based on tests/test-mbsrtowcs1.sh.
9879         * tests/test-mbstowcs2.sh: New file, based on tests/test-mbsrtowcs2.sh.
9880         * tests/test-mbstowcs3.sh: New file, based on tests/test-mbsrtowcs3.sh.
9881         * tests/test-mbstowcs4.sh: New file, based on tests/test-mbsrtowcs4.sh.
9882         * tests/test-mbstowcs5.sh: New file, based on tests/test-mbsrtowcs5.sh.
9883         * tests/test-mbstowcs.c: New file, based on tests/test-mbsrtowcs.c.
9884         * modules/mbstowcs-tests: New file, based on modules/mbsrtowcs-tests.
9886         mbstowcs: New module.
9887         * lib/stdlib.in.h (mbstowcs): New declaration.
9888         * lib/mbstowcs.c: New file, based on lib/mbstoc32s.c.
9889         * m4/mbstowcs.m4: New file.
9890         * m4/stdlib_h.m4 (gl_STDLIB_H): Test whether mbstowcs is declared.
9891         (gl_STDLIB_H_REQUIRE_DEFAULTS): Initialize GNULIB_MBSTOWCS.
9892         (gl_STDLIB_H_DEFAULTS): Initialize REPLACE_MBSTOWCS.
9893         * modules/stdlib (Makefile.am): Substitute GNULIB_MBSTOWCS,
9894         REPLACE_MBSTOWCS.
9895         * modules/mbstowcs: New file.
9896         * tests/test-stdlib-c++.cc (mbstowcs): Check signature.
9897         * doc/posix-functions/mbstowcs.texi: Mention the C locale behaviour bug
9898         and the new module.
9900 2023-03-30  Bruno Haible  <bruno@clisp.org>
9902         mbsnrtowcs: Fix behaviour in the C locale.
9903         * m4/mbsnrtowcs.m4 (gl_FUNC_MBSNRTOWCS): Invoke gl_MBRTOWC_C_LOCALE. If
9904         mbrtowc is buggy in the C locale, override also mbsnrtowcs.
9905         * modules/mbsnrtowcs (Files): Add m4/mbrtowc.m4.
9906         * tests/test-mbsnrtowcs.c (main): Add a test of the C locale, based on
9907         tests/test-mbsrtowcs.c.
9908         * tests/test-mbsnrtowcs5.sh: New file, based on tests/test-mbrtowc5.sh.
9909         * modules/mbsnrtowcs-tests (Files): Add it.
9910         (Makefile.am): Test it.
9911         * doc/posix-functions/mbsnrtowcs.texi: Mention the C locale behaviour
9912         bug.
9914 2023-03-30  Bruno Haible  <bruno@clisp.org>
9916         mbsrtowcs: Fix behaviour in the C locale.
9917         * m4/mbsrtowcs.m4 (gl_FUNC_MBSRTOWCS): Invoke gl_MBRTOWC_C_LOCALE. If
9918         mbrtowc is buggy in the C locale, override also mbsrtowcs.
9919         * modules/mbsrtowcs (Files): Add m4/mbrtowc.m4.
9920         * tests/test-mbsrtowcs.c (main): Add a test of the C locale, based on
9921         tests/test-mbrtowc.c.
9922         * tests/test-mbsrtowcs5.sh: New file, based on tests/test-mbrtowc5.sh.
9923         * modules/mbsrtowcs-tests (Files): Add it.
9924         (Makefile.am): Test it.
9925         * doc/posix-functions/mbsrtowcs.texi: Mention the C locale behaviour
9926         bug.
9928 2023-03-30  Bruno Haible  <bruno@clisp.org>
9930         mbrlen: Add tests.
9931         * tests/test-mbrlen1.sh: New file, based on tests/test-mbrtowc1.sh.
9932         * tests/test-mbrlen2.sh: New file, based on tests/test-mbrtowc2.sh.
9933         * tests/test-mbrlen3.sh: New file, based on tests/test-mbrtowc3.sh.
9934         * tests/test-mbrlen4.sh: New file, based on tests/test-mbrtowc4.sh.
9935         * tests/test-mbrlen5.sh: New file, based on tests/test-mbrtowc5.sh.
9936         * tests/test-mbrlen.c: New file, based on tests/test-mbrtowc.c.
9937         * tests/test-mbrlen-w32-1.sh: New file, based on
9938         tests/test-mbrtowc-w32-1.sh.
9939         * tests/test-mbrlen-w32-2.sh: New file, based on
9940         tests/test-mbrtowc-w32-2.sh.
9941         * tests/test-mbrlen-w32-3.sh: New file, based on
9942         tests/test-mbrtowc-w32-3.sh.
9943         * tests/test-mbrlen-w32-4.sh: New file, based on
9944         tests/test-mbrtowc-w32-4.sh.
9945         * tests/test-mbrlen-w32-5.sh: New file, based on
9946         tests/test-mbrtowc-w32-5.sh.
9947         * tests/test-mbrlen-w32-6.sh: New file, based on
9948         tests/test-mbrtowc-w32-6.sh.
9949         * tests/test-mbrlen-w32-7.sh: New file, based on
9950         tests/test-mbrtowc-w32-7.sh.
9951         * tests/test-mbrlen-w32.c: New file, based on tests/test-mbrtowc-w32.c.
9952         * modules/mbrlen-tests: New file, based on modules/mbrtowc-tests.
9953         * doc/posix-functions/mbrlen.texi: Update.
9955 2023-03-30  Bruno Haible  <bruno@clisp.org>
9957         btowc: Fix behaviour in the C locale.
9958         * lib/btowc.c: Include <string.h>
9959         (btowc): Use mbrtowc instead of mbtowc when possible.
9960         * m4/btowc.m4 (gl_FUNC_BTOWC): Test for the mingw bug in the C locale.
9961         Invoke gl_MBRTOWC_C_LOCALE. If mbrtowc is buggy in the C locale,
9962         override also btowc.
9963         (gl_PREREQ_BTOWC): Test whether mbrtowc exists.
9964         * modules/btowc (Files): Add m4/mbrtowc.m4.
9965         (Depends-on): Add mbrtowc.
9966         * tests/test-btowc.c (main): Add a test of the C locale, based on
9967         tests/test-mbrtowc.c.
9968         * tests/test-btowc3.sh: New file, based on tests/test-mbrtowc5.sh.
9969         * modules/btowc-tests (Files): Add it.
9970         (Makefile.am): Test it.
9971         * doc/posix-functions/btowc.texi: Mention the two C locale behaviour
9972         bugs and that they are worked around.
9974 2023-03-30  Bruno Haible  <bruno@clisp.org>
9976         mbrtowc tests: Add comment.
9977         * tests/test-mbrtowc.c: Add comment.
9978         * tests/test-mbrtowc5.sh: Use symmetric coding style.
9979         * doc/posix-functions/mbrtowc.texi: Update.
9981 2023-03-30  Bruno Haible  <bruno@clisp.org>
9983         stdlib tests: Check behaviour of C locale.
9984         * tests/test-stdlib.c (main): Check MB_CUR_MAX.
9986 2023-03-30  Bruno Haible  <bruno@clisp.org>
9988         string-desc tests: Fix "make distcheck" failure.
9989         * tests/test-string-desc.sh: Run the test in a subdir.
9991 2023-03-30  Bruno Haible  <bruno@clisp.org>
9993         snprintf: Avoid autoconf warning regarding gl_PRINTF_POSITIONS.
9994         * m4/printf.m4 (gl_PRINTF_POSITIONS): Define through AC_DEFUN_ONCE.
9996 2023-03-28  Bruno Haible  <bruno@clisp.org>
9998         doc: Document string-desc and related modules.
9999         * doc/string-desc.texi: New file.
10000         * doc/gnulib.texi (Particular Modules): Include it.
10002         string-desc-quotearg: Add tests.
10003         * tests/test-string-desc-quotearg.c: New file.
10004         * modules/string-desc-quotearg-tests: New file.
10006         string-desc-quotearg: New module.
10007         * lib/string-desc-quotearg.h: New file.
10008         * lib/string-desc-quotearg.c: New file.
10009         * modules/string-desc-quotearg: New file.
10011         xstring-desc: Add tests.
10012         * tests/test-xstring-desc.c: New file.
10013         * modules/xstring-desc-tests: New file.
10015         xstring-desc: New module.
10016         * lib/xstring-desc.h: New file.
10017         * lib/xstring-desc.c: New file.
10018         * modules/xstring-desc: New file.
10020         string-desc: Add tests.
10021         * tests/test-string-desc.sh: New file.
10022         * tests/test-string-desc.c: New file.
10023         * modules/string-desc-tests: New file.
10025         string-desc: New module.
10026         * lib/string-desc.h: New file.
10027         * lib/string-desc.c: New file.
10028         * lib/string-desc-contains.c: New file.
10029         * modules/string-desc: New file.
10031 2023-03-28  Bruno Haible  <bruno@clisp.org>
10033         doc: Fix placement of memset_explicit node.
10034         * doc/posix-functions/memset_explicit.texi: Define a section, not a
10035         subsection.
10037 2023-03-28  Bruno Haible  <bruno@clisp.org>
10039         doc: Update regarding linear string search.
10040         * doc/glibc-functions/memmem.texi: Update platforms list.
10041         * doc/posix-functions/strstr.texi: Likewise.
10042         * doc/glibc-functions/strcasestr.texi: Likewise.
10044 2023-03-27  Bruno Haible  <bruno@clisp.org>
10046         ialloc: Add comments.
10047         * lib/ialloc.h (imalloc, irealloc, icalloc, ireallocarray): Add
10048         comments.
10050 2023-03-27  Paul Eggert  <eggert@cs.ucla.edu>
10052         Support FALLTHROUGH macro better in glibc+clang.
10053         * lib/fnmatch.c (FALLTHROUGH): Use __attribute__ ((__fallthrough__))
10054         also in clang >= 10.
10055         * lib/fts.c (FALLTHROUGH): Likewise.
10056         * lib/regex_internal.h (FALLTHROUGH): Likewise.
10058 2023-03-27  Bruno Haible  <bruno@clisp.org>
10060         wcsstr: Ensure worst-case linear execution time.
10061         * lib/wchar.in.h (wcsstr): Consider REPLACE_WCSSTR.
10062         * lib/wcs-two-way.h: New file, based on lib/str-two-way.h.
10063         * lib/wcsstr-impl.h: If requested, use the two-way algorithm. New code
10064         based on lib/strstr.c.
10065         * m4/wcsstr.m4 (gl_FUNC_WCSSTR_SIMPLE): Renamed from gl_FUNC_WCSSTR.
10066         (gl_FUNC_WCSSTR): New macro, based on gl_FUNC_STRSTR in m4/strstr.m4.
10067         * m4/wchar_h.m4 (gl_WCHAR_H_DEFAULTS): Initialize REPLACE_WCSSTR.
10068         * modules/wchar (Makefile.am): Substitute REPLACE_WCSSTR.
10069         * modules/wcsstr-simple: New file, based on modules/wcsstr.
10070         * modules/wcsstr (Description): Document that this module now provides
10071         an efficient implementation.
10072         (Files): Add lib/wcs-two-way.h.
10073         (Depends-on): Depend on wcsstr-simple and the dependencies of the
10074         two-way implementation.
10075         (configure.ac): Use AC_LIBOBJ instead of a conditional. Don't invoke
10076         gl_WCHAR_MODULE_INDICATOR.
10077         (Makefile.am): Don't augment lib_SOURCES.
10078         * tests/test-wcsstr.c: New file, based on tests/test-strstr.c.
10079         * modules/wcsstr-tests: New file, based on modules/strstr-tests.
10080         * doc/posix-functions/wcsstr.texi: Mention the worst-case complexity.
10081         Mention the new 'wcsstr-simple' module.
10082         * doc/posix-functions/strstr.texi: Fix typo.
10084 2023-03-27  Bruno Haible  <bruno@clisp.org>
10086         Add test case from a past musl libc bug.
10087         * tests/test-strstr.c (main): Add test of periodic needle.
10088         * tests/test-strcasestr.c (main): Likewise.
10089         * tests/test-c-strstr.c (main): Likewise.
10090         * tests/test-c-strcasestr.c (main): Likewise.
10091         * tests/test-memmem.c (main): Likewise.
10093 2023-03-27  Bruno Haible  <bruno@clisp.org>
10095         uchar: ISO C 23: Define char8_t.
10096         * lib/uchar.in.h (char8_t): New type or macro.
10097         * m4/uchar_h.m4 (gl_TYPE_CHAR8_T): New macro.
10098         (gl_UCHAR_H): Invoke it. Set CXX_HAS_CHAR8_TYPE.
10099         * modules/uchar (Makefile.am): Substitute CXX_HAS_CHAR8_TYPE,
10100         GNULIBHEADERS_OVERRIDE_CHAR8_T.
10101         * tests/test-uchar.c: Add tests for char8_t.
10103 2023-03-25  Bruno Haible  <bruno@clisp.org>
10105         stdlib: ISO C 23: Document issue with once_flag and call_once.
10106         * doc/posix-headers/stdlib.texi: Document issue and workaround.
10108 2023-03-25  Bruno Haible  <bruno@clisp.org>
10110         call_once: New module, separate from mtx.
10111         * lib/threads.in.h (call_once): Declare as part of module 'call_once',
10112         not module 'mtx'.
10113         * lib/call_once.c: New file, extracted from lib/mtx.c.
10114         * lib/mtx.c (call_once): Remove function.
10115         * m4/threads_h.m4 (gl_THREADS_H_REQUIRE_DEFAULTS): Inititalize
10116         GNULIB_CALL_ONCE.
10117         * modules/threads-h (Makefile.am): Substitute GNULIB_CALL_ONCE.
10118         * modules/call_once: New file, based on modules/mtx.
10119         * modules/threads (Depends-on): Add call_once.
10120         * tests/test-threads-c++.cc: Update accordingly.
10121         * modules/call_once-tests: New file, based on modules/mtx-tests.
10122         * modules/mtx-tests (Files): Remove tests/test-call_once.c.
10123         (Makefile.am): Don't compile test-call_once.
10124         * doc/posix-functions/call_once.texi: Document that the relevant module
10125         is now 'call_once'.
10126         * NEWS: Mention the change.
10128 2023-03-25  Bruno Haible  <bruno@clisp.org>
10130         stdio: ISO C 23: Define _PRINTF_NAN_LEN_MAX.
10131         * lib/stdio.in.h (_PRINTF_NAN_LEN_MAX): New macro.
10132         * m4/stdio_h.m4 (gl_STDIO_H): Invoke gl_MUSL_LIBC.
10133         * modules/stdio (Files): Add m4/musl.m4.
10134         * tests/test-stdio.c: Check that _PRINTF_NAN_LEN_MAX is defined.
10135         Include nan.h, macros.h.
10136         (main): Check the value of _PRINTF_NAN_LEN_MAX.
10137         * modules/stdio-tests (Files): Add tests/nan.h, tests/macros.h,
10138         m4/exponentd.m4.
10139         (configure.ac): Invoke gl_DOUBLE_EXPONENT_LOCATION.
10141 2023-03-25  Bruno Haible  <bruno@clisp.org>
10143         Make some header file tests a bit stronger.
10144         * tests/test-float.c: Include fpucw.h and macros.h only after checking
10145         the macros.
10146         * tests/test-glob-h.c: Include macros.h only after checking the types
10147         and macros.
10148         * tests/test-inttypes.c: Don't include <stddef.h>.
10149         * tests/test-math.c: Include <limits.h> and macros.h only after checking
10150         the types and macros.
10151         * tests/test-stddef.c: Include <limits.h> only after checking the types
10152         and macros.
10153         * tests/test-sys_select.c: Include signature.h only after checking the
10154         types.
10155         * tests/test-sys_socket.c: Include <errno.h> only after checking the
10156         types and macros.
10157         * tests/test-wctype-h.c: Include macros.h only after checking the types.
10159 2023-03-25  Bruno Haible  <bruno@clisp.org>
10161         is* tests: Ensure needed .m4 files are packaged.
10162         * modules/isfinite-tests (Files): Add m4/exponent*.m4.
10163         * modules/isnan-tests (Files): Likewise.
10164         * modules/isnanf-tests (Files): Add m4/exponentf.m4.
10165         * modules/isnanf-nolibm-tests (Files): Likewise.
10166         * modules/isnand-tests (Files): Add m4/exponentd.m4.
10167         * modules/isnand-nolibm-tests (Files): Likewise.
10168         * modules/isnanl-tests (Files): Add m4/exponentl.m4.
10169         * modules/isnanl-nolibm-tests (Files): Likewise.
10170         * modules/isinf-tests (Files): Reorder.
10172 2023-03-24  Bruno Haible  <bruno@clisp.org>
10174         *printf-posix: ISO C 23: Support size specifiers 'wN' and 'wfN'.
10175         * lib/printf-args.h: Include <stdint.h>.
10176         (arg_type): Add TYPE_[U]INT8_T, ..., TYPE_[U]INT_FAST64_T and
10177         TYPE_COUNT_INT8_T_POINTER, ..., TYPE_COUNT_INT_FAST64_T_POINTER.
10178         (argument): Add the union members a_[u]int8_t, ..., a_[u]int_fast64_t
10179         and a_count_int8_t_pointer, ..., a_count_int_fast64_t_pointer.
10180         * lib/printf-args.c: Include <limits.h>.
10181         (PRINTF_FETCHARGS): Handle TYPE_[U]INT8_T, ..., TYPE_[U]INT_FAST64_T and
10182         TYPE_COUNT_INT8_T_POINTER, ..., TYPE_COUNT_INT_FAST64_T_POINTER.
10183         * lib/printf-parse.c (PRINTF_PARSE): Accept only one size specifier, not
10184         a sequence of size specifiers. Accept "wN" and "wfN", where N = 8, 16,
10185         32, 64.
10186         * lib/vasnprintf.c (MAX_ROOM_NEEDED, VASNPRINTF): Handle the new TYPE_*
10187         values as well.
10188         * m4/printf.m4 (gl_PRINTF_SIZES_C23): New macro.
10189         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_IS_POSIX): Require
10190         gl_PRINTF_SIZES_C23. Test gl_cv_func_printf_sizes_c23.
10191         * m4/dprintf-posix.m4 (gl_FUNC_DPRINTF_IS_POSIX): Likewise.
10192         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_IS_POSIX): Likewise.
10193         * m4/obstack-printf-posix.m4 (gl_FUNC_OBSTACK_PRINTF_IS_POSIX):
10194         Likewise.
10195         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_IS_POSIX): Likewise.
10196         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_IS_POSIX): Likewise.
10197         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_IS_POSIX): Likewise.
10198         * m4/vdprintf-posix.m4 (gl_FUNC_VDPRINTF_IS_POSIX): Likewise.
10199         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_IS_POSIX): Likewise.
10200         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_IS_POSIX): Likewise.
10201         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_IS_POSIX): Likewise.
10202         * tests/test-vasnprintf-posix.c (test_function): Add tests for size
10203         specifiers with %d, %u, %b, %o, %x.
10204         * tests/test-snprintf-posix.h (test_function): Likewise.
10205         * tests/test-sprintf-posix.h (test_function): Likewise.
10206         * tests/test-vasnwprintf-posix.c (test_function): Likewise.
10207         * tests/test-vasprintf-posix.c (test_function): Likewise.
10208         * modules/vasnprintf (Depends-on): Add limits-h.
10209         * modules/vasnwprintf (Depends-on): Add limits-h.
10210         * modules/c-vasnprintf (Depends-on): Add limits-h, stdint.
10211         * modules/unistdio/u-printf-args (Depends-on): Add stdint, limits-h.
10212         * doc/posix-functions/dprintf.texi: Mention the ISO C 23 size
10213         specifiers.
10214         * doc/posix-functions/fprintf.texi: Likewise.
10215         * doc/posix-functions/fwprintf.texi: Likewise.
10216         * doc/posix-functions/printf.texi: Likewise.
10217         * doc/posix-functions/snprintf.texi: Likewise.
10218         * doc/posix-functions/sprintf.texi: Likewise.
10219         * doc/posix-functions/swprintf.texi: Likewise.
10220         * doc/posix-functions/vdprintf.texi: Likewise.
10221         * doc/posix-functions/vfprintf.texi: Likewise.
10222         * doc/posix-functions/vfwprintf.texi: Likewise.
10223         * doc/posix-functions/vprintf.texi: Likewise.
10224         * doc/posix-functions/vsnprintf.texi: Likewise.
10225         * doc/posix-functions/vsprintf.texi: Likewise.
10226         * doc/posix-functions/vswprintf.texi: Likewise.
10227         * doc/posix-functions/vwprintf.texi: Likewise.
10228         * doc/posix-functions/wprintf.texi: Likewise.
10230 2023-03-24  Bruno Haible  <bruno@clisp.org>
10232         xprintf-gnu: New module.
10233         * modules/xprintf-gnu: New file, based on modules/vasnprintf-gnu and
10234         modules/xprintf-posix.
10236 2023-03-24  Bruno Haible  <bruno@clisp.org>
10238         xvasprintf-gnu: New module.
10239         * modules/xvasprintf-gnu: New file, based on modules/xvasprintf-posix.
10241 2023-03-24  Bruno Haible  <bruno@clisp.org>
10243         vasnwprintf-gnu: Add tests.
10244         * tests/test-vasnwprintf-gnu.c: New file, based on
10245         tests/test-vasnwprintf-posix.c and tests/test-vasnprintf-gnu.c.
10246         * modules/vasnwprintf-gnu-tests: New file, based on
10247         modules/vasnwprintf-posix-tests.
10249         vasnwprintf-gnu: New module.
10250         * m4/vasnwprintf-posix.m4 (gl_FUNC_VASNWPRINTF_IS_POSIX): New macro.
10251         (gl_FUNC_VASNWPRINTF_POSIX): Require it. Invoke
10252         gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS.
10253         * m4/vasnwprintf-gnu.m4: New file, based on m4/vasnprintf-gnu.m4.
10254         * modules/vasnwprintf-gnu: New file, based on modules/vasnprintf-gnu.
10256 2023-03-24  Bruno Haible  <bruno@clisp.org>
10258         obstack-printf-gnu: Add tests.
10259         * modules/obstack-printf-gnu-tests: New file, based on
10260         modules/obstack-printf-posix-tests.
10262         obstack-printf-gnu: New module.
10263         * m4/obstack-printf-posix.m4 (gl_FUNC_OBSTACK_PRINTF_IS_POSIX): New
10264         macro, extracted from gl_FUNC_OBSTACK_PRINTF_POSIX.
10265         (gl_FUNC_OBSTACK_PRINTF_POSIX): Require it. Invoke
10266         gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS.
10267         * m4/obstack-printf-gnu.m4: New file, based on
10268         m4/obstack-printf-posix.m4.
10269         * modules/obstack-printf-gnu: New file, based on modules/vasnprintf-gnu.
10270         * doc/glibc-functions/obstack_printf.texi: Mention the new module.
10271         * doc/glibc-functions/obstack_vprintf.texi: Likewise.
10273 2023-03-24  Bruno Haible  <bruno@clisp.org>
10275         dprintf-gnu: Add tests.
10276         * tests/test-dprintf-gnu.sh: New file, based on
10277         tests/test-dprintf-posix.sh.
10278         * tests/test-dprintf-gnu.c: New file, based on
10279         tests/test-vasnprintf-gnu.c.
10280         * modules/dprintf-gnu-tests: New file, based on
10281         modules/dprintf-posix-tests.
10283         dprintf-gnu: New module.
10284         * m4/dprintf-posix.m4 (gl_FUNC_DPRINTF_IS_POSIX): New macro,
10285         extracted from gl_FUNC_DPRINTF_POSIX.
10286         (gl_FUNC_DPRINTF_POSIX): Require it. Invoke
10287         gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS.
10288         * m4/dprintf-gnu.m4: New file, based on m4/dprintf-posix.m4.
10289         * modules/dprintf-gnu: New file, based on modules/vasnprintf-gnu.
10290         * doc/posix-functions/dprintf.texi: Mention the new module.
10292 2023-03-24  Bruno Haible  <bruno@clisp.org>
10294         vdprintf-gnu: Add tests.
10295         * tests/test-vdprintf-gnu.sh: New file, based on
10296         tests/test-vdprintf-posix.sh.
10297         * tests/test-vdprintf-gnu.c: New file, based on
10298         tests/test-vdprintf-posix.c.
10299         * modules/vdprintf-gnu-tests: New file, based on
10300         modules/vdprintf-posix-tests.
10302         vdprintf-gnu: New module.
10303         * m4/vdprintf-posix.m4 (gl_FUNC_VDPRINTF_IS_POSIX): New macro,
10304         extracted from gl_FUNC_VDPRINTF_POSIX.
10305         (gl_FUNC_VDPRINTF_POSIX): Require it. Invoke
10306         gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS.
10307         * m4/vdprintf-gnu.m4: New file, based on m4/vdprintf-posix.m4.
10308         * modules/vdprintf-gnu: New file, based on modules/vasnprintf-gnu.
10309         * doc/posix-functions/vdprintf.texi: Mention the new module.
10311 2023-03-24  Bruno Haible  <bruno@clisp.org>
10313         printf-gnu: Add tests.
10314         * tests/test-printf-gnu.sh: New file, based on
10315         tests/test-printf-posix.sh.
10316         * tests/test-printf-gnu.c: New file, based on tests/test-printf-posix.c.
10317         * modules/printf-gnu-tests: New file, based on
10318         modules/printf-posix-tests.
10320         printf-gnu: New module.
10321         * m4/printf-posix.m4: Renamed from m4/printf-posix-rpl.m4.
10322         (gl_FUNC_PRINTF_IS_POSIX): New macro.
10323         (gl_FUNC_PRINTF_POSIX): Require it. Don't require
10324         gl_FUNC_VFPRINTF_POSIX. Invoke gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS
10325         and gl_REPLACE_VASNPRINTF.
10326         * m4/printf-gnu.m4: New file, based on m4/fprintf-posix.m4.
10327         * modules/printf-posix (Files): Update.
10328         * modules/printf-gnu: New file, based on modules/vasnprintf-gnu.
10329         * doc/posix-functions/printf.texi: Mention the new module.
10331 2023-03-24  Bruno Haible  <bruno@clisp.org>
10333         vprintf-gnu: Add tests.
10334         * tests/test-vprintf-gnu.sh: New file, based on
10335         tests/test-vprintf-posix.sh.
10336         * tests/test-vprintf-gnu.c: New file, based on
10337         tests/test-vprintf-posix.c.
10338         * tests/test-printf-gnu.h: New file, based on
10339         tests/test-vasnprintf-gnu.c.
10340         * modules/vprintf-gnu-tests: New file, based on
10341         modules/vprintf-posix-tests.
10343         vprintf-gnu: New module.
10344         * m4/vprintf-posix.m4 (gl_FUNC_VPRINTF_IS_POSIX): New macro.
10345         (gl_FUNC_VPRINTF_POSIX): Require it. Don't require
10346         gl_FUNC_VFPRINTF_POSIX. Invoke gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS
10347         and gl_REPLACE_VASNPRINTF.
10348         * m4/vprintf-gnu.m4: New file, based on m4/vfprintf-posix.m4.
10349         * modules/vprintf-gnu: New file, based on modules/vasnprintf-gnu.
10350         * doc/posix-functions/vprintf.texi: Mention the new module.
10352 2023-03-24  Bruno Haible  <bruno@clisp.org>
10354         fprintf-gnu: Add tests.
10355         * tests/test-fprintf-gnu.sh: New file, based on
10356         tests/test-fprintf-posix.sh.
10357         * tests/test-fprintf-gnu.c: New file, based on
10358         tests/test-fprintf-posix.c.
10359         * modules/fprintf-gnu-tests: New file, based on
10360         modules/fprintf-posix-tests.
10362         fprintf-gnu: New module.
10363         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_IS_POSIX): New macro,
10364         extracted from gl_FUNC_FPRINTF_POSIX.
10365         (gl_FUNC_FPRINTF_POSIX): Require it. Invoke
10366         gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS.
10367         * m4/fprintf-gnu.m4: New file, based on m4/fprintf-posix.m4.
10368         * modules/fprintf-gnu: New file, based on modules/vasnprintf-gnu.
10369         * doc/posix-functions/fprintf.texi: Mention the new module.
10371 2023-03-24  Bruno Haible  <bruno@clisp.org>
10373         vfprintf-gnu: Add tests.
10374         * tests/test-vfprintf-gnu.sh: New file, based on
10375         tests/test-vfprintf-posix.sh.
10376         * tests/test-vfprintf-gnu.c: New file, based on
10377         tests/test-vfprintf-posix.c.
10378         * tests/test-fprintf-gnu.h: New file, based on
10379         tests/test-vasnprintf-gnu.c.
10380         * tests/test-printf-gnu.output: New file, based on
10381         tests/test-vasnprintf-gnu.c.
10382         * modules/vfprintf-gnu-tests: New file, based on
10383         modules/vfprintf-posix-tests.
10385         vfprintf-gnu: New module.
10386         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_IS_POSIX): New macro,
10387         extracted from gl_FUNC_VFPRINTF_POSIX.
10388         (gl_FUNC_VFPRINTF_POSIX): Require it. Invoke
10389         gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS.
10390         * m4/vfprintf-gnu.m4: New file, based on m4/vfprintf-posix.m4.
10391         * modules/vfprintf-gnu: New file, based on modules/vasnprintf-gnu.
10392         * doc/posix-functions/vfprintf.texi: Mention the new module.
10394 2023-03-24  Bruno Haible  <bruno@clisp.org>
10396         vasprintf-gnu: Add tests.
10397         * tests/test-vasprintf-gnu.c: New file, based on
10398         tests/test-vasprintf-posix.c and tests/test-vasnprintf-gnu.c.
10399         * modules/vasprintf-gnu-tests: New file, based on
10400         modules/vasprintf-posix-tests.
10402         vasprintf-gnu: New module.
10403         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_IS_POSIX): New macro,
10404         extracted from gl_FUNC_VASPRINTF_POSIX.
10405         (gl_FUNC_VASPRINTF_POSIX): Require it. Invoke
10406         gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS.
10407         * m4/vasprintf-gnu.m4: New file, based on m4/vasprintf-posix.m4.
10408         * modules/vasprintf-gnu: New file, based on modules/vasnprintf-gnu.
10409         * doc/glibc-functions/vasprintf.texi: Mention the new module.
10410         * doc/glibc-functions/asprintf.texi: Likewise.
10412 2023-03-24  Bruno Haible  <bruno@clisp.org>
10414         sprintf-gnu: Add tests.
10415         * tests/test-sprintf-gnu.c: New file, based on
10416         tests/test-sprintf-posix.c.
10417         * modules/sprintf-gnu-tests: New file, based on
10418         modules/sprintf-posix-tests.
10420         sprintf-gnu: New module.
10421         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_IS_POSIX): New macro,
10422         extracted from gl_FUNC_SPRINTF_POSIX.
10423         (gl_FUNC_SPRINTF_POSIX): Require it. Invoke
10424         gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS.
10425         * m4/sprintf-gnu.m4: New file, based on m4/sprintf-posix.m4.
10426         * modules/sprintf-gnu: New file, based on modules/vasnprintf-gnu.
10427         * doc/posix-functions/sprintf.texi: Mention the new module.
10429 2023-03-24  Bruno Haible  <bruno@clisp.org>
10431         vsprintf-gnu: Add tests.
10432         * tests/test-vsprintf-gnu.c: New file, based on
10433         tests/test-vsprintf-posix.c.
10434         * tests/test-sprintf-gnu.h: New file, based on
10435         tests/test-vasnprintf-gnu.c.
10436         * modules/vsprintf-gnu-tests: New file, based on
10437         modules/vsprintf-posix-tests.
10439         vsprintf-gnu: New module.
10440         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_IS_POSIX): New macro,
10441         extracted from gl_FUNC_VSPRINTF_POSIX.
10442         (gl_FUNC_VSPRINTF_POSIX): Require it. Invoke
10443         gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS.
10444         * m4/vsprintf-gnu.m4: New file, based on m4/vsprintf-posix.m4.
10445         * modules/vsprintf-gnu: New file, based on modules/vasnprintf-gnu.
10446         * doc/posix-functions/vsprintf.texi: Mention the new module.
10448 2023-03-24  Bruno Haible  <bruno@clisp.org>
10450         snprintf-gnu: Add tests.
10451         * tests/test-snprintf-gnu.c: New file, based on
10452         tests/test-snprintf-posix.c.
10453         * modules/snprintf-gnu-tests: New file, based on
10454         modules/snprintf-posix-tests.
10456         snprintf-gnu: New module.
10457         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_IS_POSIX): New macro,
10458         extracted from gl_FUNC_SNPRINTF_POSIX.
10459         (gl_FUNC_SNPRINTF_POSIX): Require it. Invoke
10460         gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS.
10461         * m4/snprintf-gnu.m4: New file, based on m4/snprintf-posix.m4.
10462         * modules/snprintf-gnu: New file, based on modules/vasnprintf-gnu.
10463         * doc/posix-functions/snprintf.texi: Mention the new module.
10465 2023-03-24  Bruno Haible  <bruno@clisp.org>
10467         vsnprintf-gnu: Add tests.
10468         * tests/test-vsnprintf-gnu.c: New file, based on
10469         tests/test-vsnprintf-posix.c.
10470         * tests/test-snprintf-gnu.h: New file, based on
10471         tests/test-vasnprintf-gnu.c.
10472         * modules/vsnprintf-gnu-tests: New file, based on
10473         modules/vsnprintf-posix-tests.
10475         vsnprintf-gnu: New module.
10476         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_IS_POSIX): New macro,
10477         extracted from gl_FUNC_VSNPRINTF_POSIX.
10478         (gl_FUNC_VSNPRINTF_POSIX): Require it. Invoke
10479         gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS.
10480         * m4/vsnprintf-gnu.m4: New file, based on m4/vsnprintf-posix.m4.
10481         * modules/vsnprintf-gnu: New file, based on modules/vasnprintf-gnu.
10482         * doc/posix-functions/vsnprintf.texi: Mention the new module.
10484 2023-03-23  Bruno Haible  <bruno@clisp.org>
10486         vasnprintf-gnu: Add tests.
10487         * tests/test-vasnprintf-gnu.c: New file, based on
10488         tests/test-vasnprintf-posix.c.
10489         * modules/vasnprintf-gnu-tests: New file.
10491         vasnprintf-gnu: New module.
10492         Suggested by Eric Blake in
10493         <https://lists.gnu.org/archive/html/bug-gnulib/2023-03/msg00060.html>.
10494         * lib/printf-parse.c (PRINTF_PARSE): Recognize the 'B' conversion.
10495         * lib/printf-parse.h: Update comments.
10496         * lib/wprintf-parse.h: Likewise.
10497         * lib/vasnprintf.c (MAX_ROOM_NEEDED): Treat the 'B' conversion like 'b'.
10498         (VASNPRINTF): Implement 'B' conversion if
10499         NEED_PRINTF_DIRECTIVE_UPPERCASE_B is set. Support the 'B' conversion if
10500         requested.
10501         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_B): When cross-compiling, guess yes
10502         on glibc >= 2.35.
10503         (gl_PRINTF_DIRECTIVE_UPPERCASE_B): New macro.
10504         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS): Renamed
10505         from gl_PREREQ_VASNPRINTF_WITH_EXTRAS.
10506         (gl_PREREQ_VASNPRINTF_DIRECTIVE_UPPERCASE_B,
10507         gl_PREREQ_VASNPRINTF_WITH_GNU_EXTRAS): New macros.
10508         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_IS_POSIX): New macro,
10509         extracted from gl_FUNC_VASNPRINTF_POSIX.
10510         (gl_FUNC_VASNPRINTF_POSIX): Require it. Invoke
10511         gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS.
10512         * m4/vasnprintf-gnu.m4: New file.
10513         * modules/vasnprintf-gnu: New file.
10514         * modules/c-vasnprintf (configure.ac): Update.
10515         * modules/unistdio/u8-vasnprintf (configure.ac): Likewise.
10516         * modules/unistdio/u8-u8-vasnprintf (configure.ac): Likewise.
10517         * modules/unistdio/u16-vasnprintf (configure.ac): Likewise.
10518         * modules/unistdio/u16-u16-vasnprintf (configure.ac): Likewise.
10519         * modules/unistdio/u32-vasnprintf (configure.ac): Likewise.
10520         * modules/unistdio/u32-u32-vasnprintf (configure.ac): Likewise.
10521         * modules/unistdio/ulc-vasnprintf (configure.ac): Likewise.
10523 2023-03-23  Bruno Haible  <bruno@clisp.org>
10525         printf-posix tests: Fix compilation error (regression 2021-08-28).
10526         * modules/printf-posix-tests (Files): Add tests/qemu.h.
10528 2023-03-22  Jim Meyering  <meyering@fb.com>
10530         gnu-web-doc-update: don't use host alias, cvs.sv.gnu.org
10531         * build-aux/gnu-web-doc-update: Use hostname cvs.savannah.gnu.org,
10532         not cvs.sv.gnu.org. Using the shorter alias would elicit this:
10533           $ pkg=grep ; cvs -d $USER@cvs.sv.gnu.org:/webcvs/$pkg co $pkg
10534           Bad server host key: Invalid key length
10536 2023-03-22  Bruno Haible  <bruno@clisp.org>
10538         *printf-posix: Fix implementation of %b directive.
10539         * lib/vasnprintf.c (VASNPRINTF): In the %b directive implementation, fix
10540         the precision handling, and ignore the '0' flag when a width and a
10541         precision are both present.
10542         * tests/test-snprintf-posix.h (test_function): Add test cases for the %x
10543         directive and more test cases for the %b directive.
10544         * tests/test-sprintf-posix.h (test_function): Likewise.
10545         * tests/test-vasnprintf-posix.c (test_function): Likewise.
10546         * tests/test-vasnwprintf-posix.c (test_function): Likewise.
10547         * tests/test-vasprintf-posix.c (test_function): Likewise.
10548         * modules/vasnwprintf-posix-tests (Files): Add m4/musl.m4.
10549         (configure.ac): Invoke gl_MUSL_LIBC.
10551 2023-03-22  Bruno Haible  <bruno@clisp.org>
10553         vasnwprintf: Fix a warning: implicit declaration of function ‘wcsnlen’.
10554         * m4/vasnprintf.m4 (gl_PREREQ_VASNWPRINTF): Test also whether wcsnlen is
10555         declared.
10556         * lib/vasnprintf.c (local_wcsnlen): Together with HAVE_WCSNLEN, test
10557         also HAVE_DECL_WCSNLEN.
10559 2023-03-22  Bruno Haible  <bruno@clisp.org>
10561         vasnwprintf: Fix a "warning: unused function local_wcsnlen".
10562         * lib/vasnprintf.c: Adjust #if conditions.
10564 2023-03-22  Bruno Haible  <bruno@clisp.org>
10566         vasnwprintf: Fix test failures on FreeBSD, NetBSD, AIX, mingw.
10567         * m4/printf.m4 (gl_SWPRINTF_WORKS): New macro.
10568         * m4/vasnprintf.m4 (gl_PREREQ_VASNWPRINTF): Invoke it and define
10569         HAVE_WORKING_SWPRINTF accordingly.
10570         * lib/vasnprintf.c: Together with HAVE_SWPRINTF, test also
10571         HAVE_WORKING_SWPRINTF.
10572         (VASNPRINTF): If WIDE_CHAR_VERSION && !DCHAR_IS_TCHAR, don't pass a
10573         wchar_t[] to snprintf. Add a workaround against mingw's snwprintf
10574         function.
10575         * doc/posix-functions/swprintf.texi: Document the null wide character
10576         bug.
10578 2023-03-22  Bruno Haible  <bruno@clisp.org>
10580         vasnwprintf: Fix a "warning: unused function 'wmax_room_needed'".
10581         * lib/vasnprintf.c (MAX_ROOM_NEEDED): Adjust #if condition.
10583 2023-03-22  Bruno Haible  <bruno@clisp.org>
10585         vasnwprintf: Simplify last change.
10586         * lib/vasnprintf.c (VASNPRINTF): Remove unused variable 'len'.
10588 2023-03-22  Bruno Haible  <bruno@clisp.org>
10590         vasnwprintf tests: Fix link errors on AIX.
10591         * modules/vasnwprintf (Link): New section.
10592         * modules/vasnwprintf-posix (Link): New section.
10593         * modules/vasnwprintf-tests (Makefile.am): Link test-vasnwprintf with
10594         $(MBRTOWC_LIB).
10595         * modules/vasnwprintf-posix-tests (Makefile.am): Link
10596         test-vasnwprintf-posix, test-vasnwprintf-posix2, test-vasnwprintf-posix3
10597         with $(MBRTOWC_LIB).
10599 2023-03-22  Bruno Haible  <bruno@clisp.org>
10601         gnu-web-doc-update: Make it work for the first upload of a manual.
10602         Reported by Reuben Thomas <rrt@sc3d.org> in
10603         <https://lists.gnu.org/archive/html/bug-gnulib/2023-03/msg00066.html>.
10604         * build-aux/gnu-web-doc-update: Put the 'manual' directory under version
10605         control if it is not yet.
10607 2023-03-21  Bruno Haible  <bruno@clisp.org>
10609         unistdio/u*-vasnprintf: Fix conversion of %Id directive result.
10610         * lib/vasnprintf.c (VASNPRINTF): Don't assume that snprintf's result is
10611         entirely ASCII if the directive contain the glibc 'I' flag.
10613 2023-03-21  Bruno Haible  <bruno@clisp.org>
10615         vasnwprintf: Fix for older platforms without swprintf.
10616         * lib/vasnprintf.c (VASNPRINTF): In the %lc handling, ignore the
10617         precision. Convert the snprintf result to a wchar_t[] not by mbsrtowcs,
10618         but by a loop that does not stop at NUL characters.
10619         * tests/test-vasnwprintf-posix.c (test_function): Add more tests for the
10620         %c and %lc directives.
10621         * modules/vasnwprintf (Depends-on): Add mbrtowc. Remove mbsrtowcs.
10623 2023-03-21  Bruno Haible  <bruno@clisp.org>
10625         *printf-posix: Work around bug with %lc of 0 on many platforms.
10626         * lib/vasnprintf.c (local_wctomb): Define also for
10627         NEED_PRINTF_DIRECTIVE_LC.
10628         (VASNPRINTF): Implement %lc handling ourselves if
10629         NEED_PRINTF_DIRECTIVE_LC.
10630         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_LC): New macro.
10631         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_LC): New macro.
10632         (gl_PREREQ_VASNPRINTF_WITH_EXTRAS): Invoke it.
10633         * m4/dprintf-posix.m4 (gl_FUNC_DPRINTF_POSIX): Require
10634         gl_PRINTF_DIRECTIVE_LC and test its result. Invoke
10635         gl_PREREQ_VASNPRINTF_DIRECTIVE_LC.
10636         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Likewise.
10637         * m4/obstack-printf-posix.m4 (gl_FUNC_OBSTACK_PRINTF_POSIX): Likewise.
10638         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
10639         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
10640         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
10641         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
10642         * m4/vdprintf-posix.m4 (gl_FUNC_VDPRINTF_POSIX): Likewise.
10643         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
10644         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
10645         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
10646         * tests/test-snprintf-posix.h (test_function): Add more tests for the
10647         %c and %lc directives.
10648         * tests/test-sprintf-posix.h (test_function): Likewise.
10649         * tests/test-vasnprintf-posix.c (test_function): Likewise.
10650         * tests/test-vasprintf-posix.c (test_function): Likewise.
10651         * doc/glibc-functions/asprintf.texi: Mention the %lc 0 bug.
10652         * doc/glibc-functions/obstack_printf.texi: Likewise.
10653         * doc/glibc-functions/obstack_vprintf.texi: Likewise.
10654         * doc/glibc-functions/vasprintf.texi: Likewise.
10655         * doc/posix-functions/dprintf.texi: Likewise.
10656         * doc/posix-functions/fprintf.texi: Likewise.
10657         * doc/posix-functions/printf.texi: Likewise.
10658         * doc/posix-functions/snprintf.texi: Likewise.
10659         * doc/posix-functions/sprintf.texi: Likewise.
10660         * doc/posix-functions/vdprintf.texi: Likewise.
10661         * doc/posix-functions/vfprintf.texi: Likewise.
10662         * doc/posix-functions/vprintf.texi: Likewise.
10663         * doc/posix-functions/vsnprintf.texi: Likewise.
10664         * doc/posix-functions/vsprintf.texi: Likewise.
10666 2023-03-21  Ar Rakin  <rakinar2@onesoftnet.eu.org>  (tiny change)
10668         gnupload: correct SFTP connection URL
10669         Approved by Sergey Poznyakoff in
10670         <https://lists.gnu.org/archive/html/bug-gnulib/2023-03/msg00078.html>.
10671         * build-aux/gnupload: fix gnu.org.ua SFTP connection URL:
10672         puszcza.gnu.org.ua -> download.gnu.org.ua
10674 2023-03-20  Bruno Haible  <bruno@clisp.org>
10676         memrchr tests: Avoid GCC warning.
10677         * tests/test-memrchr.c: Don't use '#pragma GCC diagnostic' for GCC
10678         versions older than 4.7.
10680 2023-03-20  Bruno Haible  <bruno@clisp.org>
10682         unistdio: Simplify code.
10683         * lib/unistdio/u8-vasnprintf.c (DCHAR_T_IS_UINT8_T): Remove unused
10684         macro.
10685         * lib/unistdio/u8-u8-vasnprintf.c: Likewise.
10686         * lib/unistdio/u16-vasnprintf.c (DCHAR_T_IS_UINT16_T): Remove unused
10687         macro.
10688         * lib/unistdio/u16-u32-vasnprintf.c: Likewise.
10689         * lib/unistdio/u32-vasnprintf.c (DCHAR_T_IS_UINT32_T): Remove unused
10690         macro.
10691         * lib/unistdio/u32-u32-vasnprintf.c: Likewise.
10693 2023-03-20  Bruno Haible  <bruno@clisp.org>
10695         vasnwprintf: Port to older platforms without swprintf.
10696         * m4/vasnprintf.m4 (gl_PREREQ_VASNWPRINTF): Test for swprintf.
10697         * lib/vasnprintf.c (TCHAR_T, DCHAR_IS_TCHAR, SNPRINTF): When
10698         WIDE_CHAR_VERSION and swprintf does not exist, use TCHAR_T = char,
10699         SNPRINTF = snprintf, and !DCHAR_IS_TCHAR.
10700         (VASNPRINTF): In this case, implement %ls and %lc directly. Adjust a
10701         couple of #if conditions. For the conversion from TCHAR_T[] to
10702         DCHAR_T[], use mbsrtowcs.
10703         * modules/vasnwprintf (Depends-on): Add mbsrtowcs.
10705 2023-03-20  Bruno Haible  <bruno@clisp.org>
10707         wmemset: Relicense under LGPLv2+.
10708         * modules/wmemset (License): Change to LGPLv2+.
10709         * lib/wmemset.c: Update license notice.
10710         * lib/wmemset-impl.h: Likewise.
10712 2023-03-20  Bruno Haible  <bruno@clisp.org>
10714         wmemcpy: Relicense under LGPLv2+.
10715         * modules/wmemcpy (License): Change to LGPLv2+.
10716         * lib/wmemcpy.c: Update license notice.
10717         * lib/wmemcpy-impl.h: Likewise.
10719 2023-03-19  Bruno Haible  <bruno@clisp.org>
10721         vasnwprintf: Fix test failures on musl libc.
10722         * m4/vasnprintf.m4 (gl_PREREQ_VASNWPRINTF): Invoke gl_MUSL_LIBC.
10723         * lib/vasnprintf.c (VASNPRINTF): On musl libc, when WIDE_CHAR_VERSION,
10724         - force pad_ourselves to be 1,
10725         - don't use %n.
10726         Fix zero-padding when the result starts with a prefix "0x" or "0b".
10727         * modules/vasnwprintf (Files): Add musl.m4.
10728         * doc/posix-functions/swprintf.texi: Mention two musl libc bugs.
10730 2023-03-19  Bruno Haible  <bruno@clisp.org>
10732         vasnwprintf: Fix module dependencies.
10733         * modules/vasnwprintf (Depends-on): Add wmemcpy, wmemset.
10734         * modules/vasnwprintf-tests (Depends-on): Add wmemcmp.
10735         * modules/vasnwprintf-posix-tests (Depends-on): Likewise.
10737 2023-03-19  Paul Eggert  <eggert@cs.ucla.edu>
10739         test-pselect, test-select: use different ports
10740         I have observed rare and hard-to-reproduce problems with the GNU
10741         grep release candidate with ‘make -j5 check’ on Fedora 37 x86-64.
10742         One possibility is that test-pselect and test-select interfere
10743         with each other somehow when run simultaneously, as they use the
10744         same port.  Work around this possibility by using different ports
10745         from each other, and from test-poll (which also uses 12345).
10746         Of course it’d be better if all these tests used system-assigned
10747         ports, but I assume that’d take more work.
10748         * tests/test-pselect.c, tests/test-select.c (TEST_PORT): New macro.
10749         * tests/test-select.h (TEST_PORT): Remove.
10751 2023-03-19  Bruno Haible  <bruno@clisp.org>
10753         Update MODULES.html.sh.
10754         * MODULES.html.sh: Move stack, wmempcpy, bison to different sections.
10755         Fix a HTML layout problem.
10757 2023-03-18  Paul Eggert  <eggert@cs.ucla.edu>
10759         dfa: pacify Oracle Solaris Studio 12.6
10760         Without this patch, the compiler complains “statement not reached”.
10761         * lib/dfa.c (lex): Refactor to omit unreachable statement.
10763         Update MODULES.html.sh
10764         * MODULES.html.sh: Add some recently-added modules.
10765         This is by no means a complete update.  I needed to point
10766         to something about ‘time’ so I added ‘time’, and then added
10767         more modules until I ran out of, errr, time.
10768         Assuming MODULES.html.sh is still useful,
10769         at some point a more-complete update should be done.
10771 2023-03-17  Bruno Haible  <bruno@clisp.org>
10773         *printf-posix: ISO C 23: Add %b directive for binary output of integers.
10774         * lib/printf-parse.c (PRINTF_PARSE): Recognize the 'b' directive.
10775         * lib/printf-parse.h: Update comment.
10776         * lib/wprintf-parse.h: Likewise.
10777         * lib/vasnprintf.c (MAX_ROOM_NEEDED, VASNPRINTF): Add support for the
10778         'b' directive.
10779         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_B): New macro.
10780         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_B): New macro.
10781         (gl_PREREQ_VASNPRINTF_WITH_EXTRAS): Invoke it.
10782         * m4/vasnwprintf-posix.m4 (gl_FUNC_VASNWPRINTF_POSIX): Invoke
10783         gl_PREREQ_VASNPRINTF_DIRECTIVE_B.
10784         * m4/dprintf-posix.m4 (gl_FUNC_DPRINTF_POSIX): Require
10785         gl_PRINTF_DIRECTIVE_B and test its result. Invoke
10786         gl_PREREQ_VASNPRINTF_DIRECTIVE_B.
10787         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Likewise.
10788         * m4/obstack-printf-posix.m4 (gl_FUNC_OBSTACK_PRINTF_POSIX): Likewise.
10789         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
10790         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
10791         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
10792         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
10793         * m4/vdprintf-posix.m4 (gl_FUNC_VDPRINTF_POSIX): Likewise.
10794         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
10795         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
10796         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
10797         * tests/test-snprintf-posix.h (test_function): Add some tests of the %b
10798         directive.
10799         * tests/test-sprintf-posix.h (test_function): Likewise.
10800         * tests/test-vasnprintf-posix.c (test_function): Likewise.
10801         * tests/test-vasnwprintf-posix.c (test_function): Likewise.
10802         * tests/test-vasprintf-posix.c (test_function): Likewise.
10803         * doc/glibc-functions/asprintf.texi: Mention the 'b' directive.
10804         * doc/glibc-functions/obstack_printf.texi: Likewise.
10805         * doc/glibc-functions/obstack_vprintf.texi: Likewise.
10806         * doc/glibc-functions/vasprintf.texi: Likewise.
10807         * doc/posix-functions/dprintf.texi: Likewise.
10808         * doc/posix-functions/fprintf.texi: Likewise.
10809         * doc/posix-functions/fwprintf.texi: Likewise.
10810         * doc/posix-functions/printf.texi: Likewise.
10811         * doc/posix-functions/snprintf.texi: Likewise.
10812         * doc/posix-functions/sprintf.texi: Likewise.
10813         * doc/posix-functions/swprintf.texi: Likewise.
10814         * doc/posix-functions/vdprintf.texi: Likewise.
10815         * doc/posix-functions/vfprintf.texi: Likewise.
10816         * doc/posix-functions/vfwprintf.texi: Likewise.
10817         * doc/posix-functions/vprintf.texi: Likewise.
10818         * doc/posix-functions/vsnprintf.texi: Likewise.
10819         * doc/posix-functions/vsprintf.texi: Likewise.
10820         * doc/posix-functions/vswprintf.texi: Likewise.
10821         * doc/posix-functions/vwprintf.texi: Likewise.
10822         * doc/posix-functions/wprintf.texi: Likewise.
10824 2023-03-17  Bruno Haible  <bruno@clisp.org>
10826         vasnprintf, vasnwprintf: Simplify code.
10827         * lib/vasnprintf.c (MAX_ROOM_NEEDED): Remove dead code: The directives
10828         'o', 'x', 'X' always take an unsigned integer argument.
10830 2023-03-17  Bruno Haible  <bruno@clisp.org>
10832         vasnwprintf: Fix test failure on OpenBSD.
10833         * lib/vasnprintf.c (VASNPRINTF): Don't use the %n directive on OpenBSD.
10835 2023-03-17  Bruno Haible  <bruno@clisp.org>
10837         time: Fix test failure on AIX 7.2.
10838         * m4/time.m4 (gl_FUNC_TIME): Guess that it does not work on AIX.
10839         * doc/posix-functions/time.texi: Mention the bug on AIX.
10841         time: Fix test failure on native Windows.
10842         * m4/time.m4 (gl_FUNC_TIME): Guess that it does not work on native
10843         Windows.
10844         * modules/time (Depends-on): Add gettimeofday.
10845         * doc/posix-functions/time.texi: Mention the bug on Windows.
10847 2023-03-17  Bruno Haible  <bruno@clisp.org>
10849         vasnprintf, vasnwprintf: Include all necessary workarounds in libintl.
10850         * lib/vasnprintf.c: Remove IN_LIBINTL special-casing.
10852 2023-03-17  Bruno Haible  <bruno@clisp.org>
10854         vasnwprintf-posix: Add tests.
10855         * tests/test-vasnwprintf-posix.c: New file, based on
10856         tests/test-vasnprintf-posix.c.
10857         * tests/test-vasnwprintf-posix2.sh: New file, based on
10858         tests/test-vasnprintf-posix2.sh.
10859         * tests/test-vasnwprintf-posix2.c: New file, based on
10860         tests/test-vasnprintf-posix2.c.
10861         * tests/test-vasnwprintf-posix3.c: New file, based on
10862         tests/test-vasnprintf-posix3.c.
10863         * modules/vasnwprintf-posix-tests: New file, based on
10864         modules/vasnprintf-posix-tests.
10866         vasnwprintf-posix: New module.
10867         * m4/vasnwprintf-posix.m4: New file.
10868         * modules/vasnwprintf-posix: New file, based on
10869         modules/vasnprintf-posix.
10871 2023-03-17  Bruno Haible  <bruno@clisp.org>
10873         vasnprintf-posix: Relicense under LGPLv2+.
10874         * modules/vasnprintf-posix (License): Change to LGPLv2+.
10876 2023-03-17  Bruno Haible  <bruno@clisp.org>
10878         vasnwprintf: Add tests.
10879         * tests/test-vasnwprintf.c: New file, based on tests/test-vasnprintf.c.
10880         * modules/vasnwprintf-tests: New file, based on
10881         modules/vasnprintf-tests.
10883         vasnwprintf: New module.
10884         * lib/vasnprintf.c: Enable more code for WIDE_CHAR_VERSION, because
10885         snwprintf()/_snwprintf() (Windows) and swprintf() (Unix) don't return
10886         the needed buffer size, like snprintf does.
10887         * lib/wprintf-parse.h: New file, based on lib/printf-parse.h and
10888         gettext/gettext-runtime/intl/wprintf-parse.h.
10889         * lib/wprintf-parse.c: New file, based on
10890         gettext/gettext-runtime/intl/printf.c.
10891         * lib/vasnwprintf.h: New file, based on lib/vasnprintf.h and
10892         gettext/gettext-runtime/intl/vasnwprintf.h.
10893         * lib/vasnwprintf.c: New file.
10894         * lib/asnwprintf.c: New file, based on lib/asnprintf.c.
10895         * m4/vasnprintf.m4 (gl_FUNC_VASNWPRINTF): New macro.
10896         (gl_PREREQ_VASNXPRINTF): New macro, extracted from gl_PREREQ_VASNPRINTF.
10897         (gl_PREREQ_VASNPRINTF): Invoke it. Don't test for wcsnlen and mbrtowc.
10898         (gl_PREREQ_VASNWPRINTF): New macro.
10899         * modules/vasnwprintf: New file, based on modules/vasnprintf.
10901 2023-03-16  Bruno Haible  <bruno@clisp.org>
10903         strtol, strtoll, strtoul, strtoull: Make ISO C 23 compliant.
10904         * lib/strtol.c (INTERNAL (strtol)): Treat 'b' and base 2 like 'x' and
10905         base 16. Based on glibc commit 64924422a99690d147a166b4de3103f3bf3eaf6c
10906         by Joseph Myers.
10907         * m4/strtol.m4 (gl_FUNC_STRTOL): Test also whether parsing binary
10908         integers works. Update cross-compilation guesses.
10909         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Likewise.
10910         * m4/strtoul.m4 (gl_FUNC_STRTOUL): Likewise.
10911         * m4/strtoull.m4 (gl_FUNC_STRTOULL): Likewise.
10912         * tests/test-strtol.c (main): Add tests of parsing binary integers.
10913         * tests/test-strtoll.c (main): Likewise.
10914         * tests/test-strtoul.c (main): Likewise.
10915         * tests/test-strtoull.c (main): Likewise.
10916         * doc/posix-functions/strtol.texi: Mention the problem with parsing
10917         binary integers.
10918         * doc/posix-functions/strtoll.texi: Likewise.
10919         * doc/posix-functions/strtoul.texi: Likewise.
10920         * doc/posix-functions/strtoull.texi: Likewise.
10922 2023-03-16  Bruno Haible  <bruno@clisp.org>
10924         timegm: Document under ISO C and POSIX substitutes.
10925         * doc/posix-functions/timegm.texi: Renamed from doc/glibc-functions/timegm.texi.
10926         * doc/gnulib.texi (Function Substitutes): Include timegm.texi here...
10927         (Glibc time.h): ... not here.
10929 2023-03-16  Bruno Haible  <bruno@clisp.org>
10931         stddef: Fix a compilation error on AIX 7.2 with xlclang.
10932         * lib/stddef.in.h (__CLANG_MAX_ALIGN_T_DEFINED): Define whenever we
10933         define GNULIB_defined_max_align_t.
10935 2023-03-16  Bruno Haible  <bruno@clisp.org>
10937         stddef: Define 'unreachable', for ISO C 23 compliance.
10938         * lib/verify.h (_GL_HAS_BUILTIN_UNREACHABLE): Don't define if already
10939         defined.
10940         * lib/stddef.in.h (_GL_HAS_BUILTIN_UNREACHABLE, unreachable): New
10941         macros.
10942         (abort): Declare if needed for unreachable.
10943         * m4/stddef_h.m4 (gl_STDDEF_H): Test for unreachable.
10944         * tests/test-stddef.c (test_unreachable_optimization,
10945         test_unreachable_noreturn): New functions, based on tests/test-verify.c.
10946         * doc/posix-headers/stddef.texi: Mention unreachable.
10948 2023-03-10  Paul Eggert  <eggert@cs.ucla.edu>
10950         posixtm: work around Glibc time issue
10951         * modules/posixtm (Depends-on): Add time.
10953 2023-03-09  Jim Meyering  <meyering@fb.com>
10955         bootstrap: correct last change
10956         * top/bootstrap-funclib.sh (autogen) [AUTORECONFFLAGS]: Do always
10957         apply the --no-recursive option.
10958         * build-aux/bootstrap: Regenerate.
10960         bootstrap: remove code that accommodated RHEL5's old autoreconf
10961         * top/bootstrap-funclib.sh (autogen) [AUTORECONFFLAGS]: RHEL5 has not
10962         been supported since 2017. It included (and this code worked around)
10963         a version of autoreconf that was so old it did not accept the
10964         --no-recursive option. Drop that workaround.
10965         * build-aux/bootstrap: Regenerate.
10967 2023-03-08  Bruno Haible  <bruno@clisp.org>
10969         gettimeofday, timespec_get tests: Avoid test failure on glibc/Linux.
10970         * modules/gettimeofday-tests (Depends-on): Add 'time'.
10971         * modules/timespec_get-tests (Depends-on): Likewise.
10972         * tests/test-gettimeofday.c (test_consistency): Update comment.
10973         * tests/test-timespec_get.c (main): Likewise.
10975         time: Add tests.
10976         * tests/test-time.c: New file.
10977         * modules/time-tests: New file.
10979         time: New module.
10980         * lib/time.in.h (time): New declaration.
10981         * lib/time.c: New file.
10982         * m4/time_h.m4 (gl_TIME_H_REQUIRE_DEFAULTS): Initialize GNULIB_TIME.
10983         (gl_TIME_H_DEFAULTS): Initialize REPLACE_TIME.
10984         * m4/time.m4: New file.
10985         * modules/time-h (Makefile.am): Substitute GNULIB_TIME, REPLACE_TIME.
10986         * modules/time: New file.
10987         * tests/test-time-h-c++.cc: Check the signature of
10988         GNULIB_NAMESPACE::time.
10989         * doc/posix-functions/time.texi: Mention the glibc problem and the
10990         'time' module.
10992 2023-03-08  Bruno Haible  <bruno@clisp.org>
10994         time-h: Renamed from time.
10995         * modules/time-h: Renamed from modules/time.
10996         * tests/test-time-h.c: Renamed from tests/test-time.c.
10997         * modules/time-h-tests: Renamed from modules/time-tests. Update.
10998         * tests/test-time-h-c++.cc: Renamed from tests/test-time-c++.cc.
10999         * tests/test-time-h-c++2.cc: Renamed from tests/test-time-c++2.cc.
11000         * modules/time-h-c++-tests: Renamed from modules/time-c++-tests. Update.
11001         * modules/cond (Depends-on): Update.
11002         * modules/ctime (Depends-on): Likewise.
11003         * modules/localtime (Depends-on): Likewise.
11004         * modules/mktime (Depends-on): Likewise.
11005         * modules/nanosleep (Depends-on): Likewise.
11006         * modules/parse-datetime (Depends-on): Likewise.
11007         * modules/posixcheck (Depends-on): Likewise.
11008         * modules/pthread-h (Depends-on): Likewise.
11009         * modules/stat-time (Depends-on): Likewise.
11010         * modules/stat-time-tests (Depends-on): Likewise.
11011         * modules/strftime-fixes (Depends-on): Likewise.
11012         * modules/strptime (Depends-on): Likewise.
11013         * modules/sys_stat (Depends-on): Likewise.
11014         * modules/tempname (Depends-on): Likewise.
11015         * modules/threads-h (Depends-on): Likewise.
11016         * modules/time_r (Depends-on): Likewise.
11017         * modules/time_rz (Depends-on): Likewise.
11018         * modules/timegm (Depends-on): Likewise.
11019         * modules/timespec (Depends-on): Likewise.
11020         * modules/timespec_get (Depends-on): Likewise.
11021         * modules/timespec_getres (Depends-on): Likewise.
11022         * modules/tzset (Depends-on): Likewise.
11023         * modules/usleep-tests (Depends-on): Likewise.
11024         * modules/utime (Depends-on): Likewise.
11025         * modules/utimecmp (Depends-on): Likewise.
11026         * modules/utimens (Depends-on): Likewise.
11027         * modules/windows-cond (Depends-on): Likewise.
11028         * modules/windows-timedmutex (Depends-on): Likewise.
11029         * modules/windows-timedrecmutex (Depends-on): Likewise.
11030         * modules/windows-timedrwlock (Depends-on): Likewise.
11031         * modules/xnanosleep (Depends-on): Likewise.
11032         * doc/posix-headers/time.texi: Update.
11033         * NEWS: Mention the change.
11035 2023-03-08  Bruno Haible  <bruno@clisp.org>
11037         gettimeofday tests: Enhance test.
11038         * tests/test-gettimeofday.c: Include <stdlib.h> and macros.h.
11039         (test_clobber): New function, extracted from main.
11040         (test_consistency): New function, based on tests/test-timespec_get.c.
11041         (main): Invoke both functions.
11042         * modules/gettimeofday-tests (Files): Add macros.h.
11044 2023-03-05  Paul Eggert  <eggert@cs.ucla.edu>
11046         stdio: suppress macOS 13 sprintf warnings
11047         * lib/stdio.in.h (_POSIX_C_SOURCE, _GL_DEFINED__POSIX_C_SOURCE):
11048         Suppress deprecation warnings for sprintf and vsprintf
11049         that were introduced in macOS 13.  These are not useful
11050         for Gnulib itself, and are more likely than not to be
11051         merely an annoyance for Gnulib-using code.
11053 2023-03-05  Bruno Haible  <bruno@clisp.org>
11055         timespec_get tests: Add comment.
11056         * tests/test-timespec_get.c: Add a comment regarding a glibc bug.
11058 2023-03-02  Bruno Haible  <bruno@clisp.org>
11060         nl_langinfo tests: Avoid test failure on Solaris 11.
11061         * tests/test-nl_langinfo2.c (main): Skip French T_FMT_AMPM test on
11062         Solaris.
11064 2023-02-28  Benno Schulenberg  <bensberg@telfort.nl>  (tiny change)
11066         terminfo, termcap: Fix more spellos in a comment.
11067         * lib/tparm.c: Fix misspellings and wording in the main comment.
11069 2023-02-28  Bruno Haible  <bruno@clisp.org>
11071         perl: Allow this module to be used with 'gnulib-tool --lgpl'.
11072         Reported by Reuben Thomas <rrt@sc3d.org> in
11073         <https://lists.gnu.org/archive/html/bug-gnulib/2023-02/msg00191.html>.
11074         * modules/perl (License): Relax to 'GPLed build tool'.
11075         Approved by Jim Meyering in
11076         <https://lists.gnu.org/archive/html/bug-gnulib/2023-02/msg00198.html>.
11078 2023-02-28  Bruno Haible  <bruno@clisp.org>
11080         dfa: Tweak the last patch.
11081         Suggested by Alexei Podtelezhnikov <apodtele@gmail.com>.
11082         * lib/dfa.c (FALLTHROUGH): Assume that Apple clang, in C mode, supports
11083         __attribute__ ((__fallthrough__)) starting with version 1200.
11084         References:
11085         https://en.wikipedia.org/wiki/Xcode#Xcode_11.0_-_14.x_(since_SwiftUI_framework)_2
11086         https://github.com/apple/llvm-project/blob/swift-5.3-RELEASE/clang/test/Sema/fallthrough-attr.c
11088 2023-02-27  ChuanGang Jiang  <jiangchuanganghw@outlook.com>
11090         fts: fail gracefully when out of memory
11091         * lib/fts.c (fts_read): Set errno==ENOMEM and return NULL
11092         when setup_dir() fails, rather than hitting an assertion later.
11094 2023-02-26  Jim Meyering  <meyering@fb.com>
11096         announce-gen: spell OpenBSD with a capital "O"
11097         * build-aux/announce-gen (print_checksums): Capitalize
11098         the "O" in OpenBSD, as suggested by Bruno Haible.
11100 2023-02-26  Bruno Haible  <bruno@clisp.org>
11102         dfa: Avoid warnings with some Apple clang versions.
11103         Reported by Werner Lemberg <wl@gnu.org> in
11104         <https://lists.gnu.org/archive/html/bug-gnulib/2023-02/msg00159.html>.
11105         * lib/dfa.c (FALLTHROUGH): When __apple_build_version__ is defined,
11106         ignore __clang_major__.
11108 2023-02-25  Jim Meyering  <meyering@fb.com>
11110         announce-gen: add more info the auto-generated announce template
11111         * build-aux/announce-gen (readable_interval, readable_interval0):
11112         New functions.
11113         (digest_file_base64_wrap): New function to add padding to the
11114         base64-encoded SHA256 checksums.
11115         (print_checksums): Use that wrapper. Indent each line by two spaces.
11116         (main): Emit new sections, e.g., these lines from grep-3.8's release:
11117         - There have been 104 commits by 6 people in the 55 weeks since 3.7.
11118         - The following people contributed changes to this release: (and list)
11119         I tested with this, running from a sibling cloned grep directory:
11120           ../gnulib/build-aux/announce-gen --release-type=stable \
11121             --package-name=grep --previous-version=3.7 --current-version=3.8 \
11122             --gpg-key-id=0x7FD9FCCB000BEEEE --url-directory=https://testing
11123         Also, reference the cksum programs from coreutils-9.2 and from OpenBSD.
11125 2023-02-25  ChuanGang Jiang  <jiangchuanganghw@outlook.com>  (tiny change)
11127         terminfo, termcap: Fix typos in comments.
11128         * lib/tparm.c: Fix misspellings in comments.
11130 2023-02-23  Paul Eggert  <eggert@cs.ucla.edu>
11132         lseek: avoid SEEK_HOLE bugs in FreeBSD, macOS
11133         This attempts to fix <https://bugs.gnu.org/61386>, a bug in GNU cp
11134         caused by a serious data corruption bug in FreeBSD and macOS.
11135         * doc/posix-functions/lseek.texi: Mention the bug.
11136         * lib/unistd.in.h (SEEK_DATA, SEEK_HOLE): Undef in macOS < 13 and
11137         FreeBSD < 14.  FreeBSD fixed the bug sometime during FreeBSD 13
11138         <https://bugs.freebsd.org/256205>, so the "FreeBSD < 14" is
11139         conservative.  It’s unknown when Apple will fix macOS so use
11140         macOS "9999" as a placeholder.
11141         * m4/lseek.m4 (gl_FUNC_LSEEK): Replace lseek if on one of the
11142         above platforms.
11144 2023-02-18  Bruno Haible  <bruno@clisp.org>
11146         configmake: Add support for $build_os != $host_os.
11147         * m4/build-to-host.m4: New file.
11148         * m4/configmake.m4 (gl_CONFIGMAKE_PREP): Provide a configure-time
11149         definition for pkgdatadir, pkgincludedir, pkglibdir.
11150         (gl_CONFIGMAKE): New macro.
11151         * modules/configmake (Files): Add m4/build-to-host.m4.
11152         (configure.ac): Invoke gl_CONFIGMAKE instead of gl_CONFIGMAKE_PREP.
11153         (Makefile.am): For creating configmake.h, use the various *prefix_c_make
11154         and *dir_c_make variables.
11156 2023-02-18  Bruno Haible  <bruno@clisp.org>
11158         configmake: Prepare for using directory names with backslashes.
11159         * modules/configmake (Makefile.am): Use printf instead of echo.
11161 2023-02-18  Bruno Haible  <bruno@clisp.org>
11163         unilbrk tests: Fix compilation failures (regression 2023-02-11).
11164         * tests/unilbrk/test-u8-possible-linebreaks.c (main): Outside of
11165         libunistring, don't test the backward compatibility function.
11166         * tests/unilbrk/test-u16-possible-linebreaks.c (main): Likewise.
11167         * tests/unilbrk/test-u32-possible-linebreaks.c (main): Likewise.
11168         * tests/unilbrk/test-ulc-possible-linebreaks.c (main): Likewise.
11169         * tests/unilbrk/test-u8-width-linebreaks.c (main): Likewise.
11170         * tests/unilbrk/test-u16-width-linebreaks.c (main): Likewise.
11171         * tests/unilbrk/test-u32-width-linebreaks.c (main): Likewise.
11172         * tests/unilbrk/test-ulc-width-linebreaks.c (main): Likewise.
11174 2023-02-17  Bruno Haible  <bruno@clisp.org>
11176         Improve cross-compilation for midipix.
11177         Reported by Ørjan Malde <red@foxi.me> at
11178         <https://lists.gnu.org/archive/html/bug-gnulib/2023-02/msg00131.html>.
11179         This patch handles the cases where midipix acts like Linux.
11180         * m4/chmod.m4 (gl_FUNC_CHMOD): Treat midipix like Linux with glibc or
11181         musl libc.
11182         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
11183         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Likewise.
11184         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Likewise.
11185         * m4/link.m4 (gl_FUNC_LINK): Likewise.
11186         * m4/linkat.m4 (gl_FUNC_LINKAT): Likewise.
11187         * m4/lstat.m4 (gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Likewise.
11188         * m4/mkdir.m4 (gl_FUNC_MKDIR): Likewise.
11189         * m4/pselect.m4 (gl_FUNC_PSELECT): Likewise.
11190         * m4/ptsname.m4 (gl_FUNC_PTSNAME): Likewise.
11191         * m4/readlink.m4 (gl_FUNC_READLINK): Likewise.
11192         * m4/rename.m4 (gl_FUNC_RENAME): Likewise.
11193         * m4/rmdir.m4 (gl_FUNC_RMDIR): Likewise.
11194         * m4/select.m4 (gl_FUNC_SELECT): Likewise.
11195         * m4/sleep.m4 (gl_FUNC_SLEEP): Likewise.
11196         * m4/stat.m4 (gl_FUNC_STAT): Likewise.
11197         * m4/symlink.m4 (gl_FUNC_SYMLINK): Likewise.
11198         * m4/symlinkat.m4 (gl_FUNC_SYMLINKAT): Likewise.
11199         * m4/unlink.m4 (gl_FUNC_UNLINK): Likewise.
11200         * m4/usleep.m4 (gl_FUNC_USLEEP): Likewise.
11202         Improve cross-compilation for midipix.
11203         Reported by Ørjan Malde <red@foxi.me> at
11204         <https://lists.gnu.org/archive/html/bug-gnulib/2023-02/msg00131.html>.
11205         Since midipix consists of musl libc based on an emulation of Linux system
11206         calls, for pure libc functionality it can be treated like musl libc.
11207         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Treat midipix like systems with
11208         musl libc.
11209         * m4/cbrtl.m4 (gl_FUNC_CBRTL): Likewise.
11210         * m4/ceil.m4 (gl_FUNC_CEIL): Likewise.
11211         * m4/ceilf.m4 (gl_FUNC_CEILF): Likewise.
11212         * m4/ceill.m4 (gl_FUNC_CEILL): Likewise.
11213         * m4/exp2l.m4 (gl_FUNC_EXP2L): Likewise.
11214         * m4/expl.m4 (gl_FUNC_EXPL): Likewise.
11215         * m4/expm1.m4 (gl_FUNC_EXPM1): Likewise.
11216         * m4/expm1f.m4 (gl_FUNC_EXPM1F): Likewise.
11217         * m4/expm1l.m4 (gl_FUNC_EXPM1L): Likewise.
11218         * m4/fclose.m4 (gl_FUNC_FCLOSE_STDIN): Likewise.
11219         * m4/fdopendir.m4 (gl_FUNC_FDOPENDIR): Likewise.
11220         * m4/ffsll.m4 (gl_FUNC_FFSLL): Likewise.
11221         * m4/floor.m4 (gl_FUNC_FLOOR): Likewise.
11222         * m4/floorf.m4 (gl_FUNC_FLOORF): Likewise.
11223         * m4/fmod.m4 (gl_FUNC_FMOD): Likewise.
11224         * m4/fmodf.m4 (gl_FUNC_FMODF): Likewise.
11225         * m4/fmodl.m4 (gl_FUNC_FMODL): Likewise.
11226         * m4/fnmatch.m4 (gl_FUNC_FNMATCH_POSIX): Likewise.
11227         * m4/fopen.m4 (gl_FUNC_FOPEN_GNU): Likewise.
11228         * m4/fpurge.m4 (gl_FUNC_FPURGE): Likewise.
11229         * m4/getdelim.m4 (gl_FUNC_GETDELIM): Likewise.
11230         * m4/getline.m4 (gl_FUNC_GETLINE): Likewise.
11231         * m4/hypot.m4 (gl_FUNC_HYPOT): Likewise.
11232         * m4/hypotf.m4 (gl_FUNC_HYPOTF): Likewise.
11233         * m4/hypotl.m4 (gl_FUNC_HYPOTL): Likewise.
11234         * m4/iconv_open-utf.m4 (gl_FUNC_ICONV_OPEN_UTF_SUPPORT): Likewise.
11235         * m4/log.m4 (gl_FUNC_LOG): Likewise.
11236         * m4/log10.m4 (gl_FUNC_LOG10): Likewise.
11237         * m4/log10f.m4 (gl_FUNC_LOG10F): Likewise.
11238         * m4/log10l.m4 (gl_FUNC_LOG10L_WORKS): Likewise.
11239         * m4/log1p.m4 (gl_FUNC_LOG1P): Likewise.
11240         * m4/log1pf.m4 (gl_FUNC_LOG1PF): Likewise.
11241         * m4/log1pl.m4 (gl_FUNC_LOG1PL, gl_FUNC_LOG1PL_WORKS): Likewise.
11242         * m4/log2.m4 (gl_FUNC_LOG2): Likewise.
11243         * m4/log2f.m4 (gl_FUNC_LOG2F): Likewise.
11244         * m4/log2l.m4 (gl_FUNC_LOG2L_WORKS): Likewise.
11245         * m4/logf.m4 (gl_FUNC_LOGF): Likewise.
11246         * m4/logl.m4 (gl_FUNC_LOGL_WORKS): Likewise.
11247         * m4/malloc.m4 (_AC_FUNC_MALLOC_IF): Likewise.
11248         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Likewise.
11249         * m4/modf.m4 (gl_FUNC_MODF): Likewise.
11250         * m4/modff.m4 (gl_FUNC_MODFF): Likewise.
11251         * m4/modfl.m4 (gl_FUNC_MODFL): Likewise.
11252         * m4/musl.m4 (gl_MUSL_LIBC): Likewise.
11253         * m4/perror.m4 (gl_FUNC_PERROR): Likewise.
11254         * m4/posix_spawn.m4 (gl_POSIX_SPAWN_SECURE,
11255         gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE,
11256         gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2,
11257         gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN): Likewise.
11258         * m4/printf.m4 (gl_PRINTF_SIZES_C99, gl_PRINTF_INFINITE,
11259         gl_PRINTF_INFINITE_LONG_DOUBLE, gl_PRINTF_DIRECTIVE_A,
11260         gl_PRINTF_DIRECTIVE_F, gl_PRINTF_FLAG_ZERO, gl_SNPRINTF_TRUNCATION_C99,
11261         gl_SNPRINTF_RETVAL_C99, gl_SNPRINTF_DIRECTIVE_N,
11262         gl_VSNPRINTF_ZEROSIZE_C99): Likewise.
11263         * m4/pthread_rwlock_rdlock.m4 (gl_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER):
11264         Likewise.
11265         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
11266         * m4/realloc.m4 (_AC_FUNC_REALLOC_IF): Likewise.
11267         * m4/remainder.m4 (gl_FUNC_REMAINDER): Likewise.
11268         * m4/remainderf.m4 (gl_FUNC_REMAINDERF): Likewise.
11269         * m4/remainderl.m4 (gl_FUNC_REMAINDERL, gl_FUNC_REMAINDERL_WORKS):
11270         Likewise.
11271         * m4/rintl.m4 (gl_FUNC_RINTL): Likewise.
11272         * m4/round.m4 (gl_FUNC_ROUND): Likewise.
11273         * m4/roundf.m4 (gl_FUNC_ROUNDF): Likewise.
11274         * m4/roundl.m4 (gl_FUNC_ROUNDL): Likewise.
11275         * m4/setenv.m4 (gl_FUNC_SETENV): Likewise.
11276         * m4/setlocale_null.m4 (gl_FUNC_SETLOCALE_NULL): Likewise.
11277         * m4/signbit.m4 (gl_SIGNBIT): Likewise.
11278         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
11279         * m4/strerror.m4 (gl_FUNC_STRERROR, gl_FUNC_STRERROR_0): Likewise.
11280         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
11281         * m4/strtold.m4 (gl_FUNC_STRTOLD): Likewise.
11282         * m4/trunc.m4 (gl_FUNC_TRUNC): Likewise.
11283         * m4/truncf.m4 (gl_FUNC_TRUNCF): Likewise.
11284         * m4/truncl.m4 (gl_FUNC_TRUNCL): Likewise.
11285         * m4/ungetc.m4 (gl_FUNC_UNGETC_WORKS): Likewise.
11286         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
11288 2023-02-13  ChuanGang Jiang  <jiangchuanganghw@outlook.com>  (tiny change)
11290         hamt: Detect GCC version correctly.
11291         * lib/hamt.h:Use __GNUC_MINOR__, not  __GNUC_MINOR.
11293 2023-02-11  Bruno Haible  <bruno@clisp.org>
11295         terminfo, termcap: Avoid wrong configure result with clang ≥ 15.
11296         clang 15 reports an error for -Wint-conversion by default.
11297         Reported by Sam James <sam@gentoo.org> in
11298         <https://savannah.gnu.org/bugs/?63793>.
11299         * m4/terminfo.m4 (gl_TERMINFO_BODY): Avoid a -Wint-conversion warning
11300         when testing for tparam and tparm.
11301         * m4/termcap.m4 (gl_TERMCAP_BODY): Likewise.
11303 2023-02-11  Bruno Haible  <bruno@clisp.org>
11305         error-h: Make less fragile.
11306         * lib/error.in.h: Use #include_next if the system has an <error.h>. Use
11307         a split double-inclusion guard.
11308         * m4/error_h.m4 (gl_ERROR_H): Invoke gl_CHECK_NEXT_HEADERS. Set
11309         HAVE_ERROR_H.
11310         * modules/error-h (Makefile.am): Substitute GUARD_PREFIX, HAVE_ERROR_H,
11311         INCLUDE_NEXT, PRAGMA_SYSTEM_HEADER, NEXT_ERROR_H.
11313 2023-02-11  Bruno Haible  <bruno@clisp.org>
11315         unilbrk: Don't compile unused functions outside of libunistring.
11316         * lib/unilbrk/u8-possible-linebreaks.c (u8_possible_linebreaks): Don't
11317         compile outside of libunistring.
11318         * lib/unilbrk/u16-possible-linebreaks.c (u16_possible_linebreaks):
11319         Likewise.
11320         * lib/unilbrk/u32-possible-linebreaks.c (u32_possible_linebreaks):
11321         Likewise.
11322         * lib/unilbrk/ulc-possible-linebreaks.c (ulc_possible_linebreaks):
11323         Likewise.
11324         * lib/unilbrk/u8-width-linebreaks.c (u8_width_linebreaks): Likewise.
11325         * lib/unilbrk/u16-width-linebreaks.c (u16_width_linebreaks): Likewise.
11326         * lib/unilbrk/u32-width-linebreaks.c (u32_width_linebreaks): Likewise.
11327         * lib/unilbrk/ulc-width-linebreaks.c (ulc_width_linebreaks): Likewise.
11329 2023-02-11  Bruno Haible  <bruno@clisp.org>
11331         sigsegv: Fix a compilation error on OpenBSD with clang ≥ 16.
11332         * lib/sigsegv.c (install_for): Add a cast when assigning to
11333         action.sa_sigaction.
11335 2023-02-10  Bruno Haible  <bruno@clisp.org>
11337         Fix code duplication in last commit.
11338         * m4/gnulib-common.m4 (gl_CHECK_FUNCS_DEFAULT_CASE,
11339         gl_CHECK_FUNCS_CASE_FOR_ANDROID, gl_CHECK_FUNCS_CASE_FOR_MACOS,
11340         gl_CHECK_FUNCS_SET_RESULTS): New macros, extracted from
11341         gl_CHECK_FUNCS_ANDROID, gl_CHECK_FUNCS_MACOS,
11342         gl_CHECK_FUNCS_ANDROID_MACOS.
11343         (gl_CHECK_FUNCS_ANDROID, gl_CHECK_FUNCS_MACOS,
11344         gl_CHECK_FUNCS_ANDROID_MACOS): Use them.
11346         mkfifoat: Fix crash on macOS 12.
11347         * m4/gnulib-common.m4 (gl_PREPARE_CHECK_FUNCS_MACOS,
11348         gl_CHECK_FUNCS_MACOS, gl_CHECK_FUNCS_ANDROID_MACOS): New macros.
11349         * m4/mkfifoat.m4 (gl_FUNC_MKFIFOAT): Test for mknodat and mkfifoat using
11350         gl_CHECK_FUNCS_ANDROID_MACOS instead of gl_CHECK_FUNCS_ANDROID.
11352 2023-02-10  ChuanGang Jiang  <jiangchuanganghw@outlook.com>  (tiny change)
11354         Fix typos like "the the" and "a a" in comments.
11355         * lib/c32is-impl.h: s/the the/the/
11356         * lib/getopt-pfx-core.h: s/a a/a/
11357         * lib/term-style-control.h: s/the the/the/
11358         * lib/textstyle.in.h: Likewise.
11360 2023-02-10  Bruno Haible  <bruno@clisp.org>
11362         chown, lchown, fchownat tests: Avoid test failure on macOS 12.
11363         * tests/test-chown.h (test_chown): Skip some assertions if
11364         getgid() == (gid_t)-1.
11365         * tests/test-lchown.h (test_lchown): Likewise.
11367 2023-02-09  Paul Eggert  <eggert@cs.ucla.edu>
11369         nullptr: work around Apple clang 14 issue
11370         Problem reported by Bruno Haible in:
11371         https://lists.gnu.org/r/bug-gnulib/2023-02/msg00098.html
11372         * doc/gnulib.texi (nullptr): Document limitations better.
11373         * m4/nullptr.m4 (gl_NULLPTR): Check for incompatibility of macOS
11374         clang 14.0.0 (clang-1400.0.29.202), where <stddef.h> defines a
11375         non-working nullptr macro.
11377 2023-02-09  Bruno Haible  <bruno@clisp.org>
11379         math: Fix compilation error in C++ mode on macOS 12.5.
11380         * lib/math.in.h (isnan): On macOS, treat clang version 14 again like
11381         clang versions < 12.
11383 2023-02-09  Bruno Haible  <bruno@clisp.org>
11385         Fix compilation errors in C++ mode on macOS 12.5.
11386         * m4/gnulib-common.m4 (gl_COMMON_BODY): Don't define
11387         _GL_ATTRIBUTE_MAYBE_UNUSED to [[__maybe_unused__]] if the compiler is
11388         an Apple variant of clang.
11390 2023-02-09  Bruno Haible  <bruno@clisp.org>
11392         limits-h: Work around a clang 15 bug.
11393         * m4/limits-h.m4 (gl_LIMITS_H): Test also for BOOL_MAX.
11394         * lib/limits.in.h: Handle the case where BOOL_WIDTH is present and
11395         BOOL_MAX is missing.
11396         * doc/posix-headers/limits.texi: Mention the clang bug.
11398 2023-02-09  Bruno Haible  <bruno@clisp.org>
11400         Fix error in C++ mode on glibc systems (regression 2022-04-28).
11401         * lib/malloc.in.h (rpl_free): Add exception specification like
11402         stdlib.in.h does.
11403         * lib/string.in.h (rpl_free): Likewise.
11404         * lib/wchar.in.h (rpl_free): Likewise.
11406 2023-02-09  Bruno Haible  <bruno@clisp.org>
11408         getcwd: Fix compilation error in C23 mode.
11409         * lib/getcwd.c: Include <stdio.h>.
11411 2023-02-08  Bruno Haible  <bruno@clisp.org>
11413         x-to-1: Accept additional help2man arguments.
11414         Suggested by Reuben Thomas <rrt@sc3d.org> in
11415         <https://lists.gnu.org/archive/html/bug-gnulib/2023-02/msg00078.html>.
11416         * build-aux/x-to-1.in: Allow additional options after the HELP2MAN
11417         argument, and pass them down to help2man.
11419 2023-02-08  Bruno Haible  <bruno@clisp.org>
11421         x-to-1: Document the configure-time prerequisites.
11422         Suggested by Reuben Thomas <rrt@sc3d.org> in
11423         <https://lists.gnu.org/archive/html/bug-gnulib/2023-02/msg00078.html>.
11424         * build-aux/x-to-1.in: Add more comments.
11426 2023-02-08  Bruno Haible  <bruno@clisp.org>
11428         hard-locale: Add comment regarding per-thread locales.
11429         * lib/hard-locale.h (hard_locale): Add comment.
11431 2023-02-08  Bruno Haible  <bruno@clisp.org>
11433         nl_langinfo: Add comment regarding per-thread locales.
11434         * lib/nl_langinfo.c (ctype_codeset): Add comment.
11436         nl_langinfo tests: Add another test.
11437         * tests/test-nl_langinfo2.c: New file.
11438         * tests/test-nl_langinfo2.sh: New file.
11439         * modules/nl_langinfo-tests (Files): Add them. Add
11440         intl-thread-locale.m4.
11441         (Depends-on): Add c-strcasestr, stdbool.
11442         (configure.ac): Invoke gt_FUNC_USELOCALE.
11443         (Makefile.am): Arrange to compile test-nl_langinfo2 and test it through
11444         test-nl_langinfo2.sh.
11446         nl_langinfo tests: Prepare for adding more tests.
11447         * tests/test-nl_langinfo1.c: Renamed from tests/test-nl_langinfo.c.
11448         * tests/test-nl_langinfo1.sh: Renamed from tests/test-nl_langinfo.sh.
11449         Update.
11450         * modules/nl_langinfo-tests (Files, Makefile.am): Update.
11452 2023-02-08  Bruno Haible  <bruno@clisp.org>
11454         assert-h: Fix test failure on IRIX 6.5.
11455         * m4/assert_h.m4 (gl_ASSERT_H): Ensure that on IRIX, including
11456         <assert.h> after <config.h> actually defines the assert macro.
11458 2023-02-07  Paul Eggert  <eggert@cs.ucla.edu>
11460         nullptr: test for compilers at autoconf-time
11461         * m4/nullptr.m4 (gl_NULLPTR): Test for C and C++ compiler usage at
11462         autoconf-time.  This should work better than testing at
11463         configure-time.  Also, push and pop languages so we check the
11464         proper compiler.
11466         nullptr: test for C++ nullptr at configure-time
11467         * m4/nullptr.m4 (gl_NULLPTR): Test for C++ support for nullptr
11468         at configure-time, as we already do for C support.
11469         This should be more reliable than maintaining #ifdefs by hand.
11471         nullptr: rename from c-nullptr
11472         * NEWS, doc/gnulib.texi: Mention this.
11473         * m4/nullptr.m4: Rename from m4/c-nullptr.m4.
11474         (gl_NULLPTR): Rename from gl_C_NULLPTR.
11475         * modules/nullptr: Rename from modules/nullptr.
11476         * modules/nullptr-c++-tests: Rename from modules/c-nullptr-c++-tests.
11477         * modules/nullptr-tests: Rename from modules/c-nullptr-tests.
11478         All uses changed.
11480 2023-02-07  Bruno Haible  <bruno@clisp.org>
11482         Fix a copyright header - module license mismatch.
11483         Reported by Bjarni Ingi Gislason <bjarniig@simnet.is> in
11484         <https://lists.gnu.org/archive/html/bug-gnulib/2023-02/msg00057.html>.
11485         * lib/gen-uni-tables.c (output_predicate): For uniwidth/width2.h, use an
11486         LGPLv2+ license.
11487         (output_nonspacing_property): Use an LGPLv2+ license.
11488         * lib/uniwidth/width0.h: Regenerated.
11489         * lib/uniwidth/width2.h: Likewise.
11491 2023-02-07  Bruno Haible  <bruno@clisp.org>
11493         check-copyright: Don't fail because of the 'glob' module.
11494         Reported by Bjarni Ingi Gislason <bjarniig@simnet.is> in
11495         <https://lists.gnu.org/archive/html/bug-gnulib/2023-02/msg00057.html>.
11496         * check-copyright: Filter out the files from the 'glob' module.
11498 2023-02-07  Bruno Haible  <bruno@clisp.org>
11500         check-copyright: Make output prettier.
11501         * check-copyright: Resize the second column from width 14 to width 17.
11503 2023-02-06  Bruno Haible  <bruno@clisp.org>
11505         setlocale-null: Don't use a lock in Cygwin >= 3.4.6.
11506         Road paved by Corinna Vinschen <vinschen@redhat.com>.
11507         * m4/setlocale_null.m4 (gl_FUNC_SETLOCALE_NULL): Assume that
11508         setlocale (LC_ALL, NULL) is multithread-safe in Cygwin >= 3.4.6.
11509         * lib/setlocale_null.c: Update comments.
11510         * tests/test-setlocale_null-mt-all.c: Likewise.
11512 2023-02-05  Bruno Haible  <bruno@clisp.org>
11514         c-nullptr: Fix conflict with libstdc++ in GCC >= 11.
11515         Reported by Bjarni Ingi Gislason <bjarniig@simnet.is> in
11516         <https://lists.gnu.org/archive/html/bug-gnulib/2023-02/msg00030.html>.
11517         * m4/c-nullptr.m4 (gl_C_NULLPTR): Don't define nullptr if it is already
11518         defined. In C++ mode, ignore the result of the configure test and don't
11519         define it when we know that the C++ compiler already supports it.
11521 2023-02-05  Bruno Haible  <bruno@clisp.org>
11523         c-nullptr: Add tests.
11524         * tests/test-nullptr.c: New file.
11525         * modules/c-nullptr-tests: New file.
11526         * tests/test-nullptr-c++.cc: New file.
11527         * modules/c-nullptr-c++-tests: New file.
11529 2023-02-05  Paul Eggert  <eggert@cs.ucla.edu>
11531         sh-quote: backport fix from diffutils
11532         * lib/sh-quote.c (init_sh_quoting_options):
11533         Use C89 through C17 style for parameterless static function.
11534         This avoided a warning when compiling diffutils.
11535         This patch is backported from a circa-2009 diffutils patch
11536         and lets us remove diffutils/gl/lib/sh-quote.c.diff; see:
11537         https://git.savannah.gnu.org/cgit/diffutils.git/commit/?id=8c3d25a63a2c5912170ef6e13f748f3904e6b5cf
11539         c-nullptr: new module
11540         * doc/gnulib.texi (nullptr): New section.
11541         * doc/posix-headers/stddef.texi: Document lack of nullptr_t.
11542         * m4/c-nullptr.m4, modules/c-nullptr: New files.
11544 2023-02-05  Bruno Haible  <bruno@clisp.org>
11546         Update build-aux/po/Makefile.in.in.
11547         Reported by Reuben Thomas <rrt@sc3d.org> in
11548         <https://lists.gnu.org/archive/html/bug-gnulib/2023-02/msg00020.html>.
11549         * build-aux/po/Makefile.in.in: Sync from GNU gettext 0.21.1.
11550         Fixes:
11551         - In the .po -> .gmo rules, consider the newest changes to the POT file.
11552         - Emit a warning when creating a tarball without POT file.
11554 2023-02-05  Bruno Haible  <bruno@clisp.org>
11556         assert-h, verify: Fix compilation error in C++ mode with MSVC 14.
11557         * lib/verify.h (static_assert): Define _ALLOW_KEYWORD_MACROS.
11558         * tests/test-assert-h-c++.cc: Strengthen test.
11559         * tests/test-assert-h-c++2.cc: Likewise.
11561 2023-02-04  Paul Eggert  <eggert@cs.ucla.edu>
11563         fts: pacify GCC 13 -Wuse-after-free
11564         Ordinarily I fix this sort of thing by using well-defined rather
11565         than undefined behavior, but a straightforward patch along those
11566         lines would change the fts_.h API since fts_accpath would change
11567         from a pointer to an integer with a more-complex interpretation.
11568         Instead, attempt to pacify GCC 13 with code that relies on
11569         undefined but portable-in-practice behavior that GCC 13 does not
11570         complain about.  GCC problem reported by Peter Frazier in:
11571         https://lists.gnu.org/r/bug-gnulib/2023-02/msg00000.html
11572         * lib/fts.c: Include stdint.h.
11573         (fts_build): Do not access freed pointer directly; instead,
11574         save its bit-pattern into a uintptr_t, and use that to compare.
11575         (ADJUST): Likewise, but more trickily since this hack
11576         actually accesses freed pointers, but does so in a way that
11577         I hope GCC doesn’t notice.  Although using ‘*(uintptr_t *) &P’
11578         instead of ‘(uintptr_t) P’ would avoid accessing freed pointers,
11579         it would provoke a -Wstrict-aliasing diagnostic.
11580         * modules/fts (Depends-on): Add stdint.
11582 2023-02-04  Bruno Haible  <bruno@clisp.org>
11584         assert-h, verify: Fix conflict with standard C++ header files on macOS.
11585         * lib/verify.h (_Static_assert): Don't redefine with clang ≥ 3.8.0
11586         in C++ mode.
11587         * tests/test-assert-h-c++.cc: Also check against conflict with the
11588         standard C++ header files.
11589         * tests/test-assert-h-c++2.cc: Likewise.
11591 2023-02-04  Bruno Haible  <bruno@clisp.org>
11593         Activate all existing C++ tests.
11594         * modules/assert-h-tests (Depends-on): Add assert-h-c++-tests.
11595         * modules/stdarg-tests (Depends-on): Add stdarg-c++-tests.
11597 2023-02-04  Bruno Haible  <bruno@clisp.org>
11599         spawn: Fix compilation error on macOS (regression 2023-01-22).
11600         * lib/spawn.in.h: Tweak logic for defining the POSIX_SPAWN_* constants.
11602 2023-02-03  Bruno Haible  <bruno@clisp.org>
11604         relocatable-prog: Fix compiler warning.
11605         * lib/progreloc.c (full_read): Use a non-const pointer.
11607 2023-02-03  Bruno Haible  <bruno@clisp.org>
11609         doc: Update regarding AIX.
11610         * doc/glibc-headers/getopt.texi: Update.
11612 2023-02-03  Bruno Haible  <bruno@clisp.org>
11614         doc: Update regarding NetBSD.
11615         * doc/posix-functions/sigprocmask.texi: Mention a NetBSD 9.0 bug.
11616         * doc/posix-functions/pthread_sigmask.texi: Likewise.
11618 2023-02-03  Paul Eggert  <eggert@cs.ucla.edu>
11620         isnan: update comment
11621         * lib/isnan.c: Update comment for C23.
11623 2023-01-30  Bruno Haible  <bruno@clisp.org>
11625         at-internal: Fix support for z/OS.
11626         * lib/openat-proc.c (openat_proc_name) [z/OS]: Proper error handling.
11627         Convert only the relevant part of the dir[] buffer.
11629         at-internal: Add support for z/OS.
11630         Reported and draft patch by Igor Todorovski <itodorov@ca.ibm.com>.
11631         * lib/openat-proc.c [z/OS]: Include <termios.h>.
11632         (openat_proc_name): For z/OS, use an approach similar to kLIBC, with
11633         3 lines of z/OS specific code by Igor Todorovski <itodorov@ca.ibm.com>.
11635 2023-01-30  Bruno Haible  <bruno@clisp.org>
11637         Update NEWS.
11638         * NEWS: Update for qcopy-acl change on 2023-01-13.
11640 2023-01-29  Bruno Haible  <bruno@clisp.org>
11642         maintainer-makefile: Determine gnulib's location on disk correctly.
11643         * top/maint.mk (gnulib_dir): Give priority to $(GNULIB_SRCDIR) over
11644         $(srcdir)/gnulib.
11646 2023-01-29  Bruno Haible  <bruno@clisp.org>
11648         Fix compilation errors with CC="clang -D_FORTIFY_SOURCE=2" on Android.
11649         Reported by Alexey Rochev <equeim@gmail.com> in
11650         <https://lists.gnu.org/archive/html/bug-gnu-libiconv/2023-01/msg00019.html>.
11651         * lib/cdefs.h (__bos, __bos0, __glibc_objsize0, __glibc_objsize,
11652         __glibc_safe_len_cond, __glibc_unsigned_or_positive,
11653         __glibc_safe_or_unknown_len, __glibc_unsafe_len, __glibc_fortify,
11654         __glibc_fortify_n): Don't define these macros in Gnulib.
11655         * lib/libc-config.h: Don't undefine these macros in Gnulib.
11657 2023-01-28  Bruno Haible  <bruno@clisp.org>
11659         Clarify _GL_ATTRIBUTE_NODISCARD code.
11660         Reported by Paul Eggert.
11661         * m4/gnulib-common.m4 (gl_COMMON_BODY): Add comment regarding
11662         _GL_ATTRIBUTE_NODISCARD definition.
11664 2023-01-28  Bruno Haible  <bruno@clisp.org>
11666         unistdio/*printf: Fix negative width handling for %U, %lU, %llU.
11667         * lib/vasnprintf.c (VASNPRINTF): In the code for %U, %lU, %llU, test for
11668         the FLAG_LEFT bit in the flags variable.
11669         * tests/unistdio/test-u8-printf1.h (test_xfunction): Add tests for width
11670         given as argument for the directives %U, %lU, %llU, %s, %a, %f, %e, %g.
11671         * tests/unistdio/test-u16-printf1.h (test_xfunction): Likewise.
11672         * tests/unistdio/test-u32-printf1.h (test_xfunction): Likewise.
11673         * tests/unistdio/test-ulc-printf1.h (test_xfunction): Likewise.
11675 2023-01-28  Bruno Haible  <bruno@clisp.org>
11677         vasnprintf-posix: Fix possible bug with negative width handling for %lc.
11678         * lib/vasnprintf.c (VASNPRINTF): In the code for %lc in vasnprintf, test
11679         for the FLAG_LEFT bit in the flags variable.
11680         * tests/test-vasnprintf-posix.c (test_function): Add tests for width
11681         given as argument for the directives %c, %lc.
11682         * tests/test-vasprintf-posix.c (test_function): Likewise.
11683         * tests/test-snprintf-posix.h (test_function): Likewise.
11684         * tests/test-sprintf-posix.h (test_function): Likewise.
11685         * tests/test-snprintf-posix.c: Include <wchar.h>, for wint_t.
11686         * tests/test-sprintf-posix.c: Likewise.
11687         * tests/test-vsnprintf-posix.c: Likewise.
11688         * tests/test-vsprintf-posix.c: Likewise.
11690 2023-01-28  Bruno Haible  <bruno@clisp.org>
11692         vasnprintf-posix: Fix negative width handling for %ls directive.
11693         Reported by clang via Po Lu <luangruo@yahoo.com>.
11694         * lib/vasnprintf.c (VASNPRINTF): In the code for %ls in vasnprintf and
11695         for %s in vasnwprintf, test for the FLAG_LEFT bit in the flags variable.
11696         * tests/test-vasnprintf-posix.c (test_function): Add tests for width
11697         given as argument for the directives %s, %ls.
11698         * tests/test-vasprintf-posix.c (test_function): Likewise.
11699         * tests/test-snprintf-posix.h (test_function): Likewise.
11700         * tests/test-sprintf-posix.h (test_function): Likewise.
11702 2023-01-28  Bruno Haible  <bruno@clisp.org>
11704         vasnprintf-posix: Add more unit tests.
11705         * tests/test-vasnprintf-posix.c (test_function): Add tests for width
11706         given as argument for the directives %a, %f, %e, %g.
11707         * tests/test-vasprintf-posix.c (test_function): Likewise.
11708         * tests/test-snprintf-posix.h (test_function): Likewise.
11709         * tests/test-sprintf-posix.h (test_function): Likewise.
11711 2023-01-28  Bruno Haible  <bruno@clisp.org>
11713         Avoid clang warnings regarding [[__nodiscard__]].
11714         * m4/gnulib-common.m4 (gl_COMMON_BODY): For clang, in C++ mode, ignore
11715         the __has_c_attribute value and define _GL_ATTRIBUTE_NODISCARD to
11716         __attribute__ ((__warn_unused_result__)), not [[__nodiscard__]].
11718 2023-01-28  Bruno Haible  <bruno@clisp.org>
11720         Avoid clang warnings regarding [[__maybe_unused__]].
11721         * m4/gnulib-common.m4 (gl_COMMON_BODY): For clang versions ≥ 6, < 10,
11722         in C++ mode, ignore the __has_c_attribute value and define
11723         _GL_ATTRIBUTE_MAYBE_UNUSED to __attribute__ ((__unused__)), not
11724         [[__maybe_unused__]].
11726 2023-01-27  Bruno Haible  <bruno@clisp.org>
11728         alignasof: Ensure a correct _Alignof (regression 2023-01-15).
11729         * m4/stdalign.m4 (gl_ALIGNASOF): Apply the workaround for wrong _Alignof
11730         in GCC < 4.9 and clang < 8.0.0 also when the system has <stdalign.h>.
11732 2023-01-27  Bruno Haible  <bruno@clisp.org>
11734         stdalign: Ensure alignof is defined on FreeBSD (regression 2023-01-15).
11735         * lib/stdalign.in.h: Include the system's <stdalign.h> when it exists.
11736         * m4/stdalign.m4 (gl_ALIGNASOF): Invoke gl_CHECK_NEXT_HEADERS. Set
11737         HAVE_STDALIGN_H.
11738         * modules/stdalign (Makefile.am): Substitute GUARD_PREFIX,
11739         HAVE_STDALIGN_H, INCLUDE_NEXT, PRAGMA_SYSTEM_HEADER, PRAGMA_COLUMNS,
11740         NEXT_STDALIGN_H.
11742 2023-01-27  Bruno Haible  <bruno@clisp.org>
11744         stddef: Fix test-stddef compilation error on FreeBSD 12/x86.
11745         * m4/stddef_h.m4 (gl_STDDEF_H): When testing for good max_align_t, use
11746         an ISO C compliant definition of _Alignof.
11748 2023-01-25  Bruno Haible  <bruno@clisp.org>
11750         Keep config.h idempotent.
11751         * m4/gnulib-common.m4 (gl_COMMON_BODY): Add double-inclusion guards to
11752         the definitions of the macros _GL_ATTRIBUTE_ALLOC_SIZE,
11753         _GL_ATTRIBUTE_ALWAYS_INLINE, _GL_ATTRIBUTE_ARTIFICIAL,
11754         _GL_ATTRIBUTE_COLD, _GL_ATTRIBUTE_CONST, _GL_ATTRIBUTE_DEALLOC,
11755         _GL_ATTRIBUTE_DEPRECATED, _GL_ATTRIBUTE_ERROR, _GL_ATTRIBUTE_WARNING,
11756         _GL_ATTRIBUTE_EXTERNALLY_VISIBLE, _GL_ATTRIBUTE_FALLTHROUGH,
11757         _GL_ATTRIBUTE_FORMAT, _GL_ATTRIBUTE_LEAF, _GL_ATTRIBUTE_MALLOC,
11758         _GL_ATTRIBUTE_MAY_ALIAS, _GL_ATTRIBUTE_MAYBE_UNUSED,
11759         _GL_ATTRIBUTE_NODISCARD, _GL_ATTRIBUTE_NOINLINE, _GL_ATTRIBUTE_NONNULL,
11760         _GL_ATTRIBUTE_NONSTRING, _GL_ATTRIBUTE_NOTHROW, _GL_ATTRIBUTE_PACKED,
11761         _GL_ATTRIBUTE_PURE, _GL_ATTRIBUTE_RETURNS_NONNULL,
11762         _GL_ATTRIBUTE_SENTINEL, _GL_ATTRIBUTE_UNUSED, _GL_UNUSED_LABEL.
11764 2023-01-25  Bruno Haible  <bruno@clisp.org>
11766         vasnprintf: Fix compilation error on Android NDK r26b.
11767         Reported by Po Lu <luangruo@yahoo.com>.
11768         * lib/vasnprintf.c: Include <wchar.h>.
11770 2023-01-25  Nick Bowler  <nbowler@draconx.ca>  (tiny change)
11772         threadlib: Fix support for Solaris 9 and older.
11773         * m4/threadlib.m4 (gl_PTHREADLIB_BODY): Allow case patterns to survive
11774         m4 processing by using changequote.
11776 2023-01-24  Bruno Haible  <bruno@clisp.org>
11778         alignasof, stdalign: Fix a compilation error on FreeBSD 12.0.
11779         * m4/stdalign.m4 (gl_ALIGNASOF): In C mode, prefer __builtin_offsetof
11780         over offsetof when possible, since __builtin_offsetof works also when
11781         <stddef.h> has not been fully included yet.
11783 2023-01-22  Bruno Haible  <bruno@clisp.org>
11785         doc: Update list of target platforms.
11786         * doc/gnulib-intro.texi (Supported Platforms): Mark musl libc, Android,
11787         and MSVC as "occasionally tested". Update the version numbers of some
11788         OSes. Combine paragraphs regarding mingw and MSVC.
11789         (Formerly Supported Platforms): Mark AIX 5, 6 as "formerly supported".
11791 2023-01-22  Bruno Haible  <bruno@clisp.org>
11793         Resolve conflicts for functions introduced in Android API level 29.
11795         * m4/reallocarray.m4 (gl_FUNC_REALLOCARRAY): Conditionally set
11796         REPLACE_REALLOCARRAY.
11797         * lib/stdlib.in.h (reallocarray): Disable _GL_CXXALIASWARN invocation on
11798         non-glibc systems.
11800         * lib/stdlib.in.h (getloadavg): Consider REPLACE_GETLOADAVG. Disable
11801         _GL_CXXALIASWARN invocation on non-glibc systems.
11802         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize REPLACE_GETLOADAVG.
11803         * modules/stdlib (Makefile.am): Substitute REPLACE_GETLOADAVG.
11804         * m4/getloadavg.m4 (gl_GETLOADAVG): Conditionally set
11805         REPLACE_GETLOADAVG.
11806         * modules/getloadavg (Depends-on, configure.ac): Consider
11807         REPLACE_GETLOADAVG.
11809         * lib/time.in.h (timespec_get): Consider REPLACE_TIMESPEC_GET. Disable
11810         _GL_CXXALIASWARN invocation on non-glibc systems.
11811         * m4/time_h.m4 (gl_TIME_H_DEFAULTS): Initialize REPLACE_TIMESPEC_GET.
11812         * modules/time (Makefile.am): Substitute REPLACE_TIMESPEC_GET.
11813         * m4/gettime.m4 (gl_CHECK_FUNC_TIMESPEC_GET): Set also
11814         gl_cv_onwards_func_timespec_get.
11815         * m4/timespec_get.m4 (gl_FUNC_TIMESPEC_GET): Conditionally set
11816         REPLACE_TIMESPEC_GET.
11817         * modules/timespec_get (Depends-on, configure.ac): Consider
11818         REPLACE_TIMESPEC_GET.
11820 2023-01-22  Bruno Haible  <bruno@clisp.org>
11822         Resolve conflicts for functions introduced in Android API level 28.
11824         * m4/aligned_alloc.m4 (gl_FUNC_ALIGNED_ALLOC): Conditionally set
11825         REPLACE_ALIGNED_ALLOC.
11826         * m4/getrandom.m4 (gl_FUNC_GETRANDOM): Conditionally set
11827         REPLACE_GETRANDOM.
11829         * m4/getlogin_r.m4 (gl_FUNC_GETLOGIN_R): Conditionally set
11830         REPLACE_GETLOGIN_R.
11831         * lib/unistd.in.h (getlogin_r): Disable _GL_CXXALIASWARN invocation on
11832         non-glibc systems.
11834         * m4/spawn_h.m4 (gl_HAVE_POSIX_SPAWN): Conditionally set
11835         REPLACE_POSIX_SPAWN.
11836         * lib/spawn.in.h: Adapt logic for defining the POSIX_SPAWN_* constants.
11837         (posix_spawn, posix_spawnp, posix_spawnattr_init,
11838         posix_spawnattr_destroy, posix_spawnattr_getsigdefault,
11839         posix_spawnattr_setsigdefault, posix_spawnattr_getsigmask,
11840         posix_spawnattr_setsigmask, posix_spawnattr_getflags,
11841         posix_spawnattr_setflags, posix_spawnattr_getpgroup,
11842         posix_spawnattr_setpgroup, posix_spawn_file_actions_init,
11843         posix_spawn_file_actions_destroy, posix_spawn_file_actions_addchdir,
11844         posix_spawn_file_actions_addfchdir): Disable _GL_CXXALIASWARN invocation
11845         on non-glibc systems.
11847         * m4/glob.m4 (gl_GLOB): Conditionally set REPLACE_GLOB.
11848         * lib/glob.in.h (glob): Disable _GL_CXXALIASWARN invocation on non-glibc
11849         systems.
11851         * lib/unistd.in.h (getentropy): Consider REPLACE_GETENTROPY. Disable
11852         _GL_CXXALIASWARN invocation on non-glibc systems.
11853         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize REPLACE_GETENTROPY.
11854         * modules/unistd (Makefile.am): Substitute REPLACE_GETENTROPY.
11855         * m4/getentropy.m4 (gl_FUNC_GETENTROPY): Conditionally set
11856         REPLACE_GETENTROPY.
11857         * modules/getentropy (Depends-on, configure.ac): Consider
11858         REPLACE_GETENTROPY.
11860 2023-01-22  Bruno Haible  <bruno@clisp.org>
11862         Resolve conflicts for functions introduced in Android API level 26.
11864         * m4/getdomainname.m4 (gl_FUNC_GETDOMAINNAME): Test for getdomainname
11865         using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS. Conditionally
11866         set REPLACE_GETSUBOPT.
11868         * m4/nl_langinfo.m4 (gl_FUNC_NL_LANGINFO): Conditionally set
11869         REPLACE_NL_LANGINFO.
11870         * lib/langinfo.in.h (nl_langinfo): Disable _GL_CXXALIASWARN invocation
11871         on non-glibc systems.
11873         * lib/stdlib.in.h (getsubopt): Consider REPLACE_GETSUBOPT. Disable
11874         _GL_CXXALIASWARN invocation on non-glibc systems.
11875         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize REPLACE_GETSUBOPT.
11876         * modules/stdlib (Makefile.am): Substitute REPLACE_GETSUBOPT.
11877         * m4/getsubopt.m4 (gl_FUNC_GETSUBOPT): Conditionally set
11878         REPLACE_GETSUBOPT.
11879         * modules/getsubopt (Depends-on, configure.ac): Consider
11880         REPLACE_GETSUBOPT.
11882 2023-01-22  Bruno Haible  <bruno@clisp.org>
11884         Resolve conflicts for functions introduced in Android API level 24.
11885         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Conditionally set
11886         REPLACE_STRCHRNUL.
11888 2023-01-22  Bruno Haible  <bruno@clisp.org>
11890         Resolve conflicts for functions introduced in Android API level 23.
11892         * m4/login_tty.m4 (gl_FUNC_LOGIN_TTY): Conditionally set
11893         REPLACE_LOGIN_TTY.
11894         * lib/utmp.in.h (login_tty): Disable _GL_CXXALIASWARN invocation on
11895         non-glibc systems.
11897         * m4/mkfifoat.m4 (gl_FUNC_MKFIFOAT): Conditionally set REPLACE_MKFIFOAT.
11898         * lib/sys_stat.in.h (mkfifoat): Disable _GL_CXXALIASWARN invocation on
11899         non-glibc systems.
11901         * m4/strerror_r.m4 (gl_FUNC_STRERROR_R_WORKS): Conditionally set
11902         REPLACE_STRERROR_R.
11903         * lib/string.in.h (strerror_r): Disable _GL_CXXALIASWARN invocation on
11904         non-glibc systems.
11906         * m4/error_h.m4 (gl_ERROR_H): Conditionally set REPLACE_ERROR.
11907         * lib/error.in.h (error): Disable _GL_CXXALIASWARN invocation on
11908         non-glibc systems.
11910         * lib/wchar.in.h (wmempcpy): Consider REPLACE_WMEMPCPY.
11911         * m4/wchar_h.m4 (gl_WCHAR_H_DEFAULTS): Initialize REPLACE_WMEMPCPY.
11912         * modules/wchar (Makefile.am): Substitute REPLACE_WMEMPCPY.
11913         * m4/wmempcpy.m4 (gl_FUNC_WMEMPCPY): Conditionally set
11914         REPLACE_WMEMPCPY.
11915         * modules/wmempcpy (configure.ac): Consider REPLACE_WMEMPCPY.
11917         * lib/unistd.in.h (sethostname): Consider REPLACE_SETHOSTNAME. Disable
11918         _GL_CXXALIASWARN invocation on non-glibc systems.
11919         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize REPLACE_SETHOSTNAME.
11920         * modules/unistd (Makefile.am): Substitute REPLACE_SETHOSTNAME.
11921         * m4/sethostname.m4 (gl_FUNC_SETHOSTNAME): Conditionally set
11922         REPLACE_SETHOSTNAME.
11923         * modules/sethostname (Depends-on, configure.ac): Consider
11924         REPLACE_SETHOSTNAME.
11926         * lib/string.in.h (mempcpy): Consider REPLACE_MEMPCPY. Disable
11927         _GL_CXXALIASWARN invocation on non-glibc systems.
11928         * m4/string_h.m4 (gl_STRING_H_DEFAULTS): Initialize REPLACE_MEMPCPY.
11929         * modules/string (Makefile.am): Substitute REPLACE_MEMPCPY.
11930         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Conditionally set REPLACE_MEMPCPY.
11931         * modules/mempcpy (configure.ac): Consider REPLACE_MEMPCPY.
11933         * lib/stdlib.in.h (mkostemp): Consider REPLACE_MKOSTEMP. Disable
11934         _GL_CXXALIASWARN invocation on non-glibc systems.
11935         (mkostemps): Consider REPLACE_MKOSTEMPS. Disable _GL_CXXALIASWARN
11936         invocation on non-glibc systems.
11937         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize REPLACE_MKOSTEMP,
11938         REPLACE_MKOSTEMPS.
11939         * modules/stdlib (Makefile.am): Substitute REPLACE_MKOSTEMP,
11940         REPLACE_MKOSTEMPS.
11941         * m4/mkostemp.m4 (gl_FUNC_MKOSTEMP): Conditionally set REPLACE_MKOSTEMP.
11942         * modules/mkostemp (Depends-on, configure.ac): Consider
11943         REPLACE_MKOSTEMP.
11944         * m4/mkostemps.m4 (gl_FUNC_MKOSTEMPS): Conditionally set
11945         REPLACE_MKOSTEMPS.
11946         * modules/mkostemps (Depends-on, configure.ac): Consider
11947         REPLACE_MKOSTEMPS.
11949 2023-01-22  Bruno Haible  <bruno@clisp.org>
11951         Resolve conflicts for functions introduced in Android API level 21.
11953         * m4/fts.m4 (gl_FUNC_FTS_CORE): Use rpl_* symbols also when the system
11954         will have fts_open in a future version.
11955         * m4/iswblank.m4 (gl_FUNC_ISWBLANK): Conditionally set REPLACE_ISWBLANK.
11956         * m4/mbtowc.m4 (gl_FUNC_MBTOWC): Conditionally set REPLACE_MBTOWC.
11957         * m4/vdprintf.m4 (gl_REPLACE_VDPRINTF): Conditionally set
11958         REPLACE_VDPRINTF.
11959         * m4/wcsnrtombs.m4 (gl_FUNC_WCSNRTOMBS): Conditionally set
11960         REPLACE_WCSNRTOMBS.
11962         * m4/mbsnrtowcs.m4 (gl_FUNC_MBSNRTOWCS): Conditionally set
11963         REPLACE_MBSNRTOWCS.
11964         * lib/wchar.in.h (mbsnrtowcs): Disable _GL_CXXALIASWARN invocation on
11965         non-glibc systems.
11967         * m4/execvpe.m4 (gl_FUNC_EXECVPE): Conditionally set REPLACE_EXECVPE.
11968         * m4/linkat.m4 (gl_FUNC_LINKAT): Conditionally set REPLACE_LINKAT.
11969         * m4/readlinkat.m4 (gl_FUNC_READLINKAT): Conditionally set
11970         REPLACE_READLINKAT.
11971         * m4/symlinkat.m4 (gl_FUNC_SYMLINKAT): Conditionally set
11972         REPLACE_SYMLINKAT.
11973         * m4/truncate.m4 (gl_FUNC_TRUNCATE): Conditionally set REPLACE_TRUNCATE.
11974         * lib/unistd.in.h (execvpe, linkat, readlinkat, symlinkat, truncate):
11975         Disable _GL_CXXALIASWARN invocation on non-glibc systems.
11977         * m4/mkfifoat.m4 (gl_FUNC_MKFIFOAT): Conditionally set REPLACE_MKNODAT.
11978         * lib/sys_stat.in.h (mknodat): Disable _GL_CXXALIASWARN invocation on
11979         non-glibc systems.
11981         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Conditionally set REPLACE_STPNCPY.
11982         * lib/string.in.h (stpncpy): Disable _GL_CXXALIASWARN invocation on
11983         non-glibc systems.
11985         * m4/random.m4 (gl_FUNC_RANDOM): Conditionally set REPLACE_INITSTATE,
11986         REPLACE_SETSTATE.
11987         * lib/stdlib.in.h (initstate, setstate): Disable _GL_CXXALIASWARN
11988         invocation on non-glibc systems.
11990         * m4/dprintf.m4 (gl_REPLACE_DPRINTF): Conditionally set REPLACE_DPRINTF.
11991         * lib/stdio.in.h (dprintf): Disable _GL_CXXALIASWARN invocation on
11992         non-glibc systems.
11994         * m4/duplocale.m4 (gl_FUNC_DUPLOCALE): Conditionally set
11995         REPLACE_DUPLOCALE.
11996         * m4/localename.m4 (gl_LOCALENAME): Conditionally set REPLACE_NEWLOCALE,
11997         REPLACE_DUPLOCALE, REPLACE_FREELOCALE.
11998         * lib/locale.in.h (newlocale, duplocale, freelocale): Disable
11999         _GL_CXXALIASWARN invocation on non-glibc systems.
12001         * lib/unistd.in.h (dup3): Consider REPLACE_DUP3. Disable
12002         _GL_CXXALIASWARN invocation on non-glibc systems.
12003         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize REPLACE_DUP3.
12004         * modules/unistd (Makefile.am): Substitute REPLACE_DUP3.
12005         * m4/dup3.m4 (gl_FUNC_DUP3): Conditionally set REPLACE_DUP3.
12007         * lib/string.in.h (stpcpy): Consider REPLACE_STPCPY. Disable
12008         _GL_CXXALIASWARN invocation on non-glibc systems.
12009         * m4/string_h.m4 (gl_STRING_H_DEFAULTS): Initialize REPLACE_STPCPY.
12010         * modules/string (Makefile.am): Substitute REPLACE_STPCPY.
12011         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Conditionally set REPLACE_STPCPY.
12012         * modules/stpcpy (configure.ac): Consider REPLACE_STPCPY.
12014         * lib/stdlib.in.h (_Exit): Consider REPLACE__EXIT. Disable
12015         _GL_CXXALIASWARN invocation on non-glibc systems.
12016         (getprogname): Consider REPLACE_GETPROGNAME. Disable _GL_CXXALIASWARN
12017         invocation on non-glibc systems.
12018         (posix_openpt): Consider REPLACE_POSIX_OPENPT. Disable _GL_CXXALIASWARN
12019         invocation on non-glibc systems.
12020         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize REPLACE__EXIT,
12021         REPLACE_GETPROGNAME, REPLACE_POSIX_OPENPT.
12022         * modules/stdlib (Makefile.am): Substitute REPLACE__EXIT,
12023         REPLACE_GETPROGNAME, REPLACE_POSIX_OPENPT.
12024         * m4/_Exit.m4 (gl_FUNC__EXIT): Conditionally set REPLACE__EXIT.
12025         * modules/_Exit (configure.ac): Consider REPLACE__EXIT.
12026         * m4/getprogname.m4 (gl_FUNC_GETPROGNAME): Conditionally set
12027         REPLACE_GETPROGNAME.
12028         * modules/getprogname (configure.ac): Consider REPLACE_GETPROGNAME.
12029         * m4/posix_openpt.m4 (gl_FUNC_POSIX_OPENPT): Conditionally set
12030         REPLACE_POSIX_OPENPT.
12031         * modules/posix_openpt (configure.ac): Consider REPLACE_POSIX_OPENPT.
12033         * lib/search.in.h (twalk): Consider REPLACE_TWALK.
12034         * m4/search_h.m4 (gl_SEARCH_H_DEFAULTS): Initialize REPLACE_TWALK.
12035         * modules/search (Makefile.am): Substitute REPLACE_TWALK.
12036         * m4/tsearch.m4 (gl_FUNC_TSEARCH): Conditionally set REPLACE_TWALK.
12037         * modules/tsearch (configure.ac): Consider REPLACE_TWALK.
12039 2023-01-22  Bruno Haible  <bruno@clisp.org>
12041         Resolve conflicts for functions introduced in Android API level 19.
12043         * lib/inttypes.in.h (imaxabs): Consider REPLACE_IMAXABS. Disable
12044         _GL_CXXALIASWARN invocation on non-glibc systems.
12045         (imaxdiv): Consider REPLACE_IMAXDIV. Disable _GL_CXXALIASWARN invocation
12046         on non-glibc systems.
12047         * m4/inttypes.m4 (gl_INTTYPES_H_DEFAULTS): Initialize HAVE_IMAXABS,
12048         HAVE_IMAXDIV, REPLACE_IMAXABS, REPLACE_IMAXDIV.
12049         * modules/inttypes-incomplete (Makefile.am): Substitute REPLACE_IMAXABS,
12050         REPLACE_IMAXDIV.
12051         * m4/imaxabs.m4 (gl_FUNC_IMAXABS): Conditionally set HAVE_IMAXABS,
12052         REPLACE_IMAXABS.
12053         * modules/imaxabs (configure.ac): Consider HAVE_IMAXABS, REPLACE_IMAXABS.
12054         * m4/imaxdiv.m4 (gl_FUNC_IMAXDIV): Conditionally set HAVE_IMAXDIV,
12055         REPLACE_IMAXDIV.
12056         * modules/imaxdiv (configure.ac): Consider HAVE_IMAXDIV, REPLACE_IMAXDIV.
12058         * m4/futimens.m4 (gl_FUNC_FUTIMENS): Conditionally set REPLACE_FUTIMENS.
12059         * lib/sys_stat.in.h (futimens): Disable _GL_CXXALIASWARN invocation on
12060         non-glibc systems.
12062 2023-01-22  Bruno Haible  <bruno@clisp.org>
12064         Resolve conflicts for functions introduced in Android API level 18.
12066         * m4/log2.m4 (gl_FUNC_LOG2): Conditionally set REPLACE_LOG2.
12067         * m4/log2f.m4 (gl_FUNC_LOG2F): Conditionally set REPLACE_LOG2F.
12068         * m4/log2l.m4 (gl_FUNC_LOG2L): Conditionally set REPLACE_LOG2L.
12069         * lib/math.in.h (log2f): Disable _GL_CXXALIASWARN invocation on
12070         non-glibc systems.
12072         * m4/getdelim.m4 (gl_FUNC_GETDELIM): Conditionally set REPLACE_GETDELIM.
12073         * m4/getline.m4 (gl_FUNC_GETLINE): Conditionally set REPLACE_GETLINE.
12074         * lib/stdio.in.h (getdelim, getline): Disable _GL_CXXALIASWARN
12075         invocation on non-glibc systems.
12077 2023-01-22  Bruno Haible  <bruno@clisp.org>
12079         Resolve conflicts for functions introduced in Android API level 16-17.
12080         * m4/posix_memalign.m4 (gl_FUNC_POSIX_MEMALIGN): Conditionally set
12081         REPLACE_POSIX_MEMALIGN.
12082         * lib/stdlib.in.h (posix_memalign): Disable _GL_CXXALIASWARN invocation
12083         on non-glibc systems.
12085 2023-01-22  Bruno Haible  <bruno@clisp.org>
12087         Resolve conflicts for functions introduced in Android API level 16.
12089         * m4/tsearch.m4 (gl_FUNC_TSEARCH): Conditionally set REPLACE_TSEARCH.
12090         * lib/search.in.h (tsearch, tfind, tdelete, twalk): Disable
12091         _GL_CXXALIASWARN invocation on non-glibc systems.
12093         * m4/faccessat.m4 (gl_FUNC_FACCESSAT): Conditionally set
12094         REPLACE_FACCESSAT.
12095         * lib/unistd.in.h (faccessat): Disable _GL_CXXALIASWARN invocation on
12096         non-glibc systems.
12098 2023-01-22  Bruno Haible  <bruno@clisp.org>
12100         Resolve conflicts for functions introduced in Android API level 12.
12102         * m4/utimensat.m4 (gl_FUNC_UTIMENSAT): Conditionally set
12103         REPLACE_UTIMENSAT.
12104         * lib/sys_stat.in.h (utimensat): Disable _GL_CXXALIASWARN invocation on
12105         non-glibc systems.
12107         * m4/timegm.m4 (gl_FUNC_TIMEGM): Conditionally set REPLACE_TIMEGM.
12108         * lib/time.in.h (timegm): Disable _GL_CXXALIASWARN invocation on
12109         non-glibc systems.
12111         * m4/pwrite.m4 (gl_FUNC_PWRITE): Conditionally set REPLACE_PWRITE.
12112         * lib/unistd.in.h (pwrite): Disable _GL_CXXALIASWARN invocation on
12113         non-glibc systems.
12115         * m4/pread.m4 (gl_FUNC_PREAD): Conditionally set REPLACE_PREAD.
12116         * lib/unistd.in.h (pread): Disable _GL_CXXALIASWARN invocation on
12117         non-glibc systems.
12119         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Conditionally set
12120         REPLACE_FTRUNCATE.
12121         * lib/unistd.in.h (ftruncate): Disable _GL_CXXALIASWARN invocation on
12122         non-glibc systems.
12124 2023-01-22  Bruno Haible  <bruno@clisp.org>
12126         Resolve conflicts for functions introduced in Android API level 9.
12127         * lib/unistd.in.h (fdatasync): Consider REPLACE_FDATASYNC. Disable
12128         _GL_CXXALIASWARN invocation on non-glibc systems.
12129         (pipe2): Consider REPLACE_PIPE2. Disable _GL_CXXALIASWARN invocation on
12130         non-glibc systems.
12131         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize REPLACE_FDATASYNC,
12132         REPLACE_PIPE2.
12133         * modules/unistd (Makefile.am): Substitute REPLACE_FDATASYNC,
12134         REPLACE_PIPE2.
12135         * m4/fdatasync.m4 (gl_FUNC_FDATASYNC): Test for fdatasync using
12136         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS. Conditionally set
12137         REPLACE_FDATASYNC.
12138         * modules/fdatasync (Depends-on, configure.ac): Consider
12139         REPLACE_FDATASYNC.
12140         * m4/pipe2.m4 (gl_FUNC_PIPE2): Conditionally set REPLACE_PIPE2.
12142 2023-01-22  Bruno Haible  <bruno@clisp.org>
12144         Resolve conflicts for functions introduced in Android API level 8.
12145         * m4/ttyname_r.m4 (gl_FUNC_TTYNAME_R): Conditionally set
12146         REPLACE_TTYNAME_R.
12147         * lib/unistd.in.h (ttyname_r): Disable _GL_CXXALIASWARN invocation on
12148         non-glibc systems.
12150 2023-01-22  Bruno Haible  <bruno@clisp.org>
12152         Prepare for resolving conflicts regarding future Android API levels.
12153         * m4/gnulib-common.m4 (gl_CHECK_FUNCS_ANDROID): Don't check for the
12154         function declaration on platforms other than Android. Set a variable
12155         gl_cv_onwards_func_<func>.
12157 2023-01-22  Paul Eggert  <eggert@cs.ucla.edu>
12159         sigsegv, vma-iter: port to Solaris 10
12160         On this platform, <sys/types.h> does not define off_t if neither
12161         _LP64 nor _FILE_OFFSET_BITS is defined, which can happen if we
12162         #undef _FILE_OFFSET_BITS.  This became a problem with the new way
12163         of doing stdbool, since config.h now includes <stdbool.h>, and
12164         Solaris 10 <stdbool.h> includes <sys/feature_tests.h> which
12165         arranges for _FILE_OFFSET_BITS to always be defined (if only to 32),
12166         which <sys/types.h> assumes.
12167         * lib/stackvma.c, lib/vma-iter.c (_FILE_OFFSET_BITS) [__sun && !_LP64]:
12168         Define to 32 instead of leaving undefined.
12170 2023-01-21  Bruno Haible  <bruno@clisp.org>
12172         login_tty: Ensure declaration in <utmp.h>.
12174         * tests/test-utmp-c++.cc: New file.
12175         * modules/utmp-c++-tests: New file.
12177         * tests/test-utmp.c: New file.
12178         * modules/utmp-tests: New file.
12180         * lib/login_tty.c: Include <utmp.h>.
12181         * m4/login_tty.m4: New file.
12182         (gl_FUNC_LOGIN_TTY): Moved here from m4/pty.m4. Set HAVE_LOGIN_TTY.
12183         * m4/pty.m4 (gl_FUNC_LOGIN_TTY): Moved to m4/login_tty.m4.
12184         * modules/login_tty (Files): Add m4/login_tty.m4.
12185         (Depends-on): Add utmp. Remove pty. Update condition.
12186         (configure.ac): Update condition. Invoke gl_UTMP_MODULE_INDICATOR
12187         instead of gl_PTY_MODULE_INDICATOR.
12188         (Include): List <utmp.h>.
12189         * doc/glibc-functions/login_tty.texi: Mark the include file diversity as
12190         fixed.
12191         * tests/test-login_tty.c: Include <utmp.h>. Don't declare login_tty
12192         here.
12194         * lib/utmp.in.h: New file.
12195         * m4/utmp_h.m4: New file.
12196         * modules/utmp: New file.
12197         * doc/glibc-headers/utmp.texi: New file.
12198         * doc/gnulib.texi (Glibc Header File Substitutes): Include it.
12200 2023-01-21  Bruno Haible  <bruno@clisp.org>
12202         login_tty: Fix detection of declaration (regression 2023-01-19).
12203         * m4/pty.m4 (gl_FUNC_LOGIN_TTY): Check for the three possible header
12204         files.
12206 2023-01-21  Bruno Haible  <bruno@clisp.org>
12208         alignasof tests: Rename test file.
12209         * tests/test-alignasof.c: Renamed from tests/test-stdalign.c.
12210         * modules/alignasof-tests (Files, Makefile.am): Update accordingly.
12212 2023-01-21  Bruno Haible  <bruno@clisp.org>
12214         alignasof tests: Fix GCC warning (regression 2023-01-15).
12215         * tests/test-stdalign.c (alignas): Undefine before redefine.
12217 2023-01-21  Bruno Haible  <bruno@clisp.org>
12219         getprogname: Move declaration from "getprogname.h" to <stdlib.h>.
12220         * lib/stdlib.in.h (getprogname): New declaration.
12221         * lib/getprogname.h: Add deprecation warning.
12222         (getprogname): Remove declaration.
12223         * lib/getprogname.c: Include <stdlib.h> instead of getprogname.h.
12224         * m4/stdlib_h.m4 (gl_STDLIB_H): Test whether getprogname is declared.
12225         (gl_STDLIB_H_REQUIRE_DEFAULTS): Initialize GNULIB_GETPROGNAME.
12226         (gl_STDLIB_H_DEFAULTS): Initialize HAVE_GETPROGNAME.
12227         * m4/getprogname.m4 (gl_PREREQ_GETPROGNAME): New macro, extracted from
12228         gl_FUNC_GETPROGNAME. Set HAVE_GETPROGNAME.
12229         (gl_FUNC_GETPROGNAME): Remove code that was moved to
12230         gl_PREREQ_GETPROGNAME.
12231         * modules/stdlib (Makefile.am): Substitute GNULIB_GETPROGNAME and
12232         HAVE_GETPROGNAME.
12233         * modules/getprogname (Depends-on): Add stdlib.
12234         (configure.ac): Define a module indicator. Invoke gl_PREREQ_GETPROGNAME.
12235         (Makefile.am): Don't compile getprogname.c if not needed.
12236         (Include): List <stdlib.h> instead of getprogname.h.
12237         * tests/test-getprogname.c: Include <stdlib.h> instead of getprogname.h.
12238         * NEWS: Mention the change.
12239         * lib/argmatch.c: Don't include getprogname.h.
12240         * lib/c-stack.c: Likewise.
12241         * lib/error.c: Likewise.
12242         * lib/git-merge-changelog.c: Likewise.
12244 2023-01-19  Paul Eggert  <eggert@cs.ucla.edu>
12246         snippet/_Noreturn: work around Clang _Noreturn bug
12247         This is a bigger-hammer workaround for the clang _Noreturn issue
12248         fix for dfa.c on 2023-01-01.  Unfortunately, it causes 270
12249         -Wreturn-type and -Wsometimes-uninitialized warnings when building
12250         bleeding-edge GNU Emacs from Git on Fedora 37 with plain
12251         ‘./configure && make’.  So the workaround is enabled only if you
12252         compile with -D_GL_WORK_AROUND_LLVM_BUG_59792.
12253         * lib/_Noreturn.h (_Noreturn):
12254         * m4/gnulib-common.m4 (gl_COMMON_BODY):
12255         #define _Noreturn to be empty if it is Clang 15 or earlier,
12256         and if _GL_WORK_AROUND_LLVM_BUG_59792 is defined.
12258 2023-01-19  Bruno Haible  <bruno@clisp.org>
12260         Fix warnings for functions introduced in Android API level 34.
12261         * modules/execute-tests (configure.ac): Test for close_range using
12262         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
12264 2023-01-19  Bruno Haible  <bruno@clisp.org>
12266         Fix warnings for functions introduced in Android API level 30.
12267         * m4/threadlib.m4 (gl_STDTHREADLIB_BODY): Test for thrd_create using
12268         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
12270 2023-01-19  Bruno Haible  <bruno@clisp.org>
12272         Fix warnings for functions introduced in Android API level 29.
12273         * m4/getloadavg.m4 (gl_GETLOADAVG): Test for getloadavg using
12274         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNC.
12276 2023-01-19  Bruno Haible  <bruno@clisp.org>
12278         Fix warnings for functions introduced in Android API level 28.
12279         * m4/glob.m4 (gl_GLOB): Test for glob using gl_CHECK_FUNCS_ANDROID
12280         instead of AC_CHECK_FUNCS_ONCE.
12282 2023-01-19  Bruno Haible  <bruno@clisp.org>
12284         Fix warnings for functions introduced in Android API level 26.
12285         * m4/mountlist.m4 (gl_MOUNTLIST): Test for hasmntopt using
12286         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
12287         * m4/nl_langinfo.m4 (gl_FUNC_NL_LANGINFO): Test for nl_langinfo using
12288         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
12289         * m4/strtod.m4 (gl_PREREQ_STRTOD): Test for nl_langinfo using
12290         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
12291         * m4/strtold.m4 (gl_PREREQ_STRTOLD): Likewise.
12292         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_A): Likewise.
12293         * m4/strerror_r.m4 (gl_PREREQ_STRERROR_R): Test for catgets using
12294         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
12295         * m4/utimens.m4 (gl_UTIMENS): Test for lutimes using
12296         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
12297         * m4/duplocale.m4 (gl_FUNC_DUPLOCALE): Test for nl_langinfo_l using
12298         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
12299         * modules/duplocale-tests (configure.ac): Likewise.
12300         * m4/getdomainname.m4 (gl_FUNC_GETDOMAINNAME): Update comment.
12302 2023-01-19  Bruno Haible  <bruno@clisp.org>
12304         Fix warnings for functions introduced in Android API level 24.
12305         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Test for strchrnul using
12306         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
12308 2023-01-19  Bruno Haible  <bruno@clisp.org>
12310         Fix warnings for functions introduced in Android API level 23.
12311         * m4/fbufmode.m4 (gl_FUNC_FBUFMODE): Test for __flbf, __fbufsize using
12312         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
12313         * m4/filenamecat.m4 (gl_FILE_NAME_CONCAT_LGPL): Test for mempcpy using
12314         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
12315         * m4/fpurge.m4 (gl_FUNC_FPURGE): Test for __fpurge using
12316         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
12317         * m4/freadable.m4 (gl_FUNC_FREADABLE): Test for __freadable using
12318         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
12319         * m4/fwritable.m4 (gl_FUNC_FWRITABLE): Test for __fwritable using
12320         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
12321         * m4/getpass.m4 (gl_FUNC_GETPASS_GNU): Test for __fsetlocking using
12322         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
12323         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Test for mempcpy using
12324         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
12325         * m4/mkfifoat.m4 (gl_FUNC_MKFIFOAT): Test for mkfifoat using
12326         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
12327         * m4/mkostemp.m4 (gl_FUNC_MKOSTEMP): Test for mkostemp using
12328         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
12329         * m4/mkostemps.m4 (gl_FUNC_MKOSTEMPS): Test for mkostemps using
12330         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
12331         * m4/pty.m4 (gl_FUNC_LOGIN_TTY): Test for login_tty using
12332         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
12333         * m4/sethostname.m4 (gl_FUNC_SETHOSTNAME): Test for sethostname using
12334         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
12335         * m4/strerror_r.m4 (gl_FUNC_STRERROR_R_WORKS): Test for strerror_r using
12336         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
12337         * m4/wmempcpy.m4 (gl_FUNC_WMEMPCPY): Test for wmempcpy using
12338         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
12340 2023-01-19  Bruno Haible  <bruno@clisp.org>
12342         Fix warnings for functions introduced in Android API level 21.
12343         * m4/_Exit.m4 (gl_FUNC__EXIT): Test for _Exit using
12344         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
12345         * m4/c-strtod.m4 (gl_C_STRTOLD): Test for strtold_l using
12346         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
12347         * m4/c32rtomb.m4 (gl_FUNC_C32RTOMB): Test for c32rtomb like
12348         gl_CHECK_FUNCS_ANDROID does.
12349         * m4/dprintf.m4 (gl_FUNC_DPRINTF): Test for dprintf using
12350         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
12351         * m4/dprintf-posix.m4 (gl_FUNC_DPRINTF_POSIX): Likewise.
12352         * m4/dup3.m4 (gl_FUNC_DUP3): Test for dup3 using
12353         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
12354         * m4/duplocale.m4 (gl_FUNC_DUPLOCALE): Test for duplocale using
12355         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
12356         * m4/execvpe.m4 (gl_FUNC_EXECVPE): Test for execvpe using
12357         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
12358         * m4/fts.m4 (gl_FUNC_FTS_CORE): Test for fts_open using
12359         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNC.
12360         * m4/getprogname.m4 (gl_FUNC_GETPROGNAME): Test for getprogname using
12361         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
12362         * m4/intl-thread-locale.m4 (gt_FUNC_USELOCALE): Test for uselocale using
12363         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
12364         * m4/iswblank.m4 (gl_FUNC_ISWBLANK): Test for iswblank using
12365         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
12366         * m4/libtextstyle-optional.m4 (gl_LIBTEXTSTYLE_OPTIONAL): Test for
12367         tcdrain using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
12368         * m4/linkat.m4 (gl_FUNC_LINKAT): Test for linkat using
12369         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
12370         * m4/localename.m4 (gl_LOCALENAME): Test for newlocale, duplocale,
12371         freelocale using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
12372         * m4/mbrtoc32.m4 (gl_CHECK_FUNC_MBRTOC32): Test for mbrtoc32 like
12373         gl_CHECK_FUNCS_ANDROID does.
12374         * m4/mbsnrtowcs.m4 (gl_FUNC_MBSNRTOWCS): Test for mbsnrtowcs using
12375         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
12376         * m4/mbtowc.m4 (gl_FUNC_MBTOWC): Test for mbtowc using
12377         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
12378         * m4/mkfifoat.m4 (gl_FUNC_MKFIFOAT): Test for mknodat using
12379         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
12380         * m4/mountlist.m4 (gl_MOUNTLIST): Test for setmntent, endmntent using
12381         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
12382         * m4/posix_openpt.m4 (gl_FUNC_POSIX_OPENPT): Test for posix_openpt using
12383         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
12384         * m4/pty.m4 (gl_FUNC_OPENPTY): Test for posix_openpt using
12385         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
12386         * m4/random.m4 (gl_FUNC_RANDOM): Test for initstate, setstate using
12387         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
12388         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Test for stpcpy using
12389         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
12390         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Test for stpncpy using
12391         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
12392         * m4/symlinkat.m4 (gl_FUNC_SYMLINKAT): Test for symlinkat using
12393         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
12394         * m4/truncate.m4 (gl_FUNC_TRUNCATE): Test for truncate using
12395         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
12396         * m4/tsearch.m4 (gl_FUNC_TSEARCH): Test for twalk using
12397         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
12398         * m4/vdprintf.m4 (gl_FUNC_VDPRINTF): Test for vdprintf using
12399         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
12400         * m4/vdprintf-posix.m4 (gl_FUNC_VDPRINTF_POSIX): Likewise.
12401         * m4/wcsnrtombs.m4 (gl_FUNC_WCSNRTOMBS): Test for wcsnrtombs using
12402         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
12403         * m4/readlinkat.m4 (gl_FUNC_READLINKAT): Test for readlinkat using
12404         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
12405         * m4/fchmodat.m4 (gl_PREREQ_FCHMODAT): Likewise.
12406         * modules/careadlinkat (configure.ac): Likewise.
12407         * modules/ftoastr (configure.ac): Test for strtof using
12408         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
12409         * modules/duplocale-tests (configure.ac): Test for duplocale using
12410         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
12411         * modules/hard-locale-tests (configure.ac): Likewise.
12412         * modules/locale-tests (configure.ac): Test for newlocale using
12413         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
12414         * modules/localename-tests (configure.ac): Likewise.
12415         * modules/tsearch-tests (configure.ac): Test for initstate using
12416         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
12417         * modules/unistr/u8-stpcpy (configure.ac): Test for stpcpy using
12418         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
12420         * m4/tcgetattr.m4: New file, extracted from m4/getpass.m4.
12421         * m4/getpass.m4 (gl_PREREQ_GETPASS): Remove code that tests for
12422         tcgetattr. Invoke gl_HAVE_TCGETATTR instead.
12423         * modules/getpass (Files): Add tcgetattr.m4.
12424         * modules/getpass-gnu (Files): Add tcgetattr.m4.
12425         * modules/term-style-control (Files): Add tcgetattr.m4.
12426         (configure.ac): Remove code that tests for tcgetattr. Invoke
12427         gl_HAVE_TCGETATTR instead.
12429 2023-01-19  Bruno Haible  <bruno@clisp.org>
12431         Fix warnings for functions introduced in Android API level 19.
12432         * m4/futimens.m4 (gl_FUNC_FUTIMENS): Test for futimens using
12433         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
12434         * m4/utimens.m4 (gl_UTIMENS): Likewise.
12435         * m4/imaxabs.m4 (gl_FUNC_IMAXABS): Test for imaxabs using
12436         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
12437         * m4/imaxdiv.m4 (gl_FUNC_IMAXDIV): Test for imaxdiv using
12438         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
12440 2023-01-19  Bruno Haible  <bruno@clisp.org>
12442         Fix warnings for functions introduced in Android API level 18.
12443         * m4/getdelim.m4 (gl_FUNC_GETDELIM): Test for getdelim using
12444         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
12445         * m4/getline.m4 (gl_FUNC_GETLINE): Test for getline using
12446         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNC.
12447         * m4/log2.m4 (gl_FUNC_LOG2): Test for log2 using
12448         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
12449         * m4/log2f.m4 (gl_FUNC_LOG2F): Test for log2f using
12450         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
12451         * m4/log2l.m4 (gl_FUNC_LOG2L): Test for log2l using
12452         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
12454 2023-01-19  Bruno Haible  <bruno@clisp.org>
12456         Fix warnings for functions introduced in Android API level 16 or 17.
12457         * m4/posix_memalign.m4 (gl_FUNC_POSIX_MEMALIGN): Test for posix_memalign
12458         using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
12459         * m4/alignalloc.m4 (gl_ALIGNALLOC): Likewise.
12460         * m4/pagealign_alloc.m4 (gl_PREREQ_PAGEALIGN_ALLOC): Likewise.
12461         * modules/aligned-malloc (configure.ac): Likewise.
12463 2023-01-19  Bruno Haible  <bruno@clisp.org>
12465         Fix warnings for functions introduced in Android API level 16.
12466         * m4/faccessat.m4 (gl_FUNC_FACCESSAT): Test for faccessat using
12467         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
12468         * m4/canonicalize.m4 (gl_FUNC_CANONICALIZE_FILENAME_MODE,
12469         gl_CANONICALIZE_LGPL_SEPARATE): Likewise.
12470         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Likewise.
12471         * m4/tsearch.m4 (gl_FUNC_TSEARCH): Test for tsearch using
12472         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
12473         * m4/setenv.m4 (gl_PREREQ_SETENV): Likewise.
12475 2023-01-19  Bruno Haible  <bruno@clisp.org>
12477         Fix warnings for functions introduced in Android API level 12.
12478         Reported by Po Lu <luangruo@yahoo.com>.
12479         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Test for ftruncate using
12480         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
12481         * m4/glob.m4 (gl_PREREQ_GLOB): Test for getpwnam_r using
12482         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
12483         * m4/nproc.m4 (gl_PREREQ_NPROC): Test for sched_getaffinity using
12484         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
12485         * m4/pread.m4 (gl_FUNC_PREAD): Test for pread using
12486         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
12487         * m4/pwrite.m4 (gl_FUNC_PWRITE): Test for pwrite using
12488         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
12489         * m4/thread.m4 (gl_THREAD): Test for pthread_atfork using
12490         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
12491         * m4/timegm.m4 (gl_FUNC_TIMEGM): Test for timegm using
12492         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
12493         * m4/utimensat.m4 (gl_FUNC_UTIMENSAT): Test for utimensat using
12494         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
12495         * m4/utimens.m4 (gl_UTIMENS): Likewise.
12497 2023-01-19  Bruno Haible  <bruno@clisp.org>
12499         Fix warnings for functions introduced in Android API level 9.
12500         * m4/pipe2.m4 (gl_FUNC_PIPE2): Test for pipe2 using
12501         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
12502         * m4/fdatasync.m4 (gl_FUNC_FDATASYNC): Update comments.
12504 2023-01-19  Bruno Haible  <bruno@clisp.org>
12506         Fix warnings for functions introduced in Android API level 8.
12507         * m4/ttyname_r.m4 (gl_FUNC_TTYNAME_R): Test for ttyname_r using
12508         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
12510 2023-01-19  Bruno Haible  <bruno@clisp.org>
12512         fts: Document this module.
12513         * doc/glibc-headers/fts.texi: Mention the 'fts' module.
12514         * doc/glibc-functions/fts_children.texi: Likewise.
12515         * doc/glibc-functions/fts_close.texi: Likewise.
12516         * doc/glibc-functions/fts_open.texi: Likewise.
12517         * doc/glibc-functions/fts_read.texi: Likewise.
12518         * doc/glibc-functions/fts_set.texi: Likewise.
12520 2023-01-18  Bruno Haible  <bruno@clisp.org>
12522         getcwd: Speed up on Linux. Add support for Android.
12523         * lib/getcwd.c (__getcwd_generic): On Linux, use a specific readlink
12524         call to speed up the operation.
12526 2023-01-17  Paul Eggert  <eggert@cs.ucla.edu>
12528         qcopy-acl: port to Fedora 9
12529         It has libattr-2.4.41, which is too old for our code.
12530         Problem reported by Po Lu <https://bugs.gnu.org/60843>.
12531         * m4/xattr.m4 (gl_FUNC_XATTR): Check that we can use
12532         ATTR_ACTION_PERMISSIONS, too.  Refactor so that there’s a single
12533         test program that we compile and link, rather than doing the tests
12534         in dribs and drabs.
12536 2023-01-17  Bruno Haible  <bruno@clisp.org>
12538         execute tests: Avoid test failure with GNU make 4.4.
12539         Reported by Eric Blake in
12540         <https://lists.gnu.org/archive/html/bug-gnulib/2023-01/msg00157.html>.
12541         * tests/test-execute-main.c (main): Reset the SIGPIPE handler to
12542         default on all platforms.
12544 2023-01-17  Bruno Haible  <bruno@clisp.org>
12546         fflush: Tweak last commit.
12547         * lib/stdio-impl.h (fp_): Make the last change work also with newer
12548         Android NDKs and _FILE_OFFSET_BITS=64.
12550 2023-01-17  Ondrej Valousek  <ondrej.valousek.xm@renesas.com>
12552         qset-acl, acl: Improve comments.
12553         * lib/qset-acl.c (qset_acl): Improve comments.
12554         * lib/set-acl.c (set_acl): Likewise.
12556 2023-01-17  Bruno Haible  <bruno@clisp.org>
12558         fflush: Fix a buffer overrun on 32-bit Android.
12559         * lib/stdio-impl.h (fp_): On Android, change the type of _offset to
12560         'long'.
12561         * lib/fflush.c (update_fpos_cache): On Android, update a 'long', not an
12562         'fpos_t'.
12564 2023-01-17  Bruno Haible  <bruno@clisp.org>
12566         execute tests: Avoid test failure on Android.
12567         * tests/test-execute-main.c (main): Reset the SIGPIPE handler to
12568         default.
12570 2023-01-17  Bruno Haible  <bruno@clisp.org>
12572         hard-locale: Port to Android ≥ 5.0.
12573         * lib/hard-locale.c: Include <stdlib.h>.
12574         (hard_locale): On Android, consider also MB_CUR_MAX, even if the
12575         locale's name is "C".
12576         * tests/test-hard-locale.c (test_one, main): Assume that on Android,
12577         even the "C" locale is hard.
12579 2023-01-16  Bruno Haible  <bruno@clisp.org>
12581         stddef tests: Fix compilation error (regression 2023-01-15).
12582         * tests/test-stddef.c: Don't include <stdalign.h>.
12584 2023-01-16  Bruno Haible  <bruno@clisp.org>
12586         mbrtowc, mbrtoc32 tests: Avoid test failure on Android ≥ 5.0.
12587         * tests/test-mbrtowc.c (main): On Android 5.0 or newer, when testing
12588         the "C" locale, verify that the encoding is UTF-8.
12589         * tests/test-mbrtoc32.c (main): Likewise.
12590         * doc/posix-functions/setlocale.texi: Mention the Android problems.
12592         mbrtowc, mbrtoc32 tests: Refactor.
12593         * tests/test-mbrtowc.c (main): Straighten convoluted code.
12594         * tests/test-mbrtoc32.c (main): Likewise.
12596 2023-01-16  Paul Eggert  <eggert@cs.ucla.edu>
12598         sigpipe tests: Modernize use of 'head'.
12599         POSIX no longer requires support for ‘head -1’.
12600         * tests/test-sigpipe.sh: Use ‘head -n1’ rather than ‘head -1’.
12601         * tests/test-sigpipe.c (main): Likewise.
12602         * lib/git-merge-changelog.c (main): Update comment accordingly.
12604 2023-01-15  Paul Eggert  <eggert@cs.ucla.edu>
12606         alignasof: new module
12607         This splits off support for the C23 keywords alignas and alignof,
12608         from the now-deprecated stdalign module.  The latter now merely
12609         provides C11 support.
12610         * MODULES.html.sh, NEWS, doc/gnulib.texi:
12611         * doc/posix-headers/stdalign.texi: Document the change.
12612         * lib/stdalign.in.h: Remove most of the definitions (which are now
12613         supplied by the alignasof module), leaving only
12614         __alignas_is_defined and __alignof_is_defined.
12615         * modules/alignasof, modules/alignasof-tests: New files.
12616         * m4/stdalign.m4 (gl_ALIGNASOF): New macro, with
12617         most of the contents of the old gl_STDALIGN_H.
12618         Do not define __alignas_is_defined or __alignof_is_defined.
12619         (gl_STDALIGN_H): Rely on gl_ALIGNASOF for most of the work.
12620         * modules/alignalloc, modules/alignof, modules/argp:
12621         * modules/crypto/md4-buffer, modules/crypto/md5-buffer:
12622         * modules/crypto/sha1-buffer, modules/crypto/sha256-buffer:
12623         * modules/crypto/sha512-buffer, modules/crypto/sm3-buffer:
12624         * modules/fts, modules/rawmemchr, modules/relocatable-prog-wrapper:
12625         * modules/stddef-tests, modules/sys_socket:
12626         Depend on alignasof, not stdalign.
12627         * modules/stdalign: Deprecate.  Depend on alignasof.
12628         * modules/stdalign-tests: Move most contents to the new module
12629         alignasof-tests, and depend on that.
12631 2023-01-15  Bruno Haible  <bruno@clisp.org>
12633         fpending: Fix compilation error with NDK ≥ r14b and Android API < 23.
12634         Report and patch by Po Lu <luangruo@yahoo.com>.
12635         * lib/fpending.c (__fpending) [__ANDROID__]: Use the fp_ macro.
12637 2023-01-14  Paul Eggert  <eggert@cs.ucla.edu>
12639         alignof: port to strict C23
12640         Problem reported by Khem Raj in:
12641         https://lists.gnu.org/r/bug-gnulib/2023-01/msg00111.html
12642         * lib/alignof.h (alignof_slot) [!__cplusplus]: Use C23-style alignof.
12643         * modules/alignof (Depends-on): Add stdalign.
12645         test-framework-sh: work around AIX 7.2 diff bugs
12646         * tests/init.sh (compare_dev_null_): Run diff in the C locale.
12647         AIX 7.2 diff messes up in UTF-8 locales; for example,
12648         ‘printf '\360\220\200\200\n' | diff - /dev/null’ incorrectly
12649         outputs nothing and exits with status 0 when LC_ALL=en_US.UTF-8.
12651 2023-01-14  Bruno Haible  <bruno@clisp.org>
12653         error, verror tests: Fix link error when the package uses libintl.
12654         * modules/error-tests (Makefile.am): Link test-error with $(LIBINTL).
12655         * modules/verror-tests (Makefile.am): Link test-verror with $(LIBINTL).
12657 2023-01-13  Bruno Haible  <bruno@clisp.org>
12659         localename: Fix -Wtautological-pointer-compare warning in a better way.
12660         * lib/localename.c (duplocale, freelocale): Revert last patch.
12661         (_GL_ARG_NONNULL): Define to empty.
12663 2023-01-13  Paul Eggert  <eggert@cs.ucla.edu>
12665         verify: work around xlclang 16.1 compiler bug
12666         Problem reported by Bruno Haible in:
12667         https://lists.gnu.org/r/grep-devel/2023-01/msg00003.html
12668         * lib/verify.h (_GL_HAS_BUILTIN_TRAP, _GL_HAS_BUILTIN_UNREACHABLE):
12669         Define to 0 if compiler advertises itself as clang before version 5.
12670         xlclang 16.1 advertises itself as 4.0.1 and this patch works
12671         around what appears to be a compiler bug when compiling dfa.c in
12672         bleeding-edge grep.
12674         assert-h: suppress xlclang 16.1 false alarms
12675         * m4/assert_h.m4 (gl_ASSERT_H): Pacify older clangs too,
12676         with regard to single-argument static_assert.
12677         Problem found with xlclang 16.1 on AIX 7.2.
12679         assert-h: fix configure comment-out
12680         * m4/assert_h.m4 (gl_ASSERT_H): Also break apart "#undef
12681         static_assert" with /**/.  Problem discovered with xlclang 16.1,
12682         though it does not directly affect xlclang 16.1.
12684         Don’t use alloc_size with xlclang 16.1
12685         * m4/gnulib-common.m4 (_GL_HAS_ATTRIBUTE): Require Clang 5 instead
12686         of 3.5 for this, to pacify xlclang 16.1.0 on AIX 7.2, which
12687         advertises itself as clang 4.0.1, and which otherwise issues
12688         warnings like “./xalloc.h:141:3: warning: 1540-2990 The attribute
12689         "__attribute__((alloc_size(2, 3)))" is not supported.  The
12690         attribute is ignored.” when building bleeding-edge GNU grep.
12692         localename: -Wtautological-pointer-compare
12693         Problem found by xlclang 16.1 on AIX 7.2.
12694         * lib/localename.c (duplocale, freelocale):
12695         Omit unnecessary comparison of non-null args to NULL.
12697 2023-01-13  Bruno Haible  <bruno@clisp.org>
12699         login_tty tests: Be more verbose when the test fails.
12700         * tests/test-login_tty.c (main): When the test fails, write a message
12701         into a file.
12703 2023-01-13  Bruno Haible  <bruno@clisp.org>
12705         qcopy-acl: Make last patch more robust.
12706         * m4/acl.m4 (gl_FUNC_ACL): Define through AC_DEFUN_ONCE.
12707         * modules/qcopy-acl (configure.ac): Require gl_FUNC_ACL.
12709         qcopy-acl: Adjust link dependencies.
12710         * modules/qcopy-acl (Depends-on): Add condition.
12711         (configure.ac): Set QCOPY_ACL_LIB.
12712         (Link): Add $(QCOPY_ACL_LIB). Remove $(LIB_ACL).
12713         * modules/qacl (Link): Add $(LIB_ACL) and $(QCOPY_ACL_LIB).
12714         * modules/acl (Link): Add $(LIB_ACL) and $(QCOPY_ACL_LIB).
12715         * modules/copy-file (Link): Add $(QCOPY_ACL_LIB).
12716         * modules/supersede (Link): Add $(QCOPY_ACL_LIB).
12717         * modules/acl-tests (Makefile.am): Link test-copy-acl with
12718         $(QCOPY_ACL_LIB).
12719         * modules/copy-file-tests (Makefile.am): Link test-copy-file with
12720         $(QCOPY_ACL_LIB).
12721         * modules/supersede-tests (Makefile.am): Link test-supersede with
12722         $(QCOPY_ACL_LIB).
12724 2023-01-13  Bruno Haible  <bruno@clisp.org>
12726         qcopy-acl: Avoid autoconf warning.
12727         * m4/xattr.m4 (gl_FUNC_XATTR): Provide a description in AC_DEFINE.
12728         Also, protect against unsafe use of a configure option value.
12730 2023-01-12  Ondrej Valousek  <ondrej.valousek.xm@renesas.com>
12732         qcopy-acl: Optimize copying of ACLs by directly copying the attributes.
12733         * lib/qcopy-acl.c (is_attr_permissions): New functions.
12734         (qcopy_acl): If USE_XATTR, copy the ACL related attributes directly.
12735         * m4/xattr.m4: New file.
12736         * modules/qcopy-acl (Files): Add it.
12737         (configure.ac): Invoke gl_FUNC_XATTR.
12739 2023-01-12  Bruno Haible  <bruno@clisp.org>
12741         error: Work around an Android problem.
12742         * lib/error.in.h: Renamed from lib/error.h.
12743         (_GL_ATTRIBUTE_SPEC_PRINTF_ERROR): New macro.
12744         (error): Consider HAVE_ERROR and REPLACE_ERROR.
12745         (error_at_line): Consider HAVE_ERROR_AT_LINE and REPLACE_ERROR_AT_LINE.
12746         * m4/error_h.m4: New file, partially based on m4/error.m4.
12747         * m4/error.m4 (gl_ERROR): Remove the test for error_at_line.
12748         * modules/error-h: New file.
12749         * modules/error (Files): Remove lib/error.h.
12750         (Depends-on): Add error-h. Update conditions.
12751         (configure.ac): Require gl_ERROR_H. Update condition.
12752         * doc/glibc-headers/error.texi: Mention the 'error-h' module.
12753         * doc/glibc-functions/error.texi: Mention the Android problem.
12754         * config/srclist.txt: Add comment regarding error.h.
12756 2023-01-12  Bruno Haible  <bruno@clisp.org>
12758         error, verror tests: Add clarification.
12759         * tests/test-error.c (main): Clarify why we don't test error_at_line
12760         with a NULL filename.
12761         * tests/test-verror.c (main): Clarify why we don't test verror_at_line
12762         with a NULL filename.
12764 2023-01-12  Bruno Haible  <bruno@clisp.org>
12766         verror: Add tests.
12767         * tests/test-verror.sh: New file, based on tests/test-error.sh.
12768         * tests/test-verror.c: New file, based on tests/test-error.c.
12769         * modules/verror-tests: New file.
12771 2023-01-12  Bruno Haible  <bruno@clisp.org>
12773         error: Add tests.
12774         * tests/test-error.sh: New file.
12775         * tests/test-error.c: New file.
12776         * modules/error-tests: New file.
12778 2023-01-11  Bruno Haible  <bruno@clisp.org>
12780         xstrtol-error: Improve comments.
12781         * lib/xstrtol-error.h (xstrtol_fatal): Add parameter names to
12782         declaration.
12784 2023-01-11  Bruno Haible  <bruno@clisp.org>
12786         spawn-pipe tests: Fix test failure on Android.
12787         * tests/test-spawn-pipe-child.c (main): Skip the is_open (STDERR_FILENO)
12788         check on Android.
12790 2023-01-11  Bruno Haible  <bruno@clisp.org>
12792         perror: Fix "perror clobbers strerror's buffer" problem on Android.
12793         * m4/perror.m4 (gl_FUNC_PERROR): Set REPLACE_PERROR to 1 on Android.
12794         * doc/posix-functions/perror.texi: Mention the Android problem.
12796 2023-01-11  Bruno Haible  <bruno@clisp.org>
12798         posix_spawn_file_actions_addfchdir tests: Fix test failure on Android.
12799         * tests/test-posix_spawn-fchdir.c: Include xvasprintf.h.
12800         (test): On Android, use "/proc" instead of "/".
12801         (main): Determine the relative location of the 'pwd' program
12802         accordingly.
12803         * modules/posix_spawn_file_actions_addfchdir-tests (Depends-on): Add
12804         xvasprintf.
12806 2023-01-11  Bruno Haible  <bruno@clisp.org>
12808         rename, renameat, renameatu: Fix test failures on Android/Termux.
12809         * tests/test-rename.h (test_rename): On Android, treat an EACCES failure
12810         like EPERM.
12812 2023-01-11  Bruno Haible  <bruno@clisp.org>
12814         link, linkat tests: Fix test failures on Android/Termux.
12815         * tests/test-link.h (test_link): On Android, treat an EACCES failure
12816         like EPERM.
12817         * tests/test-linkat.c (main): When test_link is marked skipped, skip the
12818         rest of the test as well.
12820 2023-01-11  Bruno Haible  <bruno@clisp.org>
12822         link tests: Correct indentation.
12823         * tests/test-link.h (test_link): Correct indentation.
12825 2023-01-11  Bruno Haible  <bruno@clisp.org>
12827         Fix link errors on Android 4.3.
12828         * lib/asyncsafe-spin.c: Don't use the GCC >= 4.1 builtins on Android,
12829         when building with GCC.
12830         * lib/pthread-spin.c: Likewise.
12831         * lib/simple-atomic.c: Likewise.
12833 2023-01-10  Jim Meyering  <meyering@fb.com>
12835         update-copyright: also work with two or more updatable lines in a file
12836         * build-aux/update-copyright: Replace every occurrence of the copyright
12837         line, not just the first one.
12838         * tests/test-update-copyright.sh: Add a test case for this.
12840 2023-01-10  Bruno Haible  <bruno@clisp.org>
12842         immutable: Fix initialization failure on Android.
12843         * lib/immutable.c: Include "pathmax.h".
12844         (do_init_mmap_file): Use $TMPDIR rather than /tmp, if it is safe.
12845         * modules/immutable (Depends-on): Add pathmax.
12847 2023-01-10  Bruno Haible  <bruno@clisp.org>
12849         Fix some test failures on Android ≥ 11.
12850         * tests/test-fclose.c (main): On Android, avoid triggering the
12851         file-descriptor sanitizer (fdsan).
12852         * tests/test-fdopen.c (main): Likewise.
12853         * tests/test-fflush.c (main): Likewise.
12854         * tests/test-fgetc.c (main): Likewise.
12855         * tests/test-fputc.c (main): Likewise.
12856         * tests/test-fread.c (main): Likewise.
12857         * tests/test-fseeko4.c (main): Likewise.
12858         * tests/test-ftello4.c (main): Likewise.
12859         * tests/test-fwrite.c (main): Likewise.
12861 2023-01-10  Bruno Haible  <bruno@clisp.org>
12863         utimens: Fix warning on Android.
12864         * m4/utimens.m4 (gl_UTIMENS): Test for futimesat and futimes using
12865         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
12867 2023-01-10  Bruno Haible  <bruno@clisp.org>
12869         secure_getenv: Fix warning on Android.
12870         * m4/secure_getenv.m4 (gl_FUNC_SECURE_GETENV): Test for issetugid using
12871         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
12872         * lib/secure_getenv.c: Fix comment regarding issetugid.
12874 2023-01-10  Bruno Haible  <bruno@clisp.org>
12876         renameat, renameatu: Fix warning on Android.
12877         * m4/renameat.m4 (gl_FUNC_RENAMEAT): Test for renameat2 using
12878         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
12880 2023-01-10  Bruno Haible  <bruno@clisp.org>
12882         memset_explicit tests: Fix signature check.
12883         * tests/test-memset_explicit.c: Fix return type in signature check.
12885 2023-01-10  Bruno Haible  <bruno@clisp.org>
12887         math: Fix compilation errors in C++ mode on Android.
12888         * lib/math.in.h: Declare nothing if this file gets included from
12889         /usr/include/c++/v1/math.h too early.
12891 2023-01-10  Bruno Haible  <bruno@clisp.org>
12893         sys_ioctl: Fix compilation error in C++ mode on Android.
12894         * lib/sys_ioctl.in.h (ioctl): Disable _GL_CXXALIASWARN invocation on
12895         non-glibc systems.
12897 2023-01-09  Bruno Haible  <bruno@clisp.org>
12899         threads-h: Improve portability.
12900         * lib/threads.in.h: Use INCLUDE_NEXT_AS_FIRST_DIRECTIVE when possible.
12901         * modules/threads-h (Makefile.am): Substitute
12902         INCLUDE_NEXT_AS_FIRST_DIRECTIVE and NEXT_AS_FIRST_DIRECTIVE_THREADS_H.
12904 2023-01-09  Bruno Haible  <bruno@clisp.org>
12906         threads-h: Fix compilation errors in C++ mode on Android.
12907         * lib/threads.in.h (_GL_ALREADY_INCLUDING_THREADS_H): New macro.
12909 2023-01-09  Bruno Haible  <bruno@clisp.org>
12911         aligned-malloc: Don't disturb the module aligned_alloc.
12912         * modules/aligned-malloc (configure.ac): Test for aligned_alloc in the
12913         same way as module aligned_alloc does.
12915 2023-01-09  Bruno Haible  <bruno@clisp.org>
12917         malloc-h: Improve portability.
12918         * lib/malloc.in.h: Use INCLUDE_NEXT_AS_FIRST_DIRECTIVE when possible.
12919         * modules/malloc-h (Makefile.am): Substitute
12920         INCLUDE_NEXT_AS_FIRST_DIRECTIVE and NEXT_AS_FIRST_DIRECTIVE_MALLOC_H.
12922 2023-01-09  Bruno Haible  <bruno@clisp.org>
12924         reallocarray: Fix compilation error in C++ mode on Android.
12925         * m4/reallocarray.m4 (gl_FUNC_REALLOCARRAY): Use gl_CHECK_FUNCS_ANDROID
12926         instead of AC_CHECK_FUNCS.
12928 2023-01-09  Bruno Haible  <bruno@clisp.org>
12930         getsubopt: Fix compilation error in C++ mode on Android.
12931         * m4/getsubopt.m4 (gl_FUNC_GETSUBOPT): Use gl_CHECK_FUNCS_ANDROID
12932         instead of AC_CHECK_FUNCS_ONCE.
12934 2023-01-09  Bruno Haible  <bruno@clisp.org>
12936         malloc-h: Fix compilation errors in C++ mode on Android.
12937         * lib/malloc.in.h: Don't include <stdlib.h>, except on Solaris and on
12938         HP-UX. Include <stddef.h>. Make _GL_ATTRIBUTE_DEALLOC_FREE work (code
12939         snippet copied from string.in.h and wchar.in.h).
12940         * m4/malloc_h.m4 (gl_MALLOC_H_REQUIRE_DEFAULTS): Invoke
12941         gl_STDLIB_H_REQUIRE_DEFAULTS.
12942         * modules/malloc-h (Depends-on): Add stddef, stdlib.
12943         (Makefile.am): Substitute GNULIB_FREE_POSIX and REPLACE_FREE.
12945 2023-01-09  Bruno Haible  <bruno@clisp.org>
12947         gettime: Fix compilation error in C++ mode on Android.
12948         * m4/gettime.m4 (gl_CHECK_FUNC_TIMESPEC_GET): Also test whether
12949         timespec_get is declared.
12951 2023-01-09  Bruno Haible  <bruno@clisp.org>
12953         malloc-h: Fix compilation error in C++ mode on Android.
12954         * lib/malloc.in.h (_GL_ALREADY_INCLUDING_MALLOC_H): New macro.
12956 2023-01-07  Bruno Haible  <bruno@clisp.org>
12958         timer_time: Rename LIB_TIMER_TIME to TIMER_TIME_LIB.
12959         * m4/timer_time.m4: Rename LIB_TIMER_TIME to TIMER_TIME_LIB.
12960         All uses changed.
12961         * NEWS: Mention the change
12963 2023-01-07  Bruno Haible  <bruno@clisp.org>
12965         setlocale-null: Rename LIB_SETLOCALE_NULL to SETLOCALE_NULL_LIB.
12966         * m4/setlocale_null.m4: Rename LIB_SETLOCALE_NULL to SETLOCALE_NULL_LIB.
12967         All uses changed.
12968         * NEWS: Mention the change
12970 2023-01-07  Bruno Haible  <bruno@clisp.org>
12972         setlocale: Rename LIB_SETLOCALE to SETLOCALE_LIB.
12973         * m4/setlocale.m4: Rename LIB_SETLOCALE to SETLOCALE_LIB.
12974         All uses changed.
12975         * NEWS: Mention the change.
12977 2023-01-07  Bruno Haible  <bruno@clisp.org>
12979         select: Rename LIB_SELECT to SELECT_LIB.
12980         * m4/select.m4: Rename LIB_SELECT to SELECT_LIB.
12981         All uses changed.
12982         * NEWS: Mention the change.
12984 2023-01-07  Bruno Haible  <bruno@clisp.org>
12986         sched_yield: Rename LIB_SCHED_YIELD to SCHED_YIELD_LIB.
12987         * m4/threadlib.m4: Rename LIB_SCHED_YIELD to SCHED_YIELD_LIB.
12988         All uses changed.
12989         * NEWS: Mention the change.
12991 2023-01-07  Bruno Haible  <bruno@clisp.org>
12993         pthread_sigmask: Rename LIB_PTHREAD_SIGMASK to PTHREAD_SIGMASK_LIB.
12994         * m4/pthread_sigmask.m4: Rename LIB_PTHREAD_SIGMASK to
12995         PTHREAD_SIGMASK_LIB.
12996         All uses changed.
12997         * NEWS: Mention the change.
12999 2023-01-07  Bruno Haible  <bruno@clisp.org>
13001         posix_spawn: Rename LIB_POSIX_SPAWN to POSIX_SPAWN_LIB.
13002         * m4/spawn_h.m4: Rename LIB_POSIX_SPAWN to POSIX_SPAWN_LIB.
13003         All uses changed.
13004         * NEWS: Mention the change.
13006 2023-01-07  Bruno Haible  <bruno@clisp.org>
13008         poll: Rename LIB_POLL to POLL_LIB.
13009         * m4/poll.m4: Rename LIB_POLL to POLL_LIB.
13010         All uses changed.
13011         * NEWS: Mention the change.
13013 2023-01-07  Bruno Haible  <bruno@clisp.org>
13015         nanosleep: Rename LIB_NANOSLEEP to NANOSLEEP_LIB.
13016         * m4/nanosleep.m4: Rename LIB_NANOSLEEP to NANOSLEEP_LIB.
13017         All uses changed.
13018         * NEWS: Mention the change.
13020 2023-01-07  Bruno Haible  <bruno@clisp.org>
13022         mbrtowc: Rename LIB_MBRTOWC to MBRTOWC_LIB.
13023         * m4/mbrtowc.m4: Rename LIB_MBRTOWC to MBRTOWC_LIB.
13024         All uses changed.
13025         * NEWS: Mention the change.
13027 2023-01-07  Bruno Haible  <bruno@clisp.org>
13029         hard-locale: Rename LIB_HARD_LOCALE to HARD_LOCALE_LIB.
13030         * modules/hard-locale (configure.ac): Rename LIB_HARD_LOCALE to
13031         HARD_LOCALE_LIB.
13032         All uses changed.
13033         * NEWS: Mention the change.
13035 2023-01-07  Bruno Haible  <bruno@clisp.org>
13037         getrandom: Rename LIB_GETRANDOM to GETRANDOM_LIB.
13038         * m4/getrandom.m4: Rename LIB_GETRANDOM to GETRANDOM_LIB.
13039         All uses changed.
13040         * NEWS: Mention the change.
13042 2023-01-07  Bruno Haible  <bruno@clisp.org>
13044         getlogin, getlogin_r: Rename LIB_GETLOGIN to GETLOGIN_LIB.
13045         * m4/getlogin.m4: Rename LIB_GETLOGIN to GETLOGIN_LIB.
13046         All uses changed.
13047         * NEWS: Mention the change.
13049 2023-01-07  Bruno Haible  <bruno@clisp.org>
13051         gethrxtime: Rename LIB_GETHRXTIME to GETHRXTIME_LIB.
13052         * m4/gethrxtime.m4: Rename LIB_GETHRXTIME to GETHRXTIME_LIB.
13053         All uses changed.
13054         * NEWS: Mention the change.
13056 2023-01-07  Bruno Haible  <bruno@clisp.org>
13058         fdatasync: Rename LIB_FDATASYNC to FDATASYNC_LIB.
13059         * m4/fdatasync.m4: Rename LIB_FDATASYNC to FDATASYNC_LIB.
13060         All uses changed.
13061         * NEWS: Mention the change.
13063 2023-01-07  Bruno Haible  <bruno@clisp.org>
13065         euidaccess: Rename LIB_EACCESS to EUIDACCESS_LIBGEN.
13066         * m4/euidaccess.m4: Rename LIB_EACCESS to EUIDACCESS_LIBGEN.
13067         All uses changed.
13068         * NEWS: Mention the change.
13070 2023-01-07  Bruno Haible  <bruno@clisp.org>
13072         duplocale: Rename LIB_DUPLOCALE to DUPLOCALE_LIB.
13073         * m4/duplocale.m4: Rename LIB_DUPLOCALE to DUPLOCALE_LIB.
13074         All uses changed.
13075         * NEWS: Mention the change.
13077 2023-01-07  Bruno Haible  <bruno@clisp.org>
13079         clock_time: Rename LIB_CLOCK_GETTIME to CLOCK_TIME_LIB.
13080         * m4/clock_time.m4: Rename LIB_CLOCK_GETTIME to CLOCK_TIME_LIB.
13081         All uses changed.
13082         * NEWS: Mention the change.
13084 2023-01-06  Paul Eggert  <eggert@cs.ucla.edu>
13086         file-has-acl: don’t bother setting LIB_HAS_ACL
13087         * m4/acl.m4 (gl_FUNC_ACL, gl_FILE_HAS_ACL): Don’t set LIB_HAS_ACL.
13088         I think only Coreutils and Tar used it, and I’ve updated them.
13090         bootstrap: suppress stray message from --pull
13091         * build-aux/bootstrap: Regenerate.
13092         * top/bootstrap-funclib.sh (autopull): Suggest running autogen.sh
13093         only if it exists (i.e., the package is using autopull.sh/autogen.sh).
13094         Suggest the same name for autogen.sh that is used in the test.
13096 2023-01-05  Bruno Haible  <bruno@clisp.org>
13098         string: Fix compilation errors in C++ mode on Android.
13099         * lib/string.in.h (memrchr, strchrnul, strcasestr): Disable
13100         _GL_CXXALIASWARN invocation on non-glibc systems.
13102 2023-01-05  Bruno Haible  <bruno@clisp.org>
13104         getpass: Fix compilation error on Android.
13105         * m4/getpass.m4 (gl_FUNC_GETPASS): Define NO_INLINE_GETPASS.
13106         * doc/glibc-functions/getpass.texi: Mention the Android problem.
13108 2023-01-05  Bruno Haible  <bruno@clisp.org>
13110         Recognize functions added in future versions of Android.
13111         * m4/gnulib-common.m4 (gl_CHECK_FUNCS_ANDROID): New macro.
13112         * m4/aligned_alloc.m4 (gl_FUNC_ALIGNED_ALLOC): Use
13113         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
13114         * m4/freading.m4 (gl_FUNC_FREADING): Likewise.
13115         * m4/fseterr.m4 (gl_FUNC_FSETERR): Likewise.
13116         * m4/fwriting.m4 (gl_FUNC_FWRITING): Likewise.
13117         * m4/getentropy.m4 (gl_FUNC_GETENTROPY): Likewise.
13118         * m4/getlogin_r.m4 (gl_CHECK_FUNCS_ANDROID): Likewise.
13119         * m4/getrandom.m4 (gl_FUNC_GETRANDOM): Likewise.
13120         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
13121         * m4/spawn_h.m4 (gl_HAVE_POSIX_SPAWN): Likewise.
13122         * doc/glibc-functions/getentropy.texi: Mark function as existing in
13123         Android 9.0.
13124         * doc/glibc-functions/getrandom.texi: Likewise.
13125         * doc/posix-functions/pthread_attr_getinheritsched.texi: Likewise.
13126         * doc/posix-functions/pthread_attr_setinheritsched.texi: Likewise.
13128 2023-01-05  Bruno Haible  <bruno@clisp.org>
13130         copy-file, supersede: Fix link-time requirements.
13131         * modules/copy-file (Link): Add $(LIB_ACL).
13132         * modules/supersede (Link): Likewise.
13134 2023-01-05  Bruno Haible  <bruno@clisp.org>
13136         More systematic naming of LIB variables.
13137         * m4/acl.m4 (gl_FUNC_ACL, gl_FILE_HAS_ACL): Set FILE_HAS_ACL_LIB to the
13138         same value as LIB_HAS_ACL.
13139         * modules/file-has-acl (Link): Use FILE_HAS_ACL_LIB instead of
13140         LIB_HAS_ACL.
13141         * modules/file-has-acl-tests (Makefile.am): Likewise.
13143 2023-01-04  Bruno Haible  <bruno@clisp.org>
13145         doc: Update regarding Android.
13146         * doc/glibc-functions/getdtablesize.texi: Update Android information.
13147         * doc/glibc-functions/wait3.texi: Likewise.
13148         * doc/pastposix-functions/ftime.texi: Likewise.
13149         * doc/pastposix-functions/index.texi: Likewise.
13150         * doc/pastposix-functions/pthread_attr_getstackaddr.texi: Likewise.
13151         * doc/pastposix-functions/pthread_attr_setstackaddr.texi: Likewise.
13152         * doc/pastposix-functions/wcswcs.texi: Likewise.
13154 2023-01-03  Bruno Haible  <bruno@clisp.org>
13156         ffsl, ffsll: Fix compilation error on Android.
13157         * lib/string.in.h: On Android as well, include <strings.h>.
13158         * m4/ffsl.m4 (gl_FUNC_FFSL): Use a specific link test instead of
13159         AC_CHECK_FUNCS_ONCE.
13160         * m4/ffsll.m4 (gl_FUNC_FFSLL): Likewise.
13161         * doc/glibc-functions/ffsl.texi: Mention Android problems.
13162         * doc/glibc-functions/ffsll.texi: Likewise.
13164         ffs: Document Android problem.
13165         * doc/posix-functions/ffs.texi: Mention Android problem.
13166         * m4/ffs.m4: Update comment.
13168 2023-01-03  Bruno Haible  <bruno@clisp.org>
13170         stdio: Fix error in C++ mode on Android, due to putw.
13171         * lib/stdio.in.h (putw): Don't declare in the C++ namespace if putw is
13172         not declared.
13173         * m4/stdio_h.m4 (gl_STDIO_H): Test whether putw is declared.
13174         (gl_STDIO_H_DEFAULTS): Initialize HAVE_DECL_PUTW.
13175         * modules/stdio (Makefile.am): Substitute HAVE_DECL_PUTW.
13176         * doc/glibc-functions/putw.texi: Update regarding Android.
13178 2023-01-03  Bruno Haible  <bruno@clisp.org>
13180         stdio: Fix error in C++ mode on Android, due to getw.
13181         * lib/stdio.in.h (getw): Don't declare in the C++ namespace if getw is
13182         not declared.
13183         * m4/stdio_h.m4 (gl_STDIO_H): Test whether getw is declared.
13184         (gl_STDIO_H_DEFAULTS): Initialize HAVE_DECL_GETW.
13185         * modules/stdio (Makefile.am): Substitute HAVE_DECL_GETW.
13187 2023-01-02  Bruno Haible  <bruno@clisp.org>
13189         sigsegv: Fix compilation error on Android 4.3.
13190         * lib/sigsegv.in.h: For Android, don't include <ucontext.h> and don't
13191         reference ucontext_t.
13192         * lib/sigsegv.c (SIGSEGV_FAULT_): For Android, use a plain POSIX fault
13193         handler (cf. libsigsegv/src/fault-posix.h).
13195 2023-01-01  Paul Eggert  <eggert@cs.ucla.edu>
13197         dfa: work around Clang 15 bug
13198         Problem reported by Kenton Groombridge in:
13199         https://lists.gnu.org/archive/html/bug-gawk/2022-12/msg00010.html
13200         On x86-64, Clang 15 gets confused by a call (X ? dfaerror :
13201         dfawarn) (Y) and generates the wrong code, presumably because
13202         dfaerror is _Noreturn and dfawarn is not.
13203         * lib/dfa.c (parse_bracket_exp): Reword to have one call for
13204         dfaerror, the other for dfawarn.
13206 2023-01-01  Bruno Haible  <bruno@clisp.org>
13208         doc: Update regarding stable branches.
13209         * doc/gnulib-readme.texi (Stable Branches): Mention new branch
13210         stable-202301. Mention that stable-202201 is no longer updated.
13212 2022-12-31  Paul Eggert  <eggert@cs.ucla.edu>
13214         maint: use UTC when updating copyright date
13215         Problem reported by Simon Josefsson in:
13216         https://lists.gnu.org/r/bug-gnulib/2022-12/msg00125.html
13217         * Makefile (COPYRIGHT_TZ): New macro.
13218         (update-copyright): Use it.
13220 2022-12-28  Paul Eggert  <eggert@cs.ucla.edu>
13222         assert-h: port static_assert to strict C99
13223         * lib/verify.h (_GL_VERIFY): Port MSVC hack back to C99.
13224         Problem found when testing bleeding-edge gzip on IBM XL C for AIX,
13225         V12.1 (5765-J02, 5725-C72), which complained ‘"malloca.c", line
13226         42.56: 1506-041 (E) The invocation of macro _Static_assert
13227         contains fewer arguments than are required by the macro
13228         definition.’  This diagnostic is valid because C99 requires
13229         that if you #define _Static_assert(R, ...) you must call
13230         _Static_assert with at least two arguments.  I found a similar
13231         problem with Sun C 5.9 SunOS_sparc Patch 124867-12 2009/11/22.
13233 2022-12-27  Paul Eggert  <eggert@cs.ucla.edu>
13235         file-has-acl: fix recently-introduced NFSv4 bug
13236         * lib/file-has-acl.c (acl_nfs4_nontrivial): Fix off-by-one
13237         error when rounding WHOLEN up to next multiple of 4.
13238         Pacify GCC 12.2.1 -Wcast-align.
13240         Add --pull, --gen options to build-aux/bootstrap
13241         This supports a single bootstrap script with --pull and --gen
13242         options, as an alternative to separate autogen.sh and autopull.sh
13243         and bootstrap-funclib.sh auxiliary files.
13244         * top/bootstrap: With --version, also output library version.
13245         Support update of package that has only the bootstrap script,
13246         and not the other three files.
13248         Support packages with just 'bootstrap'
13249         * top/bootstrap: With --version, also output library version.
13250         Support update of package that has only the bootstrap script,
13251         and not the other three files.
13253         * top/bootstrap-funclib.sh (scriptlibversion): Rename
13254         from scriptversion.  All uses changed.  This way we
13255         can distinguish script from script library versions.
13256         (upgrade_bootstrap): If the package currently has only
13257         the bootstrap script, just update that.
13259         Bootstrap with functions, not scripts
13260         * top/bootstrap: Use autopull and autogen functions, not
13261         shell scripts.  This lets build-aux/bootstrap become a
13262         standalone script.  It does not change the behavior of
13263         top/bootstrap, except for minor rewording of disagnostics.
13265         Make autopull a shell function too
13266         This does not change behavior.  It is helpful for future changes.
13267         * top/autopull.sh: Call autopull to do the actual work.
13268         (usage, download_po_files, update_po_files):
13269         Move to top/bootstrap-funclib.sh.
13270         * top/bootstrap-funclib.sh (autopull_usage): Rename from ‘usage’.
13271         (autopull): New function, containing the top level of the
13272         old top/autopull.sh.
13274         Make autogen a shell function too
13275         This does not change behavior.  It is helpful for future changes.
13276         * top/autogen.sh: Call autogen to do the actual work.
13277         (usage, version_controlled_file, gitignore_entries, insert_if_absent):
13278         (insert_vc_ignore, symlink_to_dir): Move to top/bootstrap-funclib.sh.
13279         * top/bootstrap-funclib.sh (autogen_usage): Rename from ‘usage’.
13280         (autogen): New function, containing the top level of the
13281         old top/autogen.sh.
13283 2022-12-27  Bruno Haible  <bruno@clisp.org>
13285         Fix compilation errors in C++ mode on Solaris 11 OpenIndiana.
13286         * m4/gnulib-common.m4 (gl_COMMON_BODY): In _GL_ATTRIBUTE_DEALLOC_FREE,
13287         with GNU C++, cast the 'free' function.
13288         * lib/string.in.h (_GL_ATTRIBUTE_DEALLOC_FREE): With GNU C++, cast the
13289         'free' function.
13290         * lib/wchar.in.h (_GL_ATTRIBUTE_DEALLOC_FREE): Likewise.
13292 2022-12-27  Bruno Haible  <bruno@clisp.org>
13294         stdnoreturn: Mark as deprecated, not obsolete. (Regression 2022-12-24.)
13295         * modules/stdnoreturn (Status): Remove.
13296         (Notice): Say that it is deprecated, not obsolete.
13297         * doc/noreturn.texi: Fix a typo.
13299 2022-12-26  Paul Eggert  <eggert@cs.ucla.edu>
13301         stdbool-c99: fix typo
13302         Reported against Autoconf by Todd C. Miller in:
13303         https://lists.gnu.org/r/autoconf/2022-12/msg00001.html
13304         * m4/stdbool.m4 (AC_CHECK_HEADER_STDBOOL): Sync from Autoconf master.
13306 2022-12-26  Bruno Haible  <bruno@clisp.org>
13308         ctime: Mark as deprecated, not obsolete. (Regression 2022-12-21.)
13309         * modules/ctime (Status): Remove.
13310         (Notice): Say that it is deprecated, not obsolete.
13312 2022-12-25  Paul Eggert  <eggert@cs.ucla.edu>
13314         largefile: sync from Autoconf master
13315         * m4/largefile.m4 (gl_SET_LARGEFILE_SOURCE): Test whether
13316         AC_SYS_YEAR2038 is defined when this macro is defined, not when it
13317         is used, as we now define AC_SYS_YEAR2038 later.
13318         (_AC_SYS_LARGEFILE_MACRO_VALUE): Remove.
13319         (_AC_SYS_YEAR2038_TEST_CODE, _AC_SYS_YEAR2038_OPTIONS)
13320         (_AC_SYS_YEAR2038_PROBE, _AC_SYS_YEAR2038_ENABLE)
13321         (_AC_SYS_YEAR2038_OPT_IN, AC_SYS_YEAR2038)
13322         (_AC_SYS_LARGEFILE_TEST_CODE, _AC_SYS_LARGEFILE_OPTIONS)
13323         (_AC_SYS_LARGEFILE_PROBE, _AC_SYS_LARGEFILE_ENABLE): New macros.
13324         (AC_SYS_LARGEFILE): Use them.
13325         * m4/year2038.m4: Remove.  All mentions removed.
13326         * modules/largefile, modules/year2038 (configure.ac-early):
13327         Do not require gl_YEAR2038_EARLY.
13328         * modules/year2038 (Depends-on): Depend on largefile.
13329         (configure.ac): Require AC_SYS_YEAR2038, not gl_YEAR2038.
13331 2022-12-24  Paul Eggert  <eggert@cs.ucla.edu>
13333         extensions: enable some C23 Annex F functions
13334         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS):
13335         Also define __STDC_WANT_IEC_60559_EXT__, for C23 Annex F
13336         functions like totalorder.  This syncs from Autoconf master.
13338         stdnoreturn: deprecate
13339         C23 says <stdnoreturn.h> is obsolescent, so deprecate the
13340         stdnoreturn module.  I don't think it was being used anyway
13341         as it had too many problems.
13342         * modules/stdnoreturn: Mark as obsolete.
13344 2022-12-23  Paul Eggert  <eggert@cs.ucla.edu>
13346         file-has-acl: improve recent NFSv4 support
13347         This fixes a link failure with emacsclient on GNU/Linux.  This
13348         program wants file_has_acl but none of the other ACL primitives,
13349         so it doesn’t link acl-internal.o; this way it doesn’t need to
13350         link with -lacl.  While I was at it I reviewed the recent changes,
13351         fixed some unlikely overflow bugs, and adjusted to GNU style.
13352         * doc/acl-nfsv4.txt: Remove.  Its contents are now in a
13353         comment in lib/file-has-acl.c.
13354         * lib/acl-internal.c, lib/acl-internal.h: Move recent changes
13355         relating to acl_nfs4_nontrivial to lib/file-has-acl.c, so that
13356         there is no trouble linking programs that need only file_has_acl.
13357         * lib/file-has-acl.c (acl_nfs4_nontrivial): Move here from
13358         lib/acl-internal.c, so that we needn't link -lacl in
13359         programs that want only file_has_acl, such as emacsclient.
13360         Do not assume a char buffer is aligned for uint32_t.
13361         Check more carefully for buffer read overrun.
13362         Allow up to 6 ACEs, since other code does; but check
13363         that they’re distinct.  Avoid integer overflow.
13364         Use memcmp rather than strncmp to compare memory blocks.
13365         (file_has_acl): Preserve initial errno instead of setting to 0.
13366         Allocate a bit more room for trivial ACL buffer.
13367         Use EINVAL for botchedk NFSv4 ACLs (which shouldn’t happen).
13369 2022-12-22  Paul Eggert  <eggert@cs.ucla.edu>
13371         posix_spawnp-tests: fix filename typo
13372         Problem reported for GNU m4 by Mitchell Dorrell in:
13373         https://lists.gnu.org/r/bug-m4/2022-12/msg00000.html
13374         * tests/test-posix_spawnp-script.c (DATA_FILENAME):
13375         Fix typo in file name that caused race with
13376         test-posix_spawn-script.c.
13378 2022-12-22  Ondrej Valousek  <ondrej.valousek.xm@renesas.com>
13380         file-has-acl: Basic support for checking NFSv4 ACLs in Linux.
13381         * lib/acl-internal.h (acl_nfs4_nontrivial): New declaration.
13382         * lib/acl-internal.c (acl_nfs4_nontrivial): New function.
13383         * lib/file-has-acl.c: Include <arpa/inet.h>.
13384         (XATTR_NAME_NFSV4_ACL, TRIVIAL_NFS4_ACL_MAX_LENGTH): New macros.
13385         (file_has_acl): Test for NFSv4 ACLs.
13386         * doc/acl-nfsv4.txt: New file.
13388 2022-12-21  Paul Eggert  <eggert@cs.ucla.edu>
13390         Port __has_c_attribute to strict C23
13391         * m4/gnulib-common.m4 (_GL_HAS_C_ATTRIBUTE): Remove, as C23 says
13392         behavior is undefined if __has_c_attribute appears anywhere other
13393         than at the top level of an #if or #ifdef.  All uses replaced by
13394         wordier invocations of __has_c_attribute.
13396         asctime, ctime: deprecate
13397         C23 deprecates asctime and ctime, so deprecate them in Gnulib too.
13398         * NEWS, doc/posix-functions/asctime.texi:
13399         * doc/posix-functions/ctime.texi: Mention this.
13400         * lib/time.in.h (ctime): Deprecate any ctime replacement.
13401         * modules/ctime: Now obsolete.
13403 2022-12-17  Paul Eggert  <eggert@cs.ucla.edu>
13405         memset_explicit: port to older MS-Windows
13406         * lib/memset_explicit.c (memset_explicit):
13407         Remove special case for C==0 and MS-Windows.  The code isn’t
13408         needed for correctness and it’s more trouble than it’s worth as it
13409         prevents this module from being used with GNU Emacs, which wants
13410         to port to MS-Windows versions so old that they lack
13411         SecureZeroMemory.
13413 2022-12-09  Bruno Haible  <bruno@clisp.org>
13415         Update users.txt.
13416         * users.txt: Add lbzip2.
13418 2022-12-09  Paul Eggert  <eggert@cs.ucla.edu>
13420         fts: make debug version compilable again
13421         This fixes things in what I hope is a better way than the
13422         fd-only approach proposed by Kamil Dudka here:
13423         https://lists.gnu.org/archive/html/bug-gnulib/2018-03/msg00079.html
13424         https://lists.gnu.org/archive/html/bug-gnulib/2018-03/msg00080.html
13425         * lib/fts.c (GNULIB_FTS_DEBUG): Rename from FTS_DEBUG,
13426         to avoid collision with coreutils symbol.
13427         Do not include <stdint.h> (not needed, since we include <stdint.h>)
13428         or "getcwdat.h" (no longer exists).
13429         (fd_ring_check, fd_ring_print): Add forward decls.
13430         (struct devino): New type.
13431         (PRINT_DEVINO): New macro.
13432         (getdevino): New static function.
13433         (fd_ring_print): Do nothing if not debugging.
13434         (fd_ring_print, fd_ring_check): Use getdevino instead of getcwdat.
13435         The output isn’t as good, but at least it compiles and runs.
13437 2022-12-07  Paul Eggert  <eggert@cs.ucla.edu>
13439         verify: update __STDC_VERSION__ as per C23
13440         This shouldn’t affect anything; it’s merely a refactoring.
13441         * lib/verify.h (_GL_HAVE__STATIC_ASSERT1): Require
13442         __STDC_VERSION__ to be at least 202311, instead of at least
13443         202000.  The latter number was put in in 2019 because we didn’t
13444         yet know C23’s __STDC_VERSION__ value.
13446 2022-12-06  Paul Eggert  <eggert@cs.ucla.edu>
13448         fts: fix race + mishandling of fstatat failure
13449         I hope this fixes a Luke Dashjr coreutils bug report about ext4
13450         ramdisks; see “9.1: du Aborted (corrupt filesystem)”
13451         <https://debbugs.gnu.org/59821>.
13452         * lib/fts.c (fts_build): Fix two bugs.  First, fts_stat was being
13453         called without checking its return value, causing a later abort.
13454         Second, there was a race between opening a directory and statting
13455         it, fixed by using fstat on the file descriptor rather than
13456         fstatat on the directory name.
13458         fts: omit goto break_without_closedir
13459         * lib/fts.c (fts_build): Refactor to omit goto.
13461         fts: clarify ISSET
13462         * lib/fts.c (ISSET): Refactor to clarify boolean usage.
13464 2022-12-05  Bruno Haible  <bruno@clisp.org>
13466         argp: Correct documentation.
13467         Reported by José E. Marchesi <jemarch@gnu.org>.
13468         * doc/glibc-functions/argp_*.texi: Mention the 'argp' module.
13470 2022-12-02  Pádraig Brady  <P@draigBrady.com>
13472         doc: poll: document poll of special files not supported on macOS
13473         * doc/posix-functions/poll.texi: Reinstate (updated) macOS info,
13474         removed in recent cleanup re removal of support for Mac OS X <= 10.4.
13475         * m4/poll.m4: Update macOS to latest tested version.
13477 2022-11-29  Pádraig Brady  <P@draigBrady.com>
13479         add new ronna and quetta SI prefixes
13480         As voted for in Nov 2022 by the BIPM:
13481         https://www.bipm.org/en/cgpm-2022/resolution-3
13483         * lib/human.c: Add Ronna (10^27), and Quetta (10^30) to the prefix list.
13484         * lib/xstrtol.c (__xstrtol): Likewise.
13486 2022-11-29  Bruno Haible  <bruno@clisp.org>
13488         Update users.txt.
13489         * users.txt: Add 4ti2, ale, amanda, binfmt-support, cgminer, collectd,
13490         complexity, dc3dd, dico, enchant-2, fuse-overlayfs, gsequencer, idutils,
13491         libu2f-host, licenseutils, mmv, pacemaker, trader, ttfautohint.
13493 2022-11-27  Paul Eggert  <eggert@cs.ucla.edu>
13495         explicit_bzero: implement via memset_explicit
13496         * lib/explicit_bzero.c (explicit_bzero):
13497         Simplify by just calling memset_explicit.
13498         * m4/explicit_bzero.m4 (gl_PREREQ_EXPLICIT_BZERO): Remove.
13499         All uses removed.
13500         * modules/explicit_bzero (Depends-on): Add memset_explicit.
13502         explicit_bzero: memset_explicit is standard
13503         * doc/glibc-functions/explicit_bzero.texi:
13504         Say that memset_explicit is preferred in new code.
13506         read-file: use memset_explicit
13507         * lib/read-file.c (fread_file, read_file):
13508         Use memset_explicit instead of explicit_bzero.
13509         * modules/read-file (Depends-on): Depend on memset_explicit
13510         instead of on explicit_bzero.
13512         memset_explicit: new module
13513         * doc/posix-functions/memset_explicit.texi, lib/memset_explicit.c:
13514         * m4/memset_explicit.m4, modules/memset_explicit:
13515         * modules/memset_explicit-tests, tests/test-memset_explicit.c:
13516         New files.
13517         * lib/string.in.h (memset_explict): New decl.
13518         * m4/string_h.m4 (gl_STRING_H, gl_STRING_H_REQUIRE_DEFAULTS)
13519         (gl_STRING_H_DEFAULTS):
13520         * modules/string (string.h):
13521         Support memset_explicit.
13523         explicit_bzero: add poison
13524         * m4/string_h.m4 (gl_STRING_H): Poison explicit_bzero.
13525         This was inadvertently omitted when explicit_bzero was added.
13527 2022-11-27  Arsen Arsenović  <arsen@aarsen.me>
13529         bootstrap: Fix --help output.
13530         * build-aux/bootstrap (usage): Regenerate.
13532 2022-11-27  Paul Eggert  <eggert@cs.ucla.edu>
13534         explicit_bzero: work with gcc -std=c99
13535         * lib/explicit_bzero.c (explicit_bzero) [__GNUC__ && !__clang__]:
13536         Use __asm__ instead of asm.
13538 2022-11-26  Paul Eggert  <eggert@cs.ucla.edu>
13540         Prefer "kill -INT" to killing with a number
13541         * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK):
13542         * tests/test-login_tty.c (main):
13543         * tests/test-pthread_sigmask1.c (main):
13544         * tests/test-sigprocmask.c (main):
13545         Prefer "kill -INT" to "kill -N" where N is SIGINT’s value.
13546         Don’t assume pid_t fits in int.
13548 2022-11-25  Bruno Haible  <bruno@clisp.org>
13550         In 'trap' commands, prefer symbolic to numeric signal names.
13551         Reported by Mike Fulton <fultonm@ca.ibm.com> in
13552         <https://lists.gnu.org/archive/html/bug-gnulib/2022-11/msg00130.html>.
13553         * gnulib-tool: Use symbolic signal names.
13554         * posix-modules: Likewise.
13555         * MODULES.html.sh: Likewise.
13556         * build-aux/bootstrap (prepare_GNULIB_SRCDIR): Likewise.
13557         * build-aux/csharpcomp.sh.in: Likewise.
13558         * build-aux/gnu-web-doc-update: Likewise.
13559         * top/autogen.sh: Likewise.
13560         * top/bootstrap-funclib.sh: Likewise.
13561         * top/gitsub.sh: Likewise.
13562         * lib/t-idcache: Likewise.
13563         * tests/havelib/rpath-1: Likewise.
13564         * tests/havelib/rpath-2_a: Likewise.
13565         * tests/havelib/rpath-2_b: Likewise.
13566         * tests/havelib/rpath-3_a: Likewise.
13567         * tests/havelib/rpath-3_b: Likewise.
13568         * tests/init.sh: Likewise.
13569         * tests/test-binary-io.sh: Likewise.
13570         * tests/test-c-stack.sh: Likewise.
13571         * tests/test-c-stack2.sh: Likewise.
13572         * tests/test-dprintf-posix.sh: Likewise.
13573         * tests/test-fpending.sh: Likewise.
13574         * tests/test-fprintf-posix.sh: Likewise.
13575         * tests/test-lseek.sh: Likewise.
13576         * tests/test-printf-posix.sh: Likewise.
13577         * tests/test-select-in.sh: Likewise.
13578         * tests/test-select-out.sh: Likewise.
13579         * tests/test-sigpipe.sh: Likewise.
13580         * tests/test-tsearch.sh: Likewise.
13581         * tests/test-update-copyright.sh: Likewise.
13582         * tests/test-vdprintf-posix.sh: Likewise.
13583         * tests/test-vfprintf-posix.sh: Likewise.
13584         * tests/test-vprintf-posix.sh: Likewise.
13585         * tests/test-xprintf-posix.sh: Likewise.
13586         * tests/uniwidth/test-uc_width2.sh: Likewise.
13588 2022-11-20  Bruno Haible  <bruno@clisp.org>
13590         posix_spawn-internal: Avoid warning on macOS.
13591         Suggested by Minsoo Choo in
13592         <https://lists.gnu.org/archive/html/bug-gnulib/2022-11/msg00114.html>.
13593         * lib/spawni.c: Ignore -Wdeprecated-declarations warnings.
13595 2022-11-20  Bruno Haible  <bruno@clisp.org>
13597         posix_spawn tests: Fix compilation error (regression 2022-09-14).
13598         * modules/posix_spawn-tests (Makefile.am): Augment DEFS, to define
13599         EXEEXT.
13601 2022-11-14  Paul Eggert  <eggert@cs.ucla.edu>
13603         parse-datetime: improve doc formatting, timeliness
13604         * doc/parse-datetime.texi: Use @samp and @code in menus
13605         for consistenty with how the Coreutils manual will do
13606         this sort of thing.  Update examples to this year.
13608 2022-11-13  Simon Josefsson  <simon@josefsson.org>
13610         vc-list-files-tests: Avoid OpenPGP private key operations.
13611         * tests/test-vc-list-files-git.sh (GIT_CONFIG_GLOBAL): Set it to
13612         /dev/null.
13614 2022-11-03  Bruno Haible  <bruno@clisp.org>
13616         dynarray: Rename to glibc-internal/dynarray.
13617         * modules/glibc-internal/dynarray: Renamed from modules/dynarray.
13618         * modules/glibc-internal/dynarray-tests: Renamed from
13619         modules/dynarray-tests.
13620         * modules/regex (Depends-on): Update.
13621         * NEWS: Mention this change and the previous one.
13623 2022-11-03  Bruno Haible  <bruno@clisp.org>
13625         scratch_buffer: Rename to glibc-internal/scratch_buffer.
13626         * modules/glibc-internal/scratch_buffer: Renamed from
13627         modules/scratch_buffer.
13628         * modules/glibc-internal/scratch_buffer-tests: Renamed from
13629         modules/scratch_buffer-tests.
13630         * modules/canonicalize (Depends-on): Update.
13631         * modules/canonicalize-lgpl (Depends-on): Likewise.
13632         * modules/glob (Depends-on): Likewise.
13634 2022-11-02  Bruno Haible  <bruno@clisp.org>
13636         scratch_buffer: Document last change.
13637         * NEWS: Mention last change.
13639 2022-11-02  Paul Eggert  <eggert@cs.ucla.edu>
13641         scratch_buffer: adjust to glibc changes
13642         Problem reported by Karl Berry in:
13643         https://lists.gnu.org/r/bug-gnulib/2022-11/msg00004.html
13644         * build-aux/depcomp, doc/make-stds.texi, lib/malloc/scratch_buffer.h:
13645         Autoupdate.
13646         * build-aux/install-reloc (func_create_wrapper):
13647         Omit removed file scratch_buffer_dupfree.c.
13648         * config/srclist.txt: Remove lib/malloc/scratch_buffer_dupfree.c
13649         * lib/canonicalize-lgpl.c: Merge changes from glibc through its
13650         commit ef0700004bf0dccf493a5e8e21f71d9e7972ea9f dated 2022-07-05
13651         11:04:45 +0200.
13652         (__strdup) [!_LIBC]: New macro.
13653         (struct realpath_bufs): New type.
13654         (realpath_stk): Use it as the extra argument.  All uses changed.
13655         No longer any need for noinline or GCC_BOGUS_WRETURN_LOCAL_ADDR.
13656         * lib/canonicalize.c (struct realpath_bufs)
13657         (canonicalize_filename_mode_stk): Likewise.
13658         * lib/malloc/scratch_buffer_dupfree.c:
13659         Remove, since it was removed in glibc.
13660         * lib/scratch_buffer.h (scratch_buffer_dupfree) [0]:
13661         (__libc_scratch_buffer_dupfree): Remove decls.
13662         * modules/relocatable-prog-wrapper (Files):
13663         * modules/scratch_buffer (Files, lib_SOURCES):
13664         Remove lib/malloc/scratch_buffer_dupfree.c.
13666 2022-11-01  Bruno Haible  <bruno@clisp.org>
13668         relocatable-script: Relax license.
13669         * modules/relocatable-script (License): Change to GPLv2+.
13670         * build-aux/relocatable.sh.in: Change copyright header to GPLv2+.
13672 2022-10-31  Simon Josefsson  <simon@josefsson.org>
13674         maintainer-makefile: Fix Apple Xcode 'make syntax-check'.
13675         * top/maint.mk (sc_indent): Don't use non-GNU indent.
13677 2022-10-30  Paul Eggert  <eggert@cs.ucla.edu>
13679         thread: pacify gcc -Wbad-function-cast
13680         * lib/glthread/thread.h (gl_thread_self_pointer): With POSIX
13681         threads, cast the call to gl_thread_t before casting to void *.
13683         test-getlogin: pacify gcc -Wshadow
13684         * tests/test-getlogin.h (test_getlogin_result): Rename local.
13686 2022-10-25  Simon Josefsson  <simon@josefsson.org>
13688         gendocs: Output timestamp in English.
13689         * build-aux/gendocs.sh (SETLANG): Add LC_TIME= for "date".
13691 2022-10-23  Bruno Haible  <bruno@clisp.org>
13693         assert-h: Make static_assert work on Solaris 11.4.
13694         * m4/assert_h.m4 (gl_ASSERT_H): After including <assert.h>, on Solaris,
13695         redefine static_assert.
13697 2022-10-16  Bruno Haible  <bruno@clisp.org>
13699         getdelim: Work around buggy implementation on macOS 10.13.
13700         * doc/posix-functions/getdelim.texi: Mention the macOS bug.
13701         * m4/getdelim.m4 (gl_FUNC_GETDELIM): Let the "checking for working
13702         getdelim function" test answer 'no' on macOS.
13704 2022-10-15  Bruno Haible  <bruno@clisp.org>
13706         Update to Unicode 15.0.0.
13708         * lib/gen-uni-tables.c (is_property_default_ignorable_code_point):
13709         Exclude 0x13439..0x1343F.
13710         (get_lbp): Update such that unilbrk/lbrkprop.txt comes out as expected.
13712         * All generated files under lib/uni* and tests/uni*: Regenerate.
13713         * tests/uniname/NameAliases.txt: Update.
13714         * tests/uniname/UnicodeData.txt: Update.
13715         * tests/uninorm/NormalizationTest.txt: Update.
13716         * tests/unigbrk/GraphemeBreakTest.txt: Update.
13717         * tests/uniwbrk/WordBreakTest.txt: Update.
13719         * tests/uniwidth/test-uc_width2.sh: Expect width 0 for the characters
13720         0x0ECE, 0x10EFD..0x10EFF, 0x11241, 0x11F00..0x11F01, 0x11F36..0x11F3A,
13721         0x11F40, 0x11F42, 0x13439..0x13440, 0x13447..0x13455, 0x1E08F,
13722         0x1E4EC..0x1E4EF.
13724         * All the affected modules: Bump required libunistring version.
13726 2022-10-15  Bruno Haible  <bruno@clisp.org>
13728         gen-uni-tables: Temporarily revert last change.
13729         * lib/gen-uni-tables.c: Include <stdbool.h>, unless the C compiler
13730         advertises compliance to ISO C 23.
13732 2022-10-12  Paul Eggert  <eggert@cs.ucla.edu>
13734         doc: improve intprops doc
13735         * doc/intprops.texi: Tighten up wording, by saying that macros
13736         "yield 1 if X, 0 otherwise" rather than the weaker "yield 1 if X".
13737         Say "yield" rather than "return" since the macros are not
13738         functions.  Say "1" and "0" rather than "true" and "false" since
13739         the macros yield int.  Say that stdckdint.h is the standard
13740         alternative to the _WRAPV macros.  Mention another source of
13741         problems with the _OVERFLOW macros.
13743 2022-10-10  Paul Eggert  <eggert@cs.ucla.edu>
13745         tests: prefer stdckdint to intprops
13746         * modules/chown-tests, modules/fchownat-tests:
13747         * modules/fdutimensat-tests, modules/futimens-tests:
13748         * modules/lchown-tests, modules/stat-time-tests:
13749         * modules/utime-tests, modules/utimens-tests:
13750         * modules/utimensat-tests:
13751         (Depends on): Depend on stdckint, not intprops.
13752         * tests/nap.h: Include stdckdint.h, not intprops.h.
13753         All macro uses changed.
13755         stat-time: prefer stdckdint to intprops
13756         * lib/stat-time.h: Include stdckdint.h instead of intprops.h.
13757         (stat_time_normalize): Use ckd_add instead of INT_ADD_WRAPV.
13758         * modules/stat-time (Depends-on): Depend on stdckdint, not intprops.
13760         xalloc: remove stray includes + dependencies
13761         These used to be needed, but are not needed now.
13762         * lib/xalloc.h: Do not include stdlib.h.
13763         [GNULIB_XALLOC]: Do not include "intprops.h".
13764         * lib/xmalloc.c: Include stdint.h here instead, for SIZE_MAX.
13765         * modules/xalloc-die, modules/xvasprintf (Depends-on): Remove stdint.
13767 2022-09-30  Paul Eggert  <eggert@cs.ucla.edu>
13769         assert-h: suppress Apple clang 13 false alarms
13770         * m4/assert_h.m4 (gl_ASSERT_H): Suppress bogus warnings from Apple
13771         clang 13 (clang-1300.0.29.30).  Problem privately reported by
13772         Mattias Engdegård for GNU Emacs.
13774 2022-09-26  Daiki Ueno  <ueno@gnu.org>
13776         largefile: fix detection of time_t size on mingw32
13777         * modules/largefile (configure.ac-early): Ensure gl_YEAR2038_EARLY
13778         is invoked before gl_YEAR2038_BODY.
13780 2022-09-25  Paul Eggert  <eggert@cs.ucla.edu>
13782         fts: fix errno handling if dirfd fails
13783         * lib/fts.c (fts_build): Use proper errno if dirfd failed.
13784         Although I don’t know of any platform where dirfd can fail here,
13785         we might as well get it right.
13787 2022-09-25  Bruno Haible  <bruno@clisp.org>
13789         stdbool: Mostly revert last patch.
13790         * m4/c-bool.m4 (gl_C_BOOL): If stdbool.h does not exist, just err out.
13791         * modules/stdbool (Files): Remove m4/stdbool.m4.
13793 2022-09-24  Bruno Haible  <bruno@clisp.org>
13795         stdbool: Don't #include a gnulib-generated stdbool.h from config.h.
13796         * m4/c-bool.m4 (gl_C_BOOL): Check for stdbool.h and for _Bool. If
13797         stdbool.h does not exist, don't #include <stdbool.h> but instead put the
13798         substitute code into config.h.
13799         * modules/stdbool (Files): Add m4/stdbool.m4.
13801 2022-09-24  Bruno Haible  <bruno@clisp.org>
13803         stdalign: Don't #include a gnulib-generated stdalign.h from config.h.
13804         * m4/stdalign.m4 (gl_STDALIGN_H): Check for stdalign.h. If it does not
13805         exist, don't #include <stdalign.h> but instead put the substitute code
13806         into config.h.
13808 2022-09-24  Bruno Haible  <bruno@clisp.org>
13810         stdalign: Fix compilation error with MSVC in C++ mode.
13811         * lib/stdalign.in.h: Treat MSVC in C++ mode like C++11 compliant
13812         compilers.
13813         * tests/test-stdalign-c++.cc: Include some other header files.
13815         stdalign: Avoid namespace pollution.
13816         * lib/stdalign.in.h (_GL_STDALIGN_NEEDS_STDDEF): New macro.
13817         Include <stddef.h> only when needed.
13819 2022-09-23  Simon Josefsson  <simon@josefsson.org>
13821         warnings, manywarnings: Doc fixes.
13822         * doc/manywarnings.texi (manywarnings): Improve usage instruction.
13823         Start list of comments on particular warning flags, based on
13824         comment from Paul Eggert <eggert@cs.ucla.edu>.
13825         * doc/warnings.texi (warnings): Mention that it is often used with manywarnings.
13827 2022-09-21  Paul Eggert  <eggert@cs.ucla.edu>
13829         assert-h: suppress clang false alarms
13830         Suppress scads of annoying warnings from clang version 14.0.5
13831         (Fedora 14.0.5-1.fc36) of the form "warning: '_Static_assert' with
13832         no message is a C2x extension [-Wc2x-extensions]",
13833         by refusing to use single-arg static_assert with older clang.
13834         * m4/assert_h.m4 (gl_ASSERT_H): Turn -Wc2x-extensions from a
13835         warning into an error when testing static_assert, so that the
13836         annoying diagnostic causes the test to fail, which causes assert.h
13837         to be replaced in a way that suppresses the diagnostic during
13838         the real build.
13840 2022-09-20  Bruno Haible  <bruno@clisp.org>
13842         Add another helper script for creating testdirs.
13843         * all-modules: New file, based on posix-modules.
13845 2022-09-20  Bruno Haible  <bruno@clisp.org>
13847         snippet/warn-on-use: Don't cause wrong AC_CHECK_DECL results with clang.
13848         * m4/warn-on-use.m4 (gl_WARN_ON_USE_PREPARE): Use the clang command-line
13849         option that disables implicit built-in function declarations in clang.
13851 2022-09-19  Bruno Haible  <bruno@clisp.org>
13853         stdbool, stdbool-c99 tests: Fix compilation error with clang/MSVC.
13854         * tests/test-stdbool.c (WORKING_BOOL): Define to 0 on compilers that
13855         define _MSC_VER.
13857 2022-09-18  Paul Eggert  <eggert@cs.ucla.edu>
13859         stdbool: omit ‘#undef true’
13860         This is mostly just simplification.
13861         * m4/c-bool.m4 (gl_C_BOOL): Test all preprocessors when
13862         !HAVE_C_BOOL, not merely __SUNPRO_CC.  Use the slightly
13863         more-elegant ‘!true’ instead of ‘true == 1’; this shouldn’t matter
13864         in practice and if it does matter we want to know about it anyway.
13865         Remove an unnecessary ‘#undef true’ that is simply commented out
13866         by ‘configure’; again, if true is already #defined to be 0 the
13867         system is so messed up we want to know about it anyway.
13869 2022-09-18  Bruno Haible  <bruno@clisp.org>
13871         stdbool: Ensure that 'true' can be used in the preprocessor.
13872         * m4/c-bool.m4 (gl_C_BOOL): With Sun C++, redefine 'true' if it does not
13873         evaluate to 1 in the preprocessor.
13875         stdbool-c99: Ensure that 'true' can be used in the preprocessor.
13876         * lib/stdbool.in.h (true): Redefine if it does not evaluate to 1 in the
13877         preprocessor.
13879 2022-09-18  Bruno Haible  <bruno@clisp.org>
13881         uni{case,ctype,gbrk,str}/base: Fix installed .h file (regr. 2022-09-10).
13882         * lib/unicase.in.h: Do include <stdbool.h>.
13883         * lib/unictype.in.h: Likewise.
13884         * lib/unigbrk.in.h: Likewise.
13885         * lib/unistr.in.h: Likewise.
13887 2022-09-18  Bruno Haible  <bruno@clisp.org>
13889         signal: Fix a C++ compilation error due to sched_yield on OpenBSD 6.0.
13890         * lib/signal.in.h: On OpenBSD, include <sys/param.h>. Don't include
13891         <pthread.h> on OpenBSD ≥ 5.1.
13893 2022-09-17  Paul Eggert  <eggert@cs.ucla.edu>
13895         explicit_bzero-tests: robustify a bit
13896         This is mostly to suppress GCC warnings, though I suppose it
13897         might also improve the test.
13898         * tests/test-explicit_bzero.c: Do not ignore -Wmaybe-uninitialized,
13899         as this warning should no longer be generated given the other changes.
13900         (test_heap): ASSERT that malloc succeeds, to suppress any GCC
13901         warning about relying on malloc succeeding.  Declare addr to be
13902         volatile, so that GCC does not deduce that it is heapbuf in
13903         disguise and diagnose using it after freeing it.
13904         (do_secret_stuff): Declare more things to be volatile, to avoid
13905         optimizations that might disturb the stack and/or mess up the test
13906         in other ways.  Pass last_stackbuf address as a parameter rather
13907         than having last_stackbuf be static, to avoid GCC warning about
13908         assigning address of a local to a static; all callers changed.
13910 2022-09-17  Bruno Haible  <bruno@clisp.org>
13912         wchar: Fix compilation errors in C++ mode on Solaris 11.3.
13913         * lib/wchar.in.h (wcsnlen, wcpcpy, wcpncpy, wcscasecmp, wcsncasecmp,
13914         wcsdup): Force declaration in C++ mode on Solaris (which does not
13915         declare these functions in the global namespace).
13917 2022-09-17  Bruno Haible  <bruno@clisp.org>
13919         swab: Fix compilation error with Sun C++ on Solaris 11.3.
13920         * lib/unistd.in.h (swab): For the C++ declaration, under Solaris 11 but
13921         not under Solaris 10, test also __XOPEN_OR_POSIX.
13923 2022-09-17  Bruno Haible  <bruno@clisp.org>
13925         time C++ tests: Fix link error on CentOS 5.
13926         * modules/time-c++-tests (Makefile.am): Link test-time-c++ against
13927         $(LIB_CLOCK_GETTIME).
13929 2022-09-14  Bruno Haible  <bruno@clisp.org>
13931         time: Fix compilation errors with clang/MSVC.
13932         * m4/time_h.m4 (gl_TIME_H): Test whether asctime_r and ctime_r are
13933         declared.
13934         * lib/time.in.h (asctime_r, ctime_r): Skip _GL_WARN_ON_USE invocations
13935         when these functions are not declared.
13937 2022-09-14  Bruno Haible  <bruno@clisp.org>
13939         verify: Avoid syntax error due to static_assert with clang in C++ mode.
13940         * lib/verify.h (static_assert): Don't define in clang C++ 6 or newer.
13941         * m4/assert_h.m4 (gl_ASSERT_H): If we don't need to define static_assert
13942         with clang in C++ mode, don't include <assert.h>.
13944 2022-09-14  Paul Eggert  <eggert@cs.ucla.edu>
13946         assert-h: work around include confusion
13947         * m4/assert_h.m4 (gl_ASSERT_H): Arrange for <config.h> to not
13948         include <assert.h> if assert is already defined.  This works
13949         around bugs in packages that mistakenly include <config.h> after
13950         including <assert.h> (typically due to double-inclusion of
13951         <config.h>).  Found in coreutils, which I plan to fix.
13953         stdbool: depend on C99
13954         Record that stdbool depends on C99 these days.
13955         This matters only for ancient compilers that need special
13956         flags to support C99 features.
13957         * modules/stdbool (Depends-on): Add c99.
13959 2022-09-14  Bruno Haible  <bruno@clisp.org>
13961         verify: Avoid syntax error due to static_assert with MSVC 14 in C++.
13962         * lib/verify.h (static_assert): For MSVC in C++ mode, use a definition
13963         that supports both the two-arguments and the one-argument syntax.
13965 2022-09-14  Bruno Haible  <bruno@clisp.org>
13967         posix_spawn-* tests: Fix test failure on mingw when libtool is in use.
13968         * tests/test-posix_spawn-inherit0.c (CHILD_PROGRAM_FILENAME): Add the
13969         EXEEXT suffix.
13970         * tests/test-posix_spawn-inherit1.c (CHILD_PROGRAM_FILENAME): Likewise.
13971         * tests/test-posix_spawn-open1.c (CHILD_PROGRAM_FILENAME): Likewise.
13972         * tests/test-posix_spawn-open2.c (CHILD_PROGRAM_FILENAME): Likewise.
13974 2022-09-14  Bruno Haible  <bruno@clisp.org>
13976         verify: Avoid syntax error due to static_assert with MSVC 14.
13977         * lib/verify.h (_Static_assert): Pass only the first argument to
13978         _GL_VERIFY.
13980 2022-09-13  Paul Eggert  <eggert@cs.ucla.edu>
13982         verify: treat GNU C++ 6 like recent C++
13983         * m4/assert_h.m4 (gl_ASSERT_H):
13984         If we check __cpp_static_assert < 201411, also check __GNUG__ < 6,
13985         for consistency with the previous change.
13987 2022-09-13  Bruno Haible  <bruno@clisp.org>
13989         verify: Avoid syntax error due to static_assert with GNU C++ 6.x.
13990         * lib/verify.h (static_assert): Don't define in GNU C++ 6 or newer.
13992 2022-09-13  Paul Eggert  <eggert@cs.ucla.edu>
13994         stdalign: prefer to not include <stdalign.h>
13995         * lib/alignalloc.c, lib/argp-parse.c, lib/fts.c, lib/md4.c, lib/md5.c:
13996         * lib/rawmemchr.c, lib/sha1.c, lib/sha256.c, lib/sha512.c, lib/sm3.c:
13997         * lib/sys_socket.in.h:
13998         In C23, <stdalign.h> is a no-op, so don’t include it.
14000         stdalign: alignas and alignof are C23 keywords
14001         * m4/stdalign.m4 (gl_STDALIGN_H): Check also whether
14002         alignas and alignof are keywords and so don’t need stdalign.h,
14003         and define HAVE_C_ALIGNASOF if so.
14004         If not, arrange for config.h to #define alignas and alignof
14005         by including <stdalign.h>.
14006         * modules/stdalign: No need to include <stdalign.h>.
14007         * tests/test-stdalign.c: Do not include stdalign.h.
14009         assert-h: prefer to ‘verify’
14010         Where it’s easy, prefer ‘static_assert’ to ‘verify’,
14011         as this simplifies the source by removing the need to
14012         include verify.h.  Keep using ‘verify’ if verify.h
14013         is used for other reasons, or if code is shared with glibc.
14014         * lib/alignalloc.c, lib/argmatch.h, lib/c32is-impl.h:
14015         * lib/c32snrtombs.c, lib/c32srtombs.c, lib/exclude.c:
14016         * lib/filevercmp.c, lib/fma.c, lib/i-ring.h, lib/ino-map.c:
14017         * lib/localeinfo.c, lib/malloca.c, lib/mbrtoc32.c, lib/mbrtowc.c:
14018         * lib/mbsinit.c, lib/mbsnrtoc32s.c, lib/mbsrtoc32s.c:
14019         * lib/nanosleep.c, lib/parse-datetime.y, lib/pipe2.c:
14020         * lib/rawmemchr.c, lib/relocwrapper.c, lib/sleep.c:
14021         * lib/stat-w32.c, lib/strerror.c, lib/strtoimax.c:
14022         * lib/utimecmp.c, lib/vasnprintf.c, tests/test-alignof.c:
14023         * tests/test-intprops.c, tests/test-libgmp.c:
14024         * tests/test-limits-h.c, tests/test-locale.c:
14025         * tests/test-pthread.c, tests/test-round2.c:
14026         * tests/test-stdalign.c, tests/test-stddef.c, tests/test-stdio.c:
14027         * tests/test-stdlib.c, tests/test-string.c, tests/test-sys_stat.c:
14028         * tests/test-time.c, tests/test-uchar.c, tests/test-unistd.c:
14029         * tests/test-wchar.c:
14030         Prefer static_assert to verify, and stop including verify.h.
14031         * lib/stat.c: Don’t include verify.h (this include was unnecessary).
14032         * modules/alignalloc, modules/alignof-tests, modules/argmatch:
14033         * modules/c-vasnprintf, modules/c32isalnum, modules/c32isalpha:
14034         * modules/c32isblank, modules/c32iscntrl, modules/c32isdigit:
14035         * modules/c32isgraph, modules/c32islower, modules/c32isprint:
14036         * modules/c32ispunct, modules/c32isspace, modules/c32isupper:
14037         * modules/c32isxdigit, modules/c32snrtombs, modules/c32srtombs:
14038         * modules/exclude, modules/filevercmp, modules/fma, modules/fmaf:
14039         * modules/fmal, modules/fstat, modules/i-ring, modules/ino-map:
14040         * modules/intprops-tests, modules/libgmp-tests:
14041         * modules/limits-h-tests, modules/locale-tests, modules/malloca:
14042         * modules/mbrtoc32, modules/mbrtowc, modules/mbsinit:
14043         * modules/mbsnrtoc32s, modules/mbsrtoc32s, modules/nanosleep:
14044         * modules/parse-datetime, modules/pipe2, modules/pthread-h-tests:
14045         * modules/rawmemchr, modules/relocatable-prog-wrapper:
14046         * modules/round-tests, modules/roundf-tests, modules/sleep:
14047         * modules/stat, modules/stdalign-tests, modules/stdckdint-tests:
14048         * modules/stddef-tests, modules/stdio-tests, modules/stdlib-tests:
14049         * modules/strerror, modules/string-tests, modules/strtoimax:
14050         * modules/strtoumax, modules/sys_stat-tests, modules/time-tests:
14051         * modules/uchar-tests, modules/unistd-tests:
14052         * modules/unistdio/u16-u16-vasnprintf:
14053         * modules/unistdio/u16-vasnprintf:
14054         * modules/unistdio/u32-u32-vasnprintf:
14055         * modules/unistdio/u32-vasnprintf:
14056         * modules/unistdio/u8-u8-vasnprintf:
14057         * modules/unistdio/u8-vasnprintf, modules/unistdio/ulc-vasnprintf:
14058         * modules/utimecmp, modules/vasnprintf, modules/wchar-tests:
14059         Depend on assert-h, not verify.
14061         assert-h: static_assert is a keyword in C23
14062         * m4/assert_h.m4 (gl_ASSERT_H): Also test for static_assert
14063         keyword a la C23, and define HAVE_C_STATIC_ASSERT if so.
14064         If not, arrange for config.h to #define static_assert
14065         by including <assert.h>, and then do "#undef assert"
14066         so that the assert macro still needs an explicit include.
14067         This should be safe even on very old hosts, as assert.h
14068         has been re-includable for decades.
14069         * tests/tests-assert.c: New test.
14070         * modules/assert-h-tests (Files, Makefile.am): Add it.
14072 2022-09-13  Bruno Haible  <bruno@clisp.org>
14074         Prefer talking about alignas than _Alignas.
14075         * m4/gnulib-common.m4 (gl_COMMON_BODY): Don't mention _Alignas in a
14076         comment.
14077         * m4/stdalign.m4 (gl_STDALIGN_H): Likewise.
14079 2022-09-13  Paul Eggert  <eggert@cs.ucla.edu>
14081         stdalign-tests: port to C23
14082         * tests/test-stdalign.c: Do not test __alignas_is_defined,
14083         _Alignof, or _Alignas as they are obsolescent.
14084         Do not use __alignas_is_defined in C23 or later (or C++11 or later),
14085         as it’s removed in C23.
14087 2022-09-12  Bruno Haible  <bruno@clisp.org>
14089         supersede: Avoid a failure when writing to /dev/null in Solaris zones.
14090         * lib/supersede.c (open_supersede): Treat EACCES (seen on Solaris 11.3)
14091         like EINVAL (seen on Illumos).
14093 2022-09-11  Paul Eggert  <eggert@cs.ucla.edu>
14095         maint: avoid unportable ERE \}
14096         * top/maint.mk (sc_copyright_check):
14097         Avoid unportable use of \} in ERE.
14099         verify: improve maint check
14100         * top/maint.mk (sc_prohibit_verify_without_use):
14101         Adjust re to match verify.h.
14103         verify: port better to C23
14104         * lib/verify.h (_GL_VERIFY, static_assert):
14105         If C23, use static_assert keyword; no macro.
14106         This should simplify diagnostics and debugging.
14108 2022-09-10  Bruno Haible  <bruno@clisp.org>
14110         pipe-filter-gi: Fix test failure on native Windows.
14111         * lib/pipe-filter-aux.h (write): Redefine on native Windows.
14113 2022-09-10  Bruno Haible  <bruno@clisp.org>
14115         stdbool C++ tests: Fix compilation error with MSVC14 (regr. from today).
14116         * tests/test-stdbool-c++.cc (s): Choose field names that are not type
14117         names.
14119         Reorganize C++ tests for stdbool and stdbool-c99.
14120         * tests/test-stdbool-c++.cc: Don't include <stdbool.h> if TEST_STDBOOL_H
14121         is not defined. Add a couple of simple tests, from test-stdbool.c.
14122         * tests/test-stdbool-c99-c++.cc: New file.
14123         * modules/stdbool-c99-c++-tests: New file, based on
14124         modules/stdbool-c++-tests.
14125         * modules/stdbool-c99-tests (Depends-on): Add stdbool-c99-c++-tests.
14126         Remove stdbool-c++-tests.
14127         * modules/stdbool-tests (Depends-on): Add stdbool-c++-tests.
14129 2022-09-10  Bruno Haible  <bruno@clisp.org>
14131         stdbool C++ tests: Fix for C++20.
14132         * tests/test-stdbool-c++2.cc: Don't include <cstdbool> in C++20 or
14133         newer.
14135 2022-09-10  Bruno Haible  <bruno@clisp.org>
14137         uchar: Work around error in C++ mode on AIX 7.2 with xlclang.
14138         * lib/uchar.in.h (char16_t, char32_t): On AIX with xlclang++, define
14139         these as macros.
14140         * doc/posix-headers/uchar.texi: Document the AIX + xlclang++ bug.
14142 2022-09-10  Paul Eggert  <eggert@cs.ucla.edu>
14144         Rely on new stdbool behavior
14145         Prefer the C23 style to the C99 style,
14146         since the stdbool module now supports C23.
14147         * lib/acl-internal.h, lib/acl.h, lib/argmatch.c, lib/argmatch.h:
14148         * lib/argp-help.c, lib/argv-iter.h, lib/asyncsafe-spin.c:
14149         * lib/backup-internal.h, lib/backupfile.c, lib/base32.h:
14150         * lib/base64.h, lib/basename-lgpl.c, lib/bitset/base.h:
14151         * lib/c-ctype.h, lib/c-strcasestr.c, lib/canonicalize-lgpl.c:
14152         * lib/canonicalize.c, lib/chdir-long.c, lib/chown.c:
14153         * lib/classpath.h, lib/clean-temp-private.h:
14154         * lib/clean-temp-simple.c, lib/clean-temp-simple.h:
14155         * lib/clean-temp.c, lib/clean-temp.h, lib/cloexec.h:
14156         * lib/close-stream.c, lib/closein.c, lib/closeout.c, lib/closeout.h:
14157         * lib/csharpcomp.h, lib/csharpexec.h, lib/cycle-check.c:
14158         * lib/cycle-check.h, lib/des.h, lib/dfa.h, lib/diffseq.h:
14159         * lib/dirname.h, lib/exclude.c, lib/exclude.h, lib/execute.c:
14160         * lib/execute.h, lib/execvpe.c, lib/fatal-signal.c, lib/fchdir.c:
14161         * lib/file-set.h, lib/filevercmp.c, lib/findprog-in.c:
14162         * lib/findprog.c, lib/findprog.h, lib/fma.c, lib/fnmatch.c:
14163         * lib/fopen.c, lib/freadable.h, lib/freading.h, lib/freopen-safer.c:
14164         * lib/fstrcmp.c, lib/fsusage.h, lib/fts.c, lib/fwritable.h:
14165         * lib/fwriteerror.c, lib/fwriting.h, lib/gen-uni-tables.c:
14166         * lib/getaddrinfo.c, lib/getcwd.c, lib/getloadavg.c:
14167         * lib/getndelim2.c, lib/getpass.c, lib/getrandom.c:
14168         * lib/git-merge-changelog.c, lib/gl_list.h, lib/gl_map.h:
14169         * lib/gl_omap.h, lib/gl_oset.h, lib/gl_set.h, lib/glob.c:
14170         * lib/glthread/cond.h, lib/hamt.h, lib/hard-locale.h:
14171         * lib/hash-triple.h, lib/hash.h, lib/human.h, lib/i-ring.h:
14172         * lib/isapipe.c, lib/javacomp.h, lib/javaexec.h, lib/javaversion.c:
14173         * lib/lchown.c, lib/localeinfo.h, lib/localename.c:
14174         * lib/long-options.h, lib/malloc/dynarray.h, lib/mbchar.h:
14175         * lib/mbfile.h, lib/mbiter.h, lib/mbmemcasecoll.h, lib/mbscasestr.c:
14176         * lib/mbsstr.c, lib/mbuiter.h, lib/mkdir-p.h, lib/modechange.h:
14177         * lib/mountlist.h, lib/nanosleep.c, lib/nonblocking.h:
14178         * lib/nstrftime.c, lib/openat.c, lib/openat.h, lib/os2-spawn.c:
14179         * lib/parse-datetime.h, lib/pipe-filter-aux.c, lib/pipe-filter-gi.c:
14180         * lib/pipe-filter-ii.c, lib/pipe-filter.h, lib/posixtm.h:
14181         * lib/priv-set.c, lib/progreloc.c, lib/propername.c:
14182         * lib/pthread-spin.c, lib/quotearg.c, lib/readtokens.c:
14183         * lib/readtokens0.h, lib/readutmp.c, lib/regex-quote.h:
14184         * lib/regex_internal.h, lib/relocwrapper.c, lib/rename.c:
14185         * lib/renameatu.c, lib/rpmatch.c, lib/same.c, lib/same.h:
14186         * lib/save-cwd.c, lib/savewd.c, lib/savewd.h, lib/spawn-pipe.h:
14187         * lib/spawni.c, lib/stack.h, lib/stat.c, lib/stdckdint.in.h:
14188         * lib/strcasestr.c, lib/strfmon_l.c, lib/striconveh.c:
14189         * lib/striconveha.h, lib/string-buffer.h, lib/strptime.c:
14190         * lib/strstr.c, lib/strtod.c, lib/supersede.h, lib/system-quote.c:
14191         * lib/tempname.c, lib/term-style-control.c:
14192         * lib/term-style-control.h, lib/textstyle.in.h, lib/time_rz.c:
14193         * lib/tmpdir.c, lib/tmpdir.h, lib/tmpfile.c, lib/unicase.in.h:
14194         * lib/unicase/caseprop.h, lib/unicase/invariant.h:
14195         * lib/unicase/u16-casemap.c, lib/unicase/u16-ct-totitle.c:
14196         * lib/unicase/u16-is-invariant.c, lib/unicase/u32-casemap.c:
14197         * lib/unicase/u32-ct-totitle.c, lib/unicase/u32-is-invariant.c:
14198         * lib/unicase/u8-casemap.c, lib/unicase/u8-ct-totitle.c:
14199         * lib/unicase/u8-is-invariant.c, lib/unictype.in.h:
14200         * lib/unigbrk.in.h, lib/unigbrk/u16-grapheme-breaks.c:
14201         * lib/unigbrk/u32-grapheme-breaks.c:
14202         * lib/unigbrk/u8-grapheme-breaks.c:
14203         * lib/unigbrk/uc-grapheme-breaks.c, lib/uniname/uniname.c:
14204         * lib/unistr.in.h, lib/unlinkdir.h, lib/userspec.h, lib/utime.c:
14205         * lib/utimecmp.c, lib/utimens.c, lib/wait-process.h:
14206         * lib/windows-cond.c, lib/windows-spawn.c, lib/windows-spawn.h:
14207         * lib/windows-timedrwlock.c, lib/write-any-file.h, lib/xbinary-io.c:
14208         * lib/xstrtod.h, lib/yesno.h:
14209         * tests/nap.h, tests/qemu.h, tests/test-areadlink-with-size.c:
14210         * tests/test-areadlink.c, tests/test-areadlinkat-with-size.c:
14211         * tests/test-areadlinkat.c, tests/test-base32.c:
14212         * tests/test-base64.c, tests/test-ceil2.c, tests/test-ceilf2.c:
14213         * tests/test-chown.c, tests/test-dirname.c, tests/test-dup-safer.c:
14214         * tests/test-dup3.c, tests/test-exclude.c:
14215         * tests/test-execute-child.c, tests/test-execute-main.c:
14216         * tests/test-execute-script.c, tests/test-explicit_bzero.c:
14217         * tests/test-fchownat.c, tests/test-fcntl-safer.c:
14218         * tests/test-fcntl.c, tests/test-fdutimensat.c:
14219         * tests/test-filenamecat.c, tests/test-floor2.c:
14220         * tests/test-floorf2.c, tests/test-fstatat.c, tests/test-fstrcmp.c:
14221         * tests/test-futimens.c, tests/test-getlogin.h, tests/test-getopt.h:
14222         * tests/test-hard-locale.c, tests/test-hash.c:
14223         * tests/test-idpriv-drop.c, tests/test-idpriv-droptemp.c:
14224         * tests/test-immutable.c, tests/test-intprops.c:
14225         * tests/test-lchown.c, tests/test-link.c, tests/test-linkat.c:
14226         * tests/test-lstat.c, tests/test-mbmemcasecmp.c:
14227         * tests/test-mbmemcasecoll.c, tests/test-mkdir.c:
14228         * tests/test-mkdirat.c, tests/test-mkfifo.c, tests/test-mkfifoat.c:
14229         * tests/test-mknod.c, tests/test-nonblocking-pipe-child.c:
14230         * tests/test-nonblocking-pipe-main.c:
14231         * tests/test-nonblocking-socket-child.c:
14232         * tests/test-nonblocking-socket-main.c, tests/test-open.c:
14233         * tests/test-openat.c, tests/test-pipe.c, tests/test-pipe2.c:
14234         * tests/test-poll.c, tests/test-posix_spawn-chdir.c:
14235         * tests/test-posix_spawn-dup2-stdin.c:
14236         * tests/test-posix_spawn-dup2-stdout.c:
14237         * tests/test-posix_spawn-fchdir.c, tests/test-posix_spawn-open1.c:
14238         * tests/test-posix_spawn-open2.c, tests/test-quotearg-simple.c:
14239         * tests/test-quotearg.c, tests/test-readlink.c:
14240         * tests/test-readlinkat.c, tests/test-readtokens.c:
14241         * tests/test-rename.c, tests/test-renameat.c:
14242         * tests/test-renameatu.c, tests/test-rmdir.c, tests/test-round2.c:
14243         * tests/test-select.h, tests/test-spawn-pipe-child.c:
14244         * tests/test-spawn-pipe-main.c, tests/test-spawn-pipe-script.c:
14245         * tests/test-stack.c, tests/test-stat.c, tests/test-supersede.c:
14246         * tests/test-symlink.c, tests/test-symlinkat.c:
14247         * tests/test-system-quote-main.c:
14248         * tests/test-term-style-control-hello.c:
14249         * tests/test-term-style-control-yes.c, tests/test-timespec.c:
14250         * tests/test-trunc2.c, tests/test-truncf2.c, tests/test-unlink.c:
14251         * tests/test-unlinkat.c, tests/test-userspec.c, tests/test-utime.c:
14252         * tests/test-utimens.c, tests/test-utimensat.c:
14253         * tests/unictype/test-categ_byname.c:
14254         * tests/unigbrk/test-uc-is-grapheme-break.c:
14255         Don’t include stdbool.h.
14256         * modules/acl, modules/xgetcwd:
14257         Don’t depend on stdbool, as these modules don’t use bool.
14258         * modules/argp, modules/bitset, modules/diffseq, modules/file-has-acl:
14259         * modules/gen-uni-tables, modules/getrandom:
14260         * modules/hash-triple-simple, modules/posix_spawn-internal:
14261         * modules/strcasestr, modules/supersede, modules/system-quote:
14262         * modules/uniconv/base, modules/uniname/uniname, modules/utime:
14263         * modules/windows-timedrwlock:
14264         Depend on stdbool, as these modules use bool.
14266         stdbool: upgrade from C99 to C23
14267         Change the stdbool module so that it now emulates C23.
14268         The module now assumes C99.  The old module (which assumes
14269         C89 and emulates C99) is still available  as stdbool-c99,
14270         but is deprecated.
14271         * tests/test-stdbool.c [TEST_C_BOOL]: Do not include stdbool.h.
14272         * m4/c-bool.m4, modules/c-bool, modules/c-bool-tests:
14273         * tests/test-c-bool.c: New files.
14275 2022-09-10  Bruno Haible  <bruno@clisp.org>
14277         string: Fix compilation error in C++ mode on AIX 7.2 with xlclang.
14278         * lib/string.in.h (mbslen): Enable the C++ alias warning only on glibc
14279         systems.
14281 2022-09-10  Bruno Haible  <bruno@clisp.org>
14283         math: Fix compilation error in C++ mode on AIX 7.2 with xlclang.
14284         * lib/math.in.h (cbrtl, copysignl, exp2l, expm1l, fmal, ilogbl, log1pl,
14285         log2l, logbl, remainderl, rintl, roundl, truncl): Enable the C++ alias
14286         warning only on glibc systems.
14288 2022-09-10  Bruno Haible  <bruno@clisp.org>
14290         doc: Mention the stable branches.
14291         * doc/gnulib-readme.texi (High Quality): Add subsection
14292         'Stable Branches'.
14293         (Writing reliable code): Extracted from 'High Quality'. Mention also
14294         -Wall and valgrind.
14296 2022-09-09  Bruno Haible  <bruno@clisp.org>
14298         posix_spawn-internal: Optimize DuplicateHandle calls on native Windows.
14299         * lib/windows-spawn.h (DELAYED_DUP2_OLDFD, DELAYED_DUP2_NEWFD): New
14300         macros.
14301         (struct IHANDLE): Add a linked_fd field.
14302         * lib/spawni.c (SPAWN_INTERNAL_OPTIMIZE_DUPLICATEHANDLE): New macro.
14303         (do_delayed_dup2, do_remaining_delayed_dup2): New functions.
14304         (close_inheritable_handles): Don't close handles in DELAYED_DUP2_NEWFD
14305         entries.
14306         (do_close): Add a third parameter. Optimize delayed dup2 calls.
14307         (do_open): Use do_close.
14308         (do_dup2): Likewise. Prepare for optimizing the DuplicateHandle call.
14309         (__spawni): Do the remaining delayed dup2 invocations after the loop
14310         over the actions.
14312         posix_spawn-internal: Refactor.
14313         * lib/windows-spawn.h (struct IHANDLE): New type.
14314         (struct inheritable_handles): Combine handles and flags into a single
14315         array.
14316         * lib/windows-spawn.c (init_inheritable_handles, compose_handles_block,
14317         spawnpvech): Update.
14318         * lib/spawni.c (grow_inheritable_handles, shrink_inheritable_handles,
14319         do_open, do_dup2, do_close): Update.
14321         posix_spawn-internal: Optimize DuplicateHandle calls on native Windows.
14322         * lib/spawni.c (open_handle): Return an inheritable HANDLE.
14323         (do_open): Don't call DuplicateHandle. Remove curr_process parameter.
14324         (__spawni): Update.
14326         posix_spawn-internal: Optimize DuplicateHandle calls on native Windows.
14327         * lib/windows-spawn.h (KEEP_OPEN_IN_PARENT): New macro.
14328         * lib/windows-spawn.c (init_inheritable_handles): When a handle is
14329         already inheritable, don't bother duplicating it; instead, just mark it
14330         as KEEP_OPEN_IN_PARENT.
14331         * lib/spawni.c (shrink_inheritable_handles, close_inheritable_handles,
14332         do_open, do_dup2, do_close): Don't close handles that are marked as
14333         KEEP_OPEN_IN_PARENT.
14335 2022-09-09  Bruno Haible  <bruno@clisp.org>
14337         posix_spawn-internal: Don't lose flags while duplicating an fd.
14338         * lib/spawni.c (do_dup2): Fix the flags of the new fd.
14340 2022-09-09  Bruno Haible  <bruno@clisp.org>
14342         spawn-pipe: Fix pipe-filter-* test hangs (regression 2020-12-24).
14343         * lib/windows-spawn.h (struct inheritable_handles): Widen the per-fd
14344         flags from 8 bits to 16 bits.
14345         (KEEP_OPEN_IN_CHILD): New macro.
14346         (init_inheritable_handles): Change description of what it does when
14347         duplicate == true.
14348         * lib/windows-spawn.c (init_inheritable_handles): If duplicate == true,
14349         add all fds to the array, regardless whether they are scheduled to be
14350         preserved in the child process.
14351         (compose_handles_block): Update.
14352         (spawnpvech): Update.
14353         * lib/spawni.c (grow_inheritable_handles): Update.
14354         (shrink_inheritable_handles): Also close the handles not marked with
14355         KEEP_OPEN_IN_CHILD.
14356         (do_open, do_dup2): Mark the new fd with KEEP_OPEN_IN_CHILD.
14358 2022-09-09  Bruno Haible  <bruno@clisp.org>
14360         spawn-pipe: Fix possible hangs in programs that spawn several children.
14361         * lib/spawn-pipe.c (create_pipe) [Unix]: Create the ifd[] and ofd[] file
14362         descriptors with the close-on-exec flag set.
14364 2022-09-09  Bruno Haible  <bruno@clisp.org>
14366         pipe-filter-gi tests: Fix long-standing failure on native Windows.
14367         * tests/test-pipe-filter-gi2-main.c: Include binary-io.h.
14368         (main): Avoid NL to CRLF conversion on standard output.
14369         * tests/test-pipe-filter-gi2-child.c: Include <unistd.h>, binary-io.h.
14370         (main): Avoid NL to CRLF conversion on standard output.
14372 2022-09-09  Bruno Haible  <bruno@clisp.org>
14374         posix_spawn_file_actions_addclose tests: Fix mistake from 2022-09-07.
14375         * modules/posix_spawn_file_actions_addclose-tests (Files): Add
14376         m4/musl.m4.
14378 2022-09-08  Paul Eggert  <eggert@cs.ucla.edu>
14380         stdbool-tests: match stdbool
14381         * tests/test-stdbool.c: Omit test for
14382         __bool_true_false_are_defined since AC_CHECK_HEADER_STDBOOL no
14383         longer checks for this obsolescent macro.
14385         mktime: back in sync with GNUlib
14386         * config/srclist.txt: glibc has synced mktime from Gnulib.
14388 2022-09-07  Bruno Haible  <bruno@clisp.org>
14390         posix_spawn_file_actions_addclose tests: Avoid test failure on musl.
14391         Reported by Valery Ushakov <uwe@stderr.spb.ru> in
14392         <https://lists.gnu.org/archive/html/bug-gnulib/2022-09/msg00041.html>.
14393         * modules/posix_spawn_file_actions_addclose-tests (configure.ac): Invoke
14394         gl_MUSL_LIBC.
14395         * tests/test-posix_spawn_file_actions_addclose.c (main): Skip one of the
14396         tests on musl libc.
14398 2022-09-06  Simon Josefsson  <simon@josefsson.org>
14400         gnumakefile: Improve tarball reproducibility.
14401         * top/GNUmakefile (TAR_OPTIONS): Add --sort=name.  Suggested by
14402         Tzvetelin Katchov <katchov@gnu.org>.
14403         * DEPENDENCIES: Mention tar 1.28 dependency.
14405 2022-09-05  Bruno Haible  <bruno@clisp.org>
14407         pthread-h: Fix compilation error on mingw with --enable-threads=windows.
14408         * lib/pthread.in.h: In C++ mode, if mingw's <pthread.h> has not been
14409         used, import many pthread_* symbols from the GNULIB_NAMESPACE into the
14410         global namespace.
14412 2022-09-04  Bruno Haible  <bruno@clisp.org>
14414         Fix various test link errors on MSVC.
14415         * modules/crypto/gc-arcfour-tests (Makefile.am): Link test-gc-arcfour
14416         with $(LIB_GETRANDOM).
14417         * modules/crypto/gc-arctwo-tests (Makefile.am): Link test-gc-arctwo with
14418         $(LIB_GETRANDOM).
14419         * modules/crypto/gc-des-tests (Makefile.am): Link test-gc-des with
14420         $(LIB_GETRANDOM).
14421         * modules/crypto/gc-hmac-md5-tests (Makefile.am): Link test-gc-hmac-md5
14422         with $(LIB_GETRANDOM).
14423         * modules/crypto/gc-hmac-sha1-tests (Makefile.am): Link
14424         test-gc-hmac-sha1 with $(LIB_GETRANDOM).
14425         * modules/crypto/gc-hmac-sha256-tests (Makefile.am): Link
14426         test-gc-hmac-sha256 with $(LIB_GETRANDOM).
14427         * modules/crypto/gc-hmac-sha512-tests (Makefile.am): Link
14428         test-gc-hmac-sha512 with $(LIB_GETRANDOM).
14429         * modules/crypto/gc-md2-tests (Makefile.am): Link test-gc-md2 with
14430         $(LIB_GETRANDOM).
14431         * modules/crypto/gc-md4-tests (Makefile.am): Link test-gc-md4 with
14432         $(LIB_GETRANDOM).
14433         * modules/crypto/gc-md5-tests (Makefile.am): Link test-gc-md5 with
14434         $(LIB_GETRANDOM).
14435         * modules/crypto/gc-pbkdf2-tests (Makefile.am): Link test-gc-pbkdf2 with
14436         $(LIB_GETRANDOM).
14437         * modules/crypto/gc-pbkdf2-sha1-tests (Makefile.am): Link
14438         test-gc-pbkdf2-sha1 with $(LIB_GETRANDOM).
14439         * modules/crypto/gc-rijndael-tests (Makefile.am): Link test-gc-rijndael
14440         with $(LIB_GETRANDOM).
14441         * modules/crypto/gc-sha1-tests (Makefile.am): Link test-gc-sha1 with
14442         $(LIB_GETRANDOM).
14443         * modules/crypto/gc-sha256-tests (Makefile.am): Link test-gc-sha256 with
14444         $(LIB_GETRANDOM).
14445         * modules/crypto/gc-sha512-tests (Makefile.am): Link test-gc-sha512 with
14446         $(LIB_GETRANDOM).
14447         * modules/crypto/gc-sm3-tests (Makefile.am): Link test-gc-sm3 with
14448         $(LIB_GETRANDOM).
14449         * modules/sys_stat-c++-tests (Makefile.am): Link test-sys_stat-c++ with
14450         $(LIB_GETRANDOM).
14451         * modules/unistd-c++-tests (Makefile.am): Link test-unistd-c++ with
14452         $(LIB_GETRANDOM).
14454 2022-09-04  Bruno Haible  <bruno@clisp.org>
14456         count-leading-zeros: Fix a link error on 32-bit MSVC and a test failure.
14457         * lib/count-leading-zeros.h: Correct syntax for #pragma intrinsic.
14458         (COUNT_LEADING_ZEROS): Fix the return value.
14459         (count_leading_zeros_ll): Use two _BitScanReverse invocations instead
14460         of a _BitScanReverse64 invocation.
14462 2022-09-04  Bruno Haible  <bruno@clisp.org>
14464         count-trailing-zeros: Fix a link error on 32-bit MSVC.
14465         * lib/count-trailing-zeros.h: Correct syntax for #pragma intrinsic.
14466         (count_trailing_zeros_ll): Use two _BitScanForward invocations instead
14467         of a _BitScanForward64 invocation.
14469 2022-09-04  Bruno Haible  <bruno@clisp.org>
14471         unictype/category-none tests: Fix a link error on MSVC.
14472         * tests/unictype/test-categ_none.c (main): Disable the test on MSVC.
14474 2022-09-04  Bruno Haible  <bruno@clisp.org>
14476         oset-c++: Fix compilation error with MSVC 14.
14477         * lib/gl_oset.hh: With MSVC, avoid 'friend'.
14479 2022-09-04  Bruno Haible  <bruno@clisp.org>
14481         glob tests: Fix link error on mingw.
14482         * modules/glob-tests (Makefile.am): Link test-glob with $(LIBINTL).
14484 2022-09-04  Bruno Haible  <bruno@clisp.org>
14486         timespec_get: Fix compilation error with MSVC 14.
14487         * m4/gettime.m4 (gl_CHECK_FUNC_TIMESPEC_GET): New macro.
14488         (gl_GETTIME): Use it instead of AC_CHECK_FUNCS_ONCE.
14489         * m4/timespec_get.m4 (gl_FUNC_TIMESPEC_GET): Likewise.
14491 2022-09-04  Bruno Haible  <bruno@clisp.org>
14493         stdbool: Fix compilation error in C++ mode with MSVC 14.
14494         * lib/stdbool.in.h (_Bool, bool, false, true): In C++ mode with MSVC 14,
14495         don't define these as macros.
14497 2022-09-04  Bruno Haible  <bruno@clisp.org>
14499         fts: Fix compilation error with MSVC 14.
14500         * lib/fts.c (S_IFBLK): Add fallback definition.
14502 2022-09-04  Bruno Haible  <bruno@clisp.org>
14504         lstat: Fix compilation error in C++ mode on mingw.
14505         * lib/sys_stat.h (lstat): Move declaration after the declaration of
14506         'stat'.
14508 2022-09-04  Bruno Haible  <bruno@clisp.org>
14510         pselect: Fix compilation error in C++ mode on mingw.
14511         * lib/sys_select.in.h (pselect): Enable the C++ alias warning only on
14512         glibc systems.
14514 2022-09-04  Bruno Haible  <bruno@clisp.org>
14516         nanosleep: Work around bug on newer 32-bit mingw.
14517         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Test for 32-bit mingw bug.
14518         * tests/test-nanosleep.c (main): Add another test.
14519         * doc/posix-functions/nanosleep.texi: Mention the mingw bug.
14521 2022-09-03  Bruno Haible  <bruno@clisp.org>
14523         fmal: Work around glibc 2.17 bug on x86_64.
14524         * m4/fmal.m4 (gl_FUNC_FMAL_WORKS): Test against bug seen on glibc 2.17
14525         x86_64.
14526         * doc/posix-functions/fmal.texi: Update info.
14528 2022-09-03  Bruno Haible  <bruno@clisp.org>
14530         Fix a compilation error in C++ mode on Solaris 11.4.
14531         * lib/uchar.in.h (c32rtomb): Enable the C++ alias warning only on
14532         glibc ≥ 2.16 systems. Fix a GNULIB_POSIXCHECK mistake.
14533         (mbrtoc32): Enable the C++ alias warning only on glibc ≥ 2.16 systems.
14535 2022-09-03  Bruno Haible  <bruno@clisp.org>
14537         Fix compilation errors of C++ tests on Solaris 10 with Sun C++.
14538         * modules/string-c++-tests (Makefile.am): Link test-string-c++ with
14539         $(LIBUNISTRING).
14540         * modules/wchar-c++-tests (Makefile.am): Link test-wchar-c++ with
14541         $(LIBUNISTRING).
14543 2022-09-03  Bruno Haible  <bruno@clisp.org>
14545         Fix a compilation error in C++ mode on FreeBSD 13.1.
14546         * lib/signal.in.h: Don't include <pthread.h> on FreeBSD ≥ 8.0.
14547         * lib/sys_select.in.h: Don't include <sys/time.h> on FreeBSD.
14549 2022-09-03  Bruno Haible  <bruno@clisp.org>
14551         stdnoreturn: Document relation to C++.
14552         * doc/posix-headers/stdnoreturn.texi: Document FreeBSD problem.
14554 2022-09-03  Bruno Haible  <bruno@clisp.org>
14556         sysexits: Add C++ tests.
14557         * tests/test-sysexits-c++.cc: New file.
14558         * modules/sysexits-c++-tests: New file.
14559         * modules/sysexits-tests (Depends-on): Add sysexits-c++-tests.
14561 2022-09-03  Bruno Haible  <bruno@clisp.org>
14563         sys_utsname: Add C++ tests.
14564         * tests/test-sys_utsname-c++.cc: New file.
14565         * modules/sys_utsname-c++-tests: New file.
14566         * modules/sys_utsname-tests (Depends-on): Add sys_utsname-c++-tests.
14568 2022-09-03  Bruno Haible  <bruno@clisp.org>
14570         sys_uio: Add C++ tests.
14571         * tests/test-sys_uio-c++.cc: New file.
14572         * modules/sys_uio-c++-tests: New file.
14573         * modules/sys_uio-tests (Depends-on): Add sys_uio-c++-tests.
14575 2022-09-03  Bruno Haible  <bruno@clisp.org>
14577         sys_times: Add C++ tests.
14578         * tests/test-sys_times-c++.cc: New file.
14579         * modules/sys_times-c++-tests: New file.
14580         * modules/sys_times-tests (Depends-on): Add sys_times-c++-tests.
14582 2022-09-03  Bruno Haible  <bruno@clisp.org>
14584         sys_file: Add C++ tests.
14585         * tests/test-sys_file-c++.cc: New file.
14586         * modules/sys_file-c++-tests: New file.
14587         * modules/sys_file-tests (Depends-on): Add sys_file-c++-tests.
14589         sys_file: Document this module.
14590         * doc/glibc-headers/sys_file.texi: New file.
14591         * doc/gnulib.texi (Glibc Header File Substitutes): Include it.
14593 2022-09-03  Bruno Haible  <bruno@clisp.org>
14595         stdckdint: Add C++ tests.
14596         * tests/test-stdckdint-c++.cc: New file.
14597         * modules/stdckdint-c++-tests: New file.
14598         * modules/stdckdint-tests (Depends-on): Add stdckdint-c++-tests.
14600 2022-09-03  Bruno Haible  <bruno@clisp.org>
14602         stdalign: Add C++ tests.
14603         * tests/test-stdalign-c++.cc: New file.
14604         * modules/stdalign-c++-tests: New file.
14605         * modules/stdalign-tests (Depends-on): Add stdalign-c++-tests.
14607 2022-09-03  Bruno Haible  <bruno@clisp.org>
14609         sched: Add C++ tests.
14610         * tests/test-sched-c++.cc: New file.
14611         * modules/sched-c++-tests: New file.
14612         * modules/sched-tests (Depends-on): Add sched-c++-tests.
14614 2022-09-03  Bruno Haible  <bruno@clisp.org>
14616         netinet_in: Add C++ tests.
14617         * tests/test-netinet_in-c++.cc: New file.
14618         * modules/netinet_in-c++-tests: New file.
14619         * modules/netinet_in-tests (Depends-on): Add netinet_in-c++-tests.
14621 2022-09-03  Bruno Haible  <bruno@clisp.org>
14623         net_if: Add C++ tests.
14624         * tests/test-net_if-c++.cc: New file.
14625         * modules/net_if-c++-tests: New file.
14626         * modules/net_if-tests (Depends-on): Add net_if-c++-tests.
14627         * doc/posix-headers/net_if.texi: Fix documentation.
14629 2022-09-03  Bruno Haible  <bruno@clisp.org>
14631         termcap: Fix link error on AIX 7.
14632         * m4/termcap.m4 (gl_TERMCAP_BODY): Search also for libxcurses and for
14633         libcurses, like gl_TERMINFO_BODY does.
14634         * m4/terminfo.m4 (gl_TERMINFO_BODY): Update platform list in comment.
14636 2022-09-02  Bruno Haible  <bruno@clisp.org>
14638         getrandom: Fix compilation error in C++ mode on FreeBSD 12.
14639         * lib/sys_random.in.h (getrandom): Enable the C++ alias warning only on
14640         glibc ≥ 2.25 systems.
14642 2022-09-02  Bruno Haible  <bruno@clisp.org>
14644         math C++ tests: Fix compilation error with clang on FreeBSD 13.
14645         * lib/math.in.h (isnan): For clang >= 11 on FreeBSD, declare 'isnan',
14646         not 'rpl_isnan'.
14648 2022-09-02  Bruno Haible  <bruno@clisp.org>
14650         strerror_r-posix: Fix for Hurd.
14651         * lib/strerror_r.c (strerror_r): Interpret return value of
14652         __xpg_strerror_r correctly. Remove assumption about how strerror_r
14653         behaves.
14655 2022-09-02  Bruno Haible  <bruno@clisp.org>
14657         ptsname tests, ptsname_r tests: Fix test failures on Hurd.
14658         * tests/test-ptsname.c (main): On Hurd, test only the BSD ptys that
14659         actually exist on Hurd.
14660         * tests/test-ptsname_r.c (main): Likewise.
14662 2022-09-02  Bruno Haible  <bruno@clisp.org>
14664         strtol, strtoul: Fix compilation error in C++ mode on Solaris 11.
14665         * lib/stdlib.in.h (strtol, strtoul): Enable the C++ alias warning only
14666         on glibc systems.
14668 2022-09-02  Bruno Haible  <bruno@clisp.org>
14670         aligned_alloc: Fix compilation error in C++ mode on Solaris 11.
14671         * lib/stdlib.in.h (aligned_alloc): Enable the C++ alias warning only on
14672         glibc systems.
14674 2022-09-02  Bruno Haible  <bruno@clisp.org>
14676         getdomainname: Fix compilation error in C++ mode on Solaris 11.
14677         * lib/unistd.in.h (getdomainname): Enable the C++ alias warning only on
14678         glibc systems.
14680 2022-09-02  Bruno Haible  <bruno@clisp.org>
14682         terminfo: Don't disturb the termcap module.
14683         * m4/terminfo.m4 (gl_TERMINFO_BODY): Save and restore the variables
14684         determined by the gl_TERMCAP_BODY macro.
14686 2022-08-30  Paul Eggert  <eggert@cs.ucla.edu>
14688         fnmatch: fix stdckdint typo
14689         * lib/fnmatch_loop.c (NEW_PATTERN): Fix typo in previous patch.
14690         Problem and fix reported by Simon Josefsson in:
14691         https://lists.gnu.org/r/bug-gnulib/2022-08/msg00104.html
14693 2022-08-25  Paul Eggert  <eggert@cs.ucla.edu>
14695         tempname: simplify by omitting _LIBC code
14696         * lib/tempname.c [_LIBC]: Simplify.
14697         Suggested by Bruno Haible in:
14698         https://lists.gnu.org/r/bug-gnulib/2022-08/msg00077.html
14699         I plan to propose a corresponding patch to glibc.
14701 2022-08-22  Paul Eggert  <eggert@cs.ucla.edu>
14703         tempname: don't lose entropy in seed
14704         * lib/tempname.c (random_bits): Don't lose entropy in S
14705         in the rare case where where the template has more than 10 Xs.
14706         From a suggestion by Bruno Haible in:
14707         https://bugs.gnu.org/57129#149
14709         tempname: fix multithreading, ASLR leak etc.
14710         Fix problems with tempname and multithreading, entropy loss,
14711         and missing clock data (this last on non-GNU platforms).
14712         See analysis by Bruno Haible in:
14713         https://bugs.gnu.org/57129#149
14714         While looking into this, I noticed that tempname can leak
14715         info derived from ASLR into publicly-visible file names,
14716         which is a no-no.  Fix that too.
14717         * lib/tempname.c: Don't include stdalign.h.
14718         (HAS_CLOCK_ENTROPY): Remove.
14719         (mix_random_values): New function.
14720         (random_bits): Use it.  Args are now new value address and
14721         old value, and this function now returns a success indicator.
14722         Omit old USE_GETRANDOM argument: always try getrandom now, as
14723         there is no good reason not to now that GRND_NONBLOCK is used.
14724         Caller changed.  Use CLOCK_REALTIME for for ersatz entropy,
14725         as CLOCK_MONOTONIC doesn't work on some platforms.
14726         Also, mix in ersatz entropy from tv_sec and from clock ().
14727         (try_tempname_len): Do not mix in ASLR-based entropy, as
14728         the result is published to the world and ASLR should be private.
14729         Do not try to use a static var as that has issues if multithreaded.
14730         Instead, simply generate new random bits.
14731         Worry about bias only with high-quality random bits.
14733         * modules/tempname (Depends-on): Do not depend on stdalign.
14735         tempname: merge 64-bit time_t fix from glibc
14736         This merges glibc commit 52a5fe70a2c77935afe807fb6e904e512ddd894e
14737         "Use 64 bit time_t stat internally".
14738         * lib/tempname.c (struct_stat64) [_LIBC]: Use struct __stat64_t64.
14739         (__lstat64_time64) [!_LIBC]: Rename from __lstat64.
14740         All uses changed.
14741         (direxists): Use __stat64_time64 instead of __stat64.
14743 2022-08-16  Bruno Haible  <bruno@clisp.org>
14745         tempname: Add more tests.
14746         Based on scenario described by Eli Zaretskii in
14747         <https://lists.gnu.org/archive/html/bug-gnulib/2022-08/msg00043.html>.
14748         * tests/test-tempname.c (main): Add another test.
14749         * modules/tempname-tests (Status): Mark the test as unportable.
14751 2022-08-16  Paul Eggert  <eggert@cs.ucla.edu>
14753         tempname: generate better names for MinGW Emacs
14754         On MinGW, GNU Emacs disables clock_gettime, which reliably breaks
14755         some of gen_tempname’s optimistic callers.  Work around the
14756         problem by making the generated names less predictable.  We don’t
14757         need cryptographic randomness here, just enough unpredictability
14758         to keep Emacs happy most of the time.
14759         * lib/tempname.c (HAS_CLOCK_ENTROPY): New macro.
14760         (random_bits): Use it.
14761         (try_tempname_len): On systems lacking clock entropy, maintain
14762         state so that gen_filename generates less-predictable names on
14763         successive successful calls.
14765 2022-08-16  Simon Josefsson  <simon@josefsson.org>
14767         maintainer-makefile: Check for incorrect DISTCHECK_CONFIGURE_FLAGS
14768         usage.
14769         * top/maint.mk (sc_makefile_DISTCHECK_CONFIGURE_FLAGS): Add.
14771 2022-08-16  Bruno Haible  <bruno@clisp.org>
14773         tempname: Add tests.
14774         * tests/test-tempname.c: New file.
14775         * modules/tempname-tests: New file.
14777 2022-08-16  Simon Josefsson  <simon@josefsson.org>
14779         pmccabe2html: Doc fix.
14780         * build-aux/pmccabe2html: Don't use reserved _SOURCES namespace.
14781         Use AM_V_GEN.  Use LC_ALL=C.
14783 2022-08-15  Bruno Haible  <bruno@clisp.org>
14785         stdbool: Drop old BeOS support that gets in the way of ISO C 23 support.
14786         * lib/stdbool.in.h: Don't include <OS.h>.
14788 2022-08-15  Bruno Haible  <bruno@clisp.org>
14790         tempname: Fix a comment.
14791         * lib/tempname.c (try_tempname_len): Use of entropy makes the function
14792         more, not less, secure.
14794 2022-08-15  Paul Eggert  <eggert@cs.ucla.edu>
14796         tempname: remove incorrect comment
14797         * lib/tempname.c, lib/tempname.h: Remove incorrect comment,
14798         as the names are not necessarily hard to predict (Bug#57129).
14800 2022-08-14  Simon Josefsson  <simon@josefsson.org>
14802         bootstrap.conf: Use proper shell marker for Emacs.
14803         * build-aux/bootstrap.conf: Add it.
14805 2022-08-13  Paul Eggert  <eggert@cs.ucla.edu>
14807         stdbool: port to C23
14808         * m4/stdbool.m4 (AC_CHECK_HEADER_STDBOOL): Copy from bleeding-edge
14809         Autoconf.  Define only if Autoconf 2.71 and earlier.
14810         * tests/test-stdbool.c (bool, false, true)
14811         (__bool_true_false_are_defined): Do not require these to be
14812         defined.  C23 still requires __bool_true_false_are_defined but
14813         marks it as obsolescent, and it’s no longer worth testing.
14814         (WORKING_BOOL): New macro, which also tests __STDC_VERSION__.
14815         Use it in tests for working bool.
14816         Test for bool instead of for _Bool, which C23 says is obsolescent.
14818 2022-08-13  Bruno Haible  <bruno@clisp.org>
14820         gnulib-tool.py: Fix some code generation details.
14821         * pygnulib/GLEmiter.py: Don't produce Windows CR-LFs on Windows.
14822         (GLEmiter.po_Makevars): Emit a definition of top_builddir, not
14823         top_subdir.
14824         (GLEmiter.po_POTFILES_in): Fix result when sourcebase is 'tests' or
14825         something like that.
14826         (GLEmiter.initmacro_start): Add two more newlines (mistake from
14827         2021-04-11).
14829         gnulib-tool.py: Reduce code duplication.
14830         * pygnulib/constants.py (relinverse): New function.
14831         * pygnulib/GLEmiter.py (GLEmiter.po_Makevars,
14832         GLEmiter.tests_Makefile_am): Use it.
14833         * pygnulib/GLTestDir.py (GLTestDir.execute): Likewise.
14835 2022-08-12  Marc Nieper-Wißkirchen  <marc@nieper-wisskirchen.de>
14837         hamt: fix technically undefined behavior
14838         Bug reported by Bruno Haible in
14839         <https://lists.gnu.org/r/bug-gnulib/2022-04/msg00023.html>.
14840         * lib/hamt.c (entry_insert): Remove technically undefined
14841         behavior when shifting an integer of N bits by N or more bits.
14843 2022-08-10  Paul Eggert  <eggert@cs.ucla.edu>
14845         stdckdint: fix dependency
14846         * modules/stdckdint (Depends-on): Add stdbool.
14847         Reported by Bruno Haible.
14849         maint: parenthesize macro definiens
14850         * lib/intprops.h (INT_ADD_OK, INT_SUBTRACT_OK, INT_MULTIPLY_OK):
14851         * lib/pipe-filter-ii.c (GetLastError):
14852         * lib/thread-optim.h (gl_multithreaded): Parenthesize
14853         function-like macro definiens beginning with a unary operator;
14854         needed for weird invocations like ‘m (...)[p]’.
14856 2022-08-09  Paul Eggert  <eggert@cs.ucla.edu>
14858         stdckdint: prefer to intprops when easy
14859         stdckdint.h is part of draft C23 and therefore is more likely
14860         to be familiar to programmers in the future, so prefer it to
14861         intprops.h in files that don’t need non-_WRAPV intprops.h macros.
14862         * lib/alignalloc.c, lib/backupfile.c, lib/fnmatch.c, lib/fnmatch_loop.c:
14863         * lib/group-member.c, lib/malloca.c, lib/posixtm.c, lib/reallocarray.c:
14864         * lib/xmalloc.c:
14865         For files that can use stdckdint.h just as easily as intprops.h,
14866         include the former instead of the latter, and use the former’s
14867         ckd_* macros instead of the latter’s *_WRAPV macros.
14868         * modules/alignalloc, modules/backup-rename, modules/backupfile:
14869         * modules/fnmatch, modules/group-member, modules/malloca:
14870         * modules/posixtm, modules/reallocarray:
14871         * modules/relocatable-prog-wrapper, modules/xalloc:
14872         Depend on stdckdint instead of intprops.
14874         stdckdint: new module
14875         This supports draft C23 <stdckdint.h>.
14876         * doc/posix-headers/stdckdint.texi:
14877         * lib/stdckdint.in.h, modules/stdckdint:
14878         * modules/stdckdint-tests, tests/test-stdckdint.c:
14879         New files.
14880         * MODULES.html.sh, doc/gnulib.texi: Update for new module.
14881         * lib/intprops-internal.h: Include <stdckdint.h> if C23 and
14882         its macros would help and our substitute has not already
14883         started to be included.
14884         (_GL_INT_ADD_WRAPV, _GL_INT_SUBTRACT_WRAPV)
14885         (_GL_INT_MULTIPLY_WRAPV): Use ckd_add, ckd_sub, ckd_mul
14886         if they are defined and would help.
14887         * lib/intprops-internal.h, lib/intprops.h: Improve comments.
14888         The C23 restrictions on stdckdint macros already mostly applied to
14889         intprops.h, so these are clarifications, not further restrictions.
14890         * tests/test-intprops.c: If TEST_STDCKDINT is defined,
14891         include <stdckdint.h> instead of "intprops.h", and test
14892         it instead.
14893         (VERIFY) [TEST_STDCKDINT]: Ignore the arg in this case.
14894         (main) [TEST_STDCKDINT]: Skip tests irrelevant to stdckdint.h.
14896         intprops: refactor intprops.h into two
14897         * lib/intprops.h: Include new file intprops-internal.h.
14898         (_GL_INT_CONVERT, _GL_INT_NEGATE_CONVERT, _GL_INT_MINIMUM)
14899         (_GL_INT_MAXIMUM, _GL_SIGNED_INT_MAXIMUM, LLONG_MAX, LLONG_MIN)
14900         (_GL_HAVE___TYPEOF__, _GL_SIGNED_TYPE_OR_EXPR)
14901         (_GL_HAS_BUILTIN_ADD_OVERFLOW, _GL_HAS_BUILTIN_MUL_OVERFLOW)
14902         (_GL_HAS_BUILTIN_OVERFLOW_P, _GL__GENERIC_BOGUS)
14903         (_GL_INT_OP_WRAPV, _GL_INT_OP_WRAPV_LONGISH, _GL_INT_OP_CALC)
14904         (_GL_INT_OP_WRAPV_VIA_UNSIGNED, _GL_INT_ADD_RANGE_OVERFLOW)
14905         (_GL_INT_SUBTRACT_RANGE_OVERFLOW)
14906         (_GL_INT_MULTIPLY_RANGE_OVERFLOW):
14907         Move to intprops-internal.h.
14908         (TYPE_SIGNED, EXPR_SIGNED, TYPE_WIDTH, INT_NEGATE_RANGE_OVERFLOW)
14909         (INT_NEGATE_OVERFLOW, INT_ADD_WRAPV, INT_SUBTRACT_WRAPV)
14910         (INT_MULTIPLY_WRAPV): Rename to _GL_ prefix, move to
14911         intprops-internal.h, and define here in terms of the _GL_ name.
14912         * lib/intprops-internal.h: New file, containing the above.
14913         * modules/intprops (Files): Add lib/intprops-internal.h.
14915         intprops: refactor _GL_HAS_BUILTIN_OVERFLOW_P
14916         * lib/intprops.h (_GL_HAS_BUILTIN_OVERFLOW_P)
14917         [_GL_HAS_BUILTIN_OVERFLOW_P]: Use __builtin_sub_overflow_p
14918         directly rather than indirectly via INT_SUBTRACT_OVERFLOW.
14919         This simplifies future changes, and doesn’t change the generated code.
14921         verify: port ‘assume’ to C23 non-GCC
14922         * lib/verify.h (assume): Use C23's unreachable if available
14923         and if GCC and/or MSC primitives are not available.
14925 2022-08-09  Bruno Haible  <bruno@clisp.org>
14927         gnulib-tool.py: Finish implementing option --conditional-dependencies.
14928         * gnulib-tool.py (main) Accept options --conditional-dependencies,
14929         --no-conditional-dependencies.
14930         * pygnulib/GLModuleSystem.py (GLModuleTable.addConditional): Use
14931         str(module), not module, as key. Fix logic bug.
14932         (GLModuleTable.getCondition): Simplify.
14933         (GLModuleTable.transitive_closure): Show a warning when there are
14934         duplicate dependencies. Fix logic bug.
14935         (GLModuleTable.transitive_closure_separately): Simplify.
14936         (GLModuleTable.add_dummy): Ignore tests modules. Cope with multiple
14937         lib_SOURCES augmentation lines. Cope with comments at the end of a
14938         lib_SOURCES augmentation line. Add the dummy module at the end of the
14939         modules list.
14940         * pygnulib/GLTestDir.py (GLTestDir.execute): Remove the code that forces
14941         the dummy module to the end of the list.
14942         * pygnulib/GLEmiter.py (GLEmiter.autoconfSnippets): Add code to
14943         terminate the shell functions. Add code for the dependencies from the
14944         unconditional to the conditional modules. Don't emit AM_CONDITIONAL for
14945         unconditional modules.
14947         gnulib-tool.py: Don't do license replacements in the autoconf snippets.
14948         * pygnulib/GLEmiter.py (GLEmiter.autoconfSnippet): Remove fileassistant
14949         argument. Don't invoke the 'aux' transformer here. Don't produce Windows
14950         CR-LFs on Windows.
14951         (GLEmiter.autoconfSnippets): Remove fileassistant argument.
14952         * pygnulib/GLImport.py (GLImport.gnulib_comp): Update all callers.
14953         * pygnulib/GLTestDir.py (GLTestDir.execute): Likewise.
14955         gnulib-tool.py: Fix some code generation details.
14956         * pygnulib/GLEmiter.py (GLEmiter.lib_Makefile_am): When removing a
14957         lib_LDFLAGS line, remove also the newline. Fix regex that matches
14958         lib_SOMETHING. Add a newline after each '## begin gnulib module' line.
14959         Don't emit 'endif' lines without corresponding 'if'. When emitting a
14960         '+=' augmentation, make sure it does not get emitted a second time.
14961         Don't emit a blank line when there is no AM_CPPFLAGS augmentation.
14962         Update after getLink() changed. In the value of DEFAULT_TEXT_DOMAIN,
14963         backslash-escape the double-quotes. Don't produce Windows CR-LFs on
14964         Windows. Simplify.
14965         (GLEmiter.tests_Makefile_am): When removing a lib_LDFLAGS line, remove
14966         also the newline. Fix regex that matches lib_SOMETHING. Don't remove a
14967         blank line before EXTRA_DIST. Add a newline after each
14968         '## begin gnulib module' line. Set uses_subdirs also when there is a .c
14969         file in a subdir of tests/. When emitting a '+=' augmentation, make sure
14970         it does not get emitted a second time. Don't produce Windows CR-LFs on
14971         Windows. Simplify.
14972         * pygnulib/GLImport.py (GLImport.execute): Update after getLink()
14973         changed.
14975         gnulib-tool.py: Fixes for conditional dependencies.
14976         * pygnulib/GLModuleSystem.py (GLModule.shell_id_chars): New constant.
14977         (GLModule.getShellFunc): Don't use md5 just because of an '_' character.
14978         (GLModule.getShellVar): Likewise.
14979         (GLModule.getConditionalName): Include a newline in the md5 input.
14980         * pygnulib/constants.py (ALPHANUMERIC): Remove constant.
14982         gnulib-tool.py: Refactor.
14983         * pygnulib/GLModuleSystem.py (GLModule.getLicense): Separate the warning
14984         logic from the result logic.
14986 2022-08-09  Paul Eggert  <eggert@cs.ucla.edu>
14988         largefile, year2038: simplify if > Autoconf 2.71
14989         * m4/largefile.m4 (gl_SET_LARGEFILE_SOURCE)
14990         (_AC_SYS_LARGEFILE_MACRO_VALUE):
14991         * m4/year2038.m4 (gl_YEAR2038_EARLY, gl_YEAR2038, gl_YEAR2038_BODY):
14992         Adjust to Autoconf versions after 2.71, which should contain the Gnulib
14993         patches in this area and so should not need to be overridden.
14995 2022-08-07  Bruno Haible  <bruno@clisp.org>
14997         gnulib-tool.py: Finish implementing option --extract-test-module.
14998         * gnulib-tool.py (main): Accept option --extract-tests-module.
15000         gnulib-tool.py: Fix handling of nonexistent module names in --extract-*.
15001         * gnulib-tool.py (main): To test whether a module exists, just call
15002         GLModuleSystem.find and test its return value.
15004         gnulib-tool.py: Fix --extract-dependencies result.
15005         * pygnulib/GLModuleSystem.py (GLModule.getDependencies): Return a
15006         snippet, not a list. Implement dependency of ${module}-tests on
15007         ${module}.
15008         (GLModule.getDependenciesWithoutConditions,
15009         GLModule.getDependenciesWithConditions): New methods.
15010         (GLModuleTable.transitive_closure): Call getDependenciesWithConditions.
15011         * pygnulib/GLEmiter.py (GLEmiter.autoconfSnippets): Call
15012         getDependenciesWithoutConditions.
15013         * gnulib-tool.py (main) [--extract-dependencies]: Update.
15015         gnulib-tool.py: Rename a method.
15016         * pygnulib/GLModuleSystem.py (GLModule.getAutoconfEarlySnippet): Renamed
15017         from GLModule.getAutoconfSnippet_Early.
15018         * pygnulib/GLImport.py: Update.
15019         * pygnulib/GLTestDir.py: Likewise.
15021         gnulib-tool.py: Fix section extraction from module descriptions.
15022         The code with   self.content.split(section)[-1]
15023         was broken because it recognizes an indented section label.
15024         Similar code with   ('\n' + self.content).split('\n' + section)[-1]
15025         would still be broken because it recognizes an indented section label
15026         in the first line of the file.
15027         The code with   section_label_regex
15028         was broken because sometimes it returns the second-to-last section with
15029         the given label, not the last one.
15030         Also, whitespace after the colon was not ignored.
15031         * pygnulib/GLModuleSystem.py (GLModule.__init__): Dissect the module
15032         description's contents immediately, once only, in a reliable way.
15033         (GLModule.getDescription, GLModule.getComment): Simplify.
15034         (GLModule.getStatus): Simplify. Return a string.
15035         (GLModule.getStatuses): New function. Return a list.
15036         (GLModule.getNotice, GLModule.getApplicability, GLModule.getFiles,
15037         GLModule.getDependencies, GLModules.getAutoconfSnippet_Early,
15038         GLModules.getAutoconfSnippet, GLModule.getAutomakeSnippet_Conditional,
15039         GLModule.getInclude, GLModule.getLink, GLModule.getLicense_Raw):
15040         Simplify.
15041         (GLModule.getLicense): Remove whitespace after calling getLicense_Raw.
15042         (GLModule.getMaintainer): Simplify.
15043         (GLModuleTable.transitive_closure): Call getStatuses() instead of
15044         getStatus().
15045         * pygnulib/GLEmiter.py: Likewise.
15046         * gnulib-tool.py (main): For --extract-description, --extract-comment,
15047         --extract-status, --extract-notice, --extract-autoconf-snippet,
15048         --extract-automake-snippet, --extract-include-directive,
15049         --extract-link-directive, --extract-maintainer, don't add an extra
15050         newline after the snippet.
15052         gnulib-tool.py: Improve field naming.
15053         * pygnulib/GLModuleSystem.py (GLModule): Rename field 'module' to
15054         'path'. Fix a typo in a TypeError message.
15056         gnulib-tool.py: Simplify.
15057         * pygnulib/GLModuleSystem.py (GLModule): Convert Windows newlines right
15058         after reading the module description, not in every accessor.
15060         gnulib-tool.py: Reduce code duplication.
15061         * pygnulib/GLModuleSystem.py (GLModule): Declare two regexes are class
15062         variables.
15064         gnulib-tool.py: Implement option --find.
15065         * pygnulib/GLModuleSystem.py (GLModuleSystem.file_is_module): New
15066         method.
15067         (GLModuleSystem.list): Filter the listing in memory; don't use a 'sed'
15068         subprocess.
15069         * gnulib-tool.py (main): Handle mode 'find'.
15071         gnulib-tool: Fix option --find in combination with option --local-dir.
15072         * gnulib-tool (func_prefixed_modules_in_dir): New function.
15073         (find): Use it, and filter the directory names away after the 'grep'
15074         pass.
15076         gnulib-tool.py: Fix some regexes.
15077         * pygnulib/GLEmiter.py (GLEmiter.lib_Makefile_am): Use an equivalent
15078         regex as gnulib-tool.
15079         * pygnulib/GLTestDir.py (GLTestDir.execute): Likewise.
15081         gnulib-tool.py: Fix some regex uses.
15082         * pygnulib/GLModuleSystem.py (GLModuleTable.transitive_closure): Match
15083         the regex against all lines of the snippet, not only the first line.
15084         * pygnulib/GLEmiter.py (GLEmiter.autoconfSnippet): Likewise.
15086         gnulib-tool.py: Make regex uses more straightforward.
15087         * pygnulib/constants.py: Don't use the "minimal matching" *? construct
15088         when it makes no difference (because we're matching a single line only
15089         and flag re.M is not specified).
15090         * pygnulib/GLModuleSystem.py: Likewise.
15092         gnulib-tool.py: Make regex uses more straightforward.
15093         * pygnulib/GLModuleSystem.py: Don't use flag re.S on regular expressions
15094         that are meant to match a single line only, and remove the use of the
15095         "minimal matching" *? construct whose only purpose was to neutralize the
15096         re.S flag.
15097         * pygnulib/GLEmiter.py: Likewise.
15098         * pygnulib/GLImport.py: Likewise.
15099         * pygnulib/GLTestDir.py: Likewise.
15101         gnulib-tool.py: Make regex uses more straightforward.
15102         * pygnulib/GLEmiter.py: Don't use flag re.S on regular expressions on
15103         regular expressions with no '.'.
15104         * pygnulib/GLImport.py: Likewise.
15106 2022-08-06  Bruno Haible  <bruno@clisp.org>
15108         gnulib-tool: In the VC files messages, omit the destination directory.
15109         This makes these messages consistent with the other "Copying ..." and
15110         "Creating ..." messages.
15111         * gnulib-tool (func_import): Omit $destdir/ from the "Updating"/
15112         "Creating" messages regarding .gitignore files.
15113         * pygnulib/GLImport.py (GLImport._update_ignorelist_): Likewise.
15115         gnulib-tool.py: Fix output in --dry-run mode.
15116         * pygnulib/GLImport.py (GLImport._update_ignorelist_): In dry-run mode,
15117         say "Update", not "Updating".
15119         gnulib-tool.py: Finish implementing options --vc-files, --no-vc-files.
15120         * gnulib-tool.py (main): Accept options --vc-files, --no-vc-files.
15121         * pygnulib/GLImport.py (GLImport.__init__): Correct parsing of
15122         gl_VC_FILES directive.
15123         (GLImport.gnulib_cache): Don't treat the value False like None.
15124         (GLImport.execute): Skip the .gitignore file manipulations if vc_files
15125         is False.
15127         gnulib-tool.py: Finish implementing option --witness-c-macro.
15128         * gnulib-tool.py (main): Accept option --witness-c-macro.
15129         * pygnulib/GLConfig.py (GLConfig.__init__): Remove wrong type check of
15130         witness_c_macro argument.
15132 2022-08-05  Bruno Haible  <bruno@clisp.org>
15134         gnulib-tool.py: Don't initialize local variables too early.
15135         * gnulib-tool.py (main): Initialize each local variable in one place.
15136         I prefer to have pylint tell me about uninitialized variables than to
15137         get the value None at runtime.
15139         gnulib-tool.py: Finish implementing option --po-domain.
15140         * gnulib-tool.py (main): Accept option --po-domain.
15141         * pygnulib/GLEmiter.py (GLEmiter.po_POTFILES_in): Fix variable
15142         reference.
15143         * pygnulib/GLImport.py (GLImport.execute): Don't delete Makefile.in.in
15144         from the gnulib directory. Don't require a shell when invoking wget.
15145         After invoking wget, restore the current directory.
15147         gnulib-tool.py: Finish implementing option --macro-prefix.
15148         * gnulib-tool.py (main): Accept option --macro-prefix.
15150         gnulib-tool.py: Refactor --makefile-name option.
15151         * gnulib-tool.py (main): Handle option --makefile-name like all other
15152         string-valued options.
15154         gnulib-tool.py: Implement option --no-libtool.
15155         * gnulib-tool.py (main): Accept option --no-libtool.
15157         gnulib-tool.py: Remove redundant type checks.
15158         * pygnulib/GLConfig.py (GLConfig.__init__): Remove redundant type
15159         checks, left over from 2022-08-04.
15160         (GLConfig.getIncludeGuardPrefix): Improve comment.
15161         (GLConfig.resetMacroPrefix): Optimize.
15163         gnulib-tool.py: Refactor --makefile-name option.
15164         * gnulib-tool.py (main): Rename variable 'makefile' to 'makefile_name'.
15165         * pygnulib/GLConfig.py: Rename attribute 'makefile' to 'makefile_name'.
15166         * pygnulib/GLMakefileTable.py: Update.
15167         * pygnulib/GLEmiter.py: Likewise.
15168         * pygnulib/GLImport.py: Likewise.
15169         * pygnulib/GLFileSystem.py (GLFileAssistant): Remove unused assignment.
15171         gnulib-tool.py: Fix link_if_changed function.
15172         * pygnulib/constants.py (joinpath): Fix comment.
15173         (as_link_value_at_dest): New function, extracted from link_relative.
15174         (link_relative): Use it.
15175         (link_if_changed): Really don't replace the symbolic link if it does not
15176         need to change.
15178         gnulib-tool.py: Fix 'Unused import' warnings.
15179         * gnulib-tool.py: Remove unused imports.
15180         * pygnulib/*.py: Likewise.
15182         gnulib-tool.py: Fix 'Undefined variable' errors.
15183         * pygnulib/constants.py: Import codecs.
15184         * pygnulib/GLConfig.py (GLConfig.setLibName): Fix local variable
15185         reference.
15186         * pygnulib/GLFileSystem.py (GLFileSystem.lookup,
15187         GLFileAssistant.update): Fix local variable references.
15188         * pygnulib/GLEmiter.py (GLEmiter.po_POTFILES_in): Fix reference.
15189         * pygnulib/GLTestDir.py (GLMegaTestDir.execute): Define missing local
15190         variables.
15192         gnulib-tool.py: Make option --version work.
15193         * pygnulib/constants.py (__copyright__): Bump copyright year.
15194         * pygnulib/GLInfo.py (GLInfo.authors): Add a comma after the
15195         second-to-last author.
15196         (GLInfo.copyright): Show only the last modification year.
15197         (GLInfo.date): Check whether git and GNU date are available. Use
15198         'git log ChangeLog', not 'git log'. Run 'git log' in the gnulib
15199         directory, not in the current directory. Search for 'Date:' only at the
15200         beginning of a line. As a fallback, look at the first ChangeLog entry.
15201         (GLInfo.version): Check whether git is available. Run git-version-gen in
15202         the gnulib directory, not in the current directory. Replace '-dirty'
15203         with '-modified'. As a fallback, return the empty string.
15204         * gnulib-tool.py (main) [--version]: Add a space before the version.
15206         gnulib-tool.py: Simplify.
15207         * pygnulib/constants.py (compiler): Remove function.
15208         * gnulib-tool.py: Use re.compile directly instead.
15209         * pygnulib/*.py: Likewise.
15211 2022-08-04  Bruno Haible  <bruno@clisp.org>
15213         gnulib-tool.py: Fix typo.
15214         * pygnulib/GLImport.py (GLImport.execute): Actually handle file
15215         removals.
15217         gnulib-tool.py: Coding style: Revisit line breaks.
15218         * gnulib-tool.py: Avoid line breaks at arbitrary points inside
15219         expressions. Use line breaks to clarify [... for ...] iterations.
15220         * pygnulib/*.py: Likewise.
15222         gnulib-tool.py: Simplify boolean setters.
15223         * pygnulib/GLConfig.py (setLibtool): New method, replaces enableLibtool
15224         and disableLibtool.
15225         (setCondDeps): New method, replaces enableCondDeps and disableCondDeps.
15226         (setVCFiles): New method, replaces enableVCFiles and disableVCFiles.
15227         (setSymbolic): New method, replaces enableSymbolic and disableSymbolic.
15228         (setLSymbolic): New method, replaces enableLSymbolic and
15229         disableLSymbolic.
15230         (setLibtests): New method, replaces enableLibtests and disableLibtests.
15231         (setSingleConfigure): New method, replaces enableSingleConfigure and
15232         disableSingleConfigure.
15233         (setDryRun): New method, replaces enableDryRun and disableDryRun.
15234         (setErrors): New method, replaces enableErrors and disableErrors.
15235         (__init__): Update.
15236         * pygnulib/GLImport.py: Likewise.
15237         * pygnulib/GLTestDir.py: Likewise.
15239         gnulib-tool.py: Implement options --cache-modules, --no-cache-modules.
15240         * gnulib-tool.py (main): Accept options --cache-modules,
15241         --no-cache-modules.
15242         * pygnulib/GLConfig.py: Remove modcache property and constructor
15243         argument.
15244         * pygnulib/GLInfo.py (GLInfo.usage): Don't document these no-op options.
15246         gnulib-tool.py: Use mainstream/GNU coding style.
15247         * gnulib-tool.py: Break lines before the % operator, not after.
15248         * pygnulib/*.py: Likewise. Avoid line breaks when the resulting lines
15249         are not too long.
15251         gnulib-tool.py: Follow gnulib-tool changes, part 24.
15252         Follow gnulib-tool change
15253         2017-02-19  Bruno Haible  <bruno@clisp.org>
15254         gnulib-tool: Avoid conflict of havelib-tests with --single-configure.
15255         * pygnulib/GLTestDir.py (GLTestDir.__init__): Don't allocate the
15256         GLModuleTable here.
15257         (GLTestDir.execute): Do it here. Avoid havelib-tests when
15258         --with-tests --single-configure is specified.
15260         gnulib-tool.py: Respect the specified module list.
15261         * pygnulib/GLTestDir.py (GLTestDir.execute): Don't remove specific
15262         modules (ftruncate, mountlist, etc.) from the specified module list.
15264         gnulib-tool.py: Implement option --avoid.
15265         * pygnulib/GLModuleSystem.py (GLModuleTable.__init__): Compute the
15266         effective avoids list here.
15267         (GLModuleTable.transitive_closure, GLModuleTable.add_dummy): Consider
15268         the avoids list.
15269         * pygnulib/GLImport.py (GLImport.gnulib_cache): Use the avoids list from
15270         GLConfig directly.
15271         (GLImport.prepare): No need any more to set the avoids list in the
15272         GLModuleTable.
15274         gnulib-tool.py: Make --with/--without-*-tests handling a little safer.
15275         * pygnulib/GLConfig.py (__init__): Fix reset* invocations.
15276         setInclTestCategories, setExclTestCategories): Revert to old value if
15277         the new value is invalid.
15279 2022-08-03  Bruno Haible  <bruno@clisp.org>
15281         gnulib-tool.py: Implement option --single-configure.
15282         * gnulib-tool.py (main): Accept option --single-configure. Pass its
15283         value to the GLConfig constructor.
15284         * pygnulib/GLTestDir.py (GLTestDir.execute): Remove debugging output.
15286         gnulib-tool.py: Implement options --without-c++-tests etc.
15287         * gnulib-tool.py (main): Accept options --without-c++-tests,
15288         --without-longrunning-tests, --without-privileged-tests,
15289         --without-unportable-tests.
15290         Improve error message for --copy-file with invalid number of arguments.
15291         Check for invalid options given in --import, --add-import,
15292         --remove-import, --update modes.
15293         Pass both sets of test categories to the GLConfig constructor.
15294         * pygnulib/GLConfig.py (GLConfig.__init__): Accept incl_test_categories
15295         and excl_test_categories instead of testflags.
15296         (checkInclTestCategory): Renamed from checkTestFlag.
15297         (enableInclTestCategory): Renamed from enableTestFlag.
15298         (disableInclTestCategory): Renamed from disableTestFlag.
15299         (getInclTestCategories): Renamed from getTestFlags.
15300         (setInclTestCategories): Renamed from setTestFlags.
15301         (resetInclTestCategories): Renamed from resetTestFlags.
15302         (setInclTestCategory, checkExclTestCategory, enableExclTestCategory,
15303         disableExclTestCategory, getExclTestCategories, setExclTestCategories,
15304         resetExclTestCategories): New methods.
15305         * pygnulib/GLModuleSystem.py (GLModuleTable.__init__): Accept two
15306         booleans as second and third constructor arguments.
15307         (transitive_closure): Correct the determination of whether to include
15308         each module, depending on the with-* and without-* options.
15309         (transitive_closure_separately): Update.
15310         * pygnulib/GLMakefileTable.py: Update.
15311         * pygnulib/GLImport.py (__init__, actioncmd, gnulib_cache, execute):
15312         Update.
15313         * pygnulib/GLTestDir.py (GLTestDir.__init__, GLTestDir.execute,
15314         GLMegaTestDir.__init__): Update.
15316         gnulib-tool.py: Implement option --without-tests.
15317         * gnulib-tool.py (main): Accept option --without-tests.
15319         gnulib-tool.py: Fix broken 'for' loop.
15320         * gnulib-tool.py (main): Canonicalize inctests before creating the
15321         GLConfig. Rewrite a broken 'for' loop.
15322         * pygnulib/GLConfig.py (GLConfig.setTestFlags): Remove unused statement.
15324         gnulib-tool.py: Follow gnulib-tool changes, part 23.
15325         Follow gnulib-tool changes
15326         2016-11-11  Bruno Haible  <bruno@clisp.org>
15327         gnulib-tool: Support for the dual "LGPLv3+ or GPLv2" license.
15328         2016-12-02  Nikos Mavrogiannopoulos <nmav@gnutls.org>
15329         gnulib-tool (func_import): Adhere to the license guideline ...
15330         2016-12-02  Daiki Ueno  <ueno@gnu.org>
15331         gnulib-tool (func_import): Relax the regex ...
15332         * gnulib-tool.py: For --lgpl, accept value 3orGPLv2.
15333         * pygnulib/GLInfo.py (GLInfo.usage): Update.
15334         * pygnulib/GLConfig.py (GLConfig.setLGPL): Update argument check.
15335         * pygnulib/GLImport.py (GLImport.__init__, GLImport.gnulib_cache):
15336         Update gl_LGPL handling.
15337         (GLImport.prepare): Update license compatibility checks and license
15338         header rewriting.
15339         * pygnulib/GLTestDir.py (GLTestDir.execute): Update license
15340         compatibility checks. Handle also the licenses GPLv3+, GPL, LGPLv3+.
15342         gnulib-tool.py: Fix unjustified "incompatible license" warnings.
15343         * pygnulib/GLTestDir.py (GLTestDir.execute): Don't emit a warning when
15344         the dependency module has a license such as "public domain" or
15345         "unlimited".
15347         gnulib-tool.py: Follow gnulib-tool changes, part 22.
15348         Follow gnulib-tool change
15349         2016-10-15  Bruno Haible  <bruno@clisp.org>
15350         Avoid gnulib-tool warnings about the dependencies of 'parse-datetime'.
15351         * pygnulib/GLModuleSystem.py (GLModule.getLicense): Special-case the
15352         'parse-datetime' module.
15354         gnulib-tool.py: Follow gnulib-tool changes, part 21.
15355         Follow gnulib-tool change
15356         2016-10-16  Bruno Haible  <bruno@clisp.org>
15357         gnulib-tool: Make --create-testdir on all modules work again.
15358         * pygnulib/GLTestDir.py (GLTestDir.execute): Don't include the
15359         non-recursive-gnulib-prefix-hack module.
15361         gnulib-tool.py: Follow gnulib-tool changes, part 20.
15362         Follow gnulib-tool changes
15363         2016-01-15  Paul Eggert  <eggert@cs.ucla.edu>
15364         gnulib-tool: don't assume ln -s works
15365         2016-01-24  Paul Eggert  <eggert@cs.ucla.edu>
15366         gnulib-tool: don't give up on ln -s so easily
15367         2017-06-08  Bruno Haible  <bruno@clisp.org>
15368         gnulib-tool: Fix bug in func_ln_s, from 2016-01-15.
15369         * pygnulib/constants.py (symlink_relative): New function.
15370         (link_relative): Use it instead of os.symlink.
15372         gnulib-tool.py: Avoid errors when writing to a VFAT file system, part 2.
15373         * pygnulib/constants.py (movefile): New function.
15374         * pygnulib/*.py: Use it instead of shutil.
15376         gnulib-tool.py: Avoid errors when writing to a VFAT file system.
15377         * pygnulib/constants.py (copyfile, copyfile2): New functions.
15378         * gnulib-tool.py: Use them instead of shutil.
15379         * pygnulib/*.py: Likewise.
15381         gnulib-tool.py: Fix typo.
15382         * pygnulib/GLImport.py (GLImport.__init__): Use the relative auxdir as
15383         second, not as first argument of joinpath.
15385 2022-07-31  Bruno Haible  <bruno@clisp.org>
15387         gnulib-tool.py: Fix typo.
15388         * pygnulib/GLTestDir.py (GLMegaTestDir.execute): Invoke os.mkdir as
15389         intended.
15391         gnulib-tool.py: Improve some error messages.
15392         * gnulib-tool.py (main): Write "*** Stop." instead of "*** Exit.".
15393         (__main__): Print an error message for GLError 5, 13, 14, 15, 16, 17, 18.
15394         * pygnulib/GLError.py (GLError.__repr__): Compute one error message,
15395         not 19.
15397         gnulib-tool.py: Write errors to stderr, not stdout.
15398         * pygnulib/constants.py: Write error messages to stderr, not stdout.
15400         gnulib-tool.py: Use mainstream coding style.
15401         * pygnulib/GLConfig.py: Use 'raise' to re-throw an exception.
15403         gnulib-tool.py: Implement options --symlink and --local-symlink.
15404         * gnulib-tool.py (main): Handle options --symlink and --local-symlink.
15405         * pygnulib/constants.py (link_if_changed): Ignore FileNotFoundError from
15406         os.remove call.
15408         gnulib-tool.py: Make --copy-file work.
15409         * gnulib-tool.py (main) [copy-file]: Fix reference to uninitialized
15410         variable. Fix error handling of os.makedirs. Pass the destdir to the
15411         GLFileAssistant.
15413         gnulib-tool.py: Allow module arguments to occur at any position.
15414         * gnulib-tool.py (main): Collect the non-option arguments in a single
15415         list, regardless of their position. Use parse_known_args instead of
15416         parse_args, and give an error message about unknown options ourselves.
15417         * gnulib-tool: Fix typo in error message.
15419         gnulib-tool.py: Make --test behaviour more similar to gnulib-tool.
15420         * gnulib-tool.py (main) [test]: Remove space from the testdir name.
15422         gnulib-tool: Clarify that --test allows zero module arguments.
15423         * gnulib-tool (func_usage): Mark the modules for --test as optional.
15424         * pygnulib/GLInfo.py (GLInfo.usage): Likewise.
15426         gnulib-tool.py: Make option processing more similar to gnulib-tool.
15427         * gnulib-tool.py (main): Allow --add-import and --remove-import with 0
15428         modules.
15430         gnulib-tool.py: Improve compliance with GNU standards.
15431         * gnulib-tool.py (main): Handle --help and --version before testing for
15432         conflicting modes.
15434         gnulib-tool.py: Emit error message when conflicting modes are specified.
15435         * gnulib-tool.py (main): Fix test of conflicting modes. (Some options
15436         produce a value of [], and as a condition, [] evaluates to False.)
15438         gnulib-tool.py: Remove most short options.
15439         * gnulib-tool.py (main): Reorder the list of options. Remove most short
15440         options, for consistency with gnulib-tool.
15442         gnulib-tool.py: Follow gnulib-tool changes, part 19.
15443         Follow gnulib-tool changes
15444         2015-12-09  Pavel Raiskup  <praiskup@redhat.com>
15445         gnulib-tool: allow multiple --local-dir usage
15446         2019-02-14  Bruno Haible  <bruno@clisp.org>
15447         gnulib-tool: Improve handling of multiple --local-dir options.
15448         * gnulib-tool (func_reconstruct_cached_dir): When the argument is
15449         absolute, return it unmodified.
15450         (func_compute_relative_local_gnulib_path): Renamed from
15451         func_count_relative_local_gnulib_path. Add comment.
15452         * gnulib-tool.py: Accept multiple --local-dir options and collect the
15453         values into localpath.
15454         * pygnulib/GLConfig.py: Take a localpath argument instead of a localdir
15455         argument.
15456         (getLocalDir, setLocalDir, resetLocalDir): Remove methods.
15457         (getLocalPath, setLocalPath, resetLocalPath): New methods.
15458         * pygnulib/GLFileSystem.py (CopyAction): New class.
15459         (GLFileSystem.lookup): Consider all dirs in localpath.
15460         (GLFileSystem.shouldLink): New method.
15461         (GLFileAssistant): Use shouldLink.
15462         * pygnulib/GLModuleSystem.py (GLModuleSystem.exists): Iterate over all
15463         dirs in localpath.
15464         (GLModuleSystem.list): Likewise.
15465         * pygnulib/GLEmiter.py: Update.
15466         * pygnulib/GLImport.py (GLImport.__init__): Put the argument of
15467         gl_LOCAL_DIR into localpath, not localdir.
15468         (GLImport.actioncmd): Consider all dirs in localpath.
15469         (GLImport.relative_to_destdir, GLImport.relative_to_currdir): New
15470         methods.
15471         (GLImport.gnulib_cache): Combine all dirs in localpath. Use
15472         self.relative_to_destdir.
15473         * pygnulib/GLTestDir.py (GLTestDir.execute): Use shouldLink.
15475         gnulib-tool.py: Improve the primitives for relative file names.
15476         * pygnulib/constants.py (relativize): Don't attempt to handle absolute
15477         file names. Fix bug with relativize('../foo/bar', '../foo/bla/zut').
15478         (relconcat): New function.
15480         gnulib-tool.py: Follow gnulib-tool changes, part 18.
15481         Follow gnulib-tool change
15482         2005-09-20  Bruno Haible  <bruno@clisp.org>
15483         gnulib-tool: Remove trailing slashes
15484         * pygnulib/constants.py (remove_trailing_slashes): New function.
15485         * pygnulib/GLConfig.py (GLConfig): Use it in the setters.
15487 2022-07-31  Bruno Haible  <bruno@clisp.org>
15489         avltree-omap, avltree-oset, avltreehash-list, rbtree-omap: Pacify GCC.
15490         * lib/gl_avltree_omap.c (gl_avltree_omap_check_invariants): Add extern
15491         decl.
15492         * lib/gl_avltree_oset.c (gl_avltree_oset_check_invariants): Likewise.
15493         * lib/gl_avltreehash_list.c (gl_avltreehash_list_check_invariants):
15494         Likewise.
15495         * lib/gl_rbtree_omap.c (gl_rbtree_omap_check_invariants): Likewise.
15497 2022-07-31  Paul Eggert  <eggert@cs.ucla.edu>
15499         rbtree-oset, rbtreehash-list: Pacify GCC
15500         * lib/gl_rbtree_oset.c (gl_rbtree_oset_check_invariants):
15501         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_check_invariants):
15502         Add extern decls, to pacify --enable-gcc-warnings with Bison.
15504 2022-07-31  Akim Demaille  <akim@lrde.epita.fr>
15506         gnulib-tool: add support for --automake-subdir-tests
15507         <https://lists.gnu.org/r/bug-gnulib/2022-01/msg00111.html>
15508         * gnulib-tool (main): Handle --automake-subdir-tests.
15509         (func_emit_shellvars_init, func_emit_lib_Makefile_am): Use
15510         $sourcebase when handling tests and --automake-subdir-tests is
15511         given.
15512         (func_append_actionarg): Support --automake-subdir-tests.
15513         (func_create_testdir): Add missing argument for func_emit_initmacro_end.
15515 2022-07-31  Bruno Haible  <bruno@clisp.org>
15517         gendocs.sh: Fix error when invoking 'perl' (regression 2022-07-23).
15518         * build-aux/gendocs.sh (PERL): Use double-quotes, not single-quotes.
15520 2022-07-30  Bruno Haible  <bruno@clisp.org>
15522         gnulib-tool.py: Clean up imports.
15523         * gnulib-tool.py: Remove unused constants.
15524         * pygnulib/*.py: Likewise.
15526         gnulib-tool.py: Assume Python 3.
15527         * gnulib-tool.py: Don't allow 'bytes' as an alternative to 'str'.
15528         * pygnulib/*.py: Likewise.
15530         gnulib-tool.py: Assume Python 3.
15531         * gnulib-tool.py: Don't set PYTHON3, string. Use str instead of string.
15532         * pygnulib/*.py: Likewise.
15534         gnulib-tool.py: Modernize coding style.
15535         * pygnulib/*.py: Remove parentheses around raise value expressions.
15537 2022-07-30  Bruno Haible  <bruno@clisp.org>
15539         doc: Update regarding bootstrap split.
15540         Reported by Paul Smith <psmith@gnu.org>.
15541         * doc/gnulib-tool.texi (gettextize and autopoint): Mention autogen.sh
15542         instead of bootstrap.
15543         (VCS Issues): Describe three alternative approaches.
15544         * doc/gnulib.texi (Developer tools): Mention also autopull.sh and
15545         autogen.sh.
15546         * top/bootstrap (usage): Fix copy&paste mistake.
15548 2022-07-29  Bruno Haible  <bruno@clisp.org>
15550         gnulib-tool.py: Follow gnulib-tool changes, part 17.
15551         Follow gnulib-tool change
15552         2015-10-06  Pavel Raiskup  <praiskup@redhat.com>
15553         gnulib-tool: fix tests of 'extensions' module
15554         * pygnulib/GLEmiter.py (GLEmiter.preEarlyMacros): New function.
15555         * pygnulib/GLImport.py (GLImport.gnulib_comp): Invoke it.
15556         * pygnulib/GLTestDir.py (GLTestDir.execute): Likewise.
15558         gnulib-tool.py: Follow gnulib-tool changes, part 16.
15559         Follow gnulib-tool change
15560         2015-09-25  Pavel Raiskup  <praiskup@redhat.com>
15561         gnulib-common.m4: fix gl_PROG_AR_RANLIB/AM_PROG_AR clash
15562         * pygnulib/GLImport.py (GLImport.gnulib_comp): Put the
15563         gl_USE_SYSTEM_EXTENSIONS right before gl_PROG_AR_RANLIB into
15564         gnulib-comp.m4 (if the 'extensions' module is used).
15566         gnulib-tool.py: Modernize coding style.
15567         * pygnulib/*.py: Remove parentheses around return value expressions.
15569         gnulib-tool.py: Modernize the file headers.
15570         * pygnulib/*.py: Remove '#!/usr/bin/python' (not needed) and
15571         'encoding: UTF-8' lines (default in Python 3). Add copyright notice.
15573         gnulib-tool.py: Use mainstream coding style.
15574         * gnulib-tool.py: Clarify the coding style. Fix some pycodestyle
15575         warnings.
15576         * pygnulib/constants.py: Likewise.
15577         * pygnulib/GLEmiter.py: Likewise.
15578         * pygnulib/GLImport.py: Likewise.
15579         * pygnulib/GLMakefileTable.py: Likewise.
15581 2022-07-29  Bruno Haible  <bruno@clisp.org>
15583         gnulib-tool.py: Fix error (regression 2021-04-11).
15584         * pygnulib/GLConfig.py (GLConfig.getModuleIndicatorPrefix): Fix code.
15586         gnulib-tool.py: Fix warning from Python 3.10.4.
15587         * pygnulib/GLModuleSystem.py (getConditionalName): Fix a string
15588         substitution expression.
15590         gnulib-tool.py: Fix error in Ubuntu 22.04.
15591         * gnulib-tool.py: Search for python3 in $PATH.
15593 2022-07-25  Bruno Haible  <bruno@clisp.org>
15595         bootstrap: Make the automatic sync more resilient.
15596         Reported by Paul Eggert in
15597         <https://lists.gnu.org/archive/html/bug-gnulib/2022-07/msg00060.html>.
15598         * top/bootstrap (bootstrap_sync): Set to true when bootstrap-funclib.sh
15599         is not present.
15600         * top/gen-bootstrap.sed: Insert a couple of comment lines.
15601         * build-aux/bootstrap: Regenerated using "make build-aux/bootstrap".
15603 2022-07-24  Bruno Haible  <bruno@clisp.org>
15605         Fix comment.
15606         Reported by Paul Eggert in
15607         <https://lists.gnu.org/archive/html/bug-gnulib/2022-07/msg00058.html>.
15608         * top/bootstrap-funclib.sh: Fix comment about canonical location.
15609         * top/autopull.sh: Likewise.
15610         * top/autogen.sh: Likewise.
15611         * top/bootstrap: Likewise.
15613         Split bootstrap into autopull.sh and autogen.sh.
15614         * top/bootstrap-funclib.sh: New file, based on build-aux/bootstrap.
15615         * top/autopull.sh: New file, based on build-aux/bootstrap.
15616         * top/autogen.sh: New file, based on build-aux/bootstrap.
15617         * top/bootstrap: New file, based on build-aux/bootstrap.
15618         * top/gen-bootstrap.sed: New file.
15619         * Makefile (build-aux/bootstrap): New rule.
15620         (regen): Depend on it.
15621         * build-aux/bootstrap: Regenerated using "make build-aux/bootstrap".
15623 2022-07-24  Bruno Haible  <bruno@clisp.org>
15625         bootstrap: Obey another environment variable GNULIB_REFDIR.
15626         * build-aux/bootstrap (usage): Document option --gnulib-refdir and
15627         environment variable GNULIB_REFDIR.
15628         Accept option --gnulib-refdir.
15629         When GNULIB_SRCDIR is specified, verify that it denotes a directory.
15630         Use $GNULIB_REFDIR, not $GNULIB_SRCDIR, as argument to git's --reference
15631         option.
15632         Improve an error message.
15633         * NEWS: Mention the change.
15635 2022-07-23  Bruno Haible  <bruno@clisp.org>
15637         Fix a couple of ShellCheck warnings.
15638         * MODULES.html.sh (sed_escape_slash): Remove unused variable.
15639         * build-aux/bootstrap: Avoid computed printf format strings.
15640         * build-aux/do-release-commit-and-tag: Likewise.
15641         * build-aux/gendocs.sh: Likewise.
15642         * build-aux/declared.sh: Fix "unrecognized option" message.
15643         * gnulib-tool (supplied_opts): Remove unused variable.
15644         (--single-con): Remove redundant option recognition.
15645         * tests/test-parse-duration.sh (nl): Remove unused variable.
15646         * tests/test-update-copyright.sh: Use double-quotes instead of
15647         single-quotes.
15649 2022-07-23  Bruno Haible  <bruno@clisp.org>
15651         Avoid DoS vulnerability through unsafe default assignment.
15652         See https://www.shellcheck.net/wiki/SC2223 .
15653         * MODULES.html.sh (func_tmpdir): Surround default assignment with
15654         double-quotes.
15655         * build-aux/bootstrap: Likewise.
15656         * build-aux/csharpcomp.sh.in (func_tmpdir): Likewise.
15657         * build-aux/gendocs.sh: Likewise.
15658         * build-aux/libtool-next-version (func_tmpdir): Likewise.
15659         * config/srclist-update: Likewise.
15660         * gnulib-tool (func_tmpdir): Likewise.
15661         * posix-modules (func_tmpdir): Likewise.
15662         * tests/test-atexit.sh: Likewise.
15663         * tests/test-btoc32-1.sh: Likewise.
15664         * tests/test-btoc32-2.sh: Likewise.
15665         * tests/test-btowc1.sh: Likewise.
15666         * tests/test-btowc2.sh: Likewise.
15667         * tests/test-c-dtoastr.sh: Likewise.
15668         * tests/test-c-ldtoastr.sh: Likewise.
15669         * tests/test-c-snprintf.sh: Likewise.
15670         * tests/test-c-strcase.sh: Likewise.
15671         * tests/test-c-vasprintf.sh: Likewise.
15672         * tests/test-c-vsnprintf.sh: Likewise.
15673         * tests/test-c-xvasprintf.sh: Likewise.
15674         * tests/test-c32isalnum.sh: Likewise.
15675         * tests/test-c32isalpha.sh: Likewise.
15676         * tests/test-c32isblank.sh: Likewise.
15677         * tests/test-c32iscntrl.sh: Likewise.
15678         * tests/test-c32isdigit.sh: Likewise.
15679         * tests/test-c32isgraph.sh: Likewise.
15680         * tests/test-c32islower.sh: Likewise.
15681         * tests/test-c32isprint.sh: Likewise.
15682         * tests/test-c32ispunct.sh: Likewise.
15683         * tests/test-c32isspace.sh: Likewise.
15684         * tests/test-c32isupper.sh: Likewise.
15685         * tests/test-c32isxdigit.sh: Likewise.
15686         * tests/test-c32rtomb.sh: Likewise.
15687         * tests/test-c32snrtombs-1.sh: Likewise.
15688         * tests/test-c32snrtombs-2.sh: Likewise.
15689         * tests/test-c32snrtombs-3.sh: Likewise.
15690         * tests/test-c32snrtombs-4.sh: Likewise.
15691         * tests/test-c32srtombs-1.sh: Likewise.
15692         * tests/test-c32srtombs-2.sh: Likewise.
15693         * tests/test-c32srtombs-3.sh: Likewise.
15694         * tests/test-c32srtombs-4.sh: Likewise.
15695         * tests/test-c32stombs-1.sh: Likewise.
15696         * tests/test-c32stombs-2.sh: Likewise.
15697         * tests/test-c32stombs-3.sh: Likewise.
15698         * tests/test-c32stombs-4.sh: Likewise.
15699         * tests/test-closein.sh: Likewise.
15700         * tests/test-copy-acl.sh (func_tmpdir): Likewise.
15701         * tests/test-copy-file.sh (func_tmpdir): Likewise.
15702         * tests/test-dprintf-posix.sh: Likewise.
15703         * tests/test-execl.sh: Likewise.
15704         * tests/test-execle.sh: Likewise.
15705         * tests/test-execlp.sh: Likewise.
15706         * tests/test-execv.sh: Likewise.
15707         * tests/test-execve.sh: Likewise.
15708         * tests/test-execvp.sh: Likewise.
15709         * tests/test-execvpe.sh: Likewise.
15710         * tests/test-file-has-acl.sh (func_tmpdir): Likewise.
15711         * tests/test-fprintf-posix.sh: Likewise.
15712         * tests/test-init.sh: Likewise.
15713         * tests/test-iswdigit.sh: Likewise.
15714         * tests/test-iswxdigit.sh: Likewise.
15715         * tests/test-mbmemcasecmp1.sh: Likewise.
15716         * tests/test-mbmemcasecmp2.sh: Likewise.
15717         * tests/test-mbmemcasecmp3.sh: Likewise.
15718         * tests/test-mbmemcasecoll1.sh: Likewise.
15719         * tests/test-mbmemcasecoll2.sh: Likewise.
15720         * tests/test-mbmemcasecoll3.sh: Likewise.
15721         * tests/test-mbrtoc32-1.sh: Likewise.
15722         * tests/test-mbrtoc32-2.sh: Likewise.
15723         * tests/test-mbrtoc32-3.sh: Likewise.
15724         * tests/test-mbrtoc32-4.sh: Likewise.
15725         * tests/test-mbrtowc1.sh: Likewise.
15726         * tests/test-mbrtowc2.sh: Likewise.
15727         * tests/test-mbrtowc3.sh: Likewise.
15728         * tests/test-mbrtowc4.sh: Likewise.
15729         * tests/test-mbscasecmp.sh: Likewise.
15730         * tests/test-mbscasestr2.sh: Likewise.
15731         * tests/test-mbscasestr3.sh: Likewise.
15732         * tests/test-mbscasestr4.sh: Likewise.
15733         * tests/test-mbschr.sh: Likewise.
15734         * tests/test-mbscspn.sh: Likewise.
15735         * tests/test-mbsinit.sh: Likewise.
15736         * tests/test-mbsncasecmp.sh: Likewise.
15737         * tests/test-mbsnrtoc32s-1.sh: Likewise.
15738         * tests/test-mbsnrtoc32s-2.sh: Likewise.
15739         * tests/test-mbsnrtoc32s-3.sh: Likewise.
15740         * tests/test-mbsnrtoc32s-4.sh: Likewise.
15741         * tests/test-mbsnrtowcs1.sh: Likewise.
15742         * tests/test-mbsnrtowcs2.sh: Likewise.
15743         * tests/test-mbsnrtowcs3.sh: Likewise.
15744         * tests/test-mbsnrtowcs4.sh: Likewise.
15745         * tests/test-mbspbrk.sh: Likewise.
15746         * tests/test-mbspcasecmp.sh: Likewise.
15747         * tests/test-mbsrchr.sh: Likewise.
15748         * tests/test-mbsrtoc32s-1.sh: Likewise.
15749         * tests/test-mbsrtoc32s-2.sh: Likewise.
15750         * tests/test-mbsrtoc32s-3.sh: Likewise.
15751         * tests/test-mbsrtoc32s-4.sh: Likewise.
15752         * tests/test-mbsrtowcs1.sh: Likewise.
15753         * tests/test-mbsrtowcs2.sh: Likewise.
15754         * tests/test-mbsrtowcs3.sh: Likewise.
15755         * tests/test-mbsrtowcs4.sh: Likewise.
15756         * tests/test-mbsspn.sh: Likewise.
15757         * tests/test-mbsstr2.sh: Likewise.
15758         * tests/test-mbsstr3.sh: Likewise.
15759         * tests/test-mbstoc32s-1.sh: Likewise.
15760         * tests/test-mbstoc32s-2.sh: Likewise.
15761         * tests/test-mbstoc32s-3.sh: Likewise.
15762         * tests/test-mbstoc32s-4.sh: Likewise.
15763         * tests/test-nl_langinfo.sh: Likewise.
15764         * tests/test-parse-duration.sh (func_tmpdir): Likewise.
15765         * tests/test-perror.sh: Likewise.
15766         * tests/test-printf-posix.sh: Likewise.
15767         * tests/test-set-mode-acl.sh (func_tmpdir): Likewise.
15768         * tests/test-setlocale1.sh: Likewise.
15769         * tests/test-strtod1.sh: Likewise.
15770         * tests/test-strtold1.sh: Likewise.
15771         * tests/test-unicodeio2.sh: Likewise.
15772         * tests/test-unicodeio3.sh: Likewise.
15773         * tests/test-vasnprintf-posix2.sh: Likewise.
15774         * tests/test-vc-list-files-cvs.sh: Likewise.
15775         * tests/test-vc-list-files-git.sh: Likewise.
15776         * tests/test-vdprintf-posix.sh: Likewise.
15777         * tests/test-vfprintf-posix.sh: Likewise.
15778         * tests/test-vprintf-posix.sh: Likewise.
15779         * tests/test-wcrtomb.sh: Likewise.
15780         * tests/test-wcsnrtombs1.sh: Likewise.
15781         * tests/test-wcsnrtombs2.sh: Likewise.
15782         * tests/test-wcsnrtombs3.sh: Likewise.
15783         * tests/test-wcsnrtombs4.sh: Likewise.
15784         * tests/test-wcsrtombs1.sh: Likewise.
15785         * tests/test-wcsrtombs2.sh: Likewise.
15786         * tests/test-wcsrtombs3.sh: Likewise.
15787         * tests/test-wcsrtombs4.sh: Likewise.
15788         * tests/test-xprintf-posix.sh: Likewise.
15789         * tests/test-xstrtoimax.sh: Likewise.
15790         * tests/test-xstrtol.sh: Likewise.
15791         * tests/test-xstrtoll.sh: Likewise.
15792         * tests/test-xstrtoumax.sh: Likewise.
15793         * tests/test-yesno.sh: Likewise.
15794         * tests/unicase/test-locale-language.sh: Likewise.
15795         * tests/unicase/test-ulc-casecmp1.sh: Likewise.
15796         * tests/unicase/test-ulc-casecmp2.sh: Likewise.
15797         * tests/unicase/test-ulc-casecoll1.sh: Likewise.
15798         * tests/unicase/test-ulc-casecoll2.sh: Likewise.
15799         * tests/unigbrk/test-ulc-grapheme-breaks.sh: Likewise.
15800         * tests/unistdio/test-u16-vasnprintf2.sh: Likewise.
15801         * tests/unistdio/test-u16-vasnprintf3.sh: Likewise.
15802         * tests/unistdio/test-u32-vasnprintf2.sh: Likewise.
15803         * tests/unistdio/test-u32-vasnprintf3.sh: Likewise.
15804         * tests/unistdio/test-u8-vasnprintf2.sh: Likewise.
15805         * tests/unistdio/test-u8-vasnprintf3.sh: Likewise.
15806         * tests/unistdio/test-ulc-vasnprintf2.sh: Likewise.
15807         * tests/unistdio/test-ulc-vasnprintf3.sh: Likewise.
15808         * tests/uniwbrk/test-ulc-wordbreaks.sh: Likewise.
15809         * tests/uniwidth/test-uc_width2.sh: Likewise.
15811 2022-07-18  Bruno Haible  <bruno@clisp.org>
15813         bootstrap: Comments.
15814         * build-aux/bootstrap: Comment about two unused variables.
15816 2022-07-17  Bruno Haible  <bruno@clisp.org>
15818         doc: Update README.
15819         * doc/README: Fix stale links (reported by Tzvetelin Katchov). Clarify
15820         the relation to build-aux/gnu-web-doc-update.
15822 2022-07-14  Bruno Haible  <bruno@clisp.org>
15824         doc: Fix typo.
15825         Reported by Eric Gallager <egall@gwmail.gwu.edu> in
15826         <https://lists.gnu.org/archive/html/bug-gnulib/2022-07/msg00045.html>.
15827         * doc/posix-functions/mmap.texi: Add parenthesis.
15829 2022-07-12  Paul Eggert  <eggert@cs.ucla.edu>
15831         parse-datetime: improve doc for TZ="<-07>7" etc.
15832         * doc/parse-datetime.texi (Specifying time zone rules):
15833         Give examples of POSIX TZ strings that specify UTC offsets (Bug#56524).
15835 2022-07-10  Bruno Haible  <bruno@clisp.org>
15837         sigsegv: Optimize stackvma implementation for AIX 7.
15838         Reported by Neha Jain <nehajain29@in.ibm.com> in
15839         <https://lists.gnu.org/archive/html/bug-m4/2022-06/msg00005.html>
15840         via Eric Blake.
15841         * lib/stackvma.c: For AIX, add implementation that uses /proc/$pid/map,
15842         based on lib/vma-iter.c.
15843         (sigsegv_get_vma): Use it on AIX 7 or higher.
15845 2022-07-10  Bruno Haible  <bruno@clisp.org>
15847         vma-iter: Add support for AIX 7.
15848         * lib/vma-iter.h (VMA_ITERATE_SUPPORTED): Define also on AIX.
15849         * lib/vma-iter.c (vma_iterate): Add code for AIX, known to work on
15850         AIX 7.
15851         * lib/get-rusage-as.c: Update comments.
15852         * lib/get-rusage-data.c: Likewise.
15853         * tests/test-get-rusage-as.c (main): Take into account the special
15854         address space organization on AIX in 32-bit mode.
15856 2022-07-10  Bruno Haible  <bruno@clisp.org>
15858         iconv: Define a summary result.
15859         Reported by Simon Josefsson in
15860         <https://lists.gnu.org/archive/html/bug-gnulib/2022-07/msg00020.html>.
15861         * m4/iconv.m4 (AM_ICONV): Define also am_cv_func_iconv_summary.
15863 2022-07-10  Bruno Haible  <bruno@clisp.org>
15865         iconv: Remove obsolete comment.
15866         * m4/iconv.m4 (AM_ICONV): Remove comment that is obsolete since
15867         2020-08-16.
15869 2022-07-10  Bruno Haible  <bruno@clisp.org>
15871         announce-gen: Fix internationalization in verification instructions.
15872         * build-aux/announce-gen: Set LC_ALL, not LANG, to "C", to force English
15873         output from gpg.
15875 2022-07-10  Bruno Haible  <bruno@clisp.org>
15877         lib-symbol-visibility: Improve documentation.
15878         * doc/lib-symbol-visibility.texi: Tweak BUILDING_SHARED snippet.
15880 2022-07-10  Bruno Haible  <bruno@clisp.org>
15882         doc: Mark Minix as no longer tested.
15883         Rationale: No commits since 2018 at https://git.minix3.org/.
15884         Reported by Paul Eggert and Jim Meyering in
15885         <https://lists.gnu.org/archive/html/grep-devel/2022-07/msg00027.html>.
15886         * doc/gnulib-intro.texi (Supported Platforms): Mark Minix as no longer
15887         tested.
15889 2022-07-09  Jim Meyering  <meyering@fb.com>
15891         announce-gen: better diagnose some usage errors
15892         * build-aux/announce-gen (main): Erroneous usage would elicit a
15893         misleading diagnostic. When --gnulib-version=V was specified:
15894         - without --bootstrap_tools, or
15895         - with --bootstrap_tools, but without listing "gnulib" as a tool
15896         we would give an inappropriate diagnostic. Now, each diagnostic
15897         is tailored to the precise erroneous condition.
15898         Reported by Bruno Haible in
15899         https://lists.gnu.org/r/bug-gnulib/2022-01/msg00025.html
15901 2022-07-09  Simon Josefsson  <simon@josefsson.org>
15903         git-version-gen: Doc fix.
15904         Reported by Reuben Thomas <rrt@sc3d.org> in
15905         <https://lists.gnu.org/archive/html/bug-gnulib/2022-04/msg00012.html>.
15906         * build-aux/git-version-gen (usage): Replace incorrect text with
15907         bug report instructions.
15909 2022-07-09  Simon Josefsson  <simon@josefsson.org>
15911         announce-gen: Improve GnuPG verification instructions.
15912         * build-aux/announce-gen: Add GPG fingerprint to output, and a
15913         pointer to GNU keyring.
15915 2022-07-08  Simon Josefsson  <simon@josefsson.org>
15917         lib-symbol-visibility: Improve documentation.
15918         * doc/lib-symbol-visibility.texi: Include BUILDING_SHARED snippet
15919         suggested by Bruno Haible.
15921 2022-07-04  Bruno Haible  <bruno@clisp.org>
15923         havelib: Fix 'configure --help' output.
15924         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Fix m4 quoting bug.
15926 2022-07-03  Bruno Haible  <bruno@clisp.org>
15928         lib-symbol-visibility: Improve documentation.
15929         Reported by Vivien Kraus <vivien@planete-kraus.eu> in
15930         <https://lists.gnu.org/archive/html/bug-gnulib/2022-06/msg00093.html>.
15931         * doc/lib-symbol-visibility.texi: List the platforms. Extend the
15932         LIBFOO_DLL_EXPORTED to work also with mingw and also with
15933         --disable-shared.
15935 2022-07-03  Bruno Haible  <bruno@clisp.org>
15937         supersede: Support the file name "/dev/null" on native Windows.
15938         * lib/supersede.c (open_supersede): On native Windows, map "/dev/null"
15939         to "NUL".
15941 2022-06-23  Jim Meyering  <meyering@fb.com>
15943         maint.mk: fix syntax-check for unnecessary hash.h header use
15944         * top/maint.mk (_hash_re): Correct the regexp. It had two problems:
15945         - lacked the "hash_" prefix, so would match non-uses
15946         - failed to detect uses of the hash_x?initialize functions
15947         The former led to an excess/unneeded use of hash.h in coreutils' cut.c.
15948         The latter would have led to a FP "not needed" report for copy.c.
15950 2022-06-22  Bruno Haible  <bruno@clisp.org>
15952         fchmodat: Fix test failure on native Windows.
15953         * modules/fchmodat (Depends-on): Add 'chmod'.
15955 2022-06-22  Bruno Haible  <bruno@clisp.org>
15957         chmod: Add tests.
15958         * tests/test-chmod.c: New file, based on tests/test-lchmod.c.
15959         * modules/chmod-tests: New file.
15961         chmod: New module.
15962         * lib/sys_stat.in.h (chmod): Declare when GNULIB_CHMOD is 1.
15963         * lib/chmod.c: New file, based on lib/lchmod.c.
15964         * m4/chmod.m4: New file, based on m4/fchmodat.m4.
15965         * m4/sys_stat_h.m4 (gl_SYS_STAT_H): Test whether chmod is declared.
15966         (gl_SYS_STAT_H_REQUIRE_DEFAULTS): Initialize GNULIB_CHMOD.
15967         (gl_SYS_STAT_H_DEFAULTS): Initialize REPLACE_CHMOD.
15968         * modules/sys_stat (Makefile.am): Substitute GNULIB_CHMOD,
15969         REPLACE_CHMOD.
15970         * modules/chmod: New file, based on modules/lchmod.
15971         * doc/posix-functions/chmod.texi: Mention the new module and the
15972         problems on IRIX and Windows.
15974 2022-06-21  Bruno Haible  <bruno@clisp.org>
15976         lchmod: Simplify.
15977         * lib/lchmod.c: Remove unnecessary include, obsolete since 2020-02-23.
15979 2022-06-20  Bruno Haible  <bruno@clisp.org>
15981         javacomp-script, javaexec-script: Add support for disabling Java.
15982         * m4/javacomp.m4 (gt_JAVACOMP_DISABLED): New macro.
15983         * m4/javaexec.m4 (gt_JAVAEXEC_DISABLED): New macro.
15985 2022-06-19  Paul Eggert  <eggert@cs.ucla.edu>
15987         lchmod: port back to AIX 7.2
15988         Problem reported by Bruno Haible in:
15989         https://lists.gnu.org/r/bug-gnulib/2022-06/msg00075.html
15990         * lib/lchmod.c: Include string.h, for strlen.
15991         (lchmod): Do not depend on HAVE_READLINK since we now depend on
15992         the readlink module.  Check for AIX 7.2 bug.
15993         * m4/lchmod.m4 (gl_PREREQ_LCHMOD): Do not check for readlink
15994         since we now depend on the readlink module.
15995         * modules/lchmod (Depends-on): Depend on readlink.
15997         fchmodat: pacify gcc -Wunused-variable
15998         Problem reported by Bruno Haible in:
15999         https://lists.gnu.org/r/bug-gnulib/2022-06/msg00075.html
16000         * lib/fchmodat.c (fchmodat): Remove unused local.
16002 2022-06-19  Bruno Haible  <bruno@clisp.org>
16004         getlogin, getlogin_r tests: Really avoid test failure.
16005         Reported by Letu Ren <fantasquex@gmail.com> in
16006         <https://lists.gnu.org/archive/html/bug-gnulib/2022-06/msg00037.html>.
16007         * tests/test-getlogin.h (test_getlogin_result): Parse the contents of
16008         /proc/self/loginuid as an unsigned integer.
16010 2022-06-12  Paul Eggert  <eggert@cs.ucla.edu>
16012         fchmodat: port better to MS-Windows etc.
16013         MS-Windows problem reported by Bruno Haible in:
16014         https://lists.gnu.org/r/bug-gnulib/2022-06/msg00041.html
16015         Although I don’t use MS-Windows I see some related fstatat etc.
16016         problems and am trying to fix them with this further patch.
16017         * lib/fchmodat.c (fchmodat):
16018         * lib/lchmod.c (lchmod):
16019         * lib/lchown.c (lchown)
16020         [!HAVE_LCHOWN && HAVE_CHOWN && !CHOWN_MODIFIES_SYMLINK]:
16021         * lib/renameatu.c (renameatu)
16022         [HAVE_RENAME && RENAME_TRAILING_SLASH_SOURCE_BUG]:
16023         Use readlinkat/readlink instead of fstatat/lstat to test merely
16024         whether a string names a symlink, as this avoids problems
16025         with EOVERFLOW.  Also, I hope it works around the MS-Windows
16026         issues that Bruno noted.
16027         * m4/fchmodat.m4 (gl_PREREQ_FCHMODAT):
16028         Check for readlinkat, not lchmod.
16029         * m4/lchmod.m4 (gl_FUNC_LCHMOD): Do not require AC_CANONICAL_HOST
16030         or check for lstat.
16031         (gl_PREREQ_LCHMOD): Check for readlink.
16032         * modules/lchown (Depends-on): Add readlink.  Do not depend on
16033         lstat merely because !HAVE_LCHOWN.
16034         * modules/renameatu (Depends-on): Add fstatat, readlinkat.
16036 2022-06-12  Bruno Haible  <bruno@clisp.org>
16038         doc: Update O_PATH platforms list.
16039         * doc/posix-headers/fcntl.texi: Update O_PATH platforms list.
16041 2022-06-11  Paul Eggert  <eggert@cs.ucla.edu>
16043         fcntl: document O_PATH
16044         * doc/posix-headers/fcntl.texi: Mention O_PATH.
16046         fchmodat: port to old Linux kernel + newer headers
16047         Problem reported by Lance Fredrickson in:
16048         https://lists.gnu.org/r/bug-gnulib/2022-06/msg00038.html
16049         * lib/fchmodat.c (fchmodat):
16050         * lib/lchmod.c (lchmod): Do not rely on AT_EMPTY_PATH as to
16051         whether syscalls work on ""; instead, if a call fails with
16052         ENOENT assume that those syscalls do not work.
16053         Do not use fstatat to determine whether a file is a symlink,
16054         as this has problems with EOVERFLOW.  Use readlinkat instead,
16055         and if it fails with EINVAL then the file is not a symlink.
16056         Remove #if tests on __linux__ || __ANDROID__ || __CYGWIN__
16057         as this has been a maintenance hassle and it’s unlikely
16058         these days that a new platform would #define O_PATH without also
16059         either supporting /proc or keeping it absent.
16060         * modules/fchmodat (Depends-on): Remove fstatat.
16061         There should be no need for either fchmodat or lchmod to depend on
16062         readlinkat, since they use readlinkat only in contexts where it
16063         should work without Gnulib intervention.
16065 2022-06-06  Bruno Haible  <bruno@clisp.org>
16067         fopen-gnu: Make this module work again (regression 2022-01-03).
16068         Reported by Nelson H. F. Beebe <beebe@math.utah.edu> in
16069         <https://lists.gnu.org/archive/html/platform-testers/2022-04/msg00005.html>.
16070         * modules/fopen-gnu (configure.ac): Invoke gl_STDIO_MODULE_INDICATOR.
16072 2022-06-06  Bruno Haible  <bruno@clisp.org>
16074         getlogin, getlogin_r tests: Avoid test failure in specific environments.
16075         Reported by Letu Ren <fantasquex@gmail.com> in
16076         <https://lists.gnu.org/archive/html/bug-gnulib/2022-06/msg00001.html>.
16077         * modules/getlogin-tests (Depends-on): Add stdbool.
16078         * modules/getlogin_r-tests (Depends-on): Likewise.
16079         * tests/test-getlogin.h: Include stdbool.h.
16080         (test_getlogin_result): On Linux, skip the test if /proc/self/loginuid
16081         contains "-1".
16083 2022-06-05  Bruno Haible  <bruno@clisp.org>
16085         doc: Add section to attract more people towards the GNU project.
16086         Inspired by a suggestion from José E. Marchesi <jemarch@gnu.org> on
16087         the gnu-prog-discuss mailing list.
16088         * doc/join-gnu.texi: New file.
16089         * doc/gnulib-readme.texi: Include it.
16091 2022-06-05  Bruno Haible  <bruno@clisp.org>
16093         doc: Fix warnings about regex chapter structure (regression 2022-05-15).
16094         * doc/regex.texi (GNU Operators): Fix menu.
16096 2022-06-04  Paul Eggert  <eggert@cs.ucla.edu>
16098         regex-quote: \} -> } in EREs
16099         * lib/regex-quote.c (ere_special): Don’t use \} in EREs,
16100         as POSIX says the interpretation is undefined.
16101         * tests/test-regex-quote.c (test_bre, test_ere):
16102         Add tests for }.
16104         dfa: do not warn about \] and \}
16105         * lib/dfa.c (lex): Do not warn about \] and \}, since they’re
16106         surely universally supported even though POSIX says their
16107         interpretation is undefined.
16109 2022-06-03  Paul Eggert  <eggert@cs.ucla.edu>
16111         regex-quote: \] -> ] in EREs and BREs
16112         * build-aux/bootstrap:
16113         * build-aux/bootstrap.conf (gettext_external):
16114         * check-AC_LIBOBJ:
16115         * lib/regex-quote.c (bre_special, ere_special):
16116         * gnulib-tool (func_modules_transitive_closure)
16117         (func_emit_autoconf_snippet, func_import, func_create_testdir):
16118         * tests/test-regex-quote.c (test_bre, test_ere):
16119         * top/maint.mk (longopt_re, gpg_key_ID):
16120         Don’t use \] in BREs and EREs, as POSIX says the interpretation is
16121         undefined.
16123         filevercmp: don’t treat entire filename as suffix
16124         Problem reported by Artém S. Tashkinóv in:
16125         https://lists.gnu.org/r/bug-gnulib/2022-06/msg00012.html
16126         * lib/filevercmp.c (file_prefixlen): When stripping
16127         (\.[A-Za-z~][A-Za-z0-9~]*)*$ suffixes, do not strip
16128         the entire file name.
16129         * tests/test-filevercmp.c (examples): Adjust to match new behavior.
16131 2022-06-03  Bruno Haible  <bruno@clisp.org>
16133         setlocale: Update after Turkey changed its name.
16134         * lib/setlocale.c: Update comments.
16136 2022-05-25  Karl Berry  <karl@freefriends.org>
16138         doc: regex.texi deleted the node GNU Emacs Operators
16139         * doc/gnulib.texi (Regular expression): remove "GNU Emacs Operators"
16140         from the @menu, since the node no longer exists in regex.texi.
16142 2022-05-24  Paul Eggert  <eggert@cs.ucla.edu>
16144         dfa: new options DFA_STAR_WARN, DFA_PLUS_WARN
16145         This lets ‘grep -E '(*a|+b)'’ warn about the * and the +.
16146         * lib/dfa.h (DFA_STAR_WARN, DFA_PLUS_WARN): New flags.
16147         * lib/dfa.c (lex): Support them.
16149 2022-05-23  Paul Eggert  <eggert@cs.ucla.edu>
16151         dfa: '\n' is not governed by RE_LIMITED_OPS
16152         * lib/dfa.c (lex): Pay no attention to RE_LIMITED_OPS when
16153         deciding how to parse '\n', since regcomp.c doesn’t.
16155         dfa: new option DFA_STRAY_BACKSLASH_WARN
16156         This is for grep, which wants to warn about stray backslashes that
16157         lead to unspecified behavior.  For example, "grep -oi '\a'"
16158         surprisingly is not equivalent to "grep -oi 'a'", so the stray
16159         backslash should be warned about.
16160         * lib/dfa.c: Include wctype.h, for iswprint and iswspace.
16161         (lex): Add support for DFA_STRAY_BACKSLASH_WARN.
16162         * lib/dfa.h (DFA_STRAY_BACKSLASH_WARN): New constant.
16164         dfa: new option DFA_CONFUSING_BRACKETS_ERROR
16165         This is for grep, which wants [:alpha:] to be an error
16166         at the top level.
16167         * lib/dfa.c (struct regex_syntax): New member dfaopts,
16168         replacing anchor.  All uses changed.
16169         (parse_bracket_exp): Error, not warn, if DFA_CONFUSING_BRACKETS_ERROR.
16170         * lib/dfa.h (DFA_CONFUSING_BRACKETS_ERROR): New constant.
16172 2022-05-21  Paul Eggert  <eggert@cs.ucla.edu>
16174         strstr-simple: pacify GCC 12.1
16175         * lib/str-two-way.h (two_way_long_needle): Pacify GCC 12.1
16176         -Wsuggest-attribute=pure (x86-64, -O2).
16178 2022-05-20  Paul Eggert  <eggert@cs.ucla.edu>
16180         dfa: steer cleer of POSIX-reserved symbols
16181         * lib/dfa.c (str_eq): Rename from streq.  All uses changed.
16182         (c_isdigit): Rename from isasciidigit.  The function worked in
16183         EBCDIC so it wasn’t ASCII-specific anyway.  All uses changed.
16185 2022-05-17  Paul Eggert  <eggert@cs.ucla.edu>
16187         parse-datetime: support 'J' military time zone
16188         Requested by Brian Inglis in:
16189         https://savannah.gnu.org/support/?110644
16190         * lib/parse-datetime.y (parser_control): New member J_zones_seen.
16191         (item): New item 'J'.
16192         (military_table): Add 'J'.
16193         (parse_datetime_body): Set and use J_zones_seen.
16194         * tests/test-parse-datetime.c (main): Test "J".
16196 2022-05-15  Reuben Thomas  <rrt@sc3d.org>
16198         doc: Update regex documentation to match implementation.
16199         * doc/regex.texi: remove Emacs-specific documentation; match code.
16200         Remove mention of both Emacs and non-Emacs syntax tables, as these
16201         are no longer supported by the code.  Document the word character
16202         class (alnum + _).  Add documentation for \s and \S.  Replace
16203         mentions of #defining emacs with RE_NO_GNU_OPS (which takes effect
16204         in the opposite sense); merge the node “GNU Emacs Operators” into
16205         “GNU Operators”.  For \` and \', refer to the “whole string” rather
16206         than the (Emacs) “buffer”.
16208 2022-05-15  Bruno Haible  <bruno@clisp.org>
16210         string, wchar: Fix compilation error on MSVC (regression 2021-09-07).
16211         * lib/string.in.h (free): For MSVC, add the dllimport specification if
16212         the MSVC headers have it.
16213         * lib/wchar.in.h (free): Likewise.
16215 2022-05-14  Bruno Haible  <bruno@clisp.org>
16217         glob tests: Fix a warning (regression from 2022-03-23).
16218         * tests/test-glob.c: Include <fcntl.h>.
16219         * modules/glob-tests (Depends-on): Add fcntl-h.
16221 2022-05-14  Bruno Haible  <bruno@clisp.org>
16223         termcap: Fix link error when no suitable library is found.
16224         * m4/termcap.m4 (gl_TERMCAP_BODY): If no suitable library is found,
16225         set LIBTERMCAP and LTLIBTERMCAP to empty.
16227 2022-05-13  Paul Eggert  <eggert@cs.ucla.edu>
16229         dfa: fix bug with ‘.’ and UTF-8 Hangul Syllables
16230         This fixes a bug introduced in 2019-12-18T05:41:27Z!eggert@cs.ucla.edu,
16231         an earlier patch that fixed dfa.c to not match invalid UTF-8.
16232         Unfortunately that patch had a couple of typos when dfa.c is
16233         matching against the regular expression ‘.’ (dot).  One typo
16234         caused dfa.c to incorrectly reject the valid UTF-8 sequences
16235         (ED)(90-9F)(80-BF) corresponding to U+D400 through U+D7FF, which
16236         are some Hangul Syllables and Hangul Jamo Extended-B.  The other
16237         typo caused dfa.c to incorrectly reject the valid sequences
16238         (F4)(88-8F)(80-BF)(80-BF) which correspond to U+108000 through
16239         U+10FFFF (Supplemental Private Use Area plane B).
16240         * lib/dfa.c (utf8_classes): Fix typos.
16241         * tests/test-dfa-match.sh: Test the fix.
16243 2022-05-12  Paul Eggert  <eggert@cs.ucla.edu>
16245         manywarnings: update C warnings for GCC 12
16246         Adjust for C programs compiled by GCC 12.
16247         (A C++ expert still needs to look at manywarnings-c++.m4.)
16248         * build-aux/gcc-warning.spec: Add warnings introduced in GCC 12.
16249         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Add -Wbidi-chars=any,ucn
16250         and -Wuse-after-free=3.  Although not enabled by -Wall or -Wextra
16251         they seem suitable for Gnulib-using C code.
16253 2022-05-11  Paul Eggert  <eggert@cs.ucla.edu>
16255         parse-datetime: remove Emacs cruft
16256         * lib/parse-datetime.y: Remove an ‘ifdef emacs’.  Emacs has never
16257         used this module.  The module is derived from code taken from
16258         Emacs, but that code was removed from Emacs in the 1990s.
16260 2022-05-11  Bruno Haible  <bruno@clisp.org>
16262         alloca: Remove old code for Emacs, unused since 2009.
16263         Reported by Reuben Thomas <rrt@sc3d.org> in
16264         <https://lists.gnu.org/archive/html/bug-gnulib/2022-05/msg00032.html>.
16265         * lib/alloca.c: Remove Emacs specific code.
16267 2022-05-05  Paul Eggert  <eggert@cs.ucla.edu>
16269         libc-config: update to match cdefs
16270         * lib/libc-config.h (__attribute_alloc_align__)
16271         (__attribute_maybe_unused, __fortified_attr_access)
16272         (__glibc_fortify, __glibc_fortify_n, __glibc_likely)
16273         (__glibc_safe_len_cond, __glibc_safe_or_unknown_len)
16274         (__glibc_unsafe_len, __glibc_unsigned_or_positive, __wur):
16275         Undef these too, since lib/cdefs.h now defines them
16276         unconditionally.
16278         cdefs: merge from glibc
16279         * lib/cdefs.h (__glibc_safe_or_unknown_len):
16280         Use glibc’s newer version.
16282 2022-05-02  Paul Eggert  <eggert@cs.ucla.edu>
16284         gettime-res: help the compiler
16285         * lib/gettime-res.c (gettime_res): Pacify GCC versions that
16286         incorrectly complain about earlier.tv_sec not being initialized.
16287         Let GCC know that gcd args are always positive.
16289         af_alg: port to Ubuntu 22.04
16290         Without this patch, maintainer builds of coreutils fail on Ubuntu
16291         22.04 with diagnostics like "./lib/gl_openssl.h:79:1: error:
16292         'MD5_Init' is deprecated: Since OpenSSL 3.0
16293         [-Werror=deprecated-declarations]".  From
16294         <https://wiki.openssl.org/index.php/OpenSSL_1.1.0_Changes>
16295         it appears that Gnulib needs to either define OPENSSL_API_COMPAT
16296         to a version less than 3.0, or use a compatibility layer, or
16297         assume OpenSSL 1.1.0 or later.  The simplest workaround is to
16298         define OPENSSL_API_COMPAT for 1.1.1, the oldest OpenSSL release
16299         still supported.  A better fix would be to rewrite the code to
16300         assume OpenSSL 1.1.1 or later, and stop using the older API.
16301         * lib/md5.h, lib/sha1.h, lib/sha256.h, lib/sha512.h, lib/sm3.h:
16302         Define OPENSSL_API_COMPAT to 0x10101000L to suppress
16303         the deprecation warnings on Ubuntu 22.04.
16305 2022-05-01  Paul Eggert  <eggert@cs.ucla.edu>
16307         vasnprintf: Simplify. Reduce binary code size.
16308         * lib/vasnprintf.c (VASNPRINTF): Coalesce cleanup code.
16310         vasnprintf: Simplify 'result' variable.
16311         * lib/vasnprintf.c (VASNPRINTF): Simplify initialization and test of
16312         'result' variable.
16314         vasnprintf: Simplify a free() call.
16315         * lib/vasnprintf.c (divide): Just call
16316         free (x) instead of doing ‘if (x != NULL) free (x);’.
16318 2022-04-30  Bruno Haible  <bruno@clisp.org>
16320         string: Avoid syntax error on glibc systems with GCC 11.
16321         Reported by Tom Tromey <tromey@adacore.com> in
16322         <https://lists.gnu.org/archive/html/bug-gnulib/2022-04/msg00075.html>
16323         and by Satadru Pramanik <satadru@umich.edu> in
16324         <https://lists.gnu.org/archive/html/bug-gnulib/2022-04/msg00076.html>.
16325         * lib/string.in.h (strndup): Don't rededeclare strndup if it is defined
16326         as a macro.
16328 2022-04-28  Simon Marchi  <simon.marchi@efficios.com>  (tiny change)
16330         stdlib: Fix error in C++ mode on glibc systems (regr. 2022-04-13).
16331         * lib/stdlib.in.h (free): Add exception specification like glibc does.
16333 2022-04-28  Paul Eggert  <eggert@cs.ucla.edu>
16335         glob: improve config and test cleanup
16336         Config problem reported by Benno Schulenberg in:
16337         https://lists.gnu.org/r/bug-gnulib/2022-04/msg00071.html
16338         * m4/glob.m4 (gl_GLOB): Clean up temporary file.
16339         Also, name it conf$$-file not conf-file, so it’s cleaned
16340         up on interrupt.
16341         * modules/glob-tests (MOSTLYCLEANFILES):
16342         Append test-glob.tglobfile, test-glob.tgloblink[123].
16344 2022-04-26  Paul Eggert  <eggert@cs.ucla.edu>
16346         glob: port to NetBSD 9.2
16347         Problem reported by Benno Schulenberg in:
16348         https://lists.gnu.org/r/bug-gnulib/2022-04/msg00052.html
16349         * doc/posix-functions/dirfd.texi: Document NetBSD 9.2 portability
16350         bugs.  Remove an old comment about errno that is no longer true
16351         of POSIX 2018.
16352         * lib/glob.c (glob_in_dir): Convert dirfd arg from void *
16353         to DIR * before passing it to dirfd.
16355 2022-04-21  Paul Eggert  <eggert@cs.ucla.edu>
16357         regex: match [...---...] like V7 grep
16358         Problem reported by Arnold Robbins in:
16359         https://bugs.gnu.org/20657
16360         https://lists.gnu.org/r/bug-gnulib/2022-04/msg00053.html
16361         * lib/regcomp.c (peek_token_bracket): Let [...---...] match '-'.
16362         This is an extension to POSIX, and matches V7 Unix grep.
16364 2022-04-20  Paul Eggert  <eggert@cs.ucla.edu>
16366         backupfile: fix bug when renaming simple backups
16367         * lib/backupfile.c (backupfile_internal): Fix bug when RENAME
16368         and when doing simple backups.  Problem reported by Steve Ward in:
16369         https://bugs.gnu.org/55029
16371         gettime-res: more-robust sampling
16372         * lib/gettime-res.c (gettime_res): If adjacent timestamps are
16373         identical search for a differing timestamp.  Also, stop collecting
16374         samples thereafter since they surely won’t help.
16376 2022-04-19  Paul Eggert  <eggert@cs.ucla.edu>
16378         Port _GL_HAS_C_ATTRIBUTE to pedantic gcc -std=c99
16379         * m4/gnulib-common.m4 (_GL_HAS_C_ATTRIBUTE):
16380         Disable -Wpedantic if using __has_c_attribute and this is not C2x.
16382         verify: port to pedantic gcc -std=c99
16383         * lib/verify.h (_GL_VERIFY): If we lack both _Static_assert and
16384         static_assert, suppress -Wnexted-externs.
16386         gettime-res: add tests
16387         * modules/gettime-res-tests, tests/test-gettime-res.c: New files.
16389 2022-04-16  Paul Eggert  <eggert@cs.ucla.edu>
16391         verify: port to Mac OS 10.7.5
16392         Mac OS 10.7.5 clang sets __clang_major__ to 4 even though it was
16393         derived from Clang 3.2.  Problem reported by Werner Lemberg in:
16394         https://lists.gnu.org/r/emacs-devel/2022-04/msg00779.html
16395         * lib/verify.h (_GL_HAVE__STATIC_ASSERT): Don’t define to 1
16396         when __clang_major__ == 4 && !__cplusplus
16397         && __STDC_VERSION__ < 201112L && !defined __STRICT_ANSI__.
16399 2022-04-15  Bruno Haible  <bruno@clisp.org>
16401         sigsegv: Fix compilation error on arceb CPUs.
16402         Reported by Fabrice Fontaine <fontaine.fabrice@gmail.com> in
16403         <https://lists.gnu.org/archive/html/bug-gnulib/2022-04/msg00028.html>.
16404         * m4/stack-direction.m4 (SV_STACK_DIRECTION): Treat the 'arc' variants
16405         like 'arc'.
16407 2022-04-13  Bruno Haible  <bruno@clisp.org>
16409         string, wchar: Fix error in C++ mode on glibc systems with clang.
16410         * lib/string.in.h (free): Add exception specification like glibc does.
16411         * lib/wchar.in.h (free): Likewise.
16413 2022-04-13  Bruno Haible  <bruno@clisp.org>
16415         string: Fix errors in C++ mode on glibc systems with clang.
16416         * lib/string.in.h (memchr, memrchr, rawmemchr, strchrnul, strpbrk,
16417         strstr, strcasestr): Use _GL_CXXALIASWARN1 also with clang, and add
16418         exception specification.
16420 2022-04-13  Bruno Haible  <bruno@clisp.org>
16422         math: Fix errors in C++ mode on glibc systems with clang.
16423         * lib/math.in.h (GNULIB_NAMESPACE_LACKS_ISFINITE,
16424         GNULIB_NAMESPACE_LACKS_ISINF, GNULIB_NAMESPACE_LACKS_ISNAN,
16425         GNULIB_NAMESPACE_LACKS_SIGNBIT): New macros.
16426         * tests/test-math-c++.cc (isfinite): Skip test if
16427         GNULIB_NAMESPACE_LACKS_ISFINITE is 1.
16428         (isinf): Skip test if GNULIB_NAMESPACE_LACKS_ISINF is 1.
16429         (isnan): Skip test if GNULIB_NAMESPACE_LACKS_ISNAN is 1.
16430         (signbit): Skip test if GNULIB_NAMESPACE_LACKS_SIGNBIT is 1.
16432 2022-04-08  Paul Eggert  <eggert@cs.ucla.edu>
16434         libgmp: pacify Clang too
16435         * lib/mini-gmp-gnulib.c [NDEBUG]: Also use -Wunused-variable if clang.
16436         Problem reported for Emacs by Mattias Engdegård.
16438 2022-04-04  Paul Eggert  <eggert@cs.ucla.edu>
16440         init.sh: don’t assume gzip
16441         * tests/init.sh (rand_bytes_): Don’t assume gzip is installed.
16442         I found this while testing gzip installation on a platform where I
16443         had removed the installed gzip.  gzip is executed only on
16444         platforms lacking mktemp and /dev/urandom so this code is rarely
16445         used; however, these platforms might also lack gzip since gzip
16446         is neither specified by POSIX or required by the GNU Coding Standards.
16448 2022-03-30  Paul Eggert  <eggert@cs.ucla.edu>
16450         glob: sync better with glibc
16451         * lib/glob.c (dirfd) [_LIBC]: Use #undef instead of #ifdef.
16452         Problem reported by DJ Delorie.
16454 2022-03-23  Paul Eggert  <eggert@cs.ucla.edu>
16456         glob: test for glibc bug 25659
16457         https://sourceware.org/bugzilla/show_bug.cgi?id=25659
16458         * m4/glob.m4 (gl_GLOB): Replace glob if it has bug 25659.
16459         * tests/test-glob.c (main): Test for glibc bug 25659.
16461         glob: fix symlink and // issues; improve speed
16462         * lib/glob.c: Include fcntl.h.
16463         (dirfd) [_LIBC]: New macro.
16464         (GLOB_STAT64, GLOB_LSTAT64): Remove.  Replace all uses with ...
16465         (GLOB_FSTATAT64): ... this new macro.
16466         (glob_in_dir): Treat DT_LNK like DT_UNKNOWN.
16467         Use directory-relative fstatat unless GLOB_ALTDIRFUNC, or dirfd fails.
16468         Avoid duplicate strlen (directory).
16469         Work even if directory is "/", without turning it into "//".
16470         Use a scratch buffer instead of by-hand alloca stuff.
16471         Use mempcpy and memcpy instead of stpcpy and strcpy.
16472         * modules/glob (Depends-on): Add dirfd, fstatat.  Remove stat.
16473         (License): Change from LGPLv2+ to GPL, since it depends on
16474         fstatat.
16476 2022-03-23  DJ Delorie  <dj@redhat.com>
16478         glob: resolve DT_UNKNOWN via is_dir
16480         The DT_* values returned by getdents (readdir) are only hints and
16481         not required.  In fact, some Linux filesystems return DT_UNKNOWN
16482         for most entries, regardless of actual type.  This causes make
16483         to mis-match patterns with a trailing slash (via GLOB_ONLYDIR)
16484         (see make's functions/wildcard test case).  Thus, this patch
16485         detects that case and uses is_dir() to make the type known enough
16486         for proper operation.
16488         Performance in non-DT_UNKNOWN cases is not affected.
16490         The lack of DT_* is a well known issue on older XFS installations
16491         (for example, RHEL 7 and 8, Fedora 28) but can be recreated by
16492         creating an XFS filesystem with flags that mimic older behavior:
16494         $ fallocate -l 10G /xfs.fs
16495         $ mkfs.xfs -n ftype=0 -m crc=0 -f /xfs.fs
16496         $ mkdir /xfs
16497         $ mount -o loop /xfs.fs /xfs
16499 2022-03-20  Jim Meyering  <meyering@fb.com>
16501         maint: bootstrap: split a too-long line
16502         * build-aux/bootstrap (git_modules_config): Split longer-than-80 line.
16504 2022-03-14  Simon Josefsson  <simon@josefsson.org>
16506         announce-gen: Modernize GnuPG key retrieval suggestions.  Based on
16507         patch by Darshit Shah in:
16508         https://lists.gnu.org/archive/html/bug-gnulib/2022-03/msg00022.html
16509         * build-aux/announce-gen (usage): Add --gpg-key-email and
16510         --gpg-keyring-url.
16511         (main): Support the new options.
16512         (main): Don't suggest 'gpg --keyserver' since the situation with
16513         public key servers is complicated and GnuPG version dependent.
16515         maintainer-makefile: Improve GnuPG announce-gen options.
16516         * top/maint.mk (gpg_key_emil): New variable.
16517         (gpg_keyring_url): New variable.
16518         (announcement): Pass them as --gpg-key-email and
16519         --gpg-keyring-url.
16521 2022-03-13  Ben Pfaff  <blp@cs.stanford.edu>
16523         Document Automake 1.14 requirement in NEWS, too, since it had been
16524         documented there before for the Automake 1.11 requirement.
16525         * NEWS: Mention the change.
16527 2022-03-13  Bruno Haible  <bruno@clisp.org>
16529         sigsegv: Add support for Linux/PowerPC (32-bit) with musl libc.
16530         Reported by Khem Raj <raj.khem@gmail.com> in
16531         <https://lists.gnu.org/archive/html/m4-patches/2022-03/msg00000.html>.
16532         * src/sigsegv.c (SIGSEGV_FAULT_STACKPOINTER): In the Linux/PowerPC
16533         32-bit case, handle musl libc differently.
16534         * modules/sigsegv (Files): Add m4/musl.m4.
16535         (configure.ac): Invoke gl_MUSL_LIBC.
16537 2022-03-11  Paul Eggert  <eggert@cs.ucla.edu>
16539         regex: fix double-free
16540         * lib/regex_internal.c (re_dfa_add_node): Don’t free storage
16541         twice if an allocation fails.
16543         regex: fix minor over-allocation
16544         * lib/regexec.c (push_fail_stack): Fix off-by-one error that
16545         over-allocated the stack.
16547         regex: fix free_fail_stack undefined behavior
16548         * lib/regexec.c (push_fail_stack): Don’t increment number of
16549         re_fail_stack_t entries until after successful allocation.  This
16550         prevents a crash if re_realloc or re_malloc fails here, and a
16551         later free_fail_stack examines regs or a later pop_fail_stack
16552         examines node.  Problem discovered by Coverity scan sent
16553         2022-03-11 11:03:52Z.
16555 2022-03-10  Paul Eggert  <eggert@cs.ucla.edu>
16557         fts: revert change to use AT_NO_AUTOMOUNT
16558         * NEWS: Don’t mention AT_NO_AUTOMOUNT.
16559         * lib/fts.c (fts_stat): Don’t use AT_NO_AUTOMOUNT, as
16560         it has no effect with fstatat.
16562 2022-03-09  Paul Eggert  <eggert@cs.ucla.edu>
16564         statat: now obsolete
16565         * lib/openat.h (statat, lstatat): Now deprecated.
16566         All uses removed, and replaced with fstatat.
16567         * modules/statat: Mark as obsolete, because it’s confusing:
16568         it’s not clear whether it should use AT_NO_AUTOMOUNT,
16569         which is implied by stat and by lstat, but not by fstatat.
16570         * tests/test-statat.c: Disable deprecated-declarations warnings.
16572         fts: be consistent about AT_NO_AUTOMOUNT
16573         * lib/fts.c (fts_stat): Use fstatat with AT_NO_AUTOMOUNT
16574         consistently, instead of sometimes using stat (which implies
16575         AT_NO_AUTOMOUNT) and sometimes using fstatat without AT_NO_AUTOMOUNT.
16576         Remove a goto while we’re at it.
16578 2022-03-07  Pádraig Brady  <P@draigBrady.com>
16580         fcntl-h: add AT_NO_AUTOMOUNT
16581         * lib/fcntl.in.h: Define AT_NO_AUTOMOUNT to 0 where not defined.
16582         This is available on Linux since 2.6.38.
16584 2022-03-01  Paul Eggert  <eggert@cs.ucla.edu>
16586         Create lib/Makefile.am after gnulib-comp.m4
16587         * gnulib-tool (func_import): Create library makefile after
16588         creating gnulib-comp.m4.  With --gnu-make, the latter depends on
16589         the former.  See <https://bugs.gnu.org/32452#109>.
16591 2022-02-26  Paul Eggert  <eggert@cs.ucla.edu>
16593         gettime-res: fix unlikely overflow bug
16594         * lib/gettime-res.c (gettime_res): Fix bug when hz * tv_sec overflows.
16595         With 64-bit ‘long’ and nanosecond resolution the bug can occur
16596         starting in the year 2262, with probability about 2e-9.
16597         With 32-bit ‘long’ the bug can occur now, with same probability.
16598         The probability goes up on hosts with worse timestamp resolution.
16600         Document clang -fsanitize=undefined glitch
16601         * doc/gnulib-intro.texi (Unsupported Platforms):
16602         Document incompatibility of ‘clang -fsanitize=undefined’
16603         with Gnulib, and how to work around it by also using
16604         ‘-fno-sanitize=pointer-overflow’.
16606 2022-02-25  Darshit Shah  <darnir@gnu.org>
16608         modules/unicase/special-casing: Fix compilation error
16609         * modules/unicase/special-casing: Don't prepend $(AM_V_at) to the
16610         second part of a compound command.  It causes make to try and
16611         execute the command "@sed" which doesn't exist.
16613 2022-02-25  Paul Eggert  <eggert@cs.ucla.edu>
16615         Port __has_attribute to Apple’s Clang renumbering
16616         Problem reported by Kirill A. Korinsky in:
16617         https://lists.gnu.org/r/bug-gnulib/2022-02/msg00034.html
16618         * config/srclist.txt: Comment out sys/cdefs.h for now.
16619         * lib/cdefs.h (__glibc_has_attribute):
16620         * m4/gnulib-common.m4 (gl_COMMON_BODY):
16621         Port to Apple’s renumbering of Clang versions.
16623         nanosleep: simplify by using pselect
16624         GNU Emacs avoids Gnulib’s ‘select’ module and uses only pselect,
16625         which it implements in a special way on MS-DOS.
16626         Unfortunately, though, nanosleep uses ‘select’;
16627         problem reported by Lars Ingebrigtsen (Bug#32452#74).
16628         As far as I can tell, Gnulib nanosleep's use of
16629         ‘select’ with signals is only for ancient platforms
16630         that Gnulib no longer cares about, so remove that use of ‘select’.
16631         I don’t know of any platforms that still need this fallback code,
16632         but just in case, fall back to pselect instead, while removing
16633         signal handling that it shouldn’t be needed nowadays.
16634         * lib/nanosleep.c: Do not include sig-handler.h, sys/time.h.
16635         (SIGCONT, suspended, sighandler, my_usleep): Remove.
16636         (nanosleep) [!HAVE_BUG_BIG_NANOSLEEP && !(_WIN32 && !__CYGWIN__)]:
16637         Just call pselect.
16638         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Do not check for sys/time.h
16639         or call gl_FUNC_SELECT.  Do not include sys/time.h or worry
16640         about LIBSOCKET.
16641         (gl_PREREQ_NANOSLEEP): Remove as it’s no longer needed.
16642         All uses removed.
16643         * modules/nanosleep (Depends-on): Add pselect.
16644         Remove select, sigaction, sys_time.
16646 2022-02-24  Paul Eggert  <eggert@cs.ucla.edu>
16648         userspec: warn about '.' separator
16649         Problem reported by Dan Jacobson (Bug#44770).
16650         * lib/userspec.c: Don’t include stdbool.h since it’s now in our API.
16651         (parse_user_spec_warn): New function, broken out of parse_user_spec
16652         and with a new PWARN arg.
16653         (parse_user_spec): Use it.
16654         * lib/userspec.h: Include stdbool.h and declare new function.
16655         * tests/test-userspec.c (struct test.in): Now a char array
16656         so that it can be modified.
16657         (T): Make the placeholder a valid test, as that simplifies
16658         the code.  Omit NULL placeholder at the end, likewise.
16659         (main): Set up T in the new way, and test that the "."  separator
16660         acts like the ":" separator except with a warning if it works.
16662         userspec: no need for static vars
16663         * lib/userspec.c (parse_with_separator): Simplify.
16665 2022-02-22  Benno Schulenberg  <bensberg@telfort.nl>  (tiny change)
16667         doc: add two missing closing parentheses
16668         * doc/regex.texi (Syntax Bits): Add missing closing parenthesis.
16669         * doc/regex.texi (BSD Regular Expression Compiling): Likewise.
16671 2022-02-22  Simon Josefsson  <simon@josefsson.org>
16673         gnulib-tool: Bump automake dependency.
16674         * gnulib-tool (func_emit_lib_Makefile_am)
16675         (func_emit_tests_Makefile_am): Demand Automake ≥ 1.14, for
16676         %reldir%.
16678 2022-02-21  Paul Eggert  <eggert@cs.ucla.edu>
16680         close-stream: don't depend on fclose
16681         This reverts 2022-01-26T17:33:03Z!eggert@cs.ucla.edu.
16682         Depending on fclose broke Emacs, and since this dependency didn't
16683         help GNU m4 let's remove it for now.  Problem reported by
16684         Lars Ingebrigtsen <https://bugs.gnu.org/32452#47>.
16685         * modules/close-stream (Depends-on): Remove fclose.
16687 2022-02-20  Bruno Haible  <bruno@clisp.org>
16689         Document that Automake ≥ 1.14 is needed (regression 2021-12-15).
16690         Reported by Simon Josefsson and Mike Frysinger in
16691         <https://lists.gnu.org/archive/html/bug-gnulib/2022-02/msg00010.html>.
16692         * DEPENDENCIES (Automake): Require version 1.14 or newer.
16694 2022-02-19  Paul Eggert  <eggert@cs.ucla.edu>
16696         mktime: improve heuristic for ca-1986 Indiana DST
16697         Problem reported by Mark Krenz <https://bugs.gnu.org/48085>.
16698         * lib/mktime.c (__mktime_internal): Be more generous about
16699         accepting arguments with the wrong value of tm_isdst, by falling
16700         back to a one-hour DST difference if we find no nearby DST that is
16701         unusual.  This fixes a problem where "1986-04-28 00:00 EDT" was
16702         rejected when TZ="America/Indianapolis" because the nearest DST
16703         timestamp occurred in 1970, a temporal distance too great for the
16704         old heuristic.  This also also narrows the search a bit, which
16705         is a minor performance win.
16706         * m4/mktime.m4 (gl_FUNC_MKTIME_WORKS):
16707         Check for putenv failures and for Bug#48085.
16708         * tests/test-parse-datetime.c (main):
16709         Test for setenv failures and for Bug#48085.
16711 2022-02-12  Paul Eggert  <eggert@cs.ucla.edu>
16713         filevercmp: fix several unexpected results
16714         Problems reported by Michael Debertol in <https://bugs.gnu.org/49239>.
16715         While looking into this, I spotted some more areas where the
16716         code and documentation did not agree, or where the documentation
16717         was unclear.  The biggest change needed by coreutils is a new
16718         function filenvercmp that can compare byte strings containing NUL.
16719         * lib/filevercmp.c: Do not include sys/types.h, stdlib.h, string.h.
16720         Include idx.h, verify.h.
16721         (match_suffix): Remove, replacing all uses with calls to ...
16722         (file_prefixlen): ... this new function.  Simplify it by
16723         avoiding the need for a confusing READ_ALPHA state variable.
16724         Change its API to something more useful, with a *LEN arg.
16725         it with a new *LEN arg.
16726         (file_prefixlen, verrevcmp):
16727         Prefer idx_t to size_t where either will do.
16728         (order): Change args to S, POS, LEN instead of just S[POS].
16729         This lets us handle NUL bytes correctly.  Callers changed.
16730         Verify that ints are sufficiently wide for its API.
16731         (verrevcmp): Don't assume that S1[S1_LEN] is a non-digit,
16732         and likewise for S2[S2_LEN].  The byte might not be accessible
16733         if filenvercmp is being called.
16734         (filevercmp): Reimplement by calling filenvercmp.
16735         (filenvercmp): New function, rewritten without the assumption
16736         that the inputs are null-terminated.
16737         Remove "easy comparison to see if strings are identical", as the
16738         use of it later (a) was undocumented, and (b) caused sort -V to be
16739         unstable.  When both strings start with ".", do not skip past
16740         the "."s before looking for suffixes, as this disagreed
16741         with the documentation.
16742         * lib/filevercmp.h: Fix comments, which had many mistakes.
16743         (filenvercmp): New decl.
16744         * modules/filevercmp (Depends-on): Add idx, verify.  Remove string.
16745         * tests/test-filevercmp.c: Include string.h.
16746         (examples): Reorder examples ".0" and ".9" that matched the code
16747         but not the documentation.  The code has been fixed to match the
16748         documentation.  Add some examples involving \1 so that they
16749         can be tried with both \1 and \0.  Add some other examples
16750         taken from the bug report.
16751         (equals): New set of test cases.
16752         (sign, test_filevercmp): New functions.
16753         (main): Remove test case where the fixed filevercmp disagrees with
16754         strverscmp.  Use test_filevercmp instead of filevercmp, so that
16755         we also test filenvercmp.  Test the newly-introduced EQUALS cases.
16757 2022-02-09  Bruno Haible  <bruno@clisp.org>
16759         string: Fix "mismatched allocation function" warnings regarding strndup.
16760         * lib/string.in.h (strndup): Mark with _GL_ATTRIBUTE_MALLOC and
16761         _GL_ATTRIBUTE_DEALLOC_FREE. For GCC >= 11: Declare also when the
16762         platform already declares the function or when the module 'strndup' is
16763         not in use.
16765 2022-02-09  Bruno Haible  <bruno@clisp.org>
16767         unictype/category-byname: Fix test failure.
16768         * modules/unictype/category-byname (configure.ac): Bump required
16769         libunistring version.
16771 2022-02-06  Bruno Haible  <bruno@clisp.org>
16773         termcap, termcap-h: Deprecate.
16774         * modules/termcap (Status, Notice): Add deprecation.
16775         * modules/termcap-h (Status, Notice): Likewise.
16777 2022-02-05  Paul Eggert  <eggert@cs.ucla.edu>
16779         parse-datetime: allow calculations to yield -1
16780         Problem reported by Jeremy Cantrell <https://bugs.gnu.org/50115>.
16781         * lib/parse-datetime.y (parse_datetime_body): When calling mktime,
16782         use an unmodifed and negative tm_wday or tm_yday to detect an error,
16783         as a (time_t) -1 return value is valid on most hosts.
16784         * tests/test-parse-datetime.c (main): Add a test for the bug.
16786 2022-02-04  Paul Eggert  <eggert@cs.ucla.edu>
16788         userspec: help fix GNU ‘id’ incompatibility
16789         * lib/userspec.c (parse_with_separator):
16790         Don’t set *username to a numeric string that is not a user name,
16791         and similarly for *groupname.  Needed to fix Bug#53631.
16793 2022-01-30  Pádraig Brady  <P@draigBrady.com>
16795         argmatch: add variants that only match full argument
16796         * lib/argmatch.h (argmatch_exact, [X]ARGMATCH_EXACT): New interfaces
16797         that don't allow abbreviations.
16798         * lib/argmatch.c (argmatch_exact): Likewise.
16799         (__xargmatch_internal): Add a bool parameter to disable abbreviations.
16800         * tests/test-argmatch.c: Add tests.
16802 2022-01-30  Bruno Haible  <bruno@clisp.org>
16804         tests: Fix interpretation of setupterm's return code.
16805         * tests/test-terminfo.c (main): Test the value of err when setupterm
16806         fails, not when it succeeds.
16807         * tests/test-termcap.c (main): Likewise.
16809 2022-01-30  Bruno Haible  <bruno@clisp.org>
16811         terminfo: Add tests.
16812         * tests/test-terminfo.c: New file.
16813         * modules/terminfo-tests: New file.
16815         terminfo, terminfo-h: New modules.
16816         * lib/terminfo.h: New file, from GNU gettext.
16817         * m4/terminfo.m4: New file, from GNU gettext.
16818         * modules/terminfo: New file, from GNU gettext.
16819         * modules/terminfo-h: New file, from GNU gettext.
16821 2022-01-30  Bruno Haible  <bruno@clisp.org>
16823         termcap: Add tests.
16824         * tests/test-termcap.c: New file.
16825         * modules/termcap-tests: New file.
16827         termcap, termcap-h: New modules.
16828         * lib/termcap.h: New file, from GNU gettext.
16829         * lib/tparm.c: New file, from GNU gettext.
16830         * lib/tputs.c: New file, from GNU gettext.
16831         * m4/termcap.m4: New file, from GNU gettext.
16832         * m4/curses.m4: New file, from GNU gettext.
16833         * modules/termcap: New file, from GNU gettext.
16834         * modules/termcap-h: New file, from GNU gettext.
16836 2022-01-29  Bruno Haible  <bruno@clisp.org>
16838         doc: Clarify MSVC support.
16839         * doc/gnulib-intro.texi (Supported Platforms): Document that "debug"
16840         builds are unsupported.
16842 2022-01-28  Pádraig Brady  <P@draigBrady.com>
16844         maintainer-makefile: fix sc_error_message_uppercase false failure
16845         * top/maint.mk (sc_error_message_uppercase): Don't trigger for
16846         any of the PRI... defines.
16848 2022-01-27  Paul Eggert  <eggert@cs.ucla.edu>
16850         alignalloc: work around AddressSanitizer bug
16851         * doc/posix-functions/aligned_alloc.texi (aligned_alloc):
16852         Mention AddressSanitizer bug.
16853         * lib/alignalloc.h (ALIGNALLOC_VIA_ALIGNED_ALLOC):
16854         Define to 0 if AddressSanitizer is in use.
16855         * tests/test-alignalloc.c (test_alignalloc): New function,
16856         which tests for non-aligned sizes too.
16857         (main): Use it.  Don’t bother checking for alignments
16858         greater than 16 MiB, as this flummoxes AddressSanitizer
16859         and there seems little point to testing them.
16861         doc: use UTF-8 encoding
16862         * doc/gnulib.texi: Use ‘@documentencoding UTF-8’.
16863         Partly this is because there are a few UTF-8 characters
16864         in the .texi files and there seems little point nowadays
16865         to @U-ifiying them.  And partly it is so that the .info
16866         output uses nicer UTF-8 characters, e.g., it single-quotes
16867         ‘like this’ instead of 'like this'.
16869         maint: Update copyright notices
16870         * build-aux/announce-gen, build-aux/declared.sh:
16871         * build-aux/git-version-gen, build-aux/gitlog-to-changelog:
16872         * build-aux/gnu-web-doc-update, build-aux/gnupload:
16873         * build-aux/increment-serial, build-aux/libtool-next-version:
16874         * build-aux/useless-if-before-free:
16875         Update some copyright notices by hand, that were not
16876         updated automatically.
16878 2022-01-26  Paul Eggert  <eggert@cs.ucla.edu>
16880         calloc-gnu: fix misspelling in 2022-01-03 patch
16881         Problem reported by Thien-Thi Nguyen in:
16882         https://lists.gnu.org/r/bug-gnulib/2022-01/msg00170.html
16883         * modules/calloc-gnu (Depends-on):
16884         * modules/calloc-posix (Depends-on):
16885         Fix misspelling of REPLACE_CALLOC_FOR_CALLOC_POSIX.
16887         close-stream: avoid crash on MSVC Debug mode
16888         Problem reported by Julien Marrec in:
16889         https://lists.gnu.org/r/bug-m4/2022-01/msg00000.html
16890         * modules/close-stream (Depends-on): Depend on fclose.
16892 2022-01-23  Paul Eggert  <eggert@cs.ucla.edu>
16894         xstrtoimax, xstrtoumax: depend on inttypes-incomplete
16895         This fixes a call to strtoimax without declaring it,
16896         and similarly for strtoumax.
16897         * lib/xstrtoimax.c, lib/xstrtoumax.c (XSTRTOL_INCLUDE_INTTYPES_H):
16898         Define, so that strtoimax and strtoumax are declared.
16899         * lib/xstrtol.c [XSTRTOL_INCLUDE_INTTYPES_H]: Include inttypes.h.
16900         * modules/xstrtoimax, modules/xstrtoumax (Depends-on):
16901         Add inttypes-incomplete.
16903         alignalloc, xalignalloc: new modules
16904         * lib/alignalloc.c, lib/alignalloc.h, lib/xalignalloc.c:
16905         * m4/alignalloc.m4, modules/alignalloc, modules/alignalloc-tests:
16906         * modules/xalignalloc, tests/test-alignalloc.c:
16907         New files.
16909 2022-01-17  Paul Eggert  <eggert@cs.ucla.edu>
16911         extern-inline: improve macOS port
16912         * m4/extern-inline.m4 (gl_EXTERN_INLINE):
16913         Define HAVE___HEADER_INLINE at configure-time, so that config.h
16914         knows the workaround is not needed even though ctype.h has not yet
16915         been included.  This lets the compiler use extern inline functions
16916         on newer macOS platforms, instead of static inline.
16917         Problem reported by Reuben Thomas in:
16918         https://lists.gnu.org/r/bug-gnulib/2022-01/msg00130.html
16920 2022-01-17  Bruno Haible  <bruno@clisp.org>
16922         xstrtol: Trim dependencies.
16923         * lib/xstrtol.h: Include <stdint.h>, not <inttypes.h>.
16924         * modules/xstrtol (Depends-on): Add stdint. Remove inttypes-incomplete.
16926 2022-01-17  Bruno Haible  <bruno@clisp.org>
16928         xstrtol: Fix compilation error (regression 2022-01-16).
16929         * modules/xstrtol (Depends-on): Add intprops.
16931 2022-01-17  Jim Meyering  <meyering@fb.com>
16933         xstrtol: remove unnecessary else after return
16934         * lib/xstrtol.c (bkm_scale): Drop "else" after return.
16936 2022-01-16  Paul Eggert  <eggert@cs.ucla.edu>
16938         xstrtol: simplify integer overflow checking
16939         * lib/xstrtol.c: Include intprops.h.
16940         (TYPE_SIGNED): Remove, as intprops.h defines that for us now.
16941         (bkm_scale): Use INT_MULTIPLY_WRAPV instead of checking for
16942         overflow by hand.
16944         xstrtoll-tests: use %lld for long long
16945         * tests/test-xstrtoll.c, tests/test-xstrtoull.c (__spec):
16946         Do not assume long long is 64 bits, or that exact-width
16947         64-bit types exist.  Although these assumptions are true
16948         on current Gnulib platforms they are not true in general.
16949         Also, GCC warns if PRId64 is "ld" but intmax_t is long long
16950         even when long and long long are both 64 bits.
16952 2022-01-15  Bruno Haible  <bruno@clisp.org>
16954         Don't pass unknown warning option to clang.
16955         Reported by Assaf Gordon via Paul Eggert in
16956         <https://lists.gnu.org/archive/html/coreutils/2022-01/msg00018.html>.
16957         * m4/gnulib-common.m4 (gl_CC_GNULIB_WARNINGS): Don't use
16958         -Wno-unsuffixed-float-constants with clang.
16960 2022-01-15  Bruno Haible  <bruno@clisp.org>
16962         log tests: Avoid test failure with nvc 22.1.
16963         * tests/test-log.h (test_function): With nvc, expect up to 4 ulps error.
16965 2022-01-15  Bruno Haible  <bruno@clisp.org>
16967         havelib: Recognize ELF platform despite nvc 22.1.
16968         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): Recognize Linux as an ELF
16969         platform, even with a compiler that does not define __ELF__.
16971 2022-01-15  Bruno Haible  <bruno@clisp.org>
16973         oset-c++: Avoid compilation error with nvc++ 22.1.
16974         * lib/gl_oset.hh: With EDG C++ compilers, avoid 'friend'.
16976 2022-01-14  Paul Eggert  <eggert@cs.ucla.edu>
16978         nstrftime: pacify nvc 22.1 unreachable statement
16979         * lib/nstrftime.c (__strftime_internal):
16980         Omit unreachable ‘break;’.
16982         tests: pacify nvc 22.1 unreachable statement
16983         * tests/test-sys_wait.h (test_sys_wait_macros):
16984         Widen scope of ‘#if 0’ so that there is not an unreachable ‘break;’.
16986         tests: pacify nvc 22.1 set-but-not-used
16987         * tests/test-fnmatch.c (main): Don’t set a var without using it.
16988         * tests/test-sched.c (f1): Now extern.
16990         intprops: work around nvc 22.1 bug
16991         Problem reported by Olivier Cessenat (Bug#53256).
16992         * lib/intprops.h (_GL_HAS_BUILTIN_ADD_OVERFLOW) [__EDG__]:
16993         Define to 0, since __builtin_add_overflow doesn’t work
16994         on NVIDIA HPC SDK 22.1.
16996         copy-file-range: work around Linux kernel bug
16997         This workaround is adapted from Coreutils.
16998         * lib/copy-file-range.c [__linux__ && HAVE_COPY_FILE_RANGE]:
16999         Include <sys/utsname.h>.
17000         (copy_file_range): Use a stub to replace the copy_file_range of
17001         Linux kernel versions 4.5 through 5.2.
17002         * lib/unistd.in.h (copy_file_range):
17003         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS):
17004         * modules/copy-file-range (configure.ac):
17005         * modules/unistd (unistd.h):
17006         Support replacement of copy_file_range.
17007         * m4/copy-file-range.m4 (gl_FUNC_COPY_FILE_RANGE):
17008         Define HAVE_COPY_FILE_RANGE if the system has copy_file_range,
17009         and on Linux check whether the system’s is known to work.
17011 2022-01-14  Bruno Haible  <bruno@clisp.org>
17013         Avoid error "conditional LIBUNISTRING_COMPILE_... was never defined"
17014         when option --conditional-dependencies is used (regression 2022-01-09).
17015         Reported by Gavin Smith <gavinsmith0123@gmail.com> in
17016         <https://lists.gnu.org/archive/html/bug-gnulib/2022-01/msg00099.html>.
17017         * m4/libunistring-base.m4 (gl_LIBUNISTRING_MODULE): Use gl_CONDITIONAL
17018         instead of AM_CONDITIONAL.
17020 2022-01-13  Bruno Haible  <bruno@clisp.org>
17022         Avoid warning "_GL_ATTRIBUTE_DEALLOC_FREE redefined" (regr. 2022-01-04).
17023         Reported by Werner Lemberg <wl@gnu.org> in
17024         <https://lists.gnu.org/archive/html/bug-gnulib/2022-01/msg00094.html>.
17025         * m4/gnulib-common.m4 (gl_COMMON_BODY): Avoid redefining
17026         _GL_ATTRIBUTE_DEALLOC_FREE.
17028 2022-01-10  Paul Eggert  <eggert@cs.ucla.edu>
17030         backupfile: fix bug when renaming not from wd
17031         * lib/backupfile.c (backupfile_internal): Fix bug when DIR_FD
17032         does not specify the working directory, and when RENAME.
17033         Without the bug fix, FILE is treated as relative to the working
17034         directory, not relative to DIR_FD, when renaming FILE.
17035         This bug was introduced when DIR_FD and RENAME were introduced,
17036         in 2018-10-24T02:10:21Z!eggert@cs.ucla.edu.
17037         While we’re at it, when SDIR is nonnegative improve performance a
17038         bit by passing an SDIR-relative old name to renameatu.
17040 2022-01-09  Bruno Haible  <bruno@clisp.org>
17042         host-cpu-c-abi: Add support for LoongArch64 CPU.
17043         * m4/host-cpu-c-abi.m4 (gl_HOST_CPU_C_ABI): Define __loongarch64__. (GCC
17044         and clang predefine only __loongarch__, __loongarch64.)
17046 2022-01-09  Bruno Haible  <bruno@clisp.org>
17048         stdio: Fix "missing file" errors (regression from today).
17049         * modules/stdio (Files): Add stdio-read.c, stdio-write.c.
17050         * m4/stdio_h.m4 (gl_STDIO_H): Update comments.
17052 2022-01-09  Bruno Haible  <bruno@clisp.org>
17054         Use the GL_CFLAG_GNULIB_WARNINGS for most AC_LIBOBJ compilation units.
17055         * modules/_Exit (configure.ac): Define an Automake conditional. Remove
17056         the AC_LIBOBJ invocation.
17057         (Makefile.am): Augment lib_SOURCES, guarded by that Automake
17058         conditional.
17059         * modules/accept: Likewise.
17060         * modules/access: Likewise.
17061         * modules/acosf: Likewise.
17062         * modules/acosl: Likewise.
17063         * modules/aligned_alloc: Likewise.
17064         * modules/alphasort: Likewise.
17065         * modules/argz: Likewise.
17066         * modules/asinf: Likewise.
17067         * modules/asinl: Likewise.
17068         * modules/atan2f: Likewise.
17069         * modules/atanf: Likewise.
17070         * modules/atanl: Likewise.
17071         * modules/atexit: Likewise.
17072         * modules/atoll: Likewise.
17073         * modules/bind: Likewise.
17074         * modules/btowc: Likewise.
17075         * modules/c32rtomb: Likewise.
17076         * modules/canonicalize-lgpl: Likewise.
17077         * modules/cbrt: Likewise.
17078         * modules/cbrtf: Likewise.
17079         * modules/cbrtl: Likewise.
17080         * modules/ceil: Likewise.
17081         * modules/ceilf: Likewise.
17082         * modules/ceill: Likewise.
17083         * modules/chdir-long: Likewise.
17084         * modules/chown: Likewise.
17085         * modules/close: Likewise.
17086         * modules/closedir: Likewise.
17087         * modules/cnd: Likewise.
17088         * modules/connect: Likewise.
17089         * modules/copy-file-range: Likewise.
17090         * modules/copysign: Likewise.
17091         * modules/copysignf: Likewise.
17092         * modules/copysignl: Likewise.
17093         * modules/cosf: Likewise.
17094         * modules/coshf: Likewise.
17095         * modules/cosl: Likewise.
17096         * modules/creat: Likewise.
17097         * modules/crypto/gc: Likewise.
17098         * modules/ctime: Likewise.
17099         * modules/dirfd: Likewise.
17100         * modules/dup: Likewise.
17101         * modules/dup2: Likewise.
17102         * modules/duplocale: Likewise.
17103         * modules/error: Likewise.
17104         * modules/euidaccess: Likewise.
17105         * modules/execinfo: Likewise.
17106         * modules/execl: Likewise.
17107         * modules/execle: Likewise.
17108         * modules/execlp: Likewise.
17109         * modules/execv: Likewise.
17110         * modules/execve: Likewise.
17111         * modules/execvp: Likewise.
17112         * modules/execvpe: Likewise.
17113         * modules/exp2: Likewise.
17114         * modules/exp2f: Likewise.
17115         * modules/exp2l: Likewise.
17116         * modules/expf: Likewise.
17117         * modules/expl: Likewise.
17118         * modules/explicit_bzero: Likewise.
17119         * modules/expm1: Likewise.
17120         * modules/expm1f: Likewise.
17121         * modules/expm1l: Likewise.
17122         * modules/fabsf: Likewise.
17123         * modules/fabsl: Likewise.
17124         * modules/faccessat: Likewise.
17125         * modules/fchdir: Likewise.
17126         * modules/fchmodat: Likewise.
17127         * modules/fchownat: Likewise.
17128         * modules/fclose: Likewise.
17129         * modules/fcntl: Likewise.
17130         * modules/fdatasync: Likewise.
17131         * modules/fdopen: Likewise.
17132         * modules/fdopendir: Likewise.
17133         * modules/fflush: Likewise.
17134         * modules/ffs: Likewise.
17135         * modules/ffsl: Likewise.
17136         * modules/ffsll: Likewise.
17137         * modules/fileblocks: Likewise.
17138         * modules/float: Likewise.
17139         * modules/flock: Likewise.
17140         * modules/floor: Likewise.
17141         * modules/floorf: Likewise.
17142         * modules/floorl: Likewise.
17143         * modules/fma: Likewise.
17144         * modules/fmaf: Likewise.
17145         * modules/fmal: Likewise.
17146         * modules/fmod: Likewise.
17147         * modules/fmodf: Likewise.
17148         * modules/fmodl: Likewise.
17149         * modules/forkpty: Likewise.
17150         * modules/fpending: Likewise.
17151         * modules/fpurge: Likewise.
17152         * modules/freadable: Likewise.
17153         * modules/freadahead: Likewise.
17154         * modules/freadptr: Likewise.
17155         * modules/free-posix: Likewise.
17156         * modules/freopen: Likewise.
17157         * modules/frexpf: Likewise.
17158         * modules/fseek: Likewise.
17159         * modules/fseeko: Likewise.
17160         * modules/fseterr: Likewise.
17161         * modules/fstat: Likewise.
17162         * modules/fstatat: Likewise.
17163         * modules/fsusage: Likewise.
17164         * modules/fsync: Likewise.
17165         * modules/ftell: Likewise.
17166         * modules/ftello: Likewise.
17167         * modules/ftruncate: Likewise.
17168         * modules/fts: Likewise.
17169         * modules/futimens: Likewise.
17170         * modules/fwritable: Likewise.
17171         * modules/fwriting: Likewise.
17172         * modules/getaddrinfo: Likewise.
17173         * modules/getcwd: Likewise.
17174         * modules/getcwd-lgpl: Likewise.
17175         * modules/getdelim: Likewise.
17176         * modules/getdomainname: Likewise.
17177         * modules/getdtablesize: Likewise.
17178         * modules/getentropy: Likewise.
17179         * modules/getgroups: Likewise.
17180         * modules/gethostname: Likewise.
17181         * modules/getline: Likewise.
17182         * modules/getloadavg: Likewise.
17183         * modules/getlogin: Likewise.
17184         * modules/getlogin_r: Likewise.
17185         * modules/getopt-posix: Likewise.
17186         * modules/getpagesize: Likewise.
17187         * modules/getpeername: Likewise.
17188         * modules/getrandom: Likewise.
17189         * modules/getrusage: Likewise.
17190         * modules/getsockname: Likewise.
17191         * modules/getsockopt: Likewise.
17192         * modules/getsubopt: Likewise.
17193         * modules/gettimeofday: Likewise.
17194         * modules/getumask: Likewise.
17195         * modules/getusershell: Likewise.
17196         * modules/glob: Likewise.
17197         * modules/grantpt: Likewise.
17198         * modules/group-member: Likewise.
17199         * modules/hypot: Likewise.
17200         * modules/hypotf: Likewise.
17201         * modules/hypotl: Likewise.
17202         * modules/iconv_open: Likewise.
17203         * modules/ilogb: Likewise.
17204         * modules/ilogbf: Likewise.
17205         * modules/ilogbl: Likewise.
17206         * modules/imaxabs: Likewise.
17207         * modules/imaxdiv: Likewise.
17208         * modules/inet_ntop: Likewise.
17209         * modules/inet_pton: Likewise.
17210         * modules/ioctl: Likewise.
17211         * modules/isapipe: Likewise.
17212         * modules/isatty: Likewise.
17213         * modules/isblank: Likewise.
17214         * modules/isfinite: Likewise.
17215         * modules/isinf: Likewise.
17216         * modules/iswblank: Likewise.
17217         * modules/iswctype: Likewise.
17218         * modules/iswdigit: Likewise.
17219         * modules/iswxdigit: Likewise.
17220         * modules/lchmod: Likewise.
17221         * modules/lchown: Likewise.
17222         * modules/ldexpf: Likewise.
17223         * modules/ldexpl: Likewise.
17224         * modules/libgmp: Likewise.
17225         * modules/link: Likewise.
17226         * modules/linkat: Likewise.
17227         * modules/listen: Likewise.
17228         * modules/localeconv: Likewise.
17229         * modules/localtime: Likewise.
17230         * modules/log: Likewise.
17231         * modules/log10: Likewise.
17232         * modules/log10f: Likewise.
17233         * modules/log10l: Likewise.
17234         * modules/log1p: Likewise.
17235         * modules/log1pf: Likewise.
17236         * modules/log1pl: Likewise.
17237         * modules/log2: Likewise.
17238         * modules/log2f: Likewise.
17239         * modules/log2l: Likewise.
17240         * modules/logb: Likewise.
17241         * modules/logbf: Likewise.
17242         * modules/logbl: Likewise.
17243         * modules/logf: Likewise.
17244         * modules/login_tty: Likewise.
17245         * modules/logl: Likewise.
17246         * modules/lseek: Likewise.
17247         * modules/lstat: Likewise.
17248         * modules/mbrlen: Likewise.
17249         * modules/mbrtoc32: Likewise.
17250         * modules/mbrtowc: Likewise.
17251         * modules/mbsinit: Likewise.
17252         * modules/mbsnrtowcs: Likewise.
17253         * modules/mbsrtowcs: Likewise.
17254         * modules/mbtowc: Likewise.
17255         * modules/memalign: Likewise.
17256         * modules/memchr: Likewise.
17257         * modules/memcmp: Likewise.
17258         * modules/memcpy: Likewise.
17259         * modules/memmove: Likewise.
17260         * modules/mempcpy: Likewise.
17261         * modules/memrchr: Likewise.
17262         * modules/memset: Likewise.
17263         * modules/mkdir: Likewise.
17264         * modules/mkdirat: Likewise.
17265         * modules/mkdtemp: Likewise.
17266         * modules/mkfifo: Likewise.
17267         * modules/mkfifoat: Likewise.
17268         * modules/mknod: Likewise.
17269         * modules/mkostemp: Likewise.
17270         * modules/mkostemps: Likewise.
17271         * modules/mkstemp: Likewise.
17272         * modules/mkstemps: Likewise.
17273         * modules/modf: Likewise.
17274         * modules/modff: Likewise.
17275         * modules/modfl: Likewise.
17276         * modules/mountlist: Likewise.
17277         * modules/msvc-inval: Likewise.
17278         * modules/msvc-nothrow: Likewise.
17279         * modules/mtx: Likewise.
17280         * modules/nanosleep: Likewise.
17281         * modules/nl_langinfo: Likewise.
17282         * modules/obstack: Likewise.
17283         * modules/open: Likewise.
17284         * modules/openat: Likewise.
17285         * modules/opendir: Likewise.
17286         * modules/openpty: Likewise.
17287         * modules/pclose: Likewise.
17288         * modules/perror: Likewise.
17289         * modules/pipe-posix: Likewise.
17290         * modules/poll: Likewise.
17291         * modules/popen: Likewise.
17292         * modules/posix_memalign: Likewise.
17293         * modules/posix_openpt: Likewise.
17294         * modules/posix_spawn: Likewise.
17295         * modules/posix_spawn-internal: Likewise.
17296         * modules/posix_spawn_file_actions_addchdir: Likewise.
17297         * modules/posix_spawn_file_actions_addclose: Likewise.
17298         * modules/posix_spawn_file_actions_adddup2: Likewise.
17299         * modules/posix_spawn_file_actions_addfchdir: Likewise.
17300         * modules/posix_spawn_file_actions_addopen: Likewise.
17301         * modules/posix_spawn_file_actions_destroy: Likewise.
17302         * modules/posix_spawn_file_actions_init: Likewise.
17303         * modules/posix_spawnattr_destroy: Likewise.
17304         * modules/posix_spawnattr_getflags: Likewise.
17305         * modules/posix_spawnattr_getpgroup: Likewise.
17306         * modules/posix_spawnattr_getschedparam: Likewise.
17307         * modules/posix_spawnattr_getschedpolicy: Likewise.
17308         * modules/posix_spawnattr_getsigdefault: Likewise.
17309         * modules/posix_spawnattr_getsigmask: Likewise.
17310         * modules/posix_spawnattr_init: Likewise.
17311         * modules/posix_spawnattr_setflags: Likewise.
17312         * modules/posix_spawnattr_setpgroup: Likewise.
17313         * modules/posix_spawnattr_setschedparam: Likewise.
17314         * modules/posix_spawnattr_setschedpolicy: Likewise.
17315         * modules/posix_spawnattr_setsigdefault: Likewise.
17316         * modules/posix_spawnattr_setsigmask: Likewise.
17317         * modules/posix_spawnp: Likewise.
17318         * modules/powf: Likewise.
17319         * modules/pread: Likewise.
17320         * modules/pselect: Likewise.
17321         * modules/pthread-cond: Likewise.
17322         * modules/pthread-mutex: Likewise.
17323         * modules/pthread-once: Likewise.
17324         * modules/pthread-rwlock: Likewise.
17325         * modules/pthread-spin: Likewise.
17326         * modules/pthread-thread: Likewise.
17327         * modules/pthread-tss: Likewise.
17328         * modules/pthread_mutex_timedlock: Likewise.
17329         * modules/pthread_sigmask: Likewise.
17330         * modules/ptsname: Likewise.
17331         * modules/ptsname_r: Likewise.
17332         * modules/putenv: Likewise.
17333         * modules/pwrite: Likewise.
17334         * modules/qsort_r: Likewise.
17335         * modules/raise: Likewise.
17336         * modules/random: Likewise.
17337         * modules/random_r: Likewise.
17338         * modules/rawmemchr: Likewise.
17339         * modules/read: Likewise.
17340         * modules/readdir: Likewise.
17341         * modules/readline: Likewise.
17342         * modules/readlink: Likewise.
17343         * modules/readlinkat: Likewise.
17344         * modules/readutmp: Likewise.
17345         * modules/reallocarray: Likewise.
17346         * modules/recv: Likewise.
17347         * modules/recvfrom: Likewise.
17348         * modules/regex: Likewise.
17349         * modules/relocatable-prog: Likewise.
17350         * modules/remainder: Likewise.
17351         * modules/remainderf: Likewise.
17352         * modules/remainderl: Likewise.
17353         * modules/remove: Likewise.
17354         * modules/rename: Likewise.
17355         * modules/renameat: Likewise.
17356         * modules/rewinddir: Likewise.
17357         * modules/rint: Likewise.
17358         * modules/rintf: Likewise.
17359         * modules/rintl: Likewise.
17360         * modules/rmdir: Likewise.
17361         * modules/round: Likewise.
17362         * modules/roundf: Likewise.
17363         * modules/roundl: Likewise.
17364         * modules/rpmatch: Likewise.
17365         * modules/scandir: Likewise.
17366         * modules/sched_yield: Likewise.
17367         * modules/secure_getenv: Likewise.
17368         * modules/select: Likewise.
17369         * modules/selinux-h: Likewise.
17370         * modules/send: Likewise.
17371         * modules/sendto: Likewise.
17372         * modules/setenv: Likewise.
17373         * modules/sethostname: Likewise.
17374         * modules/setlocale: Likewise.
17375         * modules/setlocale-null: Likewise.
17376         * modules/setsockopt: Likewise.
17377         * modules/shutdown: Likewise.
17378         * modules/sig2str: Likewise.
17379         * modules/sigabbrev_np: Likewise.
17380         * modules/sigaction: Likewise.
17381         * modules/sigdescr_np: Likewise.
17382         * modules/signbit: Likewise.
17383         * modules/sigprocmask: Likewise.
17384         * modules/sinf: Likewise.
17385         * modules/sinhf: Likewise.
17386         * modules/sinl: Likewise.
17387         * modules/sleep: Likewise.
17388         * modules/socket: Likewise.
17389         * modules/spawn-pipe: Likewise.
17390         * modules/sqrtf: Likewise.
17391         * modules/sqrtl: Likewise.
17392         * modules/stat: Likewise.
17393         * modules/stdio: Likewise.
17394         * modules/stpcpy: Likewise.
17395         * modules/stpncpy: Likewise.
17396         * modules/strcase: Likewise.
17397         * modules/strchrnul: Likewise.
17398         * modules/strcspn: Likewise.
17399         * modules/strdup-posix: Likewise.
17400         * modules/strerror: Likewise.
17401         * modules/strerror-override: Likewise.
17402         * modules/strerrorname_np: Likewise.
17403         * modules/strfmon_l: Likewise.
17404         * modules/strftime-fixes: Likewise.
17405         * modules/strncat: Likewise.
17406         * modules/strndup: Likewise.
17407         * modules/strnlen: Likewise.
17408         * modules/strpbrk: Likewise.
17409         * modules/strptime: Likewise.
17410         * modules/strsep: Likewise.
17411         * modules/strsignal: Likewise.
17412         * modules/strtod: Likewise.
17413         * modules/strtoimax: Likewise.
17414         * modules/strtok_r: Likewise.
17415         * modules/strtol: Likewise.
17416         * modules/strtold: Likewise.
17417         * modules/strtoll: Likewise.
17418         * modules/strtoul: Likewise.
17419         * modules/strtoull: Likewise.
17420         * modules/strtoumax: Likewise.
17421         * modules/strverscmp: Likewise.
17422         * modules/symlink: Likewise.
17423         * modules/symlinkat: Likewise.
17424         * modules/tanf: Likewise.
17425         * modules/tanhf: Likewise.
17426         * modules/tanl: Likewise.
17427         * modules/tcgetsid: Likewise.
17428         * modules/thrd: Likewise.
17429         * modules/time_r: Likewise.
17430         * modules/time_rz: Likewise.
17431         * modules/timegm: Likewise.
17432         * modules/times: Likewise.
17433         * modules/timespec_get: Likewise.
17434         * modules/timespec_getres: Likewise.
17435         * modules/tmpfile: Likewise.
17436         * modules/towctrans: Likewise.
17437         * modules/trunc: Likewise.
17438         * modules/truncate: Likewise.
17439         * modules/truncf: Likewise.
17440         * modules/truncl: Likewise.
17441         * modules/tsearch: Likewise.
17442         * modules/tss: Likewise.
17443         * modules/ttyname_r: Likewise.
17444         * modules/tzset: Likewise.
17445         * modules/uname: Likewise.
17446         * modules/unlink: Likewise.
17447         * modules/unlinkat: Likewise.
17448         * modules/unlockpt: Likewise.
17449         * modules/unsetenv: Likewise.
17450         * modules/usleep: Likewise.
17451         * modules/utime: Likewise.
17452         * modules/utimensat: Likewise.
17453         * modules/waitpid: Likewise.
17454         * modules/wcpcpy: Likewise.
17455         * modules/wcpncpy: Likewise.
17456         * modules/wcrtomb: Likewise.
17457         * modules/wcscasecmp: Likewise.
17458         * modules/wcscat: Likewise.
17459         * modules/wcschr: Likewise.
17460         * modules/wcscmp: Likewise.
17461         * modules/wcscoll: Likewise.
17462         * modules/wcscpy: Likewise.
17463         * modules/wcscspn: Likewise.
17464         * modules/wcsdup: Likewise.
17465         * modules/wcsftime: Likewise.
17466         * modules/wcslen: Likewise.
17467         * modules/wcsncasecmp: Likewise.
17468         * modules/wcsncat: Likewise.
17469         * modules/wcsncmp: Likewise.
17470         * modules/wcsncpy: Likewise.
17471         * modules/wcsnlen: Likewise.
17472         * modules/wcsnrtombs: Likewise.
17473         * modules/wcspbrk: Likewise.
17474         * modules/wcsrchr: Likewise.
17475         * modules/wcsrtombs: Likewise.
17476         * modules/wcsspn: Likewise.
17477         * modules/wcsstr: Likewise.
17478         * modules/wcstok: Likewise.
17479         * modules/wcswidth: Likewise.
17480         * modules/wcsxfrm: Likewise.
17481         * modules/wctob: Likewise.
17482         * modules/wctomb: Likewise.
17483         * modules/wctrans: Likewise.
17484         * modules/wctype: Likewise.
17485         * modules/wcwidth: Likewise.
17486         * modules/windows-cond: Likewise.
17487         * modules/windows-mutex: Likewise.
17488         * modules/windows-once: Likewise.
17489         * modules/windows-recmutex: Likewise.
17490         * modules/windows-rwlock: Likewise.
17491         * modules/windows-spawn: Likewise.
17492         * modules/windows-spin: Likewise.
17493         * modules/windows-thread: Likewise.
17494         * modules/windows-timedmutex: Likewise.
17495         * modules/windows-timedrecmutex: Likewise.
17496         * modules/windows-timedrwlock: Likewise.
17497         * modules/windows-tls: Likewise.
17498         * modules/wmemchr: Likewise.
17499         * modules/wmemcmp: Likewise.
17500         * modules/wmemcpy: Likewise.
17501         * modules/wmemmove: Likewise.
17502         * modules/wmempcpy: Likewise.
17503         * modules/wmemset: Likewise.
17504         * modules/write: Likewise.
17506 2022-01-09  Bruno Haible  <bruno@clisp.org>
17508         obstack: Move AC_LIBOBJ invocation to the module description.
17509         * m4/obstack.m4 (gl_FUNC_OBSTACK): Renamed from AC_FUNC_OBSTACK. Don't
17510         invoke AC_LIBSOURCES nor AC_LIBOBJ.
17511         * modules/obstack (configure.ac): Update. Invoke AC_LIBOBJ here.
17513 2022-01-09  Bruno Haible  <bruno@clisp.org>
17515         stdio: Move AC_LIBOBJ invocations to the module description.
17516         * m4/stdio_h.m4 (gl_STDIO_H): Don't invoke AC_LIBOBJ.
17517         * modules/stdio (configure.ac): Invoke AC_LIBOBJ here.
17519 2022-01-09  Bruno Haible  <bruno@clisp.org>
17521         fchdir: Move AC_LIBOBJ invocation to the module description.
17522         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Don't invoke AC_LIBOBJ and
17523         gl_PREREQ_FCHDIR.
17524         * modules/fchdir (configure.ac): Invoke AC_LIBOBJ and gl_PREREQ_FCHDIR.
17526 2022-01-09  Bruno Haible  <bruno@clisp.org>
17528         Remove influence of Automake conditionals on conditional dependencies.
17529         * m4/gnulib-common.m4 (gl_CONDITIONAL): New macro.
17530         (gl_CONDITIONAL_HEADER): Use it instead of AM_CONDITIONAL.
17531         * m4/libgmp.m4 (gl_LIBGMP): Likewise.
17532         * modules/posix_spawn_file_actions_addfchdir-tests (configure.ac):
17533         Likewise.
17534         * modules/uchar-c++-tests (configure.ac): Likewise.
17535         * gnulib-tool (func_modules_transitive_closure): Don't inhibit
17536         conditional dependencies processing on a module that uses an Automake
17537         conditional.
17539 2022-01-08  Bruno Haible  <bruno@clisp.org>
17541         gnulib-tool: Fix "Don't forget" messages (regression 2021-12-12).
17542         * gnulib-tool (func_import): Fix variable references in "Don't forget"
17543         messages.
17545 2022-01-08  Bruno Haible  <bruno@clisp.org>
17547         gnulib-tool: Remove all *.Po files upon distclean (regr. 2022-01-05).
17548         Reported by Mohammad Akhlaghi <mohammad@akhlaghi.org> in
17549         <https://lists.gnu.org/archive/html/bug-gnulib/2022-01/msg00061.html>.
17550         * gnulib-tool (func_emit_initmacro_end): Collect the *.Po or *.Plo files
17551         to remove into an AC_SUBSTed variable gl_LIBOBJDEPS.
17552         (func_emit_lib_Makefile_am): Extend the distclean and maintainer-clean
17553         rules.
17555 2022-01-08  Bruno Haible  <bruno@clisp.org>
17557         Add another example.
17558         * examples/hello-c-gnulib-conddeps: New directory.
17560 2022-01-08  Marc Nieper-Wißkirchen  <marc@nieper-wisskirchen.de>
17562         c-stack: Adapt header file for use in C++ applications.
17563         * lib/c-stack.h: Add extern "C" block.
17565 2022-01-08  Marc Nieper-Wißkirchen  <marc@nieper-wisskirchen.de>
17567         version-etc: Adapt header file for use in C++ applications.
17568         * lib/version-etc.h: Add extern "C" block.
17570 2022-01-07  Bruno Haible  <bruno@clisp.org>
17572         sigsegv: Improve support for Linux/LoongArch64.
17573         * lib/sigsegv.c (SIGSEGV_FAULT_STACKPOINTER): Add special case for
17574         Linux/LoongArch.
17576 2022-01-05  Glenn Washburn  <development@efficientek.com>
17578         bootstrap: When a commit is specified, do a shallow fetch if possible.
17579         Rationale and explanation:
17580         <https://lists.gnu.org/archive/html/bug-gnulib/2021-10/msg00073.html>.
17581         * bootstrap: When a commit hash is specified, ask for this specific
17582         commit on fetch, and fallback to fetching the entire repository if
17583         fetching by commit hash fails.
17585 2022-01-05  Paul Eggert  <eggert@cs.ucla.edu>
17587         stack: pacify gcc -Wsign-compare
17588         * lib/stack.h (_GL_STACK_TYPE): Use idx_t for size too.
17589         Suggested by Bruno Haible in:
17590         https://lists.gnu.org/r/bug-gnulib/2022-01/msg00035.html
17591         (_GL_STACK_PREFIX (size)): Return idx_t, not size_t.
17593 2022-01-05  Bruno Haible  <bruno@clisp.org>
17595         Fix last commit.
17596         Based on a patch by José E. Marchesi <jemarch@gnu.org>, reported in
17597         <https://lists.gnu.org/archive/html/bug-gnulib/2022-01/msg00036.html>.
17598         * m4/gnulib-common.m4 (gl_CC_GNULIB_WARNINGS): Don't enable
17599         -Wimplicit-fallthrough for GCC < 7.
17601 2022-01-05  Bruno Haible  <bruno@clisp.org>
17603         gnulib-tool: Avoid known warnings that reflect Gnulib's coding style.
17604         * m4/gnulib-common.m4 (gl_CC_GNULIB_WARNINGS): New macro.
17605         * gnulib-tool (func_emit_lib_Makefile_am): Add the
17606         GL_CFLAG_GNULIB_WARNINGS to the CFLAGS of all the compilation units of
17607         the library.
17608         (func_emit_tests_Makefile_am): Add the GL_CFLAG_GNULIB_WARNINGS to the
17609         CFLAGS.
17610         (func_import): Emit an invocation of gl_CC_GNULIB_WARNINGS.
17612 2022-01-04  Bernhard Voelker  <mail@bernhard-voelker.de>
17614         license: fix GPLv3 texts to use a comma instead of semicolon.
17615         See: https://www.gnu.org/licenses/gpl-3.0.html#howto
17616         Run:
17617           $ git grep -l 'Foundation; either version 3' \
17618               | xargs sed -i '/Foundation; either version 3/ s/n; e/n, e/'
17619         * All files using GPLv3: Adjust via the above command.
17621 2022-01-04  Bruno Haible  <bruno@clisp.org>
17623         string, wchar: Fix compilation error on MSVC (regression 2021-09-07).
17624         * lib/string.in.h (free): Don't redeclare as rpl_free. Instead, redefine
17625         _GL_ATTRIBUTE_DEALLOC_FREE to reference rpl_free directly.
17626         * lib/wchar.in.h (free): Likewise.
17628 2022-01-03  Bruno Haible  <bruno@clisp.org>
17630         getpass-gnu: Allow use as dependency from test modules.
17631         * m4/getpass.m4 (gl_FUNC_GETPASS_GNU): Set
17632         REPLACE_GETPASS_FOR_GETPASS_GNU instead of REPLACE_GETPASS.
17633         * m4/unistd_h.m4 (gl_UNISTD_H_REQUIRE_DEFAULTS): Initialize the
17634         getpass-gnu module indicator.
17635         (gl_UNISTD_H_DEFAULTS): Initialize REPLACE_GETPASS_FOR_GETPASS_GNU.
17636         * modules/unistd (Makefile.am): Substitute GNULIB_GETPASS_GNU,
17637         REPLACE_GETPASS_FOR_GETPASS_GNU.
17638         * modules/getpass-gnu (configure.ac): Test
17639         REPLACE_GETPASS_FOR_GETPASS_GNU instead of REPLACE_GETPASS. Set a module
17640         indicator.
17641         * lib/unistd.in.h (getpass): Test REPLACE_GETPASS,
17642         REPLACE_GETPASS_FOR_GETPASS_GNU, and the respective module indicators
17643         instead of just REPLACE_GETPASS.
17645 2022-01-03  Bruno Haible  <bruno@clisp.org>
17647         fopen-gnu: Allow use as dependency from test modules.
17648         * m4/fopen.m4 (gl_FUNC_FOPEN_GNU): Set REPLACE_FOPEN_FOR_FOPEN_GNU
17649         instead of REPLACE_FOPEN.
17650         * m4/stdio_h.m4 (gl_STDIO_H_REQUIRE_DEFAULTS): Initialize the fopen-gnu
17651         module indicator.
17652         (gl_STDIO_H_DEFAULTS): Initialize REPLACE_FOPEN_FOR_FOPEN_GNU.
17653         * modules/stdio (Makefile.am): Substitute GNULIB_FOPEN_GNU,
17654         REPLACE_FOPEN_FOR_FOPEN_GNU.
17655         * modules/fopen-gnu (Depends-on): Add more dependencies.
17656         (configure.ac): Test REPLACE_FOPEN_FOR_FOPEN_GNU instead of
17657         REPLACE_FOPEN.
17658         * lib/stdio.in.h (fopen): Test REPLACE_FOPEN,
17659         REPLACE_FOPEN_FOR_FOPEN_GNU, and the respective module indicators
17660         instead of just REPLACE_FOPEN.
17662 2022-01-03  Bruno Haible  <bruno@clisp.org>
17664         realloc-gnu: Allow use as dependency from test modules.
17665         * m4/realloc.m4 (gl_FUNC_REALLOC_GNU): Set
17666         REPLACE_REALLOC_FOR_REALLOC_GNU instead of REPLACE_REALLOC.
17667         (gl_FUNC_REALLOC_POSIX): Set REPLACE_REALLOC_FOR_REALLOC_POSIX instead
17668         of REPLACE_REALLOC.
17669         * m4/stdlib_h.m4 (gl_STDLIB_H_REQUIRE_DEFAULTS): Initialize the
17670         realloc-gnu module indicator.
17671         (gl_STDLIB_H_DEFAULTS): Initialize REPLACE_REALLOC_FOR_REALLOC_GNU,
17672         REPLACE_REALLOC_FOR_REALLOC_POSIX, not REPLACE_REALLOC.
17673         * modules/stdlib (Makefile.am): Substitute GNULIB_REALLOC_GNU,
17674         REPLACE_REALLOC_FOR_REALLOC_GNU, REPLACE_REALLOC_FOR_REALLOC_POSIX, not
17675         REPLACE_REALLOC.
17676         * modules/realloc-posix (Depends-on, configure.ac): Test
17677         REPLACE_REALLOC_FOR_REALLOC_POSIX instead of REPLACE_REALLOC.
17678         * modules/realloc-gnu (Comment): Remove section.
17679         (Depends-on): Add free-posix, malloc-gnu, xalloc-oversized.
17680         (configure.ac): Test REPLACE_REALLOC_FOR_REALLOC_GNU instead of
17681         REPLACE_REALLOC. Set a module indicator.
17682         * lib/stdlib.in.h (realloc): Test REPLACE_REALLOC_FOR_REALLOC_POSIX,
17683         REPLACE_REALLOC_FOR_REALLOC_GNU, and the respective module indicators
17684         instead of just REPLACE_REALLOC.
17686 2022-01-03  Bruno Haible  <bruno@clisp.org>
17688         calloc-gnu: Allow use as dependency from test modules.
17689         * m4/calloc.m4 (gl_FUNC_CALLOC_GNU): Set REPLACE_CALLOC_FOR_CALLOC_GNU
17690         instead of REPLACE_CALLOC.
17691         (gl_FUNC_CALLOC_POSIX): Set REPLACE_CALLOC_FOR_CALLOC_POSIX instead of
17692         REPLACE_CALLOC.
17693         * m4/stdlib_h.m4 (gl_STDLIB_H_REQUIRE_DEFAULTS): Initialize the
17694         calloc-gnu module indicator.
17695         (gl_STDLIB_H_DEFAULTS): Initialize REPLACE_CALLOC_FOR_CALLOC_GNU,
17696         REPLACE_CALLOC_FOR_CALLOC_POSIX, not REPLACE_CALLOC.
17697         * modules/stdlib (Makefile.am): Substitute GNULIB_CALLOC_GNU,
17698         REPLACE_CALLOC_FOR_CALLOC_GNU, REPLACE_CALLOC_FOR_CALLOC_POSIX, not
17699         REPLACE_CALLOC.
17700         * modules/calloc-posix (Depends-on, configure.ac): Test
17701         REPLACE_CALLOC_FOR_CALLOC_POSIX instead of REPLACE_CALLOC.
17702         * modules/calloc-gnu (Depends-on): Add xalloc-oversized.
17703         (configure.ac): Test REPLACE_CALLOC_FOR_CALLOC_GNU instead of
17704         REPLACE_CALLOC. Set a module indicator.
17705         * lib/stdlib.in.h (calloc): Test REPLACE_CALLOC_FOR_CALLOC_POSIX,
17706         REPLACE_CALLOC_FOR_CALLOC_GNU, and the respective module indicators
17707         instead of just REPLACE_CALLOC.
17709 2022-01-03  Bruno Haible  <bruno@clisp.org>
17711         malloc-gnu: Allow use as dependency from test modules.
17712         * m4/malloc.m4 (gl_FUNC_MALLOC_GNU): Set REPLACE_MALLOC_FOR_MALLOC_GNU
17713         instead of REPLACE_MALLOC.
17714         (gl_FUNC_MALLOC_PTRDIFF, gl_FUNC_MALLOC_POSIX): Set
17715         REPLACE_MALLOC_FOR_MALLOC_POSIX instead of REPLACE_MALLOC.
17716         * m4/calloc.m4 (gl_FUNC_CALLOC_POSIX): Test
17717         REPLACE_MALLOC_FOR_MALLOC_POSIX instead of REPLACE_MALLOC.
17718         * m4/realloc.m4 (gl_FUNC_REALLOC_POSIX): Likewise.
17719         * m4/stdlib_h.m4 (gl_STDLIB_H_REQUIRE_DEFAULTS): Initialize the
17720         malloc-gnu module indicator.
17721         (gl_STDLIB_H_DEFAULTS): Initialize REPLACE_MALLOC_FOR_MALLOC_GNU,
17722         REPLACE_MALLOC_FOR_MALLOC_POSIX, not REPLACE_MALLOC.
17723         * modules/stdlib (Makefile.am): Substitute GNULIB_MALLOC_GNU,
17724         REPLACE_MALLOC_FOR_MALLOC_GNU, REPLACE_MALLOC_FOR_MALLOC_POSIX, not
17725         REPLACE_MALLOC.
17726         * modules/malloc-posix (Depends-on, configure.ac): Test
17727         REPLACE_MALLOC_FOR_MALLOC_POSIX instead of REPLACE_MALLOC.
17728         * modules/malloc-gnu (Comment): Remove section.
17729         (Depends-on): Add xalloc-oversized.
17730         (configure.ac): Test REPLACE_MALLOC_FOR_MALLOC_GNU instead of
17731         REPLACE_MALLOC. Set a module indicator.
17732         * lib/stdlib.in.h (malloc): Test REPLACE_MALLOC_FOR_MALLOC_POSIX,
17733         REPLACE_MALLOC_FOR_MALLOC_GNU, and the respective module indicators
17734         instead of just REPLACE_MALLOC.
17736 2022-01-02  Bruno Haible  <bruno@clisp.org>
17738         striconveh: Make the last change also work on Solaris 11.
17739         * lib/striconveh.c (mem_cd_iconveh_internal): Tweak last commit.
17741         striconveh: Make the last change also work on musl libc.
17742         * lib/striconveh.c (mem_cd_iconveh_internal): Make the U+FFFD conversion
17743         also work with non-GNU iconv() implementations.
17745 2022-01-01  Paul Eggert  <eggert@cs.ucla.edu>
17747         gen-header: port to BusyBox ‘sed’
17748         Problem reported by Tim Rühsen in:
17749         https://lists.gnu.org/r/bug-gnulib/2022-01/msg00004.html
17750         * modules/gen-header (SED_HEADER_NOEDIT): Replace instead of prepend.
17751         (SED_HEADER_STDOUT, SED_HEADER_TO_AT_t): Adjust to that change.
17752         Do not use ‘w foo’ twice in the same script, as BusyBox ‘sed’
17753         mistakenly opens ‘foo’ for output twice, thus losing some output.
17755 2022-01-01  Bruno Haible  <bruno@clisp.org>
17757         striconveh: Support an error handler that produces a Unicode U+FFFD.
17758         Suggested by Marc Nieper-Wißkirchen in
17759         <https://lists.gnu.org/archive/html/bug-gnulib/2021-12/msg00175.html>.
17760         * lib/iconveh.h (iconveh_replacement_character): New enum value.
17761         * lib/striconveh.c (mem_cd_iconveh_internal): When the handler is
17762         iconveh_replacement_character, try to produce U+FFFD when possible,
17763         instead of '?'.
17764         * tests/test-striconveh.c (main): Add GB18030 tests. Test also
17765         iconveh_replacement_character.
17767 2022-01-01  Bruno Haible  <bruno@clisp.org>
17769         maint: Update copyright notices.
17770         * build-aux/declared.sh (func_version): Bump year.
17772 2022-01-01  Bruno Haible  <bruno@clisp.org>
17774         maint: Update copyright notices in code generating programs.
17775         * lib/gen-uni-tables.c (output_predicate_test, output_predicate,
17776         output_category, output_combclass, output_bidi_category,
17777         output_decimal_digit_test, output_decimal_digit, output_digit_test,
17778         output_digit, output_numeric_test, output_numeric, output_mirror,
17779         output_joining_type_test, output_joining_type,
17780         output_joining_group_test, output_joining_group, output_scripts,
17781         output_scripts_byname, output_blocks, output_ident_category,
17782         output_nonspacing_property, output_lbrk_tables,
17783         output_lbrk_rules_as_tables, output_wbrk_tables, output_gbp_test,
17784         output_gbp_table, output_decomposition_tables,
17785         output_composition_tables, output_simple_mapping_test,
17786         output_simple_mapping, output_casing_rules): Extend copyright year of
17787         generated file to 2022.
17788         * lib/uniname/gen-uninames.lisp (main): Likewise. Produce license notice
17789         that is consistent with the gnulib/etc/license-notices/ files.
17790         * All files regenerated.
17792 2022-01-01  Paul Eggert  <eggert@cs.ucla.edu>
17794         maint: fix ‘make update-copyright’ on symlinks
17795         After running ‘make update-copyright’ I noticed that it
17796         incorrectly replaced a couple of symlinks with their contents.
17797         * Makefile (update-copyright): Do not update symlinks.
17798         * etc/license-notices/GPL, etc/license-notices/LGPL:
17799         Change these back to symlinks.
17801 2021-12-31  Bruno Haible  <bruno@clisp.org>
17803         unistdio: Prefer newer version to older, buggy one.
17804         * modules/unistdio/ulc-vasnprintf (configure.ac): Bump required
17805         libunistring version. This is needed because of the heap overrun fix
17806         (2018-09-23) and the need to avoid %n on more platforms (2020-10-04).
17807         * modules/unistdio/ulc-asnprintf (configure.ac): Likewise.
17808         * modules/unistdio/ulc-asprintf (configure.ac): Likewise.
17809         * modules/unistdio/ulc-fprintf (configure.ac): Likewise.
17810         * modules/unistdio/ulc-snprintf (configure.ac): Likewise.
17811         * modules/unistdio/ulc-sprintf (configure.ac): Likewise.
17812         * modules/unistdio/ulc-vasprintf (configure.ac): Likewise.
17813         * modules/unistdio/ulc-vfprintf (configure.ac): Likewise.
17814         * modules/unistdio/ulc-vsnprintf (configure.ac): Likewise.
17815         * modules/unistdio/ulc-vsprintf (configure.ac): Likewise.
17817 2021-12-31  Bruno Haible  <bruno@clisp.org>
17819         uniwidth: Optimize.
17820         * lib/gen-uni-tables.c (output_nonspacing_property): Add version
17821         parameter. Emit the usual boilerplate header for generated files.
17822         (is_width2): New function, based on lib/uniwidth/width.c.
17823         (output_width2_property): New function.
17824         (main): Create uniwidth/width0.h instead of uniwidth/width.c.part.
17825         Create uniwidth/width2.h.
17826         * lib/uniwidth/width.c: Include width0.h, width2.h, bitmap.h.
17827         (nonspacing_table_data, nonspacing_table_ind): Remove here.
17828         (uc_width): Replace the double-width character with an u_width2 bitmap
17829         lookup.
17830         * modules/uniwidth/width (Files): Add lib/uniwidth/width0.h,
17831         lib/uniwidth/width2.h, lib/unictype/bitmap.h.
17833 2021-12-31  Bruno Haible  <bruno@clisp.org>
17835         Update to Unicode 14.0.0.
17837         * lib/gen-uni-tables.c (UC_JOINING_GROUP_THIN_YEH,
17838         UC_JOINING_GROUP_VERTICAL_TAIL): New enum values.
17839         (fill_arabicshaping, joining_group_as_c_identifier): Recognize these
17840         joining groups.
17841         * lib/unictype.in.h (UC_JOINING_GROUP_THIN_YEH,
17842         UC_JOINING_GROUP_VERTICAL_TAIL): New enum values.
17843         * lib/unictype/joininggroup_name.h: Add the THIN_YEH, VERTICAL_TAIL
17844         joining groups.
17845         * lib/unictype/joininggroup_byname.gperf: Likewise.
17847         * lib/gen-uni-tables.c (LBP_ID1, LBP_ID2): New enum values.
17848         (LBP_ID): Assign artificial value.
17849         (get_lbp): Use the extended_pictographic property to assign LBP_ID1,
17850         LBP_ID2 instead of LBP_ID. Update such that unilbrk/lbrkprop.txt comes
17851         out as expected.
17852         (debug_output_lbp): Print either LBP_ID1 or LBP_ID2 as LBP_ID.
17853         (lbp_value_to_string): Handle LBP_ID1, LBP_ID2 instead of LBP_ID.
17854         (output_lbrk_rules_as_tables): Treat LBP_ID as macro that maps to two
17855         table rows/columns. In rule LB30b, use LBP_ID2 in addition to LBP_EB.
17856         Remove redundant part of rule LB27.
17857         * lib/unilbrk/lbrktables.h (LBP_ID1, LBP_ID2): New enum values.
17858         (LBP_ID): Remove enum value.
17859         (unilbrk_table): Update declaration.
17860         * lib/unilbrk/u8-possible-linebreaks.c (u8_possible_linebreaks_loop):
17861         Use LBP_ID1 instead of LBP_ID.
17862         * lib/unilbrk/u16-possible-linebreaks.c (u16_possible_linebreaks_loop):
17863         Likewise.
17864         * lib/unilbrk/u32-possible-linebreaks.c (u32_possible_linebreaks_loop):
17865         Likewise.
17866         * tests/unilbrk/test-u8-possible-linebreaks.c (test_function): Add a
17867         test of potential future emoji.
17868         * tests/unilbrk/test-u16-possible-linebreaks.c (test_function):
17869         Likewise.
17870         * tests/unilbrk/test-u32-possible-linebreaks.c (test_function):
17871         Likewise.
17873         * lib/uniwidth/width.c (nonspacing_table_data, nonspacing_table_ind):
17874         Update.
17875         (uc_width): Assign width 2 to the characters 0x1AFF0..0x1AFF3,
17876         0x1AFF5..0x1AFFB, 0x1AFFD..0x1AFFE, 0x1B120..0x1B122, 0x1F6DD..0x1F6DF,
17877         0x1F7F0, 0x1FA7B..0x1FA7C, 0x1FAA9..0x1FAAC, 0x1FAB7..0x1FABA,
17878         0x1FAC3..0x1FAC5, 0x1FAD7..0x1FAD9, 0x1FAE0..0x1FAE7, 0x1FAF0..0x1FAF6.
17879         * tests/uniwidth/test-uc_width2.sh: Expect width 0 for the characters
17880         0x0890..0x0891, 0x0898..0x089F, 0x08CA..0x0902, 0x0C3C, 0x180F,
17881         0x1AC1..0x1ACE, 0x1DFA, 0x10F82..0x10F85, 0x11070, 0x11073..0x11074,
17882         0x110C2, 0x1CF00..0x1CF2D, 0x1CF30..0x1CF46, 0x1E2AE. Expect ambiguous
17883         width for the character 0x1734. Expect width 2 for the characters
17884         0x1AFF0..0x1AFF3, 0x1AFF5..0x1AFFB, 0x1AFFD..0x1AFFE, 0x1B120..0x1B122,
17885         0x1F6DD..0x1F6DF, 0x1F7F0, 0x1FA7B..0x1FA7C, 0x1FAA9..0x1FAAC,
17886         0x1FAB7..0x1FABA, 0x1FAC3..0x1FAC5, 0x1FAD7..0x1FAD9, 0x1FAE0..0x1FAE7,
17887         0x1FAF0..0x1FAF6.
17889         * All generated files under lib/uni* and tests/uni*: Regenerate.
17890         * tests/uniname/NameAliases.txt: Update.
17891         * tests/uniname/UnicodeData.txt: Update.
17892         * tests/uninorm/NormalizationTest.txt: Update.
17893         * tests/unigbrk/GraphemeBreakTest.txt: Update.
17894         * tests/uniwbrk/WordBreakTest.txt: Update.
17896         * All the affected modules: Bump required libunistring version.
17898 2021-12-31  Bruno Haible  <bruno@clisp.org>
17900         Update to Unicode 13.0.0.
17902         * lib/gen-uni-tables.c (is_WBP_MIDLETTER): Add character 0x055F.
17903         (get_wbp): Assign value WBP_ALETTER to the characters 0x02E5..0x02EB,
17904         0x055A, 0x058A, 0xA708..0xA716.
17906         * lib/gen-uni-tables.c (LBP_CP1, LBP_CP2, LBP_OP1, LBP_OP2): New enum
17907         values.
17908         (LBP_OP, LBP_CP): Assign artificial values.
17909         (get_lbp): Use the unicode_width[] table to assign LBP_CP1, LBP_CP2
17910         instead of LBP_CP, and LBP_OP1, LBP_OP2 instead of LBP_OP. Update such
17911         that unilbrk/lbrkprop.txt comes out as expected.
17912         (debug_output_lbp): Print either LBP_CP1 or LBP_CP2 as LBP_CP. Print
17913         either LBP_OP1 or LBP_OP2 as LBP_OP.
17914         (lbp_value_to_string): Handle LBP_CP1, LBP_CP2, LBP_OP1, LBP_OP2 instead
17915         of LBP_CP, LBP_OP.
17916         (output_lbrk_rules_as_tables): Treat LBP_CP and LBP_OP as macros that
17917         map to two table rows/columns. In rule LB30, use only LBP_OP1 instead of
17918         LBP_OP, and only LBP_CP1 instead of LBP_CP. Simplify rule LB22.
17919         * lib/unilbrk/lbrktables.h (LBP_CP1, LBP_CP2, LBP_OP1, LBP_OP2): New
17920         enum values.
17921         (LBP_OP, LBP_CP): Remove enum values.
17922         (unilbrk_table): Update declaration.
17923         * tests/unilbrk/test-u8-possible-linebreaks.c (test_function): Add a
17924         test for East Asian opening parenthesis.
17925         * tests/unilbrk/test-u16-possible-linebreaks.c (test_function):
17926         Likewise.
17927         * tests/unilbrk/test-u32-possible-linebreaks.c (test_function):
17928         Likewise.
17930         * lib/uniwidth/width.c (nonspacing_table_data, nonspacing_table_ind):
17931         Update.
17932         (uc_width): Assign width 2 to the characters 0x16FF0..0x16FF1,
17933         0x18AF3..0x18CD5, 0x18D00..0x18D08, 0x1F6D6..0x1F6D7, 0x1F6FB..0x1F6FC,
17934         0x1F90C, 0x1FA74, 0x1FA83..0x1FA86, 0x1FA96..0x1FAA8, 0x1FAB0..0x1FAB6,
17935         0x1FAC0..0x1FAC2, 0x1FAD0..0x1FAD6.
17936         Assign width 1 to the characters 0x1F93B, 0x1F946.
17937         * tests/uniwidth/test-uc_width2.sh: Expect width 0 for the characters
17938         0x0B55, 0x0D81, 0x1ABF..0x1AC0, 0xA82C, 0x10EAB..0x10EAC, 0x111CF,
17939         0x1193B..0x1193C, 0x1193E, 0x11943, 0x16FE4. Expect width 2 for the
17940         characters 0x16FF0..0x16FF1, 0x18AF3..0x18CD5, 0x18D00..0x18D08,
17941         0x1F6D6..0x1F6D7, 0x1F6FB..0x1F6FC, 0x1F90C, 0x1FA74, 0x1FA83..0x1FA86,
17942         0x1FA96..0x1FAA8, 0x1FAB0..0x1FAB6, 0x1FAC0..0x1FAC2, 0x1FAD0..0x1FAD6.
17943         Expect width 1 for the characters 0x1F93B, 0x1F946.
17945         * All generated files under lib/uni* and tests/uni*: Regenerate.
17946         * tests/uniname/NameAliases.txt: Update.
17947         * tests/uniname/UnicodeData.txt: Update.
17948         * tests/uninorm/NormalizationTest.txt: Update.
17949         * tests/unigbrk/GraphemeBreakTest.txt: Update.
17950         * tests/uniwbrk/WordBreakTest.txt: Update.
17952         * All the affected modules: Bump required libunistring version.
17954 2021-12-30  Bruno Haible  <bruno@clisp.org>
17956         uniwbrk: Correction of Unicode 10.0.0 support.
17957         * lib/gen-uni-tables.c (is_WBP_MIDLETTER): Remove character 0x02D7.
17958         The generated files are not affected.
17960 2021-12-30  Bruno Haible  <bruno@clisp.org>
17962         Update to Unicode 12.1.0.
17964         * lib/gen-uni-tables.c: Update comments.
17966         * All generated files under lib/uni* and tests/uni*: Regenerate.
17967         * tests/uniname/NameAliases.txt: Update.
17968         * tests/uniname/UnicodeData.txt: Update.
17969         * tests/uninorm/NormalizationTest.txt: Update.
17970         * tests/unigbrk/GraphemeBreakTest.txt: Update.
17971         * tests/uniwbrk/WordBreakTest.txt: Update.
17973         * All the affected modules: Bump required libunistring version.
17975 2021-12-30  Bruno Haible  <bruno@clisp.org>
17977         Update to Unicode 12.0.0.
17979         * lib/gen-uni-tables.c (is_property_default_ignorable_code_point):
17980         Exclude 0x13430..0x13438.
17981         (get_lbp): Update such that unilbrk/lbrkprop.txt comes out as expected.
17982         (get_wbp): Map 0xFF10..0xFF19 to WBP_NUMERIC.
17984         * lib/uniwidth/width.c (nonspacing_table_data, nonspacing_table_ind):
17985         Update.
17986         (uc_width): Assign width 2 to the characters 0x16FE2..0x16FE3,
17987         0x187F2..0x187F7, 0x1B150..0x1B152, 0x1B164..0x1B167, 0x1F6D5, 0x1F6FA,
17988         0x1F7E0..0x1F7EB, 0x1F90D..0x1F90F, 0x1FA70..0x1FA73, 0x1FA78..0x1FA7A,
17989         0x1FA80..0x1FA82, 0x1FA90..0x1FA95.
17990         * tests/uniwidth/test-uc_width2.sh: Expect width 0 for the characters
17991         0x0EBA, 0xA9BD, 0x119D4..0x119D7, 0x119DA..0x119DB, 0x119E0,
17992         0x13430..0x13438, 0x16F4F, 0x1E130..0x1E136, 0x1E2EC..0x1E2EF. Expect
17993         width 2 for the characters 0x16FE2..0x16FE3, 0x187F2..0x187F7,
17994         0x1B150..0x1B152, 0x1B164..0x1B167, 0x1F6D5, 0x1F6FA, 0x1F7E0..0x1F7EB,
17995         0x1F90D..0x1F90F, 0x1FA70..0x1FA73, 0x1FA78..0x1FA7A, 0x1FA80..0x1FA82,
17996         0x1FA90..0x1FA95.
17998         * All generated files under lib/uni* and tests/uni*: Regenerate.
17999         * tests/uniname/NameAliases.txt: Update.
18000         * tests/uniname/UnicodeData.txt: Update.
18001         * tests/uninorm/NormalizationTest.txt: Update.
18002         * tests/unigbrk/GraphemeBreakTest.txt: Update.
18003         * tests/uniwbrk/WordBreakTest.txt: Update.
18005         * All the affected modules: Bump required libunistring version.
18007 2021-12-30  Paul Eggert  <eggert@cs.ucla.edu>
18009         crypto/sm3-buffer: fix C99 conformance bug
18010         * lib/sm3.c (sm3_process_block): Call varargs macro with enough
18011         arguments.  Problem found by IBM XL/C 12.1.0.0 for AIX.
18013 2021-12-30  Bruno Haible  <bruno@clisp.org>
18015         Update to Unicode 11.0.0.
18017         * lib/gen-uni-tables.c (is_property_default_ignorable_code_point):
18018         Simplify by use of PROP_PREPENDED_CONCATENATION_MARK.
18019         (UC_JOINING_GROUP_HANIFI_ROHINGYA_PA,
18020         UC_JOINING_GROUP_HANIFI_ROHINGYA_KINNA_YA): New enum values.
18021         (fill_arabicshaping, joining_group_as_c_identifier): Recognize these
18022         joining groups.
18023         (get_lbp): Update such that unilbrk/lbrkprop.txt comes out as expected.
18024         (WBP_EB, WBP_EM, WBP_GAZ, WBP_EBG): Remove enum values.
18025         (WBP_WSS): New enum value.
18026         (get_wbp): Update such that uniwbrk/wbrkprop.txt comes out as expected.
18027         (debug_output_wbp, fill_org_wbp, debug_output_org_wbp, output_wbp):
18028         Update for changed enum values.
18030         * lib/unictype.in.h (UC_JOINING_GROUP_HANIFI_ROHINGYA_*): New enum
18031         values.
18032         * lib/unictype/joininggroup_name.h: Add the HANIFI_ROHINGYA_* joining
18033         groups.
18034         * lib/unictype/joininggroup_byname.gperf: Likewise.
18036         * lib/unigbrk.in.h: Mark 4 enum values as obsolete.
18037         * lib/unigbrk/u-grapheme-breaks.h (FUNC): Handle emoji modifier sequence
18038         according to Unicode 11.0.0.
18039         * lib/unigbrk/u8-grapheme-breaks.c: Include <stdbool.h>, unictype.h.
18040         * lib/unigbrk/u16-grapheme-breaks.c: Likewise.
18041         * lib/unigbrk/u32-grapheme-breaks.c: Likewise.
18042         * lib/unigbrk/uc-grapheme-breaks.c: Likewise.
18043         * modules/unigbrk/u8-grapheme-breaks (Depends-on): Add
18044         unictype/property-extended-pictographic, stdbool.
18045         * modules/unigbrk/u16-grapheme-breaks (Depends-on): Likewise.
18046         * modules/unigbrk/u32-grapheme-breaks (Depends-on): Likewise.
18047         * modules/unigbrk/uc-grapheme-breaks (Depends-on): Likewise.
18048         * tests/unigbrk/test-u8-grapheme-breaks.c (main): Add test for emoji
18049         modifier / ZWJ sequence.
18050         * tests/unigbrk/test-u16-grapheme-breaks.c (main): Likewise.
18051         * tests/unigbrk/test-u32-grapheme-breaks.c (main): Likewise.
18052         * tests/unigbrk/test-uc-is-grapheme-break.c: Include <stdbool.h>,
18053         unictype.h.
18054         (main): Update workaround logic to match the one in
18055         lib/unigbrk/u-grapheme-breaks.h.
18056         * modules/unigbrk/uc-is-grapheme-break-tests (Depends-on): Add
18057         unictype/property-extended-pictographic, stdbool.
18059         * lib/uniwbrk.in.h: Mark 4 enum values as obsolete.
18060         (WBP_WSS): New enum value.
18061         * lib/uniwbrk/u-wordbreaks.h (FUNC): Handle emoji ZWJ sequences and
18062         horizontal whitespace according to Unicode 11.0.0.
18063         * lib/uniwbrk/u8-wordbreaks.c: Include unictype.h.
18064         * lib/uniwbrk/u16-wordbreaks.c: Likewise.
18065         * lib/uniwbrk/u32-wordbreaks.c: Likewise.
18066         * lib/uniwbrk/wbrktable.c (uniwbrk_prop_index, uniwbrk_table): Add a row
18067         and column for WBP_WSS.
18068         * lib/uniwbrk/wbrktable.h (uniwbrk_prop_index, uniwbrk_table): Update
18069         declarations.
18070         * modules/uniwbrk/u8-wordbreaks (Depends-on): Add
18071         unictype/property-extended-pictographic.
18072         * modules/uniwbrk/u16-wordbreaks (Depends-on): Likewise.
18073         * modules/uniwbrk/u32-wordbreaks (Depends-on): Likewise.
18074         * tests/uniwbrk/test-u8-wordbreaks.c (main): Update expected results.
18075         * tests/uniwbrk/test-u16-wordbreaks.c (main): Likewise.
18076         * tests/uniwbrk/test-u32-wordbreaks.c (main): Likewise.
18077         * tests/uniwbrk/test-uc-wordbreaks.c (wordbreakproperty_to_string):
18078         Update.
18080         * lib/unilbrk/u8-possible-linebreaks.c (u8_possible_linebreaks_loop):
18081         Handle ZWJ according to Unicode 11.0.0.
18082         * lib/unilbrk/u16-possible-linebreaks.c (u16_possible_linebreaks_loop):
18083         Likewise.
18084         * lib/unilbrk/u32-possible-linebreaks.c (u32_possible_linebreaks_loop):
18085         Likewise.
18087         * lib/uniwidth/width.c (nonspacing_table_data, nonspacing_table_ind):
18088         Update.
18089         (uc_width): Assign width 2 to the characters 0x187ED..0x187F1, 0x1F6F9,
18090         0x1F9E7..0x1F9FF.
18091         * tests/uniwidth/test-uc_width2.sh: Expect width 0 for the characters
18092         0x07FD, 0x08D3, 0x09FE, 0x0C04, 0xA8FF, 0x10D24..0x10D27,
18093         0x10F46..0x10F50, 0x110CD, 0x111C9, 0x1133B, 0x1145E, 0x1182F..0x11837,
18094         0x11839..0x1183A, 0x11D90..0x11D91, 0x11D95, 0x11D97, 0x11EF3..0x11EF4.
18095         Expect width 2 for the characters 0x187ED..0x187F1, 0x1F6F9,
18096         0x1F9E7..0x1F9FF.
18098         * All generated files under lib/uni* and tests/uni*: Regenerate.
18099         * tests/uniname/NameAliases.txt: Update.
18100         * tests/uniname/UnicodeData.txt: Update.
18101         * tests/uninorm/NormalizationTest.txt: Update.
18102         * tests/unigbrk/GraphemeBreakTest.txt: Update.
18103         * tests/uniwbrk/WordBreakTest.txt: Update.
18105         * All the affected modules: Bump required libunistring version.
18107 2021-12-30  Bruno Haible  <bruno@clisp.org>
18109         unictype: Add Emoji properties from Unicode 11.0.0.
18110         * lib/gen-uni-tables.c (PROP_EMOJI*, PROP_EXTENDED_PICTOGRAPHIC): New
18111         enum values.
18112         (fill_properties): Don't require a space between the property name and
18113         the comment. Handle the property names from emoji-data.txt.
18114         (is_property_emoji, is_property_emoji_presentation,
18115         is_property_emoji_modifier, is_property_emoji_modifier_base,
18116         is_property_emoji_component, is_property_extended_pictographic): New
18117         declarations.
18118         (output_properties): Emit the properties emoji, emoji_presentation,
18119         emoji_modifier, emoji_modifier_base, emoji_component,
18120         extended_pictographic.
18121         (get_lbp): Use the emoji_modifier property.
18122         (main): Expect one more argument, for the emoji-data.txt file.
18123         * lib/unictype.in.h (UC_PROPERTY_EMOJI, UC_PROPERTY_EMOJI_PRESENTATION,
18124         UC_PROPERTY_EMOJI_MODIFIER, UC_PROPERTY_EMOJI_MODIFIER_BASE,
18125         UC_PROPERTY_EMOJI_COMPONENT, UC_PROPERTY_EXTENDED_PICTOGRAPHIC,
18126         uc_is_property_emoji, uc_is_property_emoji_presentation,
18127         uc_is_property_emoji_modifier, uc_is_property_emoji_modifier_base,
18128         uc_is_property_emoji_component, uc_is_property_extended_pictographic):
18129         New declarations.
18130         * lib/unictype/pr_emoji.c: New file.
18131         * lib/unictype/pr_emoji_presentation.c: New file.
18132         * lib/unictype/pr_emoji_modifier.c: New file.
18133         * lib/unictype/pr_emoji_modifier_base.c: New file.
18134         * lib/unictype/pr_emoji_component.c: New file.
18135         * lib/unictype/pr_extended_pictographic.c: New file.
18136         * modules/unictype/property-emoji: New file.
18137         * modules/unictype/property-emoji-tests: New file.
18138         * modules/unictype/property-emoji-presentation: New file.
18139         * modules/unictype/property-emoji-presentation-tests: New file.
18140         * modules/unictype/property-emoji-modifier: New file.
18141         * modules/unictype/property-emoji-modifier-tests: New file.
18142         * modules/unictype/property-emoji-modifier-base: New file.
18143         * modules/unictype/property-emoji-modifier-base-tests: New file.
18144         * modules/unictype/property-emoji-component: New file.
18145         * modules/unictype/property-emoji-component-tests: New file.
18146         * modules/unictype/property-extended-pictographic: New file.
18147         * modules/unictype/property-extended-pictographic-tests: New file.
18148         * modules/unictype/property-all (Depends-on): Depend on the new modules.
18150 2021-12-29  Bruno Haible  <bruno@clisp.org>
18152         uniwidth: Give width 0 to conjoining Hangul Jamo jungseong, jongseong.
18153         Reported by Luis Javier Merino <ninjalj@gmail.com> in
18154         <https://lists.gnu.org/archive/html/bug-libunistring/2021-12/msg00006.html>.
18155         * lib/gen-uni-tables.c (is_nonspacing): Return true for the conjoining
18156         Hangul Jamo jungseong and jongseong characters.
18157         * lib/uniwidth/width.c (nonspacing_table_data, nonspacing_table_ind):
18158         Regenerated.
18159         * tests/uniwidth/test-uc_width2.sh: Expect width 0 for the characters
18160         0x1160..0x11FF, 0xD7B0..0xD7C6, 0xD7CB..0xD7FB.
18162 2021-12-29  Bruno Haible  <bruno@clisp.org>
18164         uniwidth: Update to Unicode 10.0.0.
18165         * lib/uniwidth/width.c (uc_width): Assign width 2 to the characters
18166         0x231A..0x231B, 0x23E9..0x23EC, 0x23F0, 0x23F3, 0x25FD..0x25FE,
18167         0x2614..0x2615, 0x2648..0x2653, 0x267F, 0x2693, 0x26A1, 0x26AA..0x26AB,
18168         0x26BD..0x26BE, 0x26C4..0x26C5, 0x26CE, 0x26D4, 0x26EA, 0x26F2..0x26F3,
18169         0x26F5, 0x26FA, 0x26FD, 0x2705, 0x270A..0x270B, 0x2728, 0x274C, 0x274E,
18170         0x2753..0x2755, 0x2757, 0x2795..0x2797, 0x27B0, 0x27BF, 0x2B1B..0x2B1C,
18171         0x2B50, 0x2B55, 0xA960..0xA97C, 0x16FE0..0x16FE1, 0x17000..0x187EC,
18172         0x18800..0x18AF2, 0x1B000..0x1B11F, 0x1B170..0x1B2FB, 0x1F004, 0x1F0CF,
18173         0x1F18E, 0x1F191..0x1F19A, 0x1F200..0x1F320, 0x1F32D..0x1F335,
18174         0x1F337..0x1F37C, 0x1F37E..0x1F393, 0x1F3A0..0x1F3CA, 0x1F3CF..0x1F3D3,
18175         0x1F3E0..0x1F3F0, 0x1F3F4, 0x1F3F8..0x1F43E, 0x1F440, 0x1F442..0x1F4FC,
18176         0x1F4FF..0x1F53D, 0x1F54B..0x1F54E, 0x1F550..0x1F567, 0x1F57A,
18177         0x1F595..0x1F596, 0x1F5A4, 0x1F5FB..0x1F64F, 0x1F680..0x1F6C5, 0x1F6CC,
18178         0x1F6D0..0x1F6D2, 0x1F6EB..0x1F6EC, 0x1F6F4..0x1F6F8, 0x1F910..0x1F9E6.
18179         Assign ambiguous width to the characters 0x3248..0x324F.
18180         * tests/uniwidth/test-uc_width2.sh: Expect these changes.
18182 2021-12-29  Bruno Haible  <bruno@clisp.org>
18184         unilbrk: Improve support for strings that contain CR-LF sequences.
18185         * lib/gen-uni-tables.c (LBP_CR, LBP_LF): New enum values.
18186         (get_lbp): For '\r' and '\n', return LBP_CR and LBP_LF, respectively,
18187         instead of LBP_BK.
18188         (debug_output_lbp, fill_org_lbp, debug_output_org_lbp,
18189         lbp_value_to_string): Handle LBP_CR, LBP_LF.
18190         * lib/unilbrk/lbrkprop2.h: Regenerated.
18191         * lib/unilbrk/lbrktables.h (LBP_CR, LBP_LF): New enum values.
18192         * lib/unilbrk.in.h (UC_BREAK_CR_BEFORE_LF): New enum value.
18193         (u8_possible_linebreaks, u16_possible_linebreaks,
18194         u32_possible_linebreaks, ulc_possible_linebreaks, u8_width_linebreaks,
18195         u16_width_linebreaks, u32_width_linebreaks, ulc_width_linebreaks):
18196         Declare also a _v2 variant, and use a C macro to activate it by default.
18197         * lib/unilbrk/internal.h: New file.
18198         * lib/unilbrk/u8-possible-linebreaks.c: Include unilbrk/internal.h.
18199         (u8_possible_linebreaks_loop): Renamed from u8_possible_linebreaks. Add
18200         'cr' parameter.
18201         (u8_possible_linebreaks, u8_possible_linebreaks_v2): New functions.
18202         (main): Update.
18203         * lib/unilbrk/u16-possible-linebreaks.c: Include unilbrk/internal.h.
18204         (u16_possible_linebreaks_loop): Renamed from u16_possible_linebreaks.
18205         Add 'cr' parameter.
18206         (u16_possible_linebreaks, u16_possible_linebreaks_v2): New functions.
18207         * lib/unilbrk/u32-possible-linebreaks.c: Include unilbrk/internal.h.
18208         (u32_possible_linebreaks_loop): Renamed from u32_possible_linebreaks.
18209         Add 'cr' parameter.
18210         (u32_possible_linebreaks, u32_possible_linebreaks_v2): New functions.
18211         * lib/unilbrk/ulc-possible-linebreaks.c: Include unilbrk/internal.h,
18212         unilbrk/lbrktables.h.
18213         (ulc_possible_linebreaks_internal): Renamed from
18214         ulc_possible_linebreaks. Add 'cr' parameter.
18215         (ulc_possible_linebreaks, ulc_possible_linebreaks_v2): New functions.
18216         (main): Update.
18217         * lib/unilbrk/u8-width-linebreaks.c: Include unilbrk/internal.h,
18218         unilbrk/lbrktables.h.
18219         (u8_width_linebreaks_internal): Renamed from u8_width_linebreaks. Add
18220         'cr' parameter.
18221         (u8_width_linebreaks, u8_width_linebreaks_v2): New functions.
18222         (main): Update.
18223         * lib/unilbrk/u16-width-linebreaks.c: Include unilbrk/internal.h,
18224         unilbrk/lbrktables.h.
18225         (u16_width_linebreaks_internal): Renamed from u16_width_linebreaks. Add
18226         'cr' parameter.
18227         (u16_width_linebreaks, u16_width_linebreaks_v2): New functions.
18228         * lib/unilbrk/u32-width-linebreaks.c: Include unilbrk/internal.h,
18229         unilbrk/lbrktables.h.
18230         (u32_width_linebreaks_internal): Renamed from u32_width_linebreaks. Add
18231         'cr' parameter.
18232         (u32_width_linebreaks, u32_width_linebreaks_v2): New functions.
18233         * lib/unilbrk/ulc-width-linebreaks.c: Include unilbrk/internal.h,
18234         unilbrk/lbrktables.h.
18235         (ulc_width_linebreaks_internal): Renamed from ulc_width_linebreaks. Add
18236         'cr' parameter.
18237         (ulc_width_linebreaks, ulc_width_linebreaks_v2): New functions.
18238         (main): Update.
18239         * modules/unilbrk/u8-possible-linebreaks (Files): Add
18240         lib/unilbrk/internal.h.
18241         * modules/unilbrk/u16-possible-linebreaks (Files): Likewise.
18242         * modules/unilbrk/u32-possible-linebreaks (Files): Likewise.
18243         * modules/unilbrk/u8-width-linebreaks (Files): Likewise.
18244         * tests/unilbrk/test-u8-possible-linebreaks.c (test_function): New
18245         function, extracted from main. Add a test of CR-LF handling.
18246         (main): Invoke it twice.
18247         * tests/unilbrk/test-u16-possible-linebreaks.c (test_function): New
18248         function, extracted from main. Add a test of CR-LF handling.
18249         (main): Invoke it twice.
18250         * tests/unilbrk/test-u32-possible-linebreaks.c (test_function): New
18251         function, extracted from main. Add a test of CR-LF handling.
18252         (main): Invoke it twice.
18253         * tests/unilbrk/test-ulc-possible-linebreaks.c (test_function): New
18254         function, extracted from main.
18255         (main): Invoke it twice.
18256         * tests/unilbrk/test-u8-width-linebreaks.c (test_function): New
18257         function, extracted from main.
18258         (main): Invoke it twice.
18259         * tests/unilbrk/test-u16-width-linebreaks.c (test_function): New
18260         function, extracted from main.
18261         (main): Invoke it twice.
18262         * tests/unilbrk/test-u32-width-linebreaks.c (test_function): New
18263         function, extracted from main.
18264         (main): Invoke it twice.
18265         * tests/unilbrk/test-ulc-width-linebreaks.c (test_function): New
18266         function, extracted from main.
18267         (main): Invoke it twice.
18269 2021-12-29  Bruno Haible  <bruno@clisp.org>
18271         uniwbrk: Add unit tests of CR-LF sequences.
18272         * tests/uniwbrk/test-u8-wordbreaks.c (main): Add test of a string with
18273         CR-LF.
18274         * tests/uniwbrk/test-u16-wordbreaks.c (main): Likewise.
18275         * tests/uniwbrk/test-u32-wordbreaks.c (main): Likewise.
18277 2021-12-29  Bruno Haible  <bruno@clisp.org>
18279         unigbrk: Add unit tests of CR-LF sequences.
18280         * tests/unigbrk/test-u8-grapheme-breaks.c (main): Add test of a string
18281         with CR-LF.
18282         * tests/unigbrk/test-u16-grapheme-breaks.c (main): Likewise.
18283         * tests/unigbrk/test-u32-grapheme-breaks.c (main): Likewise.
18285 2021-12-29  Bruno Haible  <bruno@clisp.org>
18287         unilbrk: Update handling of Hebrew letter + hyphen for Unicode 10.0.0.
18288         * lib/unilbrk/lbrktables.h (LBP_HL_BA): New enum value.
18289         * lib/unilbrk/u8-possible-linebreaks.c (u8_possible_linebreaks): Add
18290         code for handling break-after character after Hebrew letter.
18291         * lib/unilbrk/u16-possible-linebreaks.c (u16_possible_linebreaks):
18292         Likewise.
18293         * lib/unilbrk/u32-possible-linebreaks.c (u32_possible_linebreaks):
18294         Likewise.
18295         * tests/unilbrk/test-u8-possible-linebreaks.c (main): Add a test
18296         regarding break-after character after Hebrew letter.
18297         * tests/unilbrk/test-u16-possible-linebreaks.c (main): Likewise.
18298         * tests/unilbrk/test-u32-possible-linebreaks.c (main): Likewise.
18300 2021-12-28  Paul Eggert  <eggert@cs.ucla.edu>
18302         nstrftime: improve handling of invalid formats
18303         * lib/nstrftime.c (__strftime_internal): Without this change,
18304         ‘date +'%0_-+^#1%A'’ would output ‘%A’; with it, it outputs
18305         something like ‘%0_-+^#1Tuesday’ which is easier to debug and to
18306         write wrappers for (such as the nstrftime/fprintftime usage in GNU
18307         ‘date’).
18309 2021-12-28  Bruno Haible  <bruno@clisp.org>
18311         unilbrk: Update handling of regional indicators for Unicode 10.0.0.
18312         * lib/unilbrk/u8-possible-linebreaks.c (u8_possible_linebreaks): Add
18313         code for handling regional indicators.
18314         * lib/unilbrk/u16-possible-linebreaks.c (u16_possible_linebreaks):
18315         Likewise.
18316         * lib/unilbrk/u32-possible-linebreaks.c (u32_possible_linebreaks):
18317         Likewise.
18318         * tests/unilbrk/test-u8-possible-linebreaks.c (main): Add a test
18319         regarding regional indicators.
18320         * tests/unilbrk/test-u16-possible-linebreaks.c (main): Likewise.
18321         * tests/unilbrk/test-u32-possible-linebreaks.c (main): Likewise.
18323 2021-12-28  Bruno Haible  <bruno@clisp.org>
18325         unilbrk: Update handling of zero-width joiner for Unicode 10.0.0.
18326         * lib/unilbrk/u8-possible-linebreaks.c (u8_possible_linebreaks): Update
18327         code for zero-width joiner handling to match UAX #14 for Unicode 10.0.0.
18328         * lib/unilbrk/u16-possible-linebreaks.c (u16_possible_linebreaks):
18329         Likewise.
18330         * lib/unilbrk/u32-possible-linebreaks.c (u32_possible_linebreaks):
18331         Likewise.
18332         * tests/unilbrk/test-u8-possible-linebreaks.c (main): Add a test
18333         regarding zero-width joiner.
18334         * tests/unilbrk/test-u16-possible-linebreaks.c (main): Likewise.
18335         * tests/unilbrk/test-u32-possible-linebreaks.c (main): Likewise.
18337 2021-12-28  Bruno Haible  <bruno@clisp.org>
18339         unilbrk: Update handling of combining marks for Unicode 10.0.0.
18340         * lib/unilbrk/u8-possible-linebreaks.c (u8_possible_linebreaks): Update
18341         code for combining characters to match UAX #14 for Unicode 10.0.0.
18342         Remove legacy support for space + combining mark.
18343         * lib/unilbrk/u16-possible-linebreaks.c (u16_possible_linebreaks):
18344         Likewise.
18345         * lib/unilbrk/u32-possible-linebreaks.c (u32_possible_linebreaks):
18346         Likewise.
18347         * tests/unilbrk/test-u8-possible-linebreaks.c (main): Add a test
18348         regarding combining characters.
18349         * tests/unilbrk/test-u16-possible-linebreaks.c (main): Likewise.
18350         * tests/unilbrk/test-u32-possible-linebreaks.c (main): Likewise.
18352 2021-12-28  Bruno Haible  <bruno@clisp.org>
18354         unilbrk: Restore deviation for (IS,AL) pair.
18355         * lib/gen-uni-tables.c (output_lbrk_rules_as_tables): Disable rule LB29.
18356         * lib/unilbrk/lbrktables.c: Regenerated.
18357         * tests/unilbrk/test-u8-possible-linebreaks.c (main): Add test case with
18358         HTML markup.
18359         * tests/unilbrk/test-u16-possible-linebreaks.c (main): Likewise.
18360         * tests/unilbrk/test-u32-possible-linebreaks.c (main): Likewise.
18361         * tests/unilbrk/test-ulc-possible-linebreaks.c (main): Likewise.
18363 2021-12-28  Bruno Haible  <bruno@clisp.org>
18365         unilbrk: Change algorithm to be closer to Unicode Standard Annex #14.
18366         * lib/gen-uni-tables.c (lbp_value_to_string): New function, extracted
18367         from output_lbp.
18368         (output_lbp): Invoke it.
18369         (output_lbrk_rules_as_tables): New function.
18370         (main): Invoke it.
18371         * lib/unilbrk/lbrktables.c: Now automatically generated.
18372         * tests/unilbrk/test-u8-possible-linebreaks.c (main): Update expected
18373         result.
18374         * tests/unilbrk/test-u16-possible-linebreaks.c (main): Likewise.
18375         * tests/unilbrk/test-u32-possible-linebreaks.c (main): Likewise.
18376         * tests/unilbrk/test-ulc-possible-linebreaks.c (main): Likewise.
18377         * tests/unilbrk/test-ulc-width-linebreaks.c (main): Likewise.
18379 2021-12-28  Bruno Haible  <bruno@clisp.org>
18381         uniwbrk: Add unit tests of regional indicators.
18382         * tests/uniwbrk/test-u8-wordbreaks.c (main): Add test of regional
18383         indicators.
18384         * tests/uniwbrk/test-u16-wordbreaks.c (main): Likewise.
18385         * tests/uniwbrk/test-u32-wordbreaks.c (main): Likewise.
18387 2021-12-28  Bruno Haible  <bruno@clisp.org>
18389         unigbrk: Simplify code for regional indicators.
18390         * lib/unigbrk/u-grapheme-breaks.h (FUNC): Make code for regional
18391         indicators more future-proof.
18392         * tests/unigbrk/test-u8-grapheme-breaks.c (main): Add test of regional
18393         indicators.
18394         * tests/unigbrk/test-u16-grapheme-breaks.c (main): Likewise.
18395         * tests/unigbrk/test-u32-grapheme-breaks.c (main): Likewise.
18397 2021-12-28  Paul Eggert  <eggert@cs.ucla.edu>
18399         clock_getres: document portability issues better
18400         * doc/posix-functions/clock_getres.texi:
18401         * doc/posix-functions/timespec_getres.texi:
18402         Document problems with timestamp resolution.
18404         timespec_getres: new module
18405         * lib/time.in.h (timespec_getres): New decl.
18406         * lib/timespec_getres.c, m4/timespec_getres.m4:
18407         * modules/timespec_getres, modules/timespec_getres-tests:
18408         * tests/test-timespec_getres.c:
18409         New files.
18410         * m4/time_h.m4 (gl_TIME_H_REQUIRE_DEFAULTS, gl_TIME_H_DEFAULTS):
18411         * modules/time (time.h):
18412         Support timespec_getres.
18414         gettime-res: new module
18415         * lib/gettime-res.c, modules/gettime-res: New files.
18416         * lib/timespec.h (gettime_res): New decl.
18417         * m4/clock_time.m4 (gl_CLOCK_TIME): Also check for clock_getres.
18418         * m4/gettime.m4 (gl_GETTIME_RES): New macro.
18420         gettime: port better to non-POSIX C2x
18421         C2x requires a function timespec_get; prefer that to
18422         gettimeofday, since it has better resolution.
18423         * lib/gettime.c (gettime): Prefer timespec_get to gettimeofday.
18424         * m4/gettime.m4 (gl_GETTIME): Check for timespec_get.
18425         Omit a check for gettimeofday; not needed because
18426         the gettime module depends on the gettimeofday module.
18428 2021-12-28  Bruno Haible  <bruno@clisp.org>
18430         gen-uni-tables: Produce license notices suitable for Gnulib.
18431         * lib/gen-uni-tables.c (output_library_license, output_tests_license):
18432         Produce license notices that are consistent with the
18433         gnulib/etc/license-notices/ files.
18434         * All generated files under lib/uni* and tests/uni*: Regenerate.
18436 2021-12-28  Bruno Haible  <bruno@clisp.org>
18438         unigbrk, uniwbrk: No-op tweaks.
18439         * lib/unigbrk/u-grapheme-breaks.h: Comment tweaks.
18440         * lib/uniwbrk/u-wordbreaks.h: Coding style and comment tweaks.
18441         * lib/uniwbrk/wbrktable.c: Comment tweaks.
18443 2021-12-28  Paul Eggert  <eggert@cs.ucla.edu>
18445         perl: let caller see whether perl was found
18446         Problem reported for coreutils by Serge Belyshev (Bug#52844).
18447         * m4/perl.m4 (gl_PERL): Use AC_CACHE_CHECK, so that
18448         an invoker of gl_PERL can later inspect gl_cv_prog_perl
18449         to see whether perl was found.
18451 2021-12-28  Bruno Haible  <bruno@clisp.org>
18453         Fix --automake-subdir breakage (regression 2021-12-24).
18454         Reported by Bjarni Ingi Gislason <bjarniig@rhi.hi.is> in
18455         <https://lists.gnu.org/archive/html/bug-gnulib/2021-12/msg00156.html>.
18456         * build-aux/prefix-gnulib-mk (prefix_assignment): Don't change
18457         SED_HEADER_* variables.
18459 2021-12-26  Bruno Haible  <bruno@clisp.org>
18461         Update to Unicode 10.0.0.
18463         * lib/gen-uni-tables.c (PROP_REGIONAL_INDICATOR): New enum value.
18464         (fill_properties): Recognize property "Regional_Indicator".
18465         (is_property_regional_indicator): New function.
18466         (output_properties): Also output the data for regional_indicator.
18467         (get_lbp): Update such that unilbrk/lbrkprop.txt comes out as expected.
18468         Use is_property_regional_indicator.
18469         (get_wbp): Update such that uniwbrk/wbrkprop.txt comes out as expected.
18470         Use is_property_regional_indicator.
18471         (UC_JOINING_GROUP_MALAYALAM_*): New enum values.
18472         (fill_arabicshaping, joining_group_as_c_identifier): Recognize these
18473         joining groups.
18475         * lib/uniname/gen-uninames.lisp (main): Ignore empty lines and comment
18476         lines in the aliases file. Needed because since 2015-06-20, we use the
18477         unmodified Unicode NameAliases.txt file. Remove reference to undefined
18478         variable. Correct indentation.
18480         * lib/unictype.in.h (UC_PROPERTY_REGIONAL_INDICATOR,
18481         uc_is_property_regional_indicator): New declarations.
18482         * lib/unictype/pr_regional_indicator.c: New file.
18483         * modules/unictype/property-regional-indicator: New file.
18484         * modules/unictype/property-regional-indicator-tests: New file.
18485         * modules/unictype/property-all (Depends-on): Add
18486         unictype/property-regional-indicator.
18488         * lib/unictype.in.h (UC_JOINING_GROUP_MALAYALAM_*): New enum values.
18489         * lib/unictype/joininggroup_name.h: Add the MALAYALAM_* joining groups.
18490         * lib/unictype/joininggroup_byname.gperf: Likewise.
18492         * lib/uniwidth/width.c (nonspacing_table_data, nonspacing_table_ind):
18493         Update.
18494         * tests/uniwidth/test-uc_width2.sh: Expect width 0 for the characters
18495         0x0AFA..0x0AFF, 0x0D00, 0x0D3B..0x0D3C, 0x1DF6..0x1DF9,
18496         0x11A01..0x11A06, 0x11A09..0x11A0A, 0x11A33..0x11A38, 0x11A3B..0x11A3E,
18497         0x11A47, 0x11A51..0x11A56, 0x11A59..0x11A5B, 0x11A8A..0x11A96,
18498         0x11A98..0x11A99, 0x11D31..0x11D36, 0x11D3A, 0x11D3C..0x11D3D,
18499         0x11D3F..0x11D45, 0x11D47.
18501         * All generated files under lib/uni* and tests/uni*: Regenerate.
18502         * tests/uniname/NameAliases.txt: Update.
18503         * tests/uniname/UnicodeData.txt: Update.
18504         * tests/uninorm/NormalizationTest.txt: Update.
18505         * tests/unigbrk/GraphemeBreakTest.txt: Update.
18506         * tests/uniwbrk/WordBreakTest.txt: Update.
18508         * All the affected modules: Bump required libunistring version.
18510 2021-12-26  Bruno Haible  <bruno@clisp.org>
18512         pselect: Fix compilation error in C++ mode on AIX 7.
18513         * lib/sys_select.in.h (pselect): Use _GL_CXXALIAS_SYS_CAST instead of
18514         _GL_CXXALIAS_SYS.
18515         * doc/posix-functions/pselect.texi: Mention the AIX problem.
18517 2021-12-25  Bruno Haible  <bruno@clisp.org>
18519         gnulib-tool: Fix handling of module libtextstyle-optional.
18520         Reported by Paul Eggert in
18521         <https://lists.gnu.org/archive/html/bug-gnulib/2021-12/msg00152.html>.
18522         * gnulib-tool (func_repeat_module_in_tests): New function.
18523         (func_emit_tests_Makefile_am, func_create_testdir): Use it for the file
18524         list and when creating tests/Makefile.am.
18526 2021-12-25  Bruno Haible  <bruno@clisp.org>
18528         gnulib-tool: Respect applicability 'all' without --single-configure.
18529         * gnulib-tool (func_verify_tests_module): Treat modules with
18530         applicability 'all' like 'tests' modules, not like 'main' modules.
18532 2021-12-24  Paul Eggert  <eggert@cs.ucla.edu>
18534         maint: avoid empty lines in recipes
18535         AIX 7.2 ‘make’ complains about recipe lines that are empty after
18536         macro expansion, and I suppose there’s a good chance some
18537         non-POSIX ‘make’ would prohibit them.  Rework macros so
18538         that we can avoid them.
18539         * gnulib-tool (func_emit_lib_Makefile_am)
18540         (func_emit_tests_Makefile_am): Support @!NMD@ too.
18541         * modules/gen-header (@gl_V_at): New macro.
18542         * modules/alloca-opt, modules/argz, modules/assert-h:
18543         * modules/byteswap, modules/configmake, modules/ctype:
18544         * modules/dirent, modules/errno, modules/execinfo, modules/fcntl-h:
18545         * modules/float, modules/fnmatch-h, modules/getopt-posix:
18546         * modules/glob-h, modules/iconv-h, modules/ieee754-h:
18547         * modules/inttypes-incomplete, modules/langinfo:
18548         * modules/libtextstyle-optional, modules/limits-h, modules/locale:
18549         * modules/malloc-h, modules/math, modules/monetary, modules/netdb:
18550         * modules/openmp-init, modules/poll-h, modules/posix-shell:
18551         * modules/pthread-h, modules/pty, modules/sched, modules/search:
18552         * modules/signal-h, modules/sigsegv, modules/snippet/link-warning:
18553         * modules/spawn, modules/stdalign, modules/stdarg, modules/stdbool:
18554         * modules/stddef, modules/stdint, modules/stdio, modules/stdlib:
18555         * modules/stdnoreturn, modules/string, modules/strings:
18556         * modules/sysexits, modules/termios, modules/threads-h:
18557         * modules/time, modules/uchar, modules/unicase/base:
18558         * modules/uniconv/base, modules/unictype/base, modules/unigbrk/base:
18559         * modules/unilbrk/base, modules/uniname/base, modules/uninorm/base:
18560         * modules/unistd, modules/unistdio/base, modules/unistr/base:
18561         * modules/unitypes, modules/uniwbrk/base, modules/uniwidth/base:
18562         * modules/utime-h, modules/wchar, modules/wctype-h:
18563         Use it.
18565         maint: tight-scope.mk need not be read-only
18566         * top/maint.mk (tight-scope.mk): Don’t bother to make
18567         tight-scope.mk read-only either.
18569         maint: break out '&& mv $@-t $@'
18570         * build-aux/git-version-gen, config/argz.mk, modules/configmake:
18571         * modules/posix_spawnp-tests, modules/snippet/link-warning:
18572         * top/maint.mk:
18573         Break out '&& mv $@-t $@' to a separate line in the Make recipe,
18574         as this makes things a bit easier to debug.
18576         gen-header: new module
18577         Simplify header generation by using Makefile variables
18578         defined by a new gen-header module.
18579         * modules/gen-header: New module.
18580         * modules/alloca-opt, modules/argz, modules/arpa_inet:
18581         * modules/assert-h, modules/byteswap:
18582         * modules/ctype, modules/dirent, modules/dynarray, modules/errno:
18583         * modules/execinfo, modules/fcntl-h, modules/float:
18584         * modules/fnmatch-h, modules/getopt-posix, modules/glob-h:
18585         * modules/iconv-h, modules/ieee754-h, modules/inttypes-incomplete:
18586         * modules/langinfo, modules/libtextstyle-optional, modules/limits-h:
18587         * modules/locale, modules/malloc-h, modules/math, modules/monetary:
18588         * modules/net_if, modules/netdb, modules/netinet_in:
18589         * modules/openmp-init, modules/poll-h:
18590         * modules/pthread-h, modules/pty, modules/sched:
18591         * modules/scratch_buffer, modules/search, modules/selinux-h:
18592         * modules/signal-h, modules/sigsegv:
18593         * modules/spawn, modules/stdalign, modules/stdarg, modules/stdbool:
18594         * modules/stddef, modules/stdint, modules/stdio, modules/stdlib:
18595         * modules/stdnoreturn, modules/string, modules/strings:
18596         * modules/sys_file, modules/sys_ioctl, modules/sys_random:
18597         * modules/sys_resource, modules/sys_select, modules/sys_socket:
18598         * modules/sys_stat, modules/sys_time, modules/sys_times:
18599         * modules/sys_types, modules/sys_uio, modules/sys_utsname:
18600         * modules/sys_wait, modules/sysexits, modules/termios:
18601         * modules/threads-h, modules/time, modules/uchar:
18602         * modules/unicase/base, modules/unicase/special-casing:
18603         * modules/uniconv/base, modules/unictype/base, modules/unigbrk/base:
18604         * modules/unilbrk/base, modules/uniname/base, modules/uninorm/base:
18605         * modules/unistd, modules/unistdio/base, modules/unistr/base:
18606         * modules/unitypes, modules/uniwbrk/base, modules/uniwidth/base:
18607         * modules/utime-h, modules/wchar, modules/wctype-h:
18608         Depend on gen-header, and use its macros to simplify
18609         header generation.
18611 2021-12-24  Bruno Haible  <bruno@clisp.org>
18613         passfd: Fix compilation error on IRIX.
18614         * lib/passfd.c (sendfd): On IRIX, ignore CMSG_FIRSTHDR.
18615         (recvfd): Likewise. Produce a fake error ENOTCONN.
18617 2021-12-24  Bruno Haible  <bruno@clisp.org>
18619         tests: Fix link errors on AIX.
18620         * modules/fnmatch-h-c++-tests (Makefile.am): Link test-fnmatch-h-c++
18621         with $(LIB_MBRTOWC).
18622         * modules/glob-h-c++-tests (Makefile.am): Link test-glob-h-c++ with
18623         $(LIB_MBRTOWC).
18624         * modules/stdlib-c++-tests (Makefile.am): Link test-stdlib-c++ with
18625         $(GETLOADAVG_LIBS).
18626         * modules/sys_stat-c++-tests (Makefile.am): Link test-sys_stat-c++ with
18627         $(LIB_MBRTOWC).
18628         * modules/uchar-c++-tests (Makefile.am): Link test-uchar-c++ with
18629         $(LIBUNISTRING).
18631 2021-12-24  Bruno Haible  <bruno@clisp.org>
18633         hamt tests: Fix compilation error with AIX xlc.
18634         * tests/test-hamt.c (test_iterator): Don't use compound initializer.
18636 2021-12-24  Bruno Haible  <bruno@clisp.org>
18638         strerrorname_np: Fix compilation error on IRIX.
18639         * lib/strerrorname_np.c (strerrorname_np): Handle conflict between
18640         EDIRCORRUPTED and EFSCORRUPTED.
18641         * tests/test-strerrorname_np.c (main): Likewise.
18643 2021-12-24  Bruno Haible  <bruno@clisp.org>
18645         hamt: Fix compilation error on NetBSD 7.
18646         * lib/hamt.h (GL_HAMT_THREAD_SAFE): Define to 0 if the compiler is a
18647         GCC version < 4.9.
18649 2021-12-24  Bruno Haible  <bruno@clisp.org>
18651         search: Fix compilation errors with SunPRO C++ on Solaris 10.
18652         * lib/search.in.h (_gl_lsearch_compar_fn): New type.
18653         (lfind, lsearch): Use it.
18655 2021-12-24  Bruno Haible  <bruno@clisp.org>
18657         qsort_r: Fix compilation error with SunPRO C++ on Solaris 10.
18658         * lib/stdlib.in.h (_gl_qsort_r_compar_fn): New type.
18659         (qsort_r): Use it.
18660         * tests/test-stdlib-c++.cc (qsort_r): Don't test with SunPRO C++.
18662 2021-12-24  Bruno Haible  <bruno@clisp.org>
18664         threads-h tests: Avoid clang warnings.
18665         * tests/test-threads.c (main): Add 'default' to switch statements.
18667 2021-12-24  Bruno Haible  <bruno@clisp.org>
18669         doc: Small updates.
18670         * doc/glibc-functions/ptsname_r.texi: Update info regarding Mac OS X.
18671         * doc/posix-functions/getlogin_r.texi: Update info regarding FreeBSD.
18673 2021-12-22  Paul Eggert  <eggert@cs.ucla.edu>
18675         libgmp: omit redundant 'mkdir -p .'
18676         * modules/libgmp: Mark $(MKDIR) with @NMD@; this was missed
18677         in a previous pass.
18679         maint: omit unnecessary ‘rm -f $@-t $@’
18680         * modules/alloca-opt, modules/argz, modules/arpa_inet:
18681         * modules/assert-h, modules/byteswap, modules/configmake:
18682         * modules/ctype, modules/dirent, modules/dynarray, modules/errno:
18683         * modules/execinfo, modules/fcntl-h, modules/float:
18684         * modules/fnmatch-h, modules/getopt-posix, modules/glob-h:
18685         * modules/iconv-h, modules/ieee754-h, modules/inttypes-incomplete:
18686         * modules/langinfo, modules/libtextstyle-optional:
18687         * modules/limits-h, modules/langinfo, modules/libgmp, modules/limits-h:
18688         * modules/locale, modules/malloc-h, modules/math, modules/monetary:
18689         * modules/net_if, modules/netdb, modules/netinet_in:
18690         * modules/openmp-init, modules/poll-h, modules/posix-shell:
18691         * modules/posix_spawnp-tests, modules/pthread-h, modules/pty:
18692         * modules/sched, modules/scratch_buffer, modules/search:
18693         * modules/selinux-h, modules/signal-h, modules/sigsegv:
18694         * modules/snippet/link-warning, modules/spawn, modules/stdalign:
18695         * modules/stdarg, modules/stdbool, modules/stddef, modules/stdint:
18696         * modules/stdio, modules/stdlib, modules/stdnoreturn:
18697         * modules/string, modules/strings, modules/sys_file:
18698         * modules/sys_ioctl, modules/sys_random, modules/sys_resource:
18699         * modules/sys_select, modules/sys_socket, modules/sys_stat:
18700         * modules/sys_time, modules/sys_times, modules/sys_types:
18701         * modules/sys_uio, modules/sys_utsname, modules/sys_wait:
18702         * modules/sysexits, modules/termios, modules/threads-h:
18703         * modules/time, modules/uchar, modules/unicase/base:
18704         * modules/unicase/special-casing, modules/uniconv/base:
18705         * modules/unictype/base, modules/unigbrk/base, modules/unilbrk/base:
18706         * modules/uniname/base, modules/uninorm/base, modules/unistd:
18707         * modules/unistdio/base, modules/unistr/base, modules/unitypes:
18708         * modules/uniwbrk/base, modules/uniwidth/base, modules/utime-h:
18709         * modules/wchar, modules/wctype-h:
18710         Don’t bother to do a ‘rm -f $@-t $@’ at the start of recipes that
18711         create .h and similar files.  This is a revenant of a style in
18712         which the files were created read-only.  Also, consistently use
18713         use plain ‘mv $@-t $@’ afterwards, instead of usually using
18714         ‘mv -f’ but sometimes plain ‘mv’.
18716 2021-12-21  Paul Eggert  <eggert@cs.ucla.edu>
18718         maint: fix __clang_major__ misspellings
18719         The intprops.h typo fix should fix a bug in Emacs on Debian testing
18720         with clang <https://bugs.gnu.org/52711>.
18721         * lib/asyncsafe-spin.c, lib/intprops.h, lib/pthread-spin.c:
18722         Fix some misspellings of ‘__clang_major__’.
18723         I left one misspelling alone, in lib/cdefs.h,
18724         and instead reported that bug upstream here:
18725         https://sourceware.org/pipermail/libc-alpha/2021-December/134512.html
18727 2021-12-21  Bruno Haible  <bruno@clisp.org>
18729         get_ppid_of, get_progname_of: Fix runtime error on Mac OS X < 10.5.
18730         Reported by Evan Miller <emmiller@gmail.com>
18731         <https://lists.gnu.org/archive/html/bug-gnulib/2021-12/msg00081.html>.
18732         * lib/get_ppid_of.c (proc_pidinfo): Declare with WEAK_IMPORT_ATTRIBUTE.
18733         (get_ppid_of): Test whether the symbol declared weak evaluates to
18734         non-NULL before invoking it.
18735         * lib/get_progname_of (proc_pidinfo): Declare with
18736         WEAK_IMPORT_ATTRIBUTE.
18737         (get_progname_of): Test whether the symbol declared weak evaluates to
18738         non-NULL before invoking it.
18740 2021-12-21  Paul Eggert  <eggert@cs.ucla.edu>
18742         Move AM_V_GEN to recipe start
18743         This is especially needed when building Emacs, as it uses
18744         ‘AM_V_GEN=@$(info GEN $@)', which means the GEN line is output by
18745         GNU make just before the recipe runs, regardless of where AM_V_GEN
18746         appears in the recipe.  And it’s also good practice even if the
18747         default Automake ‘AM_V_GEN=@echo GEN $@;’ is used, as it’s better
18748         to output the GEN line consistently at the start of every recipe,
18749         even if this precedes a preparatory command that almost always
18750         works silently.
18751         * modules/arpa_inet, modules/dynarray, modules/net_if:
18752         * modules/netinet_in, modules/scratch_buffer, modules/selinux-h:
18753         * modules/sys_file, modules/sys_ioctl, modules/sys_random:
18754         * modules/sys_resource, modules/sys_select, modules/sys_socket:
18755         * modules/sys_stat, modules/sys_time, modules/sys_times:
18756         * modules/sys_types, modules/sys_uio, modules/sys_utsname:
18757         * modules/sys_wait, modules/unicase/special-casing, top/maint.mk:
18758         Use AM_V_GEN only at the start of each recipe.
18760 2021-12-21  Bruno Haible  <bruno@clisp.org>
18762         c-xvasprintf: Fix declarations (regression 2021-08-07).
18763         * lib/c-xvasprintf.h (c_xasprintf, c_xvasprintf): Remove
18764         _GL_ATTRIBUTE_RETURNS_NONNULL attribute.
18766 2021-12-21  Bruno Haible  <bruno@clisp.org>
18768         snippet/warn-on-use: Fix compilation error in C++ mode on OpenBSD 7.0.
18769         * lib/warn-on-use.h (_GL_WARN_ON_USE): In C++ mode, declare function
18770         with "C" linkage.
18772 2021-12-21  Bruno Haible  <bruno@clisp.org>
18774         Optimize redundant 'mkdir -p .' invocations.
18775         Reported by Paul Eggert.
18776         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
18777         Eliminate @NMD@ tokens.
18778         * modules/alloca-opt (Makefile.am): Prefix the "$(MKDIR_P) '%reldir%'"
18779         line with @NMD@.
18780         * modules/argz (Makefile.am): Likewise.
18781         * modules/assert-h (Makefile.am): Likewise.
18782         * modules/byteswap (Makefile.am): Likewise.
18783         * modules/configmake (Makefile.am): Likewise.
18784         * modules/ctype (Makefile.am): Likewise.
18785         * modules/dirent (Makefile.am): Likewise.
18786         * modules/errno (Makefile.am): Likewise.
18787         * modules/execinfo (Makefile.am): Likewise.
18788         * modules/fcntl-h (Makefile.am): Likewise.
18789         * modules/float (Makefile.am): Likewise.
18790         * modules/fnmatch-h (Makefile.am): Likewise.
18791         * modules/getopt-posix (Makefile.am): Likewise.
18792         * modules/glob-h (Makefile.am): Likewise.
18793         * modules/iconv-h (Makefile.am): Likewise.
18794         * modules/ieee754-h (Makefile.am): Likewise.
18795         * modules/inttypes-incomplete (Makefile.am): Likewise.
18796         * modules/langinfo (Makefile.am): Likewise.
18797         * modules/libtextstyle-optional (Makefile.am): Likewise.
18798         * modules/limits-h (Makefile.am): Likewise.
18799         * modules/locale (Makefile.am): Likewise.
18800         * modules/malloc-h (Makefile.am): Likewise.
18801         * modules/math (Makefile.am): Likewise.
18802         * modules/monetary (Makefile.am): Likewise.
18803         * modules/netdb (Makefile.am): Likewise.
18804         * modules/openmp-init (Makefile.am): Likewise.
18805         * modules/poll-h (Makefile.am): Likewise.
18806         * modules/posix-shell (Makefile.am): Likewise.
18807         * modules/pthread-h (Makefile.am): Likewise.
18808         * modules/pty (Makefile.am): Likewise.
18809         * modules/sched (Makefile.am): Likewise.
18810         * modules/search (Makefile.am): Likewise.
18811         * modules/signal-h (Makefile.am): Likewise.
18812         * modules/sigsegv (Makefile.am): Likewise.
18813         * modules/snippet/link-warning (Makefile.am): Likewise.
18814         * modules/spawn (Makefile.am): Likewise.
18815         * modules/stdalign (Makefile.am): Likewise.
18816         * modules/stdarg (Makefile.am): Likewise.
18817         * modules/stdbool (Makefile.am): Likewise.
18818         * modules/stddef (Makefile.am): Likewise.
18819         * modules/stdint (Makefile.am): Likewise.
18820         * modules/stdio (Makefile.am): Likewise.
18821         * modules/stdlib (Makefile.am): Likewise.
18822         * modules/stdnoreturn (Makefile.am): Likewise.
18823         * modules/string (Makefile.am): Likewise.
18824         * modules/strings (Makefile.am): Likewise.
18825         * modules/sysexits (Makefile.am): Likewise.
18826         * modules/termios (Makefile.am): Likewise.
18827         * modules/threads-h (Makefile.am): Likewise.
18828         * modules/time (Makefile.am): Likewise.
18829         * modules/uchar (Makefile.am): Likewise.
18830         * modules/unicase/base (Makefile.am): Likewise.
18831         * modules/uniconv/base (Makefile.am): Likewise.
18832         * modules/unictype/base (Makefile.am): Likewise.
18833         * modules/unigbrk/base (Makefile.am): Likewise.
18834         * modules/unilbrk/base (Makefile.am): Likewise.
18835         * modules/uniname/base (Makefile.am): Likewise.
18836         * modules/uninorm/base (Makefile.am): Likewise.
18837         * modules/unistd (Makefile.am): Likewise.
18838         * modules/unistdio/base (Makefile.am): Likewise.
18839         * modules/unistr/base (Makefile.am): Likewise.
18840         * modules/unitypes (Makefile.am): Likewise.
18841         * modules/uniwbrk/base (Makefile.am): Likewise.
18842         * modules/uniwidth/base (Makefile.am): Likewise.
18843         * modules/utime-h (Makefile.am): Likewise.
18844         * modules/wchar (Makefile.am): Likewise.
18845         * modules/wctype-h (Makefile.am): Likewise.
18847 2021-12-19  Bruno Haible  <bruno@clisp.org>
18849         non-recursive-gnulib-prefix-hack: Deprecate module.
18850         * modules/non-recursive-gnulib-prefix-hack (Status, Notice): New
18851         sections.
18853 2021-12-19  Bruno Haible  <bruno@clisp.org>
18855         gnulib-tool: Don't insist on ACLOCAL_AMFLAGS.
18856         Reported by Bjarni Ingi Gislason <bjarniig@rhi.hi.is> in
18857         <https://lists.gnu.org/archive/html/bug-gnulib/2021-12/msg00112.html>.
18858         * gnulib-tool (func_import): Mention an AC_CONFIG_MACRO_DIRS invocation
18859         as an alternative to augmenting ACLOCAL_AMFLAGS.
18860         (--import, --add-import, --remove-import, --update): To find the m4
18861         directories, look also for AC_CONFIG_MACRO_DIR and AC_CONFIG_MACRO_DIRS
18862         invocations in configure.ac.
18864 2021-12-18  Bruno Haible  <bruno@clisp.org>
18866         nstrftime: Update meta info.
18867         * config/srclist.txt: Fix typo from 2017-07-23.
18869 2021-12-18  Bruno Haible  <bruno@clisp.org>
18871         stdint: Fix handling of limits.h (regression 2021-12-16).
18872         * modules/stdint (configure.ac): Revert last change.
18873         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
18874         If --gnu-make is used, assume that AC_SUBSTed variables for conditionals
18875         are constructed by appending the suffix '_CONDITION'.
18877 2021-12-18  Paul Eggert  <eggert@cs.ucla.edu>
18879         nstrftime: simplify by using libc-config.h.
18880         * lib/nstrftime.c [!_LIBC]: Include libc-config.h
18881         instead of config.h.
18882         (iso_week_days): Simplify via libc-config.h’s __inline.
18883         (my_strftime): Simplify via libc-config.h’s libc_hidden_def.
18884         * modules/nstrftime (Depends-on): Add libc-config.
18886 2021-12-18  Bruno Haible  <bruno@clisp.org>
18888         libtextstyle-optional: Fix generation of textstyle.h (regr. 2021-12-15).
18889         * m4/libtextstyle-optional.m4 (gl_LIBTEXTSTYLE_OPTIONAL): Invoke
18890         gl_CONDITIONAL_HEADER.
18892 2021-12-18  Bruno Haible  <bruno@clisp.org>
18894         Fix support for --gnu-make in tests (regression 2021-12-15).
18895         * gnulib-tool (func_emit_tests_Makefile_am): When producing output for
18896         GNU make, eliminate %reldir% tokens.
18898 2021-12-17  Bruno Haible  <bruno@clisp.org>
18900         getopt-posix: Fix build on AIX (regression 2021-12-15).
18901         * modules/getopt-posix (configure.ac): Arrange to generate
18902         getopt-cdefs.h.
18903         (Makefile.am): Separate the rules for getopt.h and getopt-cdefs.h.
18905 2021-12-16  Paul Eggert  <eggert@cs.ucla.edu>
18907         getopt-posix: omit unnessary building of getopt.h
18908         * modules/getopt-posix (getopt.h, getopt-cdefs.h):
18909         Build only if GL_GENERATE_GETOPT_H.
18911         stdint: omit duplicate gl_CONFIGURE_HEADER calls
18912         * modules/stdint (configure.ac): Omit
18913         ‘gl_CONDITIONAL_HEADER([limits.h])’, since stdint depends on
18914         limits-h and doing gl_CONDITIONAL_HEADER twice can result in
18915         ‘configure’ failing with “*** GL_GENERATE_LIMITS_H is not set
18916         correctly”.
18918 2021-12-15  Bruno Haible  <bruno@clisp.org>
18920         automake-subdir support: Support the libunistring modules.
18921         * m4/libunistring-base.m4 (gl_LIBUNISTRING_LIBHEADER): Use the value of
18922         the gl_source_base_prefix variable.
18924 2021-12-15  Bruno Haible  <bruno@clisp.org>
18926         automake-subdir support: Support arbitrary --source-base value.
18927         Reported by Marc Nieper-Wißkirchen in
18928         <https://lists.gnu.org/archive/html/bug-gnulib/2021-12/msg00066.html>.
18929         * build-aux/prefix-gnulib-mk ($canon_prefix): New variable.
18930         (prefix): Initialize it.
18931         (prefix_assignment): Use it.
18933 2021-12-15  Bruno Haible  <bruno@clisp.org>
18935         automake-subdir support: Look for 'subdir-objects' also in configure.ac.
18936         * gnulib-tool: Look for the automake options also in the first argument
18937         of the AM_INIT_AUTOMAKE invocation in configure.ac.
18939 2021-12-15  Bruno Haible  <bruno@clisp.org>
18941         Add simple examples.
18942         * examples: New directory.
18944 2021-12-15  Bruno Haible  <bruno@clisp.org>
18946         Accommodate non-recursive Automake in a less hacky way.
18947         * gnulib-tool: New option --automake-subdir.
18948         (automake_subdir): New variable.
18949         (func_emit_initmacro_end): Add a second argument. Use it to prefix each
18950         object file name in *_LIBOBJS and *_LTLIBOBJS.
18951         (func_emit_shellvars_init): New function.
18952         (func_import): Add support for --automake-subdir. Invoke
18953         prefix-gnulib-mk. Update calls to func_emit_initmacro_end. Call
18954         func_emit_shellvars_init.
18955         (func_create_testdir): Update calls to func_emit_initmacro_end. Call
18956         func_emit_shellvars_init.
18957         * m4/gnulib-tool.m4 (gl_AUTOMAKE_SUBDIR): New macro.
18958         * m4/gnulib-common.m4 (gl_CONDITIONAL_HEADER): Use the value of the
18959         gl_source_base_prefix variable.
18960         * build-aux/prefix-gnulib-mk: New options --from-gnulib-tool, --prefix.
18961         (contents_of_file): Renamed from contents.
18962         (contents_of_stdin): New function.
18963         (process): Inline and remove function.
18964         * doc/gnulib-tool.texi (Non-recursive make): New section.
18966 2021-12-15  Bruno Haible  <bruno@clisp.org>
18968         Move .h file names out of the *.m4 files.
18969         This is useful because Autoconf macros defined in *.m4 files can be
18970         AC_REQUIREd. In the configure file, they are then expanded before
18971         gl_INIT, i.e. at a place where it is not known whether they are required
18972         for the lib/ or for the tests/ directory (or both).
18973         * m4/gnulib-common.m4 (gl_CONDITIONAL_HEADER): New macro.
18974         * m4/alloca.m4 (gl_FUNC_ALLOCA): Set GL_GENERATE_ALLOCA_H instead of
18975         ALLOCA_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
18976         * modules/alloca-opt (configure.ac): Invoke gl_CONDITIONAL_HEADER.
18977         * m4/argz.m4 (gl_FUNC_ARGZ): Set GL_GENERATE_ARGZ_H instead of ARGZ_H.
18978         Drop AC_SUBST and AM_CONDITIONAL invocations.
18979         * modules/argz (configure.ac): Invoke gl_CONDITIONAL_HEADER.
18980         * m4/assert_h.m4 (gl_ASSERT_H): Set GL_GENERATE_ASSERT_H instead of
18981         ASSERT_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
18982         * modules/assert-h (configure.ac): Invoke gl_CONDITIONAL_HEADER.
18983         * m4/byteswap.m4 (gl_BYTESWAP): Set GL_GENERATE_BYTESWAP_H instead of
18984         BYTESWAP_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
18985         * modules/byteswap (configure.ac): Invoke gl_CONDITIONAL_HEADER.
18986         * m4/errno_h.m4 (gl_HEADER_ERRNO_H): Set GL_GENERATE_ERRNO_H instead of
18987         ERRNO_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
18988         (gl_REPLACE_ERRNO_VALUE): Update.
18989         * m4/perror.m4 (gl_FUNC_PERROR): Update.
18990         * m4/strerror.m4 (gl_FUNC_STRERROR): Update.
18991         * m4/strerror_r.m4 (gl_FUNC_STRERROR_R, gl_FUNC_STRERROR_R_WORKS):
18992         Update.
18993         * modules/errno (configure.ac): Invoke gl_CONDITIONAL_HEADER.
18994         * m4/execinfo.m4 (gl_EXECINFO_H): Set GL_GENERATE_EXECINFO_H instead of
18995         EXECINFO_H. Drop AC_SUBST and AM_CONDITIONAL invocations. Drop AC_LIBOBJ
18996         invocation.
18997         * modules/execinfo (configure.ac): Invoke gl_CONDITIONAL_HEADER and
18998         AC_LIBOBJ.
18999         * m4/float_h.m4 (gl_FLOAT_H): Set GL_GENERATE_FLOAT_H instead of
19000         FLOAT_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
19001         * modules/float (configure.ac): Invoke gl_CONDITIONAL_HEADER.
19002         * m4/fnmatch_h.m4 (gl_FNMATCH_H, gl_REPLACE_FNMATCH_H): Set
19003         GL_GENERATE_FNMATCH_H instead of FNMATCH_H. Drop AC_SUBST and
19004         AM_CONDITIONAL invocations.
19005         * modules/fnmatch-h (configure.ac): Invoke gl_CONDITIONAL_HEADER.
19006         * modules/fnmatch (configure.ac): Likewise.
19007         * m4/getopt.m4 (gl_FUNC_GETOPT_POSIX, gl_GETOPT_SUBSTITUTE_HEADER): Set
19008         GL_GENERATE_GETOPT_H instead of GETOPT_H. Set GL_GENERATE_GETOPT_CDEFS_H
19009         instead of GETOPT_CDEFS_H. Drop AC_SUBST invocations.
19010         * modules/getopt-posix (configure.ac): Invoke gl_CONDITIONAL_HEADER.
19011         * m4/glob_h.m4 (gl_GLOB_H, gl_REPLACE_GLOB_H): Set GL_GENERATE_GLOB_H
19012         instead of GLOB_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
19013         * modules/glob-h (configure.ac): Invoke gl_CONDITIONAL_HEADER.
19014         * modules/glob (configure.ac): Likewise.
19015         * m4/iconv_h.m4 (gl_ICONV_H_DEFAULTS, gl_REPLACE_ICONV_H): Set
19016         GL_GENERATE_ICONV_H instead of ICONV_H. Drop AC_SUBST and AM_CONDITIONAL
19017         invocations.
19018         (gl_ICONV_H): Update.
19019         * modules/iconv-h (configure.ac): Invoke gl_CONDITIONAL_HEADER.
19020         * modules/iconv_open (configure.ac): Likewise.
19021         * m4/ieee754-h.m4 (gl_IEEE754_H): Set GL_GENERATE_IEEE754_H instead of
19022         IEEE754_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
19023         * modules/ieee754-h (configure.ac): Invoke gl_CONDITIONAL_HEADER.
19024         * m4/libgmp.m4 (gl_LIBGMP): Set GL_GENERATE_GMP_H instead of GMP_H. Drop
19025         AC_SUBST invocation.
19026         * modules/libgmp (configure.ac): Invoke gl_CONDITIONAL_HEADER.
19027         (Makefile.am): Use GL_GENERATE_GMP_H.
19028         * m4/libtextstyle-optional.m4 (gl_LIBTEXTSTYLE_OPTIONAL): Set
19029         GL_GENERATE_TEXTSTYLE_H instead of TEXTSTYLE_H. Drop AC_SUBST and
19030         AM_CONDITIONAL invocations.
19031         * modules/libtextstyle-optional (configure.ac): Invoke
19032         gl_CONDITIONAL_HEADER.
19033         * m4/limits-h.m4 (gl_LIMITS_H, gl_REPLACE_LIMITS_H): Set
19034         GL_GENERATE_LIMITS_H instead of LIMITS_H. Drop AC_SUBST and
19035         AM_CONDITIONAL invocations.
19036         * modules/limits-h (configure.ac): Invoke gl_CONDITIONAL_HEADER.
19037         * m4/monetary_h.m4 (gl_MONETARY_H): Set GL_GENERATE_MONETARY_H instead
19038         of MONETARY_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
19039         * modules/monetary (configure.ac): Invoke gl_CONDITIONAL_HEADER.
19040         * m4/net_if_h.m4 (gl_HEADER_NET_IF): Set GL_GENERATE_NET_IF_H instead of
19041         NET_IF_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
19042         * modules/net_if (configure.ac): Invoke gl_CONDITIONAL_HEADER.
19043         * m4/netinet_in_h.m4 (gl_HEADER_NETINET_IN): Set
19044         GL_GENERATE_NETINET_IN_H instead of NETINET_IN_H. Drop AC_SUBST and
19045         AM_CONDITIONAL invocations.
19046         * modules/netinet_in (configure.ac): Invoke gl_CONDITIONAL_HEADER.
19047         * m4/selinux-context-h.m4 (gl_HEADERS_SELINUX_CONTEXT_H): Set
19048         GL_GENERATE_SELINUX_CONTEXT_H instead of SELINUX_CONTEXT_H. Drop
19049         AC_SUBST and AM_CONDITIONAL invocations.
19050         * m4/selinux-label-h.m4 (gl_HEADERS_SELINUX_LABEL_H): Set
19051         GL_GENERATE_SELINUX_LABEL_H instead of SELINUX_LABEL_H. Drop AC_SUBST
19052         and AM_CONDITIONAL invocations.
19053         * modules/selinux-h (configure.ac): Invoke gl_CONDITIONAL_HEADER.
19054         * m4/stdalign.m4 (gl_STDALIGN_H): Set GL_GENERATE_STDALIGN_H instead of
19055         STDALIGN_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
19056         * modules/stdalign (configure.ac): Invoke gl_CONDITIONAL_HEADER.
19057         * m4/stdarg.m4 (gl_STDARG_H): Set GL_GENERATE_STDARG_H instead of
19058         STDARG_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
19059         * modules/stdarg (configure.ac): Invoke gl_CONDITIONAL_HEADER.
19060         * m4/stdbool.m4 (gl_STDBOOL_H): Renamed from AM_STDBOOL_H. Set
19061         GL_GENERATE_STDBOOL_H instead of STDBOOL_H. Drop AC_SUBST and
19062         AM_CONDITIONAL invocations.
19063         * m4/parse-datetime.m4 (gl_PARSE_DATETIME): Don't require AM_STDBOOL_H.
19064         * modules/stdbool (configure.ac): Invoke gl_STDBOOL_H instead of
19065         AM_STDBOOL_H. Invoke gl_CONDITIONAL_HEADER.
19066         * m4/stddef_h.m4 (gl_STDDEF_H): Set GL_GENERATE_STDDEF_H instead of
19067         STDDEF_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
19068         * modules/stddef (configure.ac): Invoke gl_CONDITIONAL_HEADER.
19069         * m4/stdint.m4 (gl_STDINT_H): Set GL_GENERATE_STDINT_H instead of
19070         STDINT_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
19071         * m4/inttypes.m4 (gl_INTTYPES_PRI_SCN): Update.
19072         * modules/stdint (configure.ac): Invoke gl_CONDITIONAL_HEADER.
19073         * m4/stdnoreturn.m4 (gl_STDNORETURN_H): Set GL_GENERATE_STDNORETURN_H
19074         instead of STDNORETURN_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
19075         * modules/stdnoreturn (configure.ac): Invoke gl_CONDITIONAL_HEADER.
19076         * m4/sys_socket_h.m4 (gl_SYS_SOCKET_H): Set GL_GENERATE_SYS_SOCKET_H
19077         instead of SYS_SOCKET_H.
19078         * m4/sysexits.m4 (gl_SYSEXITS): Set GL_GENERATE_SYSEXITS_H instead of
19079         SYSEXITS_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
19080         * modules/sysexits (configure.ac): Invoke gl_CONDITIONAL_HEADER.
19081         * modules/sigsegv (configure.ac): Set GL_GENERATE_SIGSEGV_H instead of
19082         SIGSEGV_H. Drop AC_SUBST and AM_CONDITIONAL invocations. Invoke
19083         gl_CONDITIONAL_HEADER.
19085 2021-12-15  Bruno Haible  <bruno@clisp.org>
19087         Fix creation of build directories with non-recursive-gnulib-prefix-hack.
19088         This is necessary for executing "make" in a VPATH build of a package
19089         that uses prefix-gnulib-mk and a module such as alloca-opt.
19090         * modules/alloca-opt (Makefile.am): Before generating the .h-t file,
19091         ensure that the directory in which we want to create it exists.
19092         (configure.ac): Invoke AC_PROG_MKDIR_P.
19093         * modules/argz: Likewise.
19094         * modules/arpa_inet: Likewise.
19095         * modules/assert-h: Likewise.
19096         * modules/byteswap: Likewise.
19097         * modules/configmake: Likewise.
19098         * modules/ctype: Likewise.
19099         * modules/dirent: Likewise.
19100         * modules/dynarray: Likewise.
19101         * modules/errno: Likewise.
19102         * modules/execinfo: Likewise.
19103         * modules/fcntl-h: Likewise.
19104         * modules/float: Likewise.
19105         * modules/fnmatch-h: Likewise.
19106         * modules/getopt-posix: Likewise.
19107         * modules/glob-h: Likewise.
19108         * modules/iconv-h: Likewise.
19109         * modules/ieee754-h: Likewise.
19110         * modules/inttypes-incomplete: Likewise.
19111         * modules/langinfo: Likewise.
19112         * modules/libgmp: Likewise.
19113         * modules/libtextstyle-optional: Likewise.
19114         * modules/limits-h: Likewise.
19115         * modules/locale: Likewise.
19116         * modules/malloc-h: Likewise.
19117         * modules/math: Likewise.
19118         * modules/monetary: Likewise.
19119         * modules/net_if: Likewise.
19120         * modules/netdb: Likewise.
19121         * modules/netinet_in: Likewise.
19122         * modules/openmp-init: Likewise.
19123         * modules/poll-h: Likewise.
19124         * modules/posix-shell: Likewise.
19125         * modules/pthread-h: Likewise.
19126         * modules/pty: Likewise.
19127         * modules/sched: Likewise.
19128         * modules/scratch_buffer: Likewise.
19129         * modules/search: Likewise.
19130         * modules/selinux-h: Likewise.
19131         * modules/signal-h: Likewise.
19132         * modules/sigsegv: Likewise.
19133         * modules/snippet/link-warning: Likewise.
19134         * modules/spawn: Likewise.
19135         * modules/stdalign: Likewise.
19136         * modules/stdarg: Likewise.
19137         * modules/stdbool: Likewise.
19138         * modules/stddef: Likewise.
19139         * modules/stdint: Likewise.
19140         * modules/stdio: Likewise.
19141         * modules/stdlib: Likewise.
19142         * modules/stdnoreturn: Likewise.
19143         * modules/string: Likewise.
19144         * modules/strings: Likewise.
19145         * modules/sys_file: Likewise.
19146         * modules/sys_ioctl: Likewise.
19147         * modules/sys_random: Likewise.
19148         * modules/sys_resource: Likewise.
19149         * modules/sys_select: Likewise.
19150         * modules/sys_socket: Likewise.
19151         * modules/sys_stat: Likewise.
19152         * modules/sys_time: Likewise.
19153         * modules/sys_times: Likewise.
19154         * modules/sys_types: Likewise.
19155         * modules/sys_uio: Likewise.
19156         * modules/sys_utsname: Likewise.
19157         * modules/sys_wait: Likewise.
19158         * modules/sysexits: Likewise.
19159         * modules/termios: Likewise.
19160         * modules/threads-h: Likewise.
19161         * modules/time: Likewise.
19162         * modules/uchar: Likewise.
19163         * modules/unicase/base: Likewise.
19164         * modules/unicase/special-casing: Likewise.
19165         * modules/uniconv/base: Likewise.
19166         * modules/unictype/base: Likewise.
19167         * modules/unigbrk/base: Likewise.
19168         * modules/unilbrk/base: Likewise.
19169         * modules/uniname/base: Likewise.
19170         * modules/uninorm/base: Likewise.
19171         * modules/unistd: Likewise.
19172         * modules/unistdio/base: Likewise.
19173         * modules/unistr/base: Likewise.
19174         * modules/unitypes: Likewise.
19175         * modules/uniwbrk/base: Likewise.
19176         * modules/uniwidth/base: Likewise.
19177         * modules/utime-h: Likewise.
19178         * modules/wchar: Likewise.
19179         * modules/wctype-h: Likewise.
19180         * gnulib-tool (func_emit_lib_Makefile_am): When producing output for
19181         GNU make, eliminate %reldir% tokens.
19183 2021-12-15  Bruno Haible  <bruno@clisp.org>
19185         non-recursive-gnulib-prefix-hack: Remove obsolete code.
19186         * build-aux/prefix-gnulib-mk (prefix): Remove handling of t-$@ pattern.
19188 2021-12-15  Bruno Haible  <bruno@clisp.org>
19190         Indentation fix.
19191         * m4/include_next.m4 (gl_NEXT_HEADERS_INTERNAL): Correct indentation.
19193 2021-12-14  Paul Eggert  <eggert@cs.ucla.edu>
19195         renameatu: port to macOS tmpfs
19196         Problem reported by Sudhip Nashi (Bug#52193).
19197         * lib/renameatu.c (renameat2ish) [HAVE_RENAMEAT]: New function.
19198         (renameatu): Use the new function, to avoid a bug when
19199         renameatx_np fails with errno == ENOTSUP.  Don’t try to support
19200         RENAME_EXCHANGE; the old code didn’t work and nobody using using
19201         RENAME_EXCHANGE anyway.
19203 2021-12-12  Bruno Haible  <bruno@clisp.org>
19205         gnulib-tool: Try to support non-recursive-gnulib-prefix-hack with tests.
19206         * gnulib-tool (func_import): Synthesize an AC_CONFIG_LIBOBJ_DIR
19207         invocation.
19208         * m4/non-recursive-gnulib-prefix-hack.m4
19209         (gl_NON_RECURSIVE_GNULIB_PREFIX_HACK): Don't invoke
19210         AC_CONFIG_LIBOBJ_DIR.
19212 2021-12-12  Paul Eggert  <eggert@cs.ucla.edu>
19214         bootstrap: refactor for GNU tar
19215         * build-aux/bootstrap (gitignore_entries, insert_if_absent)
19216         (insert_vc_ignore, symlink_to_dir): Define these shell functions
19217         before including bootstrap.conf.  This is for GNU tar, whose
19218         bootstrap.conf uses symlink_to_dir.
19220 2021-12-12  Bruno Haible  <bruno@clisp.org>
19222         gnulib-tool: Support different basenames for the lib/,tests/ Makefiles.
19223         * gnulib-tool: New option --tests-makefile-name.
19224         (tests_makefile_name): New variable.
19225         (func_import): Add support for --tests-makefile-name. Replace local
19226         variable makefile_am with two local variables source_makefile_am,
19227         tests_makefile_am.
19228         * m4/gnulib-tool.m4 (gl_TESTS_MAKEFILE_NAME): New macro.
19230 2021-12-11  Bruno Haible  <bruno@clisp.org>
19232         get_ppid_of, get_progname_of: Fix compilation error on Mac OS X < 10.5.
19233         Reported by Ryan Schmidt <gnulib@ryandesign.com> in
19234         <https://lists.gnu.org/archive/html/bug-gnulib/2021-12/msg00011.html>.
19235         * lib/get_ppid_of.c: Include AvailabilityMacros.h
19236         (get_ppid_of): Use MAC_OS_X_VERSION_MAX_ALLOWED and
19237         MAC_OS_X_VERSION_MIN_REQUIRED.
19238         * lib/get_progname_of: Include AvailabilityMacros.h
19239         (get_progname_of): Use MAC_OS_X_VERSION_MAX_ALLOWED and
19240         MAC_OS_X_VERSION_MIN_REQUIRED.
19242 2021-12-10  Paul Eggert  <eggert@cs.ucla.edu>
19244         backupfile: assume C99 decls
19245         * lib/backupfile.c: Use C99-style decls after statements.
19247         backupfile: prefer signed integers
19248         * lib/backupfile.c: Include ialloc.h instead of idx.h.
19249         Prefer idx_t to size_t where either will do.
19250         Use imalloc and irealloc instead of malloc and realloc.
19252         * modules/backupfile, modules/backup-rename (Depends-on):
19253         Depend on ialloc not idx.
19255         backupfile: fix numbered backups for XXX/
19256         * lib/backupfile.c (check_extension): Return a bool indicating
19257         whether the original extension was OK.  Caller changed.
19258         (numbered_backup): Require that FILELEN does not count
19259         trailing slashes after a non-slash, and don’t require
19260         that *BUF be null-terminated.  Caller changed.
19261         This fixes a bug where the numbered backup file name for X/ was
19262         incorrectly computed because the slash messed up the code
19263         looking for X.~1~, X.~2~, etc., and this caused numbered_backup
19264         to loop forever.  Also, check that check_extension doesn’t
19265         truncate a file name leading to an infloop.
19267 2021-12-07  Paul Eggert  <eggert@cs.ucla.edu>
19269         regex: pacify Coverity clean_state_log_if_needed
19270         Problem reported by Robbie Harwood in:
19271         https://lists.gnu.org/r/bug-gnulib/2021-12/msg00005.html
19272         * lib/regexec.c (clean_state_log_if_needed):
19273         Add a DEBUG_ASSERT; this both pacifies Coverity and
19274         will help to debug in case some other change mistakenly
19275         causes the assertion to become false.
19277 2021-12-07  Bruno Haible  <bruno@clisp.org>
19279         gettext-h: Optimize also for clang.
19280         * lib/gettext.h (pgettext_aux, npgettext_aux, dcpgettext_expr,
19281         dcnpgettext_expr): Inline also on clang.
19283 2021-12-06  Bruno Haible  <bruno@clisp.org>
19285         intprops: Break sync with glibc.
19286         * config/srclist.txt: Comment out intprops.h.
19288 2021-12-06  Paul Eggert  <eggert@cs.ucla.edu>
19290         intprops: streamline and get ready for Clang 14
19291         * lib/intprops.h (_GL_HAS_BUILTIN_ADD_OVERFLOW):
19292         Rely on __has_builtin first, since GCC didn’t introduce it until
19293         GCC 9 so we don’t need to special-case GCC first.
19294         (_GL_HAS_BUILTIN_ADD_OVERFLOW, _GL_HAS_BUILTIN_OVERFLOW_P):
19295         Look at __EDG__ rather than __ICC, since icc defines __EDG__ too.
19296         (_GL_HAS_BUILTIN_MUL_OVERFLOW): Define to 1 in Clang 14 and later,
19297         as a bug fix is scheduled for Clang 14.
19298         (_GL_HAS_BUILTIN_OVERFLOW_P): Do not bother to special-case
19299         __clang__, since __has_builtin should do the right thing anyway.
19301 2021-12-06  Bruno Haible  <bruno@clisp.org>
19303         intprops: Treat EDG-based compilers like Intel compilers.
19304         Reported by Ilya Kurdyukov <ilyakurdyukov@altlinux.org> in
19305         <https://lists.gnu.org/archive/html/bug-gnulib/2021-12/msg00028.html>.
19306         * lib/intprops.h (_GL_HAS_BUILTIN_OVERFLOW_P): Define to 0 on EDG-based
19307         compilers.
19309 2021-12-05  Bruno Haible  <bruno@clisp.org>
19311         sigsegv: Fix build on some more embedded CPUs.
19312         * m4/stack-direction.m4 (SV_STACK_DIRECTION): Assume the stack grows
19313         negative, when the GCC 11 sources say so.
19315 2021-11-30  Paul Eggert  <eggert@cs.ucla.edu>
19317         sys_random: port better to uClibc < 1.0.35
19318         Problem reported by Fabrice Fontaine in:
19319         https://lists.gnu.org/r/bug-gnulib/2021-11/msg00043.html
19320         * lib/sys_random.in.h [HAVE_SYS_RANDOM_H && !__GLIBC__ && __UCLIBC__]:
19321         Include <stddef.h>, in case this file is included before
19322         __UCLIBC__ is defined.
19324 2021-11-27  Paul Eggert  <eggert@cs.ucla.edu>
19326         gettext-h: document GNULIB_NO_VLA
19327         * doc/gnulib-readme.texi (C99 features avoided):
19328         Document GNULIB_NO_VLA.
19330         gettext-h: use VLA test similar to regex
19331         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Assuming
19332         GNULIB_NO_VLA, define if (defined __STDC_VERSION__ && 199901L <=
19333         __STDC_VERSION__ \ + && !defined __STDC_NO_VLA___), not if
19334         ((__GNUC__ >= 3 || __GNUG__ >= 2) && !defined __STRICT_ANSI__).
19335         This is more consistent with what the regex module does.
19336         * modules/gettext-h (Depends-on): Depend on vararrays, since
19337         lib/gettext.h uses __STDC_NO_VLA__.
19339         regex: port to tcc
19340         Problem reported by Benno Schulenberg in:
19341         https://lists.gnu.org/r/bug-gnulib/2021-11/msg00038.html
19342         * modules/regex (Depends-on): Depend on vararrays, since
19343         lib/regex.h uses __STDC_NO_VLA__.
19344         * modules/vararrays: Change license from LGPL to LGPLv2+.
19346 2021-11-25  Bernhard Voelker  <mail@bernhard-voelker.de>
19348         test-framework-sh: remove unsafe entries from PATH
19349         Running tests with '.' in the PATH may yield unspecified results,
19350         and is deemed unsafe per se.  This includes empty entries as well
19351         which are treated like a '.' entry as per POSIX.
19352         * tests/init.sh (setup_): Add snippet to remove relative and non-
19353         accessible entries from the PATH environment variable.
19355 2021-11-24  Paul Eggert  <eggert@cs.ucla.edu>
19357         regex: merge from glibc
19358         The main change here, imported from Glibc, is for the regex
19359         code to stop using nested functions when _LIBC is defined.
19360         The intent is for the result to be copied back to Glibc
19361         so that the two implementations can resync.
19362         * lib/regcomp.c (re_set_fastmap, seek_collating_symbol_entry)
19363         (lookup_collation_sequence_value, build_range_exp)
19364         (build_collating_symbol):
19365         * lib/regexec.c (acquire_init_state_context):
19366         Declare with __always_inline instead of with
19367         ‘inline __attribute__ ((always_inline))’.
19368         * lib/regexec.c (init_word_char):
19369         Move uint64_t comment to regex_internal.h.
19370         (parse_byte): Change multibyte-detecting arg from re_charset_t *
19371         to re_dfa_t const *.  All callers changed.
19372         (build_range_exp, build_collating_symbol) [!_LIBC]:
19373         Change signature to match _LIBC well enough so that the caller can
19374         be simplified to assume _LIBC.
19375         (parse_bracket_exp): Pull its nested functions
19376         seek_collating_symbol_entry, lookup_collation_sequence_value,
19377         build_range_exp, build_collating_symbol out to the top level,
19378         adding args to pass the information instead of having them access
19379         nonlocal vars.  Use types in local vars that do not assume glibc.
19380         * lib/regex_internal.h: Explain uint64_t etc. here.
19382 2021-11-23  Paul Eggert  <eggert@cs.ucla.edu>
19384         regex: assume RE_ENABLE_I18N
19385         These days there is no longer any need to port to platforms
19386         lacking iswctype etc., since Gnulib now has substitutes.
19387         * config/srclist.txt: Comment out regex_internal.c and
19388         regex_internal.h for now, since they no longer match glibc.
19389         The intent is to merge them again soon.
19390         * lib/regex_internal.h (RE_ENABLE_I18N): Remove.
19391         All uses changed to assume that RE_ENABLE_I18N is 1.
19392         * modules/regex (Depends-on): Add iswctype.
19394 2021-11-15  Paul Eggert  <eggert@cs.ucla.edu>
19396         lseek: port around macOS SEEK_HOLE glitch
19397         Problem reported by Sudhip Nashi (Bug#51857#47).
19398         * lib/lseek.c (rpl_lseek): Work around macOS lseek+SEEK_HOLE
19399         returning -1 with ENXIO if there are no holes before EOF,
19400         contrary to the macOS documentation.
19402         lseek: port around macOS SEEK_DATA glitch
19403         Problem reported by Sudhip Nashi (Bug#51857).
19404         * doc/posix-functions/lseek.texi (lseek): Mention macOS SEEK_DATA
19405         issue.
19406         * lib/lseek.c (rpl_lseek): Work around macOS portability glitch.
19407         * m4/lseek.m4 (gl_FUNC_LSEEK): Replace lseek on Darwin.
19408         * modules/lseek (Depends-on): Depend on msvc-nothrow
19409         and fstat only if needed.
19411 2021-11-11  Fabrice Fontaine  <fontaine.fabrice@gmail.com>  (tiny change)
19413         sigsegv: fix builds on microblazeel, or1k
19414         * m4/stack-direction.m4 (SV_STACK_DIRECTION):
19415         Assume it grows negative on microblaze* and or1k.
19417 2021-11-09  Paul Eggert  <eggert@cs.ucla.edu>
19419         exclude: yield proper errno on failure
19420         * lib/exclude.c (add_exclude_file): Do not assume that fclose
19421         preserves errno on success.
19423 2021-11-07  Paul Eggert  <eggert@cs.ucla.edu>
19425         regex: break regcomp.c link with glibc
19426         Problem reported by Bruno Haible in:
19427         https://lists.gnu.org/r/bug-gnulib/2021-11/msg00005.html
19428         * config/srclist.txt: Comment out regcomp.c for now.
19429         * lib/regcomp.c: Revert previous change.
19431 2021-10-24  Bruno Haible  <bruno@clisp.org>
19433         string: Avoid syntax error re strdup in string.in.h (regr. 2021-09-07).
19434         Reported by Jan Engelhardt <jengelh@inai.de>
19435         and by Arash Esbati <arash@gnu.org> via Andy Moreton in
19436         <https://lists.gnu.org/archive/html/bug-gnulib/2021-10/msg00058.html>.
19437         * lib/string.in.h (_GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_DEALLOC_FREE,
19438         _GL_ATTRIBUTE_MALLOC): Add fallback declarations, like in
19439         lib/stdlib.in.h.
19440         * lib/wchar.in.h (_GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_DEALLOC_FREE,
19441         _GL_ATTRIBUTE_MALLOC): Likewise.
19443 2021-10-19  Paul Eggert  <eggert@cs.ucla.edu>
19445         xalloc: new function xinmalloc
19446         * lib/xmalloc.c (xinmalloc): New function, which is like
19447         xnmalloc but for idx_t instead of size_t.
19449 2021-10-18  Paul Eggert  <eggert@cs.ucla.edu>
19451         regex: fix buffer read overrrun
19452         * lib/regexec.c (re_search_internal):
19453         Fix buffer read overrun reported by Benno Schulenberg in:
19454         https://lists.gnu.org/r/bug-gnulib/2021-10/msg00035.html
19456 2021-10-15  Paul Eggert  <eggert@cs.ucla.edu>
19458         nproc: port better to macOS 10.14
19459         * lib/nproc.c (num_processors_ignoring_omp)
19460         [HAVE_SYSCTL && !defined __GLIBC__ && defined HW_NCPU]:
19461         Do not use a const mib, as macOS 10.14 rejects this.
19463 2021-10-13  Paul Eggert  <eggert@cs.ucla.edu>
19465         sigsegv: fix quoting problem
19466         Problem reported for FreeBSD ports by Alexey Dokuchaev in:
19467         https://bugs.gnu.org/51144
19468         * m4/stack-direction.m4 (SV_STACK_DIRECTION): Quote brackets.
19470 2021-10-10  Paul Eggert  <eggert@cs.ucla.edu>
19472         nproc: port better to OpenBSD
19473         Problem reported by Omar Polo in:
19474         https://lists.gnu.org/r/emacs-devel/2021-10/msg00692.html
19475         * lib/nproc.c (num_processors_ignoring_omp): Prefer HW_NCPUONLINE
19476         to HW_NCPU, for OpenBSD.  Also, make mib const.
19478 2021-10-02  Paul Eggert  <eggert@cs.ucla.edu>
19480         timer-time: port better to OpenBSD 6.9
19481         * m4/timer_time.m4 (gl_TIMER_TIME): Also require timer_settime to
19482         be declared, as it exists in OpenBSD but always fails with ENOSYS.
19484         sys_select: port better to OpenBSD 6.9
19485         OpenBSD 6.9’s <sys/time.h> includes <sys/select.h> which then
19486         includes <signal.h>, which caused coreutils/lib/nproc.c compiles
19487         to fail with "/usr/include/signal.h:57: warning: 'struct
19488         sigaction' declared inside parameter list".  Fix this.
19489         * lib/sys_select.in.h [__OpenBSD__]: Simply delegate to the system
19490         header if being included from <sys/time.h>.
19492 2021-09-22  Bruno Haible  <bruno@clisp.org>
19494         doc: Fix outdated statement about Spanish collation.
19495         Reported by Dietmar Schindler in
19496         <https://lists.gnu.org/archive/html/bug-gnulib/2021-09/msg00095.html>.
19497         * doc/regex.texi (Collating Elements vs. Characters): Choose another
19498         example of a digraph with special collation.
19500         doc: Don't assume that the output format is TeX-based or info.
19501         Reported by Dietmar Schindler in
19502         <https://lists.gnu.org/archive/html/bug-gnulib/2021-09/msg00095.html>.
19503         * doc/regex.texi (Collating Elements vs. Characters): Assume a texinfo
19504         version that groks UTF-8 encoded ISO-8859-1 characters.
19506 2021-09-21  Paul Eggert  <eggert@cs.ucla.edu>
19508         regex: sync with glibc
19509         * config/srclist.txt: Uncomment-out posix/regex.c and related
19510         files, as the Gnulib versions have now been copied to glibc.
19511         * lib/intprops.h: Remove authorship comment, as per glibc guidelines.
19513 2021-09-20  Simon Josefsson  <simon@josefsson.org>
19515         maint: Avoid syntax-check failure for empty gnulib submodule.
19516         * top/maint.mk (gnulib_dir): Fall back to GNULIB_SRCDIR if
19517         submodule is not checked out.
19519 2021-09-19  Bruno Haible  <bruno@clisp.org>
19521         Relicense qemu.h under LGPLv2+.
19522         * tests/qemu.h: Change license header.
19524 2021-09-19  Bruno Haible  <bruno@clisp.org>
19526         ialloc: Update license headers after license change from 2021-08-29.
19527         * lib/ialloc.h: Update license header.
19528         * lib/ialloc.c: Likewise.
19530 2021-09-19  Bruno Haible  <bruno@clisp.org>
19532         Improve 'configure --help' output for crypto modules.
19533         * m4/af_alg.m4 (gl_AF_ALG): List the hash functions for which we use the
19534         Linux crypto. Also mention that we use it on files only.
19535         * m4/gl-openssl.m4 (gl_CRYPTO_CHECK): Use manual line breaking, not the
19536         line-filling style of AS_HELP_STRING. Show that --with-openssl takes an
19537         optional argument. List the hash functions for which we use the OpenSSL
19538         library. Don't mention --with-linux-crypto if the af_alg module is not
19539         in use. Mention that --with-linux-crypto applies only to the Linux
19540         kernel. Mention that it gets used only when available. Mention that it
19541         takes precedence only for files. In the error or warning, mention the
19542         pre-built package name that people can install.
19544 2021-09-18  Bruno Haible  <bruno@clisp.org>
19546         string, wchar: Don't require undefined m4 macros (regr. today).
19547         Reported by Colin Watson <cjwatson@debian.org> in
19548         <https://lists.gnu.org/archive/html/bug-gnulib/2021-09/msg00078.html>.
19549         * m4/string_h.m4 (gl_STRING_H_REQUIRE_DEFAULTS): Don't use m4_require
19550         directly. Instead, invoke gl_STDLIB_H_REQUIRE_DEFAULTS.
19551         * m4/wchar_h.m4 (gl_WCHAR_H_REQUIRE_DEFAULTS): Likewise.
19553 2021-09-18  Bruno Haible  <bruno@clisp.org>
19555         sm3-buffer tests: New module.
19556         * tests/test-sm3-buffer.c: Renamed from tests/test-sm3.c.
19557         * modules/crypto/sm3-buffer-tests: Renamed from
19558         modules/crypto/sm3-tests. Test tests/test-sm3-buffer.c instead of
19559         tests/test-sm3.c.
19561         sm3-buffer: New module.
19562         * lib/sm3-stream.c: New file, extracted from lib/sm3.c.
19563         * lib/sm3.c: Don't include stdlib.h, unlocked-io.h.
19564         (BLOCKSIZE, sm3_stream): Moved to sm3-stream.c.
19565         * lib/sm3.h: Tweak.
19566         * modules/crypto/sm3-buffer: New file, based on modules/crypto/sm3.
19567         * modules/crypto/sm3: Rewritten.
19569 2021-09-18  Bruno Haible  <bruno@clisp.org>
19571         sha512-buffer tests: New module.
19572         * tests/test-sha512-stream.c: Renamed from tests/test-sha512.c.
19573         * modules/crypto/sha512-buffer-tests: New file, based on
19574         modules/crypto/sha512-tests.
19575         * modules/crypto/sha512-tests: Remove tests that are now in
19576         modules/crypto/sha512-buffer-tests. Test tests/test-sha512-stream.c
19577         instead of tests/test-sha512.c.
19579         sha512: Clarify module to source relation.
19580         * lib/sha512-stream.c: New file, extracted from lib/sha512.c.
19581         * lib/sha512.c: Don't include stdlib.h, unlocked-io.h.
19582         (BLOCKSIZE, shaxxx_stream, sha512_stream, sha384_stream): Moved to
19583         sha512-stream.c.
19584         * lib/sha512.h: Tweak.
19585         * modules/crypto/sha512 (Files): Add lib/sha512-stream.c.
19586         (configure.ac): Don't define GL_COMPILE_CRYPTO_STREAM.
19587         (Makefile.am): Arrange to compile sha512-stream.c.
19588         (Link): Mention $(LIB_CRYPTO).
19590 2021-09-18  Bruno Haible  <bruno@clisp.org>
19592         sha256-buffer tests: New module.
19593         * tests/test-sha256-stream.c: Renamed from tests/test-sha256.c.
19594         * modules/crypto/sha256-buffer-tests: New file, based on
19595         modules/crypto/sha256-tests.
19596         * modules/crypto/sha256-tests: Remove tests that are now in
19597         modules/crypto/sha256-buffer-tests. Test tests/test-sha256-stream.c
19598         instead of tests/test-sha256.c.
19600         sha256: Clarify module to source relation.
19601         * lib/sha256-stream.c: New file, extracted from lib/sha256.c.
19602         * lib/sha256.c: Don't include stdlib.h, unlocked-io.h.
19603         (BLOCKSIZE, shaxxx_stream, sha256_stream, sha224_stream): Moved to
19604         sha256-stream.c.
19605         * lib/sha256.h: Tweak.
19606         * modules/crypto/sha256 (Files): Add lib/sha256-stream.c.
19607         (configure.ac): Don't define GL_COMPILE_CRYPTO_STREAM.
19608         (Makefile.am): Arrange to compile sha256-stream.c.
19609         (Link): Mention $(LIB_CRYPTO).
19611 2021-09-18  Bruno Haible  <bruno@clisp.org>
19613         sha1-buffer tests: New module.
19614         * tests/test-sha1-buffer.c: New file, based on tests/test-sha1.c.
19615         * tests/test-sha1-stream.c: Renamed from tests/test-sha1.c.
19616         (main): Remove sha1-buffer tests.
19617         * modules/crypto/sha1-buffer-tests: New file, based on
19618         modules/crypto/sha1-tests.
19619         * modules/crypto/sha1-tests: Remove tests that are now in
19620         modules/crypto/sha1-buffer-tests. Test tests/test-sha1-stream.c instead
19621         of tests/test-sha1.c.
19623         sha1: Clarify module to source relation.
19624         * lib/sha1-stream.c: New file, extracted from lib/sha1.c.
19625         * lib/sha1.c: Don't include stdlib.h, unlocked-io.h.
19626         (BLOCKSIZE, sha1_stream): Moved to sha1-stream.c.
19627         * lib/sha1.h: Correct indentation.
19628         * modules/crypto/sha1 (Files): Add lib/sha1-stream.c.
19629         (configure.ac): Don't define GL_COMPILE_CRYPTO_STREAM.
19630         (Makefile.am): Arrange to compile sha1-stream.c.
19631         (Link): Mention $(LIB_CRYPTO).
19633 2021-09-18  Bruno Haible  <bruno@clisp.org>
19635         md5-buffer tests: New module.
19636         * tests/test-md5-buffer.c: New file, based on tests/test-md5.c.
19637         * tests/test-md5-stream.c: Renamed from tests/test-md5.c.
19638         (main): Remove md5-buffer tests.
19639         * modules/crypto/md5-buffer-tests: New file, based on
19640         modules/crypto/md5-tests.
19641         * modules/crypto/md5-tests: Remove tests that are now in
19642         modules/crypto/md5-buffer-tests. Test tests/test-md5-stream.c instead
19643         of tests/test-md5.c.
19645         md5: Clarify module to source relation.
19646         * lib/md5-stream.c: New file, extracted from lib/md5.c.
19647         * lib/md5.c: Don't include stdlib.h, unlocked-io.h.
19648         (BLOCKSIZE, md5_stream): Moved to md5-stream.c.
19649         * lib/md5.h: Tweak.
19650         * modules/crypto/md5 (Files): Add lib/md5-stream.c.
19651         (configure.ac): Don't define GL_COMPILE_CRYPTO_STREAM.
19652         (Makefile.am): Arrange to compile md5-stream.c.
19653         (Link): Mention $(LIB_CRYPTO).
19655 2021-09-18  Bruno Haible  <bruno@clisp.org>
19657         md4-buffer tests: New module.
19658         * tests/test-md4-buffer.c: Renamed from tests/test-md4.c.
19659         * modules/crypto/md4-buffer-tests: Renamed from
19660         modules/crypto/md4-tests. Test tests/test-md4-buffer.c instead of
19661         tests/test-md4.c.
19663         md4-buffer: New module.
19664         * lib/md4-stream.c: New file, extracted from lib/md4.c.
19665         * lib/md4.c: Don't include stdlib.h, unlocked-io.h.
19666         (BLOCKSIZE, md4_stream): Moved to md4-stream.c.
19667         * lib/md4.h: Reorder declarations.
19668         * modules/crypto/md4-buffer: New file, based on modules/crypto/md4.
19669         * modules/crypto/md4: Rewritten.
19671 2021-09-18  Bruno Haible  <bruno@clisp.org>
19673         md2-buffer tests: New module.
19674         * tests/test-md2-buffer.c: Renamed from tests/test-md2.c.
19675         * modules/crypto/md2-buffer-tests: Renamed from
19676         modules/crypto/md2-tests. Test tests/test-md2-buffer.c instead of
19677         tests/test-md2.c.
19679         md2-buffer: New module.
19680         * lib/md2-stream.c: New file, extracted from lib/md2.c.
19681         * lib/md2.c: Don't include stdlib.h, unlocked-io.h.
19682         (BLOCKSIZE, md2_stream): Moved to md2-stream.c.
19683         * lib/md2.h: Reorder declarations.
19684         * modules/crypto/md2-buffer: New file, based on modules/crypto/md2.
19685         * modules/crypto/md2: Rewritten.
19687 2021-09-18  Bruno Haible  <bruno@clisp.org>
19689         string, wchar: Don't cause link errors for rpl_free (regr. 2021-09-07).
19690         Reported by Simon Josefsson in
19691         <https://lists.gnu.org/archive/html/bug-gnulib/2021-09/msg00042.html>.
19692         * lib/string.in.h (free, rpl_free): Consider GNULIB_FREE_POSIX variable.
19693         * lib/wchar.in.h (free, rpl_free): Likewise.
19694         * m4/string_h.m4 (gl_STRING_H_REQUIRE_DEFAULTS): Require module
19695         indicator variable initializations from the stdlib module.
19696         * m4/wchar_h.m4 (gl_WCHAR_H_REQUIRE_DEFAULTS): Likewise.
19697         * modules/string (Makefile.am): Substitute GNULIB_FREE_POSIX in string.h.
19698         * modules/wchar (Makefile.am): Substitute GNULIB_FREE_POSIX in wchar.h.
19700 2021-09-17  Bruno Haible  <bruno@clisp.org>
19702         threadlib: Avoid crashes in thread-related functions on Cygwin 3.2.0.
19703         Reported by Brian Inglis via Akim Demaille in
19704         <https://lists.gnu.org/archive/html/bug-gnulib/2021-09/msg00063.html>.
19705         * m4/threadlib.m4 (gl_WEAK_SYMBOLS): Force a "guessing no" result on
19706         Cygwin.
19708 2021-09-13  Bruno Haible  <bruno@clisp.org>
19710         simple-atomic: Port to Oracle Studio 12.6.
19711         * lib/simple-atomic.c (asm) [0x590 <= __SUNPRO_C && __STDC__]:
19712         #define to __asm.
19714 2021-09-13  Paul Eggert  <eggert@cs.ucla.edu>
19716         asyncsafe-spin: port to Oracle Studio 12.6 sparc
19717         Problem reported by Dennis Clarke via Eric Blake in:
19718         https://lists.gnu.org/r/bug-gnulib/2021-09/msg00056.html
19719         * lib/asyncsafe-spin.c (asm) [0x590 <= __SUNPRO_C && __STDC__]:
19720         #define to __asm.
19722 2021-09-12  Paul Eggert  <eggert@cs.ucla.edu>
19724         stdint-tests: long long preproc on recent Sun C
19725         * tests/test-stdint.c: Test long long preprocessor constants on
19726         Oracle Developer Studio 12.6, where they should work.
19728 2021-09-13  Bruno Haible  <bruno@clisp.org>
19730         extern-inline: Fix syntax error on macOS with GCC 11 (regr. 2021-08-22).
19731         Reported by Akim Demaille in
19732         <https://lists.gnu.org/archive/html/bug-gnulib/2021-09/msg00052.html>.
19733         * m4/extern-inline.m4 (_GL_INLINE, _GL_EXTERN_INLINE): Put _GL_UNUSED
19734         before, not after, 'static'.
19736 2021-09-11  Christian Weisgerber  <naddy@mips.inka.de>  (tiny change)
19738         sigsegv: port to OpenBSD 6.8+ powerpc64
19739         * lib/sigsegv.c (SIGSEGV_FAULT_STACKPOINTER):
19740         Special case for __OpenBSD__ && __powerpc64__, needed due to:
19741         https://github.com/openbsd/src/commit/5e649a8714ba05cf482011b7b7d1e5437b7c17db
19742         which is part of the oldest currently-supported OpenBSD (6.8),
19743         so we needn’t worry about older versions.
19745 2021-09-09  Pádraig Brady  <P@draigBrady.com>
19747         maintainer-makefile: add 'can' to sc_prohibit_doubled_word
19748         * top/maint.mk (sc_prohibit_doubled_word): Check for "can can".
19750 2021-09-08  Paul Eggert  <eggert@cs.ucla.edu>
19752         strerror_r-posix: port even better to Android
19753         * lib/strerror_r.c: Use STRERROR_R_CHAR_P to decide whether the
19754         system strerror_r returns char *, and HAVE_DECL_STRERROR_R to
19755         decide whether it either does that or returns an integer.  In the
19756         former case, use the system strerror_r even on platforms like
19757         Android API level 23 that don’t have __xpg_strerror_r; also
19758         check for strerror_r failure just in case.
19759         * m4/error.m4 (gl_PREREQ_ERROR):
19760         * m4/strerror_r.m4 (gl_PREREQ_STRERROR_R):
19761         Use system extensions on Android, to avoid mishandling strerror_r
19762         on API level 23 and later.
19763         * modules/error, modules/strerror_r-posix (configure.ac):
19764         Surround gl_PREREQ_ERROR with AS_IF instead of plain if, so that
19765         AC_REQUIREs are propagated out.
19767         strerror_r-posix: port better to Android
19768         * m4/strerror_r.m4 (gl_FUNC_STRERROR_R): Move requirement of
19769         gl_USE_SYSTEM_EXTENSIONS from here ...
19770         (gl_FUNC_STRERROR_R_WORKS): ... to here, which is the macro that
19771         actually needs it.  This avoids a bug where 'configure' tests
19772         whether strerror_r has the POSIX API before enabling GNU
19773         extensions.  On Android, enabling GNU extensions switches from the
19774         POSIX to the GNU API.  Problem reported by Lucy Phipps in:
19775         https://lists.gnu.org/r/bug-gnulib/2021-09/msg00026.html
19777         string, wchar: port rpl_free decl to Android
19778         * lib/string.in.h, lib/wchar.in.h:
19779         (free): When replacing it, declare the unreplaced version too.
19780         Problem reported by Lucy Phipps in:
19781         https://lists.gnu.org/r/bug-gnulib/2021-09/msg00026.html
19783 2021-09-07  Paul Eggert  <eggert@cs.ucla.edu>
19785         string, wchar: avoid some namespace pollution
19786         * lib/string.in.h, lib/wchar.in.h:
19787         (free): Declare by hand instead of including stdlib.h.
19788         This avoids some namespace pollution.  It should also avoid some
19789         nested-include problems described by Lucy Phipps in:
19790         https://lists.gnu.org/r/bug-gnulib/2021-09/msg00018.html
19791         * modules/string, modules/wchar:
19792         (Depends-on): Add stdlib, so that REPLACE_FREE has the right value.
19793         (Makefile.am): Replace @REPLACE_FREE@ when creating the include file.
19795 2021-09-04  Paul Eggert  <eggert@cs.ucla.edu>
19797         idx: break copying from glibc
19798         * config/srclist.txt: Comment out idx.h, and bring back recent change.
19800 2021-09-04  Sun Haiyong  <youbest@sina.com>  (tiny change)
19802         sigsegv: Improve cross-compilation support for LoongArch CPU.
19803         * m4/stack-direction.m4 (SV_STACK_DIRECTION): Assume the stack grows
19804         down on LoongArch.
19806 2021-09-04  Simon Josefsson  <simon@josefsson.org>
19808         doc: Improve help related to bootstrap script.
19809         * doc/gnulib-tool.texi (VCS Issues): Make title more positive,
19810         s/Issues/Integration/.  Some more bootstrap-related hints,
19811         including changing suggested submodule path from .gnulib to gnulib
19812         as this seems to be more wide-spread.
19814 2021-09-04  Paul Eggert  <eggert@cs.ucla.edu>
19816         intprops: fix minor doc glitches
19817         * doc/intprops.texi (Integer Properties): Fix doc glitches.
19819 2021-09-04  Simon Josefsson  <simon@josefsson.org>
19821         doc: Add suggestions on FDL texinfo usage.
19822         * doc/licenses-texi.texi (License Texinfo sources): Add texinfo
19823         examples.
19825 2021-09-03  Simon Josefsson  <simon@josefsson.org>
19827         maintainer-makefile: Add indentation syntax-check rule.
19828         * top/maint.mk (indent): Use AM_V_GEN and indent_args.
19829         (sc_indent): New rule.
19830         (indent_args): New variable.
19831         (C_SOURCES): New variable, initialized to reasonable C files.
19832         (exclude_file_name_regexp--indent): New variable.
19834 2021-08-30  Paul Eggert  <eggert@cs.ucla.edu>
19836         idx: add commentary
19837         * lib/idx.h: Add comments about ssize_t and strlen, in
19838         response to comments from Simon Josefsson in:
19839         https://lists.gnu.org/r/bug-gnulib/2021-08/msg00196.html
19841 2021-08-29  Paul Eggert  <eggert@cs.ucla.edu>
19843         attribute: keep up with gnulib-common.m4
19844         * lib/attribute.h (ATTRIBUTE_DEALLOC, ATTRIBUTE_DEALLOC_FREE):
19845         New macros, aliases for the _GL_-prefixed macros added
19846         to gnulib-common.m4 last month.
19848 2021-08-29  Bruno Haible  <bruno@clisp.org>
19850         supersede: Fix test failure under QEMU user-mode for Linux/mips.
19851         * tests/test-supersede-open.h (test_open_supersede): Copy statbuf.st_dev
19852         into a local variable of type dev_t.
19853         * tests/test-supersede-fopen.h (test_fopen_supersede): Likewise.
19855 2021-08-29  Bruno Haible  <bruno@clisp.org>
19857         spawn-pipe: Fix test failure when running under QEMU user-mode.
19858         * tests/test-spawn-pipe-child.c: Include <stdbool.h>, <string.h>,
19859         qemu.h.
19860         (main): Under QEMU user-mode, allow fd 2 or fd 3 to be open.
19861         * modules/spawn-pipe-tests (Files): Add qemu.h.
19862         (Depends-on): Add stdbool.
19864 2021-08-29  Bruno Haible  <bruno@clisp.org>
19866         execute: Fix test failure when running under QEMU user-mode.
19867         * tests/test-execute-child.c: Include <stdbool.h>, qemu.h.
19868         (main): Under QEMU user-mode, allow fd 3 to be open.
19869         * modules/execute-tests (Files): Add qemu.h.
19870         (Depends-on): Add stdbool.
19872 2021-08-29  Bruno Haible  <bruno@clisp.org>
19874         posix_spawn_file_actions_addfchdir: Avoid test failure under QEMU.
19875         * tests/test-posix_spawn-fchdir.c: Include qemu.h.
19876         (is_qemu): New variable.
19877         (test): Under QEMU user-mode, don't expect that "pwd" produces the
19878         result "/".
19879         (main): Initialize is_qemu. Under QEMU user-mode, skip the relative file
19880         name test.
19881         * modules/posix_spawn_file_actions_addfchdir-tests (Files): Add qemu.h.
19882         (Depends-on): Add stdbool.
19884 2021-08-29  Bruno Haible  <bruno@clisp.org>
19886         getcwd tests: Avoid test failure when running under QEMU user-mode.
19887         * modules/getcwd-tests (Files): Add qemu.h.
19888         (Depends-on): Add stdbool.
19889         * tests/test-getcwd.c: Include qemu.h.
19890         (test_long_name): Skip this test when running under QEMU user-mode.
19891         (main): Consider return code 77 from test_long_name.
19893 2021-08-29  Paul Eggert  <eggert@cs.ucla.edu>
19895         base32, base64: treat negative sizes as overflows
19896         * lib/base64.c (base64_encode_alloc):
19897         * lib/base32.c (base32_encode_alloc):
19898         Treat negative sizes as overflows, for better compatibility
19899         with previous API.
19901 2021-08-29  Bruno Haible  <bruno@clisp.org>
19903         explicit_bzero test: Fix test failure due to GCC optimizations.
19904         * tests/test-explicit_bzero.c (do_secret_stuff): Use static variable
19905         'last_stackbuf'.
19906         (main): Use an 'if' to combine the two do_secret_stuff invocations.
19908 2021-08-29  Paul Eggert  <eggert@cs.ucla.edu>
19910         dfa: port to non-gnulib
19911         Suggested by Arnold Robbins in:
19912         https://lists.gnu.org/r/bug-gnulib/2021-08/msg00181.html
19913         * lib/dfa.h (_GL_ATTRIBUTE_DEALLOC) [!_GL_ATTRIBUTE_MALLOC]:
19914         Add missing definition.
19916 2021-08-29  Paul Eggert  <eggert@cs.ucla.edu>
19918         base32, base64: fix broken tests
19919         Problem reported by Bruno Haible in:
19920         https://lists.gnu.org/r/bug-gnulib/2021-08/msg00170.html
19921         * lib/base32.c, lib/base64.c: Do not include verify.h,
19922         and omit all uses of ‘assume’.
19923         * modules/base32, modules/base64 (Depends-on): Remove verify.
19924         * tests/test-base32.c, tests/test-base64.c:
19925         Don’t pass out-of-range values to allocator,
19926         as converting them to idx_t relies on implementation-defined
19927         behavior that could trap.
19929         ialloc: relicense
19930         * modules/ialloc (License): Change from LGPL to LGPLv2+.
19932 2021-08-28  Bruno Haible  <bruno@clisp.org>
19934         fma: Fix compilation error on Linux/sh4.
19935         * lib/fma.c (FUNC): Don't test for FE_DOWNWARD or FE_UPWARD when these
19936         rounding modes are not defined.
19938 2021-08-28  Bruno Haible  <bruno@clisp.org>
19940         Skip some tests when running under QEMU user-mode.
19941         * tests/qemu.h: New file.
19942         * tests/test-get-rusage-as.c: Include qemu.h.
19943         (main): Skip the test when running under QEMU.
19944         * tests/test-get-rusage-data.c: Include qemu.h.
19945         (main): Skip the test when running under QEMU.
19946         * tests/test-printf-posix2.c: Include qemu.h.
19947         (main): Return with code 77 when running under QEMU.
19948         * tests/test-fprintf-posix2.c: Include qemu.h.
19949         (main): Return with code 77 when running under QEMU.
19950         * tests/test-fprintf-posix3.c: Include qemu.h.
19951         (main): Return with code 79 when running under QEMU.
19952         * tests/test-fprintf-posix3.sh: Skip the test when the return code was
19953         79.
19954         * tests/test-dprintf-posix2.c: Include qemu.h.
19955         (main): Return with code 79 when running under QEMU. Use return code 80
19956         instead of 78.
19957         * tests/test-dprintf-posix2.sh: Skip the test when the return code was
19958         79. Update for changed return code.
19959         * modules/get-rusage-as-tests (Files): Add qemu.h.
19960         (Depends-on): Add stdbool.
19961         * modules/get-rusage-data-tests (Files): Add qemu.h.
19962         (Depends-on): Add stdbool.
19963         * modules/fprintf-posix-tests (Files): Add qemu.h.
19964         (Depends-on): Add stdbool.
19965         * modules/dprintf-posix-tests (Files): Add qemu.h.
19966         (Depends-on): Add stdbool.
19968 2021-08-28  Bruno Haible  <bruno@clisp.org>
19970         sigabbrev_np, sigdescr_np: Fix compilation error on Linux/alpha.
19971         * lib/sigabbrev_np.c (sigabbrev_np): When SIGINFO and SIGPWR have the
19972         same value, give precendence to SIGPWR.
19973         * lib/sigdescr_np.c (sigdescr_np): Likewise.
19974         * tests/test-sigabbrev_np.c (main): Likewise.
19975         * tests/test-sigdescr_np.c (main): Likewise.
19977 2021-08-28  Bruno Haible  <bruno@clisp.org>
19979         execle, execve, execvpe tests: Fix test failures under qemu user-mode.
19980         * test-execle-main.c: Include <string.h>.
19981         (get_environ_assignment, create_minimal_env): New functions.
19982         (main): Call create_minimal_env.
19983         * test-execve-main.c: Likewise.
19984         * test-execvpe-main.c: Likewise.
19986 2021-08-27  Paul Eggert  <eggert@cs.ucla.edu>
19988         base32, base64: prefer signed to unsigned integers
19989         * lib/base32.c, lib/base64.c: Include ialloc.h instad of stdlib.h.
19990         Include intprops.h, verify.h.
19991         * lib/base32.c (base32_encode, base32_encode_alloc, get_8, decode_8)
19992         (base32_decode_ctx, base32_decode_alloc_ctx):
19993         * lib/base32.h (struct base32_decode_context):
19994         * lib/base64.c (base64_encode_fast, base64_encode)
19995         (base64_encode_alloc, get_4, decode_4, base64_decode_ctx)
19996         (base64_decode_alloc_ctx):
19997         * lib/base64.h (struct base64_decode_context):
19998         * tests/test-base32.c (main):
19999         * tests/test-base64.c (main):
20000         Prefer signed to unsigned integers.
20001         * lib/base32.c (base32_encode_alloc):
20002         * lib/base64.c (base64_encode_alloc):
20003         Use simpler and more-direct check for overflow, removing a TODO.
20004         * lib/base32.h, lib/base64.h: Include idx.h instead of stddef.h.
20005         * modules/base32, modules/base64 (Depends-on): Add ialloc, verify.
20007 2021-08-26  Paul Eggert  <eggert@cs.ucla.edu>
20009         regex: use __attr_access and C99-style array arg
20010         This should help with some static checking.
20011         Derived from a suggestion by Martin Sebor in:
20012         https://sourceware.org/pipermail/libc-alpha/2021-August/130336.html
20013         * config/srclist.txt: Remove lib/regex.c for now.
20014         * lib/regex.c: Ignore -Wvla for the whole file.
20015         * lib/regex.h (_REGEX_NELTS, _Attr_access_): New macros.
20016         Ignore -Wvla when declaring regexec.
20017         (re_compile_pattern, re_search, re_search2, re_match, re_match_2)
20018         (regerror): Mark with _Attr_access_, as glibc does.
20019         * lib/regex.h (regexec):
20020         * lib/regexec.c (regexec, __compat_regexec):
20021         Use _REGEX_NELTS for each array parameter whose size is another arg
20022         but with an access pattern that cannot be captured with __attr_access.
20024 2021-08-25  Bruno Haible  <bruno@clisp.org>
20026         execute tests: Fix test failure when libtool is in use.
20027         * modules/execute-tests (Makefile.am): Link test-execute-child without
20028         using libtool.
20029         * modules/spawn-pipe-tests (Makefile.am): Link test-spawn-pipe-child
20030         without using libtool.
20031         * modules/system-quote-tests (Makefile.am): Link test-system-quote-child
20032         without using libtool.
20034 2021-08-24  Paul Eggert  <eggert@cs.ucla.edu>
20036         dfa: prefer idx_t to ptrdiff_t for nonnegative
20037         * lib/dfa.c (struct dfa, dfaexec_main, dfaexec_mb, dfaexec_sb)
20038         (dfaexec_noop, dfaexec):
20039         * lib/dfa.h (dfaparse, dfacomp, dfaexec):
20040         Prefer idx_t to ptrdiff_t for counts, which should be nonnegative.
20041         * lib/dfa.h: Include idx.h.
20043 2021-08-22  Bruno Haible  <bruno@clisp.org>
20045         snippet/unused-parameter: Mark unused module obsolete.
20046         * modules/snippet/unused-parameter (Status, Notice): Mark as obsolete.
20048 2021-08-22  Bruno Haible  <bruno@clisp.org>
20050         Make generated .in.h files as standalone as possible.
20051         Reported by Jan Engelhardt <jengelh@inai.de>.
20052         * lib/stdlib.in.h (_GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_DEALLOC_FREE,
20053         _GL_ATTRIBUTE_MALLOC): Add fallback definitions.
20054         * lib/dirent.in.h (_GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_MALLOC): Add
20055         fallback definitions.
20056         * lib/stdio.in.h (_GL_ATTRIBUTE_DEALLOC): Add fallback definition.
20057         * lib/math.in.h (_GL_ATTRIBUTE_CONST): Add fallback definition.
20058         * lib/pthread.in.h (_GL_ATTRIBUTE_PURE): Add fallback definition.
20059         * lib/threads.in.h (_GL_ATTRIBUTE_PURE): Likewise.
20060         * lib/uchar.in.h (_GL_ATTRIBUTE_PURE): Likewise.
20061         * lib/string.in.h (_GL_ATTRIBUTE_PURE): Move definition, for consistency
20062         with the other *.in.h files.
20063         * lib/se-context.in.h (_GL_ATTRIBUTE_MAYBE_UNUSED): Add fallback
20064         definition.
20065         * lib/se-label.in.h (_GL_ATTRIBUTE_MAYBE_UNUSED): Likewise.
20066         * lib/se-selinux.in.h (_GL_ATTRIBUTE_MAYBE_UNUSED): Likewise.
20067         * lib/textstyle.in.h: Use _GL_ATTRIBUTE_MAYBE_UNUSED instead of
20068         _GL_UNUSED.
20069         (_GL_ATTRIBUTE_SPEC_PRINTF_STANDARD, _GL_ATTRIBUTE_MAYBE_UNUSED): Add
20070         fallback definitions.
20072 2021-08-22  Bruno Haible  <bruno@clisp.org>
20074         gnulib-common.m4: Clarify logic behind _GL_UNUSED_LABEL.
20075         Reported by Paul Eggert.
20076         * m4/gnulib-common.m4 (gl_COMMON_BODY): Add comment and write the
20077         condition in a way that is close to the comment.
20079 2021-08-22  Paul Eggert  <eggert@cs.ucla.edu>
20081         c-stack: depend on inttypes, mempcpy
20082         * modules/c-stack (Depends-on): Add inttypes, mempcpy.
20083         mempcpy problem reported by Evan Miller in:
20084         https://debbugs.gnu.org/50098#31
20086 2021-08-22  Bruno Haible  <bruno@clisp.org>
20088         mountlist: Use recommended syntax for _GL_UNUSED_LABEL.
20089         * lib/mountlist.c (read_file_system_list): Add semicolon after
20090         _GL_UNUSED_LABEL.
20092 2021-08-22  Bruno Haible  <bruno@clisp.org>
20094         gnulib-common.m4: Make _GL_UNUSED_LABEL effective for clang.
20095         * m4/gnulib-common.m4 (gl_COMMON_BODY): Make _GL_UNUSED_LABEL use
20096         _GL_ATTRIBUTE_UNUSED also for clang.
20098 2021-08-22  Bruno Haible  <bruno@clisp.org>
20100         gnulib-common.m4: Use C2x [[maybe_unused]] when possible.
20101         * m4/gnulib-common.m4 (gl_COMMON_BODY): Define _GL_UNUSED as an alias of
20102         _GL_ATTRIBUTE_MAYBE_UNUSED, not of _GL_ATTRIBUTE_UNUSED.
20103         * lib/binary-io.h (__gl_setmode): Put _GL_UNUSED before, not after, the
20104         declaration.
20105         * lib/c-stack.c (null_action, segv_handler, overflow_handler,
20106         c_stack_action): Likewise.
20107         * lib/chown.c (chown): Likewise.
20108         * lib/clean-temp-simple.c (cleanup_action): Likewise.
20109         * lib/fts.c (dirent_inode_sort_may_be_useful, leaf_optimization,
20110         fts_set): Likewise.
20111         * lib/getgroups.c (getgroups): Likewise.
20112         * lib/getopt.c (_getopt_initialize): Likewise.
20113         * lib/getugroups.c (getugroups): Likewise.
20114         * lib/localename.c (gl_locale_name_thread_unsafe, gl_locale_name_thread,
20115         gl_locale_name_posix, gl_locale_name_environ): Likewise.
20116         * lib/mkdir.c (rpl_mkdir): Likewise.
20117         * lib/mkfifo.c (mkfifo): Likewise.
20118         * lib/mkfifoat.c (mkfifoat): Likewise.
20119         * lib/mknod.c (mknod): Likewise.
20120         * lib/mknodat.c (mknodat): Likewise.
20121         * lib/mountlist.c (me_remote): Likewise.
20122         * lib/openpty.c (openpty): Likewise.
20123         * lib/parse-datetime.y (yyerror): Likewise.
20124         * lib/passfd.c (sendfd, recvfd): Likewise.
20125         * lib/pthread-cond.c (pthread_condattr_destroy, pthread_cond_init,
20126         pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
20127         pthread_cond_broadcast, pthread_cond_destroy): Likewise.
20128         * lib/pthread-mutex.c (pthread_mutexattr_destroy, pthread_mutex_init,
20129         pthread_mutex_lock, pthread_mutex_trylock, pthread_mutex_timedlock,
20130         pthread_mutex_unlock, pthread_mutex_destroy): Likewise.
20131         * lib/pthread-rwlock.c (pthread_rwlockattr_destroy, pthread_rwlock_init,
20132         pthread_rwlock_timedrdlock, pthread_rwlock_timedwrlock): Likewise.
20133         * lib/pthread-spin.c (pthread_spin_init, pthread_spin_lock,
20134         pthread_spin_trylock, pthread_spin_unlock, pthread_spin_destroy):
20135         Likewise.
20136         * lib/pthread-thread.c (pthread_attr_destroy): Likewise.
20137         * lib/readlink.c (readlink): Likewise.
20138         * lib/rename.c (rpl_rename): Likewise.
20139         * lib/set-permissions.c (set_permissions): Likewise.
20140         * lib/sockets.c (gl_sockets_startup): Likewise.
20141         * lib/stat-time.h (get_stat_birthtime_ns, get_stat_birthtime,
20142         stat_time_normalize): Likewise.
20143         * lib/strptime.c (__strptime_internal): Likewise.
20144         * lib/strtod.c (LDEXP): Likewise.
20145         * lib/symlink.c (symlink): Likewise.
20146         * lib/symlinkat.c (symlinkat): Likewise.
20147         * lib/tempname.c (try_dir, try_nocreate): Likewise.
20148         * lib/textstyle.in.h (styled_ostream_begin_use_class,
20149         styled_ostream_end_use_class, styled_ostream_get_hyperlink_ref,
20150         styled_ostream_get_hyperlink_id, styled_ostream_set_hyperlink,
20151         styled_ostream_flush_to_current_style, fd_ostream_create,
20152         term_ostream_get_color, term_ostream_set_color,
20153         term_ostream_get_bgcolor, term_ostream_set_bgcolor,
20154         term_ostream_get_weight, term_ostream_set_weight,
20155         term_ostream_get_posture, term_ostream_set_posture,
20156         term_ostream_get_underline, term_ostream_set_underline,
20157         term_ostream_get_hyperlink_ref, term_ostream_get_hyperlink_id,
20158         term_ostream_set_hyperlink, term_ostream_create,
20159         term_styled_ostream_create, html_styled_ostream_create,
20160         handle_color_option, handle_style_option, style_file_prepare,
20161         styled_ostream_create, libtextstyle_set_failure_exit_code): Likewise.
20162         * lib/unicodeio.c (exit_failure_callback, fallback_failure_callback):
20163         Likewise.
20164         * lib/wait-process.c (cleanup_slaves_action): Likewise.
20165         * tests/signature.h (SIGNATURE_CHECK2): Likewise.
20166         * tests/test-areadlink.c (do_areadlink): Likewise.
20167         * tests/test-areadlinkat.c (do_areadlinkat): Likewise.
20168         * tests/test-ceilf-ieee.c (main): Likewise.
20169         * tests/test-ceilf1.c (main): Likewise.
20170         * tests/test-dirent.c (dir): Likewise.
20171         * tests/test-fchownat.c (main): Likewise.
20172         * tests/test-fdopendir.c (main): Likewise.
20173         * tests/test-filenamecat.c (main): Likewise.
20174         * tests/test-floor1.c (main): Likewise.
20175         * tests/test-floorf-ieee.c (main): Likewise.
20176         * tests/test-floorf1.c (main): Likewise.
20177         * tests/test-fseeko.c (main): Likewise.
20178         * tests/test-fstatat.c (main): Likewise.
20179         * tests/test-ftello.c (main): Likewise.
20180         * tests/test-getdomainname.c (main): Likewise.
20181         * tests/test-getgroups.c (main): Likewise.
20182         * tests/test-gethostname.c (main): Likewise.
20183         * tests/test-math-c++.cc (OVERLOADED_CHECK): Likewise.
20184         * tests/test-mkdirat.c (main): Likewise.
20185         * tests/test-openat.c (main): Likewise.
20186         * tests/test-parse-datetime.c (main): Likewise.
20187         * tests/test-quotearg-simple.c (main): Likewise.
20188         * tests/test-quotearg.c (main): Likewise.
20189         * tests/test-sethostname2.c (main): Likewise.
20190         * tests/test-unlinkat.c (main): Likewise.
20191         * tests/test-version-etc.c (main): Likewise.
20192         * tests/test-xalloc-die.c (main): Likewise.
20193         * tests/test-xfprintf-posix.c (main): Likewise.
20194         * tests/test-xprintf-posix.c (main): Likewise.
20195         * tests/test-xvasprintf.c (main): Likewise.
20197 2021-08-22  Bruno Haible  <bruno@clisp.org>
20199         gnulib-common.m4: Document the gnulib-internal _GL_ATTRIBUTE_* macros.
20200         * m4/gnulib-common.m4 (gl_COMMON_BODY): Add comments to the
20201         _GL_ATTRIBUTE_* macros, based on lib/attribute.h.
20203 2021-08-22  Bernhard Voelker  <mail@bernhard-voelker.de>
20205         doc: fix order of stdlib functions
20206         * doc/gnulib.texi (node Glibc stdlib.h): Move mrand48_r after mkstemps.
20207         Reported by Benno Schulenberg.
20209 2021-08-21  Bruno Haible  <bruno@clisp.org>
20211         c-stack: Test for libsigsegv once, not twice.
20212         * m4/sigsegv.m4: New file, based on modules/sigsegv.
20213         * modules/sigsegv (Files): Add it.
20214         (configure.ac): Require gl_SIGSEGV. Test gl_sigsegv_uses_libsigsegv
20215         instead of with_libsigsegv and gl_cv_lib_sigsegv.
20216         * m4/c-stack.m4 (gl_C_STACK): Likewise.
20218 2021-08-21  Bruno Haible  <bruno@clisp.org>
20220         rawmemchr: Fix use in relocatable-prog-wrapper (regression 2021-08-20).
20221         * lib/rawmemchr.c: Restore test of HAVE_RAWMEMCHR.
20222         * modules/relocatable-prog-wrapper (Depends-on): Add stdalign.
20224 2021-08-20  Paul Eggert  <eggert@cs.ucla.edu>
20226         rawmemchr: modernize and simplify
20227         * lib/rawmemchr.c (HAVE_RAWMEMCHR): Assume it’s not defined;
20228         otherwise this file would not be compiled.  Include limits.h,
20229         stdalign.h, stdint.h, verify.h.
20230         (rawmemchr): Prefer uintptr_t to unsigned long and to size_t when
20231         it’s the better type.  Verify that longword lacks padding.  Use
20232         alignof rather than sizeof when checking alignment.  Simplify by
20233         assuming C99 decl-after-statement, and by using multiplication
20234         rather than repeated shifting and OR (modern compilers can
20235         optimize the multiplication if needed).  Avoid unnecessary casts.
20236         Don’t assume CHAR_WIDTH is 8.  Convert back and forth between void *
20237         to suppress bogus GCC warnings about alignment.  Omit a
20238         duplicate assignment to char_ptr.
20239         * modules/rawmemchr (Depends-on): Add stdalign, stdint, verify.
20241 2021-08-17  Paul Eggert  <eggert@cs.ucla.edu>
20243         c-stack: fix libsigsegv dependency (regression 2021-05-18)
20244         Problem reported for GNU grep by Evan Miller (Bug#50098).
20245         * m4/c-stack.m4 (gl_C_STACK): Call gl_LIBSIGSEGV before
20246         testing gl_cv_lib_sigsegv.
20248 2021-08-14  Bruno Haible  <bruno@clisp.org>
20250         doc: Update for glibc 2.34.
20251         * doc/posix-functions/timespec_getres.texi: New file.
20252         * doc/glibc-functions/_Fork.texi: New file.
20253         * doc/glibc-functions/closefrom.texi: New file.
20254         * doc/glibc-functions/dn_comp.texi: New file.
20255         * doc/glibc-functions/dn_skipname.texi: New file.
20256         * doc/glibc-functions/execveat.texi: New file.
20257         * doc/glibc-functions/posix_spawn_file_actions_addclosefrom_np.texi: New
20258         file.
20259         * doc/glibc-functions/res_dnok.texi: New file.
20260         * doc/glibc-functions/res_hnok.texi: New file.
20261         * doc/glibc-functions/res_mailok.texi: New file.
20262         * doc/glibc-functions/res_nmkquery.texi: New file.
20263         * doc/glibc-functions/res_nquery.texi: New file.
20264         * doc/glibc-functions/res_nquerydomain.texi: New file.
20265         * doc/glibc-functions/res_nsearch.texi: New file.
20266         * doc/glibc-functions/res_nsend.texi: New file.
20267         * doc/glibc-functions/res_ownok.texi: New file.
20268         * doc/glibc-functions/res_send.texi: New file.
20269         * doc/gnulib.texi: Include them.
20270         * doc/glibc-functions/inet_neta.texi: Remove file.
20271         * doc/glibc-functions/malloc_get_state.texi: Remove file.
20272         * doc/glibc-functions/malloc_set_state.texi: Remove file.
20273         * doc/glibc-functions/pthread_mutex_consistent_np.texi: Remove file.
20274         * doc/glibc-functions/pthread_mutexattr_getrobust_np.texi: Remove file.
20275         * doc/glibc-functions/pthread_mutexattr_setrobust_np.texi: Remove file.
20276         * doc/glibc-functions/pthread_yield.texi: Remove file.
20277         * doc/gnulib.texi: Don't include them.
20278         * doc/glibc-headers/resolv.texi: Update.
20279         * doc/pastposix-functions/h_errno.texi: Likewise.
20280         * doc/posix-functions/*.texi: Likewise.
20281         * doc/glibc-functions/*.texi: Likewise.
20283 2021-08-12  Paul Eggert  <eggert@cs.ucla.edu>
20285         memrchr-tests: port to GCC 12
20286         * tests/test-memrchr.c: Bug#101494 is fixed in GCC 12.
20288 2021-08-12  Akim Demaille  <akim@lrde.epita.fr>
20290         snippet/_Noreturn: Fix typo
20291         * lib/_Noreturn.h: Fix spelling of 4.
20293 2021-08-11  Paul Eggert  <eggert@cs.ucla.edu>
20295         dynarray: merge from glibc
20296         This also helps document glibc’s direction in using GCC’s
20297         memory-allocation checking.
20298         * lib/cdefs.h: Omit comments that glibc rejected.
20299         (__returns_nonnull, __attr_access_none, __attr_dealloc)
20300         (__attr_dealloc_free): New macros.
20301         * lib/libc-config.h: Undef the new macros that are defined
20302         unconditionally.
20303         * lib/malloc/dynarray_at_failure.c [_LIBC]: Do not include stdlib.h.
20304         (__libc_dynarray_at_failure) [_LIBC]: Call __libc_fatal,
20305         fixing a bad merge previously.
20307 2021-08-08  Bruno Haible  <bruno@clisp.org>
20309         canonicalize-lgpl: Fix conflict with z/OS <sys/stat.h>.
20310         Reported by Mike Fulton <mikefultonpersonal@gmail.com> in
20311         <https://lists.gnu.org/archive/html/m4-discuss/2021-08/msg00000.html>
20312         via Eric Blake.
20313         * lib/canonicalize-lgpl.c (__stat): Remove macro.
20314         (file_accessible): Use 'stat' instead.
20316 2021-08-08  Bruno Haible  <bruno@clisp.org>
20318         ptsname_r: Drop sync with glibc.
20319         * lib/ptsname_r.c: Drop _LIBC code.
20320         (__set_errno, __isatty, __stat, __ttyname_r, __ptsname_r): Remove
20321         macros.
20322         (ptsname_r): Rename local variable 'save_errno'.
20324 2021-08-08  Bruno Haible  <bruno@clisp.org>
20326         config: Update after glibc changed.
20327         * config/srclist.txt: Remove two files that glibc dropped on 2013-12-17.
20329 2021-08-08  Bruno Haible  <bruno@clisp.org>
20331         relocatable-lib-lgpl: Fix a memory leak related to a Windows DLL.
20332         Reported by Jonathan Boeing <jonathan@claws-mail.org> in
20333         <https://lists.gnu.org/archive/html/bug-gnulib/2021-08/msg00048.html>.
20334         * lib/relocatable.c (DllMain): Avoid memory leak in a special case
20335         of repeated attach/detach.
20337 2021-08-08  Bruno Haible  <bruno@clisp.org>
20339         fopen: Fix link error on native Windows.
20340         * modules/fopen (Depends-on): Add close.
20342 2021-08-08  Bruno Haible  <bruno@clisp.org>
20344         fopen: Fix compilation error on AIX (regression from 2020-05-28).
20345         * modules/fopen (Depends-on): Add fcntl-h.
20347 2021-08-08  Bruno Haible  <bruno@clisp.org>
20349         stdio: Improve GCC 11 allocation-deallocation checking.
20350         * lib/stdio.in.h (fdopen, fopen, tmpfile): For GCC >= 11: Declare nearly
20351         always.
20352         (popen): For GCC >= 11: Declare also when the platform already declares
20353         the function or when the module 'popen' is not in use.
20355 2021-08-08  Bruno Haible  <bruno@clisp.org>
20357         dirent: Improve GCC 11 allocation-deallocation checking.
20358         * lib/dirent.in.h (opendir): For GCC >= 11: Declare also when the
20359         platform already declares the function or when the module 'opendir' is
20360         not in use.
20361         (fdopendir): For GCC >= 11: Declare also when the platform already
20362         declares the function or when the module 'fdopendir' is not in use.
20364 2021-08-08  Bruno Haible  <bruno@clisp.org>
20366         stdlib, string, wchar: Improve GCC 11 allocation-deallocation checking.
20367         * lib/stdlib.in.h (aligned_alloc): For GCC >= 11: Declare also when the
20368         platform already declares the function or when the module
20369         'aligned_alloc' is not in use.
20370         (calloc): For GCC >= 11: Declare nearly always.
20371         (canonicalize_file_name): For GCC >= 11: Declare also when the platform
20372         already declares the function or when the module 'canonicalize-lgpl' is
20373         not in use.
20374         (malloc, realloc): For GCC >= 11: Declare nearly always.
20375         * lib/malloc.in.h: Remove redundant include.
20376         (memalign): For GCC >= 11: Declare also when the platform already
20377         declares the function or when the module 'memalign' is not in use.
20378         * lib/string.in.h: Include <stdlib.h> always.
20379         (strdup): For GCC >= 11: Declare also when the platform already declares
20380         the function or when the module 'strdup' or 'strdup-posix' is not in
20381         use.
20382         * lib/wchar.in.h: Include <stdlib.h> always.
20383         (wcsdup): For GCC >= 11: Declare also when the platform already declares
20384         the function or when the module 'wcsdup' is not in use.
20385         * modules/free-posix (Depends-on): Add string, wchar.
20387 2021-08-07  Bruno Haible  <bruno@clisp.org>
20389         gnulib-tool: Add support for Automake 1.16.4.
20390         Reported by <shoober420@gmail.com> in
20391         <https://lists.gnu.org/archive/html/bug-libunistring/2021-08/msg00000.html>.
20392         * build-aux/test-driver-1.16.3.diff: Renamed from
20393         build-aux/test-driver.diff.
20394         * build-aux/test-driver.diff: Update to match Automake 1.16.4.
20395         * gnulib-tool (func_create_testdir, func_create_megatestdir): Try both
20396         .diff files.
20398 2021-08-07  Bruno Haible  <bruno@clisp.org>
20400         gnulib-common.m4: Minor style fix.
20401         * m4/gnulib-common.m4 (gl_COMMON_BODY): Keep list of attributes sorted
20402         alphabetically.
20404 2021-08-07  Bruno Haible  <bruno@clisp.org>
20406         uninorm, unistr: Improve GCC 11 allocation-deallocation checking.
20407         * lib/uninorm.in.h (uninorm_filter_free): Move declaration up.
20408         (uninorm_filter_create): Declare that deallocation must happen through
20409         'uninorm_filter_free'.
20410         * lib/unistr.in.h: Include <stdlib.h>.
20411         (u8_strdup, u16_strdup, u32_strdup): Declare that deallocation must
20412         happen through 'free'.
20414 2021-08-07  Bruno Haible  <bruno@clisp.org>
20416         ialloc: Prepare for allocation-deallocation checking.
20417         * lib/ialloc.h (imalloc, irealloc, icalloc): Add comment that
20418         deallocation must happen through 'free'.
20420 2021-08-07  Bruno Haible  <bruno@clisp.org>
20422         aligned-malloc: Prepare for allocation-deallocation checking.
20423         * lib/aligned-malloc.h (aligned_free): Move declaration up.
20424         (aligned_malloc): Add comment that deallocation must happen through
20425         'aligned_free'.
20427 2021-08-07  Bruno Haible  <bruno@clisp.org>
20429         list, set, oset, map, omap: Prepare allocation-deallocation checking.
20430         * lib/gl_list.h (gl_list_create_empty, gl_list_nx_create_empty,
20431         gl_list_create, gl_list_nx_create): Add comment that deallocation must
20432         happen through 'gl_list_free'.
20433         * lib/gl_xlist.h (gl_list_create_empty, gl_list_create): Likewise.
20434         * lib/gl_sublist.h (gl_sublist_create, gl_sublist_nx_create): Likewise.
20435         * lib/gl_xsublist.h (gl_sublist_create): Likewise.
20436         * lib/gl_set.h (gl_set_create_empty, gl_set_nx_create_empty): Add
20437         comment that deallocation must happen through 'gl_set_free'.
20438         * lib/gl_xset.h (gl_set_create_empty): Likewise.
20439         * lib/gl_oset.h (gl_oset_create_empty, gl_oset_nx_create_empty): Add
20440         comment that deallocation must happen through 'gl_oset_free'.
20441         * lib/gl_xoset.h (gl_oset_create_empty): Likewise.
20442         * lib/gl_map.h (gl_map_create_empty, gl_map_nx_create_empty): Add
20443         comment that deallocation must happen through 'gl_map_free'.
20444         * lib/gl_xmap.h (gl_map_create_empty): Likewise.
20445         * lib/gl_omap.h (gl_omap_create_empty, gl_omap_nx_create_empty): Add
20446         comment that deallocation must happen through 'gl_omap_free'.
20447         * lib/gl_xomap.h (gl_omap_create_empty): Likewise.
20449 2021-08-07  Bruno Haible  <bruno@clisp.org>
20451         xgetdomainname: Improve GCC 11 allocation-deallocation checking.
20452         * lib/xgetdomainname.h: Include <stdlib.h>.
20453         (xgetdomainname): Declare that deallocation must happen through 'free'.
20455 2021-08-07  Bruno Haible  <bruno@clisp.org>
20457         xgetdomainname: Ensure .c file starts with '#include <config.h>'.
20458         * lib/xgetaname-impl.h: New file, based on lib/xgethostname.c.
20459         * lib/xgethostname.c: Move implementation to lib/xgetaname-impl.h.
20460         * lib/xgetdomainname.c: Include <config.h>. Include xgetaname-impl.h
20461         instead of xgethostname.c.
20462         * modules/xgethostname (Files): Add lib/xgetaname-impl.h.
20463         * modules/xgetdomainname (Files): Likewise.
20464         (Depends-on): Remove xgethostname. Add free-posix, xalloc.
20466 2021-08-07  Bruno Haible  <bruno@clisp.org>
20468         xstrndup: Improve GCC 11 allocation-deallocation checking.
20469         * lib/xstrndup.h: Include <stdlib.h> instead of <stddef.h>.
20470         (xstrndup): Declare that deallocation must happen through 'free'.
20472 2021-08-07  Bruno Haible  <bruno@clisp.org>
20474         xstriconveh: Improve GCC 11 allocation-deallocation checking.
20475         * lib/xstriconveh.h: Include <stdlib.h> instead of <stddef.h>.
20476         (xstr_cd_iconveh, xstr_iconveh): Declare that deallocation must happen
20477         through 'free'.
20479 2021-08-07  Bruno Haible  <bruno@clisp.org>
20481         xmemdup0: Improve GCC 11 allocation-deallocation checking.
20482         * lib/xmemdup0.h: Include <stdlib.h> instead of <stddef.h>.
20483         (xmemdup0): Declare that deallocation must happen through 'free'.
20485 2021-08-07  Bruno Haible  <bruno@clisp.org>
20487         windows-spawn: Improve GCC 11 allocation-deallocation checking.
20488         * lib/windows-spawn.h: Include <stdlib.h>.
20489         (compose_command, compose_envblock): Declare that deallocation must
20490         happen through 'free'.
20492 2021-08-07  Bruno Haible  <bruno@clisp.org>
20494         string-buffer: Improve GCC 11 allocation-deallocation checking.
20495         * lib/string-buffer.h: Include <stdlib.h> instead of <stddef.h>.
20496         (sb_dupfree): Declare that deallocation must happen through 'free'.
20498 2021-08-07  Bruno Haible  <bruno@clisp.org>
20500         striconveha: Improve GCC 11 allocation-deallocation checking.
20501         * lib/striconveha.h: Include <stdlib.h> instead of <stddef.h>.
20502         (str_iconveha): Declare that deallocation must happen through 'free'.
20504 2021-08-07  Bruno Haible  <bruno@clisp.org>
20506         striconveh: Improve GCC 11 allocation-deallocation checking.
20507         * lib/striconveh.h: Include <stdlib.h> instead of <stddef.h>.
20508         (str_cd_iconveh, str_iconveh): Declare that deallocation must happen
20509         through 'free'.
20511 2021-08-07  Bruno Haible  <bruno@clisp.org>
20513         striconv: Improve GCC 11 allocation-deallocation checking.
20514         * lib/striconv.h: Include <stdlib.h> instead of <stddef.h>.
20515         (str_cd_iconv, str_iconv): Declare that deallocation must happen through
20516         'free'.
20518 2021-08-07  Bruno Haible  <bruno@clisp.org>
20520         relocatable-lib-lgpl: Improve GCC 11 allocation-deallocation checking.
20521         * lib/relocatable.h: Include <stdlib.h>.
20522         (compute_curr_prefix): Declare that deallocation must happen through
20523         'free'.
20525 2021-08-07  Bruno Haible  <bruno@clisp.org>
20527         regex-quote: Improve GCC 11 allocation-deallocation checking.
20528         * lib/regex-quote.h: Include <stdlib.h> instead of <stddef.h>.
20529         (regex_quote): Declare that deallocation must happen through 'free'.
20531 2021-08-07  Bruno Haible  <bruno@clisp.org>
20533         readline: Improve GCC 11 allocation-deallocation checking.
20534         * lib/readline.h: Include <stdlib.h>.
20535         (readline): Declare that deallocation must happen through 'free'.
20537 2021-08-07  Bruno Haible  <bruno@clisp.org>
20539         read-file: Improve GCC 11 allocation-deallocation checking.
20540         * lib/read-file.h: Include <stdlib.h> instead of <stddef.h>.
20541         (fread_file, read_file): Declare that deallocation must happen through
20542         'free'.
20544 2021-08-07  Bruno Haible  <bruno@clisp.org>
20546         pipe-filter-gi: Improve GCC 11 allocation-deallocation checking.
20547         * lib/pipe-filter.h (pipe_filter_gi_close): Move declaration up.
20548         (pipe_filter_gi_create): Declare that deallocation must happen through
20549         'pipe_filter_gi_close'.
20551 2021-08-07  Bruno Haible  <bruno@clisp.org>
20553         javaversion: Improve GCC 11 allocation-deallocation checking.
20554         * lib/javaversion.h: Include <stdlib.h>.
20555         (javaexec_version): Declare that deallocation must happen through
20556         'free'.
20558 2021-08-07  Bruno Haible  <bruno@clisp.org>
20560         ino-map: Improve GCC 11 allocation-deallocation checking.
20561         * lib/ino-map.h (ino_map_free): Move declaration up.
20562         (ino_map_alloc): Declare that deallocation must happen through
20563         'ino_map_free'.
20565 2021-08-07  Bruno Haible  <bruno@clisp.org>
20567         hash: Improve GCC 11 allocation-deallocation checking.
20568         * lib/hash.h (hash_free): Move declaration up.
20569         (hash_initialize, hash_xinitialize): Declare that deallocation must
20570         happen through 'hash_free'.
20572 2021-08-07  Bruno Haible  <bruno@clisp.org>
20574         hamt: Improve GCC 11 allocation-deallocation checking.
20575         * lib/hamt.h (hamt_free): Move declaration up.
20576         (hamt_create, hamt_copy): Declare that deallocation must happen through
20577         'hamt_free'.
20579 2021-08-07  Bruno Haible  <bruno@clisp.org>
20581         get_progname_of: Improve GCC 11 allocation-deallocation checking.
20582         * lib/get_progname_of.h: Include <stdlib.h>.
20583         (get_progname_of): Declare that deallocation must happen through 'free'.
20585 2021-08-07  Bruno Haible  <bruno@clisp.org>
20587         fts: Improve GCC 11 allocation-deallocation checking.
20588         * lib/fts_.h (fts_open): Declare that deallocation must happen through
20589         'fts_close'.
20591 2021-08-07  Bruno Haible  <bruno@clisp.org>
20593         eealloc: Improve GCC 11 allocation-deallocation checking.
20594         * lib/eealloc.h (eemalloc): Declare that deallocation must happen
20595         through 'free'.
20597 2021-08-07  Bruno Haible  <bruno@clisp.org>
20599         di-set: Improve GCC 11 allocation-deallocation checking.
20600         * lib/di-set.h (di_set_free): Move declaration up.
20601         (di_set_alloc): Declare that deallocation must happen through
20602         'di_set_free'.
20604 2021-08-07  Bruno Haible  <bruno@clisp.org>
20606         [x]concat-filename: Improve GCC 11 allocation-deallocation checking.
20607         * lib/concat-filename.h: Include <stdlib.h>.
20608         (concatenated_filename, xconcatenated_filename): Declare that
20609         deallocation must happen through 'free'.
20611 2021-08-07  Bruno Haible  <bruno@clisp.org>
20613         clean-temp: Improve GCC 11 allocation-deallocation checking.
20614         * lib/clean-temp.h (cleanup_temp_dir): Move declaration up.
20615         (create_temp_dir): Declare that deallocation must happen through
20616         'cleanup_temp_dir'.
20618 2021-08-07  Bruno Haible  <bruno@clisp.org>
20620         canon-host: Improve GCC 11 allocation-deallocation checking.
20621         * lib/canon-host.h: Include <stdlib.h>.
20622         (canon_host, canon_host_r): Declare that deallocation must happen
20623         through 'free'.
20625 2021-08-07  Bruno Haible  <bruno@clisp.org>
20627         c-xvasprintf: Improve GCC 11 allocation-deallocation checking.
20628         * lib/c-xvasprintf.h: Include <stdlib.h>.
20629         (c_xasprintf, c_xvasprintf): Declare that deallocation must happen
20630         through 'free'.
20632 2021-08-07  Bruno Haible  <bruno@clisp.org>
20634         bitsetv: Improve GCC 11 allocation-deallocation checking.
20635         * lib/bitsetv.h (bitsetv_free): Move declaration up.
20636         (bitsetv_alloc, bitsetv_create): Declare that deallocation must happen
20637         through 'bitsetv_free'.
20639         bitset: Improve GCC 11 allocation-deallocation checking.
20640         * lib/bitset.h (bitset_free): Move declaration up.
20641         (bitset_alloc, bitset_create): Declare that deallocation must happen
20642         through 'bitset_free'.
20643         (bitset_obstack_free): Move declaration up.
20644         (bitset_obstack_alloc): Declare that deallocation must happen through
20645         'bitset_obstack_free'.
20647 2021-08-07  Bruno Haible  <bruno@clisp.org>
20649         argv-iter: Improve GCC 11 allocation-deallocation checking.
20650         * lib/argv-iter.h (argv_iter_free): Move declaration up.
20651         (argv_iter_init_argv, argv_iter_init_stream): Declare that deallocation
20652         must happen through 'argv_iter_free'.
20654 2021-08-07  Bruno Haible  <bruno@clisp.org>
20656         argp: Improve GCC 11 allocation-deallocation checking.
20657         * lib/argp-fmtstream.h (__argp_fmtstream_free, argp_fmtstream_free):
20658         Move declarations up.
20659         (__argp_make_fmtstream): Declare that deallocation must happen through
20660         '__argp_fmtstream_free'.
20661         (argp_make_fmtstream): Declare that deallocation must happen through
20662         'argp_fmtstream_free'.
20664 2021-08-07  Bruno Haible  <bruno@clisp.org>
20666         areadlink, areadlinkat: Improve GCC 11 allocation-deallocation checking.
20667         * lib/areadlink.h: Include <stdlib.h> instead of <stddef.h>.
20668         (areadlink, areadlink_with_size, areadlinkat, areadlinkat_with_size):
20669         Declare that deallocation must happen through 'free'.
20671 2021-08-07  Bruno Haible  <bruno@clisp.org>
20673         stdio: Improve GCC 11 allocation-deallocation checking.
20674         * lib/stdio.in.h (fdopen, fopen, tmpfile): Declare that deallocation
20675         must happen through 'fclose'.
20676         (popen): Declare that deallocation must happen through 'pclose'.
20677         * lib/stdio-safer.h (fopen_safer, tmpfile_safer): Declare that
20678         deallocation must happen through 'fclose'.
20679         (popen_safer): Declare that deallocation must happen through 'pclose'.
20680         (freopen_safer): Declare that arguments must be non-NULL.
20682 2021-08-07  Bruno Haible  <bruno@clisp.org>
20684         dirent: Improve GCC 11 allocation-deallocation checking.
20685         * lib/dirent.in.h (closedir): Move declaration up.
20686         (opendir, fdopendir): Declare that deallocation must happen through
20687         'closedir'.
20688         * lib/dirent-safer.h (opendir_safer): Likewise.
20689         * lib/opendirat.h (opendirat): Likewise.
20691 2021-08-07  Bruno Haible  <bruno@clisp.org>
20693         stdlib, string, wchar: Improve GCC 11 allocation-deallocation checking.
20694         * lib/stdlib.in.h (free): Move declaration up.
20695         (aligned_alloc, calloc, canonicalize_file_name, malloc, realloc):
20696         Declare that deallocation must happen through 'free' (which may actually
20697         be 'rpl_free').
20698         * lib/string.in.h: Include <stdlib.h>.
20699         (strdup): Declare deallocation.
20700         * lib/wchar.in.h: Include <stdlib.h>.
20701         (wcsdup): Declare deallocation.
20702         * lib/malloc.in.h: Include <stdlib.h>.
20703         (memalign): Declare deallocation.
20705 2021-08-07  Bruno Haible  <bruno@clisp.org>
20707         year2038: Fix recommendation regarding -m64 flag.
20708         * m4/year2038.m4 (gl_YEAR2038_BODY): Recommend to put option --m64 in
20709         CC, not in CPPFLAGS and LDFLAGS.
20711 2021-08-07  Bruno Haible  <bruno@clisp.org>
20713         quotearg: Tweak last commit.
20714         * lib/quotearg.h: Don't include <stddef.h>. Remove stray semicolon.
20716 2021-08-07  Bruno Haible  <bruno@clisp.org>
20718         malloca: Tweak last commit.
20719         * lib/malloca.h: Keep use and declaration of mmalloca close together.
20721 2021-08-07  Bruno Haible  <bruno@clisp.org>
20723         dirname-lgpl, sh-quote, system-quote, xstriconv: Clean up includes.
20724         * lib/dirname.h: Don't include <stddef.h>.
20725         * lib/sh-quote.h: Likewise.
20726         * lib/system-quote.h: Likewise.
20727         * lib/xstriconv.h: Likewise.
20729 2021-08-07  Bruno Haible  <bruno@clisp.org>
20731         dfa: Improve GCC 11 allocation-deallocation checking.
20732         * lib/dfa.h (dfamust): Declare that deallocation must happen through
20733         dfamustfree.
20735 2021-08-06  Paul Eggert  <eggert@cs.ucla.edu>
20737         glob: merge from glibc
20738         * lib/glob-libc.h, lib/glob.c: Merge changes from glibc 2.34.
20739         The result should be copyable directly into glibc.
20740         * modules/glob-h (glob-libc.gl.h): Also omit __THROWNL.
20742 2021-08-03  Simon Josefsson  <simon@josefsson.org>
20744         announce-gen: Print SHA1/B64(SHA256) instead of MD5/SHA1.
20745         * build-aux/announce-gen (%digest_classes): Removed.
20746         (usage): Doc fix.
20747         (print_checksums): Instead of MD5/SHA1, print SHA1 and
20748         B64(SHA256), inspired by OpenSSH announcements.
20750         maintainer-makefile: Print checksums by default.
20751         * top/maint.mk (announcement): Drop --no-print-checksums.
20753 2021-08-02  Paul Eggert  <eggert@cs.ucla.edu>
20755         manywarnings: enable some malloc warnings
20756         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Stop adding
20757         -Wno-analyzer-double-free, -Wno-analyzer-null-dereference, and
20758         -Wno-analyzer-use-after-free, as these false alarms don’t seem
20759         to be as much of an issue now that we’ve pacified a couple
20760         of individual modules and GCC has some bug fixes.
20762         dfa: omit unneeded malloc+free
20763         Problem indirectly found by Coverity.
20764         * lib/dfa.c (enlistnew): New function, with most of the body of
20765         the old ‘enlist’.  It assumes its arg NEW has been malloced and
20766         can be freed eventually.
20767         (enlist, addlists, dfamust): Use it.
20768         (dfamust): Omit an unnecessary malloc+free.
20770         year2038: port to unusual time_t platforms
20771         * m4/year2038.m4 (gl_YEAR2038_TEST_INCLUDES): Check that time_t
20772         can go to 2**32 - 1, not to 2**63 - 1, as the former is enough to
20773         be year 2038 safe.  Unsigned 32-bit time_t (AmigaOS) and signed
20774         40-bit time_t (Unisys ClearPath) have occurred in the wild, and
20775         even if Gnulib code is rarely or never ported to them there’s no
20776         need to exclude them merely because of year 2038 issues.
20777         (gl_YEAR2038_BODY): Adjust messages to match.  Use 2**32 - 1,
20778         not 2**32, as the test timestamp, to allow unsigned 32-bit time_t.
20780 2021-08-01  Paul Eggert  <eggert@cs.ucla.edu>
20782         xalloc: no attribute (malloc (free)) on inline
20783         The GCC manual says you can’t use __attribute__ ((__malloc__
20784         (free, 1))) on inline functions.  Problem discovered when
20785         compiling diffutils 3.8 on RHEL 8.4 using a GCC 11.2.0 that I
20786         built myself.  Perhaps the problem was not discovered earlier
20787         because the attribute works with ‘free’ (which is what I was
20788         seeing before on Fedora 34) but not with ‘rpl_free’ (seen on RHEL
20789         8.4).  Anyway, the GCC manual says it shouldn’t work at all, so
20790         don’t use it.
20791         * lib/xalloc.h (xnmalloc, xcharalloc): No longer inline.
20792         * lib/xmalloc.c (xcharalloc, xnmalloc): Move function bodies here.
20793         * m4/gnulib-common.m4 (_GL_ATTRIBUTE_DEALLOC)
20794         (_GL_ATTRIBUTE_DEALLOC_FREE): Document that these cannot be
20795         used on inline functions, as per the GCC 11.2.1 manual.
20797         sigsegv-tests: make more things static
20798         * tests/test-sigsegv-catch-segv1.c:
20799         * tests/test-sigsegv-catch-stackoverflow1.c:
20800         * tests/test-sigsegv-catch-stackoverflow2.c:
20801         Declare some functions and variables static, to pacify GCC when
20802         warning about external functions missing declarations.
20804         maint: improve -fanalyzer malloc checking
20805         * lib/backup-internal.h, lib/backupfile.h:
20806         * lib/canonicalize.h, lib/dfa.h, lib/dirname.h, lib/exclude.h:
20807         * lib/filenamecat.h, lib/malloca.h, lib/modechange.h:
20808         * lib/mountlist.h, lib/pagealign_alloc.h, lib/quotearg.h:
20809         * lib/readutmp.h, lib/savedir.h, lib/sh-quote.h, lib/system-quote.h:
20810         * lib/trim.h, lib/xgetcwd.h, lib/xgethostname.h, lib/xmalloca.h:
20811         * lib/xreadlink.h, lib/xstriconv.h, lib/xvasprintf.h:
20812         Add malloc-related attributes and include stdlib.h as needed.
20813         * lib/dfa.c: Include verify.h.
20814         (assume_nonnull): New macro.
20815         (dfamust): Use it to pacify GCC.
20816         * lib/malloca.c (mmalloca): Redo to pacify GCC, to cut down on the
20817         number of casts, and to avoid signed integer overflow on
20818         theoretical platforms.
20819         * lib/vasnprintf.c, tests/test-argmatch.c:
20820         Disable -Wanalyzer-null-argument here.
20821         * m4/manywarnings.m4: Update GCC bug report number in comment.
20823 2021-08-01  Jim Meyering  <meyering@fb.com>
20825         regex: pacify GCC 11.2.1's -fanalyzer
20826         * lib/regex_internal.c (re_node_set_merge):
20827         Add a debug assertion to pacify GCC 11.2.1's -fanalyzer.
20829 2021-08-01  Bruno Haible  <bruno@clisp.org>
20831         limits-h tests: Add tests for BOOL_MAX and BOOL_WIDTH.
20832         * tests/test-limits-h.c (bool_attrs): New variable.
20833         Check value of BOOL_MAX.
20835 2021-07-31  Paul Eggert  <eggert@cs.ucla.edu>
20837         regex: pacify GCC 11.2 -fanalyzer
20838         * lib/regex_internal.c (re_node_set_insert):
20839         Add a debug assertion to pacify GCC 11.2 -fanalyzer.
20841         maint: pacify GCC 11.2 -fanalyzer in crypto tests
20842         * tests/bench-digest.h (main): Report an error after memory
20843         exhaustion, instead of using a null pointer.
20845 2021-07-30  Paul Eggert  <eggert@cs.ucla.edu>
20847         xalloc: add malloc-related function attributes
20848         * lib/quotearg.h, lib/xalloc.h: Include stdlib.h, for
20849         the benefit of _GL_ATTRIBUTE_RETURNS_NONNULL.
20850         * lib/quotearg.h (clone_quoting_options):
20851         * lib/xalloc.h (xmalloc, ximalloc, xzalloc, xizalloc, xcalloc)
20852         (xicalloc, xrealloc, xirealloc, xireallocarray, x2realloc)
20853         (x2nrealloc, xmemdup, ximemdup, xstrdup, xnmalloc, xcharalloc):
20854         Add _GL_ATTRIBUTE_DALLOC_FREE and _GL_ATTRIBUTE_RETURNS_NONNULL
20855         attributes as appropriate.
20857         gnulib-common: update for gcc -Wmismatched-dealloc
20858         * m4/gnulib-common.m4 (gl_COMMON_BODY): Define the macros
20859         _GL_ATTRIBUTE_DEALLOC and _GL_ATTRIBUTE_DEALLOC_FREE.  These can
20860         be useful with gcc -Wmismatched-dealloc.
20862         gnulib-common: update for C2x 2020-12-11 draft
20863         Use blessed-by-draft-standard way to test for [[__deprecated__]]
20864         etc.; this is supported by GCC 11 and the fallback code should
20865         work fine with GCC 10 and earlier.
20866         * m4/gnulib-common.m4 (gl_COMMON_BODY): Define the macro
20867         _GL_HAS_C_ATTRIBUTE, and use it instead of __STDC_VERSION__ in
20868         deciding whether to use C2x attributes like [[__deprecated__]].
20870         manywarnings: document GCC 11 warnings
20871         * build-aux/gcc-warning.spec: Add warnings introduced in GCC 11.
20872         None of them require Gnulib code changes, so this is just
20873         a documentation change.
20875         limits-h: add BOOL_MAX, BOOL_WIDTH
20876         * doc/posix-headers/limits.texi (limits.h): Document them.
20877         * lib/limits.in.h: Also define CHAR_WIDTH etc. if C2x.
20878         (BOOL_MAX, BOOL_WIDTH): New macros, from C2x.
20879         * m4/limits-h.m4 (gl_LIMITS_H): Also check BOOL_WIDTH.
20881 2021-07-28  Simon Josefsson  <simon@josefsson.org>
20883         maintainer-makefile: Respect cfg.mk setting announcement_Cc_,
20884         reverting most of the previous patch.
20885         * top/maint.mk (announcement_mail_Cc_stable): Rename back to
20886         announcement_Cc_stable.
20887         (announcement_Cc_alpha): Rename back to
20888         announcement_mail_Cc_alpha.
20889         (announcement_Cc_): Renamed from announcement_mail_Cc_.
20890         (announcement_mail_headers_stable)
20891         (announcement_mail_headers_alpha): Use announcement_Cc_ again.
20893 2021-07-28  Simon Josefsson  <simon@josefsson.org>
20895         maintainer-makefile: Fix announcement mail CC's.
20896         * top/maint.mk (announcement_Cc_stable): Rename to
20897         announcement_mail_Cc_stable.
20898         (announcement_Cc_alpha): Rename to announcement_mail_Cc_alpha.
20899         (announcement_mail_headers_stable)
20900         (announcement_mail_headers_alpha): Use announcement_mail_Cc_
20901         instead of announcement_Cc_.
20903 2021-07-25  Bruno Haible  <bruno@clisp.org>
20905         Assume GNU gettext >= 0.17.
20906         * modules/vasprintf (Notice): Remove.
20907         * modules/xvasprintf (Notice): Remove.
20908         * modules/xprintf (Notice): Remove.
20909         * modules/error (Notice): Remove.
20910         * modules/verror (Notice): Remove.
20911         * modules/argp (Notice): Remove.
20912         * modules/propername (Notice): Remove.
20913         * lib/propername.h: Remove outdated comment.
20915 2021-07-19  Simon Josefsson  <simon@josefsson.org>
20917         gendocs.sh: Fix local rendering of HTML manuals.
20918         * build-aux/gendocs.sh (htmlarg): Don't use relative URLs.
20920 2021-07-18  Paul Eggert  <eggert@cs.ucla.edu>
20922         explicit_bzero-tests: pacify GCC better
20923         Problem reported by Bruno Haible in:
20924         https://lists.gnu.org/r/bug-gnulib/2021-07/msg00039.html
20925         * tests/test-explicit_bzero.c: Ignore -Wmaybe-uninitialized.
20926         (stackbuf): Remove this static pointer, reverting recent change.
20927         (do_secret_stuff, test_stack): Revert these related changes too.
20929 2021-07-17  Paul Eggert  <eggert@cs.ucla.edu>
20931         memrchr-tests: pacify GCC
20932         Pacify GCC 11.1.1 20210531 (Red Hat 11.1.1-3) x86-64.
20933         * tests/test-memrchr.c: Disable -Wmaybe-uninitialized.
20935         explicit_bzero-tests: pacify GCC
20936         Redo to pacify -Wmaybe-uninitialized with
20937         GCC 11.1.1 20210531 (Red Hat 11.1.1-3) x86-64.
20938         * tests/test-explicit_bzero.c (stackbuf): New static pointer.
20939         (do_secret_stuff): Use it.
20940         (test_stack): Set it to a local buffer.
20942         posixtm: pacify latest GCC
20943         Also, modernize while I’m at it.
20944         * lib/posixtm.c: Include c-ctype.h, idx.h, intprops.h, verify.h
20945         instead of stdlib.h.
20946         (ISDIGIT): Remove.  All uses replaced by c_isdigit.
20947         (year, posix_time_parse): Prefer idx_t to size_t.  Use assume
20948         instead of abort.
20949         (posixtime): Do not parse twice; once is enough.  That way, we
20950         needn’t worry about a bogus warning about strcpy overrunning a
20951         buffer from GCC 11.1.1 20210531 (Red Hat 11.1.1-3) x86-64
20952         when coreutils is configured with --enable-gcc-warnings.
20953         * modules/posixtm (Depends-on): Add c-ctype, intprops, verify.
20954         Remove stpcpy.
20956 2021-07-17  Bruno Haible  <bruno@clisp.org>
20958         Don't use '#pragma weak' for thread functions in Linux/glibc>=2.34.
20959         Suggested by Florian Weimer <fweimer@redhat.com> in
20960         <https://lists.gnu.org/archive/html/bug-gnulib/2021-04/msg00211.html>.
20961         * m4/threadlib.m4 (gl_PTHREADLIB_BODY): Set gl_pthread_in_glibc and set
20962         LIBPMULTITHREAD accordingly.
20963         (gl_STDTHREADLIB_BODY): Update comments.
20964         (gl_THREADLIB_BODY): Define USE_POSIX_THREADS_FROM_LIBC.
20965         * lib/glthread/thread.h (c11_threads_in_use): Define to 1 if all POSIX
20966         thread functions are in libc.
20967         * lib/glthread/lock.h (c11_threads_in_use): Likewise.
20968         * lib/glthread/cond.h (c11_threads_in_use): Likewise.
20969         * lib/glthread/tls.h (c11_threads_in_use): Likewise.
20971 2021-07-17  Bruno Haible  <bruno@clisp.org>
20973         Fix cross-compilation test results.
20974         * m4/memmem.m4 (gl_FUNC_MEMMEM_SIMPLE): When cross-compiling, include
20975         <string.h> before testing __GNU_LIBRARY__.
20976         * m4/strstr.m4 (gl_FUNC_STRSTR_SIMPLE): Likewise.
20977         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR_SIMPLE): Likewise.
20979 2021-07-14  Paul Eggert  <eggert@cs.ucla.edu>
20981         regex: modernize to newer regex bugset
20982         Problem reported by Hiroo Hayashi in:
20983         https://lists.gnu.org/r/bug-gnulib/2021-07/msg00024.html
20984         * m4/regex.m4 (gl_REGEX): Allow newer glibc behavior for ()0|\1,
20985         behavior where the regex compiles but does not match.
20986         Test for glibc bug 11053.
20987         * tests/test-regex.c (bug_regex11, main): Add casts needed
20988         for printf portability.
20989         (main): Allow newer glibc behavior for ()0|\1.
20991         regex: fix shell quoting problem in configuration
20992         * m4/regex.m4 (gl_REGEX): Fix quoting problems.
20993         These C programs are put into unquoted here-documents,
20994         so $ and \ need to be quoted.
20996 2021-07-08  Paul Eggert  <eggert@cs.ucla.edu>
20998         select: port better to MinGW
20999         Problem reported by Eli Zaretskii in:
21000         https://lists.gnu.org/r/bug-gnulib/2021-07/msg00017.html
21001         * lib/select.c (rpl_select) [_WIN32 && !__CYGWIN__]:
21002         Pass a SOCKET, not a HANDLE, to FD_ISSET.
21004 2021-07-06  Paul Eggert  <eggert@cs.ucla.edu>
21006         year2038: Add --disable-year2038 option
21007         Also, document this stuff better.  Suggested by Bruno Haible in:
21008         https://lists.gnu.org/r/bug-gnulib/2021-07/msg00011.html
21009         * doc/year2038.texi: Document --disable-year2038.
21010         * m4/year2038.m4 (gl_YEAR2038_BODY): Support ‘./configure
21011         --disable-year2038’ to disable 64-bit time_t when that is not the
21012         default.  Arg is now either empty or nonempty (not a shell
21013         command) and is evaluated at m4 expansion time instead of at
21014         runtime; all callers changed.
21016         doc: clarify which module fixes 32-bit time_t
21017         * doc/posix-headers/time.texi: Make it clear that the 32-bit
21018         time_t problem is addressed by the year2038 module, not
21019         by the time module.
21021 2021-07-01  Paul Eggert  <eggert@cs.ucla.edu>
21023         year2038: support glibc 2.34 _TIME_BITS=64
21024         In glibc 2.34 on Linux kernels where time_t is traditionally 32-bit,
21025         defining _FILE_OFFSET_BITS=64 and _TIME_BITS=64 makes time_t 64-bit.
21026         Apps must define both macros.  Gnulib applications that use either
21027         the largefile or the year2038 modules will want this behavior;
21028         largefile because it deals with the off_t and ino_t components of
21029         struct stat already, and so should also deal with time_t.
21030         * NEWS, doc/largefile.texi, doc/posix-headers/time.texi:
21031         Mention this.
21032         * m4/largefile.m4: Override two macros even in Autoconf 2.70 and later.
21033         (_AC_SYS_LARGEFILE_MACRO_VALUE): #undef $1 before #defining it, in
21034         case some other Gnulib macro has #defined it.
21035         (AC_SYS_LARGEFILE): Use AS_IF and AS_CASE to propagate AC_REQUIREs.
21036         Invoke gl_YEAR2038_BODY if we need to set _FILE_OFFSET_BITS=64.
21037         * m4/year2038.m4 (gl_YEAR2038_TEST_INCLUDES): New macro.
21038         (gl_YEAR2038_BODY): New macro, with gl_YEAR2038’s old body; this
21039         macro is designed to be used directly instead of being
21040         AC_REQUIREd.  It takes an argument specifying whether 64-bit is
21041         required.  Set _TIME_BITS=64 if this makes a difference in time_t
21042         width when setting _FILE_OFFSET_BITS=64.  Do not warn about
21043         32-bit time_t more than once.
21044         * modules/largefile (Files): Add year2038.m4.
21045         (Depends-on): Require gl_YEAR2038_EARLY.
21047         relocatable-prog-wrapper: add m4 files
21048         Add .m4 files needed for standalone relocatable-prog-wrapper, so
21049         that ‘./gnulib-tool --test relocatable-prog-wrapper’ does not fail
21050         with diagnostics like ‘configure.ac:63: error: possibly undefined
21051         macro: gl_FUNC_MALLOC_POSIX’.
21052         * modules/relocatable-prog-wrapper (Files): Add m4/free.m4,
21053         m4/malloc.m4, m4/mempcpy.m4, m4/rawmemchr.m4, m4/realloc.m4.
21055 2021-06-28  Bruno Haible  <bruno@clisp.org>
21057         strerror-override: Fix possible compilation error.
21058         Reported by Thomas Klausner <wiz@netbsd.org>.
21059         * lib/strerror-override.h (GNULIB_defined_strerror_override_macro): New
21060         macro.
21061         * lib/strerror-override.c (strerror_override): Don't define if
21062         GNULIB_defined_strerror_override_macro is set.
21064 2021-06-27  Bruno Haible  <bruno@clisp.org>
21066         environ: Fix wrong autoconf test result in C++ mode.
21067         * m4/environ.m4 (gt_CHECK_VAR_DECL): Use a typedef'ed type, not an
21068         anonymous type.
21070 2021-06-22  Egor Ignatov  <egori@altlinux.org>  (tiny change)
21072         regex: fix undefined behavior
21073         Problem reported by Paul Eggert in:
21074         https://lists.gnu.org/r/bug-gnulib/2021-06/msg00115.html
21075         * lib/regexec.c (proceed_next_node):
21076         Don’t insert already-inserted node.
21078 2021-06-21  Eric Blake  <eblake@redhat.com>
21080         sigsegv, sigsegv-tests: Assign my contributions to the FSF.
21081         * m4/sigaltstack.m4: Change copyright notice: Write "Copyright (C) FSF"
21082         instead of "Copyright (C) Eric Blake".
21083         * tests/altstack-util.h: Likewise.
21084         * tests/test-sigsegv-catch-stackoverflow1.c: Likewise.
21085         * tests/test-sigsegv-catch-stackoverflow2.c: Likewise.
21087 2021-06-20  Bruno Haible  <bruno@clisp.org>
21089         unistd: Avoid compilation error in C++ mode on Solaris, HP-UX, mingw.
21090         Reported by Eli Zaretskii <eliz@gnu.org> in
21091         <https://lists.gnu.org/archive/html/bug-gnulib/2021-03/msg00135.html>.
21092         * lib/unistd.in.h (swab): Consider different declarations on Solaris,
21093         HP-UX, and old mingw.
21095 2021-06-20  Bruno Haible  <bruno@clisp.org>
21097         Sync with GNU gettext.
21098         * lib/printf-parse.c: Ignore IN_LIBINTL and IN_LIBASPRINTF.
21099         * lib/vasnprintf.c: Ignore IN_LIBINTL.
21101 2021-06-19  Bruno Haible  <bruno@clisp.org>
21103         Sync with GNU gettext.
21104         * lib/tsearch.c: Ignore IN_LIBINTL.
21105         * lib/localename-table.h: Likewise.
21106         * lib/localename.c: Ignore IN_LIBINTL in some places.
21108 2021-06-19  Bruno Haible  <bruno@clisp.org>
21110         unistd: Improve conflict resolution between gnulib and textstyle.h.
21111         * lib/unistd.in.h (GNULIB_overrides_isatty): New macro.
21113 2021-06-19  Bruno Haible  <bruno@clisp.org>
21115         stdio: Improve conflict resolution between gnulib and libintl.h.
21116         * lib/stdio.in.h (GNULIB_overrides_snprintf, GNULIB_overrides_sprintf,
21117         GNULIB_overrides_asprintf, GNULIB_overrides_vasprintf,
21118         GNULIB_overrides_vsnprintf, GNULIB_overrides_vsprintf): New macros.
21120 2021-06-19  Bruno Haible  <bruno@clisp.org>
21122         declared.sh: Allow parsing 'extern "C"' lines.
21123         * build-aux/declared.sh: Don't concatenate lines to an 'extern "C" {'
21124         line.
21126 2021-06-19  Bruno Haible  <bruno@clisp.org>
21128         unitypes: Fix trouble caused by installed older versions of unitypes.h.
21129         * modules/unitypes (configure.ac): Define _UC_RESTRICT through config.h.
21131 2021-06-19  Bruno Haible  <bruno@clisp.org>
21133         sigsegv, sigsegv-tests: Assign my contributions to the FSF.
21134         * lib/sigsegv.in.h: Change copyright notice: Write "Copyright (C) FSF"
21135         instead of "Copyright (C) Bruno Haible".
21136         * lib/sigsegv.c: Likewise.
21137         * lib/stackvma.h: Likewise.
21138         * lib/stackvma.c: Likewise.
21139         * m4/sigaltstack.m4: Likewise.
21140         * m4/stack-direction.m4: Likewise.
21141         * tests/altstack-util.h: Likewise.
21142         * tests/mmap-anon-util.h: Likewise.
21143         * tests/test-sigsegv-catch-segv1.c: Likewise.
21144         * tests/test-sigsegv-catch-segv2.c: Likewise.
21145         * tests/test-sigsegv-catch-stackoverflow1.c: Likewise.
21146         * tests/test-sigsegv-catch-stackoverflow2.c: Likewise.
21148 2021-06-18  Darren Kenny  <darren.kenny@oracle.com>  (tiny change)
21150         argp: Avoid possible NULL access in argp_help.
21151         Reported by Coverity. The invocation chain is:
21152         argp_help -> _help -> fill_in_uparams -> validate_uparams.
21153         * lib/argp-help.c (validate_uparams): Don't crash if state == NULL.
21155 2021-06-16  Bruno Haible  <bruno@clisp.org>
21157         tsearch: Relicense under LGPLv2+.
21158         * modules/tsearch (License): Change to LGPLv2+.
21159         * lib/tsearch.c: Update license notice.
21161 2021-06-15  Bruno Haible  <bruno@clisp.org>
21163         pipe-filter-ii tests: Fix long-standing failure on native Windows.
21164         * tests/test-pipe-filter-ii2-main.c: Include binary-io.h.
21165         (main): Avoid NL to CRLF conversion on standard output.
21166         * tests/test-pipe-filter-ii2-child.c: Include <unistd.h>, binary-io.h.
21167         (main): Avoid NL to CRLF conversion on standard output.
21169 2021-06-15  Bruno Haible  <bruno@clisp.org>
21171         xnanosleep: Improve module description.
21172         * modules/xnanosleep (Description): Improve.
21173         * lib/xnanosleep.h: Add comment. Make includable from C++.
21174         * lib/xnanosleep.c: Update comment.
21176 2021-06-15  Bruno Haible  <bruno@clisp.org>
21178         xfreopen: Improve module description.
21179         * modules/xfreopen (Description): Improve.
21180         * lib/xfreopen.h: Add comments. Make includable from C++.
21181         * lib/xfreopen.c: Update comment.
21183 2021-06-14  Paul Eggert  <eggert@cs.ucla.edu>
21185         idx: new printf/scanf length modifier macro
21186         * lib/idx.h (pIDX): New macro.
21188 2021-06-13  Bruno Haible  <bruno@clisp.org>
21190         Align 2011-11-26 patch to 2021-04-11 patch (regression from 2021-04-11).
21191         Reported by Paul Eggert.
21192         * m4/unistd_h.m4 (gl_UNISTD_H_REQUIRE_DEFAULTS): Also initialize
21193         GNULIB_UNISTD_H_GETOPT variable.
21194         * modules/getopt-posix (configure.ac): Set GNULIB_UNISTD_H_GETOPT
21195         variable.
21196         * modules/unistd (Makefile.am): Rely on ${gl_include_guard_prefix}
21197         processing done by gnulib-tool since 2021-04-11.
21198         * gnulib-tool: Revert last change.
21199         * pygnulib/GLEmiter.py: Likewise.
21201 2021-06-13  Paul Eggert  <eggert@cs.ucla.edu>
21203         * lib/stack.h (_GL_STACK_PREFIX): Omit stray semicolon.
21205         getopt-gnu: port back to Solaris 10
21206         * gnulib-tool (func_emit_lib_Makefile_am)
21207         (func_emit_tests_Makefile_am): Don’t substitute things like
21208         $(GNULIB_${gl_include_guard_prefix}_UNISTD_H_GETOPT),
21209         as this mishandles unistd and getopt-gnu, which breaks
21210         ‘make check’ on Solaris 10 with getopt-gnu.
21211         * pygnulib/GLEmiter.py (lib_Makefile_am, tests_Makefile_am):
21212         Likewise, albeit hackier since I did not test this and
21213         so went with a trivial hack instead.
21215 2021-06-13  Bruno Haible  <bruno@clisp.org>
21217         ialloc: Put appropriate license notice in source files.
21218         * lib/ialloc.h: Use LGPLv3+ notice.
21219         * lib/ialloc.c: Likewise.
21221 2021-06-11  Paul Eggert  <eggert@cs.ucla.edu>
21223         xalloc: new idx_t-based allocators
21224         This is for code that prefers to use idx_t for sizes.
21225         * lib/basename.c (base_name):
21226         * lib/dfa.c (mbs_to_wchar, state_index, dfaoptimize, dfaanalyze)
21227         (icatalloc, enlist, allocmust, dfamust):
21228         * lib/exclude.c (struct exclude_pattern, free_exclude_segment)
21229         (file_pattern_matches, add_exclude, add_exclude_fp):
21230         * lib/getusershell.c (line_size, readname):
21231         * lib/linebuffer.c (readlinebuffer_delim):
21232         * lib/linebuffer.h (struct linebuffer):
21233         * lib/readtokens.c (readtoken, readtokens):
21234         * lib/readutmp.c (read_utmp):
21235         * lib/savedir.c (streamsavedir):
21236         * lib/stack.h (_GL_STACK_TYPE, _GL_STACK_PREFIX):
21237         * lib/userspec.c (parse_with_separator):
21238         * lib/xgethostname.c (XGETANAME):
21239         Prefer idx_t to size_t for indexes, and use idx_t-related allocators.
21240         * lib/basename.c: Do not include xstrndup.h.
21241         (basename): Simplify by always using memcpy.
21242         * lib/xalloc.h (ximalloc, xizalloc, xicalloc, xirealloc)
21243         (xireallocarray, ximemdup, ximemdup0) [GNULIB_XALLOC]:
21244         New decls.
21245         (x2nrealloc): Now just a decl, as the body is moved into xmalloc.c.
21246         * lib/xmalloc.c: Include ialloc.h.
21247         Rename some local parameters to be consistent with the .h files.
21248         (nonnull): New static function.
21249         (xmalloc, xcalloc): Simplify by using nonnull.
21250         (ximalloc, xirealloc, xireallocarray, xizalloc, xicalloc)
21251         (ximemdup, ximemdup0): New functions.
21252         (x2nrealloc): Moved here from xalloc.h.
21253         * modules/xalloc (Depends-on): Add ialloc.
21254         * modules/dirname (Depends-on): Removbe xstrndup.
21255         * modules/linebuffer (Depends-on): Add idx.
21257         ialloc: new module
21258         * lib/ialloc.c, lib/ialloc.h, modules/ialloc: New files.
21260         exclude: improve wide-character hashing
21261         * lib/exclude.c (string_hasher_ci): Take the modulo at the end
21262         rather than each time a wide character is retrieved; this should
21263         be more efficient and should hash better.
21265 2021-06-11  Bruno Haible  <bruno@clisp.org>
21267         Make message in last commit more precise.
21268         Suggested by Eric Blake.
21269         * gnulib-tool (func_emit_tests_Makefile_am): Add more precision to
21270         'check-notice' message.
21272 2021-06-10  Bruno Haible  <bruno@clisp.org>
21274         Clarify where to report test failures from Gnulib tests.
21275         * gnulib-tool (func_emit_tests_Makefile_am): Emit a dependency of
21276         'check-am' on 'check-notice' that prints a notice.
21278 2021-06-10  Bruno Haible  <bruno@clisp.org>
21280         Clarify that compiler warnings in the Gnulib tests can be ignored.
21281         * gnulib-tool (func_emit_tests_Makefile_am): Emit overrides for CFLAGS
21282         and CXXFLAGS. Emit a dependency of 'all' on 'all-notice' that prints a
21283         notice.
21284         (func_emit_initmacro_start): Add a second argument. If it is true, emit
21285         code to require gl_CC_ALLOW_WARNINGS and gl_CXX_ALLOW_WARNINGS.
21286         (func_import, func_create_testdir): All callers updated.
21287         * m4/gnulib-common.m4 (gl_CC_ALLOW_WARNINGS, gl_CXX_ALLOW_WARNINGS): New
21288         macros.
21290 2021-06-09  Bruno Haible  <bruno@clisp.org>
21292         sigsegv tests: Hide a null pointer from the compiler's optimizations.
21293         Patch by Paul Eggert.
21294         * tests/test-sigsegv-catch-stackoverflow2.c
21295         (null_pointer_to_volatile_int): New variable.
21296         (main): Use it.
21298 2021-06-07  Bruno Haible  <bruno@clisp.org>
21300         get_ppid_of: Add support for DragonFly BSD.
21301         * lib/get_ppid_of.c: Treat DragonFly BSD like FreeBSD.
21303 2021-06-07  Bruno Haible  <bruno@clisp.org>
21305         sigsegv: Document context type for DragonFly BSD.
21306         * lib/sigsegv.in.h (stackoverflow_context_t): On DragonFly BSD, it is a
21307         pointer to 'struct sigcontext'.
21309 2021-06-07  Bruno Haible  <bruno@clisp.org>
21311         dynarray, scratch_buffer: Fix VPATH builds (regression from yesterday).
21312         * modules/dynarray (configure.ac): Invoke AC_PROG_MKDIR_P.
21313         (Makefile.am): Create malloc/ directory before creating
21314         malloc/dynarray.gl.h and malloc/dynarray-skeleton.gl.h.
21315         * modules/scratch_buffer (configure.ac): Invoke AC_PROG_MKDIR_P.
21316         (Makefile.am): Create malloc/ directory before creating
21317         malloc/scratch_buffer.gl.h.
21319 2021-06-07  Bruno Haible  <bruno@clisp.org>
21321         ptsname_r: Add support for DragonFly BSD 6.0.
21322         * lib/ptsname_r.c (__ptsname_r): Add implementation for DragonFly BSD.
21323         * tests/test-ptsname_r.c (main): Treat Dragonfly BSD like Solaris.
21325 2021-06-07  Bruno Haible  <bruno@clisp.org>
21327         Avoid some test failures on DragonFly BSD 6.0.
21328         * tests/test-c32isalnum.c (main): On Dragonfly BSD, disable tests that
21329         fail.
21330         * tests/test-c32isalpha.c (main): Likewise.
21331         * tests/test-c32islower.c (main): Likewise.
21332         * tests/test-c32isupper.c (main): Likewise.
21333         * tests/test-ptsname.c (main): Treat Dragonfly BSD like Solaris.
21335 2021-06-07  Kamil Dudka  <kdudka@redhat.com>
21337         mountlist: recognize fuse.portal as dummy file system
21338         * lib/mountlist.c [ME_DUMMY_0]: Add "fuse.portal" as
21339         a dummy file system (used in flatpak implementations).
21341 2021-06-07  Bruno Haible  <bruno@clisp.org>
21343         host-os: Add support for DragonFly BSD.
21344         * m4/host-os.m4 (gl_HOST_OS): On DragonFly BSD, set
21345         HOST_OPERATING_SYSTEM to "DragonFly BSD", not "Dragonfly".
21347 2021-06-07  Bruno Haible  <bruno@clisp.org>
21349         thread: Fix test link error on DragonFly BSD 6.0.
21350         * lib/glthread/thread.c (gl_thread_create): Moved to here...
21351         * lib/glthread/thread.h (gl_thread_create): ...from here.
21352         (_GLTHREAD_THREAD_INLINE): Remove macro.
21353         Remove _GL_INLINE_HEADER_BEGIN/END invocations.
21355 2021-06-06  Bruno Haible  <bruno@clisp.org>
21357         sigsegv: Avoid a gcc warning "declaration of 'sig' shadows a parameter".
21358         Reported by Dmitry V. Levin <ldv@altlinux.org> in
21359         <https://lists.gnu.org/archive/html/bug-gnulib/2021-06/msg00018.html>.
21360         * lib/sigsegv.c (sigsegv_handler): Use a different local variable name
21361         than 'sig'.
21363 2021-06-06  Bruno Haible  <bruno@clisp.org>
21365         scratch_buffer: Avoid conflict with prepr. macros owned by the system.
21366         * lib/scratch_buffer.h: Don't include <libc-config.h>. Define
21367         _GL_LIKELY, _GL_UNLIKELY. Include malloc/scratch_buffer.gl.h instead of
21368         malloc/scratch_buffer.h.
21369         * modules/scratch_buffer (Depends-on): Add builtin-expect.
21370         (Makefile.am): Arrange to create malloc/scratch_buffer.gl.h from
21371         malloc/scratch_buffer.h.
21373 2021-06-06  Bruno Haible  <bruno@clisp.org>
21375         dynarray: Avoid conflict with preprocessor macros owned by the system.
21376         * lib/dynarray.h: Don't include <libc-config.h>. Define _GL_LIKELY,
21377         _GL_UNLIKELY. Include malloc/dynarray.gl.h instead of malloc/dynarray.h.
21378         Include malloc/dynarray-skeleton.gl.h instead of
21379         malloc/dynarray-skeleton.c.
21380         * modules/dynarray (Depends-on): Add builtin-expect.
21381         (Makefile.am): Arrange to create malloc/dynarray.gl.h from
21382         malloc/dynarray.h and malloc/dynarray-skeleton.gl.h from
21383         malloc/dynarray-skeleton.c.
21385 2021-06-06  Bruno Haible  <bruno@clisp.org>
21387         glob-h: Avoid conflict with preprocessor macros owned by the system.
21388         This fixes a compilation error on DragonFly BSD 6.0.
21389         * lib/glob.in.h: Don't include <libc-config.h>. Don't define __USE_GNU.
21390         Include glob-libc.gl.h instead of glob-libc.h.
21391         * modules/glob-h (Makefile.am): Arrange to create glob-libc.gl.h from
21392         glob-libc.h.
21393         * lib/libc-config.h: Add comment.
21395 2021-06-06  Dmitry V. Levin  <ldv@altlinux.org>
21397         * tests/test-regex.c (tests): Add test cases for *+ and ** regressions
21398         fixed by the previous commit.
21400         * tests/test-regex.c (tests): Remove the comment saying that some tests
21401         are not used.  That comment was copied along with tests from glibc
21402         where some of these tests are commented out.
21404 2021-06-06  Egor Ignatov  <egori@altlinux.org>  (tiny change)
21406         * lib/regexec.c (set_regs): Pop if CUR_NODE has already been checked
21407         only when we have a fail stack.
21409 2021-06-05  Bruno Haible  <bruno@clisp.org>
21411         lib-symbol-visibility: Make configure check work for newer GCC.
21412         Reported by Ozkan Sezer <sezeroz@gmail.com> in
21413         <https://lists.gnu.org/archive/html/bug-gnulib/2021-05/msg00117.html>.
21414         * m4/visibility.m4 (gl_VISIBILITY): Add a function definition for each
21415         declaration in the test program.
21417 2021-06-05  Bruno Haible  <bruno@clisp.org>
21419         vasnprintf: Don't leak memory when memory allocation fails.
21420         Found by Coverity. Reported by Mike Fabian <mfabian@redhat.com> in
21421         <https://lists.gnu.org/archive/html/bug-libunistring/2021-06/msg00000.html>.
21422         * lib/vasnprintf.c (VASNPRINTF): In places where a local variable points
21423         to heap-allocated storage, free that storage before doing
21424         'goto out_of_memory;'.
21426 2021-06-04  Bruno Haible  <bruno@clisp.org>
21428         gnulib-tool: Stop doing license notice replacements.
21429         * gnulib-tool: Don't document --more-symlinks and --more-hardlinks any
21430         more.
21431         (do_copyrights): Remove variable.
21432         (func_import): Don't perform license updates on imported files any more.
21433         * pygnulib/GLInfo.py: Don't document --more-symlinks any more.
21434         * doc/gnulib-intro.texi (Copyright): Document the new situation.
21435         * doc/gnulib.texi (Module description): Likewise.
21436         * NEWS: Mention the change.
21438 2021-06-04  Bruno Haible  <bruno@clisp.org>
21440         git-merge-changelog: Fix license.
21441         * modules/git-merge-changelog (License): Change back to GPL.
21442         * lib/git-merge-changelog.c: Use a GPLv3+ notice.
21444 2021-06-04  Bruno Haible  <bruno@clisp.org>
21446         Put GPLv3+ notices in source files where appropriate.
21447         * lib/*.{h,c}: Use GPLv3+ notice whenever the module description says
21448         so.
21449         * build-aux/pmccabe.css: Likewise.
21451 2021-06-04  Bruno Haible  <bruno@clisp.org>
21453         Put LGPLv3+ notices in source files where appropriate.
21454         * lib/*.{h,c}: Use LGPLv3+ notice whenever the module description says
21455         so.
21457 2021-06-04  Bruno Haible  <bruno@clisp.org>
21459         Put "LGPLv3+ or GPLv2+" notices in source files where appropriate.
21460         * lib/**.{h,c,gperf}: Use "LGPLv3+ or GPLv2+" notice whenever the module
21461         description says so.
21463 2021-06-04  Bruno Haible  <bruno@clisp.org>
21465         Generate correct license notices in libunistring files.
21466         * lib/gen-uni-tables.c (output_library_license, output_tests_license):
21467         New functions.
21468         (output_predicate, output_category, output_combclass,
21469         output_bidi_category, output_decimal_digit, output_digit,
21470         output_numeric, output_mirror, output_joining_type,
21471         output_joining_group, output_scripts, output_scripts_byname,
21472         output_blocks, output_ident_category, output_lbrk_tables,
21473         output_wbrk_tables, output_gbp_table, output_decomposition_tables,
21474         output_composition_tables, output_simple_mapping, output_casing_rules):
21475         Invoke output_library_license.
21476         (output_predicate_test, output_decimal_digit_test, output_digit_test,
21477         output_numeric_test, output_joining_type_test,
21478         output_joining_group_test, output_gbp_test, output_simple_mapping_test):
21479         Invoke output_tests_license.
21480         * lib/uni*/*.h, lib/uni*/*.gperf: Regenerated.
21481         * tests/uni*/*.h: Likewise.
21483 2021-06-04  Bruno Haible  <bruno@clisp.org>
21485         Generate correct license notices in libunistring files.
21486         * lib/uniname/gen-uninames.lisp (main): Emit a copyright and license
21487         notice.
21488         * lib/uniname/uninames.h: Regenerated.
21490 2021-06-04  Bruno Haible  <bruno@clisp.org>
21492         Put LGPLv2+ notices in source files where appropriate.
21493         * lib/**.{h,c,gperf}: Use LGPLv2+ notice whenever the module description
21494         says so.
21496 2021-06-04  Bruno Haible  <bruno@clisp.org>
21498         Put "unlimited" notices in source files where appropriate.
21499         * build-aux/prefix-gnulib-mk: Use "unlimited" notice, since the module
21500         description says so.
21502 2021-06-04  Bruno Haible  <bruno@clisp.org>
21504         Put public domain notices in source files where appropriate.
21505         * lib/{alloca.c,atexit.c,memmove.c}: Use public domain notice.
21507 2021-06-04  Bruno Haible  <bruno@clisp.org>
21509         Revamp check-copyright script.
21510         * check-copyright: Search only the first 50 lines of each file.
21511         Recognize 'LGPLv3+ or GPLv2+', 'unlimited', and 'public domain' license
21512         notices. For files that are part of several modules, consider the
21513         weakest among the licenses. Allocate more room for the first output
21514         column.
21516 2021-06-04  Bruno Haible  <bruno@clisp.org>
21518         gnupload, git-merge-changelog: Fix module description.
21519         * gnulib-tool (func_import, func_create_testdir): Treat
21520         'GPLv2+ build tool' like 'GPLed build tool'.
21521         * pygnulib/GLImport.py (prepare): Likewise.
21522         * modules/gnupload (License): Change to 'GPLv2+ build tool'.
21523         * modules/git-merge-changelog (License): Change to GPLv2+.
21525 2021-06-04  Bruno Haible  <bruno@clisp.org>
21527         New directory with license notices.
21528         * etc/license-notices/*: New files.
21530 2021-05-30  Paul Eggert  <eggert@cs.ucla.edu>
21532         reallocarray-tests: port to weird platforms
21533         * tests/test-reallocarray.c (main): Don’t assume that
21534         PTRDIFF_MAX / 2 + 1 <= SIZE_MAX.  POSIX allows platforms
21535         where this isn’t true, though I don’t know of any examples.
21537         dfa, etc.: prefer xreallocarray to older name
21538         * lib/dfa.c (addtok_mb, realloc_trans_if_necessary, enlist):
21539         * lib/readtokens.c (readtokens):
21540         * tests/uninorm/test-u32-normalize-big.c:
21541         (read_normalization_test_file):
21542         Prefer xreallocarray to the equivalent xnrealloc.
21543         The newer name follows the glibc lead of ‘reallocarray’.
21545 2021-05-30  Bruno Haible  <bruno@clisp.org>
21547         Write 'LGPLv3+ or GPLv2+' instead of 'LGPLv3+ or GPLv2'.
21548         * modules/* (License): Change.
21549         * gnulib-tool (func_import, func_create_testdir): Likewise.
21551 2021-05-29  Paul Eggert  <eggert@cs.ucla.edu>
21553         sigsegv: Port to Solaris 11
21554         Problem reported by Kiyoshi KANAZAWA in:
21555         https://lists.gnu.org/r/bug-m4/2021-05/msg00020.html
21556         * lib/stackvma.c (_FILE_OFFSET_BITS): #undef on Solaris and Android.
21558 2021-05-24  Bruno Haible  <bruno@clisp.org>
21560         c-stack: Document another restriction.
21561         Triggered by a discussion with Paul Eggert.
21562         * lib/c-stack.h: Mention that ACTION should not use nested functions.
21564 2021-05-22  Bruno Haible  <bruno@clisp.org>
21566         stdio: Fix compilation error on DragonFly BSD.
21567         * lib/stdio.in.h (fcloseall): Treat DragonFly BSD like FreeBSD.
21569 2021-05-22  Larkin Nickle  <me@larbob.org>  (tiny change)
21571         getprogname: port to Tru64
21572         * lib/getprogname.c: Treat __osf__ like __sgi, except
21573         with /proc/123 instead of /proc/pinfo/123.
21575 2021-05-21  Paul Eggert  <eggert@cs.ucla.edu>
21577         sigsegv: don’t assume SIGSTKSZ is a constant
21578         * m4/sigaltstack.m4 (SV_SIGALTSTACK): Don’t attempt to override
21579         SIGSTKSZ.  Instead, use an array that is plenty large, while
21580         checking that it’s large enough.  Also, be consistent about
21581         putting that array in static storage rather than on the stack.
21582         * tests/altstack-util.h (SIGSTKSZ): Don’t define.
21583         (MYSTACK_SIZE): New macro, used instead of SIGSTKSZ.
21584         (mystack_storage, mystack): Now static.
21585         (prepare_alternate_stack) [SIGSTKSZ]:
21586         Check that MYSTACK_SIZE is large enough.
21588 2021-05-20  Paul Eggert  <eggert@cs.ucla.edu>
21590         fstatat: doc improvement
21591         * doc/posix-functions/fstatat.texi (fstatat):
21592         Mention AT_EMPTY_PATH when talking about empty strings.
21594 2021-05-18  Bruno Haible  <bruno@clisp.org>
21596         c-stack: Support catching stack overflow on most platforms without libsigsegv.
21597         * lib/c-stack.c: Remove all Solaris-specific code. Include <sigsegv.h>
21598         always.
21599         * m4/c-stack.m4: Remove all Solaris-specific code.
21600         (gl_C_STACK): Test $with_libsigsegv from module 'sigsegv'.
21601         * modules/c-stack (Files): Remove m4/libsigsegv.m4.
21602         (Depends-on): Add sigsegv. Remove havelib, intprops, inttypes, mempcpy,
21603         sigaction, stdbool.
21605 2021-05-16  Bruno Haible  <bruno@clisp.org>
21607         sigsegv, c-stack: Avoid compilation error with glibc >= 2.34.
21608         * lib/sigsegv.in.h (SIGSTKSZ): On glibc systems, redefine to a suitable
21609         constant.
21610         * m4/sigaltstack.m4 (SV_SIGALTSTACK): Likewise.
21611         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Likewise.
21613 2021-05-16  Bruno Haible  <bruno@clisp.org>
21615         sigsegv: Add tests.
21616         * tests/test-sigsegv-catch-segv1.c: New file, from GNU libsigsegv with
21617         modifications.
21618         * tests/test-sigsegv-catch-segv2.c: Likewise.
21619         * tests/test-sigsegv-catch-stackoverflow1.c: Likewise.
21620         * tests/test-sigsegv-catch-stackoverflow2.c: Likewise.
21621         * tests/altstack-util.h: Likewise.
21622         * tests/mmap-anon-util.h: Likewise.
21623         * modules/sigsegv-tests: New file.
21625         sigsegv: New module.
21626         * lib/sigsegv.in.h: New file, from GNU libsigsegv with modifications.
21627         * lib/sigsegv.c: Likewise.
21628         * lib/stackvma.h: Likewise.
21629         * lib/stackvma.c: Likewise.
21630         * m4/sigaltstack.m4: Likewise.
21631         * m4/stack-direction.m4: Likewise.
21632         * modules/sigsegv: New file.
21634 2021-05-15  Pádraig Brady  <P@draigBrady.com>
21636         realloc-gnu: avoid glibc MALLOC_CHECK_ issue
21637         * tests/test-realloc-gnu.c (main): if MALLOC_CHECK_ env var
21638         is set then don't check ENOMEM is returned from realloc().
21639         See https://sourceware.org/bugzilla/show_bug.cgi?id=27870
21640         Note it doesn't suffice to unsetenv() this var within the program,
21641         as the hooks have already been set up at that stage.
21643 2021-05-14  Paul Eggert  <eggert@cs.ucla.edu>
21645         c-stack: work around Solaris 11 bugs
21646         Problem reported by Bruno Haible in:
21647         https://lists.gnu.org/r/bug-gnulib/2021-05/msg00062.html
21648         * lib/c-stack.c: Always include sigsegv.h if HAVE_LIBSIGSEGV.
21649         (USE_LIBSIGSEGV): Do not use libsigsegv if the kernel
21650         has the si_addr bug and libsigsegv is too old to work
21651         around it.
21652         (segv_handler) [!USE_LIBSIGSEGV]: Do not trust si_addr
21653         if BOGUS_SI_ADDR_UPON_STACK_OVERFLOW.
21654         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC):
21655         Define BOGUS_SI_ADDR_UPON_STACK_OVERFLOW on Solaris 2.11 SPARC.
21656         And do not define HAVE_XSI_STACK_OVERFLOW_HEURISTIC.
21658 2021-05-14  Bruno Haible  <bruno@clisp.org>
21660         fcntl tests: Avoid failure in MacPorts.
21661         Reported by Nicholas Gaya <nicholasgaya@gmail.com> in
21662         <https://lists.gnu.org/archive/html/bug-gnulib/2021-05/msg00014.html>.
21663         * tests/test-fcntl.c (main): Close fd 10 before assuming that it is
21664         closed.
21665         * tests/test-execute-main.c: Update comment.
21667 2021-05-14  Bruno Haible  <bruno@clisp.org>
21669         linked-list-unportable-test: New module.
21670         * modules/linked-list-unportable-tests: New file, based on
21671         modules/linked-list-tests.
21672         * modules/linked-list-tests: Remove the unportable tests from here.
21673         Depend on linked-list-unportable-tests.
21675 2021-05-14  Simon Josefsson  <simon@josefsson.org>
21677         valgrind-tests: Doc fix and introduce AM_VALGRINDFLAGS.
21678         * doc/valgrind-tests.texi (Using valgrind automatically): Clarify
21679         when the parallel vs serial test harness is used, suggested by
21680         Bruno Haible <bruno@clisp.org>.
21681         * m4/valgrind-tests.m4: Add VALGRIND_PROGRAM and AM_VALGRINDFLAGS.
21683 2021-05-14  Bruno Haible  <bruno@clisp.org>
21685         malloc-gnu, realloc-gnu, calloc-gnu: Ensure errno gets set to ENOMEM.
21686         * m4/malloc.m4 (gl_CHECK_MALLOC_POSIX): Set gl_cv_func_malloc_posix to
21687         'no' also on Solaris.
21689 2021-05-14  Bruno Haible  <bruno@clisp.org>
21691         DEPENDENCIES: Mention the requirement for 'join'.
21692         Reported by Simon Josefsson <simon@josefsson.org> in
21693         <https://lists.gnu.org/archive/html/bug-gnulib/2021-05/msg00047.html>.
21694         * DEPENDENCIES: Mention 'join' among the core POSIX utilities.
21696 2021-05-14  Bruno Haible  <bruno@clisp.org>
21698         *alloc-gnu tests: Use ASSERT macro.
21699         * tests/test-malloc-gnu.c: Include "macros.h".
21700         (main): Use ASSERT.
21701         * tests/test-calloc-gnu.c: Include "macros.h".
21702         (main): Use ASSERT.
21703         * tests/test-realloc-gnu.c: Include "macros.h".
21704         (main): Use ASSERT.
21705         * tests/test-reallocarray.c: Include "macros.h".
21706         (main): Use ASSERT.
21707         * modules/malloc-gnu-tests (Files): Add tests/macros.h.
21708         * modules/calloc-gnu-tests (Files): Likewise.
21709         * modules/realloc-gnu-tests (Files): Likewise.
21710         * modules/reallocarray-tests (Files): Likewise.
21712 2021-05-14  Simon Josefsson  <simon@josefsson.org>
21714         valgrind-tests: Fix 'sh: yes: unknown operand' error.
21715         * m4/valgrind-tests.m4: Protect variable usage.
21717 2021-05-14  Simon Josefsson  <simon@josefsson.org>
21719         valgrind-tests: Fix LOG_VALGRIND when valgrind is missing.
21720         * m4/valgrind-tests.m4: Clear all variables when missing.
21722 2021-05-14  Simon Josefsson  <simon@josefsson.org>
21724         valgrind-tests: Better option handling.
21725         * m4/valgrind-tests.m4: Support new variables VALGRINDFLAGS and
21726         DEFAULT_VALGRINDFLAGS.
21727         * doc/valgrind-tests.texi (Running self-tests under valgrind):
21728         Improve.
21730 2021-05-14  Markus Mützel  <markus.muetzel@gmx.de>  (tiny change)
21732         windows-spawn: Don't assume that UNICODE is not defined.
21733         * lib/windows-spawn.h (compose_handles_block): Use type STARTUPINFOA.
21735 2021-05-13  Bruno Haible  <bruno@clisp.org>
21737         getrandom: Produce a better error code.
21738         Reported by Paul Eggert in
21739         <https://lists.gnu.org/archive/html/bug-gnulib/2021-05/msg00025.html>.
21740         * lib/getrandom.c (getrandom): When open() fails with an error that does
21741         not indicate the absence of the file, fail with that error code, not
21742         with ENOSYS.
21744 2021-05-13  Bruno Haible  <bruno@clisp.org>
21746         fstatat: Document a glibc 2.7 bug.
21747         * doc/posix-functions/fstatat.texi: Document an old glibc 2.7 bug.
21749 2021-05-13  Bruno Haible  <bruno@clisp.org>
21751         posix_spawn, posix_spawnp: Fix build error on Minix 3.3.
21752         * m4/posix_spawn.m4 (gl_POSIX_SPAWN_BODY): If posix_spawn does not exist
21753         but is declared, set REPLACE_POSIX_SPAWN.
21754         * doc/posix-functions/posix_spawn.texi: Update platforms list.
21755         * doc/posix-functions/posix_spawnp.texi: Likewise.
21757 2021-05-13  Bruno Haible  <bruno@clisp.org>
21759         reallocarray tests: Avoid test failure on NetBSD.
21760         * tests/test-reallocarray.c (main): Accept EOVERFLOW error code.
21762 2021-05-12  Bruno Haible  <bruno@clisp.org>
21764         gnulib-tool: Fail properly if the 'join' program is not found.
21765         Reported by Simon Josefsson <simon@josefsson.org> in
21766         <https://lists.gnu.org/archive/html/bug-gnulib/2021-05/msg00029.html>.
21767         * gnulib-tool: Bail out early of the 'join' program is not found.
21769 2021-05-09  Bruno Haible  <bruno@clisp.org>
21771         {realloc,calloc}-gnu: Fix autoconf macro (regression 2021-04-18).
21772         * m4/realloc.m4 (gl_FUNC_REALLOC_POSIX): Don't reset REPLACE_REALLOC
21773         to 0 if it is already 1 after gl_FUNC_REALLOC_GNU was executed.
21774         * m4/calloc.m4 (gl_FUNC_CALLOC_POSIX): Don't reset REPLACE_CALLOC
21775         to 0 if it is already 1 after gl_FUNC_CALLOC_GNU was executed.
21777         {malloc,realloc,calloc}-gnu: Fix autoconf macro (regression 2021-04-18).
21778         * m4/malloc.m4 (gl_FUNC_MALLOC_GNU): Don't assume that
21779         _AC_FUNC_MALLOC_IF expands to a single shell statement.
21780         * m4/realloc.m4 (gl_FUNC_REALLOC_GNU): Don't assume that
21781         _AC_FUNC_REALLOC_IF expands to a single shell statement.
21782         * m4/calloc.m4 (gl_FUNC_CALLOC_GNU): Don't assume that
21783         _AC_FUNC_CALLOC_IF expands to a single shell statement.
21785 2021-05-09  Bruno Haible  <bruno@clisp.org>
21787         malloc-gnu, realloc-gnu, calloc-gnu: Ensure errno gets set on IRIX.
21788         * m4/malloc.m4 (gl_CHECK_MALLOC_POSIX): Require AC_CANONICAL_HOST. Set
21789         gl_cv_func_malloc_posix to 'no' also on IRIX.
21791         malloc-gnu, realloc-gnu, calloc-gnu tests: Verify errno is set.
21792         * tests/test-malloc-gnu.c: Include <errno.h>.
21793         (main): Verify that, when an allocation larger than PTRDIFF_MAX failed,
21794         errno is ENOMEM.
21795         * tests/test-realloc-gnu.c: Likewise.
21796         * tests/test-calloc-gnu.c: Likewise.
21798 2021-05-09  Bruno Haible  <bruno@clisp.org>
21800         getrandom: Fail with ENOSYS when the system has no randomness source.
21801         * lib/getrandom.c (getrandom): When open() fails, set errno to ENOSYS.
21803 2021-05-09  Bruno Haible  <bruno@clisp.org>
21805         free tests: Avoid test failure on glibc < 2.15.
21806         * tests/test-free.c (main): Skip the hairy test on glibc < 2.15.
21808 2021-05-08  Bruno Haible  <bruno@clisp.org>
21810         Fix build error when libintl is installed.
21811         * modules/posix_spawn_file_actions_addchdir-tests (Makefile.am): Link
21812         test-posix_spawn-chdir with libintl.
21813         * modules/posix_spawn_file_actions_addfchdir-tests (Makefile.am): Link
21814         test-posix_spawn-fchdir with libintl.
21816 2021-05-07  Bruno Haible  <bruno@clisp.org>
21818         Fix build when an older libunistring is installed (regr. 2020-02-23).
21819         * modules/unitypes (configure.ac): Arrange to generate the .h file if
21820         the installed one is from a version < 0.9.11.
21821         * modules/unicase/base (configure.ac): Likewise.
21822         * modules/uniconv/base (configure.ac): Likewise.
21823         * modules/unilbrk/base (configure.ac): Likewise.
21824         * modules/uninorm/base (configure.ac): Likewise.
21825         * modules/unistdio/base (configure.ac): Likewise.
21826         * modules/unistr/base (configure.ac): Likewise.
21827         * modules/uniwbrk/base (configure.ac): Likewise.
21828         * modules/uniwidth/base (configure.ac): Likewise.
21829         * modules/unictype/base (configure.ac): Arrange to generate the .h file
21830         if the installed one is from a version < 0.9.8.
21831         * modules/unigbrk/base (configure.ac): Likewise.
21833 2021-04-30  Bruno Haible  <bruno@clisp.org>
21835         immutable: Fix crash when immmalloc() fails.
21836         Found by GCC 11 '-fanalyzer'.
21837         * lib/immutable.c (immstrdup): Don't crash when immmalloc() fails.
21839 2021-04-30  Bruno Haible  <bruno@clisp.org>
21841         supersede: Fix crash when malloc() fails.
21842         Found by GCC 11 '-fanalyzer'.
21843         * lib/supersede.c (create_temp_file): Don't crash when malloc() fails.
21845 2021-04-27  Paul Eggert  <eggert@cs.ucla.edu>
21847         libc-config: fix include problem on older Debian
21848         https://lists.gnu.org/r/bug-gnulib/2021-04/msg00198.html
21849         * lib/cdefs.h: Use __GNULIB_CDEFS, not __GLIBC__,
21850         to determine whether to include the bits/* files.
21851         * lib/libc-config.h (__WORDSIZE): Remove.
21852         (__GNULIB_CDEFS): New macro.
21854 2021-04-26  Paul Eggert  <eggert@cs.ucla.edu>
21856         gnulib-tool: port better to current Autoconf
21857         * doc/gnulib-tool.texi (Initial import): Don’t mention
21858         AC_PROG_CC_STDC as it’s deprecated in current Autoconf.
21859         * gnulib-tool (func_done_dir): Suggest replacing
21860         AC_PROG_CC_STDC and AC_PROG_CC_C99, as per current Autoconf.
21862 2021-04-25  Paul Eggert  <eggert@cs.ucla.edu>
21864         reallocarray: a bit more tuning
21865         * lib/reallocarray.c: Include intprops.h.
21866         (reallocarray): Use INT_MULTIPLY_WRAPV instead of
21867         xalloc_oversized, as it now suffices and is likely a bit more
21868         efficient (five fewer machine insns on Ubuntu 20.10 x86-64).
21869         * modules/reallocarray (Depends-on): Depend on intprops, not
21870         xalloc-oversized.  Use conditional dependencies to avoid building
21871         realloc-gnu when not needed.
21873         reallocarray: don’t crash if item size is 0
21874         This problem affects only platforms where xalloc_oversized
21875         divides a number by the size arg.  Fix this by defining
21876         xalloc_oversized (n, s) to work even if s == 0.
21877         * lib/malloca.h, lib/xalloc-oversized.h: Document new behavior.
21878         * lib/xalloc-oversized.h (__xalloc_oversized): Do not crash if S==0.
21879         * tests/test-reallocarray.c (main): Test for the bug.
21881 2021-04-24  Paul Eggert  <eggert@cs.ucla.edu>
21883         xmalloca, etc.: avoid unlikely trap
21884         * lib/malloca.h (nmalloca):
21885         * lib/xmalloca.h (xnmalloca):
21886         Use size_t, not ptrdiff_t, to avoid implementation-defined
21887         behavior (which could include a trap) if N is 0 and S exceeds
21888         PTRDIFF_MAX.
21889         * lib/xalloc-oversized.h: Adjust comment to match.
21891         xmalloca, etc.: fix some xalloc-oversized issues
21892         * lib/malloca.h (nmalloca):
21893         * lib/xmalloca.h (xnmalloca): Convert S to ptrdiff_t to avoid
21894         arithmetic overflow if N and S are both narrower than ptrdiff_t.
21895         * lib/xalloc-oversized.h (xalloc_oversized):
21896         Don’t say that args must be ptrdiff_t or size_t or wider.
21897         The macro returns the correct answer even when that is not
21898         the case, and it’s the caller’s responsibility to avoid
21899         howlers like (xalloc_oversized (n, s) ? NULL : malloc (n * s))
21900         when N and S are both narrower than ptrdiff_t and size_t.
21901         Add a comment to that effect.
21902         * lib/xmalloca.h: Include xalloc-oversized.h, since this file uses
21903         xalloc_oversized.  Add comments about side effects and avoid
21904         unnecessary parens.
21905         * modules/xmalloca (Depends-on): Add xalloc-oversized.
21907         reallocarray: check for ptrdiff_t overflow
21908         * doc/glibc-functions/reallocarray.texi (reallocarray):
21909         Mention ptrdiff_t overflow.
21910         * lib/reallocarray.c (reallocarray): Reindent as per usual GNU.
21911         * lib/stdlib.in.h (reallocarray): Allow reallocarray to be replaced.
21912         * m4/reallocarray.m4 (gl_FUNC_REALLOCARRAY):
21913         Check for ptrdiff_t overflow.
21914         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Set up REPLACE_REALLOCARRAY.
21915         * modules/reallocarray (Files): Add malloc.m4.
21916         (configure.ac): Also test REPLACE_REALLOCARRAY.
21917         * modules/reallocarray-tests (Depends-on): Add stdint.
21918         * modules/stdlib (stdlib.h): Substitute REPLACE_REALLOCARRAY.
21919         * tests/test-reallocarray.c: Include stdint.h.
21920         (main): Check for ptrdiff_t overflow.
21922         calloc-gnu-tests: add overflow tests
21923         * tests/test-calloc-gnu.c (identity): New function, replacing ‘eight’.
21924         (main): Do 2 * log2(SIZE_MAX) tests instead of just two tests.
21925         Don’t bother to free on failure.
21927 2021-04-22  Paul Eggert  <eggert@cs.ucla.edu>
21929         libc-config: port better to Fedora Rawhide
21930         Problem reported by Eric Blake in:
21931         https://lists.gnu.org/r/bug-gnulib/2021-04/msg00181.html
21932         * lib/cdefs.h: Make this closer to glibc, so that we can
21933         merge Gnulib into glibc here.
21934         (__attribute_maybe_unused__): Make identical to glibc’s
21935         definition, though with an additional comment.
21936         (__attribute_nonnull__): Add clarifying comment.
21937         Make inclusion of bits/wordsize.h, bits/long-double.h
21938         dependent on __GLIBC__, not on !__WORDSIZE.
21939         * lib/libc-config.h: Use __attribute_nonnull__,
21940         not __attribute_maybe_unused__, to detect whether
21941         to include sys/cdefs.h.
21943 2021-04-21  Paul Eggert  <eggert@cs.ucla.edu>
21945         realloc: port to AIX 7.1
21946         * lib/realloc.c (_GL_USE_STDLIB_ALLOC): Do not define.  This
21947         module relies on GNU malloc.  This fixes a test failure on AIX 7.1.
21949         malloc: simplify
21950         * lib/malloc.c: Omit unnecessary "#undef malloc".
21951         I recently introduced it by mistake.  This module defines
21952         _GL_USE_STDLIB_ALLOC and so malloc isn’t redefined to rpl_malloc.
21954         malloca: avoid ptrdiff_t overflow
21955         * lib/malloca.c: Include idx.h, intprops.h.
21956         (mmalloca): Check for ptrdiff_t overflow.  Since this module uses
21957         _GL_USE_STDLIB_ALLOC, it cannot assume GNU malloc semantics.
21958         * modules/malloca (Depends-on): Add idx, intprops.
21960         careadlinkat: avoid ptrdiff_t overflow
21961         * lib/careadlinkat.c: Include idx.h, minmax.h.
21962         (readlink_stk): Avoid ptrdiff_t overflow in object allocation.
21963         Since this module uses arbitrary allocators (including
21964         stdlib_allocator), it cannot assume GNU malloc semantics.
21965         * modules/careadlinkat (Depends-on): Add idx, minmax.
21967         execute-tests: pacify compiler
21968         * tests/test-execute-main.c (main): Use 0x7DEADBEE rather than
21969         0xDEADBEEF for nonces, to avoid provoking AIX XLC compiler warning
21970         that the latter is out of int range.
21972 2021-04-20  Paul Eggert  <eggert@cs.ucla.edu>
21974         malloc-gnu-tests, etc.: use volatile for clang
21975         In some more test locations, store the result of malloc etc. into
21976         a volatile pointer so that clang doesn’t optimize away the malloc
21977         and thus bypass the test.  This fixes a malloc-gnu test failure on
21978         macOS 11.2.3 with clang 12.0.0 on ARM.
21979         * tests/test-alloca-opt.c (do_allocation):
21980         * tests/test-malloc-gnu.c (main):
21981         * tests/test-malloca.c (do_allocation):
21982         * tests/test-realloc-gnu.c (main):
21983         * tests/test-reallocarray.c (main):
21984         * tests/test-aligned-malloc.c (main):
21985         * tests/test-aligned_alloc.c (main):
21986         Store malloc etc. results into a volatile pointer.
21988 2021-04-18  Paul Eggert  <eggert@cs.ucla.edu>
21990         malloc-gnu-tests: pacify -Walloc-size-larger-than
21991         * tests/test-malloc-gnu.c (main):
21992         * tests/test-realloc-gnu.c (main): Hide true intentions from GCC,
21993         to prevent diagnostics like “warning: argument 1 value
21994         ‘9223372036854775808’ exceeds maximum object size
21995         9223372036854775807 [-Walloc-size-larger-than=]”.
21997         safe-alloc: fix pointer implementation
21998         The old implementation assumed that all pointers use the same
21999         internal representation, but the C standard doesn’t guarantee
22000         this.  Use void * (pointer) not void ** (pointer-to-pointer) for
22001         the internal functions’ API.  The internal functions now return
22002         NULL if and only if they failed, and the macros translate that
22003         into -1 or 0 to satisfy the existing API.
22004         * doc/safe-alloc.texi (Safe Allocation Macros): Mention overflow.
22005         * lib/safe-alloc.c: Major rewrite.  Now this simply
22006         defines SAFE_ALLOC_INLINE and includes safe-alloc.h.
22007         * lib/safe-alloc.h: Include stddef.h, not stdlib.h.
22008         (SAFE_ALLOC_INLINE): New macro; use Gnulib inline function style.
22009         (safe_alloc_realloc_n): New API, which passes and returns
22010         the pointer, and which returns NULL if and only if failure occurs.
22011         (safe_alloc_check): New function.
22012         (ALLOC, ALLOC_N, ALLOC_N_UNINITIALIZED, REALLOC_N):
22013         Redo using the new API for internal functions, and using calloc
22014         which is good enough since it’s GNU-compatible now.
22015         (FREE): Expand to an expression rather than merely to something
22016         that needs a following ‘;’ to become a statement.
22017         * modules/safe-alloc (Depends-on): Add calloc-gnu.
22019         calloc-gnu: now LGPLv2+
22020         * modules/calloc-gnu (License): Change from GPL to LGPLv2+.
22021         The old value was evidently a longstanding typo, and calloc
22022         will be needed by LGPLv2+ modules that will want to rely
22023         on GNU behavior.
22025         safe-alloc: simplify via reallocarray
22026         * lib/safe-alloc.c: Do not include xalloc-oversized.h.
22027         (safe_alloc_alloc_n, safe_alloc_realloc_n):
22028         Use reallocarray to check for size or ptrdiff_t overflow.
22029         * modules/reallocarray (License): Switch from LGPL to LGPLv2+, as
22030         this is needed for safe-alloc and anyway is more appropriate for
22031         this library function common with BSD.
22032         * modules/safe-alloc (Depends-on): Depend on reallocarray
22033         rather than xalloc-oversized.
22035         xalloc-oversized: fix SIZE_MAX optimization bug
22036         * lib/xalloc-oversized.h (xalloc_count_t): Remove; no longer
22037         needed and was evidently error-prone anyway.
22038         (xalloc_oversized): Omit some over-optimization that caused
22039         SIZE_MAX to not be treated as too large (the Gnulib convention) on
22040         unusual platforms where PTRDIFF_MAX == SIZE_MAX.  This change
22041         should not affect typical platforms where PTRDIFF_MAX < SIZE_MAX.
22042         When optimizing, simply use ptrdiff_t instead of xalloc_count_t.
22044         xalloc: new function xreallocarray
22045         This is the same as xnrealloc, which perhaps should be deprecated.
22046         The name xreallocarray should be easier to remember now that
22047         reallocarray is a standard GNU function.
22048         * lib/xalloc.h [GNULIB_XALLOC]: Do not include xalloc-oversized.h.
22049         (xnmalloc, xnrealloc, x2nrealloc): Simplify by using xreallocarray.
22050         * lib/xmalloc.c (xreallocarray): New function.
22051         * modules/xalloc (Depends-on): Add reallocarray;
22052         remove xalloc-oversized.
22054         group-member: simplify via realloc-gnu
22055         * lib/group-member.c, modules/group-member:
22056         Simplify similarly to backupfile.
22058         backupfile: simplify via realloc-gnu
22059         * lib/backupfile.c: Do not include xalloc-oversized.h.
22060         (numbered_backup): Simplify now that realloc will do the right
22061         thing about ptrdiff_t overflow.
22062         * modules/backupfile (Depends-on): Add realloc-gnu;
22063         remove xalloc-oversized.
22065         safe-alloc: improve doc
22066         * doc/safe-alloc.texi: Clarify that reallocating an array appends
22067         uninitialized storage.  Say ‘sizeof *p’ rather than ‘sizeof(*p)’
22068         which would need a space before the paren to follow GNU style.
22070         malloc-gnu-tests, etc.: test ptrdiff_t overflow
22071         * modules/calloc-gnu-tests (Depends-on):
22072         * modules/malloc-gnu-tests (Depends-on):
22073         * modules/realloc-gnu-tests (Depends-on): Add stdint.
22074         * tests/test-calloc-gnu.c (main):
22075         * tests/test-malloc-gnu.c (main):,
22076         * tests/test-realloc-gnu.c (main): Test for ptrdiff_t overflow.
22078         malloc-gnu, etc.: prefer AS_CASE to woolly AS_IF
22079         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF):
22080         * m4/malloc.m4 (_AC_FUNC_MALLOC_IF):
22081         * m4/realloc.m4 (_AC_FUNC_REALLOC_IF): Use AS_CASE.
22083         malloc-gnu, etc.: sync better with Autoconf
22084         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF):
22085         * m4/malloc.m4 (_AC_FUNC_MALLOC_IF):
22086         * m4/realloc.m4 (_AC_FUNC_REALLOC_IF):
22087         Avoid some unnecessary differences from Autoconf’s versions.
22088         Separate our platforms into a different line so that it’s easier
22089         to diff.  Use AS_IF in case the args use AC_REQUIRE.
22090         However, don’t bother with omitting the first newline, as
22091         omitting the newline is not Gnulib style and the difference
22092         doesn’t seem to matter here.
22094 2021-04-18  Bruno Haible  <bruno@clisp.org>
22096         malloc-posix, realloc-posix, calloc-posix: Document affected platforms.
22097         * doc/posix-functions/malloc.texi: Re-add platforms list.
22098         * doc/posix-functions/realloc.texi: Likewise.
22099         * doc/posix-functions/calloc.texi: Likewise.
22101 2021-04-18  Bruno Haible  <bruno@clisp.org>
22103         More systematic file naming.
22104         * m4/ctype_h.m4: Renamed from m4/ctype.m4.
22105         * m4/threads_h.m4: Renamed from m4/threads.m4.
22106         * m4/uchar_h.m4: Renamed from m4/uchar.m4.
22108 2021-04-18  Bruno Haible  <bruno@clisp.org>
22110         Add comments after 2021-04-11 change.
22111         * m4/*_h.m4: Add comments regarding *_REQUIRE_DEFAULTS and
22112         *_MODULE_INDICATOR macros.
22114 2021-04-18  Bruno Haible  <bruno@clisp.org>
22116         doc: Update for FreeBSD 13.0/arm64.
22117         * doc/posix-headers/stdint.texi: Mention FreeBSD 13 bug.
22118         * m4/stdint.m4: Update comment.
22120 2021-04-17  Paul Eggert  <eggert@cs.ucla.edu>
22122         xalloc: adjust to malloc ptrdiff_t change
22123         * lib/xmalloc.c (HAVE_GNU_CALLOC, HAVE_GNU_MALLOC, HAVE_GNU_REALLOC):
22124         Remove.
22125         (xmalloc, xrealloc, xcalloc): Simplify by assuming GNU behavior.
22126         * modules/xalloc (Depends-on): Add calloc-gnu, malloc-gnu,
22127         realloc-gnu.
22129         malloc, etc.: check for ptrdiff_t overflow
22130         In glibc 2.30 and later, malloc, realloc and calloc reject
22131         attempts to create objects larger than PTRDIFF_MAX bytes.
22132         This patch changes malloc-gnu etc. to support this behavior
22133         on non-GNU hosts.  It also makes this change for malloc-posix etc.
22134         since it’s a safety measure that ought to be in POSIX (perhaps
22135         we can talk them into that...).
22137         In writing this patch I found a complicated set of code that had
22138         accumulated over the years, some written by yours truly.  I got
22139         rid of the code I couldn’t see the need for nowadays.  Among other
22140         things, the GNU realloc behavior is no longer incompatible with
22141         the C standard, because in C17 the latter was relaxed to allow the
22142         former.  If I went too far in cleaning up, the old stuff can be
22143         resurrected.
22145         This change is mostly for 32-bit platforms, since practical 64-bit
22146         platforms cannot create objects larger than PTRDIFF_MAX bytes anyway.
22147         * doc/posix-functions/calloc.texi:
22148         * doc/posix-functions/malloc.texi:
22149         * doc/posix-functions/realloc.texi:
22150         Mention ptrdiff_t issues, and go into more detail about what
22151         the gnu extension module does.
22152         * doc/posix-functions/realloc.texi: Fix now-obsolete commentary
22153         about C99 vs glibc, as C17 allows the glibc behavior and POSIX
22154         will follow suit when it gets around to it.
22155         * lib/calloc.c, lib/malloc.c, lib/realloc.c:
22156         Simplify by always supplying a GNU-compatible version,
22157         as that suffices for correctness and is good enough for performance.
22158         Include xalloc-oversized.h, and use xalloc_oversized to
22159         check for ptrdiff_t overflow.
22160         (NEED_CALLOC_GNU, NEED_MALLOC_GNU, NEED_REALLOC_GNU): Remove.
22161         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF):
22162         * m4/malloc.m4 (_AC_FUNC_MALLOC_IF):
22163         * m4/realloc.m4 (_AC_FUNC_REALLOC_IF):
22164         Don’t start with a newline.  Fix message to match behavior.
22165         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Don’t test for size_t overflow,
22166         as the ptrdiff_t test is good enough.
22167         * m4/calloc.m4 (gl_FUNC_CALLOC_GNU):
22168         * m4/malloc.m4 (gl_FUNC_MALLOC_GNU):
22169         * m4/realloc.m4 (gl_FUNC_REALLOC_GNU):
22170         Do not define HAVE_CALLOC_GNU, HAVE_MALLOC_GNU, HAVE_REALLOC_GNU.
22171         It’s not worth the aggravation of maintaining these, as they
22172         are confusing (they don’t really mean GNU-compatible anyway).
22173         Don’t bother testing for GNU behavior if we have already decided
22174         to replace the function, since the replacement is always GNUish.
22175         * m4/calloc.m4 (gl_FUNC_CALLOC_POSIX):
22176         * m4/realloc.m4 (gl_FUNC_REALLOC_POSIX):
22177         Defer to gl_FUNC_MALLOC_POSIX.
22178         * m4/malloc.m4 (gl_FUNC_MALLOC_PTRDIFF, gl_CHECK_MALLOC_PTRDIFF):
22179         New macros.
22180         (gl_FUNC_MALLOC_POSIX): Use them to check for ptrdiff_t overflow.
22181         * modules/calloc-gnu, modules/malloc-gnu, modules/realloc-gnu:
22182         Remove no-longer-needed module indicators.
22183         * modules/calloc-posix, modules/malloc-posix, modules/realloc-posix:
22184         Depend on xalloc-oversized.
22185         * modules/malloc-posix: Require gl_FUNC_MALLOC_POSIX instead of
22186         calling it directly, so that other code can require it.
22187         * modules/realloc-posix: Depend on free-posix and malloc-posix.
22189 2021-04-17  Bruno Haible  <bruno@clisp.org>
22191         stdio: Fix build error in some configurations (regression 2021-04-11).
22192         * m4/stdio_h.m4 (gl_STDIO_H): Move gl_STDIO_MODULE_INDICATOR and
22193         gl_MODULE_INDICATOR invocations from here...
22194         * modules/stdio (configure.ac): ... to here.
22196 2021-04-17  Bruno Haible  <bruno@clisp.org>
22198         doc: Update for FreeBSD 11.0, 12.0, 13.0.
22199         * doc/posix-headers/*.texi: Update.
22200         * doc/glibc-headers/*.texi: Update.
22201         * doc/posix-functions/*.texi: Likewise.
22202         * doc/pastposix-functions/*.texi: Likewise.
22203         * doc/glibc-functions/*.texi: Likewise.
22204         * m4/ptsname_r.m4 (gl_FUNC_PTSNAME_R): Update cross-compilation guess.
22206 2021-04-16  Paul Eggert  <eggert@cs.ucla.edu>
22208         malloc, realloc: fix recently-introduced #undef typos
22209         * lib/malloc.c (malloc):
22210         * lib/realloc.c (malloc, realloc): #undef before using.
22212 2021-04-14  Bruno Haible  <bruno@clisp.org>
22214         hamt tests: Fix link error.
22215         * modules/hamt-tests (Makefile.am): Link test-hamt against @LIBINTL@.
22217 2021-04-14  Bruno Haible  <bruno@clisp.org>
22219         c-stack: Don't use an undefined C macro (regression from 2020-10-04).
22220         * lib/c-stack.c: Test GNU C version directly, without __GNUC_PREREQ.
22222 2021-04-12  Bruno Haible  <bruno@clisp.org>
22224         doc: Fix confusion between LIBADD and LDADD.
22225         Reported by Reuben Thomas <rrt@sc3d.org> in
22226         <https://lists.gnu.org/archive/html/bug-gnulib/2021-04/msg00102.html>.
22227         * doc/gnulib-tool.texi (Multiple instances): For programs, use LDADD,
22228         not LIBADD.
22230 2021-04-11  Bruno Haible  <bruno@clisp.org>
22232         malloc, realloc, calloc: Support restricted library symbols on AIX.
22233         Suggested by Paul Eggert in
22234         <https://lists.gnu.org/archive/html/bug-gnulib/2021-04/msg00119.html>.
22235         * lib/malloc.c: Drop the code that intends to collaborate with
22236         AC_FUNC_MALLOC.
22237         * lib/realloc.c: Drop the code that intends to collaborate with
22238         AC_FUNC_REALLOC.
22239         * lib/calloc.c: Drop the code that intends to collaborate with the
22240         nonexistent macro AC_FUNC_CALLOC.
22242 2021-04-11  Bruno Haible  <bruno@clisp.org>
22244         Support several gnulib-tool invocations under the same configure.ac.
22245         Reported by Reuben Thomas <rrt@sc3d.org> in
22246         <https://lists.gnu.org/archive/html/bug-gnulib/2021-04/msg00104.html>.
22247         This is done by defining the Gnulib module indicator variables per
22248         gnulib-tool invocation. So that a generated .h file is no longer
22249         influenced by the set of modules used in other gnulib-tool invocations.
22250         * gnulib-tool (func_compute_include_guard_prefix): Set
22251         module_indicator_prefix.
22252         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Use it to
22253         modify $(GNULIB_*) variable references in the Automake snippets.
22254         (func_emit_initmacro_start): Push macro definitions for GL_MACRO_PREFIX
22255         and GL_MODULE_INDICATOR_PREFIX.
22256         (func_emit_initmacro_end): Pop these macro definitions.
22257         * pygnulib/GLConfig.py (GLConfig.getIncludeGuardPrefix): New method.
22258         * pygnulib/GLEmiter.py (GLEmiter.initmacro_start): Push macro
22259         definitions for GL_MACRO_PREFIX and GL_MODULE_INDICATOR_PREFIX.
22260         (GLEmiter.initmacro_end): Pop these macro definitions.
22261         (GLEmiter.lib_Makefile_am, GLEmiter.tests_Makefile_am): Use the module
22262         indicator prefix to modify $(GNULIB_*) variable references in the
22263         Automake snippets.
22264         * m4/gnulib-common.m4 (gl_MODULE_INDICATOR_INIT_VARIABLE,
22265         gl_MODULE_INDICATOR_SET_VARIABLE): Use the value of
22266         GL_MODULE_INDICATOR_PREFIX.
22267         * m4/arpa_inet_h.m4: Use new idiom for header files that contain
22268         references to Gnulib module indicator variables:
22269         - Define the main macro through AC_DEFUN_ONCE.
22270         - Define a macro gl_*_H_REQUIRE_DEFAULTS that initializes the Gnulib
22271           module indicator variables (each prefixed with
22272           GL_MODULE_INDICATOR_PREFIX).
22273         - Invoke this macro in the gl_*_MODULE_INDICATOR macro.
22274         * m4/ctype.m4: Likewise.
22275         * m4/dirent_h.m4: Likewise.
22276         * m4/fcntl_h.m4: Likewise.
22277         * m4/fnmatch_h.m4: Likewise.
22278         * m4/glob_h.m4: Likewise.
22279         * m4/iconv_h.m4: Likewise.
22280         * m4/inttypes.m4: Likewise.
22281         * m4/langinfo_h.m4: Likewise.
22282         * m4/locale_h.m4: Likewise.
22283         * m4/malloc_h.m4: Likewise.
22284         * m4/math_h.m4: Likewise.
22285         * m4/monetary_h.m4: Likewise.
22286         * m4/netdb_h.m4: Likewise.
22287         * m4/poll_h.m4: Likewise.
22288         * m4/pthread_h.m4: Likewise.
22289         * m4/pty_h.m4: Likewise.
22290         * m4/sched_h.m4: Likewise.
22291         * m4/search_h.m4: Likewise.
22292         * m4/signal_h.m4: Likewise.
22293         * m4/spawn_h.m4: Likewise.
22294         * m4/stddef_h.m4: Likewise.
22295         * m4/stdio_h.m4: Likewise.
22296         * m4/stdlib_h.m4: Likewise.
22297         * m4/string_h.m4: Likewise.
22298         * m4/strings_h.m4: Likewise.
22299         * m4/sys_file_h.m4: Likewise.
22300         * m4/sys_ioctl_h.m4: Likewise.
22301         * m4/sys_random_h.m4: Likewise.
22302         * m4/sys_resource_h.m4: Likewise.
22303         * m4/sys_select_h.m4: Likewise.
22304         * m4/sys_socket_h.m4: Likewise.
22305         * m4/sys_stat_h.m4: Likewise.
22306         * m4/sys_time_h.m4: Likewise.
22307         * m4/sys_times_h.m4: Likewise.
22308         * m4/sys_types_h.m4: Likewise.
22309         * m4/sys_uio_h.m4: Likewise.
22310         * m4/sys_utsname_h.m4: Likewise.
22311         * m4/sys_wait_h.m4: Likewise.
22312         * m4/termios_h.m4: Likewise.
22313         * m4/threads.m4: Likewise.
22314         * m4/time_h.m4: Likewise.
22315         * m4/uchar.m4: Likewise.
22316         * m4/unistd_h.m4: Likewise.
22317         * m4/utime_h.m4: Likewise.
22318         * m4/wchar_h.m4: Likewise.
22319         * m4/wctype_h.m4: Likewise.
22320         * modules/arpa_inet (configure.ac): Invoke the macro
22321         gl_*_H_REQUIRE_DEFAULTS explicitly.
22322         * modules/ctype (configure.ac): Likewise.
22323         * modules/dirent (configure.ac): Likewise.
22324         * modules/fcntl-h (configure.ac): Likewise.
22325         * modules/fnmatch-h (configure.ac): Likewise.
22326         * modules/glob-h (configure.ac): Likewise.
22327         * modules/iconv-h (configure.ac): Likewise.
22328         * modules/inttypes-incomplete (configure.ac): Likewise.
22329         * modules/langinfo (configure.ac): Likewise.
22330         * modules/locale (configure.ac): Likewise.
22331         * modules/malloc-h (configure.ac): Likewise.
22332         * modules/math (configure.ac): Likewise.
22333         * modules/monetary (configure.ac): Likewise.
22334         * modules/netdb (configure.ac): Likewise.
22335         * modules/poll-h (configure.ac): Likewise.
22336         * modules/pthread-h (configure.ac): Likewise.
22337         * modules/pty (configure.ac): Likewise.
22338         * modules/sched (configure.ac): Likewise.
22339         * modules/search (configure.ac): Likewise.
22340         * modules/signal-h (configure.ac): Likewise.
22341         * modules/spawn (configure.ac): Likewise.
22342         * modules/stddef (configure.ac): Likewise.
22343         * modules/stdio (configure.ac): Likewise.
22344         * modules/stdlib (configure.ac): Likewise.
22345         * modules/string (configure.ac): Likewise.
22346         * modules/strings (configure.ac): Likewise.
22347         * modules/sys_file (configure.ac): Likewise.
22348         * modules/sys_ioctl (configure.ac): Likewise.
22349         * modules/sys_random (configure.ac): Likewise.
22350         * modules/sys_resource (configure.ac): Likewise.
22351         * modules/sys_select (configure.ac): Likewise.
22352         * modules/sys_socket (configure.ac): Likewise.
22353         * modules/sys_stat (configure.ac): Likewise.
22354         * modules/sys_time (configure.ac): Likewise.
22355         * modules/sys_times (configure.ac): Likewise.
22356         * modules/sys_types (configure.ac): Likewise.
22357         * modules/sys_uio (configure.ac): Likewise.
22358         * modules/sys_utsname (configure.ac): Likewise.
22359         * modules/sys_wait (configure.ac): Likewise.
22360         * modules/termios (configure.ac): Likewise.
22361         * modules/threads-h (configure.ac): Likewise.
22362         * modules/time (configure.ac): Likewise.
22363         * modules/uchar (configure.ac): Likewise.
22364         * modules/unistd (configure.ac): Likewise.
22365         * modules/utime-h (configure.ac): Likewise.
22366         * modules/wchar (configure.ac): Likewise.
22367         * modules/wctype-h (configure.ac): Likewise.
22368         * m4/af_alg.m4: Update after a macro name changed.
22369         * m4/ctime.m4: Likewise.
22370         * m4/explicit_bzero.m4: Likewise.
22371         * m4/ffs.m4: Likewise.
22372         * m4/ffsl.m4: Likewise.
22373         * m4/ffsll.m4: Likewise.
22374         * m4/flock.m4: Likewise.
22375         * m4/fstat.m4: Likewise.
22376         * m4/getaddrinfo.m4: Likewise.
22377         * m4/getdomainname.m4: Likewise.
22378         * m4/gettimeofday.m4: Likewise.
22379         * m4/hostent.m4: Likewise.
22380         * m4/ioctl.m4: Likewise.
22381         * m4/localtime.m4: Likewise.
22382         * m4/mbslen.m4: Likewise.
22383         * m4/memchr.m4: Likewise.
22384         * m4/memmem.m4: Likewise.
22385         * m4/mempcpy.m4: Likewise.
22386         * m4/memrchr.m4: Likewise.
22387         * m4/mktime.m4: Likewise.
22388         * m4/nanosleep.m4: Likewise.
22389         * m4/passfd.m4: Likewise.
22390         * m4/pselect.m4: Likewise.
22391         * m4/rawmemchr.m4: Likewise.
22392         * m4/select.m4: Likewise.
22393         * m4/servent.m4: Likewise.
22394         * m4/sigabbrev_np.m4: Likewise.
22395         * m4/sigdescr_np.m4: Likewise.
22396         * m4/sockpfaf.m4: Likewise.
22397         * m4/stat.m4: Likewise.
22398         * m4/stpcpy.m4: Likewise.
22399         * m4/stpncpy.m4: Likewise.
22400         * m4/strcase.m4: Likewise.
22401         * m4/strcasestr.m4: Likewise.
22402         * m4/strchrnul.m4: Likewise.
22403         * m4/strdup.m4: Likewise.
22404         * m4/strerror.m4: Likewise.
22405         * m4/strerror_r.m4: Likewise.
22406         * m4/strerrorname_np.m4: Likewise.
22407         * m4/strftime-fixes.m4: Likewise.
22408         * m4/strncat.m4: Likewise.
22409         * m4/strndup.m4: Likewise.
22410         * m4/strnlen.m4: Likewise.
22411         * m4/strpbrk.m4: Likewise.
22412         * m4/strptime.m4: Likewise.
22413         * m4/strsep.m4: Likewise.
22414         * m4/strsignal.m4: Likewise.
22415         * m4/strstr.m4: Likewise.
22416         * m4/strtok_r.m4: Likewise.
22417         * m4/strverscmp.m4: Likewise.
22418         * m4/time_r.m4: Likewise.
22419         * m4/time_rz.m4: Likewise.
22420         * m4/timegm.m4: Likewise.
22421         * m4/timespec_get.m4: Likewise.
22422         * m4/tzset.m4: Likewise.
22423         * modules/accept (configure.ac): Likewise.
22424         * modules/bind (configure.ac): Likewise.
22425         * modules/connect (configure.ac): Likewise.
22426         * modules/flock (configure.ac): Likewise.
22427         * modules/getpeername (configure.ac): Likewise.
22428         * modules/getsockname (configure.ac): Likewise.
22429         * modules/getsockopt (configure.ac): Likewise.
22430         * modules/listen (configure.ac): Likewise.
22431         * modules/recv (configure.ac): Likewise.
22432         * modules/recvfrom (configure.ac): Likewise.
22433         * modules/send (configure.ac): Likewise.
22434         * modules/sendto (configure.ac): Likewise.
22435         * modules/setsockopt (configure.ac): Likewise.
22436         * modules/shutdown (configure.ac): Likewise.
22437         * modules/socket (configure.ac): Likewise. Use the
22438         gl_*_H_REQUIRE_DEFAULTS macros.
22439         * modules/nonblocking (configure.ac): Use the gl_*_H_REQUIRE_DEFAULTS
22440         and gl_MODULE_INDICATOR_INIT_VARIABLE macros.
22441         * modules/sigpipe (configure.ac): Likewise.
22442         * modules/windows-stat-override (configure.ac): Likewise.
22443         * m4/nonblocking.m4: Update a comment.
22444         * m4/sigpipe.m4: Likewise.
22446 2021-04-11  Bruno Haible  <bruno@clisp.org>
22448         Rename GNULIB_OVERRIDES_CHAR16_T, GNULIB_OVERRIDES_CHAR32_T.
22449         * GNULIBHEADERS_OVERRIDE_CHAR16_T: Renamed from
22450         GNULIB_OVERRIDES_CHAR16_T.
22451         * GNULIBHEADERS_OVERRIDE_CHAR32_T: Renamed from
22452         GNULIB_OVERRIDES_CHAR32_T.
22454         Rename GNULIB_OVERRIDES_WINT_T.
22455         * GNULIBHEADERS_OVERRIDE_WINT_T: Renamed from GNULIB_OVERRIDES_WINT_T.
22457 2021-04-11  Bruno Haible  <bruno@clisp.org>
22459         increment-serial: New program.
22460         * build-aux/increment-serial: New file.
22462 2021-04-11  Bruno Haible  <bruno@clisp.org>
22464         useless-if-before-free: Implement --version option according to GCS.
22465         * build-aux/useless-if-before-free (copyright_year): New variable.
22466         (GetOptions): Print also a short copyright and license notice and
22467         author statement.
22469         libtool-next-version: Implement --version option according to GCS.
22470         * build-aux/libtool-next-version (scriptversion): New variable.
22471         (func_version): Deduce the copyright year from it. Terminate sentences
22472         with '.'.
22474         gnupload: Implement --version option according to GCS.
22475         * build-aux/gnupload (copyright_year, copyright): New variables.
22476         (--version): Print also a short copyright and license notice.
22478         git-version-gen: Implement --version option according to GCS.
22479         * build-aux/git-version-gen (version): State the license. Use wording
22480         from GCS.
22482         bootstrap: Implement --version option according to GCS.
22483         * build-aux/bootstrap (copyright_year, copyright): New variables.
22484         (--version): New option processing.
22486         announce-gen: Implement --version option according to GCS.
22487         * build-aux/announce-gen (copyright_year): New variable.
22488         (GetOptions): Print also a short copyright and license notice and
22489         author statement.
22491 2021-04-10  Bruno Haible  <bruno@clisp.org>
22493         Simplify GNULIB_* variable initializations.
22494         * modules/gnulib-common.m4 (gl_MODULE_INDICATOR_INIT_VARIABLE): New
22495         macro.
22496         * m4/arpa_inet_h.m4 (gl_ARPA_INET_H_DEFAULTS): Use it.
22497         * m4/ctype.m4 (gl_CTYPE_H_DEFAULTS): Likewise.
22498         * m4/dirent_h.m4 (gl_DIRENT_H_DEFAULTS): Likewise.
22499         * m4/fcntl_h.m4 (gl_FCNTL_H_DEFAULTS): Likewise.
22500         * m4/fnmatch_h.m4 (gl_FNMATCH_H_DEFAULTS): Likewise.
22501         * m4/glob_h.m4 (gl_GLOB_H_DEFAULTS): Likewise.
22502         * m4/iconv_h.m4 (gl_ICONV_H_DEFAULTS): Likewise.
22503         * m4/inttypes.m4 (gl_INTTYPES_H_DEFAULTS): Likewise.
22504         * m4/langinfo_h.m4 (gl_LANGINFO_H_DEFAULTS): Likewise.
22505         * m4/locale_h.m4 (gl_LOCALE_H_DEFAULTS): Likewise.
22506         * m4/malloc_h.m4 (gl_MALLOC_H_DEFAULTS): Likewise.
22507         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Likewise.
22508         * m4/monetary_h.m4 (gl_MONETARY_H_DEFAULTS): Likewise.
22509         * m4/netdb_h.m4 (gl_NETDB_H_DEFAULTS): Likewise.
22510         * m4/poll_h.m4 (gl_POLL_H_DEFAULTS): Likewise.
22511         * m4/pthread_h.m4 (gl_PTHREAD_H_DEFAULTS): Likewise.
22512         * m4/pty_h.m4 (gl_PTY_H_DEFAULTS): Likewise.
22513         * m4/sched_h.m4 (gl_SCHED_H_DEFAULTS): Likewise.
22514         * m4/search_h.m4 (gl_SEARCH_H_DEFAULTS): Likewise.
22515         * m4/signal_h.m4 (gl_SIGNAL_H_DEFAULTS): Likewise.
22516         * m4/spawn_h.m4 (gl_SPAWN_H_DEFAULTS): Likewise.
22517         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Likewise.
22518         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Likewise.
22519         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Likewise.
22520         * m4/strings_h.m4 (gl_HEADER_STRINGS_H_DEFAULTS): Likewise.
22521         * m4/sys_file_h.m4 (gl_HEADER_SYS_FILE_H_DEFAULTS): Likewise.
22522         * m4/sys_ioctl_h.m4 (gl_SYS_IOCTL_H_DEFAULTS): Likewise.
22523         * m4/sys_random_h.m4 (gl_SYS_RANDOM_H_DEFAULTS): Likewise.
22524         * m4/sys_resource_h.m4 (gl_SYS_RESOURCE_H_DEFAULTS): Likewise.
22525         * m4/sys_select_h.m4 (gl_SYS_SELECT_H_DEFAULTS): Likewise.
22526         * m4/sys_socket_h.m4 (gl_SYS_SOCKET_H_DEFAULTS): Likewise.
22527         * m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Likewise.
22528         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_DEFAULTS): Likewise.
22529         * m4/sys_times_h.m4 (gl_SYS_TIMES_H_DEFAULTS): Likewise.
22530         * m4/sys_utsname_h.m4 (gl_SYS_UTSNAME_H_DEFAULTS): Likewise.
22531         * m4/sys_wait_h.m4 (gl_SYS_WAIT_H_DEFAULTS): Likewise.
22532         * m4/termios_h.m4 (gl_TERMIOS_H_DEFAULTS): Likewise.
22533         * m4/threads.m4 (gl_THREADS_H_DEFAULTS): Likewise.
22534         * m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS): Likewise.
22535         * m4/uchar.m4 (gl_UCHAR_H_DEFAULTS): Likewise.
22536         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Likewise.
22537         * m4/utime_h.m4 (gl_UTIME_H_DEFAULTS): Likewise.
22538         * m4/wchar_h.m4 (gl_WCHAR_H_DEFAULTS): Likewise.
22539         * m4/wctype_h.m4 (gl_WCTYPE_H_DEFAULTS): Likewise.
22541 2021-04-10  Paul Eggert  <eggert@cs.ucla.edu>
22543         realloc: fix undef typo
22544         * lib/realloc.c: #undef realloc if config.h defines it.
22545         This fixes a typo that I introduced in
22546         2011-04-08T18:39:01Z!eggert@cs.ucla.edu.
22547         Apparently nobody uses Gnulib realloc in that way?
22549 2021-04-07  Bruno Haible  <bruno@clisp.org>
22551         execute tests: Avoid test failure in certain environments.
22552         Reported by Dmitry V. Levin <ldv@altlinux.org> in
22553         <https://lists.gnu.org/archive/html/bug-gnulib/2021-04/msg00082.html>.
22554         * tests/test-execute-main.c (main): Close file descriptors 3..19.
22555         * tests/test-execute-child.c (main): Remove NetBSD workaround.
22556         * modules/execute-tests (configure.ac): Test for close_range function.
22558 2021-04-07  Paul Eggert  <eggert@cs.ucla.edu>
22560         utimens: fix confusing arg type in internal func
22561         Although the old code was technically correct, this was accidental
22562         and it confused a GCC 11 prerelease.  Reported by Ondrej Dubaj in:
22563         https://lists.gnu.org/r/bug-tar/2021-04/msg00000.html
22564         * lib/utimens.c (update_timespec): Change arg type from ‘struct
22565         timespec *[2]’ (pointer to array of 2 pointers to timespecs) to
22566         ‘struct timespec **’ (pointer to pointer to the first timespec in
22567         an array of 2 timespecs).  Although the old code happened to be
22568         technically correct, it was misleading and confused Coverity.
22569         And though the type ‘struct timespec (**)[2]’ (pointer to pointer
22570         to array of 2 timespecs) would perhaps be more technically
22571         correct, it would be almost as confusing and would require changes
22572         elsewhere in this file; let’s quit while we’re ahead.
22574         xalloc: simplify integer overflow test
22575         * lib/xalloc.h (x2nrealloc): Simplify integer overflow detection.
22576         This is easier to maintain, and (unlike the old code) exact.
22578 2021-04-06  Paul Eggert  <eggert@cs.ucla.edu>
22580         group-member: minor tweak to omit a *
22581         * lib/group-member.c: Include intprops.h.
22582         (get_group_info): Use INT_MULTIPLY_WRAPV instead of
22583         xalloc_oversized (which does a multiplication) followed by the
22584         same multiplication.  The code was OK as-is; this is just
22585         conceptual simplification, possible now that we have xalloc_count_t.
22586         * modules/group-member: Depend on intprops.
22588         backupfile: less-aggressive buffer growth
22589         * lib/backupfile.c: Include intprops.h.
22590         (numbered_backup): Grow buffer by the usual 50%, not 100%.
22591         This is easier to do now that we have xalloc_count_t.
22592         * modules/backup-rename, modules/backupfile: Depend on intprops.
22594         xalloc-oversized: export xalloc_count_t
22595         * lib/xalloc-oversized.h (__xalloc_oversized, xalloc_oversized):
22596         * lib/xmalloca.h (nmalloca):
22597         Comment re restrictions on arg types.
22598         * lib/xalloc-oversized.h (xalloc_count_t): Rename from
22599         __xalloc_count_type; all uses changed.  This publicizes the type.
22601 2021-04-05  Paul Eggert  <eggert@cs.ucla.edu>
22603         xalloc: try to pacify gcc -Wsign-compare
22604         Problem reported by Marc Nieper-Wißkirchen in:
22605         https://lists.gnu.org/r/bug-gnulib/2021-04/msg00034.html
22606         * lib/xmalloc.c (xpalloc): For odd platforms where SIZE_MAX < IDX_MAX,
22607         use a tricky destination for INT_MULTIPLY_WRAPV instead of an
22608         explicit comparison to SIZE_MAX.  This should be more likely to
22609         pacify gcc -Wsign-compare.
22611 2021-04-05  Marc Nieper-Wißkirchen  <marc@nieper-wisskirchen.de>
22613         hamt: Fix coding errors.
22614         Reported by Bruno Haible in
22615         <https://lists.gnu.org/archive/html/bug-gnulib/2021-04/msg00047.html>
22616         after a Coverity run.
22617         * lib/hamt.c (bucket_do_while, hamt_iterator): Add missing
22618         derefencing operator and silence a bogus warning on uninitialized
22619         variables.
22620         * tests/test-hamt.c (test_general): Replace two errorneous
22621         assignment operators with comparison operators.
22623 2021-04-05  Fabrice Fontaine  <fontaine.fabrice@gmail.com>
22625         pthread-cond: Fix compilation error.
22626         * lib/pthread-cond.c (pthread_cond_wait): Use tv.nsec instead of
22627         tv.usec.
22629 2021-04-04  Fabrice Fontaine  <fontaine.fabrice@gmail.com>
22631         pthread-cond: Fix wrong configure results when <pthread.h> is absent.
22632         * m4/pthread-cond.m4 (gl_PTHREAD_COND): When <pthread.h> does not exist,
22633         set HAVE_PTHREAD_COND_* to 0, not to 1.
22635 2021-04-04  Bruno Haible  <bruno@clisp.org>
22637         backupfile, backup-rename: Trim dependencies.
22638         * lib/backupfile.h: Add comment.
22639         * lib/backupfile.c: Include <dirent.h>, for readdir() declaration.
22640         * modules/backup-rename (Depends-on): Remove dirent-safer, fcntl. Add
22641         fcntl-h.
22642         * modules/backupfile (Depends-on): Likewise. Remove xalloc. Add
22643         xalloc-die.
22645 2021-04-04  Bruno Haible  <bruno@clisp.org>
22647         doc: Fix syntax error (regression from 2021-04-02).
22648         * doc/posix-functions/strtol.texi: Put @item inside @itemize block.
22650 2021-04-04  Marc Nieper-Wißkirchen  <marc@nieper-wisskirchen.de>
22652         hamt: Document the module in the Gnulib manual.
22653         Suggested by Bruno Haible in
22654         <https://lists.gnu.org/archive/html/bug-gnulib/2021-04/msg00026.html>.
22655         * doc/containers.texi: Add a subsection to section 15.11 Container
22656         data types.
22657         * lib/hamt.h: Improve documentation on how Hamt_entry is supposed
22658         to be used.
22660 2021-04-03  Paul Eggert  <eggert@cs.ucla.edu>
22662         savedir: avoid unlikely undefined behavior
22663         * lib/savedir.c (streamsavedir): Prefer idx_to size_t where
22664         either will do.  Simplify reallocation of entries.
22665         Use xpalloc to reallocate name_space, to avoid some unlikely
22666         integer overflows.
22668         quotearg: avoid undefined and/or O(N**2)
22669         Avoid undefined and O(N**2) behavior in some very unlikely cases.
22670         * lib/quotearg.c (quotearg_n_options): Document that N must
22671         be less than MIN (INT_MAX, IDX_MAX), and add this to the
22672         abort test; this also avoids a conditional branch.
22673         Use xpalloc instead of xrealloc, to avoid O(N**2) behavior in
22674         very-unlikely cases.
22676         xgethostname: reorganize / simplify
22677         xgethostname and xgetdomainname were essentially copies long
22678         ago, but they’ve diverged.  Bring them back together again
22679         by implementing the (rarely used) latter in terms of the former.
22680         And avoid some unnecessary realloc calls while we’re at it.
22681         * lib/xgetdomainname.c: Rewrite from scratch so that it merely
22682         includes xgethostname.c with a few preliminaries.
22683         * lib/xgethostname.c: Generalize so that it can be included
22684         from xgetdomainname.c.
22685         (GETANAME, XGETANAME): New macros.
22686         (INITIAL_HOSTNAME_LENGTH): Remove.  No need for this parameter.
22687         Use 100 instead, as few hostnames are longer than that.
22688         (XGETANAME): Try getting the hostname into the stack first,
22689         as that avoids a malloc call in the usual case.
22690         Check for both POSIX-style truncation and SunOS 5.5 bug
22691         in a cleaner way, by simply checking string length.
22692         Don’t use x2realloc, which wastes time preserving buffer garbage;
22693         use xpalloc with NULL instead.  Don’t bother shrinking buffer
22694         in the very rare case where the hostname is longer than sizeof
22695         buf; it’s not worth the aggravation.
22696         * modules/xgetdomainname (Depends-on): Remove free-posix, xalloc.
22697         Add xgethostname.
22699 2021-04-03  Bruno Haible  <bruno@clisp.org>
22701         *-list tests: Add more tests.
22702         * tests/test-array_list.c (check_equals_by_forward_iteration,
22703         check_equals_by_backward_iteration): New functions.
22704         (main): Invoke them.
22705         * tests/test-carray_list.c: Likewise.
22706         * tests/test-linked_list.c: Likewise.
22707         * tests/test-linkedhash_list.c: Likewise.
22708         * tests/test-avltree_list.c: Likewise.
22709         * tests/test-avltreehash_list.c: Likewise.
22710         * tests/test-rbtree_list.c: Likewise.
22711         * tests/test-rbtreehash_list.c: Likewise.
22713         list: Add operations first_node, last_node.
22714         Reported by Marc Nieper-Wißkirchen in
22715         <https://lists.gnu.org/archive/html/bug-gnulib/2021-04/msg00005.html>.
22716         * lib/gl_list.h (gl_list_first_node, gl_list_last_node): New functions.
22717         (struct gl_list_implementation): Add members first_node, last_node.
22718         * lib/gl_array_list.c (gl_array_first_node, gl_array_last_node): New
22719         functions.
22720         (gl_array_list_implementation): Add the new operations.
22721         * lib/gl_carray_list.c (gl_carray_first_node, gl_carray_last_node): New
22722         functions.
22723         (gl_carray_list_implementation): Add the new operations.
22724         * lib/gl_anylinked_list2.h (gl_linked_first_node, gl_linked_last_node):
22725         New functions.
22726         * lib/gl_linked_list.c (gl_linked_list_implementation): Add the new
22727         operations.
22728         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation):
22729         Likewise.
22730         * lib/gl_anytree_list2.h (gl_tree_first_node, gl_tree_last_node): New
22731         functions.
22732         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Add the new
22733         operations.
22734         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
22735         Likewise.
22736         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Likewise.
22737         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation):
22738         Likewise.
22739         * lib/gl_sublist.c (gl_sublist_first_node, gl_sublist_last_node): New
22740         functions.
22741         (gl_sublist_list_implementation): Add the new operations.
22742         * lib/gl_list.hh (class gl_List): Add member functions first_node,
22743         last_node.
22744         * doc/containers.texi: Update table.
22746 2021-04-03  Bruno Haible  <bruno@clisp.org>
22748         xalloc-die: Fix compilation error (regression from 2021-03-28).
22749         * lib/xalloc.h: Don't include idx.h and xalloc-oversized.h if the module
22750         'xalloc' is not in use.
22751         * modules/xalloc-die (Depends-on): Remove xalloc-oversized.
22753 2020-04-03  Marc Nieper-Wißkirchen  <marc@nieper-wisskirchen.de>
22755         hamt: New module.
22756         This module provides (persistent) hash array mapped tries.
22757         * MODULES.html.sh: Add hamt.
22758         * lib/hamt.c: New file.
22759         * lib/hamt.h: New file.
22760         * modules/hamt: New file.
22761         * modules/hamt-tests: New file.
22762         * tests/test-hamt.c: New file.
22764 2021-04-02  Bruno Haible  <bruno@clisp.org>
22766         strtoul, strtoll, strtoull: Fix compilation warning.
22767         * lib/strtol.c (strtol): Undefine before defining as a macro.
22769 2021-04-02  Bruno Haible  <bruno@clisp.org>
22771         strtoll: Work around a bug on native Windows and Minix.
22772         * lib/stdlib.in.h (strtoll): Override if REPLACE_STRTOLL is 1.
22773         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize REPLACE_STRTOLL.
22774         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Test whether strtoll works. Set
22775         REPLACE_STRTOLL.
22776         * modules/stdlib (Makefile.am): Substitute REPLACE_STRTOLL.
22777         * modules/strtoll (configure.ac): Test REPLACE_STRTOLL.
22778         * tests/test-strtoll.c (main): Add tests of hexadecimal integer syntax.
22779         * doc/posix-functions/strtoll.texi: Mention the bug.
22781 2021-04-02  Bruno Haible  <bruno@clisp.org>
22783         strtol: Work around a bug on native Windows and Minix.
22784         * lib/stdlib.in.h (strtol): New declaration.
22785         * m4/stdlib_h.m4 (gl_STDLIB_H): Test whether strtol is declared.
22786         (gl_STDLIB_H_DEFAULTS): Initialize GNULIB_STRTOL, HAVE_STRTOL,
22787         REPLACE_STRTOL.
22788         * m4/strtol.m4 (gl_FUNC_STRTOL): Require gl_STDLIB_H_DEFAULTS. Test
22789         whether strtol works. Set REPLACE_STRTOL.
22790         * modules/stdlib (Makefile.am): Substitute GNULIB_STRTOL, HAVE_STRTOL,
22791         REPLACE_STRTOL.
22792         * modules/strtol (Status, Notice): Remove.
22793         (Depends-on): Add stdlib.
22794         (configure.ac): Test HAVE_STRTOL and REPLACE_STRTOL. Invoke
22795         gl_STDLIB_MODULE_INDICATOR.
22796         * tests/test-strtol.c (main): Add tests of hexadecimal integer syntax.
22797         * doc/posix-functions/strtol.texi: Mention the bug.
22799 2021-04-02  Bruno Haible  <bruno@clisp.org>
22801         strtoull: Work around a bug on native Windows and Minix.
22802         * lib/stdlib.in.h (strtoull): Override if REPLACE_STRTOULL is 1.
22803         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize REPLACE_STRTOULL.
22804         * m4/strtoull.m4 (gl_FUNC_STRTOULL): Test whether strtoull works. Set
22805         REPLACE_STRTOULL.
22806         * modules/stdlib (Makefile.am): Substitute REPLACE_STRTOULL.
22807         * modules/strtoull (configure.ac): Test REPLACE_STRTOULL.
22808         * tests/test-strtoull.c (main): Add tests of hexadecimal integer syntax.
22809         * doc/posix-functions/strtoull.texi: Mention the bug.
22811 2021-04-02  Bruno Haible  <bruno@clisp.org>
22813         strtoul: Work around a bug on native Windows and Minix.
22814         Reported by Eric Blake <eblake@redhat.com> in
22815         <https://lists.gnu.org/archive/html/bug-gnulib/2021-03/msg00082.html>.
22816         * lib/stdlib.in.h (strtoul): New declaration.
22817         * m4/stdlib_h.m4 (gl_STDLIB_H): Test whether strtoul is declared.
22818         (gl_STDLIB_H_DEFAULTS): Initialize GNULIB_STRTOUL, HAVE_STRTOUL,
22819         REPLACE_STRTOUL.
22820         * m4/strtoul.m4 (gl_FUNC_STRTOUL): Require gl_STDLIB_H_DEFAULTS. Test
22821         whether strtoul works. Set REPLACE_STRTOUL.
22822         * modules/stdlib (Makefile.am): Substitute GNULIB_STRTOUL, HAVE_STRTOUL,
22823         REPLACE_STRTOUL.
22824         * modules/strtoul (Status, Notice): Remove.
22825         (Depends-on): Add stdlib.
22826         (configure.ac): Test HAVE_STRTOUL and REPLACE_STRTOUL. Invoke
22827         gl_STDLIB_MODULE_INDICATOR.
22828         * tests/test-strtoul.c (main): Add tests of hexadecimal integer syntax.
22829         * doc/posix-functions/strtoul.texi: Mention the bug.
22831 2021-04-02  Bruno Haible  <bruno@clisp.org>
22833         strtol, strtoul, strtoll, strtoull: Optimize.
22834         * lib/strtol.c (GROUP_PARAM_PROTO): New macro.
22835         (INTERNAL): Define differently if !USE_NUMBER_GROUPING.
22836         (INTERNAL (strtol)): Define without 'int group' parameter if
22837         !USE_NUMBER_GROUPING.
22838         (strtol): Don't define if !USE_NUMBER_GROUPING.
22840 2021-04-02  Bruno Haible  <bruno@clisp.org>
22842         strto*l: Don't pass invalid arguments to isspace, isalnum, toupper.
22843         * lib/strtol.c (ISSPACE, ISALPHA, TOUPPER): Cast argument to
22844         'unsigned char' before passing it to the functions isspace(), isalpha(),
22845         toupper().
22847 2021-04-02  Bruno Haible  <bruno@clisp.org>
22849         glob: Reject ~user syntax, when flag GLOB_TILDE_CHECK is given.
22850         Reported and patch suggested by Eli Zaretskii <eliz@gnu.org> in
22851         <https://lists.gnu.org/archive/html/bug-gnulib/2021-03/msg00136.html>.
22852         * lib/glob.c (__glob) [WINDOWS32]: If flag GLOB_TILDE_CHECK is given, do
22853         error handling like when ~user is allowed by the user is unknown.
22855 2021-03-31  Paul Eggert  <eggert@cs.ucla.edu>
22857         xalloc: delay setting size until success
22858         * lib/xalloc.h (x2nrealloc): Don’t change *PN until after xrealloc
22859         succeeds, in case xalloc_die or one of its callees or longjmp
22860         targets uses *PN.  Similar code in xpalloc already does this.
22862 2021-03-28  Paul Eggert  <eggert@cs.ucla.edu>
22864         xalloc: new function xpalloc, from dfa
22865         Move xpalloc from dfa.c to xmalloc.c and change it from static to
22866         extern.  The function is useful in other contexts; I’m about to
22867         use it in coreutils.
22868         * lib/dfa.c: Include idx.h, instead of rolling our own idx_t and
22869         IDX_MAX.  Do not include intprops.h; no longer needed.
22870         (xpalloc): Move from here ...
22871         * lib/xmalloc.c (xpalloc): ... to here, and make it extern.
22872         Include intprops.h and minmax.h, needed by xpalloc.
22873         * lib/xalloc.h: Include idx.h, for idx_t.
22874         * modules/dfa (Depends-on): Add idx; remove intprops.
22875         * modules/xalloc (Depends-on): Add idx, intprops, minmax.
22877 2021-03-28  Bruno Haible  <bruno@clisp.org>
22879         linked-list tests: Add another test for SIGNAL_SAFE_LIST.
22880         * tests/test-asyncsafe-linked_list-strong.c: Renamed from
22881         tests/test-asyncsafe-linked_list.c.
22882         * tests/test-asyncsafe-linked_list-strong.sh: Renamed from
22883         tests/test-asyncsafe-linked_list.sh.
22884         * tests/test-asyncsafe-linked_list-weak.c: New file, based on
22885         tests/test-asyncsafe-linked_list.c.
22886         * tests/test-asyncsafe-linked_list-weak.sh: New file, based on
22887         tests/test-asyncsafe-linked_list.sh.
22888         * modules/linked-list-tests (Files): Add
22889         tests/test-asyncsafe-linked_list-weak.*,
22890         tests/test-asyncsafe-linked_list-strong.*.
22891         (Makefile.am): Arrange to test also
22892         tests/test-asyncsafe-linked_list-weak.sh. Mark
22893         test-asyncsafe-linked_list-weak.sh and
22894         test-asyncsafe-linked_list-strong.sh as expected failures.
22896 2021-03-27  Bruno Haible  <bruno@clisp.org>
22898         renameatu tests: Add unit test for bug found on macOS.
22899         * tests/test-renameatu.c (main): Add test for identical rename with
22900         RENAME_NOREPLACE.
22902 2021-03-26  Bruno Haible  <bruno@clisp.org>
22904         unistdio/*-vasnprintf: Fix errno value (regression from yesterday).
22905         * modules/unistdio/u8-vasnprintf (Depends-on): Add free-posix.
22906         * modules/unistdio/u8-u8-vasnprintf (Depends-on): Likewise.
22907         * modules/unistdio/u16-vasnprintf (Depends-on): Likewise.
22908         * modules/unistdio/u16-u16-vasnprintf (Depends-on): Likewise.
22909         * modules/unistdio/u32-vasnprintf (Depends-on): Likewise.
22910         * modules/unistdio/u32-u32-vasnprintf (Depends-on): Likewise.
22911         * modules/unistdio/ulc-vasnprintf (Depends-on): Likewise.
22913 2021-03-26  Bruno Haible  <bruno@clisp.org>
22915         vasnprintf: Fix memory leak (regression from yesterday).
22916         * lib/vasnprintf.c (VASNPRINTF): Restore omitted CLEANUP invocation.
22917         Some more simplifications of errno around free().
22919 2021-03-26  Akim Demaille  <akim@lrde.epita.fr>
22921         fprintf-posix: fix typo
22922         * modules/fprintf-posix (Depends-on): Fix typo.
22924 2021-03-25  Paul Eggert  <eggert@cs.ucla.edu>
22926         free-posix: use more often in other modules
22927         This lets us simplify cleanup code that calls ‘free’.
22928         * lib/amemxfrm.c (amemxfrm):
22929         * lib/areadlink-with-size.c (areadlink_with_size):
22930         * lib/areadlinkat-with-size.c (areadlinkat_with_size):
22931         * lib/astrxfrm.c (astrxfrm):
22932         * lib/dprintf.c (dprintf):
22933         * lib/execute.c (execute):
22934         * lib/execvpe.c (execvpe):
22935         * lib/fchdir.c (get_name):
22936         * lib/file-has-acl.c (file_has_acl):
22937         * lib/fprintf.c (fprintf):
22938         * lib/getcwd-lgpl.c (rpl_getcwd):
22939         * lib/getgroups.c (rpl_getgroups):
22940         * lib/link.c (link, rpl_link):
22941         * lib/linkat.c (link_immediate, link_follow, linkat_follow):
22942         * lib/localename.c (newlocale, duplocale):
22943         * lib/mgetgroups.c (mgetgroups):
22944         * lib/mountlist.c (read_file_system_list):
22945         * lib/pipe-filter-gi.c (pipe_filter_gi_close):
22946         * lib/putenv.c (_unsetenv, putenv):
22947         * lib/read-file.c (read_file):
22948         * lib/rename.c (rpl_rename):
22949         * lib/savedir.c (streamsavedir, savedir):
22950         * lib/spawni.c (do_open, __spawni):
22951         * lib/spawn-pipe.c (create_pipe):
22952         * lib/striconv.c (mem_cd_iconv, str_cd_iconv, str_iconv):
22953         * lib/striconveh.c (mem_cd_iconveh_internal, str_cd_iconveh)
22954         (mem_iconveh, str_iconveh):
22955         * lib/supersede.c (open_supersede, close_supersede):
22956         * lib/vasnprintf.c (VASNPRINTF):
22957         * lib/vdprintf.c (vdprintf):
22958         * lib/vfprintf.c (vfprintf):
22959         * lib/wcscoll-impl.h (wcscoll):
22960         * lib/wcsxfrm-impl.h (wcsxfrm):
22961         * lib/xgetdomainname.c (xgetdomainname):
22962         * lib/xgethostname.c (xgethostname):
22963         Simplify by assuming that ‘free’ preserves errno.
22964         * lib/localename.c: Do not include errno.h.
22965         * modules/amemxfrm, modules/areadlink-with-size:
22966         * modules/areadlinkat-with-size, modules/astrxfrm:
22967         * modules/c-vasnprintf, modules/dprintf, modules/execute:
22968         * modules/execvpe, modules/fchdir, modules/file-has-acl:
22969         * modules/fprintf-posix, modules/getcwd-lgpl, modules/getgroups:
22970         * modules/link, modules/linkat, modules/localename:
22971         * modules/mgetgroups, modules/mountlist, modules/pipe-filter-gi:
22972         * modules/posix_spawn-internal, modules/putenv, modules/read-file:
22973         * modules/rename, modules/savedir, modules/spawn-pipe:
22974         * modules/striconv, modules/striconveh, modules/supersede:
22975         * modules/vasnprintf, modules/vdprintf, modules/vfprintf-posix:
22976         * modules/wcscoll, modules/wcsxfrm, modules/xgetdomainname:
22977         * modules/xgethostname:
22978         Depend on free-posix.
22980 2021-03-24  Paul Eggert  <eggert@cs.ucla.edu>
22982         renameatu: work around macOS 11.2 renameatx_np bug
22983         * lib/renameatu.c (renameatu) [RENAME_EXCL]: Use lstatat test here too.
22985 2021-03-22  Bruno Haible  <bruno@clisp.org>
22987         clean-temp-simple: Fix a rare memory leak.
22988         * lib/clean-temp-simple.c (register_temporary_file): Fix cleanup code.
22990 2021-03-22  Bruno Haible  <bruno@clisp.org>
22992         clean-temp-simple: Relicense under LGPLv2+.
22993         * modules/clean-temp-simple (License): Change to LGPLv2+.
22995 2021-03-22  Bruno Haible  <bruno@clisp.org>
22997         clean-temp-simple: Remove dependency upon xalloc, xalloc-die, xlist.
22998         * lib/clean-temp-private.h (clean_temp_init): Change return type to
22999         'int'.
23000         * lib/clean-temp-simple.h (register_temporary_file): Change return type
23001         to 'int'.
23002         * lib/clean-temp-simple.c: Don't include xalloc.h, gl_xlist.h. Include
23003         gl_list.h instead.
23004         (init_failed): New variable.
23005         (do_clean_temp_init): Set it.
23006         (clean_temp_init): Return an error indicator.
23007         (register_temporary_file): Invoke gl_list_nx_create_empty instead of
23008         gl_list_create_empty. Invoke strdup instead of xstrdup. Invoke
23009         gl_list_nx_add_first instead of gl_list_add_first. Return an error
23010         indicator.
23011         * lib/clean-temp.c (create_temp_dir, gen_register_open_temp): Call
23012         xalloc_die() if clean_temp_init or register_temporary_file failed.
23013         * modules/clean-temp-simple (Depends-on): Remove xalloc, xalloc-die,
23014         xlist.
23016 2021-03-22  Bruno Haible  <bruno@clisp.org>
23018         clean-temp-simple: New module.
23019         * lib/clean-temp-simple.h: New file, based on lib/clean-temp.h.
23020         * lib/clean-temp-private.h: New file, based on lib/clean-temp.c.
23021         * lib/clean-temp-simple.c: New file, based on lib/clean-temp.c.
23022         * lib/clean-temp.h: Include clean-temp-simple.h.
23023         (register_temporary_file, unregister_temporary_file,
23024         cleanup_temporary_file): Remove declarations.
23025         * lib/clean-temp.c: Don't include <limits.h>, <stdint.h>. Include
23026         <signal.h>, <stdio.h>, clean-temp-simple.h, clean-temp-private.h.
23027         (file_cleanup_list_lock, file_cleanup_list): Moved to
23028         clean-temp-simple.c.
23029         (struct tempdir, dir_cleanup_list, struct closeable_fd, descriptors):
23030         Moved to clean-temp-private.h.
23031         (string_equals, SIZE_BITS, string_hash, fatal_signal_set,
23032         init_fatal_signal_set, asyncsafe_close): Moved to clean-temp-simple.c.
23033         (asyncsafe_fclose_variant): Use get_fatal_signal_set() here.
23034         (cleanup_action, do_init_clean_temp, clean_temp_once, init_clean_temp,
23035         register_temporary_file, unregister_temporary_file, do_unlink,
23036         cleanup_temporary_file): Moved to clean-temp-simple.c.
23037         (create_temp_dir, cleanup_temp_file, cleanup_temp_dir_contents,
23038         gen_register_open_temp, close_temp): Update for changed function names.
23039         (fclose_variant_temp): Don't call init_fatal_signal_set().
23040         * modules/clean-temp-simple: New file, based on modules/clean-temp.
23041         * modules/clean-temp (Depends-on): Add clean-temp-simple, list. Remove
23042         stdint.
23043         (configure.ac): Don't define SIGNAL_SAFE_LIST here.
23045 2021-03-22  Bruno Haible  <bruno@clisp.org>
23047         error: Relicense under LGPLv2+.
23048         Pino Toscano's approval is in
23049         <https://lists.gnu.org/archive/html/bug-gnulib/2021-03/msg00109.html>.
23050         Paul Eggert's approval is in
23051         <https://lists.gnu.org/archive/html/bug-gnulib/2021-03/msg00110.html>.
23052         * modules/error (License): Change to LGPLv2+.
23054 2021-03-22  Bruno Haible  <bruno@clisp.org>
23056         getprogname: Relicense under LGPLv2+.
23057         Pino Toscano's approval is in
23058         <https://lists.gnu.org/archive/html/bug-gnulib/2021-03/msg00109.html>.
23059         Paul Eggert's approval is in
23060         <https://lists.gnu.org/archive/html/bug-gnulib/2021-03/msg00110.html>.
23061         Jim Meyering's approval is in
23062         <https://lists.gnu.org/archive/html/bug-gnulib/2021-03/msg00107.html>.
23063         Gisle Vanem's approval is in
23064         <https://lists.gnu.org/archive/html/bug-gnulib/2021-03/msg00115.html>.
23065         Daniel Richard G's approval is in
23066         <https://lists.gnu.org/archive/html/bug-gnulib/2021-03/msg00112.html>.
23067         John David Anglin's approval is in
23068         <https://lists.gnu.org/archive/html/bug-gnulib/2021-03/msg00108.html>.
23069         Benji Wiebe's approval is in
23070         <https://lists.gnu.org/archive/html/bug-gnulib/2021-03/msg00114.html>.
23071         * modules/getprogname (License): Change to LGPLv2+.
23073 2021-03-22  Bruno Haible  <bruno@clisp.org>
23075         fatal-signal: Relicense under LGPLv2+.
23076         Eric Blake's approval is in
23077         <https://lists.gnu.org/archive/html/bug-gnulib/2021-03/msg00111.html>.
23078         * modules/fatal-signal (License): Change to LGPLv2+.
23080 2021-03-22  Bruno Haible  <bruno@clisp.org>
23082         doc: Mention an open glibc bug.
23083         * doc/posix-functions/mbrtowc.texi: Mention the possible out-of-range
23084         wchar_t values returned by this function on glibc.
23085         * doc/posix-functions/mbtowc.texi: Likewise.
23087 2021-03-22  Benno Schulenberg  <bensberg@telfort.nl>  (tiny change)
23089         mbrtowc: Remove a redundant condition.
23090         * lib/mbrtowc-impl-utf8.h: There is no need to check for c == 0xf4
23091         when !(c < 0xf4), as ten lines earlier c <= 0xf4 was established.
23093 2021-03-22  Bruno Haible  <bruno@clisp.org>
23095         linkedhash-list: Relicense under LGPLv2+.
23096         Paul Eggert's approval is in
23097         <https://lists.gnu.org/archive/html/bug-gnulib/2021-03/msg00102.html>.
23098         * modules/linkedhash-list (License): Change to LGPLv2+.
23100 2021-03-21  Bruno Haible  <bruno@clisp.org>
23102         fatal-signal: Remove dependency upon xalloc.
23103         * lib/fatal-signal.h (at_fatal_signal): Change return type to 'int'.
23104         * lib/fatal-signal.c: Don't include xalloc.h.
23105         (at_fatal_signal): Return an error indicator.
23106         * modules/fatal-signal (Depends-on): Remove xalloc.
23107         * NEWS: Mention the change.
23108         * lib/term-style-control.c: Include xalloc.h.
23109         (ensure_other_signal_handlers): Test return value of at_fatal_signal.
23110         * lib/clean-temp.c (do_init_clean_temp): Likewise.
23111         * lib/wait-process.c (register_slave_subprocess): Likewise.
23112         * modules/term-style-control (Depends-on): Add xalloc-die.
23113         * modules/clean-temp (Depends-on): Likewise.
23114         * modules/wait-process (Depends-on): Likewise.
23116 2021-03-21  Paul Eggert  <eggert@cs.ucla.edu>
23118         diacrit: remove
23119         * MODULES.html.sh (func_all_modules), NEWS: Remove diacrit.
23120         * lib/diacrit.c, lib/diacrit.h, modules/diacrit: Remove.
23122         tests: fix signed overflow issues
23123         * tests/test-dynarray.c (value_at): Avoid undefined behavior
23124         in signed integer multiplication.
23125         * tests/test-scratch-buffer.c (byte_at): Likewise, for the
23126         theoretically-possible case where size_t is narrower than int.
23128 2021-03-21  Bruno Haible  <bruno@clisp.org>
23130         doc: More updates.
23131         * doc/glibc-functions/sethostname.texi: Update regarding macOS.
23132         * doc/glibc-functions/sethostname.texi: List the affected platforms.
23134         doc: Update for macOS 11.1.
23135         * doc/posix-headers/*.texi: Update.
23136         * doc/glibc-headers/*.texi: Update.
23137         * doc/posix-functions/*.texi: Likewise.
23138         * doc/pastposix-functions/*.texi: Likewise.
23139         * doc/glibc-functions/*.texi: Likewise.
23140         * m4/aligned_alloc.m4 (gl_FUNC_ALIGNED_ALLOC): Update cross-compilation
23141         guess.
23143 2021-03-21  Bruno Haible  <bruno@clisp.org>
23145         ftell: Document bug in macOS >= 10.15.
23146         * doc/posix-functions/ftell.texi: Mention the macOS bug.
23148 2021-03-20  Bruno Haible  <bruno@clisp.org>
23150         ftello: Work around bug in macOS >= 10.15.
23151         Reported by Martin Storsjö <martin@martin.st> in
23152         <https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg00002.html>.
23153         * m4/ungetc.m4 (gl_FUNC_UNGETC_WORKS): On macOS, don't define
23154         FUNC_UNGETC_BROKEN. Instead, set gl_ftello_broken_after_ungetc to yes.
23155         * m4/ftello.m4 (gl_FUNC_FTELLO): Invoke gl_FUNC_UNGETC_WORKS, and
23156         arrange to provide the workaround if ftello is broken after ungetc.
23157         * lib/ftello.c: Include <errno.h>, intprops.h.
23158         (ftello) [FTELLO_BROKEN_AFTER_UNGETC]: Implement from scratch.
23159         * modules/ftello (Files): Add m4/ungetc.m4.
23160         (Depends-on): Add intprops.
23161         * doc/posix-functions/ftello.texi: Mention the macOS bug.
23163 2021-03-20  Bruno Haible  <bruno@clisp.org>
23165         math C++ tests: Fix compilation error on macOS 11.2.
23166         * lib/math.in.h (isnan): For clang >= 12 on macOS, declare 'rpl_isnan',
23167         not 'isnan'.
23169 2021-03-18  Bruno Haible  <bruno@clisp.org>
23171         simple-atomic tests: Fix compilation error on Solaris 10.
23172         Reported by Tom G. Christensen <tgc@jupiterrise.com> in
23173         <https://lists.gnu.org/archive/html/bug-gnulib/2021-03/msg00085.html>.
23174         * tests/test-simple-atomic.c (yield): Define only after all #includes.
23176 2021-03-18  Bruno Haible  <bruno@clisp.org>
23178         simple-atomic: Fix compilation error on Solaris 10/x86_64 with cc.
23179         * lib/simple-atomic.c (atomic_compare_and_swap_ptr): Correct asm
23180         instruction.
23182 2021-03-18  Paul Eggert  <eggert@cs.ucla.edu>
23184         argmatch: fix testing typo
23185         Problem and fix reported by Gisle Vanem in:
23186         https://lists.gnu.org/r/bug-gnulib/2021-03/msg00083.html
23187         * lib/argmatch.c (main) [TEST]: Fix address-of typo.
23189 2021-03-14  Paul Eggert  <eggert@cs.ucla.edu>
23191         intprops: improve commentary
23192         * lib/intprops.h: Improve comments about promotion etc.
23194 2021-03-14  Bruno Haible  <bruno@clisp.org>
23196         time_rz: Put reference documentation into the .h file.
23197         * lib/time.in.h (timezone_t, tzalloc, tzfree, localtime_rz, mktime_z):
23198         Add comments, based on modules/time_rz.
23199         * modules/time_rz (Comment): Remove section.
23201 2021-03-14  Bruno Haible  <bruno@clisp.org>
23203         parse-datetime tests: Avoid a test failure on NetBSD.
23204         Reported by Thomas Klausner <tk@giga.or.at> in
23205         <https://lists.gnu.org/archive/html/bug-gnulib/2021-03/msg00069.html>.
23206         * tests/test-parse-datetime.c (main): Skip two tests on NetBSD.
23208 2021-03-10  Paul Eggert  <eggert@cs.ucla.edu>
23210         libc-config: port to DragonFlyBSD 5.9
23211         DragonFlyBSD defines __nonnull incompatibly with glibc,
23212         so avoid the use of __nonnull in Gnulib code.
23213         Problem reported by Gavin Smith in:
23214         https://lists.gnu.org/r/bug-gnulib/2021-03/msg00066.html
23215         * lib/cdefs.h (__attribute_nonnull__): Rename from __nonnull.
23216         All uses in Gnulib changed.  There should be no need to change
23217         glibc code that is not shared with Gnulib.
23218         (__nonnull): New macro, defined in terms of __attribute_nonnull__,
23219         and which can be used in glibc code that is not shared with Gnulib.
23221 2021-03-07  Paul Eggert  <eggert@cs.ucla.edu>
23223         manywarnings: modernize documentation
23224         Problem reported by Reuben Thomas in:
23225         https://lists.gnu.org/r/bug-gnulib/2021-03/msg00046.html
23226         * doc/manywarnings.texi (manywarnings): Update in
23227         the light of recent changes to the manywarnings module.
23229 2021-03-07  Bruno Haible  <bruno@clisp.org>
23231         sysexits: Fix for Haiku.
23232         * lib/sysexits.in.h: Don't assume that <sysexits.h>, when it exists,
23233         defines anything.
23234         * doc/glibc-headers/sysexits.texi: Mention the Haiku bug.
23236 2021-03-07  Bruno Haible  <bruno@clisp.org>
23238         Rename GNULIB_WCHAR_SINGLE to GNULIB_WCHAR_SINGLE_LOCALE.
23239         * lib/lc-charset-dispatch.c: Test GNULIB_WCHAR_SINGLE_LOCALE instead of
23240         GNULIB_WCHAR_SINGLE.
23241         * lib/wcwidth.c: Likewise.
23242         * tests/test-wcwidth.c: Likewise.
23243         * doc/multithread.texi: Document GNULIB_WCHAR_SINGLE_LOCALE instead of
23244         GNULIB_WCHAR_SINGLE.
23245         * NEWS: Document the change.
23247 2021-03-06  Bruno Haible  <bruno@clisp.org>
23249         mbrtowc: Allow locking optimization independently of 'unlocked-io'.
23250         * lib/mbtowc-lock.h: Test GNULIB_MBRTOWC_SINGLE_THREAD instead of
23251         USE_UNLOCKED_IO.
23252         * doc/multithread.texi: Document GNULIB_MBRTOWC_SINGLE_THREAD.
23254 2021-03-06  Bruno Haible  <bruno@clisp.org>
23256         regex: Allow locking optimization independently of 'unlocked-io'.
23257         * lib/regex_internal.h: Test GNULIB_REGEX_SINGLE_THREAD instead of
23258         USE_UNLOCKED_IO.
23259         * doc/multithread.texi: Document GNULIB_REGEX_SINGLE_THREAD.
23261 2021-03-06  Bruno Haible  <bruno@clisp.org>
23263         exclude: Allow stdio optimization independently of 'unlocked-io'.
23264         * lib/exclude.c: Test GNULIB_EXCLUDE_SINGLE_THREAD instead of
23265         USE_UNLOCKED_IO.
23266         * modules/exclude (Depends-on): Add unlocked-io-internal.
23267         * doc/multithread.texi: Document GNULIB_EXCLUDE_SINGLE_THREAD.
23269 2021-03-06  Bruno Haible  <bruno@clisp.org>
23271         readutmp: Optimize stdio accesses.
23272         * lib/readutmp.c: Include unlocked-io.h unconditionally.
23273         * modules/readutmp (Depends-on): Add unlocked-io-internal.
23275 2021-03-06  Bruno Haible  <bruno@clisp.org>
23277         mountlist: Optimize stdio accesses.
23278         * lib/mountlist.c: Include unlocked-io.h unconditionally.
23279         * modules/mountlist (Depends-on): Add unlocked-io-internal.
23281 2021-03-06  Bruno Haible  <bruno@clisp.org>
23283         getusershell: Optimize stdio accesses when possible.
23284         * lib/getusershell.c: Test GNULIB_GETUSERSHELL_SINGLE_THREAD instead of
23285         USE_UNLOCKED_IO.
23286         * modules/getusershell (Depends-on): Add unlocked-io-internal.
23287         * doc/multithread.texi: Document GNULIB_GETUSERSHELL_SINGLE_THREAD.
23289 2021-03-06  Bruno Haible  <bruno@clisp.org>
23291         unlocked-io-internal: New module.
23292         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO): Don't define
23293         USE_UNLOCKED_IO here.
23294         * modules/unlocked-io-internal: New file, based on modules/unlocked-io.
23295         * modules/unlocked-io (Description): Clarify.
23296         (Files, Depends-on): Just use the unlocked-io-internal module.
23297         (configure.ac): Define GNULIB_STDIO_SINGLE_THREAD and USE_UNLOCKED_IO
23298         here.
23299         * doc/multithread.texi: Clarify when the 'unlocked-io' module can be
23300         used.
23302 2021-03-06  Bruno Haible  <bruno@clisp.org>
23304         posixtm: Remove unused includes.
23305         * lib/posixtm.c: Don't include <stdio.h>, <sys/types.h>, unlocked-io.h.
23307 2021-03-06  Bruno Haible  <bruno@clisp.org>
23309         dynarray: Add tests.
23310         * tests/test-dynarray.c: New file.
23311         * modules/dynarray-tests: New file.
23313         dynarray: Make the module usable on its own.
23314         * lib/dynarray.h: Document the exported API. Comments taken from
23315         lib/malloc/dynarray-skeleton.c and lib/malloc/dynarray.h.
23316         Distinguish an internal include from an include for instantiation.
23317         In the latter case, include <libc-config.h> and
23318         <malloc/dynarray-skeleton.c>.
23319         * modules/dynarray (Depends-on): Add intprops.
23320         (Include): Reduce to just "dynarray.h".
23322 2021-03-06  Bruno Haible  <bruno@clisp.org>
23324         scratch_buffer: Add comment.
23325         * lib/scratch_buffer.h: Add comment.
23327 2021-03-06  Paul Eggert  <eggert@cs.ucla.edu>
23329         parse-datetime2: fix licensing
23330         Problem reported by Bruno Haible in:
23331         https://lists.gnu.org/r/bug-gnulib/2021-03/msg00017.html
23332         * gnulib-tool (func_get_license): Treat parse-datetime2
23333         (actually, anything starting with "parse-datetime")
23334         like parse-datetime, as far as licenses go.
23336 2021-03-06  Bruno Haible  <bruno@clisp.org>
23338         free-posix: Update documentation.
23339         * doc/posix-functions/free.texi: Add platform details.
23341 2021-03-06  Bruno Haible  <bruno@clisp.org>
23343         doc: Update for glibc 2.33.
23344         * doc/glibc-functions/mallinfo2.texi: New file.
23345         * doc/gnulib.texi: Include it.
23346         (Glibc sys/vtimes.h): Remove section.
23347         * doc/glibc-functions/vtimes.texi: Remove file.
23348         * doc/pastposix-functions/h_errno.texi: Update.
23349         * doc/posix-functions/*.texi: Likewise.
23350         * doc/glibc-functions/*.texi: Likewise.
23352 2021-03-04  Bruno Haible  <bruno@clisp.org>
23354         stddef: Generalize tcc workaround to other compilers.
23355         Suggested by Paul Eggert in
23356         <https://lists.gnu.org/archive/html/bug-gnulib/2021-03/msg00027.html>.
23357         * lib/stddef.in.h: Undefine the __need_* macros with all compilers.
23358         * doc/posix-headers/stddef.texi: Mention that the TinyCC bug also exists
23359         on macOS.
23361 2021-03-04  Paul Eggert  <eggert@cs.ucla.edu>
23363         stdalign: port to tcc + glibc
23364         * lib/stdalign.in.h (_Alignas): Do not define using __attribute__
23365         if __attribute__ is defined as a macro, as __attribute__ surely a
23366         no-op in that case and this is an area where __attribute__ cannot
23367         simply be ignored.
23368         * m4/stdalign.m4 (gl_STDALIGN_H): Include <stdint.h> so that
23369         it #defines __attribute__(x) to nothing on glibc-based systems
23370         when non-GNU-C-compatible compilers are used.
23371         This exposes a bug in Tiny C Compiler 0.9.27’s implementation
23372         of _Alignas on glibc platforms.
23374 2021-03-03  Bruno Haible  <bruno@clisp.org>
23376         asyncsafe-spin, simple-atomic: Add support for tcc/x86.
23377         * lib/asyncsafe-spin.c (memory_barrier): With tcc/x86, don't use the
23378         'mfence' instruction.
23379         * lib/simple-atomic.c (memory_barrier): Likewise.
23381         asyncsafe-spin, simple-atomic: Add support for tcc.
23382         * lib/asyncsafe-spin.c (memory_barrier, atomic_compare_and_swap): On
23383         i386 and x86_64, treat tcc like older GCC or clang.
23384         * lib/simple-atomic.c (memory_barrier, atomic_compare_and_swap,
23385         atomic_compare_and_swap_ptr): Likewise.
23387 2021-03-02  Bruno Haible  <bruno@clisp.org>
23389         stddef: Work around an interoperability problem of tcc with glibc.
23390         Reported by Luca Saiu <positron@gnu.org> in
23391         <https://lists.gnu.org/archive/html/bug-gnulib/2021-03/msg00011.html>.
23392         * lib/stddef.in.h [__TINYC__]: In case of the special invocation
23393         convention, undefine the macros that TinyCC's <stddef.h> should undefine
23394         but doesn't.
23395         * doc/posix-headers/stddef.texi: Mention the TinyCC bug.
23397 2021-03-02  Paul Eggert  <eggert@cs.ucla.edu>
23399         mbrtowc: port to AIX 7.1 with xlc 12.1
23400         Fix a problem with locks when building GNU Tar (Savannah commit
23401         55f2a0772e08b9febac3ac0de5cb048d4c60d2f5) on AIX 7.1 with IBM XL
23402         C/C++ V12.1 using ‘./configure CC=xlc’.  The link fails due to
23403         missing definitions of pthread_mutex_lock and
23404         pthread_mutex_unlock.  GNU Tar uses unlocked-io and so
23405         should not need to worry about multithreading or locks.
23406         * lib/mbtowc-lock.h (mbtowc_with_lock) [USE_UNLOCKED_IO]:
23407         Don’t bother with locks, since this app is single-threaded.
23408         There may be similar linking problems with lib/nl_langinfo.c and
23409         lib/setlocale_null.c but my GNU Tar build didn’t run into them, so
23410         I left them alone for now.
23412 2021-03-01  Paul Eggert  <eggert@cs.ucla.edu>
23414         unlocked-io: do not redefine getc_unlocked etc.
23415         I ran into this problem on AIX 7.1 with GNU Tar, which
23416         enables visibility of getc_unlocked etc. after testing
23417         whether they’re declared, causing argp-namefrob.h and
23418         unlocked-io.h to redefine the macros.
23419         * lib/argp-namefrob.h, lib/unlocked-io.h:
23420         (clearerr_unlocked, feof_unlocked ferror_unlocked)
23421         (fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked)
23422         (fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked)
23423         (putc_unlocked, putchar_unlocked): Do not define if already defined.
23425         parse-datetime2: new module
23426         This splits the old parse-datetime into two parts; the
23427         first is parse-datetime2 which supports all the new bells
23428         and whistles, the second is parse-datetime, which reverts to
23429         its original intent.  This avoids some bogus diagnostics
23430         when build GNU Tar with gcc -flto -fanalyze and
23431         with --enable-gcc-warnings.  And it slims down the
23432         executable a bit.
23433         * NEWS: Mention this.
23434         * lib/parse-datetime.y (parser_control) [!GNULIB_PARSE_DATETIME2]:
23435         Omit parse_datetime_debug member.
23436         (debugging): New function.  Use it everywhere the old code
23437         would load parse_datetime_debug.
23438         (parse_datetime_body): New static function, with the body
23439         of the old parse_datetime2.  Set pc.parse_datetime_debug
23440         only if GNULIB_PARSE_DATETIME2.
23441         (parse_datetime2, parse_datetime): Use this new function.
23442         (parse_datetime2) [!GNULIB_PARSE_DATETIME2]: Remove.
23443         * modules/parse-datetime2: New file.
23445 2021-02-27  Bruno Haible  <bruno@clisp.org>
23447         string-buffer: Fixes.
23448         * modules/string-buffer (License): Change to LGPL.
23449         * tests/test-string-buffer.c (main): Add another sb_appendf call, that
23450         is more likely to fail.
23452 2021-02-25  Bernhard Voelker  <mail@bernhard-voelker.de>
23454         gitlog-to-changelog: output SHA in "empty commit message" warning
23455         * build-aux/gitlog-to-changelog: Add $sha to above warning diagnostic.
23457 2021-02-24  Paul Eggert  <eggert@cs.ucla.edu>
23459         glob: include libc-config.h in a more-standard way
23460         Inspired by Tom Tromey’s report for RHEL 6 in:
23461         https://lists.gnu.org/r/bug-gnulib/2021-02/msg00088.html
23462         * lib/glob.c [!_LIBC]: Include libc-config.h, not just config.h
23463         * lib/glob.in.h: Include libc-config.h only if needed.
23465 2021-02-21  Bruno Haible  <bruno@clisp.org>
23467         string-buffer: Add tests.
23468         * tests/test-string-buffer.c: New file.
23469         * modules/string-buffer-tests: New file.
23471         string-buffer: New module.
23472         * lib/string-buffer.h: New file.
23473         * lib/string-buffer.c: New file.
23474         * modules/string-buffer: New file.
23475         * doc/posix-functions/open_memstream.texi: Mention the new module.
23477 2021-02-21  Bruno Haible  <bruno@clisp.org>
23479         scratch_buffer: Document the exported API.
23480         * lib/scratch_buffer.h: Add comments, taken from
23481         lib/malloc/scratch_buffer.h.
23483 2021-02-21  Bruno Haible  <bruno@clisp.org>
23485         DEPENDENCIES: Update.
23486         * DEPENDENCIES: Require GCC >= 3.1. Tell where to find working GNU m4
23487         tarballs. Mention awk. Point to pre-built packages for gettext, bison,
23488         gperf, texinfo.
23490 2021-02-20  Bruno Haible  <bruno@clisp.org>
23492         parse-datetime: Fix comment.
23493         * modules/parse-datetime (Makefile.am): Fix comment.
23495 2021-02-16  Bruno Haible  <bruno@clisp.org>
23497         passfd: Fix test failure on FreeBSD >= 12 and NetBSD in 64-bit mode.
23498         * lib/passfd.c (recvfd): Use the CMSG_SPACE macro to compute the value
23499         for msg_controllen.
23501 2021-02-16  Paul Eggert  <eggert@cs.ucla.edu>
23503         Port better to macOS Mojave
23504         Problem reported by Tom Shields in:
23505         https://lists.gnu.org/r/bug-gnulib/2021-02/msg00064.html
23506         * config/srclist.txt: Comment out dynarray_finalize.c.
23507         * lib/dynarray.h (__libc_dynarray_at_failure): Don’t include
23508         libc-config.h here, as that’s the includer’s responsibility.
23509         * lib/malloc/dynarray_at_failure.c:
23510         * lib/malloc/dynarray_emplace_enlarge.c:
23511         * lib/malloc/dynarray_finalize.c:
23512         * lib/malloc/dynarray_resize.c:
23513         * lib/malloc/dynarray_resize_clear.c:
23514         If _LIBC is not defined, include libc-config.h.
23516 2021-02-15  Bruno Haible  <bruno@clisp.org>
23518         linked-list test: Add test for SIGNAL_SAFE_LIST. (It currently fails.)
23519         * tests/test-asyncsafe-linked_list.sh: New file.
23520         * tests/test-asyncsafe-linked_list.c: New file.
23521         * modules/linked-list-tests (Files): Add them.
23522         (Depends-on): Add thread, yield, nanosleep, sigaction, sigprocmask.
23523         (Makefile.am): Arrange to compile test-asyncsafe-linked_list.c and run
23524         test-asyncsafe-linked_list.sh.
23526 2021-02-14  Bruno Haible  <bruno@clisp.org>
23528         simple-atomic: Add tests.
23529         * tests/test-simple-atomic.c: New file.
23530         * modules/simple-atomic-tests: New file.
23532         simple-atomic: New module.
23533         * lib/simple-atomic.h: New file.
23534         * lib/simple-atomic.c: New file, based on lib/asyncsafe-spin.c.
23535         * modules/simple-atomic: New file.
23537 2021-02-14  Bruno Haible  <bruno@clisp.org>
23539         Fix distinction of 32-bit/64-bit mode with xlc 13.1.3 on AIX.
23540         * m4/host-cpu-c-abi.m4 (gl_HOST_CPU_C_ABI, gl_HOST_CPU_C_ABI_32BIT):
23541         Test __LP64__ instead of _ARCH_PPC64.
23542         * m4/lib-ld.m4 (AC_LIB_PROG_LD): Likewise.
23543         * lib/stddef.in.h: Likewise.
23545 2021-02-13  Ozkan Sezer  <sezeroz@gmail.com>
23547         lib-symbol-visibility: Make it work with -Wmissing-prototypes.
23548         * m4/visibility.m4 (gl_VISIBILITY): Avoid error from simultaneous use of
23549         -Wmissing-prototypes and -Werror.
23551 2021-02-08  Bruno Haible  <bruno@clisp.org>
23553         stddef: Fix test-stddef compilation error on MidnightBSD/x86.
23554         * lib/stddef.in.h (_GL_STDDEF_ALIGNAS, rpl_max_align_t, max_align_t):
23555         Don't ignore HAVE_MAX_ALIGN_T if the compiler is clang.
23557 2021-02-08  Bruno Haible  <bruno@clisp.org>
23559         Document non-standard prototypes on MidnightBSD.
23560         * doc/posix-functions/initstate.texi: Mention different prototype on
23561         MidnightBSD 2.0.
23562         * doc/posix-functions/srandom.texi: Likewise.
23563         * doc/posix-functions/getlogin_r.texi: Likewise.
23564         * doc/glibc-functions/sethostname.texi: Likewise.
23566 2021-02-08  Bruno Haible  <bruno@clisp.org>
23568         posixtm tests: Fix warnings seen on MidnightBSD/x86.
23569         * tests/test-posixtm.c (main): Convert two 'time_t' values to 'long' for
23570         printing.
23572 2021-02-07  Bruno Haible  <bruno@clisp.org>
23574         Add cross-compilation guesses for MidnightBSD.
23575         * m4/malloc.m4 (_AC_FUNC_MALLOC_IF): When cross-compiling, use the
23576         result from native compilation.
23577         * m4/realloc.m4 (_AC_FUNC_REALLOC_IF): Likewise.
23578         * m4/mbrtoc32.m4 (gl_MBRTOC32_SANITYCHECK): Likewise.
23579         * m4/mprotect.m4 (gl_FUNC_MPROTECT_WORKS): Likewise.
23580         * m4/posix_spawn.m4 (gl_POSIX_SPAWN_SECURE): Likewise.
23581         * m4/printf.m4 (gl_PRINTF_SIZES_C99, gl_PRINTF_INFINITE,
23582         gl_PRINTF_INFINITE_LONG_DOUBLE, gl_PRINTF_DIRECTIVE_F,
23583         gl_SNPRINTF_TRUNCATION_C99, gl_SNPRINTF_RETVAL_C99,
23584         gl_SNPRINTF_DIRECTIVE_N, gl_VSNPRINTF_ZEROSIZE_C99): Likewise.
23585         * m4/strfmon_l.m4 (gl_FUNC_STRFMON_L): Likewise.
23586         * m4/setlocale_null.m4 (gl_FUNC_SETLOCALE_NULL): Use predetermined
23587         result on MidnightBSD.
23589 2021-02-07  Bruno Haible  <bruno@clisp.org>
23591         threadlib: Add support for MidnightBSD.
23592         * m4/threadlib.m4 (gl_WEAK_SYMBOLS, gl_THREADLIB_BODY): On MidnightBSD,
23593         use the same test as on FreeBSD.
23595 2021-02-07  Bruno Haible  <bruno@clisp.org>
23597         host-os: Add support for MidnightBSD.
23598         * m4/host-os.m4 (gl_HOST_OS): On MidnightBSD, set HOST_OPERATING_SYSTEM
23599         to "MidnightBSD", not "Midnightbsd".
23601 2021-02-07  Bruno Haible  <bruno@clisp.org>
23603         c-stack: Adjust for MidnightBSD.
23604         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): On MidnightBSD,
23605         set FAULT_YIELDS_SIGBUS.
23607 2021-02-07  Bruno Haible  <bruno@clisp.org>
23609         relocatable-prog: Add support for MidnightBSD.
23610         * m4/relocatable.m4 (gl_RELOCATABLE_BODY): Use the ELF $ORIGIN trick
23611         also on MidnightBSD >= 1.1.
23612         * build-aux/config.libpath: Treat MidnightBSD like FreeBSD.
23613         * build-aux/reloc-ldflags: Likewise.
23615 2021-02-07  Bruno Haible  <bruno@clisp.org>
23617         havelib: Add support for MidnightBSD.
23618         * build-aux/config.rpath: Treat MidnightBSD like FreeBSD >= 4.
23620 2021-02-07  Bruno Haible  <bruno@clisp.org>
23622         wcwidth: Document MidnightBSD bug.
23623         * doc/posix-functions/wcwidth.texi: Mention MidnightBSD as an affected
23624         platform.
23625         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Update comments.
23627 2021-02-07  Bruno Haible  <bruno@clisp.org>
23629         pthread_sigmask: Document MidnightBSD bug.
23630         * doc/posix-functions/pthread_sigmask.texi: Mention MidnightBSD as an
23631         affected platform.
23632         * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK): Update
23633         cross-compilation guess accordingly.
23635 2021-02-07  Bruno Haible  <bruno@clisp.org>
23637         immutable: Avoid test failures on MidnightBSD.
23638         * tests/test-immutable.c (install_segv_handler): On FreeBSD, install the
23639         handler also for SIGBUS.
23641 2021-02-07  Bruno Haible  <bruno@clisp.org>
23643         c32is*: Avoid test failures on MidnightBSD.
23644         * tests/test-c32isalnum.c (main): On FreeBSD, disable tests that fail on
23645         MidnightBSD 1.1.
23646         * tests/test-c32isalpha.c (main): Likewise.
23647         * tests/test-c32isblank.c (main): Likewise.
23648         * tests/test-c32islower.c (main): Likewise.
23649         * tests/test-c32isupper.c (main): Likewise.
23651 2021-02-05  Paul Eggert  <eggert@cs.ucla.edu>
23653         regex: fix comment location
23654         * lib/regexec.c (update_regs): Move comment.
23656         regex-tests: add bug 11053 test
23657         * tests/test-regex.c (main): New test case for glibc bug 11053.
23659         regex: debug check for set member duplicates
23660         * lib/regex_internal.c (re_node_set_insert): Add a DEBUG_ASSERT
23661         that would have caught some recently-fixed performance bugs
23662         that caused sets to contain duplicate members.
23664         regex: fix longstanding backref match bug
23665         This fixes a longstanding glibc bug concerning backreferences
23666         <https://sourceware.org/11053> (2009-12-04).
23667         * lib/regexec.c (proceed_next_node, push_fail_stack)
23668         (pop_fail_stack): Push and pop the previous registers
23669         as well as the current ones.  All callers changed.
23670         (set_regs): Also pop if CUR_NODE has already been checked,
23671         so that it does not get added as a duplicate set entry.
23672         (update_regs): Fix comment location.
23673         * tests/test-regex.c (tests): New constant.
23674         (bug_regex11): New test function.
23675         (main): Bump alarm value.  Call new test function.
23677         regex: avoid duplicate in espilon closure
23678         * lib/regcomp.c (calc_eclosure_iter): Insert NODE into epsilon
23679         closure first rather than last.  Otherwise, the epsilon closure
23680         might contain a duplicate of NODE.
23682         regex-tests: fix typo
23683         * tests/test-regex.c (main): Fix typo that would have caused an
23684         old test case to report incorrect values on failure.
23686         regex: make it easier to merge into glibc
23687         * lib/regex_internal.h [_LIBC]: Do not include Gnulib’s dynarray.h.
23689         regex: minor refactoring
23690         * lib/regexec.c (proceed_next_node): Use more-local decls.
23692         regex: avoid undefined behavior
23693         * lib/regexec.c (pop_fail_stack): If the stack is empty, return -1
23694         instead of indulging in undefined behavior.  This simplifies
23695         callers, and avoids undefined behavior in some cases (see glibc
23696         bug 11053, though this change does not fix that overall bug).
23698         regex: improve comments
23699         * lib/regexec.c: Add and correct comments about return values.
23701 2021-01-31  Bruno Haible  <bruno@clisp.org>
23703         relocatable-prog-wrapper: Tweak today's patch.
23704         * build-aux/install-reloc (func_create_wrapper): Clean up free.o.
23706 2021-01-31  Bruno Haible  <bruno@clisp.org>
23708         fmaf: Document QEMU bug.
23709         * doc/posix-functions/fmaf.texi: Add note about QEMU bug.
23711 2021-01-31  Bruno Haible  <bruno@clisp.org>
23713         remainderl: Work around musl libc bug.
23714         * doc/posix-functions/remainderl.texi: Document musl libc bug.
23715         * m4/remainderl.m4 (gl_FUNC_REMAINDERL_WORKS): Add more tests. Update
23716         cross compilation guess.
23718 2021-01-31  Bruno Haible  <bruno@clisp.org>
23720         log2l: Work around musl libc bugs.
23721         * doc/posix-functions/log2l.texi: Document musl libc bugs.
23722         * m4/log2l.m4 (gl_FUNC_LOG2L_WORKS): Add more tests. Update cross
23723         compilation guess.
23725 2021-01-31  Bruno Haible  <bruno@clisp.org>
23727         log1pl: Work around musl libc bug.
23728         * doc/posix-functions/log1pl.texi: Document musl libc bug.
23729         * m4/log1pl.m4 (gl_FUNC_LOG1PL_WORKS): New macro.
23730         (gl_FUNC_LOG1PL): Invoke it.
23732 2021-01-31  Bruno Haible  <bruno@clisp.org>
23734         log10l: Document musl libc bug.
23735         * doc/posix-functions/log10l.texi: Document musl libc bug.
23736         * m4/log10l.m4 (gl_FUNC_LOG10L_WORKS): Update comment and cross
23737         compilation guess.
23739 2021-01-31  Bruno Haible  <bruno@clisp.org>
23741         logl: Document musl libc bug.
23742         * doc/posix-functions/logl.texi: Document musl libc bug.
23743         * m4/logl.m4 (gl_FUNC_LOGL_WORKS): Update comment and cross
23744         compilation guess.
23746 2021-01-31  Bruno Haible  <bruno@clisp.org>
23748         expm1l: Document musl libc bug.
23749         * doc/posix-functions/expm1l.texi: Document musl libc bug.
23750         * m4/expm1l.m4 (gl_FUNC_EXPM1L): Update comment and cross
23751         compilation guess.
23753 2021-01-31  Bruno Haible  <bruno@clisp.org>
23755         expl: Document musl libc bug.
23756         * doc/posix-functions/expl.texi: Document musl libc bug.
23757         * m4/expl.m4 (gl_FUNC_EXPL): Update comment and cross
23758         compilation guess.
23760 2021-01-31  Bruno Haible  <bruno@clisp.org>
23762         relocatable-prog-wrapper: Update after recent changes.
23763         * lib/relocwrapper.c: Update comments.
23764         * modules/relocatable-prog-wrapper (Files): Add lib/scratch_buffer.h,
23765         lib/malloc/scratch_buffer*, lib/malloc.c, lib/realloc.c, lib/free.c,
23766         lib/mempcpy.c, lib/rawmemchr.c, m4/lstat.m4. Remove lib/lstat.c.
23767         (Depends-on): Add c99, eloop-threshold, fcntl-h, idx, intprops,
23768         libc-config, stddef, sys_stat. Remove alloca-opt.
23769         (configure.ac): Invoke gl_FUNC_MALLOC_POSIX, gl_FUNC_REALLOC_POSIX,
23770         gl_FUNC_FREE, gl_FUNC_MEMPCPY, gl_FUNC_RAWMEMCHR.
23771         * lib/canonicalize-lgpl.c (memmove): Undefine in the relocwrapper.
23772         * build-aux/install-reloc (func_create_wrapper): Compile also
23773         malloc/scratch_buffer_*.c, malloc.c, realloc.c, free.c, mempcpy.c,
23774         rawmemchr.c. Don't compile lstat.c.
23776         Make it possible to compile rawmemchr.c separately, unconditionally.
23777         * lib/rawmemchr.c: Don't define rawmemchr if not needed.
23779         Make it possible to compile mempcpy.c separately, unconditionally.
23780         * lib/mempcpy.c: Don't define mempcpy if not needed.
23782         Make it possible to compile free.c separately, unconditionally.
23783         * m4/free.m4 (gl_FUNC_FREE): Define HAVE_FREE_POSIX.
23784         * lib/free.c: Don't define rpl_free if not needed.
23786         Make it possible to compile realloc.c separately, unconditionally.
23787         * modules/realloc-posix (configure.ac): Invoke gl_MODULE_INDICATOR.
23788         * lib/realloc.c: Don't define rpl_realloc if not needed.
23790         Make it possible to compile malloc.c separately, unconditionally.
23791         * modules/malloc-posix (configure.ac): Invoke gl_MODULE_INDICATOR.
23792         * lib/malloc.c: Don't define rpl_malloc if not needed.
23794 2021-01-31  Bruno Haible  <bruno@clisp.org>
23796         canonicalize-lgpl: Simplify.
23797         * lib/canonicalize-lgpl.c (_GL_USE_STDLIB_ALLOC): Remove macro.
23799 2021-01-30  Bruno Haible  <bruno@clisp.org>
23801         canonicalize, canonicalize-lgpl: Straighten dependencies.
23802         * modules/canonicalize-lgpl (Depends-on): Remove free-posix,
23803         malloc-posix. Add unistd.
23804         * modules/canonicalize (Depends-on): Remove free-posix, xalloc.
23805         Add unistd.
23807 2021-01-30  Bruno Haible  <bruno@clisp.org>
23809         scratch_buffer: Fix dependencies.
23810         * modules/scratch_buffer (Depends-on): Add malloc-posix, realloc-posix,
23811         free-posix.
23813 2021-01-26  Bruno Haible  <bruno@clisp.org>
23815         doc: More precise wording.
23816         Reported by Reuben Thomas <rrt@sc3d.org> in
23817         <https://lists.gnu.org/archive/html/bug-gnulib/2021-01/msg00300.html>.
23818         * doc/relocatable.texi (Enabling Relocatability): Talk about package
23819         management systems in general.
23821         doc: Remove obsolete text.
23822         Suggested by Reuben Thomas <rrt@sc3d.org> in
23823         <https://lists.gnu.org/archive/html/bug-gnulib/2021-01/msg00299.html>.
23824         * doc/relocatable.texi (Enabling Relocatability): Stop mentioning an
23825         issue of libtool 1.5.x.
23827 2021-01-26  Simon Josefsson  <simon@josefsson.org>
23829         maintainer-makefile: Mimic bootstrap's gnulib-srcdir guessing.
23830         * top/maint.mk (gnulib_dir): If $(srcdir)/gnulib doesn't exist,
23831         fall back to $GNULIB_SRCDIR.
23833 2021-01-25  Bruno Haible  <bruno@clisp.org>
23835         posix_spawn_file_actions_* tests: Fix module dependencies.
23836         * modules/posix_spawn_file_actions_addclose-tests (Depends-on): Add
23837         posix_spawn_file_actions_destroy.
23838         * modules/posix_spawn_file_actions_addopen-tests (Depends-on): Likewise.
23839         * modules/posix_spawn_file_actions_adddup2-tests (Depends-on): Likewise.
23840         * modules/posix_spawn_file_actions_addchdir-tests (Depends-on):
23841         Likewise.
23842         * modules/posix_spawn_file_actions_addfchdir-tests (Depends-on):
23843         Likewise.
23845 2021-01-25  Bruno Haible  <bruno@clisp.org>
23847         posix_spawn_file_actions_addclose: Relax configure test.
23848         * m4/posix_spawn.m4 (gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE): Test a
23849         negative file descriptor, not an out-of-range file descriptor.
23850         * tests/test-posix_spawn_file_actions_addclose.c (main): Add comment.
23851         * doc/posix-functions/posix_spawn_file_actions_addclose.texi: Update.
23853 2021-01-25  Simon Josefsson  <simon@josefsson.org>
23855         getaddrinfo: Doc fix.
23856         * doc/posix-functions/getaddrinfo.texi (getaddrinfo): Gnulib does
23857         not support IDN.
23859 2021-01-24  Bruno Haible  <bruno@clisp.org>
23861         getcwd: Fix cross-compilation guess for musl libc.
23862         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): Guess no also on
23863         musl libc.
23864         * doc/posix-functions/getcwd.texi: Update platform info.
23866 2021-01-24  Bruno Haible  <bruno@clisp.org>
23868         expm1l: Fix configure test result with GCC 10 on powerpc64le.
23869         * m4/expm1l.m4 (gl_FUNC_EXPM1L): Change test to avoid GCC optimization.
23871 2021-01-23  Bruno Haible  <bruno@clisp.org>
23873         utime: Fix configure test (regression 2020-12-04).
23874         Reported by Ryan Schmidt <wget@ryandesign.com> via Tim Rühsen in
23875         <https://lists.gnu.org/archive/html/bug-gnulib/2021-01/msg00282.html>.
23876         * m4/utime.m4 (gl_FUNC_UTIME): In the test program, include <utime.h>,
23877         not <time.h>.
23879 2021-01-23  Paul Eggert  <eggert@cs.ucla.edu>
23881         libc-config: port to Xcode 7
23882         Problem reported by Mattias Engdegård in:
23883         https://lists.gnu.org/r/emacs-devel/2021-01/msg01089.html
23884         * lib/cdefs.h (__nonnull): If already defined but glibc is not in
23885         use, override the definition with Gnulib’s _GL_ATTRIBUTE_NONNULL.
23886         This is needed for Xcode 7, which has a ‘#define __nonnull
23887         _Nonnull’ builtin for backwards-compatibility with an older Xcode
23888         syntax that GNUish code never uses.
23890 2021-01-23  Bastien Roucariès  <rouca@debian.org>
23892         explicit_bzero: Add fallback for other compilers.
23893         * lib/explicit_bzero.c (explicit_bzero): For other compilers, invoke
23894         memset through a volatile function pointer.
23896         explicit_bzero: Add support for clang.
23897         * lib/explicit_bzero.c (explicit_bzero): Add a compiler barrier for
23898         clang.
23900 2021-01-21  Paul Eggert  <eggert@cs.ucla.edu>
23902         Port FALLTHROUGH to clang 3.4 and earlier
23903         Problem reported by Akim Demaille in:
23904         https://lists.gnu.org/r/bug-gnulib/2021-01/msg00241.html
23905         * lib/cdefs.h (__glibc_has_attribute):
23906         * m4/gnulib-common.m4 (gl_COMMON_BODY):
23907         Do not trust __has_attribute in clang 3.4 and earlier, as
23908         <https://releases.llvm.org/3.5.0/tools/clang/docs/ReleaseNotes.html>
23909         says that __has_attribute is unreliable in these old versions.
23911 2021-01-20  Bruno Haible  <bruno@clisp.org>
23913         gc-random: Fix link error in tests.
23914         * modules/crypto/gc-random (Link): New section.
23915         * modules/crypto/gc-tests (Makefile.am): Link test-gc with
23916         $(LIB_GETRANDOM).
23918 2021-01-20  Simon Josefsson  <simon@josefsson.org>
23920         gc-random: Replace implementation with call to getrandom.
23921         * lib/gc-gnulib.c [GNULIB_GC_RANDOM]: Replace #include's with
23922         those needed for getrandom.
23923         (gc_init): Remove old randomness code.
23924         (gc_done): Likewise.
23925         (randomize): Rewrite using getrandom, inspired by getentropy.
23926         * m4/gc-random.m4: Remove file.
23927         * modules/crypto/gc-random: Drop gc-random.m4, gl_GC_RANDOM, and
23928         LIB_GC_RANDOM.  Add conditional dependency on getrandom.
23929         * modules/crypto/gc-tests (test_gc_LDADD): Drop LIB_GC_RANDOM.
23931 2021-01-20  Bruno Haible  <bruno@clisp.org>
23933         exec*e tests: Avoid test failures on Cygwin.
23934         * tests/test-execle-main.c (main): On Cygwin, add /bin to the new PATH.
23935         * tests/test-execve-main.c (main): Likewise.
23936         * tests/test-execvpe-main.c (main): Likewise.
23938 2021-01-20  Bruno Haible  <bruno@clisp.org>
23940         canonicalize-lgpl: Work around a Cygwin bug.
23941         * m4/canonicalize.m4 (gl_FUNC_REALPATH_WORKS): Test for lstat. Add a
23942         test case that involves a symbolic link to an existing file.
23943         * doc/posix-functions/realpath.texi: Mention the Cygwin bug.
23945 2021-01-20  Bruno Haible  <bruno@clisp.org>
23947         doc: Document ptsname_r bug on Cygwin.
23948         * doc/glibc-functions/ptsname_r.texi: Mention Cygwin bug.
23950 2021-01-20  Bruno Haible  <bruno@clisp.org>
23952         sethostname tests: Avoid test failure on Cygwin.
23953         * tests/test-sethostname2.c (main): Treat errno EACCESS like EPERM.
23955 2021-01-19  Paul Eggert  <eggert@cs.ucla.edu>
23957         fnmatch, regex, fts: FALLTHROUGH consistency
23958         Be more consistent about how FALLTHROUGH is defined.
23959         For Gnulib, use attribute.h.  For glibc, use __GNUC__ >= 7.
23960         Problem for glibc reported by Vaseeharan Vinayagamoorthy in:
23961         https://sourceware.org/pipermail/libc-alpha/2021-January/121778.html
23962         * lib/fnmatch.c (FALLTHROUGH) [_LIBC]:
23963         * lib/regex_internal.h (FALLTHROUGH) [_LIBC]:
23964         Don’t worry about Clang, as it’s not needed and provokes GCC.
23965         * lib/fts.c (FALLTHROUGH) [!_LIBC]:
23966         * lib/regex_internal.h (FALLTHROUGH) [!_LIBC]:
23967         Rely on attribute.h for FALLTHROUGH
23968         * modules/regex: Depend on attribute module.
23970 2021-01-19  KO Myung-Hun  <komh78@gmail.com>
23972         spawn-pipe: Fix SIGSEGV on OS/2 kLIBC.
23973         * lib/spawn-pipe.c [OS/2 kLIBC]: Check directory correctly if it means
23974         a current directory.
23976 2021-01-19  KO Myung-Hun  <komh78@gmail.com>
23978         dirent: Fix compilation error in C++ mode on OS/2 kLIBC.
23979         * lib/dirent.in.h (dirfd): Redefine dirfd macro as a rpl function
23980         always.
23982 2021-01-19  KO Myung-Hun  <komh78@gmail.com>
23984         zerosize-ptr: Fix compilation on OS/2 kLIBC.
23985         * tests/zerosize-ptr.h [OS/2 kLIBC]: Don't use mmap().
23987 2021-01-19  KO Myung-Hun  <komh78@gmail.com>
23989         stddef: Fix compilation for max_align_t on OS/2 kLIBC.
23990         * lib/stddef.in.h [OS/2 kLIBC]: Include <cstddef> in C++ mode.
23992 2021-01-19  KO Myung-Hun  <komh78@gmail.com>
23994         yield: Implement for OS/2 kLIBC.
23995         * modules/yield (Depends-on): Add sched_yield.
23997         sched_yield: Implement for OS/2 kLIBC.
23998         * lib/sched_yield.c (sched_yield) [OS/2 kLIBC]: New implementation.
24000 2021-01-19  KO Myung-Hun  <komh78@gmail.com>
24002         spawn: Use special invocation for <spawn.h> on OS/2 kLIBC.
24003         * lib/spawn.in.h: Use special invocation to include <spawn.h> properly
24004         on OS/2 kLIBC.
24006 2021-01-18  Bruno Haible  <bruno@clisp.org>
24008         noreturn tests: Avoid test failure on Solaris 10/x86 with cc.
24009         * tests/test-noreturn.c (main): Return 0.
24011 2021-01-18  Bruno Haible  <bruno@clisp.org>
24013         uninorm tests: Fix compilation error on Cygwin.
24014         * tests/uninorm/test-nfc.c (n): Don't define when using a preinstalled
24015         libunistring on Windows.
24016         * tests/uninorm/test-nfd.c (n): Likewise.
24017         * tests/uninorm/test-nfkc.c (n): Likewise.
24018         * tests/uninorm/test-nfkd.c (n): Likewise.
24020 2021-01-17  Bruno Haible  <bruno@clisp.org>
24022         immutable: Implement on native Windows.
24023         * lib/immutable.h (IMMUTABLE_EFFECTIVE): Set to 1 on native Windows.
24024         * lib/immutable.c: Include <windows.h>.
24025         (CreateFileMapping): New macro.
24026         (init_pagesize, init_mmap_file, alloc_pages, free_pages): Add
24027         implementation for native Windows.
24029 2021-01-17  Bruno Haible  <bruno@clisp.org>
24031         canonicalize-lgpl tests: Fix link error.
24032         * modules/canonicalize-lgpl-tests (Makefile.am): Link
24033         test-canonicalize-lgpl with $(LIBINTL).
24035 2021-01-17  Bruno Haible  <bruno@clisp.org>
24037         canonicalize-lgpl: Work around // handling in realpath() of musl 1.2.2.
24038         Reported by Natanael Copa <ncopa@alpinelinux.org> in
24039         <https://lists.gnu.org/archive/html/bug-gettext/2021-01/msg00021.html>.
24040         * m4/canonicalize.m4 (gl_FUNC_REALPATH_WORKS): Add a test whether // is
24041         the same as /, on Linux only.
24042         * lib/canonicalize-lgpl.c: Correct indentation of preprocessor
24043         directives.
24044         * doc/posix-functions/realpath.texi: Mention the musl 1.2.2 bug.
24046 2021-01-17  Bruno Haible  <bruno@clisp.org>
24048         canonicalize[-lgpl] tests: Add more tests.
24049         * tests/test-canonicalize.c (main): Add detailed tests for // handling.
24050         * tests/test-canonicalize-lgpl.c (main): Likewise.
24052 2021-01-17  Bruno Haible  <bruno@clisp.org>
24054         argp tests: Avoid test failures on Alpine Linux.
24055         * tests/test-argp-2.sh: Use the test framework (init.sh). Use the
24056         'compare' function instead of 'diff -c'.
24057         * tests/test-argp-version-etc-1.sh: Likewise.
24059 2021-01-17  Bruno Haible  <bruno@clisp.org>
24061         get-rusage-data tests: Avoid test failure on musl libc.
24062         * modules/get-rusage-data-tests (Files): Add m4/musl.m4.
24063         (configure.ac): Invoke gl_MUSL_LIBC.
24064         * tests/test-get-rusage-data.c (main): Treat musl libc like glibc.
24066 2021-01-17  Bruno Haible  <bruno@clisp.org>
24068         immutable, get-rusage-data: Fix autoconf warning.
24069         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Define through AC_DEFUN_ONCE.
24071 2021-01-16  Bruno Haible  <bruno@clisp.org>
24073         vma-iter: Port to 64-bit Haiku.
24074         * lib/vma-iter.c (vma_iterate): Adapt to changed signature of
24075         get_next_area_info.
24077 2021-01-15  Bruno Haible  <bruno@clisp.org>
24079         doc: Update doc about realpath.
24080         * doc/posix-functions/realpath.texi: Update info about macOS.
24082 2021-01-13  Paul Eggert  <eggert@cs.ucla.edu>
24084         verify: simplify static_assert configuration
24085         * lib/verify.h (_GL_HAVE__STATIC_ASSERT, _GL_HAVE__STATIC_ASSERT1):
24086         Do not define for C++.  This should be good enough nowadays,
24087         since recent-enough C++ compilers have static_assert.
24088         (_GL_HAVE_STATIC_ASSERT_CXX11, _GL_HAVE_STATIC_ASSERT_CXX17):
24089         Remove.  All uses replaced by simply checking __cpp_static_assert.
24091 2021-01-13  Simon Josefsson  <simon@josefsson.org>
24093         lib-msvc-compat: Update libtool usage recommendation.
24094         * doc/ld-output-def.texi (Visual Studio Compatibility): Install
24095         .def files into libdir, not bindir.  Have libfoo-*.def file depend
24096         on libfoo.la to fix parallell builds.
24098 2021-01-12  Bruno Haible  <bruno@clisp.org>
24100         verify: Use C++11 static_assert when available.
24101         Reported by Alexandre Duret-Lutz <adl@lrde.epita.fr> in
24102         <https://lists.gnu.org/archive/html/bug-gnulib/2021-01/msg00177.html>.
24103         * lib/verify.h (_GL_HAVE_STATIC_ASSERT_CXX11): New macro.
24104         (_GL_HAVE_STATIC_ASSERT_CXX17): Renamed from _GL_HAVE_STATIC_ASSERT1.
24105         (_GL_VERIFY): Use static_assert when available with C++11 syntax.
24107 2021-01-11  Paul Eggert  <eggert@cs.ucla.edu>
24109         tempname: consume less entropy
24110         Derived from a glibc patch proposed by Adhemerval Zanella in:
24111         https://sourceware.org/pipermail/libc-alpha/2021-January/121302.html
24112         * lib/tempname.c: Include stdbool.h.
24113         (random_bits): New arg use_getrandom.
24114         (try_tempname_len): Skip getrandom on the first try,
24115         unless __GT_NOCREATE.
24116         * modules/tempname (Depends-on): Add stdbool.
24118 2021-01-10  Bruno Haible  <bruno@clisp.org>
24120         lchmod-tests: Fix link error.
24121         * modules/lchmod-tests (Makefile.am): Don't assume that LIBINTL is set.
24123 2021-01-10  Simon Josefsson  <simon@josefsson.org>
24125         Correct preceeding change.
24126         * top/gitsub.sh: Update link.
24128 2021-01-09  Bruno Haible  <bruno@clisp.org>
24130         immutable: Add tests.
24131         * tests/test-immutable.sh: New file.
24132         * tests/test-immutable.c: New file.
24133         * modules/immutable-tests: New file.
24135         immutable: New module.
24136         * lib/immutable.h: New file.
24137         * lib/immutable.c: New file.
24138         * m4/immutable.m4: New file.
24139         * m4/mprotect.m4: New file, based on libffcall/m4/codeexec.m4.
24140         * modules/immutable: New file.
24142 2021-01-10  Simon Josefsson  <simon@josefsson.org>
24144         Use https:// instead of git://.
24145         * build-aux/bootstrap (default_gnulib_url): Ditto.
24146         * config/srclistvars.sh: Ditto.
24147         * doc/gnulib-readme.texi (Git Checkout): Ditto.
24148         * doc/gnulib-tool.texi (VCS Issues): Ditto.
24149         * top/gitsub.sh: Update link.
24151 2021-01-09  Paul Eggert  <eggert@cs.ucla.edu>
24153         snippet/_Noreturn: port to pedantic clang
24154         Problem reported by Joe Nelson in:
24155         https://lists.gnu.org/r/bug-gnulib/2021-01/msg00152.html
24156         * doc/noreturn.texi: Improve.
24157         * lib/_Noreturn.h (_Noreturn):
24158         * m4/gnulib-common.m4 (gl_COMMON_BODY):
24159         Do not assume _Noreturn works as-is when __STRICT_ANSI__ is
24160         defined, unless __STDC_VERSION__ indicates C11 or later.
24161         * lib/_Noreturn.h (_Noreturn): Fall back on __attribute__
24162         ((__noreturn__)) if Clang; this merges the
24163         2020-08-10T23:53:13Zbruno@clisp.org patch to m4/gnulib-common.m4.
24165 2021-01-09  Darshit Shah  <darnir@gnu.org>
24167         Allow setting CVS username for gnu-web-doc-update.
24168         * build-aux/gnu-web-doc-update: Introduce new option --user to set the
24169         name of the user on Savannah, when it doesn't match $USER.
24171 2021-01-09  Bruno Haible  <bruno@clisp.org>
24173         exp* tests: Work around clang 6.0.1 optimization bugs on x86.
24174         * tests/test-exp-ieee.h (test_function): Mark some variable as
24175         'volatile'.
24176         * tests/test-exp2-ieee.h (test_function): Likewise.
24178 2021-01-09  Bruno Haible  <bruno@clisp.org>
24180         fchmodat: Work around trailing slash bug in fchmodat() on AIX 7.2.
24181         * m4/fchmodat.m4 (gl_FUNC_FCHMODAT): In the test whether fchmodat works,
24182         also test for the trailing slashes behaviour. Define
24183         HAVE_NEARLY_WORKING_FCHMODAT if this is the only missing feature.
24184         * lib/fchmodat.c (fchmodat): If HAVE_NEARLY_WORKING_FCHMODAT, handle
24185         trailing slashes here.
24186         * modules/fchmodat (Depends-on): Sort by condition, not alphabetically.
24187         * doc/posix-functions/fchmodat.texi: Document the AIX bug.
24189 2021-01-09  Bruno Haible  <bruno@clisp.org>
24191         fchmod-tests, fchmodat tests, lchmod tests: Add more tests.
24192         * tests/test-fchmod.c: Include <fcntl.h>.
24193         (BASE): New macro.
24194         (main): Add more tests.
24195         * tests/test-fchmodat.c (main): Add more tests.
24196         * tests/test-lchmod.c (main): Likewise.
24198 2021-01-09  Bruno Haible  <bruno@clisp.org>
24200         utimensat: Fix typo in last commit.
24201         * m4/utimensat.m4 (gl_FUNC_UTIMENSAT): Fix typo in macro explanation.
24203 2021-01-09  Bruno Haible  <bruno@clisp.org>
24205         truncate: Document last workaround.
24206         * doc/posix-functions/truncate.texi: Document the AIX bug.
24208 2021-01-08  Paul Eggert  <eggert@cs.ucla.edu>
24210         dynarray: work even if ‘free’ is replaced
24211         Problem reported by Darshit Shah in:
24212         https://lists.gnu.org/r/bug-gnulib/2021-01/msg00140.html
24213         * lib/malloc/dynarray-skeleton.c (DYNARRAY_FREE): New macro.
24214         Use it everywhere instead of DYNARRAY_NAME (free).
24216         tempname: don’t block for minutes
24217         Derived from a patch proposed by Adhemerval Zanella in:
24218         https://sourceware.org/pipermail/libc-alpha/2021-January/121302.html
24219         * lib/tempname.c (random_bits): Use GRND_NONBLOCK.
24221         tempname: sync with proposed glibc patch
24222         This is from Adhemerval Zanella in:
24223         https://sourceware.org/pipermail/libc-alpha/2021-January/121301.html
24224         * lib/tempname.c (__lxstat64): Remove.
24225         (__lstat64, __stat64): New replacement macros.  All uses changed.
24227         regex: stop using alloca
24228         * lib/regex_internal.h: Do not include <alloca.h> or define
24229         __libc_use_alloca or alloca.  Patch written by Adhemerval Zanella:
24230         https://sourceware.org/pipermail/libc-alpha/2021-January/121374.html
24231         * modules/regex (Depends-on): Remove alloca-opt.
24233         regexec: remove alloca usage in build_trtable
24234         Prompted by this different change proposed by Adhemerval Zanella:
24235         https://sourceware.org/pipermail/libc-alpha/2021-January/121373.html
24236         * lib/regexec.c (build_trtable): Prevent inlining,
24237         so that it doesn’t bloat the caller’s stack.
24238         Use auto variables instead of alloca/malloc.
24239         After these changes, build_trtable’s total stack allocation is
24240         only 20 KiB on a 64-bit machine, and this is less than glibc’s 64
24241         KiB cutoff so there’s little point to using alloca to shrink it.
24242         Although Gnulib traditionally has used a 4 KiB cutoff, going to 20
24243         KiB here should not be a significant problem in practice;
24244         Gnulib-using packages concerned about overflow of tiny stacks can
24245         compile with something like gcc -fstack-clash-protection.
24247         scratch_buffer: add scratch_buffer_dupfree macro
24248         * lib/scratch_buffer.h (__libc_scratch_buffer_dupfree):
24249         New macro, needed to support recent changes in this module.
24251         regex: remove alloca usage on regex set_regs
24252         Derived from this patch by Adhemerval Zanella:
24253         https://sourceware.org/pipermail/libc-alpha/2021-January/121372.html
24254         * lib/regex_internal.h: Include dynarray.h, for Gnulib.
24255         * lib/regexec.c (DYNARRAY_STRUCT, DYNARRAY_ELEMENT)
24256         (DYNARRAY_PREFIX): New macros.
24257         Include malloc/dynarray-skeleton.c.
24258         (set_regs): Use dynarray rather than alloca.
24259         * modules/regex (Depends-on): Add dynarray.
24261         dynarray: new module
24262         * config/srclist.txt: Mention the new files.
24263         * lib/cdefs.h (__attribute_maybe_unused__): New macro,
24264         like Gnulib’s _GL_ATTRIBUTE_MAYBE_UNUSED but with glibc
24265         naming conventions.
24266         * lib/libc-config.h: Use it instead of __glibc_likely.
24267         * lib/dynarray.h, modules/dynarray: New files.
24268         * lib/malloc/dynarray-skeleton.c, lib/malloc/dynarray.h:
24269         * lib/malloc/dynarray_at_failure.c:
24270         * lib/malloc/dynarray_emplace_enlarge.c:
24271         * lib/malloc/dynarray_finalize.c, lib/malloc/dynarray_resize.c:
24272         * lib/malloc/dynarray_resize_clear.c, modules/dynarray:
24273         New files, from glibc with the following changes needed for
24274         portability to compilers that are not recent-enough GCC.
24275         * lib/malloc/dynarray_at_failure.c: Include stdlib.h, for abort.
24276         (__libc_dynarray_at_failure) [!_LIBC]: Simply abort.
24277         * lib/malloc/dynarray_emplace_enlarge.c:
24278         * lib/malloc/dynarray_resize.c:
24279         Include intprops.h, and use INT_MULTIPLY_WRAPV instead
24280         of __builtin_mul_overflow.
24281         * lib/malloc/dynarray.h (__libc_dynarray_at_failure):
24282         Use _Noreturn instead of __attribute__ ((noreturn)).
24283         * lib/malloc/dynarray_resize_clear.c: Do not include stdlib.h;
24284         it’s not needed.
24285         (__libc_dynarray_resize_clear): Do not do arithmetic on void *.
24286         * lib/malloc/dynarray-skeleton.c (struct DYNARRAY_STRUCT):
24287         Do not use anonymous unions, as they are not in C99. All uses changed.
24288         Use __nonnull (X) instead of __attribute__ ((nonnull X)),
24289         and __attribute_maybe_unused__ instead of __attribute__ ((unused)).
24291 2021-01-06  Simon Josefsson  <simon@josefsson.org>
24293         bootstrap: Fix parsing of package name.
24294         * build-aux/bootstrap (package): Attempt to use autoconf --trace
24295         to parse AC_INIT before falling back to sed expression.
24297 2021-01-07  Bruno Haible  <bruno@clisp.org>
24299         localename: Fix link error with duplocale on AIX 7.2 (regr. 2019-12-18).
24300         * m4/locale_h.m4 (gl_LOCALE_H_DEFAULTS): Initialize
24301         LOCALENAME_ENHANCE_LOCALE_FUNCS.
24302         * m4/intl-thread-locale.m4 (gt_FUNC_USELOCALE):
24303         Set gt_working_uselocale.
24304         (gt_INTL_THREAD_LOCALE_NAME): Set gt_fake_locales, gt_good_uselocale,
24305         gt_localename_enhances_locale_funcs, LOCALENAME_ENHANCE_LOCALE_FUNCS.
24306         Define HAVE_GOOD_USELOCALE, LOCALENAME_ENHANCE_LOCALE_FUNCS.
24307         * m4/localename.m4 (gl_LOCALENAME): Test
24308         gt_localename_enhances_locale_funcs instead of gt_nameless_locales.
24309         * modules/locale (Makefile.am): Substitute
24310         LOCALENAME_ENHANCE_LOCALE_FUNCS.
24311         * lib/locale.in.h (newlocale, duplocale, freelocale): Don't override if
24312         module 'localename' is in use but LOCALENAME_ENHANCE_LOCALE_FUNCS is 0.
24313         * lib/localename.c (HAVE_GOOD_USELOCALE): Don't define here.
24314         (get_locale_t_name, newlocale, duplocale, freelocale): Define if
24315         LOCALENAME_ENHANCE_LOCALE_FUNCS.
24317 2021-01-06  Bruno Haible  <bruno@clisp.org>
24319         logb: Fix test failure on glibc/powerpc.
24320         * doc/posix-functions/logb.texi: Update platform info.
24321         * m4/logb.m4 (gl_FUNC_LOGB_WORKS): Test against bug with negative
24322         subnormal numbers.
24324 2021-01-06  Paul Eggert  <eggert@cs.ucla.edu>
24326         libc-config: simplify clang __has_* macros
24327         cdefs.h sometimes used names like __glibc_clang_has_attribute and
24328         sometimes __glibc_has_attribute.  There is no need in glibc or
24329         Gnulib to distinguish clang from other compilers here, so be
24330         consistent and use the simpler names.
24331         * lib/cdefs.h (__glibc_has_builtin, __glibc_has_extension):
24332         Rename from __glibc_clang_has_builtin, __glibc_clang_has_extension.
24333         All uses changed.
24334         (__glibc_clang_has_attribute): Remove. All uses replaced
24335         by __glibc_has_attribute.
24336         * lib/libc-config.h [!__glibc_likely]: Undef them here too.
24337         This fixes a problem where __glibc_has_attribute was not undeffed.
24339 2021-01-06  Bruno Haible  <bruno@clisp.org>
24341         flock: Update documentation.
24342         * doc/glibc-functions/flock.texi: Document what to expect on AIX and
24343         Solaris.
24345 2021-01-06  Bruno Haible  <bruno@clisp.org>
24347         ilogbl: Fix compilation error with xlclang on AIX 7.2.
24348         * lib/math.in.h (ilogbl): Undefine macro before declaration.
24350 2021-01-06  Bruno Haible  <bruno@clisp.org>
24352         ilogbl: Fix test failures on AIX 7.1 in 64-bit mode.
24353         * m4/ilogbl.m4 (gl_FUNC_ILOGBL_WORKS): Test also some denormalized
24354         argument.
24355         * doc/posix-functions/ilogbl.texi: Mention the AIX bug.
24357 2021-01-06  Bruno Haible  <bruno@clisp.org>
24359         ilogb: Fix test failures on AIX 7.1 in 64-bit mode.
24360         * m4/ilogb.m4 (gl_FUNC_ILOGB_WORKS): Test also some denormalized
24361         argument.
24362         * doc/posix-functions/ilogb.texi: Mention the AIX bug.
24364 2021-01-05  Bruno Haible  <bruno@clisp.org>
24366         fclose: Fix test failure on AIX 7.2.
24367         * m4/fclose.m4 (gl_FUNC_FCLOSE_STDIN): New macro.
24368         (gl_FUNC_FCLOSE): Invoke it. Set REPLACE_FCLOSE accordingly.
24369         * doc/posix-functions/fclose.texi: Update platform information.
24370         * doc/posix-functions/fflush.texi: Likewise.
24372 2021-01-05  Bruno Haible  <bruno@clisp.org>
24374         pipe-filter-gi: Fix test failure on AIX 7.2.
24375         * lib/pipe-filter-aux.h (SSIZE_MAX) [AIX]: Set to 4096.
24377 2021-01-05  Bruno Haible  <bruno@clisp.org>
24379         utimens, utimensat, fdutimensat: Avoid test failures on AIX 7.2.
24380         * lib/utimecmp.c (utimecmpat): On AIX, declare equality when the two
24381         times differ by less than 0.01 seconds.
24382         * tests/test-futimens.h (test_futimens): Pass UTIMECMP_TRUNCATE_SOURCE
24383         flag.
24385 2021-01-05  Bruno Haible  <bruno@clisp.org>
24387         utimensat: Work around trailing slash bug in utimensat() on AIX 7.2.
24388         * m4/utimensat.m4 (gl_FUNC_UTIMENSAT): Require AC_CANONICAL_HOST. Add a
24389         test for trailing slash handling. Improve cross-compilation guesses.
24390         Conditionally define HAVE_NEARLY_WORKING_UTIMENSAT.
24391         * lib/utimensat.c (rpl_utimensat): Add alternative implementation when
24392         HAVE_NEARLY_WORKING_UTIMENSAT is defined.
24393         * lib/utimens.c: Use the overridden utimensat when
24394         HAVE_NEARLY_WORKING_UTIMENSAT is defined.
24395         * doc/posix-functions/utimensat.texi: Mention the AIX bug.
24397 2021-01-05  Bruno Haible  <bruno@clisp.org>
24399         ptsname_r, ptsname: Avoid test failures on AIX 7.2.
24400         * tests/test-ptsname_r.c (main): On AIX, set a 20-seconds timer.
24401         * tests/test-ptsname.c (main): Likewise. On AIX, open a pty through
24402         /dev/ptc and don't test the BSD ptys.
24404 2021-01-05  Paul Eggert  <eggert@cs.ucla.edu>
24406         libc-config: merge from glibc
24407         Use a better way of keeping glibc <sys/cdefs.h> and gnulib
24408         lib/cdefs.h mostly in sync, by using lib/cdefs.h only on platforms
24409         where <sys/cdefs.h> does not work well enough for Gnulib.
24410         * lib/cdefs.h: Go back to using _SYS_CDEFS_H rather than
24411         _GL_DEFS_H as an include guard.
24412         (__THROW, __THROWNL, __NTH, __NTHNL):
24413         Define to noexcept for C++11 and later.
24414         (__glibc_objsize, __glibc_objsize0): New, for _FORTIFY_SOURCE=3.
24415         (__warndecl): Remove.
24416         (__attribute_copy__): New macro, for GCC 9 support.
24417         (__LDBL_REDIR, __LDBL_REDIR_DECL, __LDBL_REDIR1)
24418         (__LDBL_REDIR1_DECL, __LDBL_REDIR1_NTH, __REDIRECT_NTH_LDBL)
24419         (__REDIRECT_LDBL, __LDBL_REDIR_NTH):
24420         Redirections for IEEE long double on powerpc64le.
24421         (__LDBL_REDIR2_DECL): New macro.
24422         (__attr_access): New macro, for GCC 10 bounds checking.
24423         (__attribute_returns_twice__): New macro, for setjmp etc.
24424         * lib/libc-config.h: Include <cdefs.h> only if __glibc_likely is
24425         undefined.  The following changes apply only if __glibc_likely
24426         is not defined.
24427         (__LDBL_REDIR2_DECL, __attr_access, __attribute_returns_twice__)
24428         (__glibc_clang_has_attribute, __glibc_clang_has_extension)
24429         (__glibc_objsize, __glibc_objsize0):
24430         Undef these new (or newer) <cdefs.h> macros.
24431         (__P, __PMT, __always_inline): Do not undef, since cdefs.h does that.
24432         (__glibc_likely): Do not undef, since this is inside
24433         ifndef __glibc_likely.
24434         (__warndecl): Do not undef; no longer defined.
24436 2021-01-05  Jim Meyering  <meyering@fb.com>
24438         maintainer-makefile: correct preceding change
24439         * top/maint.mk (syntax-check-rules): Use LC_ALL=C, not LANG=C.
24441 2021-01-05  Paul Eggert  <eggert@cs.ucla.edu>
24443         maint: note syncs to glibc
24444         * config/srclist.txt: filename.h, idx.h, scratch_buffer.h and
24445         scratch_buffer_dupfree.c are now identical to glibc.  Add
24446         commentary about some other syncs we’d like.
24447         * modules/filename, modules/idx (Maintainer): Add glibc.
24449 2021-01-05  Bruno Haible  <bruno@clisp.org>
24451         truncate: Work around trailing slash bug in truncate() on AIX 7.2.
24452         * m4/truncate.m4 (gl_FUNC_TRUNCATE): Add a test whether truncate
24453         rejects trailing slashes. Set REPLACE_TRUNCATE and define
24454         TRUNCATE_TRAILING_SLASH_BUG if not.
24455         * lib/truncate.c (orig_truncate): New function.
24456         (truncate): Add alternative implementation when
24457         TRUNCATE_TRAILING_SLASH_BUG is defined.
24458         * modules/truncate (Depends-on): Add sys_stat, stat.
24460 2021-01-05  Bruno Haible  <bruno@clisp.org>
24462         mkfifoat: Fix cross-compilation guess (regression from 2021-01-04).
24463         * m4/mkfifoat.m4 (gl_FUNC_MKFIFOAT): Fix copy-and-paste mistake.
24465 2021-01-05  Bruno Haible  <bruno@clisp.org>
24467         ffsll: Override completely broken implementation on AIX in 32-bit mode.
24468         * m4/ffsll.m4 (gl_FUNC_FFSLL): Test whether ffsll minimally works. If
24469         not, set REPLACE_FFSLL.
24470         * lib/string.in.h (ffsll): Consider REPLACE_FFSLL.
24471         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
24472         REPLACE_FFSLL.
24473         * modules/string (Makefile.am): Substitute REPLACE_FFSLL.
24474         * modules/ffsll (Depends-on, configure.ac): Consider REPLACE_FFSLL.
24475         * doc/glibc-functions/ffsll.texi: Mention the AIX 7.2 bug.
24477 2021-01-04  Bruno Haible  <bruno@clisp.org>
24479         symlinkat: Fix trailing slash handling.
24480         * lib/symlinkat.c (rpl_symlinkat): Don't follow symlinks during the
24481         trailing slash handling.
24482         * modules/symlinkat (Depends-on): Update conditions.
24484 2021-01-04  Bruno Haible  <bruno@clisp.org>
24486         mkfifoat: Update module description.
24487         * modules/mkfifoat (Depends-on): Update conditions after last commits.
24489 2021-01-04  Bruno Haible  <bruno@clisp.org>
24491         link: Improve trailing slash handling on native Windows.
24492         * lib/link.c (link): If stat() fails, provide a better errno.
24494 2021-01-04  Bruno Haible  <bruno@clisp.org>
24496         mkfifoat: Work around trailing slash bug in mknodat() on AIX 7.2.
24497         * m4/mkfifoat.m4 (gl_FUNC_MKFIFOAT): Set also REPLACE_MKNODAT.
24498         * lib/sys_stat.in.h (mknodat): Consider REPLACE_MKNODAT.
24499         * lib/mknodat.c: Add an overriding implementation of mknodat().
24500         * m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Initialize REPLACE_MKNODAT.
24501         * modules/sys_stat (Makefile.am): Substitute REPLACE_MKNODAT.
24502         * modules/mkfifoat (Depends-on, configure.ac): Consider REPLACE_MKNODAT.
24503         * doc/posix-functions/mknodat.texi: Mention the AIX bug.
24505         mkfifoat: Work around trailing slash bug in mkfifoat() on AIX 7.2.
24506         * m4/mkfifoat.m4 (gl_FUNC_MKFIFOAT): Add a test whether mkfifoat rejects
24507         trailing slashes. Set REPLACE_MKFIFOAT if not.
24508         * lib/sys_stat.in.h (mkfifoat): Consider REPLACE_MKFIFOAT.
24509         * lib/mkfifoat.c: Add an overriding implementation of mkfifoat().
24510         * m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Initialize
24511         REPLACE_MKFIFOAT.
24512         * modules/sys_stat (Makefile.am): Substitute REPLACE_MKFIFOAT.
24513         * modules/mkfifoat (Depends-on): Add fstatat.
24514         (configure.ac): Consider REPLACE_MKFIFOAT.
24515         * doc/posix-functions/mkfifoat.texi: Mention the AIX bug.
24517 2021-01-04  Bruno Haible  <bruno@clisp.org>
24519         libc-config: Avoid overriding the headers from an installed newer glibc.
24520         Reported by Paul E Murphy <murphyp@linux.ibm.com> in
24521         <https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg00106.html>.
24522         * lib/cdefs.h: Use a different include guard than glibc's <sys/cdefs.h>.
24523         * lib/libc-config.h: Update accordingly.
24525 2021-01-04  Simon Josefsson  <simon@josefsson.org>
24527         maintainer-makefile: Invoke syntax-checks regardless of locale.
24528         * top/maint.mk (syntax-check-rules): Invoke sed with LANG=C
24529         environment because [a-z] may not include 'w' in all locales.
24531 2021-01-04  Bruno Haible  <bruno@clisp.org>
24533         nstrftime, time_rz: Avoid using an obsolete Autoconf macro.
24534         Reported by Mike Gran <spk121@yahoo.com> in
24535         <https://lists.gnu.org/archive/html/bug-gnulib/2021-01/msg00067.html>.
24536         * lib/time-internal.h: Test HAVE_STRUCT_TM_TM_ZONE, not HAVE_TM_ZONE.
24537         * lib/time_rz.c: Likewise.
24538         * lib/nstrftime.c: Set and test HAVE_STRUCT_TM_TM_ZONE, not
24539         HAVE_TM_ZONE.
24540         * m4/nstrftime.m4 (gl_FUNC_GNU_STRFTIME): Update comments.
24542 2021-01-04  Bruno Haible  <bruno@clisp.org>
24544         expm1f-ieee: Work around AIX 7.2 bug.
24545         * m4/expm1f.m4 (gl_FUNC_EXPM1F): Initialize gl_expm1f_required. If
24546         module 'expm1f-ieee' is in use, check whether expm1f works according to
24547         IEEE.
24548         * m4/expm1f-ieee.m4: New file.
24549         * modules/expm1f-ieee (Files): Add it.
24550         (Depends-on): Update conditions.
24551         (configure.ac): Invoke gl_FUNC_EXPM1F_IEEE.
24552         * doc/posix-functions/expm1f.texi: Mention the AIX bug.
24554 2021-01-04  Bruno Haible  <bruno@clisp.org>
24556         ffsl, ffsll: Work around AIX 7.2 problem.
24557         * lib/string.in.h: On AIX, include <strings.h> for the declarations of
24558         ffsl and ffsll.
24559         * doc/glibc-functions/ffsl.texi: Document the AIX 7.2 problem.
24560         * doc/glibc-functions/ffsll.texi: Likewise.
24562 2021-01-04  Bruno Haible  <bruno@clisp.org>
24564         ssfmalloc: Fix includes.
24565         * lib/ssfmalloc.h: Include <strings.h>, for ffs().
24566         * tests/test-ssfmalloc.c: Include <string.h>, for memset().
24568 2021-01-03  Bruno Haible  <bruno@clisp.org>
24570         quotearg tests: Avoid test failures on Solaris 11.3.
24571         * tests/test-quotearg.sh: Copy the fr/ directory using 'cp -R', not
24572         'cp -a'.
24574 2021-01-03  Bruno Haible  <bruno@clisp.org>
24576         tests: Fix link errors on Solaris, when libunistring-optional is in use.
24577         * modules/wcwidth (Link): New section.
24578         * modules/wcswidth (Link): New section.
24579         * modules/mbchar (Link): New section.
24580         * modules/mbfile (Link): Link against libunistring.
24581         * modules/mbiter (Link): Likewise.
24582         * modules/mbuiter (Link): Likewise.
24583         * modules/mbmemcasecmp (Link): Likewise.
24584         * modules/mbscasecmp (Link): Likewise.
24585         * modules/mbscasestr (Link): Likewise.
24586         * modules/mbschr (Link): Likewise.
24587         * modules/mbscspn (Link): Likewise.
24588         * modules/mbslen (Link): Likewise.
24589         * modules/mbsncasecmp (Link): Likewise.
24590         * modules/mbsnlen (Link): Likewise.
24591         * modules/mbspbrk (Link): Likewise.
24592         * modules/mbspcasecmp (Link): Likewise.
24593         * modules/mbsrchr (Link): Likewise.
24594         * modules/mbssep (Link): Likewise.
24595         * modules/mbsspn (Link): Likewise.
24596         * modules/mbsstr (Link): Likewise.
24597         * modules/mbstok_r (Link): Likewise.
24598         * modules/mbswidth (Link): Likewise.
24599         * modules/exclude (Link): Likewise.
24600         * modules/propername (Link): Likewise.
24601         * modules/regex-quote (Link): Likewise.
24602         * modules/trim (Link): Likewise.
24603         * modules/mbmemcasecmp-tests (Makefile.am): Link the test program
24604         against libunistring.
24605         * modules/mbscasecmp-tests (Makefile.am): Likewise.
24606         * modules/mbscasestr-tests (Makefile.am): Likewise.
24607         * modules/mbschr-tests (Makefile.am): Likewise.
24608         * modules/mbscspn-tests (Makefile.am): Likewise.
24609         * modules/mbsncasecmp-tests (Makefile.am): Likewise.
24610         * modules/mbspbrk-tests (Makefile.am): Likewise.
24611         * modules/mbspcasecmp-tests (Makefile.am): Likewise.
24612         * modules/mbsrchr-tests (Makefile.am): Likewise.
24613         * modules/mbsspn-tests (Makefile.am): Likewise.
24614         * modules/mbsstr-tests (Makefile.am): Likewise.
24615         * modules/exclude-tests (Makefile.am): Likewise.
24616         * modules/regex-quote-tests (Makefile.am): Likewise.
24618 2021-01-03  Bruno Haible  <bruno@clisp.org>
24620         c32ispunct tests: Avoid test failures on FreeBSD.
24621         * tests/test-c32ispunct.c (main): On FreeBSD, disable tests that fail on
24622         FreeBSD 12.1.1.
24624 2021-01-04  Simon Josefsson  <simon@josefsson.org>
24626         doc: Repeat warning that --with-tests cannot be used twice.
24627         * doc/gnulib-tool.texi (Multiple instances): Remind reader of
24628         --with-tests limitation.
24630 2021-01-03  Bruno Haible  <bruno@clisp.org>
24632         iconv, iconv_open: Improve documentation.
24633         Reported by Noah Misch <noah@leadboat.com> in
24634         <https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg00172.html>.
24635         * doc/posix-functions/iconv_open.texi: Add new paragraph "Portability
24636         problems handled by Gnulib".
24637         * doc/posix-functions/iconv.texi: Likewise. Update info about AIX.
24638         * m4/iconv.m4 (AM_ICONV_LINK): Improve comments.
24640 2021-01-03  Bruno Haible  <bruno@clisp.org>
24642         iconv-h: Fix module description.
24643         * modules/iconv-h (Include): Check HAVE_ICONV_H.
24645 2021-01-03  Noah Misch  <noah@leadboat.com>
24647         iconv_open: Fix module description.
24648         * modules/iconv_open (Include): Check HAVE_ICONV, like modules/iconv.
24650 2021-01-03  Bruno Haible  <bruno@clisp.org>
24652         stddef: Override wrong max_align_t on AIX 7 with xlc in 64-bit mode.
24653         * m4/stddef_h.m4 (gl_STDDEF_H): Make check for good max_align_t
24654         stricter: Add tests for offsetof-based alignof.
24655         * lib/stddef.in.h (max_align_t): Override on AIX in 64-bit mode.
24656         * doc/posix-headers/stddef.texi: Document the AIX max_align_t bug.
24658 2021-01-03  Bruno Haible  <bruno@clisp.org>
24660         free-posix: Work around GCC mis-optimization bug.
24661         Code by Bernhard Voelker <mail@bernhard-voelker.de>.
24662         * lib/free.c (rpl_free): Add alternative complicated code for GCC.
24664 2021-01-02  Bruno Haible  <bruno@clisp.org>
24666         valgrind-tests: Disable valgrind if it would cause all tests to fail.
24667         Suggested by Simon Josefsson <simon@josefsson.org> in
24668         <https://lists.gnu.org/archive/html/help-gsasl/2021-01/msg00004.html>.
24669         * m4/valgrind-tests.m4 (gl_VALGRIND_TESTS): Test $VALGRIND on an
24670         executable produced by the current compiler. Set VALGRIND to empty if it
24671         does not work. Don't set VALGRIND to empty if it merely does not accept
24672         the --error-exitcode=1 --leak-check=full options.
24674 2021-01-02  Bruno Haible  <bruno@clisp.org>
24676         valgrind-tests: Really enable the valgrind options test.
24677         * m4/valgrind-tests.m4 (gl_VALGRIND_TESTS): Don't assume that the
24678         valgrind options --error-exitcode=1 --leak-check=full always work.
24680 2021-01-02  Bruno Haible  <bruno@clisp.org>
24682         utimensat: Fix test failures on macOS 10.13.
24683         * lib/utimensat.c: Include <string.h>, <sys/stat.h>.
24684         (rpl_utimensat): Check against invalid tv_nsec values. Before calling
24685         utimensat, recognize a filename ending in a slash that does not point
24686         to a directory.
24688 2021-01-02  Bruno Haible  <bruno@clisp.org>
24690         utimens: Fix test failure on macOS 10.13.
24691         * lib/utimens.c: Include <string.h>.
24693         utimens: Fix test failure on macOS 10.13.
24694         * lib/utimens.c (fdutimens): Before calling utimensat, recognize a
24695         filename ending in a slash that does not point to a directory.
24697 2021-01-02  Bruno Haible  <bruno@clisp.org>
24699         utimens: Avoid test failures on macOS 10.13.
24700         Reported by Martin Storsjö <martin@martin.st> in
24701         <https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg00003.html>.
24702         * tests/test-utimens-common.h (check_ctime): Define to -1 on macOS.
24703         * tests/test-utimens.h (test_utimens): Don't expect a ctime change when
24704         only the atime is requested to change.
24705         * tests/test-futimens.h (test_futimens): Likewise.
24706         * tests/test-lutimens.h (test_lutimens): Likewise.
24708 2021-01-02  Bruno Haible  <bruno@clisp.org>
24710         renameatu: Fix test failures on macOS.
24711         Reported by Martin Storsjö <martin@martin.st> in
24712         <https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg00003.html>.
24713         * lib/renameatu.c (renameatu): Don't call renameatx_np right away.
24714         Instead, treat it as a variant of renameat, with all possible bugs that
24715         renameat might have.
24717 2021-01-02  Bruno Haible  <bruno@clisp.org>
24719         getgroups test: Avoid warning with glibc >= 2.32 and gcc >= 10.
24720         Reported by Bernhard Voelker <mail@bernhard-voelker.de> in
24721         <https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg00090.html>.
24722         * tests/test-getgroups.c: Silence gcc warnings of type
24723         -Wstringop-overflow.
24725 2021-01-02  Bruno Haible  <bruno@clisp.org>
24727         timespec_get: Add tests.
24728         * tests/test-timespec_get.c: New file.
24729         * modules/timespec_get-tests: New file.
24731         timespec_get: New module.
24732         * lib/time.in.h (timespec_get): New declaration.
24733         * lib/timespec_get.c: New file.
24734         * m4/timespec_get.m4: New file.
24735         * m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS): Initialize
24736         GNULIB_TIMESPEC_GET, HAVE_TIMESPEC_GET.
24737         * modules/time (Makefile.am): Substitute GNULIB_TIMESPEC_GET,
24738         HAVE_TIMESPEC_GET.
24739         * modules/timespec_get: New file.
24740         * tests/test-time-c++.cc (timespec_get): Check signature.
24741         * doc/glibc-functions/timespec_get.texi: Mention the new module.
24743 2021-01-01  Bruno Haible  <bruno@clisp.org>
24745         time: Define TIME_UTC.
24746         * lib/time.in.h (TIME_UTC, GNULIB_defined_TIME_UTC): New macros.
24747         * m4/time_h.m4 (gl_HEADER_TIME_H_BODY): Set TIME_H_DEFINES_TIME_UTC.
24748         * modules/time (Makefile.am): Substitute TIME_H_DEFINES_TIME_UTC.
24749         * tests/test-time.c: Check that TIME_UTC is defined and a positive
24750         integer.
24751         * doc/posix-headers/time.texi: Mention TIME_UTC.
24753 2021-01-01  Bruno Haible  <bruno@clisp.org>
24755         stddef: Try harder to get max_align_t defined on OpenBSD, part 2.
24756         * modules/stddef (Depends-on): Add extensions.
24758 2021-01-01  Paul Eggert  <eggert@cs.ucla.edu>
24760         canonicalize: remove NARROW_ADDRESSES optimization
24761         * lib/canonicalize-lgpl.c, lib/canonicalize.c (NARROW_ADDRESSES):
24762         Remove, and remove all uses, as the optimization is arguably not
24763         worth the extra complexity.  Suggested by Adhemerval Zanella in:
24764         https://sourceware.org/pipermail/libc-alpha/2020-December/121203.html
24766 2021-01-01  Bruno Haible  <bruno@clisp.org>
24768         stddef: Try harder to get max_align_t defined on OpenBSD.
24769         * m4/stddef_h.m4 (gl_STDDEF_H): Require gl_USE_SYSTEM_EXTENSIONS.
24771 2021-01-01  Bruno Haible  <bruno@clisp.org>
24773         aligned_alloc: Fix test failure on OpenBSD 6.8.
24774         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): On OpenBSD, define
24775         _ISOC11_SOURCE.
24776         * m4/aligned_alloc.m4 (gl_FUNC_ALIGNED_ALLOC): Require it. Update
24777         comment.
24779 2021-01-01  Bruno Haible  <bruno@clisp.org>
24781         posixtm tests: Disable part of the test on plaforms where it fails.
24782         * tests/test-posixtm.c (T): Disable two tests on macOS as well.
24784 2021-01-01  Bruno Haible  <bruno@clisp.org>
24786         c32isgraph/c32isprint/c32ispunct tests: Avoid test failures on OmniOS.
24787         * tests/test-c32isgraph.c (main): On Solaris, disable tests that fail on
24788         Solaris 11 OmniOS.
24789         * tests/test-c32isprint.c (main): Likewise.
24790         * tests/test-c32ispunct.c (main): Likewise.
24792 2021-01-01  Paul Eggert  <eggert@cs.ucla.edu>
24794         libc-config: port to Sun C 5.9
24795         * lib/libc-config.h (libc_hidden_proto): Omit ", ..." in macro
24796         definition.  It’s not needed for Gnulib and elicits a diagnostic
24797         from Sun C 5.9 Patch 124867-12 2009/11/22.
24799 2021-01-01  Bruno Haible  <bruno@clisp.org>
24801         quotearg tests: Avoid test failures on Solaris 11.
24802         * modules/quotearg-tests (Makefile.am): Set host_os in
24803         TESTS_ENVIRONMENT.
24804         * tests/test-quotearg.sh: On Solaris 11 systems, make a copy of the fr/
24805         directory that contains the .mo file.
24807 2021-01-01  Bruno Haible  <bruno@clisp.org>
24809         maint: Update copyright notices in --version output.
24810         List the most recent year in which changes were made, per
24811         <https://www.gnu.org/prep/standards/html_node/_002d_002dversion.html>.
24812         * build-aux/declared.sh (func_version): Say 2019.
24813         * build-aux/libtool-next-version (func_version): Likewise.
24814         * build-aux/run-test (func_version): Likewise.
24815         * check-module (COPYRIGHT_NOTICE): Say 2012.
24816         * lib/git-merge-changelog.c (main): Say 2020.
24818 2020-12-31  Paul Eggert  <eggert@cs.ucla.edu>
24820         filename: change filename.h comment to LGPLv2.1+
24821         * lib/filename.h: Change license notice to match what should be in
24822         glibc, and what modules/filename specifies.  This is to simplify
24823         syncing with glibc.
24825         doc: mention year-0 bugs in Solaris etc.
24826         * doc/posix-functions/gmtime.texi, doc/posix-functions/gmtime_r.texi:
24827         * doc/posix-functions/localtime.texi:
24828         * doc/posix-functions/localtime_r.texi:
24829         * doc/posix-functions/mktime.texi:
24830         Mention year-0 bugs in localtime etc.
24832 2020-12-31  Bruno Haible  <bruno@clisp.org>
24834         ptsname_r: Fix test failure on Solaris.
24835         * lib/ptsname_r.c (__ptsname_r) [__sun]: Don't test the major number of
24836         the device.
24838 2020-12-31  Bruno Haible  <bruno@clisp.org>
24840         posixtm tests: Disable part of the test on plaforms where it fails.
24841         * tests/test-posixtm.c (T): Disable two tests on Solaris.
24843 2020-12-31  Bruno Haible  <bruno@clisp.org>
24845         poll tests: Avoid test failure on AIX.
24846         * tests/test-poll.c (test_pipe): Disable the "expecting POLLHUP after
24847         shutdown" test on AIX.
24848         * doc/posix-functions/poll.texi: Mention the AIX bug.
24850 2020-12-31  Bruno Haible  <bruno@clisp.org>
24852         poll tests: Avoid test failure on BSD and Solaris systems.
24853         * tests/test-poll.c (test_accept_first, test_socket_pair): Disable the
24854         "expecting POLLHUP after shutdown" test on all platforms except Linux.
24856 2020-12-31  Paul Eggert  <eggert@cs.ucla.edu>
24858         fnmatch: merge from glibc + proposal
24859         This merges the change proposed by Adhemerval Zanella in:
24860         https://sourceware.org/pipermail/libc-alpha/2020-December/121212.html
24861         which fixes a Gnulib bug that led to a failed assert.
24862         * lib/fnmatch_loop.c (EXT): Use signed level, not unsigned, and
24863         check that it stays nonnegative.  Use __flexarr instead of
24864         FLEXIBLE_ARRAY_MEMBER, to port better to glibc.
24865         * tests/test-fnmatch.c (main): New test cases, taken from glibc.
24867         glob: merge proposed glibc changes
24868         This merges the change proposed by Adhemerval Zanella in:
24869         https://sourceware.org/pipermail/libc-alpha/2020-December/121211.html
24870         * lib/glob.c (__lstat64, __stat64) [_LIBC]: Remove.
24872 2020-12-31  Bruno Haible  <bruno@clisp.org>
24874         memalign: Work around Solaris bug.
24875         * lib/memalign.c: New file.
24876         * m4/memalign.m4: New file.
24877         * modules/memalign (Files): Add them.
24878         (Depends-on): Add malloc-h.
24879         (configure.ac): Invoke gl_FUNC_MEMALIGN. Conditionally compile
24880         memalign.c. Set module indicator.
24881         (Include): Include <malloc.h> unconditionally.
24882         * doc/glibc-functions/memalign.texi: Mention the Solaris issues.
24884         malloc-h: Add tests.
24885         * tests/test-malloc-h.c: New file.
24886         * modules/malloc-h-tests: New file.
24887         * tests/test-malloc-h-c++.cc: New file.
24888         * modules/malloc-h-c++-tests: New file.
24890         malloc-h: New module.
24891         * lib/malloc.in.h: New file.
24892         * m4/malloc_h.m4: New file.
24893         * modules/malloc-h: New file.
24894         * doc/glibc-headers/malloc.texi: New file.
24895         * doc/gnulib.texi (Glibc Header File Substitutes): Include it.
24897 2020-12-31  Bruno Haible  <bruno@clisp.org>
24899         unistd: Fix portability warnings.
24900         * lib/unistd.in.h (fchownat, unlinkat): Fix module name in warning.
24902 2020-12-31  Bruno Haible  <bruno@clisp.org>
24904         utime: Fix compilation error on macOS and Solaris 9 (regr. 2020-12-24).
24905         Reported by Tom G. Christensen <tgc@jupiterrise.com> in
24906         <https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg00295.html>.
24907         * lib/utime.c: Include <errno.h>.
24909 2020-12-30  Karl Berry  <karl@freefriends.org>
24911         config: srclistvars doc.
24912         * config/srclistvars.sh: doc a couple of unusual source repo urls.
24914 2020-12-30  Bruno Haible  <bruno@clisp.org>
24916         getlogin tests, getlogin_r tests: Avoid failure on Solaris OpenIndiana.
24917         * tests/test-getlogin.c (main): Don't fail if getlogin() returns NULL
24918         with no errno.
24919         * tests/test-getlogin_r.c (main): Don't fail if getlogin_r() returns
24920         EINVAL.
24922 2020-12-29  Jim Meyering  <meyering@fb.com>
24924         regex-tests: tweak to avoid a clang-10 warning
24925         * tests/test-regex.c: Compare with explicit zero, rather than
24926         as boolean to avoid this from clang-10:
24927         test-regex.c:315:9: error: converting the result of '<<' to a \
24928           boolean always evaluates to true \
24929           [-Werror,-Wtautological-constant-compare]
24930         if (! REG_STARTEND)
24932         hash: add casts-to-float to avoid clang-10 warnings
24933         * lib/hash.c (compute_bucket_size): Cast SIZE_MAX to float
24934         to avoid this warning from clang-10 (for use in grep):
24935           hash.c:501:11: error: implicit conversion from 'unsigned long' \
24936             to 'float' changes value from 18446744073709551615 to \
24937             18446744073709551616 [-Werror,-Wimplicit-int-float-conversion]
24938           if (SIZE_MAX <= new_candidate)
24939         (hash_insert_if_absent): Likewise.
24941 2020-12-29  Paul Eggert  <eggert@cs.ucla.edu>
24943         canonicalize: fix size overflow treatment
24944         This also has some minor cleanups.
24945         * lib/canonicalize-lgpl.c, lib/canonicalize.c: No need to include
24946         stddef.h, since the code no longer refers directly to ptrdiff_t.
24947         * lib/canonicalize-lgpl.c (realpath_stk):
24948         * lib/canonicalize.c (canonicalize_filename_mode_stk):
24949         Treat size overflow like other out-of-memory.
24950         * lib/canonicalize.c: No need to include stdlib.h, since
24951         the code no longer refers to stdlib.h functions (other
24952         than those that canonicalize.h must declare).
24953         * lib/canonicalize.c (canonicalize_filename_mode_stk):
24954         Do not bother terminating the string result on error.
24956 2020-12-29  Bruno Haible  <bruno@clisp.org>
24958         list-c++, [o]map-c++, [o]set-c++: Fix conflict with 'free-posix' module.
24959         * lib/gl_list.hh: Include <stdlib.h>.
24960         * lib/gl_map.hh: Likewise.
24961         * lib/gl_omap.hh: Likewise.
24962         * lib/gl_set.hh: Likewise.
24963         * lib/gl_oset.hh: Likewise.
24965 2020-12-29  Paul Eggert  <eggert@cs.ucla.edu>
24967         canonicalize: fix ptrdiff_t overflow bug
24968         Problem reported by Adhemerval Zanella in:
24969         https://sourceware.org/pipermail/libc-alpha/2020-December/121182.html
24970         * lib/canonicalize-lgpl.c, lib/canonicalize.c:
24971         Include intprops.h.
24972         (NARROW_ADDRESSES): New constant.
24973         * lib/canonicalize-lgpl.c (realpath_stk):m
24974         * lib/canonicalize.c (canonicalize_filename_mode_stk):
24975         Work even if strlen (END) does not fit in idx_t, or if adding
24976         N to it overflows.
24977         * modules/canonicalize, modules/canonicalize-lgpl (Depends-on):
24978         Add intprops.
24980 2020-12-28  Bruno Haible  <bruno@clisp.org>
24982         havelib: Fix for Solaris 11 OpenIndiana and Solaris 11 OmniOS.
24983         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): In
24984         acl_is_expected_elfclass, use 'expr', not 'test'.
24986 2020-12-28  Bruno Haible  <bruno@clisp.org>
24988         ptsname_r: Fix a compiler warning on Solaris.
24989         * lib/ptsname_r.c (__ptsname_r): Reduce the scope of variable 'err'.
24991 2020-12-28  Bruno Haible  <bruno@clisp.org>
24993         gnulib-tool: Fix logic whether to add a dummy.c.
24994         * gnulib-tool (func_remove_if_blocks): New function.
24995         (func_modules_add_dummy): Use it to eliminate all conditional statements
24996         from the automake snippet.
24998 2020-12-28  Paul Eggert  <eggert@cs.ucla.edu>
25000         faccessat: revert recent EOVERFLOW change
25001         I misunderstood the glibc source code.  Deduced from
25002         Adhemerval Zanella’s proposed glibc patch in:
25003         https://sourceware.org/pipermail/libc-alpha/2020-December/121131.html
25004         * doc/posix-functions/faccessat.texi: It is not a problem.
25005         * lib/canonicalize-lgpl.c, lib/canonicalize.c, lib/faccessat.c:
25006         (FACCESSAT_NEVER_OVERFLOWS): Remove. All uses removed.
25007         * lib/faccessat.c: Revert to simpler version now that
25008         LSTAT_FOLLOWS_SLASHED_SYMLINK must be false.
25009         * m4/faccessat.m4 (gl_FUNC_FACCESSAT_EOVERFLOW):
25010         Remove.  All uses removed.
25011         * modules/canonicalize, modules/canonicalize-lgpl (Files):
25012         Remove m4/faccessat.m4.
25014         canonicalize-lgpl: accommodate picky cpp
25015         * lib/canonicalize-lgpl.c: Use "defined FUNC_REALPATH_WORKS" in
25016         case preprocessor is picky.  Reported by Adhemerval Zanella in:
25017         https://sourceware.org/pipermail/libc-alpha/2020-December/121130.html
25019         canonicalize: simplify via scratch_buffer_dupfree
25020         * config/srclist.txt: Adjust accordingly.
25021         * lib/canonicalize-lgpl.c (realpath_stk):
25022         * lib/canonicalize.c (canonicalize_filename_mode_stk):
25023         Simplify by using scratch_buffer_dupfree.
25024         * lib/malloc/scratch_buffer.h (scratch_buffer_dupfree): New function.
25025         * lib/malloc/scratch_buffer_dupfree.c: New file.
25026         * modules/scratch_buffer (Files, Depends-on):
25027         Add malloc/scratch_buffer_dupfree.c.
25029 2020-12-27  Paul Eggert  <eggert@cs.ucla.edu>
25031         regex: remove glibc21.m4
25032         It doesn’t seem to be needed any more; at least, I couldn’t
25033         reproduce the circa-2013 problem.  Perhaps the recent
25034         --conditional-dependencies fixes have removed the need for it.
25035         * m4/glibc21.m4: Remove.  All uses removed.
25037 2020-12-26  Bruno Haible  <bruno@clisp.org>
25039         gnulib-tool: Make --conditional-dependencies work with --with-tests.
25040         Reported by Paul Eggert in
25041         <https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg00236.html>.
25042         * gnulib-tool (func_emit_tests_Makefile_am): Handle conditional
25043         dependencies like func_emit_lib_Makefile_am.
25045 2020-12-26  Bruno Haible  <bruno@clisp.org>
25047         execvpe: Make dependency to stdbool explicit.
25048         * lib/execvpe.c: Include <stdbool.h>.
25049         * modules/execvpe (Depends-on): Add stdbool.
25051         execlp: Add tests.
25052         * tests/test-execlp-main.c: New file.
25053         * tests/test-execlp.sh: New file.
25054         * modules/execlp-tests: New file.
25056         execlp: New module.
25057         * lib/execlp.c: New file.
25058         * m4/execlp.m4: New file.
25059         * modules/execlp: New file.
25060         * doc/posix-functions/execlp.texi: Mention more Windows problems and the
25061         new module.
25063         execle: Add tests.
25064         * tests/test-execle-main.c: New file.
25065         * tests/test-execle.sh: New file.
25066         * modules/execle-tests: New file.
25068         execle: New module.
25069         * lib/execle.c: New file.
25070         * m4/execle.m4: New file.
25071         * modules/execle: New file.
25072         * doc/posix-functions/execle.texi: Mention more Windows problems and the
25073         new module.
25075         execl: Add tests.
25076         * tests/test-execl-main.c: New file.
25077         * tests/test-execl.sh: New file.
25078         * modules/execl-tests: New file.
25080         execl: New module.
25081         * lib/execl.c: New file.
25082         * m4/execl.m4: New file.
25083         * modules/execl: New file.
25084         * doc/posix-functions/execl.texi: Mention more Windows problems and the
25085         new module.
25087         execv: Add tests.
25088         * tests/test-execv-main.c: New file.
25089         * tests/test-execv.sh: New file.
25090         * modules/execv-tests: New file.
25092         execv: New module.
25093         * lib/execv.c: New file.
25094         * m4/execv.m4: New file.
25095         * modules/execv: New file.
25096         * doc/posix-functions/execv.texi: Mention more Windows problems and the
25097         new module.
25099         execvp: Add tests.
25100         * tests/test-execvp-main.c: New file.
25101         * tests/test-execvp.sh: New file.
25102         * modules/execvp-tests: New file.
25104         execvp: New module.
25105         * lib/execvp.c: New file.
25106         * m4/execvp.m4: New file.
25107         * modules/execvp: New file.
25108         * doc/posix-functions/execvp.texi: Mention more Windows problems and the
25109         new module.
25111         execvpe: Add tests.
25112         * tests/test-execvpe-main.c: New file.
25113         * tests/test-execvpe.sh: New file.
25114         * modules/execvpe-tests: New file.
25116         execvpe: New module.
25117         * lib/execvpe.c: New file.
25118         * m4/execvpe.m4: New file.
25119         * modules/execvpe: New file.
25120         * doc/glibc-functions/execvpe.texi: Mention the Windows problems and the
25121         new module.
25123         execve: Add tests.
25124         * tests/test-exec-child.c: New file.
25125         * tests/test-execve-main.c: New file.
25126         * tests/test-execve.sh: New file.
25127         * modules/execve-tests: New file.
25129         execve: New module.
25130         * lib/execve.c: New file.
25131         * m4/execve.m4: New file.
25132         * modules/execve: New file.
25133         * doc/posix-functions/execve.texi: Mention more Windows problems and the
25134         new module.
25136         execve, execvpe, execvp, execv, execl, execle, execlp: Prepare modules.
25137         * lib/unistd.in.h (execl, execle, execlp, execv, execve, execvp,
25138         execvpe): Add declarations for the new modules.
25139         * m4/unistd_h.m4 (gl_UNISTD_H): Test whether execl, execle, execlp,
25140         execv, execve, execvp, execvpe are declared.
25141         (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_EXEC*, HAVE_EXECVPE,
25142         REPLACE_EXEC*.
25143         * modules/unistd (Makefile.am): Substitute GNULIB_EXEC*, HAVE_EXECVPE,
25144         REPLACE_EXEC*.
25145         * tests/test-unistd-c++.cc: Check the signature of execl, execle,
25146         execlp, execv, execve, execvp, execvpe.
25148 2020-12-26  Bruno Haible  <bruno@clisp.org>
25150         stack: Fix typo in comments.
25151         * lib/stack.h: Fix typo in comments.
25153 2020-12-26  Bruno Haible  <bruno@clisp.org>
25155         bitset: Fix conflict with 'free-posix' module.
25156         * lib/bitset/base.h: Include <stdlib.h>.
25158 2020-12-25  Paul Eggert  <eggert@cs.ucla.edu>
25160         idx: change idx.h comment to LGPLv2.1+
25161         * lib/idx.h: Change license notice to match what should be in glibc.
25162         gnulib-tool will change it as appropriate anyway, so this is just
25163         to simplify syncing with glibc.
25165 2020-12-25  Thien-Thi Nguyen  <ttn@gnu.org>
25167         MODULES.html.sh: Update after 2020-12-19 change.
25168         * MODULES.html.sh (func_all_modules): Do s/free/free-posix/.
25170 2020-12-25  Bruno Haible  <bruno@clisp.org>
25172         Make it possible to turn off the mkdir override on Windows.
25173         * lib/sys_stat.in.h (mkdir): Conditionalize through GNULIB_MKDIR and
25174         GNULIB_MDA_MKDIR. Also support GNULIB_POSIXCHECK.
25175         * m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Initialize GNULIB_MKDIR,
25176         GNULIB_MDA_MKDIR.
25177         * modules/sys_stat (Makefile.am): Substitute GNULIB_MKDIR,
25178         GNULIB_MDA_MKDIR.
25179         * modules/mkdir (configure.ac): Invoke gl_SYS_STAT_MODULE_INDICATOR.
25180         * doc/posix-functions/mkdir.texi: Mention also the 'sys_stat' module.
25182         Make it possible to turn off each of the Windows oldnames workarounds.
25183         * lib/fcntl.in.h (creat, open):  Conditionalize each of the Windows
25184         oldnames workarounds through a GNULIB_MDA_<func> symbol.
25185         * lib/math.in.h (j0, j1, jn, y0, y1, yn): Likewise.
25186         * lib/search.in.h (lfind, lsearch): Likewise.
25187         * lib/stdio.in.h (fcloseall, fdopen, fileno, getw, putw, tempnam):
25188         Likewise.
25189         * lib/stdlib.in.h (ecvt, fcvt, gcvt, mktemp, putenv): Likewise.
25190         * lib/string.in.h (memccpy, strdup): Likewise.
25191         * lib/sys_stat.in.h (chmod, umask): Likewise.
25192         * lib/time.in.h (tzset): Likewise.
25193         * lib/unistd.in.h (access, chdir, close, dup, dup2, execl, execle,
25194         execlp, execv, execve, execvp, execvpe, getcwd, getpid, isatty, lseek,
25195         read, rmdir, swab, unlink, write): Likewise.
25196         * lib/utime.in.h (utime): Likewise.
25197         * lib/wchar.in.h (wcsdup): Likewise.
25198         * m4/fcntl_h.m4 (gl_FCNTL_H_DEFAULTS): Initialize these
25199         GNULIB_MDA_<func> symbols.
25200         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Likewise.
25201         * m4/search_h.m4 (gl_SEARCH_H_DEFAULTS): Likewise.
25202         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Likewise.
25203         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Likewise.
25204         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Likewise.
25205         * m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Likewise.
25206         * m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS): Likewise.
25207         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Likewise.
25208         * m4/utime_h.m4 (gl_UTIME_H_DEFAULTS): Likewise.
25209         * m4/wchar_h.m4 (gl_WCHAR_H_DEFAULTS): Likewise.
25210         * modules/fcntl-h (Makefile.am): Substitute these GNULIB_MDA_<func>
25211         symbols.
25212         * modules/math (Makefile.am): Likewise.
25213         * modules/search (Makefile.am): Likewise.
25214         * modules/stdio (Makefile.am): Likewise.
25215         * modules/stdlib (Makefile.am): Likewise.
25216         * modules/string (Makefile.am): Likewise.
25217         * modules/sys_stat (Makefile.am): Likewise.
25218         * modules/time (Makefile.am): Likewise.
25219         * modules/unistd (Makefile.am): Likewise.
25220         * modules/utime-h (Makefile.am): Likewise.
25221         * modules/wchar (Makefile.am): Likewise.
25223 2020-12-24  Paul Eggert  <eggert@cs.ucla.edu>
25225         canonicalize, canonicalize-lgpl: remove lint
25226         Pacify GCC.  Some of these problems were reported by Bruno Haible in:
25227         https://lists.gnu.org/r/bug-gnulib/2020-12/msg00217.html
25228         * lib/canonicalize-lgpl.c, lib/canonicalize.c:
25229         Sort shared include directives, for consistency.
25230         (IF_LINT): New macro.
25231         (suffix_requires_dir_check): Mark with _GL_ATTRIBUTE_PURE.
25232         * lib/canonicalize-lgpl.c (GCC_LINT, _GL_ATTRIBUTE_PURE) [_LIBC]:
25233         New macros.
25234         (realpath_stk): Suppress bogus -Wmaybe-uninitialized warning.
25235         * lib/canonicalize.c (canonicalize_filename_mode_stk):
25236         Omit unused local.  Suppress bogus -Wmaybe-uninitialized warning.
25238 2020-12-24  Bruno Haible  <bruno@clisp.org>
25240         spawn-pipe: Use posix_spawn by default on native Windows.
25241         * lib/spawn-pipe.c (SPAWN_PIPE_IMPL_AVOID_POSIX_SPAWN): New macro.
25242         (create_pipe): Use it to decide among the two possible implementations.
25243         * modules/spawn-pipe (Depends-on): Add posix_spawnattr_setpgroup.
25245 2020-12-24  Bruno Haible  <bruno@clisp.org>
25247         unistd-safer: Implement pipe_safer on native Windows.
25248         * lib/pipe-safer.c (pipe_safer): Don't test HAVE_PIPE.
25249         * modules/unistd-safer (Depends-on): Add pipe-posix.
25251 2020-12-24  Bruno Haible  <bruno@clisp.org>
25253         execute: Use posix_spawn by default on native Windows.
25254         * lib/execute.c (EXECUTE_IMPL_AVOID_POSIX_SPAWN): New macro.
25255         (execute): Use it to decide among the two possible implementations.
25257 2020-12-24  Paul Eggert  <eggert@cs.ucla.edu>
25259         canonicalize-lgpl: merge proposed libc changes
25260         This merges the changes proposed for glibc in:
25261         https://sourceware.org/pipermail/libc-alpha/2020-December/121085.html
25262         https://sourceware.org/pipermail/libc-alpha/2020-December/121086.html
25263         * lib/canonicalize-lgpl.c: Include idx.h and filename.h
25264         unconditionally.
25265         (idx_t, IDX_MAX, FILE_SYSTEM_PREFIX_LEN, IS_ABSOLUTE_FILE_NAME)
25266         (ISSLASH) [_LIBC]: Remove.
25268 2020-12-24  Bruno Haible  <bruno@clisp.org>
25270         posix_spawn-internal: Implement for native Windows.
25271         * lib/spawni.c (grow_inheritable_handles, shrink_inheritable_handles,
25272         close_inheritable_handles, memiszero, sigisempty, open_handle, do_open,
25273         do_dup2, do_close): New functions.
25274         (__spawni): Implement on native Windows.
25275         * modules/posix_spawn-internal (Depends-on): Add filename,
25276         concat-filename, findprog-in, malloca, windows-spawn.
25277         * doc/posix-functions/posix_spawn.texi: Update.
25278         * doc/posix-functions/posix_spawnp.texi: Likewise.
25280 2020-12-24  Bruno Haible  <bruno@clisp.org>
25282         windows-spawn: Export another auxiliary function.
25283         * lib/windows-spawn.h (convert_CreateProcess_error): New declaration.
25284         * lib/windows-spawn.c (convert_CreateProcess_error): New function,
25285         extracted from spawnpvech.
25286         (spawnpvech): Use it.
25288 2020-12-24  Bruno Haible  <bruno@clisp.org>
25290         windows-spawn: Export some more auxiliary functions.
25291         * lib/windows-spawn.h: Include <stdbool.h>.
25292         (struct inheritable_handles): New type.
25293         (init_inheritable_handles, compose_handles_block,
25294         free_inheritable_handles): New declarations.
25295         * lib/windows-spawn.c (init_inheritable_handles, compose_handles_block):
25296         New functions, based on spawnvech.
25297         (free_inheritable_handles): New function.
25298         (spawnpvech): Use them.
25300 2020-12-24  Bruno Haible  <bruno@clisp.org>
25302         windows-spawn: Export another auxiliary function.
25303         * lib/windows-spawn.h (compose_envblock): New declaration.
25304         * lib/windows-spawn.c (compose_envblock): New function, extracted from
25305         spawnpvech.
25306         (spawnpvech): Use it.
25308 2020-12-24  Bruno Haible  <bruno@clisp.org>
25310         windows-spawn: Export an auxiliary function.
25311         * lib/windows-spawn.h (compose_command): New declaration.
25312         * lib/windows-spawn.c (compose_command): New function, extracted from
25313         spawnpvech.
25314         (spawnpvech): Use it.
25316 2020-12-24  Bruno Haible  <bruno@clisp.org>
25318         posix_spawn* tests: Add support for native Windows.
25319         * tests/test-posix_spawn-open1.c (DATA_FILENAME): Treat native Windows
25320         like Cygwin.
25321         * tests/test-posix_spawn-dup2-stdin.c (main): Don't assume the signals
25322         SIGHUP and SIGPIPE. On native Windows, don't call
25323         posix_spawnattr_setsigmask.
25324         * tests/test-posix_spawn-dup2-stdout.c (main): Likewise.
25325         * tests/test-posix_spawn-fchdir.c (main): Likewise.
25326         * tests/test-posix_spawn-chdir.c (test): Likewise. Accept the child
25327         output from Cygwin's 'pwd' program.
25328         * tests/test-posix_spawn-script.c (main): On native Windows, skip the
25329         executable-shell-script part of the test.
25330         * tests/test-posix_spawnp-script.c (main): Likewise.
25331         * modules/posix_spawn-tests (Depends-on): Add freopen, waitpid.
25332         (configure.ac): Don't define the POSIX_SPAWN_PORTED conditional.
25333         (Makefile.am): Don't test the POSIX_SPAWN_PORTED conditional.
25334         * modules/posix_spawnp-tests (Depends-on): Add  waitpid.
25335         (configure.ac): Don't define the POSIX_SPAWN_PORTED conditional.
25336         (Makefile.am): Don't test the POSIX_SPAWN_PORTED conditional.
25337         * modules/posix_spawn_file_actions_addchdir-tests (Makefile.am): Don't
25338         test the POSIX_SPAWN_PORTED conditional.
25339         * modules/posix_spawn_file_actions_addfchdir-tests (configure.ac):
25340         Define the POSIX_SPAWN_PORTED conditional here.
25342 2020-12-24  Bruno Haible  <bruno@clisp.org>
25344         sh-filename: Add support for native Windows.
25345         * m4/sh-filename.m4 (gl_SH_FILENAME): Treat native Windows like Cygwin.
25347 2020-12-24  Paul Eggert  <eggert@cs.ucla.edu>
25349         careadlinkat: improve warning line number
25350         This propagates an idea first used in canonicalize-lgpl.
25351         * lib/careadlinkat.c (GCC_BOGUS_WRETURN_LOCAL_ADDR):
25352         New macro.
25353         (careadlinkat): Use it.
25355         linkat: use eloop-threshold
25356         * lib/linkat.c: Include eloop-threshold.h.
25357         Do not include sys/param.h.
25358         (MAXSYMLINKS): Remove.
25359         (link_follow, linkat_follow): Use __eloop_threshold instead
25360         of MAXSYMLINKS.
25361         * m4/linkat.m4 (gl_FUNC_LINKAT): Omit sys/param.h check.
25362         * modules/linkat (Depends-on): Add eloop-threshold.  Sort.
25364         canonicalize-lgpl: use eloop-threshold
25365         * lib/canonicalize-lgpl.c [!_LIBC]: Include eloop-threshold.h.
25366         (MAXSYMLINKS, __eloop_threshold): Remove.
25367         * modules/canonicalize-lgpl (Depends-on): Add eloop-threshold.
25369         eloop-threshold: new module
25370         * config/srclist.txt: Add a comment about it.
25371         * lib/eloop-threshold.h, modules/eloop-threshold: New files.
25373         canonicalize: prefer faccessat to stat
25374         A proper faccessat doesn't have the EOVERFLOW problem, and can be
25375         more efficient as it needn't gather data from the filesystem to
25376         fill in struct stat.  So use stat only if faccessat is absent,
25377         or when checking for symlink loops in canonicalize.c.
25378         * lib/canonicalize-lgpl.c, lib/canonicalize.c:
25379         Include fcntl.h, for AT_EACCESS.
25380         (FACCESSAT_NEVER_EOVERFLOWS): Default to false.
25381         (file_accessible): New function, based on faccessat but with
25382         a fallback to stat and with an EOVERFLOW workaround.
25383         (dir_check): Use it.
25384         (dir_suffix): New static constant.
25385         * lib/canonicalize-lgpl.c (FACCESSAT_NEVER_EOVERFLOWS) [_LIBC]:
25386         Use __ASSUME_FACCESSAT2 to set FACCESSAT_NEVER_EOVERFLOWS
25387         (__faccessat) [!_LIBC]: Define.
25388         (realpath_stk): Use dir_suffix now.
25389         * lib/canonicalize.c (canonicalize_filename_mode_stk):
25390         If logical, don't check each component's existence; just check
25391         at the end, as that's enough.
25392         * m4/canonicalize.m4 (gl_FUNC_CANONICALIZE_FILENAME_MODE)
25393         (gl_CANONICALIZE_LGPL_SEPARATE):
25394         Require gl_FUNC_FACCESSAT_EOVERFLOW,
25395         gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK, and check for faccessat.
25396         (gl_CANONICALIZE_LGPL_SEPARATE): Do not check for readlink,
25397         as the code does not use HAVE_READLINK.
25398         * modules/canonicalize, modules/canonicalize-lgpl (Files):
25399         Add m4/faccessat.m4, m4/lstat.m4.
25400         (Depends-on): Add fcntl-lh.
25402         faccessat: work around F_OK EOVERFLOW bug
25403         * doc/posix-functions/faccessat.texi: Mention the problem.
25404         * lib/faccessat.c (FACCESSAT_NEVER_EOVERFLOWS): Default to 0.
25405         (rpl_faccessat): If !FACCESSAT_NEVER_EOVERFLOWS, check
25406         for F_OK and EOVERFLOW, which means we can return 0.
25407         * m4/faccessat.m4 (gl_FUNC_FACCESSAT_EOVERFLOW): New macro.
25408         (gl_FUNC_FACCESSAT): Use it.
25410         stat failing with EOVERFLOW implies existence
25411         * lib/euidaccess.c (euidaccess):
25412         * lib/file-has-acl.c (file_has_acl):
25413         * lib/link.c (link, rpl_link):
25414         * lib/mkdir.c (rpl_mkdir):
25415         * lib/mkfifo.c (rpl_mkfifo):
25416         * lib/mknod.c (rpl_mknod):
25417         * lib/ptsname_r.c (__ptsname_r):
25418         * lib/symlink.c (rpl_symlink):
25419         * lib/symlinkat.c (rpl_symlinkat):
25420         * lib/unlink.c (rpl_unlink):
25421         * lib/unlinkat.c (rpl_unlinkat):
25422         * lib/utime.c (utime):
25423         If stat fails with EOVERFLOW the file exists, so treat it that way
25424         in file-existence tests that do not need struct stat values.
25426         canonicalize-lgpl: remove freea macro
25427         * lib/canonicalize-lgpl.c (freea) [_LIBC]: Remove; not needed.
25429         canonicalize, canonicalize-lgpl: fix symlink bug
25430         Problem reported by Adhemerval Zanella in:
25431         https://lists.gnu.org/r/bug-gnulib/2020-12/msg00155.html
25432         * lib/canonicalize-lgpl.c, lib/canonicalize.c:
25433         (suffix_requires_dir_check, dir_check): New functions.
25434         (GCC_BOGUS_WRETURN_LOCAL_ADDR): New macro, to put the diagnostic
25435         closer to the related GCC diagnostics.
25436         * lib/canonicalize-lgpl.c (realpath_stk):
25437         * lib/canonicalize.c (canonicalize_file_mode_stk):
25438         Use them to fix a bug with .../symlink-to-regular-file/ etc.
25439         * lib/canonicalize-lgpl.c (__stat) [!_LIBC]: New macro.
25440         (realpath_stk): New function,
25441         with the contents of the old __realpath and a new scratch buffer arg.
25442         This is needed to pacify GCC 10.1, as canonicalize.c is already doing.
25443         (__realpath): Use it.
25444         * tests/test-canonicalize-lgpl.c, tests/test-canonicalize.c:
25445         Add test cases for the bugs.
25447 2020-12-24  Bruno Haible  <bruno@clisp.org>
25449         execute: Treat signalled processes like wait-process does.
25450         * lib/execute.c: Include <sys/types.h>, <sys/wait.h>.
25451         (execute): Recognize the case where the exit code indicates a signalled
25452         child process.
25453         * tests/test-execute-main.c (main): Update expected test result.
25454         * modules/execute (Depends-on): Add sys_wait.
25456 2020-12-24  Bruno Haible  <bruno@clisp.org>
25458         windows-spawn: Improve errno upon failure on native Windows.
25459         * lib/windows-spawn.c (spawnpvech): Map the CreateProcess errors
25460         ERROR_BAD_FORMAT and ERROR_BAD_EXE_FORMAT to ENOEXEC.
25461         * tests/executable-script.sh: New file.
25462         * tests/test-posix_spawn-script.c (main): Also try executing
25463         executable-script.sh.
25464         * tests/test-posix_spawnp-script.c (main): Likewise.
25465         * tests/test-execute-script.c (main): Likewise.
25466         * tests/test-spawn-pipe-script.c (main): Likewise.
25467         * modules/posix_spawn-tests (Files): Add tests/executable-script.sh.
25468         * modules/posix_spawnp-tests (Files): Likewise.
25469         * modules/execute-tests (Files): Likewise.
25470         * modules/spawn-pipe-tests (Files): Likewise.
25472 2020-12-24  Bruno Haible  <bruno@clisp.org>
25474         findprog-in: Improve errno upon failure on native Windows.
25475         * lib/findprog-in.c (find_in_given_path): If the file basename has no
25476         dot and the search with a suffix returned no result, do also a search
25477         without a suffix, and set errno = ENOEXEC if we find a file in this way.
25478         * tests/test-spawn-pipe-script.c (main): Update expected errno.
25480 2020-12-23  Bruno Haible  <bruno@clisp.org>
25482         posix_spawn, posix_spawnp: Fix execution of scripts.
25483         * m4/posix_spawn.m4 (gl_POSIX_SPAWN_SECURE): New macro.
25484         (gl_POSIX_SPAWN_BODY): Invoke it. Set REPLACE_POSIX_SPAWN if posix_spawn
25485         or posix_spawnp allows unsecure execution of scripts.
25486         * doc/posix-functions/posix_spawn.texi: Document the script execution
25487         problem.
25488         * doc/posix-functions/posix_spawnp.texi: Likewise.
25490 2020-12-23  Bruno Haible  <bruno@clisp.org>
25492         Add unit tests regarding execution of scripts.
25493         * tests/executable-script: New file.
25494         * tests/executable-shell-script: New file.
25495         * tests/test-posix_spawn-script.c: New file.
25496         * tests/test-posix_spawnp-script.c: New file.
25497         * tests/test-execute-script.c: New file.
25498         * tests/test-spawn-pipe-script.c: New file.
25499         * modules/posix_spawn-tests (Files): Add
25500         tests/test-posix_spawn-script.c, tests/executable-script,
25501         tests/executable-shell-script.
25502         (Makefile.am): Compile and run test-posix_spawn-script.
25503         * modules/posix_spawnp-tests (Files): Add
25504         tests/test-posix_spawnp-script.c, tests/executable-script,
25505         tests/executable-shell-script.
25506         (Makefile.am): Compile and run test-posix_spawnp-script.
25507         * modules/execute-tests (Files): Add tests/test-execute-script.c,
25508         tests/executable-script, tests/executable-shell-script.
25509         (Makefile.am): Compile and run test-execute-script.
25510         * modules/spawn-pipe-tests (Files): Add tests/test-spawn-pipe-script.c,
25511         tests/executable-script, tests/executable-shell-script.
25512         (Makefile.am): Compile and run test-spawn-pipe-script.
25514 2020-12-23  Bruno Haible  <bruno@clisp.org>
25516         Don't execute scripts without '#!' marker through /bin/sh.
25517         This reflects the change done in glibc through
25518         <https://sourceware.org/bugzilla/show_bug.cgi?id=13134> and
25519         <https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=d96de9634a334af16c0ac711074c15ac1762b23c>.
25520         * lib/spawni.c (internal_function): Remove macro.
25521         (script_execute): Remove function.
25522         (__spawni): Don't invoke script_execute.
25523         * lib/execute.c (execute): Disable the ENOEXEC handling.
25524         * lib/spawn-pipe.c (create_pipe): Likewise.
25525         * NEWS: Mention the change.
25527 2020-12-23  Bruno Haible  <bruno@clisp.org>
25529         posix_spawn[p]: Fix compilation error on Windows (regr. 2020-12-14).
25530         Reported by Adrian Ebeling <devl@adrian-ebeling.de> in
25531         <https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg00189.html>.
25532         * lib/spawni.c (__spawni): Update function parameters.
25534 2020-12-23  Bruno Haible  <bruno@clisp.org>
25536         posix_spawn tests: Add two more tests.
25537         * tests/test-posix_spawn-inherit0.c: New file, based on
25538         tests/test-posix_spawn-open2.c.
25539         * tests/test-posix_spawn-inherit1.c: New file, based on
25540         tests/test-posix_spawn-open2.c.
25541         * modules/posix_spawn-tests (Files): Add them.
25542         (Depends-on): Add fflush.
25543         (Makefile.am): Compile and run test-posix_spawn-inherit0 and
25544         test-posix_spawn-inherit1.
25546 2020-12-23  Bruno Haible  <bruno@clisp.org>
25548         posix_spawn tests: Add another test.
25549         * tests/test-posix_spawn-open2.c: New file, based on
25550         tests/test-posix_spawn-open1.c.
25551         * modules/posix_spawn-tests (Files): Add it.
25552         (Makefile.am): Compile and run test-posix_spawn-open1.
25554 2020-12-20  Bruno Haible  <bruno@clisp.org>
25556         Remove support for broken <wchar.h> in AIX 3.
25557         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Simplify test programs.
25559 2020-12-20  Bruno Haible  <bruno@clisp.org>
25561         Remove support for broken <wchar.h> in BSD/OS and OSF/1.
25562         * lib/wchar.in.h: Don't include <stdio.h>, <time.h>.
25563         * lib/mbchar.h: Likewise.
25564         * lib/mbiter.h: Likewise.
25565         * lib/mbuiter.h: Likewise.
25566         * m4/stdint.m4 (gl_STDINT_INCLUDES): Likewise.
25567         * lib/mbfile.h: Don't include <time.h>.
25568         * lib/mbswidth.h: Update comment.
25569         * lib/stdint.in.h: Don't include <stddef.h>, <stdio.h>, <time.h> before
25570         <wchar.h>.
25571         * lib/wctype.in.h: Likewise.
25572         * m4/btowc.m4 (gl_FUNC_BTOWC): Simplify test programs.
25573         * m4/iswblank.m4 (gl_FUNC_ISWBLANK): Likewise.
25574         * m4/iswdigit.m4 (gl_FUNC_ISWDIGIT): Likewise.
25575         * m4/iswxdigit.m4 (gl_FUNC_ISWXDIGIT): Likewise.
25576         * m4/mbrlen.m4 (gl_FUNC_MBRLEN, gl_MBRLEN_INCOMPLETE_STATE,
25577         gl_MBRLEN_RETVAL, gl_MBRLEN_NUL_RETVAL): Likewise.
25578         * m4/mbrtoc32.m4 (gl_MBRTOC32_SANITYCHECK): Likewise.
25579         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC, gl_MBRTOWC_INCOMPLETE_STATE,
25580         gl_MBRTOWC_SANITYCHECK, gl_MBRTOWC_NULL_ARG1, gl_MBRTOWC_NULL_ARG2,
25581         gl_MBRTOWC_RETVAL, gl_MBRTOWC_NUL_RETVAL, gl_MBRTOWC_STORES_INCOMPLETE,
25582         AC_FUNC_MBRTOWC): Likewise.
25583         * m4/mbsinit.m4 (gl_FUNC_MBSINIT): Likewise.
25584         * m4/mbsnrtowcs.m4 (gl_MBSNRTOWCS_WORKS_IN_TRADITIONAL_LOCALE):
25585         Likewise.
25586         * m4/mbsrtowcs.m4 (gl_FUNC_MBSRTOWCS, gl_MBSRTOWCS_WORKS): Likewise.
25587         * m4/mbstate_t.m4 (AC_TYPE_MBSTATE_T): Likewise.
25588         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
25589         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_LS): Likewise.
25590         * m4/wchar_h.m4 (gl_WCHAR_H, gl_WCHAR_H_INLINE_OK): Likewise.
25591         * m4/wcrtomb.m4 (gl_FUNC_WCRTOMB): Likewise.
25592         * m4/wcsdup.m4 (gl_FUNC_WCSDUP): Likewise.
25593         * m4/wcsnrtombs.m4 (gl_WCSNRTOMBS_WORKS_IN_TRADITIONAL_LOCALE):
25594         Likewise.
25595         * m4/wcsrtombs.m4 (gl_FUNC_WCSRTOMBS, gl_WCSRTOMBS_TERMINATION,
25596         gl_WCSRTOMBS_NULL): Likewise.
25597         * m4/wcstok.m4 (gl_FUNC_WCSTOK): Likewise.
25598         * m4/wctob.m4 (gl_FUNC_WCTOB): Likewise.
25599         * m4/wctype_h.m4 (gl_WCTYPE_H): Likewise.
25600         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
25601         * m4/wint_t.m4 (gt_TYPE_WINT_T): Likewise.
25602         * m4/wmemchr.m4 (gl_FUNC_WMEMCHR): Likewise.
25603         * m4/wmemcmp.m4 (gl_FUNC_WMEMCMP): Likewise.
25604         * m4/wmemcpy.m4 (gl_FUNC_WMEMCPY): Likewise.
25605         * m4/wmemmove.m4 (gl_FUNC_WMEMMOVE): Likewise.
25606         * m4/wmemset.m4 (gl_FUNC_WMEMSET): Likewise.
25608 2020-12-20  Bruno Haible  <bruno@clisp.org>
25610         isnanf: Fix autoconf test.
25611         * m4/isnanf.m4 (gl_ISNANF_WORKS): Fix one of the NaN tests.
25613 2020-12-20  Bruno Haible  <bruno@clisp.org>
25615         Remove some of the support for obsolete IRIX 4 and 5.
25616         * m4/mountlist.m4 (AC_FUNC_GETMNTENT): Don't test for getmntent in
25617         libsun.
25618         * tests/init.sh (setup_): Don't talk about IRIX 5.
25620 2020-12-20  Bruno Haible  <bruno@clisp.org>
25622         filemode: Remove Cray support.
25623         * lib/filemode.c (IS_MIGRATED_FILE): Remove macro.
25624         (filemodestring): Don't produce an 'M' type.
25625         * m4/filemode.m4 (gl_FILEMODE): Don't invoke AC_STRUCT_ST_DM_MODE.
25626         * m4/st_dm_mode.m4: Remove file.
25627         * modules/filemode (Files): Remove it.
25629 2020-12-20  Paul Eggert  <eggert@cs.ucla.edu>
25631         free-posix: assume glibc 2.33 fixes this.
25632         * m4/free.m4 (gl_FUNC_FREE): Assume glibc 2.33+ is fixed.
25633         Use compile-time test rather than guessing for cross-builds.
25635 2020-12-20  Bruno Haible  <bruno@clisp.org>
25637         backupfile: Fix compilation error on native Windows (regr. 2018-10-23).
25638         Reported by Adrian Ebeling <adrianebeling@gmx.de> in
25639         <https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg00156.html>.
25640         * lib/backupfile.c (fpathconf): Define fallback, like for pathconf.
25642 2020-12-20  Bruno Haible  <bruno@clisp.org>
25644         float: Fix compilation error when gnulib's float.h exists twice.
25645         Reported by Santiago Vila <sanvila@unex.es>.
25646         * lib/float.in.h (GNULIB_defined_long_double_union): New macro.
25648 2020-12-19  Bruno Haible  <bruno@clisp.org>
25650         free-posix: Assume future POSIX compliance only on OpenBSD and Solaris.
25651         * m4/free.m4 (gl_FUNC_FREE): Guess yes only on OpenBSD and Solaris.
25652         Don't trust _POSIX_VERSION for this test.
25654 2020-12-19  Paul Eggert  <eggert@cs.ucla.edu>
25656         free-posix: port to GNU/Linux
25657         * m4/free.m4 (gl_FUNC_FREE): Don’t assume GNU hosts are free of
25658         the bug, as it occurs on Ubuntu 20.10 x86-64 and, I assume, on
25659         other GNU/Linux hosts.
25661 2020-12-19  Bruno Haible  <bruno@clisp.org>
25663         free-posix: Add tests.
25664         * tests/test-free.c: New file.
25665         * tests/macros.h (ASSERT_NO_STDIO,
25666         WRITE_MACROEXPANDED_INTEGER_TO_STDERR, WRITE_INTEGER_TO_STDERR,
25667         WRITE_TO_STDERR): New macros.
25668         * modules/free-posix-tests: New file.
25670 2020-12-18  Bruno Haible  <bruno@clisp.org>
25672         free-posix: Add C++ declaration test.
25673         * tests/test-stdlib-c++.cc (free): New declaration.
25675 2020-12-18  Bruno Haible  <bruno@clisp.org>
25677         free-posix: New module, renamed from 'free'.
25678         * modules/free-posix: Renamed from modules/free.
25679         (configure.ac): Update gl_STDLIB_MODULE_INDICATOR invocation.
25680         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize GNULIB_FREE_POSIX,
25681         not GNULIB_FREE.
25682         * modules/stdlib (Makefile.am): Substitute GNULIB_FREE_POSIX, not
25683         GNULIB_FREE.
25684         * lib/stdlib.in.h (free): Test GNULIB_FREE_POSIX, not GNULIB_FREE.
25685         * doc/posix-functions/free.texi: Mention the module 'free-posix' and
25686         what it does.
25687         * NEWS: Mention that module 'free' no longer exists.
25688         * modules/canonicalize (Depends-on): Add free-posix. Remove free.
25689         * modules/canonicalize-lgpl (Depends-on): Likewise.
25691 2020-12-18  Bruno Haible  <bruno@clisp.org>
25693         free: Remove support for obsolete platforms.
25694         * m4/free.m4 (gl_FUNC_FREE): Assume free(NULL) works. Don't define
25695         CANNOT_FREE_NULL.
25696         * lib/free.c (rpl_free): Don't test CANNOT_FREE_NULL.
25697         * modules/free (Description): Update.
25698         * doc/posix-functions/free.texi: Don't mention SunOS 4 any more.
25700 2020-12-18  Paul Eggert  <eggert@cs.ucla.edu>
25702         intprops: port to ICC 2021.1 Beta 20201112
25703         * lib/intprops.h (_GL_HAS_BUILTIN_OVERFLOW_P):
25704         Port to ICC 2021.1, which has a non-working __builtin_mul_overflow_p.
25705         Add a clause for other compilers that claim to support
25706         __builtin_mul_overflow_p, since we might as well find out about
25707         slackers other than Clang and ICC.
25708         (INT_MULTIPLY_WRAPV): ICC 2021 has GCC bug 91450, so treat it
25709         like older GCCs even when it claims to be a newer one.
25711 2020-12-18  Bruno Haible  <bruno@clisp.org>
25713         intprops: Avoid potentially buggy __builtin_add_overflow in GCC 5, 6.
25714         Reported by Stefan Liebler <stli@linux.ibm.com> in
25715         <https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg00152.html>.
25716         * lib/intprops.h (_GL_HAS_BUILTIN_ADD_OVERFLOW): Don't define for
25717         GCC 5.x and 6.x.
25718         * lib/glob.c (size_add_wrapv): Don't use __builtin_add_overflow for
25719         GCC 5.x and 6.x.
25721 2020-12-17  Bruno Haible  <bruno@clisp.org>
25723         free: Fix warning.
25724         Reported by Pádraig Brady <P@draigBrady.com> in
25725         <https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg00148.html>.
25726         * lib/stdlib.in.h (free): New declaration.
25727         * m4/stdlib_h.m4 (gl_STDLIB_H): Test whether 'free' is declared.
25728         (gl_STDLIB_H_DEFAULTS): Initialize GNULIB_FREE, REPLACE_FREE.
25729         * modules/stdlib (Makefile.am): Substitute GNULIB_FREE, REPLACE_FREE.
25730         * m4/free.m4 (gl_FUNC_FREE): Set REPLACE_FREE, instead of defining
25731         'free' as a macro here.
25732         * modules/free (Depends-on): Add stdlib.
25733         (configure.ac): Test REPLACE_FREE. Invoke gl_STDLIB_MODULE_INDICATOR.
25735 2020-12-17  Paul Eggert  <eggert@cs.ucla.edu>
25737         canonicalize-lgpl: fix AIX test failures
25738         This merges the recent canonicalize.c fix into canonicalize-lgpl.c.
25739         Problem reported by Bruno Haible in:
25740         https://lists.gnu.org/r/bug-gnulib/2020-12/msg00138.html
25741         * lib/canonicalize-lgpl.c: Include sys/stat.h.
25742         (__realpath): When testing a file name ending in '/', use stat
25743         rather than readlink, so that it does the right thing on AIX.
25744         * modules/canonicalize-lgpl (Depends-on): Add stat, sys_stat.
25746         canonicalize: omit second readlink when not needed
25747         * lib/canonicalize.c (canonicalize_filename_mode_stk):
25748         Omit second readlink when (can_exist != CAN_MISSING
25749         && startlen != 0 && !logical).  Simplify.
25751         canonicalize: remove arbitrary 8192-byte limit
25752         Remove canonicalize.c’s arbitrary 8192-byte limit on platforms
25753         like GNU Hurd that do not define the PATH_MAX macro, and similarly
25754         for canonicalize-lgpl.c’s arbitrary 1024-byte limit.  Do this by
25755         using scratch buffers.  Lessen the number of differences between
25756         the two source files, to simplify this and future maintenance.
25757         * lib/canonicalize-lgpl.c (__realpath):
25758         * lib/canonicalize.c (canonicalize_filename_mode_stk):
25759         Use scratch buffers instead of malloc and malloca.  This avoids
25760         the need for alloca, and avoids the need for malloc in most cases.
25761         * lib/canonicalize-lgpl.c, lib/canonicalize.c: Make these files
25762         easier to compare, e.g., by sorting include files and by switching
25763         to the GNU convention of calling file names "file names", not
25764         "path names".  Include stdbool.h, scratch_buffer.h.
25765         * lib/canonicalize-lgpl.c (IDX_MAX) [_LIBC]: New macro.
25766         (malloca) [_LIBC]: Remove.
25767         [!_LIBC]: Do not include malloca.h.
25768         (get_path_max): New function, so that pathconf is called only in
25769         the rare and dubious case when when RESOLVED is not null and
25770         PATH_MAX is not defined.  Invoke pathconf on "/" not the input
25771         file name, as we care about the longest file name starting from
25772         "/" (not from the input file name), and POSIX does not specify
25773         what pathconf does on a non-directory file anyway.  If PATH_MAX is
25774         not defined, do not worry about overriding a path_max of 0, and do
25775         not let path_max exceed IDX_MAX.
25776         (__realpath): Remove an assumption that file name components
25777         cannot exceed 1024 bytes when PATH_MAX is not defined (wrong for
25778         the Hurd, presumably).
25779         When allocating the result, allocate it to just the right size;
25780         this costs nothing when the result is smaller than 1023 bytes,
25781         and for larger results it's probably worth the CPU to call realloc,
25782         as canonicalize.c already does.
25783         * lib/canonicalize.c: Include attribute.h.
25784         Do not include pathmax.h or xgetcwd.h.
25785         (PATH_MAX): Do not define, so file names longer than 8192 bytes
25786         work on platforms with no fixed limit.
25787         (canonicalize_filename_mode_stk): New function, with
25788         the content of the old canonicalize_filename_mode.
25789         Use getcwd instead of xgetcwd, and readlink instead of areadlink,
25790         since the scratch buffers now do memory management for us.
25791         Use rawmemchr instead of adding strlen.
25792         Use mempcpy instead of mempcpy + size.
25793         Assume free preserves errno.
25794         (canonicalize_filename_mode): Use it.
25795         * modules/canonicalize (Depends-on): Remove areadlink, pathmax,
25796         xgetcwd.  Add attribute, free, getcwd, mempcpy, rawmemchr,
25797         scratch_buffer, stdbool, xalloc-die.
25798         * modules/canonicalize-lgpl (Depends-on): Remove alloca-opt,
25799         malloca, realloc-posix.  Add scratch_buffer, stdbool.
25801         canonicalize-lgpl: simplify merge to glibc
25802         This patch lessens the differences between git glibc
25803         stdlib/canonicalize.c and lib/canonicalize-lgpl.c.
25804         The (perhaps wishful) goal is to make them identical.
25805         * lib/canonicalize-lgpl.c [!_LIBC]:
25806         Include <libc-config.h>, not config.h.
25807         Omit an unnecessary (!HAVE_CANONICALIZE_FILE_NAME ||
25808         !FUNC_REALPATH_WORKS || defined _LIBC) #if.
25809         Do not include alloca.h, since we use malloca now.
25810         [_LIBC]: Include <eloop-threshold.h>, and define dummy macros
25811         FILE_SYSTEM_PREFIX_LEN, IS_ABSOLUTE_FILE_NAME, ISSLASH, malloca,
25812         freea so that the mainline code can be kept #ifdef free.
25813         [!_LIBC]: Remove dummy macros for SHLIB_COMPAT, versioned_symbol,
25814         compat_symbol, weak_alias, __set_errno since libc-config.h does that.
25815         Add redirecting macros __mempcpy, __pathconf, __rawmemchr,
25816         __eloop_threshold.  All uses of their definiens changed.
25817         (SIZE_MAX): Remove; no longer needed.
25818         (alloc_failed): Remove, and remove all instances.
25819         No need for alloc_failed now that free preserves errno.
25820         (__realpath): Default path_max to 1024 instead of 8192, as that’s
25821         the glibc tradition and is safer when the 2nd argument is null.
25822         Use __rawmemchr instead of strchr.
25823         Use __mempcpy where appropriate.
25824         Simplify test for overflow so that it does not need SIZE_MAX.
25825         Do not preserve errno around free or freea calls; no longer needed.
25826         Mark __realpath with libc_hidden_def.
25827         * modules/canonicalize-lgpl (Depends-on): Add free, libc-config,
25828         malloc-posix, mempcpy, realloc-posix, rawmemchr.
25829         * modules/free: Now LGPLv2+, for canonicalize-lgpl.
25831         free: preserve errno
25832         * lib/free.c (rpl_free): Preserve errno.  Check for null only if
25833         CANNOT_FREE_NULL is defined, as an optimization for POSIX 2008
25834         platforms that do not preserve errno.
25835         * m4/free.m4 (gl_FUNC_FREE): Check whether free preserves errno.
25836         Also, define CANNOT_FREE_NULL if free cannot free NULL.
25837         * modules/free (configure.ac): Also replace 'free' if
25838         it does not preserve errno.
25840         idx: simplify IDX_MAX, remove IDX_WIDTH
25841         * lib/idx.h (IDX_MAX): Simplify by removing obsolete reference
25842         to UNSIGNED_IDX_T.
25843         (IDX_WIDTH): Remove, since it’s not used and its value
25844         arguably should be PTRDIFF_WIDTH anyway.
25846 2020-12-16  Bruno Haible  <bruno@clisp.org>
25848         posix_spawn_file_actions_addfchdir-tests: Rename test.
25849         * tests/test-posix_spawn-fchdir.c: Renamed from
25850         tests/test-posix_spawn5.c.
25851         * modules/posix_spawn_file_actions_addfchdir-tests (Files, Makefile.am):
25852         Update.
25854         posix_spawn_file_actions_addchdir-tests: Rename test.
25855         * tests/test-posix_spawn-chdir.c: Renamed from
25856         tests/test-posix_spawn4.c.
25857         * modules/posix_spawn_file_actions_addchdir-tests (Files, Makefile.am):
25858         Update.
25860         posix_spawn-tests: Rename test.
25861         * tests/test-posix_spawn-open1.c: Renamed from
25862         tests/test-posix_spawn3.c.
25863         * modules/posix_spawn-tests (Files, Makefile.am): Update.
25865         posix_spawnp-tests: Rename test.
25866         * tests/test-posix_spawn-dup2-stdin.c: Renamed from
25867         tests/test-posix_spawn2.c.
25868         * tests/test-posix_spawn-dup2-stdin.in.sh: Renamed from
25869         tests/test-posix_spawn2.in.sh.
25870         * modules/posix_spawnp-tests (Files, Makefile.am): Update.
25872         posix_spawnp-tests: Rename test.
25873         * tests/test-posix_spawn-dup2-stdout.c: Renamed from
25874         tests/test-posix_spawn1.c.
25875         * tests/test-posix_spawn-dup2-stdout.in.sh: Renamed from
25876         tests/test-posix_spawn1.in.sh.
25877         * modules/posix_spawnp-tests (Files, Makefile.am): Update.
25879 2020-12-14  Bruno Haible  <bruno@clisp.org>
25881         findprog-in: Allow overriding the current directory.
25882         * lib/findprog.h (find_in_given_path): Add directory argument.
25883         * lib/findprog-in.c (find_in_given_path): Likewise.
25884         * lib/execute.c (execute): Update caller.
25885         * lib/spawn-pipe.c (create_pipe): Likewise.
25886         * lib/windows-spawn.c (spawnpvech): Likewise.
25887         * NEWS: Mention the change.
25889 2020-12-14  Bruno Haible  <bruno@clisp.org>
25891         posix_spawn-internal: Make better use of 'const'.
25892         * lib/spawn_int.h (__spawni): Does not need write access to the elements
25893         of argv and envp.
25894         * lib/spawni.c (__spawni, script_execute): Likewise.
25895         * lib/spawn.c (posix_spawn): Update caller.
25896         * lib/spawnp.c (posix_spawnp): Likewise.
25898 2020-12-14  Bruno Haible  <bruno@clisp.org>
25900         spawn: Make it compile on native Windows.
25901         * modules/spawn (Depends-on): Add signal-h.
25903 2020-12-14  Bruno Haible  <bruno@clisp.org>
25905         windows-spawn: Avoid shadowing a variable.
25906         * lib/windows-spawn.c (spawnpvech): Rename local variable 'flags'.
25908 2020-12-13  Paul Eggert  <eggert@cs.ucla.edu>
25910         string: port memchr macro to AIX 7.2 XLC
25911         Its <string.h> defines a memchr macro to help inlining.
25912         * lib/string.in.h (memchr): #undef before #defining.
25914         canonicalize: fix AIX test failures
25915         Problem reported by Bruno Haible in:
25916         https://lists.gnu.org/r/bug-gnulib/2020-12/msg00109.html
25917         * lib/canonicalize.c (canonicalize_filename_mode):
25918         When testing a file name ending in '/', use stat rather than
25919         readlink, so that it does the right thing on AIX.
25920         * modules/canonicalize (Depends-on): Add readlink, to pull in the
25921         recent changes in the Gnulib readlink module.
25923         Assume readlink/readlinkat ERANGE fix
25924         * lib/areadlink-with-size.c (areadlink_with_size):
25925         * lib/areadlinkat-with-size.c (areadlinkat_with_size):
25926         * lib/careadlinkat.c (readlink_stk):
25927         Do not worry about readlink or readlinkat failing with errno == ERANGE,
25928         since the Gnulib readlink and readlinkat modules now fix that.
25930         getcwd: port to AIX
25931         * lib/getcwd.c [!_LIBC]: Undef stat64 before #defining it,
25932         in case our sys/stat.h #defined a function macro with the same name.
25934         readlink, readlinkat: add ERANGE portability
25935         Fix some portability issues with Gnulib's readlink and readlinkat,
25936         notably mostly working around the ERANGE problem in AIX and HP-UX.
25937         * doc/posix-functions/readlink.texi:
25938         * doc/posix-functions/readlinkat.texi:
25939         ERANGE problem is mostly fixed now.  Mention AIX problem with
25940         trailing / and EINVAL.  Lessen differences between these two files.
25941         * lib/readlink.c (rpl_readlink):
25942         * lib/readlinkat.c (rpl_readlinkat):
25943         If stat ("FILE/", ...) reports EOVERFLOW, treat FILE/ as an
25944         existing directory.  Mostly work around READLINK_TRUNCATE BUG.
25945         Lessen spurious differences between the readlink and readlinkat code.
25946         * lib/readlinkat.c (rpl_readlinkat):
25947         Fix bug where stat was used where fstatat was intended.
25948         * m4/readlink.m4 (gl_FUNC_READLINK):
25949         Rename gl_cv_func_readlink_works to gl_cv_func_readlink_trailing_slash
25950         to identify readlink problems more precisely.  All uses changed.
25951         Guess no on AIX or HP-UX for this variable.
25952         Add check for whether readlink truncates results,
25953         and define new macro READLINK_TRUCATE_BUG accordingly.
25954         * m4/readlinkat.m4 (gl_FUNC_READLINKAT):
25955         Also check gl_cv_func_readlink_trailing_slash when deciding
25956         whether to replace readlinkat.
25957         * modules/readlinkat (Depends-on): Most dependencies are also
25958         needed if replacing readlinkat.  fstatat is different, as it
25959         is needed only if replacing an existing readlinkat.
25961 2020-12-13  Bruno Haible  <bruno@clisp.org>
25963         spawn-pipe: Fix hanging processes on Windows (regression 2020-11-30).
25964         * lib/spawn-pipe.c (create_pipe): After spawning the subprocess, close
25965         the stdin_handle and/or stdout_handle.
25967 2020-12-12  Bruno Haible  <bruno@clisp.org>
25969         Fix gnulib-tool error when some modules occur in tests/.
25970         * doc/gnulib.texi (Specification): Update statistics.
25971         (Autoconf macros): Don't suggest to use AC_LIBOBJ in a .m4 file.
25972         (Using AC_LIBOBJ): New section.
25973         * check-AC_LIBOBJ: New file.
25974         * modules/fnmatch-gnu (Files): Add lib/fnmatch.c.
25975         * modules/fopen-gnu (Files): Add lib/fopen.c.
25976         * modules/memmem (Files): Add lib/memmem.c.
25977         * modules/renameat (Files): Add lib/at-func2.c.
25978         * modules/strcasestr (Files): Add lib/strcasestr.c.
25979         * modules/strstr (Files): Add lib/strstr.c.
25981 2020-12-11  Bruno Haible  <bruno@clisp.org>
25983         sh-quote, execute, spawn-pipe, etc.: Make better use of 'const'.
25984         * lib/sh-quote.h (shell_quote_argv): Does not need write access to the
25985         elements of argv.
25986         * lib/sh-quote.c (shell_quote_argv): Likewise.
25987         * lib/windows-spawn.h (prepare_spawn): Add 'const' the argument type and
25988         the return type.
25989         * lib/windows-spawn.c (prepare_spawn): Likewise.
25990         * lib/os2-spawn.h (prepare_spawn): Likewise.
25991         * lib/os2-spawn.c (prepare_spawn): Likewise.
25992         * lib/execute.h (execute): Does not need write access to the elements of
25993         prog_argv.
25994         * lib/execute.c (execute): Likewise.
25995         * lib/spawn-pipe.h (create_pipe_out, create_pipe_in, create_pipe_bidi):
25996         Likewise.
25997         * lib/spawn-pipe.c (create_pipe, create_pipe_bidi, create_pipe_in,
25998         create_pipe_out): Likewise.
25999         * lib/pipe-filter.h (pipe_filter_ii_execute, pipe_filter_gi_create):
26000         Likewise.
26001         * lib/pipe-filter-ii.c (pipe_filter_ii_execute): Likewise.
26002         * lib/pipe-filter-gi.c (pipe_filter_gi_create): Likewise.
26003         * lib/javaexec.h (execute_fn): Does not need write access to the
26004         elements of prog_argv.
26005         * lib/javaexec.c (execute_java_class): Update variable types and remove
26006         casts to 'char *'.
26007         * lib/csharpexec.h (execute_fn): Does not need write access to the
26008         elements of prog_argv.
26009         * lib/csharpexec.c (execute_csharp_using_mono,
26010         execute_csharp_using_sscli): Update variable types and remove casts to
26011         'char *'.
26012         * lib/javacomp.c (compile_using_envjavac, compile_using_gcj,
26013         compile_using_javac, compile_using_jikes, is_envjavac_gcj,
26014         is_envjavac_gcj43, is_gcj_present, is_gcj_43, is_javac_present,
26015         is_jikes_present): Update variable types and remove casts to 'char *'.
26016         * lib/javaversion.c (execute_and_read_line): Does not need write access
26017         to the elements of prog_argv.
26018         * lib/csharpcomp.c (compile_csharp_using_mono,
26019         compile_csharp_using_sscli): Update variable types and remove casts to
26020         'char *'.
26021         * tests/test-sh-quote.c (main): Update variable types and remove casts
26022         to 'char *'.
26023         * tests/test-execute-main.c (main): Update variable types and remove
26024         casts to 'char *'.
26025         * tests/test-spawn-pipe-main.c (test_pipe): Update variable types and
26026         remove casts to 'char *'.
26027         * NEWS: Mention the changes.
26029 2020-12-11  Bruno Haible  <bruno@clisp.org>
26031         execute-tests: Fix compilation error with MSVC.
26032         * tests/test-execute-child.c (is_device): With _fstat, use
26033         'struct _stat', not 'struct stat'.
26035 2020-12-11  Paul Eggert  <eggert@cs.ucla.edu>
26037         vararrays: just use 2.70
26038         * m4/vararrays.m4 (AC_C_VARARRAYS): Do not override Autoconf 2.70
26039         and later, since Autoconf 2.70 matches Gnulib now.
26041         sys_types: just use 2.70
26042         * m4/sys_types_h.m4 (AC_HEADER_MAJOR):
26043         Reindent to match Autoconf sources.
26044         Use Autoconf 2.70 as a prerequisite, not 2.69c.
26046         stdint: port to Autoconf 2.70
26047         * m4/stdint.m4 (gl_STDINT_H): Check for inttypes.h and sys/types.h
26048         instead of assuming that AC_INCLUDES_DEFAULT does it.
26049         The old code relied on AC_INCLUDES_DEFAULT being called
26050         and setting ac_cv_header_inttypes_h and ac_cv_header_sys_types_h,
26051         but this does not occur in Autoconf 2.70.
26053         pid_t.m4: just use 2.70
26054         * m4/pid_t.m4 (AC_TYPE_PID_T):
26055         Use Autoconf 2.70 as a prerequisite, not 2.69c.
26057         largefile: just use 2.70
26058         * m4/largefile.m4 (_AC_SYS_LARGEFILE_TEST_INCLUDES):
26059         Use Autoconf 2.70 as a prerequisite, not 2.69c.
26061         AC_C_RESTRICT: update from Autoconf
26062         * m4/gnulib-common.m4 (gl_PROG_CC_C99): Use Autoconf 2.70
26063         as a prerequisite, not 2.69c, since 2.70 is now out.
26064         (AC_C_RESTRICT): Define only for 2.70 or earlier.
26065         Try __restrict__ before __restrict.
26067         extensions: update from Autoconf
26068         * m4/extensions.m4 (AC_CHECK_INCLUDES_DEFAULT):
26069         Provide a default implementation for Autoconf 2.69 or earlier.
26070         (AC_USE_SYSTEM_EXTENSIONS): Copy from Autoconf git.  Define only
26071         if Autoconf 2.70 or earlier, since 2.70.1 or later should be OK.
26073         alloca: update from Autoconf
26074         * m4/alloca.m4 (gl_PREREQ_ALLOCA):
26075         Trivial update to match Autoconf 2.70.
26077 2020-12-11  Bruno Haible  <bruno@clisp.org>
26079         memchr: Work around memory overrun bug on AIX 7.2.
26080         * m4/memchr.m4 (gl_FUNC_MEMCHR): Test against AIX 7.2 bug.
26081         * doc/posix-functions/memchr.texi: Mention the AIX bug.
26083 2020-12-11  Bruno Haible  <bruno@clisp.org>
26085         execute-tests: Fix compilation error on AIX in 32-bit mode.
26086         * tests/test-execute-child.c: In order to get the original definition of
26087         fstat, don't use '#undef fstat' and '#undef stat'. Instead, arrange to
26088         include the system's <sys/stat.h> and use it before including other
26089         header files.
26091 2020-12-10  Bruno Haible  <bruno@clisp.org>
26093         windows-spawn: Relicense under LGPLv2+.
26094         * modules/windows-spawn (License): Change to LGPLv2+.
26096 2020-12-10  Bruno Haible  <bruno@clisp.org>
26098         execute, spawn-pipe: Fix memory leak on native Windows.
26099         * lib/windows-spawn.h (prepare_spawn): Add a second parameter.
26100         * lib/windows-spawn.c: Don't include xalloc.h.
26101         (quoted_arg_length, quoted_arg_string): New functions, extracted from
26102         prepare_spawn.
26103         (prepare_spawn): Use malloc instead of XNMALLOC. Allocate memory for all
26104         elements of *new_argv together.
26105         * modules/windows-spawn (Depends-on): Remove xalloc. Add malloc-posix.
26106         * lib/os2-spawn.h (prepare_spawn): Add a second parameter.
26107         * lib/os2-spawn.c: Don't include xalloc.h.
26108         (prepare_spawn): Use malloc instead of XNMALLOC. Allocate memory for all
26109         elements of *new_argv together.
26110         * lib/execute.c: Include xalloc.h.
26111         (execute): Check return value of prepare_spawn. Free the memory
26112         allocated by prepare_spawn.
26113         * modules/execute (Depends-on): Add xalloc-die.
26114         * lib/spawn-pipe.c: Include xalloc.h.
26115         (create_pipe): Check return value of prepare_spawn. Free the memory
26116         allocated by prepare_spawn.
26117         * modules/spawn-pipe (Depends-on): Add xalloc-die.
26119 2020-12-10  Bruno Haible  <bruno@clisp.org>
26121         findprog-in: Relicense under LGPLv2+.
26122         Paul Smith's approval is in
26123         <https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg00072.html>.
26124         * modules/findprog-in (License): Change to LGPLv2+.
26126 2020-12-10  Bruno Haible  <bruno@clisp.org>
26128         findprog-in: Don't exit upon out-of-memory.
26129         * lib/findprog.h (find_in_given_path): Document ENOMEM as possible error
26130         code.
26131         * lib/findprog-in.c: Don't include xalloc.h.
26132         (find_in_given_path): Call concatenated_filename, not
26133         xconcatenated_filename. Call strdup, not xstrdup. Upon out-of-memory,
26134         return NULL with errno set.
26135         * modules/findprog-in (Depends-on): Remove xconcat-filename, xalloc. Add
26136         concat-filename, strdup-posix, malloc-posix.
26138 2020-12-09  Bruno Haible  <bruno@clisp.org>
26140         fmaf: Work around a bug on FreeBSD 12.2/arm.
26141         * m4/fmaf.m4 (gl_FUNC_FMAF_WORKS): Add one more test.
26142         * doc/posix-functions/fmaf.texi: Mention the FreeBSD bug.
26144 2020-12-09  Bruno Haible  <bruno@clisp.org>
26146         threadlib: Fix test-fstrcmp failure on FreeBSD 11.
26147         * m4/threadlib.m4 (gl_THREADLIB_BODY): When weak symbols are not present
26148         on FreeBSD, define PTHREAD_IN_USE_DETECTION_HARD.
26149         * lib/glthread/threadlib.c: Include <errno.h>.
26150         (glthread_in_use): For FreeBSD, provide an alternative implementation
26151         that uses pthread_key_create.
26153 2020-12-09  Bruno Haible  <bruno@clisp.org>
26155         math C++ tests: Fix compilation error in with clang >= 7 on FreeBSD.
26156         * lib/math.in.h (isnan): For clang >= 7 on FreeBSD, declare 'rpl_isnan',
26157         not 'isnan'.
26159 2020-12-08  Bruno Haible  <bruno@clisp.org>
26161         std-gnu11: Make compatible with Autoconf 2.70.
26162         * m4/std-gnu11.m4: Disable the entire file if Autoconf >= 2.70 is in
26163         use.
26165 2020-12-08  Bruno Haible  <bruno@clisp.org>
26167         argp: Avoid undefined behaviour when invoking qsort().
26168         This fixes a test-argp-2.sh test failure on macOS and FreeBSD.
26169         Reported by Jeffrey Walton <noloader@gmail.com> in
26170         <https://lists.gnu.org/archive/html/bug-gnulib/2020-03/msg00085.html>.
26171         * lib/argp-help.c (group_cmp): Remove third argument.
26172         (hol_sibling_cluster_cmp, hol_cousin_cluster_cmp): New functions, based
26173         upon hol_cluster_cmp.
26174         (hol_cluster_cmp): Use hol_cousin_cluster_cmp.
26175         (hol_entry_cmp): Rewritten to implement a total order.
26177 2020-12-08  Bruno Haible  <bruno@clisp.org>
26179         argp: Improve comments.
26180         * lib/argp-help.c: Add sectioning comments. Write NULL to designate a
26181         null pointer.
26182         (struct hol_entry): Fix comment regarding sort order of group.
26183         (hol_entry_short_iterate, hol_entry_long_iterate): Add comment.
26184         (until_short, canon_doc_option, hol_entry_qcmp): Improve comment.
26185         (hol_cluster_is_child, argp_hol): Move functions.
26186         (HOL_ENTRY_PTRCMP): Remove unused macro.
26188 2020-12-08  Bruno Haible  <bruno@clisp.org>
26190         argp: Don't pass invalid arguments to isspace() and isalnum().
26191         * lib/argp-help.c (canon_doc_option): Cast character to 'unsigned int'
26192         before passing it to isspace() or isalnum().
26194 2020-12-08  Bruno Haible  <bruno@clisp.org>
26196         argp: Don't rely on undefined behaviour of _tolower().
26197         Patch by Eric Blake
26198         <https://lists.gnu.org/archive/html/bug-gnulib/2009-09/msg00287.html>.
26199         * lib/argp-help.c (hol_entry_cmp): Don't use _tolower on values that are
26200         not upper-case.  Pass correct range to tolower.
26202 2020-12-07  Bruno Haible  <bruno@clisp.org>
26204         unicodeio: Fix wrong result on FreeBSD.
26205         * lib/unicodeio.c (unicode_to_mb): Handle question mark fallback
26206         characters on all platforms.
26208 2020-12-07  Bruno Haible  <bruno@clisp.org>
26210         get-rusage-data tests: Avoid test failure on FreeBSD/x86_64.
26211         * tests/test-get-rusage-data.c (main): Don't expect a strict increase on
26212         FreeBSD systems.
26214 2020-12-07  Bruno Haible  <bruno@clisp.org>
26216         get-rusage-data: Fix link error on FreeBSD 12.2/arm64.
26217         * modules/get-rusage-data (configure.ac): Test whether sbrk exists.
26218         * lib/get-rusage-data.c (get_rusage_data_via_setrlimit): Define
26219         trivially of sbrk is not available.
26220         * doc/glibc-functions/sbrk.texi: Mention that the function does not
26221         exist in FreeBSD 12.2/arm64.
26222         * doc/glibc-functions/brk.texi: Likewise.
26224 2020-12-07  Bruno Haible  <bruno@clisp.org>
26226         Correct interaction between gl_ANSI_CXX and AC_PROG_CXX.
26227         Suggested by Zack Weinberg in
26228         <https://savannah.gnu.org/support/?110294>.
26229         * m4/ansi-c++.m4 (gl_ANSI_CXX): Mark AC_PROG_CXX as provided.
26230         * modules/uchar-c++-tests: Revert the workaround from 2020-08-18.
26232 2020-12-07  Bruno Haible  <bruno@clisp.org>
26234         Tweak the Windows oldnames workaround.
26235         Reported by Daniel R. Hurtmans <Daniel.Hurtmans@ulb.ac.be> in
26236         <https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg00073.html>.
26237         * lib/unistd.in.h: On native Windows, include <io.h> and <direct.h>
26238         always.
26239         (getcwd): Use _GL_CXXALIAS_MDA_CAST.
26240         * lib/stdlib.in.h (putenv): Likewise.
26242 2020-12-06  Paul Eggert  <eggert@cs.ucla.edu>
26244         doc: fix flat address space discussion
26245         * doc/gnulib-readme.texi (Other portability assumptions):
26246         Move the all-bits-zero assumption outside the flat address space
26247         section, since the two issues are independent.
26249         doc: document -static-libubsan more
26250         * doc/gnulib-readme.texi (High Quality): Document pros and cons of
26251         -static-libubsan a bit more.  Mostly cons.
26253 2020-12-06  Bruno Haible  <bruno@clisp.org>
26255         doc: Add more details regarding the undefined behaviour sanitizer.
26256         * doc/gnulib-readme.texi (High Quality): Describe
26257         -fsanitize-undefined-trap-on-error better.
26259 2020-12-06  Bruno Haible  <bruno@clisp.org>
26261         Do the Windows oldnames workaround through the C++ GNULIB_NAMESPACE.
26262         Reported by Daniel R. Hurtmans <Daniel.Hurtmans@ulb.ac.be> in
26263         <https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg00029.html>.
26264         * lib/c++defs.h (_GL_CXXALIAS_MDA_CAST): New macro.
26265         * lib/fcntl.in.h (creat, open):  In C++ mode, when GNULIB_NAMESPACE is
26266         defined: 1. Define a symbol in this namespace. 2. Don't redirect using
26267         a preprocessor #define.
26268         * lib/math.in.h (j0, j1, jn, y0, y1, yn): Likewise.
26269         * lib/search.in.h (lfind, lsearch): Likewise.
26270         * lib/stdio.in.h (fcloseall, fdopen, fileno, getw, putw, tempnam):
26271         Likewise.
26272         * lib/stdlib.in.h (ecvt, fcvt, gcvt, mktemp, putenv): Likewise.
26273         * lib/string.in.h (memccpy, strdup): Likewise.
26274         * lib/sys_stat.in.h (chmod, umask): Likewise.
26275         * lib/time.in.h (tzset): Likewise.
26276         * lib/unistd.in.h (access, chdir, close, dup, dup2, execl, execle,
26277         execlp, execv, execve, execvp, execvpe, getcwd, getpid, isatty, lseek,
26278         read, rmdir, swab, unlink, write): Likewise.
26279         * lib/utime.in.h (utime): Likewise.
26280         * lib/wchar.in.h (wcsdup): Likewise.
26281         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Initialize HAVE_DECL_FCLOSEALL.
26282         (gl_STDIO_H): Set HAVE_DECL_FCLOSEALL.
26283         * modules/stdio (Makefile.am): Substitute HAVE_DECL_FCLOSEALL.
26284         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize HAVE_DECL_ECVT,
26285         HAVE_DECL_FCVT, HAVE_DECL_GCVT.
26286         (gl_STDLIB_H): Set HAVE_DECL_ECVT, HAVE_DECL_FCVT, HAVE_DECL_GCVT.
26287         * modules/stdlib (Makefile.am): Substitute HAVE_DECL_ECVT,
26288         HAVE_DECL_FCVT, HAVE_DECL_GCVT.
26289         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize HAVE_DECL_EXECVPE.
26290         (gl_UNISTD_H): Set HAVE_DECL_EXECVPE.
26291         * modules/unistd (Makefile.am): Substitute HAVE_DECL_EXECVPE.
26292         * m4/wchar_h.m4 (gl_WCHAR_H_DEFAULTS): Initialize HAVE_DECL_WCSDUP.
26293         (gl_WCHAR_H): Set HAVE_DECL_WCSDUP.
26294         * modules/wchar (Makefile.am): Substitute HAVE_DECL_WCSDUP.
26296 2020-12-06  Bruno Haible  <bruno@clisp.org>
26298         doc: Mention some missing function declarations.
26299         * doc/glibc-functions/execvpe.texi: Mention the missing declaration on
26300         AIX.
26301         * doc/glibc-functions/fcloseall.texi: Mention the missing declaration on
26302         FreeBSD.
26303         * doc/pastposix-functions/ecvt.texi: Mention the missing declaration on
26304         Cygwin.
26305         * doc/pastposix-functions/fcvt.texi: Likewise.
26306         * doc/pastposix-functions/gcvt.texi: Likewise.
26308 2020-12-06  Bruno Haible  <bruno@clisp.org>
26310         doc: Tweak example.
26311         * doc/intprops.texi (Checking Integer Overflow): Use 'printf', not
26312         'print'.
26314 2020-12-06  Bruno Haible  <bruno@clisp.org>
26316         filenamecat-tests: Use idx_t for nonnegative ptrdiff_t variables.
26317         * tests/test-filenamecat.c: Include idx.h.
26318         (main): Mark prefixlen as nonnegative.
26319         * modules/filenamecat-tests (Depends-on): Add idx.
26321 2020-12-06  Bruno Haible  <bruno@clisp.org>
26323         time_rz: Use idx_t for nonnegative ptrdiff_t variables.
26324         * lib/time_rz.c: Include idx.h.
26325         (save_abbr): Mark zone_size as nonnegative.
26326         * modules/time_rz (Depends-on): Add idx.
26328 2020-12-06  Bruno Haible  <bruno@clisp.org>
26330         parse-datetime: Use idx_t for nonnegative ptrdiff_t variables.
26331         * lib/parse-datetime.y: Include idx.h.
26332         (textint): Mark digits as nonnegative.
26333         (parser_control): Mark dates_seen, days_seen, local_zones_seen,
26334         dsts_seen, times_seen, zones_seen as nonnegative.
26335         (lookup_word): Mark wordlen as nonnegative.
26336         (yylex): Mark count as nonnegative.
26337         (parse_datetime2): Mark tzsize as nonnegative.
26338         * modules/parse-datetime (Depends-on): Add idx.
26340 2020-12-06  Bruno Haible  <bruno@clisp.org>
26342         fnmatch: Use idx_t for nonnegative ptrdiff_t variables.
26343         * lib/fnmatch.c: Include idx.h. In glibc, define idx_t directly.
26344         * lib/fnmatch_loop.c (EXT): Mark slen, new_used, plensize as
26345         nonnegative.
26346         * modules/fnmatch (Depends-on): Add idx.
26348 2020-12-06  Bruno Haible  <bruno@clisp.org>
26350         c-stack: Use idx_t for nonnegative ptrdiff_t variables.
26351         * lib/c-stack.c: Include idx.h.
26352         (die): Mark buflen as nonnegative.
26353         * modules/c-stack (Depends-on): Add idx.
26355 2020-12-06  Bruno Haible  <bruno@clisp.org>
26357         backupfile: Use idx_t for nonnegative ptrdiff_t variables.
26358         * lib/backupfile.c: Include idx.h.
26359         (numbered_backup): Mark base_offset as nonnegative.
26360         (backupfile_internal): Likewise.
26361         * modules/backup-rename (Depends-on): Add idx.
26362         * modules/backupfile (Depends-on): Likewise.
26364 2020-12-05  Paul Eggert  <eggert@cs.ucla.edu>
26366         doc: fix curved quotes issue
26367         * doc/gnulib.texi: Set txicodequoteundirected and
26368         txicodequotebacktick so that ` and ' in examples do not generate
26369         curved single quotes that do the wrong thing when cut and pasted.
26371         doc: mention static and dynamic checking
26372         * doc/gnulib-readme.texi (High Quality): Add a bit of advice
26373         for static and dynamic checking.
26375         intprops: Add INT_ADD_OK etc.
26376         * doc/intprops.texi (Checking Integer Overflow): New section.
26377         * lib/intprops.h: From a suggestion by Bruno Haible in:
26378         https://lists.gnu.org/r/bug-gnulib/2020-12/msg00051.html
26379         (SAFE_INT_ADD, SAFE_INT_SUBTRACT, SAFE_INT_MULTIPLY): New macros.
26381         doc: move exotic platfroms to Target Platforms
26382         * doc/gnulib-intro.texi (Supported Platforms)
26383         (Formerly Supported Platforms, Unsupported Platforms):
26384         New subsections, split off from Target Platforms.
26385         (Unsupported Platforms): Move the exotic-platform stuff here ...
26386         * doc/gnulib-readme.texi (Exotic platforms): ... from this removed
26387         section.
26389         doc: mention intptr_t etc. and IBM i
26390         * doc/gnulib-readme.texi (Other portability assumptions):
26391         Mention intptr_t and uintptr_t, and that arithmetic on them
26392         works in the usual way.
26393         (Exotic platforms): New section, containing material from
26394         the old 'Integer Portability' section.  Also mention IBM i.
26395         * doc/intprops.texi (Wraparound Arithmetic):
26396         Say that the macros work on unsigned integers too.
26397         (Integer Portability): Remove.
26399 2020-12-04  Bruno Haible  <bruno@clisp.org>
26401         utime: Fix a test failure on macOS 10.13.
26402         Reported by Martin Storsjö <martin@martin.st> in
26403         <https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg00003.html>.
26404         * m4/utime.m4 (gl_FUNC_UTIME): Test whether utime handles trailing
26405         slashes on files.
26406         * lib/utime.c (utime): Add alternative implementation for Unix
26407         platforms.
26408         * modules/utime (Depends-on): Add stat.
26409         * doc/posix-functions/utime.texi: Mention the macOS 10.13 bug.
26410         * doc/posix-functions/lstat.texi: Mention that macOS 10.13 also has the
26411         trailing-slash bug.
26412         * doc/posix-functions/open.texi: Likewise.
26413         * doc/posix-functions/stat.texi: Likewise.
26414         * doc/posix-functions/symlink.texi: Likewise.
26416 2020-12-04  Paul Eggert  <eggert@cs.ucla.edu>
26418         intprops: update doc and mention Unisys
26419         * doc/gnulib-readme.texi (Other portability assumptions):
26420         Also mention ptrdiff_t when talking about widths and overflow.
26421         * doc/intprops.texi (Integer Properties): Summarize new section.
26422         (Arithmetic Type Properties): Document that EXPR_SIGNED no longer
26423         evaluates its argument.
26424         (Integer Bounds): Fix typo.
26425         (Wraparound Arithmetic): Remove obsolete comment about efficiency.
26426         Document that the _WRAPV macros now support pointers to unsigned
26427         integers.
26428         (Integer Range Overflow): Update SEI CERT citation.
26429         (Integer Portability): New subsection, which mentions
26430         the oddball Unisys platforms as non-Gnulib targets.
26432 2020-12-03  Bruno Haible  <bruno@clisp.org>
26434         idx: Clarify that idx_t always behaves like a signed type.
26435         Suggested by Paul Eggert in
26436         <https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg00034.html>.
26437         * lib/idx.h: Clarify that idx_t always behaves like a signed type.
26438         Don't test UNSIGNED_IDX_T.
26440 2020-12-03  Bruno Haible  <bruno@clisp.org>
26442         idx: New module.
26443         * lib/idx.h: New file.
26444         * modules/idx: New file.
26445         * lib/canonicalize-lgpl.c: Include idx.h. Use idx_t instead of
26446         ptrdiff_t.
26447         * lib/canonicalize.c: Likewise.
26448         * modules/canonicalize-lgpl (Depends-on): Add idx.
26449         * modules/canonicalize (Depends-on): Likewise.
26451 2020-12-03  Bruno Haible  <bruno@clisp.org>
26453         fprintf-posix-tests: Avoid a test failure on macOS 10.13.
26454         Reported by Martin Storsjö <martin@martin.st> in
26455         <https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg00003.html>.
26456         * tests/test-fprintf-posix3.c: Skip the test on macOS.
26457         (main): Return a different exit code at each point. Allow 100 KB extra
26458         memory consumption.
26459         * tests/test-fprintf-posix3.sh: Update. Remove the "get_rusage_as()
26460         doesn't work" diagnostic.
26462 2020-12-02  Paul Eggert  <eggert@cs.ucla.edu>
26464         canonicalize: refactor can_mode flag
26465         * lib/canonicalize.c (MULTIPLE_BITS_SET): Remove, replacing with ...
26466         (multiple_bits_set): ... this new static function.  Uses changed.
26467         (canonicalize_filename_mode): Refactor for clarity to avoid
26468         modifying the CAN_MODE argument.
26470         canonicalize: prefer signed integer types
26471         * lib/canonicalize.c: Include stddef.h, for ptrdiff_t.
26472         (seen_triple, canonicalize_filename_mode): Prefer signed to
26473         unsigned types where either will do, as they avoid some glitches
26474         in comparisons and can trap on overflow when debugging.
26476         canonicalize: fix most of another EOVERFLOW issue
26477         * lib/canonicalize.c (canonicalize_filename_mode):
26478         Do not call stat if fewer than 20 symlinks have been traversed.
26479         This avoids EOVERFLOW failure in the common case where there
26480         are not that many symlinks, while continuing to catch loops
26481         (or fail due to EOVERFLOW) in the unusual case when there
26482         are many symlinks to traverse.
26484         canonicalize: do not assume symlinks have st_ino
26485         * lib/canonicalize.c (canonicalize_filename_mode):
26486         When checking for loops, use st_dev and st_ino from the parent
26487         directory not from the symlink, as pre-2017 POSIX says these
26488         members are not reliable for symlinks.  Couple this with START
26489         (the remaining file name to be resolved), not NAME (the whole file
26490         name with START as its suffix).
26491         * modules/canonicalize (Depends-on): Depend on stat, not lstat.
26493         canonicalize: fix EOVERFLOW bug
26494         * lib/canonicalize.c (canonicalize_filename_mode):
26495         When testing whether a directory entry is a symbolic link, or a
26496         directory or other, do not use lstat or stat or
26497         areadlink_with_size.  Just use areadlink, as this suffices and it
26498         avoids the EOVERFLOW problem that lstat and stat have.
26499         * modules/canonicalize (Depends-on): Depend on areadlink instead
26500         of areadlink-with-size and stat.
26502         canonicalize-lgpl: fix EOVERFLOW bug
26503         * lib/canonicalize-lgpl.c: Do not include <sys/stat.h>.
26504         (__realpath): Do not use lstat.  Just use readlink, as this
26505         suffices and it avoids the EOVERFLOW problem that lstat has.
26506         * modules/canonicalize-lgpl (Depends-on): Remove lstat, sys_stat.
26508 2020-12-02  Bruno Haible  <bruno@clisp.org>
26510         strsignal-tests: Fix test failure on macOS 10.13.
26511         Reported by Martin Storsjö <martin@martin.st> in
26512         <https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg00003.html>.
26513         * tests/test-strsignal.c (ASSERT_DESCRIPTION): Allow the actual result
26514         to be longer than the expected result.
26516 2020-12-02  Bruno Haible  <bruno@clisp.org>
26518         Fix compilation errors in test-math-c++.cc on FreeBSD 12.2/arm64.
26519         * lib/math.in.h (_GL_INCLUDING_MATH_H): New macro, to work around
26520         recursive self-include problem on FreeBSD 12.2 in C++ mode.
26522 2020-12-02  Bruno Haible  <bruno@clisp.org>
26524         spawn-pipe: Allow caller to specify directory for the subprocess.
26525         * lib/spawn-pipe.h (create_pipe_out, create_pipe_in, create_pipe_bidi):
26526         Add directory argument.
26527         * lib/spawn-pipe.c: Include canonicalize.h, filename.h, findprog.h.
26528         (create_pipe): Add directory argument. If specified, resolve the program
26529         file name and make it absolute, first. Pass the directory to spawnpvech
26530         and posix_spawn_file_actions_addchdir.
26531         (create_pipe_bidi, create_pipe_in, create_pipe_out): Add directory
26532         argument.
26533         * modules/spawn-pipe (Depends-on): Add canonicalize, filename,
26534         findprog-in, posix_spawn, posix_spawn_file_actions_addchdir.
26535         * tests/test-spawn-pipe-main.c (test_pipe): Update.
26536         * NEWS: Mention the change.
26537         * lib/csharpcomp.c (compile_csharp_using_mono,
26538         compile_csharp_using_sscli): Update.
26539         * lib/javacomp.c (is_envjavac_gcj, is_envjavac_gcj43, is_gcj_present,
26540         is_gcj_43): Update.
26541         * lib/javaversion.c (execute_and_read_line): Update.
26542         * lib/pipe-filter-gi.c (pipe_filter_gi_create): Update.
26543         * lib/pipe-filter-ii.c (pipe_filter_ii_execute): Update.
26545 2020-12-02  Bruno Haible  <bruno@clisp.org>
26547         execute: Allow caller to specify directory for the subprocess.
26548         * lib/execute.h (execute): Add directory argument.
26549         * lib/execute.c: Include canonicalize.h, filename.h, findprog.h.
26550         (execute): Add directory argument. If specified, resolve the program
26551         file name and make it absolute, first. Pass the directory to spawnpvech
26552         and posix_spawn_file_actions_addchdir.
26553         * modules/execute (Depends-on): Add canonicalize, filename, findprog-in,
26554         posix_spawn, posix_spawn_file_actions_addchdir.
26555         * tests/test-execute-main.c: Add test for passing a directory.
26556         * tests/test-execute-child.c: Likewise.
26557         * tests/test-execute.sh: Update.
26558         * modules/execute-tests (Depends-on): Add mkdir.
26559         * NEWS: Mention the change.
26560         * lib/csharpcomp.c (compile_csharp_using_sscli): Update.
26561         * lib/csharpexec.c (execute_csharp_using_mono,
26562         execute_csharp_using_sscli): Update.
26563         * lib/javacomp.c (compile_using_envjavac, compile_using_gcj,
26564         compile_using_javac, compile_using_jikes, is_javac_present,
26565         is_jikes_present): Update.
26566         * lib/javaexec.c (execute_java_class): Update.
26568 2020-12-01  Bruno Haible  <bruno@clisp.org>
26570         vma-iter: Add support for macOS11/arm64.
26571         Patch suggested by Hill Ma <maahiuzeon@gmail.com> in
26572         <https://gitlab.com/gnu-clisp/clisp/-/issues/27>
26573         and by Martin Storsjö <martin@martin.st> in
26574         <https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg00003.html>.
26575         * lib/vma-iter.c (vma_iterate): On arm64, use 64-bit type definitions.
26577 2020-12-01  Bruno Haible  <bruno@clisp.org>
26579         spawn-pipe: Fix handling of OS/2 kLIBC.
26580         Reported by KO Myung-Hun <komh78@gmail.com> in
26581         <https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg00005.html>.
26582         * modules/spawn-pipe (configure.ac): Use the common idiom for
26583         recognizing the OS/2 operating system.
26585 2020-11-30  Bruno Haible  <bruno@clisp.org>
26587         execute: Fix uninitialized use of errno.
26588         * lib/execute.c (execute): Preserve errno across several system calls.
26590 2020-11-30  Bruno Haible  <bruno@clisp.org>
26592         access tests: Fix test failure on native Windows.
26593         * tests/test-access.c (main): Change permissions of f2 file before
26594         attempting to remove it.
26596 2020-11-30  Paul Eggert  <eggert@cs.ucla.edu>
26598         faccessat: link with $(LIB_EACCESS)
26599         * modules/faccessat (Link:): Add $(LIB_EACCESS), since this
26600         module depends on euidaccess.
26602 2020-11-30  Bruno Haible  <bruno@clisp.org>
26604         execute, spawn-pipe: Make multithread-safe on native Windows.
26605         * lib/windows-spawn.h: Include <stdint.h>, <windows.h>.
26606         (dup_safer_noinherit, undup_safer_noinherit): Remove declarations.
26607         (spawnpvech): New declaration.
26608         * lib/windows-spawn.c: Include <stdio.h>, <process.h>, findprog.h.
26609         Don't include <unistd.h>, cloexec.h, error.h, gettext.h.
26610         (_): Remove macro.
26611         (dup_noinherit, fd_safer_noinherit, dup_safer_noinherit,
26612         undup_safer_noinherit): Remove functions.
26613         (spawnpvech): New function.
26614         * modules/windows-spawn (Depends-on): Add findprog-in, stdint. Remove
26615         cloexec, dup2, error, gettext-h.
26616         * lib/execute.c: Include msvc-nothrow.h.
26617         (execute) [WIN32]: Use _get_osfhandle, spawnpvech instead of _spawnvpe.
26618         * lib/spawn-pipe.c: Include msvc-nothrow.h.
26619         (create_pipe) [WIN32]: Use _get_osfhandle, DuplicateHandle, spawnpvech
26620         instead of _spawnvpe.
26621         * modules/execute (Depends-on): Add msvc-nothrow.
26622         * modules/spawn-pipe (Depends-on): Likewise.
26624 2020-11-30  Bruno Haible  <bruno@clisp.org>
26626         execute, spawn-pipe: Improve documentation.
26627         * lib/execute.h: Describe progname, prog_path, prog_argv.
26628         * lib/spawn-pipe.h: Likewise.
26630 2020-11-30  Bruno Haible  <bruno@clisp.org>
26632         execute tests: Add more tests.
26633         * tests/test-execute-main.c: Add tests for reading, writing, isatty on
26634         inherited file descriptors >= 3.
26635         * tests/test-execute-child.c: Likewise.
26636         * tests/test-execute.sh: Update.
26638 2020-11-30  Bruno Haible  <bruno@clisp.org>
26640         havelib: Fix for non-ELF platforms (regression 2019-11-17).
26641         Reported by comex <comexk@gmail.com> in
26642         <https://lists.gnu.org/archive/html/bug-gnulib/2020-11/msg00188.html>.
26643         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): On non-ELF platforms,
26644         don't expect an ELF header.
26646 2020-11-29  Akim Demaille  <akim@lrde.epita.fr>
26648         bitset: use integer_length in table implementation
26649         * lib/bitset/table.c (tbitset_list_reverse): Use
26650         BITSET_FOR_EACH_BIT_REVERSE.
26652 2020-11-29  Akim Demaille  <akim@lrde.epita.fr>
26654         bitset: use integer_length in list implementation
26655         * lib/bitset/list.c (lbitset_list_reverse): Use
26656         BITSET_FOR_EACH_BIT_REVERSE.
26658 2020-11-29  Akim Demaille  <akim@lrde.epita.fr>
26660         bitset: use integer_length in vector implementation
26661         * lib/bitset/array.c (vbitset_list_reverse): Use
26662         BITSET_FOR_EACH_BIT_REVERSE.
26664 2020-11-29  Akim Demaille  <akim@lrde.epita.fr>
26666         bitset: use integer_length in array implementation
26667         * modules/bitset (Depends-on): Add integer_length_l.
26668         * lib/bitset/base.h (bitset_fls_, BITSET_FOR_EACH_BIT_REVERSE): New.
26669         * lib/bitset/array.c (abitset_list_reverse): Use it.
26671 2020-11-29  Akim Demaille  <akim@lrde.epita.fr>
26673         bitset: style: use consistent names
26674         * bitset/list.c (lbitset_list_reverse): Rename 'bcount' as 'bitcnt',
26675         and 'boffset' as 'bitoff', for consistency with the other
26676         implementations.
26677         * bitset/table.c (tbitset_list_reverse): Likewise.
26679 2020-11-29  Akim Demaille  <akim@lrde.epita.fr>
26681         bitset: style: sort header
26682         * lib/bitset/base.h (bitset_ffs): Rename as...
26683         (bitset_ffs_): this.
26684         (bitset_ffs_, BITSET_FOR_EACH_BIT): Move to better places.
26686 2020-11-29  Akim Demaille  <akim@lrde.epita.fr>
26688         bitset: tests: check BITSET_FOR_EACH_REVERSE
26689         * tests/test-bitset.c (compare, check_zero, check_one_bit, check_ones):
26690         Check BITSET_FOR_EACH_REVERSE.
26692 2020-11-29  Bruno Haible  <bruno@clisp.org>
26694         spawn-pipe tests: Fix test failure with MSVC.
26695         * tests/test-spawn-pipe-child.c: Include <stdint.h>.
26696         (gl_msvc_invalid_parameter_handler): New function.
26697         (main): Set a global invalid-parameter handler.
26698         * modules/spawn-pipe-tests (Depends-on): Add msvc-inval, stdint.
26700 2020-11-29  Bruno Haible  <bruno@clisp.org>
26702         execute: Add tests.
26703         * tests/test-execute.sh: New file.
26704         * tests/test-execute-main.c: New file.
26705         * tests/test-execute-child.c: New file.
26706         * modules/execute-tests: New file.
26708 2020-11-29  Bruno Haible  <bruno@clisp.org>
26710         fcntl: Work around NetBSD bug with F_DUPFD_CLOEXEC.
26711         * m4/fcntl.m4 (gl_FUNC_FCNTL): Test whether F_DUPFD_CLOEXEC actually
26712         works.
26713         * lib/fcntl.c (rpl_fcntl_DUPFD_CLOEXEC): On NetBSD, use the same
26714         fallback implementation as on Haiku.
26715         * tests/test-fcntl.c (main): Add a test whether F_DUPFD_CLOEXEC is
26716         effective.
26717         * doc/posix-functions/fcntl.texi: Mention the NetBSD bug.
26719 2020-11-29  Bruno Haible  <bruno@clisp.org>
26721         spawn-pipe: Fix build on OS/2 kLIBC (regression 2020-11-28).
26722         * lib/os2-spawn.h: New file, based on lib/windows-spawn.h.
26723         * lib/os2-spawn.c: New file, based on lib/windows-spawn.c.
26724         * lib/spawn-pipe.c: On OS/2 kLIBC, include "os2-spawn.h".
26725         * lib/windows-spawn.c: Remove modifications for kLIBC.
26726         * modules/spawn-pipe (Files): Add the new files.
26727         (configure.ac): Arrange to compile os2-spawn.c on OS/2.
26729 2020-11-28  Bruno Haible  <bruno@clisp.org>
26731         asyncsafe-spin: Fix compilation error with GCC on 32-bit SPARC.
26732         Reported by Paul Eggert in
26733         <https://lists.gnu.org/archive/html/bug-gnulib/2020-11/msg00066.html>.
26734         * m4/sparcv8+.m4: New file.
26735         * modules/sparcv8+: New file.
26736         * modules/asyncsafe-spin (Depends-on): Add sparcv8+.
26738 2020-11-28  Bruno Haible  <bruno@clisp.org>
26740         asyncsafe-spin: Fix build error with GCC on 32-bit SPARC.
26741         * lib/asyncsafe-spin.c: Don't use GCC >= 4.1 primitives on SPARC.
26743 2020-11-28  Bruno Haible  <bruno@clisp.org>
26745         windows-spawn: New module.
26746         * lib/windows-spawn.h: Renamed from lib/w32spawn.h. Remove
26747         implementations.
26748         * lib/windows-spawn.c: Renamed from lib/w32spawn.h.
26749         * modules/windows-spawn: New file.
26750         * lib/execute.c: Include "windows-spawn.h" instead of "w32spawn.h".
26751         * lib/spawn-pipe.c: Likewise.
26752         * modules/execute (Files): Remove lib/w32spawn.h.
26753         (Depends-on): Add windows-spawn. Remove cloexec, msvc-nothrow, strpbrk,
26754         xalloc.
26755         (Makefile.am): Remove w32spawn.h from lib_SOURCES.
26756         * modules/spawn-pipe (Files): Remove lib/w32spawn.h.
26757         (Depends-on): Add windows-spawn. Remove cloexec, msvc-nothrow, strpbrk,
26758         xalloc.
26759         (Makefile.am): Remove w32spawn.h from lib_SOURCES.
26761 2020-11-27  Bruno Haible  <bruno@clisp.org>
26763         ssfmalloc tests: Port to macOS 11.
26764         * tests/test-ssfmalloc.c (PAGESIZE_MAX): Set to 16384, not 8192.
26766 2020-11-26  Bruno Haible  <bruno@clisp.org>
26768         Fix dependencies of modules that use '_exit' on native Windows.
26769         Reported by Jim Meyering in
26770         <https://lists.gnu.org/archive/html/bug-gnulib/2020-11/msg00159.html>.
26771         * modules/_Exit (Depends-on): Add unistd.
26772         * modules/closein (Depends-on): Likewise.
26773         * modules/closeout (Depends-on): Likewise.
26774         * modules/forkpty (Depends-on): Likewise.
26775         * modules/posix_spawn-internal (Depends-on): Likewise.
26776         * modules/savewd (Depends-on): Likewise.
26777         * modules/stat-time-tests (Depends-on): Likewise.
26779 2020-11-26  Bruno Haible  <bruno@clisp.org>
26781         raise-tests: Fix compilation error on MSVC (regression 2020-11-25).
26782         * modules/raise-tests (Depends-on): Add unistd.
26783         * doc/posix-functions/_exit.texi: Mention the 'unistd' module.
26785 2020-11-25  Jim Meyering  <meyering@fb.com>
26787         setlocale-tests: do not trigger gcc's -Wanalyzer-possible-null-argument
26788         * tests/test-setlocale1.c (main): Assert that each strcmp argument is
26789         non-NULL, since we don't bother handing strdup failure.
26791         raise-tests: avoid GCC 11's new exit-from-signal-handler warning
26792         gcc's -Wanalyzer-unsafe-call-within-signal-handler exposed this.
26793         * tests/test-raise.c: Include unistd.h.
26794         (handler): Use _exit, not exit.
26796 2020-11-23  Bruno Haible  <bruno@clisp.org>
26798         Use the correct printf format attribute for mingw.
26799         Reported by Reuben Thomas <rrt@sc3d.org> in
26800         <https://lists.gnu.org/archive/html/bug-gnulib/2020-11/msg00133.html>.
26802         * modules/vfprintf-posix (configure.ac): Define GNULIB_VFPRINTF_POSIX.
26803         * modules/vprintf-posix (configure.ac): Define GNULIB_VPRINTF_POSIX.
26805         * lib/stdio.in.h (_GL_ATTRIBUTE_SPEC_PRINTF_STANDARD,
26806         _GL_ATTRIBUTE_SPEC_PRINTF_SYSTEM): New macros.
26807         (_GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD): Renamed from
26808         _GL_ATTRIBUTE_FORMAT_PRINTF. Use _GL_ATTRIBUTE_SPEC_PRINTF_STANDARD.
26809         (_GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM): Use
26810         _GL_ATTRIBUTE_SPEC_PRINTF_SYSTEM.
26812         * modules/vasnprintf (Depends-on): Add stdio.
26813         * lib/vasnprintf.h: Include <stdio.h>.
26814         (asnprintf, vasnprintf): Use the standard printf format attribute.
26816         * modules/xvasprintf (Depends-on): Add stdio.
26817         * lib/xvasprintf.h: Include <stdio.h>.
26818         (xasprintf, xvasprintf): Use the standard printf format attribute.
26820         * modules/xprintf (Depends-on): List stdio first.
26821         * lib/xprintf.h (xprintf, xvprintf): Use a printf format attribute that
26822         depends on GNULIB_VPRINTF_POSIX.
26823         (xfprintf, xvfprintf): Use a printf format attribute that depends on
26824         GNULIB_VFPRINTF_POSIX.
26826         * modules/c-vasnprintf (Depends-on): Add stdio.
26827         * lib/c-vasnprintf.h: Include <stdio.h>.
26828         (c_vasnprintf): Use the standard printf format attribute.
26830         * modules/c-vasprintf (Depends-on): Add stdio.
26831         * lib/c-vasprintf.h: Include <stdio.h>.
26832         (c_asprintf, c_vasprintf): Use the standard printf format attribute.
26834         * modules/c-vsnprintf (Depends-on): Add stdio.
26835         * lib/c-vsnprintf.h: Include <stdio.h>.
26836         (c_vsnprintf): Use the standard printf format attribute.
26838         * modules/c-snprintf (Depends-on): Add stdio.
26839         * lib/c-snprintf.h: Include <stdio.h>.
26840         (c_snprintf): Use the standard printf format attribute.
26842         * modules/c-xvasprintf (Depends-on): Add stdio.
26843         * lib/c-xvasprintf.h: Include <stdio.h>.
26844         (c_xasprintf, c_xvasprintf): Use the standard printf format attribute.
26846         * modules/error (Depends-on): Depend on stdio always.
26847         * lib/error.h: Include <stdio.h>.
26848         (_GL_ATTRIBUTE_SPEC_PRINTF): Remove macro.
26849         (error, error_at_line): Use a printf format attribute that depends on
26850         GNULIB_VFPRINTF_POSIX.
26851         * lib/error.c (_GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD): Renamed from
26852         _GL_ATTRIBUTE_FORMAT_PRINTF.
26854         * modules/verror (Depends-on): Add stdio.
26855         * lib/verror.h: Include <stdio.h>. Don't include "error.h".
26856         (verror, verror_at_line): Use the standard printf format attribute.
26857         * lib/verror.c: Include "error.h".
26859         * modules/argp (Depends-on): Add stdio.
26860         * lib/argp.h (argp_error, __argp_error, argp_failure, __argp_failure):
26861         Use a printf format attribute that depends on GNULIB_VFPRINTF_POSIX.
26863         * modules/libtextstyle-optional (Depends-on): Add stdio.
26864         * lib/textstyle.in.h (ostream_printf, ostream_vprintf): Use the standard
26865         printf format attribute.
26867         * tests/test-nonblocking-misc.h (dbgfprintf): Use the standard printf
26868         format attribute.
26870 2020-11-23  Pádraig Brady  <P@draigBrady.com>
26872         selinux-at, selinux-h: use const correct declarations
26873         * lib/se-selinux.in.h: Use const for "set" functions,
26874         to match current selinux, and support cleaner user code.
26875         * lib/selinux-at.c: Likewise.
26876         * lib/selinux-at.h: Likewise.
26878 2020-11-22  Paul Eggert  <eggert@cs.ucla.edu>
26880         canonicalize-lgpl: fix memory leak
26881         * lib/canonicalize-lgpl.c (__realpath): Fix unlikely memory leak,
26882         which could have occurred if BUF was so large that malloc was
26883         called.  Do this by allocating EXTRA_BUF and BUF at the same time;
26884         this eliminates the need to free BUF separately.
26886 2020-11-22  Bruno Haible  <bruno@clisp.org>
26888         Fix missing module dependencies to 'xalloc' (regression 2020-10-19).
26889         * modules/xvasprintf (Depends-on): Add xalloc.
26890         * modules/pipe-filter-gi (Depends-on): Likewise.
26891         * modules/execute (Depends-on): Likewise, for w32spawn.h.
26892         * modules/spawn-pipe (Depends-on): Likewise.
26894 2020-11-22  Jose E. Marchesi  <jemarch@gnu.org>
26896         bootstrap: add option hooks
26897         * build-aux/bootstrap (bootstrap_print_option_usage_hook): Define.
26898         (bootstrap_option_hook): Likewise.
26899         (usage): Call bootstrap_print_option_usage_hook.
26901 2020-11-22  Bruno Haible  <bruno@clisp.org>
26903         argp: Don't break getprogname on non-glibc systems.
26904         * m4/argp.m4 (gl_ARGP): Don't expect <argp.h> to exist when testing for
26905         program_invocation_name and program_invocation_short_name.
26907 2020-11-22  Bruno Haible  <bruno@clisp.org>
26909         doc: Document <link.h>.
26910         * doc/glibc-headers/link.texi: New file.
26911         * doc/gnulib.texi: Include it.
26913 2020-11-22  Bruno Haible  <bruno@clisp.org>
26915         doc: Add references to the LSB.
26916         * doc/glibc-functions/*.texi: Add references to LSB 5.0.
26917         * doc/posix-functions/*.texi: Likewise.
26919 2020-11-22  Bruno Haible  <bruno@clisp.org>
26921         doc: Fix a makeinfo warning (regression 2020-11-03).
26922         * doc/posix-functions/aligned_alloc.texi: Add missing @item.
26924 2020-11-21  Paul Eggert  <eggert@cs.ucla.edu>
26926         parse-datetime: fix printf format typo
26927         * lib/parse-datetime.y (parse_datetime2): Fix format typo in
26928         previous patch to this file.  Problem reported by Chris Elvidge in
26929         <https://bugs.gnu.org/44763#32>.
26931         setlocale-null-tests: work around GCC bug 44511
26932         * tests/test-setlocale_null-mt-all.c:
26933         * tests/test-setlocale_null-mt-one.c:
26934         Ignore -Wreturn-type, to work around GCC bug 44511.
26936         nl_langinfo-tests: work around GCC bug 44511
26937         * tests/test-nl_langinfo-mt.c: Ignore -Wreturn-type, to work
26938         around a GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44511>.
26939         Problem reported for GNU grep by Andreas Schwab
26940         <https://bugs.gnu.org/44535>.
26942         selinux-h: add stubs for selabel_open etc.
26943         Coreutils with --enable-gcc-warnings does not build on Ubuntu 20.10
26944         because matchpathcon is deprecated in favor of selabel_open etc.,
26945         so this patch adds stubs for these functions.
26946         * lib/se-label.c, lib/se-label.in.h, m4/selinux-label-h.m4: New files.
26947         * lib/se-selinux.in.h (struct selinux_opt): Add incomplete decl,
26948         as it is needed for selabel_open and selinux/selinux.h declares
26949         this type here.
26950         * modules/selinux-h (Files): Add the new files.
26951         (configure.ac): Add gl_HEADERS_SELINUX_LABEL_H.
26952         (lib_SOURCES): Add se-label.in.h, se-label.c.
26953         (BUILT_SOURCES): Add $(SELINUX_LABEL_H).
26954         (selinux/label.h): New rule, mimicking selinux/context.h.
26955         (MOSTLYCLEANFILES): Add selinux/label.h, selinux/label.h-t.
26956         (Include): Add selinux/label.h.
26958 2020-11-21  Bruno Haible  <bruno@clisp.org>
26960         Update after 'test-driver' in Automake changed.
26961         * build-aux/test-driver.diff: Rebase.
26963 2020-11-21  Daiki Ueno  <ueno@gnu.org>
26965         read-file: remove dead assignment
26966         * lib/read-file.c (fread_file): Remove dead assignment when
26967         RF_SENSITIVE is set, flagged by clang-analyzer.
26969 2020-11-19  Akim Demaille  <akim@lrde.epita.fr>
26971         bitset: tests: exercise the stats too
26973         * tests/test-bitset.c: Display the stats at the end of the test.
26974         * lib/bitset/stats.c (bitset_log_histogram_print): When diplaying the
26975         last bin, display "256-..." rather that "256-511", since the last bin
26976         does count item greater than or equal to 256.
26978 2020-11-19  Akim Demaille  <akim@lrde.epita.fr>
26980         bitset: tests: try harder to break it
26981         * tests/test-bitset.c (compare): Be ready to use bitsets larger than
26982         BITSET_LIST_SIZE.
26983         (main): Likewise.
26984         While at it, also exercise super small bitsets.
26986 2020-11-19  Akim Demaille  <akim@lrde.epita.fr>
26988         bitset: use ffs where possible in the vector implementation
26989         * lib/bitset/vector.c (vbitset_list): Use BITSET_FOR_EACH_BIT.
26991 2020-11-19  Akim Demaille  <akim@lrde.epita.fr>
26993         bitset: use ffs where possible in the table implementation
26994         * lib/bitset/table.c (tbitset_list): Use BITSET_FOR_EACH_BIT.
26996 2020-11-19  Akim Demaille  <akim@lrde.epita.fr>
26998         bitset: check empty and full bitsets
26999         * tests/test-bitset.c (check_zero, check_ones): New.
27000         (check_attributes): Use them.
27002 2020-11-19  Akim Demaille  <akim@lrde.epita.fr>
27004         bitset: be sure to always return a value
27005         * lib/bitset/array.c (abitset_small_list): Always update *next and
27006         return a value.
27008 2020-11-19  Siddhesh Poyarekar  <siddhesh@gotplt.org>
27010         vcs-to-changelog: Expect spaces in file names
27011         Reported by Thierry Bothorel <thierry.bothorel@zaclys.net> in
27012         <https://lists.gnu.org/archive/html/bug-gnulib/2020-11/msg00040.html>,
27013         * build-aux/vcstocl/vcs_git.py (exec_git_cmd): Do not transform
27014         tabs to spaces.
27015         (list_changes): Use tabs to identify file names.
27017 2020-11-17  Akim Demaille  <akim@lrde.epita.fr>
27019         bitset: strengthen tests
27020         * tests/test-bitset.c (compare): Also check count.
27021         Deal only with random values, move the one-bit tests to...
27022         (check_one_bit): this new function.
27023         (check_attributes): Call it.
27025 2020-11-17  Akim Demaille  <akim@lrde.epita.fr>
27027         bitset: fix iteration over table bitsets
27028         * lib/bitset/table.c (tbitset_list): Update bitno when windex is.
27030 2020-11-17  Akim Demaille  <akim@lrde.epita.fr>
27032         bitset: rename internal details for consistency
27033         * lib/bitset/table.c: Rename all the EBITSET_ symbols as TBITSET_.
27035 2020-11-17  Akim Demaille  <akim@lrde.epita.fr>
27037         bitset: test: run deterministic tests on several bitset sizes
27038         * tests/test-bitset.c (check_attributes): Run it with small and large
27039         sizes.
27041 2020-11-17  Akim Demaille  <akim@lrde.epita.fr>
27043         bitset: use ffs where possible in the list implementation
27044         * lib/bitset/list.c (lbitset_list): Use BITSET_FOR_EACH_BIT.
27046 2020-11-17  Akim Demaille  <akim@lrde.epita.fr>
27048         bitset: use ffs where possible in array implementation
27049         * lib/bitset/array.c (abitset_small_list): Use BITSET_FOR_EACH_BIT.
27051 2020-11-17  Bruno Haible  <bruno@clisp.org>
27053         posixcheck: Don't enable GNULIB_POSIXCHECK in C++ mode.
27054         Reported by Tom G. Christensen <tgc@jupiterrise.com> in
27055         <https://lists.gnu.org/archive/html/bug-gnulib/2020-11/msg00062.html>.
27056         * m4/posixcheck.m4 (gl_POSIXCHECK): Don't define GNULIB_POSIXCHECK in
27057         C++ mode.
27059 2020-11-17  Bruno Haible  <bruno@clisp.org>
27061         Fix error when GNULIB_POSIXCHECK is enabled (regression 2019-06-04).
27062         * lib/unistd.in.h (copy_file_range): Don't assume that copy_file_range
27063         is always declared.
27064         * m4/unistd_h.m4 (gl_UNISTD_H): Test whether copy_file_range is
27065         declared.
27067 2020-11-17  Bruno Haible  <bruno@clisp.org>
27069         Fix link errors on AIX.
27070         * modules/clean-temp (Link): Link with $(LIBTHREAD).
27071         * modules/getumask (Link): Link with $(LIBTHREAD).
27072         * modules/getumask-tests (Makefile.am): Link test-getumask with
27073         $(LIBTHREAD).
27074         * modules/supersede (Link): Link with $(LIBTHREAD).
27075         * modules/supersede-tests (Makefile.am): Link test-supersede with
27076         $(LIBTHREAD).
27077         * modules/fatal-signal (Link): New section.
27078         * modules/execute (Link): New section.
27079         * modules/csharpexec (Link): Link with $(LIBTHREAD).
27080         * modules/javaexec (Link): Link with $(LIBTHREAD).
27081         * modules/spawn-pipe (Link): New section.
27082         * modules/spawn-pipe-tests (Makefile.am): Link test-spawn-pipe-main with
27083         $(LIBTHREAD).
27084         * modules/csharpcomp (Link): Link with $(LIBTHREAD).
27085         * modules/javacomp (Link): Link with $(LIBTHREAD).
27086         * modules/javaversion (Link): Link with $(LIBTHREAD).
27087         * modules/pipe-filter-gi (Link): New section.
27088         * modules/pipe-filter-gi-tests (Makefile.am): Link test-pipe-filter-gi1,
27089         test-pipe-filter-gi2-main with $(LIBTHREAD).
27090         * modules/pipe-filter-ii (Link): New section.
27091         * modules/pipe-filter-ii-tests (Makefile.am): Link test-pipe-filter-ii1,
27092         test-pipe-filter-ii2-main with $(LIBTHREAD).
27093         * modules/term-style-control (Link): New section.
27094         * modules/term-style-control-tests (Makefile.am): Link
27095         test-term-style-control-hello, test-term-style-control-yes with
27096         $(LIBTHREAD).
27097         * modules/wait-process (Link): New section.
27098         * modules/nonblocking-pipe-tests (Makefile.am): Link
27099         test-nonblocking-pipe-main with $(LIBTHREAD).
27100         * modules/nonblocking-socket-tests (Makefile.am): Link
27101         test-nonblocking-socket-main with $(LIBTHREAD).
27103 2020-11-16  Bruno Haible  <bruno@clisp.org>
27105         Fix link errors on platforms with libunistring.
27106         * modules/c32isalnum (Link): New section.
27107         * modules/c32isalnum-tests (Makefile.am): Link test-c32isalnum with
27108         $(LIBUNISTRING).
27109         * modules/c32isalpha (Link): New section.
27110         * modules/c32isalpha-tests (Makefile.am): Link test-c32isalpha with
27111         $(LIBUNISTRING).
27112         * modules/c32isblank (Link): New section.
27113         * modules/c32isblank-tests (Makefile.am): Link test-c32isblank with
27114         $(LIBUNISTRING).
27115         * modules/c32iscntrl (Link): New section.
27116         * modules/c32iscntrl-tests (Makefile.am): Link test-c32iscntrl with
27117         $(LIBUNISTRING).
27118         * modules/c32isdigit (Link): New section.
27119         * modules/c32isdigit-tests (Makefile.am): Link test-c32isdigit with
27120         $(LIBUNISTRING).
27121         * modules/c32isgraph (Link): New section.
27122         * modules/c32isgraph-tests (Makefile.am): Link test-c32isgraph with
27123         $(LIBUNISTRING).
27124         * modules/c32islower (Link): New section.
27125         * modules/c32islower-tests (Makefile.am): Link test-c32islower with
27126         $(LIBUNISTRING).
27127         * modules/c32isprint (Link): New section.
27128         * modules/c32isprint-tests (Makefile.am): Link test-c32isprint with
27129         $(LIBUNISTRING).
27130         * modules/c32ispunct (Link): New section.
27131         * modules/c32ispunct-tests (Makefile.am): Link test-c32ispunct with
27132         $(LIBUNISTRING).
27133         * modules/c32isspace (Link): New section.
27134         * modules/c32isspace-tests (Makefile.am): Link test-c32isspace with
27135         $(LIBUNISTRING).
27136         * modules/c32isupper (Link): New section.
27137         * modules/c32isupper-tests (Makefile.am): Link test-c32isupper with
27138         $(LIBUNISTRING).
27139         * modules/c32isxdigit (Link): New section.
27140         * modules/c32isxdigit-tests (Makefile.am): Link test-c32isxdigit with
27141         $(LIBUNISTRING).
27142         * modules/unicodeio (Link): Mention $(LIBUNISTRING).
27143         * modules/unicodeio-tests (Makefile.am): Link test-unicodeio with
27144         $(LIBUNISTRING).
27146 2020-11-16  Bruno Haible  <bruno@clisp.org>
27148         Fix link errors on platforms with libintl (e.g. Solaris and AIX).
27149         Reported by Tom G. Christensen <tgc@jupiterrise.com> in
27150         <https://lists.gnu.org/archive/html/bug-gnulib/2020-11/msg00062.html>.
27151         * modules/getumask-tests (Makefile.am): Link test-getumask with
27152         $(LIBINTL).
27153         * modules/stack-tests (Makefile.am): Link test-stack with $(LIBINTL).
27154         * modules/supersede-tests (Makefile.am): Link test-supersede with
27155         $(LIBINTL).
27156         * modules/unicodeio-tests (Makefile.am): Link test-unicodeio with
27157         $(LIBINTL).
27159 2020-11-16  Bruno Haible  <bruno@clisp.org>
27161         getumask: Document link dependencies.
27162         * modules/getumask (Link): New section.
27164 2020-11-16  Bruno Haible  <bruno@clisp.org>
27166         Update link dependencies in modules after 2020-09-09 change.
27167         * modules/tempname (Link): Add $(LIB_CLOCK_GETTIME).
27168         * modules/mkdtemp (Link): Likewise.
27169         * modules/mkostemp (Link): Likewise.
27170         * modules/mkostemps (Link): Likewise.
27171         * modules/mkstemp (Link): Likewise.
27172         * modules/mkstemps (Link): Likewise.
27173         * modules/supersede (Link): Likewise.
27174         * modules/tmpfile (Link): Likewise.
27175         * modules/tmpfile-safer (Link): Likewise.
27177 2020-11-15  Paul Eggert  <eggert@cs.ucla.edu>
27179         getumask-tests: port to Solaris 10 etc.
27180         Problem reported by Tom Christensen in:
27181         https://lists.gnu.org/r/bug-gnulib/2020-11/msg00062.html
27182         * modules/getumask-tests (test_getumask_LDADD):
27183         Add $(LIB_CLOCK_GETTIME).
27185 2020-11-15  Akim Demaille  <akim@lrde.epita.fr>
27187         bitset: use ffsl to accelerate iterations over set bits
27188         Suggested by Bruno Haible.
27189         * modules/bitset: Depend upon ffsl.
27190         * lib/bitset/base.h (bitset_ffs, BITSET_FOR_EACH_BIT): New.
27191         * lib/bitset/array.c (abitset_list): Use BITSET_FOR_EACH_BIT.
27193 2020-11-15  Akim Demaille  <akim@lrde.epita.fr>
27195         bitset: more tests
27196         * tests/test-bitset.c (compare): Make it clear that the random values
27197         should not be modified.
27198         Check bitset_first, bitset_last and BITSET_FOR_EACH.
27200 2020-11-15  Akim Demaille  <akim@lrde.epita.fr>
27202         bitset: fix the copy from lbitset to other types
27203         * lib/bitset/list.c (lbitset_copy): Rename as...
27204         (lbitset_copy_): this.
27205         (lbitset_copy): New.
27206         Dispatch to heterogeneous/homogeneous copy.
27208 2020-11-15  Akim Demaille  <akim@lrde.epita.fr>
27210         bitset: making debug traces more useful
27211         * lib/bitset.c (bitset_print): Print the bitset type in verbose mode.
27213         bitset: comment changes
27214         * lib/bitset.c: Move some documenting comments to...
27215         * lib/bitset.h: here.
27216         * lib/bitset/array.c: Fix some comments.
27218 2020-11-14  Paul Eggert  <eggert@cs.ucla.edu>
27220         careadlinkat: warn better about GCC bug 93644
27221         * lib/careadlinkat.c (readlink_stk): When --enable-gcc-warnings is
27222         not in effect, use "#warning" to let builders know more clearly
27223         about GCC bug 93644, because the bug triggers even if no -W option
27224         is given to GCC.
27226 2020-11-13  Jim Meyering  <meyering@fb.com>
27228         hard-locale-tests: avoid a -Wstrict-prototypes warning
27229         * tests/locale.c (main): Placate gcc's -Wstrict-prototypes by
27230         changing "main ()" to "main (void)". This was the only case that
27231         triggered a warning when building grep with --enable-gcc-warnings.
27233 2020-11-11  Paul Eggert  <eggert@cs.ucla.edu>
27235         time_rz: simplify CVE-2017-7476 fix
27236         * lib/time_rz.c: Do not include limits.h; I think it was included
27237         under the mistaken impression that limits.h defines SIZE_MAX.
27238         (SIZE_MAX): Remove.
27239         (save_abbr): Put string length into a ptrdiff_t variable,
27240         so that the size comparison works naturally.  This
27241         fixes CVE-2017-7476 in a cleaner way.
27243         parse-datetime: streamline overflow checking
27244         When parse-datetime.y’s overflow code was written, INT_ADD_WRAPV
27245         did not work for unsigned destinations, and since time_t might
27246         be unsigned that meant it did not work for time_t destinations.
27247         This limitation of INT_ADD_WRAPV has been fixed, so we can
27248         now streamline parse-datetime.y a bit.
27249         * lib/parse-datetime.y: Do not include limits.h, as LONG_MAX
27250         has not been used for a while.
27251         (yylex, parse_datetime2): Assume C99 declarations after statements.
27252         (yyles): Use INT_SUBTRACT_WRAPV instead of an explicit comparison
27253         to TYPE_MINIMUM.
27254         (parse_datetime2): No need for time_overflow now that
27255         INT_ADD_WRAPV works for unsigned results.
27257         parse-datetime-tests: port to Alpine Linux 3.12.1
27258         * tests/test-parse-datetime.c: Include errno.h for errno,
27259         and unistd.h for _SC_TZNAME_MAX and sysconf.
27260         (main): In the outlandishly-long time zone abbreviation test,
27261         do not exceed TZNAME_MAX as this has undefined behavior,
27262         and on Alpine Linux 3.12.1 it makes the test fail.
27264 2020-11-09  Pádraig Brady  <P@draigBrady.com>
27266         mgetgroups: avoid warning with clang
27267         * lib/mgetgroups.c: Xcode-12.1 identifies as GCC 4.2.1,
27268         so disable -Wpointer-sign for all clang versions.
27270 2020-11-07  Bruno Haible  <bruno@clisp.org>
27272         gnulib-tool: Fix link error with 'version-etc' (regression 2020-05-29).
27273         Reported by Simon Josefsson in
27274         <https://lists.gnu.org/archive/html/bug-gnulib/2020-11/msg00032.html>.
27275         * gnulib-tool (func_emit_tests_Makefile_am): Add libtests.a to
27276         LDADD a third time, after the second occurrence of ../lib/libgnu.a.
27277         * pygnulib/GLEmiter.py (tests_Makefile_am): Likewise.
27279 2020-11-04  Paul Eggert  <eggert@cs.ucla.edu>
27281         tests: pacify Sun C 5.9
27282         Without these changes, Sun C 5.9 (2009/11/22) issues complaints like
27283         “"test-nl_langinfo-mt.c", line 75: warning: statement not reached”.
27284         * tests/test-nl_langinfo-mt.c (thread1_func, thread2_func)
27285         (thread3_func, thread4_func, thread5_func, thread6_func, threadN_func):
27286         * tests/test-setlocale_null-mt-all.c (thread1_func, thread2_func):
27287         * tests/test-setlocale_null-mt-one.c (thread1_func, thread2_func):
27288         Remove unreachable ‘return NULL;’s.
27290         tests: port better to XLC 12.01
27291         * tests/test-argmatch.c (CHECK): Do not use -1 as a subscript,
27292         even in code that is not executed, as IBM XLC 12.01 complains "The
27293         subscript -1 is less than zero."
27294         * tests/test-stdint.c (verify_width): Pass an (unused) 3rd
27295         argument to _GL_VERIFY, as ISO C requires.  Otherwise, IBM XLC
27296         12.01 complains "The invocation of macro _GL_VERIFY contains fewer
27297         arguments than are required by the macro definition."
27299 2020-11-03  Bruno Haible  <bruno@clisp.org>
27301         aligned-malloc: Use fixes from the new modules.
27302         * modules/aligned-malloc (Depends-on): Add posix_memalign,
27303         aligned_alloc, memalign.
27304         (configure.ac): Use AC_CHECK_FUNCS_ONCE.
27306 2020-11-03  Bruno Haible  <bruno@clisp.org>
27308         aligned_alloc: Add tests.
27309         * tests/test-aligned_alloc.c: New file.
27310         * modules/aligned_alloc-tests: New file.
27312         aligned_alloc: New module.
27313         * lib/stdlib.in.h (aligned_alloc): New declaration.
27314         * lib/aligned_alloc.c: New file.
27315         * m4/aligned_alloc.m4: New file.
27316         * m4/stdlib_h.m4 (gl_STDLIB_H): Test whether aligned_alloc is declared.
27317         (gl_STDLIB_H_DEFAULTS): Initialize GNULIB_ALIGNED_ALLOC,
27318         HAVE_ALIGNED_ALLOC, REPLACE_ALIGNED_ALLOC.
27319         * modules/stdlib (Makefile.am): Substitute GNULIB_ALIGNED_ALLOC,
27320         HAVE_ALIGNED_ALLOC, REPLACE_ALIGNED_ALLOC.
27321         * modules/aligned_alloc: New file.
27322         * tests/test-stdlib-c++.cc (aligned_alloc): Check signature.
27323         * doc/posix-functions/aligned_alloc.texi: Mention the new module and the
27324         AIX bug.
27326 2020-11-03  Bruno Haible  <bruno@clisp.org>
27328         posix_memalign: Add tests.
27329         * tests/test-posix_memalign.c: New file.
27330         * modules/posix_memalign-tests: New file.
27332         posix_memalign: New module.
27333         * lib/stdlib.in.h (posix_memalign): New declaration.
27334         * lib/posix_memalign.c: New file.
27335         * m4/posix_memalign.m4: New file.
27336         * m4/stdlib_h.m4 (gl_STDLIB_H): Test whether posix_memalign is declared.
27337         (gl_STDLIB_H_DEFAULTS): Initialize GNULIB_POSIX_MEMALIGN,
27338         HAVE_POSIX_MEMALIGN, REPLACE_POSIX_MEMALIGN.
27339         * modules/stdlib (Makefile.am): Substitute GNULIB_POSIX_MEMALIGN,
27340         HAVE_POSIX_MEMALIGN, REPLACE_POSIX_MEMALIGN.
27341         * modules/posix_memalign: New file.
27342         * tests/test-stdlib-c++.cc (posix_memalign): Check signature.
27343         * doc/posix-functions/posix_memalign.texi: Mention the new module and
27344         the OpenBSD bug.
27346 2020-11-03  Bruno Haible  <bruno@clisp.org>
27348         memalign: Add tests.
27349         * tests/test-memalign.c: New file.
27350         * modules/memalign-tests: New file.
27352         memalign: New module.
27353         * modules/memalign: New file.
27354         * doc/glibc-functions/memalign.texi: Mention the new module.
27356 2020-11-03  Bruno Haible  <bruno@clisp.org>
27358         verify tests: Fix crash with GCC (regression 2020-11-02).
27359         * tests/test-verify.c (main): Fix initializer of s.
27361 2020-11-03  Pádraig Brady  <P@draigBrady.com>
27363         mountlist: recognize more file system types as remote
27365         * lib/mountlist.c (ME_REMOTE): Sync previously unconsidered
27366         "remote" file systems from stat.c in coreutils.
27368 2020-11-02  Bernhard Voelker  <mail@bernhard-voelker.de>
27370         verify tests: Fix -Wuninitialized warning (regression 2020-10-30).
27371         * tests/test-verify.c (main): Initialize state variable.
27372         Reported by Bruno Haible for GCC 5.4.0.
27374 2020-11-02  Paul Eggert  <eggert@cs.ucla.edu>
27376         dfa.h: support inclusion from C++
27377         * lib/dfa.h: Allow multiple inclusion, and inclusion from
27378         C++ code.  The latter was suggested by Arnold Robbins.
27380 2020-11-01  Bruno Haible  <bruno@clisp.org>
27382         ssfmalloc tests: Portability to Linux/PowerPC and Linux/SPARC.
27383         * tests/test-ssfmalloc.c: Include <limits.h>.
27384         (PAGESIZE_MAX): Set to 65536 on Linux/PowerPC.
27386 2020-11-01  Bruno Haible  <bruno@clisp.org>
27388         verify tests: Fix compilation error with MSVC (regression 2020-10-30).
27389         * tests/test-verify.c (test_assume_noreturn): Fix declaration.
27391 2020-11-01  Jim Meyering  <meyering@fb.com>
27393         dfa-tests: test for today's invalid-merge fix
27394         * tests/test-dfa-invalid-merge.sh: New file.
27395         * modules/dfa-tests (Files): Add it.
27396         (TESTS): Add it.
27398 2020-11-01  Norihiro Tanaka  <noritnk@kcn.ne.jp>
27400         dfa: retain sequences of similar nodes in optimization
27401         DFA was merging similar nodes when it should not.  For example,
27402         it would convert a+a+a to a+a.  Now, a sequence of similar nodes
27403         is not merged.  Problem reported by Gonzalo Padrino in
27404         https://bugs.gnu.org/44351
27405         * lib/dfa.c (merge_nfa_state): Skip the follow for repetition in
27406         optimization.
27408 2020-11-01  Jim Meyering  <meyering@fb.com>
27410         test-dfa-match-aux.c: accept EREs, not BREs
27411         * tests/test-dfa-match-aux.c (main): Specify RE_SYNTAX_EGREP, not
27412         RE_SYNTAX_GREP, so tests can use ERE syntax rather than BRE.
27414 2020-10-30  Bernhard Voelker  <mail@bernhard-voelker.de>
27416         verify tests: avoid -Wmissing-declarations warnings
27417         * tests/test-verify.c (test_assume_expressions): Add declaration.
27418         (test_assume_optimization): Likewise.
27419         (test_assume_noreturn): Likewise.
27420         (main): Move down after all other definitions.  While at it, also
27421         call test_assume_expressions and test_assume_optimization as a
27422         runtime check.
27424 2020-10-26  Paul Eggert  <eggert@cs.ucla.edu>
27426         sys_stat: update comments for S_IRWXUGO, S_IXUGO
27427         * lib/sys_stat.in.h (S_IXUGO, S_IRWXUGO): Update comments.
27428         Perhaps these macros should be removed, as they’re not in either
27429         POSIX or GNU.  They could be moved to stat-macros.h, which would
27430         be cleaner in some sense.
27432 2020-10-25  Bruno Haible  <bruno@clisp.org>
27434         ssfmalloc tests: Small tweaks.
27435         * tests/test-ssfmalloc.c: Add comments.
27436         (alloc_pages): Don't require PROT_EXEC bits.
27437         (block_sizes): Add more small sizes, for better coverage of
27438         ssfmalloc-bitmap.h.
27440         ssfmalloc tests: Portability to Minix.
27441         * modules/ssfmalloc-tests (Files): Add m4/mmap-anon.m4.
27442         (configure.ac): Invoke gl_FUNC_MMAP_ANON.
27443         * m4/mmap-anon.m4: Update comment.
27445         ssfmalloc: Portability to AIX.
27446         * modules/ssfmalloc (Include): Add ssfmalloc.h.
27447         (Link): New section.
27448         * modules/ssfmalloc-tests (Makefile.am): Link test-ssfmalloc with
27449         $(LIBTHREAD).
27451         ssfmalloc: Portability to Cygwin.
27452         * lib/ssfmalloc.h: Add parameter PAGESIZE_MAX.
27453         (pg_offset_t): Define depending on PAGESIZE_MAX.
27454         * tests/test-ssfmalloc.c: Undefine PAGESIZE.
27455         (PAGESIZE_MAX): New macro.
27457         ssfmalloc: Fix buffer overrun in bitmap search.
27458         * lib/ssfmalloc-bitmap.h (find_first_packet_set): Don't access the
27459         word *words_end.
27461 2020-10-24  Paul Eggert  <eggert@cs.ucla.edu>
27463         doc: mention ‘restrict’ and C++
27464         * doc/gnulib-readme.texi (C99 features assumed): Document
27465         that ‘restrict’ should be avoided in C++ code.
27467 2020-10-20  Bernhard Voelker  <mail@bernhard-voelker.de>
27469         selinux-at, selinux-h: port to SELinux 3.1
27470         The new release finally deprecated the typedef 'security_context_t',
27471         see <https://github.com/SELinuxProject/selinux/commit/7a124ca275>.
27472         Use the simpler 'char *' instead.
27473         * lib/getfilecon.c (getfilecon): Adjust type of context parameter.
27474         (lgetfilecon): Likewise.
27475         (fgetfilecon): Likewise.
27476         (map_to_failure): Likewise.
27477         (rpl_getfilecon): Likewise.
27478         (rpl_lgetfilecon): Likewise.
27479         (rpl_fgetfilecon): Likewise.
27480         * lib/se-selinux.in.h (security_context_t): Remove typedef.
27481         (getcon): Adjust type of context parameter.
27482         (freecon): Likewise.
27483         (getfscreatecon): Likewise.
27484         (setfscreatecon): Likewise.
27485         (matchpathcon): Likewise.
27486         (getfilecon): Likewise.
27487         (lgetfilecon): Likewise.
27488         (fgetfilecon): Likewise.
27489         (setfilecon): Likewise.
27490         (lsetfilecon): Likewise.
27491         (fsetfilecon): Likewise.
27492         (security_check_context): Likewise.
27493         (security_check_context_raw): Likewise.
27494         (setexeccon): Likewise.
27495         (security_compute_create): Likewise.
27496         * lib/selinux-at.c (getfileconat): Likewise.
27497         (lgetfileconat): Likewise.
27498         (setfileconat): Likewise.
27499         (lsetfileconat): Likewise.
27500         * lib/selinux-at.h: Likewise.
27502 2020-10-19  Bruno Haible  <bruno@clisp.org>
27504         xalloc-die: Fix link error with Solaris cc (regression 2020-07-27).
27505         * lib/xalloc.h (xalloc_die): Don't declare if GNULIB_XALLOC_DIE is 0.
27506         (xmalloc, xzalloc, xcalloc, xrealloc, x2realloc, xmemdup, xstrdup,
27507         XMALLOC, XNMALLOC, XZALLOC, XCALLOC, xnmalloc, xnrealloc, x2nrealloc,
27508         xcharalloc): Don't declare/define if GNULIB_XALLOC is 0.
27509         * modules/xalloc (configure.ac): Define GNULIB_XALLOC.
27510         * modules/xalloc-die (configure.ac): Define GNULIB_XALLOC_DIE.
27512 2020-10-18  Bruno Haible  <bruno@clisp.org>
27514         ssfmalloc: Add tests.
27515         * tests/test-ssfmalloc.c: New file.
27516         * modules/ssfmalloc-tests: New file.
27518         ssfmalloc: New module.
27519         * lib/ssfmalloc.h: New file.
27520         * lib/ssfmalloc-bitmap.h: New file.
27521         * modules/ssfmalloc: New file.
27523 2020-10-18  Bruno Haible  <bruno@clisp.org>
27525         wchar: Fix configure test result on some versions of AIX.
27526         Reported by Clément Chigot <clement.chigot@atos.net> in
27527         <https://lists.gnu.org/archive/html/bug-gnulib/2020-10/msg00115.html>.
27528         * m4/wchar_h.m4 (gl_WCHAR_H_INLINE_OK): Execute the test only on glibc
27529         systems.
27531 2020-10-18  Bruno Haible  <bruno@clisp.org>
27533         time: Fix warning about asctime when asctime is not used.
27534         * lib/time.in.h (asctime_r, ctime, ctime_r): Fix _GL_WARN_ON_USE
27535         invocation.
27537 2020-10-18  Bruno Haible  <bruno@clisp.org>
27539         *-list, *-oset, *-omap: Avoid a GCC warning (regression 2020-10-10).
27540         * lib/gl_anylinked_list2.h (gl_linked_iterator_free): Remove
27541         '_GL_ATTRIBUTE_CONST'.
27542         * lib/gl_anytree_list2.h (gl_tree_iterator_free): Likewise.
27543         * lib/gl_anytree_omap.h (gl_tree_iterator_free): Likewise.
27544         * lib/gl_anytree_oset.h (gl_tree_iterator_free): Likewise.
27545         * lib/gl_array_list.c (gl_array_iterator_free): Likewise.
27546         * lib/gl_array_omap.c (gl_array_iterator_free): Likewise.
27547         * lib/gl_array_oset.c (gl_array_iterator_free): Likewise.
27548         * lib/gl_carray_list.c (gl_carray_iterator_free): Likewise.
27550 2020-10-18  Bruno Haible  <bruno@clisp.org>
27552         obstack: Fix a clang warning.
27553         * lib/obstack.c (print_and_abort): Mark as __attribute_noreturn__.
27555 2020-10-16  Bruno Haible  <bruno@clisp.org>
27557         hash: Rename hash_delete to hash_remove.
27558         * lib/hash.h (hash_remove): Renamed from hash_delete.
27559         (hash_delete): New declaration.
27560         * lib/hash.c (hash_remove): Renamed from hash_delete.
27561         (hash_delete): New function.
27562         * tests/test-hash.c (main): Update.
27563         * lib/fts-cycle.c (leave_dir): Likewise.
27564         * NEWS: Mention the change.
27566 2020-10-16  Bruno Haible  <bruno@clisp.org>
27568         hash, xhash: Make usable from C++.
27569         * lib/hash.h: Add extern "C".
27571 2020-10-16  Bruno Haible  <bruno@clisp.org>
27573         hash, xhash: Move comments to the .h file.
27574         * lib/hash.c: Move comments meant for the user from here...
27575         * lib/xhash.c: ... and here...
27576         * lib/hash.h: ... to here.
27578 2020-10-13  Philipp Klaus Krause  <pkk@spth.de>  (tiny change)
27580         Don't declare an intention to modify the return value of strerror.
27581         * tests/test-perror2.c (main): Assign the return value of strerror to a
27582         'const char *' variable.
27584 2020-10-11  Bruno Haible  <bruno@clisp.org>
27586         *printf: Avoid "expanded before it was required" warning.
27587         * m4/printf.m4 (gl_SNPRINTF_TRUNCATION_C99): Define through
27588         AC_DEFUN_ONCE.
27590 2020-10-11  Benji Wiebe  <benjiwiebe14@gmail.com>
27592         getprogname: Add support for OpenServer 6 and UnixWare 7.
27593         * lib/getprogname.c: Include <fcntl.h>, <stdlib.h>, <string.h>.
27594         (getprogname): On OpenServer6 and UnixWare, read /proc/<pid>/cmdline.
27596 2020-10-11  Bruno Haible  <bruno@clisp.org>
27598         tests: Avoid a name clash on UnixWare.
27599         Reported by Tim Rice <tim@multitalents.net> in
27600         <https://lists.gnu.org/archive/html/bug-gnulib/2020-02/msg00025.html>.
27601         * tests/nap.h (nap): Define as gl_nap on OpenServer and UnixWare.
27603 2020-10-11  Bruno Haible  <bruno@clisp.org>
27605         stdioext: Update comments regarding UnixWare.
27606         Reported by Tim Rice <tim@multitalents.net> in
27607         <https://lists.gnu.org/archive/html/bug-gnulib/2020-10/msg00005.html>.
27608         * lib/fbufmode.c: Update comments.
27609         * lib/fflush.c: Likewise.
27610         * lib/fpending.c: Likewise.
27611         * lib/fpurge.c: Likewise.
27612         * lib/freadable.h: Likewise.
27613         * lib/freadable.c: Likewise.
27614         * lib/freadahead.c: Likewise.
27615         * lib/freading.h: Likewise.
27616         * lib/freading.c: Likewise.
27617         * lib/freadptr.c: Likewise.
27618         * lib/freadseek.c: Likewise.
27619         * lib/fseeko.c: Likewise.
27620         * lib/fseterr.c: Likewise.
27621         * lib/fwritable.h: Likewise.
27622         * lib/fwritable.c: Likewise.
27623         * lib/fwriting.h: Likewise.
27624         * lib/fwriting.c: Likewise.
27626 2020-10-11  Bruno Haible  <bruno@clisp.org>
27628         stdioext: Treat OpenServer 6 and UnixWare 7 like OpenServer 5.
27629         Reported by Tim Rice <tim@multitalents.net> in
27630         <https://lists.gnu.org/archive/html/bug-gnulib/2020-10/msg00005.html>.
27631         Uses the info from
27632         <https://lists.gnu.org/archive/html/bug-gnulib/2020-10/msg00028.html>.
27633         * lib/stdio-impl.h: Test also __SCO_VERSION__ and __sysv5__.
27635 2020-10-11  Bruno Haible  <bruno@clisp.org>
27637         stdioext: Avoid compilation errors on UnixWare 7.
27638         Reported by Tim Rice <tim@multitalents.net> in
27639         <https://lists.gnu.org/archive/html/bug-gnulib/2020-09/msg00127.html>.
27640         * lib/fbufmode.c: Don't include <stdio_ext.h> if it does not exist.
27641         * lib/fpurge.c: Likewise.
27642         * lib/freadable.h: Likewise.
27643         * lib/freading.h: Likewise.
27644         * lib/fwritable.h: Likewise.
27645         * lib/fwriting.h: Likewise.
27646         * m4/fbufmode.m4 (gl_FUNC_FBUFMODE): Test whether <stdio_ext.h> exists.
27647         * m4/fpurge.m4 (gl_FUNC_FPURGE): Likewise.
27648         * m4/freadable.m4 (gl_FUNC_FREADABLE): Likewise.
27649         * m4/freading.m4 (gl_FUNC_FREADING): Likewise.
27650         * m4/fwritable.m4 (gl_FUNC_FWRITABLE): Likewise.
27651         * m4/fwriting.m4 (gl_FUNC_FWRITING): Likewise.
27653 2020-10-11  Bruno Haible  <bruno@clisp.org>
27655         stdioext: Update comments regarding Cygwin.
27656         * lib/fpending.c: Update comments.
27657         * lib/fpurge.c: Likewise.
27658         * lib/freadable.h: Likewise.
27659         * lib/freadable.c: Likewise.
27660         * lib/freading.h: Likewise.
27661         * lib/freading.c: Likewise.
27662         * lib/fwritable.h: Likewise.
27663         * lib/fwritable.c: Likewise.
27664         * lib/fwriting.h: Likewise.
27665         * lib/fwriting.c: Likewise.
27667 2020-10-11  KO Myung-Hun  <komh78@gmail.com>
27669         Fix "warning: implicit declaration of function 'pthread_sigmask'".
27670         * lib/signal.in.h [__KLIBC__]: Include <pthread.h>.
27671         * lib/sys_select.in.h [__KLIBC__]: Do not include <signal.h>.
27673 2020-10-10  Bruno Haible  <bruno@clisp.org>
27675         *-list, *-oset, *-omap: Avoid possible compiler warnings.
27676         Reported by Marc Nieper-Wißkirchen in
27677         <https://lists.gnu.org/r/bug-gnulib/2020-10/msg00025.html>.
27678         * lib/gl_anylinked_list2.h (gl_linked_iterator,
27679         gl_linked_iterator_from_to): Mark as 'pure'.
27680         (gl_linked_iterator_free): Mark as 'const'.
27681         * lib/gl_anytree_list2.h (gl_tree_size, gl_tree_node_value,
27682         gl_tree_search_from_to, gl_tree_indexof_from_to, gl_tree_iterator,
27683         gl_tree_iterator_from_to, gl_tree_sortedlist_search,
27684         gl_tree_sortedlist_search_from_to, gl_tree_sortedlist_indexof,
27685         gl_tree_sortedlist_indexof_from_to): Mark as 'pure'.
27686         (gl_tree_iterator_free): Mark as 'const'.
27687         * lib/gl_anytree_omap.h (gl_tree_size, gl_tree_iterator): Mark as
27688         'pure'.
27689         (gl_tree_iterator_free): Mark as 'const'.
27690         * lib/gl_anytree_oset.h (gl_tree_size, gl_tree_next_node,
27691         gl_tree_prev_node, gl_tree_iterator): Mark as 'pure'.
27692         (gl_tree_iterator_free): Mark as 'const'.
27693         * lib/gl_anytreehash_list1.h (node_position, compare_by_position,
27694         compare_position_threshold): Mark as 'pure'.
27695         * lib/gl_array_list.c (gl_array_size, gl_array_indexof_from_to,
27696         gl_array_search_from_to, gl_array_iterator, gl_array_iterator_from_to,
27697         gl_array_sortedlist_indexof_from_to, gl_array_sortedlist_indexof,
27698         gl_array_sortedlist_search_from_to, gl_array_sortedlist_search): Mark as
27699         'pure'.
27700         (gl_array_iterator_free): Mark as 'const'.
27701         * lib/gl_array_omap.c (gl_array_size, gl_array_indexof, gl_array_search,
27702         gl_array_search_atleast, gl_array_iterator): Mark as 'pure'.
27703         (gl_array_iterator_free): Mark as 'const'.
27704         * lib/gl_array_oset.c (gl_array_size, gl_array_indexof, gl_array_search,
27705         gl_array_indexof_atleast, gl_array_search_atleast, gl_array_iterator,
27706         gl_array_iterator_atleast): Mark as 'pure'.
27707         (gl_array_iterator_free): Mark as 'const'.
27708         * lib/gl_carray_list.c (gl_carray_size, gl_carray_node_value,
27709         gl_carray_next_node, gl_carray_previous_node, gl_carray_get_at,
27710         gl_carray_indexof_from_to, gl_carray_search_from_to, gl_carray_iterator,
27711         gl_carray_iterator_from_to, gl_carray_sortedlist_indexof_from_to,
27712         gl_carray_sortedlist_indexof, gl_carray_sortedlist_search_from_to,
27713         gl_carray_sortedlist_search): Mark as 'pure'.
27714         (gl_carray_iterator_free): Mark as 'const'.
27716 2020-10-10  Bruno Haible  <bruno@clisp.org>
27718         rbtree-list: Avoid possible compiler warnings.
27719         This mirrors the change of avltree-list on 2014-09-16.
27720         * lib/gl_rbtree_list.c (gl_rbtree_list_check_invariants): Add extern
27721         declaration. Add cast to void for ignored value of check_invariants.
27723 2020-10-10  Marc Nieper-Wißkirchen  <marc@nieper-wisskirchen.de>
27725         stack: New module.
27726         * MODULES.html.sh: Add entry for the stack module.
27727         * modules/stack: New file.
27728         * modules/stack-tests: New file.
27729         * lib/stack.h: New file.
27730         * tests/test-stack.c: New file.
27732 2020-10-10  Paul Eggert  <eggert@cs.ucla.edu>
27734         attribute: improve const, pure doc
27735         Problem reported by Marc Nieper-Wißkirchen in:
27736         https://lists.gnu.org/r/bug-gnulib/2020-10/msg00035.html
27737         * lib/attribute.h (ATTRIBUTE_CONST, ATTRIBUTE_PURE): Improv doc.  See:
27738         https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51971#c1
27740 2020-10-05  Paul Eggert  <eggert@cs.ucla.edu>
27742         thread: pacify GCC on Solaris 10
27743         Problem reported by Kiyoshi KANAZAWA for grep (Bug#43666#29).
27744         * lib/glthread/thread.h (gl_thread_self): Use ‘(pthread_t) 0’
27745         instead of ‘(pthread_t) NULL’, to pacify GCC on Solaris 10
27746         where pthread_t is unsigned int.
27748 2020-10-04  Paul Eggert  <eggert@cs.ucla.edu>
27750         c-stack: avoid AS_IF
27751         Problem reported by Bruno Haible in:
27752         https://lists.gnu.org/r/bug-gnulib/2020-10/msg00018.html
27753         * m4/c-stack.m4 (gl_PREREQ_C_STACK): No need for AS_IF.
27755         c-stack: pacify GCC 9.3.1 when using libsigsegv
27756         * lib/c-stack.c [USE_LIBSIGSEGV]: Disable --suggest-attribute=pure.
27758 2020-10-04  Bruno Haible  <bruno@clisp.org>
27760         localename: Fix a couple of "unused parameter" warnings.
27761         Reported by Marc Nieper-Wißkirchen <marc@nieper-wisskirchen.de> in
27762         <https://lists.gnu.org/archive/html/bug-gnulib/2020-10/msg00014.html>.
27763         * lib/localename.c (gl_locale_name_thread_unsafe, gl_locale_name_thread,
27764         gl_locale_name_posix, gl_locale_name_environ): Add _GL_UNUSED in
27765         parameter list.
27767 2020-10-04  Bruno Haible  <bruno@clisp.org>
27769         vasnprintf: Don't use %n on modern, ISO C 99 compliant platforms.
27770         Suggested by Jeremie Courreges-Anglas <jca@wxcvbn.org> in
27771         <https://lists.gnu.org/archive/html/bug-gnulib/2020-10/msg00010.html>.
27772         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Define
27773         HAVE_SNPRINTF_TRUNCATION_C99.
27774         * lib/vasnprintf.c (VASNPRINTF): Don't use %n if
27775         HAVE_SNPRINTF_RETVAL_C99 && HAVE_SNPRINTF_TRUNCATION_C99.
27777 2020-10-03  Paul Eggert  <eggert@cs.ucla.edu>
27779         c-stack: streamline Solaris configuration
27780         * lib/c-stack.c: Omit mention of HAVE_SIGALTSTACK, since
27781         the code is used only if a test for sigaltstack worked
27782         in some other way.
27783         * m4/c-stack.m4 (gl_PREREQ_C_STACK): Do not require gl_LIBSIGSEGV;
27784         instead, execute gl_LIBSIGSEGV only if needed (because the XSI
27785         heuristic does not work).
27786         * modules/c-stack (Files): Add m4/libsigsegv.m4, since
27787         we no longer require the libsigsegv module.
27788         (Depends-on): Depend on havelib, not libsigsegv.
27790         c-stack: stop using SIGSTKSZ
27791         It’s been proposed to stop making SIGSTKSZ an integer constant:
27792         https://sourceware.org/pipermail/libc-alpha/2020-September/118028.html
27793         Also, using SIGSTKSZ in #if did not conform to current POSIX.
27794         Also, avoiding SIGSTKSZ makes the code simpler and easier to grok.
27795         * lib/c-stack.c (SIGSTKSZ): Remove.
27796         (alternate_signal_stack): Now a 64 KiB array, for simplicity.
27797         All uses changed.
27799         c-stack: fix libsigsegv typo
27800         Problem reported by Bruno Haible in:
27801         https://lists.gnu.org/r/bug-gnulib/2020-09/msg00175.html
27802         * lib/c-stack.c (USE_LIBSIGSEGV): Fix typo that caused libsigsegv
27803         to be used only on Solaris (exactly where it is not needed!).
27805 2020-10-03  Thien-Thi Nguyen  <ttn@gnuvola.org>
27807         MODULES.html.sh: Fix typo.
27808         * MODULES.html.sh (Numeric conversion functions <stdlib.h>): Fix typo.
27810 2020-09-28  Paul Eggert  <eggert@cs.ucla.edu>
27812         version-etc: pacify Oracle Studio 12.6
27813         Without this patch, it complains: "version-etc.h", line 64:
27814         warning: token-less macro argument (E_TOKENLESS_MACRO)" when in
27815         pedantic mode.
27816         * lib/version-etc.h (version_etc): Port to C89 macro rules.
27818 2020-09-27  Bruno Haible  <bruno@clisp.org>
27820         Avoid "warning: The macro `AC_DECL_SYS_SIGLIST' is obsolete".
27821         Reported by Gavin Smith <gavinsmith0123@gmail.com> in
27822         <https://lists.gnu.org/archive/html/bug-gnulib/2020-09/msg00154.html>.
27823         * m4/strsignal.m4 (gl_PREREQ_STRSIGNAL): Check for sys_siglist
27824         ourselves; don't use AC_DECL_SYS_SIGLIST.
27826 2020-09-27  Bruno Haible  <bruno@clisp.org>
27828         Avoid "warning: The macro `_AC_COMPUTE_INT' is obsolete".
27829         Reported by Gavin Smith <gavinsmith0123@gmail.com> in
27830         <https://lists.gnu.org/archive/html/bug-gnulib/2020-09/msg00154.html>.
27831         * m4/gethostname.m4 (gl_PREREQ_HOST_NAME_MAX): Use AC_COMPUTE_INT
27832         instead of _AC_COMPUTE_INT.
27834 2020-09-27  Bruno Haible  <bruno@clisp.org>
27836         Avoid "warning: The macro `AC_HEADER_STDC' is obsolete".
27837         Reported by Gavin Smith <gavinsmith0123@gmail.com> in
27838         <https://lists.gnu.org/archive/html/bug-gnulib/2020-09/msg00154.html>.
27839         Based on a patch by Paul Eggert.
27840         * m4/malloc.m4 (_AC_FUNC_MALLOC_IF): Don't require AC_HEADER_STDC. Don't
27841         test STDC_HEADERS. Assume <stdlib.h> exists.
27842         * m4/realloc.m4 (_AC_FUNC_REALLOC_IF): Likewise.
27844 2020-09-27  Bruno Haible  <bruno@clisp.org>
27846         Enable testing of prereleases of Autoconf 2.70.
27847         Suggested by Paul Eggert in
27848         <https://lists.gnu.org/archive/html/bug-gnulib/2020-09/msg00160.html>.
27849         * m4/alloca.m4 (_AC_LIBOBJ_ALLOCA): Test for Autoconf >= 2.69c, not
27850         >= 2.70.
27851         * m4/largefile.m4 (AC_SYS_LARGEFILE): Likewise.
27852         * m4/pid_t.m4 (AC_TYPE_PID_T): Likewise.
27853         * m4/sys_types_h.m4 (AC_HEADER_MAJOR): Likewise.
27855 2020-09-27  Bruno Haible  <bruno@clisp.org>
27857         Avoid "warning: The macro `AC_PROG_CC_STDC' is obsolete".
27858         Reported by Gavin Smith <gavinsmith0123@gmail.com> in
27859         <https://lists.gnu.org/archive/html/bug-gnulib/2020-09/msg00151.html>.
27860         * m4/gnulib-common.m4 (gl_PROG_CC_C99): Use AC_PROG_CC_C99 or
27861         AC_PROG_CC, depending on the Autoconf version.
27863 2020-09-27  Gavin Smith  <gavinsmith0123@gmail.com>
27865         Avoid "warning: The macro `AC_HELP_STRING' is obsolete".
27866         * m4/threadlib.m4 (gl_THREADLIB_EARLY_BODY): Use AS_HELP_STRING instead
27867         of AC_HELP_STRING.
27868         * m4/libgcrypt.m4 (AM_PATH_LIBGCRYPT): Likewise.
27870 2020-09-27  Bruno Haible  <bruno@clisp.org>
27872         Avoid "warning: $as_echo_n is obsolete" from autoconf 2.69c.
27873         Reported by Gavin Smith <gavinsmith0123@gmail.com> in
27874         <https://lists.gnu.org/archive/html/bug-gnulib/2020-09/msg00151.html>.
27875         * m4/gnulib-common.m4 (gl_CACHE_VAL_SILENT): Use gl_SILENT.
27877 2020-09-27  Bruno Haible  <bruno@clisp.org>
27879         extensions: Simplify last commit.
27880         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Don't require
27881         AC_GNU_SOURCE ever.
27883 2020-09-26  Paul Eggert  <eggert@cs.ucla.edu>
27885         extensions: require AC_GNU_SOURCE only for <=2.63
27886         Problem reported by Gavin Smith in:
27887         https://lists.gnu.org/r/autoconf/2020-09/msg00012.html
27888         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS):
27889         Require AC_GNU_SOURCE only for Autoconf 2.63 and earlier, since it
27890         shouldn’t be needed after that, and Autoconf 2.70 complains about
27891         it being obsolete.
27893 2020-09-26  Bruno Haible  <bruno@clisp.org>
27895         regex-tests: Make test more robust.
27896         * tests/test-regex.c (main): Make sure to revert the locale to "C" after
27897         the test in "tr_TR.UTF-8" locale. Exit if we can't revert it.
27899 2020-09-25  Paul Eggert  <eggert@cs.ucla.edu>
27901         regex-tests: fix possible Turkish false-alarm
27902         * modules/regex-tests (Depends-on): Add wctype-h.
27903         * tests/test-regex.c: Include wctype.h.
27904         (main): Check that ‘i’ uppercases to ‘İ’ in Turkish,
27905         as the Turkish regex test assumes this.
27907         regex-tests: fix test and add debug output
27908         Perhaps this will fix the recent grep test failure reported at:
27909         https://buildfarm.opencsw.org/buildbot/builders/ggrep-solaris10-sparc/builds/199
27910         At least, the debug output should help narrow down the failure.
27911         * tests/test-regex.c: Include stdarg.h, stdio.h.
27912         (exit_status): New var.
27913         (report_error): New function.
27914         (main): Use it to report failures to stdout instead of merely
27915         exiting with some nonzero status.  The status info alone isn’t
27916         enough to do remote debugging.  In the new tr_TR.UTF-8 test, clear
27917         regex before calling re_compile_pattern, fixing a portability bug.
27919         regex: no longer match glibc
27920         * config/srclist.txt: Comment out regex_internal.c for now.
27922 2020-09-23  Paul Eggert  <eggert@cs.ucla.edu>
27924         regex: fix ignore-case Turkish bug
27925         * lib/regex_internal.c (build_wcs_upper_buffer):
27926         Do not assume that converting single-byte character to upper
27927         yields a single-byte character.  This is not true for Turkish,
27928         where towupper (L'i') yields L'İ', which is not single-byte.
27929         * tests/test-regex.c (main): Test for this bug.
27931         regex: port to weird isascii platforms
27932         * lib/regex_internal.h (isascii) [!_LIBC]: Supply glibc version.
27934 2020-09-20  Norihiro Tanaka  <noritnk@kcn.ne.jp>
27936         dfa: make dfasupported a global function
27937         * lib/dfa.c (dfasupported): Rename, and make it global.
27938         Update caller.
27939         * lib/dfa.h (dfasupported): Add prototype.
27941 2020-09-20  Bruno Haible  <bruno@clisp.org>
27943         canonicalize: Add support for UNC file names on native Windows.
27944         Reported and initial patch by Vaclav Slavik <vaclav@slavik.io> in
27945         <https://savannah.gnu.org/bugs/?59079>.
27946         * lib/canonicalize.c (canonicalize_filename_mode): For UNC file names,
27947         extend the prefix to include the server.
27949 2020-09-20  Bruno Haible  <bruno@clisp.org>
27951         supersede: Fix test failures on native Windows.
27952         * lib/supersede.c (open_supersede): Handle non-regular files on native
27953         Windows like on Solaris.
27954         * tests/test-supersede-open.h (test_open_supersede): Use O_BINARY flag.
27956 2020-09-20  Paul Eggert  <eggert@cs.ucla.edu>
27958         test-stdalign: test Oracle Studio better
27959         * doc/posix-headers/stdalign.texi (stdalign.h):
27960         * tests/test-stdalign.c (main):
27961         Sun Studio Bug #2125432 seems to be fixed.
27963         c-stack: output diagnostic in single 'write'
27964         * lib/c-stack.c (die): In the typical case, use just one 'write'
27965         syscall to output the diagnostic, as this lessens interleaving.
27966         (die, c_stack_action): Assume C99.
27967         * modules/c-stack (Depends-on): Add c99, mempcpy.
27969         c-stack: improve checking if !libsigsegv
27970         If SIGINFO_WORKS, do not treat a null pointer dereference as if it
27971         were a stack overflow.  Use uintptr_t and INT_ADD_WRAPV to avoid
27972         unlikely pointer overflow.  Also, fix some obsolete code and typos.
27973         I found these problems while looking into this bug report:
27974         https://lists.gnu.org/r/grep-devel/2020-09/msg00053.html
27975         * lib/c-stack.c: Include c-stack.h first, to test interface.
27976         Include inttypes.h for UINTPTR_MAX, stdbool.h, stddef.h for
27977         max_align_t, intprops.h for INT_ADD_WRAPV.
27978         (USE_LIBSIGSEGV): New macro; use it to simplify later code.
27979         (SIGSTKSZ): Simplify setup.  Work around libsigsegv bug only
27980         for libsigsegv 2.8 and earlier since the bug should be fixed
27981         after that.
27982         (alternate_signal_stack): Use max_align_t instead of doing it by hand.
27983         (segv_handler, overflow_handler, segv_handler) [DEBUG]:
27984         Assume sprintf returns byte count; this assumption is safe now.
27985         (page_size): New static volatile variable, since sysconf isn’t
27986         documented to be async-signal-safe on Solaris.  This variable is
27987         present and used if (!USE_LIBSIGSEGV && HAVE_SIGALTSTACK &&
27988         HAVE_DECL_SIGALTSTACK && HAVE_STACK_OVERFLOW_HANDLING &&
27989         SIGINFO_WORKS).
27990         (segv_handler): Use it if present.  Never report null pointer
27991         dereference as a stack overflow.  Check for (unlikely) unsigned
27992         and/or pointer overflow.
27993         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC):
27994         Rename cache variables to gl_cv_sys_stack_overflow_works
27995         and gl_cv_sys_xsi_stack_overflow_heuristic.
27996         All uses changed.
27997         (gl_PREREQ_C_STACK): Do not require AC_FUNC_ALLOCA, since
27998         c-stack no longer uses STACK_DIRECTION.
27999         Do not check for unistd.h, since we depend on unistd.
28000         Fix shell typo ‘$"ac_cv_sys_xsi_stack_overflow_heuristic"’.
28001         * modules/c-stack (Depends-on): Sort.  Add intprops, inttypes,
28002         stdbool, stddef.
28004 2020-09-20  Bruno Haible  <bruno@clisp.org>
28006         Revert now-unnecessary override of config.guess on Alpine Linux 3.10.
28007         * m4/musl.m4: Revert 2020-09-19 patch.
28008         * m4/setlocale_null.m4: Likewise.
28009         * modules/setlocale-null: Likewise.
28011 2020-09-19  Ben Pfaff  <blp@cs.stanford.edu>
28012             Bruno Haible  <bruno@clisp.org>
28014         relocatable-prog: Fix for multiple relocatable library directories.
28015         * build-aux/reloc-ldflags: Fix handling of multiple relocatable library
28016         directories.  Each one needs its own -Wl,-rpath,$dir option, instead of
28017         being attached to a single one.
28019 2020-09-19  Jim Meyering  <meyering@fb.com>
28021         test-verify.c: avoid -Wshadow warnings
28022         * tests/test-verify.c (gx): Rename global from "x". Adjust use.
28023         (enum): Capitalize member names. Adjust uses.
28025 2020-09-19  Bruno Haible  <bruno@clisp.org>
28027         havelib: Avoid linking with libc.a on GNU systems.
28028         Reported by Bruce Dubbs <bruce.dubbs@gmail.com> in
28029         <https://lists.gnu.org/archive/html/grep-devel/2020-09/msg00052.html>.
28030         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): When processing the
28031         dependency_libs value of a .la file, ignore '-lc' options on GNU
28032         systems.
28034 2020-09-19  Bruno Haible  <bruno@clisp.org>
28036         Fix recognition of musl libc on Alpine Linux 3.10.
28037         Reported by Jeffrey Walton <noloader@gmail.com> in
28038         <https://lists.gnu.org/archive/html/grep-devel/2020-09/msg00020.html>.
28039         * m4/musl.m4 (gl_MUSL_CANONICAL_HOST): New macro.
28040         (gl_MUSL_LIBC): Require it.
28041         * m4/setlocale_null.m4 (gl_FUNC_SETLOCALE_NULL): Likewise.
28042         * modules/setlocale-null (Files): Add m4/musl.m4.
28044 2020-09-19  Bruno Haible  <bruno@clisp.org>
28046         nl_langinfo: Make multithread-safe on Solaris 10 and Solaris 11.3.
28047         Reported for Solaris 10 by Dagobert Michelsen via Paul Eggert in
28048         <https://lists.gnu.org/archive/html/bug-gnulib/2020-01/msg00023.html>
28049         and for Solaris 11.3 by Jeffrey Walton <noloader@gmail.com> in
28050         <https://lists.gnu.org/archive/html/bug-grep/2020-06/msg00013.html>.
28051         * lib/nl_langinfo-lock.c: New file, based on lib/setlocale_null-lock.c.
28052         * lib/nl_langinfo.c: Include <stdlib.h> and <windows.h> or <pthread.h>
28053         or <threads.h>.
28054         (ITEMS, MAX_RESULT_LEN): New macros.
28055         (nl_langinfo_unlocked): New function.
28056         (gl_get_nl_langinfo_lock): New declaration.
28057         (nl_langinfo_with_lock): New function, based on lib/setlocale_null.c.
28058         (rpl_nl_langinfo): Use nl_langinfo_with_lock instead of nl_langinfo.
28059         * m4/nl_langinfo.m4 (gl_FUNC_NL_LANGINFO): Require gl_PTHREADLIB. Define
28060         HAVE_THREADS_H. Set NL_LANGINFO_MTSAFE. If setting it to 0, also set
28061         REPLACE_NL_LANGINFO.
28062         (gl_PREREQ_NL_LANGINFO_LOCK): New macro.
28063         * modules/nl_langinfo (Files): Add lib/nl_langinfo-lock.c,
28064         lib/windows-initguard.h, m4/threadlib.m4, m4/visibility.m4.
28065         (configure.ac): Compile nl_langinfo-lock.c when NL_LANGINFO_MTSAFE is 0.
28066         * doc/posix-functions/nl_langinfo.texi: Mention the Solaris bug.
28068 2020-09-18  Bruno Haible  <bruno@clisp.org>
28070         fsusage, getaddrinfo: Produce more regular configure output.
28071         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Remove AC_MSG_CHECKING without
28072         corresponding AC_MSG_RESULT.
28073         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Likewise.
28075 2020-09-18  Bruno Haible  <bruno@clisp.org>
28077         Add back gl_SILENT.
28078         * m4/gnulib-common.m4 (GL_TMP_FD, gl_SILENT): New macros.
28080 2020-09-18  Paul Eggert  <eggert@cs.ucla.edu>
28082         c-stack-tests: fix -fsanitize=undefined false alarm
28083         * tests/test-c-stack2.sh: Skip the test-harness self-test
28084         if ‘gcc -fsanitize=undefined’ is in use.
28086 2020-09-17  Paul Eggert  <eggert@cs.ucla.edu>
28088         signalblocking: simplify and remove gl_SILENT
28089         gl_SILENT was problematic because if a trap was sprung, stderr
28090         generated during the trap was lost.  Avoid the problem by
28091         removing the need for gl_SILENT.
28092         * m4/gnulib-common.m4 (GL_TMP_FD, gl_SILENT): Remove.
28093         * m4/signalblocking.m4 (gl_SIGNALBLOCKING):
28094         Simplify, avoiding the need for gl_SILENT while preserving the
28095         ability of the user to override the value of the cache variable,
28096         now ac_cv_func_sigprocmask.
28098 2020-09-17  Bruno Haible  <bruno@clisp.org>
28100         sigprocmask: Fix configuration failure on Solaris 10 (regr. 2020-07-25).
28101         * m4/gnulib-common.m4 (GL_TMP_FD): New macro.
28102         (gl_SILENT): Use 'exec', not a compound statement, to redirect
28103         AS_MESSAGE_FD.
28105 2020-09-17  Paul Eggert  <eggert@cs.ucla.edu>
28107         intprops, xalloc: avoid __builtin_mul_overflow_p with Clang
28108         Problem reported by Nelson H. F. Beebe for clang 9.0.1 in:
28109         https://lists.gnu.org/r/grep-devel/2020-09/msg00028.html
28110         * lib/intprops.h (_GL_HAS_BUILTIN_OVERFLOW_P) [__clang__]:
28111         Define to 0.
28112         * lib/xalloc-oversized.h (xalloc_oversized) [__clang__]:
28113         Do not use __builtin_mul_overflow_p.
28115         libc-config: port __THROW to Ubuntu 4
28116         * lib/cdefs.h (__THROW): Do not use __attribute__ ((__nothrow__))
28117         for GCC 3.3.  Problem reported by Jeffrey Walton in:
28118         https://lists.gnu.org/r/bug-gnulib/2019-07/msg00058.html
28119         The GCC 3.3.4 documentation says the attribute should work, but
28120         apparently it does not work on Ubuntu 4’s GCC 3.3.  There seems
28121         little point or desire to research this circa-2004 platform further,
28122         so just avoid the attribute there.
28124 2020-09-17  Jim Meyering  <meyering@fb.com>
28126         test-dfa-match.sh: port timeout work-around to newer Busybox
28127         * tests/test-dfa-match.sh: Update timeout -t portability test to
28128         accommodate Busybox 1.30.0 and newer.
28130 2020-09-16  Paul Eggert  <eggert@cs.ucla.edu>
28132         fnmatch: adjust to match glibc fix
28133         This fixes handling of collating symbols in fnmatch (glibc bug 26620).
28134         This does not affect Gnulib; it merely keeps Gnulib and glibc
28135         closer together, to help with any eventual merge, by incorporating
28136         a recent glibc patch.  The patch and the following commentary is
28137         by Andreas Schwab.
28138         * lib/fnmatch_loop.c (FCT) [WIDE_CHAR_VERSION]: The variable idx
28139         contains the index into the extra array, whereas wextra points
28140         into the extra array at this index, containing the length of the
28141         following collating sequence in the wide character representation.
28143 2020-09-16  Bruno Haible  <bruno@clisp.org>
28145         stat, fstat: Fix compilation error with old mingw headers.
28146         Reported by Eli Zaretskii <eliz@gnu.org> in
28147         <https://lists.gnu.org/archive/html/bug-gnulib/2020-09/msg00027.html>.
28148         * lib/stat-w32.c (VOLUME_NAME_NONE): Define if the Windows headers don't
28149         define it.
28151 2020-09-16  Bruno Haible  <bruno@clisp.org>
28153         stat, fstat: Fix when compiling for versions older than Windows Vista.
28154         Reported by Eli Zaretskii <eliz@gnu.org> in
28155         <https://lists.gnu.org/archive/html/bug-gnulib/2020-09/msg00027.html>.
28156         * lib/stat-w32.c: Include <sdkddkver.h>. Test the value of _WIN32_WINNT
28157         that was originally set before we redefined it.
28158         * m4/stat.m4 (gl_PREREQ_STAT_W32): New macro.
28159         (gl_PREREQ_STAT): Require it.
28160         * m4/fstat.m4 (gl_PREREQ_FSTAT): Likewise.
28162 2020-09-15  Paul Eggert  <eggert@cs.ucla.edu>
28164         dfa: remove dfa-heap-overrun workaround
28165         * lib/dfa.c (reorder_tokens): Go back to a single pass that
28166         both sets map[*] and does other things.  This reverts
28167         2020-09-14T01:20:01Z!eggert@cs.ucla.edu, which is no longer
28168         neeeded now that 2020-09-14T13:21:05Z!noritnk@kcn.ne.jp
28169         fixed the underlying problem.
28171 2020-09-13  Paul Eggert  <eggert@cs.ucla.edu>
28173         dfa: avoid use of uninitialized constraint
28174         * lib/dfa.c (merge_nfa_state): Do not initialize the constraint
28175         to zero here.
28176         (dfaoptimize): Do it here instead, via xcalloc.  This prevents the
28177         use of an uninitialized constraint by later code when ! (flags[i]
28178         & OPT_QUEUED) means merge_nfa_state was not called to initialize
28179         the constraint.  Problem found by running 'valgrind src/grep -E
28180         '(^| )*(a|b)*(c|d)*( |$)' < /dev/null' on Ubuntu 18.04.5 x86-64.
28182         dfa: assume C99 in reorder_tokens
28183         * lib/dfa.c (reorder_tokens): Assume C99 and simplify.
28185         dfa: fix dfa-heap-overrun failure
28186         * lib/dfa.c (reorder_tokens): When setting
28187         map[d->follows[i].elems[j].index], instead of incorrectly assuming
28188         that (i < d->follows[i].elems[j].index), use two loops, one to set
28189         the map array and the other to use it.  The incorrect assumption
28190         caused some elements to be missed, and this in turn caused grep's
28191         dfa-heap-overrun test to fail on Solaris 10 sparc when compiled
28192         with GCC.  I found this bug while investigating
28193         https://buildfarm.opencsw.org/buildbot/builders/ggrep-solaris10-sparc/builds/183
28194         and I think the bug also occurs on GNU/Linux but with more-subtle
28195         symptoms.  The bug predates the recent dfa.c changes; perhaps the
28196         recent changes make the bug more likely.
28198 2020-09-13  Bruno Haible  <bruno@clisp.org>
28200         parse-datetime: Make the build rule work with parallel 'make'.
28201         Reported by Daiki Ueno <ueno@gnu.org> in
28202         <https://lists.gnu.org/archive/html/bug-gnulib/2020-09/msg00036.html>.
28203         * modules/parse-datetime (Makefile.am): Use a phony target and the
28204         general idiom for rules that produce multiple files.
28206 2020-09-13  Ben Pfaff  <blp@cs.stanford.edu>
28208         getpass: Check for nonnull prompt argument while avoiding warnings.
28209         * lib/getpass.c (_GL_ARG_NONNULL): Define to empty.
28210         (getpass) [!_WIN32]: Print prompt only if nonnull.
28212 2020-09-12  Paul Eggert  <eggert@cs.ucla.edu>
28214         dfa: epsilon-closure tweaks (Bug#40634)
28215         Rename BACKWORD to BACKWARD consistently.
28216         * lib/dfa.c (struct dfa): Reorder members to reduce fragmentation.
28217         (addtok_mb): Redo slightly to make it act more like a state machine.
28218         Check depth only when it increases.
28219         (epsclosure): Let the switch test the tokens.
28220         (dfaanalyze): Cache tindex.  Simplify position loops.
28221         Prefer xcalloc to xnmalloc + explicit zeroing.  Free BACKWARD
28222         only if it is not null, since we're testing that anyway.
28223         (dfaanalyze, build_state): Use merge2 instead of doing it by hand.
28225 2020-09-12  Norihiro Tanaka  <noritnk@kcn.ne.jp>
28227         dfa: use backward set in removal of epsilon closure
28228         When removing in epsilon closure, the code searched all nodes
28229         sequentially, and this was slow for some cases.  Build a backward
28230         set before search, and only check previous position with the set.
28231         Problem reported in <https://bugs.gnu.org/40634>.
28232         * lib/dfa.c (struct dfa): New member 'epsilon'.
28233         (addtok_mb): Check whether a pattern has epsilon node or not.
28234         (epsclosure): New arg BACKWORD; caller changed.  When removing
28235         epsilon node and reconnecting, check only previous positions.
28236         Treat BEG as if it were character.
28237         (dfaanalyze): Build backward set.
28239 2020-09-10  Paul Eggert  <eggert@cs.ucla.edu>
28241         canonicalize: fix pointer indexing bugs
28242         Problem reported by Florian Weimer in:
28243         https://lists.gnu.org/r/bug-gnulib/2020-09/msg00025.html
28244         * lib/canonicalize-lgpl.c (__realpath):
28245         * lib/canonicalize.c (canonicalize_filename_mode):
28246         Do not generate a pointer past the end of the array.
28247         * lib/canonicalize.c (canonicalize_filename_mode):
28248         Do not use a pointer after passing it to realloc.
28250 2020-09-09  Paul Eggert  <eggert@cs.ucla.edu>
28252         tempname: help merge with glibc
28253         Inspired by draft patches by Adhemerval Zanella in:
28254         https://sourceware.org/pipermail/libc-alpha/2020-September/117501.html
28255         https://sourceware.org/pipermail/libc-alpha/2020-September/117502.html
28256         * lib/tempname.c: Include stdalign.h, time.h.
28257         If _LIBC, do not include random-bits.h.
28258         (__getrandom, __clock_gettime64, __timespec64) [!_LIBC]: New macros.
28259         (RANDOM_BITS): Remove, replacing with ...
28260         (random_bits): ... this new static function.  All uses changed.
28261         Add entropy each time if getrandom is not supported.
28262         (RANDOM_VALUE, BASE_62_DIGITS, BASE_62_POWER):
28263         Assume 64-bit support a la C99.
28264         (try_tempname_len): Take advantage of ASLR when initializing
28265         random value.
28266         * modules/tempname (Depends-on): Add clock-time, stdalign, time.
28268         getcwd: merge recent glibc changes
28269         * lib/getcwd.c (GETCWD_RETURN_TYPE) [!_LIBC]: New macro.
28270         (__getcwd, getcwd) [_LIBC && !GETCWD_RETURN_TYPE]: Add aliases.
28272 2020-09-06  Bruno Haible  <bruno@clisp.org>
28274         attribute: Clarify which file to include.
28275         * modules/attribute (Include): Add "attribute.h".
28277 2020-09-06  Bruno Haible  <bruno@clisp.org>
28279         pipe-filter-ii, pipe-filter-gi: Fix warnings on native Windows.
28280         * lib/pipe-filter-ii.c: Include <process.h>.
28281         * lib/pipe-filter-gi.c: Likewise.
28283 2020-09-05  Paul Eggert  <eggert@cs.ucla.edu>
28285         verify: avoid __builtin_assume
28286         Our latest attempt to use Clang’s __builtin_assume caused a crash
28287         in GNU Emacs that we spent quite some time tracking down as being
28288         caused by the switch to __builtin_assume.  It’s not known whether
28289         the crash is due is a Clang bug or a portability bug in GNU Emacs.
28290         For now, play it safe and avoid __builtin_assume.
28291         * lib/verify.h (_GL_HAS_BUILTIN_ASSUME): Remove.
28292         (assume): Simplify by not trying to use Clang’s __builtin_assume.
28294 2020-09-05  Bruno Haible  <bruno@clisp.org>
28296         Fix several "warning: no previous prototype for function".
28297         * modules/unicase/locale-language (Makefile.am): Add a 'static' keyword
28298         in front of the declaration of the lookup function in
28299         unicase/locale-languages.h.
28300         * modules/unictype/bidiclass-byname (Makefile.am): Likewise in
28301         unictype/bidi_byname.h.
28302         * modules/unictype/category-byname (Makefile.am): Likewise in
28303         unictype/categ_byname.h.
28304         * modules/unictype/combining-class-byname (Makefile.am): Likewise in
28305         unictype/combiningclass_byname.h.
28306         * modules/unictype/joininggroup-byname (Makefile.am): Likewise in
28307         unictype/joininggroup_byname.h.
28308         * modules/unictype/joiningtype-byname (Makefile.am): Likewise in
28309         unictype/joiningtype_byname.h.
28310         * modules/unictype/property-byname (Makefile.am): Likewise in
28311         unictype/pr_byname.h.
28312         * modules/unictype/scripts (Makefile.am): Likewise in
28313         unictype/scripts_byname.h.
28314         * modules/uninorm/composition (Makefile.am): Likewise in
28315         uninorm/composition-table.h.
28317 2020-09-05  Bruno Haible  <bruno@clisp.org>
28319         select: Fix "warning: no previous prototype for function".
28320         * lib/select.c: Include <sys/select.h>.
28322 2020-09-05  Bruno Haible  <bruno@clisp.org>
28324         Use module 'c99' when needed for variadic macros with '...' syntax.
28325         * modules/crypto/sm3 (Depends-on): Add c99.
28327 2020-09-05  Bruno Haible  <bruno@clisp.org>
28329         Use module 'c99' when needed for subobject initializer syntax.
28330         * modules/tempname (Depends-on): Add c99.
28331         * modules/nstrftime-tests (Depends-on): Likewise.
28333 2020-09-05  Bruno Haible  <bruno@clisp.org>
28335         Use module 'c99' when needed for declaration-after-statement syntax.
28336         * modules/backup-rename (Depends-on): Add c99.
28337         * modules/backupfile (Depends-on): Likewise.
28338         * modules/bitset-tests (Depends-on): Likewise.
28339         * modules/bitsetv (Depends-on): Likewise.
28340         * modules/c-strtod (Depends-on): Likewise.
28341         * modules/c-strtold (Depends-on): Likewise.
28342         * modules/clean-temp (Depends-on): Likewise.
28343         * modules/copy-file (Depends-on): Likewise.
28344         * modules/crypto/hmac-md5-tests (Depends-on): Likewise.
28345         * modules/crypto/hmac-sha1-tests (Depends-on): Likewise.
28346         * modules/crypto/hmac-sha256-tests (Depends-on): Likewise.
28347         * modules/crypto/hmac-sha512-tests (Depends-on): Likewise.
28348         * modules/crypto/md5-buffer (Depends-on): Likewise.
28349         * modules/crypto/md5-tests (Depends-on): Likewise.
28350         * modules/crypto/sha1-buffer (Depends-on): Likewise.
28351         * modules/crypto/sha1-tests (Depends-on): Likewise.
28352         * modules/crypto/sha256-buffer (Depends-on): Likewise.
28353         * modules/crypto/sha256-tests (Depends-on): Likewise.
28354         * modules/crypto/sha512-buffer (Depends-on): Likewise.
28355         * modules/crypto/sha512-tests (Depends-on): Likewise.
28356         * modules/diffseq (Depends-on): Likewise.
28357         * modules/fatal-signal (Depends-on): Likewise.
28358         * modules/fchmodat (Depends-on): Likewise.
28359         * modules/fstrcmp (Depends-on): Likewise.
28360         * modules/fsusage (Depends-on): Likewise.
28361         * modules/fts (Depends-on): Likewise.
28362         * modules/fts-tests (Depends-on): Likewise.
28363         * modules/getumask (Depends-on): Likewise.
28364         * modules/git-merge-changelog (Depends-on): Likewise.
28365         * modules/hash-map (Depends-on): Likewise.
28366         * modules/hash-set (Depends-on): Likewise.
28367         * modules/lchmod (Depends-on): Likewise.
28368         * modules/libgmp-tests (Depends-on): Likewise.
28369         * modules/libtextstyle-optional-tests (Depends-on): Likewise.
28370         * modules/linkedhash-map (Depends-on): Likewise.
28371         * modules/linkedhash-set (Depends-on): Likewise.
28372         * modules/long-options (Depends-on): Likewise.
28373         * modules/mbrtoc32 (Depends-on): Likewise.
28374         * modules/memchr2-tests (Depends-on): Likewise.
28375         * modules/memmem-tests (Depends-on): Likewise.
28376         * modules/memrchr-tests (Depends-on): Likewise.
28377         * modules/mktime-internal (Depends-on): Likewise.
28378         * modules/nstrftime (Depends-on): Likewise.
28379         * modules/opendirat (Depends-on): Likewise.
28380         * modules/parse-datetime (Depends-on): Likewise.
28381         * modules/quotearg-simple-tests (Depends-on): Likewise.
28382         * modules/same (Depends-on): Likewise.
28383         * modules/supersede (Depends-on): Likewise.
28384         * modules/supersede-tests (Depends-on): Likewise.
28385         * modules/time_rz (Depends-on): Likewise.
28386         * modules/unistr/u16-chr-tests (Depends-on): Likewise.
28387         * modules/unistr/u32-chr-tests (Depends-on): Likewise.
28388         * modules/unistr/u8-chr-tests (Depends-on): Likewise.
28389         * modules/xalloc (Depends-on): Likewise.
28390         * modules/xnanosleep (Depends-on): Likewise.
28392 2020-09-05  Bruno Haible  <bruno@clisp.org>
28394         Fix "warning: array initialized from parenthesized string constant".
28395         * tests/test-memmem.c (main): Remove parentheses around string constant.
28396         * tests/test-c-strcasestr.c (main): Likewise.
28397         * tests/test-strcasestr.c (main): Likewise.
28399 2020-09-05  Bruno Haible  <bruno@clisp.org>
28401         argmatch tests: Fix ISO C compliance warning.
28402         * tests/test-argmatch.c: Omit semicolon after ARGMATCH_DEFINE_GROUP
28403         invocation.
28405 2020-09-05  Bruno Haible  <bruno@clisp.org>
28407         uniname/uniname: Fix -Wshadow warning.
28408         * lib/uniname/uniname.c (unicode_name_word): Don't declare i upfront.
28409         * modules/uniname/uniname (Depends-on): Add c99.
28411 2020-09-05  Bruno Haible  <bruno@clisp.org>
28413         uniname/uniname: Fix -Wshorten-64-to-32 warnings.
28414         * lib/uniname/uniname.c (unicode_name_word_lookup): Change type of last
28415         argument to size_t.
28416         (unicode_name_character): Change type of len, n1, n2, n3, words_length,
28417         n to size_t.
28419 2020-09-05  Bruno Haible  <bruno@clisp.org>
28421         unistr/u{8,16,32}-uctomb: Avoid possible trouble with huge strings.
28422         * lib/unistr.in.h (u8_uctomb_aux, u8_uctomb, u16_uctomb_aux, u16_uctomb,
28423         u32_uctomb): Change type of last argument to ptrdiff_t.
28424         * lib/unistr/u8-uctomb.c (u8_uctomb): Likewise.
28425         * lib/unistr/u8-uctomb-aux.c (u8_uctomb_aux): Likewise.
28426         * lib/unistr/u16-uctomb.c (u16_uctomb): Likewise.
28427         * lib/unistr/u16-uctomb-aux.c (u16_uctomb_aux): Likewise.
28428         * lib/unistr/u32-uctomb.c (u32_uctomb): Likewise.
28430 2020-09-01  Paul Eggert  <eggert@cs.ucla.edu>
28432         manywarnings: remove -Wchkp and -Wabi from C++ too
28433         Suggested by Reuben Thomas in:
28434         https://lists.gnu.org/r/bug-gnulib/2020-09/msg00001.html
28435         At some point somebody should merge the many other manywarnings-c.m4
28436         changes into manywarnings-c++.m4 too, e.g.,
28437         2020-07-02T00:00:51Z!eggert@cs.ucla.edu.
28438         * m4/manywarnings-c++.m4 (gl_MANYWARN_ALL_GCC_CXX_IMPL):
28439         Remove -Wchkp, -Wabi.
28441 2020-08-30  Bruno Haible  <bruno@clisp.org>
28443         strerrorname_np: Add tests.
28444         * tests/test-strerrorname_np.c: New file.
28445         * modules/strerrorname_np-tests: New file.
28447         strerrorname_np: New module.
28448         * lib/string.in.h (strerrorname_np): New declaration.
28449         * lib/strerrorname_np.c: New file.
28450         * m4/strerrorname_np.m4: New file.
28451         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Test whether strerrorname_np
28452         is declared.
28453         (gl_HEADER_STRING_H_DEFAULTS): Initialize GNULIB_STRERRORNAME_NP,
28454         HAVE_STRERRORNAME_NP, REPLACE_STRERRORNAME_NP.
28455         * modules/string (Makefile.am): Substitute GNULIB_STRERRORNAME_NP,
28456         HAVE_STRERRORNAME_NP, REPLACE_STRERRORNAME_NP.
28457         * modules/strerrorname_np: New file.
28458         * tests/test-string-c++.cc: Verify the signature of strerrorname_np.
28459         * doc/glibc-functions/strerrorname_np.texi: Mention the new module and
28460         the glibc 2.32 bug.
28462 2020-08-27  Paul Eggert  <eggert@cs.ucla.edu>
28464         perror, strerror_r: remove unportable tests
28465         Problem reported by Florian Weimer in:
28466         https://lists.gnu.org/r/bug-gnulib/2020-08/msg00220.html
28467         * tests/test-perror2.c (main):
28468         * tests/test-strerror_r.c (main): Omit unportable tests.
28470 2020-08-26  Bruno Haible  <bruno@clisp.org>
28472         stdint, wchar, wctype-h: Change configure message.
28473         * m4/wint_t.m4 (gt_TYPE_WINT_T): Say "checking whether wint_t is large
28474         enough..." instead of "checking whether wint_t is too small...".
28476 2020-08-26  Bruno Haible  <bruno@clisp.org>
28478         time_rz: Change configure message.
28479         * m4/time_rz.m4 (gl_TIME_RZ): Say "checking whether localtime works even
28480         near extrema..." instead of "checking whether localtime loops forever
28481         near extrema...".
28483 2020-08-26  Bruno Haible  <bruno@clisp.org>
28485         stdint: Change configure message.
28486         * m4/stdint.m4 (gl_STDINT_H): Say "checking whether stdint.h works
28487         without ISO C predefines..." instead of "checking whether stdint.h
28488         predates C++11...".
28490 2020-08-26  Bruno Haible  <bruno@clisp.org>
28492         socketlib: Change configure message.
28493         * m4/socketlib.m4 (gl_SOCKETLIB): Say "checking for WSAStartup..."
28494         instead of "checking if we need to call WSAStartup in winsock2.h and
28495         -lws2_32...".
28497 2020-08-26  Bruno Haible  <bruno@clisp.org>
28499         include_next: Change configure message.
28500         * m4/include_next.m4 (gl_INCLUDE_NEXT): Say "checking whether source
28501         code line length is unlimited..." instead of "checking whether system
28502         header files limit the line length...".
28504 2020-08-26  Bruno Haible  <bruno@clisp.org>
28506         getcwd: Change configure message.
28507         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): Say "checking
28508         whether getcwd succeeds when 4k < cwd_length < 16k..." instead of
28509         "checking whether getcwd aborts when 4k < cwd_length < 16k...".
28511 2020-08-26  Bruno Haible  <bruno@clisp.org>
28513         chdir-long: Change configure message.
28514         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Say "checking whether this
28515         system supports file names of any length..." instead of "checking
28516         whether this system has an arbitrary file name length limit...".
28517         Set gl_cv_have_unlimited_file_name_length instead of
28518         gl_cv_have_arbitrary_file_name_length_limit.
28519         * modules/chdir-long (Depends-on, configure.ac): Update accordingly.
28521 2020-08-26  Bruno Haible  <bruno@clisp.org>
28523         ceill: Change configure message.
28524         * m4/ceill.m4 (gl_FUNC_CEILL): Say "checking whether ceill() works..."
28525         instead of "checking whether ceill() breaks with small values...".
28527 2020-08-26  Bruno Haible  <bruno@clisp.org>
28529         iconv: Change configure message.
28530         * m4/iconv.m4 (AM_ICONV): Say "checking whether iconv is compatible
28531         with its POSIX signature..." instead of "checking for iconv
28532         declaration...". Remove K&R C support.
28534 2020-08-26  Paul Eggert  <eggert@cs.ucla.edu>
28536         getcwd: help the merge back into glibc
28537         This patch was inspired by Adhemerval Zanella’s proposed glibc patches:
28538         https://sourceware.org/pipermail/libc-alpha/2020-August/117294.html
28539         The idea is to make it easier for Gnulib lib/getcwd.c to match
28540         glibc io/getcwd-generic.c.
28541         * lib/getcwd.c [_LIBC]: Do not include pathmax.h.
28542         Include not-cancel.h.
28543         (HAVE_OPENAT, D_INO_IN_DIRENT, HAVE_MSVC_INVALID_PARAMETER_HANDLER)
28544         (HAVE_MINIMALLY_WORKING_GETCWD): Define for the _LIBC case.
28545         (__getcwd, __lstat, __readdir) [!_LIBC]: Remove these macros.
28546         (__close_nocancel_nostatus, __getcwd_generic, stat64, __fstat64)
28547         (__fstatat64, __lstat64, __readdir64, __fdopendir, __openat)
28548         (__rewinddir, __openat64, dirent64) [_LIBC]: New macros.
28549         (__getcwd_generic): Rename from __getcwd.
28550         Use the abovementioned macros for consistency with glibc.
28551         (weak_alias): Remove.
28553 2020-08-25  Bruno Haible  <bruno@clisp.org>
28555         verify: Avoid warnings when assume(0) is used.
28556         Reported by Mattias Engdegård <mattiase@acm.org> via Paul Eggert in
28557         <https://lists.gnu.org/archive/html/emacs-devel/2020-08/msg00838.html>.
28558         * lib/verify.h (assume): Use __builtin_unreachable if the argument is
28559         the constant 0.
28560         * tests/test-verify.c (f): New function.
28561         (state): New type.
28562         (test_assume_expressions, test_assume_optimization,
28563         test_assume_noreturn): New functions.
28565 2020-08-25  Bruno Haible  <bruno@clisp.org>
28567         fstrcmp: Clarification regarding NOTE_ORDERED.
28568         * lib/fstrcmp.c (NOTE_ORDERED): Define to false.
28570 2020-08-24  Paul Eggert  <eggert@cs.ucla.edu>
28572         diffseq: new option NOTE_ORDERED
28573         Problem reported by Phil Sainty <https://bugs.gnu.org/42931>.
28574         * NEWS: Mention this.
28575         * lib/diffseq.h (NOTE_ORDERED): New macro.
28576         (IF_LINT2): Remove; no longer needed.
28577         (compareseq): If (!NOTE_ORDERED), recurse on the smaller
28578         subproblem and iterate to do the larger.
28580 2020-08-23  Paul Eggert  <eggert@cs.ucla.edu>
28582         sys_types: let Autoconf 2.70 do pid_t
28583         * m4/pid_t.m4 (AC_TYPE_PID_T): Redefine this Autoconf macro
28584         only for Autoconf versions 2.69 and earlier, since 2.70
28585         will be fixed.
28587 2020-08-23  Bruno Haible  <bruno@clisp.org>
28589         tests: Don't assume that pid_t fits in an 'int'.
28590         * tests/test-nonblocking-pipe-main.c (main): Use type 'pid_t' instead
28591         of 'int'.
28592         * tests/test-nonblocking-socket-main.c (main): Likewise.
28594         sys_types: Fix definition of pid_t on 64-bit MSVC.
28595         * m4/pid_t.m4: New file.
28596         * modules/sys_types (Files): Add it.
28597         * modules/dirent (Files): Likewise.
28598         * modules/fcntl-h (Files): Likewise.
28599         * modules/sched (Files): Likewise.
28600         * modules/signal-h (Files): Likewise.
28601         * modules/spawn (Files): Likewise.
28602         * modules/sys_stat (Files): Likewise.
28603         * modules/sys_wait (Files): Likewise.
28604         * modules/termios (Files): Likewise.
28605         * modules/unistd (Files): Likewise.
28607 2020-08-23  Bruno Haible  <bruno@clisp.org>
28609         inttypes: Fix {PRI,SCN}*PTR on 32-bit native Windows (regr. 2020-07-21).
28610         * m4/inttypes.m4 (gl_INTTYPES_PRI_SCN): Fix syntax error in test
28611         program.
28613 2020-08-23  Paul Eggert  <eggert@cs.ucla.edu>
28615         intprops: be consistent about +X vs X+0
28616         * lib/intprops.h (_GL_SIGNED_INT_MAXIMUM): Simplify.
28618         intprops: fix INT_MULTIPLY_WRAPV bit-field bug
28619         The bug occurs when using INT_MULTIPLY_WRAPV (a, b, c) where B
28620         is a bit-field, on older GCC or non-GCC compilers where we do
28621         things ourselves instead of using __builtin_mul_overflow.
28622         Without this fix, INT_MULTIPLY_WRAPV would not compile, due
28623         to applying sizeof to a bit-field.
28624         * lib/intprops.h (_GL_INT_MULTIPLY_RANGE_OVERFLOW):
28625         Promote B before giving it to TYPE_WIDTH, in case B is a bit-field.
28627 2020-08-23  Bruno Haible  <bruno@clisp.org>
28629         supersede: Avoid a failure when writing to /dev/null in Solaris zones.
28630         Reported by Jörg Sonnenberger <joerg@netbsd.org>
28631         via Thomas Klausner <tk@giga.or.at> in
28632         <https://pkgsrc.se/files.php?messageId=20200812233110.30230FB28@cvs.NetBSD.org>.
28633         * lib/supersede.c (open_supersede): When opening an existing non-regular
28634         file on Solaris, use O_CREAT although it should not be necessary.
28636 2020-08-23  Bruno Haible  <bruno@clisp.org>
28638         verify: Make assume work on bit field expressions (regr. 2020-08-22).
28639         Reported by Benno Schulenberg <bensberg@telfort.nl> in
28640         <https://lists.gnu.org/archive/html/bug-gnulib/2020-08/msg00202.html>.
28641         * lib/verify.h (assume): Use '_Bool' or 'bool' as type of the temporary
28642         variable.
28644 2020-08-23  Bruno Haible  <bruno@clisp.org>
28646         libc-config: Improve comments.
28647         * lib/cdefs.h (__warndecl, __warnattr, __errordecl): Explain why we
28648         cannot use clang's __diagnose_if__ here.
28650 2020-08-22  Bruno Haible  <bruno@clisp.org>
28652         verify: Do use __builtin_assume on clang.
28653         * lib/verify.h (assume): Use clang’s __builtin_assume, with a temporary
28654         variable in a statement expression.
28656 2020-08-22  Bruno Haible  <bruno@clisp.org>
28658         sig2str: Add more signals.
28659         * lib/sig2str.c (numname_table): Add SIGCPUFAIL, SIGTHR, SIGBREAK.
28661 2020-08-22  Bruno Haible  <bruno@clisp.org>
28663         doc: Update for OpenBSD 6.0, 6.7.
28664         * doc/*/*.texi: Update.
28665         * m4/printf.m4: Update comments and cross-compilation guesses.
28666         * m4/ceill.m4: Update comments.
28667         * m4/getcwd-abort-bug.m4: Likewise.
28668         * m4/ilogb.m4: Likewise.
28669         * m4/ilogbf.m4: Likewise.
28670         * m4/langinfo_h.m4: Likewise.
28671         * m4/modf.m4: Likewise.
28672         * m4/modff.m4: Likewise.
28674 2020-08-22  Bruno Haible  <bruno@clisp.org>
28676         doc: Mention sig2str module.
28677         * doc/glibc-functions/sigabbrev_np.texi: Mention the sig2str module.
28679 2020-08-21  Bruno Haible  <bruno@clisp.org>
28681         sigdescr_np: Add tests.
28682         * tests/test-sigdescr_np.c: New file.
28683         * modules/sigdescr_np-tests: New file.
28685         sigdescr_np: New module.
28686         * lib/string.in.h (sigdescr_np): New declaration.
28687         * lib/sigdescr_np.c: New file.
28688         * m4/sigdescr_np.m4: New file.
28689         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Test whether sigdescr_np is
28690         declared.
28691         (gl_HEADER_STRING_H_DEFAULTS): Initialize GNULIB_SIGDESCR_NP,
28692         HAVE_SIGDESCR_NP.
28693         * modules/string (Makefile.am): Substitute GNULIB_SIGDESCR_NP,
28694         HAVE_SIGDESCR_NP.
28695         * modules/sigdescr_np: New file.
28696         * tests/test-string-c++.cc: Verify the signature of sigdescr_np.
28697         * doc/glibc-functions/sigdescr_np.texi: Mention the new module.
28699 2020-08-20  Bruno Haible  <bruno@clisp.org>
28701         sigabbrev_np: Add tests.
28702         * tests/test-sigabbrev_np.c: New file.
28703         * modules/sigabbrev_np-tests: New file.
28705         sigabbrev_np: New module.
28706         * lib/string.in.h (sigabbrev_np): New declaration.
28707         * lib/sigabbrev_np.c: New file.
28708         * m4/sigabbrev_np.m4: New file.
28709         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Test whether sigabbrev_np is
28710         declared.
28711         (gl_HEADER_STRING_H_DEFAULTS): Initialize GNULIB_SIGABBREV_NP,
28712         HAVE_SIGABBREV_NP.
28713         * modules/string (Makefile.am): Substitute GNULIB_SIGABBREV_NP,
28714         HAVE_SIGABBREV_NP.
28715         * modules/sigabbrev_np: New file.
28716         * tests/test-string-c++.cc: Verify the signature of sigabbrev_np.
28717         * doc/glibc-functions/sigabbrev_np.texi: Mention the new module.
28719 2020-08-20  Bruno Haible  <bruno@clisp.org>
28721         stdalign tests: Skip test with AIX xlclang.
28722         * tests/test-stdalign.c (main): Skip alignas tests with AIX xlclang.
28724 2020-08-20  Bruno Haible  <bruno@clisp.org>
28726         stdalign: Fix test failures on 32-bit platforms with clang versions < 8.
28727         * lib/stdalign.in.h (_Alignof): For clang versions < 8, use the same
28728         workaround as for GCC versions < 4.9.
28730 2020-08-20  Siddhesh Poyarekar  <siddhesh@gotplt.org>
28732         Sync up ProjectQuirks comments and documentation
28733         Transform the ProjectQuirks comments into a docstring so that it can
28734         be accessed from python as ProjectQuirks.__doc__ and harmonize
28735         descriptions with the documentation.
28736         * build-aux/vcstocl/projectquirks.py (ProjectQuirks):
28737         Transform comments into a docstring.
28738         * doc/vcs-to-changelog.texi: Sync up description with comments.
28740         Split ProjectQuirks out into its own file
28741         ProjectQuirks is used by external quirks files and importing it from
28742         vcs-to-changelog.py is broken since it was renamed to use hyphens.  It
28743         is cleaner to put it in its own file anyway.
28744         * build-aux/vcstocl/projectquirks.py: A new file...
28745         * build-aux/vcs-to-changelog.py (ProjectQuirks): ...to which
28746         we move ProjectQuirks and import the file.
28748 2020-08-19  Bruno Haible  <bruno@clisp.org>
28750         uchar: Fix compilation errors in C++ mode on macOS.
28751         * m4/uchar.m4 (gl_UCHAR_H): Require gl_ANSI_CXX if present. Include some
28752         system header file before attempting to use 'char16_t' and 'char32_t'.
28754 2020-08-19  Bruno Haible  <bruno@clisp.org>
28756         ansi-c++-opt: Work around an autoconf macro reordering problem.
28757         * modules/ansi-c++-opt: Require gl_ANSI_CXX already in the early
28758         section.
28760 2020-08-19  Bruno Haible  <bruno@clisp.org>
28762         math C++ tests: Fix compilation error in with GCC 10.
28763         * lib/math.in.h (cbrt, ceil, copysign, exp2, expm1, floor, fma, fmod,
28764         hypot, ilogb, log, log10, log1p, log2, logb, modf, remainder, rint,
28765         round, trunc): Use _GL_CXXALIASWARN1 instead of _GL_CXXALIASWARN.
28767 2020-08-19  Bruno Haible  <bruno@clisp.org>
28769         uchar: Fix compilation errors in C++ mode on OpenBSD.
28770         * lib/uchar.in.h (char16_t, char32_t): Don't define in C++ mode if
28771         CXX_HAS_UCHAR_TYPES is 1.
28772         * m4/uchar.m4 (gl_UCHAR_H): Determine whether the C++ compiler
28773         predefines char16_t and char32_t. Substitute CXX_HAS_UCHAR_TYPES.
28774         * modules/uchar (Makefile.am): Substitute CXX_HAS_UCHAR_TYPES.
28776 2020-08-19  Bruno Haible  <bruno@clisp.org>
28778         Fix compilation errors in C++ mode on OpenBSD.
28779         * lib/math.in.h (isfinite, isinf, isnan, signbit): In C++ mode on
28780         OpenBSD with clang, use the approach without C preprocessor macro.
28782 2020-08-18  Bruno Haible  <bruno@clisp.org>
28784         uchar C++ tests: Fix side effect on math modules (regr. 2020-08-17).
28785         * modules/uchar-c++-tests (configure.ac): Don't use AC_LANG_PUSH and
28786         AC_LANG_POP.
28788 2020-08-17  Paul Eggert  <eggert@cs.ucla.edu>
28790         verify: avoid __built_assume on Clang
28791         * lib/verify.h (assume): Do not use Clang’s __builtin_assume, as
28792         Clang 9 incorrectly diagnoses arguments as having side effects
28793         even when they do not.  I guess Clang 9 considers any function
28794         call as if it had a side effect here.
28796         libc-config: avoid Clang’s __diagnose_if__
28797         * lib/cdefs.h (__warndecl, __warnattr, __errordecl):
28798         For now, do not use __diagnose_if__ here, as this fails
28799         on Fedora 31 with Clang 9.0.1, with diagnostic
28800         "/usr/include/bits/stdio2.h:263:9: error: fgets called with bigger
28801         size than length of destination buffer
28802         [-Werror,-Wuser-defined-warnings]".  I guess Clang 9 warns even
28803         for functions that are not called?
28805         careadlinkat: speedup for GCC 10 with GCC_LINT
28806         Inspired by a suggestion by Bruno Haible in:
28807         https://lists.gnu.org/r/bug-gnulib/2020-08/msg00155.html
28808         * lib/careadlinkat.c (STACK_BUF_SIZE): New constant.
28809         (readlink_stk): New function, with most of the old careadlinkat
28810         contents and with a new STACK_BUF arg.  Inline it in GCC 10
28811         if GCC_LINT.
28812         (careadlinkat): Use the new function for everything but the
28813         stack buffer.
28815         * build-aux/gcc-warning.spec: Update comments.
28817 2020-08-17  Bruno Haible  <bruno@clisp.org>
28819         Assume autoconf >= 2.64.
28820         * m4/std-gnu11.m4 (AC_PROG_CC, AC_PROG_CXX): Use _AC_DO_LIMIT always.
28822 2020-08-17  Bruno Haible  <bruno@clisp.org>
28824         Revert autoupdate's revert.
28825         * config/srclist.txt: Mark regcomp.c as needing sync with glibc.
28827 2020-08-17  Bruno Haible  <bruno@clisp.org>
28829         uchar C++ tests: Fix build error on FreeBSD 12.
28830         * modules/uchar-c++-tests (configure.ac): Test whether <cuchar> exists.
28831         (Makefile.am): Don't include test-uchar-c++2.cc in the compilation if
28832         <cuchar> does not exist.
28834 2020-08-16  Paul Eggert  <eggert@cs.ucla.edu>
28836         time_rz: remove unused functions
28837         * lib/time_rz.c (isdst_differ, equal_tm): Remove; no longer used.
28839         time_rz: fix issues with mktime_z failures
28840         * lib/time_rz.c (mktime_z): Do not update *TM if revert_tz fails.
28841         Use a cheaper tm_yday test for failed mktime.
28843 2020-08-16  Bruno Haible  <bruno@clisp.org>
28845         intprops test: Strengthen on clang.
28846         * tests/test-intprops.c (VERIFY): Use verify_stmt.
28848 2020-08-16  Bruno Haible  <bruno@clisp.org>
28850         nstrftime: Guide inlining also on clang.
28851         * lib/nstrftime.c (iso_week_days): Inline also on clang.
28853 2020-08-16  Bruno Haible  <bruno@clisp.org>
28855         intprops: Avoid bogus "warning: division by zero is undefined" on clang.
28856         * lib/intprops.h (_GL__GENERIC_BOGUS): Define to 1 on clang.
28858 2020-08-16  Bruno Haible  <bruno@clisp.org>
28860         log2l: Disable MSVC workaround on clang.
28861         * lib/log2l.c (log2l): On clang, use the expression 0.0L/0.0L.
28863 2020-08-16  Bruno Haible  <bruno@clisp.org>
28865         argp: Emit a warning also with clang.
28866         * lib/argp-help.c (__argp_short_program_name): Use #warning also on
28867         clang.
28869 2020-08-16  Bruno Haible  <bruno@clisp.org>
28871         libc-config: Enable __REDIRECT macro also on clang.
28872         * lib/cdefs.h (__REDIRECT, __REDIRECT_NTH, __REDIRECT_NTHNL, __ASMNAME,
28873         __ASMNAME2): Define on clang like on GCC.
28875 2020-08-16  Bruno Haible  <bruno@clisp.org>
28877         regex: Use initializer shorthand syntax also with clang.
28878         * lib/regcomp.c (utf8_sb_map): Use the initializer shorthand syntax also
28879         with clang.
28881 2020-08-16  Bruno Haible  <bruno@clisp.org>
28883         regex: Use space optimization also with clang.
28884         * lib/regex_internal.h (re_token_t): Use a single byte for the type also
28885         with clang.
28887 2020-08-16  Bruno Haible  <bruno@clisp.org>
28889         Use _Static_assert and static_assert primitives when present on clang.
28890         * lib/cdefs.h (_Static_assert): Don't define as a macro on clang.
28891         * lib/verify.h (_GL_HAVE__STATIC_ASSERT, _GL_HAVE__STATIC_ASSERT1,
28892         _GL_HAVE_STATIC_ASSERT1): Define as appropriate on clang.
28894 2020-08-16  Bruno Haible  <bruno@clisp.org>
28896         Use 'throw ()' for optimization in C++ mode also on clang.
28897         * lib/cdefs.h (__THROW): Define to 'throw ()' also on clang.
28898         * lib/getopt-cdefs.in.h (__THROW): Likewise.
28899         * lib/md5.h (__THROW): Likewise.
28901 2020-08-16  Bruno Haible  <bruno@clisp.org>
28903         absolute-header: Add support for clang.
28904         * modules/absolute-header (Makefile.am): Include '__clang__' in the
28905         HAVE_INCLUDE_NEXT expression.
28907 2020-08-16  Bruno Haible  <bruno@clisp.org>
28909         Fix "warning: implicitly declaring library function 'strcasecmp'".
28910         * lib/argp-help.c: Include <strings.h>.
28912 2020-08-16  Bruno Haible  <bruno@clisp.org>
28914         stdio: Don't break attribute 'scanf' on clang.
28915         * lib/stdio.in.h (scanf): Treat clang like GCC.
28917 2020-08-16  Bruno Haible  <bruno@clisp.org>
28919         Use __restrict also on clang.
28920         * lib/argp.h (__restrict): Don't define as a macro on clang >= 3.
28921         * lib/glob.in.h (_Restrict_): Use __restrict on clang >= 3.
28922         * lib/unitypes.in.h (_UC_RESTRICT): Likewise.
28924 2020-08-16  Bruno Haible  <bruno@clisp.org>
28926         pthread-spin: Use GCC built-ins also on clang.
28927         * lib/pthread-spin.c (pthread_spin_init, pthread_spin_lock,
28928         pthread_spin_trylock, pthread_spin_unlock): Use the newer GCC built-ins
28929         also on clang.
28931 2020-08-16  Bruno Haible  <bruno@clisp.org>
28933         asyncsafe-spin tests: Update.
28934         * tests/test-asyncsafe-spin2.c: Update to match the change in
28935         lib/asyncsafe-spin.c from 2020-08-11.
28937 2020-08-16  Bruno Haible  <bruno@clisp.org>
28939         setenv: Use tree code also with clang.
28940         * lib/setenv.c (USE_TSEARCH): Treat clang like GCC.
28942 2020-08-16  Bruno Haible  <bruno@clisp.org>
28944         math: Optimize signbit also on clang.
28945         * lib/math.in.h (gl_signbitf, gl_signbitd, gl_signbitl): Optimize also
28946         on clang.
28948 2020-08-16  Bruno Haible  <bruno@clisp.org>
28950         avltreehash-list, rbtreehash-list: Optimize also on clang.
28951         * lib/gl_anytreehash_list1.h (add_nodes_to_buckets): Use
28952         __builtin_expect also on clang.
28954 2020-08-16  Bruno Haible  <bruno@clisp.org>
28956         Fix "warning: 'WSASocketA' is deprecated: Use WSASocketW() instead".
28957         * lib/socket.c: Use WSASocketW, not WSASocketA.
28959         Fix "warning: format specifies type 'unsigned long'".
28960         * tests/test-nonblocking-writer.h (main_writer_loop): Cast dbgfprintf
28961         argument to match the format directive.
28963         Fix "warning: no case matching constant switch condition '0'".
28964         * tests/test-fcntl.c (check_flags): Add a 'default' case.
28966         Fix "warning: integer overflow in expression".
28967         * tests/test-strtol.c (main): Use an 'unsigned long' expression to
28968         remove a 'long' overflow.
28970         Fix "warning: "getpagesize" redefined".
28971         * tests/test-getcwd.c (getpagesize): Don't redefine if defined as a
28972         macro.
28974         Fix "warning: implicitly declaring library function 'strncasecmp'".
28975         * lib/strptime.c: Include <strings.h>.
28977         Fix "warning: 'snprintf' macro redefined".
28978         * lib/strerror_r.c (snprintf): Undefine before redefining.
28980         Fix "warning: address of array 'locale' will always evaluate to 'true'".
28981         * lib/nl_langinfo.c (ctype_codeset): Remove redundant NULL test.
28983         Fix "warning: '__stat64' macro redefined".
28984         * lib/glob.c (__stat64): Undefine also on MSVC/clang.
28986         Fix "warning: 'format' attribute argument not supported: rpl_printf".
28987         * lib/stdio.in.h (printf): Treat clang like GCC.
28989         Fix "warning: attribute declaration must precede definition" with clang.
28990         * lib/math.in.h (acosl, asinl, atanl, ceill, cosl, expl, fabsf, fabsl,
28991         floorl, fmodl, frexpf, frexpl, hypotf, hypotl, ldexpf, ldexpl, logl,
28992         log10l, modfl, sinl, sqrtl, tanl): Disable _GL_CXXALIASWARN invocation
28993         on non-glibc systems.
28994         * lib/netdb.in.h (gai_strerror): Likewise.
28995         * lib/stdio.in.h (snprintf, vfscanf, vscanf, vsnprintf): Likewise.
28996         * lib/sys_stat.in.h (fstat): Likewise.
28997         * lib/utime.in.h (utime): Likewise.
28999         Fix undesired warnings.
29000         * lib/sys_select.in.h: Disable all _GL_WARN_ON_USE invocations with
29001         clang.
29003 2020-08-16  Bruno Haible  <bruno@clisp.org>
29005         C++ tests: Fix link errors on MSVC (regression from 2020-05-31).
29006         * modules/stdio-c++-tests (Makefile.am): Link test-stdio-c++ with
29007         $(LIB_GETRANDOM), needed for the rpl_tmpfile symbol.
29008         * modules/stdlib-c++-tests (Makefile.am): Link test-stdlib-c++ with
29009         $(LIB_GETRANDOM), needed for the mkdtemp and mkstemp symbols.
29011 2020-08-16  Bruno Haible  <bruno@clisp.org>
29013         Don't use Autoconf quadrigraphs.
29014         * m4/alloca.m4 (_AC_LIBOBJ_ALLOCA): Use '#' instead of the corresponding
29015         Autoconf quadrigraph.
29016         * m4/free.m4 (gl_FUNC_FREE): Likewise.
29017         * m4/getloadavg.m4 (gl_PREREQ_GETLOADAVG): Likewise.
29018         * m4/largefile.m4 (_AC_SYS_LARGEFILE_TEST_INCLUDES,
29019         _AC_SYS_LARGEFILE_MACRO_VALUE): Likewise.
29020         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Likewise.
29021         * m4/math_h.m4 (gl_MATH_H): Likewise.
29022         * m4/warn-on-use.m4 (gl_WARN_ON_USE_PREPARE): Likewise.
29024 2020-08-16  Bruno Haible  <bruno@clisp.org>
29026         Fix quoting of AC_LANG_PROGRAM arguments.
29027         * m4/fdopendir.m4 (gl_FUNC_FDOPENDIR): Quote the AC_LANG_PROGRAM
29028         arguments through [[...]].
29029         * m4/fpending.m4 (gl_FUNC_FPENDING): Likewise.
29030         * m4/fpurge.m4 (gl_FUNC_FPURGE): Likewise.
29031         * m4/fseeko.m4 (gl_FUNC_FSEEKO): Likewise.
29032         * m4/ld-output-def.m4 (gl_LD_OUTPUT_DEF): Likewise.
29033         * m4/ld-version-script.m4 (gl_LD_VERSION_SCRIPT): Likewise.
29034         * m4/linkat.m4 (gl_FUNC_LINKAT): Likewise.
29035         * m4/mountlist.m4 (gl_MOUNTLIST): Likewise.
29036         * m4/sys_ioctl_h.m4 (gl_SYS_IOCTL_H): Likewise.
29037         * m4/ungetc.m4 (gl_FUNC_UNGETC_WORKS): Likewise.
29038         * m4/warn-on-use.m4 (gl_WARN_ON_USE_PREPARE): Likewise.
29039         * m4/warnings.m4 (gl_COMPILER_OPTION_IF): Likewise.
29040         * m4/wcstok.m4 (gl_FUNC_WCSTOK): Likewise.
29041         * m4/wctype_h.m4 (gl_WCTYPE_H): Likewise.
29043 2020-08-16  Bruno Haible  <bruno@clisp.org>
29045         Assume autoconf >= 2.64.
29046         * gnulib-tool (DEFAULT_AUTOCONF_MINVERSION): Set to 2.64.
29047         * DEPENDENCIES: Require Autoconf 2.64 or newer.
29048         * NEWS: Mention the changed requirement.
29049         * m4/00gnulib.m4 (_m4_divert_diversion, AC_DEFUN_ONCE): Remove macros.
29050         * m4/gnulib-common.m4 (AS_VAR_IF, AS_VAR_COPY): Remove macros.
29051         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Quote pushdef'ed
29052         variables.
29053         * m4/include_next.m4 (gl_NEXT_HEADERS_INTERNAL): Likewise.
29054         * m4/warn-on-use.m4 (gl_WARN_ON_USE_PREPARE): Likewise.
29055         * m4/warnings.m4 (gl_COMPILER_OPTION_IF): Likewise.
29056         (gl_UNKNOWN_WARNINGS_ARE_ERRORS(C), gl_UNKNOWN_WARNINGS_ARE_ERRORS(C++),
29057         gl_UNKNOWN_WARNINGS_ARE_ERRORS(Objective C)): Define through AC_DEFUN.
29058         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC(C), gl_MANYWARN_ALL_GCC(C++)):
29059         Likewise.
29060         * m4/iconv.m4 (AM_ICONV): Define through AC_DEFUN_ONCE directly.
29061         * m4/libunistring.m4 (gl_LIBUNISTRING): Likewise.
29062         * m4/configmake.m4: Update comment.
29064 2020-08-16  Bruno Haible  <bruno@clisp.org>
29066         sys_ioctl: Simplify.
29067         * m4/sys_ioctl_h.m4 (gl_SYS_IOCTL_H): Remove confusing use of
29068         AC_INCLUDES_DEFAULT.
29070 2020-08-16  Bruno Haible  <bruno@clisp.org>
29072         Fix quoting of AC_LANG_SOURCE arguments.
29073         * m4/printf.m4 (gl_PRINTF_ENOMEM): Fix an m4 quoting bug in the
29074         GL_NOCRASH expansion.
29075         * m4/locale-ar.m4 (gt_LOCALE_AR): Simplify m4 quoting.
29076         * m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): Likewise.
29077         * m4/locale-ja.m4 (gt_LOCALE_JA): Likewise.
29078         * m4/locale-tr.m4 (gt_LOCALE_TR_UTF8): Likewise.
29079         * m4/locale-zh.m4 (gt_LOCALE_ZH_CN): Likewise.
29081 2020-08-15  Paul Eggert  <eggert@cs.ucla.edu>
29083         nstrftime: be more predictable about errno
29084         This aligns nstrftime better with draft POSIX 202x strftime.
29085         * lib/nstrftime.c: Include errno.h.
29086         (width_add, __strftime_internal): Set errno on failure,
29087         and preserve it on success.  Check for mktime_z failure.
29088         * modules/nstrftime (Depends-on): Add errno.
29089         * modules/nstrftime-tests (Depends-on): Add atoll, intprops.
29090         * tests/test-nstrftime.c: Include intprops.h, limits.h.
29091         (errno_test): New test function.
29092         (main): Call it.
29094 2020-08-15  Bruno Haible  <bruno@clisp.org>
29096         canonicalize: Fix a problem of the autoconf test on MSVC/clang.
29097         * m4/canonicalize.m4 (gl_FUNC_REALPATH_WORKS): Remove undesired file
29098         from dependency analysis first.
29100 2020-08-15  Bruno Haible  <bruno@clisp.org>
29102         Determine asm output option and filename suffix for MSVC/clang.
29103         * m4/asm-underscore.m4 (gl_C_ASM): Distinguish clang from cl and
29104         clang-cl.
29106 2020-08-15  Bruno Haible  <bruno@clisp.org>
29108         doc: Update for MSVC/clang.
29109         * doc/*-functions/*printf.texi: Mention that MSVC/clang has two bugs
29110         that MSVC 14 does not have.
29112 2020-08-15  Bruno Haible  <bruno@clisp.org>
29114         Revert autoupdate's revert.
29115         * config/srclist.txt: Mark mktime.c as needing sync with glibc.
29117 2020-08-15  Bruno Haible  <bruno@clisp.org>
29119         frexpl: Fix configuration test result on MSVC.
29120         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Avoid a division by a constant
29121         zero.
29123 2020-08-15  Bruno Haible  <bruno@clisp.org>
29125         Support compiling without -loldnames on native Windows.
29126         * m4/gnulib-common.m4 (GL_MDA_DEFINES, _GL_MDA_DEFINES): New macros.
29127         * m4/chown.m4 (AC_FUNC_CHOWN): In the test programs, use GL_MDA_DEFINES.
29128         (gl_FUNC_CHOWN, gl_FUNC_CHOWN_FOLLOWS_SYMLINK): Likewise.
29129         * m4/dup.m4 (gl_FUNC_DUP): Likewise.
29130         * m4/dup2.m4 (gl_FUNC_DUP2): Likewise.
29131         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Likewise.
29132         * m4/fchmodat.m4 (gl_FUNC_FCHMODAT): Likewise.
29133         * m4/fchownat.m4 (gl_FUNC_FCHOWNAT_EMPTY_FILENAME_BUG): Likewise.
29134         * m4/fcntl-o.m4 (gl_FCNTL_O_FLAGS): Likewise.
29135         * m4/fcntl.m4 (gl_FUNC_FCNTL): Likewise.
29136         * m4/fdopen.m4 (gl_FUNC_FDOPEN): Likewise.
29137         * m4/fdopendir.m4 (gl_FUNC_FDOPENDIR): Likewise.
29138         * m4/fflush.m4 (gl_FUNC_FFLUSH_STDIN): Likewise.
29139         * m4/fopen.m4 (gl_FUNC_FOPEN_GNU): Likewise.
29140         * m4/freopen.m4 (gl_FUNC_FREOPEN): Likewise.
29141         * m4/futimens.m4 (gl_FUNC_FUTIMENS): Likewise.
29142         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): Likewise.
29143         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
29144         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL, gl_FUNC_GETCWD_SIGNATURE):
29145         Likewise.
29146         * m4/getdtablesize.m4 (gl_FUNC_GETDTABLESIZE): Likewise.
29147         * m4/linkat.m4 (gl_FUNC_LINKAT): Likewise.
29148         * m4/lseek.m4 (gl_FUNC_LSEEK): Likewise.
29149         * m4/mkdir.m4 (gl_FUNC_MKDIR): Likewise.
29150         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Likewise.
29151         * m4/mktime.m4 (gl_FUNC_MKTIME_WORKS): Likewise.
29152         * m4/open-slash.m4 (gl_OPEN_TRAILING_SLASH_BUG): Likewise.
29153         * m4/poll.m4 (gl_FUNC_POLL): Likewise.
29154         * m4/posix_spawn.m4 (gl_POSIX_SPAWN_WORKS): Likewise.
29155         * m4/pread.m4 (gl_FUNC_PREAD): Likewise.
29156         * m4/pselect.m4 (gl_FUNC_PSELECT): Likewise.
29157         * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK): Likewise.
29158         * m4/ptsname_r.m4 (gl_PREREQ_PTSNAME_R): Likewise.
29159         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
29160         * m4/pwrite.m4 (gl_FUNC_PWRITE): Likewise.
29161         * m4/rename.m4 (gl_FUNC_RENAME): Likewise.
29162         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
29163         * m4/rmdir.m4 (gl_FUNC_RMDIR): Likewise.
29164         * m4/select.m4 (gl_FUNC_SELECT): Likewise.
29165         * m4/setenv.m4 (gl_FUNC_UNSETENV): Likewise.
29166         * m4/strncat.m4 (gl_FUNC_STRNCAT): Likewise.
29167         * m4/ttyname_r.m4 (gl_FUNC_TTYNAME_R): Likewise.
29168         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Likewise.
29169         * m4/unlink.m4 (gl_FUNC_UNLINK): Likewise.
29170         * m4/utimens.m4 (gl_UTIMENS): Likewise.
29171         * m4/utimensat.m4 (gl_FUNC_UTIMENSAT): Likewise.
29172         * m4/utimes.m4 (gl_FUNC_UTIMES): Likewise.
29173         * m4/canonicalize.m4 (gl_CANONICALIZE_LGPL): On native Windows, don't
29174         test for getcwd.
29175         * m4/utime.m4 (gl_FUNC_UTIME): On native Windows, don't test for utime.
29176         * m4/wcsdup.m4 (gl_FUNC_WCSDUP): To test for wcsdup, use a test program
29177         with GL_MDA_DEFINES.
29178         * lib/c++defs.h (_GL_CXXALIAS_MDA): New macro.
29179         * lib/fcntl.in.h (creat, open):  On native Windows, use the underscore-
29180         prefixed symbol.
29181         * lib/search.in.h (lfind, lsearch): Likewise.
29182         * lib/stdio.in.h (fcloseall, fdopen, fileno, getw, putw, tempnam):
29183         Likewise.
29184         * lib/stdlib.in.h (ecvt, fcvt, gcvt, mktemp, putenv): Likewise.
29185         * lib/string.in.h (memccpy, strdup): Likewise.
29186         * lib/sys_stat.in.h (chmod, umask): Likewise.
29187         * lib/time.in.h (tzset): Likewise.
29188         * lib/unistd.in.h (access, chdir, close, dup, dup2, execl, execle,
29189         execlp, execv, execve, execvp, execvpe, getcwd, getpid, isatty, lseek,
29190         read, rmdir, swab, unlink, write): Likewise.
29191         * lib/utime.in.h (utime): Likewise.
29192         * lib/wchar.in.h (wcsdup): Likewise.
29193         * lib/math.in.h (j0, j1, jn, y0, y1, yn):  Likewise.
29194         (isfinite, isinf, isnan, signbit): On native Windows, don't define as an
29195         rpl_-prefixed macro.
29196         * lib/canonicalize-lgpl.c (__getcwd): On native Windows, use _getcwd.
29197         * lib/close.c (close_nothrow): On native Windows, use _close.
29198         * lib/creat.c (orig_creat): On native Windows, use _creat.
29199         * lib/dup.c (dup_nothrow): On native Windows, use _dup.
29200         * lib/dup2.c (dup2_nothrow): Use _dup2.
29201         * lib/fdopen.c (fdopen_nothrow): On native Windows, use _fdopen.
29202         * lib/getcwd-lgpl.c: On native Windows, use _getcwd.
29203         * lib/getcwd.c (getcwd_nothrow): Use _getcwd also on mingw.
29204         * lib/open.c (orig_open): On native Windows, use _open.
29205         * lib/read.c (read_nothrow): Use _read.
29206         * lib/rmdir.c: On native Windows, use _rmdir.
29207         * lib/unlink.c: On native Windows, use _unlink.
29208         * lib/write.c (write_nothrow): Use _write.
29209         * lib/sys_select.in.h (close): With clang, don't attach a warning on an
29210         undefined symbol.
29211         * lib/sys_socket.in.h (close): Likewise.
29212         * lib/sys_time.in.h (close): Likewise.
29213         * tests/test-spawn-pipe-child.c: On native Windows, use _fdopen.
29215 2020-08-15  Bruno Haible  <bruno@clisp.org>
29217         Fix "unknown pragma ignored" warnings with clang on native Windows.
29218         * lib/cbrt.c: Don't use '#pragma fenv_access (off)' with clang.
29219         * lib/cbrtf.c: Likewise.
29220         * lib/ceil.c: Likewise.
29221         * lib/floor.c: Likewise.
29222         * lib/fma.c: Likewise.
29223         * lib/fmod.c: Likewise.
29224         * lib/rint.c: Likewise.
29225         * lib/round.c: Likewise.
29226         * lib/trunc.c: Likewise.
29227         * tests/test-ceil2.c: Likewise.
29228         * tests/test-ceilf2.c: Likewise.
29229         * tests/test-floor2.c: Likewise.
29230         * tests/test-floorf2.c: Likewise.
29231         * tests/test-trunc2.c: Likewise.
29232         * tests/test-truncf2.c: Likewise.
29233         * m4/round.m4 (gl_FUNC_ROUND): Likewise.
29234         * m4/roundf.m4 (gl_FUNC_ROUNDF): Likewise.
29236 2020-08-15  Bruno Haible  <bruno@clisp.org>
29238         Fix compilation errors in C++ mode with clang on native Windows.
29239         * lib/pthread.in.h (pthread_*): Disable _GL_CXXALIASWARN invocation on
29240         non-glibc systems.
29241         * lib/sched.in.h (sched_yield): Likewise.
29243 2020-08-14  Bruno Haible  <bruno@clisp.org>
29245         stdnoreturn: Work around problem with MSVC/clang.
29246         * m4/stdnoreturn.m4 (gl_STDNORETURN_H): On native Windows, include some
29247         system header after <stdnoreturn.h>.
29248         * doc/posix-headers/stdnoreturn.texi: Mention the issue.
29250 2020-08-14  Bruno Haible  <bruno@clisp.org>
29252         utime-h: Generate an utime.h file always.
29253         * modules/utime-h (Makefile.am): Generate utime.h always.
29254         * m4/utime_h.m4 (gl_UTIME_H): Don't set UTIME_H. Don't define
29255         GL_GENERATE_UTIME_H.
29257 2020-08-14  Bruno Haible  <bruno@clisp.org>
29259         mktime, mktime-internal: Remove obsolete code.
29260         * m4/mktime.m4 (gl_FUNC_MKTIME_WORKS): Don't #undef putenv.
29262 2020-08-14  Bruno Haible  <bruno@clisp.org>
29264         getcwd: Remove obsolete code.
29265         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): Don't #undef mkdir.
29266         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
29268 2020-08-14  Bruno Haible  <bruno@clisp.org>
29270         tzset: Assume the function exists.
29271         * lib/time.in.h (tzset): Assume HAVE_TZSET is 1.
29272         * lib/tzset.c: Define rpl_tzset, not tzset. Assume HAVE_TZSET is 1.
29273         * modules/tzset (configure.ac): Don't test HAVE_TZSET.
29274         * m4/tzset.m4 (gl_FUNC_TZSET): Don't test for tzset. Don't set
29275         HAVE_TZSET.
29276         * m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS): Don't initialize HAVE_TZSET.
29277         * modules/time (Makefile.am): Don't substitute HAVE_TZSET.
29279         nstrftime: Assume tzset exists.
29280         * lib/nstrftime.c (HAVE_TZSET): Remove macro.
29281         (__strftime_internal): Test my_strftime, not HAVE_TZSET.
29282         * m4/nstrftime.m4 (gl_FUNC_GNU_STRFTIME): Don't test for tzset.
29284         mktime, mktime-internal: Assume tzset exists.
29285         * lib/mktime.c (my_tzset): Assume HAVE_TZSET is 1.
29286         * m4/mktime.m4 (gl_FUNC_MKTIME_WORKS): Don't test for tzset.
29288 2020-08-14  Bruno Haible  <bruno@clisp.org>
29290         strdup: Assume the function exists.
29291         * m4/strdup.m4 (gl_FUNC_STRDUP, gl_FUNC_STRDUP_POSIX): Don't test
29292         whether strdup exists.
29293         * modules/strdup (Files): Remove lib/strdup.c.
29294         (configure.ac): Don't compile strdup.c.
29295         * modules/strdup-posix (Depends-on, configure.ac): Don't test
29296         ac_cv_func_strdup.
29297         * doc/posix-functions/strdup.texi: Update.
29298         * lib/unistr/u8-strdup.c: Assume HAVE_STRDUP is 1.
29299         * modules/unistr/u8-strdup (Files): Remove lib/unistr/u-strdup.h.
29300         (Depends-on): Remove unistr/u8-strlen.
29302 2020-08-13  Bruno Haible  <bruno@clisp.org>
29304         sys_random: Work around an uClibc bug.
29305         Reported by akater <nuclearspace@gmail.com>
29306         via Stefan Kangas <stefan@marxist.se>
29307         in <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=42236>.
29308         * lib/sys_random.in.h: On uClibc, include <stddef.h> first.
29309         * m4/sys_random_h.m4 (gl_HEADER_SYS_RANDOM): Update comment.
29310         * m4/getrandom.m4 (gl_FUNC_GETRANDOM): Likewise.
29311         * doc/glibc-headers/sys_random.texi: Mention the uClibc bug.
29313 2020-08-12  Bruno Haible  <bruno@clisp.org>
29315         Avoid implicit conversion from 'unsigned int' to 'int' in initializers.
29316         Reported by Florian Weimer in
29317         <https://lists.gnu.org/archive/html/bug-gnulib/2020-08/msg00086.html>.
29318         * lib/gen-uni-tables.c (output_predicate): Change the element type of
29319         the level3 array to 'unsigned int'.
29320         * lib/unictype/bitmap.h (bitmap_lookup): Access an 'unsigned int'.
29321         * lib/unictype/categ_*.h: Regenerated.
29322         * lib/unictype/ctype_*.h: Regenerated.
29323         * lib/unictype/pr_*.h: Regenerated.
29324         * lib/unictype/sy_*.h: Regenerated.
29325         * lib/unicase/cased.h: Regenerated.
29326         * lib/unicase/ignorable.h: Regenerated.
29328 2020-08-12  Paul Eggert  <eggert@cs.ucla.edu>
29330         stdint: port intptr_t to more-recent MinGW
29331         Problem reported by Eli Zaretskii in <https://bugs.gnu.org/36597#106>.
29332         * lib/stdint.in.h (intptr_t, uintptr_t): Do not define on MinGW,
29333         even if _INTPTR_T_DEFINED and _UINTPTR_T_DEFINED are not defined.
29334         Apparently those two macros were removed in mingwrt-3.22
29335         dated 2016-07-14.
29337 2020-08-12  Bruno Haible  <bruno@clisp.org>
29339         thread-optim: Export function-like macros only.
29340         Suggested by Paul Eggert.
29341         * lib/thread-optim.h (gl_multithreaded): New macro.
29342         (IF_MT_DECL, IF_MT): Remove macros.
29343         * doc/multithread.texi (Multithreading Optimizations): Add a small
29344         example.
29345         * lib/fatal-signal.c: Update all uses.
29346         * lib/clean-temp.c: Likewise.
29347         * lib/localename.c: Likewise.
29348         * modules/localename (Depends-on): Add stdbool.
29350 2020-08-12  Bruno Haible  <bruno@clisp.org>
29352         Revert autoupdate's revert.
29353         * config/srclist.txt: Mark regex.h as needing sync with glibc.
29355 2020-08-11  Bruno Haible  <bruno@clisp.org>
29357         thread-optim: Fix a compiler warning.
29358         * lib/thread-optim.h (IF_MT_DECL): Define differently.
29360 2020-08-11  Bruno Haible  <bruno@clisp.org>
29362         Use __restrict also on clang.
29363         * lib/cdefs.h (__restrict): Don't define as a macro on clang.
29364         (__restrict_arr): On clang, define like on GCC.
29365         * lib/regex.h (_Restrict_): Use '__restrict' also on clang.
29366         (_Restrict_arr_): Use _Restrict_ also on clang.
29367         * lib/spawn.in.h (_Restrict_): Use '__restrict' also on clang.
29368         (_Restrict_arr_): Use _Restrict_ also on clang.
29370 2020-08-11  Bruno Haible  <bruno@clisp.org>
29372         Use flexible array syntax also on clang.
29373         * lib/cdefs.h (__flexarr, __glibc_c99_flexarr_available): For clang,
29374         define like for GCC 3.
29376 2020-08-11  Bruno Haible  <bruno@clisp.org>
29378         fcntl: On native Windows, use _setmode, not setmode.
29379         * lib/fcntl.c (dupfd): Use _setmode, not setmode.
29380         * lib/binary-io.h: Update comment.
29381         * tests/test-cloexec.c: Call set_binary_mode, not setmode.
29382         * tests/test-dup2.c: Likewise.
29383         * tests/test-dup-safer.c: Likewise.
29384         * tests/test-fcntl.c: Likewise.
29386 2020-08-11  Bruno Haible  <bruno@clisp.org>
29388         execute, spawn-pipe: Use _spawnvpe, not spawnvpe.
29389         * lib/execute.c (execute): Use _spawnvpe, not spawnvpe.
29390         * lib/spawn-pipe.c (create_pipe): Likewise.
29391         * tests/test-nonblocking-pipe-main.c (main): Likewise.
29392         * tests/test-nonblocking-socket-main.c (main): Likewise.
29393         * lib/wait-process.c: Update comment.
29394         * doc/posix-functions/fork.texi: Update.
29396 2020-08-11  Bruno Haible  <bruno@clisp.org>
29398         asyncsafe-spin: Use GCC built-ins also on clang.
29399         * lib/asyncsafe-spin.c (asyncsafe_spin_init, do_lock, do_unlock): Use
29400         the newer GCC built-ins also on clang.
29402 2020-08-11  Bruno Haible  <bruno@clisp.org>
29404         Use expression statements also on clang.
29405         * lib/cdefs.h (__extension__): Don't define to empty on clang.
29406         * lib/obstack.h (__extension__): Likewise.
29407         (obstack_object_size, obstack_room, obstack_make_room, obstack_empty_p,
29408         obstack_grow, obstack_grow0, obstack_1grow, obstack_ptr_grow,
29409         obstack_int_grow, obstack_ptr_grow_fast, obstack_int_grow_fast,
29410         obstack_blank, obstack_alloc, obstack_copy, obstack_copy0,
29411         obstack_finish, obstack_free): Enable as optimized macros also on clang.
29412         * lib/fpucw.h (fpucw_t etc.): Enable the definitions also on clang.
29414 2020-08-10  Bruno Haible  <bruno@clisp.org>
29416         Use many __attribute__s with clang.
29417         * m4/gnulib-common.m4 (_Noreturn): Use __attribute__ __noreturn__ also
29418         on clang.
29419         * lib/cdefs.h (__glibc_clang_has_attribute, __glibc_clang_has_builtin):
29420         New macros.
29421         (__THROW, __THROWNL, __NTH, __NTHNL): Use __attribute__ __nothrow__ also
29422         on clang.
29423         (__warndecl, __warnattr, __errordecl): Use __attribute__ __diagnose_if__
29424         also on older clang versions.
29425         (__attribute__): Don't define to empty on clang.
29426         (__attribute_malloc__): Use __attribute__ __malloc__ also on clang.
29427         (__attribute_pure__): Use __attribute__ __pure__ also on clang.
29428         (__attribute_const__): Use __attribute__ __const__ also on clang.
29429         (__attribute_used__): Use __attribute__ __used__ also on clang.
29430         (__attribute_noinline__): Use __attribute__ __noinline__ also on clang.
29431         (__attribute_deprecated__): Use __attribute__ __deprecated__ also on
29432         clang.
29433         (__attribute_format_arg__): Use __attribute__ __format_arg__ also on
29434         clang.
29435         (__attribute_format_strfmon__): Use __attribute__ __format__ __strfmon__
29436         also on clang.
29437         (__nonnull): Use __attribute__ __nonnull__ also on clang.
29438         (__attribute_warn_unused_result__): Use __attribute__
29439         __warn_unused_result__ also on clang.
29440         (__always_inline): Use __attribute__ __always_inline__ also on clang.
29441         (__attribute_artificial__): Use __attribute__ __artificial__ also on
29442         clang >= 7.
29443         (__glibc_unlikely, __glibc_likely): Use __builtin_expect also on older
29444         clang versions.
29445         (_Noreturn): Don't redefine on clang >= 3.5.
29446         * lib/arg-nonnull.h (_GL_ARG_NONNULL): Use __attribute__ __nonnull__
29447         also on clang.
29448         * lib/dirent.in.h (_GL_ATTRIBUTE_PURE): Use __attribute__ __pure__ also
29449         on clang.
29450         * lib/stdlib.in.h (_GL_ATTRIBUTE_PURE): Likewise.
29451         * lib/string.in.h (_GL_ATTRIBUTE_PURE): Likewise.
29452         * lib/wchar.in.h (_GL_ATTRIBUTE_PURE): Likewise.
29453         * lib/stdio.in.h (_GL_ATTRIBUTE_FORMAT): Use __attribute__ __format__
29454         also on clang.
29455         * lib/monetary.in.h (_GL_ATTRIBUTE_FORMAT): Likewise.
29456         * lib/textstyle.in.h (ostream_printf, ostream_vprintf): Likewise.
29457         * lib/unitypes.in.h (_UC_ATTRIBUTE_CONST): Use __attribute__ __const__
29458         also on clang.
29459         (_UC_ATTRIBUTE_PURE): Use __attribute__ __pure__ also on clang.
29460         * lib/noreturn.h (_GL_NORETURN_FUNC, _GL_NORETURN_FUNCPTR): Use
29461         __attribute__ __noreturn__ also on clang.
29462         * lib/obstack.h (__attribute_noreturn__): Likewise.
29463         * lib/file-set.h (record_file): Use __attribute__ __nonnull__ also on
29464         clang.
29465         * lib/argp-help.c (hol_entry_long_iterate): Use __attribute__
29466         always_inline also on clang.
29467         * tests/test-printf-posix.c (func1, func2, func3, func4): Test also on
29468         clang.
29470 2020-08-10  Bruno Haible  <bruno@clisp.org>
29472         c-ldtoastr tests: Fix test failure.
29473         * tests/test-c-ldtoastr.c (main): Support platforms where 'long double'
29474         is longer than 'double'.
29476 2020-08-10  Bruno Haible  <bruno@clisp.org>
29478         Revert autoupdate's revert.
29479         * config/srclist.txt: Mark intprops.h as needing sync with glibc.
29481 2020-08-09  Bruno Haible  <bruno@clisp.org>
29483         string: Fix build error in C++ mode with clang (regression from today).
29484         * lib/warn-on-use.h (_GL_WARN_ON_USE_CXX): Expect two rettype
29485         parameters, one for GCC, one for clang.
29486         * lib/c++defs.h (_GL_CXXALIASWARN1_2): Update.
29487         * lib/string.in.h (strchr, strpbrk, strrchr): For clang, pass 'char *'
29488         as return type.
29490 2020-08-09  Bruno Haible  <bruno@clisp.org>
29492         ftruncate: Use _chsize, not chsize.
29493         * m4/ftruncate.m4 (gl_PREREQ_FTRUNCATE): Test for _chsize, not chsize.
29494         * lib/ftruncate.c: Test HAVE__CHSIZE.
29495         (chsize_nothrow): Use _chsize, not chsize.
29497 2020-08-09  Bruno Haible  <bruno@clisp.org>
29499         Silence warnings from clang 10 with -Wimplicit-fallthrough.
29500         * lib/dfa.c (FALLTHROUGH): Use __attribute__ __fallthrough__ also on
29501         clang >= 10.
29502         * lib/fnmatch.c (FALLTHROUGH): Likewise.
29503         * lib/fts.c (FALLTHROUGH): Likewise.
29504         * tests/macros.h (FALLTHROUGH): Likewise.
29505         * lib/regex_internal.h (FALLTHROUGH): Likewise.
29506         * config/srclist.txt: Mark it as needing sync with glibc.
29508 2020-08-09  Bruno Haible  <bruno@clisp.org>
29510         stdbool tests: Enable the stricter tests also on clang.
29511         * tests/test-stdbool.c (ADDRESS_CHECK_OKAY): Define also on clang.
29512         (e): Enable the address-to-bool conversion test also on clang.
29514 2020-08-09  Bruno Haible  <bruno@clisp.org>
29516         count-one-bits: Use __builtin_popcount{,l,ll} on clang.
29517         * lib/count-one-bits.h (COUNT_ONE_BITS): Use the GCC built-in.
29519 2020-08-09  Bruno Haible  <bruno@clisp.org>
29521         Use attribute __aligned__ with clang.
29522         * lib/stdalign.in.h (_Alignas): Treat clang like GCC.
29523         * lib/stddef.in.h (_GL_STDDEF_ALIGNAS): Likewise.
29525 2020-08-09  Bruno Haible  <bruno@clisp.org>
29527         Use __alignof__ with clang.
29528         * m4/stddef_h.m4 (gl_STDDEF_H): Test the alignment of max_align_t also
29529         on clang.
29530         * lib/alignof.h (alignof_type): Use __alignof__ also on clang.
29531         * lib/stdalign.in.h (_Alignof): Don't activate the GCC workaround on
29532         clang.
29533         * lib/malloca.h (sa_alignof): Use __alignof__ also on clang.
29534         * lib/bitset/list.c (lbitset_elt_alloc): Use __alignof__ also on clang.
29535         * lib/bitset/table.c (tbitset_elt_alloc): Likewise.
29536         * tests/test-stddef.c: Very the behaviour of __alignof__ also on clang.
29538 2020-08-09  Bruno Haible  <bruno@clisp.org>
29540         ignore-value: Simplify on clang.
29541         * lib/ignore-value.h (ignore_value): With clang, no need to use the GCC
29542         workaround.
29544 2020-08-09  Bruno Haible  <bruno@clisp.org>
29546         Use __typeof__ with clang.
29547         * m4/stdint.m4 (gl_STDINT_H): Check for SIZE_MAX also on
29548         "clang -std=gnu99".
29549         * lib/intprops.h (_GL_HAVE___TYPEOF__): Define to 1 also on clang.
29550         * tests/test-stdint.c (verify_same_types): Enable the check also on
29551         clang.
29553 2020-08-09  Bruno Haible  <bruno@clisp.org>
29555         Add ability to emit user-defined warnings and errors with clang.
29556         * m4/gnulib-common.m4 (gl_COMMON_BODY): Define _GL_ATTRIBUTE_ERROR,
29557         _GL_ATTRIBUTE_WARNING using an attribute for clang.
29558         * lib/warn-on-use.h (_GL_WARN_ON_USE, _GL_WARN_ON_USE_ATTRIBUTE,
29559         _GL_WARN_ON_USE_CXX): Define using an attribute for clang.
29560         * lib/cdefs.h (__warndecl, __warnattr, __errordecl): Define using an
29561         attribute for clang.
29563 2020-08-09  Bruno Haible  <bruno@clisp.org>
29565         intprops: Fix typo in comment.
29566         * lib/intprops.h (_GL_HAS_BUILTIN_OVERFLOW_P): Fix typo in comment.
29568 2020-08-09  Bruno Haible  <bruno@clisp.org>
29570         Use __builtin_signbit* with clang.
29571         * lib/math.in.h (signbit): Use __builtin_signbit{,f,l} also on clang.
29572         * m4/signbit.m4 (gl_SIGNBIT): Use __builtin_signbit{,f,l} also on clang.
29573         Set REPLACE_SIGNBIT_USING_BUILTINS, not REPLACE_SIGNBIT_USING_GCC.
29574         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize
29575         REPLACE_SIGNBIT_USING_BUILTINS, not REPLACE_SIGNBIT_USING_GCC.
29576         * modules/math (Makefile.am): Substitute REPLACE_SIGNBIT_USING_BUILTINS,
29577         not REPLACE_SIGNBIT_USING_GCC.
29579 2020-08-09  Bruno Haible  <bruno@clisp.org>
29581         Use __builtin_isnan with clang.
29582         * lib/isnanf-nolibm.h (isnanf): Use the GCC built-in __builtin_isnan,
29583         not __builtin_isnanf. Also on clang.
29584         * m4/isnanf.m4 (gl_HAVE_ISNANF_NO_LIBM, gl_ISNANF_WORKS): Use the GCC
29585         built-in __builtin_isnan, not __builtin_isnanf. Also on clang.
29586         * lib/isnand-nolibm.h (isnand): With clang, use the GCC built-in.
29587         * m4/isnand.m4 (gl_HAVE_ISNAND_IN_LIBM): With clang, use the GCC
29588         built-in.
29589         * lib/isnanl-nolibm.h (isnanf): Use the GCC built-in __builtin_isnan,
29590         not __builtin_isnanl. Also on clang.
29591         * m4/isnanl.m4 (gl_HAVE_ISNANL_NO_LIBM, gl_FUNC_ISNANL_WORKS): Use the
29592         GCC built-in __builtin_isnan, not __builtin_isnanl. Also on clang.
29593         * lib/math.in.h (__has_builtin): Remove macro.
29594         (isnanf, gl_isnan_f): Use the GCC built-in __builtin_isnan, not
29595         __builtin_isnanf. Also on clang.
29596         (isnand, gl_isnan_d): With clang, use the GCC built-in.
29597         (isnanl, gl_isnan_l): Use the GCC built-in __builtin_isnan, not
29598         __builtin_isnanl. Also on clang.
29599         (isnan): Use the GCC built-in __builtin_isnan in all three cases. Also
29600         on clang.
29602 2020-08-09  Bruno Haible  <bruno@clisp.org>
29604         thread-optim: Fix logic error.
29605         Reported by Paul Eggert.
29606         * lib/thread-optim.h (IF_MT): Fix logic error.
29608 2020-08-08  Bruno Haible  <bruno@clisp.org>
29610         localename: Use module 'thread-optim'.
29611         * lib/localename.c: Include thread-optim.h.
29612         (struniq): Use IF_MT macro.
29613         * modules/localename (Depends-on): Add thread-optim.
29615         clean-temp: Use module 'thread-optim'.
29616         * lib/clean-temp.c: Include thread-optim.h.
29617         (register_temporary_file, unregister_temporary_file, create_temp_dir,
29618         register_temp_file, unregister_temp_file, register_temp_subdir,
29619         unregister_temp_subdir, cleanup_temp_dir_contents, register_fd,
29620         close_temp, fclose_variant_temp): Use IF_MT macro.
29621         * modules/clean-temp (Depends-on): Add thread-optim.
29623         fatal-signal: Use module 'thread-optim'.
29624         * lib/fatal-signal.c: Include thread-optim.h.
29625         (at_fatal_signal, block_fatal_signals, unblock_fatal_signals): Use IF_MT
29626         macro.
29627         * modules/fatal-signal (Depends-on): Add thread-optim.
29629 2020-08-08  Bruno Haible  <bruno@clisp.org>
29631         New module 'thread-optim'.
29632         * lib/thread-optim.h: New file.
29633         * modules/thread-optim: New file.
29634         * doc/multithread.texi (Multithreading Optimizations): New section.
29636 2020-08-07  Paul Eggert  <eggert@cs.ucla.edu>
29638         doc: more updates for glibc 2.32
29639         * doc/glibc-functions/lchmod.texi, doc/posix-functions/faccessat.texi:
29640         * doc/posix-functions/fchmodat.texi: Update.
29642 2020-08-07  Bruno Haible  <bruno@clisp.org>
29644         doc: Update for glibc 2.32.
29645         * doc/glibc-functions/__libc_single_threaded.texi: New file.
29646         * doc/glibc-functions/pthread_attr_getsigmask_np.texi: New file.
29647         * doc/glibc-functions/pthread_attr_setsigmask_np.texi: New file.
29648         * doc/glibc-functions/sigabbrev_np.texi: New file.
29649         * doc/glibc-functions/sigdescr_np.texi: New file.
29650         * doc/glibc-functions/strerrordesc_np.texi: New file.
29651         * doc/glibc-functions/strerrorname_np.texi: New file.
29652         * doc/gnulib.texi: Include them.
29653         (Glibc sys/single_threaded.h): New section.
29654         * doc/pastposix-functions/h_errno.texi: Update.
29655         * doc/posix-functions/*.texi: Likewise.
29656         * doc/glibc-functions/*.texi: Likewise.
29658 2020-08-07  Bruno Haible  <bruno@clisp.org>
29660         alloca: No need to compile alloca.c with clang.
29661         * lib/alloca.c: Skip all code with clang.
29663         Use __builtin_alloca with clang.
29664         * lib/alloca.in.h (alloca): Define as __builtin_alloca on clang.
29666 2020-08-06  Bruno Haible  <bruno@clisp.org>
29668         Use __builtin_assume with clang.
29669         * lib/verify.h (_GL_HAS_BUILTIN_ASSUME): New macro.
29670         (assume): Use __builtin_assume when available.
29672 2020-08-06  Paul Eggert  <eggert@cs.ucla.edu>
29674         libgmp: add <gmp/gmp.h> support
29675         * m4/libgmp.m4 (gl_LIBGMP):
29676         * modules/libgmp (configure.ac, Makefile.am):
29677         Support platforms requiring ‘#include <gmp/gmp.h>’ instead of
29678         ‘#include <gmp.h>’.
29680 2020-08-06  Bruno Haible  <bruno@clisp.org>
29682         Consider that clang defines __OPTIMIZE__ like GCC does.
29683         * lib/streq.h: Define the inline functions also on clang.
29684         * lib/c-strcaseeq.h: Likewise.
29685         * lib/c++defs.h (_GL_CXXALIASWARN_2, _GL_CXXALIASWARN1_2): Don't enable
29686         the GCC workaround to clang.
29688 2020-08-06  Bruno Haible  <bruno@clisp.org>
29690         safe-alloc: Remove unused code.
29691         * lib/safe-alloc.h (__GNUC_PREREQ): Remove macro.
29693 2020-08-06  Bruno Haible  <bruno@clisp.org>
29695         Use __builtin_expect with clang everywhere.
29696         * lib/cdefs.h (__glibc_unlikely, __glibc_likely): Use the GCC built-in
29697         also on clang.
29699 2020-08-05  Bruno Haible  <bruno@clisp.org>
29701         Use __builtin_ctz{,l,ll} and __builtin_ffs{,l,ll} with clang everywhere.
29702         * lib/count-trailing-zeros.h (COUNT_TRAILING_ZEROS): Use the GCC
29703         built-in also on clang.
29704         * lib/ffs.c: With clang, use the GCC built-in, not <intrin.h>.
29705         * lib/ffsl.h: Likewise. Assume GCC_BUILTIN is defined.
29707 2020-08-05  Bruno Haible  <bruno@clisp.org>
29709         Use __builtin_clz{,l,ll} with clang, also on Windows.
29710         * lib/integer_length.c: With clang, use the GCC built-in, not
29711         <intrin.h>.
29712         * lib/integer_length_l.c: Likewise.
29713         * lib/count-leading-zeros.h (COUNT_LEADING_ZEROS): Use the GCC built-in
29714         also on clang.
29715         * lib/vasnprintf.c (divide): Likewise.
29717 2020-08-04  Paul Eggert  <eggert@cs.ucla.edu>
29719         Update srclist.txt as per recent glibc changes
29720         * config/srclist.txt: Uncomment lines to reflect recent merges
29721         from Gnulib to glibc.
29723 2020-08-03  Bruno Haible  <bruno@clisp.org>
29725         Prefer documented autoconf macro 'm4_if' over 'ifelse'.
29726         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): Use m4_if instead of ifelse.
29728 2020-08-03  Bruno Haible  <bruno@clisp.org>
29730         integer_length_ll: Optimize for MSVC in 64-bit mode.
29731         * lib/integer_length_l.c (MSVC_BUILTIN): Define for MSVC in 64-bit mode.
29732         (FUNC): On MSVC, use MSVC_BUILTIN if defined.
29734 2020-08-03  Bruno Haible  <bruno@clisp.org>
29736         integer_length_ll: Optimize for MSVC in 32-bit mode.
29737         * lib/integer_length_l.c: Include <intrin.h>.
29738         (integer_length): Define as inline function, like in
29739         lib/integer_length.c.
29741 2020-08-03  Bruno Haible  <bruno@clisp.org>
29743         integer_length: Optimize for MSVC.
29744         * lib/integer_length.c: Include <intrin.h>.
29745         (integer_length): With MSVC, use the _BitScanReverse built-in.
29747 2020-08-03  Bruno Haible  <bruno@clisp.org>
29749         ffsll: Optimize for MSVC in 64-bit mode.
29750         * lib/ffsl.h (FUNC): On MSVC, use MSVC_BUILTIN if defined.
29751         * lib/ffsll.c (MSVC_BUILTIN): Define for MSVC in 64-bit mode.
29752         * lib/ffsl.c (MSVC_BUILTIN): Define for MSVC.
29754 2020-08-03  Bruno Haible  <bruno@clisp.org>
29756         ffsll: Optimize for MSVC in 32-bit mode.
29757         * lib/ffsl.h: Include <intrin.h>.
29758         (ffs): Define as inline function, like in lib/ffs.c.
29760 2020-08-03  Bruno Haible  <bruno@clisp.org>
29762         ffs: Optimize for MSVC.
29763         * lib/ffs.c: Include <intrin.h>.
29764         (ffs): With MSVC, use the _BitScanForward built-in.
29766 2020-08-03  Bruno Haible  <bruno@clisp.org>
29768         sigprocmask: Try to avoid breakage for people who use an Autoconf cache.
29769         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Change the name of the cache
29770         variable.
29772 2020-08-03  Harald van Dijk  <harald@gigawatt.nl>  (tiny change)
29774         fopen: Avoid undesired interactions with glibc headers.
29775         * lib/fopen.c (_GL_ALREADY_INCLUDING_STDIO_H): Define this instead of
29776         __need_FILE, as the latter does not work with glibc.
29778 2020-08-02  Paul Eggert  <eggert@cs.ucla.edu>
29780         fcntl: document some F_SETLK errno variations
29781         * doc/posix-functions/fcntl.texi (fcntl): Document
29782         OpenIndiana, GNU/Linux, FreeBSD on NFS files.
29784 2020-08-02  Bruno Haible  <bruno@clisp.org>
29786         oset: Add an 'iterator_atleast' operation.
29787         * lib/gl_array_oset.c (gl_array_indexof_atleast): New function,
29788         extracted from gl_array_search_atleast.
29789         (gl_array_search_atleast): Use it.
29790         (gl_array_iterator_atleast): New function.
29791         (gl_array_oset_implementation): Use it.
29792         * lib/gl_anytree_oset.h (gl_tree_iterator_atleast): New function.
29793         * lib/gl_avltree_oset.c (gl_avltree_oset_implementation): Use it.
29794         * lib/gl_rbtree_oset.c (gl_rbtree_oset_implementation): Likewise.
29795         * lib/gl_oset.h (struct gl_oset_implementation): Add 'iterator_atleast'
29796         member.
29797         (gl_oset_iterator_atleast): New function.
29798         * lib/gl_oset.hh (gl_OSet): Add 'begin_atleast' member.
29799         (gl_OSet::iterator): Add another auxiliary constructor.
29800         * tests/test-array_oset.c (is_at_least, gl_sortedlist_indexof_atleast):
29801         New functions.
29802         (main): Test also gl_oset_iterator_atleast.
29803         * tests/test-avltree_oset.c (is_at_least): New function.
29804         (main): Test also gl_oset_iterator_atleast.
29805         * tests/test-rbtree_oset.c (is_at_least): New function.
29806         (main): Test also gl_oset_iterator_atleast.
29807         * tests/test-oset-c++.cc (is_at_most): New function.
29808         (main): Test also gl_OSet::begin_atleast.
29810 2020-08-02  Bruno Haible  <bruno@clisp.org>
29812         oset-c++, omap-c++: Remove restriction for search_atleast method.
29813         * lib/gl_oset.hh (gl_OSet::search_atleast): Allow the threshold to be of
29814         a different type than the element.
29815         * lib/gl_omap.hh (gl_OMap::search_atleast): Allow the threshold to be of
29816         a different type than the key.
29818 2020-08-01  Paul Eggert  <eggert@cs.ucla.edu>
29820         gnumakefile: say ‘$(MAKE)’ not ‘make’
29821         * top/GNUmakefile (abort-due-to-no-makefile):
29822         Prefer ‘$(MAKE)’ to ‘make’ in a diagnostic.
29823         This change is backported from Autoconf.
29825 2020-08-01  Bruno Haible  <bruno@clisp.org>
29827         Prefer documented autoconf macro 'm4_if' over 'ifelse'.
29828         * m4/autobuild.m4 (AB_INIT): Use m4_if instead of ifelse.
29829         * m4/csharpexec.m4 (gt_CSHARPEXEC): Likewise.
29830         * m4/javacomp.m4 (gt_JAVACOMP): Likewise.
29831         * m4/javaexec.m4 (gt_JAVAEXEC): Likewise.
29832         * m4/libtextstyle.m4 (gl_LIBTEXTSTYLE): Likewise.
29834 2020-08-01  Bruno Haible  <bruno@clisp.org>
29836         libtextstyle-optional: Update tests.
29837         * modules/libtextstyle-optional-tests (configure.ac): Invoke
29838         gl_LIBTEXTSTYLE_OPTIONAL.
29840 2020-08-01  Bruno Haible  <bruno@clisp.org>
29842         parse-datetime: Fix wrong #line statements.
29843         * modules/parse-datetime (Makefile.am): Correct #line statements also in
29844         parse-datetime-gen.h.
29846 2020-08-01  Bruno Haible  <bruno@clisp.org>
29848         libtextstyle[-optional]: Allow requesting a minimum version.
29849         * m4/libtextstyle.m4 (gl_LIBTEXTSTYLE): Allow an optional argument.
29850         (gl_LIBTEXTSTYLE_NEWEST_VERSION, gl_LIBTEXTSTYLE_INITIALIZE,
29851         gl_LIBTEXTSTYLE_SEARCH): New macros.
29852         * modules/libtextstyle (configure.ac): Don't invoke gl_LIBTEXTSTYLE.
29853         * m4/libtextstyle-optional.m4 (gl_LIBTEXTSTYLE_OPTIONAL): Allow an
29854         optional argument. Invoke, not require, gl_LIBTEXTSTYLE.
29855         * modules/libtextstyle-optional (configure.ac): Don't invoke
29856         gl_LIBTEXTSTYLE_OPTIONAL.
29857         * NEWS: Mention the changes.
29859 2020-07-31  Bruno Haible  <bruno@clisp.org>
29861         _GL_CMP: Improve documentation.
29862         Reported by Paul Eggert in
29863         <https://lists.gnu.org/archive/html/bug-gnulib/2020-07/msg00188.html>.
29864         * m4/gnulib-common.m4 (gl_COMMON_BODY): Clarify what arguments can be
29865         passed.
29867 2020-07-30  Paul Eggert  <eggert@cs.ucla.edu>
29869         largefile: sync with Autoconf master
29870         * m4/largefile.m4 (_AC_SYS_LARGEFILE_TEST_INCLUDES):
29871         Avoid undefined behavior on platforms where off_t is 32 bits.
29872         See: https://bugs.debian.org/742780
29874         alloca: sync with Autoconf master
29875         * m4/alloca.m4 (_AC_LIBOBJ_ALLOCA):
29876         Do not define if Autoconf 2.70 or later, since Autoconf master
29877         now matches us.
29879 2020-07-30  Bruno Haible  <bruno@clisp.org>
29881         unicodeio: Add comment.
29882         * lib/unicodeio.c (unicode_to_mb): Clarify why the code distinguishes
29883         different iconv behaviours.
29885 2020-07-30  Paul Eggert  <eggert@cs.ucla.edu>
29887         Work around some Oracle Studio attribute bugs
29888         These were discovered when building bleeding-edge Emacs with
29889         Oracle Studio.
29890         * m4/gnulib-common.m4 (_GL_ATTRIBUTE_COLD, _GL_ATTRIBUTE_MAY_ALIAS):
29891         Port to Oracle Studio 12.6, which mishandles __attribute__
29892         ((__cold__)) and __attribute__ ((__may_alias__)) even though
29893         __has_attribute says they work.
29895 2020-07-29  Bruno Haible  <bruno@clisp.org>
29897         unicodeio: Fix wrong result on musl libc.
29898         Reported by A. Wilcox <awilfox@adelielinux.org> in
29899         <https://www.openwall.com/lists/musl/2020/07/29/2>.
29900         * lib/unicodeio.c (unicode_to_mb): Handle asterisk fallback characters
29901         on musl libc.
29902         * m4/unicodeio.m4 (gl_UNICODEIO): Invoke gl_MUSL_LIBC.
29903         * modules/unicodeio (Files): Add m4/musl.m4.
29905 2020-07-29  Paul Eggert  <eggert@cs.ucla.edu>
29907         fsusage, regex, stat-size: remove Cray support
29908         As near as I can make out this is actually support for UNICOS/mp,
29909         last released 2005, and Cray hasn’t supported that for years.
29910         * config/srclist.txt: Comment out regex.h for now.
29911         * lib/fsusage.c (get_fs_usage):
29912         * lib/regex.h (re_comp, re_exec):
29913         * lib/stat-size.h (ST_NBLOCKSIZE):
29914         Don’t worry about _CRAY.
29916 2020-07-29  Bruno Haible  <bruno@clisp.org>
29918         parse-datetime: Fix compilation error with bison 3.7.
29919         * modules/parse-datetime (Makefile.am): Create a generated header file
29920         parse-datetime-gen.h in the source directory. Correct #include and
29921         #line statements during preprocessing.
29923 2020-07-28  Bruno Haible  <bruno@clisp.org>
29925         fopen-gnu: Create files correctly (regression from 2020-05-24).
29926         * lib/fopen.c (rpl_open): Pass a third argument to open().
29928 2020-07-27  Paul Eggert  <eggert@cs.ucla.edu>
29930         xalloc-die: don’t depend on xalloc
29931         This removes a circular dependency, as xalloc depends on xalloc-die.
29932         * modules/xalloc-die (Files): Add lib/xalloc.h.
29933         (Depends-on): Remove xalloc.
29934         Add extern-inline, stdint, xalloc-oversized (this is for xalloc.h).
29936         dfa-tests: port to MSVC
29937         Problem reported by Gisle Vanem in:
29938         https://lists.gnu.org/r/bug-gnulib/2020-07/msg00159.html
29939         Also, remove an unnecessary dependency on getprogname.
29940         * modules/dfa-tests (Depends-on): Remove getprogname.
29941         * tests/test-dfa-match-aux.c: Do not include getprogname.h.
29942         (exit_status): New static var.
29943         (dfawarn): Set it instead of exiting.
29944         Do not declare as _Noreturn, to pacify MSVC.
29945         (main): Return exit_status.
29947 2020-07-26  Paul Eggert  <eggert@cs.ucla.edu>
29949         argz: pacify MSVC
29950         * lib/argz.in.h: Avoid "*/*" to pacify MSVC.
29951         Problem reported by Gisle Vanem.
29953         libgmp: remove dependency on havelib
29954         * m4/libgmp.m4 (gl_LIBGMP): If gl_HAVE_MODULE_HAVELIB is not defined,
29955         use the more-traditional AC_SEARCH_LIBS approach.
29956         This should work better with GNU Emacs configuration,
29957         which uses pkg-config instead of a havelib-style approach.
29958         * modules/havelib (gl_HAVE_MODULE_HAVELIB): New witness macro.
29959         * modules/libgmp (Depends-on): Remove havelib.
29961         libgmp: remove HAVE_GMP, LIB_GMP
29962         * m4/libgmp.m4 (gl_LIBGMP): Do not define HAVE_GMP and LIB_GMP, as
29963         they’re redundant.  I’ll adjust GNU Coreutils accordingly.
29965 2020-07-26  Bruno Haible  <bruno@clisp.org>
29967         inttypes: Remove support for AIX 4.
29968         * lib/inttypes.in.h: Assume that PRI_MACROS_BROKEN is 0.
29969         * m4/inttypes-pri.m4: Remove file.
29970         * m4/inttypes.m4 (gl_INTTYPES_PRI_SCN): Don't require gt_INTTYPES_PRI.
29971         (gl_INTTYPES_H_DEFAULTS): Don't initialize PRI_MACROS_BROKEN.
29972         * modules/inttypes-incomplete (Makefile.am): Don't substitute
29973         PRI_MACROS_BROKEN.
29974         * modules/inttypes (Files): Remove m4/inttypes-pri.m4.
29976 2020-07-26  Bruno Haible  <bruno@clisp.org>
29978         gettimeofday: Remove workaround for Mac OS X 10.0.
29979         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY_CLOBBER): Remove macro.
29980         (gl_FUNC_GETTIMEOFDAY): Don't invoke it.
29981         * lib/gettimeofday.c: Don't include localtime-buffer.h.
29982         (gettimeofday): Don't test GETTIMEOFDAY_CLOBBERS_LOCALTIME.
29983         * lib/localtime.c: Don't test GETTIMEOFDAY_CLOBBERS_LOCALTIME.
29984         * modules/gettimeofday (Depends-on): Remove localtime-buffer.
29985         * modules/localtime-buffer: Remove file.
29986         * lib/localtime-buffer.h: Remove file.
29987         * lib/localtime-buffer.c: Remove file.
29988         * m4/localtime-buffer.m4: Remove file.
29989         * MODULES.html.sh (Date and time <time.h>): Remove localtime-buffer.
29991 2020-07-26  Bruno Haible  <bruno@clisp.org>
29993         tzset: Remove workaround for Solaris 2.6.
29994         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Remove macro.
29995         (gl_FUNC_TZSET): Don't invoke it. Don't define TZSET_CLOBBERS_LOCALTIME.
29996         Don't require gl_LOCALTIME_BUFFER_DEFAULTS.
29997         * lib/localtime-buffer.h: Don't test TZSET_CLOBBERS_LOCALTIME.
29998         * lib/localtime-buffer.c: Likewise.
29999         * lib/localtime.c: Likewise.
30000         * lib/tzset.c: Don't include localtime-buffer.h.
30001         (tzset): Don't test TZSET_CLOBBERS_LOCALTIME.
30002         * lib/nstrftime.c (__strftime_internal): Assume HAVE_RUN_TZSET_TEST
30003         is 1.
30004         * modules/tzset (Depends-on): Remove localtime-buffer.
30006 2020-07-26  Bruno Haible  <bruno@clisp.org>
30008         expl: Simplify autoconf test.
30009         * m4/expl.m4 (gl_FUNC_EXPL): Merge the "checking whether expl() breaks
30010         with small values..." test into the "checking whether expl works..."
30011         test.
30013 2020-07-26  Bruno Haible  <bruno@clisp.org>
30015         alloca: Remove Cray-2 and Cray Y-MP support.
30016         * m4/alloca.m4 (_AC_LIBOBJ_ALLOCA): Don't define CRAY_STACKSEG_END.
30017         Enable also on Autoconf >= 2.69.
30018         * lib/alloca.c (ADDRESS_FUNCTION, struct stack_control_header,
30019         struct stack_segment_linkage, struct stk_stat, struct stk_trailer,
30020         i00afunc): Remove.
30022 2020-07-25  Bruno Haible  <bruno@clisp.org>
30024         multiarch: Prepare for x86_64+arm64 universal binaries in macOS 11.
30025         * m4/multiarch.m4 (gl_MULTIARCH): Recognize also the ARM architectures.
30027 2020-07-25  Bruno Haible  <bruno@clisp.org>
30029         sigprocmask: Small autoconf macro improvement.
30030         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Make it possible for the
30031         user to override the value of gl_cv_func_sigprocmask.
30032         * m4/gnulib-common.m4 (gl_SILENT): New macro.
30034 2020-07-25  Bruno Haible  <bruno@clisp.org>
30036         Small autoconf macro improvements.
30037         * m4/mktime.m4 (gl_FUNC_MKTIME_WORKS): Make it possible for the user to
30038         override the value of gl_cv_func_working_mktime.
30039         * m4/multiarch.m4 (gl_MULTIARCH): Show a line "checking whether the
30040         compiler produces multi-arch binaries..." in the configure output.
30041         * m4/size_max.m4 (gl_SIZE_MAX): When not found, say "no".
30042         * m4/parse-datetime.m4 (gl_C_COMPOUND_LITERALS): Improve indentation.
30044 2020-07-25  Bruno Haible  <bruno@clisp.org>
30046         doc: Update for NetBSD 7.1, 8.0, 9.0.
30047         * doc/*/*.texi: Update.
30048         * m4/exp2l.m4: Update comments.
30049         * m4/expl.m4: Likewise.
30050         * m4/ilogb.m4: Likewise.
30051         * m4/ilogbf.m4: Likewise.
30052         * m4/log10l.m4: Likewise.
30053         * m4/logl.m4: Likewise.
30054         * m4/printf.m4: Likewise.
30055         * m4/rintl.m4: Likewise.
30056         * m4/wcwidth.m4: Likewise.
30058 2020-07-24  Bruno Haible  <bruno@clisp.org>
30060         doc: Update for Mac OS X 10.13.
30061         * doc/*/*.texi: Update.
30062         * m4/expm1l.m4: Update comments.
30063         * m4/getgroups.m4: Likewise.
30064         * m4/getlogin_r.m4: Likewise.
30065         * m4/linkat.m4: Likewise.
30066         * m4/printf.m4: Likewise.
30068 2020-07-24  Bruno Haible  <bruno@clisp.org>
30070         doc: Update for Cygwin 2.9.0.
30071         * doc/*/*.texi: Update.
30073 2020-07-24  Paul Eggert  <eggert@cs.ucla.edu>
30075         parse-datetime: modernize doc
30076         * doc/parse-datetime.texi: Use more-current examples.
30077         Don’t lead with 32-bit time_t, as it’s on its way out.
30078         Capitalize “Epoch” to be consistent with POSIX.
30080         timespec: remove dependence on ‘verify’
30081         * lib/timespec.h: Do not include verify.h; no longer needed.
30082         * modules/timespec (Depends-on): Remove ‘verify’.
30084         Optimize a few more three-valued comparisons
30085         * lib/timespec.h (timespec_cmp, timespec_sign):
30086         * lib/utimecmp.c (utimecmpat):
30087         Avoid conditional branches by using _GL_CMP.
30089         Fix _GL_CMP parenthesization typo
30090         * m4/gnulib-common.m4 (_GL_CMP): Properly parenthesize.
30092 2020-07-24  Bruno Haible  <bruno@clisp.org>
30094         dfa: Revert breaking gawk.
30095         Reported by Arnold Robbins <arnold@skeeve.com>.
30096         * lib/dfa.c (compare): Don't reference the _GL_CMP macro.
30098 2020-07-23  Bruno Haible  <bruno@clisp.org>
30100         Optimize three-valued comparison between integers.
30101         (a > b ? 1 : a < b ? -1 : 0) is the same as (a > b) - (a < b).
30102         * m4/gnulib-common.m4 (gl_COMMON): Define _GL_CMP.
30103         * lib/c-strcasecmp.c (c_strcasecmp): Use _GL_CMP.
30104         * lib/c-strncasecmp.c (c_strncasecmp): Likewise.
30105         * lib/dfa.c (compare): Likewise.
30106         * lib/fts.c (fts_compare_ino): Likewise.
30107         * lib/mbmemcasecmp.c (mbmemcasecmp): Likewise.
30108         * lib/mbscasecmp.c (mbscasecmp): Likewise.
30109         * lib/mbsncasecmp.c (mbsncasecmp): Likewise.
30110         * lib/memcasecmp.c (memcasecmp): Likewise.
30111         * lib/memcmp2.c (memcmp2): Likewise.
30112         * lib/savedir.c (direntry_cmp_inode): Likewise.
30113         * lib/strcasecmp.c (strcasecmp): Likewise.
30114         * lib/strncasecmp.c (strncasecmp): Likewise.
30115         * lib/unistr/u-cmp2.h (FUNC): Likewise.
30117 2020-07-23  Bruno Haible  <bruno@clisp.org>
30119         lchmod: Use /proc on Cygwin.
30120         * lib/lchmod.c (lchmod): Use /proc on Cygwin.
30122 2020-07-23  Ken Brown  <kbrown@cornell.edu>
30124         fchmodat: Use /proc on Cygwin
30125         * lib/fchmodat.c (fchmodat): Use /proc on Cygwin.
30127 2020-07-21  Bruno Haible  <bruno@clisp.org>
30129         aligned-malloc: Optionally use aligned_alloc.
30130         * lib/aligned-malloc.h: Verify the alignment.
30131         (aligned_malloc): Use aligned_alloc as an alternative.
30132         * modules/aligned-malloc (configure.ac): Test for aligned_alloc.
30133         * doc/posix-functions/aligned_alloc.texi: Mention the modules
30134         'aligned-malloc' and 'pagealign_alloc'.
30136 2020-07-21  Bruno Haible  <bruno@clisp.org>
30138         aligned-malloc: Add tests.
30139         * tests/test-aligned-malloc.c: New file.
30140         * modules/aligned-malloc-tests: New file.
30142         aligned-malloc: New module.
30143         * lib/aligned-malloc.h: New file.
30144         * m4/malloc-align.m4: New file.
30145         * modules/aligned-malloc: New file.
30146         * doc/posix-functions/posix_memalign.texi: Mention the new module.
30147         * doc/glibc-functions/memalign.texi: Likewise.
30149 2020-07-21  Bruno Haible  <bruno@clisp.org>
30151         inttypes: Fix PRI*PTR and SCN*PTR on 64-bit native Windows.
30152         * m4/inttypes.m4 (gl_INTTYPES_PRI_SCN): On 64-bit native Windows, make
30153         sure PRIPTR_PREFIX is defined to "ll", not "l".
30155 2020-07-21  Bruno Haible  <bruno@clisp.org>
30157         printf-posix: Make an autoconf test more future-proof.
30158         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_N): Include <inttypes.h> before
30159         using uintptr_t.
30161 2020-07-20  Bruno Haible  <bruno@clisp.org>
30163         list, oset, omap: Relicense some of the container modules under LGPLv2+.
30164         * modules/list (License): Change to LGPLv2+.
30165         * modules/array-list (License): Likewise.
30166         * modules/carray-list (License): Likewise.
30167         * modules/linked-list (License): Likewise.
30168         * modules/avltree-list (License): Likewise.
30169         * modules/rbtree-list (License): Likewise.
30170         * modules/oset (License): Likewise.
30171         * modules/array-oset (License): Likewise.
30172         * modules/avltree-oset (License): Likewise.
30173         * modules/rbtree-oset (License): Likewise.
30174         * modules/omap (License): Likewise.
30175         * modules/array-omap (License): Likewise.
30176         * modules/avltree-omap (License): Likewise.
30177         * modules/rbtree-omap (License): Likewise.
30179 2020-07-20  Bruno Haible  <bruno@clisp.org>
30181         oset: Add an 'update' operation.
30182         * lib/gl_array_oset.c (gl_array_update): New function.
30183         (gl_array_oset_implementation): Use it.
30184         * lib/gl_avltree_omap.c (NODE_PAYLOAD_DISPOSE): Add parameters.
30185         * lib/gl_rbtree_omap.c (NODE_PAYLOAD_DISPOSE): Add parameters.
30186         * lib/gl_avltree_ordered.h (gl_tree_add_node_before): New function,
30187         extracted from gl_tree_nx_add_before.
30188         (gl_tree_nx_add_before): Invoke it.
30189         (gl_tree_add_node_after): New function, extracted from
30190         gl_tree_nx_add_after.
30191         (gl_tree_nx_add_after): Invoke it.
30192         (gl_tree_remove_node_no_free): New function, extracted from
30193         gl_tree_remove_node.
30194         (gl_tree_remove_node): Invoke it.
30195         * lib/gl_rbtree_ordered.h (gl_tree_add_node_before): New function,
30196         extracted from gl_tree_nx_add_before.
30197         (gl_tree_nx_add_before): Invoke it.
30198         (gl_tree_add_node_after): New function, extracted from
30199         gl_tree_nx_add_after.
30200         (gl_tree_nx_add_after): Invoke it.
30201         (gl_tree_remove_node_no_free): New function, extracted from
30202         gl_tree_remove_node.
30203         (gl_tree_remove_node): Invoke it.
30204         * lib/gl_anytree_oset.h (gl_tree_next_node): New function, extracted
30205         from gl_tree_iterator_next.
30206         (gl_tree_iterator_next): Invoke it.
30207         (gl_tree_prev_node, gl_tree_update): New functions.
30208         * lib/gl_avltree_oset.c (NODE_PAYLOAD_DISPOSE): Add parameters.
30209         (gl_avltree_oset_implementation): Use gl_tree_update.
30210         * lib/gl_rbtree_oset.c (NODE_PAYLOAD_DISPOSE): Add parameters.
30211         (gl_rbtree_oset_implementation): Use gl_tree_update.
30212         * lib/gl_oset.h (struct gl_oset_implementation): Add 'update' member.
30213         (gl_oset_update): New function.
30214         * lib/gl_oset.hh (gl_OSet): Add 'update' member.
30215         * modules/avltree-oset (configure.ac): Require AC_C_INLINE.
30216         * modules/rbtree-oset (configure.ac): Likewise.
30217         * tests/test-oset-update.h: New file.
30218         * tests/test-array_oset.c: Include test-oset-update.h.
30219         (main): Invoke test_update.
30220         * tests/test-avltree_oset.c: Likewise.
30221         * tests/test-rbtree_oset.c: Likewise.
30222         * modules/array-oset-tests (Files): Add tests/test-oset-update.h.
30223         * modules/avltree-oset-tests (Files): Likewise.
30224         * modules/rbtree-oset-tests (Files): Likewise.
30225         * tests/test-oset-c++.cc (action): New function.
30226         (main): Test the 'update' member function.
30228 2020-07-15  Paul Eggert  <eggert@cs.ucla.edu>
30230         md5, sha1, sha256, sha512: pacify Autoconf 2.70
30231         * m4/gl-openssl.m4 (gl_CRYPTO_CHECK): Use m4_if rather than a
30232         shell if, so that the argument to AC_CHECK_HEADERS is
30233         a simple string that does not require shell evaluation.
30234         This fixes a warning generated by Autoconf 2.69b.
30236 2020-07-12  Bruno Haible  <bruno@clisp.org>
30238         libgmp: Avoid warning when --without-libgmp is used.
30239         * lib/mini-gmp-gnulib.c: Ignore -Wsuggest-attribute=malloc only for
30240         GCC >= 8, not for GCC >= 4.6.
30242 2020-07-12  Bruno Haible  <bruno@clisp.org>
30244         libgmp: Link to the correct shared library.
30245         * m4/libgmp.m4 (gl_LIBGMP): Invoke AC_LIB_HAVE_LINKFLAGS.
30246         * modules/libgmp (Depends-on): Add havelib.
30247         (Link): Mention $(LIBGMP) and $(LTLIBGMP).
30248         * modules/libgmp-tests (Makefile.am): Link test-libgmp with $(LIBGMP).
30250 2020-07-12  Bruno Haible  <bruno@clisp.org>
30252         libgmp tests: Add some safety checks.
30253         * modules/libgmp-tests (Depends-on): Add verify.
30254         * tests/test-libgmp.c: Verify GMP_NUMB_BITS value.
30255         (main): Verify that gmp.h and libgmp versions match.
30257 2020-07-10  Bruno Haible  <bruno@clisp.org>
30259         unicodeio: Fix wrong result on NetBSD.
30260         * lib/unicodeio.c (unicode_to_mb): Handle question mark fallback
30261         characters also on NetBSD.
30263 2020-07-09  Bruno Haible  <bruno@clisp.org>
30265         unicodeio: Fix wrong result on Solaris 11.
30266         Reported by Kiyoshi Kanazawa <yoi_no_myoujou@yahoo.co.jp>
30267         via Akim Demaille <akim.demaille@gmail.com> in
30268         <https://lists.gnu.org/archive/html/bug-gnulib/2020-07/msg00036.html>.
30269         * lib/unicodeio.c (unicode_to_mb): Handle question mark fallback
30270         characters on Solaris.
30271         * tests/test-unicodeio.c (main): In the "C" locale, expect either the
30272         UTF-8 output or the specified fallback.
30274 2020-07-08  Bruno Haible  <bruno@clisp.org>
30276         unicodeio: Add tests.
30277         * tests/test-unicodeio.c: New file.
30278         * tests/test-unicodeio1.sh: New file.
30279         * tests/test-unicodeio2.sh: New file.
30280         * tests/test-unicodeio3.sh: New file.
30281         * modules/unicodeio-tests: New file.
30283 2020-07-08  Bruno Haible  <bruno@clisp.org>
30285         unicodeio: Document link requirements.
30286         * modules/unicodeio (Link): New section.
30288 2020-07-07  Bruno Haible  <bruno@clisp.org>
30290         doc: Remove support for some very old platforms.
30291         * doc/posix-functions/memcmp.texi: Don't mention "older platforms".
30292         * doc/posix-functions/memcpy.texi: Likewise.
30293         * doc/posix-functions/memmove.texi: Likewise.
30294         * doc/posix-functions/memset.texi: Likewise.
30295         * doc/posix-functions/getcwd.texi: Likewise.
30297         memchr: Remove support for some very old platforms.
30298         * m4/memchr-obsolete.m4: Remove file.
30299         * modules/memchr-obsolete: Remove file.
30300         * m4/memchr.m4 (gl_FUNC_MEMCHR): Assume module 'memchr-obsolete' is
30301         absent. Don't define HAVE_MEMCHR.
30302         * lib/string.in.h (memchr): Assume HAVE_MEMCHR is 1.
30303         * modules/memchr (Depends-on): Remove memchr-obsolete.
30304         (configure.ac): Assume HAVE_MEMCHR is 1.
30305         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Don't initialize
30306         HAVE_MEMCHR.
30307         * modules/string (Makefile.am): Don't substitute HAVE_MEMCHR.
30308         * doc/posix-functions/memchr.texi: Don't mention module
30309         'memchr-obsolete'.
30310         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR_SIMPLE): Assume HAVE_MEMCHR is 1.
30311         * m4/strstr.m4 (gl_FUNC_STRSTR_SIMPLE): Assume HAVE_MEMCHR is 1.
30312         * modules/strnlen (Depends-on): Remove memchr-obsolete.
30314         dup2: Remove support for some very old platforms.
30315         * m4/dup2-obsolete.m4: Remove file.
30316         * modules/dup2-obsolete: Remove file.
30317         * m4/dup2.m4 (gl_FUNC_DUP2): Assume module 'dup2-obsolete' is absent.
30318         Don't define HAVE_DUP2.
30319         * lib/unistd.in.h (dup2): Assume HAVE_DUP2 is 1.
30320         * lib/dup2.c: Likewise.
30321         * modules/dup2 (Depends-on, configure.ac): Likewise.
30322         (Depends-on): Remove dup2-obsolete.
30323         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Don't initialize HAVE_DUP2.
30324         * modules/unistd (Makefile.am): Don't substitute HAVE_DUP2.
30325         * doc/posix-functions/dup2.texi: Don't mention module 'dup2-obsolete'.
30327 2020-07-07  Bruno Haible  <bruno@clisp.org>
30329         canonicalize: Trim module dependencies.
30330         * lib/hash-triple.h: Group declarations.
30331         * lib/hash-triple-simple.c: New file, extracted from lib/hash-triple.c.
30332         * lib/hash-triple.c: Don't include <stdlib.h>, <string.h>, hash-pjw.h.
30333         (STREQ): Remove macro.
30334         (triple_hash, triple_compare_ino_str, triple_free): Remove functions.
30335         * modules/hash-triple-simple: New file, based on modules/hash-triple.
30336         * modules/hash-triple (Files): Remove lib/hash-triple.h.
30337         (Depends-on): Add hash-triple-simple. Remove hash-pjw.
30338         * modules/canonicalize (Depends-on): Remove hash-triple. Add
30339         hash-triple-simple.
30340         * modules/file-set (Depends-on): Likewise.
30342 2020-07-07  Bruno Haible  <bruno@clisp.org>
30344         Clarify dependencies to double-slash-root.
30345         * modules/canonicalize (Files): Remove m4/double-slash-root.m4.
30346         (Depends-on): Add double-slash-root.
30347         * modules/canonicalize-lgpl (Depends-on): Add double-slash-root.
30348         * modules/dirname-lgpl (Depends-on): Add double-slash-root.
30350 2020-07-06  Paul Eggert  <eggert@cs.ucla.edu>
30352         libgmp: new module
30353         The idea is to let programs simply include <gmp.h>, and
30354         so long as they live within the mini-gmp subset they need
30355         not worry about whether the GMP libraries are installed.
30356         * MODULES.html.sh: Mention it.
30357         * config/srclist.txt: Mention files copied from GMP source.
30358         * config/srclistvars.sh (GMP): New var.
30359         * lib/mini-gmp-gnulib.c, m4/libgmp.m4, modules/libgmp:
30360         * modules/libgmp-tests, tests/test-libgmp.c: New files.
30361         * lib/mini-gmp.c, lib/mini-gmp.h: New files, copied from GMP.
30363 2020-07-05  Bruno Haible  <bruno@clisp.org>
30365         mkancesdirs: Trim module dependencies.
30366         * lib/mkancesdirs.c: Include filename.h instead of dirname.h.
30367         * modules/mkancesdirs (Depends-on): Remove dirname-lgpl. Add filename.
30369 2020-07-05  Bruno Haible  <bruno@clisp.org>
30371         getprogname: Trim module dependencies.
30372         * lib/getprogname.c: Include basename-lgpl.h instead of dirname.h.
30373         * modules/getprogname (Depends-on): Remove dirname-lgpl. Add
30374         basename-lgpl.
30376 2020-07-05  Bruno Haible  <bruno@clisp.org>
30378         filenamecat-lgpl: Trim module dependencies.
30379         * lib/filenamecat-lgpl.c: Include basename-lgpl.h, filename.h instead of
30380         dirname.h.
30381         * modules/filenamecat-lgpl (Depends-on): Remove dirname-lgpl. Add
30382         basename-lgpl, filename.
30384 2020-07-05  Bruno Haible  <bruno@clisp.org>
30386         backupfile, backup-rename: Trim module dependencies.
30387         * lib/backupfile.c: Include basename-lgpl.h instead of dirname.h.
30388         * modules/backupfile (Depends-on): Remove dirname-lgpl. Add
30389         basename-lgpl.
30390         * modules/backup-rename (Depends-on): Likewise.
30392 2020-07-05  Bruno Haible  <bruno@clisp.org>
30394         argp: Trim module dependencies.
30395         * lib/argp-namefrob.h: Include basename-lgpl.h instead of dirname.h.
30396         * modules/argp (Depends-on): Remove dirname-lgpl. Add basename-lgpl.
30398 2020-07-05  Bruno Haible  <bruno@clisp.org>
30400         basename-lgpl: New module.
30401         * lib/basename-lgpl.h: New file, based on lib/dirname.h and
30402         lib/basename-lgpl.c.
30403         * lib/basename-lgpl.c: Include basename-lgpl.h, not dirname.h. Include
30404         <stdbool.h>, filename.h.
30405         (last_component): Rename a local variable.
30406         * lib/dirname.h: Include basename-lgpl.h.
30407         (DOUBLE_SLASH_IS_DISTINCT_ROOT): Remove macro.
30408         (last_component, base_len): Remove declarations.
30409         * modules/basename-lgpl: New file.
30410         * modules/dirname-lgpl (Files): Remove lib/basename-lgpl.c.
30411         (Depends-on): Add basename-lgpl. Remove double-slash-root.
30412         (Makefile.am): Don't compile basename-lgpl.c.
30413         * doc/posix-functions/basename.texi: Mention the module 'basename-lgpl',
30414         not 'dirname'.
30416 2020-07-05  Bruno Haible  <bruno@clisp.org>
30418         dirname, dirname-lgpl: Simplify.
30419         * m4/dirname.m4: Remove file.
30420         * modules/dirname (configure.ac): Don't invoke gl_DIRNAME.
30421         * modules/dirname-lgpl (Files): Remove m4/dirname.m4.
30422         (configure.ac): Don't invoke gl_DIRNAME_LGPL.
30424 2020-07-05  Bernhard Voelker  <mail@bernhard-voelker.de>
30426         tests: avoid shadowing warning
30427         * tests/test-memchr.c (main): Give page_boundary variable a tight scope.
30429 2020-07-05  Bruno Haible  <bruno@clisp.org>
30431         supersede: Add tests.
30432         * tests/test-supersede.c: New file.
30433         * tests/test-supersede-open.h: New file.
30434         * tests/test-supersede-fopen.h: New file.
30435         * modules/supersede-tests: New file.
30437         supersede: New module.
30438         * lib/supersede.h: New file.
30439         * lib/supersede.c: New file.
30440         * m4/supersede.m4: New file.
30441         * modules/supersede: New file.
30443 2020-07-05  Bruno Haible  <bruno@clisp.org>
30445         Add some copyright headers.
30446         * lib/dev-ino.h: Add copyright header.
30447         * lib/di-set.h: Likewise.
30448         * lib/fchown-stub.c: Likewise.
30449         * lib/file-set.h: Likewise.
30450         * lib/hash-triple.h: Likewise.
30451         * lib/idcache.h: Likewise.
30452         * lib/ino-map.h: Likewise.
30453         * lib/mkancesdirs.h: Likewise.
30454         * lib/scratch_buffer.h: Likewise.
30455         * lib/se-context.in.h: Likewise.
30456         * lib/stdopen.h: Likewise.
30457         * lib/userspec.h: Likewise.
30459 2020-07-04  Bruno Haible  <bruno@clisp.org>
30461         getrandom: Relicense under LGPLv2+.
30462         Paul Eggert's approval is in
30463         <https://lists.gnu.org/archive/html/bug-gnulib/2020-07/msg00023.html>.
30464         * modules/getrandom (License): Change to LGPLv2+.
30466 2020-07-04  Bruno Haible  <bruno@clisp.org>
30468         getumask: Add tests.
30469         * tests/test-getumask.c: New file.
30470         * modules/getumask-tests: New file.
30472         getumask: New module.
30473         * lib/sys_stat.in.h (getumask): New declaration.
30474         * lib/getumask.c: New file.
30475         * m4/getumask.m4: New file.
30476         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Test whether getumask is
30477         declared.
30478         (gl_SYS_STAT_H_DEFAULTS): Initialize GNULIB_GETUMASK, HAVE_GETUMASK.
30479         * modules/sys_stat (Makefile.am): Substitute GNULIB_GETUMASK,
30480         HAVE_GETUMASK.
30481         * modules/getumask: New file.
30482         * tests/test-sys_stat-c++.cc (getumask): Check signature.
30483         * doc/glibc-functions/getumask.texi: New file.
30484         * doc/gnulib.texi (Glibc sys/stat.h): Include it.
30486 2020-07-04  Bruno Haible  <bruno@clisp.org>
30488         clean-temp: Add support for temporary files with given mode.
30489         * lib/clean-temp.h (gen_register_open_temp): Add mode argument.
30490         * lib/clean-temp.c (struct try_create_file_params): New type.
30491         (try_create_file): New function.
30492         (gen_register_open_temp): Add mode argument. Use try_tempname instead of
30493         gen_tempname.
30495 2020-07-04  Bruno Haible  <bruno@clisp.org>
30497         clean-temp: Document limitations.
30498         * lib/clean-temp.h: Document limitations.
30500 2020-07-04  Bruno Haible  <bruno@clisp.org>
30502         clean-temp: Add support for temporary files with unpredictable names.
30503         * lib/clean-temp.h (gen_register_open_temp): New declaration.
30504         * lib/clean-temp.c: Include tempname.h.
30505         (gen_register_open_temp): New function.
30506         * modules/tempname (configure.ac): Define a module indicator.
30508 2020-07-04  Bruno Haible  <bruno@clisp.org>
30510         clean-temp: Add support for temporary files anywhere in the file system.
30511         * lib/clean-temp.h (register_temporary_file, unregister_temporary_file,
30512         cleanup_temporary_file): New declarations.
30513         * lib/clean-temp.c (file_cleanup_list_lock, file_cleanup_list): New
30514         variables.
30515         (dir_cleanup_list_lock): Renamed from cleanup_list_lock.
30516         (dir_cleanup_list): Renamed from cleanup_list.
30517         (cleanup_action): Process the file_cleanup_list as well.
30518         (do_init_clean_temp): New function.
30519         (clean_temp_once): New variable.
30520         (init_clean_temp): New function.
30521         (create_temp_dir): Invoke it.
30522         (register_temporary_file, unregister_temporary_file,
30523         cleanup_temporary_file): New functions.
30524         (do_unlink, do_rmdir): Remove 'dir' argument. Add 'cleanup_verbose'
30525         argument.
30527 2020-07-04  Bruno Haible  <bruno@clisp.org>
30529         clean-temp: Improve comments.
30530         * lib/clean-temp.h (open_temp, fopen_temp, close_temp, fclose_temp,
30531         fwriteerror_temp, close_stream_temp): Clarify intended use.
30532         * lib/clean-temp.c: Likewise.
30534 2020-07-04  Bruno Haible  <bruno@clisp.org>
30536         clean-temp: Make multithread-safe, part 2.
30537         * lib/fatal-signal.h: Include <signal.h>.
30538         (get_fatal_signal_set): New declaration.
30539         * lib/fatal-signal.c (get_fatal_signal_set): New function.
30540         * lib/clean-temp.c: Include asyncsafe-spin.h, gl_linked_list.h.
30541         (struct closeable_fd): New type.
30542         (fatal_signal_set): New variable.
30543         (init_fatal_signal_set): New function.
30544         (asyncsafe_close, asyncsafe_fclose_variant): New functions.
30545         (cleanup_action): Invoke asyncsafe_close instead of close.
30546         (create_temp_dir): Invoke init_fatal_signal_set.
30547         (register_fd): Use a plain linked list. Add a 'struct closeable_fd *'
30548         element.
30549         (unregister_fd): Remove function.
30550         (close_temp): Cleanup descriptors list on the fly. Invoke
30551         init_fatal_signal_set. Invoke asyncsafe_close instead of close.
30552         (fclose_variant_temp): New function.
30553         (fclose_temp, fwriteerror_temp, close_stream_temp): Use it.
30554         * modules/clean-temp (Depends-on): Add asyncsafe-spin, linked-list.
30556 2020-07-04  Bruno Haible  <bruno@clisp.org>
30558         clean-temp: Make multithread-safe, part 1.
30559         * lib/clean-temp.c: Include glthread/lock.h.
30560         (cleanup_list_lock): New variable.
30561         (register_temp_file, unregister_temp_file, register_temp_subdir,
30562         unregister_temp_subdir, cleanup_temp_dir_contents): Use it.
30563         (create_temp_dir): Likewise. Don't free the old array.
30564         (descriptors_lock): New variable.
30565         (register_fd, unregister_fd): Use it.
30566         * modules/clean-temp (Depends-on): Add lock.
30568 2020-07-04  Bruno Haible  <bruno@clisp.org>
30570         fatal-signal: Make multithread-safe.
30571         * lib/fatal-signal.c (init_fatal_signals): Add comment.
30572         (do_init_fatal_signal_set): New function, extracted from
30573         init_fatal_signal_set.
30574         (fatal_signal_set_once): New variable.
30575         (init_fatal_signal_set): Use gl_once.
30577 2020-07-03  Bruno Haible  <bruno@clisp.org>
30579         getrandom: Fix compilation error on native Windows (regr. 2020-06-28).
30580         * lib/getrandom.c: Don't include <ntdef.h>. Instead, define NTSTATUS.
30581         * m4/getrandom.m4 (gl_FUNC_GETRANDOM): Include <windows.h> before
30582         <bcrypt.h>.
30584 2020-07-03  Bruno Haible  <bruno@clisp.org>
30586         dfa tests: Follow common file naming conventions.
30587         * tests/test-dfa-match-aux.c: Renamed from tests/dfa-match-aux.c.
30588         * tests/test-dfa-match.sh: Renamed from tests/dfa-match.sh. Update.
30589         * tests/test-dfa-invalid-char-class.sh: Renamed from
30590         tests/dfa-invalid-char-class.sh. Update.
30591         * modules/dfa-tests (Files, Makefile.am): Update.
30593 2020-07-03  Bruno Haible  <bruno@clisp.org>
30595         asyncsafe-spin: Use GCC extended asm syntax for SunStudio 12 compiler.
30596         * lib/asyncsafe-spin.c (memory_barrier, atomic_compare_and_swap): Use
30597         the GCC extended asm syntax also for the Sun Studio 12 compilers.
30599 2020-07-03  Bruno Haible  <bruno@clisp.org>
30601         asyncsafe-spin: Reduce code duplication.
30602         * lib/asyncsafe-spin.c (do_lock, do_unlock): New functions.
30603         (asyncsafe_spin_lock, asyncsafe_spin_unlock): Use them.
30604         * modules/asyncsafe-spin (configure.ac): Require AC_C_INLINE.
30606 2020-07-03  Bruno Haible  <bruno@clisp.org>
30608         lchmod: Simplify after 2020-02-22 change.
30609         * m4/lchmod.m4 (gl_FUNC_LCHMOD): Don't require AC_C_INLINE.
30611 2020-07-03  Bruno Haible  <bruno@clisp.org>
30613         gen-uni-tables: Make sure the compiler does not barf on 'inline'.
30614         * modules/gen-uni-tables (configure.ac): Require AC_C_INLINE.
30616 2020-07-03  Bruno Haible  <bruno@clisp.org>
30618         dfa: Make sure the compiler does not barf on 'inline'.
30619         * modules/dfa (configure.ac): Require AC_C_INLINE.
30621 2020-07-03  Bruno Haible  <bruno@clisp.org>
30623         bitset: Make sure the compiler does not barf on 'inline'.
30624         * modules/bitset (configure.ac): New section.
30626 2020-07-01  Paul Eggert  <eggert@cs.ucla.edu>
30628         manywarnings: improve port to GCC 10.1
30629         * build-aux/gcc-warning.spec: Also list warnings that are default
30630         or are enabled by already-given flags.  This lets us speed up
30631         checking for attributes, and makes the generated compilation
30632         commands shorter.  Add -Wanalyzer-too-complex (too much noise).
30633         * m4/manywarnings.m4 (gl_MANYWARN_COMPLEMENT)
30634         (gl_MANYWARN_ALL_GCC): Use gl_AS_VAR_APPEND to append
30635         to shell variables that may have long values.
30636         (gl_MANYWARN_ALL_GCC): Omit flags that are default or are
30637         consequences of other flags, to speed up checking and
30638         shorten commands.
30640         tests: pacify gcc -fanalyzer on zerosize_ptr
30641         * tests/test-memcasecmp.c (main):
30642         * tests/test-memchr.c (main):
30643         * tests/test-memchr2.c (main):
30644         * tests/test-memcmp.c (main):
30645         * tests/test-memmem.c (main):
30646         * tests/test-memrchr.c (main):
30647         * tests/unistr/test-chr.h (main):
30648         * tests/unistr/test-cmp.h (test_cmp):
30649         Check whether zerosize_ptr returns NULL before using it.
30650         This pacifies GCC 10.1’s new fanalyzer option, and matches
30651         other uses of zerosize_ptr.
30653 2020-07-01  Bruno Haible  <bruno@clisp.org>
30655         asyncsafe-spin: Add tests.
30656         * tests/test-asyncsafe-spin1.c: New file.
30657         * tests/test-asyncsafe-spin2.c: New file, based on tests/test-lock.c and
30658         tests/test-pthread-spin.c.
30659         * modules/asyncsafe-spin-tests: New file.
30661 2020-07-01  Bruno Haible  <bruno@clisp.org>
30663         asyncsafe-spin: New module.
30664         * lib/asyncsafe-spin.h: New file.
30665         * lib/asyncsafe-spin.c: New file, based on lib/pthread-spin.c.
30666         * modules/asyncsafe-spin: New file.
30668 2020-07-01  Bruno Haible  <bruno@clisp.org>
30670         windows-spin: Fix race condition on multiprocessor systems.
30671         * lib/windows-spin.c (glwthread_spin_init): Add a memory barrier.
30673 2020-07-01  Bruno Haible  <bruno@clisp.org>
30675         pthread-spin: Add optimized fallback for GCC versions >= 4.1, < 4.7.
30676         * lib/pthread-spin.c (pthread_spin_init, pthread_spin_lock,
30677         pthread_spin_trylock, pthread_spin_unlock): For GCC >= 4.1, < 4.7, use
30678         an implementation based on other GCC built-ins.
30680 2020-07-01  Bruno Haible  <bruno@clisp.org>
30682         pthread-spin: Optimize fallback for GCC versions >= 4.7.
30683         * lib/pthread-spin.c (pthread_spin_init, pthread_spin_lock,
30684         pthread_spin_trylock, pthread_spin_unlock): Use a lock word instead of a
30685         lock byte.
30687 2020-07-01  Bruno Haible  <bruno@clisp.org>
30689         pthread-spin: Add error checking.
30690         * lib/pthread-spin.c: Include <stdbool.h>.
30691         (pthread_spin_init, pthread_spin_lock, pthread_spin_trylock,
30692         pthread_spin_unlock) [GCC>=4.7]: Prefer an implementation that verifies
30693         the unlocks.
30694         * modules/pthread-spin (Depends-on): Add stdbool.
30696 2020-07-01  Bruno Haible  <bruno@clisp.org>
30698         pthread-spin: Add tests.
30699         * tests/test-pthread-spin.c: New file, based on tests/test-lock.c.
30700         * modules/pthread-spin-tests: New file.
30702 2020-07-01  Bruno Haible  <bruno@clisp.org>
30704         tests: Reduce code duplication.
30705         * tests/atomic-int-posix.h: New file, extracted from
30706         tests/test-pthread-mutex.c.
30707         * tests/test-pthread-mutex.c: Include it. Remove the corresponding code.
30708         * tests/test-pthread-rwlock.c: Likewise.
30709         * modules/pthread-mutex-tests (Files): Add tests/atomic-int-posix.h.
30710         * modules/pthread-rwlock-tests (Files): Likewise.
30712 2020-07-01  Bruno Haible  <bruno@clisp.org>
30714         tests: Refactor.
30715         * tests/atomic-int-isoc.h: New file, extracted from tests/test-mtx.c.
30716         * tests/test-mtx.c: Include it. Remove the corresponding code.
30717         * modules/mtx-tests (Files): Add tests/atomic-int-isoc.h.
30719 2020-07-01  Bruno Haible  <bruno@clisp.org>
30721         tests: Refactor.
30722         * tests/atomic-int-gnulib.h: New file, extracted from tests/test-lock.c.
30723         * tests/test-lock.c: Include it. Remove the corresponding code.
30724         * modules/lock-tests (Files): Add tests/atomic-int-gnulib.h.
30726 2020-06-29  Bruno Haible  <bruno@clisp.org>
30728         sys_socket: Don't define socklen_t if it is already defined on mingw.
30729         Reported by Keith Marshall <keith.d.marshall@ntlworld.com> in
30730         <https://savannah.gnu.org/bugs/?57725>,
30731         by Rahul Das <bokul_4u@yahoo.com> in
30732         <https://lists.gnu.org/archive/html/bug-gnulib/2020-04/msg00081.html>,
30733         and by Eli Zaretskii <eliz@gnu.org> in
30734         <https://lists.gnu.org/archive/html/bug-gnulib/2020-06/msg00068.html>.
30735         * lib/sys_socket.in.h (socklen_t): Remove definition.
30737 2020-06-29  Bruno Haible  <bruno@clisp.org>
30739         alloca-opt: Fix warning on mingw.
30740         Reported and solution by Eli Zaretskii <eliz@gnu.org> in
30741         <https://lists.gnu.org/archive/html/bug-gnulib/2020-06/msg00069.html>.
30742         * lib/alloca.in.h: On mingw, include <alloca.h> and then test again
30743         whether alloca is defined.
30745 2020-06-28  Paul Eggert  <eggert@cs.ucla.edu>
30747         getrandom: do not depend on ‘open’ on mingw
30748         Similarly for at-internal, getloadavg.  These modules do not call
30749         the ‘open’ function when they are compiled on mingw.  On mingw,
30750         this avoids having to compile open.c when building Emacs, which
30751         does its own thing with ‘open’.
30752         * modules/at-internal, modules/getloadavg, modules/getrandom:
30753         (Depends-on): Don’t depend on ‘open’ on mingw.
30754         (Depends-on): Require AC_CANONICAL_HOST, for host_os.
30755         * modules/getloadavg (Depends-on):
30756         Depend on intprops, open, stdbool, stdlib only if compiling
30757         getloadavg.c.
30759 2020-06-28  Bruno Haible  <bruno@clisp.org>
30761         doc: Add a note about sigprocmask vs. pthread_sigmask.
30762         * doc/posix-functions/sigprocmask.texi: Add note.
30764 2020-06-28  Bruno Haible  <bruno@clisp.org>
30766         getrandom: Fix compilation errors on older versions of mingw.
30767         Reported by Eli Zaretskii <eliz@gnu.org> in
30768         <https://lists.gnu.org/archive/html/bug-gnulib/2020-06/msg00059.html>.
30769         * m4/getrandom.m4 (gl_FUNC_GETRANDOM): Test whether <bcrypt.h> exists.
30770         * lib/getrandom.c: If <bcrypt.h> is not available, include <ntdef.h> and
30771         define/declare BCRYPT_ALG_HANDLE, BCRYPT_USE_SYSTEM_PREFERRED_RNG,
30772         BCryptGenRandom ourselves.
30774 2020-06-28  Bruno Haible  <bruno@clisp.org>
30776         clean-temp: Fix wrong errno in error message.
30777         * lib/clean-temp.c (create_temp_dir): Save errno around
30778         unblock_fatal_signals call.
30780 2020-06-27  Bruno Haible  <bruno@clisp.org>
30782         fatal-signal: Make multithread-safe.
30783         * lib/fatal-signal.c (at_fatal_signal): Don't free the old actions array.
30785 2020-06-27  Bruno Haible  <bruno@clisp.org>
30787         clean-temp: Don't force deletion of temporary files on native Windows.
30788         * lib/clean-temp.h (open_temp, fopen_temp): Add delete_on_close
30789         argument.
30790         * lib/clean-temp.c (open_temp, fopen_temp): Likewise.
30791         * NEWS: Mention the change.
30792         * lib/javacomp.c (write_temp_file): Update.
30794 2020-06-27  Bruno Haible  <bruno@clisp.org>
30796         fatal-signal: Make multithread-safe.
30797         * lib/fatal-signal.c: Include glthread/lock.h.
30798         (at_fatal_signal_lock): New variable.
30799         (at_fatal_signal): Use it.
30800         (fatal_signals_block_lock, fatal_signals_block_counter): New variables.
30801         (block_fatal_signals, unblock_fatal_signals): Use them.
30802         * modules/fatal-signal (Depends-on): Add lock.
30804 2020-06-27  Paul Eggert  <eggert@cs.ucla.edu>
30806         getloadavg: don’t depend on fopen-gnu
30807         This is for Emacs, which does not need fopen-gnu for anything else,
30808         and which would need it only on a NetBSD platform where getloadavg
30809         does not work (does that even happen?).
30810         * lib/getloadavg.c (getloadavg) [__NetBSD__]: Use open, not fopen.
30811         * modules/getloadavg (Depends-on): Remove fopen-gnu.
30813         * tests/test-getloadavg.c (main): Fix typo.
30815 2020-06-27  Bruno Haible  <bruno@clisp.org>
30817         tempname et al.: Fix link errors on MSVC (regression from 2020-05-31).
30818         * modules/tempname (Link): New section.
30819         * modules/mkdtemp (Link): Likewise.
30820         * modules/clean-temp (Link): Likewise.
30821         * modules/mkstemp (Link): Likewise.
30822         * modules/stdlib-safer (Link): Likewise.
30823         * modules/mkstemps (Link): Likewise.
30824         * modules/mkostemp (Link): Likewise.
30825         * modules/mkostemps (Link): Likewise.
30826         * modules/tmpfile (Link): Likewise.
30827         * modules/tmpfile-safer (Link): Likewise.
30828         * modules/javacomp (Link): Add $(LIB_GETRANDOM).
30829         * modules/argv-iter-tests (Makefile.am): Link test-argv-iter with
30830         $(LIB_GETRANDOM).
30831         * NEWS: Mention the changes.
30833 2020-06-27  Bruno Haible  <bruno@clisp.org>
30835         fopen-gnu: Simplify code.
30836         * lib/fopen.c: Include <stdbool.h>.
30837         (rpl_fopen): Use a single variable open_flags instead of
30838         open_flags_standard and open_flags_gnu. Make open_flags_gnu a bool.
30839         * modules/fopen (Depends-on): Add stdbool.
30841 2020-06-26  Bruno Haible  <bruno@clisp.org>
30843         canonicalize: Improve documentation.
30844         * lib/canonicalize.h (canonicalize_filename_mode): Document the failure
30845         return convention.
30847 2020-06-26  Bruno Haible  <bruno@clisp.org>
30849         xgetcwd: Improve documentation.
30850         * lib/xgetcwd.c (xgetcwd): Document the failure return convention.
30852 2020-06-26  Bruno Haible  <bruno@clisp.org>
30854         getcwd: Improve documentation.
30855         * lib/getcwd.c (__getcwd): Document the failure return convention.
30857 2020-06-26  Bruno Haible  <bruno@clisp.org>
30859         fchdir: Improve documentation.
30860         * lib/fchdir.c (get_name, _gl_register_fd): Document the failure return
30861         convention.
30863 2020-06-26  Bruno Haible  <bruno@clisp.org>
30865         filenamecat-lgpl: Set errno upon failure.
30866         * lib/filenamecat-lgpl.c (mfile_name_concat): Document the failure
30867         return convention.
30868         * modules/filenamecat-lgpl (Depends-on): Add malloc-posix.
30870 2020-06-26  Bruno Haible  <bruno@clisp.org>
30872         areadlink-with-size: Set errno upon failure.
30873         * lib/areadlink-with-size.c (areadlink_with_size): Set errno when malloc
30874         fails.
30875         * lib/areadlinkat-with-size.c (areadlinkat_with_size): Add comment.
30877 2020-06-26  Bruno Haible  <bruno@clisp.org>
30879         copy-file: Shrink dependencies.
30880         * modules/copy-file (Depends-on): Remove acl. Add acl-permissions,
30881         qcopy-acl.
30883 2020-06-26  Bruno Haible  <bruno@clisp.org>
30885         doc: Mention declaration fixes implemented by some modules.
30886         * doc/posix-functions/chdir.texi: Mention the module 'chdir'.
30887         * doc/posix-functions/close.texi: Mention that Gnulib makes the function
30888         declaration appear in <unistd.h>.
30889         * doc/posix-functions/dup.texi: Likewise.
30890         * doc/posix-functions/dup2.texi: Likewise.
30891         * doc/posix-functions/gethostname.texi: Likewise.
30892         * doc/posix-functions/isatty.texi: Likewise.
30893         * doc/posix-functions/lseek.texi: Likewise.
30894         * doc/posix-functions/unlink.texi: Likewise.
30895         * doc/posix-functions/read.texi: Mention the module 'read'.
30896         * doc/posix-functions/write.texi: Mention the effects of the module
30897         'write'.
30899 2020-06-25  Marc Nieper-Wißkirchen  <marc@nieper-wisskirchen.de>
30901         c-dtoastr, c-ldtoastr: new modules
30902         These modules provide the same functionality as the modules
30903         dtoastr and ldtoastr except for the formatting taking place in the
30904         C locale.
30905         * MODULES.html.sh: Add c-dtoastr and c-ldtoastr.
30906         * lib/c-dtoastr.c, lib/c-ldtoastr.c: New files.
30907         * lib/ftoastr.c: Prefix exported functions when the macro C_LOCALE is
30908         defined.  Use c_snprintf and c_strtod/c_strtold instead of
30909         snprintf and strtod/strtold whhen the macro C_LOCALE is defined.
30910         * lib/ftoastr.h: Add prototypes for c_dtoastr and c_ldtoastr.
30911         * modules/c-dtoastr, modules/c-dtoastr-tests, modules/c-ldtoastr,
30912         modules/c-ldtoastr-tests: New files.
30913         * tests/test-c-dtoastr.c, tests/test-c-dtoastr.sh,
30914         tests-c-ldtoastr.c tests-c-ldtoastr.sh: New files.
30916 2020-06-21  Bruno Haible  <bruno@clisp.org>
30918         tzset: Fix compilation warnings on mingw (regression from 2017-05-01).
30919         * lib/tzset.c: Include <stdlib.h>, <string.h>.
30921 2020-06-16  Bruno Haible  <bruno@clisp.org>
30923         thread: Avoid possible compiler warnings in uses of gl_thread_exit.
30924         * lib/glthread/thread.h (gl_thread_exit): Add a cast to void.
30926 2020-06-16  Bruno Haible  <bruno@clisp.org>
30928         thread, thrd: Avoid a compiler warning.
30929         * lib/windows-thread.h (glwthread_thread_exit): Mark as non-returning.
30931 2020-06-16  Biswapriyo Nath  <nathbappai@gmail.com>  (tiny change)
30933         windows-thread: Avoid a compiler warning.
30934         * lib/windows-thread.h (glwthread_thread_exit): Change return type to
30935         void.
30936         * lib/windows-thread.c (glwthread_thread_exit): Likewise.
30938 2020-06-15  Bruno Haible  <bruno@clisp.org>
30940         unictype/joininggroup-name: Fix warning on 64-bit mingw.
30941         Reported by Biswapriyo Nath <nathbappai@gmail.com> in
30942         <https://lists.gnu.org/archive/html/bug-gnulib/2020-06/msg00036.html>.
30943         * lib/unictype/joininggroup_name.c (ELEM): Cast struct offset to size_t
30944         first.
30946 2020-06-06  Bruno Haible  <bruno@clisp.org>
30948         calloc-gnu tests: Avoid a test failure with clang.
30949         * tests/test-calloc-gnu.c (main): Mark the pointer variable as
30950         'volatile', to defeat compiler optimizations.
30952 2020-06-01  Paul Eggert  <eggert@cs.ucla.edu>
30954         getloadavg: fix double-increment bug
30955         * lib/getloadavg.c (getloadavg): Fix double-increment typo on
30956         Linux without glibc, Android, Cygwin.  This fixes a bug I
30957         introduced in 2011-02-08T20:23:29Z!eggert@cs.ucla.edu.
30958         Problem and fix reported by Semen Verchenko in:
30959         https://lists.gnu.org/r/bug-gnulib/2020-06/msg00007.html
30961         tempname: use getrandom, not getentropy
30962         This removes a dependency, as getentropy depends on getrandom.
30963         * lib/tempname.c: Include sys/random.h instead of unistd.h.
30964         (RANDOM_BITS) [!_LIBC]: Use getrandom, not getentropy.
30965         * modules/tempname (Depends-on): Depend on getrandom, not getentropy.
30967 2020-06-01  Bruno Haible  <bruno@clisp.org>
30969         doc: New chapter 'Multithreading'.
30970         * doc/multithread.texi: New file.
30971         * doc/gnulib.texi: Include it.
30973 2020-06-01  Bruno Haible  <bruno@clisp.org>
30975         doc: Move 'Running self-tests under valgrind' section.
30976         * doc/gnulib.texi (Build Infrastructure Modules): Include
30977         valgrind-tests.texi here...
30978         (Miscellaneous Notes): ... not here.
30980 2020-06-01  Bruno Haible  <bruno@clisp.org>
30982         doc: Move 'Visual Studio Compatibility' section.
30983         * doc/gnulib.texi (Native Windows Support): Include ld-output-def.texi
30984         here...
30985         (Build Infrastructure Modules): ... not here.
30987 2020-06-01  Paul Eggert  <eggert@cs.ucla.edu>
30989         doc: improve randomness discussion
30990         Inspired by comments from Jeffrey Walton in:
30991         https://lists.gnu.org/r/bug-gnulib/2020-06/msg00002.html
30992         * doc/glibc-functions/getentropy.texi (getentropy):
30993         * doc/glibc-functions/getrandom.texi (getrandom):
30994         Improve discussion of problems with "random" data,
30995         and cite Ristenpart & Yilek.  Also, mention GRND_INSECURE.
30997 2020-06-01  Bruno Haible  <bruno@clisp.org>
30999         doc: Fix Texinfo syntax error.
31000         * doc/glibc-functions/getrandom.texi: Add missing '@item'.
31002 2020-06-01  Asher Gordon  <AsDaGo@posteo.net>
31004         doc: Change '.' to '@.' where appropriate.
31005         * doc/c-ctype.texi: Change '.' to '@.' where appropriate.
31006         * doc/glibc-functions/fstatfs.texi: Likewise.
31007         * doc/glibc-functions/fts_children.texi: Likewise.
31008         * doc/glibc-functions/fts_read.texi: Likewise.
31009         * doc/glibc-functions/getdirentries.texi: Likewise.
31010         * doc/glibc-functions/mkostemp.texi: Likewise.
31011         * doc/glibc-functions/mkostemps.texi: Likewise.
31012         * doc/glibc-functions/mkstemps.texi: Likewise.
31013         * doc/glibc-functions/preadv.texi: Likewise.
31014         * doc/glibc-functions/pwritev.texi: Likewise.
31015         * doc/glibc-functions/sendfile.texi: Likewise.
31016         * doc/glibc-functions/statfs.texi: Likewise.
31017         * doc/gnulib-intro.texi: Likewise.
31018         * doc/gnulib-tool.texi: Likewise.
31019         * doc/intprops.texi: Likewise.
31020         * doc/lib-symbol-visibility.texi: Likewise.
31021         * doc/licenses-texi.texi: Likewise.
31022         * doc/pastposix-functions/bcmp.texi: Likewise.
31023         * doc/pastposix-functions/bcopy.texi: Likewise.
31024         * doc/pastposix-functions/bzero.texi: Likewise.
31025         * doc/pastposix-functions/ecvt.texi: Likewise.
31026         * doc/pastposix-functions/fcvt.texi: Likewise.
31027         * doc/pastposix-functions/ftime.texi: Likewise.
31028         * doc/pastposix-functions/gcvt.texi: Likewise.
31029         * doc/pastposix-functions/getwd.texi: Likewise.
31030         * doc/pastposix-functions/index.texi: Likewise.
31031         * doc/pastposix-functions/mktemp.texi: Likewise.
31032         * doc/pastposix-functions/rindex.texi: Likewise.
31033         * doc/pastposix-functions/wcswcs.texi: Likewise.
31034         * doc/posix-functions/aio_cancel.texi: Likewise.
31035         * doc/posix-functions/aio_error.texi: Likewise.
31036         * doc/posix-functions/aio_fsync.texi: Likewise.
31037         * doc/posix-functions/aio_read.texi: Likewise.
31038         * doc/posix-functions/aio_return.texi: Likewise.
31039         * doc/posix-functions/aio_suspend.texi: Likewise.
31040         * doc/posix-functions/aio_write.texi: Likewise.
31041         * doc/posix-functions/creat.texi: Likewise.
31042         * doc/posix-functions/ctime.texi: Likewise.
31043         * doc/posix-functions/daylight.texi: Likewise.
31044         * doc/posix-functions/fgetpos.texi: Likewise.
31045         * doc/posix-functions/fopen.texi: Likewise.
31046         * doc/posix-functions/freopen.texi: Likewise.
31047         * doc/posix-functions/fseeko.texi: Likewise.
31048         * doc/posix-functions/fsetpos.texi: Likewise.
31049         * doc/posix-functions/fstatat.texi: Likewise.
31050         * doc/posix-functions/fstatvfs.texi: Likewise.
31051         * doc/posix-functions/ftello.texi: Likewise.
31052         * doc/posix-functions/ftruncate.texi: Likewise.
31053         * doc/posix-functions/getrlimit.texi: Likewise.
31054         * doc/posix-functions/lio_listio.texi: Likewise.
31055         * doc/posix-functions/localtime.texi: Likewise.
31056         * doc/posix-functions/lseek.texi: Likewise.
31057         * doc/posix-functions/mkstemp.texi: Likewise.
31058         * doc/posix-functions/mktime.texi: Likewise.
31059         * doc/posix-functions/open.texi: Likewise.
31060         * doc/posix-functions/openat.texi: Likewise.
31061         * doc/posix-functions/opendir.texi: Likewise.
31062         * doc/posix-functions/pread.texi: Likewise.
31063         * doc/posix-functions/pwrite.texi: Likewise.
31064         * doc/posix-functions/readdir.texi: Likewise.
31065         * doc/posix-functions/readdir_r.texi: Likewise.
31066         * doc/posix-functions/scandir.texi: Likewise.
31067         * doc/posix-functions/seekdir.texi: Likewise.
31068         * doc/posix-functions/setrlimit.texi: Likewise.
31069         * doc/posix-functions/statvfs.texi: Likewise.
31070         * doc/posix-functions/strftime.texi: Likewise.
31071         * doc/posix-functions/telldir.texi: Likewise.
31072         * doc/posix-functions/timezone.texi: Likewise.
31073         * doc/posix-functions/tmpfile.texi: Likewise.
31074         * doc/posix-functions/truncate.texi: Likewise.
31075         * doc/posix-functions/tzname.texi: Likewise.
31076         * doc/posix-functions/wcsftime.texi: Likewise.
31077         * doc/windows-sockets.texi: Likewise.
31079 2020-05-31  Paul Eggert  <eggert@cs.ucla.edu>
31081         getrandom-tests: do not assume GRND_RANDOM yields short read
31082         * tests/test-getrandom.c (main): Omit assertion that
31083         getrandom (b, sizeof b, GRND_RANDOM | GRND_NONBLOCK) < sizeof b
31084         when b’s size is 100000.  This assertion fails with Linux kernel
31085         5.6.13, as that kernel ignores the GRND_RANDOM flag.
31086         The separate blocking pool is going away in the Linux kernel, and
31087         they’ve added a flag GRND_INSECURE instead; see:
31088         https://lore.kernel.org/linux-api/705c5a091b63cc5da70c99304bb97e0109be0a26.1577088521.git.luto@kernel.org/
31089         The assertion was iffy anyway; what’s to prevent a kernel from
31090         lazily filling a large buffer with random bytes?
31092         read-file-test: pacify --enable-gcc-warnings
31093         * tests/test-read-file.c (test_read_file): Now static.
31095         tempname: merge from glibc and coreutils
31096         Also, merge in Gnulib’s more-recent methods of making it easier
31097         to share between Gnulib and glibc, and fix a few randomness
31098         glitches.
31099         * lib/tempname.c: Include libc-config.h, not config.h, if !_LIBC.
31100         (__set_errno): Remove; libc-config.h does that for us.
31101         Do not include <sys/time.h>.
31102         (__secure_getenv) [_LIBC]: New macro.
31103         (__try_tempname, __getpid, __gettimeofday) [!_LIBC]: Remove macros.
31104         (RANDOM_BITS): Rewrite.
31105         (RANDOM_VALUE_MAX, BASE_62_DIGITS, BASE_62_POWER): New macros.
31106         (random_value): New typedef.
31107         (try_file, try_dir, try_nocreate): Move up.
31108         (gen_tempname_len, try_tempname_len): New functions.
31109         (gen_tempname_len): Use a constant array rather than a switch.
31110         (try_tempname_len): Don’t assume string length fits in int.
31111         Generalize use of RANDOM_BITS.  If _LIBC, don’t assume RANDOM_BITS
31112         has enough entropy (it’s a bit short).
31113         (__gen_tempname): Rewrite in terms of gen_tempname_len.
31114         (__try_tempname): Rewrite in terms of try_tempname_len.
31115         * lib/tempname.h (gen_tempname_len, try_tempname_len): New decls.
31116         * modules/tempname (Depends-on): Remove gettimeofday, sys_time.
31117         Add getentropy, libc-config.
31119 2020-05-31  Bruno Haible  <bruno@clisp.org>
31121         getrandom, getentropy: Mention the crypto/gc-random module.
31122         Suggested by Simon Josefsson in
31123         <https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00400.html>.
31124         * doc/glibc-functions/getrandom.texi: Mention the quality issues and the
31125         crypto/gc-random module.
31126         * doc/glibc-functions/getentropy.texi: Likewise.
31128 2020-05-31  Bruno Haible  <bruno@clisp.org>
31130         getentropy: Enhance tests.
31131         * tests/test-getentropy.c (main): Add one more test.
31132         * tests/test-unistd-c++.cc: Check the signature of getentropy.
31134 2020-05-31  Bruno Haible  <bruno@clisp.org>
31136         getentropy: Work around a macOS and Solaris problem.
31137         * lib/unistd.in.h: Include <sys/random.h>, when needed for the
31138         'getentropy' module.
31139         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize
31140         UNISTD_H_HAVE_SYS_RANDOM_H.
31141         * m4/sys_random_h.m4 (gl_HEADER_SYS_RANDOM): Set
31142         UNISTD_H_HAVE_SYS_RANDOM_H.
31143         * modules/unistd (Makefile.am): Substitute UNISTD_H_HAVE_SYS_RANDOM_H.
31144         * doc/glibc-functions/getentropy.texi: Document the macOS and Solaris
31145         problem. List more platforms.
31147 2020-05-31  Paul Eggert  <eggert@cs.ucla.edu>
31149         fnmatch: merge from glibc
31150         Also, merge in Gnulib’s more-recent methods of making it easier
31151         to share between Gnulib and glibc.
31152         * lib/fnmatch.c: Reorder includes to match glibc better.
31153         Include libc-config.h instead of config.h.
31154         Include alloca.h only if _LIBC || HAVE_ALLOCA.
31155         Do not include "../locale/elem-hash.h" if _LIBC.
31156         Define macros for btowc, etc. if _LIBC.  All uses simplified.
31157         Define FALLTHROUGH if _LIBC, instead of including attribute.h.
31158         Include intprops.h, since glibc has it now.
31159         (SIZE_MAX): Remove; use (size_t) -1 instead.
31160         Omit the "Comment out all this code" ifdef, since Gnulib
31161         has never really needed it.
31162         (STREQ): Remove; no longer used.
31163         (__libc_use_alloca, alloca, alloca_account): Define as
31164         needed if !_LIBC.
31165         (ISWCTYPE): Remove; all uses replaced by iswctype.
31166         (HANDLE_MULTIBYTE): Remove.  All uses removed by assuming true.
31167         (internal_function): Remove.  All uses removed.
31168         (STRUCT): New macro.
31169         (WIDE_CHAR_VERSION): Define to 0 instead of leaving undefined.
31170         (WMEMCMP): New macro.
31171         (FINDIDX): Define if _LIBC, and include <locale/weight.h>
31172         and <locale/weightwc.h>.
31173         (fnmatch): Prefer __glibc_likely and __glibc_unlikely to
31174         __builtin_expect.  Check for integer overflow more
31175         systematically.  Account for alloca storage better when
31176         recursive.  Use strnlen instead of strlen for efficiency.
31177         * lib/fnmatch_loop.c: Include stdint.h if _LIBC, for int32_t etc.
31178         (struct STRUCT): New type.
31179         (FCT, EXT): New ENDS and ALLOCA_USED args.
31180         All callers changed.
31181         (FCT): Prefer __glibc_unlikely to __builtin_expect.
31182         Simplify by assuming WIDE_CHAR_SUPPORT.
31183         Copy _LIBC code from glibc without worrying Gnulib compatibility.
31184         Cast cold to UCHAR to avoid signedness warning.
31185         (END): Check for invalid pattern.
31186         (EXT): Improve alloca/malloc checking (taken from glibc),
31187         and improve it some more by using intprops.h and checking
31188         for integer overflow and using bool for booleans.
31189         * lib/libc-config.h (compat_symbol): New macro.
31190         (versioned_symbol): Make it ‘extern int dummy’ so that it’s
31191         acceptable to non-GCC when a trailing semicolon is added.
31192         * modules/fnmatch (Depends-on): Add alloca-opt, intprops,
31193         libc-config, strnlen.  Remove alloca.
31195 2020-05-31  Bruno Haible  <bruno@clisp.org>
31197         getrandom: Doc and test tweaks.
31198         * lib/getrandom.c (getrandom): Mention that it never returns 0, and that
31199         it sets errno when failing.
31200         * tests/test-getrandom.c (main): Disable the high-quality check on those
31201         platforms on which it fails.
31202         * doc/glibc-functions/getrandom.texi: Add Minix, AIX, HP-UX, IRIX,
31203         Cygwin to the list of platforms that don't have the function. Add a note
31204         about the quality of the result.
31205         * doc/glibc-headers/sys_random.texi: Don't mention the 'getrandom'
31206         declaration; this is fixed by module 'getrandom'.
31208 2020-05-31  Bruno Haible  <bruno@clisp.org>
31210         getrandom: Add support for native Windows.
31211         * lib/getrandom.c: Include <errno.h>, <windows.h>, <bcrypt.h>,
31212         <wincrypt.h>.
31213         (CRYPT_VERIFY_CONTEXT): New macro.
31214         (LoadLibrary, CryptAcquireContext): Redirect to the variant with suffix
31215         'A'.
31216         (GetProcAddress): New macro.
31217         (BCryptGenRandomFuncType): New type.
31218         (BCryptGenRandomFunc, initialized): New variables.
31219         (initialize): New function.
31220         (getrandom): On native Windows, use <bcrypt.h> API when available, and
31221         <wincrypt.h> API as fallback.
31222         * m4/getrandom.m4 (gl_FUNC_GETRANDOM): Set LIB_GETRANDOM.
31223         * modules/getrandom (Link): New section.
31224         * modules/getentropy (Link): Likewise.
31225         * modules/getrandom-tests (Makefile.am): Link test-getrandom against
31226         $(LIB_GETRANDOM).
31227         * modules/getentropy-tests (Makefile.am): Link test-getentropy against
31228         $(LIB_GETRANDOM).
31229         * modules/sys_random-c++-tests (Makefile.am): Link test-sys_random-c++
31230         against $(LIB_GETRANDOM).
31231         * doc/glibc-functions/getrandom.texi: Mention the native Windows
31232         support.
31234 2020-05-31  Bruno Haible  <bruno@clisp.org>
31236         getrandom: Simplify the determination of the random number devices.
31237         Suggested by Paul Eggert in
31238         <https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00383.html>.
31239         * lib/getrandom.c (NAME_OF_RANDOM_DEVICE, NAME_OF_NONCE_DEVICE): New
31240         macros.
31241         * modules/getrandom (Depends-on): Remove crypto/gc-random.
31243 2020-05-31  Bruno Haible  <bruno@clisp.org>
31245         crypto/gc-random: Fix list of crypto devices for Solaris.
31246         * m4/gc-random.m4 (gl_GC_RANDOM): Don't special-case Solaris.
31248 2020-05-31  Akim Demaille  <akim@lrde.epita.fr>
31250         list: fix GCC warnings
31251         * lib/gl_anytree_list2.h (gl_tree_iterator_free)
31252         (gl_tree_next_node, gl_tree_node_nx_set_value)
31253         (gl_tree_previous_node, gl_tree_next_node):
31254         Mark unused arguments.
31255         * lib/gl_anytree_oset.h (gl_tree_iterator_free): Likewise.
31256         * lib/gl_anylinked_list2.h (gl_linked_node_value)
31257         (gl_linked_node_nx_set_value, gl_linked_iterator_free): Likewise.
31259         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Avoid using
31260         the same variable name in nested scopes.
31262 2020-05-31  Bruno Haible  <bruno@clisp.org>
31264         list-c++, set-c++, oset-c++, map-c++, omap-c++: Don't fool the compiler.
31265         Reported by Akim Demaille in
31266         <https://lists.gnu.org/archive/html/bug-bison/2020-05/msg00102.html>.
31267         * lib/gl_list.hh (gl_List::iterator::next): Avoid a reinterpret_cast.
31268         * lib/gl_set.hh (gl_Set::iterator::next): Likewise.
31269         * lib/gl_oset.hh (gl_OSet::iterator::next): Likewise.
31270         * lib/gl_map.hh (gl_Map::iterator::next): Likewise.
31271         * lib/gl_omap.hh (gl_OMap::iterator::next): Likewise.
31273 2020-05-30  Bruno Haible  <bruno@clisp.org>
31275         wmemchr: Relicense under LGPLv2+.
31276         * modules/wmemchr (License): Set to LGPLv2+.
31278 2020-05-30  Bruno Haible  <bruno@clisp.org>
31280         wmempcpy: New module.
31281         Reported by Paul Eggert in
31282         <https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00387.html>.
31283         * lib/wchar.in.h (wmempcpy): New declaration.
31284         * lib/wmempcpy.c: New file.
31285         * m4/wmempcpy.m4: New file.
31286         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wmempcpy is declared.
31287         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WMEMPCPY, HAVE_WMEMPCPY.
31288         * modules/wchar (Makefile.am): Substitute GNULIB_WMEMPCPY,
31289         HAVE_WMEMPCPY.
31290         * modules/wmempcpy: New file.
31291         * tests/test-wchar-c++.cc: Check the signature of wmempcpy.
31292         * doc/glibc-functions/wmempcpy.texi: Mention the new module.
31293         * modules/mempcpy (Description): Fix typo.
31295 2020-05-30  Bruno Haible  <bruno@clisp.org>
31297         crypto/gc-random: Fix list of crypto devices for NetBSD, OpenBSD.
31298         * m4/gc-random.m4 (gl_GC_RANDOM): Don't special-case NetBSD and OpenBSD.
31300 2020-05-30  Bruno Haible  <bruno@clisp.org>
31302         sys_random: Work around macOS bug.
31303         * m4/sys_random_h.m4 (gl_HEADER_SYS_RANDOM): Include <sys/types.h> and
31304         <stdlib.h> before <sys/random.h>.
31305         * m4/getrandom.m4 (gl_FUNC_GETRANDOM): Likewise.
31306         * lib/sys_random.in.h: On macOS, include <sys/types.h> and <stdlib.h>
31307         first.
31308         * doc/glibc-headers/sys_random.texi: Mention the macOS problem.
31310 2020-05-30  Bruno Haible  <bruno@clisp.org>
31312         getrandom: Override incompatible system function on Solaris 11.
31313         * lib/sys_random.in.h (getrandom): Override if REPLACE_GETRANDOM is 1.
31314         * lib/getrandom.c (getrandom): When the system has getrandom, just
31315         invoke it.
31316         * m4/getrandom.m4 (gl_FUNC_GETRANDOM): Set REPLACE_GETRANDOM if the
31317         system's getrandom function's prototype is not the expected one.
31318         * m4/sys_random_h.m4 (gl_SYS_RANDOM_H_DEFAULTS): Initialize
31319         REPLACE_GETRANDOM.
31320         * modules/sys_random (Makefile.am): Substitute REPLACE_GETRANDOM.
31321         * modules/getrandom (modules/getrandom): Consider REPLACE_GETRANDOM.
31322         * tests/test-getrandom.c (main): Allow error EINVAL as an alternative to
31323         EAGAIN.
31324         * doc/glibc-functions/getrandom.texi: Mention the new module and the
31325         Solaris problem.
31327 2020-05-30  Bruno Haible  <bruno@clisp.org>
31329         sys_random: Add C++ tests.
31330         * tests/test-sys_random-c++.cc: New file.
31331         * modules/sys_random-c++-tests: New file.
31332         * modules/sys_random-tests (Depends-on): Depend on it.
31334         sys_random: Add tests.
31335         * tests/test-sys_random.c: New file.
31336         * modules/sys_random-tests: New file.
31338         sys_random: New module.
31339         * lib/sys_random.in.h: Use the common idioms for overridable header
31340         files.
31341         * m4/sys_random_h.m4: New file.
31342         * m4/getrandom.m4 (gl_FUNC_GETRANDOM): Require gl_SYS_RANDOM_H_DEFAULTS.
31343         * modules/sys_random: New file.
31344         * modules/getrandom (Files): Remove lib/sys_random.in.h.
31345         (Depends-on): Add sys_random.
31346         (configure.ac): Use gl_SYS_RANDOM_MODULE_INDICATOR, not
31347         gl_UNISTD_MODULE_INDICATOR.
31348         (Makefile.am): Don't generate sys/random.h here.
31349         * doc/glibc-headers/sys_random.texi: New file.
31350         * doc/gnulib.texi: Include it.
31352 2020-05-30  Bruno Haible  <bruno@clisp.org>
31354         unistd: Remove conflicting declaration of getrandom().
31355         * lib/unistd.in.h (getrandom): Remove declaration.
31356         * m4/unistd_h.m4 (gl_UNISTD_H): Don't test whether getrandom is
31357         declared.
31358         (gl_UNISTD_H_DEFAULTS): Don't initialize GNULIB_GETRANDOM,
31359         HAVE_GETRANDOM.
31360         * modules/unistd (Makefile.am): Don't substitute GNULIB_GETRANDOM,
31361         HAVE_GETRANDOM.
31363 2020-05-30  Bruno Haible  <bruno@clisp.org>
31365         getrandom: Add tests.
31366         * tests/test-getrandom.c: New file.
31367         * modules/getrandom-tests: New file.
31369 2020-05-30  Bruno Haible  <bruno@clisp.org>
31371         crypto/gc-random: Fix link error on MSVC.
31372         * m4/gc-random.m4 (gl_GC_RANDOM): Set LIB_GC_RANDOM.
31373         * modules/crypto/gc-random (Link): New section.
31374         * modules/crypto/gc-tests (Makefile.am): Link test-gc against
31375         $(LIB_GC_RANDOM).
31377 2020-05-30  Bruno Haible  <bruno@clisp.org>
31379         Don't assume that UNICODE is not defined.
31380         Many Windows API functions are defined differently (redirecting to a
31381         function with suffix 'W') if the application defines the macro UNICODE
31382         than by default (redirecting to a function with suffix 'A').
31383         * lib/clean-temp.c (OSVERSIONINFO, GetVersionEx): Redirect to the
31384         variant with suffix 'A'.
31385         * lib/dirent-private.h (WIN32_FIND_DATA): Likewise.
31386         * lib/gc-gnulib.c (CryptAcquireContext): Likewise.
31387         * lib/getaddrinfo.c (GetModuleHandle): Likewise.
31388         * lib/getlogin.c (GetUserName): Likewise.
31389         * lib/getlogin_r.c (GetUserName): Likewise.
31390         * lib/gettimeofday.c (LoadLibrary): Likewise.
31391         * lib/isatty.c (LoadLibrary, QueryFullProcessImageName): Likewise.
31392         * lib/link.c (GetModuleHandle, CreateHardLink): Likewise.
31393         * lib/localename.c (GetLocaleInfo, EnumSystemLocales): Likewise.
31394         * lib/mountlist.c (GetDriveType): Likewise.
31395         * lib/nonblocking.c (GetNamedPipeHandleState): Likewise.
31396         * lib/opendir.c (WIN32_FIND_DATA, GetFullPathName, FindFirstFile):
31397         Likewise.
31398         * lib/physmem.c (GetModuleHandle): Likewise.
31399         * lib/poll.c (GetModuleHandle, PeekConsoleInput, CreateEvent,
31400         PeekMessage, DispatchMessage): Likewise.
31401         * lib/progreloc.c (GetModuleFileName): Likewise.
31402         * lib/putenv.c (SetEnvironmentVariable): Likewise.
31403         * lib/read.c (GetNamedPipeHandleState): Likewise.
31404         * lib/readdir.c (FindNextFile): Likewise.
31405         * lib/relocatable.c (GetModuleFileName): Likewise.
31406         * lib/rename.c (MoveFileEx): Likewise.
31407         * lib/rewinddir.c (FindFirstFile): Likewise.
31408         * lib/select.c (GetModuleHandle, PeekConsoleInput, CreateEvent,
31409         PeekMessage, DispatchMessage): Likewise.
31410         * lib/sethostname.c (GetComputerNameEx, SetComputerNameEx): Likewise.
31411         * lib/socket.c (WSASocket): Likewise.
31412         * lib/stat-w32.c (LoadLibrary, GetFinalPathNameByHandle): Likewise.
31413         * lib/stat.c (WIN32_FIND_DATA, CreateFile, FindFirstFile): Likewise.
31414         * lib/stdio-read.c (GetNamedPipeHandleState): Likewise.
31415         * lib/stdio-write.c (GetNamedPipeHandleState): Likewise.
31416         * lib/tmpdir.c (GetTempPath): Likewise.
31417         * lib/tmpfile.c (OSVERSIONINFO, GetVersionEx, GetTempPath): Likewise.
31418         * lib/uname.c (OSVERSIONINFO, GetVersionEx): Likewise.
31419         * lib/utime.c (CreateFile, GetFileAttributes): Likewise.
31420         * lib/windows-cond.c (CreateEvent): Likewise.
31421         * lib/windows-rwlock.c (CreateEvent): Likewise.
31422         * lib/windows-timedmutex.c (CreateEvent): Likewise.
31423         * lib/windows-timedrecmutex.c (CreateEvent): Likewise.
31424         * lib/windows-timedrwlock.c (CreateEvent): Likewise.
31425         * lib/write.c (GetNamedPipeHandleState): Likewise.
31427 2020-05-30  Bruno Haible  <bruno@clisp.org>
31429         physmem: Fix compilation errors on MSVC.
31430         * lib/physmem.c (PFN_MS_EX): Use BOOL, not WINBOOL.
31431         * modules/physmem (Depends-on): Add unistd.
31433 2020-05-29  Bruno Haible  <bruno@clisp.org>
31435         gnulib-tool: Fix link errors with a particular set of modules on mingw.
31436         * gnulib-tool (func_emit_tests_Makefile_am): Add ../lib/libgnu.a to
31437         LDADD a second time, after the second occurrence of libtests.a.
31438         * pygnulib/GLEmiter.py (tests_Makefile_am): Likewise.
31440 2020-05-29  Bruno Haible  <bruno@clisp.org>
31442         fnmatch: Rely on more gnulib modules.
31443         * modules/fnmatch (Depends-on): Add btowc, isblank, iswctype, wmemchr,
31444         wmempcpy, mempcpy.
31445         * lib/fnmatch.c: Assume that HAVE_WCTYPE_H, HAVE_BTOWC, HAVE_ISWCTYPE,
31446         HAVE_WMEMCHR, HAVE_WMEMPCPY, HAVE_ISBLANK, HAVE_DECL_ISBLANK,
31447         HAVE_MEMPCPY are all 1.
31448         * m4/fnmatch.m4 (gl_PREREQ_FNMATCH): Don't test for btowc, isblank,
31449         iswctype, mempcpy, wmemchr, wmemcpy, wmempcpy, <wctype.h>.
31451 2020-05-29  Bruno Haible  <bruno@clisp.org>
31453         Avoid dynamic lookup of Windows API functions when possible.
31454         * lib/getaddrinfo.c (GetProcAddress, getaddrinfo_func,
31455         freeaddrinfo_func, getnameinfo_func, getaddrinfo_ptr, freeaddrinfo_ptr,
31456         getnameinfo_ptr): Don't define in a build for Windows XP or higher.
31457         (use_win32_p): Define differently.
31458         * lib/link.c (GetProcAddress, CreateHardLinkFuncType,
31459         CreateHardLinkFunc, initialized, initialize): Don't define in a build
31460         for Windows XP or higher.
31462 2020-05-29  Daiki Ueno  <ueno@gnu.org>
31464         read-file: disable buffering if RF_SENSITIVE is set
31465         * lib/read-file.c (read_file): Call setvbuf if RF_SENSITIVE.
31466         Suggested by Glenn Strauss.
31467         (fread_file): Suggest calling setvbuf before calling this
31468         function.  Suggested by Bruno Haible.
31470 2020-05-29  Bruno Haible  <bruno@clisp.org>
31472         wmemchr, wmemcmp, wmemcpy, wmemmove, wmemset: Fix autoconf test.
31473         * m4/wmemchr.m4 (gl_FUNC_WMEMCHR): Link, not only compile, the test
31474         program.
31475         * m4/wmemcmp.m4 (gl_FUNC_WMEMCMP): Likewise.
31476         * m4/wmemcpy.m4 (gl_FUNC_WMEMCPY): Likewise.
31477         * m4/wmemmove.m4 (gl_FUNC_WMEMMOVE): Likewise.
31478         * m4/wmemset.m4 (gl_FUNC_WMEMSET): Likewise.
31480 2020-05-29  Bruno Haible  <bruno@clisp.org>
31482         Fix compilation error on native Windows (regression from 2020-05-28).
31483         Reported by Daiki Ueno.
31484         * lib/gettimeofday.c (GetSystemTimePreciseAsFileTimeFunc): Define as
31485         macro when not using dynamic loading.
31486         * lib/isatty.c (GetNamedPipeClientProcessIdFunc,
31487         QueryFullProcessImageNameFunc): Likewise.
31488         * lib/stat-w32.c (GetFileInformationByHandleExFunc,
31489         GetFinalPathNameByHandleFunc): Likewise.
31491 2020-05-29  Daiki Ueno  <ueno@gnu.org>
31493         fopen-gnu-tests: fix "\x" escape usage
31494         * tests/test-fopen-gnu.c (DATA): Use safer escape sequence.
31496 2020-05-28  Bruno Haible  <bruno@clisp.org>
31498         Avoid dynamic loading of Windows API functions when possible.
31499         Reported by Steve Lhomme <robux4@ycbcr.xyz> in
31500         <https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00182.html>.
31501         * lib/gettimeofday.c (GetProcAddress,
31502         GetSystemTimePreciseAsFileTimeFuncType,
31503         GetSystemTimePreciseAsFileTimeFunc, initialized, initialize): Don't
31504         define in a build for Windows 8 or higher.
31505         * lib/isatty.c (GetProcAddress, GetNamedPipeClientProcessIdFuncType,
31506         GetNamedPipeClientProcessIdFunc, QueryFullProcessImageNameFuncType,
31507         QueryFullProcessImageNameFunc, initialized, initialize): Don't define
31508         in a build for Windows Vista or higher.
31509         * lib/stat-w32.c (GetProcAddress, GetFileInformationByHandleExFuncType,
31510         GetFileInformationByHandleExFunc, GetFinalPathNameByHandleFuncType,
31511         GetFinalPathNameByHandleFunc, initialized, initialize): Likewise.
31513 2020-05-28  Paul Eggert  <eggert@cs.ucla.edu>
31515         explicit_bzero-tests: improve -Wmissing-declarations pacification
31516         * tests/test-explicit_bzero.c: Now noinline.
31517         Suggested by Bruno Haible in:
31518         https://lists.gnu.org/r/bug-gnulib/2020-05/msg00300.html
31520 2020-05-28  Bruno Haible  <bruno@clisp.org>
31522         Fix build errors due to read-file changes (regression from 2020-05-27).
31523         * lib/git-merge-changelog.c (read_changelog_file): Update read_file
31524         invocation.
31525         * tests/test-sameacls.c (main): Likewise.
31526         * tests/test-pipe-filter-gi1.c (main): Call read_file instead of
31527         read_binary_file.
31528         * tests/test-pipe-filter-ii1.c (main): Likewise.
31530 2020-05-28  Bruno Haible  <bruno@clisp.org>
31532         fts: Make more robust in multithreaded applications.
31533         * lib/fts.c (fts_open): Pass an O_CLOEXEC flag to open().
31534         * modules/fts (Depends-on): Add 'open'.
31536 2020-05-28  Bruno Haible  <bruno@clisp.org>
31538         relocatable-prog: Make more robust in multithreaded applications.
31539         * lib/progreloc.c (O_CLOEXEC): Define fallback to 0 when use from module
31540         relocatable-prog-wrapper.
31541         (find_executable): Pass an O_CLOEXEC flag to open().
31542         * modules/relocatable-prog (Depends-on): Add 'open'.
31544 2020-05-28  Bruno Haible  <bruno@clisp.org>
31546         getloadavg: Make more robust in multithreaded applications.
31547         * lib/getloadavg.c (getloadavg): Pass an O_CLOEXEC flag to open().
31548         Simplify use of O_CLOEXEC.
31549         * modules/getloadavg (Depends-on): Add 'open'.
31551 2020-05-28  Bruno Haible  <bruno@clisp.org>
31553         vma-iter: Make more robust in multithreaded applications.
31554         * lib/vma-iter.c (rof_open, vma_iterate): Pass an O_CLOEXEC flag to
31555         open().
31556         * modules/vma-iter (Depends-on): Add 'open'.
31558 2020-05-28  Bruno Haible  <bruno@clisp.org>
31560         truncate: Make more robust in multithreaded applications.
31561         * lib/truncate.c (truncate): Pass an O_CLOEXEC flag to open().
31563 2020-05-28  Bruno Haible  <bruno@clisp.org>
31565         pagealign_alloc: Make more robust in multithreaded applications.
31566         * lib/pagealign_alloc.c (pagealign_alloc): Pass an O_CLOEXEC flag to
31567         open().
31568         * modules/pagealign_alloc (Depends-on): Add 'open'.
31570 2020-05-28  Bruno Haible  <bruno@clisp.org>
31572         openat: Make more robust in multithreaded applications.
31573         * lib/openat.c (openat_needs_fchdir): Pass an O_CLOEXEC flag to open().
31575 2020-05-28  Bruno Haible  <bruno@clisp.org>
31577         at-internal: Make more robust in multithreaded applications.
31578         * lib/openat-proc.c (openat_proc_name): Pass an O_CLOEXEC flag to
31579         open().
31581 2020-05-28  Bruno Haible  <bruno@clisp.org>
31583         mountlist: Make more robust in multithreaded applications.
31584         * lib/mountlist.c (read_file_system_list): Pass an O_CLOEXEC flag to
31585         open().
31586         * modules/mountlist (Depends-on): Add 'open'.
31588 2020-05-28  Bruno Haible  <bruno@clisp.org>
31590         login_tty: Make more robust in multithreaded applications.
31591         * lib/login_tty.c (login_tty): Pass an O_CLOEXEC flag to open().
31592         * modules/login_tty (Depends-on): Add 'open'.
31594 2020-05-28  Bruno Haible  <bruno@clisp.org>
31596         javacomp: Make more robust in multithreaded applications.
31597         * lib/javacomp.c (get_classfile_version): Pass an O_CLOEXEC flag to
31598         open().
31599         * modules/javacomp (Depends-on): Add 'open'.
31601 2020-05-28  Bruno Haible  <bruno@clisp.org>
31603         getprogname: Make more robust in multithreaded applications.
31604         * lib/getprogname.c (getprogname): Pass an O_CLOEXEC flag to open().
31605         * modules/getprogname (Depends-on): Add 'open'.
31607 2020-05-28  Bruno Haible  <bruno@clisp.org>
31609         get_progname_of: Make more robust in multithreaded applications.
31610         * lib/get_progname_of.c (get_progname_of): Pass an O_CLOEXEC flag to
31611         open().
31612         * modules/get_progname_of (Depends-on): Add 'open'.
31614 2020-05-28  Bruno Haible  <bruno@clisp.org>
31616         get_ppid_of: Make more robust in multithreaded applications.
31617         * lib/get_ppid_of.c (get_ppid_of): Pass an O_CLOEXEC flag to open().
31618         * modules/get_ppid_of (Depends-on): Add 'open'.
31620 2020-05-28  Bruno Haible  <bruno@clisp.org>
31622         get-rusage-as: Make more robust in multithreaded applications.
31623         * lib/get-rusage-as.c (get_rusage_as_via_setrlimit): Pass an O_CLOEXEC
31624         flag to open().
31625         * modules/get-rusage-as (Depends-on): Add 'open'.
31627 2020-05-28  Bruno Haible  <bruno@clisp.org>
31629         crypto/gc: Make more robust in multithreaded applications.
31630         * lib/gc-gnulib.c (randomize): Pass an O_CLOEXEC flag to open().
31631         * modules/crypto/gc (Depends-on): Add 'open'.
31633 2020-05-28  Bruno Haible  <bruno@clisp.org>
31635         copy-file: Make more robust in multithreaded applications.
31636         * lib/copy-file.c (qcopy_file_preserving): Pass an O_CLOEXEC flag to
31637         open().
31639 2020-05-28  Bruno Haible  <bruno@clisp.org>
31641         chown: Make more robust in multithreaded applications.
31642         * lib/chown.c (rpl_chown): Pass an O_CLOEXEC flag to open().
31644 2020-05-28  Bruno Haible  <bruno@clisp.org>
31646         doc: Fix statement about O_CLOEXEC (wrong since 2017-08-14).
31647         * doc/posix-headers/fcntl.texi: Gnulib no longer defines O_CLOEXEC to 0.
31649 2020-05-28  Daiki Ueno  <ueno@gnu.org>
31651         fopen-gnu: make 'b' flag can be used with 'e' on Windows
31652         * lib/fopen.c (rpl_fopen): Pass O_BINARY to open, if a 'b' flag is
31653         specified on Windows.
31654         * tests/test-fopen-gnu.c (DATA): New define.
31655         (main): Add test for reading binary files with an 'e' flag.
31657 2020-05-27  Bruno Haible  <bruno@clisp.org>
31659         Don't assume that UNICODE is not defined.
31660         Some Windows types, such as TCHAR, LPTSTR, LPCTSTR, are defined
31661         differently if the application defines the macro UNICODE.
31662         Reported by Steve Lhomme <robux4@ycbcr.xyz> in
31663         <https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00184.html>.
31664         * lib/link.c (CreateHardLinkFuncType): Use LPCSTR, not LPCTSTR.
31665         * lib/localename.c (enum_locales_fn): Use LPSTR, not LPTSTR.
31666         * lib/stat-w32.c (GetFinalPathNameByHandleFuncType): Likewise.
31668 2020-05-27  Bruno Haible  <bruno@clisp.org>
31670         Improve pattern for defining _WIN32_WINNT.
31671         Newer versions of the Windows API may not only add, but also remove API
31672         functions. Therefore, when the user is e.g. building for Windows 10, we
31673         should not set _WIN32_WINNT to e.g. Windows 8, as this may enable the
31674         use of APIs that were present in Windows 8 but removed in Windows 10.
31675         Suggested by Steve Lhomme <robux4@ycbcr.xyz> in
31676         <https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00318.html>.
31677         * lib/ftruncate.c (_WIN32_WINNT): Don't set to a smaller value.
31678         * lib/sethostname.c (_WIN32_WINNT): Likewise.
31679         * lib/stat-w32.c (_WIN32_WINNT): Likewise.
31681 2020-05-27  Bruno Haible  <bruno@clisp.org>
31683         javacomp: Make more robust in multithreaded applications.
31684         * lib/javacomp.c (write_temp_file): Pass an 'e' flag to fopen_temp.
31685         * modules/javacomp (Depends-on): Add fopen-gnu.
31687 2020-05-27  Bruno Haible  <bruno@clisp.org>
31689         mountlist: Make more robust in multithreaded applications.
31690         * lib/mountlist.c (setmntent, read_file_system_list): Pass an 'e' flag
31691         to fopen.
31692         * modules/mountlist (Depends-on): Add fopen-gnu.
31694 2020-05-27  Bruno Haible  <bruno@clisp.org>
31696         sethostname: Make more robust in multithreaded applications.
31697         * lib/sethostname.c (sethostname): Pass an 'e' flag to fopen.
31698         * modules/sethostname (Depends-on): Add fopen-gnu.
31700 2020-05-27  Bruno Haible  <bruno@clisp.org>
31702         readutmp: Make more robust in multithreaded applications.
31703         * lib/readutmp.c (read_utmp): Pass an 'e' flag to fopen.
31704         * modules/readutmp (Depends-on): Add fopen-gnu.
31706 2020-05-27  Bruno Haible  <bruno@clisp.org>
31708         getpass: Make more robust in multithreaded applications.
31709         * lib/getpass.c (getpass): Pass an 'e' flag to fopen.
31710         * modules/getpass (Depends-on): Add fopen-gnu.
31712 2020-05-27  Bruno Haible  <bruno@clisp.org>
31714         getloadavg: Make more robust in multithreaded applications.
31715         * lib/getloadavg.c (getloadavg): Pass an 'e' flag to fopen.
31716         * modules/getloadavg (Depends-on): Add fopen-gnu.
31718 2020-05-27  Bruno Haible  <bruno@clisp.org>
31720         exclude: Make more robust in multithreaded applications.
31721         * lib/exclude.c (add_exclude_file): Pass an 'e' flag to fopen.
31722         * modules/exclude (Depends-on): Add fopen-gnu.
31724 2020-05-27  Bruno Haible  <bruno@clisp.org>
31726         bitset: Make more robust in multithreaded applications.
31727         * lib/bitset/stats.c (bitset_stats_read, bitset_stats_write): Pass an
31728         'e' flag to fopen.
31729         * modules/bitset (Depends-on): Add fopen-gnu.
31731 2020-05-27  Daiki Ueno  <ueno@gnu.org>
31733         read-file: add RF_SENSITIVE flag
31734         * lib/read-file.h (RF_SENSITIVE): New define.
31735         * lib/read-file.c (fread_file, read_file): Take into account of
31736         RF_SENSITIVE flag.
31737         * modules/read-file (Depends-on): Add explicit_bzero.
31738         This adds an alternative behavior of those functions to explicitly
31739         clear the internal memory block when it becomes unused.  This is
31740         useful for reading sensitive information from a file.
31742 2020-05-27  Daiki Ueno  <ueno@gnu.org>
31744         read-file: add flags to modify reading behavior
31745         * lib/read-file.h (RF_BINARY): New define.
31746         (fread_file, read_file): Take FLAGS argument.
31747         (read_binary_file): Remove.
31748         * lib/read-file.c (internal_read_file): Merge into ...
31749         (read_file): ... here.
31750         * modules/read-file-tests (Files): Add "tests/macros.h".
31751         * tests/test-read-file.c (main): Refactor using ASSERT macro.
31752         * NEWS: Mention this change.
31754 2020-05-26  Bernhard Voelker  <mail@bernhard-voelker.de>
31756         doc/gnulib-intro.texi: add missing "to" in sentence
31757         Reported by Bjarni Ingi Gislason <bjarniig@rhi.hi.is> in
31758         <https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00316.html>.
31759         * doc/gnulib-intro.texi (Collaborative Development): Add "to".
31761 2020-05-26  Bruno Haible  <bruno@clisp.org>
31763         count-one-bits: Fix MSVC specific code.
31764         Reported by Gisle Vanem <gisle.vanem@gmail.com> in
31765         <https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00309.html>.
31766         * lib/count-one-bits.h (COUNT_ONE_BITS_GENERIC): Don't define if we're
31767         using GCC.
31768         [_MSC_VER]: Use correct syntax for #pragma intrinsic.
31769         (__popcnt64): In 32-bit mode, define as an inline function.
31770         (COUNT_ONE_BITS): Rename first argument to GCC_BUILTIN.
31772 2020-05-26  Bruno Haible  <bruno@clisp.org>
31774         argz: Avoid name clashes through argz.h.
31775         Reported by Gisle Vanem <gisle.vanem@gmail.com> in
31776         <https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00308.html>.
31777         * lib/argz.h: Don't use __ prefixed identifiers.
31778         (const): Remove definition.
31779         (argz_next): Remove inline definitions.
31781 2020-05-26  Daiki Ueno  <ueno@gnu.org>
31783         read-file: make use of fopen-gnu
31784         * lib/read-file.c (read_file): Pass an 'e' flag to fopen.
31785         (read_binary_file): Likewise.
31786         * modules/read-file (Depends-on): Add fopen-gnu.
31788 2020-05-25  Paul Eggert  <eggert@cs.ucla.edu>
31790         getentropy, getrandom: new modules
31791         * MODULES.html.sh (func_all_modules):
31792         * lib/unistd.in.h (getentropy, getrandom):
31793         * m4/unistd_h.m4 (gl_UNISTD_H, gl_UNISTD_H_DEFAULTS):
31794         * modules/unistd (unistd.h):
31795         Add support for getentropy, getrandom.
31796         * doc/glibc-functions/getentropy.texi (getentropy):
31797         * doc/glibc-functions/getrandom.texi (getrandom):
31798         These are now fixed on some platforms.
31799         * lib/getentropy.c, lib/getrandom.c, lib/sys_random.in.h:
31800         * m4/getentropy.m4, m4/getrandom.m4:
31801         * modules/getentropy, modules/getentropy-tests:
31802         * modules/getrandom, modules/getrandom-tests:
31803         * tests/test-getentropy.c, tests/test-getrandom.c:
31804         New files.
31806 2020-05-25  Bruno Haible  <bruno@clisp.org>
31808         Add missing C99 dependencies.
31809         Reported by Paul Smith <psmith@gnu.org> in
31810         <https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00290.html>.
31811         * modules/assert (Depends-on): Add c99.
31812         * modules/filenamecat-lgpl (Depends-on): Likewise.
31813         * modules/libc-config (Depends-on): Likewise.
31814         * modules/mktime (Depends-on): Likewise.
31815         * modules/random_r (Depends-on): Likewise.
31816         * modules/regex (Depends-on): Likewise.
31817         * modules/scratch_buffer (Depends-on): Likewise.
31818         * modules/timespec-add (Depends-on): Likewise.
31819         * modules/timespec-sub (Depends-on): Likewise.
31820         * modules/verify (Depends-on): Likewise.
31822 2020-05-24  Paul Eggert  <eggert@cs.ucla.edu>
31824         explicit_bzero-tests: pacify -Wmissing-declarations
31825         * tests/test-explicit_bzero.c (do_secret_stuff, test_stack):
31826         Now static.
31828 2020-05-24  Bruno Haible  <bruno@clisp.org>
31830         fopen-gnu: Add tests.
31831         * tests/test-fopen-gnu.c: New file.
31832         * modules/fopen-gnu-tests: New file.
31834         fopen-gnu: New module.
31835         Suggested by Tim Rühsen <tim.ruehsen@gmx.de> in
31836         <https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00119.html>.
31837         * lib/fopen.c (rpl_fopen): When the fopen-gnu module is enabled and the
31838         mode contains an 'x' or 'e' flag, use open() followed by fdopen().
31839         * m4/fopen.m4 (gl_FUNC_FOPEN_GNU): New macro.
31840         * modules/fopen-gnu: New file.
31841         * doc/posix-functions/fopen.texi: Document the 'fopen-gnu' module.
31843 2020-05-24  Bruno Haible  <bruno@clisp.org>
31845         open, openat: Really support O_CLOEXEC.
31846         * lib/open.c (open): When have_cloexec is still undecided, do pass a
31847         O_CLOEXEC flag to orig_open.
31848         * lib/openat.c (rpl_openat): When have_cloexec is still undecided, do
31849         pass a O_CLOEXEC flag to orig_openat.
31850         * tests/test-open.h (test_open): Verify that O_CLOEXEC is honoured.
31851         * modules/open-tests (Depends-on): Add fcntl.
31852         * modules/openat-tests (Depends-on): Likewise.
31853         * modules/fcntl-safer-tests (Depends-on): Likewise.
31855 2020-05-24  Bruno Haible  <bruno@clisp.org>
31857         fopen: Fix the trailing slash workaround.
31858         * lib/fopen.c (rpl_fopen): Parse the mode string. Recognize "r+" as a
31859         write access. Pass the right flags to open().
31860         * tests/test-fopen.h (test_fopen): Add a few more tests on directories.
31862 2020-05-23  Paul Eggert  <eggert@cs.ucla.edu>
31864         assure: new macro ‘affirm’
31865         * lib/assure.h: Include verify.h.
31866         (affirm): New macro, after a suggestion by Marc Nieper-Wißkirchen in:
31867         https://lists.gnu.org/r/bug-gnulib/2020-05/msg00263.html
31868         and commentary by Bruno Haible in:
31869         https://lists.gnu.org/r/bug-gnulib/2020-05/msg00278.html
31870         * modules/assure (Depends-on:): Add verify.
31872 2020-05-23  Bruno Haible  <bruno@clisp.org>
31874         calloc-gnu: Make test work in non-flat address spaces.
31875         Uses code by Paul Eggert.
31876         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Allow a calloc() implementation
31877         to return more than SIZE_MAX bytes, but only without wrap-around bugs.
31879 2020-05-23  Bruno Haible  <bruno@clisp.org>
31881         calloc-gnu: Avoid wrong configure results with GCC's AddressSanitizer.
31882         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Split the AC_RUN_IFELSE into two
31883         AC_RUN_IFELSE invocations.
31885 2020-05-23  Bruno Haible  <bruno@clisp.org>
31887         isnanf, isnanl, isnan: Don't use nonexistent builtins with clang.
31888         * m4/isnanf.m4 (gl_HAVE_ISNANF_NO_LIBM, gl_HAVE_ISNANF_IN_LIBM,
31889         gl_ISNANF_WORKS): Don't use __builtin_isnanf on clang versions that
31890         don't have it.
31891         * m4/isnanl.m4 (gl_HAVE_ISNANL_NO_LIBM, gl_HAVE_ISNANL_IN_LIBM,
31892         gl_FUNC_ISNANL_WORKS): Don't use __builtin_isnanl on clang versions that
31893         don't have it.
31894         * lib/isnanf-nolibm.h (__has_builtin): New macro.
31895         (isnanf): Don't use __builtin_isnanf on clang versions that don't have
31896         it.
31897         * lib/isnanl-nolibm.h (__has_builtin): New macro.
31898         (isnanl): Don't use __builtin_isnanl on clang versions that don't have
31899         it.
31900         * lib/math.in.h (__has_builtin): New macro.
31901         (isnanf): Don't use __builtin_isnanf on clang versions that don't have
31902         it.
31903         (isnanl): Don't use __builtin_isnanl on clang versions that don't have
31904         it.
31905         (isnan): Don't use the builtins on clang versions that don't have
31906         __builtin_isnanf and __builtin_isnanl.
31908 2020-05-23  Bruno Haible  <bruno@clisp.org>
31910         calloc-gnu: Avoid wrong configure results with clang.
31911         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Mark the pointer variable as
31912         'volatile', to defeat compiler optimizations.
31914 2020-05-23  Bruno Haible  <bruno@clisp.org>
31916         isnanl, isnanl-nolibm: Make a test work better with "gcc -O2" on x86_64.
31917         * m4/exponentl.m4 (gl_LONG_DOUBLE_EXPONENT_LOCATION): Pass the
31918         'long double' values by reference, with values taken from a statically
31919         allocated array.
31921 2020-05-23  Bruno Haible  <bruno@clisp.org>
31923         findprog-in: Ignore directories.
31924         Reported by Frederick Eaton via Dmitry Goncharov in
31925         <https://lists.gnu.org/archive/html/bug-gnulib/2020-03/msg00003.html>.
31926         * lib/findprog-in.c (find_in_given_path): When the file found is a
31927         directory, set errno to EACCES and, during a PATH search, continue
31928         searching.
31929         * modules/findprog-in (Depends-on): Add sys_stat, stat.
31931 2020-05-23  Paul Eggert  <eggert@cs.ucla.edu>
31933         verify: document ‘assume’ better
31934         * lib/verify.h (assume): Say it’s for static analysis, not dynamic.
31936 2020-05-22  Asher Gordon  <AsDaGo@posteo.net>
31938         gendocs: Clarify licenses for templates.
31939         * doc/gendocs_template: Add a GNU All-Permissive license notice
31940         and bump Parent-Version.
31941         * doc/gendocs_template_min: Add a GNU All-Permissive license
31942         notice and copy the explanatory comment about the license notice
31943         at the bottom from gendocs_template.
31945 2020-05-21  Bruno Haible  <bruno@clisp.org>
31947         group-member: Relicense under LGPLv2+.
31948         Jim Meyering's approval is in
31949         <https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00218.html>.
31950         Paul Eggert's approval is in
31951         <https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00225.html>.
31952         Eric Blake's approval is in
31953         <https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00217.html>.
31954         * modules/group-member (License): Change to LGPLv2+.
31956 2020-05-21  Bruno Haible  <bruno@clisp.org>
31958         memmem: Avoid wrong configure results with "clang -fsanitize=undefined".
31959         Reported by Tim Rühsen in
31960         <https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00207.html>.
31961         * m4/memmem.m4 (gl_FUNC_MEMMEM_SIMPLE): Use NULL + 1, not NULL.
31963 2020-05-21  Bruno Haible  <bruno@clisp.org>
31965         regex: Avoid wrong configure results with "clang -fsanitize=leak".
31966         Reported by Tim Rühsen in
31967         <https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00207.html>.
31968         * m4/regex.m4 (gl_REGEX): Free compiled regexes and allocated registers
31969         before returning with status 0.
31971 2020-05-21  Bruno Haible  <bruno@clisp.org>
31973         glob: Avoid wrong configure results with "clang -fsanitize=leak".
31974         Reported by Tim Rühsen in
31975         <https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00207.html>.
31976         * m4/glob.m4 (gl_GLOB): Free allocated memory before returning.
31978 2020-05-21  Bruno Haible  <bruno@clisp.org>
31980         fchownat: Support clang -fsanitize=implicit-integer-sign-change better.
31981         Reported by Tim Rühsen in
31982         <https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00207.html>.
31983         * m4/fchownat.m4 (gl_FUNC_FCHOWNAT_DEREF_BUG,
31984         gl_FUNC_FCHOWNAT_EMPTY_FILENAME_BUG): Cast -1 to uid_t or git_t,
31985         respectively.
31987 2020-05-18  Tim Rühsen  <tim.ruehsenqgmx.de>
31989         getdelim: Avoid wrong configure results with gcc -fsanitize=address.
31990         * m4/getdelim.m4 (gl_FUNC_GETDELIM): Fix memleak.
31992 2020-05-19  Paul Eggert  <eggert@cs.ucla.edu>
31994         ftoastr: fix ifndef typo
31995         * lib/ftoastr.h (_GL_FTOASTR_H): Define.
31997 2020-05-19  Bruno Haible  <bruno@clisp.org>
31999         havelib: Tweak documentation.
32000         * doc/havelib.texi (Searching for Libraries): Fix typo.
32002 2020-05-18  Siddhesh Poyarekar  <siddhesh@gotplt.org>
32004         vcs-to-changelog: Rename vcs_to_changelog.py to use hyphens.
32005         This was needed earlier because modules had to import the main script,
32006         but that is no longer true.  Rename the script so that it is
32007         consistent with all other scripts in gnulib and uses hyphens.
32008         * build-aux/vcs_to_changelog.py: Rename to...
32009         * build-aux/vcs-to-changelog.py: ... this.
32010         * doc/vcs-to-changelog.texi (VCS To ChangeLog): Update reference.
32011         * modules/vcs-to-changelog: Likewise.
32013 2020-05-17  Bruno Haible  <bruno@clisp.org>
32015         Clarify intended usage of the license file modules.
32016         Reported by Asher Gordon <AsDaGo@posteo.net> in
32017         <https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00126.html>.
32018         * doc/licenses-texi.texi (License Texinfo sources): Mention the
32019         GNU AGPL. Explain the intended usage of the modules.
32020         * modules/fdl (Notice): Discourage use as a module.
32021         * modules/fdl-1.3 (Notice): Likewise.
32023 2020-05-17  Akim Demaille  <akim@lrde.epita.fr>
32025         hash: add hash_xinsert
32026         * lib/hash.h, lib/xhash.c (hash_xinsert): New.
32028 2020-05-16  Bruno Haible  <bruno@clisp.org>
32030         findprog-lgpl: Fix link error (existing since 2008-09-02).
32031         * modules/findprog-lgpl (Makefile.am): Arrange to compile
32032         findprog-lgpl.c, not findprog.c.
32033         * lib/findprog.c (find_in_path): Add LGPLed replacement code for
32034         XNMALLOC.
32036 2020-05-15  Paul Eggert  <eggert@cs.ucla.edu>
32038         c-stack: pacify -Wunused-result when DEBUG
32039         Problem reported by Marc Nieper-Wißkirchen in:
32040         https://lists.gnu.org/r/bug-gnulib/2020-05/msg00132.html
32041         * lib/c-stack.c (segv_handler, overflow_handler, segv_handler) [DEBUG]:
32042         Explicitly ignore write failures.
32044 2020-05-13  Jim Meyering  <meyering@fb.com>
32046         announce-gen: improve a comment
32047         * build-aux/announce-gen: Improve comment.
32049 2020-05-12  Paul Eggert  <eggert@cs.ucla.edu>
32051         xalloc: pacify -Wanalyzer-possible-null-argument
32052         Problem reported for GCC 10.1.0 by Bruno Haible in:
32053         https://lists.gnu.org/r/bug-gnulib/2020-05/msg00118.html
32054         * lib/xmalloc.c (HAVE_GNU_MALLOC, HAVE_GNU_REALLOC): New constants.
32055         (xmalloc): Suppress unnecessary check if HAVE_GNU_MALLOC.
32056         (xrealloc): Suppress unnecssary check if HAVE_GNU_REALLOC.
32058 2020-05-11  Paul Eggert  <eggert@cs.ucla.edu>
32060         careadlinkat: fix GCC 10 workaround
32061         * lib/careadlinkat.c (careadlinkat) [GCC_LINT]:
32062         Massage the code so that it’s closer to what it was before
32063         the GCC 10.1.0 workaround was introduced.  This fixes
32064         a loop when !buffer and the bug workaround is in effect.
32065         Remove unnecessary casts.  Defend in a different way
32066         against (buffer && !buffer_size), by adding at least 1
32067         to buf_size each time through the loop.
32069 2020-05-10  Bruno Haible  <bruno@clisp.org>
32071         doc: Mark HP-UX as unsupported.
32072         * doc/gnulib-intro.texi (Target Platforms): List HP-UX as unsupported.
32074 2020-05-10  Paul Eggert  <eggert@cs.ucla.edu>
32076         careadlinkat: limit GCC workaround
32077         * lib/careadlinkat.c (careadlinkat): Limit workaround to GCC
32078         10.1.0 and later, since the workaround is pretty bad and the GCC
32079         bug should get fixed.
32081 2020-05-10  Bruno Haible  <bruno@clisp.org>
32083         havelib: Enhance documentation.
32084         * doc/havelib.texi (Searching for Libraries): Mention the bad
32085         consequences of using LIBxxx instead of LTLIBxxx and vice versa.
32087 2020-05-10  Bruno Haible  <bruno@clisp.org>
32089         attribute: Clarify list of attributes.
32090         * lib/attribute.h: Reorder the list of attributes, and group them by
32091         purpose.
32093 2020-05-10  Bruno Haible  <bruno@clisp.org>
32095         string: Fix compilation error in C++ mode.
32096         * lib/warn-on-use.h (_GL_WARN_ON_USE_CXX): In C mode, use plain
32097         _GL_WARN_ON_USE.
32098         * lib/string.in.h (strchr, strpbrk, strrchr): Use _GL_WARN_ON_USE_CXX
32099         instead of _GL_WARN_ON_USE.
32101 2020-05-10  Akim Demaille  <akim@lrde.epita.fr>
32103         announce-gen: add support for dist-lzip
32104         * build-aux/announce-gen (@archive_suffixes): Add tar.lz.
32106 2020-05-09  Paul Eggert  <eggert@cs.ucla.edu>
32108         manywarnings: port to GCC 10.1
32109         * build-aux/gcc-warning.spec:
32110         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC(C)):
32111         Add GCC 10.1.0 warnings.
32113         careadlinkat: pacify -Wreturn-local-addr
32114         * lib/careadlinkat.c (careadlinkat) [GCC_LINT]:
32115         Pacify gcc 10’s -Wreturn-local-addr option.
32116         Simplify some of the later code.
32118 2020-05-09  Paul Eggert  <eggert@cs.ucla.edu>
32120         attribute: remove ATTRIBUTE_DEPRECATED
32121         * lib/attribute.h: Improve recently-added comments, mostly
32122         by shortening them (use active voice, etc.).
32123         (ATTRIBUTE_DEPRECATED): Remove, as it duplicates DEPRECATED.
32124         Problem reported by Bruno Haible in:
32125         https://lists.gnu.org/r/bug-gnulib/2020-05/msg00089.html
32127 2020-05-09  Bruno Haible  <bruno@clisp.org>
32129         attribute: Add comments.
32130         * lib/attribute.h: Document each macro.
32132 2020-05-09  Akim Demaille  <akim@lrde.epita.fr>
32134         bitset: use the attribute module
32135         * modules/bitset: Depend on 'attribute'.
32136         * lib/bitset/base.h (ATTRIBUTE_UNUSED): Remove.
32137         * lib/bitset.c, lib/bitset/array.c, lib/bitset/list.c,
32138         * lib/bitset/stats.c, lib/bitset/table.c, lib/bitset/vector.c:
32139         Use MAYBE_UNUSED instead of ATTRIBUTE_UNUSED.
32141 2020-05-09  Bruno Haible  <bruno@clisp.org>
32143         c-stack: Fix warning when DEBUG is enabled.
32144         Patch suggested by Marc Nieper-Wißkirchen <marc.nieper+gnu@gmail.com> in
32145         <https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00081.html>.
32146         * lib/c-stack.c: Include <stdio.h>.
32148 2020-05-09  Bruno Haible  <bruno@clisp.org>
32150         Remove redundant definitions of _GL_ATTRIBUTE_FORMAT.
32151         * lib/argp.h (_GL_ATTRIBUTE_FORMAT): Remove macro.
32152         * lib/argp-fmtstream.h (_GL_ATTRIBUTE_FORMAT): Likewise.
32153         * lib/c-snprintf.h (_GL_ATTRIBUTE_FORMAT): Likewise.
32154         * lib/c-vasnprintf.h (_GL_ATTRIBUTE_FORMAT): Likewise.
32155         * lib/c-vasprintf.h (_GL_ATTRIBUTE_FORMAT): Likewise.
32156         * lib/c-vsnprintf.h (_GL_ATTRIBUTE_FORMAT): Likewise.
32157         * lib/c-xvasprintf.h (_GL_ATTRIBUTE_FORMAT): Likewise.
32158         * lib/error.h (_GL_ATTRIBUTE_FORMAT): Likewise.
32159         * lib/parse-datetime.y (_GL_ATTRIBUTE_FORMAT): Likewise.
32160         * lib/vasnprintf.h (_GL_ATTRIBUTE_FORMAT): Likewise.
32161         * lib/xprintf.h (_GL_ATTRIBUTE_FORMAT): Likewise.
32162         * lib/xvasprintf.h (_GL_ATTRIBUTE_FORMAT): Likewise.
32164 2020-05-09  Bruno Haible  <bruno@clisp.org>
32166         Remove redundant definitions of _GL_ATTRIBUTE_ALLOC_SIZE.
32167         Reported by Akim Demaille in
32168         <https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00077.html>.
32169         * lib/eealloc.h (_GL_ATTRIBUTE_ALLOC_SIZE): Remove macro.
32170         * lib/pagealign_alloc.h (_GL_ATTRIBUTE_ALLOC_SIZE): Likewise.
32171         * lib/xalloc.h (_GL_ATTRIBUTE_ALLOC_SIZE): Likewise.
32173 2020-05-09  Bruno Haible  <bruno@clisp.org>
32175         stdio, monetary: Don't redefine _GL_ATTRIBUTE_FORMAT.
32176         * lib/stdio.in.h (_GL_ATTRIBUTE_FORMAT): Don't override the definition
32177         that usually comes from m4/gnulib-common.m4.
32178         * lib/monetary.in.h (_GL_ATTRIBUTE_FORMAT): Likewise.
32180 2020-05-09  Bruno Haible  <bruno@clisp.org>
32182         dirent, stdlib, wchar, string: Don't redefine _GL_ATTRIBUTE_PURE.
32183         * lib/dirent.in.h (_GL_ATTRIBUTE_PURE): Don't override the definition
32184         that usually comes from m4/gnulib-common.m4.
32185         * lib/stdlib.in.h (_GL_ATTRIBUTE_PURE): Likewise.
32186         * lib/string.in.h (_GL_ATTRIBUTE_PURE): Likewise.
32187         * lib/wchar.in.h (_GL_ATTRIBUTE_PURE): Likewise.
32189 2020-05-09  Bruno Haible  <bruno@clisp.org>
32191         uchar: Work around incorrect char16_t, char32_t types on Haiku 2020.
32192         * lib/uchar.in.h (char16_t): Define as macro if
32193         GNULIB_OVERRIDES_CHAR16_T.
32194         (char32_t): Define as macro if GNULIB_OVERRIDES_CHAR32_T.
32195         * m4/uchar.m4 (gl_TYPE_CHAR16_T, gl_TYPE_CHAR32_T): New macros.
32196         (gl_UCHAR_H): Invoke them.
32197         (gl_UCHAR_H_DEFAULTS): Initialize GNULIB_OVERRIDES_CHAR16_T,
32198         GNULIB_OVERRIDES_CHAR32_T.
32199         * m4/mbrtoc32.m4 (gl_FUNC_MBRTOC32, gl_MBRTOC32_SANITYCHECK): Require
32200         gl_TYPE_CHAR32_T and test GNULIB_OVERRIDES_CHAR32_T.
32201         * modules/uchar (Makefile.am): Substitute GNULIB_OVERRIDES_CHAR16_T,
32202         GNULIB_OVERRIDES_CHAR32_T.
32204 2020-05-09  Bruno Haible  <bruno@clisp.org>
32206         Macro tweaks.
32207         * m4/c32rtomb.m4 (gl_FUNC_C32RTOMB): Correct config.h comment.
32208         * m4/wint_t.m4 (gt_TYPE_WINT_T): Correct indentation.
32210 2020-05-08  Bruno Haible  <bruno@clisp.org>
32212         c32rtomb: Avoid compilation failure on Haiku.
32213         * m4/c32rtomb.m4 (gl_FUNC_C32RTOMB): Test for c32rtomb without excluding
32214         inline definitions.
32215         * doc/posix-functions/c32rtomb.texi: Mention the Haiku problem.
32217 2020-05-08  Bruno Haible  <bruno@clisp.org>
32219         mbrtoc32: Avoid compilation failure on Haiku.
32220         * m4/mbrtoc32.m4 (gl_CHECK_FUNC_MBRTOC32): New macro.
32221         (gl_FUNC_MBRTOC32, gl_MBRTOC32_SANITYCHECK): Use it instead of
32222         AC_CHECK_FUNCS_ONCE.
32223         * doc/posix-functions/mbrtoc32.texi: Mention the Haiku problem.
32225 2020-05-08  Bruno Haible  <bruno@clisp.org>
32227         limits-h: Define LONG_BIT correctly on Haiku/x86_64.
32228         * lib/limits.in.h: Define and test _GL_ALREADY_INCLUDING_LIMITS_H.
32230 2020-05-08  Bruno Haible  <bruno@clisp.org>
32232         list: Update documentation.
32233         Reported by Marc Nieper-Wißkirchen <marc.nieper+gnu@gmail.com> in
32234         <https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00062.html>.
32235         * doc/containers.texi (Container data types): Document the new list
32236         operations and their complexity.
32238 2020-05-08  Bruno Haible  <bruno@clisp.org>
32240         ignore-value tests: Use module 'attribute'.
32241         * m4/gnulib-common.m4 (gl_COMMON_BODY): Fix a typo.
32242         * tests/test-ignore-value.c: Include attribute.h.
32243         (_GL_ATTRIBUTE_RETURN_CHECK): Remove macro. Use NODISCARD instead.
32244         * modules/ignore-value-tests (Depends-on): Add attribute.
32246 2020-05-08  Bruno Haible  <bruno@clisp.org>
32248         uniname/uniname: Use module 'attribute'.
32249         * lib/uniname/gen-uninames.lisp: Emit a reference to ATTRIBUTE_PACKED.
32250         * lib/uniname/uninames.h: Regenerated.
32251         * lib/uniname/uniname.c: Include attribute.h.
32252         * modules/uniname/uniname (Depends-on): Add attribute.
32254 2020-05-08  Bruno Haible  <bruno@clisp.org>
32256         c32rtomb: Use module 'attribute'.
32257         * lib/c32rtomb.c: Include attribute.h.
32258         (FALLTHROUGH): Remove macro.
32259         * modules/c32rtomb (Depends-on): Add attribute.
32261 2020-05-08  Bruno Haible  <bruno@clisp.org>
32263         xsize: Use module 'attribute'.
32264         * lib/xsize.h: Include attribute.h. Use ATTRIBUTE_PURE.
32265         * modules/xsize (Depends-on): Add attribute.
32267 2020-05-06  Paul Eggert  <eggert@cs.ucla.edu>
32269         * m4/gnulib-common.m4 (gl_COMMON_BODY): Minor style fixes.
32271         * lib/attribute.h: Minor style fixes.
32273         Fix version-etc glitch on OpenIndiana
32274         Problem reported by Mats Erik Andersson in:
32275         https://lists.gnu.org/r/bug-gnulib/2020-05/msg00067.html
32276         * lib/version-etc.h (_GL_ATTRIBUTE_SENTINEL): Remove defn
32277         that now clashes with gnulib-common.h.  All uses changed.
32279 2020-05-03  Paul Eggert  <eggert@cs.ucla.edu>
32281         attribute: new module
32282         This simplifies use of GCC and C2x attributes like ‘deprecated’.
32283         * MODULES.html.sh: Add attribute.
32284         * doc/attribute.texi, lib/attribute.h, modules/attribute: New files.
32285         * doc/gnulib.texi (Particular Modules): Add Attributes.
32286         * lib/backupfile.c, lib/fnmatch.c, lib/freopen-safer.c:
32287         * lib/mbrtoc32.c, lib/mbrtowc.c, lib/nstrftime.c, lib/quotearg.c:
32288         * lib/savewd.c, lib/unistr/u8-uctomb-aux.c, lib/unistr/u8-uctomb.c:
32289         * lib/vasnprintf.c:
32290         Include attribute.h, and let it define FALLTHROUGH.
32291         * lib/bitset/base.h, lib/c-stack.c (__attribute__): Remove macro.
32292         * lib/bitset/base.h (ATTRIBUTE_UNUSED): Define in terms of
32293         _GL_ATTRIBUTE_MAYBE_UNUSED, for forwards compatibility to C2x.
32294         * lib/dfa.c (FALLTHROUGH): Define consistently with gl_COMMON_BODY.
32295         This is a copy since Gawk doesn’t use Gnulib.
32296         * lib/di-set.h (_GL_ATTRIBUTE_NONNULL): Remove definition that
32297         is incompatible with gl_COMMON_BODY’s.  All uses changed.
32298         * lib/fts.c: Include attribte.h, for FALLTHROUGH.
32299         Keep the existing FALLTHROUGH definition since Glibc might use it,
32300         and it does no harm to Gnulib’s FALLTHROUGH.
32301         * lib/fts_.h, lib/inttostr.h:
32302         (__GNUC_PREREQ): Remove; no longer needed.
32303         (__attribute_warn_unused_result__): Remove.  All uses
32304         replaced by _GL_ATTRIBUTE_NODISCARD.
32305         * lib/gl_list.h, lib/gl_map.h, lib/gl_omap.h, lib/gl_oset.h:
32306         * lib/gl_set.h: Prefer _GL_ATTRIBUTE_NODISCARD to an ifdeffed
32307         __attribute__ ((__warn_unused_result__)), for forward
32308         compatibility to C2x.
32309         * lib/hash.h (_GL_ATTRIBUTE_WUR): Remove.  All uses replaced by
32310         _GL_ATTRIBUTE_NODISCARD.
32311         (_GL_ATTRIBUTE_DEPRECATED): Remove, since gl_COMMON_BODY defines it.
32312         * lib/ino-map.h (_GL_ATTRIBUTE_NONNULL): Remove.  All uses
32313         replaced by gl_COMMON_BODY’s implementation, which has a
32314         slightly different signature.
32315         * lib/safe-alloc.h (_GL_ATTRIBUTE_RETURN_CHECK):
32316         Remove.  All uses replaced by _GL_ATTRIBUTE_NODISCARD.
32317         * lib/unused-parameter.h (_GL_UNUSED_PARAMETER):
32318         Define in terms of _GL_ATTRIBUTE_MAYBE_UNUSED.
32319         No doubt all uses should be replaced, at some point.
32320         * m4/gnulib-common.m4 (_GL_GNUC_PREREQ): New macro.
32321         (_Noreturn): Use it.
32322         (_GL_HAS_ATTRIBUTE, _GL_ATTRIBUTE_ALLOC_SIZE)
32323         (_GL_ATTRIBUTE_ALWAYS_INLINE, _GL_ATTRIBUTE_ARTIFICIAL)
32324         (_GL_ATTRIBUTE_COLD)
32325         (_GL_ATTRIBUTE_DEPRECATED, _GL_ATTRIBUTE_ERROR)
32326         (_GL_ATTRIBUTE_WARNING, _GL_ATTRIBUTE_EXTERNALLY_VISIBLE)
32327         (_GL_ATTRIBUTE_FALLTHROUGH, _GL_ATTRIBUTE_FORMAT)
32328         (_GL_ATTRIBUTE_LEAF, _GL_ATTRIBUTE_MAY_ALIAS)
32329         (_GL_ATTRIBUTE_MAYBE_UNUSED)
32330         (_GL_ATTRIBUTE_NODISCARD, _GL_ATTRIBUTE_NOINLINE)
32331         (_GL_ATTRIBUTE_NONNULL, _GL_ATTRIBUTE_NONSTRING)
32332         (_GL_ATTRIBUTE_NOTHROW, _GL_ATTRIBUTE_PACKED, _GL_ATTRIBUTE_PURE)
32333         (_GL_ATTRIBUTE_RETURNS_NONNULL)
32334         (_GL_ATTRIBUTE_SENTINEL): New macros.
32335         * modules/backup-rename, modules/backupfile, modules/c-vasnprintf:
32336         * modules/fnmatch, modules/freopen-safer, modules/fts:
32337         * modules/mbrtoc32, modules/mbrtowc, modules/nstrftime:
32338         * modules/quotearg, modules/savewd:
32339         * modules/unistdio/u16-u16-vasnprintf:
32340         * modules/unistdio/u16-vasnprintf:
32341         * modules/unistdio/u32-u32-vasnprintf:
32342         * modules/unistdio/u32-vasnprintf:
32343         * modules/unistdio/u8-u8-vasnprintf:
32344         * modules/unistdio/u8-vasnprintf:
32345         * modules/unistdio/ulc-vasnprintf:
32346         * modules/unistr/u8-uctomb, modules/vasnprintf:
32347         (Depends-on:): Add attribute module.
32349 2020-05-03  Bruno Haible  <bruno@clisp.org>
32351         bison: Fix today's commit.
32352         * m4/bison.m4 (gl_PROG_BISON): Set ac_verc_fail to 'yes', not 'true'.
32354 2020-05-03  Bruno Haible  <bruno@clisp.org>
32356         list-c++: Add get_first, get_last, set_first, set_last operations.
32357         * lib/gl_list.hh (class gl_List): Add methods get_first, get_last,
32358         set_first, set_last.
32359         * lib/gl_list.h: Tweak comments.
32361 2020-05-03  Akim Demaille  <akim@lrde.epita.fr>
32363         bison: rely on bison's %require to check a version requirement
32364         See https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00021.html.
32365         * m4/bison.m4 (gl_PROG_BISON): Let bison itself decide if it it recent
32366         enough of not.
32367         So far it is the only know Yacc tool that supports '%require'.
32368         Other yaccs will actually even choke on seeing the -o option after the
32369         input file name.
32370         * m4/parse-datetime.m4: Simplify gl_PROG_BISON invocation.
32372 2020-05-02  Bruno Haible  <bruno@clisp.org>
32374         list: Add get_first, get_last, set_first, set_last operations.
32375         * lib/gl_list.h (gl_list_get_first, gl_list_get_last,
32376         gl_list_nx_set_first, gl_list_nx_set_last): New functions.
32377         * lib/gl_xlist.h (gl_list_set_first, gl_list_set_last): New functions.
32379 2020-05-02  Bruno Haible  <bruno@clisp.org>
32381         list: Remove redundant code for remove_first and remove_last operations.
32382         * lib/gl_list.h (struct gl_list_implementation): Remove fields
32383         remove_first, remove_last.
32384         (gl_list_remove_first, gl_list_remove_last): Implement in a generic way.
32385         * lib/gl_array_list.c: Revert last change.
32386         * lib/gl_carray_list.c: Likewise.
32387         * lib/gl_anylinked_list2.h: Likewise.
32388         * lib/gl_linked_list.c: Likewise.
32389         * lib/gl_linkedhash_list.c: Likewise.
32390         * lib/gl_anytree_list2.h: Likewise.
32391         * lib/gl_avltree_list.c: Likewise.
32392         * lib/gl_avltreehash_list.c: Likewise.
32393         * lib/gl_rbtree_list.c: Likewise.
32394         * lib/gl_rbtreehash_list.c: Likewise.
32395         * lib/gl_sublist.c: Likewise.
32397 2020-05-02  Bruno Haible  <bruno@clisp.org>
32399         bison-i18n: Add support for cross-compilation.
32400         Reported by Hongxu Jia <hongxu.jia@windriver.com> in
32401         <https://lists.gnu.org/archive/html/bison-patches/2016-02/msg00000.html>
32402         via Akim Demaille <akim@lrde.epita.fr>.
32403         * m4/bison-i18n.m4 (BISON_I18N): Accept a configure option
32404         --with-bison-prefix=PREFIX and use it to determine BISON_LOCALEDIR.
32405         Don't use bison's --print-localedir option when cross-compiling.
32406         Also, fix an error message and a comment.
32408 2020-05-01  Bruno Haible  <bruno@clisp.org>
32410         list: Add remove_first and remove_last operations.
32411         Suggested by Marc Nieper-Wißkirchen <marc.nieper+gnu@gmail.com> in
32412         <https://lists.gnu.org/archive/html/bug-gnulib/2020-04/msg00092.html>.
32413         * lib/gl_list.h (struct gl_list_implementation): Add fields
32414         remove_first, remove_last.
32415         (gl_list_remove_first, gl_list_remove_last): New functions.
32416         * lib/gl_array_list.c (gl_array_remove_first, gl_array_remove_last): New
32417         functions, based on gl_array_remove_at.
32418         (gl_array_list_implementation): Implement the new operations.
32419         * lib/gl_carray_list.c (gl_carray_remove_first, gl_carray_remove_last):
32420         New functions, based on gl_carray_remove_at.
32421         (gl_carray_list_implementation): Implement the new operations.
32422         * lib/gl_anylinked_list2.h (gl_linked_remove_first,
32423         gl_linked_remove_last): New functions, based on gl_linked_remove_at.
32424         * lib/gl_linked_list.c (gl_linked_list_implementation): Implement the
32425         new operations.
32426         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation):
32427         Likewise.
32428         * lib/gl_anytree_list2.h (gl_tree_remove_first, gl_tree_remove_last):
32429         New functions, based on gl_tree_remove_at.
32430         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Implement the
32431         new operations.
32432         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
32433         Likewise.
32434         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Likewise.
32435         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation):
32436         Likewise.
32437         * lib/gl_sublist.c (gl_sublist_remove_first, gl_sublist_remove_last):
32438         New functions, based on gl_sublist_remove_at.
32439         (gl_sublist_list_implementation): Implement the new operations.
32440         * lib/gl_list.hh (class gl_List): Add methods remove_first,
32441         remove_last.
32442         * tests/test-array_list.c (main): Test also gl_list_remove_first and
32443         gl_list_remove_last.
32444         * tests/test-avltree_list.c (main): Likewise.
32445         * tests/test-avltreehash_list.c (main): Likewise.
32446         * tests/test-carray_list.c (main): Likewise.
32447         * tests/test-linked_list.c (main): Likewise.
32448         * tests/test-linkedhash_list.c (main): Likewise.
32449         * tests/test-rbtree_list.c (main): Likewise.
32450         * tests/test-rbtreehash_list.c (main): Likewise.
32452 2020-05-01  Bruno Haible  <bruno@clisp.org>
32454         parse-datetime: Fix a build failure with an older bison version.
32455         * modules/parse-datetime (Makefile.am): Don't do the post-processing of
32456         parse-datetime.tab.c if a suitable version of bison was not found.
32458 2020-05-01  Bruno Haible  <bruno@clisp.org>
32460         bison: New module.
32461         * m4/bison.m4 (gl_PROG_BISON): New macro, extracted from
32462         m4/parse-datetime.m4.
32463         * m4/parse-datetime.m4 (gl_PARSE_DATETIME): Invoke gl_PROG_BISON.
32464         * modules/bison: New file.
32465         * modules/parse-datetime (Files): Remove m4/bison.m4.
32466         (Depends-on): Add bison.
32468 2020-05-01  Jose E. Marchesi  <jemarch@gnu.org>
32470         Update users.txt.
32471         * users.txt: Add poke.
32473 2020-04-28  Bruno Haible  <bruno@clisp.org>
32475         posix_spawn_file_actions_addfchdir tests: Enhance test.
32476         * tests/test-posix_spawn5.c: Include findprog.h.
32477         (test): New function, extracted from main.
32478         (main): Invoke it. Also, invoke it with a program name such as
32479         "bin/pwd".
32480         * modules/posix_spawn_file_actions_addfchdir-tests (Depends-on): Add
32481         findprog.
32483 2020-04-28  Bruno Haible  <bruno@clisp.org>
32485         posix_spawn_file_actions_addchdir tests: Enhance test.
32486         * tests/test-posix_spawn4.c: Include findprog.h.
32487         (test): New function, extracted from main.
32488         (main): Invoke it. Also, invoke it with a program name such as
32489         "bin/pwd".
32490         * modules/posix_spawn_file_actions_addchdir-tests (Depends-on): Add
32491         findprog.
32493 2020-04-28  Bruno Haible  <bruno@clisp.org>
32495         posix_spawn_file_actions_destroy: Fix a crash (bug from 2019-06-10).
32496         * lib/spawn_faction_destroy.c (posix_spawn_file_actions_destroy): Don't
32497         access elements of the wrong union member.
32499 2020-04-27  Bruno Haible  <bruno@clisp.org>
32501         getdate: Remove deprecated module.
32502         * modules/getdate: Remove file.
32503         * doc/getdate.texi: Remove file.
32504         * lib/getdate.h: Remove file.
32505         * NEWS: Mention the removal.
32507 2020-04-27  Bruno Haible  <bruno@clisp.org>
32509         realloc: Remove deprecated module.
32510         * modules/realloc: Remove file.
32511         * NEWS: Mention the removal.
32513 2020-04-27  Bruno Haible  <bruno@clisp.org>
32515         calloc: Remove deprecated module.
32516         * modules/calloc: Remove file.
32517         * NEWS: Mention the removal.
32519 2020-04-27  Bruno Haible  <bruno@clisp.org>
32521         malloc: Remove deprecated module.
32522         * modules/malloc: Remove file.
32523         * NEWS: Mention the removal.
32525 2020-04-27  Bruno Haible  <bruno@clisp.org>
32527         fnmatch-posix: Remove deprecated module.
32528         * modules/fnmatch-posix: Remove file.
32529         * MODULES.html.sh (Enhancements for POSIX:2008 functions): Update.
32530         * NEWS: Mention the removal.
32532 2020-04-27  Bruno Haible  <bruno@clisp.org>
32534         pipe: Remove deprecated module.
32535         * modules/pipe: Remove file.
32536         * lib/pipe.h: Remove file.
32537         * NEWS: Mention the removal.
32539 2020-04-27  Bruno Haible  <bruno@clisp.org>
32541         getopt: Remove deprecated module.
32542         * modules/getopt: Remove file.
32543         * NEWS: Mention the removal.
32545 2020-04-27  Bruno Haible  <bruno@clisp.org>
32547         remove-dest-slash: Remove deprecated module.
32548         * modules/rename-dest-slash: Remove file.
32549         * MODULES.html.sh (Compatibility checks for POSIX:2008 functions):
32550         Update.
32551         * NEWS: Mention the removal.
32553 2020-04-27  Bruno Haible  <bruno@clisp.org>
32555         unictype/bidicategory-*: Remove deprecated modules.
32556         * modules/unictype/bidicategory-all: Remove file.
32557         * modules/unictype/bidicategory-byname: Remove file.
32558         * modules/unictype/bidicategory-name: Remove file.
32559         * modules/unictype/bidicategory-of: Remove file.
32560         * modules/unictype/bidicategory-test: Remove file.
32561         * MODULES.html.sh (Unicode string functions): Update.
32562         * NEWS: Mention the removals.
32564 2020-04-25  Paul Eggert  <eggert@cs.ucla.edu>
32566         Tune fts for FTS_LOGICAL+FTS_NOSTAT
32567         From a suggestion by Askar Safin in:
32568         https://lists.gnu.org/r/bug-gnulib/2020-04/msg00074.html
32569         * lib/fts.c (fts_build): If file types are known, optimize
32570         FTS_LOGICAL+FTS_NOSTAT for non-symlinks and non-directories the
32571         same way that we already optimize FTS_PHYSICAL+FTS_NOSTAT for
32572         non-directories.
32574 2020-04-19  Bruno Haible  <bruno@clisp.org>
32576         vasnprintf: Add support for printing wide characters using escapes.
32577         * lib/vasnprintf.c (ENABLE_WCHAR_FALLBACK): Document optional macro.
32578         (wctomb_fallback): New function.
32579         (local_wctomb): New function.
32580         (local_wcrtomb): New function or macro.
32581         (MAX_ROOM_NEEDED): Adjust estimate for %lc.
32582         (VASNPRINTF): Simplify %ls code by use of local_wcrtomb. Add code for
32583         %lc.
32585 2020-04-15  Paul Eggert  <eggert@cs.ucla.edu>
32587         fts: remove NOSTAT_LEAF_OPTIMIZATION
32588         It caused ‘find’ and ‘du’ to dump core, and it was useful
32589         only for obsolescent Linux filesystems anyway.  Problem reported in:
32590         https://lists.gnu.org/r/bug-gnulib/2020-04/msg00068.html
32591         Quite possibly there is still a serious underlying fts bug with
32592         tight-loop-check and mutating file systems, but if so this patch
32593         should cause the bug to be triggered less often.
32594         * lib/fts.c (enum leaf_optimization): Remove
32595         NOSTAT_LEAF_OPTIMIZATION, as it’s problematic.
32596         (S_MAGIC_REISERFS, S_MAGIC_XFS): Remove; no longer needed.
32597         (leaf_optimization): Remove special cases for ReiserFS and XFS.
32598         (fts_read): Remove NOSTAT_LEAF_OPTIMIZATION code.
32599         * lib/fts_.h (struct _ftsent.fts_n_dirs_remaining):
32600         Remove.  All uses removed.
32602 2020-04-13  Bastien Roucariès  <rouca@debian.org>
32604         explicit_bzero: Improve code style.
32605         * lib/explicit_bzero.c (explicit_bzero): Use '\0' instead of 0.
32607 2020-04-13  Bastien Roucariès  <rouca@debian.org>
32609         explicit_bzero: On native Windows, use SecureZeroMemory().
32610         * lib/explicit_bzero.c: Include <windows.h>.
32611         (explicit_bzero): On native Windows, use SecureZeroMemory.
32613 2020-04-13  Bastien Roucariès  <rouca@debian.org>
32615         explicit_bzero: Use memset_s() when available.
32616         * lib/explicit_bzero.c (__STDC_WANT_LIB_EXT1__): Define.
32617         (explicit_bzero): Use memset_s when available.
32618         * m4/explicit_bzero.m4 (gl_PREREQ_EXPLICIT_BZERO): Test for memset_s.
32620 2020-04-13  Bastien Roucariès  <rouca@debian.org>
32622         explicit_bzero tests: Fix test failure on OpenBSD 6.5.
32623         * tests/test-explicit_bzero.c (test_heap): Handle implementations of
32624         free() that overwrite the memory with canaries.
32626 2020-04-13  Akim Demaille  <akim@lrde.epita.fr>
32628         bootstrap: recommend git submodule update --init
32629         Reported by Bruno Haible.
32630         <https://lists.gnu.org/r/bug-gnulib/2020-03/msg00101.html>
32631         * build-aux/bootstrap: recommand "git submodule update --init"
32632         rather than "git submodule init".
32634 2020-04-12  Bruno Haible  <bruno@clisp.org>
32636         explicit_bzero: Add tests.
32637         * tests/test-explicit_bzero.c: New file.
32638         * modules/explicit_bzero-tests: New file.
32640 2020-04-11  Bruno Haible  <bruno@clisp.org>
32642         explicit_bzero: Relicense under LGPLv2+.
32643         Approved by Paul Eggert.
32644         * modules/explicit_bzero (License): Change to LGPLv2+.
32646 2020-04-10  Bruno Haible  <bruno@clisp.org>
32648         findprog, relocatable-prog: Ignore directories during PATH search.
32649         Reported by Frederick Eaton via Dmitry Goncharov in
32650         <https://lists.gnu.org/archive/html/bug-gnulib/2020-03/msg00003.html>.
32652         * lib/findprog.c (find_in_path): When the file found in a PATH element
32653         is a directory, continue searching.
32654         * modules/findprog (Depends-on): Add sys_stat, stat.
32655         * modules/findprog-lgpl (Depends-on): Likewise.
32657         * lib/progreloc.c (maybe_executable): When the file found in a PATH
32658         element is a directory, continue searching.
32659         * lib/relocwrapper.c: Update comments.
32660         * modules/relocatable-prog-wrapper (Files): Add m4/largefile.m4.
32661         (configure.ac-early): New section.
32663 2020-04-10  Bruno Haible  <bruno@clisp.org>
32665         MODULES.html.sh: Support for reproducible builds from git-less tarballs.
32666         Reported by Bernhard M. Wiedemann <bwiedemann@suse.de> in
32667         <https://lists.gnu.org/archive/html/bug-gnulib/2020-03/msg00061.html>.
32668         * MODULES.html.sh: In a git-less tarball, use the date of the first
32669         ChangeLog entry.
32671 2020-04-04  Bruno Haible  <bruno@clisp.org>
32673         Fix comments: The gettext library is under LGPL 2.1, not LGPL 2.0.
32674         * m4/gettext.m4: Fix comments regarding the gettext library.
32675         * m4/intl-thread-locale.m4: Likewise.
32676         * m4/intlmacosx.m4: Likewise.
32677         * m4/lcmessage.m4: Likewise.
32678         * m4/nls.m4: Likewise.
32679         * m4/po.m4: Likewise.
32680         * m4/progtest.m4: Likewise.
32682 2020-04-04  Jim Meyering  <meyering@fb.com>
32684         maint: remove a stray inter-word space in a 6x-repeated comment
32685         Induce the changes by running this:
32686           re='by  perl'; git grep -l "$re"|xargs perl -pi -e "s/$re/by perl/"
32687         * build-aux/announce-gen: Change "by  perl" to "by perl".
32688         * build-aux/gitlog-to-changelog: Likewise.
32689         * build-aux/prefix-gnulib-mk: Likewise.
32690         * build-aux/update-copyright: Likewise.
32691         * build-aux/useless-if-before-free: Likewise.
32692         * tests/test-update-copyright.sh: Likewise.
32694 2020-03-28  Bruno Haible  <bruno@clisp.org>
32696         Use module 'filename' instead of module 'dosname'.
32698         * lib/at-func.c: Include filename.h instead of dosname.h.
32699         * lib/unlinkat.c: Likewise.
32700         * modules/areadlinkat (Depends-on): Add filename. Remove dosname.
32701         * modules/areadlinkat-with-size (Depends-on): Likewise.
32702         * modules/faccessat (Depends-on): Likewise.
32703         * modules/fchmodat (Depends-on): Likewise.
32704         * modules/fchownat (Depends-on): Likewise.
32705         * modules/fstatat (Depends-on): Likewise.
32706         * modules/mkdirat (Depends-on): Likewise.
32707         * modules/mkfifoat (Depends-on): Likewise.
32708         * modules/readlinkat (Depends-on): Likewise.
32709         * modules/selinux-at (Depends-on): Likewise.
32710         * modules/symlinkat (Depends-on): Likewise.
32711         * modules/unlinkat (Depends-on): Likewise.
32712         * modules/utimensat (Depends-on): Likewise.
32714         * lib/at-func2.c: Include filename.h instead of dosname.h.
32715         * modules/linkat (Depends-on): Add filename. Remove dosname.
32716         * modules/renameatu (Depends-on): Likewise.
32718         * lib/canonicalize.c: Include filename.h instead of dosname.h.
32719         * lib/canonicalize-lgpl.c: Likewise.
32720         * modules/canonicalize (Depends-on): Add filename.
32721         * modules/canonicalize-lgpl (Depends-on): Likewise.
32723         * lib/dirname.h: Include filename.h instead of dosname.h.
32724         * modules/dirname-lgpl (Depends-on): Add filename. Remove dosname.
32726         * lib/fchdir.c: Include filename.h instead of dosname.h.
32727         * modules/fchdir (Depends-on): Add filename. Remove dosname.
32729         * lib/openat.c: Include filename.h instead of dosname.h.
32730         * modules/openat (Depends-on): Add filename. Remove dosname.
32732         * lib/rmdir.c: Include filename.h instead of dosname.h.
32733         * modules/rmdir (Depends-on): Add filename. Remove dosname.
32735         * lib/savewd.c: Include filename.h instead of dosname.h.
32736         * modules/savewd (Depends-on): Add filename. Remove dosname.
32738         * lib/unlink.c: Include filename.h instead of dosname.h.
32739         * modules/unlink (Depends-on): Add filename. Remove dosname.
32741         * modules/relocatable-prog-wrapper (Depends-on): Add filename.
32742         * lib/relocwrapper.c: Update comments.
32744         * modules/lstat (Depends-on): Remove dosname.
32746 2020-03-28  Bruno Haible  <bruno@clisp.org>
32748         dosname: Redirect to 'filename'.
32749         Reported by Tim Rühsen <tim.ruehsen@gmx.de> in
32750         <https://lists.gnu.org/archive/html/bug-gnulib/2020-03/msg00042.html>.
32751         * lib/dosname.h: Remove all definitions. Just include filename.h.
32752         * modules/dosname (Status, Notice): Mark as deprecated.
32753         (Depends-on): Add 'filename'.
32755 2020-03-28  Bruno Haible  <bruno@clisp.org>
32757         dosname: Change IS_RELATIVE_FILE_NAME.
32758         * lib/dosname.h (IS_RELATIVE_FILE_NAME): On native Windows, OS/2, DOS,
32759         change the definition so that IS_RELATIVE_FILE_NAME("c:") is false.
32760         * NEWS: Mention the change.
32762 2020-03-28  Bruno Haible  <bruno@clisp.org>
32764         filename: Copy some definitions from module 'dosname'.
32765         * lib/filename.h: Include <string.h>, for IS_FILE_NAME_WITH_DIR.
32766         (HAS_DEVICE): Document macro.
32767         (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE): New macro.
32768         (IS_ABSOLUTE_FILE_NAME): Consider
32769         FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE.
32770         (IS_RELATIVE_FILE_NAME, IS_FILE_NAME_WITH_DIR): New macros.
32771         (IS_ABSOLUTE_PATH, IS_PATH_WITH_DIR): Define as deprecated aliases.
32772         * lib/relocatable.c (IS_FILE_NAME_WITH_DIR): Renamed from
32773         IS_PATH_WITH_DIR.
32774         (DllMain): Update.
32775         * lib/progreloc.c (IS_FILE_NAME_WITH_DIR): Renamed from
32776         IS_PATH_WITH_DIR.
32777         (find_executable): Update.
32778         * NEWS: Document the deprecations.
32780 2020-03-25  Paul Eggert  <eggert@cs.ucla.edu>
32782         getopt-posix: port __GETOPT_PREFIX to macOS
32783         * lib/getopt-pfx-core.h (_GETOPT) [__APPLE__ && __GETOPT_PREFIX]:
32784         Define to work around a problem with asm on macOS (Bug#40205).
32786 2020-03-22  Bruno Haible  <bruno@clisp.org>
32788         MODULES.html.sh: Add support for reproducible builds.
32789         Reported by Bernhard M. Wiedemann <bwiedemann@suse.de> in
32790         <https://lists.gnu.org/archive/html/bug-gnulib/2020-03/msg00024.html>.
32791         * MODULES.html.sh: Print the date of the last gnulib commit, not the
32792         current date.
32794 2020-03-22  Bruno Haible  <bruno@clisp.org>
32796         Several modules: Depend on stat.
32797         * modules/acl-permissions (Depends-on): Add stat.
32798         * modules/canonicalize (Depends-on): Likewise.
32799         * modules/file-has-acl (Depends-on): Likewise.
32800         * modules/fstat (Depends-on): Likewise.
32801         * modules/fstatat (Depends-on): Likewise.
32802         * modules/glob (Depends-on): Likewise.
32803         * modules/javacomp (Depends-on): Likewise.
32804         * modules/linkat (Depends-on): Likewise.
32805         * modules/mkdir (Depends-on): Likewise.
32806         * modules/pt_chown (Depends-on): Likewise.
32807         * modules/ptsname_r (Depends-on): Likewise.
32808         * modules/readlinkat (Depends-on): Likewise.
32809         * modules/rename (Depends-on): Likewise.
32810         * modules/renameatu (Depends-on): Likewise.
32811         * modules/tmpdir (Depends-on): Likewise.
32812         * modules/utimens (Depends-on): Likewise.
32813         * modules/relocatable-prog-wrapper (Depends-on): Add largefile.
32814         * modules/same (Depends-on): Remove stat.
32816 2020-03-22  Bruno Haible  <bruno@clisp.org>
32818         acl-permissions: Improve autoconf macro.
32819         * m4/acl.m4 (gl_FUNC_ACL): Test the value of gl_need_lib_has_acl
32820         more reliably.
32822 2020-03-22  Bruno Haible  <bruno@clisp.org>
32824         file-has-acl: Fix module description.
32825         * modules/file-has-acl (Files): Add lib/acl-internal.h, m4/acl.m4.
32826         (Depends-on): Depend on acl-permissions unconditionally.
32828 2020-03-21  Bruno Haible  <bruno@clisp.org>
32830         unlink: Ensure errno also on native Windows.
32831         * modules/unlink (Depends-on): Add malloc-posix.
32833 2020-03-21  Paul Eggert  <eggert@cs.ucla.edu>
32835         unlink: fix malloc errno typo
32836         Problem reported by Tim Rühsen in:
32837         https://lists.gnu.org/r/bug-gnulib/2020-03/msg00044.html
32838         * lib/unlink.c (rpl_unlink): Don’t mask malloc errno.
32840 2020-03-16  Bruno Haible  <bruno@clisp.org>
32842         *printf-posix: Fix m4 error (regression from 2020-03-08).
32843         * m4/printf.m4 (gl_SNPRINTF_DIRECTIVE_N): Enable interpretation of
32844         brackets in AC_COMPILE_IFELSE invocation.
32846 2020-03-08  Bruno Haible  <bruno@clisp.org>
32848         crypto/af_alg, renameatu, same, term-style-control: Depend on fstat.
32849         * modules/crypto/af_alg (Depends-on): Add fstat.
32850         * modules/renameatu (Depends-on): Likewise.
32851         * modules/same (Depends-on): Likewise.
32852         * modules/term-style-control (Depends-on): Likewise.
32854 2020-03-08  Bruno Haible  <bruno@clisp.org>
32856         *printf-posix: Document why it's overridden on some glibc systems.
32857         Reported by Adrian Bunk <bunk@stusta.de> in
32858         <https://lists.gnu.org/archive/html/bug-gnulib/2020-03/msg00011.html>.
32859         * doc/posix-functions/*printf.texi: Document the problem with the %n
32860         directive on some glibc systems.
32861         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_N, gl_SNPRINTF_DIRECTIVE_N): Adjust
32862         the cross-compilation guesses accordingly.
32864 2020-03-07  Paul Eggert  <eggert@cs.ucla.edu>
32866         open, openat: port to (O_RDWR | O_RDONLY) != 0
32867         Potential portability problem reported by Dan Gohman in:
32868         https://lists.gnu.org/r/bug-gnulib/2020-03/msg00000.html
32869         * lib/open.c (open):
32870         * lib/openat.c (rpl_openat):
32871         Don’t assume O_RDONLY is disjoint from O_RDWR.
32873 2020-03-07  Bruno Haible  <bruno@clisp.org>
32875         openat: Fix theoretically possible issue on GNU/Hurd.
32876         Reported by Dan Gohman <sunfish@mozilla.com> in
32877         <https://lists.gnu.org/archive/html/bug-gnulib/2020-03/msg00000.html>.
32878         * lib/openat.c (rpl_openat): When testing whether flags contains O_RDWR,
32879         ignore the bits that are also set in O_RDONLY.
32881 2020-02-24  Bruno Haible  <bruno@clisp.org>
32883         getloadavg: Don't use /usr/local when cross-compiling on AIX.
32884         Reported by Jens Rehsack <sno@netbsd.org> in
32885         <https://lists.gnu.org/archive/html/bug-gnulib/2020-02/msg00136.html>.
32886         * m4/getloadavg.m4 (gl_GETLOADAVG): Don't look in /usr/local/lib when
32887         cross-compiling.
32889 2020-02-24  Bruno Haible  <bruno@clisp.org>
32891         fcntl: Add witness of gnulib override.
32892         Reported by Jens Rehsack <sno@netbsd.org> in
32893         <https://lists.gnu.org/archive/html/bug-gnulib/2020-02/msg00137.html>.
32894         * lib/fcntl.in.h (GNULIB_defined_rpl_fcntl, GNULIB_defined_fcntl): New
32895         macros.
32897 2020-02-23  Assaf Gordon  <assafgordon@gmail.com>
32899         Update users.txt.
32900         * users.txt: Add datamash, time.
32902 2020-02-23  Bruno Haible  <bruno@clisp.org>
32904         uni*/base: Use 'restrict'.
32905         * lib/unitypes.in.h (_UC_RESTRICT): New macro, based on '_Restrict_'
32906         from lib/regex.h.
32907         * lib/unistr.in.h (u8_cpy, u16_cpy, u32_cpy, u8_strcpy, u16_strcpy,
32908         u32_strcpy, u8_stpcpy, u16_stpcpy, u32_stpcpy, u8_strncpy, u16_strncpy,
32909         u32_strncpy, u8_stpncpy, u16_stpncpy, u32_stpncpy, u8_strcat,
32910         u16_strcat, u32_strcat, u8_strncat, u16_strncat, u32_strncat, u8_strtok,
32911         u16_strtok, u32_strtok): Use '_UC_RESTRICT'.
32912         * lib/uninorm.in.h (u8_normalize, u16_normalize, u32_normalize): Use
32913         '_UC_RESTRICT'.
32914         * lib/uniconv.in.h (u8_conv_to_encoding, u16_conv_to_encoding,
32915         u32_conv_to_encoding): Use '_UC_RESTRICT'.
32916         * lib/unicase.in.h (u8_toupper, u16_toupper, u32_toupper, u8_tolower,
32917         u16_tolower, u32_tolower, u8_totitle, u16_totitle, u32_totitle,
32918         u8_ct_toupper, u16_ct_toupper, u32_ct_toupper, u8_ct_tolower,
32919         u16_ct_tolower, u32_ct_tolower, u8_ct_totitle, u16_ct_totitle,
32920         u32_ct_totitle, u8_casefold, u16_casefold, u32_casefold, u8_ct_casefold,
32921         u16_ct_casefold, u32_ct_casefold, u8_casexfrm, u16_casexfrm,
32922         u32_casexfrm, ulc_casexfrm): Use '_UC_RESTRICT'.
32923         * lib/unilbrk.in.h (u8_possible_linebreaks, u16_possible_linebreaks,
32924         u32_possible_linebreaks, ulc_possible_linebreaks, u8_width_linebreaks,
32925         u16_width_linebreaks, u32_width_linebreaks, ulc_width_linebreaks): Use
32926         '_UC_RESTRICT'.
32927         * lib/uniwbrk.in.h (ulc_wordbreaks): Use '_UC_RESTRICT'.
32928         * lib/unistdio.in.h (ulc_sprintf, ulc_snprintf, ulc_asnprintf,
32929         ulc_vsprintf, ulc_vsnprintf, ulc_vasnprintf, u8_u8_sprintf,
32930         u8_u8_snprintf, u8_u8_asnprintf, u8_u8_vsprintf, u8_u8_vsnprintf,
32931         u8_u8_vasnprintf, u16_u16_sprintf, u16_u16_snprintf, u16_u16_asnprintf,
32932         u16_u16_vsprintf, u16_u16_vsnprintf, u16_u16_vasnprintf,
32933         u32_u32_sprintf, u32_u32_snprintf, u32_u32_asnprintf, u32_u32_vsprintf,
32934         u32_u32_vsnprintf, u32_u32_vasnprintf): Use '_UC_RESTRICT'.
32936 2020-02-23  Bruno Haible  <bruno@clisp.org>
32938         glob, spawn: Use improved '_Restrict_' definition.
32939         * lib/glob.in.h (_Restrict_): Use same definition as in lib/regex.h.
32940         * lib/spawn.in.h (_Restrict_, _Restrict_arr_): Likewise.
32942 2020-02-23  Bruno Haible  <bruno@clisp.org>
32944         crypto/gc: Use 'restrict'.
32945         * lib/gc.h (gc_pbkdf2_hmac, gc_pbkdf2_sha1): Use 'restrict'.
32946         * m4/gc.m4 (gl_GC): Require AC_C_RESTRICT.
32948         crypto/hmac-*: Use 'restrict'.
32949         * lib/hmac.h (hmac_md5, hmac_sha1, hmac_sha256, hmac_sha512): Use
32950         'restrict'.
32951         * modules/crypto/hmac-md5 (configure.ac): Require AC_C_RESTRICT.
32952         * modules/crypto/hmac-sha1 (configure.ac): Likewise.
32953         * modules/crypto/hmac-sha256 (configure.ac): Likewise.
32954         * modules/crypto/hmac-sha512 (configure.ac): Likewise.
32956         crypto/sm3: Use 'restrict'.
32957         * lib/sm3.h (sm3_finish_ctx, sm3_read_ctx, sm3_buffer): Use 'restrict'.
32958         * m4/sm3.m4 (gl_SM3): Require AC_C_RESTRICT.
32960         crypto/*-buffer: Use 'restrict'.
32961         * lib/gl_openssl.h (GL_CRYPTO_FN (_finish_ctx), GL_CRYPTO_FN (_buffer),
32962         GL_CRYPTO_FN (_read_ctx)): Use 'restrict'.
32964         crypto/sha512-buffer: Use 'restrict'.
32965         * lib/sha512.h (sha512_finish_ctx, sha384_finish_ctx, sha512_read_ctx,
32966         sha384_read_ctx, sha512_buffer, sha384_buffer): Use 'restrict'.
32967         * modules/crypto/sha512-buffer (configure.ac): Require AC_C_RESTRICT.
32969         crypto/sha256-buffer: Use 'restrict'.
32970         * lib/sha256.h (sha256_finish_ctx, sha224_finish_ctx, sha256_read_ctx,
32971         sha224_read_ctx, sha256_buffer, sha224_buffer): Use 'restrict'.
32972         * modules/crypto/sha256-buffer (configure.ac): Require AC_C_RESTRICT.
32974         crypto/sha1-buffer: Use 'restrict'.
32975         * lib/sha1.h (sha1_finish_ctx, sha1_read_ctx, sha1_buffer): Use
32976         'restrict'.
32977         * modules/crypto/sha1-buffer (configure.ac): Require AC_C_RESTRICT.
32979         crypto/md5-buffer: Use 'restrict'.
32980         * lib/md5.h (__md5_finish_ctx, __md5_read_ctx, __md5_buffer): Use
32981         'restrict'.
32982         * modules/crypto/md5-buffer (configure.ac): Require AC_C_RESTRICT.
32984         crypto/md4: Use 'restrict'.
32985         * lib/md4.h (md4_finish_ctx, md4_read_ctx, md4_buffer): Use 'restrict'.
32986         * modules/crypto/md4 (configure.ac): Require AC_C_RESTRICT.
32988         crypto/md2: Use 'restrict'.
32989         * lib/md2.h (md2_finish_ctx, md2_read_ctx, md2_buffer): Use 'restrict'.
32990         * modules/crypto/md2 (configure.ac): Require AC_C_RESTRICT.
32992         crypto/rijndael: Use 'restrict'.
32993         * lib/rijndael-api-fst.h (rijndaelBlockEncrypt, rijndaelPadEncrypt,
32994         rijndaelBlockDecrypt, rijndaelPadDecrypt): Use 'restrict'.
32995         * modules/crypto/rijndael (configure.ac): Require AC_C_RESTRICT.
32997         crypto/arctwo: Use 'restrict'.
32998         * lib/arctwo.h (arctwo_encrypt, arctwo_decrypt): Use 'restrict'.
32999         * modules/crypto/arctwo (configure.ac): Require AC_C_RESTRICT.
33001         crypto/arcfour: Use 'restrict'.
33002         * lib/arcfour.h (arcfour_stream): Use 'restrict'.
33003         * modules/crypto/arcfour (configure.ac): Require AC_C_RESTRICT.
33005         careadlinkat: Use 'restrict'.
33006         * lib/careadlinkat.h (careadlinkat): Use 'restrict'.
33007         * modules/careadlinkat (configure.ac): Require AC_C_RESTRICT.
33008         * modules/relocatable-prog-wrapper (configure.ac): Likewise.
33010         regex-quote: Use 'restrict'.
33011         * lib/regex-quote.h (regex_quote_copy): Use 'restrict'.
33012         * modules/regex-quote (configure.ac): Require AC_C_RESTRICT.
33014         system-quote: Use 'restrict'.
33015         * lib/system-quote.h (system_quote_copy): Use 'restrict'.
33016         * modules/system-quote (configure.ac): Require AC_C_RESTRICT.
33018         sh-quote: Use 'restrict'.
33019         * lib/sh-quote.h (shell_quote_copy): Use 'restrict'.
33020         * modules/sh-quote (configure.ac): Require AC_C_RESTRICT.
33022         quotearg: Use 'restrict'.
33023         * lib/quotearg.h (quotearg_buffer): Use 'restrict'.
33024         * m4/quotearg.m4 (gl_QUOTEARG): Require AC_C_RESTRICT.
33026         parse-datetime: Use 'restrict'.
33027         * lib/parse-datetime.h (parse_datetime, parse_datetime2): Use
33028         'restrict'.
33029         * m4/parse-datetime.m4 (gl_PARSE_DATETIME): Require AC_C_RESTRICT.
33031         nstrftime: Use 'restrict'.
33032         * lib/strftime.h (nstrftime): Use 'restrict'.
33033         * m4/nstrftime.m4 (gl_FUNC_GNU_STRFTIME): Require AC_C_RESTRICT.
33035         mbstok_r: Use 'restrict'.
33036         * lib/string.in.h (mbstok_r): Use 'restrict'.
33038         xmemcoll: Use 'restrict'.
33039         * lib/xmemcoll.h (xmemcoll): Use 'restrict'.
33040         * modules/xmemcoll (configure.ac): Require AC_C_RESTRICT.
33042         memcoll: Use 'restrict'.
33043         * lib/memcoll.h (memcoll): Use 'restrict'.
33044         * m4/memcoll.m4 (gl_MEMCOLL): Require AC_C_RESTRICT.
33046         vasnprintf: Use 'restrict'.
33047         * lib/vasnprintf.h (asnprintf, vasnprintf): Use 'restrict'.
33048         * modules/vasnprintf (configure.ac): Require AC_C_RESTRICT.
33050         c-vasnprintf: Use 'restrict'.
33051         * lib/c-vasnprintf.h (c_vasnprintf): Use 'restrict'.
33052         * modules/c-vasnprintf (configure.ac): Require AC_C_RESTRICT.
33054         c-vsnprintf: Use 'restrict'.
33055         * lib/c-vsnprintf.h (c_vsnprintf): Use 'restrict'.
33056         * modules/c-vsnprintf (configure.ac): Require AC_C_RESTRICT.
33058         c-snprintf: Use 'restrict'.
33059         * lib/c-snprintf.h (c_snprintf): Use 'restrict'.
33060         * modules/c-snprintf (configure.ac): Require AC_C_RESTRICT.
33062         astrxfrm: Use 'restrict'.
33063         * lib/astrxfrm.h (astrxfrm): Use 'restrict'.
33064         * modules/astrxfrm (configure.ac): Require AC_C_RESTRICT.
33066         amemxfrm: Use 'restrict'.
33067         * lib/amemxfrm.h (amemxfrm): Use 'restrict'.
33068         * modules/amemxfrm (configure.ac): Require AC_C_RESTRICT.
33070 2020-02-22  Paul Eggert  <eggert@cs.ucla.edu>
33072         fchmodat, lchmod: simplify
33073         It appears that we may have overengineered lchmod and fchmodat,
33074         in that the code was prepared for some hypothetical platforms but
33075         was so complicated that it was hard to understand.  I attempted to
33076         improve the situation by simplifying the code when this
33077         simplification should not hurt on real platforms; we can re-add
33078         complexity later to port to platforms I didn’t know about.
33079         * lib/fchmodat.c (fchmodat):
33080         * lib/lchmod.c (lchmod):
33081         Put the ‘defined __linux__ || defined __ANDROID__’ #ifdef only
33082         around the /proc code that needs it.
33083         * lib/fchmodat.c (fchmodat): Coalese calls to orig_fchmodat.
33084         * lib/lchmod.c (__need_system_sys_stat_h): Omit; no longer needed.
33085         Do not include <config.h> twice.
33086         (orig_lchmod) [HAVE_LCHMOD]: Remove, since we need not wrap
33087         lchmod on any known hosts.
33088         (lchmod): Do not defer to fchmodat, so that the lchmod module
33089         need not depend on the fchmodat module (which is a circular
33090         dependency).  Do not use openat, since ‘open’ suffices.
33091         Coalesce calls to lchmod/chmod.
33092         * lib/lchmod.c, lib/sys_stat.in.h (lchmod):
33093         * m4/sys_stat_h.m4 (REPLACE_FSTAT):
33094         * modules/lchmod (Depends-on, configure.ac):
33095         * modules/sys_stat (Depends-on):
33096         Do not worry about replacing lchmod, since that shouldn’t happen.
33097         * m4/lchmod.m4 (gl_FUNC_LCHMOD): Do not check for fchmodat.
33098         Do not worry about whether lchmod works on non-symlinks,
33099         since every known lchmod works on non-symlinks.
33100         * modules/lchmod (Depends-on):
33101         Remove circular dependency on fchmodat.
33103 2020-02-22  Bruno Haible  <bruno@clisp.org>
33105         lchmod: Fix link error on Solaris 10 (regression from 2020-02-16).
33106         * lib/lchmod.c (lchmod): Use the code with lstat and chmod also when
33107         NEED_LCHMOD_NONSYMLINK_FIX is not defined.
33109 2020-02-22  Bruno Haible  <bruno@clisp.org>
33111         Use 'restrict' in all POSIX function declarations.
33112         * lib/iconv.in.h (iconv): Use 'restrict'.
33113         * lib/inttypes.in.h (strtoimax, strtoumax): Likewise.
33114         * lib/monetary.in.h (strfmon_l): Likewise.
33115         * lib/pthread.in.h (pthread_create, pthread_mutex_init,
33116         pthread_mutexattr_gettype, pthread_mutexattr_getrobust,
33117         pthread_mutex_timedlock, pthread_rwlock_init,
33118         pthread_rwlock_timedrdlock, pthread_rwlock_timedwrlock,
33119         pthread_cond_init, pthread_cond_wait, pthread_cond_timedwait): Likewise.
33120         * lib/search.in.h (tdelete): Likewise.
33121         * lib/signal.in.h (pthread_sigmask, sigprocmask): Likewise.
33122         * lib/stdio.in.h (dprintf, fgets, fopen, fprintf, fputs, fread, freopen,
33123         fscanf, fwrite, getdelim, getline, printf, scanf, snprintf, sprintf,
33124         vdprintf, vfprintf, vfscanf, vprintf, vscanf, vsnprintf, vsprintf):
33125         Likewise.
33126         * lib/stdlib.in.h (mbtowc, realpath, strtod, strtold, strtoll,
33127         strtoull): Likewise.
33128         * lib/string.in.h (strncat): Likewise.
33129         * lib/sys_socket.in.h (accept, getpeername, getsockname, getsockopt,
33130         recvfrom): Likewise.
33131         * lib/sys_stat.in.h (fstatat, lstat, stat): Likewise.
33132         * lib/time.in.h (strftime): Likewise.
33133         * lib/unistd.in.h (readlink, readlinkat): Likewise.
33134         * lib/wchar.in.h (mbrtowc, mbrlen, mbsrtowcs, mbsnrtowcs, wcrtomb,
33135         wcsrtombs, wcsnrtombs, wmemcpy, wcscpy, wcpcpy, wcsncpy, wcpncpy,
33136         wcscat, wcsncat, wcsxfrm, wcsstr, wcstok, wcsftime): Likewise.
33137         * m4/iconv_h.m4 (gl_ICONV_H): Require AC_C_RESTRICT.
33138         * m4/inttypes.m4 (gl_INTTYPES_INCOMPLETE): Likewise.
33139         * m4/monetary_h.m4 (gl_MONETARY_H): Likewise.
33140         * m4/search_h.m4 (gl_SEARCH_H): Likewise.
33141         * m4/signal_h.m4 (gl_SIGNAL_H): Likewise.
33142         * m4/stdio_h.m4 (gl_STDIO_H): Likewise.
33143         * m4/stdlib_h.m4 (gl_STDLIB_H): Likewise.
33144         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Likewise.
33145         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Likewise.
33146         * m4/unistd_h.m4 (gl_UNISTD_H): Likewise.
33147         * m4/wchar_h.m4 (gl_WCHAR_H): Likewise.
33148         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Make consistent with the
33149         other *_h.m4 files.
33150         * m4/time_h.m4 (gl_HEADER_TIME_H): Likewise.
33152 2020-02-22  Bruno Haible  <bruno@clisp.org>
33154         Update NEWS.
33155         * NEWS: Mention the last change.
33157 2020-02-22  Paul Eggert  <eggert@cs.ucla.edu>
33159         chmodat, chownat: new modules
33160         These are split from fchmodat, fchownat.  GNU Emacs needs the
33161         POSIX-specified fchmodat, but not the gnulib-specified chmodat and
33162         lchmodat.  Split the latter two into a new module chmodat.
33163         Similarly for fchownat.  This the same basic idea for why statat
33164         was split from fstatat on 2013-01-23.
33165         * lib/chmodat.c, lib/openat.h (CHMODAT_INLINE):
33166         Rename from FCHMODAT_INLINE.  All uses changed.
33167         * lib/chownat.c, lib/openat.h (CHOWNAT_INLINE):
33168         Rename from FCHOWNAT_INLINE.  All uses changed.
33169         * lib/openat.h:
33170         (chownat, lchownat): Define if GNULIB_CHOWNAT, not GNULIB_FCHOWNAT.
33171         (chmodat, lchmodat): Define if GNULIB_CHMODAT, not GNULIB_FCHMODAT.
33172         * modules/chmodat, modules/chownat, tests/test-chownat.c: New files.
33173         * modules/fchmodat (Files:): Remove lib/fchmodat.c.
33174         (configure.ac): Remove fchmodat module indicator.
33175         (Makefile.am): Omit chmodat.c.
33176         (Maintainer): Add self.
33177         * modules/fchownat: Similarly, but for chown.
33178         * tests/test-fchownat.c (BASE): Don't define if already defined.
33179         (do_chown, do_lchown) [!TEST_CHOWNAT]: Test fchownat instead.
33181 2020-02-22  Bruno Haible  <bruno@clisp.org>
33183         users.txt: Add groff.
33184         Reported by Bjarni Ingi Gislason <bjarniig@rhi.hi.is>.
33185         * users.txt: Add groff.
33187 2020-02-22  Bruno Haible  <bruno@clisp.org>
33189         gnulib-tool: Ensure copied files are writable.
33190         Reported by Benno Fünfstück <benno.fuenfstueck@gmail.com> in
33191         <https://lists.gnu.org/archive/html/bug-gnulib/2020-02/msg00101.html>.
33192         * gnulib-tool (func_ensure_writable): New function.
33193         (func_ln_s, func_hardlink, func_lookup_file, func_import,
33194         func_create_testdir, copy-file): Invoke it after copying a file.
33196 2020-02-22  Bruno Haible  <bruno@clisp.org>
33198         users.txt: Update.
33199         * users.txt: Update URLs to projects that have moved or switched to git.
33200         Use canonical host names. Prefer gitweb over cgit. Prefer the tree view
33201         over the summary view. Add gawk.
33203 2020-02-21  Paul Eggert  <eggert@cs.ucla.edu>
33205         largefile: remove _DARWIN_USE_64_BIT_INODE
33206         It’s not needed in currently-supported macOS versions, and was
33207         problematic anyway in MacOS X 10.5 which was the only version that
33208         could use it.  Problem reported by Peter Eisentraut in:
33209         https://lists.gnu.org/r/bug-autoconf/2020-02/msg00004.html
33210         * m4/largefile.m4 (AC_SYS_LARGEFILE):
33211         Don’t define _DARWIN_USE_64_BIT_INODE.
33212         This syncs with Autoconf master.
33214         Add ‘extern "C"’ to count-one-bits.h etc.
33215         This ports these .h files to C++.
33216         Problem reported by Simon Marchi in:
33217         https://lists.gnu.org/r/bug-gnulib/2020-02/msg00110.html
33218         * lib/count-leading-zeros.h, lib/count-one-bits.h:
33219         * lib/count-trailing-zeros.h: Add ‘extern "C"’.
33221 2020-02-19  Bruno Haible  <bruno@clisp.org>
33223         uninorm/decompose-internal: Avoid "no previous prototype" warning.
33224         Reported by Tim Rühsen <tim.ruehsen@gmx.de> in
33225         <https://lists.gnu.org/archive/html/bug-gnulib/2020-02/msg00105.html>.
33226         * lib/array-mergesort.h: Accept an optional macro definition
33227         STATIC_FROMTO.
33228         * lib/uninorm/decompose-internal.c (STATIC_FROMTO): New macro.
33230 2020-02-16  Bruno Haible  <bruno@clisp.org>
33232         fchmodat: Make more future-proof.
33233         * m4/fchmodat.m4 (gl_FUNC_FCHMODAT): Define
33234         NEED_FCHMODAT_NONSYMLINK_FIX.
33235         (gl_PREREQ_FCHMODAT): New macro.
33236         * lib/fchmodat.c (fchmodat): Test NEED_FCHMODAT_NONSYMLINK_FIX. Access
33237         /proc only on Linux. Return EOPNOTSUPP only on Linux and on platforms
33238         without lchmod function.
33239         * modules/fchmodat (configure.ac): Invoke gl_PREREQ_FCHMODAT.
33241 2020-02-16  Bruno Haible  <bruno@clisp.org>
33243         lchmod: Make more future-proof.
33244         * m4/lchmod.m4 (gl_FUNC_LCHMOD): Define NEED_LCHMOD_NONSYMLINK_FIX.
33245         (gl_PREREQ_LCHMOD): New macro.
33246         * lib/lchmod.c (orig_lchmod): New function.
33247         (lchmod): Test NEED_LCHMOD_NONSYMLINK_FIX. Access /proc only on Linux.
33248         Return EOPNOTSUPP only on Linux and on platforms without lchmod
33249         function.
33250         * modules/lchmod (configure.ac): Invoke gl_PREREQ_LCHMOD.
33252         lchmod: Fix buggy override on macOS, HP-UX (regression from 2020-02-08).
33253         * modules/lchmod (Makefile.am): Don't add lchmod.c to lib_SOURCES.
33255 2020-02-16  Paul Eggert  <eggert@cs.ucla.edu>
33257         xnanosleep: prefer pause, and get remaining time
33258         Problem reported by Vladimir Panteleev in:
33259         https://lists.gnu.org/r/bug-gnulib/2020-02/msg00052.html
33260         * lib/xnanosleep.c: Include intprops.h, unistd.h.
33261         (xnanosleep) [HAVE_PAUSE]: Prefer pause when sleeping infinitely.
33262         (xnanosleep): Obtain remaining time when nanosleep is interrupted.
33263         * m4/xnanosleep.m4 (gl_XNANOSLEEP): Check for 'pause'.
33264         * modules/xnanosleep (Depends-on): Add intprops, unistd.
33266 2020-02-16  Bruno Haible  <bruno@clisp.org>
33268         lchmod: Improve cross-compilation guess.
33269         * m4/lchmod.m4 (gl_FUNC_LCHMOD): Require AC_CANONICAL_HOST. When
33270         cross-compiling, guess depending on the platform.
33272 2020-02-16  Bruno Haible  <bruno@clisp.org>
33274         fstrcmp: Add API to clean up resources.
33275         Reported by Akim Demaille <akim@lrde.epita.fr> in
33276         <https://lists.gnu.org/archive/html/bug-gnulib/2020-01/msg00080.html>.
33277         * lib/fstrcmp.h (fstrcmp_free_resources): New declaration.
33278         * lib/fstrcmp.c (fstrcmp_free_resources): New function.
33280 2020-02-14  Bruno Haible  <bruno@clisp.org>
33282         wctype-h: Fix compilation errors in C++ (regression from 2020-01-25).
33283         Reported by Christian Biesinger in
33284         <https://lists.gnu.org/archive/html/bug-gnulib/2020-02/msg00064.html>.
33285         * lib/wctype.in.h (iswdigit, iswxdigit): Don't declare if the
33286         corresponding module is not enabled.
33287         * tests/test-wctype-h-c++.cc (iswdigit, iswxdigit): Don't check the
33288         prototype if the corresponding module is not enabled.
33290 2020-02-13  Paul Eggert  <eggert@cs.ucla.edu>
33292         fchmodat, lchmod: port to buggy Linux filesystems
33293         Problem reported by Florian Weimer in:
33294         https://www.sourceware.org/ml/libc-alpha/2020-02/msg00534.html
33295         * lib/fchmodat.c (fchmodat):
33296         * lib/lchmod.c (lchmod):
33297         Don’t assume that chmod on the O_PATH-opened fd will do
33298         the right thing on a symbolic link.
33299         * lib/fchmodat.c (fchmodat):
33300         Don’t attempt to special-case
33301         any flag value other than AT_SYMLINK_NOFOLLOW.
33303 2020-02-11  Paul Eggert  <eggert@cs.ucla.edu>
33305         lchmod: pacify Coverity CID 1491216
33306         * lib/lchmod.c (lchmod): Redo #if nesting so that Coverity does
33307         not complain about unreachable code at the ‘struct stat st;’
33308         declaration.
33310 2020-02-10  Bruno Haible  <bruno@clisp.org>
33312         copysignf: Fix link error on HP-UX with cc.
33313         * m4/copysignf.m4 (gl_FUNC_COPYSIGNF): Require AC_CANONICAL_HOST. On
33314         HP-UX, set COPYSIGNF_LIBM to -lm.
33316 2020-02-10  Bruno Haible  <bruno@clisp.org>
33318         pthread-mutex-tests, pthread-rwlock-tests: Fix link errors on HP-UX.
33319         * modules/pthread-mutex-tests (Makefile.am): Link test-pthread-mutex
33320         with $(LIB_SEMAPHORE).
33321         * modules/pthread-rwlock-tests (Makefile.am): Link test-pthread-rwlock
33322         with $(LIB_SEMAPHORE).
33324 2020-02-10  Bruno Haible  <bruno@clisp.org>
33326         ptsname_r-tests: Avoid unused function warning.
33327         * tests/test-ptsname_r.c: Don't include null-ptr.h if we don't need it.
33329 2020-02-08  Bruno Haible  <bruno@clisp.org>
33331         lchmod: Add tests.
33332         * tests/test-lchmod.c: New file.
33333         * modules/lchmod-tests: New file.
33335 2020-02-08  Bruno Haible  <bruno@clisp.org>
33337         lchmod: Ensure declaration on HP-UX.
33338         * lib/sys_stat.in.h (lchown): Declare also on HP-UX.
33339         * doc/glibc-functions/lchmod.texi: Mention the HP-UX problem.
33341 2020-02-08  Bruno Haible  <bruno@clisp.org>
33343         fchmodat: Strengthen tests.
33344         * tests/test-fchmodat.c (BASE): New macro.
33345         (main): Use it, to avoid conflicts with other unit tests. Verify that
33346         fchmodat changed the file permission bits.
33348 2020-02-08  Bruno Haible  <bruno@clisp.org>
33350         fchmodat: Fix endless recursion on Cygwin (regression from 2020-02-07).
33351         * lib/fchmodat.c (orig_fchmodat): Move definition to immediately after
33352         '#undef __need_system_sys_stat_h'.
33354 2020-02-08  Bruno Haible  <bruno@clisp.org>
33356         fchmodat: Improve cross-compilation guesses.
33357         * m4/fchmodat.m4 (gl_FUNC_FCHMODAT): Require AC_CANONICAL_HOST. When
33358         cross-compiling, guess depending on the platform.
33359         * doc/posix-functions/fchmodat.texi: Clarify.
33361 2020-02-08  Bruno Haible  <bruno@clisp.org>
33363         Fix compilation errors in a testdir created with --with-c++-tests.
33364         * lib/c++defs.h (_GL_CXXALIASWARN1_2): Do not use __typeof__ (func),
33365         since it does not work any more with g++ >= 4.4.
33367 2020-02-08  Bruno Haible  <bruno@clisp.org>
33369         doc: Update for glibc 2.31.
33370         * doc/glibc-functions/pthread_clockjoin_np.texi: New file.
33371         * doc/gnulib.texi: Include it.
33372         * doc/pastposix-functions/h_errno.texi: Update.
33373         * doc/posix-functions/*.texi: Likewise.
33375 2020-02-08  Kenneth D'souza  <kdsouza@redhat.com>
33377         mountlist: consider smb3 file systems as remote
33378         * lib/mountlist.c (ME_REMOTE): Recognize file systems of type
33379         "smb3" as remote.
33381 2020-02-07  Paul Eggert  <eggert@cs.ucla.edu>
33383         fchmodat: AT_SYMLINK_NOFOLLOW fix for non-symlinks
33384         Fix lchmod, and fchmodat with AT_SYMLINK_NOFOLLOW, so that
33385         they act like chmod on non-symlinks.
33386         * NEWS:
33387         * doc/glibc-functions/lchmod.texi (lchmod):
33388         * doc/posix-functions/fchmodat.texi (fchmodat):
33389         Mention this.
33390         * lib/fchmodat.c: Define __need_system_sys_stat_h before including
33391         config.h, and undef it after including sys/stat.h the first time.
33392         Include fcntl.h, stdio.h, unistd.h, intprops.h, and include
33393         sys/stat.h a second time after defining orig_fchmodat.
33394         (orig_fchmodat) [HAVE_FCHMODAT]: New function.
33395         (fchmodat) [HAVE_FCHMODAT]: Work around the AT_SYMLINK_NOFOLLOW bug.
33396         * lib/lchmod.c: New file.
33397         * lib/sys_stat.in.h (fchmodat, lchmod):
33398         Support replacing these functions.
33399         * m4/fchmodat.m4 (gl_FUNC_FCHMODAT): If fchmodat exists,
33400         test that AT_SYMLINK_NOFOLLOW works on non-symlinks.
33401         * m4/lchmod.m4 (gl_FUNC_LCHMOD): Check for lstat.
33402         Test that lchmod works on non-symlinks.
33403         * m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS):
33404         Default REPLACE_FCHMODAT and REPLACE_LCHMOD to 0.
33405         * modules/fchmodat (Depends-on): Add fstatat, intprops, lchmod, unistd.
33406         (Depends-on, configure.ac): Check REPLACE_FCHMODAT too.
33407         * modules/lchmod (Files): Add lib/lchmod.c.
33408         (Depends-on): Add errno, fcntl-h, fchmodat, intprops, lstat, unistd.
33409         (configure.ac): Compile lchmod.c if needed.
33410         (lib_SOURCES): Add lchmod.c.
33411         * modules/sys_stat (sys/stat.h): Substitute REPLACE_FCHMODAT
33412         and REPLACE_LCHMOD.
33413         * tests/test-fchmodat.c: Include fcntl.h, sys/stat.h.
33414         (main): Test fchmodat with AT_SYMLINK_NOFOLLOW on non-symlinks.
33416 2020-02-05  Marc Dionne  <marc.dionne@auristor.com>  (tiny change)
33418         mountlist: Consider AFS filesystems as remote
33419         df --local relies on the ME_REMOTE macro to determine if a given
33420         mount entry should be considered "local".  There is special logic
33421         for nfs and smb/cifs mounts, but /afs as mounted by OpenAFS, the
33422         kernel's kafs module or AuriStorFS is treated as a local mount.
33423         * lib/mountlist.c (ME_REMOTE): Treat mounts of type 'afs'
33424         (OpenAFS, kernel kafs) and 'auristorfs' (AuriStorFS) as remote.
33426 2020-02-04  Paul Eggert  <eggert@cs.ucla.edu>
33428         Port _Noreturn to older Clang
33429         Problem reported by Jeffery Walton in:
33430         https://lists.gnu.org/r/bug-gnulib/2020-02/msg00013.html
33431         * lib/_Noreturn.h (_Noreturn):
33432         * m4/gnulib-common.m4 (gl_COMMON_BODY):
33433         Assume _Noreturn works in Clang 3.5 and later.
33434         It is documented to work in Clang 3.5:
33435         http://releases.llvm.org/3.5.0/tools/clang/docs/AttributeReference.html
33436         and is not documented in Clang 3.4:
33437         https://releases.llvm.org/3.4/tools/clang/docs/LanguageExtensions.html
33438         Apple sets __clang_version__ to a different value, so use
33439         __apple_build_version__ there.  See:
33440         https://lists.gnu.org/r/bug-gnulib/2020-02/msg00017.html
33442 2020-02-04  Pádraig Brady  <P@draigBrady.com>
33444         test-canonicalize: avoid unused function warning
33445         * tests/test-canonicalize.c: Protect the inclusion of null-ptr.h
33446         with the same guard as that used to protect usage of the null_ptr
33447         function, so that one doesn't get a -Wunused warning.
33448         * tests/test-canonicalize-lgpl.c: Likewise.
33450 2020-02-03  Paul Eggert  <eggert@cs.ucla.edu>
33452         libc-config: port to Apple’s Clang variant
33453         * lib/libc-config.h (__glibc_clang_prereq):
33454         Port to Apple’s Clang variant, which uses a different
33455         numbering scheme for __clang_major__.
33457 2020-02-02  Bruno Haible  <bruno@clisp.org>
33459         Document the new modules list-c++, set-c++, oset-c++, map-c++, omap-c++.
33460         * doc/containers.texi: Document these new modules.
33462 2020-02-02  Bruno Haible  <bruno@clisp.org>
33464         omap-c++: Add tests.
33465         * tests/test-omap-c++.cc: New file.
33466         * modules/omap-c++-tests: New file.
33468         omap-c++: New module.
33469         * lib/gl_omap.hh: New file, based on lib/gl_omap.h.
33470         * modules/omap-c++: New file.
33472 2020-02-02  Bruno Haible  <bruno@clisp.org>
33474         map-c++: Add tests.
33475         * tests/test-map-c++.cc: New file.
33476         * modules/map-c++-tests: New file.
33478         map-c++: New module.
33479         * lib/gl_map.hh: New file, based on lib/gl_map.h.
33480         * modules/map-c++: New file.
33482 2020-02-02  Bruno Haible  <bruno@clisp.org>
33484         oset-c++: Add tests.
33485         * tests/test-oset-c++.cc: New file.
33486         * modules/oset-c++-tests: New file.
33488         oset-c++: New module.
33489         * lib/gl_oset.hh: New file, based on lib/gl_oset.h.
33490         * modules/oset-c++: New file.
33492 2020-02-02  Bruno Haible  <bruno@clisp.org>
33494         set-c++: Add tests.
33495         * tests/test-set-c++.cc: New file.
33496         * modules/set-c++-tests: New file.
33498         set-c++: New module.
33499         * lib/gl_set.hh: New file, based on lib/gl_set.h.
33500         * modules/set-c++: New file.
33502 2020-02-02  Bruno Haible  <bruno@clisp.org>
33504         list-c++: Add tests.
33505         * tests/test-list-c++.cc: New file.
33506         * modules/list-c++-tests: New file.
33508         list-c++: New module.
33509         * lib/gl_list.hh: New file, based on lib/gl_list.h.
33510         * modules/list-c++: New file.
33512 2020-02-02  Bruno Haible  <bruno@clisp.org>
33514         xalloc: Fix compilation error in C++ mode on FreeBSD 12.
33515         * lib/xalloc.h (xalloc_die): Comment out 'extern' keyword before
33516         '_Noreturn'.
33517         * lib/sigpipe-die.h (sigpipe_die): Likewise.
33519 2020-02-02  Pádraig Brady  <P@draigBrady.com>
33521         read-file: reduce max size from SIZE_MAX to PTRDIFF_MAX
33522         On x86_64 with glibc-2.30, gcc 9.2 is giving:
33523           error: argument 2 value '18446744073709551615'
33524           exceeds maximum object size 9223372036854775807
33525           [-Werror=alloc-size-larger-than=]
33526         The details of this restriction are discussed at:
33527         https://stackoverflow.com/q/42574890/4421
33528         * lib/read-file.c: s/SIZE_MAX/PTRDIFF_MAX/
33530 2020-02-02  Pádraig Brady  <P@draigBrady.com>
33532         sysctl.h: avoid including on glibc
33533         * lib/nproc.c: Avoid including deprecated and unneeded header on GLIBC.
33534         * lib/physmem.c: Likewise.
33536 2020-02-02  Bruno Haible  <bruno@clisp.org>
33538         list, set, oset, map, omap: Avoid imperative voice in documentation.
33539         * lib/gl_list.h: Use descriptive sentences instead of imperative voice
33540         in the specification of functions.
33541         * lib/gl_set.h: Likewise.
33542         * lib/gl_oset.h: Likewise.
33543         * lib/gl_map.h: Likewise.
33544         * lib/gl_omap.h: Likewise.
33545         * lib/gl_*.h: Likewise.
33547 2020-02-01  Bruno Haible  <bruno@clisp.org>
33549         ansi-c++-opt: Set CXXFLAGS to "-g -O2" by default.
33550         * m4/ansi-c++.m4 (gl_PROG_ANSI_CXX): Determine CXXFLAGS like AC_PROG_CXX
33551         does.
33553 2020-01-29  Bruno Haible  <bruno@clisp.org>
33555         array-map, hash-map, linkedhash-map: Fix module description.
33556         * modules/array-map (Description): Fix description.
33557         * modules/hash-map (Description): Likewise.
33558         * modules/linkedhash-map (Description): Likewise.
33560 2020-01-29  Paul Eggert  <eggert@cs.ucla.edu>
33562         dfa: do not depend on isblank
33563         This removes a difference between Gawk dfa.c and Gnulib dfa.c.
33564         * lib/dfa.c (isblank): Define if neither system nor Gnulib does.
33565         * modules/dfa (Depends-on): Remove isblank.
33566         * modules/isblank: Add a module indicator, for lib/dfa.c.
33568         dfa: do not assume 64-bit int
33569         Problem reported for VAX/VMS C (!) by Arnold Robbins in:
33570         https://lists.gnu.org/r/bug-gnulib/2020-01/msg00173.html
33571         * lib/dfa.c (CHARCLASS_PAIR): Bring back this macro.
33572         (CHARCLASS_WORD_BITS, charclass_word) [!UINT_LEAST64_MAX]:
33573         Fall back to 32-bit words.
33574         (CHARCLASS_INIT): Go back to having 8 32-bit args instead
33575         of 4 64-bit args.  All uses changed.
33577 2020-01-27  Paul Eggert  <eggert@cs.ucla.edu>
33579         regex: remove limits-h dependency
33580         * modules/regex (Depends-on): Remove limits-h, since the
33581         code no longer depends on ULONG_WIDTH already being defined.
33583         regex: port to non-GCC pre-IEC-60559
33584         Problem reported by Arnold Robbins in:
33585         https://lists.gnu.org/r/bug-gnulib/2020-01/msg00154.html
33586         * lib/regex_internal.h (ULONG_WIDTH): Make this usable in #if.
33588 2020-01-25  Bruno Haible  <bruno@clisp.org>
33590         c32isxdigit: Add tests.
33591         * tests/test-c32isxdigit.c: New file, based on tests/test-iswxdigit.c.
33592         * tests/test-c32isxdigit.sh: New file.
33593         * modules/c32isxdigit-tests: New file.
33595         c32isxdigit: New module.
33596         * lib/c32isxdigit.c: New file.
33597         * modules/c32isxdigit: New file.
33598         * doc/posix-functions/iswxdigit.texi: Mention the new module.
33600 2020-01-25  Bruno Haible  <bruno@clisp.org>
33602         c32isupper: Add tests.
33603         * tests/test-c32isupper.c: New file.
33604         * tests/test-c32isupper.sh: New file.
33605         * modules/c32isupper-tests: New file.
33607         c32isupper: New module.
33608         * lib/c32isupper.c: New file.
33609         * modules/c32isupper: New file.
33610         * doc/posix-functions/iswupper.texi: Mention the new module.
33612 2020-01-25  Bruno Haible  <bruno@clisp.org>
33614         c32isspace: Add tests.
33615         * tests/test-c32isspace.c: New file.
33616         * tests/test-c32isspace.sh: New file.
33617         * modules/c32isspace-tests: New file.
33619         c32isspace: New module.
33620         * lib/c32isspace.c: New file.
33621         * modules/c32isspace: New file.
33622         * doc/posix-functions/iswspace.texi: Mention the new module.
33624 2020-01-25  Bruno Haible  <bruno@clisp.org>
33626         c32ispunct: Add tests.
33627         * tests/test-c32ispunct.c: New file.
33628         * tests/test-c32ispunct.sh: New file.
33629         * modules/c32ispunct-tests: New file.
33631         c32ispunct: New module.
33632         * lib/c32ispunct.c: New file.
33633         * modules/c32ispunct: New file.
33634         * doc/posix-functions/iswpunct.texi: Mention the new module.
33636 2020-01-25  Bruno Haible  <bruno@clisp.org>
33638         c32isprint: Add tests.
33639         * tests/test-c32isprint.c: New file.
33640         * tests/test-c32isprint.sh: New file.
33641         * modules/c32isprint-tests: New file.
33643         c32isprint: New module.
33644         * lib/c32isprint.c: New file.
33645         * modules/c32isprint: New file.
33646         * doc/posix-functions/iswprint.texi: Mention the new module.
33648 2020-01-25  Bruno Haible  <bruno@clisp.org>
33650         c32islower: Add tests.
33651         * tests/test-c32islower.c: New file.
33652         * tests/test-c32islower.sh: New file.
33653         * modules/c32islower-tests: New file.
33655         c32islower: New module.
33656         * lib/c32islower.c: New file.
33657         * modules/c32islower: New file.
33658         * doc/posix-functions/iswlower.texi: Mention the new module.
33660 2020-01-25  Bruno Haible  <bruno@clisp.org>
33662         c32isgraph: Add tests.
33663         * tests/test-c32isgraph.c: New file.
33664         * tests/test-c32isgraph.sh: New file.
33665         * modules/c32isgraph-tests: New file.
33667         c32isgraph: New module.
33668         * lib/c32isgraph.c: New file.
33669         * modules/c32isgraph: New file.
33670         * doc/posix-functions/iswgraph.texi: Mention the new module.
33672 2020-01-25  Bruno Haible  <bruno@clisp.org>
33674         c32isdigit: Add tests.
33675         * tests/test-c32isdigit.c: New file, based on tests/test-iswdigit.c.
33676         * tests/test-c32isdigit.sh: New file.
33677         * modules/c32isdigit-tests: New file.
33679         c32isdigit: New module.
33680         * lib/c32isdigit.c: New file.
33681         * modules/c32isdigit: New file.
33682         * doc/posix-functions/iswdigit.texi: Mention the new module.
33684 2020-01-25  Bruno Haible  <bruno@clisp.org>
33686         c32iscntrl: Add tests.
33687         * tests/test-c32iscntrl.c: New file.
33688         * tests/test-c32iscntrl.sh: New file.
33689         * modules/c32iscntrl-tests: New file.
33691         c32iscntrl: New module.
33692         * lib/c32iscntrl.c: New file.
33693         * modules/c32iscntrl: New file.
33694         * doc/posix-functions/iswcntrl.texi: Mention the new module.
33696 2020-01-25  Bruno Haible  <bruno@clisp.org>
33698         c32isblank: Add tests.
33699         * tests/test-c32isblank.c: New file.
33700         * tests/test-c32isblank.sh: New file.
33701         * modules/c32isblank-tests: New file.
33703         c32isblank: New module.
33704         * lib/c32isblank.c: New file.
33705         * modules/c32isblank: New file.
33706         * doc/posix-functions/iswblank.texi: Mention the new module.
33708 2020-01-25  Bruno Haible  <bruno@clisp.org>
33710         c32isalpha: Add tests.
33711         * tests/test-c32isalpha.c: New file.
33712         * tests/test-c32isalpha.sh: New file.
33713         * modules/c32isalpha-tests: New file.
33715         c32isalpha: New module.
33716         * lib/c32isalpha.c: New file.
33717         * modules/c32isalpha: New file.
33718         * doc/posix-functions/iswalpha.texi: Mention the new module.
33720 2020-01-25  Bruno Haible  <bruno@clisp.org>
33722         c32isalnum: Add tests.
33723         * tests/test-c32isalnum.c: New file.
33724         * tests/test-c32isalnum.sh: New file.
33725         * modules/c32isalnum-tests: New file.
33727         c32isalnum: New module.
33728         * lib/c32isalnum.c: New file.
33729         * lib/c32is-impl.h: New file.
33730         * modules/c32isalnum: New file.
33731         * doc/posix-functions/iswalnum.texi: Mention the new module.
33733 2020-01-25  Bruno Haible  <bruno@clisp.org>
33735         uchar: Preparations for modules c32isalnum, ..., c32isxdigit.
33736         * lib/uchar.in.h (c32isalnum, c32isalpha, c32isblank, c32iscntrl,
33737         c32isdigit, c32isgraph, c32islower, c32isprint, c32ispunct, c32isspace,
33738         c32isupper, c32isxdigit): New declarations.
33739         * m4/uchar.m4 (gl_UCHAR_H_DEFAULTS): Initialize GNULIB_C32ISALNUM,
33740         GNULIB_C32ISALPHA, GNULIB_C32ISBLANK, GNULIB_C32ISCNTRL,
33741         GNULIB_C32ISDIGIT, GNULIB_C32ISGRAPH, GNULIB_C32ISLOWER,
33742         GNULIB_C32ISPRINT, GNULIB_C32ISPUNCT, GNULIB_C32ISSPACE,
33743         GNULIB_C32ISUPPER, GNULIB_C32ISXDIGIT.
33744         * modules/uchar (Makefile.am): Substitute GNULIB_C32ISALNUM,
33745         GNULIB_C32ISALPHA, GNULIB_C32ISBLANK, GNULIB_C32ISCNTRL,
33746         GNULIB_C32ISDIGIT, GNULIB_C32ISGRAPH, GNULIB_C32ISLOWER,
33747         GNULIB_C32ISPRINT, GNULIB_C32ISPUNCT, GNULIB_C32ISSPACE,
33748         GNULIB_C32ISUPPER, GNULIB_C32ISXDIGIT.
33749         * tests/test-uchar-c++.cc: Test the signature of c32isalnum, c32isalpha,
33750         c32isblank, c32iscntrl, c32isdigit, c32isgraph, c32islower, c32isprint,
33751         c32ispunct, c32isspace, c32isupper, c32isxdigit.
33753 2020-01-25  Bruno Haible  <bruno@clisp.org>
33755         mbchar, wctype: Use the corrected iswxdigit function.
33756         * modules/mbchar (Depends-on): Add iswxdigit.
33757         * modules/wctype (Depends-on): Likewise.
33759         iswxdigit: Add tests.
33760         * tests/test-iswxdigit.c: New file.
33761         * tests/test-iswxdigit.sh: New file.
33762         * modules/iswxdigit-tests: New file.
33764         iswxdigit: New module.
33765         * m4/iswxdigit.m4: New file.
33766         * lib/wctype.in.h (iswxdigit): Potentially override.
33767         (iswxdigit, rpl_iswxdigit): Test REPLACE_ISWXDIGIT, not
33768         REPLACE_ISWCNTRL. Rely on ISO C compliant definition.
33769         * lib/iswxdigit.c: New file.
33770         * m4/wctype_h.m4 (gl_WCTYPE_H_DEFAULTS): Initialize GNULIB_ISWXDIGIT,
33771         REPLACE_ISWXDIGIT.
33772         * modules/wctype-h (Makefile.am): Substitute GNULIB_ISWXDIGIT,
33773         REPLACE_ISWXDIGIT.
33774         * modules/iswxdigit: New file.
33775         * doc/posix-functions/iswxdigit.texi: Mention the portability problem.
33777 2020-01-25  Bruno Haible  <bruno@clisp.org>
33779         lseek: Fix the override to not undo the effects of AC_SYS_LARGEFILE.
33780         Reported by John Donoghue <john.david.donoghue@gmail.com> in
33781         <https://lists.gnu.org/archive/html/bug-gnulib/2020-01/msg00146.html>.
33782         * lib/lseek.c (rpl_lseek): When AC_SYS_LARGEFILE has enabled a 64-bit
33783         off_t on mingw, invoke _lseeki64 instead of lseek.
33785 2020-01-25  Bruno Haible  <bruno@clisp.org>
33787         iswdigit tests: Avoid test failure on Cygwin.
33788         * tests/test-iswdigit.c (for_character): If mbrtowc cannot convert the
33789         byte sequence, return 0.
33791         iswdigit: Fix test failure on native Windows.
33792         * lib/wctype.in.h (rpl_iswdigit): Rely on ISO C compliant definition.
33794         mbchar, wctype: Use the corrected iswdigit function.
33795         * modules/mbchar (Depends-on): Add iswdigit.
33796         * modules/wctype (Depends-on): Likewise.
33798         iswdigit: Add tests.
33799         * tests/test-iswdigit.c: New file.
33800         * tests/test-iswdigit.sh: New file.
33801         * modules/iswdigit-tests: New file.
33803         iswdigit: New module.
33804         * m4/iswdigit.m4: New file.
33805         * lib/wctype.in.h (iswdigit): Potentially override.
33806         (iswdigit, rpl_iswdigit): Test REPLACE_ISWDIGIT, not REPLACE_ISWCNTRL.
33807         * lib/iswdigit.c: New file.
33808         * m4/wctype_h.m4 (gl_WCTYPE_H_DEFAULTS): Initialize GNULIB_ISWDIGIT,
33809         REPLACE_ISWDIGIT.
33810         * modules/wctype-h (Makefile.am): Substitute GNULIB_ISWDIGIT,
33811         REPLACE_ISWDIGIT.
33812         * modules/iswdigit: New file.
33813         * doc/posix-functions/iswdigit.texi: Mention the portability problem.
33815 2020-01-25  Bruno Haible  <bruno@clisp.org>
33817         hard-locale tests: Make it easy to reuse the musl test.
33818         * m4/musl.m4: New file, extracted from modules/hard-locale-tests.
33819         * modules/hard-locale-tests (Files): Add it.
33820         (configure.ac): Invoke gl_MUSL_LIBC.
33822 2020-01-24  Paul Eggert  <eggert@cs.ucla.edu>
33824         regex: port to Gawk on nonstandard platforms
33825         * lib/regex_internal.h (ULONG_WIDTH): Define if not already defined.
33826         This is useful for Gawk, which does not use the Gnulib stdlib-h
33827         module.  Problem reported by Arnold Robbins in:
33828         https://lists.gnu.org/r/bug-gnulib/2020-01/msg00138.html
33830 2020-01-21  Paul Eggert  <eggert@cs.ucla.edu>
33832         regex: fix bug with >=16 subexpressions
33833         * lib/regex_internal.h (struct re_backref_cache_entry):
33834         Use bitset_word_t as the type of eps_reachable_subexps_map,
33835         instead of unsigned short int.  This fixes a bug I introduced
33836         to glibc in 2005-09-28T17:33:18Z!drepper@redhat.com (glibc commit
33837         2c05d33f90861d074dc12808dafbde30f487b1a0, BZ #1302).
33838         Remove unused member 'unused'.
33840         regex: simplify definition of BITSET_WORD_BITS
33841         * config/srclist.txt: Remove regex.c, regex_internal.h temporarily.
33842         * lib/regex.c (__STDC_WANT_IEC_60559_BFP_EXT__): Define.
33843         * lib/regex_internal.h (BITSET_WORD_BITS):
33844         * modules/regex (Depends-on): Add limits-h.
33845         Simplify now that we can use ULONG_WIDTH.
33847 2020-01-20  Bruno Haible  <bruno@clisp.org>
33849         mbrtoc32: Add note about FreeBSD 12.
33850         * m4/mbrtoc32.m4 (gl_MBRTOC32_SANITYCHECK): Guess no also on FreeBSD.
33851         * doc/posix-functions/mbrtoc32.texi: Mention that FreeBSD 12 is also
33852         affected.
33854 2020-01-20  Bruno Haible  <bruno@clisp.org>
33856         unistr/u8-uctomb: Fix warning.
33857         Reported by Andreas Schwab <schwab@suse.de> in
33858         <https://lists.gnu.org/archive/html/bug-gnulib/2020-01/msg00127.html>.
33859         * lib/unistr/u8-uctomb.c (FALLTHROUGH): New macro.
33860         (u8_uctomb): Add FALLTHROUGH markers.
33862 2020-01-20  Bruno Haible  <bruno@clisp.org>
33864         lock: Fix test-once1 failure on FreeBSD 11 (regression from 2020-01-19).
33865         * lib/glthread/lock.c (glthread_once_multithreaded): New function.
33866         * lib/glthread/lock.h (glthread_once_multithreaded): New declaration.
33867         (glthread_once): Use it.
33869 2020-01-19  Bruno Haible  <bruno@clisp.org>
33871         threadlib: Disable use of weak symbols on FreeBSD 11.
33872         Reported by Tim Rühsen <tim.ruehsen@gmx.de> in
33873         <https://lists.gnu.org/archive/html/bug-gnulib/2020-01/msg00061.html>.
33874         * m4/threadlib.m4 (gl_WEAK_SYMBOLS): Require AC_CANONICAL_HOST. Test
33875         against a bug in FreeBSD 11.
33877 2020-01-19  Bruno Haible  <bruno@clisp.org>
33879         iconv_open: Improve z/OS support.
33880         * lib/iconv_open-zos.gperf: Choose better aliases. Add mapping for
33881         ISO-8859-3, KOI8-R, KOI8-U, CP775, CP857, CP865, CP1129, CP1131, CP1257.
33882         Remove mapping for EUC-TW.
33884 2020-01-18  Bruno Haible  <bruno@clisp.org>
33886         Rename ~~gnulib.m4 to zzgnulib.m4.
33887         Suggested by Paul Eggert.
33888         * m4/zzgnulib.m4: Renamed from m4/~~gnulib.m4.
33889         * gnulib-tool (func_get_filelist): Update.
33890         * pygnulib/GLModuleSystem.py (getFiles): Likewise.
33892 2020-01-18  Bruno Haible  <bruno@clisp.org>
33894         doc: Update license notices.
33895         * doc/*.texi: Reference the GFDL 1.3 through a URL, rather than by
33896         reference to a section or to a "file as part of this distribution".
33898 2020-01-18  Bruno Haible  <bruno@clisp.org>
33900         Avoid error "m4_require: circular dependency of AC_LANG_COMPILER(C)".
33901         Reported by Mats Erik Andersson <mats.andersson@gisladisker.se> in
33902         <https://lists.gnu.org/archive/html/bug-gnulib/2020-01/msg00109.html>.
33903         * m4/00gnulib.m4 (gl_COMPILER_CLANG): Use _AC_COMPILE_IFELSE, not
33904         AC_EGREP_CPP.
33906 2020-01-18  Bruno Haible  <bruno@clisp.org>
33908         Ensure Automake does not drop ~~gnulib.m4.
33909         * m4/~~gnulib.m4 (gl_ZZGNULIB): New macro.
33910         * m4/gnulib-common.m4 (gl_COMMON): Require it.
33912 2020-01-18  Bruno Haible  <bruno@clisp.org>
33914         Fix major regression from 2020-01-10.
33915         Reported by Paul Eggert in
33916         <https://lists.gnu.org/archive/html/bug-gnulib/2020-01/msg00079.html>.
33917         * m4/00gnulib.m4 (gl_COMPILER_CLANG, gl_COMPILER_PREPARE_CHECK_DECL):
33918         Don't AC_REQUIRE anything.
33919         (gl_COMPILER_PREPARE_CHECK_DECL): Define through AC_DEFUN, not
33920         AC_DEFUN_ONCE. Use _AC_COMPILE_IFELSE, not AC_COMPILE_IFELSE.
33921         (_AC_CHECK_DECL_BODY): If ac_compile_for_check_decl has not been set,
33922         use ac_compile instead.
33923         (AC_CHECK_DECL): Remove override.
33924         * m4/~~gnulib.m4: New file.
33925         * gnulib-tool (func_get_filelist): Add also ~~gnulib.m4.
33926         * pygnulib/GLModuleSystem.py (getFiles): Likewise.
33928 2020-01-17  Bruno Haible  <bruno@clisp.org>
33929             Paul Eggert  <eggert@cs.ucla.edu>
33931         glob: Fix use-after-free bug.
33932         Reported by Tim Rühsen <tim.ruehsen@gmx.de> in
33933         <https://lists.gnu.org/archive/html/bug-gnulib/2020-01/msg00102.html>.
33934         * lib/glob.c (__glob): Delay freeing dirname until after the use of
33935         end_name.
33937 2020-01-16  Siddhesh Poyarekar  <siddhesh@gotplt.org>
33939         vcs-to-changelog: Fix parsing of fndecl without args.
33940         * build-aux/vcstocl/frontend_c.py (FNDECL_RE): Fix regular expression
33941         for empty arguments.
33943 2020-01-16  Siddhesh Poyarekar  <siddhesh@gotplt.org>
33945         vcs-to-changelog: Add documentation.
33946         * doc/vcs-to-changelog.texi: New file.
33947         * doc/gnulib.texi (Build Infrastructure Modules): Add vcs-to-changelog
33948         section.
33950 2020-01-16  Siddhesh Poyarekar  <siddhesh@gotplt.org>
33952         vcs-to-changelog: Allow loading of custom quirks file.
33953         * build-aux/vcs_to_changelog.py: New commandline option -q.
33955 2020-01-16  Siddhesh Poyarekar  <siddhesh@gotplt.org>
33957         vcs-to-changelog: Fix formatting of ChangeLog output.
33958         * build-aux/vcstocl/vcs_git.py (list_changes): Add newline in print
33959         output.
33961 2020-01-16  Siddhesh Poyarekar  <siddhesh@gotplt.org>
33963         vcs-to-changelog: Drop python3 shebang from frontend_c.py.
33964         Reported in
33965         <https://lists.gnu.org/archive/html/bug-gnulib/2019-11/msg00050.html>.
33966         * build-aux/vcstocl/frontend_c.py: Remove shebang.
33968 2020-01-15  Simon Josefsson  <simon@josefsson.org>
33970         crypto/gc-pbkdf2: New module.
33971         * MODULES.html.sh (func_all_modules): Add gc-pbkdf2.
33972         * NEWS: Deprecated gc-pbkdf2-sha1 in favor of gc-pbkdf2.
33973         * lib/gc-pbkdf2.c: New file.
33974         * lib/gc-pbkdf2-sha1.c: Use new interface.
33975         * lib/gc.h (GC_MAX_DIGEST_SIZE, gc_pbkdf2_hmac): Add.
33976         * modules/crypto/gc-pbkdf2: New file.
33977         * modules/crypto/gc-pbkdf2-tests: New file.
33978         * tests/test-gc-pbkdf2.c: New file.
33980 2020-01-12  Bruno Haible  <bruno@clisp.org>
33982         c32stombs: Add tests.
33983         * tests/test-c32stombs.c: New file, based on tests/test-c32srtombs.c.
33984         * tests/test-c32stombs-1.sh: New file, based on
33985         tests/test-c32srtombs-1.sh.
33986         * tests/test-c32stombs-2.sh: New file, based on
33987         tests/test-c32srtombs-2.sh.
33988         * tests/test-c32stombs-3.sh: New file, based on
33989         tests/test-c32srtombs-3.sh.
33990         * tests/test-c32stombs-4.sh: New file, based on
33991         tests/test-c32srtombs-4.sh.
33992         * modules/c32stombs-tests: New file, based on modules/c32srtombs-tests.
33994         c32stombs: New module.
33995         * lib/uchar.in.h (c32stombs): New declaration.
33996         * lib/c32stombs.c: New file.
33997         * m4/uchar.m4 (gl_UCHAR_H_DEFAULTS): Initialize GNULIB_C32STOMBS.
33998         * modules/uchar (Makefile.am): Substitute GNULIB_C32STOMBS.
33999         * modules/c32stombs: New file.
34000         * tests/test-uchar-c++.cc: Test the signature of c32stombs.
34001         * doc/posix-functions/wcstombs.texi: Mention the new module.
34003 2020-01-11  Jim Meyering  <meyering@fb.com>
34005         perl: require the "warnings" module
34006         * m4/perl.m4: Also "use warnings", so we reject the perl found
34007         on at least one IRIX 6.5 system. Reported by Bruno Haible in
34008         https://lists.gnu.org/r/sed-devel/2020-01/msg00004.html
34010 2020-01-10  Bruno Haible  <bruno@clisp.org>
34012         Fix major regression from 2020-01-04.
34013         Reported by Mats Erik Andersson <mats.andersson@gisladisker.se> in
34014         <https://lists.gnu.org/archive/html/bug-gnulib/2020-01/msg00072.html>.
34015         * m4/00gnulib.m4 (gl_COMPILER_PREPARE_CHECK_DECL): Define through
34016         AC_DEFUN_ONCE.
34017         (AC_CHECK_DECL): Invoke, not require, it.
34019 2020-01-10  Bruno Haible  <bruno@clisp.org>
34021         c32snrtombs: Add tests.
34022         * tests/test-c32snrtombs.c: New file, based on tests/test-wcsnrtombs.c.
34023         * tests/test-c32snrtombs-1.sh: New file, based on
34024         tests/test-wcsnrtombs1.sh.
34025         * tests/test-c32snrtombs-2.sh: New file, based on
34026         tests/test-wcsnrtombs2.sh.
34027         * tests/test-c32snrtombs-3.sh: New file, based on
34028         tests/test-wcsnrtombs3.sh.
34029         * tests/test-c32snrtombs-4.sh: New file, based on
34030         tests/test-wcsnrtombs4.sh.
34031         * modules/c32snrtombs-tests: New file, based on
34032         modules/wcsnrtombs-tests.
34034         c32snrtombs: New module.
34035         * lib/uchar.in.h (c32snrtombs): New declaration.
34036         * lib/wcsnrtombs-impl.h: Parameterize: Use macros FUNC, SCHAR_T,
34037         INTERNAL_STATE, WCRTOMB.
34038         * lib/wcsnrtombs.c (FUNC, SCHAR_T, INTERNAL_STATE, WCRTOMB): New macros.
34039         * lib/c32snrtombs.c: New file.
34040         * m4/uchar.m4 (gl_UCHAR_H_DEFAULTS): Initialize GNULIB_C32SNRTOMBS.
34041         * modules/uchar (Makefile.am): Substitute GNULIB_C32SNRTOMBS.
34042         * modules/c32snrtombs: New file.
34043         * tests/test-uchar-c++.cc: Test the signature of c32snrtombs.
34044         * doc/posix-functions/wcsnrtombs.texi: Mention the new module.
34046 2020-01-09  Bruno Haible  <bruno@clisp.org>
34048         c32srtombs: Add tests.
34049         * tests/test-c32srtombs.c: New file, based on tests/test-wcsrtombs.c.
34050         * tests/test-c32srtombs-1.sh: New file, based on
34051         tests/test-wcsrtombs1.sh.
34052         * tests/test-c32srtombs-2.sh: New file, based on
34053         tests/test-wcsrtombs2.sh.
34054         * tests/test-c32srtombs-3.sh: New file, based on
34055         tests/test-wcsrtombs3.sh.
34056         * tests/test-c32srtombs-4.sh: New file, based on
34057         tests/test-wcsrtombs4.sh.
34058         * modules/c32srtombs-tests: New file, based on modules/wcsrtombs-tests.
34060         c32srtombs: New module.
34061         * lib/uchar.in.h (c32srtombs): New declaration.
34062         * lib/wcsrtombs-impl.h: Parameterize: Use macros FUNC, SCHAR_T,
34063         INTERNAL_STATE, WCRTOMB.
34064         * lib/wcsrtombs.c (FUNC, SCHAR_T, INTERNAL_STATE, WCRTOMB): New macros.
34065         * lib/c32srtombs.c: New file.
34066         * lib/c32srtombs-state.c: New file, based on lib/wcsrtombs-state.c.
34067         * m4/uchar.m4 (gl_UCHAR_H_DEFAULTS): Initialize GNULIB_C32SRTOMBS.
34068         * modules/uchar (Makefile.am): Substitute GNULIB_C32SRTOMBS.
34069         * modules/c32srtombs: New file.
34070         * tests/test-uchar-c++.cc: Test the signature of c32srtombs.
34071         * doc/posix-functions/wcsrtombs.texi: Mention the new module.
34073 2020-01-08  Bruno Haible  <bruno@clisp.org>
34075         c32tob: Make consistent with mbrtoc32.
34076         * lib/c32tob.c: Include <stdio.h>, <string.h>, <wchar.h>.
34077         (c32tob): If the char32_t encoding and the wchar_t encoding may differ,
34078         use c32rtomb, not wctob.
34079         * modules/c32tob (Files): Add m4/mbrtoc32.m4.
34080         (Depends-on): Add c32rtomb.
34081         (configure.ac): Require gl_MBRTOC32_SANITYCHECK.
34083 2020-01-08  Bruno Haible  <bruno@clisp.org>
34085         c32rtomb: Add tests.
34086         * tests/test-c32rtomb.c: New file, based on tests/test-wcrtomb.c.
34087         * tests/test-c32rtomb.sh: New file, based on tests/test-wcrtomb.sh.
34088         * tests/test-c32rtomb-w32.c: New file, based on
34089         tests/test-wcrtomb-w32.c.
34090         * tests/test-c32rtomb-w32-1.sh: New file, based on
34091         tests/test-wcrtomb-w32-1.sh.
34092         * tests/test-c32rtomb-w32-2.sh: New file, based on
34093         tests/test-wcrtomb-w32-2.sh.
34094         * tests/test-c32rtomb-w32-3.sh: New file, based on
34095         tests/test-wcrtomb-w32-3.sh.
34096         * tests/test-c32rtomb-w32-4.sh: New file, based on
34097         tests/test-wcrtomb-w32-4.sh.
34098         * tests/test-c32rtomb-w32-5.sh: New file, based on
34099         tests/test-wcrtomb-w32-5.sh.
34100         * tests/test-c32rtomb-w32-6.sh: New file, based on
34101         tests/test-wcrtomb-w32-6.sh.
34102         * tests/test-c32rtomb-w32-7.sh: New file, based on
34103         tests/test-wcrtomb-w32-7.sh.
34104         * modules/c32rtomb-tests: New file.
34106         c32rtomb: New module.
34107         * lib/uchar.in.h (c32rtomb): New declaration.
34108         * lib/c32rtomb.c: New file, based on lib/unistr/u8-uctomb-aux.c.
34109         * m4/c32rtomb.m4: New file.
34110         * m4/uchar.m4 (gl_UCHAR_H): Test whether c32rtomb is declared.
34111         (gl_UCHAR_H_DEFAULTS): Initialize GNULIB_C32RTOMB, HAVE_C32RTOMB,
34112         REPLACE_C32RTOMB.
34113         * modules/uchar (Makefile.am): Substitute GNULIB_C32RTOMB,
34114         HAVE_C32RTOMB, REPLACE_C32RTOMB.
34115         * modules/c32rtomb: New file.
34116         * tests/test-uchar-c++.cc: Test the signature of c32rtomb.
34117         * doc/posix-functions/c32rtomb.texi: Document the new module.
34118         * doc/posix-functions/wcrtomb.texi: Mention the new module.
34120 2020-01-08  Bruno Haible  <bruno@clisp.org>
34122         mbrtoc32: Use the system's mbrtoc32 if it exists and basically works.
34123         * m4/mbrtoc32.m4 (gl_MBRTOC32_SANITYCHECK): New macro.
34124         (gl_FUNC_MBRTOC32): Require it. Set REPLACE_MBRTOC32 if mbrtoc32 exists
34125         but is not working.
34126         * lib/mbrtoc32.c: Include hard-locale.h, <locale.h>.
34127         (mbrtoc32): If the char32_t encoding and the wchar_t encoding may
34128         differ, use the system's mbrtoc32, adding workarounds.
34129         * modules/mbrtoc32 (Depends-on): Add hard-locale.
34130         * doc/posix-functions/mbrtoc32.texi: Mention the Solaris and native
34131         Windows problem.
34132         * lib/btoc32.c: Include <stdio.h>, <string.h>.
34133         (btoc32): If the char32_t encoding and the wchar_t encoding may differ,
34134         use mbrtoc32, not btowc.
34135         * modules/btoc32 (Depends-on): Add mbrtoc32.
34136         * lib/mbsrtoc32s.c (mbsrtoc32s): If the char32_t encoding and the
34137         wchar_t encoding may differ, use mbrtoc32, not mbsrtowcs.
34138         * modules/mbsrtoc32s (Depends-on): Update conditions.
34139         (configure.ac): Compile mbsrtoc32s-state.c unconditionally.
34140         * lib/mbsnrtoc32s.c (mbsnrtoc32s): If the char32_t encoding and the
34141         wchar_t encoding may differ, use mbrtoc32, not mbsnrtowcs.
34142         * modules/mbsnrtoc32s (Depends-on): Update conditions.
34143         (configure.ac): Compile mbsrtoc32s-state.c unconditionally.
34145 2020-01-07  Bruno Haible  <bruno@clisp.org>
34147         wcrtomb: Make multithread-safe, except possibly on IRIX.
34148         * m4/wcrtomb.m4 (gl_FUNC_WCRTOMB): Don't set REPLACE_WCRTOMB to 1 when
34149         REPLACE_MBSTATE_T is set. Define WCRTOMB_C_LOCALE_BUG and
34150         WCRTOMB_RETVAL_BUG.
34151         * lib/wcrtomb.c (wcrtomb): Use original wcrtomb whenever available. Use
34152         wctomb only on IRIX.
34154 2020-01-05  Jim Meyering  <meyering@fb.com>
34156         tests: skip thread-using tests when threading is disabled
34157         sed's configure.ac specifies gl_DISABLE_THREADS, and that caused three
34158         thread-using gnulib tests to fail. Add an #if-guarded exit (77) to each
34159         of those, so they are skipped in this case.
34160         * tests/test-nl_langinfo-mt.c (main): Exit 77 when threading is disabled.
34161         * tests/test-setlocale_null-mt-all.c (main): Likewise.
34162         * tests/test-setlocale_null-mt-one.c (main): Likewise.
34164 2020-01-05  Bruno Haible  <bruno@clisp.org>
34166         tests: Avoid GCC over-optimization caused by _GL_ARG_NONNULL attributes.
34167         Reported by Jim Meyering in
34168         <https://lists.gnu.org/archive/html/bug-gnulib/2020-01/msg00040.html>.
34169         * lib/stdlib.in.h (GNULIB_defined_canonicalize_file_name): New macro.
34170         (GNULIB_defined_ptsname_r): New macro.
34171         * tests/test-canonicalize.c (_GL_ARG_NONNULL): Define to empty.
34172         (main): Disable the NULL argument test if canonicalize_file_name does
34173         not come from gnulib.
34174         * tests/test-canonicalize-lgpl.c (_GL_ARG_NONNULL): Define to empty.
34175         (main): Disable the NULL argument test if canonicalize_file_name does
34176         not come from gnulib.
34177         * tests/test-ptsname_r.c (_GL_ARG_NONNULL): Define to empty.
34178         (test_errors): Disable the NULL argument test if ptsname_r does not come
34179         from gnulib.
34181 2020-01-04  Jim Meyering  <meyering@fb.com>
34183         update-copyright: reenable its always-skipped test
34184         * tests/test-update-copyright.sh: Restore the "-pi" options removed
34185         on 2019-06-15. Without those, an internal preliminary test would
34186         fail, causing this test always to be skipped.
34187         Verify that the test is now run and passes via this:
34188           ./gnulib-tool --test --dir /tmp/x --with-tests update-copyright
34190 2020-01-05  Bruno Haible  <bruno@clisp.org>
34192         mbstoc32s: Add tests.
34193         * tests/test-mbstoc32s.c: New file, based on tests/test-mbsrtoc32s.c.
34194         * tests/test-mbstoc32s-1.sh: New file, based on
34195         tests/test-mbsrtoc32s-1.sh.
34196         * tests/test-mbstoc32s-2.sh: New file, based on
34197         tests/test-mbsrtoc32s-2.sh.
34198         * tests/test-mbstoc32s-3.sh: New file, based on
34199         tests/test-mbsrtoc32s-3.sh.
34200         * tests/test-mbstoc32s-4.sh: New file, based on
34201         tests/test-mbsrtoc32s-4.sh.
34202         * modules/mbstoc32s-tests: New file, based on modules/mbsrtoc32s-tests.
34204         mbstoc32s: New module.
34205         * lib/uchar.in.h (mbstoc32s): New declaration.
34206         * lib/mbstoc32s.c: New file.
34207         * m4/uchar.m4 (gl_UCHAR_H_DEFAULTS): Initialize GNULIB_MBSTOC32S.
34208         * modules/uchar (Makefile.am): Substitute GNULIB_MBSTOC32S.
34209         * modules/mbstoc32s: New file.
34210         * tests/test-uchar-c++.cc: Test the signature of mbstoc32s.
34211         * doc/posix-functions/mbstowcs.texi: Mention the new module.
34213 2020-01-05  Bruno Haible  <bruno@clisp.org>
34215         Tweak recently added tests.
34216         * tests/test-mbrtoc32.c: Make signature consistent with uchar.in.h.
34217         * tests/test-mbsrtoc32s.c: Likewise.
34218         * tests/test-mbsnrtoc32s.c: Likewise.
34220 2020-01-04  Bruno Haible  <bruno@clisp.org>
34222         mbsnrtoc32s: Add tests.
34223         * tests/test-mbsnrtoc32s.c: New file, based on tests/test-mbsnrtowcs.c.
34224         * tests/test-mbsnrtoc32s-1.sh: New file, based on
34225         tests/test-mbsnrtowcs1.sh.
34226         * tests/test-mbsnrtoc32s-2.sh: New file, based on
34227         tests/test-mbsnrtowcs2.sh.
34228         * tests/test-mbsnrtoc32s-3.sh: New file, based on
34229         tests/test-mbsnrtowcs3.sh.
34230         * tests/test-mbsnrtoc32s-4.sh: New file, based on
34231         tests/test-mbsnrtowcs4.sh.
34232         * modules/mbsnrtoc32s-tests: New file, based on
34233         modules/mbsnrtowcs-tests.
34235         mbsnrtoc32s: New module.
34236         * lib/uchar.in.h (mbsnrtoc32s): New declaration.
34237         * lib/mbsnrtowcs-impl.h: Parameterize: Use macros FUNC, DCHAR_T,
34238         INTERNAL_STATE, MBRTOWC.
34239         * lib/mbsnrtowcs.c (FUNC, DCHAR_T, INTERNAL_STATE, MBRTOWC): New macros.
34240         * lib/mbsnrtoc32s.c: New file.
34241         * m4/uchar.m4 (gl_UCHAR_H_DEFAULTS): Initialize GNULIB_MBSNRTOC32S.
34242         * modules/uchar (Makefile.am): Substitute GNULIB_MBSNRTOC32S.
34243         * modules/mbsnrtoc32s: New file.
34244         * tests/test-uchar-c++.cc: Test the signature of mbsnrtoc32s.
34245         * doc/posix-functions/mbsnrtowcs.texi: Mention the new module.
34247 2020-01-04  Bruno Haible  <bruno@clisp.org>
34249         mbsrtoc32s tests: Enhance test.
34250         * tests/test-mbsrtoc32s.c (main): Include a non-BMP character in the
34251         test strings for UTF-8 and GB18030.
34253 2020-01-04  Bruno Haible  <bruno@clisp.org>
34255         mbsrtoc32s: Fix bug.
34256         * modules/mbsrtoc32s (configure.ac): Require gl_UCHAR_H, to make sure
34257         that SMALL_WCHAR_T is defined.
34259 2020-01-04  Bruno Haible  <bruno@clisp.org>
34261         mbsrtoc32s: Add tests.
34262         * tests/test-mbsrtoc32s.c: New file, based on tests/test-mbsrtowcs.c.
34263         * tests/test-mbsrtoc32s-1.sh: New file, based on
34264         tests/test-mbsrtowcs1.sh.
34265         * tests/test-mbsrtoc32s-2.sh: New file, based on
34266         tests/test-mbsrtowcs2.sh.
34267         * tests/test-mbsrtoc32s-3.sh: New file, based on
34268         tests/test-mbsrtowcs3.sh.
34269         * tests/test-mbsrtoc32s-4.sh: New file, based on
34270         tests/test-mbsrtowcs4.sh.
34271         * modules/mbsrtoc32s-tests: New file, based on modules/mbsrtowcs-tests.
34273         mbsrtoc32s: New module.
34274         * lib/uchar.in.h (mbsrtoc32s): New declaration.
34275         * lib/mbsrtowcs-impl.h: Parameterize: Use macros FUNC, DCHAR_T,
34276         INTERNAL_STATE, MBRTOWC.
34277         * lib/mbsrtowcs.c (FUNC, DCHAR_T, INTERNAL_STATE, MBRTOWC): New macros.
34278         * lib/mbsrtoc32s.c: New file.
34279         * lib/mbsrtoc32s-state.c: New file, based on lib/mbsrtowcs-state.c.
34280         * m4/uchar.m4 (gl_UCHAR_H_DEFAULTS): Initialize GNULIB_MBSRTOC32S.
34281         * modules/uchar (Makefile.am): Substitute GNULIB_MBSRTOC32S.
34282         * modules/mbsrtoc32s: New file.
34283         * tests/test-uchar-c++.cc: Test the signature of mbsrtoc32s.
34284         * doc/posix-functions/mbsrtowcs.texi: Mention the new module.
34286 2020-01-04  Bruno Haible  <bruno@clisp.org>
34288         mbrtowc, mbrtoc32: Tighten dependendies.
34289         * modules/mbrtowc (Depends-on): Disable hard-locale, mbsinit if
34290         REPLACE_MBSTATE_T is 1.
34291         (configure.ac): Don't compile lc-charset-dispatch.c and mbtowc-lock.c if
34292         REPLACE_MBSTATE_T is 0.
34293         * modules/mbrtoc32 (Depends-on): Remove hard-locale, mbsinit. Disable
34294         mbrtowc dependency if REPLACE_MBSTATE_T is 1.
34295         (configure.ac): Don't compile lc-charset-dispatch.c and mbtowc-lock.c if
34296         REPLACE_MBSTATE_T is 0.
34298 2020-01-04  Bruno Haible  <bruno@clisp.org>
34300         uchar: Decide about _GL_LARGE_CHAR32_T at configure time.
34301         * m4/uchar.m4 (gl_UCHAR_H): Set SMALL_WCHAR_T.
34302         * modules/uchar (Files): Add stdint.m4.
34303         (Makefile.am): Substitute SMALL_WCHAR_T.
34304         * lib/uchar.in.h (_GL_LARGE_CHAR32_T): Rely on SMALL_WCHAR_T.
34306 2020-01-04  Bruno Haible  <bruno@clisp.org>
34308         Fix AC_CHECK_DECL so that it deactivates clang's built-in declarations.
34309         Reported by Martin Storsjö <martin@martin.st> in
34310         <https://lists.gnu.org/archive/html/bug-gnulib/2020-01/msg00016.html>.
34311         * m4/00gnulib.m4 (gl_COMPILER_CLANG, gl_COMPILER_PREPARE_CHECK_DECL):
34312         New macros.
34313         (_AC_CHECK_DECL_BODY, AC_CHECK_DECL): Augment.
34315 2020-01-04  Bruno Haible  <bruno@clisp.org>
34317         btoc32: Add tests.
34318         * tests/test-btoc32.c: New file, based on tests/test-btowc.c.
34319         * tests/test-btoc32-1.sh: New file, based on tests/test-btowc1.sh.
34320         * tests/test-btoc32-2.sh: New file, based on tests/test-btowc2.sh.
34321         * modules/btoc32-tests: New file, based on modules/btowc-tests.
34323         btoc32: New module.
34324         * lib/uchar.in.h (btoc32): New declaration.
34325         * lib/btoc32.c: New file.
34326         * m4/uchar.m4 (gl_UCHAR_H_DEFAULTS): Initialize GNULIB_BTOC32.
34327         * modules/uchar (Makefile.am): Substitute GNULIB_BTOC32.
34328         * modules/btoc32: New file.
34329         * tests/test-uchar-c++.cc: Test the signature of btoc32.
34330         * doc/posix-functions/btowc.texi: Mention the new module.
34332 2020-01-03  Bruno Haible  <bruno@clisp.org>
34334         uchar tests: Avoid compilation error with HP cc.
34335         * tests/test-uchar.c: Disable a test when HP cc is in use.
34337 2020-01-03  Bruno Haible  <bruno@clisp.org>
34339         mbrtoc32: Add tests.
34340         * tests/test-mbrtoc32.c: New file, based on tests/test-mbrtowc.c.
34341         * tests/test-mbrtoc32-1.sh: New file, based on tests/test-mbrtowc1.sh.
34342         * tests/test-mbrtoc32-2.sh: New file, based on tests/test-mbrtowc2.sh.
34343         * tests/test-mbrtoc32-3.sh: New file, based on tests/test-mbrtowc3.sh.
34344         * tests/test-mbrtoc32-4.sh: New file, based on tests/test-mbrtowc4.sh.
34345         * tests/test-mbrtoc32-5.sh: New file, based on tests/test-mbrtowc5.sh.
34346         * tests/test-mbrtoc32-w32.c: New file, based on tests/test-mbrtowc-w32.c.
34347         * tests/test-mbrtoc32-w32-1.sh: New file, based on
34348         tests/test-mbrtowc-w32-1.sh.
34349         * tests/test-mbrtoc32-w32-2.sh: New file, based on
34350         tests/test-mbrtowc-w32-2.sh.
34351         * tests/test-mbrtoc32-w32-3.sh: New file, based on
34352         tests/test-mbrtowc-w32-3.sh.
34353         * tests/test-mbrtoc32-w32-4.sh: New file, based on
34354         tests/test-mbrtowc-w32-4.sh.
34355         * tests/test-mbrtoc32-w32-5.sh: New file, based on
34356         tests/test-mbrtowc-w32-5.sh.
34357         * tests/test-mbrtoc32-w32-6.sh: New file, based on
34358         tests/test-mbrtowc-w32-6.sh.
34359         * tests/test-mbrtoc32-w32-7.sh: New file, based on
34360         tests/test-mbrtowc-w32-7.sh.
34361         * modules/mbrtoc32-tests: New file, based on modules/mbrtowc-tests.
34363         mbrtoc32: New module.
34364         * lib/uchar.in.h (mbrtoc32): New declaration.
34365         * lib/mbrtoc32.c: New file, based on lib/mbrtowc.c.
34366         * m4/mbrtoc32.m4: New file, based on m4/mbrtowc.m4.
34367         * m4/uchar.m4 (gl_UCHAR_H): Test whether mbrtoc32 is declared.
34368         (gl_UCHAR_H_DEFAULTS): Initialize GNULIB_MBRTOC32, HAVE_MBRTOC32,
34369         REPLACE_MBRTOC32.
34370         * modules/uchar (Makefile.am): Substitute GNULIB_MBRTOC32,
34371         HAVE_MBRTOC32, REPLACE_MBRTOC32.
34372         * modules/mbrtoc32: New file, based on modules/mbrtowc.
34373         * tests/test-uchar-c++.cc (mbrtoc32): Verify the signature.
34374         * modules/uchar-c++-tests (Makefile.am): Link test-uchar-c++ with
34375         $(LIB_MBRTOWC).
34376         * doc/posix-functions/mbrtoc32.texi: Document the new module.
34377         * doc/posix-functions/mbrtowc.texi: Mention the new module.
34379 2020-01-03  Bruno Haible  <bruno@clisp.org>
34381         mbrtowc: Refactor to share code with mbrtoc32.
34382         * lib/mbrtowc-impl.h: New file, extracted from lib/mbrtowc.c.
34383         * lib/mbrtowc-impl-utf8.h: Likewise.
34384         * lib/mbrtowc.c (mbrtowc): Define macro FITS_IN_CHAR_TYPE. Include
34385         mbrtowc-impl.h.
34386         * modules/mbrtowc (Files): Add the new files.
34388 2020-01-03  Jim Meyering  <meyering@fb.com>
34390         doc: fix time.texi wording
34391         * doc/posix-headers/time.texi (time.h): Typo.
34393 2020-01-03  Bruno Haible  <bruno@clisp.org>
34395         mbrtowc: Refactor locale charset dispatching.
34396         * lib/lc-charset-dispatch.h: New file, extracted from lib/mbrtowc.c.
34397         * lib/lc-charset-dispatch.c: New file, extracted from lib/mbrtowc.c.
34398         * lib/mbrtowc.c: Include lc-charset-dispatch.h. Don't include
34399         localcharset.h, streq.h.
34400         (enc_t): Remove type.
34401         (locale_enc): Remove function.
34402         (cached_locale_enc): Remove variable.
34403         (locale_enc_cached): Remove function.
34404         (mbrtowc): Invoke locale_encoding_classification.
34405         * m4/mbrtowc.m4 (gl_PREREQ_MBRTOWC): Update comment.
34406         * modules/mbrtowc (Files): Add lc-charset-dispatch.h,
34407         lc-charset-dispatch.c.
34408         (configure.ac): Arrange to compile lc-charset-dispatch.c.
34410 2020-01-03  Paul Eggert  <eggert@cs.ucla.edu>
34412         doc: mention 32-bit time_t issue
34413         * doc/posix-headers/sys_stat.texi (sys/stat.h):
34414         * doc/posix-headers/time.texi (time.h): Mention 2038.
34416 2020-01-03  Bruno Haible  <bruno@clisp.org>
34418         mbrtowc: Ensure the mbtowc_lock is unique.
34419         * lib/mbtowc-lock.c: New file, based on lib/setlocale-lock.c.
34420         * lib/mbtowc-lock.h: New file, extracted from lib/mbrtowc.c and
34421         lib/setlocale_null.c.
34422         * lib/mbrtowc.c: Include headers needed for mbtowc-lock.h. Don't include
34423         glthread/lock.h. Include mbtowc-lock.h.
34424         (mbtowc_lock): Remove declaration.
34425         (mbrtowc): Use mbtowc_with_lock.
34426         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): Require gl_PTHREADLIB. Check for
34427         threads.h. Set LIB_MBRTOWC.
34428         (gl_PREREQ_MBTOWC_LOCK): New macro.
34429         * modules/mbrtowc (Files): Add lib/mbtowc-lock.h, lib/mbtowc-lock.c,
34430         lib/windows-initguard.h, m4/threadlib.m4, m4/visibility.m4.
34431         (Depends-on): Remove lock.
34432         (configure.ac): Arrange to compile mbtowc-lock.c.
34433         (Link): Mention $(LIB_MBRTOWC) instead of $(LIBTHREAD).
34434         * modules/acl (Link): Likewise.
34435         * modules/argmatch (Link): Likewise.
34436         * modules/backup-rename (Link): Likewise.
34437         * modules/backupfile (Link): Likewise.
34438         * modules/closein (Link): Likewise.
34439         * modules/closeout (Link): Likewise.
34440         * modules/copy-file (Link): Likewise.
34441         * modules/csharpcomp (Link): Likewise.
34442         * modules/csharpexec (Link): Likewise.
34443         * modules/dfa (Link): Likewise.
34444         * modules/exclude (Link): Likewise.
34445         * modules/fnmatch (Link): Likewise.
34446         * modules/fnmatch-gnu (Link): Likewise.
34447         * modules/fnmatch-posix (Link): Likewise.
34448         * modules/glob (Link): Likewise.
34449         * modules/human (Link): Likewise.
34450         * modules/javacomp (Link): Likewise.
34451         * modules/javaexec (Link): Likewise.
34452         * modules/javaversion (Link): Likewise.
34453         * modules/mbfile (Link): Likewise.
34454         * modules/mbiter (Link): Likewise.
34455         * modules/mbmemcasecmp (Link): Likewise.
34456         * modules/mbmemcasecoll (Link): Likewise.
34457         * modules/mbrlen (Link): Likewise.
34458         * modules/mbscasecmp (Link): Likewise.
34459         * modules/mbscasestr (Link): Likewise.
34460         * modules/mbschr (Link): Likewise.
34461         * modules/mbscspn (Link): Likewise.
34462         * modules/mbsinit (Link): Likewise.
34463         * modules/mbslen (Link): Likewise.
34464         * modules/mbsncasecmp (Link): Likewise.
34465         * modules/mbsnlen (Link): Likewise.
34466         * modules/mbsnrtowcs (Link): Likewise.
34467         * modules/mbspbrk (Link): Likewise.
34468         * modules/mbspcasecmp (Link): Likewise.
34469         * modules/mbsrchr (Link): Likewise.
34470         * modules/mbsrtowcs (Link): Likewise.
34471         * modules/mbssep (Link): Likewise.
34472         * modules/mbsspn (Link): Likewise.
34473         * modules/mbsstr (Link): Likewise.
34474         * modules/mbstok_r (Link): Likewise.
34475         * modules/mbswidth (Link): Likewise.
34476         * modules/mbuiter (Link): Likewise.
34477         * modules/mkdir-p (Link): Likewise.
34478         * modules/propername (Link): Likewise.
34479         * modules/quote (Link): Likewise.
34480         * modules/quotearg (Link): Likewise.
34481         * modules/quotearg-simple (Link): Likewise.
34482         * modules/regex-quote (Link): Likewise.
34483         * modules/rpmatch (Link): Likewise.
34484         * modules/sh-quote (Link): Likewise.
34485         * modules/system-quote (Link): Likewise.
34486         * modules/trim (Link): Likewise.
34487         * modules/unistdio/ulc-asnprintf (Link): Likewise.
34488         * modules/unistdio/ulc-fprintf (Link): Likewise.
34489         * modules/unistdio/ulc-vasnprintf (Link): Likewise.
34490         * modules/unistdio/ulc-vasprintf (Link): Likewise.
34491         * modules/unistdio/ulc-vfprintf (Link): Likewise.
34492         * modules/unistdio/ulc-vsnprintf (Link): Likewise.
34493         * modules/unistdio/ulc-vsprintf (Link): Likewise.
34494         * modules/xfreopen (Link): Likewise.
34495         * modules/xmemcoll (Link): Likewise.
34496         * modules/yesno (Link): Likewise.
34497         * modules/regex (Link): Add $(LIB_MBRTOWC).
34498         * modules/acl-tests (Makefile.am): Link the programs with $(LIB_MBRTOWC)
34499         instead of $(LIBTHREAD).
34500         * modules/argmatch-tests (Makefile.am): Likewise.
34501         * modules/closein-tests (Makefile.am): Likewise.
34502         * modules/copy-file-tests (Makefile.am): Likewise.
34503         * modules/dfa-tests (Makefile.am): Likewise.
34504         * modules/fnmatch-tests (Makefile.am): Likewise.
34505         * modules/glob-tests (Makefile.am): Likewise.
34506         * modules/mbmemcasecmp-tests (Makefile.am): Likewise.
34507         * modules/mbmemcasecoll-tests (Makefile.am): Likewise.
34508         * modules/mbrtowc-tests (Makefile.am): Likewise.
34509         * modules/mbscasecmp-tests (Makefile.am): Likewise.
34510         * modules/mbscasestr-tests (Makefile.am): Likewise.
34511         * modules/mbschr-tests (Makefile.am): Likewise.
34512         * modules/mbscspn-tests (Makefile.am): Likewise.
34513         * modules/mbsinit-tests (Makefile.am): Likewise.
34514         * modules/mbsncasecmp-tests (Makefile.am): Likewise.
34515         * modules/mbsnrtowcs-tests (Makefile.am): Likewise.
34516         * modules/mbspbrk-tests (Makefile.am): Likewise.
34517         * modules/mbspcasecmp-tests (Makefile.am): Likewise.
34518         * modules/mbsrchr-tests (Makefile.am): Likewise.
34519         * modules/mbsrtowcs-tests (Makefile.am): Likewise.
34520         * modules/mbsspn-tests (Makefile.am): Likewise.
34521         * modules/mbsstr-tests (Makefile.am): Likewise.
34522         * modules/quotearg-simple-tests (Makefile.am): Likewise.
34523         * modules/quotearg-tests (Makefile.am): Likewise.
34524         * modules/readtokens-tests (Makefile.am): Likewise.
34525         * modules/sh-quote-tests (Makefile.am): Likewise.
34526         * modules/system-quote-tests (Makefile.am): Likewise.
34527         * modules/unistdio/ulc-asnprintf-tests (Makefile.am): Likewise.
34528         * modules/unistdio/ulc-vasnprintf-tests (Makefile.am): Likewise.
34529         * modules/unistdio/ulc-vasprintf-tests (Makefile.am): Likewise.
34530         * modules/unistdio/ulc-vsnprintf-tests (Makefile.am): Likewise.
34531         * modules/unistdio/ulc-vsprintf-tests (Makefile.am): Likewise.
34532         * modules/yesno-tests (Makefile.am): Likewise.
34533         * modules/exclude-tests (Makefile.am): Link the programs with
34534         $(LIB_MBRTOWC).
34535         * modules/regex-tests (Makefile.am): Likewise.
34536         * modules/regex-quote-tests (Makefile.am): Likewise.
34538 2020-01-03  Bruno Haible  <bruno@clisp.org>
34540         getopt-posix: Fix compilation failure in testdirs.
34541         * lib/unistd.in.h: Include <getopt-cdefs.h> and <getopt-pfx-core.h> only
34542         when the gnulib module 'getopt-posix' is enabled.
34543         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_GETOPT_POSIX.
34544         * modules/getopt-posix (configure.ac): Set GNULIB_GETOPT_POSIX as a
34545         module indicator.
34546         * modules/unistd (Makefile.am): Substitute GNULIB_GETOPT_POSIX.
34548 2020-01-03  Bruno Haible  <bruno@clisp.org>
34550         doc: Mention the 64-bit inode number problem.
34551         * m4/largefile.m4 (AC_SYS_LARGEFILE): Mention that this macro fixes the
34552         64-bit inode number problem.
34553         * doc/posix-functions/stat.texi: Mention that this module fixes the
34554         64-bit inode number problem.
34555         * doc/posix-functions/lstat.texi: Likewise.
34556         * doc/posix-functions/fstat.texi: Likewise.
34557         * doc/posix-functions/readdir.texi: Add more details.
34558         * doc/posix-functions/readdir_r.texi: Likewise.
34560 2020-01-02  Bruno Haible  <bruno@clisp.org>
34562         wcrtomb: Add more tests.
34563         * tests/test-wcrtomb-w32.c: Include localcharset.h.
34564         (test_one_locale): For the GB18030 and UTF-8 tests, verify that
34565         locale_charset() returns the expected value; otherwise, skip the test.
34566         * tests/test-wcrtomb-w32-6.sh: Remove old comment.
34567         * tests/test-wcrtomb-w32-7.sh: Likewise.
34568         * modules/wcrtomb-tests (Files): Add these files.
34569         (Depends-on): Add localcharset.
34570         (TESTS): Add test-wcrtomb-w32-6.sh, test-wcrtomb-w32-7.sh.
34572 2020-01-02  Bruno Haible  <bruno@clisp.org>
34574         mbrtowc: Add more tests.
34575         * tests/test-mbrtowc-w32.c: Include localcharset.h.
34576         (test_one_locale): For the GB18030 and UTF-8 tests, verify that
34577         locale_charset() returns the expected value; otherwise, skip the test.
34578         * tests/test-mbrtowc-w32-6.sh: Remove old comment.
34579         * tests/test-mbrtowc-w32-7.sh: Likewise.
34580         * modules/mbrtowc-tests (Files): Add these files.
34581         (Depends-on): Add localcharset.
34582         (TESTS): Add test-mbrtowc-w32-6.sh, test-mbrtowc-w32-7.sh.
34584 2020-01-02  Bruno Haible  <bruno@clisp.org>
34586         mbrtowc: Fix test failures on MSVC (regression by previous commit).
34587         * m4/mbrtowc.m4 (gl_MBRTOWC_STORES_INCOMPLETE): New macro.
34588         (gl_FUNC_MBRTOWC): Invoke it. Define MBRTOWC_STORES_INCOMPLETE_BUG.
34589         * lib/mbrtowc.c (rpl_mbrtowc): Add workaround for
34590         MBRTOWC_STORES_INCOMPLETE_BUG.
34591         * doc/posix-functions/mbrtowc.texi: Mention the MSVC bug.
34593 2020-01-02  Paul Eggert  <eggert@cs.ucla.edu>
34595         doc: mention glibc bug 24269
34596         * doc/regex.texi (Back-reference Operator): Add glibc bug 24269.
34597         Reformat slightly so that it looks nicer in the Grep manual.
34599 2020-01-02  Bruno Haible  <bruno@clisp.org>
34601         mbrtowc: Don't replace mbstate_t on MSVC.
34602         * m4/mbrtowc.m4 (gl_MBSTATE_T_BROKEN): Require AC_CANONICAL_HOST. Ignore
34603         a missing mbsinit function on native Windows.
34604         * lib/wchar.in.h (GNULIB_defined_mbstate_t): Likewise.
34605         * m4/wcrtomb.m4 (gl_FUNC_WCRTOMB): Strengthen the test, to detect an
34606         MSVC bug.
34607         * doc/posix-functions/wcrtomb.texi: Mention the MSVC bug.
34609 2020-01-02  Bruno Haible  <bruno@clisp.org>
34611         setlocale-null: Avoid crashing the MSVC linker.
34612         * lib/setlocale-lock.c: Don't define IMP(gl_get_setlocale_null_lock) on
34613         MSVC.
34615 2020-01-02  Bruno Haible  <bruno@clisp.org>
34617         wchar: Make the HP-UX workaround work on HP-UX 11.31.
34618         * modules/wchar (Depends-on): Add inttypes-incomplete.
34619         * lib/inttypes.in.h: Define _GL_FINISHED_INCLUDING_SYSTEM_INTTYPES_H.
34620         * lib/wchar.in.h: Test _GL_FINISHED_INCLUDING_SYSTEM_INTTYPES_H instead
34621         of strtoimax.
34623 2020-01-02  Bruno Haible  <bruno@clisp.org>
34625         mbrtowc: Fix compilation error on IRIX (regression from 2019-12-26).
34626         * lib/mbrtowc.c: Include <stdint.h>.
34627         * modules/mbrtowc (Depends-on): Add stdint.
34629 2020-01-01  Pádraig Brady  <P@draigBrady.com>
34631         md5, sha1, sha256, sha512: support --with-openssl=auto-gpl-compat
34632         * m4/gl-openssl.m4: Add a new "auto-gpl-compat" mode,
34633         which will auto enable use of openssl, only for >= version 3,
34634         which is newly licensed under the Apache Software License.
34636 2020-01-01  Bruno Haible  <bruno@clisp.org>
34638         mbrtowc: Include function name in macro names.
34639         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): Define
34640         MBRTOWC_IN_C_LOCALE_MAYBE_EILSEQ, not C_LOCALE_MAYBE_EILSEQ.
34641         (gl_MBRTOWC_C_LOCALE): Change cache variable name to
34642         gl_cv_func_mbrtowc_C_locale_sans_EILSEQ.
34643         * lib/mbrtowc.c: Test MBRTOWC_IN_C_LOCALE_MAYBE_EILSEQ, not
34644         C_LOCALE_MAYBE_EILSEQ.
34646 2020-01-01  Bruno Haible  <bruno@clisp.org>
34648         c32tob: New module.
34649         * lib/uchar.in.h (_GL_LARGE_CHAR32_T): New macro.
34650         (c32tob): New declaration.
34651         * lib/c32tob.c: New file.
34652         * m4/uchar.m4 (gl_UCHAR_MODULE_INDICATOR, gl_UCHAR_H_DEFAULTS): New
34653         macros.
34654         (gl_UCHAR_H): Require gl_UCHAR_H_DEFAULTS.
34655         * modules/uchar (Depends-on): Add snippet/c++defs.
34656         (Makefile.am): Include c++defs.h and substitute GNULIB_C32TOB in
34657         uchar.h.
34658         * modules/c32tob: New file.
34659         * tests/test-uchar.c: Verify that _GL_LARGE_CHAR32_T is correctly
34660         defined.
34661         * tests/test-uchar-c++.cc: Include signature.h. Test the signature of
34662         c32tob.
34663         * modules/uchar-c++-tests (Files): Add tests/signature.h.
34664         * doc/posix-functions/wctob.texi: Mention the new module.
34666 2020-01-01  Bruno Haible  <bruno@clisp.org>
34668         locale C++ tests: Fix link error on AIX (regression from 2019-12-18).
34669         * modules/locale-c++-tests (Makefile.am): Link test-locale-c++ with
34670         $(LIB_SETLOCALE).
34672 2020-01-01  Bruno Haible  <bruno@clisp.org>
34674         hard-locale tests: Fix a conflict with the C++ tests.
34675         * modules/hard-locale-tests (Makefile.am): Build a program named
34676         'current-locale', not 'locale'.
34678 2020-01-01  Bruno Haible  <bruno@clisp.org>
34680         doc: Update documentation about wchar_t.
34681         * doc/*/*wc*.texi: Clarify that 64-bit AIX does not have a too small
34682         wchar_t type.
34684 2020-01-01  Bruno Haible  <bruno@clisp.org>
34686         mbrtowc tests: Fix typos.
34687         * tests/test-mbrtowc.c (main): Fix typo.
34688         * tests/test-mbrtowc-w32.c (test_one_locale): Likewise.
34690 2019-12-31  Paul Eggert  <eggert@cs.ucla.edu>
34692         maint: update copyright notices
34693         Before doing the following changes done by hand, I also ran ‘make
34694         update-copyright’ and ‘config/srclist-update <config/srclist.txt’
34695         to do most of the copyright years automatically.  A few upstream
34696         sources are still in 2019 but these should eventually be changed
34697         automatically too.
34698         * build-aux/declared.sh (func_version):
34699         * build-aux/libtool-next-version (func_version):
34700         * build-aux/run-test (func_version):
34701         Update these notices by hand.  Put just the last year
34702         in output of programs, as per GNU coding standards.
34704 2019-12-31  Bruno Haible  <bruno@clisp.org>
34706         uchar: Add C++ tests.
34707         * tests/test-uchar-c++.cc: New file.
34708         * tests/test-uchar-c++2.cc: New file.
34709         * modules/uchar-c++-tests: New file.
34711         uchar: Add tests.
34712         * tests/test-uchar.c: New file.
34713         * modules/uchar-tests: New file.
34715         uchar: New module.
34716         * lib/uchar.in.h: New file.
34717         * m4/uchar.m4: New file.
34718         * modules/uchar: New file.
34719         * doc/posix-headers/uchar.texi: Mention the new module.
34721 2019-12-30  Jim Meyering  <meyering@fb.com>
34723         localeinfo: ->simple would be wrong for LC_ALL=C
34724         That would lead to using unnecessary and expensive code paths in dfa.c.
34725         * lib/localeinfo.c (using_simple_locale): Fix recently-introduced logic
34726         error that would have made grep many times slower in the C locale.
34727         With this change, and a file created like this:
34728           yes 00 | head -10000000 > in
34729         Running grep as follows becomes more than 40 times faster:
34730           LC_ALL=C grep -Fw 0 in
34732 2019-12-30  Paul Eggert  <eggert@cs.ucla.edu>
34734         doc: document trouble with back-references
34735         * doc/regex.texi (Back-reference Operator): Mention bugs etc.
34737 2019-12-29  Paul Eggert  <eggert@cs.ucla.edu>
34739         doc: use “back-reference” for \1 etc.
34740         * doc/regex.texi: Consistently spell “back-reference” with
34741         a hyphen, since that’s how POSIX does it.
34743 2019-12-26  Jim Meyering  <meyering@fb.com>
34745         test-framework-sh: tighten an internal grep regexp
34746         * tests/init.sh (gl_shell_test_script_): Tighten the grep regexp
34747         that helps test for a working printf.
34749 2019-12-26  Bruno Haible  <bruno@clisp.org>
34751         test-framework-sh: Avoid /bin/sh on AIX 7.2 due to its printf built-in.
34752         Reported by Paul Eggert in
34753         <https://lists.gnu.org/archive/html/grep-devel/2019-12/msg00020.html>.
34754         Simplification by Jim Meyering.
34755         * tests/init.sh (gl_shell_test_script_): Add a test of printf of an
34756         octal escape sequence in a UTF-8 locale.
34758 2019-12-26  Paul Eggert  <eggert@cs.ucla.edu>
34760         mbrtowc: port better to narrow-wchar_t platforms
34761         * lib/mbrtowc.c (mbrtowc): On platforms like AIX 7.2, where
34762         wchar_t is too narrow to represent all the Unicode characters,
34763         consider a byte sequence for an out-of-wchar_t-range character to
34764         be an encoding error.  This fixes grep’s surrogate-pair test
34765         failure on AIX 7.2.
34767 2019-12-24  Bruno Haible  <bruno@clisp.org>
34769         localcharset: Avoid referencing rpl_setlocale on native Windows.
34770         * lib/localcharset.c (setlocale): Undefine.
34772 2019-12-24  Bruno Haible  <bruno@clisp.org>
34774         lock tests: Fix link error on HP-UX/hppa (regression from 2019-12-21).
34775         * m4/semaphore.m4: New file.
34776         * modules/lock-tests (Files): Add it.
34777         (configure.ac): Require gl_SEMAPHORE.
34778         (Makefile.am): Link test-lock with $(LIB_SEMAPHORE).
34780 2019-12-24  Paul Eggert  <eggert@cs.ucla.edu>
34782         strptime: fix typo in previous patch
34783         Problem and fix reported by Bruno Haible in:
34784         https://lists.gnu.org/r/bug-gnulib/2019-12/msg00202.html
34785         * lib/strptime.c (day_of_the_week): Fix paren bug.
34787 2019-12-24  Bruno Haible  <bruno@clisp.org>
34789         setlocale-null: Make it easy to rely on the lock in another library.
34790         * lib/setlocale-lock.c: Do not define anything if OMIT_SETLOCALE_LOCK is
34791         defined.
34793 2019-12-23  Paul Eggert  <eggert@cs.ucla.edu>
34795         gethrxtime, mktime, nstrftime, strptime: tweak division performance
34796         Performanced analyzed by Bruno Haible in:
34797         https://lists.gnu.org/r/bug-gnulib/2019-12/msg00200.html
34798         * config/srclist.txt: Do not sync mktime.c for now.
34799         * lib/mktime.c (shr, ydhms_diff):
34800         * lib/nstrftime.c (SHR, tm_diff, __strftime_internal):
34801         * lib/strptime.c (day_of_the_week):
34802         * lib/xtime.h (xtime_sec):
34803         Redo with neither ‘%’ nor conditional branches.
34805 2019-12-23  Bruno Haible  <bruno@clisp.org>
34807         setlocale-null: Export the lock function also on non-Windows platforms.
34808         * lib/setlocale-lock.c (DLL_EXPORTED): New macro.
34809         (gl_get_setlocale_null_lock): Declare as DLL_EXPORTED.
34810         * m4/setlocale_null.m4 (gl_PREREQ_SETLOCALE_LOCK): New macro.
34811         * modules/setlocale-null (configure.ac): Invoke it.
34812         (Files): Add m4/visibility.m4.
34814 2019-12-22  Paul Eggert  <eggert@cs.ucla.edu>
34816         gethrxtime: fix rounding bug with negative args
34817         Problem reported by Bruno Haible in:
34818         https://lists.gnu.org/r/bug-gnulib/2019-12/msg00192.html
34819         * lib/xtime.h (xtime_sec): Simplify calculation and correct bug
34820         with negative rounding.  Common platforms can compute / and % with
34821         a single instruction, so the simplified code should be shorter and
34822         faster on these platforms anyway.
34824 2019-12-22  Bruno Haible  <bruno@clisp.org>
34826         gethrxtime: remove incorrect overflow detection
34827         * lib/xtime.h (xtime_make): Remove attempt to prevent internal
34828         integer overflow, as it didn’t suffice.  This reverts the xtime.h
34829         part of 2018-10-12T04:46:09Z!akim.demaille@gmail.com, which I
34830         cannot now see the need for anyway (even in cases where it works),
34831         as the patch is helpful only when the signs of S and NS disagree,
34832         and all callers pass nonnegative values for S and NS.
34834 2019-12-22  Bruno Haible  <bruno@clisp.org>
34836         setlocale-null: Add standalone include file.
34837         * lib/setlocale_null.h: New file, extracted from lib/locale.in.h.
34838         * lib/locale.in.h: Include setlocale_null.h.
34839         (SETLOCALE_NULL_MAX, SETLOCALE_NULL_ALL_MAX, setlocale_null_r,
34840         setlocale_null): Remove declarations.
34841         * lib/setlocale_null.c: Include setlocale_null.h.
34842         * lib/localename.c: Likewise.
34843         * modules/setlocale-null (Files): Add lib/setlocale_null.h.
34844         (Depends-on): Add snippet/arg-nonnull.
34845         (Include): Allow either "setlocale_null.h" or <locale.h>.
34847 2019-12-22  Bruno Haible  <bruno@clisp.org>
34849         strfmon_l: Fix test failures on FreeBSD and Cygwin.
34850         * m4/strfmon_l.m4 (gl_FUNC_STRFMON_L): Require gt_LOCALE_FR_UTF8. Add an
34851         AC_RUN_IFELSE test.
34852         * modules/strfmon_l (Files): Add locale-fr.m4, codeset.m4.
34853         * doc/posix-functions/strfmon_l.texi: Mention the FreeBSD and Cygwin
34854         problem.
34856 2019-12-22  Bruno Haible  <bruno@clisp.org>
34858         Prefer lib_SOURCES to unconditional AC_LIBOBJ.
34859         * modules/at-internal: Prefer a lib_SOURCES augmentation to an
34860         unconditional AC_LIBOBJ.
34861         * modules/selinux-at: Likewise.
34862         * modules/xmemdup0: Likewise.
34863         * modules/xstrtoll: Likewise.
34865 2019-12-22  Bruno Haible  <bruno@clisp.org>
34867         longlong: Mark module obsolete.
34868         * modules/longlong (Status, Notice): New sections.
34870         stdint: Assume that the compiler supports 'long long'.
34871         * lib/stdint.in.h (int64_t, uint64_t, intmax_t, uintmax_t, INT64_C,
34872         UINT64_C, INTMAX_C, UINTMAX_C): Assume HAVE_LONG_LONG_INT and
34873         HAVE_UNSIGNED_LONG_LONG_INT to be 1.
34874         * m4/stdint.m4 (gl_STDINT_H): Don't require AC_TYPE_LONG_LONG_INT,
34875         AC_TYPE_UNSIGNED_LONG_LONG_INT.
34876         * modules/stdint (Files): Remove longlong.m4.
34877         (Makefile.am): Don't substitute HAVE_LONG_LONG_INT,
34878         HAVE_UNSIGNED_LONG_LONG_INT.
34880         inttypes-incomplete: Assume that the compiler supports 'long long'.
34881         * lib/inttypes.in.h (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX,
34882         _SCNu64_PREFIX): Assume HAVE_LONG_LONG_INT and
34883         HAVE_UNSIGNED_LONG_LONG_INT to be 1.
34884         * m4/inttypes.m4 (gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION): Assume
34885         HAVE_LONG_LONG_INT to be 1.
34886         * modules/inttypes-incomplete (Makefile.am): Don't substitute
34887         HAVE_LONG_LONG_INT, HAVE_UNSIGNED_LONG_LONG_INT.
34889         malloca: Assume that the compiler supports 'long long'.
34890         * lib/malloca.h: Assume HAVE_LONG_LONG_INT to be 1.
34891         * m4/malloca.m4 (gl_MALLOCA): Don't require AC_TYPE_LONG_LONG_INT.
34892         * modules/malloca (Files): Remove longlong.m4.
34893         * modules/relocatable-prog-wrapper (Files): Likewise.
34895         atoll: Assume that the compiler supports 'long long'.
34896         * m4/atoll.m4 (gl_FUNC_ATOLL): Don't require AC_TYPE_LONG_LONG_INT.
34897         * modules/atoll (Files): Remove longlong.m4.
34899         strtoll: Assume that the compiler supports 'long long'.
34900         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Don't require AC_TYPE_LONG_LONG_INT.
34901         * modules/strtoll (Files): Remove longlong.m4.
34903         strtoull: Assume that the compiler supports 'long long'.
34904         * m4/strtoull.m4 (gl_FUNC_STRTOULL): Don't require
34905         AC_TYPE_UNSIGNED_LONG_LONG_INT.
34906         * modules/strtoull (Files): Remove longlong.m4.
34908         strtoimax, strtoumax: Assume that the compiler supports 'long long'.
34909         * lib/strtoimax.c: Assume HAVE_LONG_LONG_INT and
34910         HAVE_UNSIGNED_LONG_LONG_INT to be 1.
34911         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Don't require
34912         AC_TYPE_LONG_LONG_INT.
34913         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Don't require
34914         AC_TYPE_UNSIGNED_LONG_LONG_INT.
34915         * modules/strtoimax (Files): Remove longlong.m4.
34916         * modules/strtoumax (Files): Likewise.
34918         xstrtoll: Assume that the compiler supports 'long long'.
34919         * lib/xstrtol.h (xstrtoll, xstrtoull): Declare unconditionally.
34920         * modules/xstrtoll (configure.ac): Don't invoke AC_TYPE_LONG_LONG_INT.
34922         vasnprintf: Assume that the compiler supports 'long long'.
34923         * lib/printf-args.h: Assume HAVE_LONG_LONG_INT to be 1.
34924         * lib/printf-args.c (PRINTF_FETCHARGS): Likewise.
34925         * lib/printf-parse.c (PRINTF_PARSE): Likewise.
34926         * lib/vasnprintf.c (MAX_ROOM_NEEDED, VASNPRINTF): Likewise.
34927         * m4/intmax_t.m4 (gl_AC_TYPE_INTMAX_T, gt_AC_TYPE_INTMAX_T): Don't
34928         require AC_TYPE_LONG_LONG_INT.
34929         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS, gl_PREREQ_PRINTF_PARSE,
34930         gl_PREREQ_VASNPRINTF): Likewise.
34931         * modules/vasnprintf (Files): Remove longlong.m4.
34932         * modules/c-vasnprintf (Files): Likewise.
34933         * modules/unistdio/u8-vasnprintf (Files): Likewise.
34934         * modules/unistdio/u8-u8-vasnprintf (Files): Likewise.
34935         * modules/unistdio/u16-vasnprintf (Files): Likewise.
34936         * modules/unistdio/u16-u16-vasnprintf (Files): Likewise.
34937         * modules/unistdio/u32-vasnprintf (Files): Likewise.
34938         * modules/unistdio/u32-u32-vasnprintf (Files): Likewise.
34939         * modules/unistdio/ulc-vasnprintf (Files): Likewise.
34941         gethrxtime: Assume that the compiler supports 'long long'.
34942         * lib/xtime.h (xtime_t): Define to 'long long int' always.
34943         (XTIME_PRECISION): Define to 1000000000 always.
34944         (xtime_make, xtime_sec): Optimize accordingly.
34945         * m4/gethrxtime.m4 (gl_XTIME): Don't require AC_TYPE_LONG_LONG_INT.
34946         * modules/gethrxtime (Files): Remove longlong.m4.
34948         integer_length*: Assume that the compiler supports 'long long'.
34949         * lib/integer_length.h (integer_length_ll): Declare unconditionally.
34950         * modules/integer_length (Files): Remove longlong.m4.
34951         (configure.ac): Don't require AC_TYPE_UNSIGNED_LONG_LONG_INT.
34952         * modules/integer_length_l (Files): Remove longlong.m4.
34953         (configure.ac): Don't require AC_TYPE_UNSIGNED_LONG_LONG_INT.
34954         * modules/integer_length_ll (Files): Remove longlong.m4.
34955         (configure.ac): Don't require AC_TYPE_UNSIGNED_LONG_LONG_INT.
34957         count-one-bits: Assume that the compiler supports 'long long'.
34958         * lib/count-one-bits.h (count_one_bits_ll): Define unconditionally.
34959         * m4/count-one-bits.m4: Remove file.
34960         * modules/count-one-bits (Files): Remove it.
34961         (configure.ac): Don't invoke gl_COUNT_ONE_BITS.
34962         * tests/test-count-one-bits.c (main): Test count_one_bits_ll
34963         unconditionally.
34965         count-trailing-zeros: Assume that the compiler supports 'long long'.
34966         * lib/count-trailing-zeros.h (count_trailing_zeros_ll): Define
34967         unconditionally.
34968         * m4/count-trailing-zeros.m4: Remove file.
34969         * modules/count-trailing-zeros (Files): Remove it.
34970         (configure.ac): Don't invoke gl_COUNT_TRAILING_ZEROS.
34971         * tests/test-count-trailing-zeros.c (main): Test count_trailing_zeros_ll
34972         unconditionally.
34974         count-leading-zeros: Assume that the compiler supports 'long long'.
34975         * lib/count-leading-zeros.h (count_leading_zeros_ll): Define
34976         unconditionally.
34977         * m4/count-leading-zeros.m4: Remove file.
34978         * modules/count-leading-zeros (Files): Remove it.
34979         (configure.ac): Don't invoke gl_COUNT_LEADING_ZEROS.
34980         * tests/test-count-leading-zeros.c (main): Test count_leading_zeros_ll
34981         unconditionally.
34983 2019-12-22  Bruno Haible  <bruno@clisp.org>
34985         localcharset: Update support for OpenBSD.
34986         * lib/localcharset.c (alias_table): Map "US-ASCII" to "ASCII".
34988 2019-12-21  Bruno Haible  <bruno@clisp.org>
34990         pthread_sigmask: Avoid test failure on NetBSD 8.0.
34991         * tests/test-pthread_sigmask2.c (main): Skip the error handling test on
34992         NetBSD.
34993         * doc/posix-functions/pthread_sigmask.texi: Mention the NetBSD problem.
34995 2019-12-21  Bruno Haible  <bruno@clisp.org>
34997         threadlib: Improve code structure.
34998         * m4/threadlib.m4: Reorder macros. Add comments.
35000 2019-12-21  Bruno Haible  <bruno@clisp.org>
35002         threadlib: Fix LIBMULTITHREAD on FreeBSD with --enable-threads=isoc.
35003         * m4/threadlib.m4 (gl_STDTHREADLIB_BODY): New macro (some code moved
35004         here from m4/threads.m4).
35005         (gl_THREADLIB_BODY): Don't test whether mtx_lock and cnd_timedwait exist
35006         in libc. Instead, rely on gl_STDTHREADLIB_BODY.
35007         (gl_STDTHREADLIB): New macro.
35008         * m4/threads.m4 (gl_THREADS_H): Require gl_STDTHREADLIB instead of
35009         gl_THREADLIB_BODY and gl_YIELD. Don't set LIBSTDTHREAD here.
35011 2019-12-21  Bruno Haible  <bruno@clisp.org>
35013         sched_yield: Don't depend on threadlib and yield.
35014         * m4/threadlib.m4 (gl_PTHREADLIB): Document that it sets
35015         LIB_SCHED_YIELD.
35016         (gl_PTHREADLIB_BODY): Set LIB_SCHED_YIELD (code moved here from
35017         m4/yield.m4).
35018         * m4/sched_yield.m4 (gl_FUNC_SCHED_YIELD): Require gl_PTHREADLIB, not
35019         gl_THREADLIB and gl_YIELD.
35020         * m4/yield.m4 (gl_YIELD): Require gl_PTHREADLIB. Determine YIELD_LIB
35021         based on $(LIB_SCHED_YIELD).
35022         * m4/threads.m4 (gl_THREADS_H): Don't require gl_YIELD. Use
35023         $(LIB_SCHED_YIELD), not $(YIELD_LIB).
35024         * modules/sched_yield (Files): Remove yield.m4. Add threadlib.m4.
35025         (Depends-on): Remove threadlib.
35026         (Link): Mention $(LIB_SCHED_YIELD), not $(YIELD_LIB).
35027         * modules/threads-h (Files): Remove m4/yield.m4.
35028         * modules/pthread-cond-tests (Makefile.am): Link the programs against
35029         $(LIB_SCHED_YIELD), not $(YIELD_LIB).
35030         * modules/pthread-mutex-tests (Makefile.am): Likewise.
35031         * modules/pthread-once-tests (Makefile.am): Likewise.
35032         * modules/pthread-rwlock-tests (Makefile.am): Likewise.
35033         * modules/pthread-tss-tests (Makefile.am): Likewise.
35035 2019-12-21  Bruno Haible  <bruno@clisp.org>
35037         threads-h: Don't depend on threadlib.
35038         * modules/threads-h (configure.ac-early): Invoke gl_ANYTHREADLIB_EARLY,
35039         not gl_THREADLIB_EARLY.
35041 2019-12-21  Bruno Haible  <bruno@clisp.org>
35043         nl_langinfo tests: Fix link error (regression from 2019-12-18).
35044         * modules/nl_langinfo-tests (Makefile.am): Link also test-nl_langinfo
35045         with $(LIB_SETLOCALE).
35047 2019-12-21  Bruno Haible  <bruno@clisp.org>
35049         threadlib: Remove unused dependency (left over from 2019-07-06).
35050         * modules/threadlib (Depends-on): Remove havelib.
35052 2019-12-21  Bruno Haible  <bruno@clisp.org>
35054         New convention for multithread-safety tests.
35055         * tests/test-setlocale_null-mt-one.c: Renamed from
35056         tests/test-setlocale_null-one.c.
35057         * tests/test-setlocale_null-mt-all.c: Renamed from
35058         tests/test-setlocale_null-all.c.
35059         * modules/setlocale-null-tests (Files, Makefile.am): Update.
35061 2019-12-21  Bruno Haible  <bruno@clisp.org>
35063         quotearg tests: Fix conflict with hard-locale tests.
35064         * tests/testlocale: Renamed from tests/locale.
35065         * modules/quotearg-tests (Files): Update.
35066         * tests/test-quotearg.sh (LOCALEDIR): Likewise.
35068 2019-12-21  Bruno Haible  <bruno@clisp.org>
35070         pthread-thread, lock: On z/OS, use PTHREAD_RWLOCK_INITIALIZER_NP.
35071         Reported by Daniel Richard G. in
35072         <https://lists.gnu.org/archive/html/bug-gnulib/2019-11/msg00001.html>
35073         <https://lists.gnu.org/archive/html/bug-gnulib/2019-12/msg00167.html>
35074         * lib/pthread.in.h (PTHREAD_RWLOCK_INITIALIZER): Define to
35075         PTHREAD_RWLOCK_INITIALIZER_NP when possible.
35076         * lib/glthread/lock.h: Allow PTHREAD_RWLOCK_INITIALIZER_NP as an
35077         alternative to PTHREAD_RWLOCK_INITIALIZER.
35078         * lib/glthread/lock.c: Likewise.
35080 2019-12-21  Bruno Haible  <bruno@clisp.org>
35082         memcmp tests: Work around the clang bug.
35083         * tests/test-memcmp.c (main): Use a volatile function pointer to disable
35084         the clang optimization.
35086 2019-12-20  Bruno Haible  <bruno@clisp.org>
35088         localcharset: Add support for z/OS encoding names.
35089         * lib/localcharset.h: Mention which encodings are used as locale
35090         encodings on z/OS.
35092 2019-12-20  Bruno Haible  <bruno@clisp.org>
35094         iconv_open: Add support for z/OS encoding names.
35095         Reported by Daniel Richard G. in
35096         <https://lists.gnu.org/archive/html/bug-gnulib/2019-12/msg00172.html>.
35097         * lib/iconv_open-zos.gperf: New file.
35098         * modules/iconv_open (Files): Add iconv_open-zos.gperf.
35099         (Makefile.am): Add rules for generating iconv_open-zos.h from it.
35100         * lib/iconv_open.c (ICONV_FLAVOR_ZOS): New macro.
35101         * m4/iconv_open.m4 (gl_FUNC_ICONV_OPEN): On z/OS, use ICONV_FLAVOR_ZOS.
35102         * doc/posix-functions/iconv_open.texi: Mention z/OS.
35104 2019-12-20  Bruno Haible  <bruno@clisp.org>
35106         doc: Document the problem of the per-thread locale functions on z/OS.
35107         * doc/posix-functions/uselocale.texi: Document the z/OS problem.
35108         * doc/posix-functions/newlocale.texi: Likewise.
35109         * doc/posix-functions/duplocale.texi: Likewise.
35110         * doc/posix-functions/freelocale.texi: Likewise.
35112 2019-12-20  Bruno Haible  <bruno@clisp.org>
35114         localename, gettext: Fix host_os value for z/OS.
35115         * m4/intl-thread-locale.m4 (gt_FUNC_USELOCALE): Fix host_os value in
35116         cross-configuration code.
35118 2019-12-19  Jim Meyering  <meyering@fb.com>
35120         nstrftime: avoid a shadowing warning
35121         * lib/nstrftime.c (libc_hidden_def): Rename inner "i" to "j",
35122         to avoid shadowing an "i" declared hundreds of lines above.
35124 2019-12-19  Paul Eggert  <eggert@cs.ucla.edu>
35126         dfa: struct dfamust now uses flexible array
35127         * lib/dfa.c: Include flexmember.h.
35128         (dfamust, dfamustfree): Adjust to struct dfamust change.
35129         This saves a call to malloc+free.
35130         * lib/dfa.h (struct dfamust): Make the final member a
35131         flexible array member.
35132         * modules/dfa (Depends-on): Add flexmember.
35134         dfa: fast->small for array elements
35135         * lib/dfa.c (charclass_word): Use uint_least64_t not uint_fast64_t,
35136         since this type is used in arrays.  This change is more for
35137         documentation than for any practical effect, since the two types
35138         are the same on all known platforms.
35140 2019-12-19  Bruno Haible  <bruno@clisp.org>
35142         iconv tests: Test canonicalized, not system-dependent, encoding names.
35143         * tests/test-iconv.c (main): Revert part of the 2016-08-17 patch.
35144         * modules/iconv-tests (Depends-on): Add iconv_open.
35146 2019-12-18  Bruno Haible  <bruno@clisp.org>
35148         localename: Fix test failure on AIX 7.2.
35149         * m4/intl-thread-locale.m4 (gt_INTL_THREAD_LOCALE_NAME): Enable nameless
35150         locales on AIX.
35151         * lib/localename.c (gl_locale_name_thread_unsafe): Handle nameless
35152         locales on AIX.
35154 2019-12-18  Paul Eggert  <eggert@cs.ucla.edu>
35156         Improve port of AC_C_RESTRICT to Oracle C++
35157         Problem reported by Christian Biesinger in:
35158         https://lists.gnu.org/r/bug-gnulib/2019-12/msg00159.html
35159         * m4/gnulib-common.m4 (AC_C_RESTRICT): Port better to
35160         Oracle Developer Studio C++ 12.5 or later.
35162 2019-12-18  Bruno Haible  <bruno@clisp.org>
35164         wchar: Fix test failures on AIX and MSVC (regression from 2019-12-07).
35165         * lib/wchar.in.h (GNULIB_defined_mbstate_t): Do define on AIX and MSVC.
35167 2019-12-18  Bruno Haible  <bruno@clisp.org>
35169         localename: Ensure multithread-safety in future changes.
35170         * lib/localename.c (setlocale): Reference the system's setlocale().
35171         (get_locale_t_name): Invoke setlocale_null instead of setlocale.
35172         (gl_locale_name_posix): Likewise.
35173         * modules/localename (Depends-on): Add setlocale-null.
35175 2019-12-18  Bruno Haible  <bruno@clisp.org>
35177         setlocale-null: Make API more useful.
35178         * lib/locale.in.h (setlocale_null_r): Renamed from setlocale_null. All
35179         callers changed.
35180         (setlocale_null): New declaration.
35181         * lib/setlocale_null.c (setlocale_null_androidfix): New function,
35182         extracted from setlocale_null_unlocked.
35183         (setlocale_null_unlocked): Invoke it.
35184         (setlocale_null_r): Renamed from setlocale_null.
35185         (setlocale_null): New function, extracted from setlocale_mtsafe in
35186         setlocale.c.
35187         * lib/setlocale.c: Don't include <errno.h>.
35188         (setlocale_mtsafe): Invoke setlocale_null.
35189         * lib/setlocale-lock.c: Update comments.
35190         * doc/posix-functions/setlocale.texi: Mention both functions.
35192 2019-12-18  Bruno Haible  <bruno@clisp.org>
35194         localename: Optimize code for native Windows.
35195         * lib/localename.c (gl_locale_name_posix): Remove handling of LC_ALL
35196         category (not allowed here).
35198 2019-12-18  Bruno Haible  <bruno@clisp.org>
35200         setlocale: Make calls with NULL argument multithread-safe.
35201         * lib/setlocale.c: Include <errno.h>.
35202         (setlocale_mtsafe): New function.
35203         (setlocale_unixlike): Invoke setlocale_mtsafe instead of setlocale.
35204         (setlocale_improved): Renamed from rpl_setlocale.
35205         * m4/setlocale.m4 (gl_FUNC_SETLOCALE): Require gl_FUNC_SETLOCALE_NULL.
35206         Set and define NEED_SETLOCALE_IMPROVED and NEED_SETLOCALE_MTSAFE. Set
35207         LIB_SETLOCALE.
35208         * modules/setlocale (Depends-on): Add setlocale-null. Update conditions.
35209         (Link): New section.
35210         * tests/locale.c: Undefine setlocale.
35211         * tests/test-setlocale_null-one.c: Likewise.
35212         * tests/test-setlocale_null-all.c: Likewise.
35213         * modules/setlocale-tests (Makefile.am): Link the test programs with
35214         $(LIB_SETLOCALE).
35215         * modules/astrxfrm-tests (Makefile.am): Likewise.
35216         * modules/btowc-tests (Makefile.am): Likewise.
35217         * modules/c-ctype-tests (Makefile.am): Likewise.
35218         * modules/c-snprintf-tests (Makefile.am): Likewise.
35219         * modules/c-strcase-tests (Makefile.am): Likewise.
35220         * modules/c-vasprintf-tests (Makefile.am): Likewise.
35221         * modules/c-vsnprintf-tests (Makefile.am): Likewise.
35222         * modules/c-xvasprintf-tests (Makefile.am): Likewise.
35223         * modules/dfa-tests (Makefile.am): Likewise.
35224         * modules/duplocale-tests (Makefile.am): Likewise.
35225         * modules/hard-locale-tests (Makefile.am): Likewise.
35226         * modules/localcharset-tests (Makefile.am): Likewise.
35227         * modules/localename-tests (Makefile.am): Likewise.
35228         * modules/mbmemcasecmp-tests (Makefile.am): Likewise.
35229         * modules/mbmemcasecoll-tests (Makefile.am): Likewise.
35230         * modules/mbrtowc-tests (Makefile.am): Likewise.
35231         * modules/mbscasecmp-tests (Makefile.am): Likewise.
35232         * modules/mbscasestr-tests (Makefile.am): Likewise.
35233         * modules/mbschr-tests (Makefile.am): Likewise.
35234         * modules/mbscspn-tests (Makefile.am): Likewise.
35235         * modules/mbsinit-tests (Makefile.am): Likewise.
35236         * modules/mbsncasecmp-tests (Makefile.am): Likewise.
35237         * modules/mbsnrtowcs-tests (Makefile.am): Likewise.
35238         * modules/mbspbrk-tests (Makefile.am): Likewise.
35239         * modules/mbspcasecmp-tests (Makefile.am): Likewise.
35240         * modules/mbsrchr-tests (Makefile.am): Likewise.
35241         * modules/mbsrtowcs-tests (Makefile.am): Likewise.
35242         * modules/mbsspn-tests (Makefile.am): Likewise.
35243         * modules/mbsstr-tests (Makefile.am): Likewise.
35244         * modules/nl_langinfo-tests (Makefile.am): Likewise.
35245         * modules/quotearg-tests (Makefile.am): Likewise.
35246         * modules/regex-tests (Makefile.am): Likewise.
35247         * modules/strfmon_l-tests (Makefile.am): Likewise.
35248         * modules/strtod-tests (Makefile.am): Likewise.
35249         * modules/strtold-tests (Makefile.am): Likewise.
35250         * modules/unicase/locale-language-tests (Makefile.am): Likewise.
35251         * modules/unicase/ulc-casecmp-tests (Makefile.am): Likewise.
35252         * modules/unicase/ulc-casecoll-tests (Makefile.am): Likewise.
35253         * modules/unigbrk/ulc-grapheme-breaks-tests (Makefile.am): Likewise.
35254         * modules/unistdio/u8-vasnprintf-tests (Makefile.am): Likewise.
35255         * modules/unistdio/u16-vasnprintf-tests (Makefile.am): Likewise.
35256         * modules/unistdio/u32-vasnprintf-tests (Makefile.am): Likewise.
35257         * modules/unistdio/ulc-vasnprintf-tests (Makefile.am): Likewise.
35258         * modules/uniwbrk/ulc-wordbreaks-tests (Makefile.am): Likewise.
35259         * modules/vasnprintf-posix-tests (Makefile.am): Likewise.
35260         * modules/wcrtomb-tests (Makefile.am): Likewise.
35261         * modules/wcsnrtombs-tests (Makefile.am): Likewise.
35262         * modules/wcsrtombs-tests (Makefile.am): Likewise.
35263         * modules/wcwidth-tests (Makefile.am): Likewise.
35264         * doc/posix-functions/setlocale.texi: Mention that the multithread-
35265         safety fix is also available in module 'setlocale'.
35267 2019-12-18  Bruno Haible  <bruno@clisp.org>
35269         hard-locale: Make multithread-safe.
35270         * lib/hard-locale.h (hard_locale): Move documentation to here.
35271         * lib/hard-locale.c: Don't include <stdlib.h>.
35272         (GLIBC_VERSION): Remove macro.
35273         (hard_locale): Assume that all systems name the "C" and "POSIX" locales
35274         "C" or "POSIX". Invoke setlocale_null instead of setlocale.
35275         * modules/hard-locale (Depends-on): Remove strdup. Add setlocale-null.
35276         (configure.ac): Require gl_FUNC_SETLOCALE_NULL. Set LIB_HARD_LOCALE.
35277         (Link): New section.
35278         * modules/hard-locale-tests (Makefile.am): Link test-hard-locale against
35279         $(LIB_HARD_LOCALE).
35281 2019-12-18  Bruno Haible  <bruno@clisp.org>
35283         hard-locale: Avoid test failure on Haiku.
35284         * tests/test-hard-locale.c (test_one): Treat Haiku like recent OpenBSD.
35286 2019-12-18  Bruno Haible  <bruno@clisp.org>
35288         setlocale-null: Handle NULL result from setlocale.
35289         * lib/locale.in.h (setlocale_null): Document EINVAL return value.
35290         * lib/setlocale_null.c (setlocale_null_unlocked): Handle NULL result
35291         from setlocale or _wsetlocale.
35293 2019-12-18  Bruno Haible  <bruno@clisp.org>
35295         hard-locale: Add test.
35296         * tests/test-hard-locale.c: New file.
35297         * tests/locale.c: New file.
35298         * modules/hard-locale-tests: New file.
35300 2019-12-17  Paul Eggert  <eggert@cs.ucla.edu>
35302         dfa: do not match invalid UTF-8
35303         * lib/dfa.c (struct dfa): Grow utf8_anychar_classes member array
35304         from 5 to 9 tokens; this is needed due to the changes to
35305         add_utf8_anychar.
35306         (charclass_index): 2nd arg is now pointer-to-const.
35307         (add_utf8_anychar): Match only valid UTF-8 byte sequences
35308         instead of allowing overlong encodings or surrogate halves.
35310         dfa: simplify charclass by assuming C99
35311         * lib/dfa.c (CHARCLASS_WORD_BITS): Now always 64.
35312         (charclass_word): Now always uint_fast64_t.
35313         (CHARCLASS_PAIR): Remove.
35314         (CHARCLASS_INIT): Take 4 arguments instead of 8.  All uses changed.
35316         fts: tune via calloc
35317         * lib/fts.c (fts_open): Prefer calloc to malloc + memset.
35319         dfa: tune via xzalloc
35320         * lib/dfa.c (dfaoptimize): Prefer xzalloc to xmalloc + memset.
35322 2019-12-17  Bruno Haible  <bruno@clisp.org>
35324         localcharset: Fix multithread-safety bug on Windows and OS/2.
35325         * lib/localcharset.h (locale_charset): Clarify when the result becomes
35326         invalid.
35327         * lib/localcharset.c (locale_charset): Use a stack-allocated buffer to
35328         assemble the result.
35330 2019-12-17  Bruno Haible  <bruno@clisp.org>
35332         localcharset: Optimize code for native Windows.
35333         * lib/localcharset.c (locale_charset): Don't bother calling
35334         setlocale (LC_ALL, NULL) since we're not interested in its result.
35336 2019-12-17  Bruno Haible  <bruno@clisp.org>
35338         nl_langinfo: Fix multithread-safety bug on OpenBSD 3.8.
35339         * lib/nl_langinfo.c (ctype_codeset): Invoke setlocale_null instead of
35340         setlocale.
35341         * m4/nl_langinfo.m4 (gl_FUNC_NL_LANGINFO): Require
35342         gl_FUNC_SETLOCALE_NULL. Set LIB_NL_LANGINFO.
35343         * modules/nl_langinfo (Depends-on): Add setlocale-null.
35345 2019-12-17  Bruno Haible  <bruno@clisp.org>
35347         nl_langinfo: Fix multithread-safety bug on mingw and MSVC.
35348         * lib/nl_langinfo.c (ctype_codeset, rpl_nl_langinfo): Use a
35349         stack-allocated buffer to assemble each result and different static
35350         buffers to return it.
35351         * tests/test-nl_langinfo-mt.c: New file.
35352         * modules/nl_langinfo-tests (Files): Add it.
35353         (Depends-on): Add thread, nanosleep.
35354         (Makefile.am): Build test-nl_langinfo-mt test.
35356 2019-12-17  Bruno Haible  <bruno@clisp.org>
35358         langinfo: Document more details.
35359         * doc/posix-headers/langinfo.texi: List platform details.
35360         * doc/posix-functions/nl_langinfo.texi: Likewise.
35362 2019-12-17  Bruno Haible  <bruno@clisp.org>
35364         mbsinit: Fix compilation error in mingw-w64 7.0 with _UCRT defined.
35365         Reported by Tom Kacvinsky <tom.kacvinsky@vector.com>
35366         and Martin Storsjö <martin@martin.st>
35367         in <https://savannah.gnu.org/bugs/?57406>.
35368         * lib/mbsinit.c: Accommodate an MSVC-like mbstate_t definition with
35369         mingw.
35371 2019-12-17  Bruno Haible  <bruno@clisp.org>
35373         glob: Avoid warning on mingw.
35374         Reported by Christian Biesinger <cbiesinger@google.com> in
35375         <https://lists.gnu.org/archive/html/bug-gnulib/2019-12/msg00122.html>.
35376         * lib/glob.c (__stat64): Undefine first.
35378 2019-12-17  Paul Eggert  <eggert@cs.ucla.edu>
35380         xalloc: tune xzalloc for fresh allocations
35381         * lib/xmalloc.c (xzalloc): Use xcalloc rather than xmalloc+memset,
35382         because when the memory is freshly allocated from the OS via sbrk
35383         or mmap, calloc can avoid doing the memset.
35385         dfa: new function dfacopysyntax
35386         * lib/dfa.c (struct dfa): Move syntax member later so
35387         that dfacopysyntax can easily clear earlier members.
35388         (dfacopysyntax): New function, used by Gawk.
35390 2019-12-16  Paul Eggert  <eggert@cs.ucla.edu>
35392         dfa: port _GL_ATTRIBUTE_MALLOC to Gawk
35393         Gawk does not use Gnulib, and does not define _GL_ATTRIBUTE_MALLOC.
35394         * lib/dfa.h (_GL_ATTRIBUTE_MALLOC): Define to empty
35395         if not already defined.
35397         dfa: remove one dependency on MB_CUR_MAX
35398         * lib/dfa.c (dfamust): No need to refer to MB_CUR_MAX here.
35400         dfa: remove struct lexer_state.cur_mb_len
35401         * lib/dfa.c (struct lexer_state): Remove cur_mb_len member,
35402         as it’s not needed and the code is simpler without it.
35403         All uses removed.
35405 2019-12-16  Bruno Haible  <bruno@clisp.org>
35407         setlocale-null: Remove need for -lpthread on musl libc, *BSD, Haiku.
35408         Reported by Arnold Robbins <arnold@skeeve.com>.
35409         * lib/setlocale_null.c (c11_threads_in_use, pthread_in_use): New macros,
35410         copied from lib/glthread/lock.h.
35411         (pthread_mutex_lock, pthread_mutex_unlock): Mark as weak.
35412         (setlocale_null_with_lock): If pthread_in_use() is false, use
35413         setlocale_null_unlocked directly.
35414         * m4/threadlib.m4 (gl_WEAK_SYMBOLS): New macro, extracted from
35415         gl_THREADLIB_BODY. Define HAVE_WEAK_SYMBOLS.
35416         (gl_THREADLIB_BODY): Invoke gl_WEAK_SYMBOLS.
35417         * m4/setlocale_null.m4 (gl_FUNC_SETLOCALE_NULL): Invoke gl_WEAK_SYMBOLS.
35418         Set LIB_SETLOCALE_NULL to empty if weak symbols are supported.
35419         * m4/duplocale.m4 (gl_FUNC_DUPLOCALE): Add comment.
35421 2019-12-16  Paul Eggert  <eggert@cs.ucla.edu>
35423         dfa: make dfasyntax thread-safe
35424         Problem reported by Bruno Haible in:
35425         https://lists.gnu.org/r/bug-gnulib/2019-12/msg00099.html
35426         * lib/dfa.c: Do not include locale.h.
35427         (struct dfa): Remove simple_locale member.
35428         All uses replaced by localeinfo.simple.
35429         (using_simple_locale): Remove; now present (with some
35430         changes) in localeinfo.c.
35431         (dfasyntax): No need to initialize removed member.
35433         localeinfo: record whether locale is simple
35434         * lib/localeinfo.c (using_simple_locale): New function,
35435         copied here from lib/dfa.c but with a change: it uses
35436         strcoll for its heuristic, instead of using setlocale.
35437         This lets it be thread-safe.
35438         * lib/localeinfo.h (struct localeinfo): New member ‘simple’.
35440 2019-12-15  Bruno Haible  <bruno@clisp.org>
35442         duplocale: Fix multithread-safety bug on AIX.
35443         * lib/duplocale.c: Don't include <stdlib.h>.
35444         (rpl_duplocale): Invoke setlocale_null instead of setlocale.
35445         * m4/duplocale.m4 (gl_FUNC_DUPLOCALE): Require gl_FUNC_SETLOCALE_NULL.
35446         Set LIB_DUPLOCALE.
35447         * modules/duplocale (Depends-on): Add setlocale-null.
35448         (Link): New section.
35449         * modules/duplocale-tests (Makefile.am): Link test-duplocale with
35450         $(LIB_DUPLOCALE).
35452 2019-12-15  Bruno Haible  <bruno@clisp.org>
35454         setlocale-null: Add tests.
35455         * tests/test-setlocale_null.c: New file.
35456         * tests/test-setlocale_null-one.c: New file.
35457         * tests/test-setlocale_null-all.c: New file.
35458         * modules/setlocale-null-tests: New file.
35460         setlocale-null: New module.
35461         * lib/locale.in.h (SETLOCALE_NULL_MAX, SETLOCALE_NULL_ALL_MAX,
35462         setlocale_null): New declarations.
35463         * lib/setlocale_null.c: New file.
35464         * lib/setlocale-lock.c: New file.
35465         * m4/threadlib.m4 (gl_PTHREADLIB_BODY): Define C macro HAVE_PTHREAD_API.
35466         * m4/setlocale_null.m4: New file.
35467         * m4/locale_h.m4 (gl_LOCALE_H_DEFAULTS): Initialize
35468         GNULIB_SETLOCALE_NULL.
35469         * modules/locale (Makefile.am): Substitute GNULIB_SETLOCALE_NULL.
35470         * modules/setlocale-null: New file.
35471         * doc/posix-functions/setlocale.texi: Mention the new module.
35473 2019-12-15  Bruno Haible  <bruno@clisp.org>
35475         lock tests: Skip test when no multithreading is enabled.
35476         * tests/test-rwlock1.c: Skip the test when no multithreading is enabled.
35478 2019-12-14  Bruno Haible  <bruno@clisp.org>
35480         locale, duplocale, localename: Fix last patch.
35481         Reported by Daniel Richard G. in
35482         <https://lists.gnu.org/archive/html/bug-gnulib/2019-12/msg00093.html>.
35483         * lib/locale.in.h (HAVE_WORKING_NEWLOCALE, HAVE_WORKING_DUPLOCALE):
35484         Don't define if locale_t does not exist.
35486 2019-12-13  Bruno Haible  <bruno@clisp.org>
35488         locale, duplocale, localename: Fix errors if locale_t does not exist.
35489         Reported by Daniel Richard G. in
35490         <https://lists.gnu.org/archive/html/bug-gnulib/2019-12/msg00078.html>.
35491         * lib/locale.in.h (HAVE_WORKING_NEWLOCALE, HAVE_WORKING_DUPLOCALE): New
35492         macros.
35493         * tests/test-locale.c: Test HAVE_WORKING_NEWLOCALE instead of
35494         HAVE_NEWLOCALE.
35495         * tests/test-localename.c: Likewise.
35496         * tests/test-duplocale.c: Test HAVE_WORKING_DUPLOCALE instead of
35497         HAVE_DUPLOCALE.
35498         * tests/test-locale-c++.cc: Likewise.
35500 2019-12-13  Bruno Haible  <bruno@clisp.org>
35502         wcstok: Fix test failure on HP-UX.
35503         * m4/wcstok.m4 (gl_FUNC_WCSTOK): Set REPLACE_WCSTOK to 1 on HP-UX.
35504         * doc/posix-functions/wcstok.texi: Mention the HP-UX bug.
35506 2019-12-12  Bruno Haible  <bruno@clisp.org>
35508         strtod, strtold tests: Avoid test failure on AIX 7.2.
35509         * tests/test-strtod1.c (main): Allow implementations in which ',' and
35510         '.' both are radix characters.
35511         * tests/test-strtold1.c (main): Likewise.
35513 2019-12-12  Paul Eggert  <eggert@cs.ucla.edu>
35515         dfa: prefer ptrdiff_t for API, too
35516         Also, use ‘idx_t’ for ptrdiff_t values that must be nonnegative,
35517         but do this only for internal use for now.
35518         * NEWS: Mention the API change.
35519         * lib/dfa.c (idx_t, IDX_MAX): New type and max value, for internal
35520         use for now.  Use them instead of ptrdiff_t and PTRDIFF_MAX for
35521         values known to be nonnegative.
35522         (dfaparse, dfaexec_mb, dfaexec_sb, dfaexec_noop, dfaexec):
35523         Prefer idx_t or ptrdiff_t to size_t for API.
35524         * lib/dfa.h (dfaparse, dfacomp, dfaexec):
35525         Prefer ptrdiff_t to size_t for API.
35527         stdalign: port to xlclang 16.01
35528         Problem reportd by Bruno Haible in:
35529         https://lists.gnu.org/r/bug-gnulib/2019-12/msg00064.html
35530         * lib/stdalign.in.h (_Alignas): Do not use __attribute__
35531         ((__aligned__ (...))) with xlclang, as a top-level
35532         ‘char __attribute__ ((__aligned__ (8))) c;’ does not work with
35533         xlclang version 16.01.0000.0001; the alignment directive is ignored.
35535 2019-12-12  Bruno Haible  <bruno@clisp.org>
35537         duplocale: Fix test failure on AIX 7.2 with xlclang.
35538         * lib/duplocale.c: Include <stdlib.h>.
35539         (rpl_duplocale): Use a heap-allocated copy of the first setlocale return
35540         value.
35542 2019-12-12  Bruno Haible  <bruno@clisp.org>
35544         stddef: Document the AIX xlc issue.
35545         * doc/posix-headers/stddef.texi: Document the NULL issue with AIX xlc.
35547 2019-12-12  Bruno Haible  <bruno@clisp.org>
35549         duplocale: Don't attempt to override if locale_t does not exist.
35550         Reported by Daniel Richard G. in
35551         <https://lists.gnu.org/archive/html/bug-gnulib/2019-11/msg00039.html>.
35552         * m4/duplocale.m4 (gl_FUNC_DUPLOCALE): If locale_t does not exist, set
35553         HAVE_DUPLOCALE to 0.
35555 2019-12-12  Bruno Haible  <bruno@clisp.org>
35557         wcwidth: Avoid test failure on AIX 7.2.
35558         * tests/test-wcwidth.c (main): Don't fail if wcwidth(0x200B) is
35559         negative.
35560         * doc/posix-functions/wcwidth.texi: Mention the AIX issue.
35562 2019-12-12  Bruno Haible  <bruno@clisp.org>
35564         ilogbl: Work around Cygwin bug.
35565         * m4/ilogbl.m4 (gl_FUNC_ILOGBL_WORKS): Test whether ilogbl(0.0L) is
35566         correct.
35567         * doc/posix-functions/ilogbl.texi: Mention the Cygwin bug.
35569 2019-12-12  Bruno Haible  <bruno@clisp.org>
35571         strtold: Work around Cygwin bug.
35572         * m4/strtold.m4 (gl_FUNC_STRTOLD): Add test for the underflow problem.
35573         If it is present, define STRTOLD_HAS_UNDERFLOW_BUG.
35574         * lib/strtod.c (HAVE_UNDERLYING_STRTOD): Set to 0 if
35575         STRTOLD_HAS_UNDERFLOW_BUG is defined.
35576         * doc/posix-functions/strtold.texi: Mention the Cygwin bug.
35578 2019-12-12  Bruno Haible  <bruno@clisp.org>
35580         strtold: Fix autoconf test.
35581         * m4/strtold.m4 (gl_FUNC_STRTOLD): Test strtold, not strtod.
35583 2019-12-11  Bruno Haible  <bruno@clisp.org>
35585         fsync tests: Skip test that is known to fail.
35586         * doc/posix-functions/fsync.texi: Update list of platforms.
35587         * tests/test-fsync.c (main): Skip test with read-only file descriptors
35588         that is known to fail on AIX and Cygwin.
35590 2019-12-11  Bruno Haible  <bruno@clisp.org>
35592         getaddrinfo: Fix calling convention in 32-bit mode on native Windows.
35593         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Test whether getaddrinfo has a
35594         non-POSIX signature. If so, set REPLACE_GETADDRINFO. Define
35595         HAVE_GETADDRINFO as a C macro.
35596         * lib/netdb.in.h (getaddrinfo, freeaddrinfo): If REPLACE_GETADDRINFO,
35597         declare as replacement functions.
35598         * lib/getaddrinfo.c (getaddrinfo, freeaddrinfo): If HAVE_GETADDRINFO,
35599         define as no-op overrides.
35600         * m4/netdb_h.m4 (gl_NETDB_H_DEFAULTS): Initialize REPLACE_GETADDRINFO.
35601         * modules/netdb (Makefile.am): Substitute REPLACE_GETADDRINFO.
35602         * modules/getaddrinfo (Depends-on, configure.ac): Test
35603         REPLACE_GETADDRINFO.
35604         * doc/posix-functions/getaddrinfo.texi: Mention calling convention
35605         problem.
35606         * doc/posix-functions/freeaddrinfo.texi: Mention header file and calling
35607         convention problems.
35609 2019-12-11  Paul Eggert  <eggert@cs.ucla.edu>
35611         dfa: prefer signed integers for internals
35612         Signed integers can be checked more easily for integer overflow.
35613         * lib/dfa.c (position, struct lexer_state, struct parser_state)
35614         (struct dfa, mbs_to_wchar, fetch_wc, parse_bracket_exp)
35615         (struct lexptr, lex, addtok_mb, add_utf8_anychar, atom)
35616         (nsubtoks, copytoks, closure, alloc_position_set, delete)
35617         (replace, state_index, epsclosure, charclass_context)
35618         (state_separate_contexts, merge_nfa_state, dfaoptimize)
35619         (dfaanalyze, build_state, dfaexec_main, dfa_supported)
35620         (maybe_disable_superset_dfa, dfassbuild, dfafree, enlist)
35621         (comsubs, inboth, allocmust):
35622         Prefer a signed to an unsigned integer when calculating indexes,
35623         unless the integer is part of the external API (a bigger deal,
35624         and to be done later).
35626         dfa: fix index overflow
35627         * lib/dfa.c (compare): Avoid integer overflow when analyzing
35628         very large regular expressions.
35630         dfa: update commentary for previous change
35631         * NEWS: Mention the change.
35632         * lib/dfa.c, lib/dfa.h (dfaparse, dfamust, dfacomp): Update comments.
35634 2019-12-11  Norihiro Tanaka  <noritnk@kcn.ne.jp>
35636         dfa: separate parse and compile phase
35637         ‘dfamust’ must be called after parsing and before tokens are
35638         reordered, but both are executed in the compilation phase.
35639         Token reordering was introduced in Gnulib commit
35640         2018-10-22T15:01:08Z!noritnk@kcn.ne.jp
35641         (5c7a0371823876cca7a1347fa09ca26bbbff0c98).
35642         * lib/dfa.c (dfaparse): Change it to global function.
35643         (dfacomp): If first argument is NULL, skip parse.
35644         * lib/dfa.h: (dfaparse): Add a prototype.
35646 2019-12-11  Bruno Haible  <bruno@clisp.org>
35648         unistd tests: Fix link error on MSVC.
35649         * modules/unistd-c++-tests (Makefile.am): Link test-unistd-c++ against
35650         $(LIB_GETLOGIN).
35652 2019-12-11  Bruno Haible  <bruno@clisp.org>
35654         doc: Document that ISO C or POSIX substitutes are supported in C++ mode.
35655         * doc/gnulib-intro.texi (Various Kinds of Modules): Document that ISO C
35656         and POSIX substitutes are supported in C++ mode.
35657         * NEWS: Likewise.
35659 2019-12-11  Bruno Haible  <bruno@clisp.org>
35661         stddef: Fix compilation error in C++ mode on MSVC.
35662         * lib/stddef.in.h (max_align_t): With MSVC in C++ mode, don't define it;
35663         instead, include <cstddef>.
35665 2019-12-11  Bruno Haible  <bruno@clisp.org>
35667         unistd: Fix compilation error in C++ mode on MSVC.
35668         * lib/unistd.in.h: Don't do include[_next] <unistd.h> if the platform
35669         does not have <unistd.h>.
35671 2019-12-11  Bruno Haible  <bruno@clisp.org>
35673         locale: Fix compilation error in C++ mode on MSVC.
35674         * m4/locale_h.m4 (gl_LOCALE_H): Don't set REPLACE_STRUCT_LCONV on MSVC.
35675         * lib/locale.in.h (int_p_cs_precedes, int_p_sign_posn,
35676         int_p_sep_by_space, int_n_cs_precedes, int_n_sign_posn,
35677         int_n_sep_by_space): Define as macros on MSVC.
35679 2019-12-11  Bruno Haible  <bruno@clisp.org>
35681         wchar: Fix compilation error in C++ mode on MSVC.
35682         * lib/wchar.in.h (mbstate_t): Don't override on MSVC.
35684 2019-12-11  Bruno Haible  <bruno@clisp.org>
35686         pthread-thread: Fix compilation error in C++ mode on MSVC.
35687         * lib/pthread.in.h (pthread_exit): Don't use _Noreturn in the
35688         _GL_CXXALIAS_RPL invocation.
35690 2019-12-08  Bruno Haible  <bruno@clisp.org>
35692         Fix compilation errors in C++ mode on Haiku.
35693         * lib/stdio.in.h (vdprintf): Disable _GL_CXXALIASWARN invocation on
35694         non-glibc systems.
35695         * lib/spawn.in.h (posix_spawnattr_getschedpolicy,
35696         posix_spawnattr_setschedpolicy, posix_spawnattr_getschedparam,
35697         posix_spawnattr_setschedparam): Likewise.
35698         * lib/stdlib.in.h (random, initstate_r, setstate_r): Use
35699         _GL_CXXALIAS_SYS_CAST instead of _GL_CXXALIAS_SYS.
35700         * lib/unistd.in.h (usleep): Likewise.
35702 2019-12-08  Bruno Haible  <bruno@clisp.org>
35704         Fix compilation errors in 32-bit C++ mode on HP-UX 11/ia64.
35705         * m4/largefile.m4 (gl_SET_LARGEFILE_SOURCE): New macro.
35706         * modules/fseeko (configure.ac-early): Require it instead of
35707         AC_FUNC_FSEEKO.
35708         * modules/ftello (configure.ac-early): Likewise.
35709         * modules/fflush (configure.ac-early): Likewise.
35711 2019-12-08  Bruno Haible  <bruno@clisp.org>
35713         Fix compilation error in C++ mode on HP-UX 11.
35714         * lib/unistd.in.h (getpagesize): Declare on HP-UX.
35715         * doc/glibc-functions/getpagesize.texi: Mention the HP-UX problem.
35717 2019-12-08  Bruno Haible  <bruno@clisp.org>
35719         Fix compilation errors on HP-UX 11/ia64.
35720         * lib/math.in.h (copysignf, fmaf, fma): Undefine before
35721         _GL_FUNCDECL_SYS.
35723 2019-12-08  Bruno Haible  <bruno@clisp.org>
35725         Fix compilation error in C++ mode on OpenBSD.
35726         * lib/signal.in.h (signal): Declare on OpenBSD.
35728 2019-12-08  Bruno Haible  <bruno@clisp.org>
35730         math tests: Don't fail if isfinite, isinf, isnan, signbit is a macro.
35731         * tests/test-math-c++.cc (isfinite, isinf, isnan, signbit): Use #warning
35732         instead of #error.
35734 2019-12-08  Bruno Haible  <bruno@clisp.org>
35736         Fix compilation errors in C++ mode on FreeBSD.
35737         * lib/pthread.in.h (pthread_exit): Remove _Noreturn from prototype.
35738         * tests/test-pthread-c++.cc (GNULIB_NAMESPACE::pthread_exit): Likewise.
35739         * lib/threads.in.h (thrd_exit): Likewise.
35740         * tests/test-threads-c++.cc (GNULIB_NAMESPACE::thrd_exit): Likewise.
35742 2019-12-08  Bruno Haible  <bruno@clisp.org>
35744         Fix compilation errors in C++ mode on macOS and FreeBSD.
35745         * lib/math.in.h (isfinite, isinf, isnan, signbit): In C++ mode on macOS
35746         or FreeBSD with clang, use the approach without C preprocessor macro.
35748 2019-12-07  Bruno Haible  <bruno@clisp.org>
35750         Fix compilation errors in C++ mode on AIX with xlclang++.
35751         Reported by Christian Biesinger <cbiesinger@google.com> in
35752         <https://lists.gnu.org/archive/html/bug-gnulib/2019-12/msg00009.html>.
35753         * lib/wchar.in.h (mbstate_t): Don't override on AIX.
35755 2019-12-07  Bruno Haible  <bruno@clisp.org>
35757         Document compilation error in C++ mode on NetBSD 8.0.
35758         * doc/posix-headers/monetary.texi: Mention the NetBSD bug.
35760 2019-12-07  Bruno Haible  <bruno@clisp.org>
35762         Fix compilation errors in C++ mode on Solaris 10.
35763         * m4/stdbool.m4 (AM_STDBOOL_H): Require AC_CANONICAL_HOST. Set STDBOOL_H
35764         to non-empty on Solaris with a non-GCC compiler.
35765         * doc/posix-headers/stdbool.texi: Mention the Solaris issue.
35767 2019-12-07  Bruno Haible  <bruno@clisp.org>
35769         Reword NEWS entry.
35770         * NEWS: Reword the latest NEWS entry.
35772 2019-12-05  Pino Toscano  <ptoscano@redhat.com>
35774         Move xstrtol_fatal to a new xstrtol-error module.
35775         * lib/xstrtol.h: Stop including <getopt.h>.
35776         (xstrtol_fatal): Move ...
35777         * lib/xstrtol-error.h: ... here.  New file.
35778         * lib/xstrtol-error.c: Include xstrtol-error.h instead of xstrtol.h.
35779         * tests/test-xstrtol.c: Likewise.
35780         * modules/xstrtol (Files): Remove lib/xstrtol-error.c.
35781         (Depends-on): Remove exitfail, error, getopt-gnu, and gettext-h.
35782         (Makefile.am): Remove xstrtol-error.c from lib_SOURCES.
35783         * modules/xstrtol-error: New file.
35784         * modules/xstrtol-tests (Depends-on): Add xstrtol-error.
35785         * MODULES.html.sh: Add xstrtol-error.
35786         * NEWS: Document the change.
35788 2019-12-06  Paul Eggert  <eggert@cs.ucla.edu>
35790         nstrftime: better width support for %N, %z
35791         * lib/nstrftime.c (width_add, width_add1, width_cpy):
35792         New macros, which generalize ‘add’, ‘add1’, ‘cpy’ by adding
35793         a new WIDTH parameter.
35794         (add, add1, cpy): Use these macros.
35795         (width_add): Do not treat digits == 0 as a special case,
35796         do not pad if padding is ‘-’, and do not use a negative width.
35797         (__strftime_internal): Redo formatting of nanoseconds and numeric
35798         timezones to avoid buffer misuse in unusual cases, and so that
35799         widths make more sense.  Add support for widths greater than 9 to
35800         the %N format; they are zero filled on the right.
35801         * tests/test-nstrftime.c (posixtm_test): Add a %12N test.
35803 2019-12-05  Bruno Haible  <bruno@clisp.org>
35805         Fix compilation errors in C++ mode on Solaris 10 and Solaris 11.
35806         * m4/isfinite.m4 (gl_ISFINITE): Require AC_CANONICAL_HOST. On Solaris,
35807         set REPLACE_ISFINITE to 1.
35808         * m4/isinf.m4 (gl_ISINF): Require AC_CANONICAL_HOST. On Solaris, set
35809         REPLACE_ISINF to 1.
35810         * m4/signbit.m4 (gl_SIGNBIT): On Solaris, set REPLACE_SIGNBIT to 1.
35811         * lib/pthread.in.h (pthread_create, pthread_once, pthread_key_create):
35812         Use _GL_CXXALIAS_SYS_CAST instead of _GL_CXXALIAS_SYS.
35813         * lib/threads.in.h (call_once): Likewise.
35814         * lib/iconv.in.h (iconv): Likewise.
35816 2019-12-05  Bruno Haible  <bruno@clisp.org>
35818         wchar: Add more C++ tests.
35819         Reported by Christian Biesinger <cbiesinger@google.com> in
35820         <https://lists.gnu.org/archive/html/bug-gnulib/2019-12/msg00009.html>.
35821         * tests/test-wchar-c++3.cc: New file.
35822         * modules/wchar-c++-tests (Files): Add it.
35823         (Makefile.am): Compile it.
35825 2019-12-05  Bruno Haible  <bruno@clisp.org>
35827         Add more C++ tests.
35829         assert-h: Add C++ tests.
35830         * tests/test-assert-h-c++.cc: New file.
35831         * tests/test-assert-h-c++2.cc: New file.
35832         * modules/assert-h-c++-tests: New file.
35833         * modules/assert-h-tests: New file.
35835         ctype: Add C++ tests.
35836         * tests/test-ctype-c++.cc: New file.
35837         * tests/test-ctype-c++2.cc: New file.
35838         * modules/ctype-c++-tests: New file.
35839         * modules/ctype-tests (Depends-on): Add ctype-c++-tests.
35841         errno: Add C++ tests.
35842         * tests/test-errno-c++.cc: New file.
35843         * tests/test-errno-c++2.cc: New file.
35844         * modules/errno-c++-tests: New file.
35845         * modules/errno-tests (Depends-on): Add errno-c++-tests.
35847         float: Add C++ tests.
35848         * tests/test-float-c++.cc: New file.
35849         * tests/test-float-c++2.cc: New file.
35850         * modules/float-c++-tests: New file.
35851         * modules/float-tests (Depends-on): Add float-c++-tests.
35853         inttypes: Add more C++ tests.
35854         * tests/test-inttypes-c++2.cc: New file.
35855         * modules/inttypes-c++-tests (Files): Add it.
35856         (Makefile.am): Compile it.
35858         limits-h: Add C++ tests.
35859         * tests/test-limits-h-c++.cc: New file.
35860         * tests/test-limits-h-c++2.cc: New file.
35861         * modules/limits-h-c++-tests: New file.
35862         * modules/limits-h-tests (Depends-on): Add limits-h-c++-tests.
35864         stdarg: Add C++ tests.
35865         * tests/test-stdarg-c++.cc: New file.
35866         * tests/test-stdarg-c++2.cc: New file.
35867         * modules/stdarg-c++-tests: New file.
35868         * modules/stdarg-tests: New file.
35870         stdbool: Add C++ tests.
35871         * tests/test-stdbool-c++.cc: New file.
35872         * tests/test-stdbool-c++2.cc: New file.
35873         * modules/stdbool-c++-tests: New file.
35874         * modules/stdbool-tests (Depends-on): Add stdbool-c++-tests.
35876         stddef: Add C++ tests.
35877         * tests/test-stddef-c++.cc: New file.
35878         * tests/test-stddef-c++2.cc: New file.
35879         * modules/stddef-c++-tests: New file.
35880         * modules/stddef-tests (Depends-on): Add stddef-c++-tests.
35882         stdint: Add C++ tests.
35883         * tests/test-stdint-c++.cc: New file.
35884         * tests/test-stdint-c++2.cc: New file.
35885         * modules/stdint-c++-tests: New file.
35886         * modules/stdint-tests (Depends-on): Add stdint-c++-tests.
35888         wchar: Add more C++ tests.
35889         * tests/test-wchar-c++2.cc: New file.
35890         * modules/wchar-c++-tests (Files): Add it.
35891         (Makefile.am): Compile it.
35893         wctype-h: Add more C++ tests.
35894         * tests/test-wctype-h-c++2.cc: New file.
35895         * modules/wctype-h-c++-tests (Files): Add it.
35896         (Makefile.am): Compile it.
35898 2019-12-04  Bruno Haible  <bruno@clisp.org>
35900         Fix compilation errors in C++ mode with xlclang++ on AIX.
35901         * lib/math.in.h (expm1l, fmal, remainderl, roundl): Don't redeclare in
35902         C++ mode on AIX.
35903         (isfinite, signbit): In C++ mode on AIX with clang, use the approach
35904         without C preprocessor macro.
35905         * lib/pthread.in.h (pthread_exit): Use _GL_CXXALIAS_SYS_CAST instead of
35906         _GL_CXXALIAS_SYS.
35907         * lib/threads.in.h (thrd_exit): Likewise.
35909 2019-12-04  Bruno Haible  <bruno@clisp.org>
35911         Fix compilation error in C++ mode on Solaris 11 OpenIndiana.
35912         * lib/wchar.in.h (wcsnrtombs): Force declaration in C++ mode on Solaris.
35913         * doc/posix-functions/wcsnrtombs.texi: Mention the issue.
35915 2019-12-04  Bruno Haible  <bruno@clisp.org>
35917         Disable more _GL_CXXALIASWARN on all platforms other than glibc systems.
35918         * lib/wchar.in.h (wcsnrtombs, wcwidth, wcswidth): Disable
35919         _GL_CXXALIASWARN invocation on non-glibc systems.
35920         * lib/wctype.in.h (iswalnum, iswalpha, iswcntrl, iswdigit, iswgraph,
35921         iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit, wctype,
35922         iswctype, towlower, towupper): Likewise.
35924 2019-12-03  Bruno Haible  <bruno@clisp.org>
35926         Avoid hassles caused by [[noreturn]] in C++.
35927         Reported by Christian Biesinger <cbiesinger@google.com> in
35928         <https://lists.gnu.org/archive/html/bug-gnulib/2019-12/msg00010.html>.
35929         * m4/gnulib-common.m4 (gl_COMMON_BODY): Disable the use of [[noreturn]].
35930         * lib/_Noreturn.h: Likewise.
35932 2019-12-02  Bruno Haible  <bruno@clisp.org>
35934         Fix mistakes in --enable-threads=isoc fixes from 2019-12-01.
35935         * m4/pthread-mutex.m4 (gl_PTHREAD_MUTEX): Use LIBPMULTITHREAD, not
35936         LIBMULTITHREAD.
35937         * m4/pthread-rwlock.m4 (gl_PTHREAD_RWLOCK): Likewise.
35938         * m4/pthread-thread.m4 (gl_PTHREAD_THREAD): Likewise.
35939         * m4/timer_time.m4 (gl_TIMER_TIME): Likewise. Require gl_PTHREADLIB, not
35940         gl_THREADLIB.
35941         * modules/timer-time (Depends-on): Add pthread-h. Remove threadlib.
35943 2019-12-02  Bruno Haible  <bruno@clisp.org>
35945         Fix some more link errors with --enable-threads=isoc.
35946         * modules/pthread-mutex (Depends-on): Test $gl_threads_api differently.
35947         * modules/pthread-rwlock (Depends-on): Likewise.
35949 2019-12-02  Bruno Haible  <bruno@clisp.org>
35951         Fix link errors with --enable-threads=posix on AIX.
35952         * modules/string-c++-tests (Makefile.am): Link the test-string-c++
35953         program with $(LIBTHREAD).
35954         * modules/wchar-c++-tests (Makefile.am): Link the test-wchar-c++
35955         program with $(LIBTHREAD).
35957 2019-12-02  Bruno Haible  <bruno@clisp.org>
35959         Fix link errors with --enable-threads=posix on AIX.
35960         * modules/mbrtowc (Link): New section.
35961         * modules/acl (Link): Likewise.
35962         * modules/argmatch (Link): Likewise.
35963         * modules/backup-rename (Link): Likewise.
35964         * modules/backupfile (Link): Likewise.
35965         * modules/closein (Link): Likewise.
35966         * modules/closeout (Link): Likewise.
35967         * modules/copy-file (Link): Likewise.
35968         * modules/csharpcomp (Link): Likewise.
35969         * modules/csharpexec (Link): Likewise.
35970         * modules/dfa (Link): Likewise.
35971         * modules/exclude (Link): Likewise.
35972         * modules/fnmatch (Link): Likewise.
35973         * modules/fnmatch-gnu (Link): Likewise.
35974         * modules/fnmatch-posix (Link): Likewise.
35975         * modules/glob (Link): Likewise.
35976         * modules/human (Link): Likewise.
35977         * modules/javacomp (Link): Likewise.
35978         * modules/javaexec (Link): Likewise.
35979         * modules/javaversion (Link): Likewise.
35980         * modules/mbfile (Link): Likewise.
35981         * modules/mbiter (Link): Likewise.
35982         * modules/mbmemcasecmp (Link): Likewise.
35983         * modules/mbmemcasecoll (Link): Likewise.
35984         * modules/mbrlen (Link): Likewise.
35985         * modules/mbscasecmp (Link): Likewise.
35986         * modules/mbscasestr (Link): Likewise.
35987         * modules/mbschr (Link): Likewise.
35988         * modules/mbscspn (Link): Likewise.
35989         * modules/mbsinit (Link): Likewise.
35990         * modules/mbslen (Link): Likewise.
35991         * modules/mbsncasecmp (Link): Likewise.
35992         * modules/mbsnlen (Link): Likewise.
35993         * modules/mbsnrtowcs (Link): Likewise.
35994         * modules/mbspbrk (Link): Likewise.
35995         * modules/mbspcasecmp (Link): Likewise.
35996         * modules/mbsrchr (Link): Likewise.
35997         * modules/mbsrtowcs (Link): Likewise.
35998         * modules/mbssep (Link): Likewise.
35999         * modules/mbsspn (Link): Likewise.
36000         * modules/mbsstr (Link): Likewise.
36001         * modules/mbstok_r (Link): Likewise.
36002         * modules/mbswidth (Link): Likewise.
36003         * modules/mbuiter (Link): Likewise.
36004         * modules/mkdir-p (Link): Likewise.
36005         * modules/propername (Link): Likewise.
36006         * modules/quote (Link): Likewise.
36007         * modules/quotearg (Link): Likewise.
36008         * modules/quotearg-simple (Link): Likewise.
36009         * modules/regex-quote (Link): Likewise.
36010         * modules/rpmatch (Link): Likewise.
36011         * modules/sh-quote (Link): Likewise.
36012         * modules/system-quote (Link): Likewise.
36013         * modules/trim (Link): Likewise.
36014         * modules/unistdio/ulc-asnprintf (Link): Likewise.
36015         * modules/unistdio/ulc-fprintf (Link): Likewise.
36016         * modules/unistdio/ulc-vasnprintf (Link): Likewise.
36017         * modules/unistdio/ulc-vasprintf (Link): Likewise.
36018         * modules/unistdio/ulc-vfprintf (Link): Likewise.
36019         * modules/unistdio/ulc-vsnprintf (Link): Likewise.
36020         * modules/unistdio/ulc-vsprintf (Link): Likewise.
36021         * modules/xfreopen (Link): Likewise.
36022         * modules/xmemcoll (Link): Likewise.
36023         * modules/yesno (Link): Likewise.
36024         * modules/acl-tests (Makefile.am): Link the programs with $(LIBTHREAD).
36025         * modules/argmatch-tests (Makefile.am): Likewise.
36026         * modules/closein-tests (Makefile.am): Likewise.
36027         * modules/copy-file-tests (Makefile.am): Likewise.
36028         * modules/dfa-tests (Makefile.am): Likewise.
36029         * modules/fnmatch-tests (Makefile.am): Likewise.
36030         * modules/glob-tests (Makefile.am): Likewise.
36031         * modules/mbmemcasecmp-tests (Makefile.am): Likewise.
36032         * modules/mbmemcasecoll-tests (Makefile.am): Likewise.
36033         * modules/mbrtowc-tests (Makefile.am): Likewise.
36034         * modules/mbscasecmp-tests (Makefile.am): Likewise.
36035         * modules/mbscasestr-tests (Makefile.am): Likewise.
36036         * modules/mbschr-tests (Makefile.am): Likewise.
36037         * modules/mbscspn-tests (Makefile.am): Likewise.
36038         * modules/mbsinit-tests (Makefile.am): Likewise.
36039         * modules/mbsncasecmp-tests (Makefile.am): Likewise.
36040         * modules/mbsnrtowcs-tests (Makefile.am): Likewise.
36041         * modules/mbspbrk-tests (Makefile.am): Likewise.
36042         * modules/mbspcasecmp-tests (Makefile.am): Likewise.
36043         * modules/mbsrchr-tests (Makefile.am): Likewise.
36044         * modules/mbsrtowcs-tests (Makefile.am): Likewise.
36045         * modules/mbsspn-tests (Makefile.am): Likewise.
36046         * modules/mbsstr-tests (Makefile.am): Likewise.
36047         * modules/quotearg-tests (Makefile.am): Likewise.
36048         * modules/quotearg-simple-tests (Makefile.am): Likewise.
36049         * modules/readtokens-tests (Makefile.am): Likewise.
36050         * modules/regex-quote-tests (Makefile.am): Likewise.
36051         * modules/sh-quote-tests (Makefile.am): Likewise.
36052         * modules/system-quote-tests (Makefile.am): Likewise.
36053         * modules/unistdio/ulc-asnprintf-tests (Makefile.am): Likewise.
36054         * modules/unistdio/ulc-vasnprintf-tests (Makefile.am): Likewise.
36055         * modules/unistdio/ulc-vasprintf-tests (Makefile.am): Likewise.
36056         * modules/unistdio/ulc-vsnprintf-tests (Makefile.am): Likewise.
36057         * modules/unistdio/ulc-vsprintf-tests (Makefile.am): Likewise.
36058         * modules/yesno-tests (Makefile.am): Likewise.
36060 2019-12-02  Bruno Haible  <bruno@clisp.org>
36062         Simplify link sections.
36063         * modules/threadlib (Link): Stop mentioning LTLIBTHREAD.
36064         * modules/lock (Link): Likewise.
36065         * modules/cond (Link): Likewise.
36066         * modules/tls (Link): Likewise.
36067         * modules/yield (Link): Likewise.
36068         * modules/regex (Link): Likewise.
36069         * modules/localename (Link): Likewise.
36070         * modules/unicase/locale-language (Link): Likewise.
36071         * modules/thread (Link): Stop mentioning LTLIBMULTITHREAD.
36073 2019-12-02  Bruno Haible  <bruno@clisp.org>
36075         thread tests: Avoid link error with --enable-threads=isoc+posix on AIX.
36076         * tests/test-thread_self.c (main): Disable test on AIX.
36078 2019-12-01  Bruno Haible  <bruno@clisp.org>
36080         pthread-h: Fix link errors with --enable-threads=isoc on AIX.
36081         * m4/threadlib.m4 (gl_ANYTHREADLIB_EARLY): New macro, extracted from
36082         gl_THREADLIB_EARLY_BODY.
36083         (gl_THREADLIB_EARLY_BODY): Invoke it.
36084         (gl_PTHREADLIB_BODY): New macro, extracted from gl_THREADLIB_BODY.
36085         (gl_THREADLIB_BODY): Invoke it.
36086         (gl_PTHREADLIB): New macro.
36087         * m4/pthread_h.m4 (gl_PTHREAD_H): Require gl_PTHREADLIB. Require
36088         gl_THREADLIB and test $gl_threads_api only if module 'threadlib' is
36089         present. Define LIB_PTHREAD using LIBPMULTITHREAD, not LIBMULTITHREAD.
36090         * modules/pthread-h (Files): Add threadlib.m4.
36091         (Depends-on): Remove threadlib.
36092         (configure.ac-early): Invoke gl_ANYTHREADLIB_EARLY. Don't set _REENTRANT
36093         and _THREAD_SAFE here.
36094         (Link): Use LIBPTHREAD, not LIBTHREAD.
36095         * modules/pthread-thread (Link): Use LIBPMULTITHREAD, not
36096         LIBMULTITHREAD.
36097         * modules/pthread-once (Link): Likewise.
36098         * modules/pthread-mutex (Link): Likewise.
36099         * modules/pthread-rwlock (Link): Likewise.
36100         * modules/pthread-cond (Link): Likewise.
36101         * modules/pthread-tss (Link): Likewise.
36102         * modules/pthread-spin (Link): Likewise.
36103         * modules/pthread (Link): Likewise.
36104         * modules/pthread-h-c++-tests (test_pthread_c___LDADD): Likewise.
36105         * modules/pthread-thread-tests (test_pthread_thread_LDADD): Likewise.
36106         * modules/pthread-once-tests (test_pthread_once1_LDADD,
36107         test_pthread_once2_LDADD): Likewise.
36108         * modules/pthread-mutex-tests (test_pthread_mutex_LDADD): Likewise.
36109         * modules/pthread-rwlock-tests (test_pthread_rwlock_LDADD): Likewise.
36110         * modules/pthread-cond-tests (test_pthread_cond_LDADD): Likewise.
36111         * modules/pthread-tss-tests (test_pthread_tss_LDADD): Likewise.
36113 2019-12-01  Bruno Haible  <bruno@clisp.org>
36115         cond: State linking requirements.
36116         * modules/cond (Link): New section.
36118 2019-12-01  Bruno Haible  <bruno@clisp.org>
36120         threadlib: Remove unnecessary file (left over from 2019-07-06).
36121         * modules/threadlib (Files): Remove config.rpath.
36123 2019-11-29  Tim Rühsen  <tim.ruehsen@gmx.de>
36125         gnulib-tool.py: Fix libgnu_la_LDFLAGS section in generated Makefile.am.
36126         Reported by Dagobert Michelsen <dam@opencsw.org> in
36127         <https://lists.gnu.org/archive/html/bug-gnulib/2019-11/msg00086.html>.
36128         * pygnulib/GLModuleSystem.py (getLink): Don't join the parts. Return a
36129         list of strings instead of one string.
36130         * pygnulib/GLEmiter.py (lib_Makefile_am): Adapt accordingly.
36131         * pygnulib/GLImport.py (execute): Likewise.
36133 2019-11-27  Bruno Haible  <bruno@clisp.org>
36135         openpty, forkpty: Fix build error on Solaris 11.4.
36136         * m4/pty_h.m4 (gl_PTY_H): Test for termios.h. Look for the declarations
36137         also in <termios.h>.
36138         * m4/pty.m4 (gl_FUNC_FORKPTY, gl_FUNC_OPENPTY): Look for the declaration
36139         of the function also in <termios.h>.
36140         * doc/glibc-functions/openpty.texi: Mention the Solaris 11.4 problems.
36141         * doc/glibc-functions/forkpty.texi: Likewise.
36143 2019-11-27  Bruno Haible  <bruno@clisp.org>
36145         New options --enable-threads=isoc and --enable-threads=isoc+posix.
36146         * m4/threadlib.m4 (gl_THREADLIB_EARLY_BODY): Accept the options
36147         --enable-threads=isoc and --enable-threads=isoc+posix.
36148         (gl_THREADLIB_BODY): Test whether the ISO C threads API is available.
36149         When both the ISO C and the POSIX threads API are available, choose
36150         USE_ISOC_AND_POSIX_THREADS instead of USE_POSIX_THREADS if
36151         --enable-threads=isoc+posix was specified. When only the ISO C threads
36152         API is available and --enable-threads=iso was specified, choose
36153         USE_ISOC_THREADS.
36154         * lib/glthread/lock.h: Add new code for USE_ISOC_THREADS ||
36155         USE_ISOC_AND_POSIX_THREADS.
36156         * lib/glthread/lock.c: Likewise.
36157         * lib/glthread/cond.h: Likewise.
36158         * lib/glthread/cond.c: Likewise.
36159         * lib/glthread/tls.h: Likewise.
36160         * lib/glthread/tls.c: Likewise.
36161         * lib/glthread/yield.h: Likewise.
36162         * lib/glthread/thread.h: Add new code for USE_ISOC_THREADS. Treat
36163         USE_ISOC_AND_POSIX_THREADS like USE_POSIX_THREADS.
36164         * lib/glthread/thread.c: Likewise.
36165         * lib/glthread/threadlib.c: Likewise.
36166         * tests/test-lock.c: Save and restore the values of USE_ISOC_THREADS and
36167         USE_ISOC_AND_POSIX_THREADS.
36168         * tests/test-cond.c: Consider USE_ISOC_THREADS and
36169         USE_ISOC_AND_POSIX_THREADS.
36170         * tests/test-tls.c: Likewise.
36171         * tests/test-thread_create.c (main): Likewise.
36172         * tests/test-pthread-cond.c: Likewise.
36173         * tests/test-pthread-mutex.c: Likewise.
36174         * tests/test-pthread-once2.c: Likewise.
36175         * tests/test-pthread-rwlock.c: Likewise.
36176         * tests/test-pthread-tss.c: Likewise.
36177         * tests/test-pthread_sigmask2.c: Treat USE_ISOC_AND_POSIX_THREADS like
36178         USE_POSIX_THREADS.
36180 2019-11-24  Bruno Haible  <bruno@clisp.org>
36182         mbrtowc: Modernize autoconf test.
36183         * m4/mbrtowc.m4 (gl_MBRTOWC_INCOMPLETE_STATE): Require
36184         gt_LOCALE_FR_UTF8. If a traditional Japanese locale is not available,
36185         try a UTF-8 locale.
36186         * doc/posix-functions/mbrtowc.texi: Update info about AIX.
36188 2019-11-24  Bruno Haible  <bruno@clisp.org>
36190         Fix errors in C++ mode on mingw.
36191         * lib/arpa_inet.in.h (inet_ntop, inet_pton): Use _GL_CXXALIAS_SYS_CAST
36192         instead of _GL_CXXALIAS_SYS.
36193         * lib/signal.in.h (pthread_sigmask): Likewise.
36194         * lib/spawn.in.h (posix_spawn_file_actions_addopen,
36195         posix_spawn_file_actions_addclose, posix_spawn_file_actions_adddup2):
36196         Likewise.
36197         * lib/wchar.in.h (btowc): Likewise.
36199 2019-11-24  Bruno Haible  <bruno@clisp.org>
36201         sys_time: Fix errors in C++ mode on mingw.
36202         * lib/sys_time.in.h (timeval): Restore the redirection
36203         '#define timeval rpl_timeval', for when the symbol timeval is being used
36204         outside the 'gnulib' namespace.
36205         * lib/sys_select.in.h (select): In C++, write 'timeval', not
36206         'struct timeval'.
36208 2019-11-24  Bruno Haible  <bruno@clisp.org>
36210         iswctype: Fix errors in C++ mode on mingw.
36211         * lib/wctype.in.h (rpl_iswctype): Override if GNULIB_OVERRIDES_WINT_T
36212         is 1.
36213         * lib/iswctype.c (iswctype): Add another implementation, for the
36214         GNULIB_defined_wint_t case.
36215         * modules/iswctype (configure.ac): Compile iswctype.c also if
36216         GNULIB_OVERRIDES_WINT_T is 1.
36218 2019-11-24  Bruno Haible  <bruno@clisp.org>
36220         windows-timedmutex: Fix errors in C++ mode on mingw.
36221         * lib/windows-timedmutex.h: Add closing brace.
36223 2019-11-24  Bruno Haible  <bruno@clisp.org>
36225         Fix errors in C++ mode on Cygwin.
36226         * lib/sys_wait.in.h (waitpid): Use _GL_CXXALIAS_SYS_CAST instead of
36227         _GL_CXXALIAS_SYS.
36229 2019-11-24  Bruno Haible  <bruno@clisp.org>
36231         time_r: Fix for mingw (regression from 2019-11-16).
36232         * m4/time_r.m4 (gl_TIME_R): Revert to using AC_CHECK_FUNCS_ONCE. Use the
36233         AC_LINK_IFELSE test only if the function does not appear to exist.
36235 2019-11-24  Bruno Haible  <bruno@clisp.org>
36237         wcstok: Add tests.
36238         * tests/test-wcstok.c: New file.
36239         * modules/wcstok-tests: New file.
36241 2019-11-24  Bruno Haible  <bruno@clisp.org>
36243         wcstok: Work around wrong signature on native Windows.
36244         * lib/wchar.in.h (wcstok): Override when REPLACE_WCSTOK is 1.
36245         * m4/wcstok.m4 (gl_FUNC_WCSTOK): Check for signature of wcstok. Set
36246         REPLACE_WCSTOK.
36247         * m4/wchar_h.m4 (gl_WCHAR_H_DEFAULTS): Initialize REPLACE_WCSTOK.
36248         * modules/wchar (Makefile.am): Substitute REPLACE_WCSTOK.
36249         * modules/wcstok (Depends-on, configure.ac): Consider REPLACE_WCSTOK.
36250         * doc/posix-functions/wcstok.texi: Mention the problem.
36252 2019-11-22  Paul Eggert  <eggert@cs.ucla.edu>
36254         intprops: INT_MULTIPLY_WRAPV speedup for GCC 8.4+
36255         * lib/intprops.h (INT_MULTIPLY_WRAPV): If GCC 8.x where 4 <= x,
36256         remove workaround for GCC bug 91450 as the bug should be fixed
36257         there too.
36259 2019-11-21  Bruno Haible  <bruno@clisp.org>
36261         Disable many _GL_CXXALIASWARN on all platforms other than glibc systems.
36262         Reported by Christian Biesinger <cbiesinger@google.com> in
36263         <https://lists.gnu.org/archive/html/bug-gnulib/2019-11/msg00066.html>.
36264         * lib/fnmatch.in.h (fnmatch): Disable _GL_CXXALIASWARN invocation on
36265         non-glibc systems.
36266         * lib/locale.in.h (localeconv, setlocale): Likewise.
36267         * lib/math.in.h (cbrt, ceil, copysign, exp2, expm1, floor, fma, fmod,
36268         frexp, hypot, ilogb, log, log10, log1p, log2, logb, modf, remainder,
36269         rint, round, trunc): Likewise.
36270         * lib/monetary.in.h (strfmon_l): Likewise.
36271         * lib/pthread.in.h (pthread_mutexattr_getrobust,
36272         pthread_mutexattr_setrobust, pthread_mutex_lock, pthread_spin_init,
36273         pthread_spin_lock, pthread_spin_trylock, pthread_spin_unlock,
36274         pthread_spin_destroy): Likewise.
36275         * lib/signal.in.h (raise, signal): Likewise.
36276         * lib/stdio.in.h (fclose, fflush, fgetc, fgets, fopen, fprintf, fputc,
36277         fputs, fread, freopen, fscanf, fseek, ftell, fwrite, getc, getchar,
36278         perror, printf, putc, putchar, puts, remove, rename, scanf, sprintf,
36279         tmpfile, vfprintf, vprintf, vsprintf): Likewise.
36280         * lib/stdlib.in.h (calloc, malloc, mbtowc, realloc, strtod, wctomb):
36281         Likewise.
36282         * lib/string.in.h (memchr, strncat, strpbrk, strstr, strerror):
36283         Likewise.
36284         * lib/time.in.h (mktime, localtime, ctime, strftime): Likewise.
36285         * lib/wchar.in.h (btowc, wctob, mbsinit, mbrtowc, mbrlen, mbsrtowcs,
36286         wcrtomb, wcsrtombs, wmemchr, wmemcmp, wmemcpy, wmemmove, wmemset,
36287         wcslen, wcscpy, wcsncpy, wcscat, wcsncat, wcscmp, wcsncmp, wcscoll,
36288         wcsxfrm, wcschr, wcsrchr, wcscspn, wcsspn, wcspbrk, wcsstr, wcstok,
36289         wcsftime): Likewise.
36290         * lib/wctype.in.h (iswblank, wctrans, towctrans): Likewise.
36292 2019-11-21  Bruno Haible  <bruno@clisp.org>
36294         Fix various errors in _GL_CXXALIAS_SYS invocations.
36295         * lib/locale.in.h (freelocale): Use _GL_CXXALIAS_SYS_CAST instead of
36296         _GL_CXXALIAS_SYS.
36297         * lib/pthread.in.h (pthread_mutexattr_gettype,
36298         pthread_mutexattr_getrobust): Likewise.
36299         * lib/stdlib.in.h (srandom, initstate, setstate): Likewise.
36300         * lib/sys_socket.in.h (recv, send): Likewise.
36301         * lib/unistd.in.h (getdtablesize): Likewise.
36302         * lib/sys_select.in.h (select): In C++, write 'timeval' instead of
36303         'struct timeval'.
36305 2019-11-21  Bruno Haible  <bruno@clisp.org>
36307         math tests: Update after 2019-08-28 change.
36308         * tests/test-math-c++.cc (isfinite, isinf, isnan, signbit): Expect a
36309         return type of 'bool', not 'int'.
36311 2019-11-21  Bruno Haible  <bruno@clisp.org>
36313         pthread-spin: Fix errors in C++ mode.
36314         * m4/pthread-spin.m4 (gl_PTHREAD_SPIN): Mark the pthread_spin_*
36315         functions as nonexistent when <pthread.h> exists but does not define
36316         the pthread_spinlock_t type.
36318 2019-11-21  Bruno Haible  <bruno@clisp.org>
36320         pthread-mutex: Fix errors in C++ mode.
36321         * m4/pthread-mutex.m4 (gl_PTHREAD_MUTEX): Test whether
36322         pthread_mutexattr_getrobust exists. If not, define
36323         PTHREAD_MUTEXATTR_ROBUST_UNIMPLEMENTED.
36324         * lib/pthread-mutex.c (pthread_mutexattr_getrobust,
36325         pthread_mutexattr_setrobust): Define also if <pthread.h> exists but
36326         PTHREAD_MUTEXATTR_ROBUST_UNIMPLEMENTED.
36327         * modules/pthread-mutex (configure.ac): Compile pthread-mutex.c also
36328         when <pthread.h> exists but pthread_mutexattr_getrobust needs a gnulib
36329         definition.
36331 2019-11-19  Bruno Haible  <bruno@clisp.org>
36333         threads-h tests: Fix typo.
36334         * tests/test-threads-c++.cc: Fix references to undefined type 'mtx'.
36336 2019-11-19  Bruno Haible  <bruno@clisp.org>
36338         pthread-thread: Fix prototype of pthread_attr_getdetachstate.
36339         * lib/pthread.in.h (pthread_attr_getdetachstate): Change first parameter
36340         to 'const pthread_attr_t *'.
36341         * lib/pthread-thread.c (pthread_attr_getdetachstate): Likewise.
36342         * tests/test-pthread-c++.cc (pthread_attr_getdetachstate): Likewise.
36344 2019-11-19  Paul Eggert  <eggert@cs.ucla.edu>
36346         intprops: speed up INT_MULTIPLY_WRAPV in GCC 9.3
36347         * lib/intprops.h (INT_MULTIPLY_WRAPV): If GCC 9.3 or later, do not
36348         work around GCC bug 91450 as the bug should be fixed there.
36350 2019-11-18  Paul Eggert  <eggert@cs.ucla.edu>
36352         glob: get closer to glibc glob.c
36353         Omit differences from glibc when the differences don’t matter.
36354         * lib/glob.c [_LIBC]: Include shlib-compat.h.
36355         (__glob) [!_LIBC]: New macro.  All uses of glob changed to __glob.
36356         (glob_lstat): New function.
36357         (glob_in_dir): Use it.
36358         (GLOB_ATTRIBUTE): Define to empty if not already defined.
36359         Use changed.
36361 2019-11-18  Bruno Haible  <bruno@clisp.org>
36363         stdint: Define [u]intptr_t correctly on 64-bit native Windows.
36364         * lib/stdint.in.h (gl_intptr_t, gl_uintptr_t, INTPTR_MIN, INTPTR_MAX,
36365         UINTPTR_MAX): Consider _WIN64.
36366         * tests/test-stdint.c: Verify that [u]intptr_t is large enough to hold
36367         a pointer.
36369 2019-11-18  Bruno Haible  <bruno@clisp.org>
36371         stdint: Fix value of WINT_MAX when we override wint_t.
36372         * lib/stdint.in.h (WINT_MIN, WINT_MAX): Don't override a second time
36373         when GNULIB_OVERRIDES_WINT_T is 1.
36375 2019-11-18  Bruno Haible  <bruno@clisp.org>
36377         vcs-to-changelog: New module.
36378         * modules/vcs-to-changelog: New file.
36379         * MODULES.html.sh (func_all_modules): Add it.
36381 2019-11-01  Siddhesh Poyarekar  <siddhesh@gotplt.org>
36383         vcs-to-changelog: New script to generate ChangeLog-like output.
36384         Discussion:
36385         <https://lists.gnu.org/archive/html/bug-gnulib/2019-10/msg00062.html>
36386         * build-aux/vcs_to_changelog.py: New file.
36387         * build-aux/vcstocl/frontend_c.py: New file.
36388         * build-aux/vcstocl/misc_util.py: New file.
36389         * build-aux/vcstocl/vcs_git.py: New file.
36391 2019-11-18  Bruno Haible  <bruno@clisp.org>
36393         stdint: Avoid triggering a "conflicting types" error on mingw 5.22.
36394         Reported by Keith Marshall <keith@users.osdn.me> in
36395         <https://lists.gnu.org/archive/html/bug-gnulib/2019-10/msg00044.html>
36396         and <https://osdn.net/projects/mingw/ticket/39677>.
36397         * lib/stdint.in.h (intptr_t, uintptr_t): Don't define if the types have
36398         already been defined by mingw's <crtdefs.h>.
36400 2019-11-18  Bruno Haible  <bruno@clisp.org>
36402         gnulib-tool: Fix build error on macOS with --conditional-dependencies.
36403         * gnulib-tool (func_modules_add_dummy): Ignore modules that are
36404         conditionally enabled.
36406 2019-11-18  Bruno Haible  <bruno@clisp.org>
36408         gc: Mirror libgcrypt.m4 from libgcrypt.
36409         * config/srclistvars.sh (LIBGCRYPT): New variable.
36410         * config/srclist.txt: Use it to fetch m4/libgcrypt.m4.
36412 2019-11-17  Bruno Haible  <bruno@clisp.org>
36414         locale, localename: Improve z/OS support.
36415         Reported by Daniel Richard G. in
36416         <https://lists.gnu.org/archive/html/bug-gnulib/2019-11/msg00001.html>.
36417         * m4/locale_h.m4 (gl_LOCALE_T): New macro, partially extracted from
36418         gl_LOCALE_H.
36419         (gl_LOCALE_H): Require it.
36420         * m4/localename.m4 (gl_LOCALENAME): Likewise. If locale_t is not
36421         defined, don't even check for newlocale, duplocale, freelocale.
36422         * m4/intl-thread-locale.m4 (gt_FUNC_USELOCALE): Make the test fail when
36423         locale_t is not defined.
36425 2019-11-17  Bruno Haible  <bruno@clisp.org>
36427         havelib: Make libdirstems processing more flexible.
36428         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): Set 3 libdirstem
36429         variables: Consider 'lib' always, also on Solaris. Look for lib32 in
36430         addition to lib64. Don't invoke /usr/bin/gcc (reverting the second
36431         patch from 2017-02-19).
36432         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Consider up to 3 additional
36433         libdirs, even when the first one exists as a directory.
36435 2019-11-17  Bruno Haible  <bruno@clisp.org>
36437         havelib: Match the bitness when searching for libraries.
36438         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): Define a function
36439         acl_is_expected_elfclass.
36440         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): When testing whether a library
36441         file exists, in ELF, also test whether it has the ELF class that
36442         corresponds to the host's bitness.
36444 2019-11-17  Bruno Haible  <bruno@clisp.org>
36446         host-cpu-c-abi: Add support for unknown CPUs.
36447         * m4/host-cpu-c-abi.m4 (gl_HOST_CPU_C_ABI_32BIT): Set
36448         gl_cv_host_cpu_c_abi_32bit to 'unknown' if we don't know whether it's
36449         32-bit or 64-bit.
36451 2019-11-17  Bruno Haible  <bruno@clisp.org>
36453         havelib: Remove redundant code.
36454         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): Remove Solaris specific
36455         test for 64-bit host. Use gl_HOST_CPU_C_ABI_32BIT result instead.
36457 2019-11-17  Bruno Haible  <bruno@clisp.org>
36459         havelib: Fix a bug in dependency processing.
36460         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): During dependency processing
36461         of .la files, don't overwrite the value of additional_libdir for the
36462         next rounds.
36464 2019-11-16  Bruno Haible  <bruno@clisp.org>
36466         wctype-h: When overriding wint_t, override also the related functions.
36467         Reported by Christian Biesinger <cbiesinger@google.com> in
36468         <https://lists.gnu.org/archive/html/bug-gnulib/2019-11/msg00027.html>.
36469         * m4/wctype_h.m4 (gl_WCTYPE_H): When GNULIB_OVERRIDES_WINT_T is 1, set
36470         REPLACE_ISWCNTRL to 1.
36471         * lib/wctype.in.h (rpl_iswalnum, rpl_iswalpha, rpl_iswblank,
36472         rpl_iswcntrl, rpl_iswdigit, rpl_iswgraph, rpl_iswlower, rpl_iswprint,
36473         rpl_iswpunct, rpl_iswspace, rpl_iswupper, rpl_iswxdigit, rpl_towlower,
36474         rpl_towupper): New definitions when GNULIB_OVERRIDES_WINT_T is 1.
36475         * doc/posix-headers/wchar.texi: Mention that wint_t is also overridden
36476         on mingw.
36477         * doc/posix-headers/wctype.texi: Likewise.
36479 2019-11-16  Bruno Haible  <bruno@clisp.org>
36481         time_r: Fix for mingw.
36482         Reported by Christian Biesinger <cbiesinger@google.com> in
36483         <https://lists.gnu.org/archive/html/bug-gnulib/2019-11/msg00014.html>.
36484         * lib/time.in.h: On mingw, include <unistd.h>.
36485         * m4/time_r.m4 (gl_TIME_R): On mingw, include <unistd.h> before
36486         <time.h>. Test for localtime_r in a way that works when it is defined
36487         as an inline function.
36489 2019-11-13  Bruno Haible  <bruno@clisp.org>
36491         havelib: Revert last change.
36492         * build-aux/config.rpath: Revert last change. We can add msys2 support
36493         when it has been added to libtool.m4 upstream.
36495 2019-11-09  Paul Eggert  <eggert@cs.ucla.edu>
36497         config: add msys support
36498         Requested by Arnold Robbins in:
36499         https://lists.gnu.org/r/bug-gnulib/2019-11/msg00008.html
36500         He also requested a change to config.guess, which I’ll forward
36501         upstream.
36502         * build-aux/ar-lib (func_file_conv):
36503         * build-aux/compile (func_file_conv):
36504         * build-aux/config.rpath (wl, with_gnu_ld)
36505         (hardcode_libdir_flag_spec, libext, shrext, library_names_spec):
36506         Treat msys like cygwin.
36508 2019-11-06  Paul Eggert  <eggert@cs.ucla.edu>
36510         regex: now back in sync with glibc
36511         * config/srclist.txt: regcomp.c, regex_internal.c, regex_internal.h,
36512         regexec.c got merged into glibc and are now copies again.
36514 2019-10-27  Bruno Haible  <bruno@clisp.org>
36516         host-cpu-c-abi: Recognize i386 and a couple of other CPUs as 32-bit.
36517         * m4/host-cpu-c-abi.m4 (gl_HOST_CPU_C_ABI): Include i386 in the case
36518         statement.
36519         (gl_HOST_CPU_C_ABI_32BIT): Likewise. Also recognize a couple of other
36520         32-bit CPUs.
36522 2019-10-24  Paul Eggert  <eggert@cs.ucla.edu>
36524         timespec-add, timespec-sub: simplify
36525         * lib/timespec-add.c (timespec_add):
36526         * lib/timespec-sub.c (timespec_sub):
36527         Simplify, now that INT_ADD_WRAPV and INT_SUBTRACT_WRAPV
36528         work on unsigned integers.
36530 2019-10-23  Paul Eggert  <eggert@cs.ucla.edu>
36532         nstrftime: speed up integer overflow checking
36533         * lib/nstrftime.c: Include intprops.h.
36534         (INT_STRLEN_BOUND): Remove, as we can use intprops.h’s defn.
36535         (__strftime_internal): Use INT_MULTIPLY_WRAPV and INT_ADD_WRAPV
36536         instead of doing it by hand.
36537         * modules/nstrftime (Depends-on): Add intprops.
36539         Port better to GCC under macOS
36540         Work around macOS header that has ‘#define __has_builtin(x) 0’
36541         when compiled by GCC.  Apple really, really doesn’t want you to
36542         use GCC, apparently.  Rroblem reported by Akim Demaille in:
36543         https://lists.gnu.org/r/bug-bison/2019-10/msg00071.html
36544         The fix is to not trust __has_builtin when being compiled by
36545         recent-enough GCC.
36546         * lib/intprops.h (__has_builtin)
36547         (_GL_HAS___builtin_add_overflow, _GL_TEMPDEF___has_builtin):
36548         * lib/verify.h (__has_builtin, _GL_HAS___builtin_unreachable)
36549         (_GL_HAS___builtin_trap, _GL_TEMPDEF___has_builtin):
36550         Remove.  All uses removed.
36551         * lib/intprops.h (_GL_HAS_BUILTIN_ADD_OVERFLOW): Use __has_builtin
36552         directly, if defined and if not newer GCC.
36553         * lib/verify.h (_GL_HAS_BUILTIN_TRAP, _GL_HAS_BUILTIN_UNREACHABLE):
36554         New macro, that use __has_builtin directly, if defined and if
36555         not newer GCC.
36556         (assume): Use them.
36558 2019-10-22  Akim Demaille  <akim@lrde.epita.fr>
36560         maintainer-makefile: update rule for argmatch.
36561         * top/maint.mk (sc_prohibit_argmatch_without_use): Add ARGMATCH_DEFINE_GROUP.
36563 2019-10-21  Akim Demaille  <akim@lrde.epita.fr>
36565         bitset: let freeing functions accept NULL.
36566         * lib/bitset.c (bitset_free, bitset_obstack_free): Do nothing if
36567         given NULL.
36568         * lib/bitset.h: Document that.
36569         * doc/bitset.texi: Fix the example, and demonstrate bitset_free.
36571 2019-10-15  Paul Eggert  <eggert@cs.ucla.edu>
36573         inttypes: use more-robust test for int range
36574         This fixes Bison 3.4.2 when built with Oracle Solaris Studio 12.3.
36575         Problem reported by Dagobert Michelsen in:
36576         https://lists.gnu.org/r/bug-gnulib/2019-10/msg00042.html
36577         * lib/inttypes.in.h: Rely only on limits.h when checking
36578         int range.
36580 2019-10-15  Bruno Haible  <bruno@clisp.org>
36582         libtextstyle-optional: Sync with current not-yet-released libtextstyle.
36583         * libtextstyle-optional (styled_ostream_get_hyperlink_ref,
36584         styled_ostream_get_hyperlink_id, styled_ostream_set_hyperlink,
36585         term_ostream_get_hyperlink_ref, term_ostream_get_hyperlink_id,
36586         term_ostream_set_hyperlink): New functions.
36587         (term_styled_ostream_get_hyperlink_ref,
36588         term_styled_ostream_get_hyperlink_id,
36589         term_styled_ostream_set_hyperlink): New function aliases.
36591 2019-10-14  Paul Eggert  <eggert@cs.ucla.edu>
36593         update-copyright: use en dashes in .texi ranges
36594         * build-aux/update-copyright: Match year ranges like "1998--2019",
36595         which are used in the Autoconf manual.  Also, update ranges in
36596         .tex, .texi, and .texinfo files to use en dashes instead of
36597         hyphens.
36599 2019-10-13  Paul Eggert  <eggert@cs.ucla.edu>
36601         * config/srclist.txt: Remove posix/regex_internal.c for now.
36603 2019-10-13  Bruno Haible  <bruno@clisp.org>
36605         git-version-gen: Allow 'snapshot' as .tarball-version contents.
36606         * build-aux/git-version-gen: Don't map non-numeric .tarball-version
36607         contents to the empty string.
36609 2019-10-12  Bruno Haible  <bruno@clisp.org>
36611         intprops tests: Fix compilation errors on HP-UX/ia64 with cc.
36612         * tests/test-intprops.c (main): Disable two more tests when using
36613         HP-UX cc.
36615 2019-10-11  Paul Eggert  <eggert@cs.ucla.edu>
36617         Simplify and regularize regex use of ‘assert’
36618         Also, tell GCC about the asserts even when compiling without
36619         debugging, to give it further optimization opportunities.
36620         * lib/regex_internal.h (DEBUG_ASSERT): New macro.
36621         * lib/regcomp.c (link_nfa_nodes, calc_eclosure)
36622         (parse_expression, parse_bracket_exp):
36623         * lib/regex_internal.c (build_wcs_buffer)
36624         (build_wcs_upper_buffer, re_string_reconstruct)
36625         (re_string_context_at):
36626         * lib/regexec.c (re_search_stub, re_copy_regs)
36627         (re_search_internal, prune_impossible_nodes, check_matching)
36628         (check_halt_state_context, set_regs, sift_states_backward)
36629         (build_sifted_states, transit_state_mb, transit_state_bkref)
36630         (check_arrival_add_next_nodes, check_arrival_expand_ecl)
36631         (match_ctx_add_subtop):
36632         Use it instead of plain ‘assert’.
36634 2019-10-09  Paul Eggert  <eggert@cs.ucla.edu>
36636         regex: omit debug assignment when not debugging
36637         * lib/regexec.c (re_search_internal) [!DEBUG]:
36638         Remove unnecessary assignment.
36640         regex: tell compiler there’s at most 256 arcs out
36641         Partly this is to help the reader (and maybe help GCC);
36642         partly this is to pacify Coverity.
36643         * lib/regex_internal.h: Include verify.h.
36644         * lib/regexec.c (group_nodes_into_DFAstates):
36645         Tell the compiler that ndests cannot exceed SBC_MAX.
36646         * modules/regex (Depends-on): Add ‘verify’.
36648         regex: simplify by assuming C99
36649         * config/srclist.txt: Comment out regex_internal.h and regexec.c
36650         temporarily.
36651         * lib/regex_internal.h (lock_define, re_match_context_t):
36652         Simplify by assuming C99 macros and const.
36653         * lib/regexec.c (re_search_internal): Simplify by assuming C99
36654         initializers.  Remove unnecessary assignment, as mctx is now
36655         safely initialized earlier.
36657         regex: avoid copying of uninitialized storage
36658         * config/srclist.txt: Comment out regcomp.c temporarily.
36659         * lib/regcomp.c (build_charclass_op, create_tree) [! (GCC_LINT||lint)]:
36660         Initialize even when not checking for lint, as the behavior is
36661         arguably undefined otherwise and Coverity warns about it.
36663 2019-10-06  Bruno Haible  <bruno@clisp.org>
36665         access tests: Fix test failure when run as root.
36666         * tests/test-access.c: Include root-uid.h.
36667         (geteuid): Define fallback.
36668         (main): Don't expect that writing to a read-only file would fail when
36669         running as root. Also, remove the created files at the end.
36670         * modules/access-tests (Depends-on): Add root-uid.
36671         (configure.ac): Test whether geteuid exists.
36673 2019-10-06  Benno Schulenberg  <bensberg@telfort.nl>  (tiny change)
36675         users.txt: add GNU nano
36676         Nano has been making use of gnulib since March 2017, version 2.8.0.
36678 2019-10-05  Paul Eggert  <eggert@cs.ucla.edu>
36680         bootstrap: simplify debugging of wget failures
36681         Problem reported by Tim Rühsen in:
36682         https://lists.gnu.org/r/bug-gnulib/2019-10/msg00000.html
36683         * build-aux/bootstrap (po_download_command_format):
36684         Invoke wget with -nv instead of -q, to make debugging easier.
36686 2019-09-29  Bruno Haible  <bruno@clisp.org>
36688         avltree-list: Fix compilation warning (introduced on 2014-09-16).
36689         * lib/gl_avltree_list.c (gl_avltree_list_check_invariants): Remove
36690         'const' attribute.
36692 2019-09-29  Bruno Haible  <bruno@clisp.org>
36694         fbufmode: Fix compilation error on glibc >= 2.28 systems.
36695         * lib/stdio-impl.h (_IO_UNBUFFERED): Define fallback on glibc >= 2.28.
36697 2019-09-28  Bruno Haible  <bruno@clisp.org>
36699         Update comments that refer to POSIX.
36700         * lib/creat.c, lib/fopen.c, lib/open.c, lib/openat.c: Cite the relevant
36701         sentence about trailing slashes.
36702         * lib/fflush.c: Clarify the reasoning.
36703         * tests/test-fflush2.c: Cite the relevant sentence.
36705 2019-09-28  Bruno Haible  <bruno@clisp.org>
36707         access: Document limitations on Windows.
36708         Suggested by Zaretskii <eliz@gnu.org>.
36709         * doc/posix-functions/access.texi: Mention two limitations on Windows.
36711 2019-09-28  Bruno Haible  <bruno@clisp.org>
36713         findprog-in: Fix comment.
36714         Reported by Eli Zaretskii <eliz@gnu.org>.
36715         * lib/findprog.h (find_in_given_path): Extend description of EACCES
36716         condition.
36717         * lib/stat.c (rpl_stat): Fix typo in comment.
36718         * lib/utime.c (_gl_utimens_windows): Likewise.
36720 2019-09-23  Paul Eggert  <eggert@cs.ucla.edu>
36722         Update URLs and associated text
36723         (Thanks to Bruno Haible for proofreading this patch.)
36724         Prefer https: to http: in URLs where either will do, for the usual
36725         security reasons.  I also updated broken and/or moved URLs
36726         discovered during the process. In a few places I had to resort to
36727         archive.org, since I didn't find the originals elsewhere.
36729 2019-09-15  Paul Smith  <psmith@gnu.org>
36730             Bruno Haible  <bruno@clisp.org>
36732         findprog-in: Set errno when the search fails.
36733         * lib/findprog-in.c: Include <errno.h>.
36734         (find_in_given_path): Set errno before returning NULL.
36735         * lib/findprog.h (find_in_given_path): Update comment accordingly.
36736         Define the term "slash".
36738 2019-09-15  Bruno Haible  <bruno@clisp.org>
36740         findprog, findprog-lgpl, findprog-in: Fix crash on MSVC.
36741         * modules/findprog (Depends-on): Add access.
36742         * modules/findprog-lgpl (Depends-on): Likewise.
36743         * modules/findprog-in (Depends-on): Likewise.
36745 2019-09-15  Bruno Haible  <bruno@clisp.org>
36747         access: Add tests.
36748         * tests/test-access.c: New file.
36749         * modules/access-tests: New file.
36751         access: New module.
36752         * lib/unistd.in.h (access): New declaration.
36753         * lib/access.c: New file.
36754         * m4/access.m4: New file.
36755         * m4/unistd_h.m4 (gl_UNISTD_H): Test whether access is declared.
36756         (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_ACCESS, REPLACE_ACCESS.
36757         * modules/unistd (Makefile.am): Substitute GNULIB_ACCESS,
36758         REPLACE_ACCESS.
36759         * modules/access: New file.
36760         * tests/test-unistd-c++.cc (access): Check signature.
36761         * doc/posix-functions/access.texi: Mention the new module.
36763 2019-09-15  Bruno Haible  <bruno@clisp.org>
36765         fcntl-h: Fix compilation error of creat.c on MSVC.
36766         * lib/fcntl.in.h: Include <io.h> also when __need_system_fcntl_h is
36767         defined.
36769 2019-09-15  Bruno Haible  <bruno@clisp.org>
36771         creat: Add tests.
36772         * tests/test-creat.c: New file, based on tests/test-open.h.
36773         * modules/creat-tests: New file.
36775         creat: New module.
36776         * lib/fcntl.in.h (creat): New declaration.
36777         * lib/creat.c: New file, based on lib/open.c.
36778         * m4/creat.m4: New file.
36779         * m4/open-slash.m4: New file, extracted from m4/open.m4.
36780         * m4/open.m4 (gl_FUNC_OPEN): Move trailing-slash test to open-slash.m4.
36781         Invoke gl_OPEN_TRAILING_SLASH_BUG.
36782         * modules/open (Files): Add m4/open-slash.m4.
36783         * m4/fcntl_h.m4 (gl_FCNTL_H_DEFAULTS): Initialize GNULIB_CREAT,
36784         REPLACE_CREAT.
36785         * modules/fcntl-h (Makefile.am): Substitute GNULIB_CREAT, REPLACE_CREAT.
36786         * modules/creat: New file.
36787         * tests/test-fcntl-h-c++.cc (creat): Check signature.
36788         * doc/posix-functions/creat.texi: Mention the new module.
36790 2019-09-15  Bruno Haible  <bruno@clisp.org>
36792         open tests: Enhance test.
36793         * tests/test-open.h (test_open): Test the creation of an executable
36794         regular file. Also improve initial cleanup.
36796 2019-09-15  Bruno Haible  <bruno@clisp.org>
36798         intprops tests: Avoid build failure with HP-UX cc.
36799         * tests/test-intprops.c: Disable a check that makes HP cc choke with
36800         "error 4018: Macro param too large after substitution - use -H option.".
36802 2019-09-14  Bruno Haible  <bruno@clisp.org>
36804         Make autoconf tests work with -Werror=implicit-function-declaration.
36805         * m4/locale-tr.m4 (gt_LOCALE_TR_UTF8): Include <wctype.h>, for
36806         towupper() declaration.
36807         * m4/ptsname.m4 (gl_FUNC_PTSNAME): Include <stdlib.h>, for ptsname()
36808         declaration.
36810 2019-09-14  Bruno Haible  <bruno@clisp.org>
36812         findprog-in: Better mimic the system on native Windows.
36813         Reported by Paul Smith <psmith@gnu.org>.
36814         * lib/findprog-in.c (find_in_given_path): On native Windows, don't try
36815         non-empty suffixes when the file name already contains a '.'.
36817 2019-09-10  Bruno Haible  <bruno@clisp.org>
36819         wctob: Fix autoconf test.
36820         Based on patch by Florian Weimer <fweimer@redhat.com>.
36821         * m4/wctob.m4 (gl_FUNC_WCTOB): Include <stdlib.h> before using mbtowc.
36823 2019-09-09  Akim Demaille  <akim@lrde.epita.fr>
36825         xhash: provide hash_xinitialize.
36826         Suggested by Egor Pugin <egor.pugin@gmail.com>
36827         https://lists.gnu.org/archive/html/bison-patches/2019-09/msg00026.html
36828         * modules/xhash, lib/xhash.c: New.
36829         * lib/hash.h (hash_xinitialize): New.
36831 2019-09-09  Bruno Haible  <bruno@clisp.org>
36833         findprog-in: Make exec optimization optional.
36834         * lib/findprog.h: Add double-inclusion guard. Include <stdbool.h>.
36835         (find_in_given_path): Add optimize_for_exec parameter.
36836         * lib/findprog-in.c (find_in_given_path): Likewise.
36838 2019-09-08  Bruno Haible  <bruno@clisp.org>
36840         Add option to assume the best, not the worst, when cross-compiling.
36841         Suggested by Jonas Termansen <sortie@maxsi.org>.
36842         * m4/gnulib-common.m4 (gl_COMMON_BODY): Add --enable-cross-guesses=...
36843         option. Set gl_cross_guess_normal and gl_cross_guess_inverted.
36844         * m4/argz.m4 (gl_FUNC_ARGZ): Obey --enable-cross-guesses for
36845         lt_cv_sys_argz_works.
36846         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Obey --enable-cross-guesses for
36847         ac_cv_func_calloc_0_nonnull.
36848         * m4/canonicalize.m4 (gl_FUNC_REALPATH_WORKS): Obey
36849         --enable-cross-guesses for gl_cv_func_realpath_works.
36850         * m4/cbrtl.m4 (gl_FUNC_CBRTL): Obey --enable-cross-guesses for
36851         gl_cv_func_cbrtl_ieee.
36852         * m4/ceil.m4 (gl_FUNC_CEIL): Obey --enable-cross-guesses for
36853         gl_cv_func_ceil_ieee.
36854         * m4/ceilf.m4 (gl_FUNC_CEILF): Obey --enable-cross-guesses for
36855         gl_cv_func_ceilf_ieee.
36856         * m4/ceill.m4 (gl_FUNC_CEILL): Obey --enable-cross-guesses for
36857         gl_cv_func_ceill_ieee.
36858         * m4/chown.m4 (AC_FUNC_CHOWN): Obey --enable-cross-guesses for
36859         ac_cv_func_chown_works.
36860         (gl_FUNC_CHOWN): Obey --enable-cross-guesses for
36861         gl_cv_func_chown_slash_works, gl_cv_func_chown_ctime_works.
36862         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Obey
36863         --enable-cross-guesses for gl_cv_struct_dirent_d_ino.
36864         * m4/exp2l.m4 (gl_FUNC_EXP2L): Obey --enable-cross-guesses for
36865         gl_cv_func_exp2l_works, gl_cv_func_exp2l_ieee.
36866         * m4/expl.m4 (gl_FUNC_EXPL): Obey --enable-cross-guesses for
36867         gl_cv_func_expl_works.
36868         * m4/expm1.m4 (gl_FUNC_EXPM1): Obey --enable-cross-guesses for
36869         gl_cv_func_expm1_ieee.
36870         * m4/expm1l.m4 (gl_FUNC_EXPM1L): Obey --enable-cross-guesses for
36871         gl_cv_func_expm1l_works.
36872         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Obey --enable-cross-guesses for
36873         gl_cv_func_open_directory_works.
36874         * m4/fchownat.m4 (gl_FUNC_FCHOWNAT_DEREF_BUG): Obey
36875         --enable-cross-guesses for gl_cv_func_fchownat_nofollow_works.
36876         (gl_FUNC_FCHOWNAT_EMPTY_FILENAME_BUG): Obey --enable-cross-guesses for
36877         gl_cv_func_fchownat_empty_filename_works.
36878         * m4/fdopendir.m4 (gl_FUNC_FDOPENDIR): Obey --enable-cross-guesses for
36879         gl_cv_func_fdopendir_works.
36880         * m4/floor.m4 (gl_FUNC_FLOOR): Obey --enable-cross-guesses for
36881         gl_cv_func_floor_ieee.
36882         * m4/floorf.m4 (gl_FUNC_FLOORF): Obey --enable-cross-guesses for
36883         gl_cv_func_floorf_ieee.
36884         * m4/fma.m4 (gl_FUNC_FMA_WORKS): Obey --enable-cross-guesses for
36885         gl_cv_func_fma_works.
36886         * m4/fmaf.m4 (gl_FUNC_FMAF_WORKS): Obey --enable-cross-guesses for
36887         gl_cv_func_fmaf_works.
36888         * m4/fmal.m4 (gl_FUNC_FMAL_WORKS): Obey --enable-cross-guesses for
36889         gl_cv_func_fmal_works.
36890         * m4/fmod.m4 (gl_FUNC_FMOD): Obey --enable-cross-guesses for
36891         gl_cv_func_fmod_ieee.
36892         * m4/fmodf.m4 (gl_FUNC_FMODF): Obey --enable-cross-guesses for
36893         gl_cv_func_fmodf_ieee.
36894         * m4/fmodl.m4 (gl_FUNC_FMODL): Obey --enable-cross-guesses for
36895         gl_cv_func_fmodl_ieee.
36896         * m4/fpurge.m4 (gl_FUNC_FPURGE): Obey --enable-cross-guesses for
36897         gl_cv_func_fpurge_works.
36898         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Obey
36899         --enable-cross-guesses for gl_cv_func_getcwd_path_max.
36900         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Obey --enable-cross-guesses for
36901         gl_cv_func_getcwd_null.
36902         (gl_FUNC_GETCWD): Update for getcwd-path-max.m4 change.
36903         * m4/getdelim.m4 (gl_FUNC_GETDELIM): Obey --enable-cross-guesses for
36904         gl_cv_func_working_getdelim.
36905         * m4/getgroups.m4 (AC_FUNC_GETGROUPS): Obey --enable-cross-guesses for
36906         ac_cv_func_getgroups_works. Keep this macro also in Autoconf >= 2.70.
36907         (gl_FUNC_GETGROUPS): Obey --enable-cross-guesses for
36908         gl_cv_func_getgroups_works.
36909         * m4/getline.m4 (gl_FUNC_GETLINE): Obey --enable-cross-guesses for
36910         am_cv_func_working_getline.
36911         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Obey --enable-cross-guesses
36912         for gl_cv_func_getopt_gnu.
36913         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY_CLOBBER): Obey
36914         --enable-cross-guesses for gl_cv_func_gettimeofday_clobber.
36915         * m4/hypot.m4 (gl_FUNC_HYPOT): Obey --enable-cross-guesses for
36916         gl_cv_func_hypot_ieee.
36917         * m4/hypotf.m4 (gl_FUNC_HYPOTF): Obey --enable-cross-guesses for
36918         gl_cv_func_hypotf_ieee.
36919         * m4/hypotl.m4 (gl_FUNC_HYPOTL): Obey --enable-cross-guesses for
36920         gl_cv_func_hypotl_ieee.
36921         * m4/iconv_open-utf.m4 (gl_FUNC_ICONV_OPEN_UTF_SUPPORT): Obey
36922         --enable-cross-guesses for gl_cv_func_iconv_supports_utf.
36923         * m4/link.m4 (gl_FUNC_LINK): Obey --enable-cross-guesses for
36924         gl_cv_func_link_works.
36925         * m4/linkat.m4 (gl_FUNC_LINKAT): Obey --enable-cross-guesses for
36926         gl_cv_func_linkat_slash.
36927         * m4/log.m4 (gl_FUNC_LOG): Obey --enable-cross-guesses for
36928         gl_cv_func_log_ieee.
36929         * m4/logf.m4 (gl_FUNC_LOGF): Obey --enable-cross-guesses for
36930         gl_cv_func_logf_ieee.
36931         * m4/logl.m4 (gl_FUNC_LOGL_WORKS): Obey --enable-cross-guesses for
36932         gl_cv_func_logl_works.
36933         * m4/log10.m4 (gl_FUNC_LOG10): Obey --enable-cross-guesses for
36934         gl_cv_func_log10_ieee.
36935         * m4/log10f.m4 (gl_FUNC_LOG10F): Obey --enable-cross-guesses for
36936         gl_cv_func_log10f_ieee.
36937         * m4/log10l.m4 (gl_FUNC_LOG10L_WORKS): Obey --enable-cross-guesses for
36938         gl_cv_func_log10l_works.
36939         * m4/log1p.m4 (gl_FUNC_LOG1P): Obey --enable-cross-guesses for
36940         gl_cv_func_log1p_ieee.
36941         * m4/log1pf.m4 (gl_FUNC_LOG1PF): Obey --enable-cross-guesses for
36942         gl_cv_func_log1pf_ieee.
36943         * m4/log1pl.m4 (gl_FUNC_LOG1PL): Obey --enable-cross-guesses for
36944         gl_cv_func_log1pl_ieee.
36945         * m4/log2.m4 (gl_FUNC_LOG2): Obey --enable-cross-guesses for
36946         gl_cv_func_log2_ieee.
36947         * m4/log2f.m4 (gl_FUNC_LOG2F): Obey --enable-cross-guesses for
36948         gl_cv_func_log2f_ieee.
36949         * m4/lstat.m4 (gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Obey
36950         --enable-cross-guesses for
36951         gl_cv_func_lstat_dereferences_slashed_symlink.
36952         * m4/malloc.m4 (_AC_FUNC_MALLOC_IF): Obey --enable-cross-guesses for
36953         ac_cv_func_malloc_0_nonnull. Keep this macro also in Autoconf >= 2.70.
36954         * m4/mbrtowc.m4 (gl_MBRTOWC_C_LOCALE): Obey --enable-cross-guesses for
36955         gl_cv_C_locale_sans_EILSEQ.
36956         * m4/memchr.m4 (gl_FUNC_MEMCHR): Obey --enable-cross-guesses for
36957         gl_cv_func_memchr_works.
36958         * m4/memmem.m4 (gl_FUNC_MEMMEM_SIMPLE): Obey --enable-cross-guesses for
36959         gl_cv_func_memmem_works_always.
36960         (gl_FUNC_MEMMEM): Obey --enable-cross-guesses for
36961         gl_cv_func_memmem_works_fast.
36962         * m4/mkdir.m4 (gl_FUNC_MKDIR): Obey --enable-cross-guesses for
36963         gl_cv_func_mkdir_trailing_slash_works,
36964         gl_cv_func_mkdir_trailing_dot_works.
36965         * m4/mkfifo.m4 (gl_FUNC_MKFIFO): Obey --enable-cross-guesses for
36966         gl_cv_func_mkfifo_works.
36967         * m4/mknod.m4 (gl_FUNC_MKNOD): Obey --enable-cross-guesses for
36968         gl_cv_func_mknod_works.
36969         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Obey --enable-cross-guesses for
36970         gl_cv_func_working_mkstemp.
36971         * m4/mktime.m4 (gl_FUNC_MKTIME_WORKS): Obey --enable-cross-guesses for
36972         gl_cv_func_working_mktime.
36973         * m4/modf.m4 (gl_FUNC_MODF): Obey --enable-cross-guesses for
36974         gl_cv_func_modf_ieee.
36975         * m4/modff.m4 (gl_FUNC_MODFF): Obey --enable-cross-guesses for
36976         gl_cv_func_modff_ieee.
36977         * m4/modfl.m4 (gl_FUNC_MODFL): Obey --enable-cross-guesses for
36978         gl_cv_func_modfl_ieee.
36979         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Obey --enable-cross-guesses for
36980         gl_cv_func_nanosleep.
36981         * m4/perror.m4 (gl_FUNC_PERROR): Obey --enable-cross-guesses for
36982         gl_cv_func_perror_works.
36983         * m4/printf.m4 (gl_PRINTF_SIZES_C99): Obey --enable-cross-guesses for
36984         gl_cv_func_printf_sizes_c99.
36985         (gl_PRINTF_INFINITE): Obey --enable-cross-guesses for
36986         gl_cv_func_printf_infinite.
36987         (gl_PRINTF_INFINITE_LONG_DOUBLE): Obey --enable-cross-guesses for
36988         gl_cv_func_printf_infinite_long_double.
36989         (gl_PRINTF_DIRECTIVE_A): Obey --enable-cross-guesses for
36990         gl_cv_func_printf_directive_a.
36991         (gl_PRINTF_DIRECTIVE_F): Obey --enable-cross-guesses for
36992         gl_cv_func_printf_directive_f.
36993         (gl_PRINTF_FLAG_ZERO): Obey --enable-cross-guesses for
36994         gl_cv_func_printf_flag_zero.
36995         (gl_PRINTF_ENOMEM): Obey --enable-cross-guesses for
36996         gl_cv_func_printf_enomem.
36997         (gl_SNPRINTF_TRUNCATION_C99): Obey --enable-cross-guesses for
36998         gl_cv_func_snprintf_truncation_c99.
36999         (gl_SNPRINTF_RETVAL_C99): Obey --enable-cross-guesses for
37000         gl_cv_func_snprintf_retval_c99.
37001         (gl_SNPRINTF_DIRECTIVE_N): Obey --enable-cross-guesses for
37002         gl_cv_func_snprintf_directive_n.
37003         (gl_VSNPRINTF_ZEROSIZE_C99): Obey --enable-cross-guesses for
37004         gl_cv_func_vsnprintf_zerosize_c99.
37005         * m4/pselect.m4 (gl_FUNC_PSELECT): Obey --enable-cross-guesses for
37006         gl_cv_func_pselect_detects_ebadf.
37007         * m4/pthread_rwlock_rdlock.m4 (gl_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER):
37008         Obey --enable-cross-guesses for
37009         gl_cv_pthread_rwlock_rdlock_prefer_writer.
37010         * m4/ptsname.m4 (gl_FUNC_PTSNAME): Obey --enable-cross-guesses for
37011         gl_cv_func_ptsname_sets_errno.
37012         * m4/putenv.m4 (gl_FUNC_PUTENV): Obey --enable-cross-guesses for
37013         gl_cv_func_svid_putenv.
37014         * m4/readlink.m4 (gl_FUNC_READLINK): Obey --enable-cross-guesses for
37015         gl_cv_func_readlink_works.
37016         * m4/realloc.m4 (_AC_FUNC_REALLOC_IF): Obey --enable-cross-guesses for
37017         ac_cv_func_realloc_0_nonnull. Keep this macro also in Autoconf >= 2.70.
37018         * m4/regex.m4 (gl_REGEX): Obey --enable-cross-guesses for
37019         gl_cv_func_re_compile_pattern_working.
37020         * m4/remainder.m4 (gl_FUNC_REMAINDER): Obey --enable-cross-guesses for
37021         gl_cv_func_remainder_ieee.
37022         * m4/remainderf.m4 (gl_FUNC_REMAINDERF): Obey --enable-cross-guesses for
37023         gl_cv_func_remainderf_ieee.
37024         * m4/remainderl.m4 (gl_FUNC_REMAINDERL): Obey --enable-cross-guesses for
37025         gl_cv_func_remainderl_ieee.
37026         * m4/rintl.m4 (gl_FUNC_RINTL): Obey --enable-cross-guesses for
37027         gl_cv_func_rintl_works.
37028         * m4/rmdir.m4 (gl_FUNC_RMDIR): Obey --enable-cross-guesses for
37029         gl_cv_func_rmdir_works.
37030         * m4/round.m4 (gl_FUNC_ROUND): Obey --enable-cross-guesses for
37031         gl_cv_func_round_ieee.
37032         * m4/roundf.m4 (gl_FUNC_ROUNDF): Obey --enable-cross-guesses for
37033         gl_cv_func_roundf_ieee.
37034         * m4/roundl.m4 (gl_FUNC_ROUNDL): Obey --enable-cross-guesses for
37035         gl_cv_func_roundl_ieee.
37036         * m4/select.m4 (gl_FUNC_SELECT): Obey --enable-cross-guesses for
37037         gl_cv_func_select_detects_ebadf.
37038         * m4/setenv.m4 (gl_FUNC_SETENV): Obey --enable-cross-guesses for
37039         gl_cv_func_setenv_works.
37040         (gl_FUNC_UNSETENV): Obey --enable-cross-guesses for
37041         gl_cv_func_unsetenv_works.
37042         * m4/signbit.m4 (gl_SIGNBIT): Obey --enable-cross-guesses for
37043         gl_cv_func_signbit, gl_cv_func_signbit_gcc.
37044         * m4/sleep.m4 (gl_FUNC_SLEEP): Obey --enable-cross-guesses for
37045         gl_cv_func_sleep_works.
37046         * m4/stat.m4 (gl_FUNC_STAT): Obey --enable-cross-guesses for
37047         gl_cv_func_stat_file_slash.
37048         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Obey --enable-cross-guesses for
37049         gl_cv_func_stpncpy.
37050         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR_SIMPLE): Obey
37051         --enable-cross-guesses for gl_cv_func_strcasestr_works_always.
37052         (gl_FUNC_STRCASESTR): Obey --enable-cross-guesses for
37053         gl_cv_func_strcasestr_linear.
37054         * m4/strerror.m4 (gl_FUNC_STRERROR): Obey --enable-cross-guesses for
37055         gl_cv_func_working_strerror.
37056         (gl_FUNC_STRERROR_0): Obey --enable-cross-guesses for
37057         gl_cv_func_strerror_0_works.
37058         * m4/strerror_r.m4 (gl_FUNC_STRERROR_R_WORKS): Obey
37059         --enable-cross-guesses for gl_cv_func_strerror_r_works.
37060         * m4/strstr.m4 (gl_FUNC_STRSTR_SIMPLE): Obey --enable-cross-guesses for
37061         gl_cv_func_strstr_works_always.
37062         (gl_FUNC_STRSTR): Obey --enable-cross-guesses for
37063         gl_cv_func_strstr_linear.
37064         * m4/strtod.m4 (gl_FUNC_STRTOD): Obey --enable-cross-guesses for
37065         gl_cv_func_strtod_works.
37066         * m4/strtold.m4 (gl_FUNC_STRTOLD): Obey --enable-cross-guesses for
37067         gl_cv_func_strtold_works.
37068         * m4/symlink.m4 (gl_FUNC_SYMLINK): Obey --enable-cross-guesses for
37069         gl_cv_func_symlink_works.
37070         * m4/symlinkat.m4 (gl_FUNC_SYMLINKAT): Obey --enable-cross-guesses for
37071         gl_cv_func_symlinkat_works.
37072         * m4/trunc.m4 (gl_FUNC_TRUNC): Obey --enable-cross-guesses for
37073         gl_cv_func_trunc_ieee.
37074         * m4/truncf.m4 (gl_FUNC_TRUNCF): Obey --enable-cross-guesses for
37075         gl_cv_func_truncf_ieee.
37076         * m4/truncl.m4 (gl_FUNC_TRUNCL): Obey --enable-cross-guesses for
37077         gl_cv_func_truncl_ieee.
37078         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Obey --enable-cross-guesses for
37079         gl_cv_func_tzset_clobber.
37080         * m4/ungetc.m4 (gl_FUNC_UNGETC_WORKS): Obey --enable-cross-guesses for
37081         gl_cv_func_ungetc_works.
37082         * m4/unlink.m4 (gl_FUNC_UNLINK): Obey --enable-cross-guesses for
37083         gl_cv_func_unlink_honors_slashes, gl_cv_func_unlink_parent_fails.
37084         * m4/usleep.m4 (gl_FUNC_USLEEP): Obey --enable-cross-guesses for
37085         gl_cv_func_usleep_works.
37086         * m4/utimens.m4 (gl_UTIMENS): Obey --enable-cross-guesses for
37087         gl_cv_func_futimesat_works.
37088         * m4/utimes.m4 (gl_FUNC_UTIMES): Obey --enable-cross-guesses for
37089         gl_cv_func_working_utimes.
37090         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Obey --enable-cross-guesses for
37091         gl_cv_func_wcwidth_works.
37092         * m4/glob.m4 (gl_GLOB): When cross-compiling, don't create symlinks for
37093         testing. Obey --enable-cross-guesses for gl_cv_glob_lists_symlinks.
37094         * m4/rename.m4 (gl_FUNC_RENAME): When cross-compiling, don't create
37095         links for testing. Obey --enable-cross-guesses for
37096         gl_cv_func_rename_slash_dst_works, gl_cv_func_rename_slash_src_works,
37097         gl_cv_func_rename_link_works, gl_cv_func_rename_dest_works.
37099 2019-09-08  Bruno Haible  <bruno@clisp.org>
37101         Clarify that cross-compilation guesses are guesses.
37102         * m4/threads.m4 (gl_THREADS_H): Say "guessing yes" or "guessing no" when
37103         cross-compiling.
37105 2019-09-08  Bruno Haible  <bruno@clisp.org>
37107         chown: Fix configure output (regression from 2019-03-23).
37108         * m4/chown.m4 (gl_FUNC_CHOWN): Fix reference to
37109         gl_cv_func_chown_follows_symlink variable.
37111 2019-09-08  Bruno Haible  <bruno@clisp.org>
37113         findprog-in: New module.
37114         Suggested by Paul Smith <psmith@gnu.org>.
37115         * lib/findprog.h (find_in_given_path): New declaration.
37116         * lib/findprog-in.c: New file, based on lib/findprog.c.
37117         * m4/findprog-in.m4: New file, based on m4/findprog.m4.
37118         * modules/findprog-in: New file.
37120 2019-09-08  Bruno Haible  <bruno@clisp.org>
37122         findprog: Remove unused dependency.
37123         * modules/findprog (Depends-on): Remove strdup.
37125 2019-09-08  Bruno Haible  <bruno@clisp.org>
37127         findprog: Remove test that is obsolete since 2006-04-24.
37128         * m4/findprog.m4 (gl_FINDPROG): Don't test for unistd.h.
37130 2019-09-06  Akim Demaille  <akim@lrde.epita.fr>
37132         bitset: style changes
37133         * lib/bitset/vector.c (vbitset_resize): Factor computation.
37134         * lib/bitset.c, lib/bitset/stats.c, lib/bitsetv.c: Prefer
37135         xzalloc to xcalloc.
37136         Suggested by Paul Eggert.
37138 2019-09-06  Akim Demaille  <akim@lrde.epita.fr>
37140         bitset: check memory allocation
37141         Reported by 江 祖铭 (Zu-Ming Jiang).
37142         With help from Paul Eggert.
37143         https://lists.gnu.org/archive/html/bug-bison/2019-08/msg00016.html
37144         * lib/bitset/table.c (tbitset_resize): When growing, use xrealloc
37145         instead of realloc.
37146         When shrinking, accept failures.
37147         * lib/bitset/vector.c (vbitset_resize): Likewise.
37149 2019-09-07  Paul Eggert  <eggert@cs.ucla.edu>
37151         scratch_buffer: sync from glibc
37152         * config/srclist.txt: Add the scratch_buffer source
37153         code from glibc, since these should be in sync.
37154         Autoupdate.
37156 2019-09-07  Bruno Haible  <bruno@clisp.org>
37158         doc: Update for glibc 2.30.
37159         * doc/glibc-functions/gettid.texi: New file.
37160         * doc/glibc-functions/pthread_cond_clockwait.texi: New file.
37161         * doc/glibc-functions/pthread_mutex_clocklock.texi: New file.
37162         * doc/glibc-functions/pthread_rwlock_clockrdlock.texi: New file.
37163         * doc/glibc-functions/pthread_rwlock_clockwrlock.texi: New file.
37164         * doc/glibc-functions/sem_clockwait.texi: New file.
37165         * doc/glibc-functions/tgkill.texi: New file.
37166         * doc/glibc-functions/twalk_r.texi: New file.
37167         * doc/gnulib.texi: Include them.
37168         (Glibc semaphore.h): New section.
37169         * doc/pastposix-functions/h_errno.texi: Update.
37170         * doc/posix-functions/*.texi: Likewise.
37172 2019-09-06  Bruno Haible  <bruno@clisp.org>
37174         symlink tests: Avoid test failure on Linux with Lustre file system.
37175         Reported by Thomas C Oppe <Thomas.C.Oppe@erdc.dren.mil>
37176         at <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=37312>.
37177         * tests/test-symlink.h (test_symlink): Accept errno value ENOENT.
37179 2019-09-01  Bruno Haible  <bruno@clisp.org>
37181         gitsub.sh: Add support for shallow-cloning of subdirectories.
37182         * top/gitsub.sh (func_usage): Document allowed git options with
37183         'git pull'.
37184         (func_pull): Accept GIT_OPTIONS argument.
37185         (pull): Parse git options before complaining about too many arguments.
37186         Pass the git options to func_pull.
37188 2019-08-29  Bruno Haible  <bruno@clisp.org>
37190         lock: Fix cross-compilation guesses.
37191         * m4/pthread_rwlock_rdlock.m4 (gl_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER):
37192         Require AC_CANONICAL_HOST. When cross-compiling, guess no on most
37193         platforms.
37195 2019-08-28  Bruno Haible  <bruno@clisp.org>
37197         isfinite, isinf, isnan, signbit: Fix error in C++ mode on mingw.
37198         Reported by Martin Storsjö <martin@martin.st> in
37199         <https://lists.gnu.org/archive/html/bug-gnulib/2019-08/msg00075.html>.
37200         * lib/math.in.h (_GL_MATH_CXX_REAL_FLOATING_DECL_2): Add more arguments.
37201         (isfinite, isinf, isnan, signbit): On platforms that use C++ include
37202         files from GCC 6 or newer, use an override through '#define', because
37203         the inline definitions in the platform's <cmath> cannot be overridden
37204         in another way.
37206 2019-08-27  Paul Eggert  <eggert@cs.ucla.edu>
37208         Revert macOS INT_MULTIPLY_WRAPV patch
37209         Problem reported by Bruno Haible in:
37210         https://lists.gnu.org/r/bug-gnulib/2019-08/msg00076.html
37211         * lib/intprops.h (_GL_HAS___builtin_mul_overflow): Remove.
37212         (_GL_HAS_BUILTIN_MUL_OVERFLOW):
37213         Go back to working around the Clang bug on macOS.
37215 2019-08-27  Bruno Haible  <bruno@clisp.org>
37217         libtool-next-version: Fix error output.
37218         * build-aux/libtool-next-version (func_fatal_error): Fix the program
37219         name.
37221 2019-08-27  Paul Eggert  <eggert@cs.ucla.edu>
37223         Speed up INT_MULTIPLY_WRAPV on macOS
37224         Assume that __builtin_mul_overflow works OK with Clang on macOS.
37225         Mattias Engdegård says it’s safe to assume the relevant library
37226         is always available there.
37227         * lib/intprops.h (_GL_HAS___builtin_mul_overflow):
37228         New temporary internal macro.
37229         (_GL_HAS_BUILTIN_MUL_OVERFLOW):
37230         No need to work around the Clang bug on macOS.
37232 2019-08-25  Paul Eggert  <eggert@cs.ucla.edu>
37234         intprops.h, verify.h: port better to clang
37235         Improve code generated by INT_ADD_WRAPV and INT_SUBTRACT_WRAPV
37236         with Clang.  Problem reported privately by Mattias Engdegård.
37237         Also, insulate intprops.h and verify.h better against each other’s
37238         definitions of __has_builtin on non-Clang hosts.
37239         * lib/intprops.h (__has_builtin): Define a temporary substitute
37240         if __has_builtin is not already defined.
37241         (_GL_HAS___builtin_add_overflow, _GL_TEMPDEF___has_builtin):
37242         New temporary internal macros.
37243         (_GL_HAS_BUILTIN_ADD_OVERFLOW, _GL_HAS_BUILTIN_MUL_OVERFLOW):
37244         Now two separate macros, replacing the old
37245         _GL_HAS_BUILTIN_OVERFLOW, since we no longer assume that
37246         __builtin_mul_overflow is like the rest.  All uses changed.
37247         (INT_ADD_WRAPV, INT_SUBTRACT_WRAPV, INT_MULTIPLY_WRAPV):
37248         Adjust to above changes.
37249         (_GL_INT_OP_WRAPV): Remove ‘builtin’ arg, since it’s no
37250         longer relevant.  All uses changed.
37251         * lib/verify.h (__has_builtin): Treat like intprops.h,
37252         so that the two .h files do not collide with each other.
37253         (_GL_HAS___builtin_unreachable, _GL_HAS___builtin_trap)
37254         (_GL_TEMPDEF___has_builtin): New temporary internal macros.
37256 2019-08-24  Paul Eggert  <eggert@cs.ucla.edu>
37258         intprops: say why not Clang __builtin_add_overflow
37259         * lib/intprops.h (_GL_HAS_BUILTIN_OVERFLOW):
37260         Mention Clang in comment, responding to a query from
37261         Mattias Engdegård.
37263 2019-08-24  Bruno Haible  <bruno@clisp.org>
37265         doc: Document most of the files outside of modules.
37266         * doc/gnulib.texi (Build Infrastructure Files,
37267         Release Management Files): New chapters.
37269 2019-08-24  Bruno Haible  <bruno@clisp.org>
37271         bootstrap: Keep in sync with the 'gettext' module.
37272         Reported by Assaf Gordon in
37273         <https://lists.gnu.org/archive/html/bug-gnulib/2019-08/msg00045.html>.
37274         * build-aux/po/Makefile.in.in: Update to gettext 0.20.
37275         * build-aux/po/remove-potcdate.sin: Likewise.
37277 2019-08-24  Bruno Haible  <bruno@clisp.org>
37279         crypto/gc-sha512: Add tests.
37280         * tests/test-gc-sha512.c: New file, based on tests/test-gc-sha1.c.
37281         * modules/crypto/gc-sha512-tests: New file.
37283         crypto/gc-sha256: Add tests.
37284         * tests/test-gc-sha256.c: New file, based on tests/test-gc-sha1.c.
37285         * modules/crypto/gc-sha256-tests: New file.
37287         crypto/gc-sha256, crypto/gc-sha512: New modules.
37288         * lib/gc.h (gc_sha256, gc_sha512): New declarations.
37289         * lib/gc-gnulib.c: Include sha256.h, sha512.h.
37290         (MAX_DIGEST_SIZE): Set to 64.
37291         (_gc_hash_ctx, gc_hash_open, gc_hash_digest_length, gc_hash_write,
37292         gc_hash_read, gc_hash_buffer): Add support for sha256 and sha512.
37293         (gc_sha256, gc_sha512): New functions.
37294         * lib/gc-libgcrypt.c (gc_sha256, gc_sha512): New functions.
37295         * modules/crypto/gc-sha256: New file, based on modules/crypto/gc-sha1.
37296         * modules/crypto/gc-sha512: New file, based on modules/crypto/gc-sha1.
37298 2019-08-24  Bruno Haible  <bruno@clisp.org>
37300         crypto/gc-sha1 tests: Improve output when the test fails.
37301         * tests/test-gc-sha1.c (main): In case of mismatch, print the entire
37302         output.
37304 2019-08-24  Bruno Haible  <bruno@clisp.org>
37306         crypto/gc-sm3: Fix compilation error with --with-libgcrypt.
37307         * m4/gc-sm3.m4 (gl_GC_SM3): Test whether libgcrypt supports SM3. Define
37308         LIBGCRYPT_HAS_MD_SM3.
37309         * lib/gc-libgcrypt.c: Include sm3.h.
37310         (_gc_hash_ctx, gc_hash_open, gc_hash_hmac_setkey, gc_hash_write,
37311         gc_hash_read, gc_hash_close, gc_hash_buffer, gc_sm3): Use the gnulib
37312         implementation if libgcrypt does not support SM3.
37314 2019-08-24  Bruno Haible  <bruno@clisp.org>
37316         crypto/gc-md2: Optimize and clarify code.
37317         * lib/gc-gnulib.c (gc_hash_open): Comment out md2_init_ctx invocation.
37318         * lib/gc-libgcrypt.c (gc_hash_open): Clarify why md2_init_ctx invocation
37319         is not needed.
37321 2019-08-24  Bruno Haible  <bruno@clisp.org>
37323         crypto/gc-md2: Add comment.
37324         * lib/gc-libgcrypt.c: Add comment.
37326 2019-08-24  Bruno Haible  <bruno@clisp.org>
37328         crypto/gc-{md[24],rijndael} tests: Fix link error with --with-libgcrypt.
37329         * modules/crypto/gc-md2-tests (test_gc_md2_LDADD): New variable.
37330         * modules/crypto/gc-md4-tests (test_gc_md4_LDADD): New variable.
37331         * modules/crypto/gc-rijndael-tests (test_gc_rijndael_LDADD): New
37332         variable.
37334 2019-08-24  Bruno Haible  <bruno@clisp.org>
37336         crypto/gc: Fix link error with --with-libgcrypt.
37337         * m4/gc.m4 (gl_GC): Set LIB_CRYPTO to the value found by the
37338         AC_LIB_HAVE_LINKFLAGS invocation.
37340 2019-08-24  Bruno Haible  <bruno@clisp.org>
37342         crypto/gc: Access the module indicators correctly.
37343         * lib/gc-gnulib.c: Use '#if GNULIB_GC_*', not '#ifdef GNULIB_GC_*'.
37344         * lib/gc-libgcrypt.c: Likewise.
37346 2019-08-24  Bruno Haible  <bruno@clisp.org>
37348         crypto/gc: Fix configuration with --with-libgcrypt.
37349         * m4/libgcrypt.m4: New file, copied from libgcrypt/src/libgcrypt.m4.
37350         * modules/crypto/gc (Files): Add it.
37351         * m4/gc.m4 (gl_GC): Assume AM_PATH_LIBGCRYPT is defined.
37353 2019-08-24  Bruno Haible  <bruno@clisp.org>
37355         Remove unused file.
37356         * m4/stat-macros.m4: Remove file.
37358 2019-08-21  Paul Eggert  <eggert@cs.ucla.edu>
37360         New strip-trailing-space option for srclist-update
37361         * config/srclist-update (fixfile): Support new option.
37362         * config/srclist.txt (texinfo.tex, maintain.texi, standards.texi):
37363         Use it.
37365 2019-08-20  Eric Blake  <eblake@redhat.com>
37367         accept4: Support SOCK_NONBLOCK, if defined
37368         * lib/accept4.c (accept4): If SOCK_NONBLOCK is defined, honor it.
37370         accept4: Fix compilation when native accept4() exists.
37371         Reported by Richard W.M. Jones <rjones@redhat.com> in
37372         https://lists.gnu.org/archive/html/bug-gnulib/2019-08/msg00029.html
37373         * lib/accept4.c (accept4): Match witness symbol to m4 file update.
37375 2019-08-18  Bruno Haible  <bruno@clisp.org>
37377         Defeat -flto GCC optimization in math autoconf tests.
37378         Reported by Tomasz Kłoczko <kloczko.tomasz@gmail.com>
37379         at <https://savannah.gnu.org/bugs/?56109>.
37380         * m4/mathfunc.m4 (gl_MATHFUNC): Mark function pointer as 'volatile'.
37381         * m4/acosl.m4 (gl_FUNC_ACOSL): Likewise.
37382         * m4/asinl.m4 (gl_FUNC_ASINL): Likewise.
37383         * m4/atanl.m4 (gl_FUNC_ATANL): Likewise.
37384         * m4/cosl.m4 (gl_FUNC_COSL): Likewise.
37385         * m4/exp2.m4 (gl_FUNC_EXP2): Likewise.
37386         * m4/expl.m4 (gl_FUNC_EXPL): Likewise.
37387         * m4/expm1.m4 (gl_FUNC_EXPM1): Likewise.
37388         * m4/expm1l.m4 (gl_FUNC_EXPM1L): Likewise.
37389         * m4/sinl.m4 (gl_FUNC_SINL): Likewise.
37390         * m4/sqrtl.m4 (gl_FUNC_SQRTL): Likewise.
37391         * m4/tanl.m4 (gl_FUNC_TANL): Likewise.
37393 2019-08-17  Bruno Haible  <bruno@clisp.org>
37395         windows-spin: Implement declared functions.
37396         Reported by Gisle Vanem <gisle.vanem@gmail.com> in
37397         <https://lists.gnu.org/archive/html/bug-gnulib/2019-08/msg00024.html>.
37398         * lib/windows-spin.c (glwthread_spin_trylock): Fix typo in function
37399         name.
37401 2019-08-17  Paul Eggert  <eggert@cs.ucla.edu>
37403         intprops: port to Oracle Developer Studio 12.6
37404         * lib/intprops.h (_GL_INT_OP_WRAPV): Fix recently-introduced
37405         typos that were in a section not compiled by GCC.
37407 2019-08-14  Paul Eggert  <eggert@cs.ucla.edu>
37409         intprops: support uchar, ushort _WRAPV dests
37410         * lib/intprops.h (_GL_INT_OP_WRAPV_SMALLISH): New macro, defined
37411         when __builtin_add_overflow etc. and _Generic are not used.
37412         (_GL_INT_OP_WRAPV): Use it to support destinations that
37413         are unsigned char or unsigned short, even in compilers
37414         that lack __typeof__ and are not C11-compatible.
37416         intprops: pacify picky GCC
37417         * lib/intprops.h (_GL_BUILTIN_MUL_OVERFLOW):
37418         Pacify GCC’s complaints about ignoring __builtin_mul_overflow’s
37419         possibly-incorrect result.
37420         (_GL_INT_MULTIPLY_RANGE_OVERFLOW): Pacify GCC’s complaints
37421         about (A) used as a boolean, when A is an expression like 3 * 4.
37423         intprops: support unsigned *_WRAPV results
37424         Add support for unsigned, unsigned long, and unsigned long long
37425         results to INT_ADD_WRAPV, INT_SUBTRACT_WRAPV, and
37426         INT_MULTIPLY_WRAPV.  Also, work around GCC bug 91450, and fix a
37427         bug with unsigned inputs reported by Eli Zaretskii in:
37428         https://lists.gnu.org/r/bug-gnulib/2019-08/msg00012.html
37429         * config/srclist.txt: Break the glibc connection for intprops.h
37430         temporarily, while more testing is done in Gnulib-using apps.
37431         * lib/intprops.h (INT_ADD_WRAPV, INT_SUBTRACT_WRAPV)
37432         (INT_MULTIPLY_WRAPV, _GL_INT_OP_WRAPV, _GL_INT_OP_WRAPV_LONGISH):
37433         Support unsigned results no narrower than unsigned int.  Report
37434         overflow correctly if some arguments are unsigned.
37435         (_GL_BUILTIN_MUL_OVERFLOW): New macro, to work around GCC bug 91450.
37436         (_GL_INT_OP_CALC): Simplify now that the OVERFLOW argument does
37437         the right thing with narrow args.
37438         (_GL_INT_OP_CALC1): Remove.  All callers removed.
37439         (_GL_INT_ADD_RANGE_OVERFLOW, _GL_INT_SUBTRACT_RANGE_OVERFLOW)
37440         (_GL_INT_MULTIPLY_RANGE_OVERFLOW): New macros.
37441         * tests/test-intprops.c: Check for bugs and test new behavior.
37443 2019-08-14  Bruno Haible  <bruno@clisp.org>
37445         get_progname_of: New module.
37446         * lib/get_progname_of.h: New file.
37447         * lib/get_progname_of.c: New file, based on lib/getprogname.c.
37448         * lib/getprogname.c (getprogname): Tweak coding style.
37449         * lib/vma-iter.c (vma_iterate_bsd): Update comment.
37450         * modules/get_progname_of: New file.
37452 2019-08-14  Bruno Haible  <bruno@clisp.org>
37454         get_ppid_of: New module.
37455         * lib/get_ppid_of.h: New file.
37456         * lib/get_ppid_of.c: New file.
37457         * modules/get_ppid_of: New file.
37459 2019-08-13  Bruno Haible  <bruno@clisp.org>
37461         libtextstyle-optional tests: Support the NO_COLOR environment variable.
37462         * tests/test-libtextstyle.c (main): Do not emit styling when the
37463         environment variable NO_COLOR is set.
37465 2019-08-12  Paul Eggert  <eggert@cs.ucla.edu>
37467         verify: improve diagnostic quality in recent GCC
37468         If ‘verify’ fails in a deeply-nested macro, GCC does not output a
37469         useful line number containing the top-level caller of the macro.
37470         So, bring back the older way of issuing a diagnostic containing
37471         the top-level call’s arg, so that it is easier to diagnose
37472         ‘verify’ failures with recent GCC.
37473         * lib/verify.h (_GL_VERIFY_TRUE, _GL_VERIFY_TYPE):
37474         Bring back DIAGNOSTIC arg.  All callers changed.
37475         (verify): Just use _GL_VERIFY.
37477 2019-08-11  Bruno Haible  <bruno@clisp.org>
37479         localcharset: Add more aliases for OS/2.
37480         Based on patch by KO Myung-Hun <komh78@gmail.com> in
37481         <https://lists.gnu.org/archive/html/bug-gnu-libiconv/2019-08/msg00004.html>.
37482         * lib/localcharset.c (alias_table) [OS2]: Add more aliases.
37484 2019-08-10  Eric Blake  <eblake@redhat.com>
37486         configmake: Update advice on usage.
37487         * modules/configmake (Include): No longer necessary to include
37488         last, since configmake.h itself worries about collision avoidance.
37490 2019-08-10  Assaf Gordon <assafgordon@gmail.com>
37492         parse-datetime: fix 'T' military timezone handling
37493         * lib/parse-datetime.y (zone):
37494         follow-up to the previous commit: the 'T' case is handled outside the
37495         conversion table (used as either military timezone UTC-7 or ISO8601
37496         separator). Change it from "HOUR(7)" to "-HOUR(7)" to match other
37497         timezone letters.
37499 2019-08-09  Paul Eggert  <eggert@cs.ucla.edu>
37501         parse-datetime: fix military timezone letters
37502         Problem and trivial fix reported by Neil Hoggarth in:
37503         https://lists.gnu.org/r/bug-gnulib/2019-08/msg00005.html
37504         * lib/parse-datetime.y (military_table):
37505         Do it the right way, not the RFC 822 way.
37507 2019-08-08  Eric Blake  <eblake@redhat.com>
37509         configmake: Avoid namespace pollution issue on mingw.
37510         * modules/configmake (Makefile.am): If the project uses
37511         <winsock2.h>, include that header before defining DATADIR.
37513 2019-07-28  Bruno Haible  <bruno@clisp.org>
37515         mbrtowc tests: Fix regression on mingw (regression from 2018-02-24).
37516         * tests/test-mbrtowc.c (main): Fix expected value of wc.
37518 2019-07-24  Bruno Haible  <bruno@clisp.org>
37520         pthread-h: Fix definitions of types and macros on mingw.
37521         * lib/pthread.in.h (pthread_t, pthread_attr_t, PTHREAD_CREATE_JOINABLE,
37522         PTHREAD_CREATE_DETACHED): Define also when module 'pthread-thread' is
37523         not in use.
37524         (pthread_once_t, PTHREAD_ONCE_INIT): Define also when module
37525         'pthread-once' is not in use.
37526         (pthread_mutex_t, pthread_mutexattr_t, PTHREAD_MUTEX_INITIALIZER,
37527         PTHREAD_MUTEX_DEFAULT, PTHREAD_MUTEX_NORMAL, PTHREAD_MUTEX_ERRORCHECK,
37528         PTHREAD_MUTEX_RECURSIVE): Define also when module 'pthread-mutex' is not
37529         in use.
37530         (pthread_rwlock_t, pthread_rwlockattr_t, PTHREAD_RWLOCK_INITIALIZER):
37531         Define also when module 'pthread-rwlock' is not in use.
37532         (pthread_cond_t, pthread_condattr_t, PTHREAD_COND_INITIALIZER): Define
37533         also when module 'pthread-cond' is not in use.
37534         (pthread_key_t, PTHREAD_DESTRUCTOR_ITERATIONS): Define also when module
37535         'pthread-tss' is not in use.
37536         (pthread_spinlock_t): Define also when module 'pthread-spin' is not in
37537         use.
37539 2019-07-24  Simon Josefsson  <simon@josefsson.org>
37541         crypto/gc: Cope with libgcrypt without SM3.
37542         * lib/gc-libgcrypt.c (gc_hash_open): Guard SM3 usage.
37544 2019-07-23  Paul Eggert  <eggert@cs.ucla.edu>
37546         backupfile: fix resource leak on memory failure
37547         Problem found by Coverity (CID 1484214).
37548         * lib/backupfile.c (backupfile_internal): Don’t leak dirp.
37550 2019-07-22  Bruno Haible  <bruno@clisp.org>
37552         Avoid missing-declarations warning in various tests.
37553         * tests/test-argp.c (fail, test1, test2, test_file, test3, test4, test5,
37554         test6, test_optional, test7, test8, test9, test10, test11, test12,
37555         test13, test14, test15, test_fun): Declare static.
37556         * tests/test-cnd.c (test_cnd_wait): Likewise.
37557         * tests/test-cond.c (test_cond): Likewise.
37559 2019-07-22  Bernhard Voelker  <mail@bernhard-voelker.de>
37561         pthread tests: Avoid missing-declarations warning.
37562         * tests/test-pthread-cond.c (test_pthread_cond_wait): Declare static.
37564 2019-07-19  Bruno Haible  <bruno@clisp.org>
37566         parse-datetime: Avoid warnings from bison versions >= 3.3.
37567         Reported by Bernhard Voelker <mail@bernhard-voelker.de>.
37568         * modules/parse-datetime (Makefile.am): Don't pass option '-y' to bison.
37570 2019-07-19  Bruno Haible  <bruno@clisp.org>
37572         parse-datetime: Require Bison 2.4 or newer.
37573         * m4/parse-datetime.m4 (gl_PARSE_DATETIME): Set PARSE_DATETIME_BISON.
37574         Code taken from gettext's intl.m4.
37575         * modules/parse-datetime (Makefile.am): Use PARSE_DATETIME_BISON instead
37576         of YACC.
37578 2019-07-19  Bruno Haible  <bruno@clisp.org>
37580         areadlink-with-size, xgethostname, xgetdomainname: Fix GCC warning.
37581         * lib/areadlink-with-size.c: Include <string.h>.
37582         * lib/areadlinkat-with-size.c: Likewise.
37583         * lib/xgethostname.c: Likewise.
37584         * lib/xgetdomainname.c: Likewise.
37586 2019-07-19  Bernhard Voelker  <mail@bernhard-voelker.de>
37588         parse-datetime: avoid "%pure-parser" deprecation warning from Bison 3.4
37589         * lib/parse-datetime.y: Use "%define api.pure" rather than obsolescent
37590         "%pure-parser".  The former is available since Bison 2.3b (2008),
37591         while the latter is marked as obsolete since version 3.4 (May 2019).
37593 2019-07-16  Bruno Haible  <bruno@clisp.org>
37595         update-copyright: Make it work again (regression from 2019-06-15).
37596         Reported by Brian C. Lane <bcl@redhat.com>.
37597         * build-aux/update-copyright: Add back the -0777, -p, -i options.
37599 2019-07-14  Bruno Haible  <bruno@clisp.org>
37601         doc: Update info about <pthread.h>.
37602         * doc/posix-headers/pthread.texi: Mention the module 'pthread-h' instead
37603         of 'pthread'.
37605 2019-07-14  Bruno Haible  <bruno@clisp.org>
37607         pthread_sigmask tests: Use new multithread modules.
37608         * tests/test-pthread_sigmask2.c: Include <pthread.h> instead of
37609         glthread/thread.h.
37610         (main_thread, killer_thread): Change type to pthread_t.
37611         (main): Update accordingly.
37612         * modules/pthread_sigmask-tests (Depends-on): Add pthread-thread. Remove
37613         thread.
37615 2019-07-14  Bruno Haible  <bruno@clisp.org>
37617         pthread-tss: Add tests.
37618         * tests/test-pthread-tss.c: New file, based on tests/test-tls.c and
37619         tests/test-tss.c.
37620         * modules/pthread-tss-tests: New file.
37622 2019-07-14  Bruno Haible  <bruno@clisp.org>
37624         pthread-cond: Add tests.
37625         * tests/test-pthread-cond.c: New file, based on tests/test-cond.c and
37626         tests/test-cnd.c.
37627         * modules/pthread-cond-tests: New file.
37629 2019-07-14  Bruno Haible  <bruno@clisp.org>
37631         pthread-rwlock: Add tests.
37632         * tests/test-pthread-rwlock.c: New file, based on tests/test-lock.c.
37633         * modules/pthread-rwlock-tests: New file.
37635 2019-07-14  Bruno Haible  <bruno@clisp.org>
37637         pthread-mutex: Add tests.
37638         * tests/test-pthread-mutex.c: New file, based on tests/test-lock.c and
37639         tests/test-mtx.c.
37640         * modules/pthread-mutex-tests: New file.
37642 2019-07-14  Bruno Haible  <bruno@clisp.org>
37644         pthread-once: Add tests.
37645         * tests/test-pthread-once1.c: New file, based on tests/test-once.c and
37646         tests/test-call_once.c.
37647         * tests/test-pthread-once2.c: New file, based on tests/test-lock.c and
37648         tests/test-mtx.c.
37649         * modules/pthread-once-tests: New file.
37651 2019-07-14  Bruno Haible  <bruno@clisp.org>
37653         pthread-thread: Add tests.
37654         * tests/test-pthread-thread.c: New file, based on
37655         tests/test-thread_create.c and tests/test-thrd_create.c.
37656         * modules/pthread-thread-tests: New file.
37658 2019-07-14  Bruno Haible  <bruno@clisp.org>
37660         pthread: Turn into a convenience module.
37661         * lib/pthread.in.h: Remove declarations for extern inline functions.
37662         * lib/pthread.c: Remove file.
37663         * modules/pthread (Files): Remove it.
37664         (Depends-on): Add pthread-thread, pthread-once, pthread-mutex,
37665         pthread-rwlock, pthread-cond, pthread-tss, pthread-spin.
37666         (configure.ac): Don't compile lib/pthread.c. Don't set GNULIB_PTHREAD.
37667         * m4/pthread_h.m4 (gl_PTHREAD_H_DEFAULTS): Don't initialize
37668         GNULIB_PTHREAD.
37669         * modules/pthread-h (Makefile.am): Don't substitute GNULIB_PTHREAD.
37671 2019-07-14  Bruno Haible  <bruno@clisp.org>
37673         pthread-spin: New module.
37674         * lib/pthread.in.h (pthread_spin_init, pthread_spin_destroy,
37675         pthread_spin_lock, pthread_spin_trylock, pthread_spin_unlock): Remove
37676         inline definitions.
37677         * lib/pthread-spin.c: New file.
37678         * m4/pthread-spin.m4: New file.
37679         * modules/pthread-spin: New file.
37680         * doc/posix-functions/pthread_spin_init.texi: Mention the new module.
37681         * doc/posix-functions/pthread_spin_lock.texi: Likewise.
37682         * doc/posix-functions/pthread_spin_trylock.texi: Likewise.
37683         * doc/posix-functions/pthread_spin_unlock.texi: Likewise.
37684         * doc/posix-functions/pthread_spin_destroy.texi: Likewise.
37686 2019-07-14  Bruno Haible  <bruno@clisp.org>
37688         pthread-tss: New module.
37689         * lib/pthread-tss.c: New file.
37690         * m4/pthread-tss.m4: New file.
37691         * modules/pthread-tss: New file.
37692         * doc/posix-functions/pthread_key_create.texi: Mention the new module.
37693         * doc/posix-functions/pthread_setspecific.texi: Likewise.
37694         * doc/posix-functions/pthread_getspecific.texi: Likewise.
37695         * doc/posix-functions/pthread_key_delete.texi: Likewise.
37697 2019-07-14  Bruno Haible  <bruno@clisp.org>
37699         pthread-cond: New module.
37700         * lib/pthread.in.h (pthread_cond_destroy, pthread_cond_init,
37701         pthread_cond_signal, pthread_cond_wait): Remove inline definitions.
37702         * lib/pthread-cond.c: New file.
37703         * m4/pthread-cond.m4: New file.
37704         * modules/pthread-cond: New file.
37705         * doc/posix-functions/pthread_cond_init.texi: Mention the new module.
37706         * doc/posix-functions/pthread_condattr_init.texi: Likewise.
37707         * doc/posix-functions/pthread_condattr_destroy.texi: Likewise.
37708         * doc/posix-functions/pthread_cond_wait.texi: Likewise.
37709         * doc/posix-functions/pthread_cond_timedwait.texi: Likewise.
37710         * doc/posix-functions/pthread_cond_signal.texi: Likewise.
37711         * doc/posix-functions/pthread_cond_broadcast.texi: Likewise.
37712         * doc/posix-functions/pthread_cond_destroy.texi: Likewise.
37714 2019-07-14  Bruno Haible  <bruno@clisp.org>
37716         pthread-rwlock: New module.
37717         * lib/pthread-rwlock.c: New file, based on lib/glthread/lock.c.
37718         * m4/pthread-rwlock.m4: New file.
37719         * modules/pthread-rwlock: New file.
37720         * doc/posix-functions/pthread_rwlock_init.texi: Mention the new module
37721         and the Android problem.
37722         * doc/posix-functions/pthread_rwlockattr_init.texi: Likewise.
37723         * doc/posix-functions/pthread_rwlockattr_destroy.texi: Likewise.
37724         * doc/posix-functions/pthread_rwlock_rdlock.texi: Likewise.
37725         * doc/posix-functions/pthread_rwlock_wrlock.texi: Likewise.
37726         * doc/posix-functions/pthread_rwlock_tryrdlock.texi: Likewise.
37727         * doc/posix-functions/pthread_rwlock_trywrlock.texi: Likewise.
37728         * doc/posix-functions/pthread_rwlock_timedrdlock.texi: Likewise.
37729         * doc/posix-functions/pthread_rwlock_timedwrlock.texi: Likewise.
37730         * doc/posix-functions/pthread_rwlock_unlock.texi: Likewise.
37731         * doc/posix-functions/pthread_rwlock_destroy.texi: Likewise.
37733 2019-07-14  Bruno Haible  <bruno@clisp.org>
37735         pthread-mutex: New module.
37736         * lib/pthread.in.h (pthread_mutexattr_destroy, pthread_mutexattr_init,
37737         pthread_mutexattr_settype, pthread_mutex_destroy, pthread_mutex_init,
37738         pthread_mutex_lock, pthread_mutex_trylock, pthread_mutex_timedlock,
37739         pthread_mutex_unlock): Remove inline definitions.
37740         * lib/pthread-mutex.c: New file.
37741         * m4/pthread-mutex.m4: New file.
37742         * modules/pthread-mutex: New file.
37743         * doc/posix-functions/pthread_mutex_init.texi: Mention the new module.
37744         * doc/posix-functions/pthread_mutexattr_init.texi: Likewise.
37745         * doc/posix-functions/pthread_mutexattr_gettype.texi: Likewise.
37746         * doc/posix-functions/pthread_mutexattr_settype.texi: Likewise.
37747         * doc/posix-functions/pthread_mutexattr_getrobust.texi: Likewise.
37748         * doc/posix-functions/pthread_mutexattr_setrobust.texi: Likewise.
37749         * doc/posix-functions/pthread_mutexattr_destroy.texi: Likewise.
37750         * doc/posix-functions/pthread_mutex_lock.texi: Likewise.
37751         * doc/posix-functions/pthread_mutex_trylock.texi: Likewise.
37752         * doc/posix-functions/pthread_mutex_timedlock.texi: Likewise.
37753         * doc/posix-functions/pthread_mutex_unlock.texi: Likewise.
37754         * doc/posix-functions/pthread_mutex_destroy.texi: Likewise.
37756 2019-07-14  Bruno Haible  <bruno@clisp.org>
37758         pthread-once: New module.
37759         * lib/pthread-once.c: New file.
37760         * m4/pthread-once.m4: New file.
37761         * modules/pthread-once: New file.
37762         * doc/posix-functions/pthread_once.texi: Mention the new module.
37764 2019-07-14  Bruno Haible  <bruno@clisp.org>
37766         pthread-thread: New module.
37767         * lib/pthread.in.h (pthread_create, pthread_exit, pthread_join): Remove
37768         inline definitions.
37769         * lib/pthread-thread.c: New file.
37770         * m4/pthread-thread.m4: New file.
37771         * modules/pthread-thread: New file.
37772         * doc/posix-functions/pthread_create.texi: Mention the new module.
37773         * doc/posix-functions/pthread_attr_init.texi: Likewise.
37774         * doc/posix-functions/pthread_attr_getdetachstate.texi: Likewise.
37775         * doc/posix-functions/pthread_attr_setdetachstate.texi: Likewise.
37776         * doc/posix-functions/pthread_attr_destroy.texi: Likewise.
37777         * doc/posix-functions/pthread_self.texi: Likewise.
37778         * doc/posix-functions/pthread_equal.texi: Likewise.
37779         * doc/posix-functions/pthread_detach.texi: Likewise.
37780         * doc/posix-functions/pthread_join.texi: Likewise.
37781         * doc/posix-functions/pthread_exit.texi: Likewise.
37783 2019-07-14  Bruno Haible  <bruno@clisp.org>
37785         pthread-h: Prepare for adding new modules.
37786         * lib/pthread.in.h: Define the types and macros for each of the
37787         facilities separately.
37788         * m4/pthread_h.m4 (gl_PTHREAD_H): Set HAVE_PTHREAD_CREATE_DETACHED,
37789         HAVE_PTHREAD_MUTEX_RECURSIVE, HAVE_PTHREAD_MUTEX_ROBUST,
37790         HAVE_PTHREAD_PROCESS_SHARED.
37791         (gl_PTHREAD_H_DEFAULTS): Initialize HAVE_PTHREAD_CREATE_DETACHED,
37792         HAVE_PTHREAD_MUTEX_RECURSIVE, HAVE_PTHREAD_MUTEX_ROBUST,
37793         HAVE_PTHREAD_PROCESS_SHARED.
37794         * modules/pthread-h (Makefile.am): Substitute
37795         HAVE_PTHREAD_CREATE_DETACHED, HAVE_PTHREAD_MUTEX_RECURSIVE,
37796         HAVE_PTHREAD_MUTEX_ROBUST, HAVE_PTHREAD_PROCESS_SHARED.
37798 2019-07-14  Bruno Haible  <bruno@clisp.org>
37800         pthread-h: Add declarations of essential pthread functions.
37801         * lib/pthread.in.h: Include snippets.
37802         (pthread_create, pthread_attr_init, pthread_attr_getdetachstate,
37803         pthread_attr_setdetachstate, pthread_attr_destroy, pthread_self,
37804         pthread_equal, pthread_detach, pthread_join, pthread_exit, pthread_once,
37805         pthread_mutex_init, pthread_mutexattr_init, pthread_mutexattr_gettype,
37806         pthread_mutexattr_settype, pthread_mutexattr_getrobust,
37807         pthread_mutexattr_setrobust, pthread_mutexattr_destroy,
37808         pthread_mutex_lock, pthread_mutex_trylock, pthread_mutex_unlock,
37809         pthread_mutex_destroy, pthread_rwlock_init, pthread_rwlockattr_init,
37810         pthread_rwlockattr_destroy, pthread_rwlock_rdlock,
37811         pthread_rwlock_wrlock, pthread_rwlock_tryrdlock,
37812         pthread_rwlock_trywrlock, pthread_rwlock_timedrdlock,
37813         pthread_rwlock_timedwrlock, pthread_rwlock_unlock,
37814         pthread_rwlock_destroy, pthread_cond_init, pthread_condattr_init,
37815         pthread_condattr_destroy, pthread_cond_wait, pthread_cond_timedwait,
37816         pthread_cond_signal, pthread_cond_broadcast, pthread_cond_destroy,
37817         pthread_key_create, pthread_setspecific, pthread_getspecific,
37818         pthread_key_delete, pthread_spin_init, pthread_spin_lock,
37819         pthread_spin_trylock, pthread_spin_unlock, pthread_spin_destroy): New
37820         declarations.
37821         (pthread_mutex_timedlock): Move declaration.
37822         * m4/pthread_h.m4 (gl_PTHREAD_H): Check whether the new functions are
37823         declared.
37824         (gl_PTHREAD_H_DEFAULTS): Initialize GNULIB_PTHREAD_THREAD,
37825         GNULIB_PTHREAD_ONCE, GNULIB_PTHREAD_MUTEX, GNULIB_PTHREAD_RWLOCK,
37826         GNULIB_PTHREAD_COND, GNULIB_PTHREAD_TSS, GNULIB_PTHREAD_SPIN and the
37827         HAVE_* and REPLACE_* variables for the new functions.
37828         * modules/pthread-h (Depends-on): Add snippet/c++defs,
37829         snippet/_Noreturn, snippet/arg-nonnull, snippet/warn-on-use.
37830         (Makefile.am): Substitute GNULIB_PTHREAD_THREAD, GNULIB_PTHREAD_ONCE,
37831         GNULIB_PTHREAD_MUTEX, GNULIB_PTHREAD_RWLOCK, GNULIB_PTHREAD_COND,
37832         GNULIB_PTHREAD_TSS, GNULIB_PTHREAD_SPIN and the HAVE_* and REPLACE_*
37833         variables for the new functions. Split the sed script, to avoid the
37834         limit of 99 commands of HP-UX sed.
37835         * tests/test-pthread-c++.cc: Check the signature of the new functions.
37837 2019-07-14  Bruno Haible  <bruno@clisp.org>
37839         pthread-h: Respect --enable-threads={posix|windows} option on mingw.
37840         * m4/pthread_h.m4 (gl_PTHREAD_H): Require gl_THREADLIB. Set
37841         HAVE_PTHREAD_H if gl_threads_api is 'windows'.
37842         (LIB_PTHREAD): Rely on $LIBMULTITHREAD from threadlib.m4.
37843         * modules/pthread (Link): Change to $(LIBMULTITHREAD).
37844         * modules/pthread-h (Depends-on): Add threadlib.
37845         (Link): Change to $(LIBTHREAD).
37846         * modules/pthread-h-c++-tests (test_pthread_c___LDADD): Use
37847         $(LIBMULTITHREAD) instead of $(LIB_PTHREAD).
37849 2019-07-14  Bruno Haible  <bruno@clisp.org>
37851         pthread-h: Add C++ tests.
37852         * tests/test-pthread-c++.cc: New file.
37853         * modules/pthread-h-c++-tests: New file.
37855 2019-07-14  Bruno Haible  <bruno@clisp.org>
37857         pthread-h: Add tests.
37858         * tests/test-pthread.c: New file.
37859         * modules/pthread-h-tests: New file.
37861 2019-07-14  Bruno Haible  <bruno@clisp.org>
37863         pthread-h: New module.
37864         * lib/pthread.in.h: Define replacement functions only if GNULIB_PTHREAD
37865         is 1.
37866         * m4/pthread_h.m4: Renamed from m4/pthread.m4.
37867         (gl_PTHREAD_H): Renamed from gl_PTHREAD_CHECK. Don't test whether
37868         <pthread.h> pollutes the namespace; instead, prepare for generating a
37869         pthread.h always. Substitute HAVE_PTHREAD_H here.
37870         (gl_PTHREAD_H_DEFAULTS): Renamed from gl_PTHREAD_DEFAULTS. Initialize
37871         GNULIB_PTHREAD. Don't initialize HAVE_PTHREAD_H here.
37872         * modules/pthread-h: New file, based on modules/pthread.
37873         * modules/pthread: Rely on 'pthread-h'.
37874         * m4/pthread_mutex_timedlock.m4 (gl_FUNC_PTHREAD_MUTEX_TIMEDLOCK):
37875         Update.
37876         * modules/pthread_mutex_timedlock (Depends-on): Add pthread-h. Remove
37877         pthread.
37879 2019-07-14  Bruno Haible  <bruno@clisp.org>
37881         sched_yield: New module.
37882         * lib/sched.in.h: Add _GL_FUNCDECL_RPL, _GL_WARN_ON_USE placeholders.
37883         (sched_yield): New declaration.
37884         * lib/sched_yield.c: New file.
37885         * m4/sched_yield.m4: New file.
37886         * m4/sched_h.m4 (gl_SCHED_H): Require gl_SCHED_H_DEFAULTS. Arrange to
37887         provide a replacement sched.h always. Test whether sched_yield is
37888         declared.
37889         (gl_SCHED_MODULE_INDICATOR, gl_SCHED_H_DEFAULTS): New macros.
37890         * modules/sched (Depends-on): Add snippet/c++defs, snippet/warn-on-use.
37891         (Makefile.am): Provide a replacement sched.h always. Substitute
37892         GNULIB_SCHED_YIELD, HAVE_SCHED_YIELD, REPLACE_SCHED_YIELD,
37893         _GL_FUNCDECL_RPL, _GL_WARN_ON_USE.
37894         * modules/sched_yield: New file.
37895         * doc/posix-functions/sched_yield.texi: Mention the new module.
37897 2019-07-14  Bruno Haible  <bruno@clisp.org>
37899         windows-spin: New module.
37900         * lib/windows-spin.h: New file.
37901         * lib/windows-spin.c: New file.
37902         * modules/windows-spin: New file.
37904 2019-07-14  Bruno Haible  <bruno@clisp.org>
37906         windows-timedrwlock: New module.
37907         * lib/windows-timedrwlock.h: New file, based on windows-rwlock.h.
37908         * lib/windows-timedrwlock.c: New file, based on windows-rwlock.c and
37909         windows-cond.c.
37910         * lib/windows-cond.h (struct glwthread_waitqueue_link): Protect against
37911         redefinition conflict with windows-timedrwlock.h.
37912         * modules/windows-timedrwlock: New file.
37914 2019-07-14  Bruno Haible  <bruno@clisp.org>
37916         windows-rwlock: New module.
37917         * lib/windows-rwlock.h: New file, extracted from lib/glthread/lock.h.
37918         * lib/windows-rwlock.c: New file, extracted from lib/glthread/lock.c.
37919         * lib/glthread/lock.h: Include windows-rwlock.h. Don't include
37920         windows-initguard.h.
37921         (gl_rwlock_t): Define using glwthread_rwlock_t.
37922         (gl_rwlock_initializer): Define using GLWTHREAD_RWLOCK_INIT.
37923         (glthread_rwlock_init): Define using glwthread_rwlock_init.
37924         (glthread_rwlock_rdlock): Define using glwthread_rwlock_rdlock.
37925         (glthread_rwlock_wrlock): Define using glwthread_rwlock_wrlock.
37926         (glthread_rwlock_unlock): Define using glwthread_rwlock_unlock.
37927         (glthread_rwlock_destroy): Define using glwthread_rwlock_destroy.
37928         (glthread_rwlock_init_func, glthread_rwlock_rdlock_func,
37929         glthread_rwlock_wrlock_func, glthread_rwlock_unlock_func,
37930         glthread_rwlock_destroy_func): Remove declarations.
37931         * lib/glthread/lock.c (gl_waitqueue_t): Remove type.
37932         (gl_waitqueue_init, gl_waitqueue_add, gl_waitqueue_notify_first,
37933         gl_waitqueue_notify_all, glthread_rwlock_init_func,
37934         glthread_rwlock_rdlock_func, glthread_rwlock_wrlock_func,
37935         glthread_rwlock_unlock_func, glthread_rwlock_destroy_func): Remove
37936         functions.
37937         * modules/windows-rwlock: New file.
37938         * modules/lock (Depends-on): Add windows-rwlock.
37940 2019-07-14  Bruno Haible  <bruno@clisp.org>
37942         windows-thread: Add support for creating a thread in detached state.
37943         * lib/windows-thread.h (GLWTHREAD_ATTR_DETACHED): New macro.
37944         (glwthread_thread_create): Add attr argument.
37945         * lib/windows-thread.c (glwthread_thread_create): Likewise.
37946         * lib/glthread/thread.h (glthread_create): Update.
37947         * lib/thrd.c (thrd_create): Update.
37949 2019-07-14  Bruno Haible  <bruno@clisp.org>
37951         windows-*: Rename glwthread_spinlock_t to glwthread_initguard_t.
37952         * lib/windows-initguard.h: Renamed from lib/windows-spinlock.h.
37953         (glwthread_initguard_t): Renamed from glwthread_spinlock_t.
37954         (GLWTHREAD_INITGUARD_INIT): Renamed from GLWTHREAD_SPINLOCK_INIT.
37955         * lib/windows-mutex.h: Update.
37956         * lib/windows-recmutex.h: Likewise.
37957         * lib/windows-timedmutex.h: Likewise.
37958         * lib/windows-timedrecmutex.h: Likewise.
37959         * lib/windows-cond.h: Likewise.
37960         * lib/glthread/lock.h: Likewise.
37961         * modules/windows-mutex (Files): Add lib/windows-initguard.h. Remove
37962         lib/windows-spinlock.h.
37963         * modules/windows-recmutex (Files): Likewise.
37964         * modules/windows-timedmutex (Files): Likewise.
37965         * modules/windows-timedrecmutex (Files): Likewise.
37966         * modules/windows-cond (Files): Likewise.
37967         * modules/threads-h (Files): Likewise.
37969 2019-07-14  Bruno Haible  <bruno@clisp.org>
37971         doc: Fix info about pthread API in HP-UX.
37972         * doc/posix-functions/pthread_*.texi: Fix info about HP-UX 11.
37974 2019-07-14  Bruno Haible  <bruno@clisp.org>
37976         threads-h: Fix generation of threads.h.
37977         * modules/threads-h (Makefile.am): Insert the required header file
37978         snippets.
37980 2019-07-09  Bruno Haible  <bruno@clisp.org>
37982         striconveh test: Fix a compilation failure when iconv is not available.
37983         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
37984         * tests/test-striconveh.c (main): Move iconv_close invocations inside
37985         HAVE_ICONV.
37987 2019-07-07  Akim Demaille  <akim@lrde.epita.fr>
37989         argmatch: adjust columns for help2man.
37990         * lib/argmatch.h (argmatch_##Name##_doc_col): If some argument
37991         requires column 20 or more, return 20.
37993 2019-07-06  Paul Eggert  <eggert@cs.ucla.edu>
37995         areadlink-with-size: avoid realloc when size==0
37996         * lib/areadlink-with-size.c (areadlink_with_size):
37997         * lib/areadlinkat-with-size.c (areadlinkat_with_size):
37998         Reallocate at the end to the actual size, to avoid memory waste,
37999         as suggested by Bruno Haible.  But when the guessed size is zero -
38000         useful when the size is unknown - do the initial small readlink
38001         into the stack, to avoid that realloc in the usual case.
38003 2019-07-06  Pádraig Brady  <P@draigBrady.com>
38005         areadlink-with-size: guess a buffer size with 0 size
38006         The size is usually taken from st_size, which can be zero,
38007         resulting in inefficient operation.
38008         Instead let zero select an initial memory allocation
38009         of 128 bytes, which most symlinks fit within.
38010         * lib/areadlink-with-size.c (areadlink_with_size):
38011         Start with a 128 byte buffer, for SIZE == 0.
38012         * lib/areadlinkat-with-size.c (areadlinkat_with_size): Likewise.
38014 2019-07-06  Konstantin Kharlamov  <Hi-Angel@yandex.ru>
38016         Replace manually crafted hex regexes with [:xdigit:]
38017         * build-aux/gitlog-to-changelog (parse_amend_file)
38018         (git_dir_option):
38019         Replace various combinations of [0-9a-fA-F] with [[:xdigit:]].
38020         This patch is backported from Emacs (Bug#36167).
38022 2019-07-06  Bruno Haible  <bruno@clisp.org>
38024         error: Fix documentation.
38025         * doc/glibc-functions/error_at_line.texi: Document what the 'error'
38026         module provides.
38027         * doc/glibc-functions/error_message_count.texi: Likewise.
38028         * doc/glibc-functions/error_one_per_line.texi: Likewise.
38029         * doc/glibc-functions/error_print_progname.texi: Likewise.
38031 2019-07-06  Bruno Haible  <bruno@clisp.org>
38033         doc: Remove documentation of glibc <= 2.1.x as a supported platform.
38034         * doc/gnulib-intro.texi (Target Platforms): Mention that glibc 2.1.x
38035         and older is unsupported.
38036         * doc/**/*.texi: Update.
38038 2019-07-06  Bruno Haible  <bruno@clisp.org>
38040         doc: Remove documentation of Linux libc5 as a supported platform.
38041         * doc/posix-functions/iswalnum.texi: Don't mention workarounds specific
38042         to Linux libc5.
38043         * doc/posix-functions/iswalpha.texi: Likewise.
38044         * doc/posix-functions/iswblank.texi: Likewise.
38045         * doc/posix-functions/iswcntrl.texi: Likewise.
38046         * doc/posix-functions/iswdigit.texi: Likewise.
38047         * doc/posix-functions/iswgraph.texi: Likewise.
38048         * doc/posix-functions/iswlower.texi: Likewise.
38049         * doc/posix-functions/iswprint.texi: Likewise.
38050         * doc/posix-functions/iswpunct.texi: Likewise.
38051         * doc/posix-functions/iswspace.texi: Likewise.
38052         * doc/posix-functions/iswupper.texi: Likewise.
38053         * doc/posix-functions/iswxdigit.texi: Likewise.
38054         * doc/posix-functions/snprintf.texi: Likewise.
38055         * doc/posix-functions/vsnprintf.texi: Likewise.
38057 2019-07-06  Bruno Haible  <bruno@clisp.org>
38059         doc: Remove documentation of Tandem/NSK as a supported platform.
38060         * doc/posix-headers/stdlib.texi: Don't mention workarounds specific to
38061         Tandem/NSK.
38062         * doc/**/*.texi: Update.
38064 2019-07-06  Bruno Haible  <bruno@clisp.org>
38066         doc: Remove documentation of Mac OS X <= 10.4 as a supported platform.
38067         * doc/gnulib-intro.texi (Target Platforms): Mention that Mac OS X 10.4
38068         and older is unsupported.
38069         * doc/posix-functions/acosl.texi: Don't mention workarounds specific to
38070         Mac OS X 10.4 and older.
38071         * doc/posix-functions/asinl.texi: Likewise.
38072         * doc/posix-functions/atanl.texi: Likewise.
38073         * doc/posix-functions/cosl.texi: Likewise.
38074         * doc/posix-functions/expl.texi: Likewise.
38075         * doc/posix-functions/frexpl.texi: Likewise.
38076         * doc/posix-functions/gettimeofday.texi: Likewise.
38077         * doc/posix-functions/logl.texi: Likewise.
38078         * doc/posix-functions/mkstemp.texi: Likewise.
38079         * doc/posix-functions/sinl.texi: Likewise.
38080         * doc/posix-functions/sqrtl.texi: Likewise.
38081         * doc/posix-functions/tanl.texi: Likewise.
38082         * doc/posix-functions/wcswidth.texi: Likewise.
38083         * doc/**/*.texi: Update.
38085 2019-07-06  Bruno Haible  <bruno@clisp.org>
38087         doc: Remove documentation of AIX 4 as a supported platform.
38088         * doc/gnulib-intro.texi (Target Platforms): Mention that AIX 4 is
38089         unsupported.
38090         * doc/posix-functions/nanosleep.texi: Don't mention AIX 4 specific
38091         workarounds.
38092         * doc/posix-functions/strnlen.texi: Likewise.
38093         * doc/posix-headers/inttypes.texi: Likewise.
38094         * doc/**/*.texi: Update.
38096 2019-07-06  Bruno Haible  <bruno@clisp.org>
38098         doc: Remove documentation of HP-UX 10 as a supported platform.
38099         * doc/gnulib-intro.texi (Target Platforms): Mention that HP-UX 10 is
38100         unsupported.
38101         * doc/*-functions/*printf.texi: Don't mention HP-UX 10 specific
38102         workarounds.
38103         * doc/posix-functions/gmtime_r.texi: Likewise.
38104         * doc/posix-functions/localtime_r.texi: Likewise.
38105         * doc/posix-functions/mkstemp.texi: Likewise.
38106         * doc/**/*.texi: Update.
38108 2019-07-06  Bruno Haible  <bruno@clisp.org>
38110         doc: Remove documentation of Interix 3.5 as a supported platform.
38111         * doc/gnulib-intro.texi (Target Platforms): Mention that Interix is
38112         unsupported.
38113         * doc/posix-functions/select.texi: Don't mention Interix specific
38114         workarounds.
38115         * doc/posix-headers/signal.texi: Likewise.
38116         * doc/**/*.texi: Update.
38118 2019-07-06  Bruno Haible  <bruno@clisp.org>
38120         doc: Remove documentation of IRIX 6.4 and older as supported platforms.
38121         * doc/gnulib-intro.texi (Target Platforms): Mention that IRIX <= 6.4 is
38122         unsupported.
38123         * doc/pastposix-functions/usleep.texi: Don't mention IRIX specific
38124         workarounds.
38125         * doc/posix-functions/nl_langinfo.texi: Likewise.
38126         * doc/posix-functions/remainder.texi: Likewise.
38127         * doc/posix-functions/towlower.texi: Likewise.
38128         * doc/posix-functions/towupper.texi: Likewise.
38129         * doc/posix-functions/vsnprintf.texi: Likewise.
38130         * doc/posix-functions/wcscat.texi: Likewise.
38131         * doc/posix-functions/wcschr.texi: Likewise.
38132         * doc/posix-functions/wcscmp.texi: Likewise.
38133         * doc/posix-functions/wcscpy.texi: Likewise.
38134         * doc/posix-functions/wcscspn.texi: Likewise.
38135         * doc/posix-functions/wcslen.texi: Likewise.
38136         * doc/posix-functions/wcsncat.texi: Likewise.
38137         * doc/posix-functions/wcsncmp.texi: Likewise.
38138         * doc/posix-functions/wcsncpy.texi: Likewise.
38139         * doc/posix-functions/wcspbrk.texi: Likewise.
38140         * doc/posix-functions/wcsrchr.texi: Likewise.
38141         * doc/posix-functions/wcsspn.texi: Likewise.
38142         * doc/posix-headers/langinfo.texi: Likewise.
38143         * doc/posix-headers/signal.texi: Likewise.
38144         * doc/posix-headers/wchar.texi: Likewise.
38145         * doc/posix-headers/wctype.texi: Likewise.
38146         * doc/**/*.texi: Update.
38148 2019-07-05  Bruno Haible  <bruno@clisp.org>
38150         doc: Remove documentation of OSF/1 as supported platform.
38151         * doc/gnulib-intro.texi (Target Platforms): Mention that OSF/1 is
38152         unsupported.
38153         * doc/glibc-functions/getdomainname.texi: Don't mention OSF/1 specific
38154         workarounds.
38155         * doc/glibc-functions/pthread_setname_np.texi: Likewise.
38156         * doc/glibc-functions/ptsname_r.texi: Likewise.
38157         * doc/posix-functions/ceil.texi: Likewise.
38158         * doc/posix-functions/ceilf.texi: Likewise.
38159         * doc/posix-functions/ceill.texi: Likewise.
38160         * doc/posix-functions/fchdir.texi: Likewise.
38161         * doc/posix-functions/floor.texi: Likewise.
38162         * doc/posix-functions/floorf.texi: Likewise.
38163         * doc/posix-functions/fmod.texi: Likewise.
38164         * doc/posix-functions/fmodf.texi: Likewise.
38165         * doc/posix-functions/fmodl.texi: Likewise.
38166         * doc/posix-functions/log.texi: Likewise.
38167         * doc/posix-functions/logf.texi: Likewise.
38168         * doc/posix-functions/logl.texi: Likewise.
38169         * doc/posix-functions/log10.texi: Likewise.
38170         * doc/posix-functions/log10f.texi: Likewise.
38171         * doc/posix-functions/log10l.texi: Likewise.
38172         * doc/posix-functions/log2.texi: Likewise.
38173         * doc/posix-functions/log2f.texi: Likewise.
38174         * doc/posix-functions/log2l.texi: Likewise.
38175         * doc/posix-functions/mbrtowc.texi: Likewise.
38176         * doc/posix-functions/recv.texi: Likewise.
38177         * doc/posix-functions/recvfrom.texi: Likewise.
38178         * doc/posix-functions/remainder.texi: Likewise.
38179         * doc/posix-functions/remainderf.texi: Likewise.
38180         * doc/posix-functions/remainderl.texi: Likewise.
38181         * doc/posix-functions/round.texi: Likewise.
38182         * doc/posix-functions/roundf.texi: Likewise.
38183         * doc/posix-functions/roundl.texi: Likewise.
38184         * doc/posix-functions/send.texi: Likewise.
38185         * doc/posix-functions/sendto.texi: Likewise.
38186         * doc/posix-functions/setenv.texi: Likewise.
38187         * doc/posix-functions/snprintf.texi: Likewise.
38188         * doc/posix-functions/tcgetsid.texi: Likewise.
38189         * doc/posix-functions/trunc.texi: Likewise.
38190         * doc/posix-functions/truncf.texi: Likewise.
38191         * doc/posix-functions/truncl.texi: Likewise.
38192         * doc/posix-functions/ttyname_r.texi: Likewise.
38193         * doc/posix-functions/unsetenv.texi: Likewise.
38194         * doc/posix-functions/wcsrtombs.texi: Likewise.
38195         * doc/posix-headers/sys_select.texi: Likewise.
38196         * doc/posix-headers/wchar.texi: Likewise.
38197         * doc/posix-headers/wctype.texi: Likewise.
38198         * doc/**/*.texi: Update.
38200 2019-07-05  Bruno Haible  <bruno@clisp.org>
38202         doc: Remove documentation of BSDI and BSD/OS as supported platforms.
38203         * doc/**/*.texi: Update.
38205 2019-07-05  Bruno Haible  <bruno@clisp.org>
38207         doc: Remove documentation of Solaris 8 and older as supported platforms.
38208         * doc/gnulib-intro.texi (Target Platforms): Mention that Solaris <= 8 is
38209         unsupported.
38210         * doc/posix-functions/mbrtowc.texi: Don't mention Solaris specific
38211         workarounds.
38212         * doc/posix-functions/memcmp.texi: Likewise.
38213         * doc/posix-functions/rename.texi: Likewise.
38214         * doc/posix-functions/tzset.texi: Likewise.
38215         * doc/posix-headers/wctype.texi: Likewise.
38216         * doc/**/*.texi: Update.
38218 2019-07-05  Bruno Haible  <bruno@clisp.org>
38220         doc: Remove documentation of Interix 3.5 as a supported platform.
38221         * doc/**/*.texi: Update.
38223 2019-07-05  Bruno Haible  <bruno@clisp.org>
38225         doc: Remove documentation of BeOS as a supported platform.
38226         * doc/gnulib-intro.texi (Target Platforms): Mention that BeOS is
38227         unsupported.
38228         * doc/*-functions/*printf.texi: Don't mention BeOS specific workarounds.
38229         * doc/posix-functions/getdelim.texi: Likewise.
38230         * doc/**/*.texi: Update.
38232 2019-07-05  Bruno Haible  <bruno@clisp.org>
38234         thread, lock, cond, tls: Remove support for Pth threads.
38235         * m4/threadlib.m4 (gl_THREADLIB_EARLY_BODY): Don't document
38236         --enable-threads=pth any more.
38237         (gl_THREADLIB_BODY): Don't set USE_PTH_THREADS any more.
38238         * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK): Update comment.
38239         * m4/threads.m4 (gl_THREADS_H): Remove test for conflict between Pth
38240         threads and ISO C11 threads.
38241         * lib/glthread/thread.h: Remove code for USE_PTH_THREADS.
38242         * lib/glthread/lock.h: Likewise.
38243         * lib/glthread/lock.c: Likewise.
38244         * lib/glthread/cond.h: Likewise.
38245         * lib/glthread/cond.c: Likewise.
38246         * lib/glthread/tls.h: Likewise.
38247         * lib/glthread/tls.c: Likewise.
38248         * lib/glthread/yield.h: Likewise.
38249         * lib/regex_internal.h: Likewise.
38250         * tests/test-thread_create.c: Likewise.
38251         * tests/test-lock.c: Likewise.
38252         * tests/test-cond.c: Likewise.
38253         * tests/test-tls.c: Likewise.
38254         * tests/test-rwlock1.c: Don't include glthread/yield.h.
38255         (main): Sleep without calling gl_thread_yield.
38257 2019-07-05  Bruno Haible  <bruno@clisp.org>
38259         thread, lock, cond, tls: Remove support for old Solaris threads.
38260         Solaris >= 2.5.1 has POSIX threads.
38261         * m4/threadlib.m4 (gl_THREADLIB_EARLY_BODY): Don't document
38262         --enable-threads=solaris any more.
38263         (gl_THREADLIB_BODY): Don't set USE_SOLARIS_THREADS any more.
38264         * lib/glthread/thread.c: Update comment.
38265         * lib/glthread/thread.h: Remove code for USE_SOLARIS_THREADS.
38266         * lib/glthread/lock.h: Likewise.
38267         * lib/glthread/lock.c: Likewise.
38268         * lib/glthread/cond.h: Likewise.
38269         * lib/glthread/cond.c: Likewise.
38270         * lib/glthread/tls.h: Likewise.
38271         * lib/glthread/tls.c: Likewise.
38272         * lib/glthread/yield.h: Likewise.
38273         * lib/regex_internal.h: Likewise.
38274         * tests/test-thread_create.c: Likewise.
38275         * tests/test-lock.c: Likewise.
38276         * tests/test-cond.c: Likewise.
38277         * tests/test-tls.c: Likewise.
38279 2019-07-05  Bruno Haible  <bruno@clisp.org>
38281         getcwd-lgpl, getcwd: Don't call realloc when it is pointless.
38282         * lib/getcwd-lgpl.c (rpl_getcwd): Don't call realloc if the result's
38283         needed size is equal to the allocated size.
38284         * lib/getcwd.c (__getcwd): Likewise.
38286 2019-07-05  Bruno Haible  <bruno@clisp.org>
38288         xgetdomainname: Don't return an excessive memory allocation.
38289         * lib/xgetdomainname.c (xgetdomainname): Shrink the domainname buffer
38290         before returning it.
38292 2019-07-05  Bruno Haible  <bruno@clisp.org>
38294         xgethostname: Don't return an excessive memory allocation.
38295         * lib/xgethostname.c (xgethostname): Shrink the hostname buffer before
38296         returning it.
38298 2019-07-05  Bruno Haible  <bruno@clisp.org>
38300         areadlinkat-with-size: Don't return an excessive memory allocation.
38301         * lib/areadlinkat-with-size.c (areadlinkat_with_size): Shrink the buffer
38302         before returning it.
38304 2019-07-05  Bruno Haible  <bruno@clisp.org>
38306         areadlink-with-size: Don't return an excessive memory allocation.
38307         Reported by Andreas Dilger <adilger@whamcloud.com>.
38308         * lib/areadlink-with-size.c (areadlink_with_size): Shrink the buffer
38309         before returning it.
38311 2019-07-03  Bruno Haible  <bruno@clisp.org>
38313         renameatu: Fix test failure on MSVC.
38314         * lib/at-func2.c (at_func2): Fail with ENOENT if file1 or file2 is the
38315         empty string.
38317 2019-07-03  Bruno Haible  <bruno@clisp.org>
38319         mbrtowc: Fix invalid use of mbtowc() on MSVC.
38320         * lib/mbrtowc.c: Include glthread/lock.h.
38321         (mbtowc_lock): New variable.
38322         (mbrtowc): Treat UTF-8 encoding without locking. For the other
38323         encodings, explicitly reset the internal state of mbtowc, and protect
38324         this through a lock.
38325         * modules/mbrtowc (Depends-on): Add lock.
38327 2019-07-03  Akim Demaille  <akim@lrde.epita.fr>
38329         argmatch: don't define _ in the header.
38330         Reported by Jim Meyering.
38331         * lib/argmatch.h (N_, _): Don't define.
38332         Use gettext instead.
38333         * lib/argmatch.h (_): Define.
38334         * tests/test-argmatch.c (N_): Define.
38336 2019-07-02  Paul Eggert  <eggert@cs.ucla.edu>
38338         verify: document ‘assume’ better
38339         * lib/verify.h: Reword doc (Bug#36370).
38341 2019-07-02  Bruno Haible  <bruno@clisp.org>
38343         localcharset, nl_langinfo: Fix return value for UTF-8 locales on MSVC.
38344         * lib/localcharset.c (locale_charset): Return "UTF-8" instead of
38345         "CPutf8".
38346         * lib/nl_langinfo.c (ctype_codeset): Likewise.
38348 2019-07-02  Bruno Haible  <bruno@clisp.org>
38350         getcwd: Fix crash when invoked with size = 0 on MSVC.
38351         * lib/getcwd.c: Include msvc-inval.h.
38352         (getcwd_nothrow): New function/macro.
38353         (getcwd_system): New macro.
38354         (__getcwd): Use it instead of getcwd.
38355         * modules/getcwd (Depends-on): Add msvc-inval.
38356         * doc/posix-functions/getcwd.texi: Mention the MSVC issue.
38358 2019-07-02  Bruno Haible  <bruno@clisp.org>
38360         nonblocking-pipe tests: Fix test failure on MSVC.
38361         * tests/test-nonblocking-pipe.h (PIPE_DATA_BLOCK_SIZE): Set to 10000 on
38362         native Windows.
38364 2019-07-02  Bruno Haible  <bruno@clisp.org>
38366         usleep: Implement with millisecond resolution on native Windows.
38367         * lib/usleep.c (usleep): On native Windows, implement using Sleep().
38368         * doc/pastposix-functions/usleep.texi: Update accordingly.
38370 2019-07-02  Bruno Haible  <bruno@clisp.org>
38372         lstat tests: Fix test failure on MSVC.
38373         * tests/test-lstat.h (test_lstat_func): Don't test SAME_INODE values on
38374         native Windows, unless _GL_WINDOWS_STAT_INODES is defined.
38376 2019-07-02  Bruno Haible  <bruno@clisp.org>
38378         stat tests: Fix test failure on MSVC.
38379         * tests/test-stat.h (test_stat_func): Don't test SAME_INODE values on
38380         native Windows, unless _GL_WINDOWS_STAT_INODES is defined.
38382 2019-07-02  Bruno Haible  <bruno@clisp.org>
38384         getaddrinfo tests: Fix test failure on MSVC.
38385         * tests/test-getaddrinfo.c: Include sockets.h.
38386         (main): Invoke gl_sockets_startup.
38387         * modules/getaddrinfo-tests (Depends-on): Add sockets.
38389 2019-07-01  Hannes Müller  <h.c.f.mueller@gmx.de>
38391         poll: Fix type of timeout pointer passed to select() on mingw x86_64.
38392         * lib/poll.c: Call Windows native select() with Windows native timeval.
38394 2019-06-30  Bruno Haible  <bruno@clisp.org>
38396         argmatch: Fix compilation errors.
38397         * lib/argmatch.h: Include <limits.h>, for INT_MAX.
38398         * tests/test-argmatch.c (main): Update after last-minute function names
38399         change.
38401 2019-06-30  Bruno Haible  <bruno@clisp.org>
38403         Include <stdlib.h> when needed.
38404         * lib/cnd.c: Include <stdlib.h>, needed for abort().
38405         * lib/fcntl.c: Likewise.
38406         * lib/mbscasestr.c: Likewise.
38407         * lib/mbssep.c: Likewise.
38408         * lib/mbsstr.c: Likewise.
38409         * lib/openat.c: Include <stdlib.h>, needed for free().
38410         * lib/windows-tls.c: Include <stdlib.h>, needed for malloc(), free(),
38411         abort().
38413 2019-06-30  Bruno Haible  <bruno@clisp.org>
38415         Include <stdlib.h> when needed.
38416         * lib/areadlinkat.c: Include <stdlib.h>, needed for free() in at-func.c.
38417         * lib/faccessat.c: Likewise.
38418         * lib/fchmodat.c: Likewise.
38419         * lib/fchownat.c: Likewise.
38420         * lib/fstatat.c: Likewise.
38421         * lib/mkfifoat.c: Likewise.
38422         * lib/mknodat.c: Likewise.
38423         * lib/readlinkat.c: Likewise.
38424         * lib/symlinkat.c: Likewise.
38425         * lib/utimensat.c: Likewise.
38426         * lib/mkdirat.c: Likewise. Include also the specification header.
38428 2019-06-30  Bruno Haible  <bruno@clisp.org>
38430         inet_ntop, inet_pton: Avoid conflict with native Windows functions.
38431         * m4/sys_socket_h.m4 (gl_PREREQ_SYS_H_WS2TCPIP): New macro, extracted
38432         from gl_PREREQ_SYS_H_SOCKET.
38433         (gl_PREREQ_SYS_H_SOCKET): Invoke it.
38434         * m4/arpa_inet_h.m4 (gl_HEADER_ARPA_INET): Invoke
38435         gl_PREREQ_SYS_H_WS2TCPIP.
38436         * modules/arpa_inet (Files): Add m4/sys_socket_h.m4, m4/socklen.m4.
38437         (Makefile.am): Substitute HAVE_WS2TCPIP_H.
38438         * lib/arpa_inet.in.h: Include <ws2tcpip.h>.
38440 2019-06-30  Bruno Haible  <bruno@clisp.org>
38442         inet_ntop, inet_pton: Forward-compatibility with newer Windows versions.
38443         * m4/inet_ntop.m4 (gl_FUNC_INET_NTOP): On native Windows, set
38444         REPLACE_INET_NTOP to 1 always.
38445         * m4/inet_pton.m4 (gl_FUNC_INET_PTON): On native Windows, set
38446         REPLACE_INET_PTON to 1 always.
38448 2019-06-30  Bruno Haible  <bruno@clisp.org>
38450         inet_pton: Fix link error on mingw with _WIN32_WINNT >= 0x0600.
38451         * modules/inet_pton (Depends-on, configure.ac): Test REPLACE_INET_PTON,
38452         not REPLACE_INET_NTOP.
38454 2019-06-30  Bruno Haible  <bruno@clisp.org>
38456         poll: Add comment.
38457         * lib/poll.c: Add comment about WSAPoll.
38459 2019-06-30  Bruno Haible  <bruno@clisp.org>
38461         poll-h: Fix compilation error on mingw with _WIN32_WINNT >= 0x0600.
38462         Reported by Hannes Müller <h.c.f.mueller@gmx.de>.
38463         * lib/poll.in.h: Include <winsock2.h>.
38464         (POLL*, pollfd): Override on native Windows.
38465         * m4/poll_h.m4 (gl_POLL_H): Invoke gl_PREREQ_SYS_H_WINSOCK2.
38466         * modules/poll-h (Files): Add m4/sys_socket_h.m4.
38467         (Makefile.am): Substitute HAVE_WINSOCK2_H.
38469 2019-06-28  Bruno Haible  <bruno@clisp.org>
38471         accept4: Fix compilation error on OpenIndiana.
38472         Reported by Michal Nowak <mnowak@startmail.com>
38473         via Mark H Weaver <mhw@netris.org>.
38474         * m4/accept.m4 (gl_FUNC_ACCEPT4): Test whether accept4 is declared, not
38475         whether it exists as a function.
38477 2019-06-26  Paul Eggert  <eggert@cs.ucla.edu>
38479         strverscmp: sync from glibc
38480         * lib/strverscmp.c: Sync from glibc, except use UTF-8 encoding in
38481         comments, include libc-config.h, define __strverscmp to be
38482         strverscmp, and don’t assume types line uint8_t and int8_t that
38483         that C99 doesn’t guarantee.
38484         [!_LIBC]: Include libc-config.h; define __strverscmp.
38485         Include stdint.h.
38486         (__strverscmp): Assume C99.  Use uint_least8_t
38487         and int_least8_t instead of unsigned char and signed char.
38488         * modules/strverscmp (Depends-on): Add libc-config, stdint.
38490 2019-06-25  Bruno Haible  <bruno@clisp.org>
38492         tss tests: Add tests for destructors and races.
38493         * tests/test-tss.c (worker_thread): Fix typo in debug message.
38494         (test_tss_dtorcheck1, test_tss_dtorcheck2, test_tss_racecheck): New
38495         functions.
38496         (main): Invoke them.
38497         * modules/tls-tests (Depends-on): Add mtx.
38499 2019-06-25  Bruno Haible  <bruno@clisp.org>
38501         tls tests: Add tests for destructors and races.
38502         * tests/test-tls.c: Include glthread/lock.h.
38503         (test_tls_dtorcheck1, test_tls_dtorcheck2, test_tls_racecheck): New
38504         functions.
38505         (main): Invoke them.
38506         * modules/tls-tests (Depends-on): Add lock.
38508 2019-06-25  Bruno Haible  <bruno@clisp.org>
38510         windows-tls: Implement TLS key destructors for native Windows.
38511         * lib/windows-tls.h (glwthread_tls_process_destructors): New
38512         declaration.
38513         (GLWTHREAD_DESTRUCTOR_ITERATIONS): New macro.
38514         * lib/windows-tls.c: Include <limits.h>, windows-once.h.
38515         (dtor_table_init_once, dtor_table_lock: New variables.
38516         (struct dtor): New type.
38517         (dtor_table, dtors_count, dtors_used, dtors_allocated,
38518         dtor_processing_threads): New variables.
38519         (dtor_table_initialize, dtor_table_ensure_initialized,
38520         dtor_table_shrink_used, glwthread_tls_process_destructors): New
38521         functions.
38522         (glwthread_tls_key_create, glwthread_tls_key_delete): Rewritten to
38523         handle non-NULL destructors.
38524         * modules/windows-tls (Depends-on): Add windows-once.
38525         * lib/glthread/tls.h (glthread_tls_key_init, glthread_tls_key_destroy):
38526         Use the functions declared in windows-tls.h.
38527         * lib/threads.in.h (TSS_DTOR_ITERATIONS): Define using
38528         GLWTHREAD_DESTRUCTOR_ITERATIONS.
38529         * lib/windows-thread.c: Include windows-tls.h.
38530         (wrapper_func, glwthread_thread_exit): Invoke
38531         glwthread_tls_process_destructors.
38532         * modules/windows-thread (Depends-on): Add windows-tls.
38534 2019-06-25  Bruno Haible  <bruno@clisp.org>
38536         threadlib: Avoid autoconf warning "was expanded before it was required".
38537         * modules/threadlib (configure.ac): Require gl_THREADLIB.
38539 2019-06-25  Akim Demaille  <akim@lrde.epita.fr>
38541         argmatch: remove duplicate const qualifier
38542         * lib/argmatch.h (ARGMATCH_DEFINE_GROUP): Here.
38544 2019-06-24  Paul Eggert  <eggert@cs.ucla.edu>
38546         unistd: stddef.h and sys/types.h namespace cleanup
38547         * lib/unistd.in.h [__GLIBC__]:
38548         Do not include stddef.h or sys/types.h.
38549         [!__GLIBC__]: Always include sys/types.h, since unistd.h is
38550         supposed to declare off_t and ssize_t.  Problem found when looking
38551         at why @GNULIB_PWRITE@ was different from the newly-added
38552         @GNULIB_COPY_FILE_RANGE@ with respect to ssize_t.
38554 2019-06-22  Akim Demaille  <akim@lrde.epita.fr>
38556         maintainer-makefile: restore portability to non-GNU awks
38557         Reported by Tim Rühsen.
38558         * top/maint.mk (AWK): New variable.  Use it.
38559         (sc_prohibit_gnu_make_extensions): Skip if $(AWK) is not gawk.
38561 2019-06-23  Paul Eggert  <eggert@cs.ucla.edu>
38563         Document setvbuf _IOLBF problem
38564         * doc/posix-functions/setvbuf.texi (setvbuf):
38565         Document MS-Windows portability problem with _IOLBF.
38567         Document lseek SEEK_DATA/SEEK_HOLE
38568         * doc/posix-functions/lseek.texi (lseek):
38569         Document some systems that do not support SEEK_DATA and SEEK_HOLE.
38571 2019-06-22  Akim Demaille  <akim@lrde.epita.fr>
38573         argmatch: put all the docs member last.
38574         Reported by Bruno Haible.
38575         * lib/argmatch.h (argmatch_##Name##_group_type): Put the args
38576         member before the docs done.
38577         * doc/argmatch.texi, tests/test-argmatch.c: Adjust.
38579 2019-06-21  Akim Demaille  <akim@lrde.epita.fr>
38581         argmatch: add support to generate the usage message.
38582         * lib/argmatch.c: Move some #includes and gettext support to...
38583         * lib/argmatch.h: here.
38584         (ARGMATCH_DEFINE_GROUP): New macro.
38585         * tests/test-argmatch.c (argmatch_backup_docs, argmatch_backup_args)
38586         (argmatch_backup_group): New.
38587         (CHECK): New.
38588         (main): Check argmatch_backup_value, argmatch_backup_xvalue,
38589         argmatch_backup_argument and argmatch_backup_usage.
38590         * modules/argmatch: We depend on c99.
38591         * doc/argmatch.texi (Recognizing Option Arguments): New.
38592         * doc/gnulib.texi: Use it.
38594 2019-06-21  Bruno Haible  <bruno@clisp.org>
38596         thrd: Add comment.
38597         * lib/thrd.c (pthread_main_func): Add comment.
38599 2019-06-21  Bruno Haible  <bruno@clisp.org>
38601         threads-h: Define 'thread_local' if and only if it actually works.
38602         * m4/threads.m4 (gl_THREAD_LOCAL_DEFINITION): New macro.
38603         (gl_THREADS_H): Define _Thread_local to __thread also for ARM C, IBM C,
38604         Oracle Solaris Studio C. Compile a simple program, to see whether
38605         _Thread_local basically works. Set HAVE_THREAD_LOCAL and LIBTHREADLOCAL.
38606         (gl_THREADS_H_DEFAULTS): Initialize HAVE_THREAD_LOCAL.
38607         * lib/threads.in.h (thread_local): Undefine if it does not work.
38608         * modules/threads-h (Makefile.am): Substitute HAVE_THREAD_LOCAL.
38609         (Link): Mention LIBTHREADLOCAL.
38610         * tests/test-threads.c: Don't check that thread_local is defined.
38611         * tests/test-thread_local.c: New file.
38612         * modules/threads-h-tests (Files): Add it and macros.h.
38613         (Depends-on): Add thrd and stdint.
38614         (configure.ac): Test whether 'alarm' is declared.
38615         (Makefile.am): Arrange to build and link test-thread_local.
38616         * doc/posix-headers/threads.texi: Mention the platforms that don't
38617         support 'thread_local'.
38619 2019-06-20  Bruno Haible  <bruno@clisp.org>
38621         threads-h: Simplify link dependencies.
38622         * m4/threads.m4 (gl_THREADS_H): Bail out if Pth threading is requested.
38623         Don't set LTLIBSTDTHREAD.
38624         * modules/thrd (Link): Simplify accordingly.
38625         * modules/mtx (Link): Likewise.
38626         * modules/cnd (Link): Likewise.
38627         * modules/tss (Link): Likewise.
38628         * modules/threads (Link): Likewise.
38630 2019-06-20  Bruno Haible  <bruno@clisp.org>
38632         threads-h: Fix link error on FreeBSD 11.
38633         * m4/threads.m4 (gl_THREADS_H): When linking with -lstdthreads, link
38634         also with -lpthread.
38636 2019-06-20  Bruno Haible  <bruno@clisp.org>
38638         threadlib: Fix typo (regression from today).
38639         * m4/threadlib.m4 (gl_THREADLIB_BODY): Fix typo in comment marker.
38641 2019-06-20  Bruno Haible  <bruno@clisp.org>
38643         windows-thread, windows-tls: Fix compilation error on 32-bit mingw.
38644         * lib/windows-thread.c: Include <errno.h>.
38645         * lib/windows-tls.c: Likewise.
38647 2019-06-20  Bruno Haible  <bruno@clisp.org>
38649         tss tests: Small improvement.
38650         * tests/test-tss.c (test_tss): Pass a different id to each thread.
38652 2019-06-20  Bruno Haible  <bruno@clisp.org>
38654         threads: New module.
38655         * modules/threads: New file.
38657 2019-06-20  Bruno Haible  <bruno@clisp.org>
38659         tss: Add tests.
38660         * tests/test-tss.c: New file, based on tests/test-tls.c.
38661         * modules/tss-tests: New file.
38663 2019-06-20  Bruno Haible  <bruno@clisp.org>
38665         cnd: Add tests.
38666         * tests/test-cnd.c: New file, based on tests/test-cond.c.
38667         * modules/cnd-tests: New file.
38669 2019-06-20  Bruno Haible  <bruno@clisp.org>
38671         mtx: Add tests.
38672         * tests/test-mtx.c: New file, based on tests/test-lock.c.
38673         * tests/test-call_once.c: New file, based on tests/test-once.c.
38674         * modules/mtx-tests: New file.
38676 2019-06-20  Bruno Haible  <bruno@clisp.org>
38678         thrd: Add tests.
38679         * tests/test-thrd_create.c: New file, based on
38680         tests/test-thread_create.c.
38681         * tests/test-thrd_current.c: New file, based on
38682         tests/test-thread_self.c.
38683         * modules/thrd-tests: New file.
38685 2019-06-20  Bruno Haible  <bruno@clisp.org>
38687         tss: New module.
38688         * lib/tss.c: New file.
38689         * modules/tss: New file.
38690         * doc/posix-functions/tss_create.texi: Mention the new module.
38691         * doc/posix-functions/tss_set.texi: Likewise.
38692         * doc/posix-functions/tss_get.texi: Likewise.
38693         * doc/posix-functions/tss_delete.texi: Likewise.
38695 2019-06-20  Bruno Haible  <bruno@clisp.org>
38697         cnd: New module.
38698         * lib/cnd.c: New file.
38699         * modules/cnd: New file.
38700         * doc/posix-functions/cnd_init.texi: Mention the new module.
38701         * doc/posix-functions/cnd_wait.texi: Likewise.
38702         * doc/posix-functions/cnd_timedwait.texi: Likewise.
38703         * doc/posix-functions/cnd_signal.texi: Likewise.
38704         * doc/posix-functions/cnd_broadcast.texi: Likewise.
38705         * doc/posix-functions/cnd_destroy.texi: Likewise.
38707 2019-06-20  Bruno Haible  <bruno@clisp.org>
38709         mtx: New module.
38710         * lib/mtx.c: New file.
38711         * modules/mtx: New file.
38712         * doc/posix-functions/call_once.texi: Mention the new module.
38713         * doc/posix-functions/mtx_init.texi: Likewise.
38714         * doc/posix-functions/mtx_lock.texi: Likewise.
38715         * doc/posix-functions/mtx_trylock.texi: Likewise.
38716         * doc/posix-functions/mtx_timedlock.texi: Likewise.
38717         * doc/posix-functions/mtx_unlock.texi: Likewise.
38718         * doc/posix-functions/mtx_destroy.texi: Likewise.
38720 2019-06-20  Bruno Haible  <bruno@clisp.org>
38722         thrd: New module.
38723         * lib/thrd.c: New file.
38724         * m4/thrd.m4: New file.
38725         * modules/thrd: New file.
38726         * doc/posix-functions/thrd_current.texi: Mention the new module.
38727         * doc/posix-functions/thrd_detach.texi: Likewise.
38728         * doc/posix-functions/thrd_equal.texi: Likewise.
38729         * doc/posix-functions/thrd_exit.texi: Likewise.
38730         * doc/posix-functions/thrd_sleep.texi: Likewise.
38731         * doc/posix-functions/thrd_yield.texi: Likewise.
38732         * doc/posix-functions/thrd_create.texi: Mention the new module and the
38733         AIX bug.
38734         * doc/posix-functions/thrd_join.texi: Mention the new module and the
38735         AIX and Solaris bugs.
38737 2019-06-20  Bruno Haible  <bruno@clisp.org>
38739         threads-h: Add tests.
38740         * tests/test-threads.c: New file.
38741         * modules/threads-h-tests: New file.
38742         * tests/test-threads-c++.cc: New file.
38743         * modules/threads-h-c++-tests: New file.
38745 2019-06-20  Bruno Haible  <bruno@clisp.org>
38747         threads-h: New module.
38748         * lib/threads.in.h: New file.
38749         * m4/threads.m4: New file.
38750         * m4/yield.m4 (gl_YIELD): Update comment.
38751         * modules/threads-h: New file.
38752         * modules/yields (configure.ac): Use AC_REQUIRE.
38753         * doc/posix-headers/threads.texi: Mention the new module and the AIX
38754         bugs.
38756 2019-06-20  Bruno Haible  <bruno@clisp.org>
38758         windows-thread: New module.
38759         * lib/windows-thread.h: New file, based on lib/glthread/thread.h.
38760         * lib/windows-thread.c: New file, based on lib/glthread/thread.c.
38761         * lib/glthread/thread.h: Include windows-thread.h.
38762         (gl_thread_t): Define using glwthread_thread_t.
38763         (glthread_create): Define using glwthread_thread_create.
38764         (glthread_join): Define using glwthread_thread_join.
38765         (gl_thread_self): Define using glwthread_thread_self.
38766         (gl_thread_exit): Define using glwthread_thread_exit.
38767         (glthread_create_func, glthread_join_func, gl_thread_self_func,
38768         gl_thread_exit_func): Remove declarations.
38769         * lib/glthread/thread.c (self_key): Remove variable.
38770         (do_init_self_key, init_self_key): Remove functions.
38771         (struct gl_thread_struct): Remove type.
38772         (get_current_thread_handle, gl_thread_self_func, wrapper_func,
38773         glthread_create_func, glthread_join_func, gl_thread_exit_func): Remove
38774         functions.
38775         * modules/windows-thread: New file.
38776         * modules/thread (Depends-on): Add windows-thread.
38778 2019-06-20  Bruno Haible  <bruno@clisp.org>
38780         windows-tls: New module.
38781         * lib/windows-tls.h: New file, based on lib/glthread/tls.h.
38782         * lib/windows-tls.c: New file, based on lib/glthread/tls.h.
38783         * lib/glthread/tls.h: Include windows-tls.h.
38784         (gl_tls_key_t): Define using glwthread_tls_key_t.
38785         * modules/windows-tls: New file.
38786         * modules/tls (Depends-on): Add windows-tls.
38788 2019-06-20  Bruno Haible  <bruno@clisp.org>
38790         windows-cond: New module.
38791         * lib/windows-cond.h: New file, based on lib/glthread/cond.h.
38792         * lib/windows-cond.c: New file, based on lib/glthread/cond.c.
38793         * lib/glthread/cond.h: Include windows-cond.h.
38794         (struct gl_waitqueue_link, gl_linked_waitqueue_t): Remove types.
38795         (gl_cond_t): Define using glwthread_cond_t.
38796         (gl_cond_initializer): Define using GLWTHREAD_COND_INIT.
38797         (glthread_cond_init): Define using glwthread_cond_init.
38798         (glthread_cond_wait): Define using glwthread_cond_wait.
38799         (glthread_cond_timedwait): Define using glwthread_cond_timedwait.
38800         (glthread_cond_signal): Define using glwthread_cond_signal.
38801         (glthread_cond_broadcast): Define using glwthread_cond_broadcast.
38802         (glthread_cond_destroy): Define using glwthread_cond_destroy.
38803         (glthread_cond_init_func, glthread_cond_wait_func,
38804         glthread_cond_timedwait_func, glthread_cond_signal_func,
38805         glthread_cond_broadcast_func, glthread_cond_destroy_func): Remove
38806         declarations.
38807         * lib/glthread/cond.c (gl_waitqueue_t, gl_waitqueue_element): Remove
38808         types.
38809         (gl_waitqueue_init, gl_waitqueue_add, gl_waitqueue_remove,
38810         gl_waitqueue_notify_first, gl_waitqueue_notify_all,
38811         glthread_cond_init_func, glthread_cond_wait_func,
38812         glthread_cond_timedwait_func, glthread_cond_signal_func,
38813         glthread_cond_broadcast_func, glthread_cond_destroy_func): Remove
38814         functions.
38815         * modules/windows-cond: New file.
38816         * modules/cond (Depends-on): Add windows-cond. Remove gettimeofday.
38818 2019-06-20  Bruno Haible  <bruno@clisp.org>
38820         windows-timedrecmutex: New module.
38821         * lib/windows-timedrecmutex.h: New file, based on windows-recmutex.h.
38822         * lib/windows-timedrecmutex.c: New file, based on windows-recmutex.c.
38823         * modules/windows-timedrecmutex: New file.
38825 2019-06-20  Bruno Haible  <bruno@clisp.org>
38827         windows-timedmutex: New module.
38828         * lib/windows-timedmutex.h: New file, based on windows-mutex.h.
38829         * lib/windows-timedmutex.c: New file, based on windows-mutex.c.
38830         * modules/windows-timedmutex: New file.
38832 2019-06-20  Bruno Haible  <bruno@clisp.org>
38834         windows-recmutex: New module.
38835         * lib/windows-recmutex.h: New file, extracted from lib/glthread/lock.h.
38836         * lib/windows-recmutex.c: New file, extracted from lib/glthread/lock.c.
38837         * lib/glthread/lock.h: Include windows-recmutex.h.
38838         (gl_recursive_lock_t): Define using glwthread_recmutex_t.
38839         (gl_recursive_lock_initializer): Define using GLWTHREAD_RECMUTEX_INIT.
38840         (glthread_recursive_lock_init): Define using glwthread_recmutex_init.
38841         (glthread_recursive_lock_lock): Define using glwthread_recmutex_lock.
38842         (glthread_recursive_lock_unlock): Define using
38843         glwthread_recmutex_unlock.
38844         (glthread_recursive_lock_destroy): Define using
38845         glwthread_recmutex_destroy.
38846         (glthread_recursive_lock_init_func, glthread_recursive_lock_lock_func,
38847         glthread_recursive_lock_unlock_func,
38848         glthread_recursive_lock_destroy_func): Remove declarations.
38849         * lib/glthread/lock.c (glthread_recursive_lock_init_func,
38850         glthread_recursive_lock_lock_func, glthread_recursive_lock_unlock_func,
38851         glthread_recursive_lock_destroy_func): Remove functions.
38852         * modules/windows-recmutex: New file.
38853         * modules/lock (Depends-on): Add windows-recmutex.
38855 2019-06-20  Bruno Haible  <bruno@clisp.org>
38857         windows-mutex: New module.
38858         * lib/windows-mutex.h: New file, extracted from lib/glthread/lock.h.
38859         * lib/windows-mutex.c: New file, extracted from lib/glthread/lock.c.
38860         * lib/windows-spinlock.h: New file, extracted from lib/glthread/lock.h.
38861         * lib/glthread/lock.h: Include windows-spinlock.h, windows-mutex.h.
38862         (gl_spinlock_t): Remove type.
38863         (gl_lock_t): Define using glwthread_mutex_t.
38864         (gl_lock_initializer): Define using GLWTHREAD_MUTEX_INIT.
38865         (glthread_lock_init): Define using glwthread_mutex_init.
38866         (glthread_lock_lock): Define using glwthread_mutex_lock.
38867         (glthread_lock_unlock): Define using glwthread_mutex_unlock.
38868         (glthread_lock_destroy): Define using glwthread_mutex_destroy.
38869         (glthread_lock_init_func, glthread_lock_lock_func,
38870         glthread_lock_unlock_func, glthread_lock_destroy_func): Remove
38871         declarations.
38872         Use glwthread_spinlock_t instead of gl_spinlock_t.
38873         (gl_rwlock_initializer, gl_recursive_lock_initializer): Define using
38874         GLWTHREAD_SPINLOCK_INIT.
38875         * lib/glthread/lock.c (glthread_lock_init_func, glthread_lock_lock_func,
38876         glthread_lock_unlock_func, glthread_lock_destroy_func): Remove
38877         functions.
38878         * lib/glthread/cond.h: Use glwthread_spinlock_t instead of
38879         gl_spinlock_t.
38880         * modules/windows-mutex: New file.
38881         * modules/lock (Depends-on): Add windows-mutex.
38883 2019-06-20  Bruno Haible  <bruno@clisp.org>
38885         windows-once: New module.
38886         * lib/windows-once.h: New file, extracted from lib/glthread/lock.h.
38887         * lib/windows-once.c: New file, extracted from lib/glthread/lock.c.
38888         * lib/glthread/lock.h: Include windows-once.h.
38889         (gl_once_t): Define using glwthread_once_t.
38890         (gl_once_define): Define using GLWTHREAD_ONCE_INIT.
38891         (glthread_once): Define using glwthread_once.
38892         (glthread_once_func): Remove declaration.
38893         * lib/glthread/lock.c (glthread_once_func): Remove function.
38894         * modules/windows-once: New file.
38895         * modules/lock (Depends-on): Add windows-once.
38897 2019-06-20  Bruno Haible  <bruno@clisp.org>
38899         lock, cond: Avoid possible counter wraparound on Windows.
38900         * lib/glthread/lock.c (glthread_lock_lock_func): Leave the 'started'
38901         field of the guard unchanged if it was already positive.
38902         (glthread_rwlock_rdlock_func): Likewise.
38903         (glthread_rwlock_wrlock_func): Likewise.
38904         (glthread_recursive_lock_lock_func): Likewise.
38905         * lib/glthread/cond.c (glthread_cond_wait_func): Likewise.
38906         (glthread_cond_timedwait_func): Likewise.
38908 2019-06-20  Bruno Haible  <bruno@clisp.org>
38910         cond: Make glthread_cond_timedwait more reliable on Windows.
38911         * lib/glthread/cond.c (glthread_cond_timedwait_func): Initialize the
38912         condition variable before looking at the current time.
38914 2019-06-20  Bruno Haible  <bruno@clisp.org>
38916         pthread_mutex_timedlock: New module.
38917         * lib/pthread.in.h (pthread_mutex_timedlock): New dummy function and
38918         new declaration.
38919         * lib/pthread_mutex_timedlock.c: New file.
38920         * m4/pthread_mutex_timedlock.m4: New file.
38921         * m4/pthread.m4 (gl_PTHREAD_CHECK): Don't call AC_LIBOBJ here. Test
38922         whether pthread_mutex_timedlock is declared.
38923         (gl_PTHREAD_MODULE_INDICATOR): New macro.
38924         (gl_PTHREAD_DEFAULTS): Initialize GNULIB_PTHREAD_MUTEX_TIMEDLOCK,
38925         HAVE_PTHREAD_MUTEX_TIMEDLOCK.
38926         * modules/pthread (configure.ac): Call AC_LIBOBJ here.
38927         (Makefile.am): Substitute GNULIB_PTHREAD_MUTEX_TIMEDLOCK,
38928         HAVE_PTHREAD_MUTEX_TIMEDLOCK.
38929         * modules/pthread_mutex_timedlock: New file.
38930         * doc/posix-functions/pthread_mutex_timedlock.texi: Mention the new
38931         module.
38933 2019-06-20  Bruno Haible  <bruno@clisp.org>
38935         thread, lock, cond, tls: Recognize C11 multithreaded applications.
38936         * m4/threadlib.m4 (gl_THREADLIB_BODY): Test for <threads.h>.
38937         * lib/glthread/thread.h (c11_threads_in_use): New macro.
38938         (pthread_in_use, pth_in_use, thread_in_use): Use it.
38939         * lib/glthread/lock.h (c11_threads_in_use): New macro.
38940         (pthread_in_use, pth_in_use, thread_in_use): Use it.
38941         * lib/glthread/cond.h (c11_threads_in_use): New macro.
38942         (pthread_in_use, pth_in_use, thread_in_use): Use it.
38943         * lib/glthread/tls.h (c11_threads_in_use): New macro.
38944         (pthread_in_use, pth_in_use, thread_in_use): Use it.
38946 2019-06-20  Bruno Haible  <bruno@clisp.org>
38948         tls tests: Small improvements.
38949         * tests/test-tls.c: Include <stdint.h>.
38950         (worker_thread): Avoid gcc warning on 64-bit mingw.
38951         (test_tls): Pass a different id to each thread.
38952         * modules/tls-tests (Depends-on): Add stdint.
38954 2019-06-20  Bruno Haible  <bruno@clisp.org>
38956         cond tests: Simplify.
38957         * tests/test-cond.c (test_timedcond): Remove redundant assignment.
38959 2019-06-20  Bruno Haible  <bruno@clisp.org>
38961         lock tests: Avoid reference to undefined variable if !ENABLE_LOCKING.
38962         * tests/test-lock.c (test_once): Don't reference fire_signal if
38963         !ENABLE_LOCKING.
38965 2019-06-19  Bruno Haible  <bruno@clisp.org>
38967         nanosleep: Relicense under LGPLv2+.
38968         Approved by Jim Meyering, Paul Eggert, Eric Blake, Pádraig Brady.
38969         * modules/nanosleep (License): Change to LGPLv2+.
38971 2019-06-19  Bruno Haible  <bruno@clisp.org>
38973         Reorder pieces of header in perl scripts.
38974         The desired order is
38975         - Prologue part 1 (2 lines with #!)
38976         - Program short description
38977         - Copyright and license notice
38978         - Written-by notice
38979         - Program short description (optional)
38980         - Program long description (optional)
38981         - Prologue part 2
38982         - Time stamp
38983         - Code
38984         Reported by Paul Eggert.
38985         * build-aux/announce-gen: Reorder header.
38986         * build-aux/gitlog-to-changelog: Likewise.
38987         * build-aux/useless-if-before-free: Likewise.
38988         * build-aux/prefix-gnulib-mk: Add copyright notice and short
38989         description.
38990         * build-aux/update-copyright: Likewise. Add short description. Bump
38991         time-stamp-line-limit to 200.
38993 2019-06-18  Paul Eggert  <eggert@cs.ucla.edu>
38995         verify-tests: work around xlc bug
38996         Problem reported by Bruno Haible in:
38997         https://lists.gnu.org/r/bug-gnulib/2019-06/msg00049.html
38998         * tests/test-verify.c (item): Move the arithmetic inside the
38999         verify_expr, to avoid tickling a bug in IBM AIX xlc V12.1.
39001 2019-06-16  Bruno Haible  <bruno@clisp.org>
39003         Restore Emacs time-stamp hook applicability.
39004         Reported by Darshit Shah <darnir@gnu.org>.
39005         * build-aux/useless-if-before-free: Bump time-stamp-line-limit to 50.
39006         * build-aux/announce-gen: Likewise.
39007         * build-aux/gitlog-to-changelog: Likewise.
39008         * build-aux/prefix-gnulib-mk: Likewise.
39009         * build-aux/update-copyright: Likewise.
39011 2019-06-15  Bruno Haible  <bruno@clisp.org>
39013         Fix scripts to have valid executable format on Alpine Linux.
39014         Reported by Tim Rühsen <tim.ruehsen@gmx.de>.
39015         Idea by Paul Eggert.
39016         * build-aux/useless-if-before-free: Use a prologue that starts with
39017         '#!/bin/sh'.
39018         * build-aux/announce-gen: Likewise.
39019         * build-aux/gitlog-to-changelog: Likewise.
39020         * build-aux/prefix-gnulib-mk: Likewise.
39021         * build-aux/update-copyright: Likewise.
39022         * tests/test-update-copyright.sh: Update test program accordingly.
39024 2019-06-10  Bruno Haible  <bruno@clisp.org>
39026         nproc: Ensure nproc(NPROC_ALL) ≥ nproc(NPROC_CURRENT) with glibc ≥ 2.26.
39027         Reported by Nikita Ermakov <arei@altlinux.org> in
39028         <https://lists.gnu.org/archive/html/bug-gnulib/2019-06/msg00003.html>.
39029         * lib/nproc.c (num_processors_ignoring_omp): Treat a return value of
39030         sysconf (_SC_NPROCESSORS_CONF) == 2 like a return value == 1.
39032 2019-06-10  Bruno Haible  <bruno@clisp.org>
39034         posix_spawn_file_actions_addchdir: Fix possible use-after-free bug.
39035         * lib/spawn_int.h (struct __spawn_action): Remove 'const' from path.
39036         * lib/spawn_faction_addchdir.c (posix_spawn_file_actions_addchdir): Make
39037         a copy of the path argument.
39038         * lib/spawn_faction_destroy.c (posix_spawn_file_actions_destroy): Free
39039         it.
39041 2019-06-10  Bruno Haible  <bruno@clisp.org>
39043         posix_spawn_file_actions_addopen: Fix possible use-after-free bug.
39044         Reported at <https://sourceware.org/bugzilla/show_bug.cgi?id=17048>.
39045         * lib/spawn_int.h (struct __spawn_action): Remove 'const' from path.
39046         * lib/spawn_faction_addopen.c (posix_spawn_file_actions_addopen): Make
39047         a copy of the path argument.
39048         * lib/spawn_faction_destroy.c (posix_spawn_file_actions_destroy): Free
39049         it.
39051 2019-06-10  Bruno Haible  <bruno@clisp.org>
39053         posix_spawn_file_actions_addfchdir: Add tests.
39054         * tests/test-posix_spawn_file_actions_addfchdir.c: New file.
39055         * tests/test-posix_spawn5.c: New file.
39056         * modules/posix_spawn_file_actions_addfchdir-tests: New file.
39058 2019-06-10  Bruno Haible  <bruno@clisp.org>
39060         posix_spawn_file_actions_addfchdir: New module.
39061         * lib/spawn.in.h (posix_spawn_file_actions_addfchdir): New declaration.
39062         * lib/spawn_int.h (struct __spawn_action): Add tag 'spawn_do_fchdir' and
39063         union member 'fchdir_action'.
39064         * lib/spawn_faction_addfchdir.c: New file.
39065         * lib/spawni.c (__spawni): Implement the spawn_do_fchdir action.
39066         * m4/posix_spawn_faction_addfchdir.m4: New file.
39067         * m4/posix_spawn.m4 (gl_POSIX_SPAWN_BODY): Test whether module
39068         'posix_spawn_file_actions_addfchdir' is present and whether
39069         posix_spawn_file_actions_addfchdir_np exists. Set REPLACE_POSIX_SPAWN.
39070         * m4/spawn_h.m4 (gl_SPAWN_H): Test whether
39071         posix_spawn_file_actions_addfchdir is declared.
39072         (gl_SPAWN_H_DEFAULTS): Initialize
39073         GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR,
39074         HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR,
39075         REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR.
39076         * modules/spawn (Makefile.am): Substitute
39077         GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR,
39078         HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR,
39079         REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR.
39080         * modules/posix_spawn_file_actions_addfchdir: New file.
39081         * tests/test-spawn-c++.cc (posix_spawn_file_actions_addfchdir): Check
39082         signature.
39083         * doc/posix-functions/posix_spawn.texi: Mention the new module.
39084         * doc/posix-functions/posix_spawnp.texi: Likewise.
39085         * doc/glibc-functions/posix_spawn_file_actions_addfchdir_np.texi:
39086         Likewise.
39088 2019-06-10  Bruno Haible  <bruno@clisp.org>
39090         doc: Document existence of posix_spawn_file_actions_addchdir module.
39091         * doc/glibc-functions/posix_spawn_file_actions_addchdir_np.texi: Mention
39092         the posix_spawn_file_actions_addchdir module.
39094 2019-06-10  Bruno Haible  <bruno@clisp.org>
39096         posix_spawn-internal: Fix module description.
39097         * modules/posix_spawn (configure.ac): Move request to compile spawni.c
39098         from here...
39099         * modules/posix_spawnp (configure.ac): ... and here...
39100         * modules/posix_spawn-internal (configure.ac): ... to here.
39102 2019-06-10  Bruno Haible  <bruno@clisp.org>
39104         doc: Update and improve documentation of glibc functions.
39105         This is a series of commits that
39106         - updates the documentation to the state of glibc 2.29,
39107         - adds references to Linux man pages and glibc documentation,
39108         - marks Linux specific functions as such.
39109         These are the commits:
39110         doc: Update after removal of crypt functions from glibc 2.28.
39111         doc: Remove mention of function vm86 (does not exist on x86_64).
39112         doc: Remove mention of functions that are gone from glibc.
39113         doc: Mention that glibc no longer provides h_errno.
39114         doc: Mention the availability of specific functions in glibc versions.
39115         doc: Mention eaccess.
39116         doc: Add references to Linux man pages.
39117         doc: Add references to glibc documentation.
39118         doc: Mention inotify_* functions.
39119         doc: Mention ppoll.
39120         doc: Mention sched_getcpu.
39121         doc: Mention sync_file_range.
39122         doc: Mention epoll_pwait.
39123         doc: Mention eventfd, eventfd_read, eventfd_write.
39124         doc: Mention signalfd.
39125         doc: Mention timerfd_create, timerfd_gettime, timerfd_settime.
39126         doc: Mention epoll_create1.
39127         doc: Mention getauxval.
39128         doc: Mention pthread_getattr_default_np, pthread_setattr_default_np.
39129         doc: Mention nextdown, nextup.
39130         doc: Mention more ISO TS 18661-1 <math.h> functions.
39131         doc: Mention ISO TS 18661-1 <fenv.h> functions.
39132         doc: Mention getrandom, getentropy.
39133         doc: Mention strfromf, strfromd, strfroml.
39134         doc: Mention preadv2, pwritev2.
39135         doc: Mention copy_file_range.
39136         doc: Mention memfd_create.
39137         doc: Mention mlock2.
39138         doc: Mention pkey_alloc, pkey_set, pkey_get, pkey_free, pkey_mprotect.
39139         doc: Mention more ISO TS 18661-1 <math.h> functions.
39140         doc: Mention renameat2.
39141         doc: Mention statx.
39142         doc: Mention the ISO C11 multithreading header and functions.
39143         doc: Mention getcpu.
39144         doc: Mention posix_spawn_file_actions_add[f]chdir_np.
39145         doc: Some glibc functions also exist on IRIX 6.5 in 32-bit mode.
39146         doc: Some glibc functions also exist on FreeBSD, AIX, HP-UX, Solaris 11.
39147         doc: Some glibc functions also exist on FreeBSD, Solaris 11.
39148         doc: Some glibc functions also exist on Solaris 11.
39149         doc: Some glibc functions also exist on Solaris 11.4.
39150         doc: Some glibc functions also exist on FreeBSD.
39151         doc: Some glibc functions also exist on BeOS.
39152         doc: Some glibc functions also exist on Haiku.
39153         doc: Mark functions which exist only on Linux.
39154         doc: Mark functions which exist only on Linux and illumos.
39156 2019-06-06  Paul Eggert  <eggert@cs.ucla.edu>
39158         copy-file: fix typo
39159         * lib/copy-file.c (qcopy_file_preserving): Remove unused label.
39161         copy-file-range: simplify into a stub
39162         Based on a comment by Florian Weimer in:
39163         https://lists.gnu.org/r/bug-gnulib/2019-06/msg00007.html
39164         It turns out that Emacs (which will use this module) won’t need an
39165         emulation and I suspect other programs won’t either, because these
39166         programs will need to fall back on read+write anyway.  Perhaps I
39167         am wrong and other programs will be able to use an emulation; if
39168         so, this patch can be reverted.
39169         * lib/copy-file-range.c (COPY_FILE_RANGE): Replace with a stub.
39170         Just call it copy_file_range.
39171         * m4/copy-file-range.m4 (gl_FUNC_COPY_FILE_RANGE):
39172         Check via AC_LINK_IFELSE.
39173         * modules/copy-file-range (Depends-on): Remove modules no longer used.
39175 2019-06-04  Paul Eggert  <eggert@cs.ucla.edu>
39177         copy-file: prefer copy_file_range
39178         * lib/copy-file.c: Do not include xalloc.h.
39179         (qcopy_file_preserving): Allocate a buffer only if
39180         copy_file_range does not suffice.  If the allocation fails
39181         don't give up; just use a small stack-based buffer.
39182         Prefer copy_file_range if it works.
39183         * modules/copy-file (Depends-on): Add copy-file-range.
39184         Remove xalloc.
39186         copy-file-range: new module
39187         * MODULES.html.sh: Add copy-file-range.
39188         * lib/copy-file-range.c, m4/copy-file-range.m4:
39189         * modules/copy-file-range: New files.
39190         * lib/unistd.in.h (copy_file_range): Declare.
39191         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS):
39192         Set up GNULIB_COPY_FILE_RANGE and HAVE_COPY_FILE_RANGE.
39193         * modules/unistd (unistd.h): Substitute them.
39195 2019-05-28  Bruno Haible  <bruno@clisp.org>
39197         binary-io: Attempted use of O_BINARY on consoles no longer fails.
39198         Reported by KO Myung-Hun <komh78@gmail.com> in
39199         <https://lists.gnu.org/archive/html/bug-gnulib/2019-05/msg00124.html>.
39200         * lib/binary-io.h (__gl_setmode_check): Remove function.
39201         (set_binary_mode): Declare as notinline on DJGPP and EMX.
39202         * lib/binary-io.c (__gl_setmode_check): Remove function.
39203         (set_binary_mode): Define here on DJGPP and EMX. Inline
39204         __gl_setmode_check. In case of a tty, don't return an error code.
39206 2019-05-28  James Youngman  <jay@gnu.org>
39208         dirent-safer: Make opendir_safer usable from C++.
39209         * lib/dirent-safer.h: use extern "C".
39211 2019-05-28  James Youngman  <jay@gnu.org>
39213         canonicalize: Make canonicalize_filename_mode usable from C++.
39214         * lib/canonicalize.h: use extern "C".
39216 2019-05-26  Akim Demaille  <akim@lrde.epita.fr>
39218         prefix-gnulib-mk: Fix CPPFLAGS migration.
39219         * build-aux/prefix-gnulib-mk (prefix_assignment): Don't forget the
39220         _a part of the library name.
39222 2019-05-24  Paul Eggert  <eggert@cs.ucla.edu>
39224         flexmember: update comments again
39225         * lib/flexmember.h, m4/flexmember.m4: Improve comments further.
39227         flexmember: update comment
39228         * m4/flexmember.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER): Improve comment.
39230 2019-05-20  Bruno Haible  <bruno@clisp.org>
39232         setlocale: Improve fallback on macOS.
39233         * lib/setlocale.c (search): Optimize away a redundant strcmp()
39234         invocation.
39235         (locales_with_principal_territory): New array.
39236         (langcmp, get_main_locale_with_same_language): New functions.
39237         (locales_with_principal_language): New array.
39238         (terrcmp, get_main_locale_with_same_territory): New functions.
39239         (rpl_setlocale): When setlocale_single failed, try again with a locale
39240         that is more likely to exist. Don't warn if the environment variable
39241         SETLOCALE_VERBOSE is not set.
39243 2019-05-19  Bruno Haible  <bruno@clisp.org>
39245         localename: Fix default on macOS.
39246         * m4/intlmacosx.m4 (gt_INTL_MACOSX): Don't test for CFLocaleCopyCurrent.
39247         * lib/localename.c: Remove includes for HAVE_CFLOCALECOPYCURRENT.
39248         (gl_locale_name_environ, gl_locale_name_default): Remove code for
39249         HAVE_CFLOCALECOPYCURRENT.
39250         * lib/localename.h (gl_locale_name_default): Update.
39252 2019-05-19  Karl Berry  <karl@freefriends.org>
39254         * config/srclistvars.sh (TEXINFOTEX): make ftp.gnu.org be the
39255         source for texinfo.tex, replacing TEXINFOSRC, per Texinfo maintainer.
39256         * config/srclist.txt (texinfo.tex): use it. (Also doc changes.)
39258 2019-05-18  Akim Demaille  <akim@lrde.epita.fr>
39260         maintainer-makefile: catch uses of $< in non-implicit rules
39261         * top/maint.mk (sc_prohibit_magic_number_exit): New.
39263 2019-05-18  Bruno Haible  <bruno@clisp.org>
39265         threadlib: Provide an easy way to avoid mingw's winpthreads library.
39266         * m4/threadlib.m4 (gl_AVOID_WINPTHREAD): New macro.
39267         (gl_THREADLIB_EARLY_BODY): Recognize when it was invoked, and set
39268         gl_use_threads accordingly.
39270 2019-05-18  Bruno Haible  <bruno@clisp.org>
39272         pthread_sigmask: Fix compilation error with --enable-threads=windows.
39273         Reported by Tim Rühsen in
39274         <https://lists.gnu.org/archive/html/bug-gnulib/2018-01/msg00018.html>
39275         and Michele Locati in
39276         <https://lists.gnu.org/archive/html/bug-gettext/2019-04/msg00057.html>.
39277         * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK): Revert change from
39278         2015-06-01. Test whether pthread_sigmask is a macro, regardless of
39279         $LIBMULTITHREAD. Consider it regardless whether module 'threadlib' is
39280         in use and regardless which threads API is chosen.
39282 2019-05-14  Paul Eggert  <eggert@cs.ucla.edu>
39284         close-stream, closein, closeout: simplify
39285         I noticed this opportunity for simplification while drafting a
39286         new, related module that I haven’t had time to finish yet.
39287         * m4/close-stream.m4, m4/closein.m4, m4/closeout.m4: Remove.
39288         * modules/close-stream (Files): Remove m4/close-stream.m4.
39289         (configure.ac): Omit gl_CLOSE_STREAM.
39290         * modules/closein (Files): Remove m4/closein.m4
39291         (configure.ac): Omit gl_CLOSEIN.
39292         * modules/closeout (Files): Remove m4/closeout.m4.
39293         (configure.ac): Omit gl_CLOSEOUT.
39295 2019-05-12  Bruno Haible  <bruno@clisp.org>
39297         libtool-next-version: New program.
39298         * build-aux/libtool-next-version: New file.
39300 2019-05-11  John Darrington  <john@darrington.wattle.id.au>
39301             Bruno Haible  <bruno@clisp.org>
39303         version-etc: Ease translation.
39304         * lib/version-etc.c (version_etc_arn, emit_bug_reporting_address): Move
39305         URLs and formatting newlines out of translatable string.
39307 2019-05-11  Bruno Haible  <bruno@clisp.org>
39309         gnupload: Explain how to create symlinks.
39310         * build-aux/gnupload (usage): Add an example that creates symlinks.
39312 2019-05-11  Paul Eggert  <eggert@cs.ucla.edu>
39314         fpucw: port to gcc -pedantic
39315         * lib/fpucw.h (GET_FPUCW, SET_FPUCW):
39316         Use __extension__ if using ({ ... }).
39318         crypto/af_alg: port to strict C compilers
39319         * lib/af_alg.c: Include af_alg.h regardless, so that the
39320         compilation unit is nonempty.
39322 2019-05-10  Bruno Haible  <bruno@clisp.org>
39324         base64: Avoid false positive warning from Coverity.
39325         Reported by Kamil Dudka <kdudka@redhat.com>.
39326         Idea by Paul Eggert.
39327         * lib/base64.c (base64_encode_fast, base64_encode): Add a no-op
39328         '& 0x3f' to the array index expressions. This convinces Coverity that
39329         there is no out-of-bounds array reference, regardless of the input.
39331 2019-05-09  Bruno Haible  <bruno@clisp.org>
39333         gettext: Update to gettext 0.20.
39334         * modules/gettext (Files): Remove m4/codeset.m4, m4/fcntl-o.m4,
39335         m4/glibc2.m4, m4/glibc21.m4, m4/intdiv0.m4, m4/intl.m4, m4/intldir.m4,
39336         m4/intmax.m4, m4/inttypes_h.m4, m4/inttypes-pri.m4, m4/lcmessage.m4,
39337         m4/lock.m4, m4/longlong.m4, m4/printf-posix.m4, m4/size_max.m4,
39338         m4/stdint_h.m4, m4/threadlib.m4, m4/uintmax_t.m4, m4/visibility.m4,
39339         m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4. Add m4/host-cpu-c-abi.m4.
39340         (configure.ac): Request infrastructure compatible with gettext 0.20.
39341         * m4/glibc2.m4: Remove file.
39342         * m4/intdiv0.m4: Remove file.
39343         * m4/intl.m4: Remove file.
39344         * m4/intldir.m4: Remove file.
39345         * m4/intmax.m4: Remove file.
39346         * m4/printf-posix.m4: Remove file.
39347         * m4/uintmax_t.m4: Remove file.
39348         * m4/gettext.m4: Update from gettext 0.20.
39349         * m4/po.m4: Likewise.
39351 2019-05-09  Paul Eggert  <eggert@cs.ucla.edu>
39353         verify: remove verify_true
39354         * NEWS: Mention this.
39355         * lib/verify.h (verify_true): Remove.
39356         * tests/test-verify.c (item): Test verify_expr, not verify_true.
39358         Support C2x and C++17 static_assert
39359         C2x and C++17 finally added support for a simple, single-argument
39360         ‘static_assert’ that implements what the Gnulib ‘verify’ macro was
39361         doing back in 2005.  Implement static_assert on older platforms.
39362         The only remaining advantage of ‘verify’ is a shorter name.
39363         * doc/posix-headers/assert.texi (assert.h):
39364         * doc/verify.texi (Compile-time Assertions):
39365         Modernize for C2x and C++17.
39366         * lib/verify.h (_GL_HAVE__STATIC_ASSERT1, _GL_HAVE_STATIC_ASSERT1):
39367         New macros.
39368         (_GL_HAVE__STATIC_ASSERT): Remove.
39369         (_GL_HAVE__STATIC_ASSERT): Rely more heavily on __STDC_VERSION__.
39370         (_GL_VERIFY_TRUE, _GL_VERIFY_TYPE): Remove 2nd arg, the diagnostic
39371         string.  All callers changed.
39372         (_GL_VERIFY): Require 3 or more args, of which only the first 2
39373         are used.  All callers changed.
39374         (_Static_assert): Allow either 1 or 2 args, and define if
39375         !_GL_HAVE__STATIC_ASSERT1 instead of defining if
39376         !_GL_HAVE__STATIC_ASSERT.
39377         (static_assert): Define if !_GL_HAVE_STATIC_ASSERT1 instead
39378         of defining if !_GL_HAVE_STATIC_ASSERT.
39379         (verify_expr, verify): Don’t bother trying to copy the expression
39380         into the diagnostic, since 1-argument static_assert doesn’t.
39381         (verify): Prefer 1-argument _Static_assert if it works.
39382         * m4/assert_h.m4 (gl_ASSERT_H): Check for 1-argument static_assert.
39384 2019-05-08  Paul Eggert  <eggert@cs.ucla.edu>
39386         Fix _GL_HAVE__STATIC_ASSERT typo
39387         * lib/verify.h (_Static_assert): For the FreeBSD workaround,
39388         use _GL_HAVE__STATIC_ASSERT, not _GL_HAVE_STATIC_ASSERT.
39390 2019-05-05  Bruno Haible  <bruno@clisp.org>
39392         wcwidth: Ensure width 1, not 2, for ambiguous characters.
39393         Reported by Kiyoshi KANAZAWA <yoi_no_myoujou@yahoo.co.jp>
39394         via Akim Demaille <akim.demaille@gmail.com>.
39395         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Check the width of U+2202. Use an
39396         en_US.UTF-8 locale, since that is more likely to be present than an
39397         fr_FR.UTF-8 locale.
39398         * tests/test-wcwidth.c (main): Check the width of U+2202.
39399         * doc/posix-functions/wcwidth.texi: Mention the issue.
39401 2019-05-03  Paul Eggert  <eggert@cs.ucla.edu>
39403         Port manywarnings to GCC 9
39404         * build-aux/gcc-warning.spec: Sort.  Add -Wattribute-alias,
39405         -Wc11-c2x-compat, -Wcast-result (for the D programming language),
39406         -Wclass-conversion, -Wdeprecated-copy, -Wdeprecated-copy-dtor,
39407         -Winit-list-lifetime, -Wpessimizing-move, -Wprio-ctor-dtor,
39408         -Wredundant-move.  Adjust to minor wording changes in GCC 9’s
39409         --help=warnings output.
39410         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Add -Wabsolute-value,
39411         -Waddress-of-packed-member, -Wattribute-warning, -Wcannot-profile,
39412         -Wmissing-profile.  Change -Wattribute-alias to -Wattribute-alias=2.
39414 2019-04-30  Paul Eggert  <eggert@cs.ucla.edu>
39416         Sync lib/mktime-internal.h from glibc
39417         * config/srclist.txt: Add entry for lib/mktime-internal.h.
39418         * lib/mktime-internal.h: Autoupdate.
39420 2019-04-28  Bruno Haible  <bruno@clisp.org>
39422         tls tests: Prevent that the test takes too long.
39423         * tests/test-tls.c: Include <signal.h>, <unistd.h>.
39424         (main): Let the test fail if it takes more than 10 minutes.
39425         * modules/tls-tests (configure.ac): Test whether 'alarm' is declared.
39427 2019-04-27  Bruno Haible  <bruno@clisp.org>
39429         lock tests: Prevent that the test takes too long.
39430         * tests/test-lock.c: Include <signal.h>, <unistd.h>.
39431         (main): Let the test fail if it takes more than 10 minutes.
39432         * modules/lock-tests (configure.ac): Test whether 'alarm' is declared.
39434 2019-04-27  Bruno Haible  <bruno@clisp.org>
39436         localename: Fix crash on mingw (regression from 2018-11-23).
39437         * lib/localename.c (gl_locale_name_posix): Don't attempt to convert a
39438         locale name that is null.
39440 2019-04-27  Bruno Haible  <bruno@clisp.org>
39442         Fix gcc warnings on 64-bit mode mingw.
39443         * lib/clean-temp.c: Include <stdint.h> instead of defining uintptr_t.
39444         * lib/gl_array_list.c: Likewise.
39445         * lib/gl_array_map.c: Likewise.
39446         * lib/gl_array_set.c: Likewise.
39447         * lib/gl_carray_list.c: Likewise.
39448         * lib/gl_sublist.c: Likewise.
39449         * lib/gl_avltreehash_list.c (uintptr_t): Remove definition.
39450         * lib/gl_rbtreehash_list.c (uintptr_t): Likewise.
39451         * lib/gl_hash_map.c (uintptr_t): Likewise.
39452         * lib/gl_hash_set.c (uintptr_t): Likewise.
39453         * lib/gl_linkedhash_list.c (uintptr_t): Likewise.
39454         * lib/gl_linkedhash_map.c (uintptr_t): Likewise.
39455         * lib/gl_linkedhash_set.c (uintptr_t): Likewise.
39456         * lib/iconv.c (uintptr_t): Likewise.
39457         * lib/iconv_close.c (uintptr_t): Likewise.
39458         * tests/test-lock.c: Include <stdint.h>.
39459         (once_contender_thread, test_once): Cast through 'intptr_t' instead of
39460         'long'.
39461         * modules/clean-temp (Depends-on): Add stdint.
39462         * modules/array-list (Depends-on): Likewise.
39463         * modules/array-map (Depends-on): Likewise.
39464         * modules/array-set (Depends-on): Likewise.
39465         * modules/carray-list (Depends-on): Likewise.
39466         * modules/sublist (Depends-on): Likewise.
39467         * modules/lock-tests (Depends-on): Likewise.
39469 2019-04-27  Bruno Haible  <bruno@clisp.org>
39471         error: Tweak indentation.
39472         * lib/error.c: Correct indentation.
39474 2019-04-27  Bruno Haible  <bruno@clisp.org>
39476         term-style-control: Fix gcc warning on mingw.
39477         * lib/term-style-control.c (ensure_other_signal_handlers): Reduce scope
39478         of i.
39480 2019-04-26  Bruno Haible  <bruno@clisp.org>
39482         pipe-filter-gi, pipe-filter-ii: Fix gcc warning.
39483         * lib/pipe-filter-aux.h (read): Undefine before redefinition.
39485 2019-04-26  Bruno Haible  <bruno@clisp.org>
39487         relocatable-prog: Fix gcc warning on mingw.
39488         * lib/progreloc.c (maybe_executable): Don't define on native Windows and
39489         on EMX.
39491 2019-04-02  Bruno Haible  <bruno@clisp.org>
39493         gitsub.sh: New file.
39494         * top/gitsub.sh: New file.
39496 2019-04-18  Akim Demaille  <akim@lrde.epita.fr>
39498         argmatch: use void* for raw memory pointers
39499         * lib/argmatch.h, lib/argmatch.c (argmatch, argmatch_valid)
39500         (__xargmatch_internal, argmatch_to_argument): Use void* for pointers
39501         to "values", keep char* for strings.
39503 2019-04-21  Akim Demaille  <akim@lrde.epita.fr>
39505         prefix-gnulib-mk: fix the support for gnulib-po
39506         * build-aux/prefix-gnulib-mk (prefix_assignment): Remove useless $res.
39507         Don't touch HAVE_* variables.
39508         Map AM_CPPFLAGS and AM_CPPFLAGS to the library's corresponding variables.
39510 2019-04-18  Bernhard Voelker  <mail@bernhard-voelker.de>
39512         di-set: allow free with 'ino_map' being NULL.
39513         * lib/di-set.c (di_set_free): Avoid ino_map_free() when dis->ino_map
39514         is NULL.  Bug introduced in commit 3703dbbe88dd.
39515         * tests/test-di-set.c: Add di_set_free() right after di_set_alloc()
39516         as a test.
39518 2019-04-14  Paul Eggert  <eggert@cs.ucla.edu>
39520         * lib/str-two-way.h: Fix comment typo.
39522 2019-04-13  Bruno Haible  <bruno@clisp.org>
39524         x-to-1: Restore ability to use original calling convention.
39525         * build-aux/x-to-1.in: Add comments. Accept the original form of
39526         HELP2MAN argument as well as the form expected since 2012-12-12.
39528 2019-04-13  Bruno Haible  <bruno@clisp.org>
39530         x-to-1: Avoid failure due to missing perl modules.
39531         * build-aux/x-to-1.in: Test whether all the perl modules that help2man
39532         needs are installed.
39534 2019-04-13  Bruno Haible  <bruno@clisp.org>
39536         openmp-init: New module.
39537         * modules/openmp-init: New file.
39538         * modules/openmp: (Files, Depends-on, configure.ac, Makefile.am): Revert
39539         the changes from 2019-04-09.
39541 2019-04-12  Bruno Haible  <bruno@clisp.org>
39543         signbit: Fix compilation error when gnulib's math.h exists twice.
39544         * lib/math.in.h (GNULIB_defined_signbit): New macro.
39546 2019-04-12  Bruno Haible  <bruno@clisp.org>
39548         openmp: Fix compilation error on platforms without OpenMP.
39549         * lib/omp-init.c: Include <omp.h> only if _OPENMP.
39551 2019-04-09  Bernhard Voelker  <mail@bernhard-voelker.de>
39553         mountlist: make parsing /proc/self/mountinfo more robust
39554         Cater for the following issues with mountinfo parsing (the first
39555         one was reported by Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
39556         in <https://bugs.gnu.org/35137>).
39557         1. The fields source, target, mntroot and fstype may contain characters
39558         like '\r'; sscanf(3) fails to read such values with the %s format
39559         specifier because it would stop at such characters.
39560         Example: "mount -t tmpfs tmpfs /foo^Mbar".
39561         The only true separator in that file is the ' ' character.
39562         2. The source field may be an empty string, which happens e.g. with
39563         "mount -t tmpfs '' /target".
39564         3. The fstype field may contain mangled characters as well which need
39565         unescaping.
39566         * lib/mountlist.c (terminate_at_blank): Add utility function.
39567         (read_file_system_list): In the block trying to read the mountinfo file,
39568         avoid using sscanf(3) with %s format; instead, parse the above fields
39569         separated by spaces one by one.
39570         This also handles the case when the source field is an empty string.
39571         Unescape the fstype field.
39573 2019-04-09  Bruno Haible  <bruno@clisp.org>
39575         openmp: Add workaround for 32-bit programs on AIX.
39576         * lib/omp.in.h: New file.
39577         * lib/omp-init.c: New file, based on lib/nproc.c.
39578         * m4/omp_h.m4: New file.
39579         * modules/openmp (Files): Add them.
39580         (Depends-on): Add include_next, c-ctype, setenv.
39581         (configure.ac): Invoke gl_OMP_H.
39582         (Makefile.am): Add rules to create omp.h and compile omp-init.c.
39583         (Include): Mention <omp.h>.
39585 2019-04-09  Bruno Haible  <bruno@clisp.org>
39587         nproc: Fix return value for privileged processes.
39588         * lib/nproc.c (num_processors_ignoring_omp): Test getuid(), not
39589         getpid().
39591 2019-04-07  Bruno Haible  <bruno@clisp.org>
39593         Add copyright notices in several files.
39594         Reported by <ineiev@gnu.org> in <https://savannah.gnu.org/bugs/?54809>.
39595         * lib/_Noreturn.h: Add LGPLv2+ copyright notice.
39596         * lib/libunistring.valgrind: Likewise.
39597         * lib/iconv_open-*.gperf: Add GPLv2+ copyright notice.
39598         * lib/uniname/gen-uninames.lisp: Add GPLv3+ copyright notice.
39599         * lib/memchr.valgrind: Likewise.
39600         * lib/memchr2.valgrind: Likewise.
39601         * lib/rawmemchr.valgrind: Likewise.
39602         * lib/relocatable.valgrind: Likewise.
39603         * lib/strchrnul.valgrind: Likewise.
39605 2019-03-25  Bruno Haible  <bruno@clisp.org>
39607         term-style-control tests: Fix link error.
39608         Reported by Tom G. Christensen in
39609         <https://lists.gnu.org/archive/html/bug-gnulib/2019-03/msg00108.html>.
39610         * modules/term-style-control-tests (Makefile.am): Link
39611         test-term-style-control-hello and test-term-style-control-yes against
39612         LIBINTL.
39614 2019-03-24  Bruno Haible  <bruno@clisp.org>
39616         term-style-control: Add tests.
39617         * tests/test-term-style-control-hello.c: New file.
39618         * tests/test-term-style-control-yes.c: New file.
39619         * modules/term-style-control-tests: New file.
39621         term-style-control: New module.
39622         * lib/term-style-control.h: New file, based on libtextstyle's
39623         term-ostream.oo.h and term-ostream.oo.c.
39624         * lib/term-style-control.c: New file, based on libtextstyle's
39625         term-ostream.oo.c.
39626         * modules/term-style-control: New file.
39628 2019-03-22  Akim Demaille  <akim@lrde.epita.fr>
39630         _Noreturn: beware of C's _Noreturn in C++ pre C++11.
39631         * lib/_Noreturn.h, m4/gnulib-common.m4: Using C's _Noreturn in
39632         C++98 appears to be supported by Clang, but not by GCC nor ICC.
39634 2019-03-23  Bruno Haible  <bruno@clisp.org>
39636         Support cross-compilation to musl libc.
39637         Reported by Necktwi Ozfguah <necktwi@ferryfair.com>.
39638         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Add cross-compilation guesses for
39639         musl libc.
39640         * m4/canonicalize.m4 (gl_FUNC_REALPATH_WORKS): Likewise.
39641         * m4/cbrtl.m4 (gl_FUNC_CBRTL): Likewise.
39642         * m4/ceil.m4 (gl_FUNC_CEIL): Likewise.
39643         * m4/ceilf.m4 (gl_FUNC_CEILF): Likewise.
39644         * m4/ceill.m4 (gl_FUNC_CEILL): Likewise.
39645         * m4/chown.m4 (gl_FUNC_CHOWN): Likewise.
39646         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
39647         * m4/exp2l.m4 (gl_FUNC_EXP2L): Likewise.
39648         * m4/expl.m4 (gl_FUNC_EXPL): Likewise.
39649         * m4/expm1.m4 (gl_FUNC_EXPM1): Likewise.
39650         * m4/expm1l.m4 (gl_FUNC_EXPM1L): Likewise.
39651         * m4/fdopendir.m4 (gl_FUNC_FDOPENDIR): Likewise.
39652         * m4/floor.m4 (gl_FUNC_FLOOR): Likewise.
39653         * m4/floorf.m4 (gl_FUNC_FLOORF): Likewise.
39654         * m4/fmod.m4 (gl_FUNC_FMOD): Likewise.
39655         * m4/fmodf.m4 (gl_FUNC_FMODF): Likewise.
39656         * m4/fmodl.m4 (gl_FUNC_FMODL): Likewise.
39657         * m4/fnmatch.m4 (gl_FUNC_FNMATCH_POSIX): Likewise.
39658         * m4/fpurge.m4 (gl_FUNC_FPURGE): Likewise.
39659         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Likewise.
39660         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): Likewise.
39661         * m4/getdelim.m4 (gl_FUNC_GETDELIM): Likewise.
39662         * m4/getgroups.m4 (AC_FUNC_GETGROUPS, gl_FUNC_GETGROUPS): Likewise.
39663         * m4/getline.m4 (gl_FUNC_GETLINE): Likewise.
39664         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY_CLOBBER): Likewise.
39665         * m4/hypot.m4 (gl_FUNC_HYPOT): Likewise.
39666         * m4/hypotf.m4 (gl_FUNC_HYPOTF): Likewise.
39667         * m4/hypotl.m4 (gl_FUNC_HYPOTL): Likewise.
39668         * m4/iconv_open-utf.m4 (gl_FUNC_ICONV_OPEN_UTF_SUPPORT): Likewise.
39669         * m4/link-follow.m4 (gl_FUNC_LINK_FOLLOWS_SYMLINK): Likewise.
39670         * m4/log.m4 (gl_FUNC_LOG): Likewise.
39671         * m4/logf.m4 (gl_FUNC_LOGF): Likewise.
39672         * m4/logl.m4 (gl_FUNC_LOGL_WORKS): Likewise.
39673         * m4/log10.m4 (gl_FUNC_LOG10): Likewise.
39674         * m4/log10f.m4 (gl_FUNC_LOG10F): Likewise.
39675         * m4/log10l.m4 (gl_FUNC_LOG10L): Likewise.
39676         * m4/log1p.m4 (gl_FUNC_LOG1P): Likewise.
39677         * m4/log1pf.m4 (gl_FUNC_LOG1PF): Likewise.
39678         * m4/log1pl.m4 (gl_FUNC_LOG1PL): Likewise.
39679         * m4/log2.m4 (gl_FUNC_LOG2): Likewise.
39680         * m4/log2f.m4 (gl_FUNC_LOG2F): Likewise.
39681         * m4/malloc.m4 (_AC_FUNC_MALLOC_IF): Likewise.
39682         * m4/mkdir.m4 (gl_FUNC_MKDIR): Likewise.
39683         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Likewise.
39684         * m4/modf.m4 (gl_FUNC_MODF): Likewise.
39685         * m4/modff.m4 (gl_FUNC_MODFF): Likewise.
39686         * m4/modfl.m4 (gl_FUNC_MODFL): Likewise.
39687         * m4/perror.m4 (gl_FUNC_PERROR): Likewise.
39688         * m4/printf.m4 (gl_PRINTF_SIZES_C99, gl_PRINTF_INFINITE,
39689         gl_PRINTF_INFINITE_LONG_DOUBLE, gl_PRINTF_DIRECTIVE_A,
39690         gl_PRINTF_DIRECTIVE_F, gl_PRINTF_FLAG_ZERO, gl_SNPRINTF_TRUNCATION_C99,
39691         gl_SNPRINTF_RETVAL_C99, gl_SNPRINTF_DIRECTIVE_N,
39692         gl_VSNPRINTF_ZEROSIZE_C99): Likewise.
39693         * m4/ptsname.m4 (gl_FUNC_PTSNAME): Likewise.
39694         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
39695         * m4/realloc.m4 (_AC_FUNC_REALLOC_IF): Likewise.
39696         * m4/remainder.m4 (gl_FUNC_REMAINDER): Likewise.
39697         * m4/remainderf.m4 (gl_FUNC_REMAINDERF): Likewise.
39698         * m4/remainderl.m4 (gl_FUNC_REMAINDERL): Likewise.
39699         * m4/rintl.m4 (gl_FUNC_RINTL): Likewise.
39700         * m4/round.m4 (gl_FUNC_ROUND): Likewise.
39701         * m4/roundf.m4 (gl_FUNC_ROUNDF): Likewise.
39702         * m4/roundl.m4 (gl_FUNC_ROUNDL): Likewise.
39703         * m4/setenv.m4 (gl_FUNC_SETENV): Likewise.
39704         * m4/signbit.m4 (gl_SIGNBIT): Likewise.
39705         * m4/sleep.m4 (gl_FUNC_SLEEP): Likewise.
39706         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
39707         * m4/strerror.m4 (gl_FUNC_STRERROR, gl_FUNC_STRERROR_0): Likewise.
39708         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
39709         * m4/strtold.m4 (gl_FUNC_STRTOLD): Likewise.
39710         * m4/trunc.m4 (gl_FUNC_TRUNC): Likewise.
39711         * m4/truncf.m4 (gl_FUNC_TRUNCF): Likewise.
39712         * m4/truncl.m4 (gl_FUNC_TRUNCL): Likewise.
39713         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Likewise.
39714         * m4/ungetc.m4 (gl_FUNC_UNGETC_WORKS): Likewise.
39715         * m4/usleep.m4 (gl_FUNC_USLEEP): Likewise.
39716         * m4/utimes.m4 (gl_FUNC_UTIMES): Likewise.
39717         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
39719 2019-03-23  Bruno Haible  <bruno@clisp.org>
39721         posix_spawn_file_actions_*: Document musl libc bugs.
39722         * doc/posix-functions/posix_spawn_file_actions_addclose.texi: Mention
39723         the bug.
39724         * doc/posix-functions/posix_spawn_file_actions_adddup2.texi: Likewise.
39725         * doc/posix-functions/posix_spawn_file_actions_addopen.texi: Likewise.
39726         * m4/posix_spawn.m4 (gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE): When
39727         cross-compiling to a musl system, guess no.
39728         (gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2): Likewise.
39729         (gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN): Likewise.
39731 2019-03-23  Bruno Haible  <bruno@clisp.org>
39733         futimens: Document musl libc bug.
39734         * doc/posix-functions/futimens.texi: Mention the bug.
39735         * m4/futimens.m4 (gl_FUNC_FUTIMENS): Require AC_CANONICAL_HOST. When
39736         cross-compiling, guess no on glibc and musl systems.
39738 2019-03-23  Bruno Haible  <bruno@clisp.org>
39740         Clarify that cross-compilation guesses are guesses.
39741         * m4/chown.m4 (gl_FUNC_CHOWN_FOLLOWS_SYMLINK): When cross-compiling, add
39742         prefix 'guessing ' to gl_cv_func_chown_follows_symlink.
39743         * m4/fchownat.m4 (gl_FUNC_FCHOWNAT_DEREF_BUG): When cross-compiling, add
39744         prefix 'guessing ' to gl_cv_func_fchownat_nofollow_works.
39745         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): When
39746         cross-compiling, add prefix 'guessing ' to gl_cv_func_getcwd_abort_bug.
39747         * m4/glob.m4 (gl_GLOB): When cross-compiling, add prefix 'guessing ' to
39748         gl_cv_glob_lists_symlinks.
39749         * m4/malloc.m4 (_AC_FUNC_MALLOC_IF): When cross-compiling, add prefix
39750         'guessing ' to ac_cv_func_malloc_0_nonnull.
39751         * m4/realloc.m4 (_AC_FUNC_REALLOC_IF): When cross-compiling, add prefix
39752         'guessing ' to ac_cv_func_realloc_0_nonnull.
39753         * m4/poll.m4 (gl_FUNC_POLL): When cross-compiling, add prefix
39754         'guessing ' to gl_cv_func_poll.
39755         * m4/iconv_open-utf.m4 (gl_FUNC_ICONV_OPEN_UTF_SUPPORT): When cross-
39756         compiling, add prefix 'guessing ' to gl_cv_func_iconv_supports_utf.
39757         * m4/iconv_open.m4 (gl_FUNC_ICONV_OPEN): Update accordingly.
39759 2019-03-23  Bruno Haible  <bruno@clisp.org>
39761         strtold: Fix typo.
39762         * m4/strtold.m4 (gl_FUNC_STRTOLD): Fix typo in variable name.
39764 2019-03-23  Bruno Haible  <bruno@clisp.org>
39766         noreturn: In C++ mode with clang, use _Noreturn as fallback.
39767         Reported by Akim Demaille.
39768         * lib/noreturn.h (_GL_NORETURN_FUNC): In C++ mode with clang, when
39769         [[noreturn]] would not work, use _Noreturn instead.
39771 2019-03-22  Akim Demaille  <akim@lrde.epita.fr>
39773         libtextstyle-optional: Fix compiler warnings.
39774         * lib/textstyle.in.h (html_styled_ostream_create): Flag arguments
39775         as unused.
39777 2019-03-19  Akim Demaille  <akim@lrde.epita.fr>
39779         bitset: fix memory leaks
39780         Reported by Bruno Haible.
39781         https://lists.gnu.org/archive/html/bug-gnulib/2019-03/msg00027.html
39782         * lib/bitset/vector.c (vbitset_free): New.
39783         (vbitset_vtable): Use it.
39785 2019-03-19  Akim Demaille  <akim@lrde.epita.fr>
39787         bitset: minor changes
39788         * lib/bitset/base.h (bitset_alloc_type): Remove, unused.
39789         * lib/bitset/table.c: Formatting changes.
39790         Remove useless braces.
39791         Prefer using else in cascades of if/else-if with returns.
39792         * lib/bitset/vector.c: Reduce scopes.
39794 2019-03-19  Akim Demaille  <akim@lrde.epita.fr>
39796         bitset: expose bitset_resize
39797         * lib/bitset.h (bitset_resize): Bounce on the polymorphic implementation.
39798         * tests/test-bitset.c (check_attributes): Check bitset_resize.
39799         (main): Use a variable bitset as reference, since fixed does not support resize.
39801 2019-03-19  Bruno Haible  <bruno@clisp.org>
39803         doc: Document the 'stdnoreturn' and 'noreturn' modules.
39804         Reported by Akim Demaille.
39805         * doc/noreturn.texi: New file.
39806         * doc/gnulib.texi: Include it.
39808 2019-03-19  Bruno Haible  <bruno@clisp.org>
39810         doc: Document how to use 'static inline'.
39811         * doc/static-inline.texi: New file.
39812         * doc/gnulib.texi: Include it.
39814 2019-03-19  Bruno Haible  <bruno@clisp.org>
39816         libtextstyle-optional: Add tests.
39817         * tests/test-libtextstyle.c: New file, based on libtextstyle's
39818         adhoc-tests/hello.c.
39819         * tests/test-libtextstyle-default.css: New file, copied from
39820         libtextstyle's adhoc-tests/hello-default.css.
39821         * modules/libtextstyle-optional-tests: New file.
39823         libtextstyle-optional: New module.
39824         * lib/textstyle.in.h: New file, based on libtextstyle's textstyle.h.
39825         * m4/libtextstyle-optional.m4: New file, based on m4/libtextstyle.m4.
39826         * modules/libtextstyle-optional: New file.
39828 2019-03-19  Bruno Haible  <bruno@clisp.org>
39830         c-stack: Make signal handlers more reliable.
39831         * lib/c-stack.c (progname): New variable.
39832         (die): Use it.
39833         (c_stack_action): Initialize it.
39834         (segv_handler): Save and restore errno.
39836 2019-03-19  Bruno Haible  <bruno@clisp.org>
39838         Help making signal handlers more reliable.
39839         * m4/gnulib-common.m4 (gl_COMMON_BODY): Emit definition of
39840         _GL_ASYNC_SAFE into config.h.
39841         * lib/nanosleep.c (sighandler): Mark as _GL_ASYNC_SAFE.
39842         * lib/fatal-signal.h (at_fatal_signal): Add _GL_ASYNC_SAFE marker to
39843         argument.
39844         * lib/fatal-signal.c (action_t, uninstall_handlers,
39845         fatal_signal_handler): Mark as _GL_ASYNC_SAFE.
39846         * lib/clean-temp.c (cleanup_action): Mark as _GL_ASYNC_SAFE.
39847         * lib/wait-process.c (cleanup_slaves, cleanup_slaves_action): Mark as
39848         _GL_ASYNC_SAFE.
39849         * lib/c-stack.h (c_stack_action): Add _GL_ASYNC_SAFE marker to argument.
39850         * lib/c-stack.c: Add _GL_ASYNC_SAFE markers.
39852 2019-03-18  Bruno Haible  <bruno@clisp.org>
39854         _Noreturn: clang and MSVC do support [[noreturn]] in C++11 mode.
39855         * lib/_Noreturn.h: Use [[noreturn]] if __GNUC__ and __GNUC_MINOR__
39856         indicate clang, or if _MSC_VER indicates MSVC++ 14.0 or newer.
39858 2019-03-17  Akim Demaille  <akim@lrde.epita.fr>
39860         _Noreturn: GCC 4.7 does not support [[noreturn]] in C++11 mode
39861         * lib/_Noreturn.h, m4/gnulib-common.m4: Don't use [[noreturn]] before
39862         GCC 4.8.
39864 2019-03-17  Paul Eggert  <eggert@cs.ucla.edu>
39866         fts: minor simplification
39867         * lib/fts.c (fts_safe_changedir): Remove redundant assignment.
39869 2019-03-17  Akim Demaille  <akim@lrde.epita.fr>
39871         bitset, timevar: Depend on c99.
39872         Reported by Bruno Haible.
39873         * modules/bitset, modules/timevar (Depends-on): Add c99.
39875 2019-03-16  Akim Demaille  <akim@lrde.epita.fr>
39877         bitset: a bit (...) more tests
39878         * tests/test-bitset.c (check_attributes): Check zero and ones.
39880 2019-03-16  Akim Demaille  <akim@lrde.epita.fr>
39882         bitset: fix overflows.
39883         Reported by Bruno Haible.
39884         https://lists.gnu.org/archive/html/bug-gnulib/2019-03/msg00017.html
39885         * lib/bitset/table.c (tbitset_test): last_bit is the position of
39886         the bit in the array of bitset_word, so be sure to take its modulo
39887         number-of-bits-in-bitset-word (i.e., EBITSET_ELT_WORDS).
39888         * lib/bitset/list.c (lbitset_unused_clear): Likewise.
39890 2019-03-14  Akim Demaille  <akim@lrde.epita.fr>
39892         bitset: style changes.
39893         * lib/bitset/table.c: Use NULL, not 0, for pointers.
39894         Formatting changes.
39895         (tbitset_list): Reduce scopes.
39897 2019-03-16  Bruno Haible  <bruno@clisp.org>
39899         fatal-signal: Pass the signal number to the action.
39900         * lib/fatal-signal.h (at_fatal_signal): Change the signature.
39901         * lib/fatal-signal.c (action_t): Take the signal number as parameter.
39902         (fatal_signal_handler): Pass the signal number to the action.
39903         * lib/clean-temp.c (cleanup_action): Renamed from cleanup. Take the
39904         signal number as parameter.
39905         (create_temp_dir): Update.
39906         * lib/wait-process.c (cleanup_slaves_action): New function.
39907         (register_slave_subprocess): Update at_fatal_signal invocation.
39908         * NEWS: Mention the change.
39910 2019-03-16  Bruno Haible  <bruno@clisp.org>
39912         fatal-signal: Add function that lists the fatal signals.
39913         * lib/fatal-signal.h (get_fatal_signals): New declaration.
39914         * lib/fatal-signal.c (get_fatal_signals): New function.
39916 2019-03-14  Bruno Haible  <bruno@clisp.org>
39918         isatty: Make it return true in Cygwin consoles on native Windows.
39919         * lib/isatty.c: Include <string.h>.
39920         (GetProcAddress): New macro.
39921         (GetNamedPipeClientProcessIdFuncType): New type.
39922         (GetNamedPipeClientProcessIdFunc): New variable.
39923         (QueryFullProcessImageNameFuncType): New type.
39924         (QueryFullProcessImageNameFunc): New variable.
39925         (initialized): New variable.
39926         (initialize): New function.
39927         (IsCygwinConsoleHandle): New function.
39928         (isatty): Invoke it.
39929         * doc/posix-functions/isatty.texi: Mention the issue.
39931 2019-03-14  Bruno Haible  <bruno@clisp.org>
39933         all: Update URLs to msdn.microsoft.com.
39934         * lib/stat-w32.c et al.: Update URLs after most of msdn.microsoft.com
39935         was moved to docs.microsoft.com.
39937 2019-03-13  Bruno Haible  <bruno@clisp.org>
39939         gnulib-tool: Clarify the coding style.
39940         Suggested by Pavel Raiskup <praiskup@redhat.com>.
39941         * gnulib-tool: Add comment about coding style.
39943 2019-03-11  Paul Eggert  <eggert@cs.ucla.edu>
39945         strtod: fix clash with strtold
39946         Problem reported for RHEL 5 by Jesse Caldwell (Bug#34817).
39947         * lib/strtod.c (compute_minus_zero, minus_zero):
39948         Simplify by remving the macro / external variable,
39949         and having just a function.  User changed.  This avoids
39950         the need for an external variable that might clash.
39952 2019-03-10  Bruno Haible  <bruno@clisp.org>
39954         alloca-opt: Fix conflict mingw's new <alloca.h> file.
39955         Reported by Eli Zaretskii <eliz@gnu.org>.
39956         * lib/alloca.in.h: On mingw systems that have <alloca.h>, include that.
39957         * m4/alloca.m4 (gl_FUNC_ALLOCA): Set HAVE_ALLOCA_H.
39958         * modules/alloca-opt (Makefile.am): Substitute HAVE_ALLOCA_H.
39960 2019-03-10  Bruno Haible  <bruno@clisp.org>
39962         tests: Avoid havoc with "gcc -fcheck-pointer-bounds".
39963         * tests/test-fprintf-posix2.c: Skip the test when -fcheck-pointer-bounds
39964         is in use.
39965         * tests/test-printf-posix2.c: Likewise.
39967 2019-03-10  Bruno Haible  <bruno@clisp.org>
39969         uninorm tests: Free allocated memory.
39970         * tests/uninorm/test-u32-normalize-big.h
39971         (struct normalization_test_file): Remove 'const' from allocated member.
39972         (free_normalization_test_file): New declaration.
39973         * tests/uninorm/test-u32-normalize-big.c (test_other): Free allocated
39974         memory.
39975         (free_normalization_test_file): New function.
39976         * tests/uninorm/test-u32-nfc-big.c (main): Free allocated
39977         'struct normalization_test_file' contents.
39978         * tests/uninorm/test-u32-nfd-big.c (main): Likewise.
39979         * tests/uninorm/test-u32-nfkc-big.c (main): Likewise.
39980         * tests/uninorm/test-u32-nfkd-big.c (main): Likewise.
39982 2019-03-10  Bruno Haible  <bruno@clisp.org>
39984         di-set: Fix memory leak.
39985         * lib/di-set.c (di_set_free): Free the ino_map through ino_map_free(),
39986         not free().
39988 2019-03-10  Bruno Haible  <bruno@clisp.org>
39990         tests: Free allocated memory.
39991         Reported by <deltatau@protonmail.com> via Assaf Gordon.
39992         * tests/test-astrxfrm.c (main): Free allocated memory.
39993         * tests/test-bitset.c (compare, check_attributes): Free allocated
39994         bitsets.
39995         * tests/test-filenamecat.c (main): Free allocated memory.
39996         * tests/test-freadahead.c (main): Free allocated memory and close stdin.
39997         * tests/test-freadptr.c (main): Likewise.
39998         * tests/test-freadptr2.c (main): Free allocated memory.
39999         * tests/test-freadseek.c (main): Likewise.
40000         * tests/test-gc-arcfour.c (main): Close allocated context.
40001         * tests/test-gc-arctwo.c (main): Likewise.
40002         * tests/test-gc-des.c (main): Close all allocated contexts.
40003         * tests/test-pipe-filter-gi1.c (main): Free allocated memory.
40004         * tests/test-pipe-filter-ii1.c (main): Likewise.
40005         * tests/test-posix_spawn_file_actions_addchdir.c (main): Destroy the
40006         allocated file actions.
40007         * tests/test-posix_spawn_file_actions_addclose.c (main): Likewise.
40008         * tests/test-posix_spawn_file_actions_adddup2.c (main): Likewise.
40009         * tests/test-posix_spawn_file_actions_addopen.c (main): Likewise.
40010         * tests/test-sameacls.c (main): Free allocated memory and ACLs.
40011         * tests/test-strfmon_l.c (main): Free allocated locales.
40012         * tests/test-striconveh.c (main): Free allocated iconv_t objects.
40013         * tests/uniconv/test-u8-conv-to-enc.c (main): Free allocated memory.
40014         * tests/uniconv/test-u16-conv-to-enc.c (main): Likewise.
40015         * tests/uniconv/test-u32-conv-to-enc.c (main): Likewise.
40016         * tests/unistr/test-chr.h (main): Free input32.
40017         * tests/unistr/test-strchr.h (test_strchr): Likewise.
40019 2019-03-10  Bruno Haible  <bruno@clisp.org>
40021         tests: Prepare for using valgrind.
40022         * tests/*.sh: Invoke all test programs through ${CHECKER}.
40023         * tests/*/*.sh: Likewise.
40024         * tests/test-freadptr.c (main): Update accordingly.
40025         * tests/test-freadseek.c (main): Likewise.
40027 2019-03-09  Bruno Haible  <bruno@clisp.org>
40029         get-rusage-as, pthread_sigmask tests: Fix -fsanitize=thread findings.
40030         * lib/get-rusage-as.c (get_rusage_as): When compiled by
40031         "gcc -fsanitize=thread", don't try get_rusage_as_via_setrlimit.
40032         * tests/test-pthread_sigmask2.c (main): Clean up the killer_thread
40033         before exiting.
40035 2019-03-09  Jim Meyering  <meyering@fb.com>
40037         test-userspec.c: don't print NULL
40038         * tests/test-userspec.c (main): A test release of gcc,
40039         9.0.1 20190310, warned that this test would attempt to
40040         print a NULL pointer via a %s printf format.  Fix that
40041         and remove the unnecessary preceding "!diag" conjunct.
40042         Also add a comment.
40044 2019-03-03  Bruno Haible  <bruno@clisp.org>
40046         getloadavg: Write NULL for the null pointer.
40047         Reported by Michal Privoznik <mprivozn@redhat.com>.
40048         * lib/getloadavg.c (getloadavg): Write NULL instead of 0.
40050 2019-02-28  Michal Privoznik  <mprivozn@redhat.com>
40052         alloca, tsearch-tests: Write NULL for the null pointer.
40053         * lib/alloca.c (i00afunc): Write NULL instead of 0.
40054         * tests/test-tsearch.c (mangle_tree): Likewise.
40056 2019-03-09  Bruno Haible  <bruno@clisp.org>
40058         strfmon_l: Fix -fsanitize=address finding.
40059         * lib/strfmon_l.c: Include <errno.h>, <stdbool.h>, <stdlib.h>,
40060         <string.h>.
40061         (MAX_ARGS): Renamed from MAX_ARG_WORDS.
40062         (directive_t, directives_t): New types.
40063         (fmon_parse): New function.
40064         (rpl_strfmon_l): Don't call va_arg more often than needed for the
40065         format string. Consume 'long double' arguments in places where the
40066         format string indicates so.
40067         * modules/strfmon_l (Depends-on): Add 'stdbool'.
40069 2019-03-09  Bruno Haible  <bruno@clisp.org>
40071         crypto/des: Fix undefined behaviour.
40072         * lib/des.c (READ_64BIT_DATA): Cast bytes to 'unsigned int', to avoid
40073         shift operations on 'int'.
40075 2019-03-09  Bruno Haible  <bruno@clisp.org>
40077         Fix undefined behaviour.
40078         * lib/bitrotate.h (rotl16, rotr16, rotl8, rotr8): Cast x to
40079         'unsigned int', to avoid shift operations on 'int'.
40080         * lib/xmemdup0.c (xmemdup0): Don't invoke memcpy with a zero size.
40081         * tests/test-count-leading-zeros.c (main): Use a random number that has
40082         as many bits as TYPE, not only 2*15 or 2*31 bits.
40083         * tests/test-count-trailing-zeros.c (main): Likewise.
40084         * tests/test-count-one-bits.c (main): Likewise.
40085         * tests/test-memmem.c: Don't include "null-ptr.h".
40086         (main): Use zerosize_ptr() instead of null_ptr().
40087         * modules/memmem-tests (Files): Remove tests/null-ptr.h.
40089 2019-03-08  Bruno Haible  <bruno@clisp.org>
40091         unilbrk/u*-possible-linebreaks: Fix undefined behaviour.
40092         Reported by Jeffrey Walton <noloader@gmail.com>.
40093         * lib/unilbrk/u8-possible-linebreaks.c (u8_possible_linebreaks): Don't
40094         invoke memset with a zero size.
40095         * lib/unilbrk/u16-possible-linebreaks.c (u16_possible_linebreaks):
40096         Likewise.
40097         * lib/unilbrk/u32-possible-linebreaks.c (u32_possible_linebreaks):
40098         Adjust accordingly.
40100 2019-03-08  Bruno Haible  <bruno@clisp.org>
40102         unistr/*, uniconv/*: Fix undefined behaviour.
40103         Reported by Jeffrey Walton <noloader@gmail.com>.
40104         * lib/unistr/u-cpy.h (FUNC): Don't invoke memcpy with a zero size.
40105         * lib/unistr/u-cpy-alloc.h (FUNC): Likewise.
40106         * lib/uniconv/u8-conv-from-enc.c (u8_conv_from_encoding): Likewise.
40107         * lib/uniconv/u8-conv-to-enc.c (u8_conv_to_encoding): Likewise.
40109 2019-03-08  Bruno Haible  <bruno@clisp.org>
40111         unistr/u8-cmp: Fix undefined behaviour.
40112         Reported by Jeffrey Walton <noloader@gmail.com>.
40113         * lib/unistr/u8-cmp.c (u8_cmp): Don't invoke memcmp if n is zero.
40115 2019-03-08  Bruno Haible  <bruno@clisp.org>
40117         unictype/numeric: Fix undefined behaviour.
40118         Reported by Jeffrey Walton <noloader@gmail.com>.
40119         * lib/unictype/numeric.c (uc_numeric_value): Avoid undefined behaviour
40120         on shift overflow, caught by "gcc -fsanitize=undefined".
40121         * lib/unictype/bidi_of.c (uc_bidi_class): Add cast, for clarity.
40122         * lib/unictype/categ_of.c (lookup_withtable): Likewise.
40123         * lib/unictype/joininggroup_of.c (uc_joining_group): Likewise.
40125 2019-03-05  Paul Eggert  <eggert@cs.ucla.edu>
40127         git-version-gen: fix --version copyright year
40128         * build-aux/git-version-gen, build-aux/move-if-change (version):
40129         --version output copyright year is now taken from script year,
40130         so that it no longer needs to be updated by hand.
40132 2019-03-04  Bruno Haible  <bruno@clisp.org>
40134         relocatable-prog: Use wrapper-free installation on Mac OS X, take 2.
40135         This approach supports relocatable installation of shared libraries
40136         which depend on other shared libraries from the same package.
40137         * m4/relocatable.m4 (gl_RELOCATABLE_BODY): Determine use_macos_tools.
40138         If use_macos_tools is true, use reloc-ldflags and set LIBTOOL to be a
40139         wrapper around the original LIBTOOL.
40140         * build-aux/reloc-ldflags: Add support for Mac OS X, which uses the
40141         token '@loader_path' instead of '$ORIGIN'.
40142         * build-aux/libtool-reloc: New file.
40143         * modules/relocatable-prog (Files): Add it.
40144         * doc/relocatable-maint.texi (Supporting Relocation): Update to match
40145         the recent changes. Document the need to set the *_LDFLAGS of libraries.
40146         RELOCATABLE_LIBRARY_PATH and RELOCATABLE_CONFIG_H_DIR should be set in
40147         Makefile.am, not in configure.ac.
40149 2019-03-04  Bruno Haible  <bruno@clisp.org>
40151         relocatable-prog: Revert "Use wrapper-free installation on Mac OS X."
40152         * build-aux/install-reloc: Revert change.
40153         * m4/relocatable.m4 (gl_RELOCATABLE_BODY): Likewise.
40155 2019-02-24  Paul Eggert  <eggert@cs.ucla.edu>
40157         nstrftime: support the ‘+’ flag
40158         * lib/nstrftime.c (add, __strftime_internal):
40159         Add support for the ‘+’ flag introduced in POSIX.1-2017.
40160         (__strftime_internal): New arg ‘width’.  All uses changed.
40161         (DO_YEARISH, DO_MAYBE_SIGNED_NUMBER): New macros.
40163 2019-02-24  Bruno Haible  <bruno@clisp.org>
40165         relocatable-prog: Improve verbose output.
40166         * build-aux/install-reloc (func_verbose): Escape characters that would
40167         be interpreted by the shell.
40169 2019-02-24  Bruno Haible  <bruno@clisp.org>
40171         stat, lstat: Fix conflict with relocatable-prog-wrapper module.
40172         * lib/stat.c: On platforms other than OSF/1, include <sys/stat.h>, not
40173         "sys/stat.h".
40174         * lib/lstat.c: Likewise.
40175         * lib/fstat.c: Likewise.
40176         * lib/fstatat.c: Likewise.
40178 2019-02-23  Bernhard Voelker  <mail@bernhard-voelker.de>
40180         long-options: add parse_gnu_standard_options_only
40181         Discussed in https://bugs.gnu.org/33468 .
40183         * lib/long-options.c (parse_long_options): Use EXIT_SUCCESS instead of 0
40184         (parse_gnu_standard_options_only): Add function to process
40185         the GNU default options --help and --version and fail for
40186         any other unknown long or short option. See
40187         https://gnu.org/prep/standards/html_node/Command_002dLine-Interfaces.html
40188         * lib/long-options.h (parse_gnu_standard_options_only): Declare it.
40189         * modules/long-options (depends-on): Add stdbool, exitfail.
40190         * top/maint.mk (sc_prohibit_long_options_without_use): Update
40191         syntax-check rule, add new function name.
40193 2019-02-23  Bruno Haible  <bruno@clisp.org>
40195         relocatable-prog: Update documentation.
40196         * doc/relocatable-maint.texi (Supporting Relocation): Update to match
40197         the recent changes.
40199 2019-02-23  Paul Eggert  <eggert@cs.ucla.edu>
40201         nstrftime: tweak arg order
40202         * lib/nstrftime.c (__strftime_internal): Interchange arg order.
40203         All callers changed.  Suggested by TAMUKI Shoichi in:
40204         https://lists.gnu.org/r/bug-gnulib/2019-02/msg00052.html
40206 2019-02-23  Bruno Haible  <bruno@clisp.org>
40208         relocatable-prog: Use wrapper-free installation also on Mac OS X.
40209         Reported by Paul Smith <psmith@gnu.org>.
40210         * build-aux/install-reloc: Accept a 'mode' argument as first argument.
40211         (func_relativize): New function, from gnulib-tool.
40212         Handle mode 'macosx' through invocations of 'otool' and
40213         'install_name_tool'.
40214         * m4/relocatable.m4 (gl_RELOCATABLE_BODY): Determine use_macos_tools.
40215         If use_macos_tools is true, set INSTALL_PROGRAM_ENV to an
40216         'install-reloc' invocation with mode 'macosx'.
40218 2019-02-23  Bruno Haible  <bruno@clisp.org>
40220         relocatable-prog: Use $ORIGIN trick also on GNU/Hurd.
40221         * m4/relocatable.m4 (gl_RELOCATABLE_BODY): Use $ORIGIN trick also on
40222         Hurd with glibc >= 2.27.
40224 2019-02-21  Paul Eggert  <eggert@cs.ucla.edu>
40226         nstrftime: merge glibc strftime changes
40227         This incorporates:
40228         2019-02-11 Fix a few whitespace arrangement inconsistencies
40229         2019-01-24 strftime: Pass flags from "%EY" to "%Ey" [BZ #24096]
40230         2019-01-24 Set the default width of "%Ey" to 2 [BZ #23758]
40231         2019-01-11 strftime: use the "L_" macro with character literals
40232         * lib/nstrftime.c (__strftime_internal): New arg yr_spec.  All
40233         callers changed.  Default width of %Ey is now 2.  This is needed
40234         for proper handling of Japanese dates starting on 2019-05-01.
40236 2019-02-19  Bruno Haible  <bruno@clisp.org>
40238         relocatable-prog: Use $ORIGIN trick on more platforms.
40239         * m4/relocatable.m4 (gl_RELOCATABLE_BODY): Use $ORIGIN trick also on
40240         FreeBSD >= 7.3, DragonFly >= 3.0, NetBSD >= 8.0, OpenBSD >= 5.4,
40241         Solaris >= 10, Haiku. But don't use it on Android.
40242         * build-aux/reloc-ldflags: Allow the use of the $ORIGIN trick also on
40243         Hurd, FreeBSD, DragonFly, NetBSD, OpenBSD, Solaris, Haiku.
40245 2019-02-19  Bruno Haible  <bruno@clisp.org>
40247         progreloc: Speed up executable lookup on various platforms.
40248         * lib/progreloc.c: Include <errno.h>.
40249         (safe_read, full_read): New functions.
40250         (find_executable): On GNU/kFreeBSD, FreeBSD, DragonFly, NetBSD, Solaris,
40251         prefer the information from the /proc file system to a PATH search.
40253 2019-02-19  Bruno Haible  <bruno@clisp.org>
40255         progreloc: Simplify code for Android.
40256         * lib/progreloc.c (executable_fd): Don't define on Android.
40257         (maybe_executable, find_executable): Don't use executable_fd on Android.
40259 2019-02-15  Bruno Haible  <bruno@clisp.org>
40261         gnulib-tool: Support --import with just a few tests, not --with-tests.
40262         * gnulib-tool (func_import): New variable 'gentests'. Use it instead of
40263         'inctests' when generating files; use 'inctests' only for computing the
40264         transitive closure.
40266 2019-02-14  Bruno Haible  <bruno@clisp.org>
40268         gnulib-tool: Improve handling of multiple --local-dir options.
40269         * doc/gnulib.texi (Extending Gnulib): Explain how multiple --local-dir
40270         options work.
40271         * gnulib-tool (func_path_prepend): Remove function.
40272         (func_path_foreach): Make IFS handling more robust.
40273         (local_gnulib_path): Collect --local-dir values using func_path_append,
40274         not func_path_prepend.
40275         (func_determine_path_separator): Make IFS handling more robust.
40276         (func_lookup_file_cb): New function.
40277         (func_lookup_file): Rewritten to use func_lookup_file_cb instead of
40278         func_lookup_local_file. Apply the patches in the reverse order of their
40279         origin in $local_gnulib_path.
40280         (func_count_relative_local_gnulib_path): Make IFS handling more robust.
40281         * NEWS: Mention that the first --local-dir option is the one with
40282         highest priority.
40284 2019-02-10  Bruno Haible  <bruno@clisp.org>
40286         libtextstyle: New module.
40287         * m4/libtextstyle.m4: New file.
40288         * modules/libtextstyle: New file.
40290 2019-02-05  Bruno Haible  <bruno@clisp.org>
40292         declared.sh: Fix bug with variables of pointer type.
40293         * build-aux/declared.sh (sed_extract_extern_declared): Allow the space
40294         before the symbol to be omitted if the preceding character is a '*'.
40296 2019-02-04  Bruno Haible  <bruno@clisp.org>
40298         Add script for running tests under valgrind.
40299         * build-aux/run-test: New file, from GNU libunistring.
40300         * doc/valgrind-tests.texi: Rewritten to mention alternative approaches
40301         as well.
40303 2019-02-04  Bruno Haible  <bruno@clisp.org>
40305         declared.sh: Fix --version output.
40306         * build-aux/declared.sh (func_version): Update package name.
40308 2019-02-03  Bruno Haible  <bruno@clisp.org>
40310         Add script for determining the set of symbols to export from a library.
40311         * build-aux/declared.sh: New file, from GNU libunistring.
40312         * doc/lib-symbol-visibility.texi (Exported Symbols of Shared Libraries):
40313         Mention it.
40315 2019-02-02  Paul Eggert  <eggert@cs.ucla.edu>
40317         vla: add commentary about VLA_ELEMS
40318         * lib/vla.h (VLA_ELEMS): Add commentary,
40319         some inspired by Bruno Haible’s proposal in:
40320         https://lists.gnu.org/r/bug-gnulib/2019-01/msg00109.html
40322         dtoastr,ftoastr,ldtoastr: port to c-strtod changes
40323         Decouple these modules from c-strtod.  Nowadays it’s reasonable to
40324         assume the C99 signatures for strtod and strtold.  Programs that
40325         require stricter adherence to C99 should also use the strtod and
40326         strtold modules as needed, and we no longer need the
40327         HAVE_C99_STRTOLD macro.
40328         * NEWS: Mention this.
40329         * lib/ftoastr.c (STRTOF) [LENGTH == 3]: Assume strtold.
40330         * m4/c-strtod.m4 (gl_C_STRTOLD): Do not define HAVE_C99_STRTOLD.
40331         * modules/dtoastr, modules/ftoastr, modules/ldtoastr:
40332         (Files): Remove m4/c-strtod.m4.
40333         (configure.ac): Do not require gl_C99_STRTOLD, which no longer
40334         exists.
40336 2019-02-02  Bruno Haible  <bruno@clisp.org>
40338         fma: Improve code style.
40339         * lib/fma.c: Include <limits.h>, for CHAR_BIT.
40341 2019-02-02  Colin Watson  <cjwatson@debian.org>
40343         *-map tests: Fix compilation error.
40344         * tests/test-array_map.c: Include <limits.h>, for CHAR_BIT.
40345         * tests/test-hash_map.c: Likewise.
40346         * tests/test-linkedhash_map.c: Likewise.
40348 2019-01-31  Bruno Haible  <bruno@clisp.org>
40350         c-strtod, c-strtold: Use the bug fixes for strtod, strtold.
40351         * lib/stdlib.in.h (GNULIB_defined_strtod_function,
40352         GNULIB_defined_strtold_function): New macros.
40353         * lib/c-strtod.c (HAVE_GOOD_STRTOD_L): New macro.
40354         (STRTOD): Ignore HAVE_C99_STRTOLD.
40355         (c_locale): Don't define it on platforms where strtod_l/strtold_l is
40356         deemed buggy. But do use it on platforms where uselocale exists and is
40357         usable.
40358         (C_STRTOD): Don't use STRTOD_L on platforms where strtod_l/strtold_l is
40359         deemed buggy. On platforms where uselocale exists and is usable, use
40360         uselocale and strtod/strtold.
40361         * m4/c-strtod.m4 (gl_C99_STRTOLD): Remove macro.
40362         (gl_C_STRTOD): Require gt_FUNC_USELOCALE.
40363         (gl_C_STRTOLD): Likewise. Define HAVE_C99_STRTOLD unconditionally.
40364         * modules/c-strtod (Files): Add m4/intl-thread-locale.m4.
40365         (Depends-on): Add strtod.
40366         * modules/c-strtold (Files): Add m4/intl-thread-locale.m4.
40367         (Depends-on): Add strtold.
40369 2019-01-31  Bruno Haible  <bruno@clisp.org>
40371         strtod, strtold: Use the locale's decimal point.
40372         * lib/strtod.c: Include <locale.h>, <stdio.h>, <langinfo.h>.
40373         (decimal_point_char): New function, copied from lib/vasnprintf.c.
40374         (parse_number): Add a radixchar argument. Use it instead of '.'.
40375         (STRTOD): Invoke decimal_point_char and pass the result to parse_number.
40376         * m4/strtod.m4 (gl_PREREQ_STRTOD): Test whether nl_langinfo exists.
40377         * m4/strtold.m4 (gl_PREREQ_STRTOLD): Likewise.
40378         * tests/test-strtod1.c: New file.
40379         * tests/test-strtod1.sh: New file.
40380         * modules/strtod-tests (Files): Add test-strtod1.{sh,c}. Add
40381         locale-fr.m4 and its dependencies.
40382         (configure.ac): Invoke gt_LOCALE_FR, gt_LOCALE_FR_UTF8.
40383         (Makefile.am): Arrange to compile test-strtod1.c and run
40384         test-strtod1.sh.
40385         * tests/test-strtold1.c: New file.
40386         * tests/test-strtold1.sh: New file.
40387         * modules/strtold-tests (Files): Add test-strtold1.{sh,c}. Add
40388         locale-fr.m4 and its dependencies.
40389         (configure.ac): Invoke gt_LOCALE_FR, gt_LOCALE_FR_UTF8.
40390         (Makefile.am): Arrange to compile test-strtold1.c and run
40391         test-strtold1.sh.
40393 2019-01-31  Bruno Haible  <bruno@clisp.org>
40395         strtod, strtold tests: Simplify tests.
40396         * tests/test-strtod.c (main): Assume no rounding errors for 0.5.
40397         * tests/test-strtold.c (main): Likewise.
40399 2019-01-31  Bruno Haible  <bruno@clisp.org>
40401         strtod, strtold: Avoid unnecessary rounding errors.
40402         * lib/strtod.c (parse_number): Drop trailing zeroes before doing the
40403         decimal to DOUBLE conversion.
40405 2019-01-31  Bruno Haible  <bruno@clisp.org>
40407         strtod, strtold: Work around HP-UX 11.31/ia64 bug.
40408         * lib/strtod.c (STRTOD): When there is an extra character after the
40409         exponent marker 'p', reparse the number.
40410         * doc/posix-functions/strtod.texi: Document the HP-UX 11.31 bug.
40411         * doc/posix-functions/strtold.texi: Likewise.
40413 2019-01-29  Bruno Haible  <bruno@clisp.org>
40415         strtold: Add tests.
40416         * tests/test-strtold.c: New file, based on tests/test-strtod.c.
40417         * modules/strtold-tests: New file.
40419 2019-01-29  Bruno Haible  <bruno@clisp.org>
40421         strtold: New module.
40422         * lib/stdlib.in.h (strtold): New declaration.
40423         * lib/strtold.c: New file.
40424         * lib/strtod.c: Consider USE_LONG_DOUBLE.
40425         (STRTOD, LDEXP, HAVE_UNDERLYING_STRTOD, DOUBLE, MIN, MAX, L_,
40426         USE_LDEXP): New macros.
40427         (LDEXP, scale_radix_exp, parse_number, STRTOD): Adapt for
40428         USE_LONG_DOUBLE.
40429         (underlying_strtod): Remove function. Replace with some macros.
40430         Re-add the code for a missing underlying function that was removed on
40431         2013-02-19.
40432         * m4/strtold.m4: New file.
40433         * m4/stdlib_h.m4 (gl_STDLIB_H): Test whether strtold is declared.
40434         (gl_STDLIB_H_DEFAULTS): Initialize GNULIB_STRTOLD, HAVE_STRTOLD,
40435         REPLACE_STRTOLD.
40436         * modules/stdlib (Makefile.am): Substitute GNULIB_STRTOLD, HAVE_STRTOLD,
40437         REPLACE_STRTOLD.
40438         * modules/strtold: New file.
40439         * doc/posix-functions/strtold.texi: Document the new module.
40441 2019-01-29  Bruno Haible  <bruno@clisp.org>
40443         strtod: Fix compilation error on IRIX 6.5.
40444         * modules/strtod (Depends-on): Add 'math'.
40446 2019-01-28  Bruno Haible  <bruno@clisp.org>
40448         Fix build error when building a shared libunistring on Android.
40449         * tests/uninorm/test-nfc.c (n): Don't define on Android.
40450         (main): Add 'volatile', to defeat a GCC optimization that would
40451         eliminate the reference.
40452         * tests/uninorm/test-nfd.c (n): Don't define on Android.
40453         (main): Add 'volatile', to defeat a GCC optimization that would
40454         eliminate the reference.
40455         * tests/uninorm/test-nfkc.c (n): Don't define on Android.
40456         (main): Add 'volatile', to defeat a GCC optimization that would
40457         eliminate the reference.
40458         * tests/uninorm/test-nfkd.c (n): Don't define on Android.
40459         (main): Add 'volatile', to defeat a GCC optimization that would
40460         eliminate the reference.
40462 2019-01-27  Bruno Haible  <bruno@clisp.org>
40464         Avoid build errors due to wrong references between modules.
40465         * lib/uninorm/canonical-decomposition.c: Include
40466         "uninorm/decomposition-table.h", not "decomposition-table.h".
40467         * lib/uninorm/decomposition.c: Likewise.
40468         * lib/uninorm/u8-normalize.c: Include "uninorm/decompose-internal.h",
40469         not "decompose-internal.h".
40470         * lib/uninorm/u16-normalize.c: Likewise.
40471         * lib/uninorm/u32-normalize.c: Likewise.
40472         * lib/uninorm/uninorm-filter.c: Likewise.
40473         * lib/uninorm/nfkc.c: Likewise.
40474         * lib/uninorm/nfkd.c: Likewise.
40475         * lib/unicase/u8-casemap.c: Include "unicase/caseprop.h", not
40476         "caseprop.h".
40477         * lib/unicase/u8-ct-totitle.c: Likewise.
40478         * lib/unicase/u8-prefix-context.c: Likewise.
40479         * lib/unicase/u8-suffix-context.c: Likewise.
40480         * lib/unicase/u16-casemap.c: Likewise.
40481         * lib/unicase/u16-ct-totitle.c: Likewise.
40482         * lib/unicase/u16-prefix-context.c: Likewise.
40483         * lib/unicase/u16-suffix-context.c: Likewise.
40484         * lib/unicase/u32-casemap.c: Likewise.
40485         * lib/unicase/u32-ct-totitle.c: Likewise.
40486         * lib/unicase/u32-prefix-context.c: Likewise.
40487         * lib/unicase/u32-suffix-context.c: Likewise.
40488         * lib/unicase/u8-tolower.c: Include "unicase/unicasemap.h", not
40489         "unicasemap.h".
40490         * lib/unicase/u8-toupper.c: Likewise.
40491         * lib/unicase/u8-ct-tolower.c: Likewise.
40492         * lib/unicase/u8-ct-toupper.c: Likewise.
40493         * lib/unicase/u16-tolower.c: Likewise.
40494         * lib/unicase/u16-toupper.c: Likewise.
40495         * lib/unicase/u16-ct-tolower.c: Likewise.
40496         * lib/unicase/u16-ct-toupper.c: Likewise.
40497         * lib/unicase/u32-tolower.c: Likewise.
40498         * lib/unicase/u32-toupper.c: Likewise.
40499         * lib/unicase/u32-ct-tolower.c: Likewise.
40500         * lib/unicase/u32-ct-toupper.c: Likewise.
40501         * lib/unicase/u8-ct-casefold.c: Include "unicase/unicasemap.h", not
40502         "unicasemap.h", and "unicase/casefold.h", not "casefold.h".
40503         * lib/unicase/u16-ct-casefold.c: Likewise.
40504         * lib/unicase/u32-ct-casefold.c: Likewise.
40506 2019-01-27  Bruno Haible  <bruno@clisp.org>
40508         gperf: Fix error when this module is required by some test module.
40509         * modules/gperf (Applicability): Set to 'all'.
40511 2019-01-27  Bruno Haible  <bruno@clisp.org>
40513         tmpfile: Add support for Android.
40514         * m4/tmpfile.m4 (gl_FUNC_TMPFILE): Add a runtime test whether tmpfile()
40515         works.
40516         * lib/tmpfile.c (tmpfile): Add an alternative implementation for
40517         Android.
40518         * modules/tmpfile (Depends-on): Add 'stdbool'.
40519         * doc/posix-functions/tmpfile.texi: Mention the Android bug.
40520         * modules/argv-iter-tests (Depends-on): Add 'tmpfile'.
40522 2019-01-27  Akim Demaille  <akim@lrde.epita.fr>
40524         bitsetv: allow free on NULL.
40525         * lib/bitsetv.c (bitsetv_free): Do nothing when the bitsetv is NULL.
40527 2019-01-27  Bruno Haible  <bruno@clisp.org>
40529         test-framework-sh: Improve maintainability.
40530         * tests/init.sh: Clarify what belongs together. Reorder definitions.
40532 2019-01-27  Bruno Haible  <bruno@clisp.org>
40534         tests: Don't assume that /tmp exists.
40535         * tests/test-set-mode-acl-1.sh: Skip the test if /tmp does not exist.
40536         * tests/test-copy-acl-1.sh: Likewise.
40537         * tests/test-file-has-acl-1.sh: Likewise.
40538         * tests/test-copy-file-1.sh: Likewise.
40540 2019-01-27  Bruno Haible  <bruno@clisp.org>
40542         tests: Accommodate a shell that is not in /bin/sh.
40543         * tests/init.sh (setup_): Set srcdir and builddir.
40544         (BOURNE_SHELL): New variable.
40545         * modules/acl-tests (Depends-on): Add 'test-framework-sh'.
40546         * modules/file-has-acl-tests (Depends-on): Likewise.
40547         * modules/copy-file-tests (Depends-on): Likewise.
40548         * tests/test-set-mode-acl-1.sh: Use the test framework. Invoke shell
40549         scripts through $BOURNE_SHELL.
40550         * tests/test-set-mode-acl-2.sh: Likewise.
40551         * tests/test-copy-acl-1.sh: Likewise.
40552         * tests/test-copy-acl-2.sh: Likewise.
40553         * tests/test-file-has-acl-1.sh: Likewise.
40554         * tests/test-file-has-acl-2.sh: Likewise.
40555         * tests/test-copy-file-1.sh: Likewise.
40556         * tests/test-copy-file-2.sh: Likewise.
40557         * tests/test-set-mode-acl.sh (builddir): Consider value set by the
40558         invoker.
40559         * tests/test-copy-acl.sh (builddir): Likewise.
40560         * tests/test-file-has-acl.sh (builddir): Likewise.
40561         * tests/test-copy-file.sh (builddir): Likewise.
40562         * tests/test-vc-list-files-cvs.sh: Don't create shims for executables in
40563         build-aux/. Instead, invoke shell scripts through $BOURNE_SHELL.
40564         * tests/test-vc-list-files-git.sh: Likewise.
40566 2019-01-27  Bruno Haible  <bruno@clisp.org>
40568         tests: Fix some "unused variable" warnings.
40569         * tests/test-fts.c (fts_dealloc): Remove unused variable.
40570         * tests/unigbrk/test-uc-grapheme-breaks.c (main): Likewise.
40571         * tests/test-striconveh.c (main): Move some variable into the
40572         '#if HAVE_ICONV'.
40573         * tests/test-striconveha.c (main): Likewise.
40574         * tests/uniconv/test-u8-conv-from-enc.c (main): Likewise.
40575         * tests/uniconv/test-u16-conv-from-enc.c (main): Likewise.
40576         * tests/uniconv/test-u32-conv-from-enc.c (main): Likewise.
40577         * tests/uniconv/test-u8-conv-to-enc.c (main): Likewise.
40578         * tests/uniconv/test-u16-conv-to-enc.c (main): Likewise.
40579         * tests/uniconv/test-u32-conv-to-enc.c (main): Likewise.
40580         * tests/uniconv/test-u8-strconv-from-enc.c (main): Likewise.
40581         * tests/uniconv/test-u16-strconv-from-enc.c (main): Likewise.
40582         * tests/uniconv/test-u32-strconv-from-enc.c (main): Likewise.
40583         * tests/uniconv/test-u8-strconv-to-enc.c (main): Likewise.
40584         * tests/uniconv/test-u16-strconv-to-enc.c (main): Likewise.
40585         * tests/uniconv/test-u32-strconv-to-enc.c (main): Likewise.
40586         * tests/test-tsearch.c (main): Move some variable into the
40587         '#if HAVE_INITSTATE'.
40589 2019-01-27  Bruno Haible  <bruno@clisp.org>
40591         unigbrk/uc-grapheme-breaks: Fix build failure.
40592         * lib/unigbrk/uc-grapheme-breaks.c: Don't include unistr.h.
40593         * modules/unigbrk/uc-grapheme-breaks (Makefile.am): Fix typo.
40595 2019-01-27  Bruno Haible  <bruno@clisp.org>
40597         mountlist: Merge two .m4 files.
40598         * m4/mountlist.m4 (gl_MOUNTLIST): Inline gl_LIST_MOUNTED_FILE_SYSTEMS.
40599         (AC_FUNC_GETMNTENT): Move to here, from m4/ls-mntd-fs.m4.
40600         * m4/ls-mntd-fs.m4: Remove file.
40601         * modules/mountlist (Files): Remove m4/ls-mntd-fs.m4.
40603 2019-01-27  Bruno Haible  <bruno@clisp.org>
40605         tests: Enable Linux specific tests on Android.
40606         * tests/test-flock.c (main): Treat Android like Linux.
40607         * tests/test-openat-safer.c (main): Likewise.
40609 2019-01-27  Bruno Haible  <bruno@clisp.org>
40611         relocatable-prog: Use Linux code on Android.
40612         * lib/progreloc.c: Treat Android like Linux.
40614 2019-01-26  Bruno Haible  <bruno@clisp.org>
40616         getloadavg: Add support for Android.
40617         * lib/getloadavg.c: Treat Android like Linux.
40619 2019-01-26  Bruno Haible  <bruno@clisp.org>
40621         vma-iter: Add support for Android.
40622         * lib/vma-iter.h (VMA_ITERATE_SUPPORTED): Define on Android as well.
40623         * lib/vma-iter.c: Treat Android like Linux.
40624         * lib/get-rusage-data.c (get_rusage_data): Likewise.
40626 2019-01-26  Bruno Haible  <bruno@clisp.org>
40628         fts: Optimize on Android.
40629         * lib/fts.c: Treat Android like Linux.
40631 2019-01-26  Bruno Haible  <bruno@clisp.org>
40633         fts: Add support for Android.
40634         * m4/fts.m4 (gl_FUNC_FTS_CORE): Avoid conflicts between the symbols
40635         defined by this module and the ones in libc.
40636         * tests/test-fts.c (main): Treat mkdir error EMLINK like EMFILE.
40638 2019-01-26  Bruno Haible  <bruno@clisp.org>
40640         mountlist: Use Linux code on Android.
40641         * lib/mountlist.c (setmntent, endmntent): Define fallbacks.
40642         (unescape_tab, read_file_system_list): Enable Linux code on Android
40643         as well.
40644         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Test for setmntent
40645         and endmntent.
40646         * modules/mountlist (Depends-on): Add 'getline'.
40648 2019-01-26  Bruno Haible  <bruno@clisp.org>
40650         localename tests: Fix test failure on Android.
40651         * modules/localename-tests (Depends-on): Add 'setlocale'.
40653 2019-01-26  Bruno Haible  <bruno@clisp.org>
40655         mountlist: Port better to Android.
40656         * lib/mountlist.c (MOUNTED): Redefine on Android.
40657         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Redefine MOUNTED on
40658         Android.
40660 2019-01-26  Bruno Haible  <bruno@clisp.org>
40662         striconveh: Fix use of uninitialized iconv_t.
40663         Reported by Tim Rühsen <tim.ruehsen@gmx.de> in
40664         <https://lists.gnu.org/archive/html/bug-libunistring/2019-01/msg00000.html>.
40665         * lib/striconveh.c (iconveh_open): Correct the iconv_close argument.
40667 2019-01-26  Bruno Haible  <bruno@clisp.org>
40669         nonblocking-socket-tests: Fix test failure on Android 4.3.
40670         * tests/test-nonblocking-socket.h (SOCKET_HAS_LARGE_BUFFER): Define to 1
40671         also on Android.
40673 2019-01-26  Bruno Haible  <bruno@clisp.org>
40675         sh-filename: Add support for Android 4.3.
40676         * m4/sh-filename.m4 (gl_SH_FILENAME): Set to "sh" on Android.
40678 2019-01-26  Bruno Haible  <bruno@clisp.org>
40680         ptsname_r: Work around bug on Android 4.3.
40681         * m4/ptsname_r.m4 (gl_FUNC_PTSNAME_R): Define
40682         HAVE_ESSENTIALLY_WORKING_PTSNAME_R. Test whether the return value is
40683         correct.
40684         * lib/ptsname_r.c (__ptsname_r): If HAVE_ESSENTIALLY_WORKING_PTSNAME_R
40685         is defined, just fix the return value.
40686         * doc/glibc-functions/ptsname_r.texi: Mention the Android bug. Reword:
40687         The behaviour of musl libc is nothing to be "fixed", since it is
40688         compliant with the next POSIX standard.
40690 2019-01-26  Bruno Haible  <bruno@clisp.org>
40692         ttyname_r: Work around bug on Android 4.3.
40693         * m4/ttyname_r.m4 (gl_FUNC_TTYNAME_R): Test whether ttyname_r is a stub.
40694         * lib/ttyname_r.c (ttyname_r): Implement for Android.
40695         * doc/posix-functions/ttyname_r.texi: Mention the Android bug.
40696         * doc/posix-functions/ttyname.texi: Likewise.
40698 2019-01-25  Bruno Haible  <bruno@clisp.org>
40700         getprogname: Port to Android 4.3.
40701         * lib/getprogname.c (getprogname): On Android, take only the last
40702         component of __progname.
40704 2019-01-25  Bruno Haible  <bruno@clisp.org>
40706         wcrtomb: Work around bug on Android 4.3.
40707         * m4/wcrtomb.m4 (gl_FUNC_WCRTOMB): Test also whether wcrtomb works in
40708         the C locale.
40709         * lib/wcrtomb.c (wcrtomb): Provide alternate implementation for Android,
40710         which does not have the 'wctomb' function.
40711         * doc/posix-functions/wcrtomb.texi: Mention the Android bug.
40712         * tests/test-wcrtomb.c (main): Accept argument '5'.
40713         * tests/test-wcrtomb.sh: Add tests in the POSIX locale.
40715 2019-01-25  Bruno Haible  <bruno@clisp.org>
40717         setlocale: Work around bug on Android 4.3.
40718         * m4/setlocale.m4 (gl_FUNC_SETLOCALE): Test whether setlocale supports
40719         the "C" locale.
40720         * lib/setlocale.c (setlocale_unixlike): New wrapper for Android.
40721         * doc/posix-functions/setlocale.texi: Mention the Android bug.
40723 2019-01-24  Bruno Haible  <bruno@clisp.org>
40725         memchr: Work around bug on Android <= 5.0.
40726         * m4/memchr.m4 (gl_FUNC_MEMCHR): Add test against the Android bug.
40727         * doc/posix-functions/memchr.texi: Mention the Android bug.
40729 2019-01-24  Bruno Haible  <bruno@clisp.org>
40731         random: Fix compilation error on Android 4.3.
40732         * lib/stdlib.in.h (random, srandom): Test also REPLACE_RANDOM.
40733         (initstate): Test REPLACE_INITSTATE and HAVE_INITSTATE, not HAVE_RANDOM.
40734         (setstate): Test REPLACE_SETSTATE and HAVE_SETSTATE, not HAVE_RANDOM.
40735         * m4/random.m4 (gl_FUNC_RANDOM): Set HAVE_INITSTATE, HAVE_SETSTATE,
40736         REPLACE_RANDOM, REPLACE_INITSTATE, REPLACE_SETSTATE.
40737         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize HAVE_INITSTATE,
40738         HAVE_SETSTATE, REPLACE_RANDOM, REPLACE_INITSTATE, REPLACE_SETSTATE.
40739         * modules/stdlib (Makefile.am): Substitute HAVE_INITSTATE, HAVE_SETSTATE,
40740         REPLACE_RANDOM, REPLACE_INITSTATE, REPLACE_SETSTATE.
40741         * modules/random (Depends-on, configure.ac): Test also REPLACE_RANDOM,
40742         REPLACE_INITSTATE, REPLACE_SETSTATE.
40743         * doc/posix-functions/random.texi: Correct the description of the
40744         situation on Android.
40745         * doc/posix-functions/srandom.texi: Likewise.
40746         * doc/posix-functions/rand.texi: Likewise.
40747         * doc/posix-functions/srand.texi: Likewise.
40749 2019-01-24  Bruno Haible  <bruno@clisp.org>
40751         mbtowc: Fix compilation error on Android 4.3.
40752         * lib/stdlib.in.h (mbtowc): Test also HAVE_MBTOWC.
40753         * m4/mbtowc.m4 (gl_FUNC_MBTOWC): Test whether mbtowc exists. Set
40754         HAVE_MBTOWC.
40755         * m4/stdlib_h.m4 (gl_STDLIB_H): Test whether mbtowc is declared.
40756         (gl_STDLIB_H_DEFAULTS): Initialize HAVE_MBTOWC.
40757         * modules/stdlib (Makefile.am): Substitute HAVE_MBTOWC.
40758         * modules/mbtowc (Depends-on, configure.ac): Test also HAVE_MBTOWC.
40759         * doc/posix-functions/mbtowc.texi: Mention the change.
40761 2019-01-24  Bruno Haible  <bruno@clisp.org>
40763         fdatasync: Fix compilation error on Android 4.3.
40764         * m4/fdatasync.m4 (gl_FUNC_FDATASYNC): On platforms other than Solaris,
40765         test whether fdatasync() exists.
40767 2019-01-24  Bruno Haible  <bruno@clisp.org>
40769         unlinkat: Fix compilation error on Android 4.3.
40770         * lib/unistd.in.h: Include <fcntl.h> when module 'unlinkat' is in use
40771         also on Android.
40772         * doc/posix-functions/unlinkat.texi: Mention the issue.
40774 2019-01-24  Bruno Haible  <bruno@clisp.org>
40776         renameat: Fix compilation error on Android 4.3.
40777         * lib/stdio.in.h: Include <sys/stat.h> when module 'renameat' is in use.
40778         * doc/posix-functions/renameat.texi: Mention the issue.
40780 2019-01-24  Bruno Haible  <bruno@clisp.org>
40782         fchownat: Fix compilation error on Android 4.3.
40783         * lib/unistd.in.h: Include <sys/stat.h> when module 'fchownat' is in
40784         use.
40785         * m4/fchownat.m4 (gl_FUNC_FCHOWNAT_DEREF_BUG,
40786         gl_FUNC_FCHOWNAT_EMPTY_FILENAME_BUG): Include also <sys/stat.h>.
40787         * doc/posix-functions/fchownat.texi: Mention the issue.
40789 2019-01-23  Bruno Haible  <bruno@clisp.org>
40791         gnulib-tool: Support running testdirs on Android.
40792         * build-aux/test-driver.diff: New file.
40793         * gnulib-tool (func_create_testdir, func_create_megatestdir): Patch
40794         build-aux/test-driver after running automake.
40796 2019-01-23  Akim Demaille  <akim@lrde.epita.fr>
40798         relocatable-prog: avoid warnings from Automake
40799         * modules/relocatable-prog: Don't declare PHONY dependencies in
40800         Automake conditionals.
40802 2019-01-23  Akim Demaille  <akim@lrde.epita.fr>
40804         array-list: Pacify warnings about unused arguments (-Wunused-parameter).
40805         * lib/gl_array_list.c (gl_array_iterator_free): "Use" the argument.
40807 2019-01-23  Bruno Haible  <bruno@clisp.org>
40809         threadlib: Revert commit from 2018-06-25. We now have a better fix.
40810         * m4/threadlib.m4 (gl_THREADLIB_BODY): Don't attempt to defeat a
40811         preceding -Wl,--as-needed option. Don't check whether the linker
40812         supports --as-needed/--no-as-needed and --push-state/--pop-state.
40814 2019-01-23  Bruno Haible  <bruno@clisp.org>
40816         thread: Force linking with -lpthread, even when --as-needed is in use.
40817         Reported by Richard W.M. Jones <rjones@redhat.com> in
40818         <https://lists.gnu.org/archive/html/bug-gnulib/2019-01/msg00123.html>.
40819         * lib/glthread/thread.h (pthread_create): Don't declare weak.
40821 2019-01-23  Akim Demaille  <akim.demaille@gmail.com>
40822             Bruno Haible  <bruno@clisp.org>
40824         relocatable: avoid compiler warnings (-Wshadow)
40825         * lib/relocatable.c (compute_curr_prefix): Rename local variables
40826         to avoid name collisions with global variables.
40828 2019-01-22  Bruno Haible  <bruno@clisp.org>
40830         vasnprintf: Don't use %n on Android.
40831         Reported and fix suggested by Hugo Beauzée-Luyssen <hugo@beauzee.fr> in
40832         <https://lists.gnu.org/archive/html/bug-gnulib/2018-12/msg00123.html>.
40833         * lib/vasnprintf.c (VASNPRINTF): Don’t use %n on Android.
40835 2019-01-22  Bruno Haible  <bruno@clisp.org>
40837         *printf: Support cross-compilation to Android.
40838         * m4/printf.m4: Add cross-compilation guesses for Android.
40840 2019-01-21  Bruno Haible  <bruno@clisp.org>
40842         diacrit: Mark deprecated.
40843         * modules/diacrit (Status, Notice): Mark as deprecated.
40844         * NEWS: Mention it.
40846 2019-01-20  Bruno Haible  <bruno@clisp.org>
40848         rintl: Override broken implementation on NetBSD.
40849         * lib/math.in.h (rintl): Test also REPLACE_RINTL.
40850         * m4/rintl.m4 (gl_FUNC_RINTL): Add test for negative arguments. Set
40851         REPLACE_RINTL.
40852         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_RINTL.
40853         * modules/math (Makefile.in): Substitute REPLACE_RINTL.
40854         * modules/rintl (Depends-on, configure.ac): Test REPLACE_RINTL.
40855         * doc/posix-functions/rintl.texi: Mention the NetBSD bug.
40857 2019-01-20  Bruno Haible  <bruno@clisp.org>
40859         log10l: Work around inaccurate implementation on NetBSD.
40860         * m4/log10l.m4 (gl_FUNC_LOG10L_WORKS): Add test for a certain accuracy.
40861         * lib/log10l.c: Comment out too simplistic override.
40862         * doc/posix-functions/log10l.texi: Mention the NetBSD bug.
40864 2019-01-20  Bruno Haible  <bruno@clisp.org>
40866         logl: Work around inaccurate implementation on NetBSD.
40867         * m4/logl.m4 (gl_FUNC_LOGL_WORKS): Add test for a certain accuracy.
40868         * lib/logl.c: Comment out unused code.
40869         * doc/posix-functions/logl.texi: Mention the NetBSD bug.
40871 2019-01-20  Bruno Haible  <bruno@clisp.org>
40873         expm1l: Work around inaccurate implementation on NetBSD.
40874         * lib/math.in.h (expm1l): Test also REPLACE_EXPM1L.
40875         * m4/expm1l.m4 (gl_FUNC_EXPM1L): Add test for a certain accuracy. Set
40876         REPLACE_EXPM1L.
40877         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_EXPM1L.
40878         * modules/math (Makefile.in): Substitute REPLACE_EXPM1L.
40879         * modules/expm1l (Depends-on, configure.ac): Test REPLACE_EXPM1L.
40880         * doc/posix-functions/expm1l.texi: Mention the NetBSD bug.
40882 2019-01-20  Bruno Haible  <bruno@clisp.org>
40884         expl: Work around inaccurate implementation on NetBSD.
40885         * lib/math.in.h (expl): Test also REPLACE_EXPL.
40886         * m4/expl.m4 (gl_FUNC_EXPL): Add test for a certain accuracy. Set
40887         REPLACE_EXPL.
40888         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_EXPL.
40889         * modules/math (Makefile.in): Substitute REPLACE_EXPL.
40890         * modules/expl (Depends-on, configure.ac): Test REPLACE_EXPL.
40891         * doc/posix-functions/expl.texi: Mention the NetBSD bug.
40893 2019-01-20  Bruno Haible  <bruno@clisp.org>
40895         exp2l: Work around inaccurate implementation on NetBSD.
40896         * m4/exp2l.m4 (gl_FUNC_EXP2L): Add test for a certain accuracy.
40897         * doc/posix-functions/exp2l.texi: Mention the NetBSD bug.
40899 2019-01-20  Bruno Haible  <bruno@clisp.org>
40901         floor, floorl: Avoid autoconf warnings.
40902         * modules/floor (configure.ac): Use AC_REQUIRE.
40903         * modules/floorl (configure.ac): Likewise.
40905 2019-01-20  Bruno Haible  <bruno@clisp.org>
40907         Defeat current GCC optimizations in math autoconf tests.
40908         * m4/cbrtl.m4 (gl_FUNC_CBRTL): Mark function pointer as 'volatile'.
40909         * m4/ceil.m4 (gl_FUNC_CEIL): Likewise.
40910         * m4/ceilf.m4 (gl_FUNC_CEILF): Likewise.
40911         * m4/ceill.m4 (gl_FUNC_CEILL): Likewise.
40912         * m4/exp2l.m4 (gl_FUNC_EXP2L): Likewise.
40913         * m4/expm1.m4 (gl_FUNC_EXPM1): Likewise.
40914         * m4/floor.m4 (gl_FUNC_FLOOR): Likewise.
40915         * m4/floorf.m4 (gl_FUNC_FLOORF): Likewise.
40916         * m4/fmod.m4 (gl_FUNC_FMOD): Likewise.
40917         * m4/fmodf.m4 (gl_FUNC_FMODF): Likewise.
40918         * m4/fmodl.m4 (gl_FUNC_FMODL): Likewise.
40919         * m4/hypot.m4 (gl_FUNC_HYPOT): Likewise.
40920         * m4/hypotf.m4 (gl_FUNC_HYPOTF): Likewise.
40921         * m4/hypotl.m4 (gl_FUNC_HYPOTL): Likewise.
40922         * m4/ilogb.m4 (gl_FUNC_ILOGB_WORKS): Likewise.
40923         * m4/ilogbf.m4 (gl_FUNC_ILOGBF_WORKS): Likewise.
40924         * m4/ilogbl.m4 (gl_FUNC_ILOGBL_WORKS): Likewise.
40925         * m4/log.m4 (gl_FUNC_LOG): Likewise.
40926         * m4/logf.m4 (gl_FUNC_LOGF): Likewise.
40927         * m4/log10.m4 (gl_FUNC_LOG10): Likewise.
40928         * m4/log10f.m4 (gl_FUNC_LOG10F): Likewise.
40929         * m4/log1p.m4 (gl_FUNC_LOG1P): Likewise.
40930         * m4/log1pf.m4 (gl_FUNC_LOG1PF): Likewise.
40931         * m4/log1pl.m4 (gl_FUNC_LOG1PL): Likewise.
40932         * m4/log2.m4 (gl_FUNC_LOG2): Likewise.
40933         * m4/log2f.m4 (gl_FUNC_LOG2F): Likewise.
40934         * m4/modf.m4 (gl_FUNC_MODF): Likewise.
40935         * m4/modff.m4 (gl_FUNC_MODFF): Likewise.
40936         * m4/modfl.m4 (gl_FUNC_MODFL): Likewise.
40937         * m4/remainder.m4 (gl_FUNC_REMAINDER): Likewise.
40938         * m4/remainderf.m4 (gl_FUNC_REMAINDERF): Likewise.
40939         * m4/remainderl.m4 (gl_FUNC_REMAINDERL): Likewise.
40940         * m4/round.m4 (gl_FUNC_ROUND): Likewise.
40941         * m4/roundf.m4 (gl_FUNC_ROUNDF): Likewise.
40942         * m4/roundl.m4 (gl_FUNC_ROUNDL): Likewise.
40943         * m4/trunc.m4 (gl_FUNC_TRUNC): Likewise.
40944         * m4/truncf.m4 (gl_FUNC_TRUNCF): Likewise.
40945         * m4/truncl.m4 (gl_FUNC_TRUNCL): Likewise.
40947 2019-01-19  Pádraig Brady  <P@draigBrady.com>
40949         gettext: support disabling use of VLAs
40950         * lib/gettext.h: Disable use of VLAs if GNULIB_NO_VLA is defined
40952 2019-01-17  KO Myung-Hun  <komh78@gmail.com>
40954         sys_stat: Fix 'implicit declaration of function' warning on OS/2 kLIBC.
40955         * lib/sys_stat.in.h [kLIBC]: Include <unistd.h>.
40957 2019-01-17  KO Myung-Hun  <komh78@gmail.com>
40959         fcntl: Fix syntax error (regression from 2018-10-05).
40960         * lib/fcntl.c (klibc_fcntl): Remove mis-placed ';'.
40962 2019-01-13  Akim Demaille  <akim@lrde.epita.fr>
40964         relocatable: improve documentation.
40965         * doc/relocatable-maint.texi (Supporting Relocation): For
40966         substitutions performed by config.status, we need more variables
40967         (for instance datarootdir defaults to '${prefix}/share' so we need
40968         prefix).
40970 2019-01-13  Akim Demaille  <akim@lrde.epita.fr>
40972         backup: update dependencies
40973         * modules/backup-rename (Depends-on): It now depends on opendirat
40974         instead of opendir.  It also uses stdint, and xalloc-oversized.
40975         But no longer dirfd.
40976         * modules/backupfile (Depends-on): Add xalloc-oversized.
40978 2019-01-13  Bruno Haible  <bruno@clisp.org>
40980         getcwd: Fix test failure when building on a Linux 9p file system.
40981         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): On Linux, treat error
40982         EINVAL from mkdir like ENAMETOOLONG.
40983         * tests/test-getcwd.c (test_long_name): Likewise.
40985 2019-01-12  Tim Rühsen  <tim.ruehsen@gmx.de>
40987         Fix typos found by codespell.
40988         * lib/*.[hc]: Fix typos in comments.
40989         * pygnulib/*.py: Fix typos in error messages and comments.
40991 2019-01-12  Bruno Haible  <bruno@clisp.org>
40993         doc: Fix documentation about container data types.
40994         Reported by Werner Lemberg <wl@gnu.org>.
40995         * doc/containers.texi (Container data types): Fix typo.
40997 2019-01-10  Bruno Haible  <bruno@clisp.org>
40999         verify: Enable _GL_HAVE_STATIC_ASSERT for recent G++ versions.
41000         Reported by Reuben Thomas <rrt@sc3d.org>.
41001         * lib/verify.h (_GL_HAVE_STATIC_ASSERT): Define for g++ versions >= 6.
41003 2019-01-06  Bruno Haible  <bruno@clisp.org>
41005         maintainer-makefile: Make the configure.ac section optional.
41006         * top/maint.mk (GREP, SED): Define if not defined.
41008 2019-01-06  Bruno Haible  <bruno@clisp.org>
41010         localename: Assume setlocale function.
41011         * lib/localename.c (gl_locale_name_posix): Assume setlocale exists.
41012         * m4/localename.m4 (gl_LOCALENAME): Don't test whether setlocale exists.
41014 2019-01-06  Bruno Haible  <bruno@clisp.org>
41016         doc: Add documentation about container data types.
41017         * doc/containers.texi: New file.
41018         * doc/gnulib.texi (Particular Modules): Include it.
41020 2019-01-06  Bruno Haible  <bruno@clisp.org>
41022         doc: Update documentation about 'progname' module.
41023         * doc/progname.texi: Rename from doc/error.texi. Change node name and
41024         title. Rewrite.
41025         * doc/gnulib.texi (Particular Modules): Update.
41027 2019-01-06  Bruno Haible  <bruno@clisp.org>
41029         doc: Document the xstdopen and *-safer modules.
41030         * doc/xstdopen.texi: New file.
41031         * doc/gnulib.texi (Particular Modules): Include it.
41033 2019-01-06  Bruno Haible  <bruno@clisp.org>
41035         xstdopen: Add tests.
41036         * tests/test-xstdopen.c: New file.
41037         * tests/test-xstdopen.sh: New file.
41038         * modules/xstdopen-tests: New file.
41040         xstdopen: New module.
41041         * lib/xstdopen.h: New file.
41042         * lib/xstdopen.c: New file.
41043         * modules/xstdopen: New file.
41045 2019-01-06  Bruno Haible  <bruno@clisp.org>
41047         stdopen: Fix compilation error with IRIX cc.
41048         * lib/stdopen.c (stdopen): Do not use C99-style decl in loop.
41050 2019-01-05  Paul Eggert  <eggert@cs.ucla.edu>
41052         xfreopen need not include stdio--.h
41053         * lib/xfreopen.c: Do not include stdio--.h.
41055         xfreopen need not depend on freopen-safer
41056         * modules/xfreopen (Depends-on):
41057         Depend on freopen, not freopen-safer.
41059         stdopen: modernize and simplify
41060         * lib/stdopen.c: Update copyright date
41061         Do not include sys/types.h; no longer needed these days.
41062         (stdopen): Use C99-style decl in loop.  Return int errno
41063         value, rather than just a bool.  Do not worry about fd mismatches,
41064         since the caller cares only if 0, 1, 2 are occupied.
41065         * lib/stdopen.h: No need to include <stdbool.h>.
41066         * m4/stdopen.m4: Remove.
41067         * modules/stdopen: New file.
41069         stdopen: copy from last use in coreutils
41070         * lib/stdopen.c, lib/stdopen.h, m4/stdopen.m4:
41071         New files, taken from their last commit in coreutils
41072         2007-07-23T12:35:58Z!jim@meyering.net
41073         71aa3ea88084d17bcb4fc1031ad7b66f8647115e.
41075 2019-01-05  Bruno Haible  <bruno@clisp.org>
41077         argp: Don't pass an invalid argument to dgettext().
41078         Reported by He X <xw897002528@gmail.com>.
41079         * lib/argp-help.c (print_header, argp_doc): Don't pass a NULL doc to
41080         dgettext().
41082 2019-01-05  Bruno Haible  <bruno@clisp.org>
41084         argp: Don't pass an invalid argument to dgettext().
41085         Reported by He X <xw897002528@gmail.com>.
41086         * lib/argp.h (struct argp): Clarify that the args_doc field may be NULL.
41087         * lib/argp-help.c (argp_args_usage): Don't pass a NULL args_doc to
41088         dgettext().
41090 2018-12-22  Paul Eggert  <eggert@cs.ucla.edu>
41092         stdioext: port to newer 32-bit Android
41093         Problem reported by Tom Yan in:
41094         https://lists.gnu.org/archive/html/bug-gnulib/2018-07/msg00014.html
41095         * lib/stdio-impl.h (_gl_FILE_flags_t) [__ANDROID__]: New macro.
41096         (fp_) [__ANDROID__]: Use it.
41098 2019-01-04  Bruno Haible  <bruno@clisp.org>
41100         lock: Fix link error with --enable-threads=pth.
41101         * lib/glthread/lock.h (pth_cond_init, pth_cond_await, pth_cond_notify):
41102         Mark as weak.
41104 2019-01-04  Bruno Haible  <bruno@clisp.org>
41106         Fix link errors in unit tests.
41107         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
41108         * modules/bitset-tests (Makefile.am): Link test-bitset against libintl.
41109         * modules/array-map-tests (Makefile.am): Link test-array_map against
41110         libintl.
41111         * modules/array-set-tests (Makefile.am): Link test-array_set against
41112         libintl.
41113         * modules/hash-map-tests (Makefile.am): Link test-hash_map against
41114         libintl.
41115         * modules/hash-set-tests (Makefile.am): Link test-hash_set against
41116         libintl.
41117         * modules/linkedhash-map-tests (Makefile.am): Link test-linkedhash_map
41118         against libintl.
41119         * modules/linkedhash-set-tests (Makefile.am): Link test-linkedhash_set
41120         against libintl.
41122 2019-01-04  Bruno Haible  <bruno@clisp.org>
41124         Fix incorrect 'Link' sections.
41125         * modules/regex (Link): Mention the link requirement of module 'lock'.
41126         * modules/regex-tests (Makefile.am): Don't use LIB_PTHREAD.
41128 2019-01-04  Bruno Haible  <bruno@clisp.org>
41130         Fix some 'Link' sections.
41131         * modules/c-stack (Link): Add link directive from the 'gettext-h'
41132         dependency.
41133         * modules/getaddrinfo (Link): Likewise.
41135 2019-01-04  Bruno Haible  <bruno@clisp.org>
41137         Remove redundant 'Link' sections.
41138         * modules/canon-host (Link): Remove section.
41139         * modules/timevar (Link): Likewise.
41141 2019-01-04  Bruno Haible  <bruno@clisp.org>
41143         Remove incorrect 'Link' sections.
41144         * modules/acl (Link): Remove section. Use combined 'Link' sections from
41145         the dependencies instead.
41146         * modules/crypto/md5 (Link): Likewise.
41147         * modules/crypto/sha1 (Link): Likewise.
41148         * modules/crypto/sha256 (Link): Likewise.
41149         * modules/crypto/sha512 (Link): Likewise.
41150         * modules/faccessat (Link): Likewise.
41151         * modules/fdutimensat (Link): Likewise.
41152         * modules/iconv_open-utf (Link): Likewise.
41153         * modules/propername (Link): Likewise.
41154         * modules/qacl (Link): Likewise.
41155         * modules/unicodeio (Link): Likewise.
41156         * modules/utimecmp (Link): Likewise.
41157         * modules/utimensat (Link): Likewise.
41158         * modules/xstriconv (Link): Likewise.
41159         * modules/xstriconveh (Link): Likewise.
41161 2019-01-04  Bruno Haible  <bruno@clisp.org>
41163         gnulib-tool: New option --extract-recursive-link-directive.
41164         * gnulib-tool (func_usage): Document the new options
41165         --extract-recursive-dependencies, --extract-recursive-link-directive.
41166         (func_verify_module): Document output variables.
41167         (func_get_dependencies_recursively): New function.
41168         (func_get_link_directive_recursively): New function.
41169         Use them to implement the new options
41170         --extract-recursive-dependencies, --extract-recursive-link-directive.
41171         * doc/gnulib-tool.texi (Link-time requirements): New section.
41173 2019-01-04  Bruno Haible  <bruno@clisp.org>
41175         Clarify meaning of 'Link' section in module description.
41176         * doc/gnulib.texi (Module description): Clarify the meaning of the
41177         'Link' section versus the one of the dependencies.
41178         * NEWS: Mention the change.
41180 2019-01-04  Bruno Haible  <bruno@clisp.org>
41182         pselect: Fix module description.
41183         * modules/pselect (Link): Put one link option per line.
41185 2019-01-04  Bruno Haible  <bruno@clisp.org>
41187         cosl: Fix module description.
41188         * modules/cosl (Link): Fix typo.
41189         * modules/mathl (configure.ac): Likewise.
41191 2019-01-04  Bruno Haible  <bruno@clisp.org>
41193         c-xvasprintf: Fix module dependencies.
41194         * modules/c-xvasprintf (Depends-on): Add 'xalloc-die'.
41196 2019-01-04  Akim Demaille  <akim@lrde.epita.fr>
41198         bootstrap: die when some submodules are not initialized
41199         * build-aux/bootstrap: Make sure all submodules are initialized.
41201 2019-01-04  Bruno Haible  <bruno@clisp.org>
41203         bitsetv: Fix module dependencies.
41204         * lib/bitsetv.c: Include xalloc.h.
41205         * modules/bitsetv (Depends-on): Add 'xalloc'.
41207 2019-01-04  Bruno Haible  <bruno@clisp.org>
41209         xmemdup0: Remove redundant code.
41210         * lib/xmemdup0.h (xalloc_die): Remove declaration.
41212 2019-01-04  Bruno Haible  <bruno@clisp.org>
41214         backupfile: Fix module dependencies.
41215         * modules/backupfile (Depends-on): Add 'xalloc'.
41217 2019-01-03  Paul Eggert  <eggert@cs.ucla.edu>
41219         bitset, crypto/gc: fix conflicts with Solaris 11
41220         * lib/bitset.h (_GL_BITSET_H): Rename from _BITSET_H, to
41221         avoid clash with Solaris 11 <sys/bitset.h>.
41222         * lib/gc.h (_GL_GC_H): Rename from GC_H, to avoid clash
41223         with Solaris 11 <xorg/gc.h>.
41225 2019-01-04  Bruno Haible  <bruno@clisp.org>
41227         safe-read, safe-write: Fix conflict with Illumos-Joyent <sys/limits.h>.
41228         Reported by Andy Fiddaman <andy@omniosce.org>.
41229         * lib/sys-limits.h: Add a '_GL' prefix to the guard symbol.
41231 2019-01-03  Eric Blake  <eblake@redhat.com>
41233         maintainer-makefile: fix typo in previous patch
41234         * top/maint.mk (_sc_search_regexp): Fix my accidental corruption
41235         of Roman's work.
41237 2019-01-02  Roman Bolshakov <r.bolshakov@yadro.com>  (tiny change)
41239         maintainer-makefile: prefer $(GREP) over grep
41240         * modules/maintainer-makefile (configure.ac): Ensure $(GREP) is
41241         defined.
41242         * top/maint.mk: Use it everywhere.
41244         maintainer-makefile: split long argument lines
41245         * top/maint.mk: Use xargs to split $(VC_LIST_EXCEPT) usage where
41246         it would be too long for exec limits on BSD.
41248 2018-12-27  Paul Eggert  <eggert@cs.ucla.edu>
41250         mkfifo: bring back HAVE_MKFIFO macro
41251         * m4/mkfifo.m4 (gl_FUNC_MKFIFO): #define HAVE_MKFIFO as needed.
41252         Problem reported by Andrew Janke in:
41253         https://lists.gnu.org/r/bug-gnulib/2018-12/msg00147.html
41255 2018-12-21  Bruno Haible  <bruno@clisp.org>
41257         Assume Autoconf >= 2.63.
41258         * modules/stdarg (configure.ac-early): Remove comment about Autoconf
41259         versions < 2.60.
41261 2018-12-21  Bruno Haible  <bruno@clisp.org>
41263         memcmp: Mention the clang bug.
41264         * tests/test-memcmp.c: Add comment about a known test failure.
41265         * doc/posix-functions/memcmp.texi: Mention the clang bug.
41267 2018-12-20  Jim Meyering  <meyering@fb.com>
41269         revert v0.1-2213-gae4b73e28 and part of v0.1-2281-g95cd86dd7
41270         v0.1-2213-gae4b73e28 caused a regression in grep-3.2 (no match):
41271           echo '123-x'|LC_ALL=C grep -E '.\bx'
41272         The goal is to revert the first, but reverting it requires to restore
41273         the function deleted in the second. I ran this to restore the deleted
41274         function:
41275           git show v0.1-2281-g95cd86dd7 lib/dfa.c \
41276             | perl -0777 -pe 's/^@@[^\n]*dfaan.*//ms' \
41277             | patch -R -p1
41278         * lib/dfa.c (charclass_context): Restore deleted function.
41279         Reverting the primary commit removes this change:
41280         dfa: Simplify a building state
41281         * lib/dfa.c (build_state): Simplify a building state.
41283 2018-12-20  Paul Eggert  <eggert@cs.ucla.edu>
41285         version-etc: allow zero authors
41286         * lib/version-etc.c (version_etc_arn): If no authors are given,
41287         omit authorship info instead of dumping core.
41289 2018-12-19  Bruno Haible  <bruno@clisp.org>
41291         lchown tests: Be more permissive regarding errno values.
41292         Reported by Ivan Zakharyaschev <imz@altlinux.org>.
41293         * tests/test-lchown.h (test_lchown): Recognize EOPNOTSUPP as an
41294         alternative to ENOSYS.
41295         * modules/lchown-tests (Depends-on): Add 'errno'.
41296         * modules/fchownat-tests (Depends-on): Likewise.
41298 2018-12-18  Bruno Haible  <bruno@clisp.org>
41300         duplocale: Avoid test failure on AIX 7.
41301         * modules/duplocale-tests (Files): Add m4/intl-thread-locale.m4.
41302         (configure.ac): Invoke gt_FUNC_USELOCALE.
41303         * tests/test-duplocale.c: Test HAVE_WORKING_USELOCALE instead of
41304         HAVE_USELOCALE. Assume that nl_langinfo_l only works when uselocale
41305         works.
41307 2018-12-18  Bruno Haible  <bruno@clisp.org>
41309         localename: Fix test failure on AIX 7.
41310         Reported by Assaf Gordon in
41311         <https://lists.gnu.org/archive/html/sed-devel/2018-12/msg00019.html>.
41312         * m4/intl-thread-locale.m4 (gt_FUNC_USELOCALE): New macro.
41313         (gt_INTL_THREAD_LOCALE_NAME): Invoke it. Test gt_cv_func_uselocale_works
41314         instead of ac_cv_func_uselocale.
41315         * lib/localename.c: Test HAVE_WORKING_USELOCALE instead of
41316         HAVE_USELOCALE.
41317         * lib/localename-table.h: Likewise.
41318         * lib/localename-table.c: Likewise.
41319         * tests/test-localename.c: Likewise.
41320         * doc/posix-functions/uselocale.texi: Mention the AIX problem.
41322 2018-12-18  Bruno Haible  <bruno@clisp.org>
41324         localename: Update comments regarding Cygwin.
41325         * lib/localename.c: Update comment.
41326         * doc/posix-functions/uselocale.texi: Update platforms list.
41327         * doc/posix-functions/newlocale.texi: Likewise.
41328         * doc/posix-functions/duplocale.texi: Likewise.
41329         * doc/posix-functions/freelocale.texi: Likewise.
41331 2018-12-16  Bruno Haible  <bruno@clisp.org>
41333         c-stack: Fix for Linux/sparc.
41334         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Set
41335         ac_cv_sys_xsi_stack_overflow_heuristic to 'no' on Linux/sparc.
41337 2018-12-16  Bruno Haible  <bruno@clisp.org>
41339         localename: Avoid test failure on some glibc systems.
41340         * tests/test-localename.c (test_locale_name, test_locale_name_posix):
41341         Unset environment variables that might disturb the first setlocale call,
41342         and verify that this setlocale call succeeds.
41344 2018-12-16  Assaf Gordon  <assafgordon@gmail.com>
41346         random: Fix build error on native Windows (regression from 2018-06-21).
41347         * lib/random.c (__srandom, __initstate, __setstate, __random,
41348         __srandom_r, __initstate_r, __setstate_r, __random_r) [!_LIBC]: Redirect
41349         to the symbols without '__' prefix.
41351 2018-12-16  Bruno Haible  <bruno@clisp.org>
41353         obstack, libc-config: Support HP-UX cc in C99 mode.
41354         * lib/obstack.h (__FLEXIBLE_ARRAY_MEMBER): Treat HP-UX cc as a pre-C99
41355         compiler, even when in C99 mode.
41356         * lib/cdefs.h (__flexarr): Likewise.
41357         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Update comment.
41359 2018-12-16  Bruno Haible  <bruno@clisp.org>
41361         localename: Fix test failure on OpenBSD >= 6.2.
41362         * m4/intl-thread-locale.m4 (gt_INTL_THREAD_LOCALE_NAME): Test for fake
41363         locale system. Define HAVE_FAKE_LOCALES in this case.
41364         * lib/localename.c (HAVE_GOOD_USELOCALE): New macro. Use it instead of
41365         HAVE_USELOCALE.
41366         * tests/test-localename.c (HAVE_GOOD_USELOCALE): New macro. Use it
41367         instead of HAVE_NEWLOCALE && HAVE_USELOCALE.
41368         * doc/posix-functions/uselocale.texi: Mention OpenBSD problem. Update
41369         platforms list.
41370         * doc/posix-functions/newlocale.texi: Likewise.
41371         * doc/posix-functions/duplocale.texi: Update platforms list.
41372         * doc/posix-functions/freelocale.texi: Likewise.
41374 2018-12-16  Bruno Haible  <bruno@clisp.org>
41376         duplocale tests: Re-enable the test on platforms without <monetary.h>.
41377         * tests/test-duplocale.c: Use more fine-grained #ifs to re-enable most
41378         of the test, on platforms without <monetary.h>.
41380 2018-12-16  Bruno Haible  <bruno@clisp.org>
41382         localename: Update comments.
41383         * lib/localename.c (HAVE_USELOCALE): Update list of platforms.
41385 2018-12-15  Jim Meyering  <meyering@fb.com>
41387         regex: fix indentation
41388         * m4/regex.m4 (gl_REGEX): Indent with spaces, not TABs.
41390 2018-12-15  Bruno Haible  <bruno@clisp.org>
41392         openat-safer tests: Avoid test failure on NetBSD 8.
41393         * tests/test-openat-safer.c (main): Execute a Linux specific test only
41394         on Linux.
41396 2018-12-15  Jim Meyering  <meyering@fb.com>
41398         regex: work around a bug in glibc-2.27 and prior
41399         * m4/regex.m4 (gl_REGEX): Reject any system regexp that gets a failed
41400         assertion for /0|()0|\1|0/.
41401         * tests/test-regex.c (main): Add the same test here.
41403 2018-12-15  Bruno Haible  <bruno@clisp.org>
41405         localename: Fix use of uninitialized shell variable.
41406         * m4/intl-thread-locale.m4 (gt_INTL_THREAD_LOCALE_NAME): Initialize
41407         gt_cv_locale_solaris114 always before use. Remove assignment without
41408         effect.
41410 2018-12-15  Bruno Haible  <bruno@clisp.org>
41412         dfa tests: Avoid test failure on Alpine Linux.
41413         * tests/dfa-match.sh (timeout_10): Accommodate the BusyBox 'timeout'
41414         command found on Alpine Linux.
41416 2018-12-15  Jim Meyering  <meyering@fb.com>
41418         dfa: avoid new warnings from gcc
41419         These would prevent building with -Werror and a Dec snapshot of gcc.
41420         * lib/dfa.c (dfaanalyze): Avoid shadowing warnings for "pos".
41421         Rename each inner instance to "p".
41422         (charclass_context): Remove unused static function.
41424 2018-12-14  Paul Eggert  <eggert@cs.ucla.edu>
41426         mkdir-p: improve diagnostic for FUSE mounts
41427         Problem reported by Niklas Hambüchen in:
41428         https://lists.gnu.org/r/bug-gnulib/2018-12/msg00074.html
41429         * lib/mkdir-p.c (make_dir_parents): In diagnostic, prefer stat
41430         errno to mkdir errno if the stat errno is likely more interesting.
41432 2018-12-14  Bruno Haible  <bruno@clisp.org>
41434         hash-map: Add tests.
41435         * tests/test-hash_map.c: New file.
41436         * modules/hash-map-tests: New file.
41438         linkedhash-map: Add tests.
41439         * tests/test-linkedhash_map.c: New file.
41440         * modules/linkedhash-map-tests: New file.
41442         array-map: Add tests.
41443         * tests/test-array_map.c: New file.
41444         * modules/array-map-tests: New file.
41446         xmap: New module.
41447         * lib/gl_xmap.h: New file.
41448         * lib/gl_xmap.c: New file.
41449         * modules/xmap: New file.
41451         hash-map: New module.
41452         * lib/gl_hash_map.h: New file.
41453         * lib/gl_hash_map.c: New file.
41454         * modules/hash-map: New file.
41456         linkedhash-map: New module.
41457         * lib/gl_linkedhash_map.h: New file.
41458         * lib/gl_linkedhash_map.c: New file.
41459         * lib/gl_anyhash1.h: Update comments.
41460         * lib/gl_anyhash2.h: Likewise.
41461         * modules/linkedhash-map: New file.
41463         array-map: New module.
41464         * lib/gl_array_map.h: New file.
41465         * lib/gl_array_map.c: New file.
41466         * modules/array-map: New file.
41468         map: New module.
41469         * lib/gl_map.h: New file.
41470         * lib/gl_map.c: New file.
41471         * lib/gl_omap.h (gl_mapkey_dispose_fn, gl_mapvalue_dispose_fn): Avoid
41472         conflict with gl_map.h.
41473         * modules/map: New file.
41475 2018-12-13  Bruno Haible  <bruno@clisp.org>
41477         select tests: Avoid test failure on Cygwin.
41478         * tests/test-select.h (test_bad_fd): Use an fd < FD_SETSIZE.
41480 2018-12-13  Bruno Haible  <bruno@clisp.org>
41482         localtime-buffer: Avoid endless recursion in localtime and gmtime.
41483         * lib/localtime-buffer.c: Undefine localtime and gmtime before use.
41485 2018-12-13  Bruno Haible  <bruno@clisp.org>
41487         localeconv tests: Avoid test failure on Cygwin.
41488         * tests/test-localeconv.c (main): On Cygwin, skip the 'grouping' and
41489         'mon_grouping' tests.
41491 2018-12-11  Bruno Haible  <bruno@clisp.org>
41493         omap: Don't dispose the old value when the function returns it.
41494         * lib/gl_array_omap.c (gl_array_remove_at): Don't invoke the vdispose_fn
41495         here.
41496         * lib/gl_avltree_omap.c (NODE_PAYLOAD_DISPOSE): Likewise.
41497         * lib/gl_rbtree_omap.c (NODE_PAYLOAD_DISPOSE): Likewise.
41498         * lib/gl_omap.h (gl_omap_nx_put, gl_omap_remove): Invoke the vdispose_fn
41499         here.
41501         array-omap, avltree-omap, rbtree-omap: Tweak style.
41502         * lib/gl_anytree_omap.h (gl_tree_nx_getput): Return 1 or 0, not true or
41503         false.
41504         * lib/gl_array_omap.c (gl_array_nx_getput): Likewise.
41506         rbtree-omap: Add tests.
41507         * tests/test-rbtree_omap.c: New file.
41508         * modules/rbtree-omap-tests: New file.
41510         avltree-omap: Add tests.
41511         * tests/test-avltree_omap.c: New file.
41512         * modules/avltree-omap-tests: New file.
41514         array-omap: Add tests.
41515         * tests/test-array_omap.c: New file.
41516         * modules/array-omap-tests: New file.
41518         xomap: New module.
41519         * lib/gl_xomap.h: New file.
41520         * lib/gl_xomap.c: New file.
41521         * modules/xomap: New file.
41523         rbtree-omap: New module.
41524         * lib/gl_rbtree_omap.h: New file.
41525         * lib/gl_rbtree_omap.c: New file.
41526         * lib/gl_rbtree_ordered.h: Code moved to here from lib/gl_rbtree_oset.c.
41527         Parameterize.
41528         * lib/gl_rbtree_oset.c: Include gl_rbtree_ordered.h.
41529         * modules/rbtree-omap: New file.
41530         * modules/rbtree-oset (Files): Add lib/gl_rbtree_ordered.h.
41531         (Makefile.am): Add gl_rbtree_ordered.h to lib_SOURCES.
41533         avltree-omap: New module.
41534         * lib/gl_avltree_omap.h: New file.
41535         * lib/gl_avltree_omap.c: New file.
41536         * lib/gl_avltree_ordered.h: Code moved to here from
41537         lib/gl_avltree_oset.c. Parameterize.
41538         * lib/gl_avltree_oset.c: Include gl_avltree_ordered.h.
41539         * lib/gl_anytree_omap.h: New file.
41540         * modules/avltree-omap: New file.
41541         * modules/avltree-oset (Files): Add lib/gl_avltree_ordered.h.
41542         (Makefile.am): Add gl_avltree_ordered.h to lib_SOURCES.
41544         array-omap: New module.
41545         * lib/gl_array_omap.h: New file.
41546         * lib/gl_array_omap.c: New file.
41547         * modules/array-omap: New file.
41549         omap: New module.
41550         * lib/gl_omap.h: New file.
41551         * lib/gl_omap.c: New file.
41552         * modules/omap: New file.
41554 2018-12-11  Bruno Haible  <bruno@clisp.org>
41556         hash-set, linkedhash-set: Reduce code duplication.
41557         * lib/gl_anyhash1.h: Rename from lib/gl_anyhash_list1.h and
41558         lib/gl_anyhash_set1.h.
41559         * lib/gl_anyhash2.h: Rename from lib/gl_anyhash_list2.h and
41560         lib/gl_anyhash_set2.h. Parameterize.
41561         (hash_resize_after_add): New function, from lib/gl_anyhash_set2.h.
41562         * lib/gl_anytreehash_list1.h (hash_resize_after_add): Remove function.
41563         * lib/gl_avltreehash_list.c: Include gl_anyhash1.h instead of
41564         gl_anyhash_list1.h. Include gl_anyhash2.h instead of gl_anyhash_list2.h.
41565         * lib/gl_rbtreehash_list.c: Likewise.
41566         * lib/gl_linkedhash_list.c: Likewise.
41567         (hash_resize_after_add): Remove function.
41568         * lib/gl_linkedhash_set.c: Include gl_anyhash1.h instead of
41569         gl_anyhash_set1.h. Include gl_anyhash2.h instead of gl_anyhash_set2.h.
41570         * gl_hash_set.c: Likewise.
41571         * modules/avltreehash-list (Files, Makefile.am): Update file list.
41572         * modules/rbtreehash-list (Files, Makefile.am): Likewise.
41573         * modules/linkedhash-list (Files, Makefile.am): Likewise.
41574         * modules/linkedhash-set (Files, Makefile.am): Likewise.
41575         * modules/hash-set (Files, Makefile.am): Likewise.
41577 2018-12-11  Bruno Haible  <bruno@clisp.org>
41579         array-set: Optimize.
41580         * lib/gl_array_set.c (gl_array_search, gl_array_remove): Test equals_fn
41581         outside the loop, not inside the loop.
41583 2018-12-11  Bruno Haible  <bruno@clisp.org>
41585         times: Fix tests.
41586         * tests/test-times.c (doublecmp): Implement a total order.
41588 2018-12-11  Bruno Haible  <bruno@clisp.org>
41590         array-set, linkedhash-set, hash-set: Fix tests.
41591         * tests/test-array_set.c (cmp_objects_in_array): New function.
41592         (check_equals): Use it.
41593         * tests/test-hash_set.c: Likewise.
41594         * tests/test-linkedhash_set.c: Likewise.
41596 2018-12-08  Bruno Haible  <bruno@clisp.org>
41598         Fix comments.
41599         * lib/gl_list.h (gl_list_free): Clarify what it does.
41600         * lib/gl_oset.h (gl_oset_free): Likewise.
41601         * lib/gl_set.h (gl_set_free): Likewise.
41602         * lib/gl_anytree_oset.h (gl_tree_search_atleast): Fix typo in comment.
41603         * lib/gl_array_oset.c (gl_array_search_atleast): Likewise.
41604         * lib/gl_anyavltree_list1.h (MAXHEIGHT): Likewise.
41605         * lib/gl_avltree_oset.c (MAXHEIGHT): Likewise.
41607 2018-12-03  Bruno Haible  <bruno@clisp.org>
41609         hash-set: Add tests.
41610         * tests/test-hash_set.c: New file.
41611         * modules/hash-set-tests: New file.
41613         linkedhash-set: Add tests.
41614         * tests/test-linkedhash_set.c: New file.
41615         * modules/linkedhash-set-tests: New file.
41617         array-set: Add tests.
41618         * tests/test-array_set.c: New file.
41619         * modules/array-set-tests: New file.
41621         xset: New module.
41622         * lib/gl_xset.h: New file.
41623         * lib/gl_xset.c: New file.
41624         * modules/xset: New file.
41626         hash-set: New module.
41627         * lib/gl_hash_set.h: New file.
41628         * lib/gl_hash_set.c: New file.
41629         * modules/hash-set: New file.
41631         linkedhash-set: New module.
41632         * lib/gl_linkedhash_set.h: New file.
41633         * lib/gl_linkedhash_set.c: New file.
41634         * lib/gl_anyhash_set1.h: New file, based on lib/gl_anyhash_list1.h.
41635         * lib/gl_anyhash_set2.h: New file, based on lib/gl_anyhash_list2.h.
41636         * lib/gl_anyhash_primes.h: New file, extracted from
41637         lib/gl_anyhash_list2.h.
41638         * lib/gl_anyhash_list2.h: Include it.
41639         (primes, next_prime): Remove definitions.
41640         * modules/linkedhash-set: New file.
41641         * modules/avltreehash-list (Files): Add lib/gl_anyhash_primes.h.
41642         (Makefile.am): Add gl_anyhash_primes.h to lib_SOURCES.
41643         * modules/linkedhash-list (Files): Add lib/gl_anyhash_primes.h.
41644         (Makefile.am): Add gl_anyhash_primes.h to lib_SOURCES.
41645         * modules/rbtreehash-list (Files): Add lib/gl_anyhash_primes.h.
41646         (Makefile.am): Add gl_anyhash_primes.h to lib_SOURCES.
41648         array-set: New module.
41649         * lib/gl_array_set.h: New file.
41650         * lib/gl_array_set.c: New file.
41651         * modules/array-set: New file.
41653         set: New module.
41654         * lib/gl_set.h: New file.
41655         * lib/gl_set.c: New file.
41656         * lib/gl_oset.h (gl_setelement_dispose_fn): Avoid conflict with
41657         gl_set.h.
41658         * modules/set: New file.
41660 2018-12-07  Akim Demaille  <akim@lrde.epita.fr>
41662         bison: don't force the Yacc mode
41663         Passing -y forces Bison into POSIX YACC mode.  This includes reporting
41664         errors when Bison features are used in the grammar file.  Some of
41665         these features (such as %expect) were flagged non-yacc recently.  Most
41666         of the time, -y is actually used to please Automake's ylwrap which
41667         expects the output to be y.tab.c.
41668         * m4/bison.m4 (gl_BISON): Use `-o y.tab.c` rather than `-y`.
41670 2018-12-01  Bruno Haible  <bruno@clisp.org>
41672         gnupload: Document short options.
41673         * build-aux/gnupload (usage): Document the short options.
41675 2018-11-28  Ben Elliston  <bje@gnu.org>
41677         gnupload: Support option -h as alias of --help.
41678         * build-aux/gnupload: Support -h.
41680 2018-11-30  Paul Eggert  <eggert@cs.ucla.edu>
41682         memrchr: port better to clang
41683         * lib/memrchr.c (__memrchr): Cast to void * instead of to
41684         longword *, to pacify clang -Wcast-align (Bug#33544).
41686 2018-11-29  Eric Blake  <eblake@redhat.com>
41688         docs: mention printf %m considerations
41689         * doc/glibc-functions/asprintf.texi (asprintf): Document that %m
41690         is not portable, and is easy enough to work around.
41691         * doc/glibc-functions/obstack_printf.texi (obstack_printf): Likewise.
41692         * doc/glibc-functions/obstack_vprintf.texi (obstack_vprintf): Likewise.
41693         * doc/glibc-functions/vasprintf.texi (vasprintf): Likewise.
41694         * doc/posix-functions/dprintf.texi (dprintf): Likewise.
41695         * doc/posix-functions/fprintf.texi (fprintf): Likewise.
41696         * doc/posix-functions/fwprintf.texi (fwprintf): Likewise.
41697         * doc/posix-functions/printf.texi (printf): Likewise.
41698         * doc/posix-functions/snprintf.texi (snprintf): Likewise.
41699         * doc/posix-functions/sprintf.texi (sprintf): Likewise.
41700         * doc/posix-functions/swprintf.texi (swprintf): Likewise.
41701         * doc/posix-functions/vdprintf.texi (vdprintf): Likewise.
41702         * doc/posix-functions/vfprintf.texi (vfprintf): Likewise.
41703         * doc/posix-functions/vfwprintf.texi (vfwprintf): Likewise.
41704         * doc/posix-functions/vprintf.texi (vprintf): Likewise.
41705         * doc/posix-functions/vsnprintf.texi (vsnprintf): Likewise.
41706         * doc/posix-functions/vsprintf.texi (vsprintf): Likewise.
41707         * doc/posix-functions/vswprintf.texi (vswprintf): Likewise.
41708         * doc/posix-functions/vwprintf.texi (vwprintf): Likewise.
41709         * doc/posix-functions/wprintf.texi (wprintf): Likewise.
41711 2018-11-29  Akim Demaille  <akim@lrde.epita.fr>
41713         bitset: rename ebitset/expandable.* as tbitset/table.*
41714         See
41715         https://lists.gnu.org/archive/html/bug-gnulib/2018-11/msg00096.html.
41716         * lib/bitset/expandable.h, lib/bitset/expandable.c: Rename as...
41717         * lib/bitset/table.h, lib/bitset/table.c: these.
41718         Rename all the ebitset* symbols as tbitset*.
41719         Adjust dependencies.
41721 2018-11-28  Akim Demaille  <akim@lrde.epita.fr>
41723         bitset: check the operations
41724         * tests/test-bitset.c (bitset_random): New.
41725         Use it.
41726         * lib/bitset/expandable.c (ebitset_not): Fix typo.
41728 2018-11-28  Akim Demaille  <akim@lrde.epita.fr>
41730         bitset: properly use false/true instead of 0/1 for Booleans
41731         * lib/bitset/expandable.c, lib/bitset/vector.c: Use false/true, not
41732         0/1, as Booleans.
41734 2018-11-28  Akim Demaille  <akim@lrde.epita.fr>
41736         bitset: rename BITSET_VARRAY as BITSET_VECTOR
41737         For consistency with the name of the file.
41738         * doc/bitset.texi, lib/bitset.c, lib/bitset/base.h,
41739         * lib/bitset/stats.c, lib/bitset/vector.c
41740         (BITSET_VARRAY): Rename as...
41741         (BITSET_VECTOR): this.
41743 2018-11-28  Paul Eggert  <eggert@cs.ucla.edu>
41745         strerror_r-posix: memmove, not memcpy
41746         * lib/strerror_r.c (safe_copy): Use memmove, not memcpy,
41747         since the source and destination might overlap in the call
41748         ‘safe_copy (buf, buflen, strerror_r (errnum, buf, buflen))’.
41749         Simplify.
41751 2018-11-25  Akim Demaille  <akim@lrde.epita.fr>
41753         bitsetv: new module
41754         * lib/bitsetv.c, lib/bitsetv.h, modules/bitsetv: New.
41756 2018-11-25  Akim Demaille  <akim@lrde.epita.fr>
41758         bitset: add tests and doc
41759         First stabs at providing a documentation and test for the bitset
41760         module.
41761         * doc/bitset.texi, modules/test-bitset, tests/bitset-tests.c: New.
41763 2018-11-25  Akim Demaille  <akim@lrde.epita.fr>
41765         bitset: new module
41766         * lib/bitset.c, lib/bitset.h, lib/bitset/array.c,
41767         * lib/bitset/array.h, lib/bitset/base.h, lib/bitset/expandable.c,
41768         * lib/bitset/expandable.h, lib/bitset/list.c, lib/bitset/list.h,
41769         * lib/bitset/stats.c, lib/bitset/stats.h, lib/bitset/vector.c,
41770         * lib/bitset/vector.h, modules/bitset:
41771         New.
41773 2018-11-23  Bruno Haible  <bruno@clisp.org>
41775         localename: Fix gettext test failures on mingw.
41776         * lib/localename.c (gl_locale_name_posix): Convert the result of
41777         gl_locale_name_environ to XPG syntax.
41779 2018-11-23  Karl Berry  <karl@freefriends.org>
41781         * config/srclistvars.txt,
41782         * config/srclist.txt: remove all gettext references;
41783         the gettext maintainers will sync as needed.
41785 2018-11-21  Paul Eggert  <eggert@cs.ucla.edu>
41787         mktime: add libc-config dependency
41788         I missed this when we synced from glibc.
41789         * modules/mktime (Depends-on): Add libc-config.
41791 2018-11-13  Paul Eggert  <eggert@cs.ucla.edu>
41793         longlong: fix comment typo
41794         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Fix typo.
41796 2018-11-11  Bruno Haible  <bruno@clisp.org>
41798         havelib: Remove the need to include asm-underscore.m4.
41799         * m4/host-cpu-c-abi.m4 (gl_HOST_CPU_C_ABI_32BIT): New macro.
41800         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): Use it instead of
41801         gl_HOST_CPU_C_ABI.
41802         * modules/havelib (Files): Add host-cpu-c-abi.m4.
41803         (Depends-on): Remove host-cpu-c-abi.
41805 2018-11-03  Paul Eggert  <eggert@cs.ucla.edu>
41807         parse-datetime: simplify test for mktime failure
41808         * lib/parse-datetime.y (mktime_ok): Simplify.
41809         Remove args TZ and T; no longer needed.  Callers changed.
41811         posixtm: simplify test for mktime failure
41812         * lib/posixtm.c (posixtime): Simplify.
41814         nstrftime: simplify test for mktime failure
41815         * lib/nstrftime.c (__strftime_internal): Simplify.
41817 2018-11-02  Paul Eggert  <eggert@cs.ucla.edu>
41819         gnulib-common.m4: port _Noreturn to C++
41820         Problem reported by Akim Demaille in:
41821         https://lists.gnu.org/r/bug-bison/2018-10/msg00067.html
41822         * m4/gnulib-common.m4 (gl_COMMON_BODY): If C++, use [[noreturn]].
41823         Merge adjustments from _Noreturn.h and from glibc into the non-C++
41824         version.
41825         * lib/_Noreturn.h: Match gnulib-common.
41827 2018-10-30  Bruno Haible  <bruno@clisp.org>
41829         gnu-make: Fix for NetBSD 8 'make'.
41830         Reported by Reuben Thomas in
41831         <https://lists.gnu.org/archive/html/bug-gnulib/2018-10/msg00135.html>.
41832         * m4/gnu-make.m4 (gl_GNU_MAKE): Use a heuristic based on the --version
41833         output, ignoring exit codes.
41835 2018-10-28  Bernhard Voelker  <mail@bernhard-voelker.de>
41837         maintainer-makefile: fix syntax-check rule for "same.h"
41838         * top/maint.mk (sc_prohibit_same_without_use): Adjust regex to check
41839         for 'same_nameat', too.
41841 2018-10-25  Paul Eggert  <eggert@cs.ucla.edu>
41843         havelib: fix nested ‘configure’ chatter
41844         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): Don’t nest
41845         AC_CACHE_CHECK calls, which resulted in confusing output like
41846         “checking for the common suffixes of directories in the library
41847         search path... checking for 64-bit host... no lib,lib”.
41849         backupfile: tweak for better code
41850         * lib/backupfile.c: Sort include directives, and remove
41851         unnecessary <limits.h> include.
41852         (FALLTHROUGH): New macro, copied from other modules.
41853         (backupfile_internal): Use it to avoid code duplication.
41854         This lets GCC 8.2.1 generate better code by inlining the
41855         call to check_extension.
41857 2018-10-23  Paul Eggert  <eggert@cs.ucla.edu>
41859         backupfile: new dir_fd args
41860         New module opendirat with code taken from fts.
41861         Use this module to let backupfile use a directory file descriptor.
41862         * NEWS: Document the incompatible change.
41863         * lib/backup-find.c (find_backup_file_name):
41864         * lib/backup-rename.c (backup_file_rename):
41865         New arg DIR_FD.
41866         * lib/backupfile.c: Include stdint.h, for SIZE_MAX.
41867         (SIZE_MAX): Remove.
41868         Include opendirat.h rather than dirent--.h.
41869         (check_extension): New args DIR_FD and BASE_MAX.  All callers changed.
41870         (numbered_backup): New args DIR_FD and PNEW_FD.  All callers changed.
41871         (backupfile_internal): New arg DIR_FD.  All callers changed.
41872         * lib/fts.c: Include opendirat.h.
41873         (opendirat): Move to opendirat.c.
41874         * lib/opendirat.c, lib/opendirat.h, modules/opendirat: New files.
41875         * modules/backupfile (Depends-on): Remove dirfd, opendir.
41876         Add opendirat.
41877         * modules/fts (Depends-on): Remove fdopendir, openat-safer.
41878         Add opendirat.
41880 2018-10-23  Bruno Haible  <bruno@clisp.org>
41882         localename: Simplify support for per-thread locales on Solaris 11.4.
41883         * m4/intl-thread-locale.m4: Renamed from m4/intlsolaris.m4.
41884         (gt_INTL_THREAD_LOCALE_NAME): Renamed from gt_INTL_SOLARIS. Define
41885         HAVE_SOLARIS114_LOCALES instead of HAVE_NAMELESS_LOCALES.
41886         * lib/localename.c: Handle HAVE_SOLARIS114_LOCALES through Solaris
41887         specific code.
41888         * lib/localename-table.h: Update comments.
41889         * lib/localename-table.c: Update comments.
41890         * m4/localename.m4 (gl_LOCALENAME): Require gt_INTL_THREAD_LOCALE_NAME.
41891         Test for 'uselocale'. Don't invoke gt_INTL_SOLARIS.
41892         * m4/intl.m4 (AM_INTL_SUBDIR): Require gt_INTL_THREAD_LOCALE_NAME. Test
41893         for 'uselocale'. Set HAVE_NAMELESS_LOCALES.
41894         (gt_INTL_SUBDIR_CORE): Don't invoke gt_INTL_SOLARIS. Don't set
41895         HAVE_NAMELESS_LOCALES here.
41896         * modules/localename (Files): Add m4/intl-thread-locale.m4. Remove
41897         m4/intlsolaris.m4.
41898         * modules/gettext (Files): Likewise.
41900 2018-10-22  Bruno Haible  <bruno@clisp.org>
41902         std-gnu11: Support Autoconf versions < 2.64.
41903         * m4/std-gnu11.m4 (AC_PROG_CC, AC_PROG_CXX): Use _AC_DO as fallback
41904         when _AC_DO_LIMIT does not exist.
41906 2018-10-22  Bruno Haible  <bruno@clisp.org>
41908         Assume Autoconf >= 2.63.
41909         * DEPENDENCIES: Mention the requirement.
41911         * gnulib-tool (DEFAULT_AUTOCONF_MINVERSION): Bump to 2.63.
41912         (func_get_filelist): Don't list m4/onceonly.m4 any more.
41913         * pygnulib/GLModuleSystem.py (getFiles): Likewise.
41914         * m4/onceonly.m4: Remove file.
41916         * m4/openmp.m4: Remove file.
41917         * modules/openmp (Files): Remove m4/openmp.m4.
41919         * m4/configmake.m4 (gl_CONFIGMAKE_PREP): Don't set datarootdir, docdir,
41920         htmldir, dvidir, pdfdir, psdir, localedir.
41921         * m4/po.m4 (AM_PO_SUBDIRS): Don't set localedir.
41923         * m4/gnulib-common.m4 (m4_foreach_w): Remove fallback for
41924         Autoconf < 2.60.
41925         (AC_PROG_MKDIR_P): Remove definition for Autoconf < 2.62.
41926         (AC_PROG_SED): Remove fallback for Autoconf < 2.60.
41928         * m4/errno_h.m4 (AC_COMPUTE_INT): Remove fallback for Autoconf < 2.61.
41929         * m4/size_max.m4 (AC_COMPUTE_INT): Likewise.
41930         * m4/stdint.m4 (AC_COMPUTE_INT): Likewise.
41932         * m4/fcntl-o.m4 (gl_FCNTL_O_FLAGS): Assume AC_USE_SYSTEM_EXTENSIONS
41933         exists.
41934         * m4/threadlib.m4 (gl_THREADLIB_EARLY_BODY): Likewise,
41936         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Remove workaround for
41937         Autoconf < 2.61.
41939         * m4/lib-prefix.m4 (AC_LIB_ARG_WITH): Remove macro.
41940         (AC_LIB_PREFIX): Use AC_ARG_WITH, assuming semantics of
41941         Autoconf >= 2.52.
41943         * m4/longlong.m4: Require Autoconf >= 2.62. Update comments.
41944         * m4/ls-mntd-fs.m4: Require Autoconf >= 2.60. Update comments.
41945         * m4/gettext.m4 (AM_GNU_GETTEXT): Update comment.
41947 2018-10-22  Bruno Haible  <bruno@clisp.org>
41949         Assume Automake >= 1.11.
41950         * m4/configmake.m4: Update comments.
41951         * m4/lib-link.m4 (AC_LIB_RPATH): Assume AC_REQUIRE_AUX_FILE exists.
41952         * m4/po.m4 (AM_PO_SUBDIRS, AM_POSTPROCESS_PO_MAKEFILE): Eliminate uses
41953         of 'eval'.
41954         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am,
41955         func_create_testdir, func_create_megatestdir): Emit a Makefile.am that
41956         requires Automake >= 1.11.
41958 2018-10-22  Bruno Haible  <bruno@clisp.org>
41960         localename: Fix typo in comment.
41961         * tests/test-locale-c++.cc (newlocale): Fix typo in comment.
41963 2018-10-22  Bruno Haible  <bruno@clisp.org>
41965         Fix failure of 'gnulib-tool --create-testdir' with all modules.
41966         * gnulib-tool (func_create_testdir): Exclude 'timevar' module.
41968 2018-10-21  Bruno Haible  <bruno@clisp.org>
41970         locale: Ease integration with GNU libintl.
41971         * lib/locale.in.h (GNULIB_defined_newlocale, GNULIB_defined_duplocale,
41972         GNULIB_defined_freelocale): New macros.
41974 2018-10-21  Bruno Haible  <bruno@clisp.org>
41976         localename: Fine-tune support for per-thread locales on Solaris 11.4.
41977         * lib/localename-table.h: New file, extracted from lib/localename.c.
41978         * lib/localename-table.c: Likewise.
41979         * lib/localename.c: Include localename-table.h.
41980         (get_locale_t_name, newlocale, duplocale, freelocale): Invoke
41981         locale_hash_function instead of pointer_hash.
41982         * modules/localename (Files): Add lib/localename-table.h,
41983         lib/localename-table.c.
41984         (lib_SOURCES): Add localename-table.c.
41985         * m4/intlsolaris.m4 (gt_INTL_SOLARIS): Require AC_CANONICAL_HOST. Test
41986         for Solaris 11.4 locale system only on Solaris. Test for it
41987         independently whether getlocalename_l exists.
41988         * m4/intl.m4 (gt_INTL_SUBDIR_CORE): Don't test for 'uselocale' and
41989         'getlocalename_l'. Instead, invoke gt_INTL_SOLARIS. Set
41990         HAVE_NAMELESS_LOCALES.
41991         * modules/gettext (Files): Add m4/intlsolaris.m4.
41993 2018-10-21  Bruno Haible  <bruno@clisp.org>
41995         Small update from gettext.
41996         * m4/intl.m4: Update from gettext:
41997         - 2018-01-02: Fix 'ar' invocation when cross-compiling and in 64-bit
41998         mode on AIX.
41999         - 2018-01-02: Don't use -lc explicitly when linking with libtool.
42000         - 2017-05-19: (AM_INTL_SUBDIR): Require AC_C_FLEXIBLE_ARRAY_MEMBER.
42002 2018-10-16  Bruno Haible  <bruno@clisp.org>
42004         mountlist: Remove support for Cray with UNICOS 9.
42005         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't define
42006         MOUNTED_LISTMNTENT.
42007         * lib/mountlist.c: Remove MOUNTED_LISTMNTENT case.
42009 2018-10-16  Bruno Haible  <bruno@clisp.org>
42011         fsusage, mountlist, getloadavg, getgroups: Remove support for Ultrix.
42012         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't define
42013         STAT_STATFS2_FS_DATA.
42014         * lib/fsusage.c: Remove STAT_STATFS2_FS_DATA case.
42015         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't define
42016         MOUNTED_GETMNT.
42017         * lib/mountlist.c: Remove MOUNTED_GETMNT case.
42018         * lib/getloadavg.c (decstation): Remove definition and case.
42019         * m4/getgroups.m4 (AC_FUNC_GETGROUPS): Mention NeXTstep, not Ultrix.
42020         * lib/getgroups.c: Likewise.
42021         * doc/posix-functions/getgroups.texi: Likewise.
42022         * lib/time.in.h: Update comments.
42024 2018-10-16  Bruno Haible  <bruno@clisp.org>
42026         getloadavg: Remove support for ConvexOS.
42027         * lib/getloadavg.c: Remove convex case.
42029 2018-10-16  Bruno Haible  <bruno@clisp.org>
42031         getloadavg: Remove support for Sony NEWS.
42032         * lib/getloadavg.c: Remove sony_news case.
42034 2018-10-16  Bruno Haible  <bruno@clisp.org>
42036         fsusage, mountlist, getloadavg: Remove support for Dynix/ptx.
42037         * lib/fsusage.c: Remove _SEQUENT_ case.
42038         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Update comments.
42039         * lib/mountlist.c: Don't test for MNTTABNAME.
42040         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Don't test for libseq.
42041         (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't test for MNTTABNAME.
42042         * lib/getloadavg.c: Remove _SEQUENT_ and sequent cases.
42043         * lib/stat-size.h: Don't mention the Sequent bug.
42044         * doc/posix-functions/utime.texi: Don't mention the Dynix bug.
42046 2018-10-16  Bruno Haible  <bruno@clisp.org>
42048         fsusage: Remove support for AIX 3.
42049         * lib/fsusage.c: Remove code for AIX 3.
42050         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Update comments.
42052 2018-10-16  Bruno Haible  <bruno@clisp.org>
42054         fsusage, stat-size, getloadavg: Remove support for AIX PS/2.
42055         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Don't check for dustat.h.
42056         * lib/fsusage.c: Remove code for AIX PS/2.
42057         * lib/stat-size.h (ST_NBLOCKSIZE): Likewise.
42058         * lib/getloadavg.c: Likewise.
42060 2018-10-16  Bruno Haible  <bruno@clisp.org>
42062         getloadavg: Remove support for HP-UX on m68k.
42063         * lib/getloadavg.c: Remove hp9000s300 case.
42065 2018-10-16  Bruno Haible  <bruno@clisp.org>
42067         fsusage, mountlist: Remove support for DolphinOS (an SVR3 variant).
42068         * lib/fsusage.c: Remove DOLPHIN case.
42069         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Update comments.
42070         * lib/mountlist.c: Remove MOUNTED_GETMNTTBL case.
42072 2018-10-16  Bruno Haible  <bruno@clisp.org>
42074         getloadavg: Remove support for Alliant FX/2800.
42075         * lib/getloadavg.c: Remove alliant case.
42077 2018-10-16  Bruno Haible  <bruno@clisp.org>
42079         getloadavg: Remove support for tek4300.
42080         * lib/getloadavg.c: Remove tek4300 case.
42082 2018-10-16  Bruno Haible  <bruno@clisp.org>
42084         getloadavg: Remove support for Ardent.
42085         * lib/getloadavg.c: Remove ardent case.
42087 2018-10-16  Bruno Haible  <bruno@clisp.org>
42089         mountlist: Remove support for SVR2.
42090         Reported by Andrew Borodin <aborodin@vmail.ru> in
42091         <https://lists.gnu.org/archive/html/bug-gnulib/2018-10/msg00101.html>.
42092         * lib/mountlist.c: Remove MOUNTED_FREAD case.
42093         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't define
42094         MOUNTED_FREAD.
42096 2018-10-15  Paul Eggert  <eggert@cs.ucla.edu>
42098         libc-config: merge from glibc
42099         * lib/cdefs.h (__glibc_has_attribute): New macro.
42101         regex: depend on libc-config
42102         * modules/regex (Depends-on): Add libc-config.
42103         This is needed after the recent autoupdate from glibc.
42105 2018-10-14  Bruno Haible  <bruno@clisp.org>
42107         localename: Add support for per-thread locales on Solaris 11.4.
42108         * lib/locale.in.h (newlocale, freelocale): New declarations.
42109         (duplocale): Declare also when the 'localename' module requests it.
42110         * lib/localename.c (struniq_hash_node): Renamed from hash_node.
42111         (STRUNIQ_HASH_TABLE_SIZE): Renamed from HASH_TABLE_SIZE.
42112         (struniq): Update.
42113         (struct locale_categories_names, struct locale_hash_node): New types.
42114         (LOCALE_HASH_TABLE_SIZE): New constant.
42115         (locale_hash_table, locale_lock): New variables.
42116         (pointer_hash, get_locale_t_name): New functions.
42117         (newlocale, duplocale, freelocale): New overridden functions.
42118         (gl_locale_name_thread_unsafe): Use get_locale_t_name.
42119         * m4/intlsolaris.m4: New file.
42120         * m4/localename.m4 (gl_LOCALENAME): Require gl_LOCALE_H_DEFAULTS. Invoke
42121         gt_INTL_SOLARIS. Set HAVE_NEWLOCALE, HAVE_DUPLOCALE, HAVE_FREELOCALE,
42122         REPLACE_NEWLOCALE, REPLACE_DUPLOCALE, REPLACE_FREELOCALE.
42123         * m4/locale_h.m4 (gl_LOCALE_H): Test whether newlocale, freelocale are
42124         declared.
42125         (gl_LOCALE_H_DEFAULTS): Initialize GNULIB_LOCALENAME, HAVE_NEWLOCALE,
42126         HAVE_FREELOCALE, REPLACE_NEWLOCALE, REPLACE_FREELOCALE.
42127         * modules/locale (Makefile.am): Substitute GNULIB_LOCALENAME,
42128         HAVE_NEWLOCALE, HAVE_FREELOCALE, REPLACE_NEWLOCALE, REPLACE_FREELOCALE.
42129         * modules/localename (Files): Add intlsolaris.m4.
42130         (Depends-on): Add 'locale'.
42131         (configure.ac): Invoke gl_LOCALE_MODULE_INDICATOR.
42132         * tests/test-locale-c++.cc (newlocale, freelocale): Prepare for checking
42133         the signatures.
42135 2018-10-14  Akim Demaille  <akim@lrde.epita.fr>
42137         timevar: use gethrxtime to get wall clock time
42138         clock_gettime is not portable.  gethrxtime takes the best available
42139         option to get the wall clock time, including clock_gettime (monotonic
42140         clock), and gettime (non monotonic).
42141         Also, using xtime_t instead of float preserves the precision.
42142         Suggested by Bruno Haible.
42143         * lib/xtime.h (xtime_make): Handle overflows of nanoseconds.
42144         * modules/timevar (Depends-on): We need gethrxtime.
42145         We no longer use times().
42146         (Link): Update.
42147         * lib/timevar.h (timevar_time_def): Use xtime_t.
42148         * lib/timevar.c (set_to_current_time): Use gethrxtime.
42149         (timevar_print): Instead of checking whether the timings themselves
42150         are large enough for the timevar to be printed, check the percentages.
42152 2018-10-14  Bruno Haible  <bruno@clisp.org>
42154         wcsnrtombs: Work around Solaris 11.4 bug.
42155         * m4/wcsnrtombs.m4 (gl_WCSNRTOMBS_WORKS_IN_TRADITIONAL_LOCALE): New
42156         macro.
42157         (gl_FUNC_WCSNRTOMBS): Invoke it.
42158         * doc/posix-functions/wcsnrtombs.texi: Mention the Solaris bug.
42160 2018-10-14  Bruno Haible  <bruno@clisp.org>
42162         mbsnrtowcs: Work around Solaris 11.4 bug.
42163         * m4/mbsnrtowcs.m4 (gl_MBSNRTOWCS_WORKS_IN_TRADITIONAL_LOCALE): New
42164         macro.
42165         (gl_FUNC_MBSNRTOWCS): Invoke it.
42166         * doc/posix-functions/mbsnrtowcs.texi: Mention the Solaris bug.
42168 2018-10-14  Bruno Haible  <bruno@clisp.org>
42170         doc: Update for Solaris 11.4.
42171         * doc/**/*.texi: For bugs that exist in both Solaris 11.3 and 11.4,
42172         mention Solaris 11.4.
42173         * m4/printf.m4: Update comments about Solaris.
42174         * m4/log.m4: Likewise.
42175         * m4/log10.m4: Likewise.
42176         * m4/logb.m4: Likewise.
42177         * m4/logbf.m4: Likewise.
42178         * m4/logbl.m4: Likewise.
42179         * m4/rename.m4: Likewise.
42180         * m4/wcrtomb.m4: Likewise.
42181         * m4/hostent.m4: Likewise.
42182         * m4/servent.m4: Likewise.
42184 2018-10-14  Bruno Haible  <bruno@clisp.org>
42186         floor, ceil, trunc, truncf, truncl: Defeat GCC optimizations.
42187         * m4/floor.m4 (gl_FUNC_FLOOR_LIBS): Use 'floor' also through a function
42188         pointer.
42189         * m4/ceil.m4 (gl_FUNC_CEIL_LIBS): Use 'ceil' also through a function
42190         pointer.
42191         * m4/trunc.m4 (gl_FUNC_TRUNC): Use 'trunc' also through a function
42192         pointer.
42193         * m4/truncf.m4 (gl_FUNC_TRUNCF): Use 'truncf' also through a function
42194         pointer.
42195         * m4/truncl.m4 (gl_FUNC_TRUNCL): Use 'truncl' also through a function
42196         pointer.
42198 2018-10-13  Akim Demaille  <akim@lrde.epita.fr>
42200         bootstrap: fix wget command for po files.
42201         * build-aux/bootstrap (po_download_command_format): Fix comment,
42202         and adjust callers.
42204 2018-10-13  Akim Demaille  <akim@lrde.epita.fr>
42206         timevar: improve the output format
42207         Suggested by Bruno Haible.
42208         See https://lists.gnu.org/archive/html/bug-gnulib/2018-10/msg00040.html.
42209         * lib/timevar.c (timevar_print): Use %7.3f for usr/sys and %11.6f for
42210         wall, since its resolution is much higher.
42212 2018-10-13  Akim Demaille  <akim@lrde.epita.fr>
42214         timevar: expect that getrusage is available.
42215         Don't keep both times and getrusage as backend: both are guaranteed by
42216         gnulib, a single one suffices.  Using getrusage is open to possibly
42217         tracking other types of resources in the future.
42218         * modules/timevar (Depends-on): Add getrusage.
42219         (configure.ac): Remove gl_TIMEVAR.
42220         (Files): Remove m4/timevar.m4.
42221         * m4/timevar.m4: Remove, rely on gnulib for getrusage.
42222         * lib/timevar.h (timevar_enabled): Clarify documentation.
42223         * lib/timevar.c: Remove all the code about times.
42224         Remove all the CPP guards about getrusage: expect it to be present
42225         (courtesy of gnulib).
42227 2018-10-12  Bruno Haible  <bruno@clisp.org>
42229         mountlist: Improve support for Solaris in 64-bit mode.
42230         Reported by David Wood <David.Wood@deshaw.com> in
42231         <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=6816>.
42232         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): On Solaris 8 or
42233         newer, define MOUNTED_GETEXTMNTENT instead of MOUNTED_GETMNTENT2.
42234         * lib/mountlist.c: Add code for MOUNTED_GETEXTMNTENT case.
42236 2018-10-12  Bruno Haible  <bruno@clisp.org>
42238         mountlist: Add support for Minix.
42239         Reported by Assaf Gordon in
42240         <https://lists.gnu.org/archive/html/bug-gnulib/2014-09/msg00074.html>.
42241         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't use
42242         AC_CHECK_FUNCS to check for 'getmntinfo'.
42243         * lib/mountlist.c: Update comments.
42245 2018-10-12  Bruno Haible  <bruno@clisp.org>
42247         Make better use of Autoconf.
42248         * m4/environ.m4: Use AC_CACHE_CHECK where possible.
42249         * m4/manywarnings.m4: Likewise.
42250         * m4/manywarnings-c++.m4: Likewise.
42251         * m4/socklen.m4: Likewise.
42252         * m4/sockpfaf.m4: Likewise.
42253         * m4/stdarg.m4: Likewise.
42254         * m4/visibility.m4: Likewise.
42255         * m4/fsusage.m4: Use AC_CACHE_CHECK where possible. Modernize
42256         indentation.
42257         * m4/ls-mntd-fs.m4: Likewise.
42259 2018-10-11  Bruno Haible  <bruno@clisp.org>
42261         mountlist: Modernize platform lists.
42262         * m4/ls-mntd-fs.m4: Clarify which MOUNTED_* symbol applies to which
42263         platforms, deemphasizing the obsolete ones.
42264         * lib/mountlist.c: Likewise.
42266 2018-10-11  Bruno Haible  <bruno@clisp.org>
42268         getprogname: Add support for 32-bit programs on HP-UX.
42269         * lib/getprogname.c (getprogname) [HP-UX]: If pstat_getproc fails,
42270         try the similar functions 32-bit programs on 64-bit HP-UX.
42272 2018-10-11  Bruno Haible  <bruno@clisp.org>
42274         getprogname: Work around program name truncation when possible.
42275         * lib/getprogname.c (getprogname) [HP-UX]: When pst_ucomm is truncated,
42276         possibly use pst_cmd instead.
42278 2018-10-08  Paul Eggert  <eggert@cs.ucla.edu>
42280         fts: cleanup after FTS_NOATIME removal
42281         * lib/fts_.h (FTS_VERBATIM, FTS_OPTIONMASK, FTS_NAMEONLY)
42282         (FTS_STOP): Shrink to minimal values.  We don’t need to
42283         worry about binary compatibility in Gnulib, and the old way
42284         of doing things had a hole in the user options that caused
42285         FTS_OPTIONMASK to not work as desired.
42287 2018-10-08  Bernhard Voelker  <mail@bernhard-voelker.de>
42289         fts: remove FTS_NOATIME
42290         This reverts commit da4d6974013c822af1498941e32db774b2031765.
42291         We cannot guarantee that O_NOATIME works: e.g. openat fails
42292         with EPERM if the effective user ID of the caller does not match
42293         the owner of the file and the caller is not privileged.
42294         Downstream findutils has never picked up FTS_NOATIME.  Discussed at
42295         <https://lists.gnu.org/r/bug-gnulib/2018-09/msg00122.html>.
42296         * lib/fts_.h (FTS_NOATIME): Remove bit flag.
42297         (FTS_OPTIONMASK): Adjust.
42298         * lib/fts.c (diropen, fts_open, fts_build): Likewise.
42299         (fd_ring_check): Likewise.
42301 2018-10-08  Bruno Haible  <bruno@clisp.org>
42303         csharpcomp*, csharpexec*: Remove support for pnet.
42304         * m4/csharpcomp.m4 (gt_CSHARPCOMP): Don't test for cscc. Don't set
42305         HAVE_CSCC.
42306         * build-aux/csharpcomp.sh.in (options_cscc): Remove variable.
42307         Don't test HAVE_CSCC.
42308         * lib/csharpcomp.c (compile_csharp_using_pnet): Remove function.
42309         (compile_csharp_class): Don't invoke it.
42310         * m4/csharpexec.m4 (gt_CSHARPEXEC): Don't test for ilrun. Don't set
42311         HAVE_ILRUN.
42312         * build-aux/csharpexec.sh.in (options_ilrun): Remove variable.
42313         Don't test HAVE_ILRUN.
42314         * lib/csharpexec.c (execute_csharp_using_pnet): Remove function.
42315         (execute_csharp_program): Don't invoke it.
42316         * m4/csharp.m4 (gt_CSHARP_CHOICE): Don't recognize --enable-csharp=pnet
42317         any more.
42319 2018-10-07  Andreas Henriksson  <andreas@fatal.se>  (tiny change)
42321         renameatu: prefer renameat2 to syscall
42322         * lib/renameatu.c (renameatu) [HAVE_RENAMEAT2]:
42323         Use renameat2 instead of syscall (Bug#32796).
42324         * m4/renameat.m4 (gl_FUNC_RENAMEAT): Check for renameat2.
42326 2018-10-07  Benno Schulenberg  <bensberg@telfort.nl>
42328         bootstrap, gnulib-tool: use https instead of insecure rsync
42329         * build-aux/bootstrap (download_po_files, po_download_command_format):
42330         Don't try using rsync; always use wget over https to fetch PO files.
42331         * gnulib-tool (func_import): Likewise.
42332         * pygnulib/GLImport.py (GLImport.execute): Likewise.
42334 2018-10-07  Benno Schulenberg  <bensberg@telfort.nl>
42336         bootstrap, gnulib-tool: correct the translations wget command
42337         * build-aux/bootstrap (po_download_command_format2): Restrict
42338         recursion to a single level.
42339         * gnulib-tool (func_import): Likewise.
42340         * pygnulib/GLImport.py (GLImport.execute): Likewise.
42342 2018-10-07  Akim Demaille  <akim@lrde.epita.fr>
42344         doc: the gnulib snapshots are not maintained
42345         * doc/gnulib-intro.texi (Steady Development): Don't mention them.
42347 2018-10-07  Akim Demaille  <akim@lrde.epita.fr>
42349         timevar: add to lib_SOURCES
42350         * modules/timevar (lib_SOURCES): Add timevar.c and timevar.def.
42352 2018-10-07  Bruno Haible  <bruno@clisp.org>
42354         dirent: Update documentation.
42355         * doc/posix-headers/dirent.texi: The MSVC issue is fixed by Gnulib.
42357 2018-10-05  Bruno Haible  <bruno@clisp.org>
42359         strpbrk: Make it possible to namespace the defined symbol.
42360         * lib/strpbrk.c (strpbrk): Don't undefine outside of glibc.
42362 2018-10-05  Bruno Haible  <bruno@clisp.org>
42364         strcspn: Make it possible to namespace the defined symbol.
42365         * lib/strcspn.c (strcspn): Don't undefine outside of glibc.
42367 2018-10-05  Bruno Haible  <bruno@clisp.org>
42369         raise: Make it possible to namespace the defined symbol.
42370         * lib/raise.c (raise): Undefine only after the replacement function has
42371         been defined.
42372         (raise): Renamed from rpl_raise.
42373         (raise_nothrow): Move to the end of the compilation unit.
42375 2018-10-05  Bruno Haible  <bruno@clisp.org>
42377         memcmp: Make it possible to namespace the defined symbol.
42378         * lib/memcmp.c (memcmp): Don't undefine outside of glibc.
42380 2018-10-05  Bruno Haible  <bruno@clisp.org>
42382         explicit_bzero: Make it possible to namespace the defined symbol.
42383         * lib/explicit_bzero.c (explicit_bzero): Don't undefine outside of
42384         glibc.
42386 2018-10-05  Bruno Haible  <bruno@clisp.org>
42388         mkdir-p: Depend on 'mkdir'.
42389         * modules/mkdir-p (Depends-on): Add 'mkdir'.
42391 2018-10-05  Bruno Haible  <bruno@clisp.org>
42393         tempname: Depend on 'mkdir'.
42394         Reported by Maarten Bosmans <mkbosmans@gmail.com>
42395         at <https://savannah.gnu.org/bugs/?33379>.
42396         * modules/tempname (Depends-on): Add 'mkdir'.
42398 2018-10-05  Akim Demaille  <akim@lrde.epita.fr>
42400         timevar: rely on gnulib modules for time portability.
42401         * modules/timevar (Depends-on): Add sys_time, sys_times, and times.
42402         * m4/timevar.m4: Don't check for clock_t and struct tms,
42403         guaranteed by gnulib.
42404         * lib/timevar.h: Use extern "C" protection.
42405         Include <stdio.h> for FILE.
42406         * lib/timevar.c: Include sys/time.h, sys/times.h unconditionally,
42407         they are guaranteed by gnulib.
42408         Remove uses of clock as (now useless) fallback.
42410 2018-10-04  Bruno Haible  <bruno@clisp.org>
42412         sh-filename: New module.
42413         * m4/sh-filename.m4: New file.
42414         * modules/sh-filename: New file.
42415         * lib/spawni.c (_PATH_BSHELL): Use BOURNE_SHELL instead of hardcoding
42416         "/bin/sh".
42417         * tests/test-posix_spawn1.c (main): Likewise.
42418         * tests/test-posix_spawn2.c (main): Likewise.
42419         * lib/javacomp.c (compile_using_envjavac, is_envjavac_gcj,
42420         is_envjavac_gcj43): Likewise.
42421         * lib/javaexec.c (execute_java_class): Likewise.
42422         * modules/posix_spawn-internal (Depends-on): Add sh-filename.
42423         * modules/posix_spawnp-tests (Depends-on): Likewise.
42424         * modules/javacomp (Depends-on): Likewise.
42425         * modules/javaexec (Depends-on): Likewise.
42427 2018-10-04  Bruno Haible  <bruno@clisp.org>
42429         spawn-pipe tests: Avoid test failure on native Windows.
42430         * tests/test-spawn-pipe-child.c (main): On native Windows, don't expect
42431         that fd 2 is closed.
42433 2018-10-04  Bruno Haible  <bruno@clisp.org>
42435         fcntl: Make it possible to namespace the defined symbol.
42436         * lib/fcntl.c (fcntl): Undefine only after the replacement function has
42437         been defined.
42438         (fcntl): Renamed from rpl_fcntl.
42439         (rpl_fcntl_DUPFD, rpl_fcntl_DUPFD_CLOEXEC): New functions, extracted
42440         from fcntl.
42441         (klibc_fcntl): Move to the end of the compilation unit.
42443 2018-10-02  Bruno Haible  <bruno@clisp.org>
42445         vasnprintf tests: Avoid test failure on HP-UX/hppa and IRIX.
42446         * tests/test-vasnprintf.c (test_function): Change the test added on
42447         2018-09-23 to check only the 18 most significant digits.
42449         vasnprintf tests: Avoid test failure on Cygwin.
42450         * tests/test-vasnprintf.c (test_function): Change the test added on
42451         2018-09-23 to check only the 42 most significant digits.
42453 2018-10-01  Bruno Haible  <bruno@clisp.org>
42455         mkostemp, mkostemps: Update documentation.
42456         * doc/glibc-functions/mkostemp.texi: Mention the Mac OS X issue.
42457         * doc/glibc-functions/mkostemps.texi: Likewise.
42459 2018-10-01  Tom Tromey  <tom@tromey.com>
42461         mkostemp, mkostemps: Fix compilation error in C++ mode on Mac OS X.
42462         * lib/stdlib.in.h: Include <unistd.h> for mkostemp and mkostemps
42463         on OS X.
42465 2018-09-30  Pádraig Brady  <P@draigBrady.com>
42467         hmac-*: refactor to remove repetitive code
42468         * lib/hmac.c: A new parameterized single implementation.
42469         * lib/hmac-md5.c: Define parameters and include implementation.
42470         * lib/hmac-sha1.c: Likewise.
42471         * lib/hmac-sha256.c: Likewise.
42472         * lib/hmac-sha512.c: Likewise.
42473         * modules/crypto/hmac-md5: Reference the new implementation file.
42474         * modules/crypto/hmac-sha1: Likewise.
42475         * modules/crypto/hmac-sha256: Likewise.
42476         * modules/crypto/hmac-sha512: Likewise.
42477         * tests/test-hmac-md5.c: Refactor common code to a single function.
42478         * tests/test-hmac-sha1.c: Likewise.
42479         * tests/test-hmac-sha256.c: Likewise.
42480         * tests/test-hmac-sha512.c: Likewise.
42482 2018-09-30  Zhang Qing  <zhangqingl@126.com>
42484         hmac-sha512: fix hash for keys > blocksize (128 bytes)
42485         * lib/hmac-sha512.c (hmac_sha512): Set the computed/shortened
42486         key length to that output by sha512, not the blocksize.
42487         Otherwise uninitialized data from the stack
42488         is used when computing the hash.
42489         * tests/test-hmac-sha512.c: Add a shortened key test case.
42490         Reported at https://github.com/coreutils/gnulib/pull/5
42492 2018-09-30  Bruno Haible  <bruno@clisp.org>
42494         vasnprintf: Avoid warnings from GCC's -Wsign-compare.
42495         Reported by Bjarni Ingi Gislason <bjarniig@rhi.hi.is> in
42496         <https://lists.gnu.org/archive/html/bug-gnulib/2018-09/msg00105.html>.
42497         * lib/vasnprintf.c (VASNPRINTF): Cast 'count' from 'int' to
42498         'unsigned int' before comparison with an unsigned value.
42500 2018-09-30  Bruno Haible  <bruno@clisp.org>
42502         grantpt: Remove unnecessary dependency.
42503         * modules/grantpt (Depends-on): Remove 'builtin-expect'.
42505 2018-09-30  Bruno Haible  <bruno@clisp.org>
42507         timevar: Small tweaks.
42508         * lib/timevar.h: Fix comments. Add parameter names to function
42509         declarations.
42510         * lib/timevar.c: Include timevar.h immediately after config.h.
42511         * lib/timevar.def: Fix comments.
42512         * modules/timevar (Maintainer): List Akim Demaille.
42514 2018-09-30  Bruno Haible  <bruno@clisp.org>
42516         timevar: Include documentation in gnulib manual.
42517         * doc/timevar.texi: Change node and section name to 'Profiling of
42518         program phases'.
42519         In the code snippets, tweak the #includes and use GNU coding style.
42520         * doc/gnulib.texi: Include timevar.texi.
42522 2018-09-27  Akim Demaille  <akim@lrde.epita.fr>
42524         timevar: import from Bison.
42525         * m4/timevar.m4, modules/timevar, lib/timevar.h, lib/timevar.c:
42526         New files.
42527         * lib/timevar.def: New file.
42528         * doc/timevar.texi: New file.
42530 2018-09-26  Bruno Haible  <bruno@clisp.org>
42532         javacomp-script, javacomp: Add preliminary support for Java 12..17.
42533         * m4/javacomp.m4 (gt_JAVACOMP): Treat Java versions 12..17 like 11.
42534         * lib/javacomp.c (default_target_version): Likewise.
42536 2018-09-26  Bruno Haible  <bruno@clisp.org>
42538         javacomp-script, javacomp: Add support for Java 11.
42539         * m4/javacomp.m4 (gt_JAVACOMP): Accept source-version 11 and
42540         target-version 11.
42541         * lib/javaversion.h: Update comments.
42542         * lib/javacomp.c (default_target_version, SOURCE_VERSION_BOUND,
42543         source_version_index, get_goodcode_snippet, get_failcode_snippet,
42544         TARGET_VERSION_BOUND, target_version_index,
42545         corresponding_classfile_version): Accept source_version 11 and
42546         target_version 11.
42547         * lib/javacomp.h: Update comments accordingly.
42549 2018-09-23  Bruno Haible  <bruno@clisp.org>
42551         vasnprintf: Fix heap memory overrun bug.
42552         Reported by Ben Pfaff <blp@cs.stanford.edu> in
42553         <https://lists.gnu.org/archive/html/bug-gnulib/2018-09/msg00107.html>.
42554         * lib/vasnprintf.c (convert_to_decimal): Allocate one more byte of
42555         memory.
42556         * tests/test-vasnprintf.c (test_function): Add another test.
42558 2018-09-19  Paul Eggert  <eggert@cs.ucla.edu>
42560         maint: mktime.c now shared with glibc
42561         * config/srclist.txt: intprops.h, timegm.c and mktime.c
42562         are now the same in Gnulib and glibc.
42564         mktime: fix _LIBC typo
42565         * lib/mktime.c (mktime): Fix typo (misspelled "_LIBC").
42567 2018-09-19  Norihiro Tanaka  <noritnk@kcn.ne.jp>
42569         dfa: optimization for state merge
42570         * lib/dfa.c (merge2): New function.
42571         (merge_nfa_state): Use it.
42573 2018-09-18  Jim Meyering  <meyering@fb.com>
42575         dfa: trivial comment fix: s/is/if/
42576         * lib/dfa.c (maybe_disable_superset_dfa): Fix comment typo.
42578 2018-09-18  Paul Eggert  <eggert@cs.ucla.edu>
42580         dfa: use more-informative function name
42581         * lib/dfa.c (maybe_disable_superset_dfa):
42582         Rename from dfautf8noss.  Use change.
42584         dfa: tweak allocation performance
42585         * lib/dfa.c (merge_nfa_state, dfaoptimize):
42586         Prefer ptrdiff_t for indexes some more.
42587         Use char for flags, as it’s wide enough.
42588         Allocate queue and flags together, with one malloc call.
42589         No need to use xnmalloc since the multiplication and
42590         addition cannot overflow (it’s already been checked by
42591         earlier allocation).  Prefer memset to open-coding.
42593         dfa: prune states as we go
42594         * lib/dfa.c (prune): Remove.
42595         dfa: reorder enum for efficiency
42596         (merge_nfa_state): Prune as we go instead of at the end.
42597         Prefer ptrdiff_t for indexes, as this helps the compiler a bit.
42599         * lib/dfa.c (END): Now -1 again.  Reorder other elements
42600         of the enumeration to make it easier for GCC to generate
42601         efficient code by using fewer comparisons to check for
42602         ranges of values.
42603         (atom): Take advantage of the reordering.
42605 2018-09-18  Norihiro Tanaka  <noritnk@kcn.ne.jp>
42607         dfa: optimize alternation in NFA
42608         Even when similar states exist in alternation, the DFA treats them
42609         as separate items, which may complicate the transition in NFA and
42610         cause slowdown.  This change assembles the states into one.  For
42611         example, ab|ac is changed into a(b|c).  This change speeds-up
42612         matching for many branched patterns.  For example, grep speeds up
42613         more than 30× in:
42615           seq 10000 | sed 's/$/ abcdefghijklmnopqrstuvwxyz/; s/$/./' >in
42616           time -p env LC_ALL=C grep -vf in in
42618         * lib/dfa.c (prune): New function.
42619         (merge_nfa_state): New function.  It merges similar NFA states.
42620         (dfaoptimize): New function.  It seeks merged and removed nodes.
42621         (dfaanalyze): Call new function.
42622         (dfautf8noss): Change name from dfaoptimize because of addition of new
42623         function.
42624         (dfacomp): Update caller.
42626         dfa: simplify initial state
42627         Simplifying the initial state enables easier optimization of the NFA.
42628         * lib/dfa.c (enum token): Add new element BEG.
42629         (prtok): Adjust due to adding element BEG.
42630         (dfaparse): Put BEG at a head of tokens.
42631         (state_index): Adjust due to adding element BEG.
42632         (dfaanalyze): Concatenate BEG to other tokens, and simplify to
42633         build initial state.
42634         (dfamust): Adjust due to adding element BEG.  DFAMUST ignores it.
42636 2018-09-18  Bruno Haible  <bruno@clisp.org>
42638         file-has-acl: Fix test failure on Cygwin 2.9.
42639         * m4/acl.m4 (gl_FUNC_ACL): Update comments regarding Cygwin.
42640         * lib/acl-internal.h: Likewise.
42641         (HAVE_ACL_EXTENDED_FILE): Undefine on Cygwin.
42642         * lib/acl-internal.c: Update comments regarding Cygwin.
42643         * lib/acl_entries.c: Likewise.
42644         * lib/file-has-acl.c: Likewise.
42645         (file_has_acl): For Cygwin, use a different way to determine whether
42646         the "default" ACL of a directory is nontrivial.
42647         * lib/get-permissions.c: Update comments regarding Cygwin.
42648         * lib/set-permissions.c: Likewise.
42650 2018-09-18  Bruno Haible  <bruno@clisp.org>
42652         stat-time tests: Fix test failure on Cygwin.
42653         * tests/nap.h (nap_get_stat): Treat Cygwin like native Windows.
42655 2018-09-18  Paul Eggert  <eggert@cs.ucla.edu>
42657         doc: OS X 10.11 lacked ns time functions
42658         According to <https://github.com/zeromq/libzmq/issues/2175>,
42659         nanosecond-resolution timestamp functions were introduced
42660         in macOS 10.12, so document the last version (OS X 10.11)
42661         where they were absent.
42663         gettime: nanotime never existed
42664         Problem reported by Bruno Haible in:
42665         https://lists.gnu.org/r/bug-gnulib/2018-09/msg00082.html
42666         * lib/gettime.c (gettime) [HAVE_NANOTIME]: Remove unused code.
42667         * m4/gettime.m4 (gl_GETTIME): Don’t check for nanotime.
42669 2018-09-18  Bruno Haible  <bruno@clisp.org>
42671         doc: Update statement about target platforms.
42672         Reported by Simon Sobisch.
42673         * doc/gnulib-intro.texi (Target Platforms): Update. Mention
42674         restrictions on MSVC versions.
42676 2018-09-18  Bruno Haible  <bruno@clisp.org>
42678         posix_spawn tests: Fix link error on 64-bit Cygwin.
42679         * tests/test-posix_spawn1.c (environ): Remove declaration.
42680         * tests/test-posix_spawn2.c (environ): Likewise.
42681         * tests/test-posix_spawn3.c (environ): Likewise.
42682         * tests/test-posix_spawn4.c (environ): Likewise.
42683         * modules/posix_spawn-tests (Depends-on): Add 'environ'.
42684         * modules/posix_spawnp-tests (Depends-on): Likewise.
42686 2018-09-16  Paul Eggert  <eggert@cs.ucla.edu>
42688         timespec: new function current_timespec
42689         * lib/gettime.c (gettime): Prefer clock_gettime to nanotime,
42690         and don’t worry about it failing on a CLOCK_REALTIME arg.
42691         POSIX requires it to succeed and I don’t know of any
42692         counterexamples where the fallbacks would work.
42693         (current_timespec): New function, taken from Emacs.  It is more
42694         convenient than gettime, and can help register allocation.
42695         * lib/timespec.h: Include arg-nonnull.h.
42696         (current_timespec): New declaration.
42697         (gettime, settime): Declare args to be nonnull.
42698         * modules/timespec (Depends-on): Add snippet/arg-nonnull.
42700 2018-09-16  Bruno Haible  <bruno@clisp.org>
42702         setlocale: Improve locale handling on macOS 10.12 or newer.
42703         * lib/setlocale.c: Include header files for CoreFoundation. Declare
42704         gl_locale_name_canonicalize.
42705         (libintl_setlocale): Try harder to set a locale for categories LC_CTYPE
42706         and LC_MESSAGES.
42707         * m4/setlocale.m4 (gl_PREREQ_SETLOCALE): Add comment.
42709 2018-09-16  Bruno Haible  <bruno@clisp.org>
42711         Update list of locale names with scripts on macOS.
42712         * lib/localename.c (gl_locale_name_canonicalize): Update tables to
42713         match Mac OS X 10.13 and recent glibc.
42715 2018-09-16  Bruno Haible  <bruno@clisp.org>
42717         gettext: Use newer macOS APIs when possible.
42718         * m4/intlmacosx.m4 (gt_INTL_MACOSX): Check for
42719         CFLocaleCopyPreferredLanguages.
42721 2018-09-16  Bruno Haible  <bruno@clisp.org>
42723         localename: Revisit macOS specific code.
42724         * lib/localename.c (gl_locale_name_default): Reduce code duplication.
42725         Fix comments about Mac OS X versions.
42727 2018-09-15  Bruno Haible  <bruno@clisp.org>
42729         setlocale: Improve support for locales not supported by libc.
42730         Reported by Dapeng Gao <peter@dpgao.cc> at
42731         <https://savannah.gnu.org/bugs/?54479>.
42732         * gettext-runtime/intl/setlocale.c: Include <stdio.h>.
42733         (libintl_setlocale): Use a more error-tolerant strategy when the locale
42734         to be set is not supported by libc: Emit warnings instead of failing.
42736 2018-09-15  Bruno Haible  <bruno@clisp.org>
42738         strstr, strcasestr: Add workaround against glibc-2.28 bug.
42739         Reported by Michael Brunnbauer via Siddhesh Poyarekar and Eric Blake.
42740         * m4/strstr.m4 (gl_FUNC_STRSTR_SIMPLE): Set
42741         gl_cv_func_strstr_works_always to 'no' on glibc 2.28.
42742         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR_SIMPLE): Set
42743         gl_cv_func_strcasestr_works_always to 'no' on glibc 2.28.
42744         * doc/posix-functions/strstr.texi: Document the glibc 2.28 bug.
42745         * doc/glibc-functions/strcasestr.texi: Likewise.
42747 2018-09-14  Bruno Haible  <bruno@clisp.org>
42749         doc: Fix bottom of top-level page.
42750         Reported by Akim Demaille <akim.demaille@gmail.com> in
42751         <https://lists.gnu.org/archive/html/bug-gnulib/2018-09/msg00072.html>.
42752         * doc/pastposix-functions/index.texi: Rename node to '_index' in HTML
42753         mode.
42754         * doc/gnulib.texi (Legacy Function Substitutes): Update menu
42755         accordingly.
42757 2018-09-12  Bruno Haible  <bruno@clisp.org>
42759         Add test case from a recent glibc bug.
42760         * tests/test-strstr.c (main): Add test of long needle.
42761         * tests/test-strcasestr.c (main): Likewise.
42762         * tests/test-c-strstr.c (main): Likewise.
42763         * tests/test-c-strcasestr.c (main): Likewise.
42764         * tests/test-memmem.c (main): Likewise.
42766 2018-09-12  Bruno Haible  <bruno@clisp.org>
42768         Apply Eric Blake's improvements from 2011-02-25 to more tests.
42769         * tests/test-c-strstr.c (main): Add the same tests here as well.
42771 2018-09-12  Bruno Haible  <bruno@clisp.org>
42773         Apply Jim Meyering's fix from 2015-01-11 to more tests.
42774         * tests/test-memmem.c (main): Free haystack.
42775         * tests/test-strcasestr.c (main): Likewise.
42776         * tests/test-c-strcasestr.c (main): Likewise.
42778 2018-09-11  Paul Eggert  <eggert@cs.ucla.edu>
42780         xstrtol: fix missing-TYPE_SIGNED typo
42781         * lib/xstrtol.c (TYPE_SIGNED): New macro, duplicating intprops.h.
42783 2018-09-10  Paul Eggert  <eggert@cs.ucla.edu>
42785         timespec: fix resolution confusion
42786         In normal usage, clock resolution is given in seconds, but the
42787         code was mistakenly using inverse seconds and calling it
42788         “resolution”.  Fix this, partly by renaming two identifiers.
42789         The old names will be kept for a bit, to ease transition.
42790         * lib/timespec.h (TIMESPEC_HZ, LOG10_TIMESPEC_HZ):
42791         New constants, replacing TIMESPEC_RESOLUTION and
42792         LOG10_TIMESPEC_RESOLUTION, which are now obsolescent.
42793         All uses changed.
42795 2018-09-09  Paul Eggert  <eggert@cs.ucla.edu>
42797         mktime: simplify in prep for glibc merge
42798         * lib/mktime.c, lib/timegm.c [_LIBC]:
42799         Include mktime-internal.h (a small file just for glibc)
42800         instead of using a typedef.
42802 2018-09-07  Paul Eggert  <eggert@cs.ucla.edu>
42804         intprops: minor clarification of code
42805         * lib/intprops.h (_GL_BINARY_OP_OVERFLOW):
42806         Use _GL_INT_CONVERT rather than reinventing it.
42808 2018-09-07  Bruno Haible  <bruno@clisp.org>
42810         Fix a comment.
42811         * tests/test-posix_spawn3.c (parent_main): Fix typo in comment.
42813 2018-09-07  Bruno Haible  <bruno@clisp.org>
42815         posix_spawn_file_actions_addchdir: Add tests.
42816         * tests/test-posix_spawn_file_actions_addchdir.c: New file.
42817         * tests/test-posix_spawn4.c: New file.
42818         * modules/posix_spawn_file_actions_addchdir-tests: New file.
42820 2018-09-07  Bruno Haible  <bruno@clisp.org>
42822         posix_spawn_file_actions_addchdir: New module.
42823         Suggested by Eric Blake in
42824         <https://lists.gnu.org/archive/html/bug-findutils/2018-09/msg00007.html>.
42825         * lib/spawn.in.h (posix_spawn_file_actions_addchdir): New declaration.
42826         * lib/spawn_int.h (struct __spawn_action): Add tag 'spawn_do_chdir' and
42827         union member 'chdir_action'.
42828         * lib/spawn_faction_addchdir.c: New file.
42829         * lib/spawni.c (__spawni): Implement the spawn_do_chdir action.
42830         * lib/spawn_faction_addclose.c: Test REPLACE_POSIX_SPAWN instead of
42831         HAVE_WORKING_POSIX_SPAWN.
42832         * lib/spawn_faction_adddup2.c: Likewise.
42833         * lib/spawn_faction_addopen.c: Likewise.
42834         * m4/posix_spawn_faction_addchdir.m4: New file.
42835         * m4/posix_spawn.m4 (gl_POSIX_SPAWN_BODY): Test whether module
42836         'posix_spawn_file_actions_addchdir' is present and whether
42837         posix_spawn_file_actions_addchdir_np exists. Define REPLACE_POSIX_SPAWN
42838         instead of HAVE_WORKING_POSIX_SPAWN.
42839         * m4/spawn_h.m4 (gl_SPAWN_H): Test whether
42840         posix_spawn_file_actions_addchdir is declared.
42841         (gl_SPAWN_H_DEFAULTS): Initialize
42842         GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR,
42843         HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR,
42844         REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR.
42845         * modules/spawn (Makefile.am): Substitute
42846         GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR,
42847         HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR,
42848         REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR.
42849         * modules/posix_spawn_file_actions_addchdir: New file.
42850         * modules/posix_spawn_file_actions_addclose (Depends-on,
42851         configure.ac): Test also REPLACE_POSIX_SPAWN.
42852         * modules/posix_spawn_file_actions_adddup2 (Depends-on,
42853         configure.ac): Likewise.
42854         * modules/posix_spawn_file_actions_addopen (Depends-on,
42855         configure.ac): Likewise.
42856         * tests/test-spawn-c++.cc (posix_spawn_file_actions_addchdir): Check
42857         signature.
42858         * doc/posix-functions/posix_spawn.texi: Mention the new module.
42859         * doc/posix-functions/posix_spawnp.texi: Likewise.
42861 2018-09-06  Bruno Haible  <bruno@clisp.org>
42863         stddef: Override max_align_t on NetBSD 8.0/x86.
42864         * m4/stddef_h.m4 (gl_STDDEF_H): When testing for max_align_t, test also
42865         the value of __alignof__ (max_align_t).
42866         * doc/posix-headers/stddef.texi: Mention the issue.
42868 2018-09-06  Bruno Haible  <bruno@clisp.org>
42870         fcntl: Fix F_DUPFD_CLOEXEC behaviour on Haiku.
42871         * lib/fcntl.c (rpl_fcntl): For F_DUPFD_CLOEXEC, don't even try the
42872         system fcntl.
42873         * doc/posix-functions/fcntl.texi: Document the issue.
42875 2018-09-06  Bruno Haible  <bruno@clisp.org>
42877         count-trailing-zeros tests: Rely on limits-h module.
42878         * tests/test-count-trailing-zeros.c (ULLONG_MAX): Remove fallback
42879         definition.
42880         * modules/count-trailing-zeros-tests (Depends-on): Add 'limits-h'.
42882 2018-09-06  Bruno Haible  <bruno@clisp.org>
42884         count-leading-zeros tests: Rely on limits-h module.
42885         * tests/test-count-leading-zeros.c (ULLONG_MAX): Remove fallback
42886         definition.
42887         * modules/count-leading-zeros-tests (Depends-on): Add 'limits-h'.
42889 2018-09-06  Bruno Haible  <bruno@clisp.org>
42891         count-one-bits tests: Rely on limits-h module.
42892         * tests/test-count-one-bits.c (ULLONG_MAX): Remove fallback definition.
42893         * modules/count-one-bits-tests (Depends-on): Add 'limits-h'.
42895 2018-09-06  Bruno Haible  <bruno@clisp.org>
42897         xstrtoll: Rely on limits-h module.
42898         * lib/xstrtol.c: Don't include intprops.h.
42899         (ULLONG_MAX, LLONG_MAX, LLONG_MIN): Remove fallback definitions.
42900         * modules/xstrtol (Depends-on): Remove 'intprops'.
42901         * modules/xstrtoll (Depends-on): Add 'limits-h'.
42903 2018-09-06  Bruno Haible  <bruno@clisp.org>
42905         strtoll, strtoull: Rely on limits-h module.
42906         * lib/strtol.c (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove macros.
42907         (ULLONG_MAX, LLONG_MAX, LLONG_MIN): Remove fallback definitions.
42908         * modules/strtoll (Depends-on): Add limits-h.
42909         * modules/strtoull (Depends-on): Likewise.
42911 2018-09-06  Bruno Haible  <bruno@clisp.org>
42913         intprops tests: Fix compilation error with pre-C99 compiler.
42914         * tests/test-intprops.c (verify_stmt): New macro.
42915         (VERIFY, main): Use it.
42917 2018-09-06  Bruno Haible  <bruno@clisp.org>
42919         limits-h: Provide numerical limits macros.
42920         * lib/limits.in.h (LLONG_MIN, LLONG_MAX, ULLONG_MAX): Define also for
42921         IRIX and for GCC.
42922         (WORD_BIT, LONG_BIT): Define.
42923         * m4/limits-h.m4 (gl_LIMITS_H): Set LIMITS_H to non-empty also when
42924         <limits.h> does not define LLONG_MAX or WORD_BIT.
42925         * tests/test-limits-h.c (TYPE_SIGNED, TYPE_WIDTH, TYPE_MINIMUM,
42926         TYPE_MAXIMUM): New macros, from intprops.h.
42927         Add tests for CHAR_BIT, WORD_BIT, LONG_BIT, <type>_MIN, and <type>_MAX.
42928         * doc/posix-headers/limits.texi: Document what the 'limits-h' module
42929         provides.
42931 2018-09-05  Bruno Haible  <bruno@clisp.org>
42933         fcntl: Don't access nonexistent optional argument.
42934         Reported by Frank Busse <f.busse@imperial.ac.uk> in
42935         <https://lists.gnu.org/archive/html/bug-gnulib/2018-09/msg00018.html>.
42936         * lib/fcntl.c (rpl_fcntl): For actions that don't take an argument,
42937         don't consume an argument. For actions that take an 'int' argument,
42938         consume an 'int' argument.
42940 2018-09-05  Eric Blake  <eblake@redhat.com>
42942         doc: mention environ pitfall
42943         * doc/posix-functions/environ.texi (environ): Assigning NULL to
42944         environ is a glibc extension.
42946 2018-09-03  Bruno Haible  <bruno@clisp.org>
42948         gnulib-tool: Fix build order when $testsbase is a subdir of $sourcebase.
42949         Reported by Antoine Luong <antoine.luong@c-s.fr> in
42950         <https://lists.gnu.org/archive/html/bug-gnulib/2018-09/msg00008.html>.
42951         * gnulib-tool (func_import): For the tests, set a dotfirst flag.
42952         (func_emit_lib_Makefile_am): Consider the dotfirst flag.
42953         (func_emit_tests_Makefile_am): Don't consider the dotfirst flag.
42955 2018-09-02  Paul Eggert  <eggert@cs.ucla.edu>
42957         mktime: fix unlikely race+overflow bug
42958         Problem reported by Alexandre Oliva in:
42959         https://sourceware.org/bugzilla/show_bug.cgi?id=16346
42960         * lib/mktime.c (__mktime_internal): Access *OFFSET only once,
42961         to avoid an unlikely race if the compiler delays a load and
42962         if this cascades into a signed integer overflow.
42964 2018-08-31  Paul Eggert  <eggert@cs.ucla.edu>
42966         mktime, timegm: simplify glibc time64_t
42967         * lib/mktime.c, lib/timegm.c (mktime_offset_t) [_LIBC]:
42968         Now long int, not time_t, since long int is the longstanding type
42969         for this in glibc and there is no need to change it even if time_t
42970         becomes 64 bits - even int would do, though this would be a change
42971         to the glibc generated code.  When this change is merged into
42972         glibc, it should simplify the time_t vs time64_t situation.
42974         mktime, timegm: simplify merge to glibc
42975         Move code around to make a merge to glibc easier to audit.
42976         This should not change behavior.
42977         * lib/mktime.c (NEED_MKTIME_INTERNAL, NEED_MKTIME_WINDOWS)
42978         (NEED_MKTIME_WORKING): Give default values to pacify -Wundef,
42979         which glibc uses.  Default NEED_MKTIME_WORKING to DEBUG_MKTIME, to
42980         simplify later conditionals; default the others to zero.  In uses
42981         of these conditionals, explicitly spell out how _LIBC affects
42982         things, so it’s easier to review from a glibc viewpoint.
42983         (my_tzset, __tzset) [!_LIBC]: New function and macro, to better
42984         compartmentalize tzset issues.  Move system-dependent tzsettish
42985         code here from mktime.
42986         (mktime): Move tzsettish code to my_tzset, and move
42987         localtime_offset to within mktime so that it doesn’t
42988         need a separate ifdef.
42990 2018-08-27  Paul Eggert  <eggert@cs.ucla.edu>
42992         intprops: avoid evaluation of some expressions
42993         This makes EXPR_SIGNED (e) easier to use, as it no longer
42994         evaluates the expression E.  Formerly, E was required to be free
42995         of side effects.
42996         * lib/intprops.h (_GL_INT_CONVERT, _GL_INT_NEGATE_CONVERT)
42997         (EXPR_SIGNED, TYPE_WIDTH, _GL_INT_MINIMUM, _GL_INT_MAXIMUM)
42998         (_GL_SIGNED_INT_MAXIMUM): Do not evaluate the expression arg.
43000 2018-08-23  Bruno Haible  <bruno@clisp.org>
43002         getcwd: Add cross-compilation guesses.
43003         Reported by Sergio Durigan Junior <sergiodj@redhat.com> in
43004         <https://lists.gnu.org/archive/html/bug-gnulib/2018-08/msg00130.html>.
43005         Based on a patch by Paul Eggert.
43006         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Add cross-compilation
43007         guesses for all GNU systems.
43009 2018-08-19  Bruno Haible  <bruno@clisp.org>
43011         glob-h: Formalize side effects from other modules.
43012         * m4/glob_h.m4 (gl_REPLACE_GLOB_H): New macro.
43013         * m4/glob.m4 (gl_GLOB): Invoke it.
43015         fnmatch-h: Formalize side effects from other modules.
43016         * m4/fnmatch_h.m4 (gl_REPLACE_FNMATCH_H): New macro.
43017         * m4/fnmatch.m4 (gl_FUNC_FNMATCH_POSIX): Invoke it.
43019         limits-h: Formalize side effects from other modules.
43020         * m4/limits-h.m4 (gl_REPLACE_LIMITS_H): New macro.
43021         * m4/stdint.m4 (gl_STDINT_H): Invoke it.
43023 2018-08-19  Bruno Haible  <bruno@clisp.org>
43025         getpass: Move declaration to <unistd.h>.
43026         * lib/unistd.in.h (getpass): New declaration.
43027         * lib/getpass.h: Replace with a stub that just includes <unistd.h>.
43028         * m4/getpass.m4 (gl_FUNC_GETPASS): Declare through AC_DEFUN_ONCE.
43029         Require gl_UNISTD_H_DEFAULTS. Don't test whether getpass is declared.
43030         (gl_FUNC_GETPASS_GNU): Require gl_UNISTD_H_DEFAULTS and gl_FUNC_GETPASS.
43031         On glibc systems, don't set REPLACE_GETPASS to 1.
43032         * modules/getpass (Depends-on): Add 'unistd'.
43033         (configure.ac): Test also REPLACE_GETPASS. Define a module indicator.
43034         (Include): Specify <unistd.h> instead of "getpass.h".
43035         * modules/getpass-gnu (Depends-on): Merely depend on 'getpass'.
43036         (configure.ac): Sync with the configure.ac section of modules/getpass.
43037         (Include): Specify <unistd.h> instead of "getpass.h".
43038         * m4/unistd_h.m4 (gl_UNISTD_H): Test whether getpass is declared.
43039         (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_GETPASS, HAVE_GETPASS,
43040         REPLACE_GETPASS.
43041         * modules/unistd (Makefile.am): Substitute GNULIB_GETPASS, HAVE_GETPASS,
43042         REPLACE_GETPASS.
43043         * tests/test-unistd-c++.cc: Test also the declaration of 'getpass'.
43044         * doc/glibc-functions/getpass.texi: A length limit exists also on uClibc
43045         and musl.
43046         * NEWS: Mention the change.
43048 2018-08-19  Bruno Haible  <bruno@clisp.org>
43050         glob: Fix over-optimization due to attribute __nonnull__.
43051         * lib/glob.c (_GL_ARG_NONNULL): Define to empty.
43053 2018-08-19  Bruno Haible  <bruno@clisp.org>
43055         glob: Fix another compilation error when glob.h is not replaced.
43056         Reported by Reuben Thomas <rrt@sc3d.org> in
43057         <https://lists.gnu.org/archive/html/bug-gnulib/2018-08/msg00112.html>.
43058         * m4/glob.m4 (gl_GLOB): Set GLOB_H to non-empty when needed.
43059         * m4/glob_h.m4 (gl_GLOB_H): Define through AC_DEFUN_ONCE.
43061 2018-08-18  Bruno Haible  <bruno@clisp.org>
43063         fnmatch: Avoid conflicting macro definitions of 'fnmatch'.
43064         Reported by Reuben Thomas <rrt@sc3d.org> in
43065         <https://lists.gnu.org/archive/html/bug-gnulib/2018-08/msg00108.html>.
43066         * m4/fnmatch.m4 (gl_PREREQ_FNMATCH): Don't define 'fnmatch' as a macro
43067         in config.h.
43069 2018-08-18  Bruno Haible  <bruno@clisp.org>
43071         Avoid -Wcast-function-type warnings from casts after GetProcAddress.
43072         Reported by Andy Moreton <andrewjmoreton@gmail.com> in
43073         <https://lists.gnu.org/archive/html/emacs-devel/2018-08/msg00468.html>.
43074         Solution proposed by Eli Zaretskii.
43075         * lib/getaddrinfo.c (GetProcAddress): Cast result to 'void *' first.
43076         * lib/gettimeofday.c (GetProcAddress): Likewise.
43077         * lib/link.c (GetProcAddress): Likewise.
43078         * lib/physmem.c (GetProcAddress): Likewise.
43079         * lib/poll.c (GetProcAddress): Likewise.
43080         * lib/select.c (GetProcAddress): Likewise.
43081         * lib/stat-w32.c (GetProcAddress): Likewise.
43083 2018-08-18  Bruno Haible  <bruno@clisp.org>
43085         glob: Fix another compilation error when glob.h is not replaced.
43086         Reported and fix proposed by Reuben Thomas <rrt@sc3d.org> again.
43087         * lib/globfree.c: Include <libc-config.h>.
43089 2018-08-18  Bruno Haible  <bruno@clisp.org>
43091         glob: Fix compilation error when glob.h is not replaced.
43092         Reported and fix proposed by Reuben Thomas <rrt@sc3d.org> in
43093         <https://lists.gnu.org/archive/html/bug-gnulib/2018-08/msg00096.html>.
43094         * lib/glob_pattern_p.c: Include <libc-config.h>.
43095         * modules/glob (Depends-on): Add libc-config.
43097 2018-08-18  Bruno Haible  <bruno@clisp.org>
43099         scratch_buffer: Add tests.
43100         * tests/test-scratch-buffer.c: New file.
43101         * modules/scratch_buffer-tests: New file.
43103 2018-08-18  Bruno Haible  <bruno@clisp.org>
43105         scratch_buffer: Fix include file.
43106         Reported by Reuben Thomas <rrt@sc3d.org> in
43107         <https://lists.gnu.org/archive/html/bug-gnulib/2018-08/msg00082.html>.
43108         * lib/scratch_buffer.h: Include <libc-config.h> first. Add
43109         double-inclusion guard.
43111 2018-08-18  Bruno Haible  <bruno@clisp.org>
43113         glob-h: Revert Paul Eggert's revert.
43114         * m4/glob_h.m4: Revert to previous state.
43115         * modules/glob-h: Likewise.
43117 2018-08-18  Paul Eggert  <eggert@cs.ucla.edu>
43119         glob-h: always build glob.h
43120         This works around a problem reported by Reuben Thomas in:
43121         http://lists.gnu.org/r/bug-gnulib/2018-08/msg00079.html
43122         This workaround always builds glob.h, even on platforms that
43123         do not need it; perhaps this could be improved someday.
43124         * m4/glob_h.m4 (gl_GLOB_H): Do not set or use GLOB_H, since glob.h
43125         is always created now.
43126         * modules/glob-h (BUILT_SOURCES, glob.h): Always build glob.h.
43128 2018-08-13  Bruno Haible  <bruno@clisp.org>
43130         monetary: Simplify m4 code.
43131         * m4/monetary_h.m4 (gl_MONETARY_H): Define through AC_DEFUN_ONCE.
43132         (gl_MONETARY_H_BODY): Inline into gl_MONETARY_H. Remove macro.
43134 2018-08-13  Bruno Haible  <bruno@clisp.org>
43136         fnmatch, fnmatch-gnu: Fix compilation error on Mac OS X.
43137         Reported by Jeroen Meijer <jjgmeijer@gmail.com> in
43138         <https://lists.gnu.org/archive/html/bug-gnulib/2018-08/msg00046.html>
43139         and by Paul J. Lucas <paul@lucasmail.org> in
43140         <https://lists.gnu.org/archive/html/bug-gnulib/2018-08/msg00069.html>.
43141         * m4/fnmatch_h.m4 (gl_FNMATCH_H): Define through AC_DEFUN_ONCE.
43143 2018-08-11  Bruno Haible  <bruno@clisp.org>
43145         setlocale: Trivial simplification.
43146         * lib/setlocale.c (setlocale_unixlike): Remove redundant #if.
43148 2018-08-11  Paul Eggert  <eggert@cs.ucla.edu>
43150         verify: port 'assume' to traditional tools
43151         * lib/verify.h (assume): Port better to Oracle Studio 12.6
43152         and other tools that use /*NOTREACHED*/ comments.
43154 2018-08-10  Bruno Haible  <bruno@clisp.org>
43156         fnmatch-gnu: Fix compilation error in C++ namespace mode on Mac OS X.
43157         * modules/fnmatch-gnu (configure.ac): Invoke gl_MODULE_INDICATOR.
43158         * lib/fnmatch.in.h (fnmatch): Skip _GL_CXXALIASWARN if module
43159         'fnmatch-gnu' is in use.
43161 2018-08-07  Bruno Haible  <bruno@clisp.org>
43163         glob-h: Add tests.
43164         * tests/test-glob-h.c: New file, partially based on tests/test-glob.c.
43165         * tests/test-glob.c: Reorder #includes. Remove tests that are moved to
43166         tests/test-glob-h.c.
43167         * modules/glob-h-tests: New file.
43168         * tests/test-glob-h-c++.cc: Renamed from tests/test-glob-c++.cc. Add
43169         conditions.
43170         * modules/glob-h-c++-tests: Renamed from modules/glob-c++-tests.
43171         * modules/glob-tests (Depends-on): Remove glob-c++-tests.
43173 2018-08-07  Bruno Haible  <bruno@clisp.org>
43175         glob-h: New module.
43176         * lib/glob.in.h: Use nearly the usual gnulib idioms for header file
43177         replacements.
43178         * lib/glob.c: Include <config.h>.
43179         * m4/glob_h.m4: New file.
43180         * m4/glob.m4 (gl_GLOB): Require gl_GLOB_H. Remove code that is moved to
43181         glob_h.m4. Set HAVE_GLOB, REPLACE_GLOB, HAVE_GLOB_PATTERN_P,
43182         REPLACE_GLOB_PATTERN_P as appropriate.
43183         (gl_PREREQ_GLOB): Don't require AC_C_RESTRICT and
43184         AC_USE_SYSTEM_EXTENSIONS, now done through module 'glob-h'.
43185         * modules/glob-h: New file.
43186         * modules/glob (Files): Remove lib/glob.in.h, lib/glob-libc.h.
43187         (Dependencies): Add glob-h. Remove extensions, snippet/*, libc-config,
43188         lstat, sys_stat. Change conditions.
43189         (configure.ac): Test HAVE_GLOB, REPLACE_GLOB, HAVE_GLOB_PATTERN_P,
43190         REPLACE_GLOB_PATTERN_P. Set module indicator.
43191         (Makefile.am): Remove code that is moved to glob-h.
43192         * doc/posix-headers/glob.texi: Mention the 'glob-h' module.
43193         * modules/posixcheck (Depends-on): Add glob-h.
43195 2018-08-06  Bruno Haible  <bruno@clisp.org>
43197         Force generation of substitute .h file when C++ support is enabled.
43198         * m4/ansi-c++.m4 (gl_ANSI_CXX): New macro.
43199         * modules/ansi-c++-opt (configure.ac): Just require gl_ANSI_CXX.
43200         * m4/fnmatch_h.m4 (gl_FNMATCH_H): If C++ support is enabled, set
43201         FNMATCH_H to non-empty.
43202         * m4/iconv_h.m4 (gl_ICONV_H_DEFAULTS): If C++ support is enabled, set
43203         ICONV_H to non-empty.
43204         * m4/monetary_h.m4 (gl_MONETARY_H_BODY): If C++ support is enabled, set
43205         MONETARY_H to non-empty.
43206         * m4/utime_h.m4 (gl_UTIME_H): If C++ support is enabled, set UTIME_H to
43207         non-empty.
43209 2018-08-06  Bruno Haible  <bruno@clisp.org>
43211         fnmatch-h: Fix test compilation error on mingw (regression from today).
43212         * lib/fnmatch.in.h: Fix conditions.
43214 2018-08-06  Bruno Haible  <bruno@clisp.org>
43216         sys_resource: Relicense under LGPLv2+.
43217         John Malmberg's approval is in
43218         <https://lists.gnu.org/archive/html/bug-gnulib/2018-08/msg00031.html>.
43219         * modules/sys_resource (License): Change to LGPLv2+.
43221 2018-08-06  Bruno Haible  <bruno@clisp.org>
43223         fnmatch-h: Add tests.
43224         * tests/test-fnmatch-h.c: New file.
43225         * modules/fnmatch-h-tests: New file.
43226         * tests/test-fnmatch-h-c++.cc: New file.
43227         * modules/fnmatch-h-c++-tests: New file.
43229 2018-08-06  Bruno Haible  <bruno@clisp.org>
43231         fnmatch-h: New module.
43232         * lib/fnmatch.in.h: Use the usual gnulib idioms for header file
43233         replacements.
43234         (FNM_*): Don't redefine if fnmatch exists and we are not overriding it.
43235         (fnmatch): Use the usual gnulib idiom for function declarations. Enable
43236         'posixcheck' warning.
43237         * m4/fnmatch_h.m4: New file.
43238         * m4/fnmatch.m4 (gl_FUNC_FNMATCH_POSIX): Require gl_FNMATCH_H. Remove
43239         code that is moved to fnmatch_h.m4. When fnmatch does not exist, don't
43240         bother testing whether it is working. Set HAVE_FNMATCH, REPLACE_FNMATCH
43241         as appropriate.
43242         * modules/fnmatch-h: New file.
43243         * modules/fnmatch (Files): Remove lib/fnmatch.in.h.
43244         (Dependencies): Add fnmatch-h. Remove extensions, snippet/*. Change
43245         conditions.
43246         (configure.ac): Test HAVE_FNMATCH and REPLACE_FNMATCH. Set module
43247         indicator.
43248         (Makefile.am): Remove code that is moved to fnmatch-h.
43249         * modules/fnmatch-gnu (configure.ac): Test HAVE_FNMATCH and
43250         REPLACE_FNMATCH.
43251         * doc/posix-headers/fnmatch.texi: Mention the 'fnmatch-h' module.
43252         * modules/posixcheck (Depends-on): Add fnmatch-h.
43254 2018-08-06  Bruno Haible  <bruno@clisp.org>
43256         Enable more C++ tests.
43257         * modules/inttypes-tests (Depends-on): Add inttypes-c++-tests.
43258         * modules/monetary-tests (Depends-on): Add monetary-c++-tests.
43259         * modules/strings-tests (Depends-on): Add strings-c++-tests.
43260         * modules/sys_resource-tests (Depends-on): Add sys_resource-c++-tests.
43261         * modules/utime-h-tests (Depends-on): Add utime-h-c++-tests.
43263 2018-08-06  Bruno Haible  <bruno@clisp.org>
43265         getopt-posix, utime-h: Ensure the .h file gets regenerated when needed.
43266         * modules/getopt-posix (Makefile.am): Add Makefile dependency for
43267         getopt.h.
43268         * modules/utime-h (Makefile.am): Add Makefile dependency for utime.h.
43270 2018-08-05  Bruno Haible  <bruno@clisp.org>
43272         utime-h: Generate header file when module 'posixcheck' is in use.
43273         * m4/utime_h.m4 (gl_UTIME_H): If module 'posixcheck' is in use, set
43274         UTIME_H to non-empty.
43276 2018-08-05  Bruno Haible  <bruno@clisp.org>
43278         monetary: Generate header file when module 'posixcheck' is in use.
43279         * m4/monetary_h.m4 (gl_MONETARY_H_BODY): If module 'posixcheck' is in
43280         use, set MONETARY_H to non-empty.
43282 2018-08-05  Bruno Haible  <bruno@clisp.org>
43284         iconv-h: Generate header file when module 'posixcheck' is in use.
43285         * m4/iconv_h.m4 (gl_ICONV_H_DEFAULTS): If module 'posixcheck' is in use,
43286         set ICONV_H to non-empty.
43288 2018-08-05  Bruno Haible  <bruno@clisp.org>
43290         Optimize the "checking whether ... is declared without a macro" checks.
43291         Suggested by Paul Eggert in
43292         <https://lists.gnu.org/archive/html/bug-gnulib/2011-01/msg00339.html>.
43293         * m4/warn-on-use.m4 (gl_WARN_ON_USE_PREPARE): Expand to nothing if the
43294         Gnulib module 'posixcheck' is not in use.
43296 2018-08-05  Bruno Haible  <bruno@clisp.org>
43298         iconv-h: Enable 'posixcheck' warnings.
43299         * m4/iconv_h.m4 (gl_ICONV_H): Check for declarations of iconv and
43300         iconv_open.
43301         * lib/iconv.in.h (iconv_open, iconv): Use _GL_WARN_ON_USE.
43303 2018-08-05  Bruno Haible  <bruno@clisp.org>
43305         Fix link error regarding 'rpl_environ' (regression from 2012-11-21).
43306         * m4/extern-inline.m4: Add more comments.
43307         * lib/warn-on-use.h (_GL_WARN_ON_USE_ATTRIBUTE): New macro.
43308         * lib/unistd.in.h (rpl_environ): Use it instead of _GL_WARN_ON_USE.
43309         * lib/math.in.h (_GL_WARN_REAL_FLOATING_DECL): Likewise.
43311 2018-08-04  Bruno Haible  <bruno@clisp.org>
43313         New module 'posixcheck'.
43314         * modules/posixcheck: New file.
43315         * m4/posixcheck.m4: New file.
43316         * doc/gnulib-tool.texi (Finding POSIX substitutes): New section.
43317         (Which modules?): Reference it.
43319 2018-08-01  Assaf Gordon  <assafgordon@gmail.com>
43321         dfa: fix memory leak
43322         * lib/dfa.c (dfafree): Add missing free() on dfa->superset.
43324 2018-08-01  Paul Eggert  <eggert@cs.ucla.edu>
43326         ieee754-h: new module
43327         It looks like Emacs can use this for some NaN processing.
43328         Emacs uses it only on double NaNs so it should be safe.
43329         * MODULES.html.sh (func_all_modules): Add ieee754-h.
43330         * config/srclist.txt: Mention ieee754.h in a comment.
43331         * doc/glibc-headers/ieee754.texi (ieee754.h):
43332         Gnulib now has a substitute that should work
43333         except for long double and for non-IEEE platforms.
43334         * lib/ieee754.in.h, m4/ieee754-h.m4, modules/ieee754-h:
43335         * modules/ieee754-h-tests, tests/test-ieee754-h.c: New files.
43337 2018-07-27  Bruno Haible  <bruno@clisp.org>
43339         iswcntrl: Mention minor problem on macOS.
43340         * doc/posix-functions/iswcntrl.texi: Mention oddity on macOS.
43342 2018-07-26  Colin Watson  <cjwatson@debian.org>
43344         bootstrap, gnulib-tool: fix translations rsync
43345         Previously, we created files such as $pobase/Makefile.in.in and then the
43346         subsequent rsync would immediately delete them.
43347         * build-aux/bootstrap (po_download_command_format): Avoid deleting
43348         non-.po files in target directory when rsyncing translations.
43349         * gnulib-tool (func_import): Likewise.
43350         * pygnulib/GLImport.py (GLImport.execute): Likewise.
43352 2018-07-25  Jim Meyering  <meyering@fb.com>
43354         bootstrap: reinstate definition fo gnulib_mk.
43355         That variable is used at least by cppi.
43356         * build-aux/bootstrap (gnulib_mk): Restore definition.
43357         This reverts the deletion from v0.1-1844-gc66dba9ba.
43359 2018-07-23  Bruno Haible  <bruno@clisp.org>
43361         doc: For module names, use texinfo markup @code{} or @samp{}.
43362         * doc/alloca.texi: Mark gnulib module names with @code.
43363         * doc/alloca-opt.texi: Likewise.
43364         * doc/quote.texi: Likewise.
43365         * doc/posix-functions/freopen.texi: Likewise.
43366         * doc/posix-functions/open.texi: Likewise.
43367         * doc/posix-functions/readlink.texi: Likewise.
43368         * doc/posix-functions/readlinkat.texi: Likewise.
43369         * doc/posix-functions/stdout.texi: Likewise.
43370         * doc/posix-functions/stderr.texi: Likewise.
43371         * doc/posix-functions/unlink.texi: Likewise.
43372         * doc/posix-functions/unlinkat.texi: Likewise.
43373         * doc/posix-functions/utime.texi: Likewise.
43374         * doc/posix-functions/utimensat.texi: Likewise.
43375         * doc/posix-functions/utimes.texi: Likewise.
43376         * doc/posix-headers/stdint.texi: Likewise.
43377         * doc/glibc-functions/futimesat.texi: Likewise.
43378         * doc/glibc-functions/lutimes.texi: Likewise.
43379         * doc/glibc-functions/memmem.texi: Likewise.
43381 2018-07-23  Werner LEMBERG  <wl@gnu.org>
43383         doc: Avoid some overfull lines in the TeX output.
43384         * doc/glibc-functions/futimesat.texi: Replace a long @code with a
43385         @example.
43386         * doc/pastposix-functions/pthread_attr_getstackaddr.texi: Insert a
43387         newline before the long URL.
43388         * doc/pastposix-functions/pthread_attr_setstackaddr.texi: Likewise.
43389         * doc/relocatable-maint.texi: Use @smallexample instead of @example.
43390         Add line breaks in code snippets.
43392 2018-07-17  Paul Eggert  <eggert@cs.ucla.edu>
43394         hard-locale: simplify by removing hard-locale.m4
43395         * m4/hard-locale.m4: Remove.
43396         * modules/hard-locale (Files): Remove m4/hard-locale.m4.
43397         (configure.ac): Do not call gl_HARD_LOCALE.
43399         gnulib-tool: limit line length for git send-email
43400         * gnulib-tool (func_import): Break actioncmd log line
43401         into multiple lines.
43403 2018-07-16  Bruno Haible  <bruno@clisp.org>
43405         ffs: Ensure declaration on mingw.
43406         Reported by Daniel P. Berrangé <berrange@redhat.com>
43407         in https://lists.gnu.org/archive/html/bug-gnulib/2018-07/msg00061.html.
43408         * m4/ffs.m4 (gl_FUNC_FFS): Check whether ffs() not only exists but is
43409         also declared.
43411 2018-07-13  Paul Eggert  <eggert@cs.ucla.edu>
43413         regex-tests: add dependency
43414         * modules/regex-tests (Depends-on): Add gettext-h.
43415         This is needed given the recent changes to regex,
43416         which no longer depends on gettext-h.
43418 2018-07-06  Paul Eggert  <eggert@cs.ucla.edu>
43420         regex: now in sync with glibc
43421         * config/srclist.txt: Gnulib and glibc regex code
43422         are synchronized again.
43424 2018-07-05  Paul Eggert  <eggert@cs.ucla.edu>
43426         renameatu: rename from renameat2
43427         It's looking like Glibc will add a renameat2 function
43428         that is incompatible with Gnulib renameat2; see:
43429         https://sourceware.org/ml/libc-alpha/2018-07/msg00064.html
43430         To help avoid future confusion, rename renameat2 to something else.
43431         Use the name 'renameatu', as the Gnulib function is close to the
43432         Glibc function.  Perhaps someday there will also be a renameat2
43433         Gnulib module, which mimicks the future glibc renameat2, but that
43434         can wait as nobody seems to need such a module now.
43435         * NEWS: Mention this.
43436         * lib/renameatu.c: Rename from lib/renameat2.c.
43437         * lib/renameatu.h: Rename from lib/renameat2.h.
43438         * modules/renameatu: Rename from modules/renameat2.
43439         * modules/renameatu-tests: Rename from modules/renameat2-tests.
43440         All uses of "renameat2" in identifiers or file name
43441         changed to "renameatu", except for two instances in
43442         lib/renameatu.c that deal with the Linux kernel's
43443         renameat2 syscall.
43445 2018-07-04  Paul Eggert  <eggert@cs.ucla.edu>
43447         gnulib-tool: minor tweaks for --gnu-make
43448         * gnulib-tool: Do not allow --gnu-make in test modes,
43449         since they all require automake.
43450         (func_emit_lib_Makefile_am): Don’t emit automake comment
43451         if --gnu-make.
43453         regex: work around conditional-dependencies glitch
43454         * modules/regex (Depends-on): Add langinfo.
43455         Without this change, I had problems building an experimental
43456         version of GNU Emacs.  The symptom of the bug was a message
43457         ‘./configure: line 12726: test: =: unary operator expected’.
43458         This was due to a line in gl_FUNC_NL_LANGINFO that invokes
43459         ‘test $HAVE_LANGINFO_CODESET = 1’ even though HAVE_LANGINFO_CODESET
43460         was unset.  Although gl_FUNC_NL_LANGINFO has
43461         ‘AC_REQUIRE([gl_LANGINFO_H])’ and gl_LANGINFO_H always sets
43462         HAVE_LANGINFO_CODESET to 0 or 1, gnulib-tool with
43463         --conditional-dependencies sometimes arranges for the
43464         gl_FUNC_NL_LANGINFO code to be executed before the gl_LANGINFO_H
43465         code.  Since the regex code includes <langinfo.h> it should be
43466         depending on the langinfo module anyway, and this happens to work
43467         around the bug, so install that as a workaround for now.  To
43468         reproduce the original problem, run the following shell script on
43469         the version of Gnulib just before this patch was installed.
43470                 rm -fr foo
43471                 mkdir foo
43472                 cat >foo/configure.ac <<'EOF'
43473                 AC_INIT(GNU Emacs, 27.0.50, bug-gnu-emacs@gnu.org, , https://www.gnu.org/software/emacs/)
43474                 gl_EARLY
43475                 gl_INIT
43476                 AC_OUTPUT
43477                 EOF
43478                 ./gnulib-tool --import --conditional-dependencies --gnu-make --dir foo regex
43479                 ./gnulib-tool --copy build-aux/install-sh foo/install-sh
43480                 ./gnulib-tool --copy build-aux/config.sub foo/config.sub
43481                 ./gnulib-tool --copy build-aux/config.guess foo/config.guess
43482                 cd foo
43483                 aclocal -I m4
43484                 autoconf
43485                 ./configure --with-included-regex
43487 2018-07-01  Paul Eggert  <eggert@cs.ucla.edu>
43489         wchar: fix bug when checking for ‘inline’
43490         I discovered this when looking into using the regex module
43491         with Emacs.
43492         * m4/wchar_h.m4 (gl_WCHAR_H_INLINE_OK): Fix bug introduced in
43493         2016-08-17T23:09:38Z!skunk@iSKUNK.ORG; the code compiled
43494         conftest1.c and conftest2.c but these files were not created.
43495         As far as I can see, this check never worked and nobody reported
43496         it until now, which is a bit worrisome.
43498 2018-06-30  Jim Meyering  <meyering@fb.com>
43500         bootstrap: s/--option val/--option=val/
43501         * build-aux/bootstrap (gnulib_tool_options): Change the
43502         spelling of "--option val" pairs to "--option=val", for
43503         aesthetics, and also so that this file no longer triggers
43504         a common help2man syntax-check warning when copied into
43505         projects like grep, gzip, etc.
43507 2018-07-01  Paul Eggert  <eggert@cs.ucla.edu>
43509         manywarnings: omit -Wswitch-default
43510         This should make things more consistent, as we already ignore
43511         -Wswitch-enum.  Problem reported by Reuben Thomas; see:
43512         https://lists.gnu.org/r/bug-gnulib/2018-05/msg00179.html
43513         * build-aux/g++-warning.spec, build-aux/gcc-warning.spec:
43514         Add -Wswitch-default.
43515         * m4/manywarnings-c++.m4 (gl_MANYWARN_ALL_GCC_CXX_IMPL):
43516         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC):
43517         Remove -Wswitch-default.
43519         regex: revert most trimming
43520         Problems reported by Bruno Haible in:
43521         https://lists.gnu.org/r/bug-gnulib/2018-07/msg00001.html
43522         * modules/regex (Depends-on): Add lock, memcmp, memmove,
43523         and wctype back in.  lock because regex users shouldn’t
43524         need to know that regex needs locking, and the rest because
43525         gnulib-tool should ordinarily ignore them anyway.
43527 2018-06-30  Paul Eggert  <eggert@cs.ucla.edu>
43529         regex: trim module dependencies
43530         * modules/regex (Depends-on): Remove gettext-h and lock,
43531         since the regex code should work OK without these modules,
43532         and Emacs uses it that way.  Also remove memcmp, memmove,
43533         and wctype, as these modules are obsolete and should not be
43534         needed any more.
43536 2018-06-29  Paul Eggert  <eggert@cs.ucla.edu>
43538         regex: glibc does not use intprops.h
43539         Maybe we can talk glibc into using intprops.h someday, but
43540         now doesn’t seem to be a good time.
43541         * lib/regcomp.c (TYPE_SIGNED): Remove; regex_internal.h now defines.
43542         * lib/regex_internal.h [_LIBC]: Do not include intprops.h.
43543         (TYPE_SIGNED, INT_ADD_WRAPV): New macros.
43545 2018-06-28  Paul Eggert  <eggert@cs.ucla.edu>
43547         regex: port to recently proposed glibc regex merge
43548         This patch is inspired by Adhemerval Zanella's recent proposal
43549         https://www.sourceware.org/ml/libc-alpha/2018-06/msg00905.html
43550         to merge glibc and Gnulib regex.  It aims to simplify the merge on
43551         the glibc side, without keeping Gnulib portable.
43552         * lib/regex.h: Fix a problem with glibc installed-header checking,
43553         as follows:
43554         (_Restrict_): Prefer __restrict if defined or if GCC 2.95 or later.
43555         (_Restrict_arr_): Prefer __restrict_arr if defined,
43556         otherwise prefer _Restrict_ if C99 or GCC 3.1 or later (but not C++).
43557         * lib/regex_internal.c (re_string_realloc_buffers, build_wcs_buffer)
43558         (build_wcs_upper_buffer, build_upper_buffer)
43559         (re_string_translate_buffer, re_string_context_at):
43560         Move decls here from lib/regex_internal.h, for glibc internal tests.
43561         (build_wcs_upper_buffer): Use __wcrtomb, not wcrtomb, fixing
43562         glibc BZ #18496.
43563         * lib/regex_internal.h (lock_fini) [_LIBC]: Cast to 0 to pacify
43564         -Wunused-value.
43565         (bitset_set, bitset_clear, bitset_contain, bitset_empty)
43566         (bitset_set_all, bitset_copy, bitset_not, bitset_merge)
43567         (bitset_mask): Now static inline, and without any __attribute__
43568         ((unused)) decoration, for glibc internal tests.
43570 2018-06-25  Bruno Haible  <bruno@clisp.org>
43572         threadlib: Fix LIBMULTITHREAD on platforms where --as-needed is enabled.
43573         Reported by Erik Auerswald <auerswal@unix-ag.uni-kl.de>
43574         in <https://lists.gnu.org/archive/html/coreutils/2018-06/msg00063.html>.
43575         * m4/threadlib.m4 (gl_THREADLIB_BODY): Check whether the linker supports
43576         --as-needed/--no-as-needed and --push-state/--pop-state. When defining
43577         USE_POSIX_THREADS_WEAK or USE_SOLARIS_THREADS_WEAK or
43578         USE_PTH_THREADS_WEAK, define LIBMULTITHREAD in such a way that -lpthread
43579         / -lthread / -lpth does not get optimized away by a preceding
43580         --as-needed option.
43582 2018-06-25  Bruno Haible  <bruno@clisp.org>
43584         Continue to use spaces for indentation, not tabs.
43585         * MODULES.html.sh: Untabify.
43586         * doc/regex.texi: Likewise.
43587         * lib/acl-internal.c: Likewise.
43588         * lib/dfa.c: Likewise.
43589         * lib/exclude.c: Likewise.
43590         * lib/exclude.h: Likewise.
43591         * lib/get-permissions.c: Likewise.
43592         * lib/gettimeofday.c: Likewise.
43593         * lib/parse-datetime.y: Likewise.
43594         * lib/pselect.c: Likewise.
43595         * lib/set-permissions.c: Likewise.
43596         * lib/time.in.h: Likewise.
43597         * m4/canonicalize.m4: Likewise.
43598         * m4/gc.m4: Likewise.
43599         * m4/gnulib-common.m4: Likewise.
43600         * m4/pthread_sigmask.m4: Likewise.
43601         * m4/vararrays.m4: Likewise.
43602         * tests/test-digest.h: Likewise.
43603         * tests/test-fcntl-h.c: Likewise.
43604         * tests/test-timespec.c: Likewise.
43605         * tests/uniwbrk/test-uc-wordbreaks.c: Likewise.
43607 2018-06-25  Bruno Haible  <bruno@clisp.org>
43609         manywarnings: Don't enable -Wjump-misses-init warnings by default.
43610         * build-aux/gcc-warning.spec: Add -Wjump-misses-init.
43611         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC(C)): Remove
43612         -Wjump-misses-init.
43614 2018-06-25  Jim Meyering  <meyering@fb.com>
43616         acl-internal.h: remove _GL_ATTRIBUTE_CONST on void function
43617         * lib/acl-internal.h (free_permission_context): Remove that
43618         attribute directive.  Otherwise, it would provoke this from GCC 9:
43619         lib/acl-internal.h:300:3: error: 'const' attribute on function \
43620           returning 'void' [-Werror=attributes]
43622 2018-06-24  Jim Meyering  <meyering@fb.com>
43624         parse-datetime: accommodate gcc-4.8.5
43625         Bruno Haible reported the build failure in
43626         https://lists.gnu.org/r/bug-gnulib/2018-06/msg00066.html
43627         * lib/parse-datetime.y (parse_datetime2): Remove leading "static"
43628         on declaration of new local.
43630 2018-06-24  Bruno Haible  <bruno@clisp.org>
43632         af_alg: Fail in continuable manner on Linux/powerpc64le.
43633         Reported by Assaf Gordon <assafgordon@gmail.com>
43634         in <https://lists.gnu.org/archive/html/coreutils/2018-06/msg00034.html>.
43635         * lib/af_alg.c (afalg_stream): On non-seekable streams, try a single-
43636         byte send() as the first round.
43638 2018-06-24  Bruno Haible  <bruno@clisp.org>
43640         af_alg: Fix state of stream after sendfile() succeeds.
43641         * lib/af_alg.c (afalg_stream): Invoke fflush and lseek, to ensure that
43642         the stream is correctly positioned afterwards.
43643         * modules/crypto/af_alg (Depends-on): Add fflush.
43644         * tests/test-digest.h (test_digest_on_files): Verify that after the
43645         operation the stream is positioned at end of file.
43647 2018-06-24  Jim Meyering  <meyering@fb.com>
43649         canon-host: take GCC9's advice rather than ignoring warning
43650         Pádraig Brady suggested not to ignore this GCC9 advice.
43651         * lib/canon-host.c: Undo preceding change.
43652         * lib/canon-host.h: Instead, declare with _GL_ATTRIBUTE_MALLOC.
43654         parse-datetime.y: avoid spurious GCC 9 warning
43655         * lib/parse-datetime.y (parse_datetime2): Save RELATIVE_TIME_0 into
43656         a function local prior to the first "goto fail".  The prior use would
43657         evoke this:
43658         parse-datetime.y: In function 'parse_datetime2':
43659         parse-datetime.y:1791:19: error: jump skips variable initialization \
43660           [-Werror=jump-misses-init]
43661         parse-datetime.y:2385:2: note: label 'fail' defined here
43662         parse-datetime.y:188:43: note: '({anonymous})' declared here
43663         parse-datetime.y:1841:12: note: in expansion of macro 'RELATIVE_TIME_0'
43665         canon-host.c: avoid spurious GCC 9 warning
43666         * lib/canon-host.c: Suppress GCC9's -Wsuggest-attribute=malloc.
43668         manywarnings: accommodate GCC 9.0-pre: remove -Wchkp and -Wabi
43669         * build-aux/gcc-warning.spec: Add them here, each with an explanation.
43670         * m4/manywarnings.m4: Remove them.
43671         Otherwise, building coreutils, I would see this:
43672         cc1: error: deprecated command line option '-Wchkp' [-Werror]
43673         cc1: error: -Wabi won't warn about anything [-Werror=abi]
43674         cc1: note: -Wabi warns about differences from the most up-to-date ABI,\
43675           which is also used by default
43676         cc1: note: use e.g. -Wabi=11 to warn about changes from GCC 7
43678 2018-06-24  Bruno Haible  <bruno@clisp.org>
43680         af_alg tests: Add another test.
43681         * tests/test-digest.h (test_digest_on_files): Also check a large file
43682         with a skipped header.
43683         * tests/test-md5.c: Include macros.h.
43684         * tests/test-sha1.c: Likewise.
43685         * tests/test-sha256.c: Likewise.
43686         * tests/test-sha512.c: Likewise.
43687         * modules/crypto/md5-tests (Files): Add tests/macros.h.
43688         * modules/crypto/sha1-tests (Files): Likewise.
43689         * modules/crypto/sha256-tests (Files): Likewise.
43690         * modules/crypto/sha512-tests (Files): Likewise.
43692 2018-06-24  Pádraig Brady  <P@draigBrady.com>
43694         maint: clarify comments about sticky EOF
43695         * lib/af_alg.c: Be more direct that we can't
43696         assume stickiness of EOF for portability reasons.
43697         * lib/md5.c: Clarify that this isn't just a glibc issue.
43698         * lib/sha1.c: Likewise.
43699         * lib/sha256.c: Likewise.
43700         * lib/sha512.c: Likewise.
43702 2018-06-24  Bruno Haible  <bruno@clisp.org>
43704         af_alg: Comment and style improvements.
43705         * lib/af_alg.c (alg_socket): Use 'size_t' as index into a string.
43706         (afalg_buffer, afalg_stream): Improve comments.
43708 2018-06-24  Pádraig Brady  <P@draigBrady.com>
43710         af_alg: disable kernel hash functions by default
43711         All the kernel routines were seen to be significantly slower
43712         with these relatively recent components on an i3-2310M system:
43713           kernel-4.10.6-200.fc25.x86_64
43714           openssl-1.0.2m-1.fc25.x86_64
43715         sha1 was nearly twice as slow in the kernel for example.
43716         Further considerations why this should not be the default, at:
43717         https://lists.gnu.org/r/coreutils/2018-06/msg00034.html
43719         * m4/af_alg.m4: Require --with-linux-crypto to enable.
43720         * m4/gl-openssl.m4: Tweak accordingly.
43722 2018-06-24  Pádraig Brady  <P@draigBrady.com>
43724         af_alg: avoid hangs when reading from streams
43725         * lib/af_alg.c (afalg_stream): Don't assume EOF is sticky,
43726         and thus avoid doing a fread() when feof() is set.
43727         * lib/md5.c: Ensure feof() is called before fread().
43728         * lib/sha1.c: Likewise.
43729         * lib/sha256.c: Likewise.
43730         * lib/sha512.c: Likewise.
43732 2018-06-24  Pádraig Brady  <P@draigBrady.com>
43734         af_alg: fix error handling when hash not returned
43735         * lib/af_alg.c (afalg_stream): Handle the case where we've
43736         successfully written data to the kernel in the read/write loop,
43737         but the kernel doesn't respond with the hash.
43739 2018-06-24  Paul Eggert  <eggert@cs.ucla.edu>
43741         libc-config: merge from glibc
43742         * lib/cdefs.h (__inline, __restrict):
43743         Copy from current glibc.  This fixes glibc bug 17721,
43744         which Gnulib had already fixed in a different way.
43745         (__nonnull): Lessen the distance from glibc by using the
43746         glibc definition inside an ‘#ifndef __nonnull’.
43747         (__attribute_nonstring__): New macro, copied from
43748         current glibc.
43749         * lib/libc-config.h (__attribute_nonstring__): New undef.
43750         (__restrict): Remove; workaround no longer needed.
43751         Keep the __inline workaround, though, as it uses HAVE___INLINE to
43752         support more compilers than the glibc __inline can.
43754 2018-06-24  Bruno Haible  <bruno@clisp.org>
43756         mbrtowc, wcwidth: Fix MT-safety bug (regression from 2018-06-23).
43757         * lib/mbrtowc.c (enc_t): New enum type.
43758         (locale_enc, locale_enc_cached): New functions.
43759         (mbrtowc): Eliminate static variables. Use locale_enc_cached instead.
43760         * lib/wcwidth.c (is_locale_utf8, is_locale_utf8_cached): New functions.
43761         (wcwidth): Eliminate static variables. Use is_locale_utf8_cached
43762         instead.
43763         * m4/mbrtowc.m4 (gl_PREREQ_MBRTOWC): Require AC_C_INLINE.
43764         * m4/wcwidth.m4 (gl_PREREQ_WCWIDTH): New macro.
43765         * modules/wcwidth (configure.ac): Invoke it.
43767 2018-06-24  Bruno Haible  <bruno@clisp.org>
43769         wchar-single: Fix test failure in wcwidth tests.
43770         * tests/test-wcwidth.c (main): If the wchar-single module is present,
43771         skip the tests in the C locale.
43773 2018-06-23  Pádraig Brady  <P@draigBrady.com>
43775         crypto: mention --without-linux-crypto in --with-openssl --help
43776         * m4/gl-openssl.m4 (gl_CRYPTO_CHECK): Mention that linux crypto
43777         routines take precedence in --with-openssl help output.
43779 2018-06-23  Pádraig Brady  <P@draigBrady.com>
43781         wchar-single: a new module to enable optimizations in wchar replacements
43782         * lib/mbrtowc.c (mbrtowc): Only check locale_charset() once if
43783         GNULIB_WCHAR_SINGLE is enabled.
43784         * lib/wcwidth.c (wcwidth): Likewise.
43786 2018-06-23  Bruno Haible  <bruno@clisp.org>
43788         libc-config: Fix conflict with FreeBSD include files.
43789         * lib/cdefs.h (__nonnull): Remove definition.
43790         * lib/libc-config.h (__nonnull): Remove undefinition.
43792 2018-06-21  Paul Eggert  <eggert@cs.ucla.edu>
43794         random_r: do not crash if state is unaligned
43795         Problem reported by Bruce Korb in:
43796         https://lists.gnu.org/r/bug-gnulib/2018-06/msg00030.html
43797         I reproduced the crash on 32-bit sparc with Oracle Studio 12.6
43798         with 'cc -O2 -xmemalign=8s'.
43799         * lib/random_r.c: Include string.h, for memcpy.
43800         (get_int32, set_int32): New functions.
43801         (__srandom_r, __initstate_r, __setstate_r, __random_r):
43802         Use them to avoid assumption that state pointer is aligned.
43803         (__random_r): Avoid integer overflow if INT_MAX == UINT32_MAX.
43804         * tests/test-random_r.c (test_failed): New function.
43805         (main): Use it, to test for alignment bugs.
43807         random_r: omit unnecessary include
43808         * lib/random_r.c: Do not include limits.h.
43810         random, random_r: merge from glibc
43811         * lib/random.c, lib/random_r.c:
43812         Include libc-config.h if !_LIBC, not config.h unilaterally.
43813         * lib/random.c:
43814         Do not include stdint.h or time.h; not needed.
43815         Include libc-lock.h if _LIBC, and define substitute macros otherwise.
43816         (unsafe_state): Rename from generator.  All uses changed.
43817         Use C99-style initializers.
43818         (__random, __srandom, __initstate, __setstate): Rename from
43819         non-underscored version, but define it to non-underscored version
43820         on Gnulib.  Add a lock.
43821         * lib/random_r.c (__srandom_r, __initstate_r, __setstate_r, __random_r):
43822         Likewise.
43823         Do not include <stdint.h>; not needed since stdlib.h defines int32_t.
43824         (weak_alias, __set_errno) [!_LIBC]: Remove; now done by libc-config.
43825         (__srandom_r): Use int32_t instead of long int where int32_t will do.
43826         (__random_r): Use uint32 to fix glibc bug 17343.
43827         * modules/random, modules/random_r (Depends-on): Add libc-config.
43828         Depend on stdint only if $HAVE_RANDOM = 0.
43830 2018-06-19  Jim Meyering  <meyering@fb.com>
43832         README-release: also run any check-very-expensive tests
43833         * top/README-release: Adjust instructions so they run the
43834         check-very-expensive tests when there is such a target.
43836 2018-06-18  Bruno Haible  <bruno@clisp.org>
43838         pthread_rwlock_rdlock: Add comments regarding glibc behaviour.
43839         * m4/pthread_rwlock_rdlock.m4: Add comment.
43840         * doc/posix-functions/pthread_rwlock_rdlock.texi: Mention that rwlocks
43841         are reader-preferring in glibc.
43842         * doc/posix-functions/pthread_rwlock_tryrdlock.texi: Likwise.
43843         * doc/posix-functions/pthread_rwlock_timedrdlock.texi: Likewise.
43845 2018-06-17  Paul Eggert  <eggert@cs.ucla.edu>
43847         crypto: use byteswap
43848         * lib/md4.c, lib/md5.c, lib/sha1.c, lib/sha256.c, lib/sha512.c:
43849         * lib/sm3.c: Include <byteswap.h>.
43850         (SWAP): Use its macros rather than reinventing the wheel.
43851         * modules/crypto/md4, modules/crypto/md5-buffer:
43852         * modules/crypto/sha1-buffer, modules/crypto/sha256-buffer:
43853         * modules/crypto/sha512-buffer, modules/crypto/sm3:
43854         (Depends-on): Add byteswap.
43856 2018-06-17  Pádraig Brady  <P@draigBrady.com>
43858         gendocs.sh: fix support for legacy --texi2html
43859         * build-aux/gendocs.sh: Restrict use of TOP_NODE_UP_URL
43860         to the default makeinfo invocation.
43861         Reported by Bruce Korb
43863 2018-06-17  Bruno Haible  <bruno@clisp.org>
43865         gettext po infrastructure: Update from current gettext git.
43866         Reported by Akim Demaille <akim@lrde.epita.fr>.
43867         * build-aux/po/Makefile.in.in: Update from current gettext git.
43868         * build-aux/po/remove-potcdate.sin: Likewise.
43869         * config/srclist.txt: Temporarily disable sync for these files.
43871 2018-06-17  Bruno Haible  <bruno@clisp.org>
43873         getloadavg: Return 0 on Windows without Cygwin.
43874         * lib/getloadavg.c: Don't assume that the symbol WINDOWS32 is defined.
43876 2018-06-17  Paul Smith  <psmith@gnu.org>
43878         getloadavg: Allow building on Windows without Cygwin
43879         * lib/getloadavg.c: Reinstate ifdef for HAVE_UNISTD_H.
43880         * m4/getloadavg.m4: Check for unistd.h.
43882 2018-06-03  Paul Eggert  <eggert@cs.ucla.edu>
43884         Port crypto/af_alg to GCC 4.8.4
43885         Problem reported by Peter Simons in:
43886         https://lists.gnu.org/r/bug-gnulib/2018-06/msg00002.html
43887         * modules/crypto/af_alg (Depends-on): Add c99 if USE_AF_ALG.
43889 2018-05-27  Colin Watson  <cjwatson@debian.org>
43891         bootstrap: document source fetching in --help
43892         * build-aux/bootstrap (usage): Document how Gnulib sources are fetched.
43894 2018-04-09  Colin Watson  <cjwatson@debian.org>
43896         bootstrap: allow non-submodule control of gnulib
43897         * build-aux/bootstrap: Honour GNULIB_URL and GNULIB_REVISION in
43898         bootstrap.conf when fetching gnulib using "git clone" or via
43899         GNULIB_SRCDIR.
43901 2018-05-21  Paul Eggert  <eggert@cs.ucla.edu>
43903         crypto: omit stream ops Emacs doesn’t need
43904         * lib/md5.c (md5_stream):
43905         * lib/sha1.c (sha1_stream):
43906         * lib/sha256.c (shaxxx_stream, sha256_stream, sha224_stream):
43907         * lib/sha512.c (shaxxx_stream, sha512_stream, sha384_stream):
43908         Compile stream functions only if GL_COMPILE_CRYPTO_STREAM is
43909         defined.  Emacs needs this, as it does not use the stream
43910         operations and doesn’t need all the af_alg stuff we’ve recently
43911         added.  Perhaps a similar change is needed to the other crypto
43912         modules, but this patch changes only those needed for Emacs.
43913         * modules/crypto/md5-buffer, modules/crypto/sha1-buffer:
43914         * modules/crypto/sha256-buffer, modules/crypto/sha512-buffer:
43915         New modules, used by Emacs.
43916         * modules/crypto/md5, modules/crypto/sha1, modules/crypto/sha256:
43917         * modules/crypto/sha512: Rewrite to depend on the new modules.
43919 2018-05-20  Pádraig Brady  <P@draigBrady.com>
43921         fts: avoid a memory leak edge case
43922         * lib/fts.c (fts_open): Set an appropriate fts_level
43923         so that an immediate fts_close() will free the allocation.
43924         * tests/test-fts.c (fts_dealloc): Add a test case which
43925         will trigger under valgrind or address sanitizer.
43926         Fixes https://bugs.gnu.org/31439
43928 2018-05-20  Bruno Haible  <bruno@clisp.org>
43930         wcwidth tests: Fix link error.
43931         * modules/wcwidth-tests (Makefile.am): Link test-wcwidth against
43932         $(LIBUNISTRING).
43934 2018-05-20  Bruno Haible  <bruno@clisp.org>
43936         regex: Fix "error: possibly undefined macro: gl_GLIBC21".
43937         * modules/regex (Files): Add m4/glibc21.m4.
43939 2018-05-20  Bruno Haible  <bruno@clisp.org>
43941         localcharset: Optimize.
43942         * lib/localcharset.c (alias_table): Comment out no-op mappings for
43943         platforms where these don't matter. This reduces the table size,
43944         which in turn reduces the lookup time.
43946 2018-05-19  Bruno Haible  <bruno@clisp.org>
43948         localcharset: Map the locale encodings found in newer OSes.
43949         * lib/localcharset.c (alias_table): Add mapping for locale encodings
43950         found in FreeBSD 11, NetBSD 7, Solaris 10, Openindiana, HP-UX 11.31,
43951         IRIX 6.5, Minix 3.3.
43952         * lib/localcharset.h: Update comments accordingly. Also for Cygwin 2.9.
43954 2018-05-19  Bruno Haible  <bruno@clisp.org>
43956         localcharset: Move mapping tables into the code. Use a binary search.
43957         * lib/localcharset.h: Document the GNU canonical names for character
43958         encodings here.
43959         * lib/localcharset.c: Don't include <fcntl.h>, <unistd.h>,
43960         relocatable.h, configmake.h.
43961         (O_NOFOLLOW, ISSLASH, DIRECTORY_SEPARATOR, getc, volatile): Remove
43962         macros.
43963         (charset_aliases): Remove variable.
43964         (get_charset_aliases): Remove function.
43965         (struct table_entry): New type.
43966         (alias_table, locale_table): New constants.
43967         (locale_charset): Use the alias_table or locale_table to get the
43968         canonicalized encoding name.
43969         * lib/config.charset: Remove file.
43970         * lib/ref-add.sin: Remove file.
43971         * lib/ref-del.sin: Remove file.
43972         * m4/localcharset.m4 (gl_LOCALCHARSET): Don't require gl_FCNTL_O_FLAGS,
43973         AC_CANONICAL_HOST, gl_GLIBC21. Don't check for getc_unlocked.
43974         * modules/localcharset (Notice): Remove.
43975         (Files): Remove config.charset, ref-add.sin, ref-del.sin, fcntl-o.m4,
43976         glibc21.m4.
43977         (Depends-on): Remove configmake.
43978         (configure.ac): Define LOCALCHARSET_TESTS_ENVIRONMENT to empty.
43979         (Makefile.am): Simplify.
43980         * build-aux/prefix-gnulib-mk: Remove special code for the removed files.
43982 2018-05-19  Bruno Haible  <bruno@clisp.org>
43984         localcharset: Add a manual test.
43985         * tests/test-localcharset.c: New file.
43986         * modules/localcharset-tests: New file.
43988 2018-05-19  Bruno Haible  <bruno@clisp.org>
43990         localcharset: Remove support for obsolete platforms.
43991         * lib/config.charset: Remove support for Linux/libc5, glibc-2.0.x, and
43992         Mac OS X 10.2. Comment out dubious entry for Solaris.
43994 2018-05-19  Jim Meyering  <meyering@fb.com>
43996         gnupload: adjust comment
43997         * build-aux/gnupload: Add FIXME-2020 comment, to make it slightly
43998         more likely we'll remove the just-added code in a year or two.
44000 2018-05-19  Bruno Haible  <bruno@clisp.org>
44002         gnupload: Fix "gpg-agent is not available in this session" error.
44003         * build-aux/gnupload (GPG): Pick the right GNUPG executable to use.
44005 2018-05-16  Paul Eggert  <eggert@cs.ucla.edu>
44007         crypto/af_alg: fix --help
44008         * m4/af_alg.m4: Avoid spurious newline in --help output.
44010 2018-05-13  Bruno Haible  <bruno@clisp.org>
44012         nl_langinfo: Fix compilation error on Android.
44013         * lib/nl_langinfo.c (nl_langinfo): Define values for the items GROUPING,
44014         INT_CURR_SYMBOL, etc. only if these items are defined.
44016 2018-05-13  Bruno Haible  <bruno@clisp.org>
44018         truncate: Fix compilation error on Android.
44019         * m4/truncate.m4 (gl_FUNC_TRUNCATE): Test also whether 'truncate' is
44020         declared. Set HAVE_DECL_TRUNCATE, not HAVE_TRUNCATE.
44021         * lib/unistd.in.h (truncate): Test HAVE_DECL_TRUNCATE, not
44022         HAVE_TRUNCATE.
44023         * modules/truncate: Likewise.
44024         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize HAVE_DECL_TRUNCATE,
44025         not HAVE_TRUNCATE.
44026         * modules/unistd (Makefile.am): Substitute HAVE_DECL_TRUNCATE, not
44027         HAVE_TRUNCATE.
44028         * doc/posix-functions/truncate.texi: Mention the issue.
44030 2018-05-13  Bruno Haible  <bruno@clisp.org>
44032         pthread: Fix compilation error on Android.
44033         * lib/pthread.in.h: Use _GL_ALREADY_INCLUDING_PTHREAD_H to shortcut
44034         recursive inclusion of this file.
44036 2018-05-13  Bruno Haible  <bruno@clisp.org>
44038         posix_spawn: Fix compilation error on Android.
44039         * lib/spawn.in.h (posix_spawnattr_t): Consider also the case
44040         HAVE_POSIX_SPAWNATTR_T = 1 && HAVE_POSIX_SPAWN = 0.
44041         (posix_spawn_file_actions_t): Consider also the case
44042         HAVE_POSIX_SPAWN_FILE_ACTIONS_T = 1 && HAVE_POSIX_SPAWN = 0.
44044 2018-05-13  Bruno Haible  <bruno@clisp.org>
44046         tsearch: Move from K&R C to ANSI C.
44047         * lib/tsearch.c (tfind): Convert definition to ANSI C.
44049 2018-05-13  Bruno Haible  <bruno@clisp.org>
44051         tsearch: Fix compilation error on Android.
44052         * lib/search.in.h (twalk): Declare when HAVE_TWALK, not HAVE_TSEARCH,
44053         is 0.
44054         (GNULIB_defined_tsearch, GNULIB_defined_twalk): New macros.
44055         * lib/tsearch.c (tsearch, tfind, tdelete): Define only if
44056         GNULIB_defined_tsearch is true.
44057         (twalk): Define only if GNULIB_defined_twalk is true.
44058         * modules/tsearch (configure.ac): Compile tsearch.c also if HAVE_TWALK
44059         is 0.
44060         * m4/tsearch.m4 (gl_FUNC_TSEARCH): Set HAVE_TWALK.
44061         * m4/search_h.m4 (gl_SEARCH_H_DEFAULTS): Initialize HAVE_TWALK.
44062         * modules/search (Makefile.am): Substitute HAVE_TWALK.
44064 2018-05-13  Bruno Haible  <bruno@clisp.org>
44066         imaxdiv: Fix compilation error on Android.
44067         * m4/imaxdiv.m4 (gl_FUNC_IMAXDIV): Set HAVE_IMAXDIV_T to 0 if imaxdiv_t
44068         is not defined.
44069         * lib/inttypes.in.h (imaxdiv_t): Define if HAVE_IMAXDIV_T, not
44070         HAVE_DECL_IMAXDIV, is 0.
44071         * m4/inttypes.m4 (gl_INTTYPES_H_DEFAULTS): Initialize HAVE_IMAXDIV_T.
44072         * modules/inttypes-incomplete (Makefile.am): Substitute HAVE_IMAXDIV_T.
44074 2018-05-13  Bruno Haible  <bruno@clisp.org>
44076         Support selective inclusion mechanism of recent mingw.org header files.
44077         Reported by Eli Zaretskii <eliz@gnu.org>.
44078         * lib/sys_types.in.h: On mingw, when __need_off_t, __need___off64_t,
44079         __need_ssize_t, or __need_time_t is defined, just include the system's
44080         <sys/types.h>.
44081         * lib/locale.in.h: On mingw, when __need_locale_t is defined, just
44082         include the system's <locale.h>.
44084 2018-05-13  Bruno Haible  <bruno@clisp.org>
44086         Avoid compilation error due to 'mmap' on Android.
44087         * lib/vma-iter.c (_FILE_OFFSET_BITS): Undefine on Android.
44088         * lib/get-rusage-as.c (_FILE_OFFSET_BITS): Likewise.
44089         * tests/zerosize-ptr.h (_FILE_OFFSET_BITS, __USE_FILE_OFFSET64):
44090         Undefine on Android.
44092 2018-05-13  Bruno Haible  <bruno@clisp.org>
44094         Add cross-compilation guesses for Linux systems without glibc.
44095         * m4/chown.m4 (AC_FUNC_CHOWN): Add cross-compilation guess for Linux.
44096         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Likewise.
44097         * m4/link.m4 (gl_FUNC_LINK): Likewise.
44098         * m4/linkat.m4 (gl_FUNC_LINKAT): Likewise.
44099         * m4/lstat.m4 (gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Likewise.
44100         * m4/mkdir.m4 (gl_FUNC_MKDIR): Likewise.
44101         * m4/mkfifo.m4 (gl_FUNC_MKFIFO): Likewise.
44102         * m4/mknod.m4 (gl_FUNC_MKNOD): Likewise.
44103         * m4/pselect.m4 (gl_FUNC_PSELECT): Likewise.
44104         * m4/readlink.m4 (gl_FUNC_READLINK): Likewise.
44105         * m4/rename.m4 (gl_FUNC_RENAME): Likewise.
44106         * m4/rmdir.m4 (gl_FUNC_RMDIR): Likewise.
44107         * m4/select.m4 (gl_FUNC_SELECT): Likewise.
44108         * m4/stat.m4 (gl_FUNC_STAT): Likewise.
44109         * m4/symlink.m4 (gl_FUNC_SYMLINK): Likewise.
44110         * m4/symlinkat.m4 (gl_FUNC_SYMLINKAT): Likewise.
44111         * m4/unlink.m4 (gl_FUNC_UNLINK): Likewise.
44112         * m4/utimens.m4 (gl_UTIMENS): Likewise.
44114 2018-05-13  Bruno Haible  <bruno@clisp.org>
44116         getpagesize: Fix compilation error on Android.
44117         * m4/getpagesize.m4 (gl_CHECK_FUNC_GETPAGESIZE): New macro.
44118         (gl_FUNC_GETPAGESIZE): Invoke it instead of AC_CHECK_FUNC.
44119         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): Don't invoke
44120         AC_CHECK_FUNC. Instead, invoke gl_CHECK_FUNC_GETPAGESIZE and define
44121         HAVE_GETPAGESIZE accordingly.
44122         * modules/getcwd (Files): Add m4/getpagesize.m4.
44124 2018-05-13  Bruno Haible  <bruno@clisp.org>
44126         tcgetsid: Fix compilation error on Android.
44127         * m4/tcgetsid.m4 (gl_FUNC_TCGETSID): Use AC_LINK_IFELSE instead of
44128         AC_CHECK_FUNC.
44130 2018-05-13  Bruno Haible  <bruno@clisp.org>
44132         getpass: Fix configure test for Android.
44133         * m4/getpass.m4 (gl_PREREQ_GETPASS): Use AC_LINK_IFELSE instead of
44134         AC_CHECK_FUNC.
44136 2018-05-13  Bruno Haible  <bruno@clisp.org>
44138         ffs: Fix compilation error on Android.
44139         * m4/ffs.m4 (gl_FUNC_FFS): Use AC_LINK_IFELSE instead of AC_CHECK_FUNC.
44141 2018-05-13  Bruno Haible  <bruno@clisp.org>
44143         mkfifo: Fix compilation error on Android.
44144         * m4/mkfifo.m4 (gl_FUNC_MKFIFO): Use AC_LINK_IFELSE instead of
44145         AC_CHECK_FUNC.
44147 2018-05-13  Bruno Haible  <bruno@clisp.org>
44149         c-strtod: Fix configure test for Android.
44150         * m4/c-strtod.m4 (gl_C_STRTOD): Use AC_LINK_IFELSE instead of
44151         AC_CHECK_FUNC.
44153 2018-05-13  Bruno Haible  <bruno@clisp.org>
44155         random: Fix compilation error on Android.
44156         * m4/random.m4 (gl_FUNC_RANDOM): Use AC_LINK_IFELSE instead of
44157         AC_CHECK_FUNC.
44159 2018-05-13  Bruno Haible  <bruno@clisp.org>
44161         grantpt: Fix compilation error on Android.
44162         * m4/grantpt.m4 (gl_FUNC_GRANTPT): Use AC_LINK_IFELSE instead of
44163         AC_CHECK_FUNC.
44165 2018-05-13  Bruno Haible  <bruno@clisp.org>
44167         stdioext: Fix compilation errors with newer Android headers.
44168         * lib/stdio-impl.h (fp_, fp_ub): Define differently for Android.
44169         (__SLBF, __SNBF, __SRD, __SWR, __SRW, __SEOF, __SERR, __SOFF): Define
44170         fallbacks for Android.
44171         * lib/fpending.c: Update comments.
44172         * lib/fpurge.c: Likewise.
44173         * lib/freadable.h: Likewise.
44174         * lib/freadable.c: Likewise.
44175         * lib/freadahead.c: Likewise.
44176         * lib/freading.h: Likewise.
44177         * lib/freadptr.c: Likewise.
44178         * lib/fseterr.c: Likewise.
44179         * lib/fwritable.h: Likewise.
44180         * lib/fwritable.c: Likewise.
44181         * lib/fwriting.h: Likewise.
44182         * lib/fwriting.c: Likewise.
44184 2018-05-13  Bruno Haible  <bruno@clisp.org>
44186         doc: Add info about Android versions 2.0 to 8.1.
44187         * doc/**/*.texi: Add info about functions in all released versions of
44188         Bionic.
44190 2018-05-12  Bruno Haible  <bruno@clisp.org>
44192         fseeko: On mingw, don't use the hidden function _fseeki64.
44193         Reported by Eli Zaretskii <eliz@gnu.org>.
44194         * m4/fseeko.m4 (gl_PREREQ_FSEEKO): Test whether _fseeki64 is declared.
44195         * lib/fseeko.c (fseeko): Use _fseeki64 only if it is declared.
44197 2018-05-12  Bruno Haible  <bruno@clisp.org>
44199         glob: Choose 'dirent_type' in a way that works better on mingw.
44200         Reported and suggested by Eli Zaretskii <eliz@gnu.org>.
44201         * lib/glob.c (dirent_type): Define as uint_fast32_t.
44203 2018-05-12  Bruno Haible  <bruno@clisp.org>
44205         execute, spawn-pipe: Avoid warning about redefining 'close'.
44206         Reported by Eli Zaretskii <eliz@gnu.org>.
44207         * lib/execute.c: Undefine 'close' before redefining it.
44208         * lib/spawn-pipe.c: Likewise.
44210 2018-05-12  Bruno Haible  <bruno@clisp.org>
44212         nanosleep: Avoid test failure on mingw when it has nanosleep.
44213         Reported by Eli Zaretskii <eliz@gnu.org>.
44214         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Check whether alarm() exists.
44215         If it does not exist, use a simpler test program that does not call
44216         alarm().
44218 2018-05-10  Bruno Haible  <bruno@clisp.org>
44220         lock, cond, thread, tls: Use a different symbol as libpthread witness.
44221         Reported by Devin Hussey <husseydevin@gmail.com>.
44222         Based on a patch by Paul Eggert.
44223         * lib/glthread/lock.h (pthread_in_use): Use 'pthread_mutexattr_gettype'
44224         as witness of libpthread.
44225         * lib/glthread/cond.h (pthread_in_use): Likewise.
44226         * lib/glthread/thread.h (pthread_in_use): Likewise.
44227         * lib/glthread/tls.h (pthread_in_use): Likewise.
44229 2018-05-10  Bruno Haible  <bruno@clisp.org>
44231         cond tests: Fix compilation error on Solaris.
44232         * tests/test-cond.c: Include <unistd.h> before defining 'yield' as a
44233         macro.
44235 2018-05-10  Bruno Haible  <bruno@clisp.org>
44237         doc: Add partial info about Android 4.3.
44238         * doc/*-functions/*.texi: Add info about functions that were added
44239         to Bionic between Android 4.3 and Android 9.0.
44241 2018-05-10  Bruno Haible  <bruno@clisp.org>
44243         doc: Add info about Android 9.0.
44244         * doc/**/*.texi: Add info about functions and headers in Bionic from
44245         Android 9.0.
44247 2018-05-09  Paul Eggert  <eggert@cs.ucla.edu>
44249         af_alg: fix my typo in afalg_buffer
44250         * lib/af_alg.c (afalg_buffer): Fix typo I recently introduced.
44251         (afalg_stream): Simplify and avoid the need for a runtime test
44252         at the end.
44254         af_alg: recover better from crypto failures
44255         * lib/af_alg.c (afalg_stream): Recover from crypto failures if the
44256         input stream is seekable, by repositioning the stream back to
44257         where it was, possibly by just calling sendfile with an offset
44258         arg.  This lets us return -EAFNOSUPPORT instead of -EIO in some
44259         cases, which lets our callers try again with user-mode code.
44260         * modules/crypto/af_alg (Depends-on): Depend on fseeko and ftello
44261         instead of on fflush and lseek.
44263         af_alg: distiguish I/O errors better
44264         * lib/af_alg.c (afalg_buffer, afalg_stream): Return -EAFNOSUPPORT,
44265         not -EIO, if it’s OK for the caller to try again with user-mode code.
44266         (afalg_stream) [!_WIN32 || __CYGWIN__]: Return -EIO (not possibly
44267         some other error number) if fflush fails, as the caller should not
44268         try again that case.
44270         af_alg: avoid gotos
44271         * lib/af_alg.c (afalg_buffer, afalg_stream): Rewrite to avoid
44272         gotos, as they were a source of unreliability and made the code a
44273         bit harder to follow.
44275         af_alg: don’t leak file descriptors into children
44276         * lib/af_alg.c (alg_socket): Use SOCK_CLOEXEC when creating sockets.
44277         This code should be compiled only on recent GNU/Linux platforms
44278         so we shouldn’t have to also depend on the accept4 module.
44280         af_alg: coalesce socket creation
44281         * lib/af_alg.c (alg_socket): New function.
44282         (afalg_buffer, afalg_stream): Use it.  This avoids some
44283         code duplication and gotos.
44285         af_alg: fix file descriptor leak
44286         * lib/af_alg.c (afalg_stream): Close leak.
44288         af_alg: Pacify --enable-gcc-warnings on GCC 8
44289         * lib/af_alg.c (afalg_buffer, afalg_stream): Reorder local decls
44290         and checking to pacify gcc -Wjump-misses-init on GCC 8.
44292 2018-05-07  Paul Eggert  <eggert@cs.ucla.edu>
44294         af_alg: Pacify --enable-gcc-warnings
44295         Problem reported by Assaf Gordon in:
44296         https://lists.gnu.org/r/bug-gnulib/2018-05/msg00041.html
44297         * lib/af_alg.c (afalg_buffer): Move local decls to pacify
44298         gcc -Wjump-misses-init.
44299         * lib/sha512.c (shaxxx_stream): Now static.
44301 2018-05-06  Bruno Haible  <bruno@clisp.org>
44303         af_alg: Add ability to use Linux kernel crypto API on data in memory.
44304         * lib/af_alg.h (afalg_buffer): New declaration.
44305         * lib/af_alg.c (afalg_buffer): New function.
44307 2018-05-06  Bruno Haible  <bruno@clisp.org>
44309         af_alg: Avoid warnings.
44310         * lib/af_alg.h (afalg_stream): Mark fallback declaration as inline.
44311         * m4/af_alg.m4 (gl_AF_ALG): Require AC_C_INLINE.
44313 2018-05-06  Bruno Haible  <bruno@clisp.org>
44315         crypto/{md5,sha1,sha256,sha512} tests: Add benchmarks.
44316         * tests/bench-digest.h: New file.
44317         * tests/bench-md5.c: New file.
44318         * tests/bench-sha1.c: New file.
44319         * tests/bench-sha224.c: New file.
44320         * tests/bench-sha256.c: New file.
44321         * tests/bench-sha384.c: New file.
44322         * tests/bench-sha512.c: New file.
44323         * modules/crypto/md5-tests (Files): Add tests/bench-md5.c,
44324         tests/bench-digest.h.
44325         (Depends-on): Add getrusage, gettimeofday.
44326         (Makefile.am): Add variables to build bench-md5.
44327         * modules/crypto/sha1-tests (Files): Add tests/bench-sha1.c,
44328         tests/bench-digest.h.
44329         (Depends-on): Add getrusage, gettimeofday.
44330         (Makefile.am): Add variables to build bench-sha1.
44331         * modules/crypto/sha256-tests (Files): Add tests/bench-sha224.c,
44332         tests/bench-sha256.c, tests/bench-digest.h.
44333         (Depends-on): Add getrusage, gettimeofday.
44334         (Makefile.am): Add variables to build bench-sha224, bench-sha256.
44335         * modules/crypto/sha512-tests (Files): Add tests/bench-sha384.c,
44336         tests/bench-sha512.c, tests/bench-digest.h.
44337         (Depends-on): Add getrusage, gettimeofday.
44338         (Makefile.am): Add variables to build bench-sha384, bench-sha512.
44340 2018-05-06  Bruno Haible  <bruno@clisp.org>
44342         af_alg: Fix a resource leak.
44343         * lib/af_alg.c (afalg_stream): Close socket before returning -EINVAL.
44344         New local variable 'result'.
44346 2018-05-06  Bruno Haible  <bruno@clisp.org>
44348         af_alg: Fix bug with streams that are not at position 0.
44349         * lib/af_alg.c (afalg_stream): Before sendfile, invoke fflush. Don't
44350         assume that the stream is positioned at position 0.
44351         * lib/af_alg.h (afalg_stream): Mention restriction regarding the state
44352         of the stream.
44353         * lib/md5.h (md5_stream): Likewise.
44354         * lib/sha1.h (sha1_stream): Likewise.
44355         * lib/sha256.h (sha256_stream, sha224_stream): Likewise.
44356         * lib/sha512.h (sha512_stream, sha384_stream): Likewise.
44357         * modules/crypto/af_alg (Depends-on): Add fflush, lseek.
44359         crypto/{md5,sha1,sha256,sha512} tests: Enhance test.
44360         * tests/test-digest.h (test_digest_on_files): Add a test with a FILE
44361         stream that is not positioned at the beginning.
44363 2018-05-06  Bruno Haible  <bruno@clisp.org>
44365         af_alg: Add configure option to enable/disable use of Linux crypto API.
44366         Suggested by Assaf Gordon <assafgordon@gmail.com>.
44367         * m4/af_alg.m4 (gl_AF_ALG): Add AC_ARG_WITH invocation. Define C macro
44368         USE_LINUX_CRYPTO_API.
44369         * lib/af_alg.h: Test USE_LINUX_CRYPTO_API, not HAVE_LINUX_IF_ALG_H.
44370         * lib/af_alg.c: Likewise.
44372 2018-05-06  Bruno Haible  <bruno@clisp.org>
44374         Followup to 'af_alg: New module.'.
44375         * modules/crypto/md5 (Depends-on): Remove sys_socket, sys_stat.
44376         * modules/crypto/sha1 (Depends-on): Likewise.
44377         * modules/crypto/sha256 (Depends-on): Likewise.
44378         * modules/crypto/sha512 (Depends-on): Likewise.
44380 2018-05-05  Paul Eggert  <eggert@cs.ucla.edu>
44382         crypto/{md5,sha1,sha256,sha512}: simplify
44383         * lib/md5.c (md5_stream):
44384         * lib/sha1.c (sha1_stream):
44385         * lib/sha256.c (shaxxx_stream):
44386         Simplify, partly by assuming C99.
44387         * lib/sha256.c (shaxxx_stream):
44388         New function, which implements both sha256 and sha224.
44389         Simplify, partly by assuming C99.
44390         (sha256_stream, sha224_stream):
44391         Use it to avoid code duplication, removing a FIXME.
44392         * lib/sha512.c (shaxxx_stream, sha512_stream, sha384_stream):
44393         Likewise.
44395         af_alg: Improve comments.
44396         * lib/af_alg.h: Use imperatives and tighten up wording.
44398 2018-05-05  Bruno Haible  <bruno@clisp.org>
44400         af_alg: Improve comments.
44401         * lib/af_alg.c (afalg_stream): Improve comment about kernel bug.
44403 2018-05-05  Bruno Haible  <bruno@clisp.org>
44405         af_alg: New module.
44406         * lib/af_alg.h: Test HAVE_* macro through '#if', not '#ifdef'.
44407         * lib/af_alg.c: Include "af_alg.h" before the other header files.
44408         * lib/md5.c: Include "af_alg.h" unconditionally.
44409         (md5_stream): Invoke afalg_stream unconditionally.
44410         * lib/sha1.c: Include "af_alg.h" unconditionally.
44411         (sha1_stream): Invoke afalg_stream unconditionally.
44412         * lib/sha256.c: Include "af_alg.h" unconditionally.
44413         (sha256_stream, sha224_stream): Invoke afalg_stream unconditionally.
44414         * lib/sha512.c: Include "af_alg.h" unconditionally.
44415         (sha512_stream, sha384_stream): Invoke afalg_stream unconditionally.
44416         * m4/af_alg.m4: Renamed from m4/linux-if-alg.m4.
44417         (gl_AF_ALG): Renamed from gl_LINUX_IF_ALG_H.
44418         * modules/crypto/af_alg: New file.
44419         * modules/crypto/md5 (Files): Remove files that are now in the
44420         'crypto/af_alg' module.
44421         (Depends-on): Add crypto/af_alg.
44422         (configure.ac): Remove gl_LINUX_IF_ALG_H invocation.
44423         (Makefile.am): Don't mention af_alg.c here.
44424         * modules/crypto/sha1 (Files): Remove files that are now in the
44425         'crypto/af_alg' module.
44426         (Depends-on): Add crypto/af_alg.
44427         (configure.ac): Remove gl_LINUX_IF_ALG_H invocation.
44428         (Makefile.am): Don't mention af_alg.c here.
44429         * modules/crypto/sha256 (Files): Remove files that are now in the
44430         'crypto/af_alg' module.
44431         (Depends-on): Add crypto/af_alg.
44432         (configure.ac): Remove gl_LINUX_IF_ALG_H invocation.
44433         (Makefile.am): Don't mention af_alg.c here.
44434         * modules/crypto/sha512 (Files): Remove files that are now in the
44435         'crypto/af_alg' module.
44436         (Depends-on): Add crypto/af_alg.
44437         (configure.ac): Remove gl_LINUX_IF_ALG_H invocation.
44438         (Makefile.am): Don't mention af_alg.c here.
44440 2018-05-05  Paul Eggert  <eggert@cs.ucla.edu>
44442         crypto tests: pacify GCC
44443         * tests/test-digest.h (test_digest_on_files):
44444         Don’t assume digest size fits in int (!).
44446         af_alg: minor style improvements
44447         * lib/af_alg.c (afalg_stream): Prefer C99 style
44448         decl-after-statement, since we’re already assuming C99.  Clarify
44449         by strengthening the bind test and omit unnecessary assignment.
44451 2018-05-05  Bruno Haible  <bruno@clisp.org>
44453         af_alg: Fix bug on empty files.
44454         * lib/af_alg.c (afalg_stream): Ignore the kernel's result if the input
44455         stream is empty.
44457 2018-05-05  Paul Eggert  <eggert@cs.ucla.edu>
44459         sys-limits.h: new file for crypto and safe I/O
44460         * lib/af_alg.c: Include sys-limits.h.
44461         (MAX_RW_COUNT): Remove.  Use replaced by SYS_BUFSIZE_MAX.
44462         (afalg_stream): Also reject negative sizes for sendfile; they
44463         should not happen and the code is a bit cleaner and faster this way.
44464         * lib/safe-read.c: Include sys-limits.h.
44465         (BUGGY_READ_MAXIMUM): Remove.  All uses replaced by SYS_BUFSIZE_MAX.
44466         * lib/sys-limits.h: New file, with values and commentary derived
44467         from the old safe-read.c and from GNU Emacs sysdep.c.
44468         * modules/crypto/md5, modules/crypto/sha1, modules/crypto/sha256:
44469         * modules/crypto/sha512, modules/safe-read, modules/safe-write:
44470         Add lib/sys-limits.h to Files section.
44472 2018-05-05  Bruno Haible  <bruno@clisp.org>
44474         af_alg: Improve function signature.
44475         * lib/af_alg.h (afalg_stream): Swap second and third argument.
44476         * lib/af_alg.c (afalg_stream): Likewise.
44477         * lib/md5.c, lib/sha1.c, lib/sha256.c, lib/sha512.c: Callers changed.
44479 2018-05-05  Bruno Haible  <bruno@clisp.org>
44481         crypto/{md5,sha1,sha256,sha512}: Fix compilation error (S_TYPEISTMO).
44482         * modules/crypto/md5 (Depends-on): Add 'sys_stat'.
44483         * modules/crypto/sha1 (Depends-on): Likewise.
44484         * modules/crypto/sha256 (Depends-on): Likewise.
44485         * modules/crypto/sha512 (Depends-on): Likewise.
44487 2018-05-05  Bruno Haible  <bruno@clisp.org>
44489         crypto/{md5,sha1,sha256,sha512}: Fix module description.
44490         * modules/crypto/md5 (Depends-on): Add 'sys_socket'.
44491         * modules/crypto/sha1 (Depends-on): Likewise.
44492         * modules/crypto/sha256 (Depends-on): Likewise.
44493         * modules/crypto/sha512 (Depends-on): Likewise.
44495 2018-05-05  Bruno Haible  <bruno@clisp.org>
44497         af_alg: Add documentation.
44498         * lib/af_alg.h: Add comments.
44500 2018-05-05  Bruno Haible  <bruno@clisp.org>
44502         sha512: Add tests.
44503         * tests/test-sha512.c: New file.
44504         * modules/crypto/sha512-tests: New file.
44506 2018-05-05  Bruno Haible  <bruno@clisp.org>
44508         sha256: Add tests.
44509         * tests/test-sha256.c: New file.
44510         * modules/crypto/sha256-tests: New file.
44512 2018-05-05  Bruno Haible  <bruno@clisp.org>
44514         sha1 tests: Add test for sha1_stream.
44515         * tests/test-sha1.c: Include test-digest.h.
44516         (main): Invoke test_digest_on_files on 'sha1_stream'.
44517         * modules/crypto/sha1-tests (Files): Add tests/test-digest.h.
44519 2018-05-05  Bruno Haible  <bruno@clisp.org>
44521         md5 tests: Add test for md5_stream.
44522         * tests/test-digest.h: New file.
44523         * tests/test-md5.c: Include test-digest.h.
44524         (main): Invoke test_digest_on_files on 'md5_stream'.
44525         * modules/crypto/md5-tests (Files): Add tests/test-digest.h.
44527 2018-04-28  Matteo Croce  <mcroce@redhat.com>
44529         md5sum: Use AF_ALG when available.
44530         * lib/md5.c: Include af_alg.h.
44531         (md5_stream): Use afalg_stream when available.
44532         * modules/crypto/md5 (Files): Add the af_alg files.
44533         (configure.ac): Invoke gl_LINUX_IF_ALG_H.
44534         (Makefile.am): Add af_alg.c.
44536 2018-04-28  Matteo Croce  <mcroce@redhat.com>
44538         sha512sum: Use AF_ALG when available.
44539         * lib/sha512.c: Include af_alg.h.
44540         (sha512_stream, sha384_stream): Use afalg_stream when available.
44541         * modules/crypto/sha512 (Files): Add the af_alg files.
44542         (configure.ac): Invoke gl_LINUX_IF_ALG_H.
44543         (Makefile.am): Add af_alg.c.
44545 2018-04-28  Matteo Croce  <mcroce@redhat.com>
44547         sha256sum: Use AF_ALG when available.
44548         * lib/sha256.c: Include af_alg.h.
44549         (sha256_stream, sha224_stream): Use afalg_stream when available.
44550         * modules/crypto/sha256 (Files): Add the af_alg files.
44551         (configure.ac): Invoke gl_LINUX_IF_ALG_H.
44552         (Makefile.am): Add af_alg.c.
44554 2018-04-28  Matteo Croce  <mcroce@redhat.com>
44556         sha1sum: Use AF_ALG when available.
44557         * lib/af_alg.h: New file.
44558         * lib/af_alg.c: New file.
44559         * lib/sha1.c: Include af_alg.h.
44560         (sha1_stream): Use afalg_stream when available.
44561         * m4/linux-if-alg.m4: New file.
44562         * modules/crypto/sha1 (Files): Add the new files.
44563         (configure.ac): Invoke gl_LINUX_IF_ALG_H.
44564         (Makefile.am): Add af_alg.c.
44566 2018-05-05  Bruno Haible  <bruno@clisp.org>
44568         all: Replace more http URLs by https URLs.
44569         * lib/localename.c: Use https: URL.
44570         * lib/timespec.h: Likewise.
44572 2018-05-03  Paul Eggert  <eggert@cs.ucla.edu>
44574         maint: port more modules to GCC 8
44575         * lib/dirname.h (base_name):
44576         * lib/exclude.h (new_exclude):
44577         * lib/xstrndup.h (xstrndup):
44578         Add malloc attribute.
44579         * lib/readutmp.c: Pacify GCC 8 about safe use of strncpy.
44580         * lib/sig-handler.h (get_handler) [SA_SIGINFO]: Simplify.
44581         This pacifies GCC 8.
44582         * m4/gnulib-common.m4 (gl_COMMON_BODY):
44583         Define _GL_ATTRIBUTE_MALLOC here.  All other definitions removed.
44585 2018-05-03  Bruno Haible  <bruno@clisp.org>
44587         Simplify code. Drop support for Borland C++ on Windows.
44588         Reported by Gisle Vanem <gisle.vanem@gmail.com>.
44589         * lib/accept4.c: Simplify 'defined _WIN32 || defined __WIN32__' to just
44590         'defined _WIN32'.
44591         * lib/canonicalize-lgpl.c: Likewise.
44592         * lib/classpath.c: Likewise.
44593         * lib/clean-temp.c: Likewise.
44594         * lib/csharpexec.c: Likewise.
44595         * lib/ctime.c: Likewise.
44596         * lib/dosname.h: Likewise.
44597         * lib/dup2.c: Likewise.
44598         * lib/errno.in.h: Likewise.
44599         * lib/error.c: Likewise.
44600         * lib/euidaccess.c: Likewise.
44601         * lib/execute.c: Likewise.
44602         * lib/fcntl.in.h: Likewise.
44603         * lib/fcntl.c: Likewise.
44604         * lib/filename.h: Likewise.
44605         * lib/findprog.c: Likewise.
44606         * lib/flock.c: Likewise.
44607         * lib/fopen.c: Likewise.
44608         * lib/freopen.c: Likewise.
44609         * lib/fstat.c: Likewise.
44610         * lib/fsync.c: Likewise.
44611         * lib/gc-gnulib.c: Likewise.
44612         * lib/get-rusage-data.c: Likewise.
44613         * lib/getaddrinfo.c: Likewise.
44614         * lib/getdelim.c: Likewise.
44615         * lib/getdtablesize.c: Likewise.
44616         * lib/gethostname.c: Likewise.
44617         * lib/getlogin.c: Likewise.
44618         * lib/getlogin_r.c: Likewise.
44619         * lib/getopt.c: Likewise.
44620         * lib/getpagesize.c: Likewise.
44621         * lib/getpass.c: Likewise.
44622         * lib/getrusage.c: Likewise.
44623         * lib/gettimeofday.c: Likewise.
44624         * lib/glob.c: Likewise.
44625         * lib/inttypes.in.h: Likewise.
44626         * lib/isapipe.c: Likewise.
44627         * lib/javaexec.c: Likewise.
44628         * lib/link.c: Likewise.
44629         * lib/localcharset.c: Likewise.
44630         * lib/localename.h: Likewise.
44631         * lib/localename.c: Likewise.
44632         * lib/localtime.c: Likewise.
44633         * lib/lseek.c: Likewise.
44634         * lib/mbsinit.c: Likewise.
44635         * lib/mkdir.c: Likewise.
44636         * lib/msvc-nothrow.h: Likewise.
44637         * lib/nanosleep.c: Likewise.
44638         * lib/nl_langinfo.c: Likewise.
44639         * lib/nonblocking.c: Likewise.
44640         * lib/nproc.c: Likewise.
44641         * lib/open.c: Likewise.
44642         * lib/openpty.c: Likewise.
44643         * lib/pathmax.h: Likewise.
44644         * lib/pipe-filter-aux.c: Likewise.
44645         * lib/pipe-filter-gi.c: Likewise.
44646         * lib/pipe-filter-ii.c: Likewise.
44647         * lib/pipe.c: Likewise.
44648         * lib/pipe2.c: Likewise.
44649         * lib/poll.c: Likewise.
44650         * lib/popen.c: Likewise.
44651         * lib/posix_openpt.c: Likewise.
44652         * lib/printf-parse.c: Likewise.
44653         * lib/progreloc.c: Likewise.
44654         * lib/putenv.c: Likewise.
44655         * lib/read.c: Likewise.
44656         * lib/relocatable.c: Likewise.
44657         * lib/rename.c: Likewise.
44658         * lib/same-inode.h: Likewise.
44659         * lib/secure_getenv.c: Likewise.
44660         * lib/select.c: Likewise.
44661         * lib/sethostname.c: Likewise.
44662         * lib/setlocale.c: Likewise.
44663         * lib/sigaction.c: Likewise.
44664         * lib/sigprocmask.c: Likewise.
44665         * lib/sleep.c: Likewise.
44666         * lib/spawn-pipe.h: Likewise.
44667         * lib/spawn-pipe.c: Likewise.
44668         * lib/spawni.c: Likewise.
44669         * lib/stat-time.h: Likewise.
44670         * lib/stat-w32.c: Likewise.
44671         * lib/stat.c: Likewise.
44672         * lib/stdio.in.h: Likewise.
44673         * lib/stdio-impl.h: Likewise.
44674         * lib/stdio-read.c: Likewise.
44675         * lib/stdio-write.c: Likewise.
44676         * lib/stdlib.in.h: Likewise.
44677         * lib/strerror_r.c: Likewise.
44678         * lib/strftime-fixes.c: Likewise.
44679         * lib/sys_stat.in.h: Likewise.
44680         * lib/sys_types.in.h: Likewise.
44681         * lib/sys_wait.in.h : Likewise.
44682         * lib/system-quote.h: Likewise.
44683         * lib/system-quote.c: Likewise.
44684         * lib/tmpdir.c: Likewise.
44685         * lib/tzset.c: Likewise.
44686         * lib/uname.c: Likewise.
44687         * lib/unistd.in.h: Likewise.
44688         * lib/utime.in.h: Likewise.
44689         * lib/utime.c: Likewise.
44690         * lib/utimecmp.c: Likewise.
44691         * lib/utimens.c: Likewise.
44692         * lib/vasnprintf.c: Likewise.
44693         * lib/vma-iter.h: Likewise.
44694         * lib/vma-iter.c: Likewise.
44695         * lib/wait-process.c: Likewise.
44696         * lib/wcsftime.c: Likewise.
44697         * lib/wctype.in.h: Likewise.
44698         * lib/write.c: Likewise.
44699         * tests/nap.h: Likewise.
44700         * tests/test-cloexec.c: Likewise.
44701         * tests/test-dup-safer.c: Likewise.
44702         * tests/test-dup2.c: Likewise.
44703         * tests/test-dup3.c: Likewise.
44704         * tests/test-fcntl.c: Likewise.
44705         * tests/test-get-rusage-data.c: Likewise.
44706         * tests/test-getaddrinfo.c: Likewise.
44707         * tests/test-getlogin.h: Likewise.
44708         * tests/test-isatty.c: Likewise.
44709         * tests/test-localename.c: Likewise.
44710         * tests/test-mbrtowc-w32.c: Likewise.
44711         * tests/test-nonblocking.c: Likewise.
44712         * tests/test-nonblocking-pipe-main.c: Likewise.
44713         * tests/test-nonblocking-socket-main.c: Likewise.
44714         * tests/test-nonblocking-socket.h: Likewise.
44715         * tests/test-pipe.c: Likewise.
44716         * tests/test-pipe2.c: Likewise.
44717         * tests/test-poll.c: Likewise.
44718         * tests/test-pthread_sigmask1.c: Likewise.
44719         * tests/test-select.h: Likewise.
44720         * tests/test-sethostname2.c: Likewise.
44721         * tests/test-sigprocmask.c: Likewise.
44722         * tests/test-spawn-pipe-child.c: Likewise.
44723         * tests/test-stat-time.c: Likewise.
44724         * tests/test-system-quote-main.c: Likewise.
44725         * tests/test-utimens-common.h: Likewise.
44726         * tests/test-wcrtomb-w32.c: Likewise.
44727         * m4/csharpexec.m4 (gt_CSHARPEXEC): Likewise.
44728         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Likewise.
44729         * m4/javacomp.m4 (gt_JAVACOMP): Likewise.
44730         * m4/javaexec.m4 (gt_JAVAEXEC): Likewise.
44731         * m4/locale-ar.m4 (gt_LOCALE_AR): Likewise.
44732         * m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): Likewise.
44733         * m4/locale-ja.m4 (gt_LOCALE_JA): Likewise.
44734         * m4/locale-tr.m4 (gt_LOCALE_TR_UTF8): Likewise.
44735         * m4/locale-zh.m4 (gt_LOCALE_ZH_CN): Likewise.
44736         * m4/malloc.m4 (gl_CHECK_MALLOC_POSIX): Likewise.
44737         * m4/nocrash.m4 (GL_NOCRASH): Likewise.
44738         * m4/pathmax.m4 (gl_PATHMAX_SNIPPET): Likewise.
44739         * m4/ptsname_r.m4 (gl_PREREQ_PTSNAME_R): Likewise.
44740         * m4/stdio_h.m4 (gl_STDIO_H): Likewise.
44741         * m4/tmpfile.m4 (gl_FUNC_TMPFILE): Likewise.
44742         * m4/unistd_h.m4 (gl_UNISTD_H): Likewise.
44744 2018-05-02  Bruno Haible  <bruno@clisp.org>
44746         localename: Fix test failures on mingw.
44747         * lib/localename.c (gl_locale_name_thread): Remove code specific to
44748         native Windows.
44749         (gl_locale_name_posix): Move code specific to native Windows here.
44750         * tests/test-localename.c (test_locale_name, test_locale_name_posix):
44751         Accept result without charset suffix, as it appears on mingw.
44753 2018-04-28  Paul Smith  <psmith@gnu.org>
44755         bootstrap: Avoid gnulib operations if not needed
44756         * build-aux/bootstrap: Remove unused variable gnulib_mk.
44757         Set $gnulib_extra_files early so it can be overridden in .conf.
44758         Remove redundant --import flag from $gnulib_tool_options.
44759         Set $use_gnulib to false if no gnulib modules or files are needed.
44760         If $use_gnulib is false, don't do anything related to gnulib.
44761         A lot of this is just whitespace (indentation) changes.
44763 2018-04-27  Paul Eggert  <eggert@cs.ucla.edu>
44765         manywarnings: port to GCC 8.0
44766         * build-aux/gcc-warning.spec: Add -Wcatch-value,
44767         -Wclass-memaccess, -Wdo-subscript, -Wextra-semi.  Adjust to the
44768         fact that the GCC help message now mentions operands for
44769         -Warray-bounds, -Wformat, -Wformat-overflow, -Wformat-truncation,
44770         -Wimplicit-fallthrough, -Wplacement-new, -Wshift-overflow,
44771         -Wstrict-aliasing, -Wstrict-overflow, -Wstringop-overflow,
44772         and -Wunused-const-variable.
44773         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Add -Wattribute-alias,
44774         -Wcast-align=strict, -Wcast-function-type, -Wif-not-aligned,
44775         -Wmissing-attributes, -Wmultistatement-macros,
44776         -Wpacked-not-aligned, -Wsizeof-pointer-div, -Wstringop-truncation,
44777         -Wsuggest-attribute=cold, -Wsuggest-attribute=malloc.
44779 2018-04-24  Bruno Haible  <bruno@clisp.org>
44781         sys_socket: Make SO_REUSEPORT available across platforms.
44782         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
44783         * lib/sys_socket.in.h (SO_REUSEPORT): New macro.
44784         * doc/posix-headers/sys_socket.texi: Mention the issue.
44785         * tests/test-poll.c (SO_REUSEPORT): Remove.
44786         * tests/test-select.h: Include <sys/socket.h>.
44787         (SO_REUSEPORT): Remove.
44788         * modules/select-tests (Depends-on): Add 'sys_socket'.
44790 2018-04-21  Benno Schulenberg  <bensberg@telfort.nl>  (tiny change)
44792         localcharset: short-circuit the search for an alias on a Mac
44793         * lib/localcharset.c (get_charset_aliases): Add a tautological
44794         UTF-8 entry to speed up the search for this case.
44795         Most machines default to a UTF-8 locale nowadays, so begin the
44796         list of aliases with a dummy UTF-8 entry so it will be found
44797         immediately and a time-consuming search through the rest of
44798         the list is avoided.
44800 2018-04-11  Paul Eggert  <eggert@cs.ucla.edu>
44802         fts: add comment
44803         * lib/fts.c (fts_build): Explain why ==, not >.
44804         See remark by Bernhard Voelker in:
44805         https://lists.gnu.org/r/bug-gnulib/2018-04/msg00041.html
44807         fts: fix bug in find across filesystems
44808         This fixes a bug I introduced last summer.
44809         Problem reported by Kamil Dudka in:
44810         https://lists.gnu.org/r/bug-gnulib/2018-04/msg00033.html
44811         * lib/fts.c (filesystem_type, dirent_inode_sort_may_be_useful)
44812         (leaf_optimization):
44813         New arg for file descriptor.  All callers changed.
44814         (fts_build): Check for whether inodes should be sorted
44815         before closing the directory.
44817 2018-04-07  Bruno Haible  <bruno@clisp.org>
44819         unicase/u*-context: Fix link errors with libunistring <= 0.9.9.
44820         Reported by Genki Sky <sky@genki.is>.
44821         * modules/unicase/u8-prefix-context (configure.ac): Require libunistring
44822         version 0.9.10 or newer.
44823         * modules/unicase/u8-suffix-context (configure.ac): Likewise.
44824         * modules/unicase/u16-prefix-context (configure.ac): Likewise.
44825         * modules/unicase/u16-suffix-context (configure.ac): Likewise.
44826         * modules/unicase/u32-prefix-context (configure.ac): Likewise.
44827         * modules/unicase/u32-suffix-context (configure.ac): Likewise.
44829 2018-04-07  Bruno Haible  <bruno@clisp.org>
44831         execute: Update comment.
44832         * lib/execute.h (execute): Refer to spawn-pipe.h, not pipe.h.
44834 2018-04-05  Paul Eggert  <eggert@cs.ucla.edu>
44836         fts: treat CIFS like NFS
44837         Problem reported by Kamil Dudka in:
44838         https://lists.gnu.org/r/bug-gnulib/2018-04/msg00015.html
44839         * lib/fts.c (S_MAGIC_CIFS): New macro.
44840         (dirent_inode_sort_may_be_useful, leaf_optimization):
44841         Treat CIFS like NFS.
44843 2018-03-28  Bruno Haible  <bruno@clisp.org>
44845         c-stack: Fix possible build failure on some platforms.
44846         * lib/c-stack.c (die): Define whenever this function is referenced.
44848 2018-03-28  Paul Eggert  <eggert@cs.ucla.edu>
44850         time_rz: fix workaround for Mac OS X 10.6 infloop
44851         Problems reported by Charles A. Roelli (Bug#27736#117).
44852         * m4/time_rz.m4 (gl_TIME_RZ): Use a slightly different timestamp.
44853         Also, discard output, which clutters the 'configure' log.
44855 2018-03-27  Paul Eggert  <eggert@cs.ucla.edu>
44857         havelib: port to Solaris 10 /bin/sh
44858         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Use 'test ! EXPR'
44859         instead of '! test EXPR'.
44861 2018-03-26  Paul Eggert  <eggert@cs.ucla.edu>
44863         time_rz: work around Mac OS X 10.6 infloop
44864         * doc/posix-functions/localtime.texi:
44865         * doc/posix-functions/localtime_r.texi: Mention the bug.
44866         * lib/time_rz.c (localtime_rz): Work around the bug.  It’d be
44867         better to fix localtime and localtime_r instead, but that would be
44868         more work and is not needed to fix the Emacs problem.
44869         * m4/time_rz.m4 (gl_TIME_RZ): Detect the bug.
44871 2018-03-24  Jim Meyering  <meyering@fb.com>
44873         test-version-etc.sh: don't use diff directly: use init.sh's compare
44874         We'd rather not sacrifice readable "diff -u" output even for
44875         "diff -c" output (not supported by busybox) or for even less
44876         readable ed-style "diff" output.  So use init.sh's compare function
44877         * tests/test-version-etc.sh: Source init.sh and add "." to path.
44878         Remove "./" from invocation of test-version-etc, so we use path.
44879         And s/diff/compare/.
44880         * modules/version-etc-tests (Depends-on): Add test-framework-sh,
44881         to get init.sh.
44882         Prompted by Eric Blake's comments in
44883         https://lists.gnu.org/r/sed-devel/2018-03/msg00015.html
44885 2018-03-24  Bruno Haible  <bruno@clisp.org>
44887         javacomp-script, javacomp: Add support for Java 10.
44888         * m4/javacomp.m4 (gt_JAVACOMP): Accept source-version 10 and
44889         target-version 10.
44890         * lib/javaversion.h: Update comments.
44891         * lib/javacomp.c (default_target_version, SOURCE_VERSION_BOUND,
44892         source_version_index, get_goodcode_snippet, get_failcode_snippet,
44893         TARGET_VERSION_BOUND, target_version_index,
44894         corresponding_classfile_version): Accept source_version 10 and
44895         target_version 10.
44896         * lib/javacomp.h: Update comments accordingly.
44898 2018-03-24  Bruno Haible  <bruno@clisp.org>
44900         javacomp-script, javacomp: Update comments.
44901         * m4/javacomp.m4: Update comments regarding gcj.
44902         * lib/javacomp.h: Likewise.
44904 2018-03-24  Bruno Haible  <bruno@clisp.org>
44906         javacomp-script, javacomp: Fix support for Java 7, 8, 9.
44907         * lib/javaversion.h: Update comments.
44908         * lib/javacomp.h: Likewise.
44909         * lib/javacomp.c (default_target_version, source_version_index,
44910         get_goodcode_snippet, get_failcode_snippet): Recognize "9" instead of
44911         "1.9".
44912         (TARGET_VERSION_BOUND): Bump to 9.
44913         (target_version_index, corresponding_classfile_version): Recognize "9"
44914         instead of "1.9".
44915         (get_source_version_for_javac): New function.
44916         (is_envjavac_nongcj_usable, is_javac_usable): Add
44917         source_version_for_javac argument.
44918         (compile_java_class): Determine and pass source_version_for_javac.
44919         * m4/javacomp.m4: Recognize version '9' instead of '1.9'. When invoking
44920         $JAVAC or javac, pass '-source 1.6' instead of '-source 1.5' when
44921         appropriate.
44923 2018-03-23  Jim Meyering  <meyering@fb.com>
44925         test-version-etc.sh: port to diff without -c
44926         * tests/test-version-etc.sh: Don't use diff's -c option.
44927         This caused spurious test failure on Alpine Linux, which
44928         uses busybox's diff. Reported by Assaf Gordon in
44929         https://lists.gnu.org/r/sed-devel/2018-03/msg00013.html
44931 2018-03-23  Paul Eggert  <eggert@cs.ucla.edu>
44933         c-stack: port to recent GCC build
44934         Problem reported by The Fireplace (Bug#30913).
44935         * lib/c-stack.c (die): Define only if used.
44937 2018-03-20  Bruno Haible  <bruno@clisp.org>
44939         euidaccess: Port to native Windows.
44940         * lib/euidaccess.c (euidaccess): On native Windows, just use _access().
44941         * posix-modules (exclude_for_mingw): Remove 'euidaccess'.
44943 2018-03-19  Bruno Haible  <bruno@clisp.org>
44945         javacomp: Add support for Java 7, 8, 9.
44946         * lib/javacomp.c (default_target_version, SOURCE_VERSION_BOUND,
44947         source_version_index, get_goodcode_snippet, get_failcode_snippet,
44948         corresponding_classfile_version): Accept source_version 1,7, 1.8, 1.9
44949         and target_version 1,7, 1.8, 1.9.
44950         * lib/javacomp.h: Update comments accordingly.
44952 2018-03-19  Bruno Haible  <bruno@clisp.org>
44954         javacomp-script: Add support for Java 9.
44955         * m4/javacomp.m4 (gt_JAVACOMP): Accept source-version 1.9 and
44956         target-version 1.9.
44958 2018-03-16  Bruno Haible  <bruno@clisp.org>
44960         glob: Don't compile replacements on recent glibc systems.
44961         * lib/glob.in.h: Use the usual idiom for the double-inclusion guard. If
44962         REPLACE_GLOB is 0, include the system's <glob.h> and use
44963         _GL_CXXALIAS_SYS.
44964         * m4/glob.m4 (gl_GLOB): Set REPLACE_GLOB instead of GLOB_H. Accept
44965         _GNU_GLOB_INTERFACE_VERSION 2 as well. Delete the file conf$$-globtest
44966         inside the AC_RUN_IFELSE block. Remove GL_GENERATE_GLOB_H conditional.
44967         * modules/glob (Dependencies): Test REPLACE_GLOB instead of GLOB_H.
44968         Remove snippet/warn-on-use.
44969         (configure.ac): Test REPLACE_GLOB instead of GLOB_H.
44970         (Makefile.am): Create glob.h always. Update list of substitutions in
44971         glob.h. Don't depend on $(WARN_ON_USE_H).
44973 2018-03-16  Bruno Haible  <bruno@clisp.org>
44975         glob: Fix link error on native Windows.
44976         * modules/glob (Depends-on): Add 'lstat'.
44978 2018-03-15  Bruno Haible  <bruno@clisp.org>
44980         glob: Fix compilation error in C++ mode.
44981         * lib/glob.in.h (_Restrict_): Define, like in regex.h and spawn.in.h.
44983 2018-03-15  Bruno Haible  <bruno@clisp.org>
44985         host-cpu-c-abi: Support for RISC-V CPU.
44986         * m4/host-cpu-c-abi.m4 (gl_HOST_CPU_C_ABI): Recognize the various
44987         riscv32 and riscv64 ABIs.
44988         References:
44989         https://github.com/riscv/riscv-toolchain-conventions
44990         https://gcc.gnu.org/onlinedocs/gcc-7.3.0/gcc/RISC-V-Options.html
44991         https://gnu-mcu-eclipse.github.io/toolchain/riscv/
44993 2018-03-08  Paul Eggert  <eggert@cs.ucla.edu>
44995         fflush: be more paranoid about libio.h change
44996         Suggested by Eli Zaretskii in:
44997         https://lists.gnu.org/r/emacs-devel/2018-03/msg00270.html
44998         * lib/fbufmode.c (fbufmode):
44999         * lib/fflush.c (clear_ungetc_buffer_preserving_position)
45000         (disable_seek_optimization, rpl_fflush):
45001         * lib/fpending.c (__fpending):
45002         * lib/fpurge.c (fpurge):
45003         * lib/freadable.c (freadable):
45004         * lib/freadahead.c (freadahead):
45005         * lib/freading.c (freading):
45006         * lib/freadptr.c (freadptr):
45007         * lib/freadseek.c (freadptrinc):
45008         * lib/fseeko.c (fseeko):
45009         * lib/fseterr.c (fseterr):
45010         * lib/fwritable.c (fwritable):
45011         * lib/fwriting.c (fwriting):
45012         Look at _IO_ftrylockfile as well as at _IO_EOF_SEEN.
45014 2018-03-07  Paul Eggert  <eggert@cs.ucla.edu>
45016         maint: write-file-hooks -> before-save-hook
45017         write-file-hooks is obsolete since Emacs 22.1 (released June 2007) and
45018         it's time to use the recommended replacement.
45019         Problem reported by Glenn Morris in:
45020         https://lists.gnu.org/r/bug-gnulib/2018-03/msg00008.html
45021         * build-aux/announce-gen, build-aux/bootstrap:
45022         * build-aux/do-release-commit-and-tag, build-aux/gendocs.sh:
45023         * build-aux/git-version-gen, build-aux/gitlog-to-changelog:
45024         * build-aux/gnu-web-doc-update, build-aux/gnupload:
45025         * build-aux/move-if-change, build-aux/prefix-gnulib-mk:
45026         * build-aux/update-copyright, build-aux/useless-if-before-free:
45027         * build-aux/vc-list-files:
45028         Update hook usage for files where Gnulib is the canonical source.
45030 2018-03-05  Paul Eggert  <eggert@cs.ucla.edu>
45032         binary-io: pacify gcc -Wunused-parameter
45033         Problem reported by Reuben Thomas in:
45034         https://lists.gnu.org/r/bug-gnulib/2018-03/msg00005.html
45035         * lib/binary-io.h (__gl_setmode, __gl_setmode_check):
45036         Use _GL_UNUSED where appropriate.
45038         fflush: adjust to glibc 2.28 libio.h removal
45039         Problem reported by Daniel P. Berrangé in:
45040         https://lists.gnu.org/r/bug-gnulib/2018-03/msg00000.html
45041         * lib/fbufmode.c (fbufmode):
45042         * lib/fflush.c (clear_ungetc_buffer_preserving_position)
45043         (disable_seek_optimization, rpl_fflush):
45044         * lib/fpending.c (__fpending):
45045         * lib/fpurge.c (fpurge):
45046         * lib/freadable.c (freadable):
45047         * lib/freadahead.c (freadahead):
45048         * lib/freading.c (freading):
45049         * lib/freadptr.c (freadptr):
45050         * lib/freadseek.c (freadptrinc):
45051         * lib/fseeko.c (fseeko):
45052         * lib/fseterr.c (fseterr):
45053         * lib/fwritable.c (fwritable):
45054         * lib/fwriting.c (fwriting):
45055         Check _IO_EOF_SEEN instead of _IO_ftrylockfile.
45056         * lib/stdio-impl.h (_IO_IN_BACKUP) [_IO_EOF_SEEN]:
45057         Define if not already defined.
45059 2018-02-27  Paul Eggert  <eggert@cs.ucla.edu>
45061         environ: fix link error on 32-bit Cygwin
45062         Problem reported for GNU Emacs by Ken Brown in:
45063         https://lists.gnu.org/r/emacs-devel/2018-02/msg00765.html
45064         * lib/unistd.in.h (environ) [__i386__]: Do not redeclare.
45066 2018-02-24  Bruno Haible  <bruno@clisp.org>
45068         mbrtowc tests: Fix regression on glibc.
45069         Reported by Bernhard Voelker.
45070         * tests/test-mbrtowc.c (main): Fix expected value of wc.
45072 2018-02-24  Bruno Haible  <bruno@clisp.org>
45074         striconveha, uniconv/*: Avoid test failures on musl libc.
45075         * tests/iconvsupport.c: New file.
45076         * tests/test-striconveha.c (main): Skip autodetect_jp tests if iconv()
45077         does not support the ISO-2022-JP-2 encoding.
45078         * tests/uniconv/test-u8-conv-from-enc.c (main): Likewise.
45079         * tests/uniconv/test-u8-strconv-from-enc.c (main): Likewise.
45080         * tests/uniconv/test-u16-conv-from-enc.c (main): Likewise.
45081         * tests/uniconv/test-u16-strconv-from-enc.c (main): Likewise.
45082         * tests/uniconv/test-u32-conv-from-enc.c (main): Likewise.
45083         * tests/uniconv/test-u32-strconv-from-enc.c (main): Likewise.
45084         * modules/striconveha-tests (Files): Add tests/iconvsupport.c.
45085         (Makefile.am): Link test-striconveha with iconvsupport.o.
45086         * modules/uniconv/u8-conv-from-enc-tests (Files): Add
45087         tests/iconvsupport.c.
45088         (Makefile.am): Link test-u8-conv-from-enc with iconvsupport.o.
45089         * modules/uniconv/u8-strconv-from-enc-tests (Files): Add
45090         tests/iconvsupport.c.
45091         (Makefile.am): Link test-u8-strconv-from-enc with iconvsupport.o.
45092         * modules/uniconv/u16-conv-from-enc-tests (Files): Add
45093         tests/iconvsupport.c.
45094         (Makefile.am): Link test-u16-conv-from-enc with iconvsupport.o.
45095         * modules/uniconv/u16-strconv-from-enc-tests (Files): Add
45096         tests/iconvsupport.c.
45097         (Makefile.am): Link test-u16-strconv-from-enc with iconvsupport.o.
45098         * modules/uniconv/u32-conv-from-enc-tests (Files): Add
45099         tests/iconvsupport.c.
45100         (Makefile.am): Link test-u32-conv-from-enc with iconvsupport.o.
45101         * modules/uniconv/u32-strconv-from-enc-tests (Files): Add
45102         tests/iconvsupport.c.
45103         (Makefile.am): Link test-u32-strconv-from-enc with iconvsupport.o.
45105 2018-02-24  Bruno Haible  <bruno@clisp.org>
45107         localename: Add support for musl libc.
45108         * m4/localename.m4 (gl_LOCALENAME): Check for <langinfo.h>.
45109         * lib/localename.c (gl_locale_name_thread_unsafe): Use NL_LOCALE_NAME
45110         on Linux platforms which define NL_LOCALE_NAME.
45112 2018-02-24  Bruno Haible  <bruno@clisp.org>
45114         mbrtowc tests: Don't make assumptions about the charset the C locale.
45115         * tests/test-mbrtowc.c (main): For bytes >= 0x80, don't assume a
45116         particular mapping in the C locale.
45118 2018-02-24  Bruno Haible  <bruno@clisp.org>
45120         ptsname_r: Don't expect that this function sets errno.
45121         * tests/test-ptsname_r.c (test_errors): Don't test errno after return
45122         from ptsname_r().
45123         * doc/glibc-functions/ptsname_r.texi: Mention the issue.
45125 2018-02-23  Bruno Haible  <bruno@clisp.org>
45127         xmalloca: pacify gcc -Wbad-function-cast
45128         * lib/xmalloca.h (xmalloca): Insert intermediate cast here as well.
45130 2018-02-23  Paul Eggert  <eggert@cs.ucla.edu>
45132         nl_langinfo: pacify gcc -Wunused-function
45133         * lib/nl_langinfo.c (ctype_codeset): Do not define if
45134         REPLACE_NL_LANGINFO && !GNULIB_defined_CODESET, as it is unused in
45135         this case.  Without this change, I got a diagnostic when building
45136         coreutils on Fedora 27 with gcc 7.3.1 20180130.
45138         same: pacify gcc -Wunused-variable
45139         * lib/same.c (same_nameat) [!CHECK_TRUNCATION]:
45140         Omit unused variable.
45142         malloca: pacify gcc -Wbad-function-cast
45143         * lib/malloca.h (malloca): Pacify gcc -Wbad-function-cast
45144         diagnostic that I got on Fedora 27 with gcc 7.3.1 20180130.
45145         To pacify GCC, I had to cast alloca’s result to some type other
45146         than void * before casting that to uintptr_t.
45148 2018-02-20  Paul Eggert  <eggert@cs.ucla.edu>
45150         utimecmp: new function utimecmpat
45151         * lib/utimecmp.c: Include fcntl.h, sys/stat.h and dirname.h.
45152         Do not include utimens.h.
45153         (utimecmpat): New function, generalizing utimecmp.
45154         (utimecmp): Now a thin layer around utimecmpat.
45155         * modules/utimecmp (Depends-on): Depend on dirname-lgpl, fstatat,
45156         utimensat instead of on lstat and utimens.
45158         same: new function same_nameat
45159         * lib/same.c: Include fcntl.h.
45160         * lib/same.c (same_nameat): New function, generalizing same_name.
45161         (same_name): Now a thin layer around same_nameat.
45162         * m4/same.m4 (gl_SAME): Check for fpathconf, not pathconf.
45163         * modules/same (Depends-on): Depend on fstatat, openat.
45165 2018-02-18  Eric Gallager  <egall@gwmail.gwu.edu>  (tiny change)
45167         warnings: Add support for Objective C.
45168         * m4/warnings.m4 (gl_UNKNOWN_WARNINGS_ARE_ERRORS(Objective C)): New
45169         macro.
45171 2018-02-17  Bruno Haible  <bruno@clisp.org>
45173         lock: Fix test-once1 crash on FreeBSD11.
45174         * lib/glthread/lock.h: On FreeBSD, test the weak value of the symbol
45175         'pthread_create', not 'pthread_cancel'.
45177 2018-02-17  Bruno Haible  <bruno@clisp.org>
45179         lock: Add test of gl_once.
45180         * tests/test-once.c: New file.
45181         * modules/lock-tests (Files): Add it.
45182         (Makefile.am): Build and test programs 'test-once1' and 'test-once2'.
45184 2018-02-17  Bruno Haible  <bruno@clisp.org>
45186         thread: Fix compilation error on IRIX.
45187         * lib/glthread/thread.h: Include <unistd.h>. Include <signal.h> when
45188         needed; include it outside the C++ extern "C" {} block.
45189         * doc/posix-headers/pthread.texi: Mention the problem with
45190         pthread_atfork on IRIX.
45192 2018-02-04  Bruno Haible  <bruno@clisp.org>
45194         nl_langinfo: Override the system's nl_langinfo() when needed.
45195         Reported by Jim Meyering.
45196         * m4/nl_langinfo.m4 (gl_FUNC_NL_LANGINFO): Set REPLACE_NL_LANGINFO=1
45197         also when HAVE_LANGINFO_T_FMT_AMPM or HAVE_LANGINFO_ALTMON is 0.
45199 2018-02-04  Bruno Haible  <bruno@clisp.org>
45201         signal-h, monetary, strings: Fix build failure in some cases.
45202         Reported by Tim Rühsen <tim.ruehsen@gmx.de>.
45203         * modules/signal-h (Makefile.am): In the GNULIB_* substitutions, use '/'
45204         as delimiter in sed command, not '|'.
45205         * modules/monetary (Makefile.am): Likewise.
45206         * modules/strings (Makefile.am): Likewise.
45208 2018-02-03  Jim Meyering  <meyering@fb.com>
45210         maint.mk: exempt "/proc/filesystems" from "file system" syntax check
45211         * top/maint.mk (sc_file_system): Don't complain about
45212         "/proc/filesystems".
45214 2018-02-03  Bruno Haible  <bruno@clisp.org>
45216         stdlib: Fix compilation error on OpenIndiana.
45217         * lib/stdlib.in.h: Before including <sys/loadavg.h>, include
45218         <sys/time.h>.
45219         * m4/stdlib_h.m4 (gl_STDLIB_H): Likewise.
45220         * m4/getloadavg.m4 (gl_GETLOADAVG): Likewise.
45222 2018-02-03  Bruno Haible  <bruno@clisp.org>
45224         host-cpu-c-abi: Avoid use of 'grep -E' on OpenIndiana.
45225         * m4/asm-underscore.m4 (gl_ASM_SYMBOL_PREFIX): Require AC_PROG_EGREP,
45226         and use $EGREP instead of 'grep -E'.
45227         * m4/host-cpu-c-abi.m4 (gl_HOST_CPU_C_ABI): Use 'grep' instead of
45228         'grep -E'.
45230 2018-02-02  Paul Eggert  <eggert@cs.ucla.edu>
45232         malloca: Add a compile-time verification.
45233         * lib/malloca.c (small_t): Verify that it is wide enough.
45234         * modules/malloca (Depends-on): Add verify.
45236 2018-02-02  Bruno Haible  <bruno@clisp.org>
45238         malloca: Add an argument check.
45239         Suggested by Paul Eggert.
45240         * lib/malloca.c (freea): Check against an invalid argument.
45242 2018-02-02  Bruno Haible  <bruno@clisp.org>
45244         localename: Add support for OpenIndiana.
45245         * lib/localename.c (gl_locale_name_thread_unsafe): Add code for
45246         Solaris 11 variants with uselocale() but without getlocalename_l().
45248 2018-02-02  Bruno Haible  <bruno@clisp.org>
45250         malloca, xmalloca: Make multithread-safe.
45251         Reported by Florian Weimer <fweimer@redhat.com>.
45252         Implements an idea by Ondřej Bílka <neleai@seznam.cz>.
45253         * lib/malloca.h (malloca): In the stack allocation case, return a
45254         pointer that is a multiple of 2 * sa_alignment_max.
45255         (sa_increment): Remove enum item.
45256         * lib/xmalloca.h (xmalloca): In the stack allocation case, return
45257         a pointer that is a multiple of 2 * sa_alignment_max.
45258         * lib/malloca.c (NO_SANITIZE_MEMORY): Remove macro.
45259         (MAGIC_NUMBER, MAGIC_SIZE, preliminary_header, HEADER_SIZE, header,
45260         HASH_TABLE_SIZE, mmalloca_results): Remove.
45261         (small_t): New type.
45262         (mmalloca, free): Rewritten.
45263         * lib/malloca.valgrind: Remove file.
45264         * modules/malloca (Files): Remove it.
45265         (Depends-on): Remove verify.
45267 2018-01-31  Bruno Haible  <bruno@clisp.org>
45269         environ: Fix link error on 64-bit Cygwin.
45270         * lib/unistd.in.h (environ): On Cygwin, redeclare with the
45271         __declspec(dllimport) attribute.
45272         * doc/posix-functions/environ.texi: Mention the Cygwin problem.
45274 2018-01-30  Bruno Haible  <bruno@clisp.org>
45276         get-rusage-data: Add support for Minix 3.
45277         * lib/get-rusage-data.c (get_rusage_data): Return 0 on Minix.
45279 2018-01-30  Bruno Haible  <bruno@clisp.org>
45281         vma-iter: Add support for Minix 3.
45282         * lib/vma-iter.h (VMA_ITERATE_SUPPORTED): Define on Minix.
45283         * lib/vma-iter.c: On Minix, read /proc/<pid>/map.
45285 2018-01-27  Bruno Haible  <bruno@clisp.org>
45287         Fix malfunction of socket functions on HP-UX in 64-bit mode.
45288         * m4/socketlib.m4 (gl_SOCKETLIB): Add comment.
45289         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Define
45290         _HPUX_ALT_XOPEN_SOCKET_API.
45291         * modules/accept (Depends-on): Add 'extensions'.
45292         * modules/getpeername (Depends-on): Likewise.
45293         * modules/getsockname (Depends-on): Likewise.
45294         * modules/getsockopt (Depends-on): Likewise.
45295         * modules/recvfrom (Depends-on): Likewise.
45296         * doc/posix-functions/accept.texi: Mention the HP-UX socklen_t problem.
45297         * doc/posix-functions/getpeername.texi: Likewise.
45298         * doc/posix-functions/getsockname.texi: Likewise.
45299         * doc/posix-functions/getsockopt.texi: Likewise.
45300         * doc/posix-functions/recvfrom.texi: Likewise.
45302 2018-01-27  Bruno Haible  <bruno@clisp.org>
45304         getsockname tests: More tests.
45305         * tests/test-getsockname.c (open_server_socket): New function, mostly
45306         copied from test-poll.c.
45307         (main): Check that getsockname fills in addr.
45308         * modules/getsockname-tests (Depends-on): Add the necessary
45309         dependencies.
45310         (test_getsockname_LDADD): Link with $(INET_PTON_LIB).
45312 2018-01-26  Paul Eggert  <eggert@cs.ucla.edu>
45314         manywarnings: fix maintainer comment
45315         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Fix comment so that
45316         it does not mistakenly think that ‘-1)’ is an option.
45318 2018-01-26  Bruno Haible  <bruno@clisp.org>
45320         langinfo: Fix last commit.
45321         Reported by Tim Rühsen <tim.ruehsen@gmx.de>.
45322         * modules/langinfo (Makefile.am): Substitute HAVE_LANGINFO_ALTMON.
45324 2018-01-24  Bruno Haible  <bruno@clisp.org>
45326         langinfo, nl_langinfo: Add support for alternative month names.
45327         * m4/langinfo_h.m4 (gl_LANGINFO_H): Define HAVE_LANGINFO_ALTMON.
45328         * lib/langinfo.in.h (ALTMON_1...ALTMON_12): New macros.
45329         * lib/nl_langinfo.c (rpl_nl_langinfo): Treat ALTMON_i like MON_i.
45330         * tests/test-nl_langinfo.c (main): Test ALTMON_*.
45331         * doc/posix-headers/langinfo.texi: Document support of ALTMON_*.
45332         * doc/posix-functions/nl_langinfo.texi: Likewise.
45334 2018-01-23  Paul Eggert  <eggert@cs.ucla.edu>
45336         Merge strftime.c changes from glibc
45337         This incorporates:
45338         2017-11-14 [BZ #10871] Implement alternative month names
45339         2017-11-14 [BZ #10871] Abbreviated alternative month names (%Ob)
45340         2017-06-20 Use locale_t, not __locale_t, throughout glibc
45341         * lib/nstrftime.c (ABALTMON_1) [!COMPILE_WIDE]: New macro.
45342         (LOCALE_PARAM) [_LIBC && USE_IN_EXTENDED_LOCALE_MODEL]:
45343         Use locale_t, not __locale_t.
45344         (a_altmonth, f_altmonth, aam_len) [_NL_CURRENT]: New macros.
45345         (__strftime_internal): Add support for alternate months.
45347 2018-01-23  Bruno Haible  <bruno@clisp.org>
45349         doc: Mention another prerequisite for using Gnulib.
45350         Reported at <https://stackoverflow.com/questions/48378214/>.
45351         * doc/gnulib-tool.texi (Initial import): Mention requirement to use
45352         AC_CONFIG_HEADERS.
45354 2018-01-22  Mathieu Lirzin  <mthl@gnu.org>
45356         build: GuixSD doesn't have /bin/bash
45357         * Makefile (SHELL): Search 'bash' in the PATH environment variable.
45359 2018-01-21  Bruno Haible  <bruno@clisp.org>
45361         Avoid test failures on Microsoft Windows Subsystem for Linux.
45362         * tests/test-fcntl.c (main): Allow a different errno.
45363         * tests/test-rename.h (test_rename): Likewise.
45364         * tests/test-renameat.c (main): Likewise.
45365         * tests/test-renameat2.c (main): Likewise.
45367 2018-01-14  Paul Eggert  <eggert@cs.ucla.edu>
45369         filenamecat: make base a suffix of result
45370         * lib/filenamecat-lgpl.c (longest_relative_suffix): Remove.
45371         (mfile_name_concat): Always make BASE a suffix of the result, as
45372         cp expects this.  To implement this, separate with '.' instead of
45373         '/' in some rare cases.  Clarify spec to say ./BASE not BASE.
45374         * tests/test-filenamecat.c (main): Adjust tests to match
45375         current behavior.  Check that BASE_IN_RESULT points to
45376         a copy of BASE and is a suffix of the resultk, and that DIR
45377         is a prefix of the result that is no longer than the prefix
45378         indicated by BASE_IN_RESULT.
45380 2018-01-04  Mathieu Lirzin  <mthl@gnu.org>
45382         update-copyright: Handle use of ©
45383         * build-aux/update-copyright ($circle_c_re): Update regex to
45384         handle use of © in headers.
45386 2018-01-04  Tim Rühsen  <tim.ruehsen@gmx.de>
45388         Fix -Wundef warning in user-included header lib/cdefs.h.
45389         * lib/cdefs.h: Check if defined before using __USE_FORTIFY_LEVEL.
45391 2018-01-04  Bruno Haible  <bruno@clisp.org>
45393         pthread_sigmask: Avoid compilation error on mingw.
45394         Reported by Tim Rühsen <tim.ruehsen@gmx.de>.
45395         * lib/signal.in.h (pthread_sigmask): Don't declare it it's defined as a
45396         macro.
45398 2018-01-03  Paul Eggert  <eggert@cs.ucla.edu>
45400         test-framework-sh: ‘ps -ef’, not ‘ps ef’
45401         * tests/init.sh (rand_bytes_): Put ‘-’ before new-style ps options.
45402         Suggested by Bob Proulx (Bug#29968).
45403         * build-aux/mktempd (rand_bytes): Make it like tests/init.sh.
45405 2018-01-02  Eric Blake  <eblake@redhat.com>
45407         stat-time: silence -Wunused-parameter regression
45408         * lib/stat-time.h (get_stat_birthtime_ns, get_stat_birthtime):
45409         Prefer attribute over cast-to-void.
45410         (stat_time_normalize): Mark st as potentially unused.
45412 2018-01-02  Paul Eggert  <eggert@cs.ucla.edu>
45414         test-framework-sh: avoid netstat
45415         Problem reported by Kristýna Streitová (Bug#29947).
45416         * tests/init.sh (rand_bytes_): Stop using netstat, as it's
45417         deprecated on SuSE and it's not that important anyway.
45419 2018-01-01  Jim Meyering  <meyering@fb.com>
45421         update-copyright: add code to handle more special cases
45422         After running "make update-copyright" this year, five files
45423         required additional manual changes.  Automate those adjustments
45424         for next year.
45425         * Makefile (_year_and_prev): Define.
45426         (update-copyright): Add perl commands to induce this year's post-
45427         update-copyright adjustments.
45429 2018-01-01  Paul Eggert  <eggert@cs.ucla.edu>
45431         version-etc: new year
45432         * build-aux/gendocs.sh (version):
45433         * doc/gendocs_template:
45434         * doc/gendocs_template_min:
45435         * doc/gnulib.texi:
45436         * lib/version-etc.c (COPYRIGHT_YEAR):
45437         Update copyright dates by hand in templates and the like.
45439         maint: fix 'make update-copyright'
45440         * Makefile (update-copyright): Adjust to 2016-11-23 change
45441         to config/srclist-update, which changed the format of srclist.txt.
45443 2017-12-30  Paul Eggert  <eggert@cs.ucla.edu>
45445         chdir-safer: remove this module
45446         * MODULES.html.sh (func_all_modules): Remove chdir-safer.
45447         * NEWS: Document removal.
45448         * lib/chdir-safer.c, lib/chdir-safer.h, m4/afs.m4, m4/chdir-safer.m4:
45449         * modules/chdir-safer: Remove these files.
45451 2017-12-29  Samuel Thibault  <samuel.thibault@gnu.org>
45453         Add cross-compilation results for GNU/Hurd.
45454         * m4/calloc.m4: Add GNU/Hurd guess.
45455         * m4/cbrtl.m4: Likewise.
45456         * m4/ceil.m4: Likewise.
45457         * m4/ceilf.m4: Likewise.
45458         * m4/ceill.m4: Likewise.
45459         * m4/chown.m4: Likewise.
45460         * m4/duplocale.m4: Likewise.
45461         * m4/exp2l.m4: Likewise.
45462         * m4/expm1.m4: Likewise.
45463         * m4/fchdir.m4: Likewise.
45464         * m4/floor.m4: Likewise.
45465         * m4/floorf.m4: Likewise.
45466         * m4/fmod.m4: Likewise.
45467         * m4/fmodf.m4: Likewise.
45468         * m4/fmodl.m4: Likewise.
45469         * m4/getcwd.m4: Likewise.
45470         * m4/getgroups.m4: Likewise.
45471         * m4/gettimeofday.m4: Likewise.
45472         * m4/hypot.m4: Likewise.
45473         * m4/hypotf.m4: Likewise.
45474         * m4/hypotl.m4: Likewise.
45475         * m4/link-follow.m4: Likewise.
45476         * m4/link.m4: Likewise.
45477         * m4/linkat.m4: Likewise.
45478         * m4/log.m4: Likewise.
45479         * m4/log10.m4: Likewise.
45480         * m4/log10f.m4: Likewise.
45481         * m4/log1p.m4: Likewise.
45482         * m4/log1pf.m4: Likewise.
45483         * m4/log1pl.m4: Likewise.
45484         * m4/log2.m4: Likewise.
45485         * m4/log2f.m4: Likewise.
45486         * m4/logf.m4: Likewise.
45487         * m4/lstat.m4: Likewise.
45488         * m4/malloc.m4: Likewise.
45489         * m4/mbrlen.m4: Likewise.
45490         * m4/mbrtowc.m4: Likewise.
45491         * m4/mkdir.m4: Likewise.
45492         * m4/mkfifo.m4: Likewise.
45493         * m4/mknod.m4: Likewise.
45494         * m4/mkstemp.m4: Likewise.
45495         * m4/modf.m4: Likewise.
45496         * m4/modff.m4: Likewise.
45497         * m4/modfl.m4: Likewise.
45498         * m4/printf.m4: Likewise.
45499         * m4/pselect.m4: Likewise.
45500         * m4/ptsname.m4: Likewise.
45501         * m4/putenv.m4: Likewise.
45502         * m4/readlink.m4: Likewise.
45503         * m4/realloc.m4: Likewise.
45504         * m4/remainder.m4: Likewise.
45505         * m4/remainderf.m4: Likewise.
45506         * m4/remainderl.m4: Likewise.
45507         * m4/rmdir.m4: Likewise.
45508         * m4/round.m4: Likewise.
45509         * m4/roundf.m4: Likewise.
45510         * m4/roundl.m4: Likewise.
45511         * m4/select.m4: Likewise.
45512         * m4/setenv.m4: Likewise.
45513         * m4/signbit.m4: Likewise.
45514         * m4/sleep.m4: Likewise.
45515         * m4/stat.m4: Likewise.
45516         * m4/strerror.m4: Likewise.
45517         * m4/strtok_r.m4: Likewise.
45518         * m4/symlink.m4: Likewise.
45519         * m4/symlinkat.m4: Likewise.
45520         * m4/trunc.m4: Likewise.
45521         * m4/truncf.m4: Likewise.
45522         * m4/truncl.m4: Likewise.
45523         * m4/tzset.m4: Likewise.
45524         * m4/ungetc.m4: Likewise.
45525         * m4/usleep.m4: Likewise.
45526         * m4/wcwidth.m4: Likewise.
45528 2017-12-28  Bruno Haible  <bruno@clisp.org>
45530         gnulib-tool: Make --conditional-dependencies work better.
45531         Reported by Dmitry Selyutin <ghostman.sd@gmail.com>.
45532         * gnulib-tool (Options): Don't reject the combination of
45533         --conditional-dependencies with --with-tests.
45534         (func_emit_autoconf_snippets): Add argument referenceable_modules.
45535         Don't reference $modules.
45536         (func_import, func_create_testdir): Pass it.
45538 2017-12-19  Paul Eggert  <eggert@cs.ucla.edu>
45540         regex: use re_malloc etc. consistently
45541         Problem and original patch reported by Arnold Robbins in:
45542         https://sourceware.org/ml/libc-alpha/2017-12/msg00241.html
45543         * lib/regcomp.c (re_comp):
45544         * lib/regexec.c (push_fail_stack, build_trtable, match_ctx_clean):
45545         Use re_malloc/re_realloc/re_free instead of malloc/realloc/free.
45547 2017-12-15  Tim Rühsen  <tim.ruehsen@gmx.de>
45548             Paul Eggert  <eggert@cs.ucla.edu>
45550         glob: Silence warning about void pointer arithmetic.
45551         * lib/glob.c (glob): Use a 'char *', not a 'void *', in pointer
45552         arithmetic.
45554 2017-12-15  Bruno Haible  <bruno@clisp.org>
45556         spawn-pipe: Silence a clang warning.
45557         Reported by Tim Rühsen <tim.ruehsen@gmx.de>.
45558         * lib/spawn-pipe.c: Disable clang -Wconditional-uninitialized warnings
45559         in this file.
45561 2017-12-12  Paul Eggert  <eggert@cs.ucla.edu>
45563         explicit_bzero: port to macOS + Clang 9.0.0
45564         Problem reported by Marcus Johnson (Bug#29658).
45565         * lib/explicit_bzero.c (explicit_bzero) [__clang__]:
45566         Don’t use asm.
45568 2017-12-11  Reuben Thomas  <rrt@sc3d.org>
45570         doc: Improve explanation of supporting relocatable libraries.
45571         * doc/relocatable-maint.texi (Supporting Relocation): Explain
45572         properly how to build the relocatable module for
45573         libraries. (Method and example code from Bruno Haible.)
45575 2017-12-11  Reuben Thomas  <rrt@sc3d.org>
45577         doc: Use better texinfo tags in a few cases.
45578         * doc/gnulib.texi (Extending Gnulib): Use @option or @command
45579         instead of @samp in a few places.
45581 2017-12-11  Bruno Haible  <bruno@clisp.org>
45583         unistr/base: Update comment.
45584         * lib/unistr.in.h: Update comment about u*_mbtouc_unsafe functions.
45586 2017-12-10  Pádraig Brady  <P@draigBrady.com>
45588         test-faccessat.c: unlink temp file to avoid subsequent test failure
45589         * tests/test-faccessat.c: Remove the file to avoid failure
45590         to open the file on subsequent runs due to being created
45591         with no permissions.
45593 2017-12-10  Bruno Haible  <bruno@clisp.org>
45595         doc: New sect. "Modifying the build rules of a Gnulib import directory".
45596         * doc/gnulib-tool.texi (Modified build rules): New node.
45598 2017-12-10  Bruno Haible  <bruno@clisp.org>
45600         doc: Tweak wording.
45601         * doc/gnulib-tool.texi (Multiple instances): Talk about "programs", not
45602         "binaries".
45604 2017-12-05  Sam Steingold  <sds@gnu.org>
45605             Bruno Haible  <bruno@clisp.org>
45607         no-c++: Avoid "egrep: repetition-operator operand invalid" error.
45608         * m4/no-c++.m4 (gt_NO_CXX): Don't use '+' characters nor spaces in the
45609         AC_EGREP_CPP pattern.
45611 2017-12-03  Bruno Haible  <bruno@clisp.org>
45613         all: Replace more http URLs by https URLs.
45614         * lib/sm3.h, lib/sm3.c, tests/test-sm3.c: Use https: URL.
45615         * lib/unigbrk/u-grapheme-breaks.h: Likewise.
45616         * lib/unigbrk/uc-grapheme-breaks.c: Likewise.
45617         * tests/unigbrk/test-uc-grapheme-breaks.c: Likewise.
45619 2017-11-28  Paul Eggert  <eggert@cs.ucla.edu>
45621         Port better to CentOS 5
45622         Problems reported by Tom G. Christensen in:
45623         https://lists.gnu.org/r/bug-gnulib/2017-11/msg00053.html
45624         * doc/glibc-functions/strverscmp.texi (strverscmp):
45625         Document strverscmp bug with glibc 2.9 and earlier.
45626         * doc/posix-functions/tzset.texi (tzset):
45627         Document that TZ with angle brackets is POSIX-2001 and later.
45628         * tests/test-nstrftime.c: Include unistd.h.
45629         (TZ_ANGLE_BRACKETS_SHOULD_WORK): New macro.
45630         (TZ): Use it to skip tests with angle brackets in TZ,
45631         for older systems.
45633         stat: add missing module dependencies
45634         * modules/lstat, modules/stat, modules/utimensat (Depends-on):
45635         Add stat-time.
45637 2017-11-28  Benno Schulenberg  <bensberg@telfort.nl>
45639         stat: fix compilation failure on macOS Sierra
45640         Reported by Marius Schamschula <mschamschula@gmail.com> in:
45641         https://savannah.gnu.org/bugs/?52546
45642         * lib/stat.c: Add missing include of stat-time.h.
45644 2017-11-28  Jim Meyering  <meyering@fb.com>
45646         test-faccessat.c: correct BASE definition to avoid parallel test failure
45647         * tests/test-faccessat.c (BASE): Define using this file's name, not
45648         that of test-lstat.c.  Using the latter caused this test to fail
45649         sometimes when run concurrently with test-lstat.
45651 2017-11-27  Daiki Ueno  <ueno@gnu.org>
45653         unicase: fix VPATH build
45654         * modules/unicase/special-casing (Makefile.am): Ensure that the
45655         base directory is created when generating
45656         unicase/special-casing.h.
45658 2017-11-27  Daiki Ueno  <ueno@gnu.org>
45660         libunistring: update to Unicode 9.0.0
45661         * lib/gen-uni-tables.c (fill_properties): Recognize
45662         Sentence_Terminal and Prepended_Concatenation_Mark.
45663         (is_property_default_ignorable_code_point): Exclude U+08E2.
45664         (fill_arabicshaping): Allow missing whitespace when parsing;
45665         recognize "AFRICAN FEH", "AFRICAN QAF", and "AFRICAN MOON".
45666         (output_blocks): Increase the element size of the level1 table to
45667         accommodate more blocks.
45668         (get_lbp): Recognize ZWJ, E_Base, and E_Modifier characters;
45669         Update each class according to the standard.
45670         (get_wbp): Recognize ZWJ, E_Base, E_Modifier, Glue_After_Zwj, and
45671         E_Base_GAZ characters.
45672         (output_gbp_table): Recognize ZWJ, E_Base, E_Modifier,
45673         Glue_After_Zwj, and E_Base_GAZ characters.
45674         * lib/unictype.in.h (UC_JOINING_GROUP_AFRICAN_FEH)
45675         (UC_JOINING_GROUP_AFRICAN_QAF, UC_JOINING_GROUP_AFRICAN_MOON): New
45676         enum value.
45677         * lib/unilbrk/lbrktables.h (LBP_ZWJ, LBP_EB, LBP_EM): New enum
45678         value.
45679         * lib/unilbrk/lbrktables.c (unilbrk_table): Extend the table with
45680         LBP_ZWJ, LBP_EB, and LBP_EM.
45681         * lib/uniwbrk.in.h (WBP_ZWJ, WBP_EB, WBP_EM, WBP_GAZ, WBP_EBG): New
45682         enum value.
45683         * lib/uniwbrk/u-wordbreaks.h: Implement WB3c, WB15, and WB16.
45684         * lib/uniwbrk/wbrktable.h (uniwbrk_prop_index): New variable
45685         declaration.
45686         * lib/uniwbrk/wbrktable.c (uniwbrk_prop_index): New variable.
45687         (uniwbrk_table): Implement WB14.
45688         * tests/uniwbrk/test-uc-wordbreaks.c (wordbreakproperty_to_string):
45689         Check WBP_ZWJ, WBP_EB, WBP_EM, WBP_GAZ, and WBP_EBG.
45690         * modules/unigbrk/u{32,16,8}-grapheme-breaks: No longer depend on
45691         uc-is-grapheme-break.
45692         * modules/unigbrk/uc-grapheme-breaks: New module.
45693         * modules/unigbrk/uc-grapheme-breaks-tests: New module.
45694         * lib/unigbrk.in.h (GBP_ZWJ, GBP_EB, GBP_EM, GBP_GAZ, GBP_EBG): New
45695         enum value.
45696         (uc_grapheme_breaks): New function, replacing uc_is_grapheme_break.
45697         * lib/unigbrk/u-grapheme-breaks.h: New file.
45698         * lib/unigbrk/u{32,16,8}-grapheme-breaks.c: Rewrite using
45699         u-grapheme-breaks.h instead of uc_is_grapheme_break.
45700         * lib/unigbrk/uc-grapheme-breaks.c: New file.
45701         * lib/unigbrk/uc-is-grapheme-break.c: Partially update to TR29 rev
45702         29.
45703         * tests/unigbrk/test-uc-gbrk-prop.c
45704         (graphemebreakproperty_to_string): Check GBP_ZWJ, GBP_EB, GBP_EM,
45705         GBP_GAZ, and GBP_EBG.
45706         * tests/unigbrk/test-uc-grapheme-breaks.c: New test.
45707         * tests/unigbrk/test-uc-is-grapheme-break.c
45708         (graphemebreakproperty_to_string): Check GBP_ZWJ, GBP_EB, GBP_EM,
45709         GBP_GAZ, and GBP_EBG.
45710         (main): Skip unsupported rules involving 3 or more characters,
45711         namely GB10, GB12, and GB13.
45712         * lib/uniwidth/width.c (nonspacing_table_data): Update.
45713         * all generated files under lib/uni* and tests/uni*: Regenerate.
45714         * all the affected modules: Bump version.
45716 2017-11-26  Bruno Haible  <bruno@clisp.org>
45718         strfmon_l: Fix compilation error with glibc 2.5.
45719         Reported by Tom G. Christensen <tgc@jupiterrise.com>
45720         in <https://lists.gnu.org/r/bug-gnulib/2017-11/msg00051.html>.
45721         * lib/monetary.in.h: Include also <locale.h>.
45723 2017-11-24  Paul Eggert  <eggert@cs.ucla.edu>
45725         posixtm: remove PDS_LEADING_YEAR
45726         This changes the API slightly, in a hopefully-innocuous way.
45727         Without this change the code had undefined behavior when a
45728         caller specified neither PDS_LEADING_YEAR nor PDS_TRAILING_YEAR.
45729         Problem reported by Pádraig Brady in:
45730         https://lists.gnu.org/r/bug-gnulib/2017-11/msg00048.html
45731         * NEWS: Mention this.
45732         * lib/posixtm.c (posix_time_parse): Treat the absence of
45733         PDS_TRAILING_YEAR as if PDS_LEADING_YEAR were present.
45734         * lib/posixtm.h (PDS_LEADING_YEAR): Remove (actually, leave it
45735         present, but define it as zero, for compatibility with existing
45736         source code).  All other PDS_* values moved up.
45737         * tests/test-posixtm.c (LY): New macro.
45738         (T): Use it.  Do not expect a particular numeric encoding
45739         for PDS_CENTURY etc.
45741 2017-11-23  Paul Eggert  <eggert@cs.ucla.edu>
45743         stat: work around Solaris bug with tv_nsec < 0
45744         * doc/posix-functions/fstat.texi (fstat):
45745         * doc/posix-functions/fstatat.texi (fstatat):
45746         * doc/posix-functions/lstat.texi (lstat):
45747         * doc/posix-functions/stat.texi (stat):
45748         Mention Solaris 11 bug.
45749         * lib/fstat.c, lib/fstatat.c, lib/lstat.c: Include stat-time.h.
45750         * lib/fstat.c (rpl_fstat) [!WINDOWS_NATIVE]:
45751         * lib/lstat.c (rpl_lstat):
45752         * lib/stat.c (rpl_stat):
45753         Normalize resulting timestamps.
45754         * lib/fstatat.c (normal_fstatat): New function.
45755         (rpl_fstatat): Use it.
45756         * lib/stat-time.h: Include intprops.h, errno.h, stddef.h.
45757         (stat_time_normalize): New function.
45758         * m4/fstat.m4 (gl_FUNC_FSTAT):
45759         * m4/fstatat.m4 (gl_FUNC_FSTATAT):
45760         * m4/lstat.m4 (gl_FUNC_LSTAT):
45761         * m4/stat.m4 (gl_FUNC_STAT):
45762         Replace on Solaris.
45763         * modules/fstat (Depends-on):
45764         * modules/fstatat (Depends-on):
45765         Add stat-time.
45766         * modules/stat-time (Depends-on): Add errno, intprops.
45768 2017-11-22  Paul Eggert  <eggert@cs.ucla.edu>
45770         regex: merge from glibc
45771         * lib/regcomp.c (init_word_char): Add comments.
45773 2017-11-20  Paul Eggert  <eggert@cs.ucla.edu>
45775         regex: merge from glibc
45776         * lib/regcomp.c (__regcomp, __regfree) [_LIBC]: Now hidden.
45777         * lib/regex_internal.h (internal_function): Remove.
45778         All uses removed.
45780 2017-11-20  Bruno Haible  <bruno@clisp.org>
45782         crypto/gc-sm3: Fix buffer overrun.
45783         * lib/gc-gnulib.c (MAX_DIGEST_SIZE): Bump to 32.
45784         Reported by Coverity.
45786 2017-11-12  Jim Meyering  <meyering@fb.com>
45788         maint: shorten https://lists.gnu.org/archive/html/... links
45789         Each /archive/html/ part can be replace with /r/.
45790         Run this to induce the change:
45791         git grep -l archive/html|xargs perl -pi -e 's,/archive/html/,/r/,g'
45792         * ChangeLog: Perform that substitution.
45793         * Makefile: Likewise.
45794         * STATUS-libposix: Likewise.
45795         * build-aux/bootstrap: Likewise.
45796         * doc/maintain.texi: Likewise.
45797         * gnulib-tool: Likewise.
45798         * lib/allocator.h: Likewise.
45799         * lib/argp-ba.c: Likewise.
45800         * lib/argp-pv.c: Likewise.
45801         * lib/canon-host.c: Likewise.
45802         * lib/canonicalize-lgpl.c: Likewise.
45803         * lib/float.in.h: Likewise.
45804         * lib/fstat.c: Likewise.
45805         * lib/getdelim.c: Likewise.
45806         * lib/getprogname.c: Likewise.
45807         * lib/glthread/thread.h: Likewise.
45808         * lib/intprops.h: Likewise.
45809         * lib/mbsrtowcs-state.c: Likewise.
45810         * lib/safe-read.c: Likewise.
45811         * lib/signal.in.h: Likewise.
45812         * lib/stat.c: Likewise.
45813         * lib/stdbool.in.h: Likewise.
45814         * lib/stdio-impl.h: Likewise.
45815         * lib/stdio.in.h: Likewise.
45816         * lib/sysexits.in.h: Likewise.
45817         * lib/timespec.h: Likewise.
45818         * lib/wcsrtombs-state.c: Likewise.
45819         * m4/alloca.m4: Likewise.
45820         * m4/extern-inline.m4: Likewise.
45821         * m4/fstatat.m4: Likewise.
45822         * m4/gnulib-common.m4: Likewise.
45823         * m4/lib-ignore.m4: Likewise.
45824         * m4/printf.m4: Likewise.
45825         * m4/regex.m4: Likewise.
45826         * m4/stat-size.m4: Likewise.
45827         * m4/std-gnu11.m4: Likewise.
45828         * m4/stdbool.m4: Likewise.
45829         * m4/sys_types_h.m4: Likewise.
45830         * m4/threadlib.m4: Likewise.
45831         * m4/vararrays.m4: Likewise.
45832         * pygnulib/GLImport.py: Likewise.
45833         * tests/test-exp.h: Likewise.
45834         * tests/test-exp2.h: Likewise.
45835         * tests/test-expm1.h: Likewise.
45836         * tests/test-fflush2.c: Likewise.
45837         * tests/test-getopt_long.h: Likewise.
45838         * tests/test-intprops.c: Likewise.
45839         * tests/test-log.h: Likewise.
45840         * tests/test-log10.h: Likewise.
45841         * tests/test-log1p.h: Likewise.
45842         * tests/test-log2.h: Likewise.
45843         * tests/test-printf-posix.h: Likewise.
45844         * tests/test-regex.c: Likewise.
45845         * tests/test-snprintf-posix.h: Likewise.
45846         * tests/test-sprintf-posix.h: Likewise.
45847         * tests/test-stdalign.c: Likewise.
45848         * tests/test-stdbool.c: Likewise.
45849         * tests/test-vasnprintf-posix.c: Likewise.
45850         * tests/test-vasprintf-posix.c: Likewise.
45851         * top/maint.mk: Likewise.
45853 2017-11-12  Bruno Haible  <bruno@clisp.org>
45855         faccessat: Make the last change more robust.
45856         * m4/faccessat.m4 (gl_FUNC_FACCESSAT): Require
45857         gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK. Treat "guessing yes" like "yes".
45859 2017-11-11  Paul Eggert  <eggert@cs.ucla.edu>
45861         faccessat: port to macOS (Bug#29231)
45862         macOS faccessat has the same bug that lstat does: if the file
45863         name ends in '/' it ignores the trailing slash.
45864         Problem reported for Emacs by Vincent Zhang.
45865         * doc/posix-functions/faccessat.texi (faccessat): Document this.
45866         * lib/faccessat.c (_GL_INCLUDING_UNISTD_H): Define and undef
45867         around the initial includes.  Include errno.h, string.h, sys/stat.h.
45868         (orig_faccessat) [HAVE_FACCESSAT]: New function.
45869         Include "unistd.h" after defining it.
45870         (rpl_faccessat) [HAVE_FACCESSAT]: New implementation.
45871         * lib/unistd.in.h (faccessat) [REPLACE_FACCESSAT]:
45872         Handle in the usual way.
45873         * m4/faccessat.m4 (gl_FUNC_FACCESSAT): Replace faccessat if
45874         lstat dereferences symlinks, since faccessat is likely to
45875         have the same problem.
45876         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Default REPLACE_ACCESSAT.
45877         * modules/faccessat (Depends-on): Add fstatat.
45878         Depend if REPLACE_FACCESSAT is 1, too.
45879         (configure.ac): Link if REPLACE_FACCESSAT is 1.
45880         * modules/faccessat-tests (Depends-on): Add symlink.
45881         * modules/unistd (unistd.h): Substitute REPLACE_FACCESSAT.
45882         * tests/test-faccessat.c (main): Test for the bug.
45884 2017-11-11  Bruno Haible  <bruno@clisp.org>
45886         getprogname: Fix compilation error on IRIX.
45887         * lib/getprogname.c (getprogname) [__sgi]: Fix type of local variable
45888         'namesize'.
45890 2017-11-11  Bruno Haible  <bruno@clisp.org>
45892         year2038: Tweak last patch.
45893         * m4/year2038.m4 (gl_YEAR2038): Correct indentation.
45895 2017-11-06  Paul Eggert  <eggert@cs.ucla.edu>
45897         year2038: be more insistent about 64-bit time_t
45898         Applications requiring access to arbitrary files should not be
45899         built with 32-bit time_t on hosts that have 64-bit timestamps,
45900         as this can lead to real trouble at runtime.
45901         * m4/year2038.m4 (gl_YEAR2038): Do not require AC_CANONICAL_HOST.
45902         Check on all systems, not just MinGW.  Use a heuristic involving
45903         TIME_T_32_BIT_OK, cross_compiling, and the touch command to
45904         output a failure or just a warning, to make it more likely that
45905         builders will select 64-bit time_t.
45907 2017-11-05  Paul Eggert  <eggert@cs.ucla.edu>
45909         havelib: fix typo in previous change
45910         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): Fix typo.
45912         Don’t use AC_EGREP_CPP if affected by CFLAGS
45913         * m4/float_h.m4 (gl_FLOAT_H):
45914         * m4/host-cpu-c-abi.m4 (gl_HOST_CPU_C_ABI):
45915         * m4/lib-ld.m4 (AC_LIB_PROG_LD):
45916         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB):
45917         * m4/year2038.m4 (gl_YEAR2038):
45918         Prefer AC_COMPILE_IFELSE to AC_EGREP_CPP when testing conditions
45919         likely to be affected by the choice of CFLAGS, since CFLAGS are
45920         not used by AC_EGREP_CPP.  Without this patch, ‘./configure
45921         CFLAGS="-m32"’ fails on gzip with GNU/Linux x86-64.
45923         fstatat: pacify GCC on unusual platform
45924         * lib/fstatat.c (orig_fstatat) [!HAVE_WORKING_FSTATAT_ZERO_FLAG]:
45925         Omit, as it’s unused in this case.
45927 2017-10-29  Paul Eggert  <eggert@cs.ucla.edu>
45929         timespec: prefer ‘assume’ to ‘assure’
45930         This avoids some runtime tests.  The rest of the module makes
45931         similar assumptions and there is little point to testing here.
45932         * lib/timespec.h: Include verify.h instead of assure.h.
45933         (timespec_cmp): Use ‘assume’, not ‘assure’.
45934         Also, remove an unnecessary cast to ‘int’, as lots of other
45935         code in this module now causes -Wconversion to complain, and
45936         this is a problem with -Wconversion not with the code.
45938         * modules/timespec (Depends-on): Depend on ‘verify’, not ‘assure’.
45940         Port recent gnulib-tool change to Dash
45941         * gnulib-tool (func_create_testdir): Don't assume that the shell
45942         retokenizes after expanding "$@" inside the call to
45943         func_execute_command.  Dash 0.5.8-2.1ubuntu2 does not.
45945 2017-10-27  Jim Meyering  <meyering@fb.com>
45947         timespec.h: use "assure" to avoid a spurious warning
45948         * lib/timespec.h: Include "assure.h" and use it to help
45949         gcc7's -Wstrict-overflow avoid a false positive warning
45950         for a use in coreutils' ls.c.  Suggested by Paul Eggert in
45951         https://lists.gnu.org/r/bug-gnulib/2017-10/msg00007.html
45952         * modules/timespec (Depends-on): Add assure.
45954 2017-10-29  Bruno Haible  <bruno@clisp.org>
45956         Avoid several test failures with traditional locales on Haiku.
45957         * m4/locale-ar.m4 (gt_LOCALE_AR): On BeOS and Haiku, set LOCALE_AR=none.
45958         * m4/locale-fr.m4 (gt_LOCALE_FR): On BeOS and Haiku, set LOCALE_FR=none.
45959         * m4/locale-ja.m4 (gt_LOCALE_JA): On BeOS and Haiku, set LOCALE_JA-none.
45960         * m4/locale-zh.m4 (gt_LOCALE_ZH_CN): On BeOS and Haiku, set
45961         LOCALE_ZH_CN=none.
45963 2017-10-29  Bruno Haible  <bruno@clisp.org>
45965         strerror_r-posix: Fix behaviour and test failure on Haiku.
45966         * lib/strerror_r.c (strerror_r): Don't assume that valid error numbers
45967         are positive. Work around return value 0 instead of ERANGE on Haiku.
45968         For unknown error numbers, use a format string consistent with perror().
45969         * doc/posix-functions/strerror_r.texi: Mention the Haiku problem.
45970         * tests/test-strerror_r.c (main): Don't assume that valid error numbers
45971         are positive.
45973 2017-10-29  Bruno Haible  <bruno@clisp.org>
45975         get-rusage-data: Avoid crash on Haiku.
45976         * lib/get-rusage-data.c: Avoid the setlimit-based implementation.
45978 2017-10-29  Bruno Haible  <bruno@clisp.org>
45980         get-rusage-as: Avoid crash on Haiku.
45981         * lib/get-rusage-as.c: Avoid the setlimit-based implementation.
45983 2017-10-29  Bruno Haible  <bruno@clisp.org>
45985         ilogbl: Ensure replacement on Haiku.
45986         * m4/ilogbl.m4 (gl_FUNC_ILOGBL): Invoke gl_FUNC_ILOGBL_WORKS and set
45987         REPLACE_ILOGBL if ilogbl does not work.
45988         (gl_FUNC_ILOGBL_WORKS): New macro.
45989         * lib/math.in.h (ilogbl): Replace if REPLACE_ILOGBL is 1.
45990         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_ILOGBL.
45991         * modules/math (Makefile.am): Substitute REPLACE_ILOGBL.
45992         * modules/ilogbl (Depends-on, configure.ac): Consider REPLACE_ILOGBL.
45993         * doc/posix-functions/ilogbl.texi: Mention the Haiku problem.
45995 2017-10-29  Bruno Haible  <bruno@clisp.org>
45997         expl: Ensure replacement on Haiku.
45998         * m4/expl.m4 (gl_FUNC_EXPL): Test whether an expl() return value is
45999         zero.
46000         * doc/posix-functions/expl.texi: Mention the Haiku problem.
46002 2017-10-29  Bruno Haible  <bruno@clisp.org>
46004         math: Fix test failure on Haiku.
46005         * lib/math.in.h (FP_ILOGB0, FP_ILOGBNAN): Override on Haiku.
46006         * m4/ilogb.m4 (gl_FUNC_ILOGB_WORKS): Update accordingly.
46007         * m4/ilogbf.m4 (gl_FUNC_ILOGBF_WORKS): Likewise.
46008         * doc/posix-headers/math.texi: Mention the Haiku problem.
46010 2017-10-29  Bruno Haible  <bruno@clisp.org>
46012         gnulib-tool: Avoid unnecessary config.h.in remaking in testdirs.
46013         * gnulib-tool (func_create_testdir): Use workaround against 'autoheader'
46014         bug reported at <https://savannah.gnu.org/support/index.php?109406>.
46016 2017-10-29  Bruno Haible  <bruno@clisp.org>
46018         crypto/*: Verify that the header file is self-contained.
46019         * tests/test-gc-*.c: Include the module's header file immediately after
46020         <config.h>.
46021         * tests/test-hmac-*.c: Likewise.
46022         * tests/test-arcfour.c: Likewise.
46023         * tests/test-arctwo.c: Likewise.
46024         * tests/test-des.c: Likewise.
46025         * tests/test-md2.c: Likewise.
46026         * tests/test-md4.c: Likewise.
46027         * tests/test-md5.c: Likewise.
46028         * tests/test-rijndael.c: Likewise.
46029         * tests/test-sha1.c: Likewise.
46030         * tests/test-sm3.c: Likewise.
46032 2017-10-29  Jia Zhang  <qianyue.zj@alibaba-inc.com>
46033             Bruno Haible  <bruno@clisp.org>
46035         crypto/gc: fix build failure with -Werror=suggest-attribute=const
46036         * lib/gc.h (gc_hash_digest_length): Mark with 'const' attribute.
46038 2017-10-29  Jia Zhang  <qianyue.zj@alibaba-inc.com>
46040         New module: crypto/gc-sm3
46041         * lib/gc.h: Declare SM3-related stuffs.
46042         * lib/gc-gnulib.c: Support sm3 in internal functions.
46043         * lib/gc-libgcrypt.c: Support sm3 with libgcrypt.
46044         * m4/gc-sm3.m4: m4 file for gc-sm3 module.
46045         * modules/crypto/gc-sm3: Define gc-sm3 module.
46046         * tests/test-gc-sm3.c: Implement SM3 test case with libgcrypt.
46047         * modules/crypto/gc-sm3-tests: Define gc-sm3 test module.
46048         * MODULES.html.sh: List gc-sm3 module.
46050 2017-10-29  Bruno Haible  <bruno@clisp.org>
46052         random, random_r: Mention different prototypes on Haiku.
46053         * doc/posix-functions/random.texi: Mention different prototype on Haiku.
46054         * doc/glibc-functions/random_r.texi: Likewise.
46055         * doc/glibc-functions/initstate_r.texi: Likewise.
46056         * doc/glibc-functions/setstate_r.texi: Likewise.
46058 2017-10-28  Bruno Haible  <bruno@clisp.org>
46060         posix_spawn: Avoid spurious message in configure output.
46061         * m4/posix_spawn.m4 (gl_POSIX_SPAWN_WORKS): Discard stderr output from
46062         'cmp' command.
46064 2017-10-28  Bruno Haible  <bruno@clisp.org>
46066         inet_ntop, inet_pton: Determine needed library correctly on Haiku.
46067         * m4/inet_ntop.m4 (gl_FUNC_INET_NTOP): Search also in libnetwork.
46068         * m4/inet_pton.m4 (gl_FUNC_INET_PTON): Likewise.
46070 2017-10-28  Bruno Haible  <bruno@clisp.org>
46072         ioctl: Override non-POSIX declaration on Haiku.
46073         * m4/ioctl.m4 (gl_FUNC_IOCTL): Include also <unistd.h>.
46074         * lib/sys_ioctl.in.h: Add comment about Haiku.
46075         * doc/posix-functions/ioctl.texi: Mention Haiku problem.
46076         * doc/glibc-headers/sys_ioctl.texi: Likewise.
46078 2017-10-28  Bruno Haible  <bruno@clisp.org>
46080         crypto/sm3: Add overview documentation to the .h file.
46081         * lib/sm3.h: Add comments.
46083 2017-10-28  Jia Zhang  <qianyue.zj@alibaba-inc.com>
46085         New module: crypto/sm3
46086         This new module can be used to compute SM3 message digest of files or
46087         memory blocks according to the specification GM/T 004-2012
46088         Cryptographic Hash Algorithm SM3, published by State Cryptography
46089         Administration, China.
46090         The official SM3 cryptographic hash algorithm specification is
46091         available at
46092         http://www.sca.gov.cn/sca/xwdt/2010-12/17/content_1002389.shtml
46093         * lib/sm3.h: Declare the APIs of sm3 module.
46094         * lib/sm3.c: Implement SM3 hash algorithm.
46095         * m4/sm3.m4: m4 file for sm3 module.
46096         * modules/crypto/sm3: Define sm3 module.
46097         * tests/test-sm3.c: Implement SM3 test case.
46098         * modules/crypto/sm3-tests: Define sm3 test module.
46099         * MODULES.html.sh: List sm3 module.
46101 2017-10-28  Jia Zhang  <qianyue.zj@alibaba-inc.com>
46103         gc-libgcrypt: fix undefined enum type in switch statement
46104         Resolve the following build failure:
46105         lib/gc-libgcrypt.c: In function 'gc_hash_open':
46106         lib/gc-libgcrypt.c:317:5: error: case value '0' not in enumerated type
46107         'Gc_hash_mode {aka enum Gc_hash_mode}' [-Werror=switch]
46108              case 0:
46109              ^~~~
46110         * lib/gc.h (enum Gc_hash_mode): Add value GC_NULL.
46111         * lib/gc-libgcrypt.c (gc_hash_open): Use this enum value instead of 0.
46113 2017-10-28  Jia Zhang  <qianyue.zj@alibaba-inc.com>
46115         gc-libgcrypt: fix assignment error due to -Werror=pointer-sign
46116         Resolve the following build failure:
46117         lib/gc-libgcrypt.c: In function 'gc_hash_read':
46118         lib/gc-libgcrypt.c:460:14: error: pointer targets in assignment differ
46119         in signedness [-Werror=pointer-sign]
46120             digest = gcry_md_read (ctx->gch, 0);
46121                    ^
46122         * lib/gc-libgcrypt.c (gc_hash_read): Cast result of gcry_md_read.
46124 2017-10-26  Bruno Haible  <bruno@clisp.org>
46126         havelib: Fix value of LD for 32-bit compilation on NetBSD/sparc64.
46127         * m4/lib-ld.m4 (AC_LIB_PROG_LD): On NetBSD/sparc64 with CC="gcc -m32",
46128         set LD to '/usr/bin/ld -m elf32_sparc', not '/usr/bin/ld'.
46130 2017-10-21  Paul Eggert  <eggert@cs.ucla.edu>
46132         glob: fix another heap buffer overflow
46133         Problem reported by Tim Rühsen in:
46134         https://sourceware.org/bugzilla/show_bug.cgi?id=22332
46135         * lib/glob.c (glob): Avoid buffer overrun when unescaping.
46137 2017-10-19  Paul Eggert  <eggert@cs.ucla.edu>
46139         quotearg: pacify compiler re unsigned
46140         * lib/quotearg.c (quotearg_n_options):
46141         Rewrite to avoid diagnostic from overly-picky compiler.
46142         Problem reported by Sami Kerola in:
46143         https://lists.gnu.org/r/bug-gnulib/2017-10/msg00060.html
46145         glob: fix heap buffer overflow
46146         * lib/glob.c (glob): Fix off-by-one error introduced into
46147         glibc in commit dd7d45e838a42b0ed470c44b55901ea98d0c2bab
46148         dated 1997-10-29 20:33:40.  Problem reported by Tim Rühsen in:
46149         https://sourceware.org/bugzilla/show_bug.cgi?id=22320
46150         Fix suggested by Bruno Haible.
46152 2017-10-18  Paul Eggert  <eggert@cs.ucla.edu>
46154         glob: pacify fuzzer for mempcpy
46155         Problem reported by Tim Rühsen in:
46156         https://lists.gnu.org/r/bug-gnulib/2017-10/msg00054.html
46157         * lib/glob.c (glob): Do not pass NULL to mempcpy.
46159 2017-10-12  Bruno Haible  <bruno@clisp.org>
46161         doc: Fix syntax error (regression from 2017-10-03).
46162         * doc/posix-functions/strncpy.texi: Fix syntax error.
46164 2017-10-12  Bruno Haible  <bruno@clisp.org>
46166         doc: Update for Solaris 11.3.
46167         * doc/**/*.texi: For bugs that exist in both Solaris 11.0 and 11.3,
46168         mention Solaris 11.3.
46169         * m4/log2.m4: Fix comments.
46170         * m4/log2f.m4: Likewise.
46171         * m4/printf.m4: Update comments.
46172         * m4/rename.m4: Likewise.
46173         * m4/strncat.m4: Likewise.
46175         all: Write "Solaris 11.0" instead of "Solaris 11 2011-11".
46177 2017-10-10  Bruno Haible  <bruno@clisp.org>
46179         doc: Improve doc about ioctl.
46180         * doc/posix-functions/ioctl.texi: Fix list of platforms with non-POSIX
46181         prototype.
46183 2017-10-09  Bruno Haible  <bruno@clisp.org>
46185         wcwidth: Don't use obsolete syntax of 'test'.
46186         Reported by Eric Blake.
46187         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Don't optimize two 'test'
46188         invocations into one, as POSIX marks '-a' and '-o' as "obsolescent".
46190 2017-10-09  Bruno Haible  <bruno@clisp.org>
46192         getopt-posix: Fix build failure when using ac_cv_header_getopt_h=no.
46193         Reported by Christian Ehrhardt <christian.ehrhardt@canonical.com>
46194         and Daniel P. Berrange <berrange@redhat.com>.
46195         * lib/unistd.in.h (getopt): Don't attempt to avoid namespace pollution
46196         on glibc systems. The getopt-pfx-core.h file declares exactly what
46197         unistd.h needs, nothing more.
46199 2017-10-08  Bruno Haible  <bruno@clisp.org>
46201         vma-iter: Improve support for FreeBSD.
46202         * lib/vma-iter.c (vma_iterate_proc): New function, extracted from
46203         vma_iterate.
46204         (vma_iterate): Use it. For FreeBSD, try vma_iterate_bsd first.
46206 2017-10-08  Bruno Haible  <bruno@clisp.org>
46208         vma-iter: Fix truncated result on NetBSD (regression from 2017-10-07).
46209         * lib/vma-iter.c (MIN_LEFTOVER): Define to 1, not 0.
46211 2017-10-07  KO Myung-Hun  <komh@chollian.net>
46213         test-framework-sh: Fix 'invalid path dir' error.
46214         On OS/2, a path separator is ';' not ':'. And ':' is used as a
46215         separator between a drive letter and directory parts.
46216         As a result, an absolute path such as x:/path/to/dir on OS/2 is
46217         treated as an invalid path dir.
46218         * tests/init.sh (PATH_SEPARATOR): Set at startup.
46219         (path_prepend_): '?:*' is also an absolute path. Use $PATH_SEPARATOR
46220         instead of hard coded ':'.
46222 2017-10-07  Bruno Haible  <bruno@clisp.org>
46224         vma-iter: Fix truncated result on Linux (regression from 2017-09-26).
46225         * lib/vma-iter.c (MIN_LEFTOVER): New macro.
46226         (STACK_ALLOCATED_BUFFER_SIZE): Set to a minimal value if not needed.
46227         (rof_open): On Linux, do multiple read() calls and make sure
46228         MIN_LEFTOVER bytes are left when read() returns.
46230 2017-10-07  Bruno Haible  <bruno@clisp.org>
46232         vma-iter: Improve support for GNU/Hurd.
46233         * lib/vma-iter.c (vma_iterate): On GNU/Hurd, use the Mach vm_region()
46234         API, not the /proc file system.
46236 2017-10-07  Bruno Haible  <bruno@clisp.org>
46238         test-framework-sh: Don't require bash on Windows and OS/2.
46239         Reported by KO Myung-Hun.
46240         * tests/test-init.sh: Use 'shopt' only when running in bash.
46242 2017-10-06  KO Myung-Hun  <komh@chollian.net>
46244         wcwidth: check a macro version of wcwidth () as well
46245         * lib/wchar.in.h: Revert commit from 2016-01-14.
46246         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Test if wcwidth is a macro.
46248 2017-10-06  Bruno Haible  <bruno@clisp.org>
46250         getopt-posix: Clarify copyright header.
46251         * lib/getopt.in.h: Don't state that gnulib is under LGPL.
46252         * lib/getopt-pfx-core.h: Likewise.
46253         * lib/getopt-pfx-ext.h: Likewise.
46254         * lib/getopt-cdefs.in.h: Likewise.
46256 2017-10-03  Bruno Haible  <bruno@clisp.org>
46258         Fix warning "`gl_HOST_CPU_C_ABI' was expanded before it was required".
46259         * modules/host-cpu-c-abi (configure.ac): Require, don't invoke
46260         gl_HOST_CPU_C_ABI.
46262 2017-10-03  Bruno Haible  <bruno@clisp.org>
46264         doc: warn about misuse of strncpy and wcsncpy.
46265         * doc/posix-functions/strcpy.texi: Describe requirements on prior
46266         memory allocation.
46267         * doc/posix-functions/wcscpy.texi: Likewise.
46268         * doc/posix-functions/strncpy.texi: Describe what this function is not
46269         useful for.
46270         * doc/posix-functions/wcsncpy.texi: Likewise.
46272 2017-10-02  Paul Eggert  <eggert@cs.ucla.edu>
46274         fsuage: fix typo in previous change
46275         * lib/fsusage.c: Remove stray include of full-read.h.
46276         Problem reported by Sam Steingold for macOS (Bug#28669).
46278 2017-10-01  Paul Eggert  <eggert@cs.ucla.edu>
46280         fsusage: remove SVR2 support
46281         SVR2 was obsolete by 1986 and is no longer supported by anybody,
46282         and its code was getting in the way of use of this module by
46283         Emacs, which has its own ‘read’ function anyway.
46284         * lib/fsusage.c: Do not include sys/filsys.h.
46285         (get_fs_usage): Remove SVR2-specific code.
46286         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE):
46287         Do not test for sys/filsys.h or set STAT_READ_FILSYS.
46288         * modules/fsusage (Depends-on): Do not depend on full-read.
46290         Simplify autoupdate of licenses
46291         * config/srclistvars.sh (GNUWWWLICENSES): Move to a more-typical
46292         place.
46294 2017-10-01  Bruno Haible  <bruno@clisp.org>
46296         vma-iter: Add support for GNU/Hurd.
46297         * lib/vma-iter.c: Treat GNU/Hurd like Linux.
46298         * lib/vma-iter.h (VMA_ITERATE_SUPPORTED): Define also on GNU/kFreeBSD.
46300 2017-09-30  Bruno Haible  <bruno@clisp.org>
46302         vma-iter: Make it work on 32-bit Solaris with module 'largefile'.
46303         * modules/vma-iter: Don't test for sys/procfs.h, as this test would
46304         fail when module 'largefile' is in use.
46305         * lib/vma-iter.h (VMA_ITERATE_SUPPORTED): Don't test HAVE_SYS_PROCFS_H.
46306         * lib/vma-iter.c: Undefine _FILE_OFFSET_BITS early.
46307         Don't test HAVE_SYS_PROCFS_H.
46309 2017-09-30  Bruno Haible  <bruno@clisp.org>
46311         havelib: Make it work for CC="gcc -m32" (regression from 2017-02-19).
46312         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): Require gl_HOST_CPU_C_ABI.
46313         When $CC produces 32-bit code, set acl_libdirstem to 'lib', not 'lib64'.
46314         * modules/havelib (Depends-on): Add host-cpu-c-abi.
46316 2017-09-30  Bruno Haible  <bruno@clisp.org>
46318         uniname/uniname: Don't assume C99 compiler (regression from 2015-02-16).
46319         * lib/uniname/uniname.c (unicode_name_character): Add braces around
46320         scope of local variables.
46322 2017-09-28  Bruno Haible  <bruno@clisp.org>
46324         string: code style
46325         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Reorder list of
46326         substitutable variables.
46327         * modules/string (Makefile.am): Likewise.
46329 2017-09-26  Bruno Haible  <bruno@clisp.org>
46331         uniname/uniname-tests: Tighten code.
46332         * tests/uniname/test-uninames.c (fill_names, fill_aliases): Merge two
46333         local variables into one.
46335 2017-09-26  Bruno Haible  <bruno@clisp.org>
46337         vma-iter: Improvements for Linux and BSD platforms.
46338         - Add support for DragonFly BSD.
46339         - Make it more reliable on Linux, GNU/kFreeBSD, FreeBSD, NetBSD.
46340         * lib/vma-iter.c (struct rofile, rof_open, rof_peekchar, rof_close):
46341         Read the entire file into memory in a single system call.
46342         (vma_iterate): Update. Read from /proc on DragonFly BSD like on FreeBSD.
46343         * lib/vma-iter.h (VMA_ITERATE_SUPPORTED): Define also on DragonFly BSD.
46345 2017-09-26  Bruno Haible  <bruno@clisp.org>
46347         vma-iter: Provide the protection flags on FreeBSD.
46348         * lib/vma-iter.c (vma_iterate) [FreeBSD]: When reading from /proc,
46349         skip three fields between the addresses and the protection flags.
46351 2017-09-26  Paul Eggert  <eggert@cs.ucla.edu>
46353         glob: remove bogus extern decl
46354         * lib/glob.c (__glob_pattern_type): Remove now-spurious
46355         extern declaration.  Problem reported by Adhemerval Zanella in:
46356         https://sourceware.org/ml/libc-alpha/2017-09/msg00972.html
46358 2017-09-25  Paul Eggert  <eggert@cs.ucla.edu>
46360         uniname/uniname-tests: integer overflow fix
46361         * tests/uniname/test-uninames.c (fill_names, fill_aliases):
46362         Check for integer overflow.
46364         duplocale-tests: fix unlikely crash
46365         * tests/test-duplocale.c (get_locale_dependent_values):
46366         Don’t crash with absurdly long month names.
46368         maint: fix overflow checking in nap.h
46369         * modules/chown-tests:
46370         * modules/fchownat-tests, modules/fdutimensat-tests:
46371         * modules/futimens-tests, modules/lchown-tests:
46372         * modules/stat-time-tests, modules/utime-tests:
46373         * modules/utimens-tests, modules/utimensat-tests:
46374         Depend on intprops.
46375         * tests/nap.h: Include intprops.h.
46376         (diff_timespec): Handle overflow properly.
46378         sys_types: update URL
46379         * m4/sys_types_h.m4: Use https: URL.
46381         parse-datetime: fix dependency
46382         * modules/parse-datetime (Depends-on): Depend
46383         on nstrftime, not strftime.
46385         parse-datetime, posixtm: avoid uninit access
46386         * lib/parse-datetime.y (parse_datetime2):
46387         * lib/posixtm.c (posixtime):
46388         Do not access uninitialized storage, even though the resulting
46389         value is never used.
46391 2017-09-25  Bruno Haible  <bruno@clisp.org>
46393         vma-iter: Improvements for BSD platforms.
46394         - Add support for GNU/kFreeBSD.
46395         - Make it work on FreeBSD and NetBSD even when /proc is not mounted.
46396         - Speed up on OpenBSD.
46397         * lib/vma-iter.c (struct rofile, rof*): Define also on GNU/kFreeBSD.
46398         (vma_iterate_bsd): New function.
46399         (vma_iterate): Use it as fallback on FreeBSD and NetBSD. Use it as
46400         first choice on OpenBSD. Treat GNU/kFreeBSD like Linux.
46401         * lib/vma-iter.h (VMA_ITERATE_SUPPORTED): Define also on GNU/kFreeBSD.
46402         * modules/vma-iter (configure.ac): Require AC_C_INLINE.
46404 2017-09-23  Bruno Haible  <bruno@clisp.org>
46406         strfmon_l: New module.
46407         * modules/strfmon_l: New file.
46408         * lib/strfmon_l.c: New file.
46409         * m4/strfmon_l.m4: New file.
46410         * doc/posix-functions/strfmon_l.texi: Mention the new module.
46411         * modules/strfmon_l-tests: New file.
46412         * tests/test-strfmon_l.c: New file.
46414         monetary: New module.
46415         * modules/monetary: New file.
46416         * lib/monetary.in.h: New file.
46417         * m4/monetary_h.m4: New file.
46418         * doc/posix-headers/monetary.texi: Mention the new module.
46419         * modules/monetary-tests: New file.
46420         * tests/test-monetary.c: New file.
46421         * modules/monetary-c++-tests: New file.
46422         * tests/test-monetary-c++.cc: New file.
46423         * modules/duplocale-tests (configure.ac): Use AC_CHECK_HEADERS_ONCE.
46425 2017-09-23  Bruno Haible  <bruno@clisp.org>
46427         duplocale tests: Fix test crash on Linux/x86.
46428         * tests/test-duplocale.c (test_with_uselocale): Disconnect the mixed2
46429         locale from the current thread before freeing it.
46431 2017-09-21  Paul Eggert  <eggert@cs.ucla.edu>
46433         mktime: port to OpenVMS
46434         Problem reported by John E. Malmberg in:
46435         https://lists.gnu.org/r/bug-gnulib/2017-09/msg00100.html
46436         * m4/mktime.m4 (TIME_T_IS_SIGNED): Default to 0.
46438 2017-09-16  Paul Eggert  <eggert@cs.ucla.edu>
46440         manywarnings: port to GCC on 64-bit MS-Windows
46441         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Work better if
46442         LONG_MAX < PTRDIFF_MAX.  Problem reported by Richard Copley in:
46443         https://lists.gnu.org/r/emacs-devel/2017-09/msg00392.html
46445 2017-09-13  Bruno Haible  <bruno@clisp.org>
46447         all: Replace many more http URLs by https URLs. Update stale URLs.
46448         * users.txt: Remove mention of 'newts'.
46449         * lib/localename.c: Update comment about LANG_SOTHO.
46451 2017-09-13  Paul Eggert  <eggert@cs.ucla.edu>
46453         all: Replace many http URLs by https URLs.
46455 2017-09-12  Bruno Haible  <bruno@clisp.org>
46457         doc: Prefer https URLs where possible.
46458         * doc/**/*.texi: Use https URLs instead of http URLs where possible.
46459         * doc/ld-output-def.texi: Remove unavailable URL.
46461 2017-09-12  Paul Eggert  <eggert@cs.ucla.edu>
46463         maintainer-makefile: FTP -> HTTPS
46464         * top/maint.mk (url_dir_list, ftp-gnu): Use HTTPS protocol instead
46465         of FTP, which is planned to be decommissioned on 2017-11-01.
46467 2017-09-12  Tim Rühsen  <tim.ruehsen@gmx.de>  (tiny change)
46469         libc-config: Fix __GNUC_PREREQ macro.
46470         * lib/libc-config.h (__GNUC_PREREQ): Use __GNUC_MINOR__, not
46471         __GNUC_MINOR.
46473 2017-09-09  Bruno Haible  <bruno@clisp.org>
46475         gnulib-tool: Simplify commit from 2015-08-20.
46476         * gnulib-tool (func_add_or_update): Remove local variable
46477         is_binary_file.
46479 2017-09-08  Bruno Haible  <bruno@clisp.org>
46481         stddef: Avoid conflict with system-defined max_align_t.
46482         The configure-determined HAVE_MAX_ALIGN_T may not always be accurate.
46483         Reported by Werner Lemberg <wl@gnu.org> in
46484         <https://lists.gnu.org/r/bug-gnulib/2017-08/msg00185.html>.
46485         * lib/stddef.in.h (rpl_max_align_t): Renamed from max_align_t.
46486         (max_align_t): Define as a macro.
46487         (GNULIB_defined_max_align_t): New macro. Guards against multiple
46488         definitions of rpl_max_align_t in different copies of gnulib-generated
46489         <stddef.h>.
46491 2017-09-05  Paul Eggert  <eggert@cs.ucla.edu>
46493         libc-config: port to MSVC
46494         Problems reported by Gisle Vanem in:
46495         http://lists.gnu.org/r/bug-gnulib/2017-09/msg00016.html
46496         * lib/libc-config.h (__inline): Don't define if HAVE___INLINE.
46497         (libc_hidden_proto): Stick to Standard C syntax for varargs macro.
46498         * m4/__inline.m4: New file.
46499         * modules/libc-config (Files): Add it.
46500         (Depends-on): Use it.
46502         glob: Use enum for __glob_pattern_type result
46503         From a patch proposed by Adhemerval Zanella in:
46504         https://sourceware.org/ml/libc-alpha/2017-09/msg00212.html
46505         * lib/glob_internal.h (GLOBPAT_NONE, GLOBPAT_SPECIAL)
46506         (GLOBPAT_BACKSLASH, GLOBPAT_BRACKET): New constants.
46507         * lib/glob_internal.h (__glob_pattern_type):
46508         * lib/glob.c (glob):
46509         * lib/glob_pattern_p.c (__glob_pattern_p):
46510         Use them.
46512         glob: fix for use in glibc
46513         Problem reported by Adhemerval Zanella in:
46514         https://sourceware.org/ml/libc-alpha/2017-09/msg00213.html
46515         * lib/glob.c (DT_UNKNOWN, DT_DIR, DT_LINK):
46516         Do not redefine if _LIBC.
46518 2017-09-02  Paul Eggert  <eggert@cs.ucla.edu>
46520         glob: fix bugs with long login names
46521         Problem reported by Adhemerval Zanella in:
46522         https://sourceware.org/ml/libc-alpha/2017-08/msg00455.html
46523         * lib/glob.c (GET_LOGIN_NAME_MAX): Remove.
46524         (glob): Use the same scratch buffer for both getlogin_r and
46525         getpwnam_r.  Don’t require preallocation of the login name.  This
46526         simplifies storage allocation, and corrects the handling of
46527         long login names.
46529 2017-09-02  Bruno Haible  <bruno@clisp.org>
46531         dirent: Update doc.
46532         * doc/posix-headers/dirent.texi: More concrete list of platforms.
46534 2017-09-02  Paul Eggert  <eggert@cs.ucla.edu>
46536         glob: fix getpwnam_r errno typo
46537         * lib/glob.c (glob): Fix longstanding misuse of errno after
46538         getpwnam_r, which returns an error number rather than setting
46539         errno.
46541         glob: fix typo in recent change
46542         * lib/glob.c (glob) [!HAVE_GETPWNAM_R && !_LIBC]:
46543         Fix recently-introduced typo.
46545 2017-09-02  Paul Eggert  <eggert@cs.ucla.edu>
46547         glob: don't save and restore errno unnecessarily
46548         * lib/glob.c (glob): Don't save and restore errno
46549         merely because we have getpwnam_r.
46551         glob: don't assume getpwnam_r
46552         * lib/glob.c (glob): Port recent patches to platforms
46553         lacking getpwnam_r.
46555         scratch_buffer: don’t use private glibc API
46556         Suggested by Florian Weimer in:
46557         http://lists.gnu.org/r/bug-gnulib/2017-09/msg00004.html
46558         * lib/scratch_buffer.h: Rename to lib/malloc/scratch_buffer.h.
46559         * lib/scratch_buffer_grow.c: Rename to
46560         lib/malloc/scratch_buffer_grow.c.
46561         * lib/scratch_buffer_grow_preserve.c: Rename to
46562         lib/malloc/scratch_buffer_grow_preserve.c.
46563         * lib/scratch_buffer_set_array_size.c: Rename to
46564         lib/malloc/scratch_buffer_set_array_size.c.
46565         * lib/scratch_buffer.h: New file.
46566         * modules/scratch_buffer (Files, Makefile.am):
46567         Adjust to source-file renaming.
46569 2017-09-01  Paul Eggert  <eggert@cs.ucla.edu>
46571         glob: use scratch_buffer instead of extend_alloca
46572         Much of the lib/glob.c part of this patch comes from a glibc patch
46573         proposed by Adhemerval Zanella in:
46574         https://sourceware.org/ml/libc-alpha/2017-08/msg00456.html
46575         * lib/glob.c: Do not include <config.h>, since <libc-config.h>,
46576         included via glob.h, does this for us now.
46577         (__set_errno): Remove, as libc-config does this for us now.
46578         Include <scratch_buffer.h>.
46579         (GETPW_R_SIZE_MAX): Remove.
46580         (glob): Use struct scratch_buffer instead of extend_alloca.
46581         * lib/glob.in.h: Include libc-config.h rather than
46582         including <sys/cdefs.h> conditionally.
46583         (__BEGIN_DECLS, __END_DECLS, __THROW, __THROWNL, attribute_hidden)
46584         (__glibc_unlikely, __restrict, weak_alias):
46585         Remove, as libc-config does this for us now.
46586         * m4/glob.m4 (gl_PREREQ_GLOB):
46587         Remove sys/cdefs.h tests; no longer needed.
46588         * modules/glob (Depends-on): Add libc-config, scratch_buffer.
46589         (glob.h): Do not replace HAVE_SYS_CDEFS_H.
46591         scratch_buffer: new module
46592         * lib/scratch_buffer.h, lib/scratch_buffer_grow.c:
46593         * lib/scratch_buffer_grow_preserve.c:
46594         * lib/scratch_buffer_set_array_size.c:
46595         New files, copied from glibc with very minor changes that can be
46596         copied back.
46597         * modules/scratch_buffer: New file.
46599         libc-config: new module
46600         * MODULES.html.sh: Add libc-config.
46601         * lib/cdefs.h: New file, copied from the GNU C Library with very
46602         minor changes that can be copied back.
46603         * lib/libc-config.h, modules/libc-config: New files.
46605 2017-08-31  Paul Eggert  <eggert@cs.ucla.edu>
46607         glob: match dangling symlinks
46608         This fixes a bug I inadvertently introduced to Gnulib when I
46609         merged glibc glob back into gnulib on 2007-10-16.  This fix is
46610         inspired by a patch proposed for glibc by Adhemerval Zanella in:
46611         https://sourceware.org/ml/libc-alpha/2017-08/msg00446.html
46612         * doc/posix-functions/glob.texi: Update list of affected platforms.
46613         * lib/glob.c (__lstat64): New macro.
46614         (is_dir): New function.
46615         (glob, glob_in_dir): Match symlinks even if they are dangling.
46616         (link_stat, link_exists_p): Remove.  All uses removed.
46617         * lib/glob.in.h (__attribute_noinline__): Remove; no longer used.
46618         * m4/glob.m4 (gl_PREREQ_GLOB): Do not check for fstatat.
46619         * modules/glob-tests (Depends-on): Add symlink.
46620         * tests/test-glob.c: Include errno.h, unistd.h.
46621         (BASE): New macro.
46622         (main): Test dangling symlinks, if symlinks are supported.
46624         glob, backupfile: inode 0 is a valid inode number
46625         * doc/posix-functions/readdir.texi (readdir):
46626         * doc/posix-headers/dirent.texi (dirent.h):
46627         Document more readdir portability issues.
46628         * lib/backupfile.c (REAL_DIR_ENTRY): Remove.
46629         (numbered_backup): Don’t treat inode 0 any differently from
46630         other inode values.
46631         * lib/glob.c (struct readdir_result): Remove skip_entry member.
46632         (readdir_result_skip_entry, D_INO_TO_RESULT): Remove.
46633         All uses removed.
46634         * modules/glob (Depends-on): Remove d-ino.
46636         glob: simplify symlink detection
46637         * lib/glob.c (dirent_type): New type.  Use uint_fast8_t not
46638         uint8_t, as C99 does not require uint8_t.
46639         (struct readdir_result): Use it.  Do not define skip_entry unless
46640         it is needed; this saves a byte on platforms lacking d_ino.
46641         (readdir_result_type, readdir_result_skip_entry):
46642         New functions, replacing ...
46643         (readdir_result_might_be_symlink, readdir_result_might_be_dir):
46644         ... these functions, which were removed.  This makes the callers
46645         easier to read.  All callers changed.
46646         (D_INO_TO_RESULT): Now empty if there is no d_ino.
46648 2017-08-30  Pádraig Brady  <P@draigBrady.com>
46650         fts-tests: tag as a longrunning-test so not included by default
46651         * modules/fts-tests: This test takes about 20s on current systems,
46652         and uses about 285M of space on ext4.
46654 2017-08-30  Pádraig Brady  <P@draigBrady.com>
46656         renameat2: fix compilation on alpine linux
46657         * m4/renameat.m4: Check for <linux/fs.h> presence.
46658         * lib/renameat2.h: Only include <linux/fs.h> if present.
46659         Reported by Assaf Gordon on Alpine Linux.
46661 2017-08-24  Paul Eggert  <eggert@cs.ucla.edu>
46663         glob: try to port recent changes to MS-Windows
46664         Problem reported by Bruno Haible in:
46665         http://lists.gnu.org/r/bug-gnulib/2017-08/msg00170.html
46666         * lib/glob.c (__glob_pattern_p) [!_LIBC]: Move from here ...
46667         * lib/glob.in.h (__glob_pattern_p): ... to here.
46669 2017-08-24  Eric Blake  <eblake@redhat.com>
46671         warnings: fix compilation with old autoconf
46672         * m4/warnings.m4 (gl_UNKNOWN_WARNINGS_ARE_ERRORS(C))
46673         (gl_UNKNOWN_WARNINGS_ARE_ERRORS(C++)): Use m4_defun rather than
46674         AC_DEFUN.
46675         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC(C))
46676         (gl_MANYWARN_ALL_GCC(C++)): Likewise.
46678 2017-08-24  Bruno Haible  <bruno@clisp.org>
46680         glob: Fix compilation error on NetBSD 7.0 and OpenBSD 6.0.
46681         * modules/glob (Depends-on): Add c99.
46683 2017-08-24  Paul Eggert  <eggert@cs.ucla.edu>
46685         glob: fix typo that broke platforms lacking d_ino
46686         This typo also hurt performance on GNU/Linux and similar hosts.
46687         * lib/glob.c (D_INO_TO_RESULT): Fix typo (reversed ifdef)
46688         in previous change.
46690 2017-08-23  Paul Eggert  <eggert@cs.ucla.edu>
46692         glob: merge from glibc with Zanella glob changes
46693         Merge glob from glibc, with changes for glob proposed
46694         by Adhemerval Zanella in the thread starting here:
46695         https://sourceware.org/ml/libc-alpha/2017-08/msg01079.html
46696         plus some fixes for this merge.
46697         * lib/glob_internal.h, lib/glob_pattern_p.c, lib/globfree.c:
46698         New files, ported from glibc.
46699         * lib/glob-libc.h (_Restrict_): Remove.  All uses replaced
46700         with __restrict.
46701         (__size_t): Remove.  All uses replaced by size_t.
46702         (size_t): Define by defining __need_size_t and including <stddef.h>.
46703         This should work even in non-glibc platforms, where any name
46704         pollution is OK.
46705         Use __USE_MISC instead of __USE_BSD || __USE_GNU.
46706         (struct stat64): Don’t worry about __GLOB_GNULIB.
46707         (glob, globfree, glob_pattern_p): Remove macros for
46708         __USE_FILE_OFFSET64 && __GNUC__ < 2 && !defined __GLOB_GNULIB
46709         case.  Remove _GL_ARG_NONNULL as GNU behavior is to accept NULL
46710         but set errno.
46711         * lib/glob.c (_GL_ARG_NONNULL) [!_LIBC]: Remove.  All uses
46712         removed since the glibc behavior works on null pointers.
46713         Do not include stdio.h; old SunOS is irrelevant now.
46714         Do not worry about GLOB_ONLY_P as we now mimic glibc here.
46715         Include glob_internal.h.
46716         (D_INO_TO_RESULT): Depend on (_LIBC || D_INO_IN_DIRENT), not
46717         ((POSIX || WINDOWS32) && !__GNU_LIBRARY__).  The latter probably
46718         worked only coincidentally.
46719         (attribute_hidden, __attribute_noinline__, __glibc_unlikely):
46720         Remove macros; now done in glob.in.h.
46721         (size_add_wrapv): Do not use __builtin_add_overflow if __ICC.
46722         (glob): Properly initialize glob structure with
46723         GLOB_BRACE|GLOB_DOOFFS (bug 20707).
46724         Remove old code using SHELL since Bash no longer
46725         uses this.
46726         (glob, prefix_array): Separate MS code better.
46727         (glob, glob_in_dir): Use C99 decls before statements when glibc
46728         does.
46729         (glob_in_dir): Remove old Amiga and VMS code.
46730         (globfree, __glob_pattern_type, __glob_pattern_p): Move to
46731         separate files.
46732         * lib/glob.in.h (attribute_hidden, __attribute_noinline__)
46733         (__glibc_unlikely):
46734         Move here from glob.c.
46735         (__restrict): New macro here, replacing the _Restrict_ in glob.c.
46736         (weak_alias): New macro.
46737         (__size_t): Remove.  All uses replaced by size_t.
46738         * modules/d-ino (License): Now LGPLv2+, for compatibility with glob.
46739         * modules/glob (Files): Add +lib/glob_internal.h,
46740         lib/glob_pattern_p.c, lib/globfree.c.
46741         (Depends-on): Remove snippet/arg-nonnull.
46743 2017-08-22  Paul Eggert  <eggert@cs.ucla.edu>
46745         glob: port to clang's Undefined Sanitizer
46746         Problem reported by Tim Rühsen in:
46747         http://lists.gnu.org/r/bug-gnulib/2017-08/msg00144.html
46748         * lib/glob.c (FLEXIBLE_ARRAY_MEMBER) [_LIBC]: Define to empty.
46749         (glob_in_dir): Do not rely on undefined behavior in accessing
46750         struct members beyond their bounds.  Use a flexible array member
46751         instead.
46753 2017-08-21  Paul Eggert  <eggert@cs.ucla.edu>
46755         vc-list-files: port to Solaris 10
46756         * build-aux/vc-list-files: Don't assume test -e works.
46758 2017-08-21  Karl Berry  <karl@freefriends.org>
46760         * doc/posix-functions/srandom.texi (srandom): typo }.
46762 2017-08-20  Paul Eggert  <eggert@cs.ucla.edu>
46764         git-version-gen: port to Solaris 10
46765         Problem reported by Dagobert Michelsen in:
46766         http://lists.gnu.org/r/grep-devel/2017-08/msg00002.html
46767         * build-aux/git-version-gen (v_from_git):
46768         Use expr instead of shell substitution.
46770 2017-08-19  Bruno Haible  <bruno@clisp.org>
46772         host-cpu-c-abi: Improve detection of MIPS ABI.
46773         * m4/host-cpu-c-abi.m4 (gl_HOST_CPU_C_ABI): For MIPS, test the value of
46774         _MIPS_SIM.
46776 2017-08-17  Bruno Haible  <bruno@clisp.org>
46778         hypot tests: Fix test failure on FreeBSD 11.0/x86.
46779         * tests/test-hypot.h (test_function): Declare z as 'volatile'.
46781 2017-08-17  Bruno Haible  <bruno@clisp.org>
46783         float: Fix LDBL_MIN value on FreeBSD/x86.
46784         * lib/float.in.h (LDBL_MIN) [__FreeBSD__]: Add more precision.
46786 2017-08-17  Bruno Haible  <bruno@clisp.org>
46788         random: Fix test compilation failure on Cygwin 1.5.25.
46789         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize HAVE_DECL_INITSTATE,
46790         HAVE_DECL_SETSTATE.
46791         * m4/random.m4 (gl_FUNC_RANDOM): Test whether initstate and setstate are
46792         declared.
46793         * modules/stdlib (Makefile.am): Substitute HAVE_DECL_INITSTATE,
46794         HAVE_DECL_SETSTATE.
46795         * lib/stdlib.in.h (initstate): Declare also if HAVE_DECL_INITSTATE is 0.
46796         (setstate): Declare also if HAVE_DECL_SETSTATE is 0.
46797         * doc/posix-functions/initstate.texi: Mention the Cygwin 1.5.x problem.
46798         * doc/posix-functions/random.texi: Likewise.
46799         * doc/posix-functions/setstate.texi: Likewise.
46800         * doc/posix-functions/srandom.texi: Likewise.
46802 2017-08-16  Bruno Haible  <bruno@clisp.org>
46804         stdnoreturn: Fix test compilation failure on Cygwin.
46805         * m4/stdnoreturn.m4 (gl_STDNORETURN_H): On Cygwin, use gnulib's
46806         <stdnoreturn.h> replacement.
46807         * lib/stdnoreturn.in.h (noreturn): Treat Cygwin like MSVC.
46808         * doc/posix-headers/stdnoreturn.texi: Mention the Cygwin problem.
46810 2017-08-16  Bruno Haible  <bruno@clisp.org>
46812         thread: Fix conflict with pthread_sigmask module.
46813         * lib/glthread/thread.h (pthread_sigmask): Don't declare it weak if
46814         it's defined as a macro.
46815         * modules/thread (Depends-on): Add pthread_sigmask.
46817 2017-08-16  Paul Eggert  <eggert@cs.ucla.edu>
46819         rename: port better to NetBSD
46820         * doc/posix-functions/rename.texi (rename): NetBSD 7
46821         does not have the link-count bug.
46822         * m4/rename.m4 (gl_FUNC_RENAME): Don’t consider NetBSD to be
46823         broken merely because rename ("a", "b") removes "a" when the two
46824         names are hard links to the same file.
46826 2017-08-16  Bruno Haible  <bruno@clisp.org>
46828         iconv_open, uni*: Add support for VPATH builds with OpenBSD 'make'.
46829         * modules/iconv_open (Makefile.am): In the rules that use gperf, prefix
46830         the target file names with '$(srcdir)/'.
46831         * modules/unicase/locale-language (Makefile.am): Likewise.
46832         * modules/unicase/special-casing (Makefile.am): Likewise.
46833         * modules/unictype/bidiclass-byname (Makefile.am): Likewise.
46834         * modules/unictype/category-byname (Makefile.am): Likewise.
46835         * modules/unictype/combining-class-byname (Makefile.am): Likewise.
46836         * modules/unictype/joininggroup-byname (Makefile.am): Likewise.
46837         * modules/unictype/joiningtype-byname (Makefile.am): Likewise.
46838         * modules/unictype/property-byname (Makefile.am): Likewise.
46839         * modules/unictype/scripts (Makefile.am): Likewise.
46840         * modules/uninorm/composition (Makefile.am): Likewise.
46842 2017-08-16  Bruno Haible  <bruno@clisp.org>
46844         nonblocking-socket tests: Fix failure on OpenBSD 6.0.
46845         * tests/test-nonblocking-socket.h (SOCKET_DATA_BLOCK_SIZE): Increase
46846         value for OpenBSD.
46848 2017-08-16  Bruno Haible  <bruno@clisp.org>
46850         rename, renameat: Update doc regarding NetBSD.
46851         * doc/posix-functions/rename.texi: Clarify that when using
46852         -D_XOPEN_SOURCE=500 on NetBSD 7.0, the hard link bug is gone.
46853         * doc/posix-functions/renameat.texi: Be more precise about NetBSD
46854         version.
46856 2017-08-15  Paul Eggert  <eggert@cs.ucla.edu>
46858         renameat2: port better to macOS
46859         * lib/renameat2.c (renameat2): Use renameatx_np if available.
46861         futimens: don’t assume struct timespec layout
46862         * m4/futimens.m4 (gl_FUNC_FUTIMENS):
46863         * m4/utimensat.m4 (gl_FUNC_UTIMENSAT):
46864         * tests/test-fdutimensat.c (main):
46865         * tests/test-futimens.h (test_futimens):
46866         * tests/test-lutimens.h (test_lutimens):
46867         * tests/test-utimens.h (test_utimens):
46868         * tests/test-utimensat.c (main):
46869         Don’t assume that struct timespec is a two-member structure in
46870         tv_sec, tv_nsec order.  Although this is true on all platforms we
46871         know about, POSIX does not guarantee it.
46873         rename: document+test NetBSD rename
46874         Test failure reported by Bruno Haible in:
46875         http://lists.gnu.org/r/bug-gnulib/2017-08/msg00104.html
46876         This is an area where NetBSD is better-behaved than POSIX,
46877         so allow the NetBSD behavior in tests.
46878         * doc/posix-functions/rename.texi:
46879         * doc/posix-functions/renameat.texi: Document NetBSD behavior.
46880         * tests/test-rename.h (test_rename): Allow NetBSD behavior.
46882 2017-08-15  Bruno Haible  <bruno@clisp.org>
46884         renameat: Ensure declaration in <stdio.h> on NetBSD.
46885         * lib/stdio.in.h: Include <unistd,h> also on NetBSD.
46886         * doc/posix-functions/renameat.texi: Mention this problem.
46888 2017-08-15  Bruno Haible  <bruno@clisp.org>
46890         duplocale: Work around NetBSD 7.0 bug.
46891         * m4/duplocale.m4 (gl_FUNC_DUPLOCALE): Test against the NetBSD 7.0 bug.
46892         * lib/duplocale.c: Add comment about NetBSD problem.
46893         * doc/posix-functions/duplocale.texi: Mention the NetBSD problem.
46895 2017-08-15  Bruno Haible  <bruno@clisp.org>
46897         duplocale tests: Verify use with *_l functions.
46898         * modules/duplocale-tests (configure.ac): Test for uselocale and
46899         some *_l functions.
46900         * tests/test-duplocale.c (test_with_uselocale): New function, extracted
46901         from main.
46902         (get_locale_dependent_values_from, test_with_locale_parameter): New
46903         functions.
46904         (main): Test both test_with_uselocale and test_with_locale_parameter.
46906 2017-08-15  Bruno Haible  <bruno@clisp.org>
46908         extensions: Enable NetBSD specific extensions.
46909         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Define _NETBSD_SOURCE.
46911 2017-08-14  Bruno Haible  <bruno@clisp.org>
46913         open, openat: Update doc about O_CLOEXEC.
46914         * doc/posix-functions/open.texi: More concrete list of platforms.
46915         * doc/posix-functions/openat.texi: Likewise.
46917 2017-08-14  Paul Eggert  <eggert@cs.ucla.edu>
46919         open: support O_CLOEXEC
46920         * NEWS, doc/posix-functions/open.texi:
46921         * doc/posix-functions/openat.texi: Document this.
46922         * lib/fcntl.in.h (O_CLOEXEC): Default to a nonzero value.
46923         (GNULIB_defined_O_CLOEXEC): New symbol.
46924         * lib/open.c: Include cloexec.h.
46925         (open): Support O_CLOEXEC.
46926         * lib/openat.c: Include cloexec.h.
46927         (rpl_openat): Support O_CLOEXEC.
46928         * lib/popen-safer.c: Do not include cloexec.h.
46929         (open_noinherit): Remove.
46930         (popen_safer): Use O_CLOEXEC instead of set_cloexec_flag.
46931         * lib/save-cwd.c: Do not include cloexec.h.
46932         (save_cwd): Use O_CLOEXEC instead of set_cloexec_flag.
46933         * m4/open-cloexec.m4: New file.
46934         * m4/open.m4 (gl_FUNC_OPEN): Require gl_PREPROC_O_CLOEXEC.
46935         Replace 'open' if O_CLOEXEC is not present.
46936         * m4/openat.m4 (gl_FUNC_OPENAT): Require gl_PREPROC_O_CLOEXEC.
46937         Replace 'openat' if O_CLOEXEC is not present.
46938         * modules/freopen (Depends-on): Depend on 'open' if replacing freopen.
46939         * modules/open (Files): Add m4/open-cloexec.m4.
46940         (Depends-on): Depend on cloexec if replacing 'open'.
46941         * modules/openat (Files): Add m4/open-cloexec.m4.
46942         (Depends-on): Depend on cloexec if replacing openat.
46943         * modules/popen-safer (Depends-on): Remove cloexec.
46944         * modules/save-cwd (Depends-on): Remove cloexec, and add
46945         fd-safer-flag and 'open'.
46947 2017-08-13  Paul Eggert  <eggert@cs.ucla.edu>
46949         reallocarray: minor fixes
46950         * doc/glibc-functions/reallocarray.texi: Update version numbers.
46951         * m4/reallocarray.m4 (gl_FUNC_REALLOCARRAY): Don't trust _cv_ contents.
46952         * modules/reallocarray (License): Change from GPL to LGPL.
46953         * tests/test-reallocarray.c (main): Fix ENOMEM typo.
46954         Indent properly and don't use tabs.
46956 2017-08-13  Darshit Shah  <darnir@gnu.org>
46958         reallocarray: New module
46959         reallocarray is a new function in glibc 2.26 to safely allocate an array
46960         of memory locations with integer overflow protection.
46961         * MODULES.html.sh: Add reallocarray.
46962         * doc/glibc-functions/reallocarray.texi: Documentation for reallocarray.
46963         * lib/reallocarray.c: New file to implement module reallocarray.
46964         * lib/stdlib.in.h: Add function declarations for reallocarray.
46965         * m4/reallocarray.m4: New file.
46966         * m4/stdlib_h.m4: Declare reallocarray.
46967         * modules/reallocarray: New file.
46968         * modules/reallocarray-test: New file.
46969         * modules/stdlib: Coerce stdlib.h to export reallocarray.
46970         * tests/test-reallocarray.c: New test.
46972 2017-08-12  Paul Eggert  <eggert@cs.ucla.edu>
46974         dirent-safer: fix cloexec race
46975         * lib/opendir-safer.c: Include fcntl.h instead of unistd-safer.h.
46976         (opendir_safer): Use F_DUPFD_CLOEXEC.
46977         * modules/dirent-safer (Depends-on): Add fcntl.  Remove unistd-safer.
46978         * tests/test-dirent-safer.c: Do not include unistd-safer.h,
46979         as it is no longer a prerequisite.  Use F_DUPFD_CLOEXEC
46980         instead of dup_safer.
46982         fts: fix cloexec races
46983         * lib/fts.c [!_LIBC]: Do not include dirent--.h, unistd--.h, cloexec.h.
46984         (opendirat, diropen): Use O_CLOEXEC instead of set_cloexec_flag.
46985         (fts_build): Use F_DUPD_CLOEXEC rinstad of set_cloexec_flag.
46986         (fd_ring_check): Set cloexec flag on new file descriptors.
46987         (fts_build, fd_ring_check): While we’re at it, make sure the
46988         resulting file descriptor is not 0, 1, or 2, since that is easy.
46990 2017-08-11  Bruno Haible  <bruno@clisp.org>
46992         fts tests: Fix link error.
46993         Reported by Tom G. Christensen in
46994         https://lists.gnu.org/r/bug-gnulib/2017-08/msg00078.html
46995         * modules/fts-tests (Makefile.am): Link test-fts against LIBINTL.
46997 2017-08-10  Paul Eggert  <eggert@cs.ucla.edu>
46999         fts: port recent changes to CentOS 6
47000         Problem reported by Tom G. Christensen in:
47001         http://lists.gnu.org/r/bug-gnulib/2017-08/msg00064.html
47002         * lib/fts.c (fsword): New type.
47003         (struct dev_type, filesystem_type): Use it.
47004         * m4/fts.m4 (gl_FUNC_FTS_CORE): Check for __fsword_t.
47005         Also, check for f_type only if fstatfs and sys/vfs.h work.
47007 2017-08-09  Paul Eggert  <eggert@cs.ucla.edu>
47009         tempname: do not depend on secure_getenv
47010         Excess dependency noted by Eli Zaretskii (Bug#28023#17).
47011         * lib/tempname.c (__secure_getenv) [!_LIBC]: Remove; unused.
47012         * modules/tempname (Depends-on): Remove secure_getenv.
47014 2017-08-08  Paul Eggert  <eggert@cs.ucla.edu>
47016         extensions: add _OPENBSD_SOURCE
47017         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Define _OPENBSD_SOURCE.
47019 2017-08-06  Reuben Thomas  <rrt@sc3d.org>
47020             Bruno Haible  <bruno@clisp.org>
47022         manywarnings: Add support for C++.
47023         * build-aux/g++-warning.spec: New file.
47024         * m4/manywarnings-c++.m4: New file.
47025         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC(C++)): New macro, that
47026         redirects to manywarnings-c++.m4.
47027         * modules/manywarnings (Files): Add m4/manywarnings-c++.m4.
47029 2017-08-06  Paul Eggert  <eggert@cs.ucla.edu>
47031         git-version-gen: another fix for tags with "-"
47032         * build-aux/git-version-gen: Improve fix for tags containing "-".
47033         Suggested by Markus Armbruster in:
47034         http://lists.gnu.org/r/bug-gnulib/2017-08/msg00034.html
47036 2017-08-06  Bruno Haible  <bruno@clisp.org>
47038         warnings, manywarnings: Add support for multiple languages, not just C.
47039         * warnings.m4 (gl_UNKNOWN_WARNINGS_ARE_ERRORS_IMPL): Renamed from
47040         gl_UNKNOWN_WARNINGS_ARE_ERRORS.
47041         (gl_UNKNOWN_WARNINGS_ARE_ERRORS(C)): New macro.
47042         (gl_UNKNOWN_WARNINGS_ARE_ERRORS(C++)): New macro.
47043         (gl_UNKNOWN_WARNINGS_ARE_ERRORS): Dispatch to
47044         gl_UNKNOWN_WARNINGS_ARE_ERRORS(_AC_LANG).
47045         (gl_WARN_ADD): Require the gl_UNKNOWN_WARNINGS_ARE_ERRORS specialization
47046         of the current language. If C++ is the current language, modify
47047         WARN_CXXFLAGS instead of WARN_CFLAGS.
47048         * manywarnings.m4 (gl_MANYWARN_ALL_GCC(C)): New macro, extracted from
47049         gl_MANYWARN_ALL_GCC.
47050         (gl_MANYWARN_ALL_GCC): Dispatch to gl_MANYWARN_ALL_GCC(_AC_LANG).
47052 2017-08-06  Markus Armbruster  <armbru@pond.sub.org>
47054         git-version-gen: Fix for tags containing '-'
47056         Really old versions of git-describe (before v1.5.0, Feb 2007)
47057         don't have the number of commits in their long format output,
47058         i.e. where modern 'git describe --abbrev=4 --match="v*"' prints
47059         "v0.1-1494-g124b9", they print "v0.1-1494-g124b9".  git-version-gen
47060         recognizes both patterns, and normalizes the old format to the new one.
47062         Unfortunately, this normalization code gets confused when the tag
47063         contains '-'.  Reproducer:
47065             $ git-tag -m test v0.2-rc1
47066             $ build-aux/git-version-gen .tarball-version; echo
47067             build-aux/git-version-gen: WARNING: git rev-list failed
47068             UNKNOWN
47070         We take exact tag "v0.2-rc1" for the old format, extract the presumed
47071         tag "v0.2" from it, then run "git rev-list v0.2..HEAD" to count
47072         commits since tha tag.  Fails, because tag "v0.2" does not exist.
47074         * git-version-gen: We could perhaps drop support for versions from
47075         more than a decade ago.  But tightening the pattern match is easy
47076         enough, so do that.  Still breaks when you use version tags ending in
47077         something matching -g????, but you arguably get what you deserve then.
47079 2017-08-05  Paul Eggert  <eggert@cs.ucla.edu>
47081         valgrind-tests: use ls, and cache
47082         * m4/valgrind-tests.m4: Test ls, not bash.
47083         Problem reported by Reuben Thomas.
47084         Also, cache the result so that it can be overridden.
47086 2017-08-04  Paul Eggert  <eggert@cs.ucla.edu>
47088         manywarnings: port to 64-bit GCC builds of Emacs
47089         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Compute max safe
47090         object size rather than hardwiring 2147483647.  This is needed to
47091         build GNU Emacs, which has one conditional (and used
47092         only-in-theory) call to malloc with a literal greater than
47093         2147483647.
47095 2017-08-04  Bruno Haible  <bruno@clisp.org>
47097         Relax the license of some modules with no runtime code.
47098         * modules/std-gnu11 (License): Set to 'unlimited'.
47099         * modules/c99 (License): Likewise.
47100         Reported by Reuben Thomas <rrt@sc3d.org>.
47101         * modules/d-ino (License): Set to 'LGPL'.
47102         * modules/host-os (License): Likewise.
47103         * modules/longlong (License): Likewise.
47105 2017-08-03  Paul Eggert  <eggert@cs.ucla.edu>
47107         renameat2: port to RHEL 7 + NFS
47108         * lib/renameat2.c (renameat2) [SYS_renameat2]:
47109         Port to RHEL 7 + NFS.  Problem reported by Ted Zlatanov in:
47110         http://lists.gnu.org/r/emacs-devel/2017-08/msg00082.html
47112 2017-08-02  Paul Eggert  <eggert@cs.ucla.edu>
47114         renameat2: port to non-renameat platforms
47115         Problem reported for MSVC-2015 by Gisle Vanem in:
47116         http://lists.gnu.org/r/bug-gnulib/2017-08/msg00001.html
47117         * lib/renameat2.c [!HAVE_RENAMEAT]: Include <sys/stat.h> here too.
47118         (renameat2) [!HAVE_RENAMEAT]: Fix typo in arg passing.
47120 2017-08-01  Paul Eggert  <eggert@cs.ucla.edu>
47122         manywarnings: port to 32-bit GCC bug
47123         Problem reported by Pino Toscano in:
47124         http://lists.gnu.org/r/bug-gnulib/2017-07/msg00150.html
47125         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Use 2**31 - 1,
47126         not 2**63 - 1, to work around the following GCC bug:
47127         https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81650
47129 2017-07-30  Paul Eggert  <eggert@cs.ucla.edu>
47131         backupfile: new function to validate backup suffix
47132         * lib/backupfile.c (set_simple_backup_suffix): New function.
47133         (backupfile_internal): Use it.
47135         canonicalize: fix EOVERFLOW commentary
47136         Problem reported by Bruno Haible in:
47137         http://lists.gnu.org/r/bug-gnulib/2017-07/msg00147.html
47138         * lib/canonicalize.c (canonicalize_filename_mode):
47139         * lib/canonicalize-lgpl.c (__realpath): Fix comments.
47141         Don't interpret EOVERFLOW to mean nonexistence
47142         * lib/fts.c (fts_stat): If lstat fails, report its errno, which
47143         may be EOVERFLOW; this is likely more useful than reporting the
47144         stat errno.
47145         * lib/glob.c (link_stat): Rename from link_exists2_p and
47146         return -1/0 instead of 0/1.  Caller changed.
47147         * lib/glob.c (link_exists_p):
47148         * lib/renameat2.c (rename_noreplace, renameat2):
47149         * lib/tempname.c (try_nocreate):
47150         If errno == EOVERFLOW then the directory entry exists, so do not
47151         act as if it does not exist.
47153         backup-rename: new module
47154         It is like backupfile, except it avoids some race conditions,
47155         and it does not output to stderr or exit.
47156         * MODULES.html.sh: Add backup-rename.
47157         * lib/backup-find.c, lib/backup-internal.h, lib/backup-rename.c:
47158         * modules/backup-rename: New files.
47159         * lib/backupfile.c: Turn this into an internals file, which
47160         contains code common to backupfile and backup_rename.  Include
47161         backupfile-internal.h instead of backupfile.h.  Do not include
47162         argmatch.h or xalloc.h: include xalloc-oversized.h.  Include
47163         renameat2.h and fcntl.h.
47164         (BACKUP_NOMEM): New constant.
47165         (numbered_backup): New args BASE_OFFSET and *DIRPP.  Do not exit
47166         on memory exhaustion; just return BACKUP_NOMEM.  Caller changed.
47167         (backupfile_internal): Rename from find_backup_file_name.
47168         Support new arg RENAME.
47169         (backup_args, backup_types, get_version, xget_version):
47170         Move to lib/backup-find.c.
47171         * lib/backupfile.h (backup_file_rename): New decl.
47172         * modules/backupfile (Files): Add lib/backup-internal.h,
47173         lib/backup-find.c.
47174         (Depends-on): Add dirfd, fcntl, renameat2.
47175         (lib_SOURCES): Add backup-find.c.
47177         renameat2: port better to older Solaris
47178         * lib/renameat2.c (renameat2): Set ret_val properly on old Solaris.
47179         Add goto to use a label, to silence picky compilers.
47181         fts-tests: port to gcc -Wwrite-strings
47182         * tests/test-fts.c (base, base_d): New static vars.
47183         (argv, remove_tree, main): Use them.
47185 2017-07-26  Reuben Thomas  <rrt@sc3d.org>
47187         relocatable-lib{,-lgpl}: improve documentation
47188         * doc/relocatable-maint.texi: Document use of relocatable-lib{,-lgpl}.
47189         Various other updates.
47191 2017-07-30  Reuben Thomas  <rrt@sc3d.org>
47192             Bruno Haible  <bruno@clisp.org>
47194         relocatable-lib{,-lgpl}: add Valgrind suppressions
47195         * lib/relocatable.valgrind: New file.
47196         * modules/relocatable-lib (Files): Add relocatable.valgrind.
47197         * modules/relocatable-lib-lgpl: Likewise.
47199 2017-07-26  Reuben Thomas  <rrt@sc3d.org>
47201         relocatable: Make the license on the sources the GPL.
47202         * lib/relocatable.h, lib/relocatable.c: Change the copyright notice from
47203         LGPL, which was a special case so that the relocatable source files
47204         could be used without gnulib-tool, to GPL. They can still be used under
47205         the LGPL, using the --lgpl option to gnulib-tool.
47207 2017-07-30  Bruno Haible  <bruno@clisp.org>
47209         host-cpu-c-abi: Detect ILP32 ABI on IA-64 HP-UX.
47210         * m4/host-cpu-c-abi.m4 (gl_HOST_CPU_C_ABI): Distinguish ia64-ilp32
47211         from ia64. For arm64, test only __aarch64__, as __ARM_64BIT_STATE and
47212         __ARM_PCS_AAPCS64 are not reliable indicators: they are not defined on
47213         Ubuntu 14.04 (gcc 4.8.4) and Debian 8 (gcc 4.9.2).
47215 2017-07-27  Paul Eggert  <eggert@cs.ucla.edu>
47217         faccessat: document AT_SYMLINK_NOFOLLOW issue
47218         * doc/posix-functions/faccessat.texi: Modernize platform list.
47219         Document AT_SYMLINK_NOFOLLOW limitation.
47221         renameat2: port to Solaris 10
47222         * lib/renameat2.c (rename_noreplace): Use lstat, not faccessat
47223         with AT_SYMLINK_NOFOLLOW (which is not portable).
47224         (renameat): Undef before using, to avoid endless recursion when
47225         the replacement renameat calls renameat2 which calls the
47226         replacement renameat.
47227         (renameat2): Use lstatat, not faccessat with AT_SYMLINK_NOFOLLOW.
47228         * modules/renameat2 (Depends-on): Remove faccessat.
47229         * modules/renameat-tests (test_renameat_LDADD):
47230         * modules/renameat2-tests (test_renameat2_LDADD):
47231         Remove $(LIB_EACCESS).
47233         renameat2: new module
47234         Although the Linux syscall renameat2 is not in glibc (yet?), it is
47235         useful to have access to its RENAME_NOREPLACE flag.
47236         * MODULES.html.sh (func_all_modules): Add renameat2.
47237         * lib/renameat2.c, lib/renameat2.h, modules/renameat2:
47238         * modules/renameat2-tests, tests/test-renameat2.c: New files.
47239         * lib/renameat.c (renameat): Move most of the implementation
47240         to renameat2, and just call renameat2.
47241         * modules/renameat (Files): Remove lib/at-func2.c.
47242         (Depends-on): Depend only on renameat2.
47243         (Include): Remove <fcntl.h>.
47244         * modules/renameat-tests (test_renameat_LDADD): Add $(LIB_EACCESS),
47245         since renameat (via renameat2) might use faccessat.
47247 2017-07-27  Erik Skultety <eskultet@redhat.com>  (tiny change)
47249         vc-list-files: Adjust the script to support git worktrees
47250         * build-aux/vc-list-files: Require existence, not directory.
47252 2017-07-26  Paul Eggert  <eggert@cs.ucla.edu>
47254         doc: bring MODULES.html.sh up to date
47255         Somehow a few months ago we stopped updating MODULES.html.sh.
47256         I don’t recall explicitly deciding this, so I updated it now.
47257         Alternatively I suppose we could remove it.
47258         * MODULES.html.sh: Add builtin-expect, c99, ctime, explicit_bzero,
47259         localtime, localtime-buffer, noreturn, nstrftime, strftime-fixes,
47260         truncate, utime, utime-h, windows-stat-inodes,
47261         windows-stat-override, windows-stat-timespec, year2038.  Sort.
47263 2017-07-26  Jim Meyering  <meyering@fb.com>
47265         fprintftime: fix build-break caused by recent renaming
47266         * lib/fprintftime.c: Include "nstrftime.c", not the now-renamed
47267         "strftime.c".
47268         * modules/fprintftime: Depend directly on nstrftime.
47270 2017-07-26  Paul Eggert  <eggert@cs.ucla.edu>
47272         regex: work with GCC7's -Werror=implicit-fallthrough=
47273         * lib/regex_internal.h (FALLTHROUGH): New macro.
47274         * lib/regcomp.c (peek_token_bracket, parse_expression):
47275         * lib/regexec.c (check_node_accept): Use it.
47277 2017-07-24  Paul Eggert  <eggert@cs.ucla.edu>
47279         fts: simplify fts_build
47280         * lib/fts.c (fts_build): Simplify, and be lazier about
47281         calling leaf_optimization.
47283         fts: three levels of leaf optimization
47284         * lib/fts.c (enum leaf_optimization): New type with three values.
47285         (S_MAGIC_AFS): New macro.  Sort them.
47286         (leaf_optimization): Rename from leaf_optimization_applies, and
47287         return enum leaf_optimization instead of bool.  All uses changed.
47288         Add cases for unknown type and for AFS.
47289         (fts_build): Don’t rely on link counts if NO_LEAF_OPTIMIZATION.
47291         fts: cache dirent_inode_sort_may_be_useful too
47292         * lib/fts.c (struct dev_type): New struct.
47293         (DEV_TYPE_HT_INITIAL_SIZE): New constant.
47294         (dev_type_hash, dev_type_compare, filesystem_type): New functions.
47295         (dirent_inode_sort_may_be_useful, leaf_optimization_applies):
47296         Now takes FTSENT const *, not int.  All uses changed.  Use
47297         filesystem_type to cache.
47298         (link_count_optimize_ok): Remove.  Caller changed to use
47299         leaf_optimization_applies, which now uses shared cache.
47301         fts: introduce MIN_DIR_NLINK
47302         * lib/fts.c (MIN_DIR_NLINK): New constant.
47303         Use it instead of 2, whenever we are talking about link counts.
47305         fts: nlink_t signedness fixups
47306         * lib/fts.c (fts_open): Set rootparent n_dirs_remaining to -1
47307         so that root need not be a special case later.
47308         (fts_read): Remove now-redundant test for fts_level.
47309         Do not assume that nlink_t is signed.
47310         (fts_build): Remove useless decrement of nlinks.
47311         (fts_stat): Avoid unlikely signed integer overflow later, if
47312         nlink_t is signed.
47314         fts-tests: new module
47315         * modules/fts-tests, tests/test-fts.c: New files.
47317 2017-07-23  Bruno Haible  <bruno@clisp.org>
47319         Rename module 'strftime' to 'nstrftime'.
47320         * m4/nstrftime.m4: Renamed from m4/strftime.m4.
47321         * lib/nstrftime.c: Renamed from lib/strftime.c.
47322         * modules/nstrftime: Renamed from modules/strftime.
47323         (Files, Makefile.am): Update.
47324         * tests/test-nstrftime.c: Renamed from tests/test-strftime.c.
47325         Fix comment.
47326         * modules/nstrftime-tests: Renamed from modules/strftime-tests.
47327         (Files, Makefile.am): Update.
47328         * modules/strftime: New file, an obsolete indirection.
47329         * doc/posix-functions/strftime.texi: Update reference.
47330         * config/srclist.txt: Update info.
47331         * NEWS: Mention the change.
47333 2017-07-21  Tim Rühsen  <tim.ruehsen@gmx.de>
47335         malloca: Silence a warning from clang's memory sanitizer.
47336         * lib/malloca.c (NO_SANITIZE_MEMORY): New macro.
47337         (freea): Use it.
47339 2017-07-18  Bruno Haible  <bruno@clisp.org>
47341         host-cpu-c-abi: Fix detection of MIPS ABI.
47342         * m4/host-cpu-c-abi.m4 (gl_HOST_CPU_C_ABI): For MIPS, really test the
47343         ABI, not the CPU instruction set.
47345 2017-07-16  Paul Eggert  <eggert@cs.ucla.edu>
47347         explicit_bzero: new module
47348         The explicit_bzero function has been added to glibc.
47349         This module is intended to supports its use in GNU programs.
47350         * doc/glibc-functions/explicit_bzero.texi, lib/explicit_bzero.c:
47351         * m4/explicit_bzero.m4, modules/explicit_bzero:
47352         New files.
47353         * doc/gnulib.texi (Glibc string.h): Link to new doc.
47354         * lib/string.in.h (explicit_bzero): Declare.
47355         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Add defaults for it.
47356         * modules/string (string.h): Substitute its vars.
47358 2017-07-16  Bruno Haible  <bruno@clisp.org>
47360         threadlib: Support static linking.
47361         * m4/threadlib.m4 (gl_THREADLIB_BODY): When static linking is in use,
47362         set gl_cv_have_weak to 'no'.
47364 2017-07-16  Bruno Haible  <bruno@clisp.org>
47366         unicase/locale-language: Fix link dependencies.
47367         * modules/unicase/locale-language (Link): New section.
47368         * modules/unicase/locale-language-tests (Makefile.am): Link
47369         test-locale-language program with $(LIBTHREAD).
47371 2017-07-15  John E. Malmberg  <wb8tyw@gmail.com>
47373         sys_socket: Add support for OpenVMS.
47374         * lib/sys_socket.in.h [__VMS]: Define CMSG_SPACE, CMSG_LEN.
47375         * doc/posix-headers/sys_socket.texi: Mention OpenVMS issues.
47377 2017-07-15  John E. Malmberg  <wb8tyw@gmail.com>
47379         sys_resource: Add support for OpenVMS.
47380         * lib/resource.in.h [__VMS]: Define RUSAGE_SELF, RUSAGE_CHILDREN.
47381         * doc/posix-headers/sys_resource.texi: Mention OpenVMS issues.
47383 2017-07-15  John E. Malmberg  <wb8tyw@gmail.com>
47384             Bruno Haible  <bruno@clisp.org>
47386         math: Add support for OpenVMS.
47387         * lib/math.in.h [__VMS]: Include <fp.h>.
47388         * doc/posix-headers/math.texi: Mention OpenVMS issues.
47390 2017-07-15  Bruno Haible  <bruno@clisp.org>
47392         getdtablesize: Add minimal support for OpenVMS.
47393         Reported by John E. Malmberg <wb8tyw@qsl.net>.
47394         * modules/getdtablesize (Description): Fix.
47395         * lib/getdtablesize.c: Fix comment.
47396         * m4/getdtablesize.m4 (gl_FUNC_GETDTABLESIZE): Don't replace the
47397         getdtablesize() function, even though the test fails.
47398         * doc/glibc-functions/getdtablesize.texi: Reference SUSv2. Describe
47399         limitation on OpenVMS.
47401 2017-07-13  Bruno Haible  <bruno@clisp.org>
47403         Revisit cross-compilation guesses.
47404         * m4/wctype_h.m4 (gl_WCTYPE_H): Add comment.
47406 2017-07-13  Bruno Haible  <bruno@clisp.org>
47408         Improve cross-compilation guesses for native Windows.
47409         * m4/btowc.m4 (gl_FUNC_BTOWC): Add cross-compilation guess for native
47410         Windows.
47411         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Likewise.
47412         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Likewise.
47413         * m4/canonicalize.m4 (gl_FUNC_REALPATH_WORKS): Likewise.
47414         * m4/cbrtf.m4 (gl_FUNC_CBRTF_WORKS): Likewise.
47415         * m4/cbrtl.m4 (gl_FUNC_CBRTL, gl_FUNC_CBRTL_WORKS): Likewise.
47416         * m4/ceil.m4 (gl_FUNC_CEIL): Likewise.
47417         * m4/ceilf.m4 (gl_FUNC_CEILF): Likewise.
47418         * m4/ceill.m4 (gl_FUNC_CEILL): Likewise.
47419         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
47420         * m4/dup.m4 (gl_FUNC_DUP): Likewise.
47421         * m4/expl.m4 (gl_FUNC_EXPL): Likewise.
47422         * m4/exp2.m4 (gl_FUNC_EXP2_WORKS): Likewise.
47423         * m4/exp2l.m4 (gl_FUNC_EXP2L): Likewise.
47424         * m4/expm1.m4 (gl_FUNC_EXPM1): Likewise.
47425         * m4/expm1f.m4 (gl_FUNC_EXPM1F_WORKS): Likewise.
47426         * m4/exponentl.m4 (gl_LONG_DOUBLE_EXPONENT_LOCATION): Likewise.
47427         * m4/fabsl.m4 (gl_FUNC_FABSL_WORKS): Likewise.
47428         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Likewise.
47429         * m4/fcntl-o.m4 (gl_FCNTL_O_FLAGS): Likewise.
47430         * m4/float_h.m4 (gl_FLOAT_H): Likewise.
47431         * m4/floor.m4 (gl_FUNC_FLOOR): Likewise.
47432         * m4/floorf.m4 (gl_FUNC_FLOORF): Likewise.
47433         * m4/fma.m4 (gl_FUNC_FMA_WORKS): Likewise.
47434         * m4/fmaf.m4 (gl_FUNC_FMAF_WORKS): Likewise.
47435         * m4/fmal.m4 (gl_FUNC_FMAL_WORKS): Likewise.
47436         * m4/fmod.m4 (gl_FUNC_FMOD): Likewise.
47437         * m4/fmodf.m4 (gl_FUNC_FMODF): Likewise.
47438         * m4/fmodl.m4 (gl_FUNC_FMODL): Likewise.
47439         * m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Likewise.
47440         * m4/frexpf.m4 (gl_FUNC_FREXPF_WORKS): Likewise.
47441         * m4/ftello.m4 (gl_FUNC_FTELLO): Likewise.
47442         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY_CLOBBER): Likewise.
47443         * m4/hypot.m4 (gl_FUNC_HYPOT): Likewise.
47444         * m4/hypotf.m4 (gl_FUNC_HYPOTF, gl_FUNC_HYPOTF_WORKS): Likewise.
47445         * m4/hypotl.m4 (gl_FUNC_HYPOTL, gl_FUNC_HYPOTL_WORKS): Likewise.
47446         * m4/ilogb.m4 (gl_FUNC_ILOGB_WORKS): Likewise.
47447         * m4/ilogbf.m4 (gl_FUNC_ILOGBF_WORKS): Likewise.
47448         * m4/isfinite.m4 (gl_ISFINITEL_WORKS): Likewise.
47449         * m4/isinf.m4 (gl_ISINFL_WORKS): Likewise.
47450         * m4/isnanf.m4 (gl_ISNANF_WORKS): Likewise.
47451         * m4/isnanl.m4 (gl_FUNC_ISNANL_WORKS): Likewise.
47452         * m4/ldexpl.m4 (gl_FUNC_LDEXPL_WORKS): Likewise.
47453         * m4/log.m4 (gl_FUNC_LOG, gl_FUNC_LOG_WORKS): Likewise.
47454         * m4/logf.m4 (gl_FUNC_LOGF, gl_FUNC_LOGF_WORKS): Likewise.
47455         * m4/logl.m4 (gl_FUNC_LOGL_WORKS): Likewise.
47456         * m4/log10.m4 (gl_FUNC_LOG10, gl_FUNC_LOG10_WORKS): Likewise.
47457         * m4/log10f.m4 (gl_FUNC_LOG10F, gl_FUNC_LOG10F_WORKS): Likewise.
47458         * m4/log10l.m4 (gl_FUNC_LOG10L_WORKS): Likewise.
47459         * m4/log1p.m4 (gl_FUNC_LOG1P): Likewise.
47460         * m4/log1pf.m4 (gl_FUNC_LOG1PF, gl_FUNC_LOG1PF_WORKS): Likewise.
47461         * m4/log1pl.m4 (gl_FUNC_LOG1PL): Likewise.
47462         * m4/log2.m4 (gl_FUNC_LOG2, gl_FUNC_LOG2_WORKS): Likewise.
47463         * m4/log2f.m4 (gl_FUNC_LOG2F, gl_FUNC_LOG2F_WORKS): Likewise.
47464         * m4/log2l.m4 (gl_FUNC_LOG2L_WORKS): Likewise.
47465         * m4/logb.m4 (gl_FUNC_LOGB_WORKS): Likewise.
47466         * m4/logbf.m4 (gl_FUNC_LOGBF_WORKS): Likewise.
47467         * m4/logbl.m4 (gl_FUNC_LOGBL_WORKS): Likewise.
47468         * m4/lstat.m4 (gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Likewise.
47469         * m4/mbrtowc.m4 (gl_MBRTOWC_EMPTY_INPUT, gl_MBRTOWC_C_LOCALE): Likewise.
47470         * m4/mkdir.m4 (gl_FUNC_MKDIR): Likewise.
47471         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Likewise.
47472         * m4/mktime.m4 (gl_FUNC_MKTIME_WORKS): Likewise.
47473         * m4/modf.m4 (gl_FUNC_MODF): Likewise.
47474         * m4/modff.m4 (gl_FUNC_MODFF): Likewise.
47475         * m4/modfl.m4 (gl_FUNC_MODFL): Likewise.
47476         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
47477         * m4/perror.m4 (gl_FUNC_PERROR): Likewise.
47478         * m4/popen.m4 (gl_FUNC_POPEN): Likewise.
47479         * m4/posix_spawn.m4 (gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE,
47480         gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2,
47481         gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN): Likewise.
47482         * m4/ptsname_r.m4 (gl_PREREQ_PTSNAME_R): Likewise.
47483         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
47484         * m4/regex.m4 (gl_REGEX): Likewise.
47485         * m4/remainder.m4 (gl_FUNC_REMAINDER): Likewise.
47486         * m4/remainderf.m4 (gl_FUNC_REMAINDERF,
47487         gl_FUNC_REMAINDERF_WORKS): Likewise.
47488         * m4/remainderl.m4 (gl_FUNC_REMAINDERL,
47489         gl_FUNC_REMAINDERL_WORKS): Likewise.
47490         * m4/rename.m4 (gl_FUNC_RENAME): Likewise.
47491         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
47492         * m4/rmdir.m4 (gl_FUNC_RMDIR): Likewise.
47493         * m4/round.m4 (gl_FUNC_ROUND): Likewise.
47494         * m4/roundf.m4 (gl_FUNC_ROUNDF): Likewise.
47495         * m4/roundl.m4 (gl_FUNC_ROUNDL): Likewise.
47496         * m4/signbit.m4 (gl_SIGNBIT): Likewise.
47497         * m4/sleep.m4 (gl_FUNC_SLEEP): Likewise.
47498         * m4/sqrtl.m4 (gl_FUNC_SQRTL_WORKS): Likewise.
47499         * m4/stdint.m4 (gl_STDINT_H): Likewise.
47500         * m4/strerror.m4 (gl_FUNC_STRERROR_0): Likewise.
47501         * m4/strncat.m4 (gl_FUNC_STRNCAT): Likewise.
47502         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
47503         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Likewise.
47504         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
47505         * m4/trunc.m4 (gl_FUNC_TRUNC): Likewise.
47506         * m4/truncf.m4 (gl_FUNC_TRUNCF): Likewise.
47507         * m4/truncl.m4 (gl_FUNC_TRUNCL): Likewise.
47508         * m4/tsearch.m4 (gl_FUNC_TSEARCH): Likewise.
47509         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Likewise.
47510         * m4/ungetc.m4 (gl_FUNC_UNGETC_WORKS): Likewise.
47511         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Likewise.
47512         * m4/unlink.m4 (gl_FUNC_UNLINK): Likewise.
47513         * m4/usleep.m4 (gl_FUNC_USLEEP): Likewise.
47514         * m4/utimes.m4 (gl_FUNC_UTIMES): Likewise.
47515         * m4/wcrtomb.m4 (gl_FUNC_WCRTOMB): Likewise.
47516         * m4/wcsrtombs.m4 (gl_WCSRTOMBS_TERMINATION, gl_WCSRTOMBS_NULL):
47517         Likewise.
47518         * m4/wctob.m4 (gl_FUNC_WCTOB): Likewise.
47519         * m4/chown.m4 (AC_FUNC_CHOWN): Add cross-compilation guess for native
47520         Windows. Enable also on Autoconf 2.70.
47521         * m4/printf.m4 (gl_PRINTF_SIZES_C99, gl_PRINTF_LONG_DOUBLE,
47522         gl_PRINTF_INFINITE, gl_PRINTF_INFINITE_LONG_DOUBLE,
47523         gl_PRINTF_DIRECTIVE_A, gl_PRINTF_DIRECTIVE_F, gl_PRINTF_DIRECTIVE_N,
47524         gl_PRINTF_DIRECTIVE_LS, gl_PRINTF_FLAG_LEFTADJUST, gl_PRINTF_FLAG_ZERO,
47525         gl_SNPRINTF_TRUNCATION_C99, gl_SNPRINTF_RETVAL_C99,
47526         gl_SNPRINTF_DIRECTIVE_N, gl_SNPRINTF_SIZE1): Add cross-compilation guess
47527         for native Windows.
47528         (gl_PRINTF_POSITIONS, gl_PRINTF_FLAG_GROUPING,
47529         gl_VSNPRINTF_ZEROSIZE_C99): Add comment.
47531 2017-07-13  Bruno Haible  <bruno@clisp.org>
47533         Improve cross-compilation guesses for native Windows.
47534         * m4/memchr.m4 (gl_FUNC_MEMCHR): Add cross-compilation guess for native
47535         Windows.
47536         * m4/strstr.m4 (gl_FUNC_STRSTR_SIMPLE): Don't use internals of
47537         memchr.m4.
47538         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR_SIMPLE): Likewise.
47540 2017-07-13  Bruno Haible  <bruno@clisp.org>
47542         Improve cross-compilation guesses for native Windows.
47543         * m4/fflush.m4 (gl_FUNC_FFLUSH_STDIN): Add cross-compilation guess for
47544         native Windows.
47545         (gl_FUNC_FFLUSH): Update accordingly.
47546         * m4/fclose.m4 (gl_FUNC_FCLOSE): Likewise.
47547         * m4/fseeko.m4 (gl_FUNC_FFLUSH_STDIN): Likewise.
47549 2017-07-11  Bruno Haible  <bruno@clisp.org>
47551         More systematic m4 quoting and indentation.
47552         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Quote systematically.
47553         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
47554         * m4/d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Likewise.
47555         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
47556         * m4/host-os.m4 (gl_HOST_OS): Likewise.
47557         * m4/jm-winsz1.m4 (gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H,
47558         gl_WINSIZE_IN_PTEM): Likewise.
47559         * m4/mbrtowc.m4 (AC_FUNC_MBRTOWC): Likewise.
47560         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): Likewise.
47561         * m4/pselect.m4 (gl_FUNC_PSELECT): Likewise.
47562         * m4/fchownat.m4 (gl_FUNC_FCHOWNAT_DEREF_BUG): Quote systematically.
47563         Correct indentation.
47564         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): Likewise.
47565         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
47566         * m4/jm-winsz2.m4 (gl_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTL): Likewise.
47567         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
47568         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Likewise.
47569         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Likewise.
47571 2017-07-10  Bruno Haible  <bruno@clisp.org>
47573         round, roundf: Avoid compiler warning in configure test.
47574         * m4/round.m4 (gl_FUNC_ROUND): Use 'return' instead of exit().
47575         * m4/roundf.m4 (gl_FUNC_ROUNDF): Likewise.
47577 2017-07-10  Bruno Haible  <bruno@clisp.org>
47579         getlogin tests: Avoid #ifdefs when sharing code between modules.
47580         * modules/getlogin_r-tests (Files): Add tests/test-getlogin.h.
47581         * modules/getlogin-tests (Files): Likewise. Remove
47582         tests/test-getlogin_r.c.
47583         * tests/test-getlogin.h: Extracted from tests/test-getlogin_r.c.
47584         * tests/test-getlogin.c: Extracted from tests/test-getlogin_r.c.
47585         * tests/test-getlogin_r.c: Include test-getlogin.h. Omit code that tests
47586         getlogin().
47588 2017-07-10  Paul Eggert  <eggert@cs.ucla.edu>
47590         getlogin: don’t assume one name per uid
47591         Problem reported by Wolfgang F. Muthmann (Bug#27640).
47592         * modules/getlogin-tests (Files): Add tests/test-getlogin_r.c.
47593         (ttyname): Remove test.
47594         * modules/getlogin_r-tests (ttyname): Remove test.
47595         * tests/test-getlogin.c: Replace this near-clone of test-getlogin_r.c
47596         with ‘#define TEST_LOGIN’ followed by ‘#include "test-getlogin_r.c"’.
47597         * tests/test-getlogin_r.c: If TEST_GETLOGIN is defined, test
47598         getlogin rather than getlogin_r.  This avoids code duplication.
47599         (main): Use isatty and fstat rather than ttyname and stat.
47600         Use getpwnam instead of getpwuid, to be portable to test platforms
47601         that have multiple login names for the same uid.
47603 2017-07-10  Tim Rühsen  <tim.ruehsen@gmx.de>
47604             Bruno Haible  <bruno@clisp.org>
47606         glob: Fix more memory leaks.
47607         * lib/glob.c (glob): Use 'goto out' in order to free dirname before
47608         returning.
47609         Reported by Tim Rühsen.
47611 2017-07-10  Bruno Haible  <bruno@clisp.org>
47613         Make sure $host and $host_os are defined when used.
47614         * m4/argz.m4 (gl_FUNC_ARGZ): Require AC_CANONICAL_HOST.
47615         * m4/closedir.m4 (gl_FUNC_CLOSEDIR): Likewise.
47616         * m4/csharpexec.m4 (gt_CSHARPEXEC): Likewise.
47617         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
47618         * m4/expl.m4 (gl_FUNC_EXPL): Likewise.
47619         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Likewise.
47620         * m4/lstat.m4 (gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Likewise.
47621         * m4/opendir.m4 (gl_FUNC_OPENDIR): Likewise.
47622         * m4/poll.m4 (gl_FUNC_POLL): Likewise.
47623         * m4/pselect.m4 (gl_FUNC_PSELECT): Likewise.
47624         * m4/ptsname.m4 (gl_FUNC_PTSNAME): Likewise.
47625         * m4/relocatable.m4 (gl_RELOCATABLE_BODY): Likewise.
47626         * m4/symlinkat.m4 (gl_FUNC_SYMLINKAT): Likewise.
47627         * m4/ceill.m4 (gl_FUNC_CEILL): Require AC_CANONICAL_HOST outside the
47628         m4_ifdef block.
47630 2017-07-09  Bruno Haible  <bruno@clisp.org>
47632         *printf: Fix cross-compilation guess for Solaris.
47633         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_F): Fix copy-and-paste mistake from
47634         2010-12-21.
47636 2017-07-07  Paul Eggert  <eggert@cs.ucla.edu>
47637             Bruno Haible  <bruno@clisp.org>
47639         vasnprintf: port to macOS 10.13
47640         Problem reported by comex in:
47641         http://lists.gnu.org/r/bug-gnulib/2017-07/msg00056.html
47642         * lib/vasnprintf.c (VASNPRINTF): Don’t use %n on macOS.
47644 2017-07-06  Bruno Haible  <bruno@clisp.org>
47646         imaxdiv tests: Fix logic.
47647         * tests/test-imaxdiv.c (main): Use == instead of =.
47648         Reported by Coverity.
47650 2017-07-06  Bruno Haible  <bruno@clisp.org>
47652         uninorm/filter: Fix use-after-free bug.
47653         * lib/uninorm/uninorm-filter.c (uninorm_filter_write): Maintain
47654         sortbuf == filter->sortbuf invariant.
47655         Reported by Coverity.
47657 2017-07-06  Bruno Haible  <bruno@clisp.org>
47659         glob: Fix more memory leaks.
47660         * lib/glob.c (glob): Free dirname before returning.
47661         Reported by Coverity and Tim Rühsen.
47663 2017-07-06  Paul Eggert  <eggert@cs.ucla.edu>
47665         parse-datetime: fix uninit var bug
47666         Reported by Bruno Haible in:
47667         http://lists.gnu.org/r/bug-gnulib/2017-07/msg00038.html
47668         * lib/parse-datetime.y (parse_datetime2): Do not use
47669         uninitialized.
47671 2017-07-05  Bruno Haible  <bruno@clisp.org>
47673         doc: Update for MSVC 14.
47674         * doc/posix-headers/*.texi: Add info about MSVC 14.
47675         * doc/posix-functions/*.texi: Likewise.
47676         * doc/pastposix-functions/*.texi: Likewise.
47677         * doc/glibc-headers/*.texi: Likewise.
47678         * doc/glibc-functions/*.texi: Likewise.
47680 2017-07-05  Bruno Haible  <bruno@clisp.org>
47682         sched: Fix build failure on native Windows (regression from 2017-06-19).
47683         * m4/sched_h.m4 (gl_SCHED_H): Set HAVE_STRUCT_SCHED_PARAM always.
47685 2017-07-03  John E. Malmberg  <wb8tyw@gmail.com>
47687         stdioext: Port to OpenVMS.
47688         * lib/stdio-impl.h: OpenVMS uses struct _iobuf for FILE information.
47689         * lib/fpending.c (fpending): Remove non-working VMS specific code.
47690         * lib/fbufmode.c (fbufmode): Fix _IOLBF test to use fp_ macro.
47691         * lib/fflush.c (clear_ungetc_buffer): Add OpenVMS to comments.
47692         * lib/fpurge.c (fpurge): Likewise.
47693         * lib/freadable.c (freadable): Likewise.
47694         * lib/freadahead.c (freadahead): Likewise.
47695         * lib/freading.c (freading): Likewise.
47696         * lib/freadptr.c (freadptr): Likewise.
47697         * lib/freadseek.c (freadseek): Likewise.
47698         * lib/fseeko.c (fseeko): Likewise.
47699         * lib/fseterr.c (fseterr): Likewise.
47700         * lib/fwritable.c (fwriteable): Likewise.
47701         * lib/fwriting.c (fwriting): Likewise.
47703 2017-07-01  Benno Schulenberg  <bensberg@telfort.nl>
47705         glob: Declare variables at the very start of their scope.
47706         * lib/glob.c (convert_dirent, convert_dirent64): Give each fragment
47707         its separate scope, so the functions will compile on Haiku.
47709 2017-07-01  Bruno Haible  <bruno@clisp.org>
47711         logbl: Work around a glibc bug on PowerPC64LE.
47712         * m4/logbl.m4 (gl_FUNC_LOGBL_WORKS): Test also negative subnormal
47713         numbers.
47714         * doc/posix-functions/logbl.texi: Update.
47716 2017-06-29  Bruno Haible  <bruno@clisp.org>
47718         stat, fstat: Compile stat-w32.c only on platforms that need it.
47719         Suggested by Paul Eggert.
47720         * modules/stat (configure.ac): Request stat-w32.o only on native
47721         Windows.
47722         * modules/fstat (configure.ac): Likewise.
47724 2017-06-25  Bruno Haible  <bruno@clisp.org>
47726         stat: Improve last change.
47727         * lib/stat-w32.c: Revert last change. Use generic idiom instead.
47729 2017-06-25  Paul Eggert  <eggert@cs.ucla.edu>
47731         stat: port to xlc 12.01
47732         * lib/stat-w32.c: Always include <sys/types.h>.  Otherwise, xlc
47733         12.01 complains "Compilation unit is empty."
47735 2017-06-24  Paul Eggert  <eggert@cs.ucla.edu>
47737         xalloc-oversized: port to icc
47738         * lib/xalloc-oversized.h (xalloc_oversized): Do not use
47739         __builtin_mul_overflow if ICC is defined, as this results in
47740         "undefined reference to `__builtin_mul_overflow'" with icc 17.0.2
47741         20170213.
47743 2017-06-19  Bruno Haible  <bruno@clisp.org>
47745         classpath: Avoid including config.h twice, as it produces warnings.
47746         Reported by John E. Malmberg <wb8tyw@gmail.com>.
47747         * lib/classpath.h: Conditionalize the include of config.h.
47749 2017-06-19  Bruno Haible  <bruno@clisp.org>
47750             John E. Malmberg  <wb8tyw@gmail.com>  (tiny change)
47752         sched: Fix compilation failure on OpenVMS.
47753         * m4/sched_h.m4 (gl_SCHED_H): Require AC_CANONICAL_HOST. On OpenVMS,
47754         test whether <pthread.h> exists and defines struct sched_param.
47755         * lib/sched.in.h: On OpenVMS, include <pthread.h>.
47757 2017-06-17  Paul Eggert  <eggert@cs.ucla.edu>
47759         diffseq: port to GCC 7 with --enable-gcc-warnings
47760         * lib/diffseq.h (diag): Use an if, not an ifdef, for most of the
47761         heuristic check.  This way, GCC 7 with --enable-gcc-warnings does
47762         not complain about big_snake being defined but not used.
47764 2017-06-15  Bruno Haible  <bruno@clisp.org>
47766         gettext-h: Update theoretical condition for use of variable size arrays.
47767         Reported by Paul Eggert.
47768         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Extend comment
47769         to include the theoretical condition for availability of variable size
47770         arrays, if we could trust the value of __STDC_VERSION__.
47772 2017-06-12  Bruno Haible  <bruno@clisp.org>
47774         Relicense some modules under LGPLv2+.
47775         Daiki Ueno's approval is in
47776         https://lists.gnu.org/r/bug-gnulib/2017-06/msg00058.html.
47777         * modules/uniwidth/base (License): Change to LGPLv2+.
47778         * modules/uniwidth/width (License): Likewise.
47780 2017-06-11  Bruno Haible  <bruno@clisp.org>
47782         localename: Fix test failure on DragonFly BSD.
47783         * lib/localename.c (gl_locale_name_thread_unsafe): Treat DragonFly BSD
47784         like FreeBSD.
47786 2017-06-11  Bruno Haible  <bruno@clisp.org>
47788         float: Fix 'float' and 'isinf' failures on DragonFly BSD.
47789         * m4/float_h.m4 (gl_FLOAT_H): Treat DragonFly BSD like FreeBSD.
47790         * lib/float.in.h: Likewise.
47791         * m4/fmal.m4, m4/frexpl.m4, m4/logbl.m4: Update accordingly.
47793 2017-06-11  Bruno Haible  <bruno@clisp.org>
47795         gnulib-tool: Clean up after autotools.
47796         * gnulib-tool (func_create_testdir, func_create_megatestdir): Remove
47797         useless directory left over by the Autotools.
47799 2017-06-11  Paul Eggert  <eggert@cs.ucla.edu>
47801         getopt-posix: port to glibc 2.25.90
47802         Problem reported by Daniel P. Berrange in:
47803         http://lists.gnu.org/r/bug-gnulib/2017-06/msg00003.html
47804         * lib/getopt-pfx-core.h (_GETOPT_CORE_H):
47805         * lib/getopt-pfx-ext.h (_GETOPT_EXT_H):
47806         #undef if __GETOPT_PREFIX is defined.
47808 2017-06-11  Bruno Haible  <bruno@clisp.org>
47810         strtod-obsolete: Fix license.
47811         * modules/strtod-obsolete (License): Change to LGPL.
47813 2017-06-10  Jim Meyering  <meyering@fb.com>
47815         maint: update to work with GCC7's -Werror=implicit-fallthrough=
47816         * lib/savewd.c (FALLTHROUGH): Define.
47817         (savewd_save, savewd_restore): Use this, rather than a comment,
47818         whenever one switch case falls through into the next.
47820 2017-06-08  Bruno Haible  <bruno@clisp.org>
47822         host-cpu-c-abi: Support for aarch64 ILP32 ABI.
47823         * m4/host-cpu-c-abi.m4 (gl_HOST_CPU_C_ABI): Recognize the aarch64 ILP32
47824         ABI. Set HOST_CPU_C_ABI=arm64-ilp32 and define __arm64_ilp32__ in this
47825         case.
47827 2017-06-08  Paul Eggert  <eggert@cs.ucla.edu>
47829         doc: remove robots, add prereqs
47830         * doc/build-automation.texi, doc/gnulib.texi: Mention prereqs for
47831         builds.  Simon's robot site does not seem to be up, so remove
47832         mentions of it for now.
47834 2017-06-08  Bruno Haible  <bruno@clisp.org>
47836         gnulib-tool: Fix bug in func_symlink_if_changed, from 2006-11-13.
47837         * gnulib-tool (func_symlink_target): New function, extracted from
47838         func_symlink.
47839         (func_symlink, func_symlink_if_changed): Use it.
47841 2017-06-08  Bruno Haible  <bruno@clisp.org>
47843         gnulib-tool: Fix bug in func_ln_s, from 2016-01-15.
47844         * gnulib-tool (func_ln_s): Determine cp_src correctly.
47846 2017-06-07  Bruno Haible  <bruno@clisp.org>
47848         canonicalize-lgpl: Avoid conflict with gnulib 'getcwd' module on VMS.
47849         Reported by John E. Malmberg <wb8tyw@gmail.com> in
47850         <https://lists.gnu.org/r/bug-gnulib/2017-06/msg00029.html>.
47851         * lib/canonicalize-lgpl.c (__getcwd): On VMS, when using gnulib's getcwd
47852         override, pass 2 arguments to getcwd, not 3.
47854 2017-06-04  Paul Eggert  <eggert@cs.ucla.edu>
47856         same-inode: port better to VMS 8.2 and later
47857         Problem reported by John E. Malmberg in:
47858         http://lists.gnu.org/r/bug-gnulib/2017-06/msg00005.html
47859         * lib/same-inode.h (SAME_INODE) [__VMS && 80200000 <= __CRTL_VER]:
47860         Use the usual POSIX definition.
47861         * m4/sys_types_h.m4 (gl_SYS_TYPES_H): Define _USE_STD_STAT.
47863 2017-06-01  Paul Eggert  <eggert@cs.ucla.edu>
47865         error: fix POSIX violation for va_end
47866         Problem reported by Bruno Haible in:
47867         http://lists.gnu.org/r/bug-gnulib/2017-06/msg00001.html
47868         * lib/error.c (error_tail): Do not call va_end here.
47869         (error, error_at_line): Call it here instead.
47871 2017-05-28  Bruno Haible  <bruno@clisp.org>
47873         c-strtod: Make it usable in C++ mode.
47874         * lib/c-strtod.h: Add 'extern "C"' marker for C++.
47876 2017-05-25  Jim Meyering  <meyering@fb.com>
47878         quotearg: fix compilation failure due to FALLTHROUGH misuse
47879         * lib/quotearg.c (quotearg_buffer_restyled): Revert one FALLTHROUGH
47880         macro back to /* fall through */ comment.  The macro can apply only
47881         to a following case statement.  Reported by Assaf Gordon.
47883 2017-05-25  Paul Eggert  <eggert@cs.ucla.edu>
47885         intprops: port to recent icc
47886         Port to icc (ICC) 17.0.4 20170411, which defines __GNUC__ to be 5
47887         but does not support __builtin_add_overflow etc.
47888         * lib/intprops.h (_GL_HAS_BUILTIN_OVERFLOW) [__ICC]:
47889         Define to 0.
47891 2017-05-23  Karl Berry  <karl@freefriends.org>
47893         * config/srclist.txt (iconv.m4): sync broken, comment out
47894         until (hopefully) the next gettext release.
47896 2017-05-22  Bjarni Ingi Gislason  <bjarniig@rhi.hi.is>
47898         Remove repeated words in comments.
47900 2017-05-22  Bernhard Voelker  <mail@bernhard-voelker.de>
47902         fallthrough: reinstate a FALLTHROUGH instance in quotearg
47903         quotearg.c: Reinstate this instance which is significant
47904         when the if branch is not taken.
47906 2017-05-21  Bruno Haible  <bruno@clisp.org>
47908         gnulib-tool: Add options to create hard links.
47909         * gnulib-tool (func_usage): Document options --hardlink,
47910         --local-hardlink, --more-hardlinks.
47911         (func_symlink): Renamed from func_ln.
47912         (func_symlink_if_changed): Renamed from func_ln_if_changed.
47913         (func_hardlink): New function.
47914         (copymode, lcopymode): New variables.
47915         (symbolic, lsymbolic): Remove variables.
47916         (Options): Implement options --hardlink, --local-hardlink,
47917         --more-hardlinks.
47918         (func_should_link): Renamed from func_should_symlink. Set copyaction.
47919         (func_add_file, func_update_file): Update invocation of
47920         func_should_link. Invoke func_hardlink when appropriate.
47921         (func_import): Update comments.
47922         (func_create_testdir): Update invocation of func_should_link. Invoke
47923         func_hardlink when appropriate.
47924         Finally, invoke 'git update-index --refresh' to mitigate the effects of
47925         the hard links on git.
47927 2017-05-20  Bruno Haible  <bruno@clisp.org>
47929         argp: Simplify bit manipulation.
47930         * lib/argp-parse.c (parser_parse_opt): Use &, |, ~ instead of shifts
47931         on a signed integer type.
47933 2017-05-20  Bruno Haible  <bruno@clisp.org>
47935         Avoid wrong configure results with gcc -fsanitize=address.
47936         This completes the work done on 2016-02-06 on this topic.
47937         * m4/memmem.m4 (gl_FUNC_MEMMEM): Free allocated memory before returning.
47938         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Likewise.
47939         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Likewise.
47940         * m4/strstr.m4 (gl_FUNC_STRSTR): Likewise.
47941         * m4/fopen.m4 (gl_FUNC_FOPEN): Close allocated FILE streams before
47942         returning.
47943         * m4/fflush.m4 (gl_FUNC_FFLUSH_STDIN): Likewise.
47944         * m4/fpurge.m4 (gl_FUNC_FPURGE): Likewise.
47945         * m4/ftello.m4 (gl_FUNC_FTELLO): Likewise.
47946         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
47947         * m4/signbit.m4 (gl_FLOATTYPE_SIGN_LOCATION): Likewise.
47948         * m4/ungetc.m4 (gl_FUNC_UNGETC_WORKS): Likewise.
47949         * m4/getdelim.m4 (gl_FUNC_GETDELIM): Close allocated FILE streams and
47950         free allocated memory before returning.
47951         * m4/getline.m4 (gl_FUNC_GETLINE): Likewise.
47952         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Close allocated DIR
47953         objects before returning.
47954         * m4/iconv.m4 (AM_ICONV_LINK): Close allocated iconv_t handles before
47955         returning.
47957 2017-05-20  Bruno Haible  <bruno@clisp.org>
47959         gnulib-tool: Don't create hard links between gnulib and its testdirs.
47960         * gnulib-tool (func_create_testdir): Don't invoke 'ln'.
47962 2017-05-20  Bruno Haible  <bruno@clisp.org>
47964         argp, tsearch tests: Fix file list.
47965         * modules/argp-tests (Files): Add tests/macros.h.
47966         * modules/tsearch-tests (Files): Likewise.
47968 2017-05-20  Bruno Haible  <bruno@clisp.org>
47970         getopt-posix tests: Remove redundant include.
47971         * tests/test-getopt.h: Don't include "macros.h". It's already included
47972         by tests/test-getopt-main.h.
47974 2017-05-19  Jim Meyering  <meyering@fb.com>
47976         dfa: two small simplifications
47977         * lib/dfa.c (build_state): Avoid repeating longer expressions.
47979 2017-05-18  Jim Meyering  <meyering@fb.com>
47981         fallthrough: update for GCC 7/8
47982         * lib/quotearg.c (FALLTHROUGH): New macro.
47983         Use it whenever one switch case falls through into the next,
47984         replacing "/* Fall through */" comments.  This exposed one
47985         instance of an unwarranted "fall through" comment: unwarranted
47986         because it preceded a "goto" label not a case statement.
47987         * lib/freopen-safer.c (freopen_safer): Likewise.
47988         * lib/fts.c (leaf_optimization_applies): Likewise.
47989         * lib/unistr/u8-uctomb-aux.c (u8_uctomb_aux): Likewise.
47990         * tests/test-getopt_long.h (getopt_long_loop): Likewise.
47991         * tests/test-tsearch.c (mangle_tree): Likewise.  Also include
47992         tests/macros.h for the definition.
47993         * tests/test-argp.c (group1_parser): Likewise.
47994         * tests/test-getopt.h (getopt_loop): Likewise.
47996 2017-05-19  Paul Eggert  <eggert@cs.ucla.edu>
47998         argp: fix shift bug
47999         * lib/argp-parse.c (parser_parse_opt): Rework to avoid undefined
48000         behavior on shift overflow, caught by gcc -fsanitize=undefined.
48002         argp: fix pointer-subtraction bug
48003         * lib/argp-help.c (hol_append): Don’t subtract pointers to
48004         different arrays, as this can run afoul of -fcheck-pointer-bounds.
48005         See the thread containing Bruno Haible’s report in:
48006         http://lists.gnu.org/r/bug-gnulib/2017-05/msg00171.html
48008 2017-05-19  Bruno Haible  <bruno@clisp.org>
48010         printf-posix tests: Avoid test failure with "gcc --coverage".
48011         Reported by Tim Rühsen <tim.ruehsen@gmx.de>.
48012         * tests/test-printf-posix2.c (main): Test a width of 10000000 rather
48013         than 5000000.
48014         * tests/test-fprintf-posix2.c (main): Likewise.
48016 2017-05-19  Paul Eggert  <eggert@cs.ucla.edu>
48018         closeout: don’t close stderr when sanitizing
48019         * NEWS: Document this.
48020         * lib/closeout.c (__has_feature): New macro, if not already defined.
48021         (SANITIZE_ADDRESS): New constant.
48022         (close_stdout): Don’t close stderr if sanitizing addresses.
48024 2017-05-19  Bruno Haible  <bruno@clisp.org>
48026         get-rusage-data tests: Avoid failure on Linux/glibc.
48027         * tests/test-get-rusage-data.c (main): Don't expect a strict increase
48028         on glibc systems.
48030 2017-05-18  Bruno Haible  <bruno@clisp.org>
48032         localename: Include necessary header files on Cygwin.
48033         * lib/localename.c [__CYGWIN__]: Include <langinfo.h>, since this is
48034         where NL_LOCALE_NAME is defined.
48036 2017-05-18  Bruno Haible  <bruno@clisp.org>
48038         gettext: Update macros from gettext git.
48039         * m4/intldir.m4: Require Autoconf >= 2.60.
48040         * m4/progtest.m4: Fix typos in copyright notice.
48042 2017-05-18  Bruno Haible  <bruno@clisp.org>
48044         copy-file tests: Fix link error (regression from 2017-05-01).
48045         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
48046         * modules/copy-file-tests (Makefile.am): Link test-copy-file with
48047         $(LIB_CLOCK_GETTIME).
48049 2017-05-18  Bruno Haible  <bruno@clisp.org>
48051         unicase/special-casing: Fix incompatibility with gperf-3.0.4
48052         (regression from 2017-02-13).
48053         * lib/unicase/special-casing.in.h: Renamed from
48054         lib/unicase/special-casing.h.
48055         * modules/unicase/special-casing (Files): Add
48056         lib/unicase/special-casing.in.h. Remove lib/unicase/special-casing.h.
48057         (Makefile.am): Add rule for generating unicase/special-casing.h.
48058         Update BUILT_SOURCES and MOSTLYCLEANFILES accordingly.
48059         * lib/unicase/special-casing.c: Include "unicase/special-casing.h",
48060         not "special-casing.h".
48061         * lib/unicase/u*.c: Likewise.
48063 2017-05-17  Bruno Haible  <bruno@clisp.org>
48065         README: Don't ask people to read a TeXinfo file.
48066         Reported by Tim Rühsen <tim.ruehsen@gmx.de>.
48067         * README: Tell people how to read the HTML formatted manual.
48069 2017-05-16  Tim Rühsen  <tim.ruehsen@gmx.de>
48071         parse-datetime: Fix memleak
48072         * lib/parse-datetime.y (parse_datetime2): Cleanup on
48073         localtime_rz() failure.
48075 2017-05-16  Bruno Haible  <bruno@clisp.org>
48077         javacomp: Fix handle leak.
48078         Found by Coverity.
48079         * lib/javacomp.c (get_classfile_version): Close fd before returning.
48081 2017-05-16  Bruno Haible  <bruno@clisp.org>
48083         relocate: Make it easier to reclaim allocated memory.
48084         * lib/relocatable.h (relocate2): New declaration/macro.
48085         * lib/relocatable.c (relocate2): New function.
48086         * doc/relocatable-maint.texi (Supporting Relocation): Mention the
48087         relocate2 function.
48088         * lib/localcharset.c (relocate2): Define fallback.
48089         (get_charset_aliases): Invoke relocate2 instead of relocate. Free the
48090         allocated memory.
48091         * lib/javaversion.c (relocate2): Define fallback.
48092         (javaexec_version): Invoke relocate2 instead of relocate. Free the
48093         allocated memory.
48095 2017-05-16  Bruno Haible  <bruno@clisp.org>
48097         relocate: Simplify EMX specific code.
48098         * lib/relocatable.c (relocate): Assume pathname is non-NULL. Use
48099         ISSLASH macro consistently. Avoid dangerous string concatenation idiom.
48101 2017-05-16  Bruno Haible  <bruno@clisp.org>
48103         sigpipe tests: Fix file list.
48104         * modules/sigpipe-tests (Files): Add tests/macros.h.
48106 2017-05-16  Paul Eggert  <eggert@cs.ucla.edu>
48108         manywarnings: update for GCC 7
48109         * build-aux/gcc-warning.spec:
48110         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC):
48111         Add GCC 7 warnings, notably -Wimplicit-fallthrough=5, which
48112         requires a non-comment fallthrough attribute.  This is a bit
48113         cleaner than the comment versions.
48114         * lib/strftime.c, lib/dfa.c, lib/fnmatch.c, lib/mbrtowc.c:
48115         * lib/vasnprintf.c, tests/macros.h (FALLTHROUGH): New macro.
48116         Use it whenever one switch case falls through into the next.
48117         * lib/fnmatch_loop.c, tests/test-mbrtowc.c, tests/test-sigpipe.c:
48118         Use FALLTHROUGH macro.
48120 2017-05-15  Bruno Haible  <bruno@clisp.org>
48122         gnulib-tool: Fix generated code when libtests contains module 'alloca'.
48123         * gnulib-tool (func_emit_tests_Makefile_am): For libtests.a, use
48124         @ALLOCA@, not @LTALLOCA@.
48126 2017-05-15  Bruno Haible  <bruno@clisp.org>
48128         sys_select: Avoid "was expanded before it was required" warning.
48129         * modules/sys_select (configure.ac): Require, not invoke,
48130         gl_HEADER_SYS_SELECT.
48132 2017-05-14  Paul Eggert  <eggert@cs.ucla.edu>
48134         gnulib-tool: improve GNU Make debugging
48135         * gnulib-tool (func_emit_lib_Makefile_am): Omit unnecessary echo.
48136         Report autoconf diagnostics when it fails, in the output makefile.
48138 2017-05-14  Bruno Haible  <bruno@clisp.org>
48140         stat-time tests: Improve comment.
48141         * tests/test-stat-time.c: Add hyperlink, from Paul Eggert.
48143 2017-05-14  Bruno Haible  <bruno@clisp.org>
48145         same-inode: Adapt for windows-stat-inodes.
48146         * lib/same-inode.h: Include <sys/types.h>.
48147         (SAME_INODE) [_GL_WINDOWS_STAT_INODES]: Define specifically.
48148         * modules/same-inode (Depends-on): Add sys_types.
48150 2017-05-14  Bruno Haible  <bruno@clisp.org>
48152         windows-stat-inodes: New module.
48153         * m4/windows-stat-inodes.m4: New file.
48154         * m4/sys_types_h.m4 (gl_SYS_TYPES_H): Set WINDOWS_STAT_INODES.
48155         * modules/sys_types (Makefile.am): Substitute WINDOWS_STAT_INODES.
48156         * lib/sys_types.in.h [WINDOWS_STAT_INODES]: Override dev_t and ino_t.
48157         (_GL_WINDOWS_STAT_INODES): New macro.
48158         * lib/stat-w32.c: Set _WIN32_WINNT. Include <string.h>, verify.h.
48159         (GetFileInformationByHandleExFunc): New variable.
48160         (initialize): Initialize it.
48161         (_gl_fstat_by_handle) [_GL_WINDOWS_STAT_INODES]: Initialize st_dev and
48162         st_ino appropriately.
48163         * lib/stat.c (rpl_stat): Use the directory entry based approach only as
48164         a fallback, because it does not provide st_dev and st_ino values.
48165         * modules/fstat (Depends-on): Add 'verify'.
48166         * modules/windows-stat-inodes: New file.
48167         * doc/windows-stat-inodes.texi: New file.
48168         * doc/gnulib.texi: Include it.
48169         * doc/posix-headers/sys_stat.texi: Mention the new module.
48171 2017-05-14  Bruno Haible  <bruno@clisp.org>
48173         stat-time tests: Workaround for native Windows.
48174         * tests/test-stat-time.c: Include <stdio.h>, <time.h>.
48175         (filename_stamp1, filename_testfile, filename_stamp2, filename_stamp3):
48176         New variables.
48177         (initialize_filenames): New function.
48178         (main): Invoke it.
48179         (cleanup, prepare_test): Update.
48181 2017-05-14  Bruno Haible  <bruno@clisp.org>
48183         stat-time: Adapt for windows-stat-timespec.
48184         * lib/stat-time.h (get_stat_birthtime) [_GL_WINDOWS_STAT_TIMESPEC]: Use
48185         entire st_ctim field.
48187 2017-05-13  Jim Meyering  <meyering@fb.com>
48189         maint.mk: update regex to reflect 2013 addition of "assume" to verify.h
48190         * top/maint.mk (sc_prohibit_verify_without_use): Don't reject a source
48191         file that uses the assume macro, claiming that verify.h is unused.
48193 2017-05-13  Bruno Haible  <bruno@clisp.org>
48195         Use symbolic values for _WIN32_WINNT.
48196         * lib/ftruncate.c (_WIN32_WINNT): Use symbolic value _WIN32_WINNT_WIN2K.
48197         * lib/sethostname.c (_WIN32_WINNT): Likewise.
48199 2017-05-13  Bruno Haible  <bruno@clisp.org>
48201         year2038: New module.
48202         * m4/year2038.m4: New file.
48203         * modules/year2038: New file.
48204         * doc/year2038.texi: New file.
48205         * doc/gnulib.texi: Include it.
48207 2017-05-13  Bruno Haible  <bruno@clisp.org>
48209         largefile: Simplify.
48210         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Remove unused definition
48211         of _GL_WINDOWS_64_BIT_ST_SIZE.
48213 2017-05-13  Bruno Haible  <bruno@clisp.org>
48215         largefile: Improve and document.
48216         * m4/largefile.m4 (gl_LARGEFILE): Set WINDOWS_64_BIT_ST_SIZE to 0 if
48217         the mingw headers already define 'stat' appropriately.
48218         * modules/largefile (Description): Clarify.
48219         * doc/largefile.texi: New file.
48220         * doc/gnulib.texi: Include it.
48221         * doc/posix-headers/sys_types.texi: Update.
48223 2017-05-13  Bruno Haible  <bruno@clisp.org>
48225         truncate: New module.
48226         * lib/unistd.in.h (truncate): New declaration.
48227         * lib/truncate.c: New file.
48228         * m4/truncate.m4: New file.
48229         * m4/unistd_h.m4 (gl_UNISTD_H): Test whether 'truncate' is declared.
48230         (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_TRUNCATE, HAVE_TRUNCATE,
48231         REPLACE_TRUNCATE.
48232         * modules/unistd (Makefile.am): Substitute GNULIB_TRUNCATE,
48233         HAVE_TRUNCATE, REPLACE_TRUNCATE.
48234         * modules/truncate: New file.
48235         * tests/test-unistd-c++.cc (truncate): Test signature.
48236         * doc/posix-functions/truncate.texi: Mention the new module.
48238         * tests/test-truncate.c: New file.
48239         * modules/truncate-tests: New file.
48241 2017-05-13  Bruno Haible  <bruno@clisp.org>
48243         windows-stat-timespec: New module.
48244         * modules/windows-stat-timespec: New file.
48245         * m4/windows-stat-timespec.m4: New file.
48246         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Set WINDOWS_STAT_TIMESPEC.
48247         * modules/sys_stat (Makefile.am): Substitute WINDOWS_STAT_TIMESPEC.
48248         * lib/sys_stat.in.h (struct stat) [WINDOWS_STAT_TIMESPEC]: Declare with
48249         fields st_atim, st_mtim, st_ctim.
48250         (st_atime, st_mtime, st_ctime): Define as macros.
48251         (_GL_WINDOWS_STAT_TIMESPEC): New macro.
48252         * lib/stat-w32.h (_gl_convert_FILETIME_to_timespec)
48253         [_GL_WINDOWS_STAT_TIMESPEC]: New declaration.
48254         * lib/stat-w32.c (_gl_convert_FILETIME_to_timespec)
48255         [_GL_WINDOWS_STAT_TIMESPEC]: New function.
48256         (_gl_convert_FILETIME_to_POSIX): Adjust coding style.
48257         (_gl_fstat_by_handle): If _GL_WINDOWS_STAT_TIMESPEC, convert the
48258         FILETIME to 'struct timespec', not 'time_t'.
48259         * lib/stat.c (rpl_stat): If _GL_WINDOWS_STAT_TIMESPEC, convert the
48260         FILETIME to 'struct timespec', not 'time_t'.
48261         * lib/stat-time.h (STAT_TIMESPEC): Define also if
48262         _GL_WINDOWS_STAT_TIMESPEC.
48263         * doc/windows-stat-timespec.texi: New file.
48264         * doc/gnulib.texi: Include it.
48266 2017-05-13  Bruno Haible  <bruno@clisp.org>
48268         windows-stat-override: New module.
48269         * lib/sys_stat.in.h (stat) [GNULIB_OVERRIDES_STRUCT_STAT]: Provide own
48270         definition. Define GNULIB_defined_struct_stat.
48271         (fstat, fstatat, lstat, stat) [GNULIB_OVERRIDES_STRUCT_STAT]: Provoke
48272         link error if this symbol is used and the corresponding module is not
48273         in use.
48274         (_stat64, _stat32i64, _stati64, _stat32, _stat64i32): Don't redefine if
48275         GNULIB_OVERRIDES_STRUCT_STAT.
48276         * m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Initialize
48277         GNULIB_OVERRIDES_STRUCT_STAT.
48278         * modules/sys_stat (Makefile.am): Substitute
48279         GNULIB_OVERRIDES_STRUCT_STAT.
48280         * modules/windows-stat-override: New file.
48282 2017-05-13  Bruno Haible  <bruno@clisp.org>
48284         fstat: Fix module dependency conditions.
48285         * modules/fstat (Depends-on): Fix typo.
48287 2017-05-13  Bruno Haible  <bruno@clisp.org>
48289         stat, fstat: Complete removal of old native Windows code.
48290         * lib/stat.c: Remove old macrology for WINDOWS_NATIVE.
48291         * lib/fstat.c: Likewise.
48292         * lib/stat-w32.c: Likewise.
48294 2017-05-13  Bruno Haible  <bruno@clisp.org>
48296         stat: Complete removal of REPLACE_FUNC_STAT_DIR code.
48297         * lib/stat.c: Remove all REPLACE_FUNC_STAT_DIR code.
48299 2017-05-11  Paul Eggert  <eggert@cs.ucla.edu>
48301         getopt-posix: port to mingw
48302         * lib/getopt.c (flockfile, funlockfile): Define on mingw.
48303         Problem reported by Daniel P. Berrage in:
48304         http://lists.gnu.org/r/bug-gnulib/2017-05/msg00086.html
48306 2017-05-11  Bruno Haible  <bruno@clisp.org>
48308         gettimeofday: Increase precision on mingw.
48309         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): Require AC_CANONICAL_HOST.
48310         Set REPLACE_GETTIMEOFDAY to 1 on mingw.
48311         * lib/gettimeofday.c (gettimeofday): On native Windows, use the
48312         GetSystemTimePreciseAsFileTime based implementation always.
48313         * doc/posix-functions/gettimeofday.texi: Mention precision problem on
48314         mingw.
48316 2017-05-11  Bruno Haible  <bruno@clisp.org>
48318         poll: Fix confusion between SOCKETs and FDs on native Windows.
48319         Fix proposed by Daniel P. Berrange <berrange@redhat.com>.
48320         * lib/poll.c [WINDOWS_NATIVE]: Undefine select.
48322 2017-05-11  Bruno Haible  <bruno@clisp.org>
48324         doc: Clarify doc about socket functions on native Windows.
48325         This reworks doc that was added on 2008-09-29.
48326         * doc/posix-functions/select.texi: Fix copy-and-paste mistake and use
48327         clearer wording.
48328         * doc/posix-functions/accept.texi: Use clearer wording.
48329         * doc/posix-functions/bind.texi: Likewise.
48330         * doc/posix-functions/connect.texi: Likewise.
48331         * doc/posix-functions/getpeername.texi: Likewise.
48332         * doc/posix-functions/getsockname.texi: Likewise.
48333         * doc/posix-functions/getsockopt.texi: Likewise.
48334         * doc/posix-functions/ioctl.texi: Likewise.
48335         * doc/posix-functions/listen.texi: Likewise.
48336         * doc/posix-functions/recv.texi: Likewise.
48337         * doc/posix-functions/recvfrom.texi: Likewise.
48338         * doc/posix-functions/send.texi: Likewise.
48339         * doc/posix-functions/sendto.texi: Likewise.
48340         * doc/posix-functions/setsockopt.texi: Likewise.
48341         * doc/posix-functions/shutdown.texi: Likewise.
48342         * doc/posix-functions/socket.texi: Likewise.
48344 2017-05-10  Bruno Haible  <bruno@clisp.org>
48346         poll: Fix link error on native Windows.
48347         * lib/poll.c [WINDOWS_NATIVE]: Undefine recv.
48349 2017-05-10  Bruno Haible  <bruno@clisp.org>
48351         time: Fix missing initialization of HAVE_TIMEZONE_T.
48352         * m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS): Initialize HAVE_TIMEZONE_T
48353         here...
48354         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_DEFAULTS): ... not here.
48355         * m4/time_rz.m4 (gl_TIME_RZ): Require gl_HEADER_TIME_H_DEFAULTS, not
48356         gl_HEADER_SYS_TIME_H_DEFAULTS.
48357         * modules/time_rz (Depends-on): Add 'time'. Remove useless quoting.
48358         (configure.ac): Remove useless quoting.
48360 2017-05-10  Bruno Haible  <bruno@clisp.org>
48362         Implement a way to opt out from MSVC support, part 2.
48363         * modules/msvc-inval (Include): Document recommended idiom.
48364         * modules/msvc-nothrow (Include): Likewise.
48366         Implement a way to opt out from MSVC support.
48367         This is useful for Emacs.
48368         * modules/msvc-nothrow (configure.ac): Invoke gl_MODULE_INDICATOR.
48369         * lib/accept4.c: Include <io.h> as an alternative to msvc-nothrow.h.
48370         * lib/error.c: Likewise.
48371         * lib/fcntl.c: Likewise.
48372         * lib/flock.c: Likewise.
48373         * lib/fstat.c: Likewise.
48374         * lib/fsync.c: Likewise.
48375         * lib/ioctl.c: Likewise.
48376         * lib/isapipe.c: Likewise.
48377         * lib/lseek.c: Likewise.
48378         * lib/nonblocking.c: Likewise.
48379         * lib/poll.c: Likewise.
48380         * lib/select.c: Likewise.
48381         * lib/sockets.h: Likewise.
48382         * lib/sockets.c: Likewise.
48383         * lib/stdio-read.c: Likewise.
48384         * lib/stdio-write.c: Likewise.
48385         * lib/utimens.c: Likewise.
48386         * lib/w32sock.h: Likewise.
48387         * lib/w32spawn.h: Likewise.
48388         * tests/test-cloexec.c: Likewise.
48389         * tests/test-dup-safer.c: Likewise.
48390         * tests/test-dup2.c: Likewise.
48391         * tests/test-dup3.c: Likewise.
48392         * tests/test-fcntl.c: Likewise.
48393         * tests/test-pipe.c: Likewise.
48394         * tests/test-pipe2.c: Likewise.
48395         * lib/ftruncate.c: Likewise.
48396         (chsize_nothrow): Renamed from chsize.
48397         * lib/msvc-nothrow.c: Don't include msvc-inval.h if
48398         HAVE_MSVC_INVALID_PARAMETER_HANDLER is not defined.
48399         * lib/close.c: Likewise.
48400         * lib/dup.c: Likewise.
48401         * lib/fclose.c: Likewise.
48402         * lib/raise.c: Likewise.
48403         * tests/test-fgetc.c: Likewise.
48404         * tests/test-fputc.c: Likewise.
48405         * tests/test-fread.c: Likewise.
48406         * tests/test-fwrite.c: Likewise.
48407         * lib/getdtablesize.c: Likewise.
48408         (_setmaxstdio_nothrow): Renamed from _setmaxstdio.
48409         * lib/isatty.c: Don't include msvc-inval.h if
48410         HAVE_MSVC_INVALID_PARAMETER_HANDLER is not defined.
48411         Include <io.h> as an alternative to msvc-nothrow.h.
48412         * lib/read.c: Likewise.
48413         * lib/write.c: Likewise.
48414         * lib/dup2.c: Likewise.
48415         (dup2_nothrow): New function.
48416         (ms_windows_dup2): Use it.
48417         * m4/close.m4 (gl_FUNC_CLOSE): Invoke gl_MSVC_INVAL and test
48418         HAVE_MSVC_INVALID_PARAMETER_HANDLER only if gl_MSVC_INVAL is defined.
48419         * m4/dup.m4 (gl_FUNC_DUP): Likewise.
48420         * m4/fdopen.m4 (gl_FUNC_FDOPEN): Likewise.
48421         * m4/raise.m4 (gl_FUNC_RAISE): Likewise.
48422         * m4/read.m4 (gl_FUNC_READ): Likewise.
48423         * m4/write.m4 (gl_FUNC_WRITE): Likewise.
48424         * doc/windows-without-msvc.texi: New file.
48425         * doc/gnulib.texi (Native Windows Support without MSVC Support): New
48426         section.
48428 2017-05-10  Bruno Haible  <bruno@clisp.org>
48430         wait-process: Adjust native Windows support.
48431         * lib/wait-process.c: Use the usual condition for recognizing a native
48432         Windows platform.
48434 2017-05-10  Bruno Haible  <bruno@clisp.org>
48436         doc: New chapter "Native Windows Support".
48437         * doc/gnulib.texi (Native Windows Support): New chapter.
48438         * doc/windows-libtool.texi: Small wording changes.
48439         * doc/windows-sockets.texi: Small wording and formatting changes.
48441 2017-05-10  Bruno Haible  <bruno@clisp.org>
48443         doc: Move section "Library version handling".
48444         * doc/gnulib.texi: Move section "Library version handling"
48445         from chapter "Miscellaneous Notes" to chapter "Particular Modules".
48447 2017-05-10  Bruno Haible  <bruno@clisp.org>
48449         doc: Move section "Running self-tests under valgrind".
48450         * doc/gnulib.texi: Move section "Running self-tests under valgrind"
48451         from chapter "Particular Modules" to chapter "Miscellaneous Notes".
48453 2017-05-10  Bruno Haible  <bruno@clisp.org>
48455         doc: New chapter "Build Infrastructure Modules".
48456         * doc/gnulib.texi (Build Infrastructure Modules): New chapter.
48458 2017-05-10  Bruno Haible  <bruno@clisp.org>
48460         Prepare for reordering sections in the manual.
48461         * doc/gnulib.texi: Move several sections to separate files. Include
48462         these files.
48463         * doc/out-of-memory.texi: New file, extracted from doc/gnulib.texi.
48464         * doc/obsolete.texi: Likewise.
48465         * doc/extra-tests.texi: Likewise.
48466         * doc/transversal.texi: Likewise.
48467         * doc/namespace.texi: Likewise.
48468         * doc/check-version.texi: Likewise.
48469         * doc/windows-sockets.texi: Likewise.
48470         * doc/windows-libtool.texi: Likewise.
48471         * doc/licenses-texi.texi: Likewise.
48472         * doc/build-automation.texi: Likewise.
48473         * doc/c-locale.texi: Likewise.
48475 2017-05-10  Bruno Haible  <bruno@clisp.org>
48477         Fix instructions how to update manual on www.gnu.org.
48478         * doc/README: Add -I option, so that texi2dvi finds texinfo.tex.
48480 2017-05-09  Bruno Haible  <bruno@clisp.org>
48482         tzset: Expand comment about TZ problem on native Windows.
48483         * lib/tzset.c (tzset): Elaborate comment, based on explanations by
48484         Paul Eggert.
48485         * lib/ctime.c (rpl_ctime): Likewise.
48486         * lib/localtime.c (rpl_localtime): Likewise.
48487         * lib/mktime.c (mktime): Likewise.
48488         * lib/strftime-fixes.c (rpl_strftime): Likewise.
48489         * lib/wcsftime.c (rpl_wcsftime): Likewise.
48491 2017-05-08  Paul Eggert  <eggert@cs.ucla.edu>
48493         intprops: don’t depend on ‘verify’
48494         Problem reported by Ævar Arnfjörð Bjarmason in:
48495         http://lists.gnu.org/r/bug-gnulib/2017-05/msg00054.html
48496         * lib/intprops.h: Do not include verify.h, and move compile-time
48497         checks from here ...
48498         * tests/test-intprops.c (main): ... to here, if they’re not here
48499         already.  Check widths of other standard integer types.
48500         * modules/intprops (Depends-on): Remove ‘verify’.
48502 2017-05-07  Bruno Haible  <bruno@clisp.org>
48504         utimens: On native Windows, support 100ns resolution also if fd < 0.
48505         * lib/utime.in.h: Include <time.h>.
48506         (_gl_utimens_windows): New declaration.
48507         * lib/utime.c (_gl_utimens_windows): New function, based on utime.
48508         (utime): Invoke it.
48509         * lib/utimens.c (fdutimens): On native Windows, call _gl_utimens_windows
48510         instead of utime.
48511         * modules/utime (Depends-on): Add 'time'.
48513 2017-05-07  Bruno Haible  <bruno@clisp.org>
48515         utimens: Improve error code on native Windows.
48516         * lib/utimens.c (fdutimens): If fd was not opened with O_RDWR, fail with
48517         error code EACCES, not EINVAL.
48519 2017-05-07  Bruno Haible  <bruno@clisp.org>
48521         utime: Handle more Windows error codes.
48522         * lib/utime.c (utime): Handle ERROR_BAD_NETPATH.
48523         Based on explanations by Billy O'Neal.
48525 2017-05-05  Bruno Haible  <bruno@clisp.org>
48527         crypto/rijndael: Fix "strict-aliasing rules" warnings, alignment issues.
48528         * lib/rijndael-api-fst.c (rijndaelBlockEncrypt): Declare 'block' as a
48529         union.
48530         (rijndaelPadEncrypt, rijndaelBlockDecrypt): Likewise.
48531         (rijndaelPadDecrypt): Likewise. Use local variable 'iv' to cache the
48532         value of cipher->IV.
48534 2017-05-05  Bruno Haible  <bruno@clisp.org>
48536         wctype-h-c++-tests: Update.
48537         * tests/test-wctype-h-c++.cc: Reorder to match lib/wchar.in.h.
48539 2017-05-05  Bruno Haible  <bruno@clisp.org>
48541         wchar-c++-tests: Update.
48542         * tests/test-wchar-c++.cc (wcsftime): Declare, missing since 2017-04-30.
48544 2017-05-05  Bruno Haible  <bruno@clisp.org>
48546         utime-h-c++-tests: New module.
48547         * tests/test-utime-h-c++.cc: New file.
48548         (utime): Declare, missing since 2017-04-30.
48549         * modules/utime-h-c++-tests: New file.
48551 2017-05-05  Bruno Haible  <bruno@clisp.org>
48553         unistd-c++-tests: Update.
48554         * tests/test-unistd-c++.cc (isatty): Declare, missing since 2012-01-03.
48555         (read): Declare, missing since 2011-04-15.
48556         (sethostname): Declare, missing since 2011-12-03.
48558 2017-05-05  Bruno Haible  <bruno@clisp.org>
48560         time-c++-tests: Update.
48561         * tests/test-time-c++.cc (tzset): Declare, missing since 2017-05-01.
48562         (localtime, gmtime): Declare, missing since 2017-04-30.
48563         (ctime): Declare, missing since 2017-04-30.
48564         (strftime): Declare, missing since 2017-04-30.
48565         (tzalloc, tzfree, localtime_rz, mktime_z): Declare, missing since
48566         2015-07-24.
48568 2017-05-05  Bruno Haible  <bruno@clisp.org>
48570         sys_resource-c++-tests: New module.
48571         * tests/test-sys_resource-c++.cc: New file.
48572         (getrusage): Declare, missing since 2012-04-13.
48573         * modules/sys_resource-c++-tests: New file.
48575 2017-05-05  Bruno Haible  <bruno@clisp.org>
48577         strings-c++-tests: New module.
48578         * tests/test-strings-c++.cc: New file.
48579         (ffs): Declare, missing since 2011-07-12.
48580         * modules/strings-c++-tests: New file.
48582 2017-05-05  Bruno Haible  <bruno@clisp.org>
48584         string-c++-tests: Update.
48585         * tests/test-string-c++.cc (ffsl): Declare, missing since 2011-07-15.
48586         (ffsll): Declare, missing since 2011-07-15.
48588 2017-05-05  Bruno Haible  <bruno@clisp.org>
48590         stdlib-c++-tests: Update.
48591         * tests/test-stdlib-c++.cc (posix_openpt): Declare, missing since
48592         2011-10-18.
48593         (ptsname_r): Declare, missing since 2011-11-07.
48594         (qsort_r): Declare, missing since 2014-08-29.
48595         (random, srandom, initstate, setstate): Declare, missing since
48596         2012-01-14.
48597         (secure_getenv): Declare, missing since 2013-02-05.
48599 2017-05-05  Bruno Haible  <bruno@clisp.org>
48601         stdio-c++-tests: Update.
48602         * tests/test-stdio-c++.cc (pclose): Declare, missing since 2011-09-18.
48604 2017-05-05  Bruno Haible  <bruno@clisp.org>
48606         signal-h-c++-tests: Update.
48607         * tests/test-signal-h-c++.cc (raise): Remove redundant declaration.
48609 2017-05-05  Bruno Haible  <bruno@clisp.org>
48611         math-c++-tests: Update.
48612         * tests/test-math-c++.cc (fmaf): Declare, missing since 2011-10-17.
48613         (fma): Declare, missing since 2011-10-17.
48614         (fmal): Declare, missing since 2011-10-17.
48616 2017-05-05  Bruno Haible  <bruno@clisp.org>
48618         locale-c++-tests: Update.
48619         * tests/test-locale-c++.cc (localeconv): Declare, missing since
48620         2012-03-25.
48622 2017-05-05  Bruno Haible  <bruno@clisp.org>
48624         inttypes-c++-tests: New module.
48625         * tests/test-inttypes-c++.cc: New file.
48626         (strtoimax): Declare, missing since 2012-01-05.
48627         (strtoumax): Declare, missing since 2012-01-05.
48628         * modules/inttypes-c++-tests: New file.
48630 2017-05-05  Bruno Haible  <bruno@clisp.org>
48632         dirent-c++-tests: Update.
48633         * tests/test-dirent-c++.cc (readdir): Declare, missing since 2011-09-13.
48634         (rewinddir): Declare, missing since 2011-09-13.
48635         (dirfd): Declare, missing since 2010-03-08.
48637 2017-05-04  Bruno Haible  <bruno@clisp.org>
48639         argp: Fix mistake in 2017-04-23 commit.
48640         * lib/argp-help.c (__argp_failure): If GNULIB_STRERROR_R_POSIX is set,
48641         assume that strerror_r returns 'int', not 'char *'.
48643 2017-05-04  Reuben Thomas  <rrt@sc3d.org>
48645         argp: Fix typo.
48646         * lib/argp-help.c (argp_doc): Fix spelling mistake in comment.
48648 2017-05-02  Paul Eggert  <eggert@cs.ucla.edu>
48650         utimens: port to Emacs + MS-Windows
48651         Skip the new MS-Windows-specific code if Emacs.
48652         * lib/utimens.c [EMACS_CONFIGUATION]:
48653         Avoid new MS-Windows-specific code.
48654         (USE_SETFILETIME): New macro.
48655         (fdutimens): Use it.
48657 2017-05-01  Paul Eggert  <eggert@cs.ucla.edu>
48659         tzset: update doc for TZ problems on MS-Windows
48660         * doc/posix-functions/ctime.texi,  doc/posix-functions/daylight.texi:
48661         * doc/posix-functions/localtime.texi, doc/posix-functions/mktime.texi:
48662         * doc/posix-functions/strftime.texi, doc/posix-functions/timezone.texi:
48663         * doc/posix-functions/tzname.texi, doc/posix-functions/tzset.texi:
48664         * doc/posix-functions/wcsftime.texi:
48665         Mention some issues with TZ under MS-Windows.
48667 2017-05-01  Bruno Haible  <bruno@clisp.org>
48669         copy-file: Fix build error on mingw.
48670         * modules/copy-file (Depends-on): Add 'close'.
48672 2017-05-01  Bruno Haible  <bruno@clisp.org>
48674         tzset: Work around TZ problem on native Windows.
48675         * m4/tzset.m4 (gl_FUNC_TZSET): Require AC_CANONICAL_HOST. On native
48676         Windows, set REPLACE_TZSET to 1.
48677         * lib/tzset.c (tzset): On native Windows, fix TZ if necessary, and
48678         invoke '_tzset' instead of 'tzset'.
48679         * doc/posix-functions/tzset.texi: Mention the native Windows workaround.
48681         * modules/time_rz (Depends-on): Add tzset.
48682         * lib/time_rz.c (tzset): Remove fallback definition.
48683         * m4/time_rz.m4 (gl_TIME_RZ): Don't test for tzset.
48685 2017-05-01  Bruno Haible  <bruno@clisp.org>
48687         mktime: Fix dependencies.
48688         * modules/mktime (Depends-on): Add 'time'.
48690 2017-05-01  Bruno Haible  <bruno@clisp.org>
48692         New module 'localtime-buffer', split off from module 'gettimeofday'.
48693         * lib/localtime-buffer.h: New file.
48694         * lib/localtime-buffer.c: New file, extracted from lib/gettimeofday.c.
48695         * lib/time.in.h (tzset): New declaration.
48696         (localtime, gmtime): Don't test GNULIB_GETTIMEOFDAY.
48697         * lib/tzset.c: New file, extracted from lib/gettimeofday.c.
48698         * lib/gettimeofday.c: Include localtime-buffer.h. Remove code that was
48699         moved to lib/localtime-buffer.c or lib/tzset.c.
48700         * m4/localtime-buffer.m4: New file.
48701         * m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS): Initialize GNULIB_TZSET,
48702         HAVE_TZSET, REPLACE_TZSET.
48703         * m4/tzset.m4 (gl_FUNC_TZSET): Move code from m4/gettimeofday.m4 to
48704         here, with modifications. Set HAVE_TZSET, REPLACE_TZSET. Invoke
48705         gl_LOCALTIME_BUFFER_NEEDED.
48706         (gl_FUNC_TZSET_CLOBBER): Don't require gl_HEADER_SYS_TIME_H; not needed
48707         since 2007-01-18.
48708         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): Remove code that deals with
48709         tzset.
48710         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Require gl_LOCALTIME_BUFFER_DEFAULTS.
48711         Invoke gl_LOCALTIME_BUFFER_NEEDED instead of
48712         gl_GETTIMEOFDAY_REPLACE_LOCALTIME.
48713         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Remove macro.
48714         * modules/localtime-buffer: New file.
48715         * modules/time (Depends-on): Remove 'gettimeofday'.
48716         (Makefile.am): Substitute GNULIB_TZSET, HAVE_TZSET,
48717         REPLACE_TZSET. Don't substitute GNULIB_GETTIMEOFDAY.
48718         * modules/tzset (Description): Enable hyperlink to POSIX spec.
48719         (Files): Add lib/tzset.c.
48720         (Depends-on): Remove gettimeofday. Add localtime-buffer, time.
48721         (configure.ac): Arrange to conditionally compile lib/tzset.c. Invoke
48722         gl_TIME_MODULE_INDICATOR.
48723         * modules/gettimeofday (Depends-on): Add localtime-buffer.
48725 2017-05-01  Bruno Haible  <bruno@clisp.org>
48727         copy-file: Preserve sub-second time stamps.
48728         * lib/copy-file.c: Include stat-time.h, utimens.h instead of <utime.h>.
48729         (qcopy_file_preserving): Use 'struct timespec' and utimens() to
48730         transport the time stamps from the original file to the destination
48731         file.
48732         * m4/copy-file.m4 (gl_COPY_FILE): Don't test for utime, utimes.
48733         * modules/copy-file (Depends-on): Add stat-time, utimns instead of
48734         utime-h.
48736 2017-05-01  Bruno Haible  <bruno@clisp.org>
48738         wctype-t: Fix problems if <wchar.h> gets included after <wctype.h>.
48739         * lib/wctype.in.h: Include not only <ctype.h> but also <wchar.h>. Do so
48740         also on MSVC.
48741         Reported by Eli Zaretskii <eliz@gnu.org>.
48743 2017-05-01  Bruno Haible  <bruno@clisp.org>
48745         wchar: Fix compilation error with the original mingw.org mingw.
48746         * lib/wchar.in.h (rpl_wint_t): If <crtdefs.h> does not exist, include
48747         <stddef.h> instead.
48748         * m4/wint_t.m4 (gl_TYPE_WINT_T_PREREQ): New macro, extracted from
48749         gl_WCTYPE_H.
48750         * m4/wctype_h.m4 (gl_WCTYPE_H): Don't set HAVE_CRTDEFS_H here; require
48751         gl_TYPE_WINT_T_PREREQ instead.
48752         * m4/wchar_h.m4 (gl_WCHAR_H): Require gl_TYPE_WINT_T_PREREQ.
48753         * modules/wchar (Makefile.am): Substitute HAVE_CRTDEFS_H.
48754         Reported by Eli Zaretskii <eliz@gnu.org>.
48756 2017-04-30  Bruno Haible  <bruno@clisp.org>
48758         utimecmp: Add support for native Windows.
48759         * lib/utimecmp.c (SYSCALL_RESOLUTION): Set to 100 on native Windows.
48761 2017-04-30  Bruno Haible  <bruno@clisp.org>
48763         utimens: Add support for native Windows.
48764         * lib/utimens.c: Include <windows.h>, msvc-nothrow.h.
48765         (fdutimens): Provide a native Windows implementation, like utime.c with
48766         added tv_nsec support.
48767         * modules/utimens (Depends-on): Add msvc-nothrow, utime.
48768         Suggested by Tim Rühsen <tim.ruehsen@gmx.de>.
48770 2017-04-30  Bruno Haible  <bruno@clisp.org>
48772         wcsftime: New module.
48773         * lib/wchar.in.h (wcsftime): New declaration.
48774         * lib/wcsftime.c: New file.
48775         * m4/wcsftime.m4: New file.
48776         * m4/wchar_h.m4 (gl_WCHAR_H): Test for wcsftime declaration.
48777         (gl_HEADER_TIME_H_DEFAULTS): Initialize GNULIB_WCSFTIME,
48778         HAVE_WCSFTIME, REPLACE_WCSFTIME.
48779         * modules/wchar (Makefile.am): Substitute GNULIB_WCSFTIME,
48780         HAVE_WCSFTIME, REPLACE_WCSFTIME.
48781         * modules/wcsftime: New file.
48782         * doc/posix-functions/wcsftime.texi: Mention the new module.
48784 2017-04-30  Bruno Haible  <bruno@clisp.org>
48786         strftime-fixes: New module.
48787         * lib/time.in.h (strftime): New declaration.
48788         * lib/strftime-fixes.c: New file.
48789         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Inline gl_FUNC_STRFTIME macro.
48790         (gl_FUNC_STRFTIME): Remove macro.
48791         * m4/strftime-fixes.m4: New file.
48792         * m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS): Initialize GNULIB_STRFTIME,
48793         REPLACE_STRFTIME.
48794         * modules/time (Makefile.am): Substitute GNULIB_STRFTIME,
48795         REPLACE_STRFTIME.
48796         * modules/strftime-fixes: New file.
48797         * doc/posix-functions/strftime.texi: Mention the new module.
48799 2017-04-30  Bruno Haible  <bruno@clisp.org>
48801         mktime: Work around TZ problem on native Windows.
48802         * lib/mktime.c: Add #ifs to make the algorithmic workaround independent
48803         from the native Windows workaround.
48804         * m4/mktime.m4 (gl_FUNC_MKTIME_WORKS): New macro, extracted from
48805         gl_FUNC_MKTIME. If guessing, set gl_cv_func_working_mktime to
48806         'guessing no'.
48807         (gl_FUNC_MKTIME): Require it. Require AC_CANONICAL_HOST.
48808         Set REPLACE_MKTIME to 1 on native Windows. Define NEED_MKTIME_WORKING,
48809         NEED_MKTIME_WINDOWS.
48810         (gl_FUNC_MKTIME_INTERNAL): Require gl_FUNC_MKTIME_WORKS, not
48811         gl_FUNC_MKTIME. Set WANT_MKTIME_INTERNAL, not REPLACE_MKTIME. Define
48812         NEED_MKTIME_INTERNAL.
48813         * m4/timegm.m4 (gl_FUNC_TIMEGM): Require gl_FUNC_MKTIME_WORKS, not
48814         gl_FUNC_MKTIME. Cope with 'guessing yes' value.
48815         * modules/mktime-internal (configure.ac): Test WANT_MKTIME_INTERNAL,
48816         not REPLACE_MKTIME.
48817         * doc/posix-functions/mktime.texi: Mention the native Windows
48818         workaround.
48820 2017-04-30  Bruno Haible  <bruno@clisp.org>
48822         localtime: New module.
48823         * lib/time.in.h (localtime): Declare also if requested by module
48824         'localtime'.
48825         * lib/localtime.c: New file.
48826         * m4/localtime.m4: New file.
48827         * m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS): Initialize GNULIB_LOCALTIME.
48828         * modules/time (Makefile.am): Substitute GNULIB_LOCALTIME.
48829         * modules/localtime: New file.
48830         * doc/posix-functions/localtime.texi: Mention the new module.
48832 2017-04-30  Bruno Haible  <bruno@clisp.org>
48834         ctime: New module.
48835         * lib/time.in.h (ctime): New declaration.
48836         * lib/ctime.c: New file.
48837         * m4/ctime.m4: New file.
48838         * m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS): Initialize GNULIB_CTIME,
48839         REPLACE_CTIME.
48840         * modules/time (Makefile.am): Substitute GNULIB_CTIME, REPLACE_CTIME.
48841         * modules/ctime: New file.
48842         * doc/posix-functions/ctime.texi: Mention the new module.
48844 2017-04-30  Bruno Haible  <bruno@clisp.org>
48846         gettimeofday: Provide higher resolution on native Windows.
48847         * lib/gettimeofday.c: Don't include <sys/timeb.h>.
48848         (GetSystemTimePreciseAsFileTimeFuncType): New variable.
48849         (initialize): Initialize it.
48850         (gettimeofday) [WINDOWS_NATIVE]: Use it, and convert from FILETIME to
48851         'struct timeval'. Don't use _ftime().
48852         * m4/gettimeofday.m4 (gl_PREREQ_GETTIMEOFDAY): Don't test for
48853         <sys/timeb.h> and _ftime.
48855 2017-04-30  Bruno Haible  <bruno@clisp.org>
48857         Document the problem with the Cygwin environment variable TZ.
48858         * doc/posix-functions/tzset.texi: Add note about TZ.
48859         * doc/posix-functions/ctime.texi: Likewise.
48860         * doc/posix-functions/localtime.texi: Likewise.
48861         * doc/posix-functions/mktime.texi: Likewise.
48862         * doc/posix-functions/strftime.texi: Likewise.
48863         * doc/posix-functions/wcsftime.texi: Likewise.
48864         * doc/pastposix-functions/ftime.texi: Likewise.
48866 2017-04-30  Bruno Haible  <bruno@clisp.org>
48868         utime-tests: New module.
48869         * tests/test-utime.c: New file, based on tests/test-utimens.h.
48870         * tests/test-utimens-common.h: Include <sys/stat.h>.
48871         * modules/utime-tests: New file.
48873 2017-04-29  Bruno Haible  <bruno@clisp.org>
48875         utime: New module.
48876         * lib/utime.in.h: Add comment for snippets.
48877         (utime): New declaration.
48878         * lib/utime.c: New file.
48879         * m4/utime.m4: New file.
48880         * m4/utime_h.m4 (gl_UTIME_H): Test for utime declaration.
48881         (gl_UTIME_H_DEFAULTS): Initialize GNULIB_UTIME, HAVE_UTIME,
48882         REPLACE_UTIME.
48883         * modules/utime-h (Depends-on): Add snippets.
48884         (Makefile.am): Substitute GNULIB_UTIME, HAVE_UTIME, REPLACE_UTIME.
48885         Insert snippets.
48886         * modules/utime: New file.
48887         * doc/posix-functions/utime.texi: Mention the new module.
48889 2017-04-29  Bruno Haible  <bruno@clisp.org>
48891         utime-h: Modernize handling of 'struct utimbuf'.
48892         * lib/utime.in.h: Include next <utime.h> if it exists.
48893         (utimbuf): Define to _utimbuf on native Windows.
48894         * m4/utime_h.m4 (gl_UTIME_H): Check for prerequisites of include_next.
48895         Set UTIME_H on native Windows.
48896         (gl_UTIME_MODULE_INDICATOR, gl_HEADER_UTIME_H_DEFAULTS): New macros.
48897         * modules/utime-h (Depends-on): Add include_next.
48898         (Makefile.am): Substitute also HAVE_UTIME_H, INCLUDE_NEXT,
48899         PRAGMA_SYSTEM_HEADER, PRAGMA_COLUMNS, NEXT_UTIME_H.
48901         * lib/utimens.c (utimbuf): Remove fallback definition.
48902         * m4/utimens.m4 (gl_UTIMENS): Don't require
48903         gl_CHECK_TYPE_STRUCT_UTIMBUF.
48904         * m4/utimbuf.m4: Remove file.
48905         * modules/utimens (Files): Remove m4/utimbuf.m4.
48907 2017-04-29  Bruno Haible  <bruno@clisp.org>
48909         Make use of module 'utime-h'.
48910         * modules/copy-file (Depends-on): Add utime-h.
48911         * lib/copy-file.c: Assume that <utime.h> exists.
48912         * m4/copy-file.m4 (gl_COPY_FILE): Don't test for <utime.h>.
48914         * modules/utimens (Depends-on): Add utime-h.
48915         * lib/utimens.c: Assume that <utime.h> exists.
48917 2017-04-29  Bruno Haible  <bruno@clisp.org>
48919         utime-h: New module.
48920         * m4/utime_h.m4: New file.
48921         * lib/utime.in.h: New file.
48922         * modules/utime-h: New file.
48923         * doc/posix-headers/utime.texi: Mention the new module.
48925         * tests/test-utime-h.c: New file.
48926         * modules/utime-h-tests: New file.
48928 2017-04-30  Bruno Haible  <bruno@clisp.org>
48930         Fix a few typos.
48931         * m4/fstat.m4 (gl_FUNC_FSTAT): Require AC_CANONICAL_HOST.
48932         * m4/stat.m4 (gl_FUNC_STAT): Fix comment.
48933         * doc/posix-functions/fstat.texi: Fix a plural typo.
48934         * doc/posix-functions/stat.texi: Likewise.
48935         * m4/include_next.m4: Update comments.
48937 2017-04-29  Bruno Haible  <bruno@clisp.org>
48939         error: Fix mistake in 2017-04-23 commit.
48940         * lib/error.c (print_errno_message): If GNULIB_STRERROR_R_POSIX is set,
48941         assume that strerror_r returns 'int', not 'char *'.
48943 2017-04-29  Bruno Haible  <bruno@clisp.org>
48945         stat: Fix time_t values and other problems on native Windows platforms.
48946         * doc/posix-functions/stat.texi: Mention the problem with the Microsoft
48947         implementations of stat().
48948         * lib/stat.c: Include filename.h instead of dosname.h. Include
48949         malloca.h, stat-w32.h.
48950         (is_unc_root): New function.
48951         (rpl_stat): New implementation for native Windows. Remove
48952         REPLACE_FUNC_STAT_DIR code.
48953         * m4/stat.m4 (gl_FUNC_STAT): On native Windows, set REPLACE_STAT always.
48954         Don't define REPLACE_FUNC_STAT_DIR.
48955         (gl_PREREQ_STAT): Require gl_HEADER_SYS_STAT_H.
48956         * modules/stat (Files): Add lib/stat-w32.h, lib/stat-w32.c.
48957         (Depends-on): Remove dosname. Add filename, malloca.
48958         (configure.ac): Also compile lib/stat-w32.c.
48960 2017-04-29  Bruno Haible  <bruno@clisp.org>
48962         fstat: Fix time_t values on native Windows platforms.
48963         * doc/posix-functions/fstat.texi: Mention the problem with st_*time.
48964         * lib/stat-w32.h: New file.
48965         * lib/stat-w32.c: New file.
48966         * lib/fstat.c: Don't include msvc-inval.h. Include msvc-nothrow.h,
48967         stat-w32.h instead.
48968         (fstat_nothrow): Remove function.
48969         (rpl_fstat): Implement by means of _gl_fstat_by_handle.
48970         * m4/fstat.m4 (gl_FUNC_FSTAT): On native Windows, set REPLACE_FSTAT
48971         always.
48972         (gl_PREREQ_FSTAT): Require gl_HEADER_SYS_STAT_H.
48973         * modules/fstat (Files): Add lib/stat-w32.h, lib/stat-w32.c.
48974         (Depends-on): Remove msvc-inval. Add pathmax, msvc-nothrow.
48975         (configure.ac): Also compile lib/stat-w32.c.
48977 2017-04-29  Paul Eggert  <eggert@cs.ucla.edu>
48979         getopt: port to Solaris 10 with circa-1997 glibc getopt.h
48980         Problem reported by Assaf Gordon and Gavin Smith in:
48981         http://lists.gnu.org/r/bug-gnulib/2017-04/msg00157.html
48982         * lib/getopt-pfx-ext.h (_getopt_internal) [__GETOPT_PREFIX]:
48983         #define this, too.
48985 2017-04-29  Bruno Haible  <bruno@clisp.org>
48987         strerror_r-posix: Fixes for MSVC 14.
48988         * lib/strerror_r.c: Include <stdarg.h>.
48989         (strerror_r): Provide error messages for errno values 100...140.
48990         * doc/posix-functions/strerror_r.texi: Mention the MSVC 14 problem.
48992 2017-04-28  Bruno Haible  <bruno@clisp.org>
48994         noreturn: New module.
48995         * lib/noreturn.h: New file.
48996         * modules/noreturn: New file.
48997         * tests/test-noreturn.c: New file.
48998         * modules/noreturn-tests: New file.
48999         * tests/test-noreturn-c++.cc: New file.
49000         * modules/noreturn-c++-tests: New file.
49002 2017-04-27  Bruno Haible  <bruno@clisp.org>
49004         wctype-h: Fix compilation error with the original mingw.org mingw.
49005         * m4/wctype_h.m4 (gl_WCTYPE_H): Test for <crtdefs.h>. Set
49006         HAVE_CRTDEFS_H.
49007         * modules/wctype-h (Makefile.am): Substitute HAVE_CRTDEFS_H.
49008         * lib/wctype.in.h (rpl_wint_t): If <crtdefs.h> does not exist, include
49009         <stddef.h> instead.
49010         Reported and proposed by Eli Zaretskii <eliz@gnu.org>.
49012 2017-04-26  Pádraig Brady  <P@draigBrady.com>
49014         nap.h: Fix compilation on non windows platforms
49015         * tests/nap.h: Move misplaced endif.
49017 2017-04-26  Pádraig Brady  <P@draigBrady.com>
49018         and Paul Eggert  <eggert@cs.ucla.edu>
49020         time_rz: fix heap buffer overflow vulnerability
49021         Reported and analyzed at https://bugzilla.redhat.com/CVE-2017-7476
49022         * lib/time_rz.c (save_abbr): Rearrange the calculation determining
49023         whether there is enough buffer space available, thus avoiding
49024         the problematic promotion of signed to unsigned causing an invalid
49025         comparison when zone_copy is more than ABBR_SIZE_MIN bytes beyond
49026         the start of the buffer.
49027         * tests/test-parse-datetime.c (main): Add a test case written by
49028         Paul Eggert, which overwrites enough of the heap so that
49029         standard glibc will fail with "free(): invalid pointer"
49030         without the patch applied.
49032 2017-04-26  Paul Eggert  <eggert@cs.ucla.edu>
49034         xalloc: add missing integer overflow check
49035         * lib/xalloc.h (x2nrealloc): Also check for multiplication
49036         overflow when P is null.
49038 2017-04-25  Paul Eggert  <eggert@cs.ucla.edu>
49040         parse-datetime: make it standalone
49041         * lib/parse-datetime.y: Include <stdarg.h>, for va_start etc.
49042         (_GL_ATTRIBUTE_FORMAT): New macro.
49043         These are needed to get './gnulib-tool --test parse-datetime' to work.
49045 2017-04-23  Bruno Haible  <bruno@clisp.org>
49047         nap.h: Port to native Windows.
49048         * tests/nap.h (nap_get_stat): Renamed from get_stat. Remove argument fd;
49049         use nap_fd instead. On native Windows, close and reopen nap_fd.
49050         (nap_works): Don't compare the ctimes, because on native Windows, these
49051         are the creation times.
49052         (nap): Update.
49054 2017-04-23  Bruno Haible  <bruno@clisp.org>
49056         nap.h: Fix logic.
49057         * tests/nap.h (nap): Avoid signed integer overflow in loop.
49059 2017-04-23  Bruno Haible  <bruno@clisp.org>
49061         Fix conflict between strerror_r-posix module and AC_FUNC_STRERROR_R.
49062         * modules/strerror_r-posix (configure.ac): Invoke gl_MODULE_INDICATOR.
49063         * lib/error.c: Test GNULIB_STRERROR_R_POSIX before testing
49064         HAVE_DECL_STRERROR_R, HAVE_STRERROR_R, or STRERROR_R_CHAR_P.
49065         * lib/argp-help.c (__argp_failure): Likewise.
49067 2017-04-23  Bruno Haible  <bruno@clisp.org>
49069         strerror_r-posix: Revert commits from 2016-10-16,2016-11-04,2016-11-14.
49070         * m4/strerror_r.m4: Revert changes since 2016-10-16.
49071         * lib/strerror_r.c: Likewise.
49073 2017-04-23  Paul Eggert  <eggert@cs.ucla.edu>
49075         Target a C99 subset, not a C89 subset
49076         For many years Gnulib has targeted C89 and has resisted using C99
49077         features, as some Gnulib-using programs still wanted to target
49078         C89.  As this no longer seems to be the case, relax the porting
49079         requirements to allow some C99 features.  This is merely a change
49080         to the documentation, to give other Gnulib developers a chance to
49081         weigh in on the topic.
49082         * doc/extern-inline.texi (extern inline):
49083         * doc/gnulib-readme.texi (Portability guidelines):
49084         * doc/gnulib-tool.texi (Initial import):
49085         * doc/gnulib.texi (Header files):
49086         Modernize to talk about C99 and C11 instead of C89 and C99.
49087         * doc/gnulib-readme.texi (Portability guidelines):
49088         Now a section, not merely a subsection, so that it
49089         can be split up.  Modernize a bit.
49090         (C language versions, C99 features assumed)
49091         (C99 features avoided):
49092         New sections.
49094 2017-04-23  Bruno Haible  <bruno@clisp.org>
49096         doc: New section "Modules that modify the way other modules work".
49097         * doc/gnulib.texi (Modules that modify the way other modules work): New
49098         section.
49100 2017-04-23  Bruno Haible  <bruno@clisp.org>
49102         stat-time: Update comments.
49103         * lib/stat-time.h: Fix reference regarding st_ctime on Windows.
49104         * tests/test-utimens-common.h: Add reference regarding st_ctime on
49105         Windows.
49107 2017-04-01  Bruno Haible  <bruno@clisp.org>
49109         glob: Fix more memory leaks.
49110         * lib/glob.c (glob): Free allocated memory before returning.
49111         Reported by Coverity via Tim Rühsen.
49113 2017-04-22  Paul Eggert  <eggert@cs.ucla.edu>
49115         poll: improve fast check for out-of-range NFD
49116         * lib/poll.c: Do not include intprops.h.
49117         (poll): Compare NFD to INT_MAX, not to TYPE_MAXIMUM (nfds_t) / 2.
49118         * modules/poll (Depends-on): Remove intprops.
49120         ftoastr: cite a newer paper
49121         * lib/ftoastr.c (FTOASTR): In comment, cite Andrysco et al. 2016
49122         instead of Loitsch 2010.
49124 2017-04-22  Bruno Haible  <bruno@clisp.org>
49126         poll: Enable argument check also in the Windows implementation.
49127         * lib/poll.c (poll) [WINDOWS_NATIVE]: Check value of nfd correctly.
49128         Reported by Paul Eggert.
49130 2017-04-22  Bruno Haible  <bruno@clisp.org>
49132         getlogin_r: Work around bug in Mac OS X 10.12.
49133         * m4/getlogin_r.m4 (gl_FUNC_GETLOGIN_R): Test also against the Mac OS X
49134         bug.
49135         * lib/getlogin_r.c (getlogin_r): When getlogin_r returns a string of the
49136         given size minus 1, call getlogin_r a second time, on a larger buffer.
49137         * modules/getlogin_r (Depends-on): Add malloca.
49138         * doc/posix-functions/getlogin_r.texi: Mention the Mac OS X bug.
49140 2017-04-22  Paul Eggert  <eggert@cs.ucla.edu>
49142         parse-datetime: fix %z and prefer signed int
49143         %z problem reported by Pádraig Brady in:
49144         http://lists.gnu.org/r/bug-gnulib/2017-04/msg00103.html
49145         While fixing it, I decided to prefer signed ints to size_t, as
49146         they are less error-prone (e.g., ubsan catches overflow).
49147         * lib/parse-datetime.y (textint, parser_control, lookup_word, yylex)
49148         (parse_datetime2): Prefer ptrdiff_t to size_t for sizes and object
49149         counts, since signed integers make for better debugging.
49150         (date): Don’t assume %z works in printf formats.
49151         (debug_strfdatetime, debug_strfdate, debug_strftime): Use int for
49152         sizes of buffers known to be small, e.g., because we’re using snprintf.
49153         (parse_datetime2): Simplify call to debug_mktime_not_ok.
49155 2017-04-22  Bruno Haible  <bruno@clisp.org>
49157         *printf: Work around rounding bug on Mac OS X.
49158         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Test for Mac OS X 10.12 bug.
49159         * doc/posix-functions/*printf.texi: Mention the rounding bugs of
49160         Mac OS X and FreeBSD.
49161         * doc/glibc-functions/*printf.texi: Likewise.
49163 2017-04-22  Bruno Haible  <bruno@clisp.org>
49165         vasnprintf tests: Avoid warnings.
49166         * tests/test-vasnprintf-posix3.c (test_function, my_asnprintf,
49167         test_vasnprintf, test_asnprintf): Don't define if there's nothing to
49168         test.
49170 2017-04-22  Bruno Haible  <bruno@clisp.org>
49172         sys_file tests: Avoid warning.
49173         * tests/test-sys_file.c (main): Add a default clause to the switch
49174         statement.
49176 2017-04-22  Bruno Haible  <bruno@clisp.org>
49178         sethostname: Update doc.
49179         * doc/glibc-functions/sethostname.texi: Mention differing prototype on
49180         Mac OS X.
49182 2017-04-22  Bruno Haible  <bruno@clisp.org>
49184         quotearg tests: Avoid warnings.
49185         * tests/test-quotearg.c: Don't include test-quotearg.h if ENABLE_NLS is
49186         false.
49188 2017-04-22  Bruno Haible  <bruno@clisp.org>
49190         poll: Enable argument check.
49191         * lib/poll.c: Include intprops.h.
49192         (poll): Check value of nfd correctly.
49193         * modules/poll (Depends-on): Add intprops.
49195 2017-04-22  Bruno Haible  <bruno@clisp.org>
49197         get-rusage-data: Avoid warnings on Mac OS X.
49198         * lib/get-rusage-data.c: On Mac OS X, don't define
49199         get_rusage_data_via_setrlimit nor get_rusage_data_via_iterator.
49200         (get_rusage_data) [Mac OS X]: Just return 0.
49202 2017-04-22  Bruno Haible  <bruno@clisp.org>
49204         xbinary-io: Fix build error.
49205         * modules/xbinary-io (Depends-on): Add gettext-h.
49206         * lib/xbinary-io.c: Include gettext.h and define _().
49207         Reported by Gisle Vanem <gisle.vanem@gmail.com> in
49208         <https://lists.gnu.org/r/bug-gnulib/2017-04/msg00089.html>.
49210 2017-04-22  Paul Eggert  <eggert@cs.ucla.edu>
49212         parse-datetime: overflow and debug cleanups
49213         This long patch was triggered by this bug report from Ruediger Meier:
49214         http://lists.gnu.org/r/bug-gnulib/2017-04/msg00028.html
49215         I fixed the bug he noted, then found some others nearby, and then
49216         still others.  Oh my goodness, there were a lot of bugs.  I cleaned
49217         up some of the code to follow GNU standards while I was at it.
49218         * lib/parse-datetime.y (ISDIGIT): Remove; all callers changed to
49219         use c_isdigit.
49220         (EPOCH_YEAR): Remove; unused.
49221         (TM_YEAR_BASE): Now an enum rather than a macro.
49222         (HOUR, debug_strfdatetime): Multiply hour by 3600, not 60, to get
49223         time zone offset, since timezones now are in terms of seconds and
49224         not minutes.
49225         (long_time_t): Remove.  All uses replaced by time_t or intmax_t as
49226         appropriate.  Verify that intmax_t is wide enough.
49227         (time_overflow, time_zone_str): New functions, used to deal
49228         more reliably with overflow.
49229         (dbg_printf): Add printf attribute, to help catch integer width errors.
49230         (textint, relative_time, parser_control, time_zone_hhmm, set_hhmmss)
49231         (%union, to_hour, yylex, parse_datetime2):
49232         Use intmax_t instead of long int and/or long_time_t.
49233         All uses changed.
49234         (DBGBUFSIZE): Move earlier.
49235         (relative_time, set_hhmmss, parser_control):
49236         Just use int for nanoseconds and for time zones; that’s wide enough.
49237         (parser_control): Use bool for members like year_seen that can
49238         be booleans instead of counters.  All uses changed.
49239         Remove debug_default_input_timezone; no longer needed.
49240         All uses removed.
49241         (apply_relative_time): Return a bool overflow flag.
49242         All uses changed to check for overflow.
49243         (apply_relative_time, zone, date, relunit, relunit_snumber)
49244         (signed_seconds, unsigned_seconds, yylex, parse_datetime2):
49245         Check for integer overflow portably.
49246         (str_days): Use just int for N, as it’s wide enough.
49247         Prefer 2D char arrays to arrays of char * when it looks like
49248         2D is a win on typical platforms.
49249         Prefer snprintf to strncpy/strncat, for simplicity;
49250         all buffers are smaller than INT_MAX so this is safe.
49251         (TIME_ZONE_BUFSiZE, TM_YEAR_BUFSIZE): New constants.
49252         (debug_print_current_time): Don’t assume tv_nsec is of type long,
49253         as this is not true on x32.  Output "." before any nanoseconds.
49254         (debug_print_current_time, parse_datetime2):
49255         Output local zones using a more-consistent format.
49256         (debug_print_current_time, date, parse_datetime2):
49257         (main) [TEST]:
49258         Don’t assume time_t is the same width as long.
49259         (print_rel_part): New function, replacing ...
49260         (PRINT_REL_PART): ... this macro, which was removed.  All uses changed.
49261         (debug_print_relative_time): Use bool for boolean.
49262         (local_zone): dsts_seen now counts only tDST instances.
49263         (date): Fix printf of size_t to use %z.  Do not assume numeric
49264         tokens have negative values merely because the context suggests
49265         a syntax with "-" separating tokens.
49266         (time_zone_hhmm): Return bool success indicator, which checks for
49267         overflow.  Store result into PC->time_zone instead.  All callers
49268         changed.
49269         (tm_year_str): New function.  Return a bool success indicator and
49270         store the result into a buffer.  All callers changed.  Output the
49271         numerically correct string even if adding 1900 to the year would
49272         overflow.
49273         (to_tm_year): New function, replacing the old to_year.  All
49274         callers changed.
49275         (tm_diff): Sync with glibc.
49276         (lookup_word): Use to_uchar instead of doing it by hand.
49277         (TZBUFSIZE): Now local to the only function that needs it.
49278         (debug_strfdatetime): Simplify now that time zones are int seconds.
49279         (debug_strfdate): Work even if tm_year + 1900 would overflow.
49280         (get_effective_timezone): Remove.  All uses removed.
49281         (parse_datetime2): Use fprintf in pieces instead of snprintfing
49282         to a fixed-size buffer.  Don’t assume that gmtime succeeds iff
49283         localtime succeeds.  Use tm_gmtoff if available.  Simplify how
49284         ‘goto fail;’ works in conjunction with the ‘ok’ flag.
49285         * m4/parse-datetime.m4 (gl_PARSE_DATETIME): Don’t define
49286         TIME_T_FITS_IN_LONG_INT, as it is no longer needed.
49287         * modules/parse-datetime (Depends-on): Add inttypes.
49289 2017-04-21  Bruno Haible  <bruno@clisp.org>
49291         gettext-h: Avoid -Wundef warning.
49292         * lib/gettext.h: Test the value of ENABLE_NLS only if it is defined.
49293         Reported by Tim Rühsen <tim.ruehsen@gmx.de> in
49294         <https://lists.gnu.org/r/bug-gnulib/2017-04/msg00022.html>.
49296 2017-04-05  Tim Rühsen  <tim.ruehsen@gmx.de>
49298         error: Avoid "function declaration isn't a prototype" warning.
49299         * lib/error.c (strerror_r): Turn K&R C prototype to an ANSI C prototype.
49301 2017-04-21  Bruno Haible  <bruno@clisp.org>
49303         vasnprintf: Fix for MSVC 14.
49304         * lib/vasnprintf.c (USE_MSVC__SNPRINTF): New macro.
49305         Everywhere, use !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF instead
49306         of !HAVE_SNPRINTF_RETVAL_C99.
49308 2017-04-21  Bruno Haible  <bruno@clisp.org>
49310         mbrtowc tests: Fix test failures on MSVC 14.
49311         * tests/test-mbrtowc-w32.c (test_one_locale): Accept MSVC's conversion
49312         behaviour for invalid input.
49314 2017-04-21  Bruno Haible  <bruno@clisp.org>
49316         mbsinit: Fix for MSVC 14.
49317         * lib/mbsinit.c (mbsinit): If GNULIB_defined_mbstate_t, provide an
49318         implementation that is in sync with mbrtowc.c. On other platforms, use
49319         an adequate ad-hoc implementation.
49321 2017-04-21  Bruno Haible  <bruno@clisp.org>
49323         Fix test-mbrtowc5.sh failure on native Windows.
49324         * lib/setlocale.c (setlocale_unixlike): Accept "POSIX" as an alias for
49325         "C".
49327 2017-04-21  Bruno Haible  <bruno@clisp.org>
49329         Avoid accidental use of native Windows APIs on Cygwin.
49330         * lib/getaddrinfo.c (WINDOWS_NATIVE): Don't define on Cygwin.
49331         * lib/localcharset.c (WINDOWS_NATIVE): Likewise.
49332         * lib/localename.c (WINDOWS_NATIVE): Likewise.
49334 2017-04-20  Bruno Haible  <bruno@clisp.org>
49336         Remove red warnings from the generated MODULES.html.
49337         * modules/fcntl (Description): Disambiguate function references.
49338         * modules/getcwd-lgpl (Description): Likewise.
49339         * modules/hostent (Description): Likewise.
49340         * modules/servent (Description): Likewise.
49341         * modules/tempname (Description): Likewise.
49343 2017-04-20  Bruno Haible  <bruno@clisp.org>
49345         verify tests: Fix spurious failure with parallel make.
49346         * gnulib-tool (func_emit_tests_Makefile_am): Emit initialization of
49347         EXTRA_PROGRAMS.
49348         * tests/test-verify.sh: Build test-verify-try.o, not test-verify.o.
49349         * tests/test-verify-try.c: New file.
49350         * modules/verify-tests (Files): Add it.
49351         (EXTRA_PROGRAMS): Add test-verify-try.
49352         (MOSTLYCLEANFILES): Update accordingly.
49353         Reported by Adam James Stewart <ajstewart@anl.gov>.
49355 2017-04-18  Bruno Haible  <bruno@clisp.org>
49357         vma-iter: Fix compilation error on Solaris 7.
49358         * lib/vma-iter.c (vma_iterate): Treat missing MAP_ANONYMOUS on Solaris
49359         like on IRIX, OSF/1.
49360         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
49362 2017-04-18  Bruno Haible  <bruno@clisp.org>
49364         vma-iter: Fix conflict with module 'largefile' on 32-bit Solaris 9.
49365         * modules/vma-iter (configure.ac): Test whether <sys/procfs.h> can be
49366         included.
49367         * lib/vma-iter.c: On Solaris, test HAVE_SYS_PROCFS_H before including
49368         <sys/procfs.h>.
49369         * lib/vma-iter.h (VMA_ITERATE_SUPPORTED): Don't define on Solaris when
49370         <sys/procfs.h> cannot be included.
49371         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
49373 2017-04-18  Bruno Haible  <bruno@clisp.org>
49375         getopt-gnu: Add comments.
49376         * m4/getopt.m4 (gl_FUNC_GETOPT_GNU): Add comments.
49377         * modules/getopt-gnu (configure.ac): Likewise.
49379 2017-04-16  Paul Eggert  <eggert@cs.ucla.edu>
49381         regex: port better to Solaris 10
49382         Solaris 10 <locale.h> includes <libintl.h>, which #defines
49383         gettext, and this causes a double #define.
49384         Problem reported by Gavin Smith in:
49385         http://lists.gnu.org/r/bug-gnulib/2017-04/msg00056.html
49386         * lib/regex_internal.h (gettext): #undef before #defining.
49388 2017-04-15  Paul Eggert  <eggert@Penguin.CS.UCLA.EDU>
49390         intprops: improve comments
49391         * lib/intprops.h: Improve and shorten commentary.
49392         For the record, if we ever run into a pedantic compiler that
49393         behaves differently from GCC when converting an out-of-range value
49394         to a signed integer, we can work around the problem with something
49395         like the following code, where UCT is the signed counterpart of T
49396         (UCT is sometimes narrower than UT) and all callers are changed
49397         accordingly:
49398         #if __SUNPRO_C <= 0x5120
49399         # define _GL_INT_OP_WRAPV_VIA_UNSIGNED(a, b, op, uct, ut, t) \
49400            ((t) ((ut) (a) op (ut) (b)))
49401         #else
49402         # define _GL_INT_OP_WRAPV_VIA_UNSIGNED(a, b, op, uct, ut, t) \
49403            (TYPE_MINIMUM (t) <= (uct) ((ut) (a) op (ut) (b)) \
49404             ? ((t) (uct) (((ut) (a) op (ut) (b)) - TYPE_MINIMUM (t)) \
49405                + TYPE_MINIMUM (t)) \
49406             : (t) (uct) ((ut) (a) op (ut) (b)))
49407         #endif
49409 2017-04-14  Paul Eggert  <eggert@Penguin.CS.UCLA.EDU>
49411         intprops: try to avoid tickling similar bugs
49412         * lib/intprops.h (_GL_INT_OP_CALC): Document that UT no longer
49413         needs to be the same width as T; it can be wider.
49414         Change callers so that UT is at least as wide as unsigned int,
49415         as I suspect that this is less likely to run into compiler bugs.
49417         intprops: port to Oracle Studio 12.3 x86
49418         Problem reported by Gavin Smith in:
49419         http://lists.gnu.org/r/bug-gnulib/2017-04/msg00049.html
49420         * lib/intprops.h (_GL_INT_OP_WRAPV_VIA_UNSIGNED):
49421         Convert unsigned to signed via the usual rather than the standard way,
49422         to avoid a compiler bug in Oracle Studio 12.3 x86.
49424 2017-04-08  Paul Eggert  <eggert@cs.ucla.edu>
49426         getopt: prefer - to _ in new file names
49427         * lib/getopt-cdefs.in.h: Rename from lib/getopt_cdefs.in.h.
49428         * lib/getopt-core.h: Rename from lib/getopt_core.h.
49429         * lib/getopt-ext.h: Rename from lib/getopt_ext.h.
49430         * lib/getopt-pfx-core.h: Rename from lib/getopt_pfx_core.h.
49431         * lib/getopt-pfx-ext.h: Rename from lib/getopt_pfx_ext.h.
49432         All uses changed.
49434         getopt: port recent getopt changes to macOS
49435         Problem reported by Harald Maier (Bug#26398).
49436         The macOS C compiler uses __nonnull for its own purposes and that
49437         clashes with glibc's __nonnull.
49438         * lib/getopt.in.h: Add comment for _GL_ARG_NONNULL snippet.
49439         * lib/getopt_cdefs.in.h (__nonnull): Remove.
49440         * lib/getopt_core.h (getopt):
49441         * lib/getopt_ext.h (getopt_long, getopt_long_only):
49442         Use _GL_ARG_NONNULL, not __nonnull.
49443         * lib/unistd.in.h: Move snippet hooks to before where the getopt
49444         .h files are included, so that _GL_ARG_NONNULL is defined in time.
49445         * modules/getopt-posix (Depends-on): Add snippet/arg-nonnull.
49446         (getopt.h): Interpolate _GL_ARG_NONNULL snippet.
49448 2017-04-06  Paul Eggert  <eggert@cs.ucla.edu>
49450         getopt-gnu: omit some duplicate code
49451         * m4/getopt.m4 (gl_FUNC_GETOPT_GNU): Don’t require
49452         gl_FUNC_GETOPT_POSIX, as the configure.ac code generated by
49453         gnulib-tool already does this.
49454         * modules/getopt-gnu (configure.ac): Omit code duplicated from
49455         getopt-posix, which we depend on.
49457         getopt-posix: use angle-bracket include
49458         * lib/getopt1.c: Include <config.h>, not "config.h".
49460 2017-04-06  Zack Weinberg  <zackw@panix.com>
49462         getopt: annotate files with relationship to glibc
49464         As the final act in this patchset, adjust the message at the top of
49465         each file to indicate which files are synced with glibc.  (This has
49466         already been done for most of the headers.)
49468         * lib/getopt.c, lib/getopt1.c, lib/getopt_int.h:
49469         Mention in top-of-file boilerplate that these files are shared
49470         between glibc and gnulib.
49473         getopt: split up getopt.in.h and eliminate __need_getopt
49475         Over in glibc, all of the __need macros are being phased out in favor
49476         of small headers that declare only the necessary components, as this
49477         is much simpler and less prone to bugs.  As getopt is shared with
49478         glibc, gnulib needs to do the same for __need_getopt.
49480         __need_getopt is misnamed; what it really means is "we want only the
49481         getopt features specified in POSIX, not the GNU extensions".  glibc
49482         placed the "meat" of getopt.h into getopt_core.h and getopt_ext.h;
49483         these files can be shared verbatim with gnulib.  The portability
49484         wrapper, on the other hand, they have renounced altogether; glibc's
49485         getopt.h will no longer be shared with gnulib at all.  In exchange,
49486         certain glibc-specific quirks (having to do with __posix_getopt) no
49487         longer need appear in gnulib's headers at all.
49489         This patch merges getopt_core.h and getopt_ext.h from glibc, and
49490         splits up the current gnulib-side portability wrapper into three
49491         additional headers: getopt_pfx_core.h and getopt_pfx_ext.h handle
49492         __GETOPT_PREFIX for their respective headers, getopt_cdefs.in.h
49493         handles things like __BEGIN_DECLS and __THROW, and getopt.in.h and
49494         unistd.in.h just use them.  All new files are clearly marked with
49495         whether they are shared with glibc.
49497         * lib/getopt.in.h: Eliminate __need_getopt.  Break up into ...
49498         * lib/getopt_core.h, lib/getopt_ext.h: ... these new files shared
49499         with glibc, and ...
49500         * lib/getopt_cdefs.in.h, lib/getopt_pfx_core.h
49501         * lib/getopt_pfx_ext.h: ... these new files not shared with glibc.
49502         * lib/unistd.in.h: Include getopt_cdefs.h and getopt_pfx_core.h,
49503         instead of defining __need_getopt and including the full getopt.h.
49505         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE_HEADER): Check for sys/cdefs.h.
49506         Define substitution variables GETOPT_CDEFS_H and HAVE_SYS_CDEFS_H.
49507         * modules/getopt-posix (Files): Add new headers and sort list.
49508         (Depends-on): No longer need snippet/arg-nonnull.
49509         (Makefile.am): Generate getopt_cdefs.h.
49512         getopt: better handling of ambiguous options
49514         glibc's getopt uses alloca to construct a linked list of possibilities
49515         for an "ambiguous" long option.  In gnulib, malloc should be used
49516         instead.  Providing for both cases complicates things a fair bit.
49518         This patch rewrites ambiguous-option handling to use a boolean vector
49519         instead of a linked list.  There is then only one allocation that
49520         might need freeing; in glibc it can honor __libc_use_alloca as usual,
49521         and in gnulib we define __libc_use_alloca to always be false, so we
49522         don't need ifdefs in the middle of the function.  This should also be
49523         slightly more efficient in the normal case of long options being fully
49524         spelled out -- I think most people aren't even aware they _can_
49525         sometimes abbreviate long options.
49527         One interesting consequence is that the list of possibilities is now
49528         printed in exactly the order they appear in the list of long options,
49529         instead of the first possibility being shuffled to the end.
49531         (The patch looks bigger than it really is because there's a fair bit
49532         of reindentation and code rearrangement.)
49534         * lib/getopt.c: When used standalone, define __libc_use_alloca
49535         as always false and alloca to abort if called.
49536         (process_long_option): Rewrite handling of ambiguous long options
49537         to use a single boolean vector, not a linked list; use
49538         __libc_use_alloca to decide whether to allocate this using alloca.
49541         getopt: refactor long-option handling
49543         There were two copies of the bulk of the code to handle long options.
49544         Now there is only one.
49546         This change temporarily removes the logic to avoid using alloca when
49547         standalone; the next patch in the series will restore it.
49549         * lib/getopt.c (process_long_option): New function split out
49550         from _getopt_internal_r.
49551         (_getopt_internal_r): Replace both copies of the long-option
49552         processing code with calls to process_long_option.
49555         getopt: tidy up _getopt_initialize a bit
49557         _getopt_data.__posixly_correct is completely redundant to
49558         _getopt_data.__ordering, and some work that logically belongs in
49559         _getopt_initialize was being done by _getopt_internal_r, making the
49560         code harder to understand.
49562         As a side effect, getenv will no longer be called if the first
49563         character of the options string is '+' or '-', which is probably a
49564         Good Thing.  (Perhaps we should have a flag character that
49565         specifically asks for the permutation behavior?)
49567         * lib/getopt_int.h (_getopt_data): Remove __posixly_correct field.
49568         * lib/getopt.c (_getopt_internal_r): Move some initialization code...
49569         (_getopt_initialize): ...here. Don't set d->__posixly_correct.
49572         getopt: merge from glibc: repetition reduction
49574         The definitions of the entry point functions 'getopt' and
49575         '__posix_getopt' can be made substantially less repetitive with a
49576         helper macro.
49578         While I was merging the const-correctness changes from gnulib into
49579         glibc I noticed there are still some unnecessary casts in
49580         _getopt_internal_r.
49582         * lib/getopt.c (getopt, __posix_getopt): Eliminate repetition with
49583         a macro.  Consistently cast 'argv' to 'char **' when calling
49584         _getopt_internal.
49585         (_getopt_internal_r): Remove unnecessary casts when calling exchange.
49588         getopt: clean up error reporting
49590         getopt can print a whole bunch of error messages, and when used
49591         standalone (from gnulib) it uses fprintf to do that.  But fprintf is a
49592         cancellation point and getopt isn't, and also applying fprintf to a
49593         stream in wide-character mode is not allowed.  So every single error
49594         reporting case has an #ifdef _LIBC block in which it calls internal
49595         libc functions instead.  The counterpart patch series in glibc makes
49596         it possible to simplify all of that down to a set of #defines at the
49597         top of the file; core code is written as if it is safe to just call
49598         fprintf, flockfile, and funlockfile.  (One caveat: it's *not* safe to
49599         call any *other* stdio functions.)
49601         * lib/getopt.c: When _LIBC is defined, define fprintf to
49602         __fxprintf_nocancel, flockfile to _IO_flockfile, and funlockfile
49603         to _IO_funlockfile.  When neither _LIBC nor
49604         _POSIX_THREAD_SAFE_FUNCTIONS is defined, define flockfile and
49605         funlockfile as no-ops.
49606         (_getopt_internal_r): Remove all internal #ifdef _LIBC blocks; the
49607         standalone error-printing code can now be used for libc as well.
49608         Add an flockfile/funlockfile pair around one case where the error
49609         message is printed in several chunks.  Don't use fputc.
49612         getopt: fix fencepost error in ambiguous-W-option handling
49614         getopt_long contains an undocumented (AFAICT) feature in which, if you
49615         put "W;" in the short-options list, then '-W foo' and '-Wfoo' are
49616         treated as equivalent to '--foo'.  This is implemented with a partial
49617         second copy of the code for handling long options, and that code
49618         increments optind one too many times when recovering from an ambiguous
49619         abbreviated option, which can cause the main loop to walk past the end
49620         of argv and crash.
49622         I discovered this while writing a test case that tries to exercise all
49623         of getopt's error reporting paths; I wouldn't be surprised to learn
49624         that this feature is never used by real applications.
49626         * lib/getopt.c (_getopt_internal_r): Don't increment
49627         d->optind a second time when reporting ambiguous -W options.
49630         getopt: clean up getopt.c and getopt1.c file headers
49632         In getopt.c, there is no need to include wchar.h at all, and it is
49633         safe nowadays to assume that stdlib.h does declare getenv (several
49634         other gnulib modules make this assumption).
49636         In getopt1.c, the #ifdef _LIBC block at the top can be simplified
49637         by using "" inclusions consistently, and there is no actual need to
49638         include stdlib.h (except in the #ifdef TEST block, where it should be
49639         unconditional), nor to provide a backup definition of NULL at all.
49641         * lib/getopt1.c: Simplify #ifdeffage at top of file.
49642         Move inclusion of stdlib.h to #ifdef TEST block and make
49643         unconditional.  Do not define NULL.
49644         * lib/getopt.c: Don't include wchar.h. No need to declare getenv.
49645         * m4/getopt.m4 (gl_PREREQ_GETENV): Delete.
49646         * modules/getopt-gnu, modules/getopt-posix: Don't call
49647         gl_PREREQ_GETENV.
49650         getopt: harmonize comments with glibc
49652         The comments explaining how the behavior of 'getopt' varies depending
49653         on whether it's the standalone version and whether there are special
49654         characters at the beginning of the options string were inconsistent
49655         between gnulib and glibc, and also out of sync with the code.
49657         * lib/getopt.c, lib/getopt_int.h: Harmonize comments with glibc.
49660         getopt: remove USE_NONOPTION_FLAGS
49662         getopt includes code to parse an environment variable named
49663         _XXX_GNU_nonoption_argv_flags_ (where XXX is the current process's PID
49664         in decimal); but all of it has been #ifdefed out since 2001, with no
49665         official way to turn it back on.
49667         According to commentary in glibc's config.h.in, bash version 2.0
49668         set this environment variable to indicate argv elements that were
49669         the result of glob expansion and therefore should not be treated
49670         as options, but the feature was "disabled later" because "it
49671         caused problems".  According to bash's CHANGES file, "later" was
49672         release 2.01; it gives no more detail about what the problems
49673         were.
49675         Version 2.0 of bash was released on the last day of 1996, and version
49676         2.01 in June of 1997.  Twenty years later, I think it is safe to
49677         assume that this environment variable isn't coming back.
49679         * lib/getopt_int.h: Remove all #ifdef USE_NONOPTION_FLAGS blocks.
49680         * lib/getopt.c: Likewise. Also remove SWAP_FLAGS and the
49681         __libc_argc and __libc_argv externs, which were only used by
49682         #ifdef USE_NONOPTION_FLAGS blocks.
49685         getopt: tabify, in preparation for merge with glibc
49687         glibc sticks to the GNU default of indenting with a mix of
49688         8-column tabs and spaces; make the gnulib copy match.
49690         getopt.h is not included because it is *not* going to be merged in its
49691         present form.
49693         * getopt.c, getopt1.c, getopt_int.h: Tabify.
49695 2017-04-02  Bruno Haible  <bruno@clisp.org>
49697         relocatable-lib-lgpl: Fix link error (regression from 2011-06-16).
49698         * modules/relocatable-lib-lgpl (configure.ac): Add AC_LIBOBJ invocation,
49699         like it was done in modules/relocatable-lib on 2011-05-21 and in
49700         modules/relocatable-prog on 2011-08-15.
49701         Reported by Reuben Thomas <rrt@sc3d.org>.
49703 2017-03-31  Bruno Haible  <bruno@clisp.org>
49705         glob: Fix invalid free() call.
49706         * lib/glob.c (glob): Reset malloc_home_dir when assigning a pointer to
49707         static storage to home_dir.
49708         Reported by Coverity via Tim Rühsen.
49710 2017-03-31  Bruno Haible  <bruno@clisp.org>
49712         glob: Fix memory leaks.
49713         * lib/glob.c (glob): Free allocated memory before returning.
49714         Reported by Coverity via Tim Rühsen.
49716 2017-03-31  Bruno Haible  <bruno@clisp.org>
49718         md5, sha1, sha256, sha512: Add comments regarding correctness.
49719         * lib/md5.h (buflen): Add comments regarding range.
49720         * lib/sha1.h (buflen): Likewise.
49721         * lib/sha256.h (buflen): Likewise.
49722         * lib/sha512.h (buflen): Likewise.
49723         * lib/md5.c (md5_process_bytes): Add comment why memmove is not needed.
49724         * lib/sha1.c (sha1_process_bytes): Likewise.
49725         * lib/sha256.c (sha256_process_bytes): Likewise.
49726         * lib/sha512.c (sha512_process_bytes): Likewise.
49727         Reported by Coverity via Tim Rühsen.
49729 2017-03-22  Paul Eggert  <eggert@cs.ucla.edu>
49731         getopt: merge from glibc
49732         This does not change anything substantial; it merely simplifies
49733         hypothetical merges back to glibc.
49734         * lib/getopt.c, lib/getopt.in.h, lib/getopt1.c, lib/getopt_int.h:
49735         Change copyright notice to match what is in glibc.
49736         * lib/getopt.c: Reorder includes to match glibc.  Remove uses of
49737         USE_IN_LIBIO.  Remove 'register'.  In __LIBC code, use
49738         __open_memstream rather than open_memstream and __glibc_likely
49739         instead of __builtin_expect.
49740         * lib/getopt.in.h (__posix_getopt) [!__GETOPT_PREFIX]: New decl.
49742 2017-03-21  Paul Eggert  <eggert@cs.ucla.edu>
49744         dfa: make [0-9] faster in non-C locales
49745         Problem reported by John P. Linderman (Bug#26193).
49746         * lib/dfa.c (parse_bracket_exp): Remove redundant assignment.
49747         If both ends of the range are ASCII digits, do not worry about
49748         multi-character collating sequences and the like.  Be consistent
49749         about using isalpha as a precondition for setbit_case_fold_c.
49751 2017-03-19  Bruno Haible  <bruno@clisp.org>
49753         lock: Fix compilation error with HP-UX IA64 cc.
49754         * lib/glthread/lock.h (pthread_rwlockattr_setkind_np): Don't declare
49755         weak on non-glibc platforms.
49757 2017-03-19  Paul Eggert  <eggert@cs.ucla.edu>
49759         stdalign: tweak version# and test for HP-UX IA64
49760         Problems reported by Bruno Haible in:
49761         http://lists.gnu.org/r/bug-gnulib/2017-03/msg00078.html
49762         * lib/stdalign.in.h (_Alignas):
49763         * m4/stdalign.m4 (gl_STDALIGN_H):
49764         Use octal, not decimal, for __HP_cc version.  Perhaps HP formerly
49765         used octal (as that is how they document it), but it is decimal in
49766         practice now and the ancient implementations no longer matter.
49767         * tests/test-stdalign.c (main) [__HP_cc && __ia64]: Skip test.
49769 2017-03-19  Bruno Haible  <bruno@clisp.org>
49771         vma-iter: Add support for Solaris.
49772         * lib/vma-iter.c (vma_iterate): On Solaris, use the /proc filesystem
49773         approach.
49774         * lib/vma-iter.h (VMA_ITERATE_SUPPORTED): Define also on Solaris.
49775         * lib/get-rusage-as.c: Update comment about Solaris.
49776         * lib/get-rusage-data.c: Likewise.
49778 2017-03-19  Bruno Haible  <bruno@clisp.org>
49780         vma-iter: Prefer HP-UX specific API on HP-UX.
49781         * lib/vma-iter.c (vma_iterate): Move HP-UX specific implementation up.
49782         * lib/vma-iter.h: Update.
49783         Just in case HP-UX ever implements mquery().
49785 2017-03-18  Paul Eggert  <eggert@cs.ucla.edu>
49787         stdalign: restore previous behavior for HP-UX IA64
49788         See Bruno Haible's email in:
49789         http://lists.gnu.org/r/bug-gnulib/2017-03/msg00066.html
49790         which cites p 150 of a manual saying that 'aligned' works on Itanium.
49791         * lib/stdalign.in.h (_Alignas):
49792         Assume the '061200' applies to Itanium, not to PA-RISC.
49793         * m4/stdalign.m4 (gl_STDALIGN_H): Adjust to match stdalign.in.h.
49795 2017-03-17  Bruno Haible  <bruno@clisp.org>
49797         stat-time, timespec: Support use of the header files in C++ mode.
49798         * lib/stat-time.h: Add "C" linkage declaration.
49799         * lib/timespec.h: Likewise.
49801 2017-03-17  Bruno Haible  <bruno@clisp.org>
49803         stdalign: Make it work with HP-UX cc.
49804         * lib/stdalign.in.h (_Alignas): Don't define for HP-UX cc.
49805         * m4/stdalign.m4 (gl_STDALIGN_H): No need to enable the extra test
49806         for HP-UX cc.
49808 2017-03-17  Paul Eggert  <eggert@cs.ucla.edu>
49810         flexmember: try to detect HP-UX 11.31 cc bug
49811         Problem reported by Bruno Haible in:
49812         http://lists.gnu.org/r/bug-gnulib/2017-03/msg00066.html
49813         * m4/flexmember.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER):
49814         Attempt to detect bug in HP-UX 11.31 cc.
49816 2017-03-16  Bruno Haible  <bruno@clisp.org>
49818         stdint: Fix test compilation failure with HP-UX 11 cc.
49819         * lib/stdint.in.h (_STDINT_MIN): Remove macro.
49820         (_STDINT_UNSIGNED_MIN, _STDINT_SIGNED_MIN): New macros.
49821         (PTRDIFF_MIN, SIG_ATOMIC_MIN, WCHAR_MIN, WINT_MIN): Define using
49822         _STDINT_UNSIGNED_MIN, _STDINT_SIGNED_MIN.
49824 2017-03-14  Bruno Haible  <bruno@clisp.org>
49826         gnulib-tool: Don't produce a tests directory with only snippet .h files.
49827         * gnulib-tool (func_modules_transitive_closure_separately): If
49828         testsrelated_modules ends up with no "real" modules, aside from
49829         modules with applicability 'all', set it to empty.
49831 2017-03-14  Bruno Haible  <bruno@clisp.org>
49833         vma-iter: Add support for HP-UX.
49834         * modules/vma-iter (configure.ac): Check for 'pstat_getprocvm'.
49835         * lib/vma-iter.c (vma_iterate): On HP-UX, use pstat_getprocvm().
49836         * lib/vma-iter.h (VMA_ITERATE_SUPPORTED): Define also on HP-UX.
49837         * lib/get-rusage-as.c: Update comment about HP-UX.
49838         * lib/get-rusage-data.c: Likewise.
49839         (get_rusage_data): Use get_rusage_data_via_setrlimit.
49841 2017-03-14  Bruno Haible  <bruno@clisp.org>
49843         limits-h: Make it work with HP-UX cc.
49844         * lib/limits.in.h (LLONG_MIN, LLONG_MAX, ULLONG_MAX): Define if not
49845         defined.
49847 2017-03-14  Bruno Haible  <bruno@clisp.org>
49849         Fix test failures on DragonFlyBSD.
49850         * tests/test-localeconv.c (main): Treat DragonFlyBSD like FreeBSD.
49851         * tests/test-select.h (test_bad_fd): Likewise.
49852         * tests/test-get-rusage-data.c (main): Treat DragonFlyBSD like OpenBSD.
49854 2017-03-14  Bruno Haible  <bruno@clisp.org>
49856         freadahead: Silence warning on DragonFlyBSD.
49857         * lib/freadahead.c (__sreadahead): Declare ourselves.
49859 2017-03-14  Bruno Haible  <bruno@clisp.org>
49861         vma-iter: Add comment about AIX.
49862         * lib/vma-iter.c: Add comment about why this module is not implemented
49863         on AIX.
49865 2017-03-14  Paul Eggert  <eggert@cs.ucla.edu>
49867         snippets: move unadjusted snippet sources to lib
49868         Problem reported by Michal Privoznik in:
49869         http://lists.gnu.org/r/bug-gnulib/2017-03/msg00039.html
49870         * lib/_Noreturn.h: Rename from build-aux/snippet/_Noreturn.h.
49871         * lib/arg-nonnull.h: Rename from build-aux/snippet/arg-nonnull.h.
49872         * lib/c++defs.h: Rename from build-aux/snippet/c++defs.h.
49873         * lib/unused-parameter.h: Rename from
49874         build-aux/snippet/unused-parameter.h.
49875         * lib/warn-on-use.h: Rename from build-aux/snippet/warn-on-use.h.
49876         * modules/snippet/_Noreturn (Files:, _NORETURN_H):
49877         * modules/snippet/arg-nonnull (Files:, ARG_NONNULL_H):
49878         * modules/snippet/c++defs (Files:, CXXDEFS_H):
49879         * modules/snippet/unused-parameter (Files:, UNUSED_PARAMETER_H):
49880         * modules/snippet/warn-on-use (Files: WARN_ON_USE_H):
49881         Adjust to file renamings.
49883 2017-03-14  Mathieu Lirzin  <mthl@gnu.org>
49885         gnulib-tool: don't automatically distribute files from top/
49886         * gnulib-tool (func_get_automake_snippet_unconditional): To be able to
49887         not distribute top/README-release by default, don't distribute files
49888         from top/ unconditionally.
49889         * modules/gnumakefile (Makefile.am): Distribute top/GNUmakefile.
49890         * modules/maintainer-makefile (Makefile.am): Distribute top/maint.mk.
49892 2017-03-14  Paul Eggert  <eggert@cs.ucla.edu>
49894         gnulib-tool: fix typo in comment output
49895         * gnulib-tool (func_import): Fix typo with previous change.
49897         snippets: work around GNU Make 3.82 VPATH
49898         When using 'gnulib-tool --gnu-make' on Emacs, and building
49899         the resulting tarball on Solaris 10 which bundles GNU Make 3.82,
49900         an out-of-source (VPATH) build failed because the sans-copyright
49901         snippet file was not built before the file that used it.
49902         Presumably this is some sort of VPATH thing.  Work around the
49903         problem by using the original snippet, i.e., don’t bother to
49904         remove its copyright notice.
49905         * modules/snippet/_Noreturn, modules/snippet/link-warning:
49906         Don’t assume Automake in comments.  Omit long-incorrect comment.
49907         * modules/snippet/arg-nonnull (BUILT_SOURCES, arg-nonnull.h)
49908         (MOSTLYCLEANFILES):
49909         * modules/snippet/c++defs (BUILT_SOURCES, c++defs.h)
49910         (MOSTLYCLEANFILES):
49911         * modules/snippet/unused-parameter (BUILT_SOURCES, unused-parameter.h)
49912         (MOSTLYCLEANFILES):
49913         * modules/snippet/warn-on-use (BUILT_SOURCES, warn-on-use.h)
49914         (MOSTLYCLEANFILES):
49915         Remove.
49916         * modules/snippet/arg-nonnull (ARG_NONNULL_H):
49917         * modules/snippet/c++defs (CXXDEFS_H):
49918         * modules/snippet/unused-parameter (UNUSED_PARAMETER_H):
49919         * modules/snippet/warn-on-use (WARN_ON_USE_H):
49920         Don’t bother to remove the copyright notice; just use the
49921         original snippet as-is.
49923 2017-03-13  Paul Eggert  <eggert@cs.ucla.edu>
49925         gnulib-tool: minor --gnu-make fixups
49926         * gnulib-tool (func_emit_lib_Makefile_am):
49927         Remove useless code that was a blind alley during implementation.
49928         Problem reported by Thien-Thi Nguyen in:
49929         http://lists.gnu.org/r/bug-gnulib/2017-03/msg00029.html
49930         (func_import): Note the "--gnu-make" option in the output comment.
49932 2017-03-12  Paul Eggert  <eggert@cs.ucla.edu>
49934         gnulib-tool: new option --gnu-make
49935         This is for applications like GNU Emacs that use GNU Make
49936         features instead of Automake.
49937         * doc/gnulib-tool.texi (Initial import): Mention --gnu-make.
49938         * doc/gnulib.texi (Unit test modules, Build robot for gnulib):
49939         Do not assume Automake.
49940         * gnulib-tool (func_determine_path_separator)
49941         (func_modules_transitive_closure, func_update_file)
49942         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am)
49943         (func_import): Add support for --gnu-make.
49945 2017-03-11  Paul Eggert  <eggert@cs.ucla.edu>
49947         gnulib-common.m4: avoid aclocal.m4 bloat
49948         * m4/gnulib-common.m4 (gl_PROG_AR_RANLIB):
49949         Hide AM_PROG_AR from aclocal, so that aclocal does not
49950         install irrelevant macro definitions into aclocal.m4.
49952 2017-03-10  Bruno Haible  <bruno@clisp.org>
49954         vma-iter: Let callers know about error.
49955         * lib/vma-iter.h (vma_iterate): Return 'int', not 'void'.
49956         * lib/vma-iter.c (vma_iterate): Return -1 in case of error.
49958 2017-03-05  Bruno Haible  <bruno@clisp.org>
49960         Fix value of LD for 64-bit compilers on AIX.
49961         * m4/lib-ld.m4 (AC_LIB_PROG_LD): For 64-bit compilers on AIX
49962         ("gcc -maix64" and "xlc -q64"), add option -b64 to $LD.
49964 2017-03-04  Paul Eggert  <eggert@cs.ucla.edu>
49966         dtotimespec: simplify
49967         * lib/dtotimespec.c (dtotimespec): Simplify.
49969 2017-03-04  Bruno Haible  <bruno@clisp.org>
49971         test-calloc-gnu: Reenable test also for GCC 7.
49972         * tests/test-calloc-gnu.c (eight): New function.
49973         (main): Don't skip test; use eight() instead.
49975 2017-03-04  Jim Meyering  <meyering@fb.com>
49977         test-calloc-gnu: port to GCC7
49978         * tests/test-calloc-gnu.c (main) [__GNUC__ >= 7]: Skip a test
49979         that attempts to calloc more than SIZE_MAX bytes, because GCC7
49980         and newer would detect that at compilation time.
49982 2017-03-04  Bruno Haible  <bruno@clisp.org>
49984         tests: Avoid compiler warning about uses of null_ptr.
49985         * tests/null-ptr.h: New file.
49986         * tests/test-canonicalize.c: Include null-ptr.h.
49987         (null_ptr): Remove function.
49988         * tests/test-canonicalize-lgpl.c: Likewise.
49989         * tests/test-memmem.c: Likewise.
49990         * tests/test-ptsname_r.c: Likewise.
49991         * modules/canonicalize-tests (Files): Add tests/null-ptr.h.
49992         * modules/canonicalize-lgpl-tests: Likewise.
49993         * modules/memmem-tests: Likewise.
49994         * modules/ptsname_r-tests: Likewise.
49995         Reported by Jim Meyering.
49997 2017-03-03  Bruno Haible  <bruno@clisp.org>
49999         doc: Mention Mac OS X deficiencies regarding semaphores.
50000         * doc/posix-functions/sem_init.texi: Mention status on Mac OS X.
50001         * doc/posix-functions/sem_destroy.texi: Likewise.
50002         * doc/posix-functions/sem_getvalue.texi: Likewise.
50004 2017-03-03  Bruno Haible  <bruno@clisp.org>
50006         lock tests: Fix test failure on Mac OS X (regression from 2017-01-05).
50007         Reported by Assaf Gordon <assafgordon@gmail.com> via
50008         Pádraig Brady <P@draigBrady.com>.
50009         * tests/test-lock.c: On Mac OS X, use named semaphores, not unnamed
50010         semaphores.
50011         (USE_NAMED_SEMAPHORE, USE_UNNAMED_SEMAPHORE): New macros.
50012         (atomic_int_semaphore): New macro.
50014 2017-02-28  Bruno Haible  <bruno@clisp.org>
50016         perror tests: Tweak for z/OS.
50017         Reported by Daniel Richard G. <skunk@iskunk.org>.
50018         * tests/test-perror.sh: Don't fail z/OS style perror output.
50020 2017-02-26  Bruno Haible  <bruno@clisp.org>
50022         nproc: Refactor large function.
50023         * lib/nproc.c (num_processors_ignoring_omp): New function, extracted
50024         from num_processors.
50025         (num_processors): In this function, only deal with OMP.
50027 2017-02-26  Pádraig Brady  <P@draigBrady.com>
50029         nproc: adjust handling of OpenMP environment variables
50030         to match the return value from omp_get_num_threads(), i.e.:
50031          - honor OMP_THREAD_LIMIT without OMP_NUM_THREADS
50032          - Treat 0 as an invalid value and ignore
50033         Also remove the call to omp_get_num_threads() because
50034         it's ineffective without the omp pragmas in place.
50035         * lib/nproc.c (parse_omp_threads): Return 0 if specified,
50036         so that it can be ignored.
50037         (num_processors): Honor OMP_THREAD_LIMIT even without
50038         OMP_NUM_THREADS being set.  Also fix a typo in the environment
50039         variable being checked, from the previous recent commit.
50041 2017-02-26  Pádraig Brady  <P@draigBrady.com>
50043         nproc: support nested OMP_NUM_THREADS, and OMP_THREAD_LIMIT
50044         * lib/nproc.c (parse_omp_threads): A new function refactored
50045         from num_processors() to support parsing both of the
50046         above environment variables.
50047         (num_processors): Prefer using omp_get_num_threads() with [_OPENMP]
50048         to accurately reflect the current OpenMP nesting level.
50049         Also support the OMP_THREAD_LIMIT environment variable
50050         to limit the max value determined from OMP_NUM_THREADS.
50051         * modules/nproc: Depend on minmax header.
50052         Suggested by Oliver Heimlich.
50054 2017-02-25  Bruno Haible  <bruno@clisp.org>
50056         maintainer-makefile: Fix AC_PROG_SED with autoconf cache.
50057         * m4/gnulib-common.m4 (AC_PROG_SED): Fix AC_CACHE_CHECK invocation.
50059 2017-02-24  Paul Eggert  <eggert@cs.ucla.edu>
50061         ftoastr: port to -Wdouble-promotion
50062         Work around -Wdouble-promotion false alarm in recent GCCs.
50063         * lib/ftoastr.c (PROMOTED_FLOAT): New macro.
50064         (ftoastr_snprintf, FTOASTR): Use it.
50066 2017-02-21  Bruno Haible  <bruno@clisp.org>
50068         lock tests: Fix build failure on GNU/Hurd (regression from 2017-01-05).
50069         Reported by Rene Saavedra <rennes@openmailbox.org> in
50070         https://debbugs.gnu.org/cgi/bugreport.cgi?bug=25821 via Paul Eggert.
50071         * lib/glthread/lock.h: On glibc systems without
50072         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP, use the fallback
50073         implementation of rwlocks.
50074         * lib/glthread/lock.c: Likewise.
50076 2017-02-20  Bruno Haible  <bruno@clisp.org>
50078         lock tests: Fix build failure on z/OS.
50079         Reported by Daniel Richard G. <skunk@iskunk.org>.
50080         * modules/lock-tests (configure.ac): Test for <semaphore.h>.
50081         * tests/test-lock.c (USE_SEMAPHORE): Don't set if <semaphore.h> does not
50082         exist.
50084 2017-02-19  Bruno Haible  <bruno@clisp.org>
50086         havelib: Prefer the search path of /usr/bin/gcc over the one of $CC.
50087         This helps when CC=clang.
50088         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): Prefer the search path
50089         of /usr/bin/gcc.
50091         havelib: Support overriding the result of AC_LIB_PREPARE_MULTILIB.
50092         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): Use AC_CACHE_CHECK.
50094 2017-02-19  Bruno Haible  <bruno@clisp.org>
50096         gnulib-tool: Avoid conflict of havelib-tests with --single-configure.
50097         * gnulib_tool (func_create_testdir): Avoid havelib-tests when
50098         --with-tests --single-configure is specified.
50100 2017-02-16  Tim Rühsen  <tim.ruehsen@gmx.de>
50102         users.txt: Update links, use HTTPS where possible
50103         * users.txt: Updated to HTTPS where possible,
50104         fixed some links to new locations.
50106 2017-02-16  Bruno Haible  <bruno@clisp.org>
50108         xbinary-io: Fix inlining.
50109         * lib/xbinary-io.c: Set XBINARY_IO_INLINE, not XSETMODE_INLINE.
50111 2017-02-16  Paul Eggert  <eggert@cs.ucla.edu>
50113         xbinary-io: rename from xsetmode
50114         This patch is taken from suggestions by Bruno Haible in:
50115         http://lists.gnu.org/r/bug-gnulib/2017-02/msg00060.html
50116         http://lists.gnu.org/r/bug-gnulib/2017-02/msg00061.html
50117         * lib/binary-io.c (__gl_setmode_check): Set errno to EINVAL,
50118         not ENOTTY, when it is an inappropriate device.
50119         * lib/binary-io.h (SET_BINARY): Resurrect.
50120         * lib/xbinary-io.c: Rename from lib/xsetmode.c.
50121         (xset_binary_mode_error): Rename from xsetmode_error.
50122         * lib/xbinary-io.h: Rename from lib/xsetmode.h.
50123         (xset_binary_mode): Rename from xsetmode.
50124         All uses changed.
50125         * modules/xbinary-io: Rename from modules/xsetmode.
50126         Update file names.
50127         * tests/test-binary-io.sh (tmpfiles): Remove no-longer-used file name.
50128         * NEWS: Update to match revised behavior.
50130 2017-02-15  Paul Eggert  <eggert@cs.ucla.edu>
50132         tests: Adjust to recent SET_BINARY change
50133         * tests/test-binary-io.c (main):
50134         * tests/test-binary-io.sh: Remove test for SET_BINARY.
50135         * tests/test-closein.c, tests/test-fflush2.c, tests/test-ftell.c:
50136         * tests/test-ftello.c, tests/test-nonblocking-pipe-child.c:
50137         * tests/test-yesno.c: Use set_binary_mode, not SET_BINARY.
50139         xsetmode: new module
50140         This is to fix a problem noted by Eric Blake.
50141         Code was using xfreopen to change files to binary mode, but this
50142         fails for stdout when in append mode.  Such code should use
50143         xsetmode instead.
50144         * NEWS: Document incompatible changes to binary-io module.
50145         * lib/binary-io.c (__gl_setmode_check) [__DJGPP__ || __EMX__]:
50146         New function.
50147         * lib/binary-io.h (__gl_setmode): Rename from set_binary_mode.
50148         (set_binary_mode): New function, which also checks for tty.
50149         * lib/xsetmode.c, lib/xsetmode.h, modules/xsetmode: New files.
50151 2017-02-14  Paul Eggert  <eggert@cs.ucla.edu>
50153         headers: fix begin-end typos
50154         * lib/mbfile.h, lib/se-selinux.in.h: Fix typos by replacing
50155         _GL_INLINE_HEADER_BEGIN with _GL_INLINE_HEADER_END.
50157         selinux-h: port to PGI 16.10
50158         * lib/se-selinux.in.h: Don't assume that include_next skips over
50159         duplicate -I DIR options.
50161         argp: port to PGI 16.10
50162         * lib/argp-pin.c (dummy): Declare as needed to make file nonempty.
50164 2017-02-13  Darshit Shah  <darnir@gnu.org>
50166         unicase: Update function protoype to match definition.
50167         * lib/unicase/special-casing.h (gl_unicase_special_lookup): Gperf 3.1
50168         uses 'size_t' as the datatype for the 'len' parameter in the functions
50169         it generates. Update the prototype specified here to match the newly
50170         generated function.
50172 2017-02-12  Bruno Haible  <bruno@clisp.org>
50174         times test: Avoid gcc warnings on Linux/x32.
50175         * tests/test-times.c (main): Really cast printf arguments from clock_t
50176         to 'long int'.
50178 2017-02-12  Paul Eggert  <eggert@cs.ucla.edu>
50180         glob: port better to emscripten
50181         Problem reported by Bruno Haible in:
50182         http://lists.gnu.org/r/bug-gnulib/2017-02/msg00031.html
50183         * lib/glob.c (glob): Don't assume HAVE_GETPWNAM_R || _LIBC.
50185 2017-02-11  Bruno Haible  <bruno@clisp.org>
50187         host-cpu-c-abi: Support for 64-bit AIX, 32-bit armhf on arm64, hppa64.
50188         * m4/host-cpu-c-abi.m4 (gl_HOST_CPU_C_ABI): Define also HOST_CPU.
50189         For the x32 ABI on x86_64, set HOST_CPU_C_ABI to 'x86_64-x32' and define
50190         both __x86_64__ and __x86_64_x32__. For the ELFv2 ABI on powerpc64,
50191         define both __powerpc64__ and __powerpc64_elfv2__. Recognize 64-bit
50192         compilation on AIX. Recognize 32-bit compilation on arm64/Linux.
50193         Distinguish hppa64 from hppa.
50195 2017-02-10  Bruno Haible  <bruno@clisp.org>
50197         search: Don't assume that tsearch() exists if 'VISIT' is defined.
50198         * m4/search_h.m4 (gl_SEARCH_H): Determine HAVE_TYPE_VISIT.
50199         * modules/search (Makefile.am): Substitute HAVE_TYPE_VISIT.
50200         * lib/search.in.h (VISIT): Define if HAVE_TYPE_VISIT is 0.
50202 2017-02-09  Bruno Haible  <bruno@clisp.org>
50204         doc: Don't mention obsolete AC_LIBTOOL_WIN32_DLL macro.
50205         * doc/gnulib.texi (Libtool and Windows): Recommend
50206         LT_INIT([win32-dll]) instead of AC_LIBTOOL_WIN32_DLL.
50207         Reported by Reuben Thomas <rrt@sc3d.org>.
50209 2017-02-08  Paul Eggert  <eggert@cs.ucla.edu>
50211         stddef-tests: port to SIZE_MAX <= INT_MAX
50212         * tests/test-stddef.c: Include <limits.h>, for INT_MAX.
50213         Do not assume that INT_MAX < SIZE_MAX.
50215 2017-02-01  Bruno Haible  <bruno@clisp.org>
50217         lock tests: Fix link error.
50218         * modules/lock-tests (test_rwlock1_LDADD): Add @YIELD_LIB@.
50219         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
50221 2017-01-31  Bruno Haible  <bruno@clisp.org>
50223         lock: Fix link error (regression from 2017-01-05).
50224         * lib/glthread/lock.h [USE_POSIX_THREADS_WEAK]: Declare also
50225         pthread_rwlockattr_init, pthread_rwlockattr_setkind_np,
50226         pthread_rwlockattr_destroy weak.
50227         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
50229 2017-01-30  Paul Eggert  <eggert@cs.ucla.edu>
50231         Port to PGI 16.10 x86-64
50232         This patch fixes one real bug in gl_anylinked_list2.h, along with
50233         some minor glitches that are not bugs.  It does not silence PGI’s
50234         thousands of bogus warnings when compiling test-intprops.c.
50235         Fortunately, the warnings do not cause a failure.
50236         * lib/c-ctype.h (_C_CTYPE_LOWER_A_THRU_F_N, _C_CTYPE_LOWER_N):
50237         Rename parameter to avoid PGI warning about ‘#define f(n) 'n'’.
50238         My goodness, PGI goes back a long ways - this predates C89!
50239         * lib/gl_anylinked_list2.h (ASYNCSAFE): Fix bug caught by PGI.
50240         For example, ASYNCSAFE (const void *) should expand to
50241         ‘const void *volatile’, not to ‘volatile const void *’.
50242         * lib/spawn.in.h (POSIX_SPAWN_USEVFORK): Don't define if already defined.
50243         * lib/verify.h (verify) [!__GNUC__]:
50244         Use shorter albeit meaningless string to bypass silly compiler limits.
50245         * tests/infinity.h (Infinityf, Infinityd, Infinityl) [__PGI]:
50246         * tests/nan.h (NaNf, NaNd, NaNl):
50247         Use static functions to avoid misguided compiler diagnostics.
50248         Is there some reason we don’t use static functions on all platforms?
50250 2017-01-20  Paul Eggert  <eggert@cs.ucla.edu>
50252         parse-datetime: handle timezones reentrantly
50253         This API change was prompted by a report by Pádraig Brady in:
50254         https://bug.debian.org/851934#10
50255         To help fix the bug, make parse_datetime2 more reentrant.
50256         * NEWS: Document this incompatible change.
50257         * lib/parse-datetime.h, lib/parse-datetime.y (parse_datetime2):
50258         Add two arguments, the timezone and the timezone name.
50259         All callers changed.  If TZ="..." is specified, use it for
50260         calculating defaults.
50261         * lib/parse-datetime.y: Don't include xalloc.h or use xmalloc, as
50262         this code should be usable in a library.
50263         (mktime_ok, get_effective_timezone):
50264         Accept timezone arg too.  All callers changed.
50265         (get_tz): Remove.
50266         (get_effective_timezone): Check for failures.
50268 2017-01-20  Eric Blake  <eblake@redhat.com>
50270         localename: port to cygwin 2.6
50271         * lib/localename.c (gl_locale_name_thread_unsafe): Add clause for
50272         Cygwin.
50273         * modules/localename (Depends-on): Add extensions, since
50274         NL_LOCALE_NAME() is not visible without it.
50276 2017-01-17  Pádraig Brady  <P@draigBrady.com>
50278         parse-datetime: fix dependence on AC_PROG_SED
50279         * modules/parse-datetime: Use `sed` directly like all other modules.
50280         Reported by J William Piggott
50282 2017-01-16  Paul Eggert  <eggert@cs.ucla.edu>
50284         intprops: update doc URLs
50285         * doc/intprops.texi (Integer Range Overflow): Update URLs.
50287 2017-01-16  Bruno Haible  <bruno@clisp.org>
50289         host-cpu-c-abi: Add support for armhf, arm64, x32, s390x.
50290         * m4/host-cpu-c-abi.m4 (gl_HOST_CPU_C_ABI): Require gl_C_ASM. On x86_64
50291         systems, distinguish x86_64 and x32. On arm systems, distinguish arm,
50292         armhf, arm64, and no longer distinguish arm and armel. On s390x systems,
50293         distinguish s390 and s390x.
50294         * modules/host-cpu-c-abi (Files): Add m4/asm-underscore.m4.
50295         * NEWS: Mention the change regarding 'armel'.
50297 2017-01-15  Paul Eggert  <eggert@cs.ucla.edu>
50299         localeinfo: case_folded_counterparts and WEOF
50300         * NEWS: Document this.
50301         * lib/localeinfo.c (case_folded_counterparts):
50302         First arg is now wint_t, not wchar_t.  This generalizes the
50303         function to also work on WEOF, where it returns 0.
50305         dfa: port to gcc -fsanitize=undefined
50306         * lib/dfa.c (copy): Don’t pass NULL with size 0 to memcpy,
50307         as this runs afoul of gcc -fsanitize=undefined.
50309 2017-01-14  Paul Eggert  <eggert@cs.ucla.edu>
50311         strftime: %z is -00 if unknown
50312         * lib/strftime.c (DO_TZ_OFFSET): Omit arg 'negative'; it's now
50313         the caller's responsibility to set 'negative_number'.  All uses changed.
50314         (__strftime_internal): Put '-' before a zero UTC offset if the time
50315         zone abbreviation starts with "-", which is the recently-introduced
50316         tzdb convention for an unknown UTC offset that is arbitrarily set to 0.
50317         * tests/test-strftime.c: Test for this.
50319 2017-01-10  Paul Eggert  <eggert@cs.ucla.edu>
50321         dfa: port to older GCC
50322         Problem reported by Assaf Gordon in:
50323         http://lists.gnu.org/r/bug-gnulib/2017-01/msg00103.html
50324         * modules/c99: New module.  This merely attempts to use the latest
50325         C version, which should be enough to solve this particular problem.
50326         The idea is to document which Gnulib modules assume C99 or later.
50327         * modules/dfa (Depends-on): Add it.
50329 2017-01-10  Bruno Haible  <bruno@clisp.org>
50331         Update DEPENDENCIES.
50332         * DEPENDENCIES: List only https URLs. Update recommended version for
50333         autoconf, automake, gperf.
50335 2017-01-10  Jim Meyering  <meyering@fb.com>
50337         maint.mk: enforce spelling of "timestamp" (i.e., no space)
50338         * top/maint.mk (prohibit_undesirable_word_seq_RE_): Also
50339         disallow /\btime\s+stamps?\b/.  Prefer "timestamp".
50341 2017-01-10  Paul Eggert  <eggert@cs.ucla.edu>
50343         dfa: minor simplification with emptyset
50344         * lib/dfa.c (build_state): Simplify by using emptyset.
50346 2017-01-09  Paul Eggert  <eggert@cs.ucla.edu>
50348         dfa: shrink constraints from 4 bits to 3
50349         * lib/dfa.c (newline_constraint, letter_constraint)
50350         (other_constraint, prev_newline_dependent)
50351         (prev_letter_dependent, NO_CONSTRAINT, BEGLINE_CONSTRAINT)
50352         (ENDLINE_CONSTRAINT, BEGWORD_CONSTRAINT, ENDWORD_CONSTRAINT)
50353         (LIMWORD_CONSTRAINT, NOTLIMWORD_CONSTRAINT):
50354         Constraints need only 3 bits, not 4.  Using smaller integers
50355         shrinks the code a bit and makes grep a tad faster on x86-64.
50357         dfa: omit unnecessary ptrdiff_t check
50358         * lib/dfa.c (alloc_position_set): Do not worry about ptrdiff_t
50359         overflow, since xnmalloc does that now.
50361         dfa: omit unnecessary allocation
50362         * lib/dfa.c (dfaanalyze): Do not allocate follow set, since
50363         an all-zero follow set works just fine.
50365         dfa: omit unused local
50366         * lib/dfa.c (build_state): Fix up recent change.
50368         maint: remove stray .texi files
50369         Although these were superseded by other files like
50370         doc/posix-functions/ctime.texi, the old files were not removed.
50371         * doc/ctime.texi, doc/inet_ntoa.texi: Remove.
50373 2017-01-08  Paul Eggert  <eggert@cs.ucla.edu>
50375         getprogname: fix port to IRIX
50376         * lib/getprogname.c (getprogname) [__sgi]:
50377         Don't dump core if malloc returns NULL.
50379         dfa: fix reallocation bug when matching newlines
50380         Problem reported for sed by S. Gilles (Bug#25390).
50381         * lib/dfa.c (realloc_trans_if_necessary): Move earlier.
50382         (dfastate): Reallocate before moving any newline transition ...
50383         (build_state): ... instead of reallocating here, where it is too late.
50385 2017-01-07  Tim Rühsen  <tim.ruehsen@gmx.de>  (tiny change)
50387         Avoid -Wundef warning about undefined WINDOWS_SOCKETS.
50388         * lib/sockets.h: Test if WINDOWS_SOCKETS is defined.
50390 2017-01-07  Tim Rühsen  <tim.ruehsen@gmx.de>  (tiny change)
50392         Avoid -Wundef warning about undefined __USE_FILE_OFFSET64.
50393         * lib/glob-libc.h: Test if __USE_FILE_OFFSET64 is defined.
50395 2017-01-07  Bruno Haible  <bruno@clisp.org>
50397         stdioext: Port to Minix 3.2 and newer.
50398         * lib/stdio-impl.h: Treat __minix like the newest NetBSD.
50399         * lib/fseeko.c (fseeko): Likewise.
50400         Reported by Nelson Beebe via Paul Eggert.
50402 2017-01-06  Paul Eggert  <eggert@cs.ucla.edu>
50404         getprogname: port to IRIX
50405         * lib/getprogname.c (getprogname): Port to IRIX.
50406         Based on an idea by Bastien Roucariès at:
50407         http://lists.gnu.org/r/bug-gnulib/2010-12/msg00096.html
50408         via code from Bruno Haible at:
50409         https://lists.gnu.org/r/bug-gnulib/2010-12/msg00249.html
50411         localename-tests: port to NetBSD 7
50412         Problem reported by Nelson H. F. Beebe.
50413         * tests/test-localename.c:
50414         Test newlocale and uselocale only if both exist.
50416         glob, intprops, xalloc: work around Clang bug
50417         Work around LLVM bug 16404, which is still not fixed.
50418         https://llvm.org/bugs/show_bug.cgi?id=16404
50419         Problem reported by Nelson H. F. Beebe.
50420         * lib/glob.c, lib/intprops.h, lib/xalloc-oversized.h (__has_builtin):
50421         Remove.
50422         * lib/glob.c (size_add_wrapv):
50423         * lib/intprops.h (_GL_HAS_BUILTIN_OVERFLOW, _GL_HAS_BUILTIN_OVERFLOW_P):
50424         * lib/xalloc-oversized.h (xalloc_oversized):
50425         Do not use overflow builtins if Clang.
50427         dfa: fix 'return' typo
50428         Problem reported by Nelson H. F. Beebe.
50429         * lib/dfa.c (merge): Fix typo that Sun compilers rejected.
50431 2017-01-05  Pádraig Brady  <P@draigBrady.com>
50433         parse-datetime: fix generated paths for coverage files
50434         * modules/parse-datetime: Adjust the paths for parse-datetime.y
50435         within parse-datetime.c, so that gcc generates appropriate .gcno
50436         files, allowing lcov to proceed without error.  Previously it
50437         would error trying to find "lib/lib/parse-datetime.y".
50439 2017-01-05  Pádraig Brady  <P@draigBrady.com>
50441         maint.mk: support parallel execution of coverage
50442         * top/maint.mk (coverage): Run dependencies serially,
50443         thus supporting parallel processing of each one,
50444         particularly build-coverage, which builds and runs tests.
50446 2017-01-05  Bruno Haible  <bruno@clisp.org>
50448         lock tests: Prefer semaphore over mutex.
50449         * tests/test-lock.c (USE_SEMAPHORE): New constant.
50450         (struct atomic_int, init_atomic_int, get_atomic_int_value,
50451         set_atomic_int_value) [USE_SEMAPHORE]: Define using a POSIX semaphore.
50452         Suggested by Torvald Riegel <triegel@redhat.com>.
50454 2017-01-05  Bruno Haible  <bruno@clisp.org>
50456         lock: Provide guarantee to avoid writer starvation for rwlocks.
50457         The rationale is: 1) Read-preferring read-write locks are prone to
50458         writer starvation if the number of reader threads multiplied by the
50459         percentage of time they have the lock held is too high. 2) Write-
50460         preferring read-write locks are the only reliable way to avoid this.
50461         3) There have been reports of 'test-lock' hanging on glibc systems
50462         http://lists.gnu.org/r/bug-gnulib/2017-01/msg00009.html,
50463         and glibc indeed implements read-preferring rwlocks by default, see
50464         http://man7.org/linux/man-pages/man3/pthread_rwlockattr_setkind_np.3.html
50465         and https://sourceware.org/bugzilla/show_bug.cgi?id=13701 .
50466         * m4/pthread_rwlock_rdlock.m4: New file.
50467         * m4/lock.m4 (gl_LOCK): Invoke gl_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER.
50468         * lib/glthread/lock.h [USE_POSIX_THREADS]: Test
50469         HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER. Use a different implementation
50470         of rwlock initialization on glibc systems without
50471         HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER. Use a different implementation
50472         of rwlocks altogether on non-glibc systems without
50473         HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER.
50474         [USE_PTH_THREADS]: Use a different implementation of rwlocks altogether.
50475         * lib/glthread/lock.c [USE_POSIX_THREADS]
50476         (glthread_rwlock_init_for_glibc): New function.
50477         [USE_POSIX_THREADS] (glthread_rwlock_rdlock_multithreaded): Update
50478         comment.
50479         [USE_PTH_THREADS]: New implementation of rwlocks.
50480         [USE_WINDOWS_THREADS] (glthread_rwlock_rdlock_func): Prefer writers over
50481         readers.
50482         * modules/lock (Files): Add m4/pthread_rwlock_rdlock.m4.
50483         (Depends-on): Add 'extensions'.
50484         * tests/test-rwlock1.c: New file.
50485         * lock-tests (Files): Add it.
50486         (Depends-on): Add usleep.
50487         (Makefile.am): Add test-rwlock1 to the tests.
50489 2017-01-05  Bruno Haible  <bruno@clisp.org>
50491         thread: Fix pth port.
50492         * lib/glthread/thread.h (pth_init): Declare weak.
50493         (glthread_create, glthread_sigmask, glthread_join, gl_thread_self,
50494         gl_thread_exit): Make sure Pth is initialized before invoking any Pth
50495         function.
50497 2017-01-04  Assaf Gordon  <assafgordon@gmail.com>
50499         parse-datetime: fix debug message on lone year number
50500         Input dates such as
50501           date -d "Apr 11 22:59:00 2011"
50502         are parsed as date (Apr 11, with default year 2016), then time, then a
50503         number (2011). Based on the combination of previously seen tokens,
50504         'digits_to_date_time' determines 2011 to be a year value.
50505         This fixes the debug messages to correctly show the updated year.
50506         Before:
50507             $ date --debug -d 'Apr 11 22:59:00 2011'
50508             date: parsed date part: (Y-M-D) 2016-04-11
50509             date: parsed time part: 22:59:00
50510             date: parsed number part: today/this/now
50511         After:
50512             $ ./src/date --debug -d 'Apr 11 22:59:00 2011'
50513             date: parsed date part: (Y-M-D) 2016-04-11
50514             date: parsed time part: 22:59:00
50515             date: parsed number part: year: 2011
50516         * lib/parse-datetime.y (struct parser_control): Add 'year_seen',
50517         'debug_year_seen' member fields.
50518         (digits_to_date_time): Update 'year_seen' as needed.
50519         (debug_print_current_time): Inform about year updates.
50520         (parse_datetime2): Initialize year_seen,debug_year_seen member fields.
50522         parse-datetime: fix local timezone debug messages
50523         "Local timezones" are strings that affect only DST relative to the
50524         default timezone. The debug messages in parse-datetime.y printed
50525         wrong information when encountering local timezones.
50526         Examples:
50527         Here EET/EEST are time zones ('zone' token, with values +02:00/+03:00):
50528              TZ=Asia/Tokyo ./src/date --debug -d '2011-12-11 EET'
50529              TZ=Asia/Tokyo ./src/date --debug -d '2011-06-11 EEST'
50530         When the default timezone relates to the zone strings, EET/EEST are
50531         parsed as local timezones (tLOCAL_ZONE), and only change the DST
50532         value (0/1, respectively):
50533              TZ=Europe/Helsinki ./src/date --debug -d '2011-12-11 EET'
50534              TZ=Europe/Helsinki ./src/date --debug -d '2011-06-11 EEST'
50535         * lib/parse-datetime.y (debug_print_current_time): If local timezone
50536         was seen, inform about DST change, don't print actual timezone.
50537         (debug_strfdatetime): If local timezone was seen, use default timezone
50538         (and adjust as needed) instead of using incorrect timezone.
50539         (parse_datetime2): Use correct time-zone source string, and adjust
50540         default timezone as needed.
50542         parse-datetime: add debug warning about DST changes
50543         Incorrect date arithmetic due to daylight saving time (DST) are a
50544         common (false) bug report in coreutils.
50545         Detect two such cases and print a warning:
50546         1. year/month/day adjustments (performed on 'struct tm'),
50547            where 'mktime' returns a different isdst value.
50548         2. hour/minute/seconds/ns adjustments (performed on 'time_t'),
50549            where the result of 'localtime(3)' on the value will return a
50550            different isdst value.
50551         Note: DST changes could be harmless or unnoticeable.
50552         Examples (with 'TZ=America/New_York'):
50553         Unnoticeable: result is 2016-Dec-14
50554            $ date -d '2016-06-15 EDT + 6 months' +%b
50555            Dec
50556         Unnoticeable: result is 2016-Dec-15 11:00:00
50557            $ date -d '2016-06-15 12:00:00 EDT + 6 months' +%F
50558            2016-12-15
50559         This is unexpected:
50560            $ date -d '2016-06-01 EDT + 6 months' +%F
50561            2016-11-30
50562         The new debug warnings will show:
50563            $ ./src/date --debug -d '2016-06-01 EDT + 6 months' +%F
50564            ...
50565            date: warning: daylight saving time changed after date adjustment
50566            ...
50567         * lib/parse-datetime.y (parse_datetime2): Detect DST changes, and
50568         print an appropriate warning message.
50570         parse-datetime: add debug warning about date arithmetic
50571         Date arithmetic are done directly on the fields of 'struct tm',
50572         which can result in invalid dates. Normalization with 'mktime(3)'
50573         will then produce a different date - which might cause unexpected
50574         results.
50575         Examples:
50576           '2016-10-31 - 1 month' => 2016-09-31 normalized to 2016-10-01.
50577           '2016-02-29 + 1 year'  => 2017-02-29 normalized to 2017-03-01.
50578         Note that date normalization is not inherently wrong and not rejected,
50579         as it has legitimate uses:
50580           '2016-12-29 + 5 days' => 2016-12-34 noramlized to 2017-01-03.
50581         If the user asked to adjust months but 'mday' changed,
50582         or user asked to adjust years but 'month' changed - warn about it.
50583             $ ./src/date --debug -d '2016-10-31 - 1 month'
50584             ...
50585             date: warning: when adding relative months/years, \
50586                            it is recommended to specify the 15th of the month
50587             ...
50588             date: warning: month/year adjustment resulted in shifted dates:
50589             date:      adjusted Y M D: 2016 09 31
50590             date:    normalized Y M D: 2010 10 01
50591             ...
50592         * lib/parse-datetime.y (parse_datetime2): Detect such cases and print
50593         a warning message. Improve recommendation of when to use 15 of the
50594         month or noon for date arithmetic.
50596         parse-datetime: fix debug message of relative part after timezone
50597         Relative part (e.g '+8 days') after a timezone string was not
50598         reported (was only reported after a timezone number). Due to the
50599         parser's structure, timezone strings with numbers were handled
50600         separately.
50601         before:
50602              # Timezone number + relative part: OK
50603              $ ./src/date --debug +%F -d '2013-10-30 00:00:00 +00:00 -8 days'
50604              ...
50605              date: parsed relative part: -8 day(s)
50606              # Timezone string + relative part: missing
50607              $ ./src/date --debug +%F -d '2013-10-30 00:00:00 UTC -8 days'
50608              [ missing message ]
50609         After: messages are printed in both cases.
50610         * lib/parse-datetime.y ('zone' token): Call debug_print_relative_time.
50612         parse-datetime: fix incorrect debug message on lone number
50613         A lone number is an absolute value, not a relative time part.
50614         before:
50615            $ date --debug -d '20130101'
50616            date: parsed number part: today/this/now
50617         After:
50618            $ ./src/date --debug -d '20130101'
50619            date: parsed number part: (Y-M-D) 2013-01-01
50620         * lib/parse-datetime.y ('item'/'number' tokens): Call
50621         'debug_print_current_time' instead of 'debug_print_relative_time'.
50623 2017-01-02  Paul Eggert  <eggert@cs.ucla.edu>
50625         doc: modernize for C11 etc.
50626         * doc/gnulib-readme.texi (Portability guidelines): Modernize a bit
50627         for C11, MinGW, etc.  This responds to Paul Smith's question in:
50628         http://lists.gnu.org/r/bug-gnulib/2017-01/msg00014.html
50630         dfa: prefer functions to FETCH_WC macro
50631         * lib/dfa.c (FETCH_WC): Remove, replacing with ...
50632         (fetch_wc, bracket_fetch_wc): ... new functions.  These store the
50633         wint_t result into DFA->lex.wctok instead of to a separate arg.
50634         All callers changed.  Move more local decls closer to where
50635         they're used.
50637         dfa: narrow more local var scopes
50638         * lib/dfa.c: Move more local decls to be more local.
50640         dfa: remove duplicate assignment
50641         Problem reported by Bruno Haible in:
50642         http://lists.gnu.org/r/bug-gnulib/2017-01/msg00007.html
50643         * lib/dfa.c (parse_bracket_exp): Simplify.
50645 2017-01-01  Paul Eggert  <eggert@cs.ucla.edu>
50647         dfa: simplify constraint-dependency checking
50648         * lib/dfa.c (prev_newline_constraint, prev_letter_constraint)
50649         (prev_other_constraint): Remove.
50650         (prev_newline_dependent, prev_letter_dependent):
50651         Simplify, to avoid an unnecessary bitwise AND operation.
50653         dfa: prefer functions and constants to macros
50654         * lib/dfa.c: Prefer constants to macros where either will do.
50655         (streq, isasciidigit, newline_constraint)
50656         (letter_constraint, other_constraint, succeeds_in_context)
50657         (prev_newline_constraint, prev_letter_constraint)
50658         (prev_other_constraint, prev_newline_dependent)
50659         (prev_letter_dependent, accepting, accepts_in_context):
50660         Now static functions instead of function-like macros.
50661         Use lower-case names accordingly.  All uses changed.
50663         dfa: narrow more local var scopes
50664         * lib/dfa.c: Move some more local decls down to nearer where
50665         they're needed.
50667 2016-12-31  Jim Meyering  <meyering@fb.com>
50669         dfa: narrow the scope of many local variables
50670         * lib/dfa.c: Now that we are no longer constrained to c89, move
50671         declarations of many variables (often indices) "down" into the
50672         scope(s) where used or to the point of definition.  This is a
50673         no-semantic-change diff.
50675 2017-01-01  Paul Eggert  <eggert@cs.ucla.edu>
50677         version-etc: new year
50678         * build-aux/gendocs.sh (version):
50679         * doc/gendocs_template:
50680         * doc/gendocs_template_min:
50681         * doc/gnulib.texi:
50682         * lib/version-etc.c (COPYRIGHT_YEAR):
50683         Update copyright dates by hand in templates and the like.
50684         * all files: Run 'make update-copyright'.
50686 2016-12-31  Eric Blake  <eblake@redhat.com>
50688         do-release-commit-and-tag: avoid shell syntax error
50689         * build-aux/do-release-commit-and-tag (curr_br): $branch can
50690         contain spaces when rebasing.
50692         maint.mk: hoist gnulib_dir definition earlier
50693         * top/maint.mk (gnulib_dir): Move near top of file.
50695 2016-12-31  Jim Meyering  <meyering@fb.com>
50697         maint.mk: do not always evaluate intprops-related shell
50698         * top/maint.mk (_intprops_names): Change := to just "=" to avoid
50699         using gnulib_dir undefined (gnulib_dir is defined later in the
50700         file, which will be fixed separately), and besides, there is no
50701         need to incur the cost of this shell invocation for every single
50702         use of this .mk file.  Reported by Eric Blake in
50703         https://lists.gnu.org/r/bug-gnulib/2016-12/msg00137.html
50705 2016-12-30  Jim Meyering  <meyering@fb.com>
50707         maint.mk: improve sc_prohibit_intprops_without_use
50708         * top/maint.mk (_intprops_names): Don't hard-code the list of
50709         symbol names.  Instead, derive it on the fly.
50711 2016-12-30  Paul Eggert  <eggert@cs.ucla.edu>
50713         dfa: shorten sbit, success
50714         * lib/dfa.c (struct regex_syntax.sbit):
50715         (struct dfa.success): Use char, not int, for array elements, since
50716         they are all in the range 0..7.
50718         dfa: simplify multibyte_prop etc.
50719         This follows up on a change made when dfa.c was in grep, namely grep
50720         commit c797046c7c13c2647182b919a79a4c5b4ecf82b1
50721         dated 2015-08-12 07:35:03 -0700, which removed unused multibyte support.
50722         That earlier simplification allows for some more simplification
50723         and trimming down here.
50724         * lib/dfa.c (struct mb_char_classes): New member nchars_alloc.
50725         (struct lexer_state): New mamber brack.
50726         (struct dfa, addtok_mb): multibyte_prop elements are now char, not int,
50727         since they must be in the range 0..3 now.
50728         Remove members mbcsets, nmbcsets, mbcsets_alloc, since
50729         the brack member now supersedes them.
50730         (parse_bracket_exp): Update dfa->lex.brack instead of dfa->mbcsets.
50731         (addtok): Use dfa->lex.brack instead of dfa->mbcsets.
50732         (dfaparse): Remove unnecessary initializations of already-0 storage.
50733         (free_mbdata): Free d->lex.brack.chars instead of d->mbcsets.
50734         (dfassbuild): No need to clear sup->mbcsets.
50736         dfa: minor performance tweak
50737         * lib/dfa.c (setbit_wc): Test < 0, not == EOF.
50739         dfa: wrap charclass inside a struct
50740         On my platform (gcc Ubuntu 5.4.0-6ubuntu1~16.04.4 x86-64,
50741         en_US.utf8 locale) this makes 'grep -Fi -f list.txt list.txt >out'
50742         about 5% faster, where list.txt is generated by 'aspell dump
50743         master | head -n 100000 >list.txt'.  See Bug#22239.
50744         * lib/dfa.c (charclass): Wrap inside a struct.  All uses changed.
50745         (CHARCLASS_INIT, tstbit, setbit, clrbit, zeroset, fillset, notset)
50746         (equal, emptyset, charclass_index, setbit_wc, setbit_case_fold_c):
50747         Adjust to this, e.g., by using charclass * rather than charclass.
50748         All callers changed as needed.
50749         (copyset): Remove.  All uses changed to simple assignment.
50750         (parse_bracket_exp): Use zeroset instead of memset.
50752 2016-12-30  Jim Meyering  <meyering@fb.com>
50754         maint.mk: update list of intprops.h symbol names
50755         * top/maint.mk (_intprops_names): Regenerate the list of symbol names.
50756         This avoids a false failure of the sc_prohibit_intprops_without_use
50757         rule in grep.
50759 2016-12-29  Eric Blake  <eblake@redhat.com>
50761         getopt: fix parallel test failure
50762         * tests/test-getopt-posix.c (TEST_GETOPT_TMP_NAME): Set name.
50763         * tests/test-getopt-gnu.c (TEST_GETOPT_TMP_NAME): Likewise.
50764         * tests/test-getopt-main.h (main): Use different file names
50765         in case test-getopt-gnu and test-getopt-posix run in parallel.
50767 2016-12-29  Paul Eggert  <eggert@cs.ucla.edu>
50769         xalloc: x2nrealloc check for ptrdiff_t overflow
50770         * lib/xalloc.h (x2nrealloc): Check for ptrdiff_t overflow, too.
50771         * modules/xalloc, modules/xvasprintf (Depends-on): Add stdint.
50773 2016-12-24  Bruno Haible  <bruno@clisp.org>
50775         lock test: Fix performance problem on multi-core machines.
50776         * tests/test-lock.c (USE_VOLATILE): New macro.
50777         (struct atomic_int): New type.
50778         (init_atomic_int, get_atomic_int_value, set_atomic_int_value): New
50779         functions.
50780         (lock_checker_done, rwlock_checker_done, reclock_checker_done): Define
50781         as 'struct atomic_int'.
50782         (lock_checker_thread, test_lock, rwlock_checker_thread, test_rwlock,
50783         reclock_checker_thread, test_recursive_lock): Use the new functions.
50784         Reported by Eric Blake in
50785         https://www.redhat.com/archives/libvir-list/2012-March/msg00854.html
50786         and by Pádraig Brady in
50787         http://lists.gnu.org/r/bug-gnulib/2016-12/msg00117.html.
50789 2016-12-19  Bruno Haible  <bruno@clisp.org>
50791         vma-iter: Fix endless loop on 64-bit Windows.
50792         * lib/vma-iter.c (vma_iterate): On Windows, use 'uintptr_t' instead of
50793         'unsigned long'.
50795 2016-12-19  Bruno Haible  <bruno@clisp.org>
50797         stdint: Fix WINT_MAX to match the gnulib provided wint_t on minw.
50798         * m4/wint_t.m4 (gt_TYPE_WINT_T): Define GNULIB_OVERRIDES_WINT_T here.
50799         * m4/stdint.m4 (gl_STDINT_H): Don't define GNULIB_OVERRIDES_WINT_T.
50800         Invoke gt_TYPE_WINT_T instead.
50801         (gl_STDINT_TYPE_PROPERTIES): Test GNULIB_OVERRIDES_WINT_T.
50802         * modules/stdint (Files): Add m4/wint_t.m4.
50803         * modules/wchar (Makefile.am): Substitute GNULIB_OVERRIDES_WINT_T.
50804         * modules/wctype-h (Makefile.am): Likewise.
50805         * lib/wchar.in.h (wint_t): Override if GNULIB_OVERRIDES_WINT_T is set,
50806         not only on MSVC.
50807         * lib/wctype.in.h (wint_t): Likewise.
50809 2016-12-19  Paul Eggert  <eggert@cs.ucla.edu>
50811         getopt-posix-tests: fix Makefile typo
50812         * modules/getopt-posix-tests (test_getopt_posix_LDADD):
50813         Fix typo: the last ‘_’ was missing in the name.
50814         I suspect that the typo explains this build failure:
50815         https://buildfarm.opencsw.org/buildbot/builders/ggrep-solaris10-sparc/builds/39
50816         although I can’t reproduce the problem on Solaris 10 sparc.
50818 2016-12-18  Paul Eggert  <eggert@cs.ucla.edu>
50820         dfa: improve worst-case 'replace' performance
50821         See my note in Bug#22357#71.
50822         * lib/dfa.c (insert, delete): Rework to avoid duplicate test.
50823         (merge_constrained): New function, which is like
50824         the old 'merge' function, except with a new argument C2.
50825         Simplify the body by avoiding the need for different sections
50826         of code depending on whether one input is exhausted.
50827         (merge): Use the new function.
50828         (delete): Return the constraint of the deleted position,
50829         not the entire position.  Caller changed.
50830         (replace): Change from O(N*(N + log N)) to O(N log N) algorithm.
50832 2016-12-18  Norihiro Tanaka  <noritnk@kcn.ne.jp>
50834         dfa: performance improvement for removal of epsilon closure
50835         See Bug#22357#32.
50836         * lib/dfa.c (delete): Use binary search to find deleted index.
50837         (replace): New function.  It replaces a position with the followed set.
50838         (epsclosure): Replace it with a new algorithm.  Update caller.
50840 2016-12-18  Bruno Haible  <bruno@clisp.org>
50842         Split tests for getopt-posix and getopt-gnu.
50843         * tests/test-getopt-posix.c: New file.
50844         * tests/test-getopt-gnu.c: New file, with code from test-getopt.c.
50845         * tests/test-getopt-main.h: Renamed from tests/test-getopt.c. Remove
50846         stuff moved to test-getopt-gnu.c. Test TEST_GETOPT_GNU instead of
50847         GNULIB_TEST_GETOPT_GNU.
50848         * modules/getopt-posix-tests (Files): Add test-getopt-posix.c,
50849         test-getopt-main.h. Remove test-getopt.c, test-getopt_long.h.
50850         (Makefile.am): Test test-getopt-posix instead of test-getopt.
50851         * modules/getopt-gnu-tests: New file.
50852         * modules/getopt-gnu (configure.ac): Don't define GNULIB_TEST_GETOPT_GNU.
50854 2016-12-18  Bruno Haible  <bruno@clisp.org>
50856         posix-modules: Add options for specific platforms.
50857         * posix-modules (func_usage): Document options --for-mingw, --for-msvc.
50858         (exclude_for_mingw, exclude_for_msvc, exclude): New variables.
50859         Invoke func_tmpdir. Filter out the excludes.
50861 2016-12-18  Bruno Haible  <bruno@clisp.org>
50863         getopt: Fix link error for users of getopt() in <unistd.h>.
50864         * lib/getopt.in.h (getopt etc.): Do the macro definitions also when
50865         __need_getopt is defined. Undefine all macros before defining them.
50866         * modules/getopt (Include): Clarify that including <unistd.h> is also
50867         OK.
50868         * tests/test-getopt.c: Add comment.
50870 2016-12-17  Bruno Haible  <bruno@clisp.org>
50872         getaddrinfo tests: Avoid compilation error on MSVC.
50873         * tests/test-getaddrinfo.c: Don't check the prototypes of freeaddrinfo,
50874         getaddrinfo on native Windows.
50876 2016-12-17  Bruno Haible  <bruno@clisp.org>
50878         getlogin, getlogin_r: Fix link errors on MSVC.
50879         * m4/getlogin.m4 (gl_LIB_GETLOGIN): New macro.
50880         * modules/getlogin (configure.ac): Require gl_LIB_GETLOGIN.
50881         (Link): New section.
50882         * modules/getlogin_r (Files): Add m4/getlogin.m4.
50883         (configure.ac): Require gl_LIB_GETLOGIN.
50884         (Link): New section.
50885         * NEWS: Mention the new link requirements.
50886         * modules/getlogin-tests (test_getlogin_LDADD): New variable.
50887         * modules/getlogin_r-tests (test_getlogin_r_LDADD): New variable.
50889 2016-12-17  Bruno Haible  <bruno@clisp.org>
50891         Un-deprecate the 'progname' module.
50892         * NEWS: Describe the appropriate use-cases of 'progname' versus
50893         'getprogname'. Based on discussion summary at
50894         http://lists.gnu.org/r/bug-gnulib/2016-10/msg00105.html
50896 2016-12-17  Bruno Haible  <bruno@clisp.org>
50898         Reorganize NEWS a bit.
50899         * NEWS: Move some not so important changes away from section
50900         "Important Notes".
50902 2016-12-17  Bruno Haible  <bruno@clisp.org>
50904         tanhf: Avoid redefinition error on MSVC.
50905         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Define REPLACE_TANHF.
50906         * m4/tanhf.m4 (gl_FUNC_TANHF): Set REPLACE_TANHF to 1 if the function
50907         may be defined as an inline function.
50908         * modules/math (Makefile.am): Substitute REPLACE_TANHF.
50909         * lib/math.in.h (tanhf): Override if REPLACE_TANHF is 1.
50911 2016-12-17  Bruno Haible  <bruno@clisp.org>
50913         tanf: Avoid redefinition error on MSVC.
50914         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Define REPLACE_TANF.
50915         * m4/tanf.m4 (gl_FUNC_TANF): Set REPLACE_TANF to 1 if the function
50916         may be defined as an inline function.
50917         * modules/math (Makefile.am): Substitute REPLACE_TANF.
50918         * lib/math.in.h (tanf): Override if REPLACE_TANF is 1.
50920 2016-12-17  Bruno Haible  <bruno@clisp.org>
50922         sqrtf: Avoid redefinition error on MSVC.
50923         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Define REPLACE_SQRTF.
50924         * m4/sqrtf.m4 (gl_FUNC_SQRTF): Set REPLACE_SQRTF to 1 if the function
50925         may be defined as an inline function.
50926         * modules/math (Makefile.am): Substitute REPLACE_SQRTF.
50927         * lib/math.in.h (sqrtf): Override if REPLACE_SQRTF is 1.
50929 2016-12-17  Bruno Haible  <bruno@clisp.org>
50931         sinhf: Avoid redefinition error on MSVC.
50932         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Define REPLACE_SINHF.
50933         * m4/sinhf.m4 (gl_FUNC_SINHF): Set REPLACE_SINHF to 1 if the function
50934         may be defined as an inline function.
50935         * modules/math (Makefile.am): Substitute REPLACE_SINHF.
50936         * lib/math.in.h (sinhf): Override if REPLACE_SINHF is 1.
50938 2016-12-17  Bruno Haible  <bruno@clisp.org>
50940         sinf: Avoid redefinition error on MSVC.
50941         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Define REPLACE_SINF.
50942         * m4/sinf.m4 (gl_FUNC_SINF): Set REPLACE_SINF to 1 if the function
50943         may be defined as an inline function.
50944         * modules/math (Makefile.am): Substitute REPLACE_SINF.
50945         * lib/math.in.h (sinf): Override if REPLACE_SINF is 1.
50947 2016-12-17  Bruno Haible  <bruno@clisp.org>
50949         logf: Avoid redefinition error on MSVC.
50950         * m4/logf.m4 (gl_FUNC_LOGF): Set REPLACE_LOGF to 1 if the function
50951         may be defined as an inline function.
50953 2016-12-17  Bruno Haible  <bruno@clisp.org>
50955         log10l: Avoid redefinition error on MSVC.
50956         * m4/log10l.m4 (gl_FUNC_LOG10L): Set REPLACE_LOG10L to 1 if the function
50957         may be defined as an inline function.
50959 2016-12-17  Bruno Haible  <bruno@clisp.org>
50961         log10f: Avoid redefinition error on MSVC.
50962         * m4/log10f.m4 (gl_FUNC_LOG10F): Set REPLACE_LOG10F to 1 if the function
50963         may be defined as an inline function.
50965 2016-12-17  Bruno Haible  <bruno@clisp.org>
50967         hypotl: Avoid redefinition error on MSVC.
50968         * m4/hypotl.m4 (gl_FUNC_HYPOTL): Set REPLACE_HYPOTL to 1 if the function
50969         may be defined as an inline function.
50971 2016-12-17  Bruno Haible  <bruno@clisp.org>
50973         hypotf: Avoid redefinition error on MSVC.
50974         * m4/hypotf.m4 (gl_FUNC_HYPOTF): Set REPLACE_HYPOTF to 1 if the function
50975         may be defined as an inline function.
50977 2016-12-17  Bruno Haible  <bruno@clisp.org>
50979         fmodl: Avoid redefinition error on MSVC.
50980         * m4/fmodl.m4 (gl_FUNC_FMODL): Set REPLACE_FMODL to 1 if the function
50981         may be defined as an inline function.
50983 2016-12-17  Bruno Haible  <bruno@clisp.org>
50985         fmodf: Avoid redefinition error on MSVC.
50986         * m4/fmodf.m4 (gl_FUNC_FMODF): Set REPLACE_FMODF to 1 if the function
50987         may be defined as an inline function.
50989 2016-12-17  Bruno Haible  <bruno@clisp.org>
50991         expf: Avoid redefinition error on MSVC.
50992         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Define REPLACE_EXPF.
50993         * m4/expf.m4 (gl_FUNC_EXPF): Set REPLACE_EXPF to 1 if the function
50994         may be defined as an inline function.
50995         * modules/math (Makefile.am): Substitute REPLACE_EXPF.
50996         * lib/math.in.h (expf): Override if REPLACE_EXPF is 1.
50998 2016-12-17  Bruno Haible  <bruno@clisp.org>
51000         coshf: Avoid redefinition error on MSVC.
51001         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Define REPLACE_COSHF.
51002         * m4/coshf.m4 (gl_FUNC_COSHF): Set REPLACE_COSHF to 1 if the function
51003         may be defined as an inline function.
51004         * modules/math (Makefile.am): Substitute REPLACE_COSHF.
51005         * lib/math.in.h (coshf): Override if REPLACE_COSHF is 1.
51007 2016-12-17  Bruno Haible  <bruno@clisp.org>
51009         cosf: Avoid redefinition error on MSVC.
51010         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Define REPLACE_COSF.
51011         * m4/cosf.m4 (gl_FUNC_COSF): Set REPLACE_COSF to 1 if the function
51012         may be defined as an inline function.
51013         * modules/math (Makefile.am): Substitute REPLACE_COSF.
51014         * lib/math.in.h (cosf): Override if REPLACE_COSF is 1.
51016 2016-12-17  Bruno Haible  <bruno@clisp.org>
51018         atan2f: Avoid redefinition error on MSVC.
51019         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Define REPLACE_ATAN2F.
51020         * m4/atan2f.m4 (gl_FUNC_ATAN2F): Set REPLACE_ATAN2F to 1 if the function
51021         may be defined as an inline function.
51022         * modules/math (Makefile.am): Substitute REPLACE_ATAN2F.
51023         * lib/math.in.h (atan2f): Override if REPLACE_ATAN2F is 1.
51025 2016-12-17  Bruno Haible  <bruno@clisp.org>
51027         atanf: Avoid redefinition error on MSVC.
51028         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Define REPLACE_ATANF.
51029         * m4/atanf.m4 (gl_FUNC_ATANF): Set REPLACE_ATANF to 1 if the function
51030         may be defined as an inline function.
51031         * modules/math (Makefile.am): Substitute REPLACE_ATANF.
51032         * lib/math.in.h (atanf): Override if REPLACE_ATANF is 1.
51034 2016-12-17  Bruno Haible  <bruno@clisp.org>
51036         asinf: Avoid redefinition error on MSVC.
51037         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Define REPLACE_ASINF.
51038         * m4/asinf.m4 (gl_FUNC_ASINF): Set REPLACE_ASINF to 1 if the function
51039         may be defined as an inline function.
51040         * modules/math (Makefile.am): Substitute REPLACE_ASINF.
51041         * lib/math.in.h (asinf): Override if REPLACE_ASINF is 1.
51043 2016-12-17  Bruno Haible  <bruno@clisp.org>
51045         acosf: Avoid redefinition error on MSVC.
51046         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Define REPLACE_ACOSF.
51047         * m4/acosf.m4 (gl_FUNC_ACOSF): Set REPLACE_ACOSF to 1 if the function
51048         may be defined as an inline function.
51049         * modules/math (Makefile.am): Substitute REPLACE_ACOSF.
51050         * lib/math.in.h (acosf): Override if REPLACE_ACOSF is 1.
51052 2016-12-17  Bruno Haible  <bruno@clisp.org>
51054         Avoid redefinition errors on MSVC.
51055         * m4/snprintf.m4 (gl_REPLACE_SNPRINTF): Set REPLACE_SNPRINTF to 1 if
51056         the function may be defined as an inline function.
51057         * m4/vsnprintf.m4 (gl_REPLACE_VSNPRINTF): Set REPLACE_VSNPRINTF to 1 if
51058         the function may be defined as an inline function.
51060 2016-12-17  Bruno Haible  <bruno@clisp.org>
51062         Avoid redefinition errors on MSVC.
51063         * lib/stdio.in.h: Include <stdlib.h> and <io.h> when necessary.
51064         * lib/unistd.in.h: Include <stdio.h> when necessary.
51066 2016-12-17  Bruno Haible  <bruno@clisp.org>
51068         stdint: Fix WINT_MAX to match the gnulib provided wint_t on MSVC.
51069         * m4/stdint.m4 (gl_STDINT_H): Define GNULIB_OVERRIDES_WINT_T.
51070         * modules/stdint (Makefile.am): Substitute GNULIB_OVERRIDES_WINT_T.
51071         * lib/stdint.in.h [GNULIB_OVERRIDES_WINT_T]: Redefine WINT_MIN and
51072         WINT_MAX.
51074 2016-12-17  Bruno Haible  <bruno@clisp.org>
51076         Avoid autoconf warning.
51077         * modules/frexpl (configure.ac): Require, not invoke, gl_FUNC_FREXPL.
51078         * modules/frexp (configure.ac): Require, not invoke, gl_FUNC_FREXP.
51080 2016-12-17  Bruno Haible  <bruno@clisp.org>
51082         fpending: Revert workaround against Emacs bug.
51083         * lib/stdio-impl.h [__MINGW32__]: Revert conditional.
51084         The Emacs bug is fixed by Eli Zaretskii in
51085         http://lists.gnu.org/r/emacs-devel/2016-12/msg00715.html
51087 2016-12-17  Bruno Haible  <bruno@clisp.org>
51089         getlogin_r tests: Port to mingw.
51090         * tests/test-getlogin_r.c: Don't include <pwd.h> on native Windows. Fixes
51091         regression introduced on 2014-05-19.
51093 2016-12-17  Bruno Haible  <bruno@clisp.org>
51095         getlogin: Port to newer mingw.
51096         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize HAVE_DECL_GETLOGIN.
51097         * m4/getlogin.m4 (gl_FUNC_GETLOGIN): Set HAVE_DECL_GETLOGIN.
51098         * modules/unistd (Makefile.am): Substitute HAVE_DECL_GETLOGIN, not
51099         HAVE_GETLOGIN.
51100         * lib/unistd.in.h (getlogin): Test HAVE_DECL_GETLOGIN, not
51101         HAVE_GETLOGIN.
51102         * doc/posix-functions/getlogin.texi: Mention the issue.
51103         * tests/test-getlogin.c: Don't include <pwd.h> on native Windows. Fixes
51104         regression introduced on 2014-05-14.
51106 2016-12-16  Paul Eggert  <eggert@cs.ucla.edu>
51108         builtin-expect: improve port to IBM XL C
51109         Problem reported for z/OS by Daniel Richard G. in:
51110         http://lists.gnu.org/r/bug-gnulib/2016-12/msg00079.html
51111         * m4/builtin-expect.m4 (gl___BUILTIN_EXPECT):
51112         Test for <builtins.h> directly.
51114         builtin-expect: port to IBM XL C
51115         Problem reported for z/OS by Daniel Richard G. in:
51116         http://lists.gnu.org/r/bug-gnulib/2016-12/msg00074.html
51117         * m4/builtin-expect.m4 (gl___BUILTIN_EXPECT):
51118         Also allow __builtin_expect defined via a standard include file.
51120         regex: fix dependency
51121         Problem reported by Bruno Haible in:
51122         http://lists.gnu.org/r/bug-gnulib/2016-12/msg00073.html
51123         * modules/regex: Depend on builtin-expect.
51125         builtin-expect: new module
51126         Fix fnmatch to use it.
51127         Problem reported for z/OS by Daniel Richard G.
51128         * lib/fnmatch.c (__builtin_expect):
51129         * lib/glob.c (__builtin_expect):
51130         * lib/grantpt.c (__builtin_expect) [!_LIBC]:
51131         * lib/memmem.c (__builtin_expect) [!_LIBC]:
51132         * lib/scandir.c (__builtin_expect):
51133         * lib/strstr.c (__builtin_expect) [!_LIBC]:
51134         Remove macro; config.h now does this.
51135         * lib/gl_anytreehash_list1.h (add_to_bucket):
51136         * lib/regex_internal.h (BE):
51137         Assume __builtin_expect.
51138         * m4/builtin-expect.m4, modules/builtin-expect: New files.
51139         * modules/avltreehash-list, modules/fnmatch, modules/glob:
51140         * modules/grantpt, modules/memmem-simple, modules/rbtreehash-list:
51141         * modules/scandir, modules/strstr-simple:
51142         Depend on builtin-expect.
51144 2016-12-15  Bruno Haible  <bruno@clisp.org>
51146         init.sh: Add possibility to not delete temporary files.
51147         * tests/init.sh (remove_tmp_): If the environment variable KEEP is set
51148         to yes, don't erase the temporary directory.
51150 2016-12-16  Paul Eggert  <eggert@cs.ucla.edu>
51152         regex: fix integer-overflow bug in never-used code
51153         Problem reported by Clément Pit–Claudel in:
51154         http://lists.gnu.org/r/emacs-devel/2016-12/msg00654.html
51155         * lib/regex_internal.h: Include intprops.h.
51156         * lib/regexec.c (re_search_2_stub): Use it to avoid undefined
51157         behavior on integer overflow.
51158         * modules/regex (Depends-on): Add intprops.
51160         fpending: fix port to MinGW on Emacs
51161         * lib/stdio-impl.h [__MINGW32__]: Do not include errno.h.
51162         Problem reported by Eli Zaretskii in:
51163         http://lists.gnu.org/r/emacs-devel/2016-12/msg00642.html
51164         Is Plan 9 still a valid porting target, anyway?
51166 2016-12-15  Paul Eggert  <eggert@cs.ucla.edu>
51168         safe-alloc: use xalloc-oversized
51169         * lib/safe-alloc.c: Include xalloc-oversized.h.
51170         (safe_alloc_oversized): Remove.  All uses changed to xalloc_oversized.
51171         * modules/safe-alloc (Depends-on): Add xalloc-oversized.
51173         xalloc: do not exceed PTRDIFF_MAX
51174         * lib/xmalloc.c (xcalloc) [HAVE_GNU_CALLOC]: Do not omit
51175         xalloc_oversized check, since objects larger than PTRDIFF_MAX
51176         bytes have pointer-subtraction problems.
51178         malloca: do not exceed PTRDIFF_MAX
51179         * lib/malloca.h: Include xalloc-oversized.
51180         (nmalloca): Use xalloc_oversized instead of rolling our own.
51181         * modules/malloca (Depends-on):
51182         * modules/relocatable-prog-wrapper (Depends-on):
51183         Add xalloc-oversized.
51185         quotearg: pacify GCC better
51186         * modules/quotearg (Depends-on): Add minmax, stdint.
51187         * lib/quotearg.c: Include minmax.h, stdint.h.
51188         (nslots): Now int, as there seems little point to going to extra
51189         work merely to support the INT_MAX slot, which nobody ever uses.
51190         (quotearg_n_options): Redo size-overflow checks to pacify GCC
51191         and to catch (mostly-theoretical) ptrdiff_t problems too.
51192         This can be done via one comparison.
51194 2016-12-14  Paul Eggert  <eggert@cs.ucla.edu>
51196         xalloc-oversized: check for PTRDIFF_MAX too
51197         This avoids undefined behavior when subtracting pointers to
51198         objects containing more than PTRDIFF_MAX bytes.
51199         * lib/xalloc-oversized.h (__xalloc_oversized, xalloc_oversized):
51200         Also return 1 if the result would exceed PTRDIFF_MAX>
51201         * modules/xalloc-oversized (Depends-on):
51202         Add stdint.
51204         dfa: fix glitches in previous commit
51205         Sorry, I don't know how I managed to commit the wrong version.
51206         * lib/dfa.c (MIN): Move up.
51207         (xpalloc): Now static.
51209         dfa: fix some unlikely integer overflows
51210         I found these while reviewing the recent Coverity-related fix.
51211         This patch changes part of dfa.c to prefer ptrdiff_t instead of
51212         size_t for object counts.  Using ptrdiff_t is the style typically
51213         used in Emacs; although it wastes a sign bit as sizes can never be
51214         negative, it makes -fsanitize=undefined more likely to catch
51215         integer overflows in index calculation, and nowadays the upside is
51216         typically more important than the downside.  Although perhaps the
51217         rest of dfa.c should be changed to prefer ptrdiff_t as well (much
51218         of dfa.c already does, since it uses state_num which is signed),
51219         that is a bigger change and is not needed to fix the bugs I found.
51220         * lib/dfa.c: Include stdint.h and intprops.h.
51221         (TOKEN_MAX): New macro.
51222         (position_set, struct mb_char_classes, struct dfa, maybe_realloc)
51223         (charclass_index, parse_bracket_exp, addtok, insert, merge)
51224         (realloc_trans_if_necessary, free_mbdata):
51225         Use ptrdiff_t instead of size_t for object counts related to xpalloc.
51226         This is safe because xpalloc checks that the sizes do not exceed
51227         either SIZE_MAX or PTRDIFF_MAX.
51228         (xpalloc): New function, mostly taken from Emacs.
51229         (maybe_realloc, copy, realloc_trans_if_necessary): Use it.
51230         (maybe_realloc): Add NITEMS_MAX to signature.  All callers changed.
51231         (charclass_index): Check for integer overflow in computing
51232         charclass index; it must not exceed TOKEN_MAX - CSET, as CSET is
51233         added to it later.
51234         (alloc_position_set): Check for integer overflow.  On typical
51235         platforms this check has zero overhead, since the constant
51236         expression is false.
51237         (realloc_trans_if_necessary):
51238         Remove assertion, which I hope Coverity no longer needs.
51240         * modules/dfa (Depends-on): Add intprops, stdint.
51242 2016-12-12  Jim Meyering  <meyering@fb.com>
51244         dfa: add an assertion to avoid coverity false positive
51245         * lib/dfa.c (realloc_trans_if_necessary): Otherwise, coverity
51246         warned that "newalloc1 - 2" could overflow.
51248 2016-12-13   Arnold D. Robbins  <arnold@skeeve.com>
51250         dfa: remove DFA_CASE_FOLD flag in favor of RE_ICASE
51251         * dfa.h (DFA_CASE_FOLD): Remove.
51252         * dfa.c (dfasyntax): Set dfa->syntax.case_fold based on RE_ICASE.
51254 2016-12-13  John W. Eaton  <gnu@jweaton.org>
51256         link: fix test to declare use of rename()
51257         * m4/link.m4 (gl_FUNC_LINK): Include <stdio.h> needed with
51258         -Werror=implicit-function-declaration
51260 2016-12-12  Bruno Haible  <bruno@clisp.org>
51262         fpending: Port to native Windows with MSVC.
51263         * lib/fpending.c: Include stdio-impl.h.
51264         (__fpending): Include all known implementations. Err out if it's not
51265         ported.
51266         * m4/fpending.m4 (gl_PREREQ_FPENDING): Remove macro.
51267         * modules/fpending (Files): Add lib/stdio-impl.h.
51268         (configure.ac): Don't invoke gl_PREREQ_FPENDING.
51270 2016-12-12  Bruno Haible  <bruno@clisp.org>
51272         stdioext: Port to native Windows with MSVC.
51273         * lib/stdio-impl.h (WINDOWS_OPAQUE_FILE): New macro.
51274         (struct _gl_real_FILE): New type.
51275         (fp_, _IOREAD, _IOWRT, _IORW, _IOEOF, _IOERR): New macros, for native
51276         Windows.
51277         * lib/fbufmode.c (fbufmode): Add code for native Windows.
51278         * lib/fflush.c (clear_ungetc_buffer): Treat native Windows like the
51279         other SystemV derived implementations.
51280         * lib/fpurge.c (fpurge): Likewise.
51281         * lib/freadable.c (freadable): Likewise.
51282         * lib/freadahead.c (freadahead): Likewise.
51283         * lib/freading.c (freading): Likewise.
51284         * lib/freadptr.c (freadptr): Likewise.
51285         * lib/freadseek.c (freadptrinc): Likewise.
51286         * lib/fseeko.c (fseeko): Likewise.
51287         * lib/fseterr.c (fseterr): Likewise.
51288         * lib/fwritable.c (fwritable): Likewise.
51289         * lib/fwriting.c (fwriting): Likewise.
51290         Reported by Gisle Vanem <gvanem@yahoo.no>.
51292 2016-12-11  Jim Meyering  <meyering@fb.com>
51294         non-recursive-gnulib-prefix-hack.m4: remove leading "(" in case stmt
51295         * m4/non-recursive-gnulib-prefix-hack.m4: That leading "(" happens
51296         to work with most shells, but not with the one provided by many
51297         Solaris 10 systems, so running configure with such a /bin/sh evokes
51298         e.g., "./configure: syntax error at line 33602: `(' unexpected".
51299         Reported by Assaf Gordon in
51300         https://lists.gnu.org/r/sed-devel/2016-12/msg00002.html
51302 2016-12-10  Bruno Haible  <bruno@clisp.org>
51304         threadlib: Optimize out runtime test on Solaris >= 10.
51305         * m4/threadlib.m4 (gl_THREADLIB_BODY): Don't set
51306         PTHREAD_IN_USE_DETECTION_HARD if configuring on Solaris 10 or newer.
51307         Reported by Peter Felecan at <https://savannah.gnu.org/bugs/?32087>.
51309 2016-12-10  Bruno Haible  <bruno@clisp.org>
51311         stdint: Update doc about Solaris 9.
51312         * doc/posix-headers/stdint.texi: Add info about Solaris 9.
51314 2016-12-09  Bruno Haible  <bruno@clisp.org>
51316         c-ctype tests: Fix link error on Solaris 9.
51317         * modules/c-ctype-tests (Depends-on): Add 'isblank'.
51318         Reported at <https://savannah.gnu.org/bugs/?46827>.
51320 2016-12-09  Paul Eggert  <eggert@cs.ucla.edu>
51322         dfa: fix performance bug that recomputes trans
51323         * lib/dfa.c (build_state): Fix performance bug introduced in Nov
51324         25 on-demand changes.  The bug caused build_state to reset all
51325         d->trans elements to -2 even when d->trans was already non-null.
51326         Use C99 style decls after statements in this function.
51328         same-inode: port to MinGW
51329         Here st_ino is always 0, so change the definition of SAME_INODE so
51330         that 1 means the two files are the same, 0 with st_ino != 0 means
51331         they differ, and 0 with st_ino == 0 means we don’t know.  Problem
51332         reported by Bruno Haible (Bug#25146).
51333         * doc/posix-headers/sys_stat.texi (sys/stat.h): Update.
51334         * lib/same-inode.h (SAME_INODE): Return 0 on MinGW.
51336 2016-12-04  Bruno Haible  <bruno@clisp.org>
51338         javacomp-script: Support Java 7 and 8.
51339         * m4/javacomp.m4 (gt_JAVACOMP): Accept source-version 1.7, 1.8 and
51340         target-version 1.7, 1.8.
51342 2016-12-02  Daiki Ueno  <ueno@gnu.org>
51344         * gnulib-tool (func_import): Relax the regex used for "LGPLv3+ or
51345         GPLv2" rewriting.
51347 2016-12-02  Nikos Mavrogiannopoulos  <nmav@gnutls.org>
51349         * gnulib-tool (func_import): Adhere to the license guideline when
51350         rewriting the license text to "LGPLv3+ or GPLv2":
51351         https://www.gnu.org/prep/maintain/maintain.html#Licensing-of-GNU-Packages
51353 2016-12-02  Bruno Haible  <bruno@clisp.org>
51355         localcharset: Avoid theoretical buffer overrun.
51356         * lib/localcharset.c (locale_charset) [WINDOWS_NATIVE]: Don't use the
51357         return value from setlocale if it would lead to a buffer overrun.
51359 2016-12-01  Bruno Haible  <bruno@clisp.org>
51361         Relicense some modules under LGPLv2+.
51362         Kevin Cernekee's approval is in
51363         http://lists.gnu.org/r/bug-gnulib/2016-11/msg00090.html.
51364         * modules/fseterr (License): Change to LGPLv2+.
51365         * modules/mbchar (License): Likewise.
51366         * modules/mbiter (License): Likewise.
51367         * modules/mbsnlen (License): Likewise.
51368         * modules/wcwidth (License): Likewise.
51370 2016-12-01  KO Myung-Hun  <komh78@gmail.com>
51372         scandir: Fix _D_ALLOC_NAMLEN() on OS/2 kLIBC
51373         * lib/scandir.c (_D_ALLOC_NAMLEN): Consider the fields after d_name on
51374         OS/2 kLIBC.
51376 2016-12-01  KO Myung-Hun  <komh78@gmail.com>
51378         alphasort, scandir: Port to OS/2 kLIBC
51379         * lib/alphasort.c (alphasort): Implement according to OS/2 kLIBC
51380         declaration.
51381         * lib/scandir.c (scandir): Add declaration for OS/2 kLIBC.
51383 2016-12-01  KO Myung-Hun  <komh78@gmail.com>
51385         relocatable: Fix that /@unixroot prefix is not working on OS/2 kLIBC
51386         * lib/relocatable.c (relocate): Do not touch pathname if it is started
51387         with '/@unixroot'.
51389 2016-12-01  KO Myung-Hun  <komh78@gmail.com>
51391         sys_socket: typedef sa_family_t correctly on OS/2 kLIBC
51392         * lib/sys_socket.in.h (sa_family_t): Typedef to unsigned char on
51393         OS/2 kLIBC unless TCPV40HDRS is defined.
51395 2016-11-29  Jim Meyering  <meyering@fb.com>
51397         dfa: avoid new infinite loop
51398         This would infloop: echo cx | LC_ALL=C grep -E 'c\b[x ]'
51399         * lib/dfa.c (dfastate): When constructing a new state table, we could
51400         initially declare that we had found a match, and later find that
51401         constraints eliminate that possibility, yet continue to use the
51402         now stale "matched" indicator.  That would lead to an infinite loop.
51403         The solution is to update "matched" when necessary.
51404         Introduced by commit v0.1-983-g403adf1.
51406 2016-11-27  Norihiro Tanaka  <noritnk@kcn.ne.jp>
51408         dfa: avoid match middle in multibyte character
51409         * lib/dfa.c (transit_state): If fails in matching single byte characters
51410         on a state including period expression in non-UTF8 multibyte locales,
51411         skip trailing bytes.
51412         (dfa_supported): Revert previous change.
51414 2016-11-27  Jim Meyering  <meyering@fb.com>
51416         dfa: avoid false match in non-UTF8 multibyte locales
51417         * lib/dfa.c (dfa_supported): Treat any non-UTF8 multibyte locale
51418         as "not supported" so that callers will resort to using regex-based
51419         matcher.  This will surely hurt performance, but correctness trumps
51420         performance here, and the affected locales are less and less relevant,
51421         these days.  See grep's bug report https://bugs.gnu.org/24975.
51423 2016-11-27  Mike Frysinger  <vapier@gentoo.org>
51425         ptsname_r: leverage AC_HEADER_MAJOR to provide major()
51426         * lib/ptsname_r.c: Include the appropriate headers.
51427         [__sun]: Delete sys/sysmacros.h include.
51428         [_AIX || __osf__]: Likewise.
51429         * m4/ptsname_r.m4 (gl_FUNC_PTSNAME_R): Depend on AC_HEADER_MAJOR.
51431 2016-11-27  Pádraig Brady  <P@draigBrady.com>
51433         md4,md5,sha*: allow _STRING_INLINE_unaligned enable unaligned operation
51434         * lib/md4.c (md4_process_bytes): The existing define is made internal
51435         in recent versions of glibc, so also use this new public define.
51436         * lib/md5.c (md5_process_bytes): Likewise.
51437         * lib/sha1.c (sha1_process_bytes): Likewise.
51438         * lib/sha256.c (sha256_process_bytes): Likewise.
51439         * lib/sha512.c (sha512_process_bytes): Likewise.
51441 2016-11-27  Pádraig Brady  <P@draigBrady.com>
51443         maint: use a more standard return from mbrtowc test
51444         * m4/mbrtowc.m4 (gl_MBRTOWC_C_LOCALE): Don't return 1
51445         from the test program as this often indicates an
51446         unhandled case in the test program.
51447         (gl_MBRTOWC_INCOMPLETE_STATE): Likewise.
51448         (gl_MBRTOWC_SANITYCHECK): Likewise.
51449         (gl_MBRTOWC_NULL_ARG2): Likewise.
51450         (gl_MBRTOWC_NUL_RETVAL): Likewise.
51452 2016-11-26  Paul Eggert  <eggert@cs.ucla.edu>
51454         freopen: work around glibc bug with closed fd
51455         Work around glibc bug#15589, where freopen mishandles the case
51456         where stdin etc. are already closed.
51457         * doc/posix-functions/freopen.texi (freopen): Document the bug.
51458         * lib/freopen.c (_GL_ALREADY_INCLUDING_STDIO_H): Define this
51459         instead of __need_FILE, as the latter does not work with glibc.
51460         Include <fcntl.h>, for open flags.
51461         (rpl_freopen): Work around glibc bug.
51462         * m4/freopen.m4 (gl_FUNC_FREOPEN): Check for bug.
51463         * modules/freopen (Depends-on): Add fcntl-h.
51464         * tests/test-freopen.c (main): Test for bug.
51466 2016-11-25  Paul Eggert  <eggert@cs.ucla.edu>
51468         fnmatch: fix typo introduced on 2016-08-17
51469         This fixes the port to non-GCC compilers that lack __builtin_expect.
51470         * lib/fnmatch.c (__builtin_expect): Change A&&B to !A||B.
51472         dfa: simplify with new function fillset
51473         * lib/dfa.c (fillset): New function.
51474         Use it for clarity when applicable.
51476         dfa: fix glitches with on-demand states
51477         Also, adjust commentary to better match new code.
51478         Some of these glitches predate the recent change.
51479         * lib/dfa.c (dfaanalyze): Clear trcount here, so that it counts
51480         only non-initial states.
51481         (dfastate): Rename locals to better match new roles.
51482         Move them into nested scopes if this is easy.
51483         Omit unnecessary calls to zeroset.
51484         Simplify test for whether to throw in the positions of state 0.
51485         Omit C99-ism (decl after statement) since Gawk still wants C89.
51486         (build_state): Omit unnecessary test and assignment.
51487         Fix some confusion that counted transition tables inaccurately
51488         and could cause a memory leak.
51489         (dfaexec_main): Redo to make it clearer to the compiler that
51490         -1 and -2 are the only negative state numbers here.
51492 2016-11-25  Norihiro Tanaka  <noritnk@kcn.ne.jp>
51494         dfa: addition of new state on demand
51495         * src/dfa.c (dfastate): Add argument UC, the current input character.
51496         Fill only a group including the character in transition table.
51497         (realloc_trans_if_necessary): Add the dummy state which means that a
51498         transition table is assigned but the next state is not assigned.
51499         (build_state): Return the next state.  All callers updated.
51500         (transit_state_singlebyte): If we get the dummy state,
51501         fill the transition table.
51502         (dfaexec_main): Handle the dummy state.
51503         (free_mbdata, dfafree): Consider the dummy state.
51505 2016-11-24  Daiki Ueno  <ueno@gnu.org>
51507         srclist: sync with released gettext
51508         * config/srclist.txt: Set "release" option to the files under
51509         $GETTEXT.
51511 2016-11-24  Daiki Ueno  <ueno@gnu.org>
51513         srclist: add "release" option
51514         * config/srclist.txt: Change the format so that the first column
51515         of each line points to the top-level directory of the source
51516         archive.
51517         * config/srclist-update: Accept "release" option that checks files
51518         from the most recently tagged revision in the source archive.
51520 2016-11-21  Bruno Haible  <bruno@clisp.org>
51522         snippet/c++defs: Simplify _GL_CXXALIAS_* macros.
51523         * build-aux/snippet/c++defs.h [__cplusplus && GNULIB_NAMESPACE]
51524         (_GL_CXXALIAS_RPL_1, _GL_CXXALIAS_RPL_CAST_1,
51525         _GL_CXXALIAS_SYS, _GL_CXXALIAS_SYS_CAST, _GL_CXXALIAS_SYS_CAST2):
51526         Inline and remove member function 'rpl ()' of the wrapper struct.
51528 2016-11-20  Paul Eggert  <eggert@cs.ucla.edu>
51530         dfa: fix logic typo
51531         Problem reported by Stephane Chazelas (Bug#24973).
51532         * lib/dfa.c (using_simple_locale): Fix typo that caused some
51533         non-simple locales like fr_FR to be treated as simple.
51535 2016-11-20  Jim Meyering  <meyering@fb.com>
51537         fix test driver leaks: exclude, malloc, realloc
51538         * tests/test-exclude.c (main): Fix trivial leak.
51539         * tests/test-malloc-gnu.c (main): Likewise.
51540         * tests/test-realloc-gnu.c (main): Likewise.
51541         With these changes, grep's tests are now leak free.
51542         I.e., running them with ASAN elicits no failure:
51543           make CFLAGS='-O0 -ggdb3' AM_CFLAGS=-fsanitize=address \
51544             AM_LDFLAGS='-fsanitize=address -static-libasan' check
51546 2016-11-11  Bruno Haible  <bruno@clisp.org>
51548         libunistring: Relicense under dual "LGPLv3+ or GPLv2" license.
51549         * modules/libunistring: (License): Change from LGPL to
51550         "LGPLv3+ or GPLv2".
51551         * modules/libunistring-optional: Likewise.
51552         * modules/unicase/*: Likewise.
51553         * modules/uniconv/*: Likewise.
51554         * modules/unictype/*: Likewise.
51555         * modules/unigbrk/*: Likewise.
51556         * modules/unilbrk/*: Likewise.
51557         * modules/uniname/*: Likewise.
51558         * modules/uninorm/*: Likewise.
51559         * modules/unistdio/*: Likewise.
51560         * modules/unistr/*: Likewise.
51561         * modules/uniwbrk/*: Likewise.
51562         * modules/uniwidth/*: Likewise.
51564 2016-11-12  Bruno Haible  <bruno@clisp.org>
51566         Relicense some modules under LGPLv2+.
51567         Paul Eggert's approval is in
51568         http://lists.gnu.org/r/bug-gnulib/2016-11/msg00037.html.
51569         Eric Blake's approval is in
51570         http://lists.gnu.org/r/bug-gnulib/2016-11/msg00042.html.
51571         Ludovic Courtès's approval is in
51572         http://lists.gnu.org/r/bug-gnulib/2016-11/msg00038.html.
51573         * modules/isnand-nolibm (License): Change to LGPLv2+.
51574         * modules/isnanf-nolibm (License): Likewise.
51575         * modules/isnanl-nolibm (License): Likewise.
51577 2016-11-19  Bruno Haible  <bruno@clisp.org>
51579         Relicense some modules under LGPLv2+.
51580         lib/float+.h is already under LGPLv2+ since 2007-07-13, per
51581         modules/vasnprintf.
51582         Paolo Bonzini's approval for lib/frexp.c and lib/frexpl.c is in
51583         http://lists.gnu.org/r/bug-gnulib/2016-11/msg00074.html.
51584         All other significant changes to the files in lib/ of these modules
51585         are from me.
51586         * modules/memcmp2 (License): Change to LGPLv2+.
51587         * modules/amemxfrm (License): Likewise.
51588         * modules/fpieee (License): Likewise.
51589         * modules/fpucw (License): Likewise.
51590         * modules/frexp-nolibm (License): Likewise.
51591         * modules/frexpl-nolibm (License): Likewise.
51592         * modules/printf-frexp (License): Likewise.
51593         * modules/printf-frexpl (License): Likewise.
51594         * modules/printf-safe (License): Likewise.
51595         * modules/signbit (License): Likewise.
51597 2016-11-17  Bruno Haible  <bruno@clisp.org>
51599         Enable Unicode decoder safety unconditionally.
51600         * lib/unistr.in.h (u32_mbtouc_unsafe): Assume CONFIG_UNICODE_SAFETY.
51601         * lib/unistr/u8-mblen.c (u8_mblen): Likewise.
51602         * lib/unistr/u8-mbtouc-unsafe.c (u8_mbtouc_unsafe): Likewise.
51603         * lib/unistr/u8-mbtouc-unsafe-aux.c (u8_mbtouc_unsafe_aux): Likewise.
51604         * lib/unistr/u8-prev.c (u8_prev): Likewise.
51605         * lib/unistr/u8-strmblen.c (u8_strmblen): Likewise.
51606         * lib/unistr/u8-strmbtouc.c (u8_strmbtouc): Likewise.
51607         * lib/unistr/u16-mblen.c (u16_mblen): Likewise.
51608         * lib/unistr/u16-mbtouc-unsafe.c (u16_mbtouc_unsafe): Likewise.
51609         * lib/unistr/u16-mbtouc-unsafe-aux.c (u16_mbtouc_unsafe_aux): Likewise.
51610         * lib/unistr/u16-prev.c (u16_prev): Likewise.
51611         * lib/unistr/u16-strmblen.c (u16_strmblen): Likewise.
51612         * lib/unistr/u16-strmbtouc.c (u16_strmbtouc): Likewise.
51613         * lib/unistr/u32-mblen.c (u32_mblen): Likewise.
51614         * lib/unistr/u32-mbtouc-unsafe.c (u32_mbtouc_unsafe): Likewise.
51615         * lib/unistr/u32-prev.c (u32_prev): Likewise.
51616         * lib/unistr/u32-next.c (u32_next): Likewise.
51617         * lib/unistr/u32-strmblen.c (u32_strmblen): Likewise.
51618         * lib/unistr/u32-strmbtouc.c (u32_strmbtouc): Likewise.
51619         * lib/uniconv/u8-conv-to-enc.c (u8_conv_to_encoding): Likewise.
51620         * lib/uniconv/u8-strconv-to-enc.c (u8_strconv_to_encoding): Likewise.
51621         * tests/unistr/test-u16-prev.c (check_invalid): Enable the
51622         CONFIG_UNICODE_SAFETY tests unconditionally.
51623         * tests/unistr/test-u32-mblen.c (main): Likewise.
51624         * tests/unistr/test-u32-mbtouc.h (test_function): Likewise.
51625         * tests/unistr/test-u32-prev.c (check_invalid): Likewise.
51626         * tests/unistr/test-u32-next.c (main): Likewise.
51627         * tests/unistr/test-u32-strmblen.c (main): Likewise.
51628         * tests/unistr/test-u32-strmbtouc.c (main): Likewise.
51629         * tests/unistr/test-u32-mbtouc.c (FULL_SAFETY): Remove macro.
51630         * lib/unistr/u8-check.c (u8_check): Remove old dead code.
51631         * lib/unistr/u8-mbtouc.c (u8_mbtouc): Likewise.
51632         * lib/unistr/u8-mbtouc-aux.c (u8_mbtouc_aux): Likewise.
51633         * lib/unistr/u8-mbtoucr.c (u8_mbtoucr): Likewise.
51634         * lib/unistr/u8-uctomb.c (u8_uctomb): Likewise.
51635         * lib/unistr/u8-uctomb-aux.c (u8_uctomb_aux): Likewise.
51636         * lib/unistr/u16-check.c (u16_check): Update comment.
51637         * NEWS: Mention the changes that callers should be aware of.
51639 2016-11-19  Bruno Haible  <bruno@clisp.org>
51641         relocatable-prog-wrapper: Fix breakage on Cygwin.
51642         * modules/relocatable-prog-wrapper (Files): Add lib/stat.c, lib/lstat.c.
51643         (Depends-on): Remove intprops.
51644         * lib/relocwrapper.c: Update dependency tree.
51645         (strerror): Undefine.
51646         * build-aux/install-reloc (func_create_wrapper): Do not compile
51647         strerror.c and strerror-override.c. Erase stat.o and lstat.o.
51649 2016-11-19  Bruno Haible  <bruno@clisp.org>
51651         strerror: Make it compile in C++ mode.
51652         * lib/strerror.c (strerror): Ignore the return value of memcpy().
51654 2016-11-15  Pedro Alves  <palves@redhat.com>
51656         sys_time: add gnulib::timeval for C++
51657         * lib/sys_time.in.h [__cplusplus && defined GNULIB_NAMESPACE]:
51658         Define "timeval" in the GNULIB_NAMESPACE namespace, and #undef any
51659         timeval macro.
51661 2016-11-14  Pedro Alves  <palves@redhat.com>
51663         snippet/c++defs: fix real-floating arg functions in C++ mode
51664         Also, define isfinite, isinf, isnan, signbit in the gnulib
51665         namespace instead of in the global namespace.
51666         * build-aux/snippet/c++defs.h (_GL_BEGIN_NAMESPACE)
51667         (_GL_END_NAMESPACE): New.
51668         * lib/math.in.h (_GL_MATH_CXX_REAL_FLOATING_DECL_2): Use them.
51669         (isfinite, isinf, isnan, signbit) [__cplusplus &&
51670         GNULIB_NAMESPACE]: Define them in the GNULIB_NAMESPACE namespace
51671         instead of in the global namespace.
51672         * tests/test-math-c++.cc: Check that the isfinite, isinf, isnan,
51673         signbit overloads exist in the GNULIB_NAMESPACE namespace, instead
51674         of in the global namespace.
51676 2016-11-13  Jim Meyering  <meyering@fb.com>
51678         strftime: don't use __THROW
51679         Each use of __THROW would provoke this from gcc-7-to-be:
51681           lib/strftime.c:371:1: warning: '__leaf__' attribute has no effect \
51682             on unit local functions [-Wattributes]
51683           static int iso_week_days (int, int) __THROW;
51684           ^~~~~~
51685         * lib/strftime.c (__THROW): Don't define.
51686         Remove each use of __THROW.
51687         * lib/strftime.c (memcpy_lowcase, memcpy_uppcase): Remove __THROW.
51688         (tm_diff, iso_week_days, __strftime_internal): Likewise.
51690 2016-11-14  Paul Eggert  <eggert@union>
51692         obstack: port to gcc -fcheck-pointer-bounds
51693         Problem found by 'make check' failure on bleeding-edge coreutils
51694         on an MPX-enabled CPU (Intel Core i3-7100U) running GCC (Ubuntu
51695         6.2.0-5ubuntu12), configured via "./configure
51696         --enable-gcc-warnings CFLAGS='-mmpx -fcheck-pointer-bounds -g3
51697         -O2' LDFLAGS='-static-libmpx -static-libmpxwrappers'".
51698         * lib/obstack.h (__FLEXIBLE_ARRAY_MEMBER):
51699         New macro, copied from fts_.h.
51700         (struct _obstack_chunk.contents): Use it.
51702 2016-11-14  Eric Blake  <eblake@redhat.com>
51704         strerror_r-posix: Another fix, for HAVE_DECL_STRERROR_R on mingw.
51705         * m4/strerror_r.m4 (gl_FUNC_STRERROR_R, gl_FUNC_STRERROR_R_WORKS):
51706         Avoid _ONCE variants, which may supply a conflicting AC_DEFINE().
51708 2016-11-14  Pádraig Brady  <P@draigBrady.com>
51710         strptime: fix compile error in recent change
51711         * lib/strptime.c (__strptime_internal): Fix ported code.
51713 2016-11-11  Bruno Haible  <bruno@clisp.org>
51715         gnulib-tool: Support for the dual "LGPLv3+ or GPLv2" license.
51716         * gnulib-tool (--lgpl): Accept value 3orGPLv2.
51717         (func_import): Extend determination of license_incompatibilities.
51718         (func_create_testdir): Extend table of license compatibility. Handle
51719         also the licenses GPLv3+, GPL, LGPLv3+.
51721 2016-11-12  Paul Eggert  <eggert@cs.ucla.edu>
51723         strftime: tune %q
51724         * lib/strftime.c (__strftime_internal): Assume tp->tm_mon is in range.
51726         Merge strftime.c changes from glibc
51727         This incorporates:
51728         2007-10-16 [BZ #5184] Add tzset_called argument
51729         2008-06-13 [BZ #6612] pass reference to tzset_called around
51730         2009-10-30 Implement Burmese language locale for Myanmar
51731         2010-01-09 Add support for XPG7 testing
51732         2015-09-26 [BZ #18985] out of range data to strftime() causes a segfault
51733         2015-10-20 Convert miscellaneous function definitions to prototype style
51734         * lib/strftime.c: Copy glibc license, since gnulib-tool rewrites
51735         it anyway and this lessens the difference between gnulib and glibc.
51736         (USE_IN_EXTENDED_LOCALE_MODEL) [_LIBC]: Define.
51737         (__THROW): Define if standard headers do not.
51738         (LOCALE_PARAM): Rename from LOCALE_PARAM_PROTO.  All uses changed.
51739         (memcpy_locase, memcpy_uppcase, tm_diff, __strftime_internal):
51740         Declare with __THROW.
51741         (__strftime_internal): Rename from strftime_case_. Add arg for
51742         whether tzset is called.  All uses changed.  Call tzset at most
51743         once.  Allow %OC, for Burmese.
51744         (a_wkday, f_wkday, a_month, f_month) [_NL_CURRENT]:
51745         Don't assume values are in range.
51747 2016-11-12  Eric Blake  <eblake@redhat.com>
51749         strerror_r-posix: Fix override of AC_FUNC_STRERROR_R
51750         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): New override.
51751         (gl_FUNC_STRERROR_R): Don't reuse AC_DEFINE() with a potentially
51752         different value.
51754 2006-11-12  Pedro Alves  <palves@redhat.com>
51756         Fix gnulib C++ namespace support and std::frexp
51757         * lib/math.in.h (frexp): Use _GL_CXXALIASWARN1 instead of
51758         _GL_CXXALIASWARN.
51760 2006-11-12  Pedro Alves  <palves@redhat.com>
51762         GNULIB_NAMESPACE::func need not pull in rpl_func
51763         * build-aux/snippet/c++defs.h [__cplusplus && GNULIB_NAMESPACE]
51764         (_GL_CXXALIAS_RPL_1, _GL_CXXALIAS_RPL_CAST_1, _GL_CXXALIAS_SYS)
51765         (_GL_CXXALIAS_SYS_CAST, _GL_CXXALIAS_SYS_CAST2): Define a wrapper
51766         struct instead of a function pointer.
51768 2016-11-09  Frediano Ziglio  <fziglio@redhat.com>
51770         manywarnings: fix -Wno-missing-field-initializers detection
51771         * m4/manywarnings.m4: Fix -Wno-missing-field-initializers detection
51772         to be independent of -Wunused-variable.  I.E. ensure the latter
51773         warning doesn't occur so that detection of the former is accurate.
51775 2016-11-05  Pádraig Brady  <pbrady@fb.com>
51777         strftime,strptime: support %q to represent the quarter
51778         * lib/strftime.c (strftime_case_): Add %q case.
51779         * lib/strptime.c (__strptime_internal): Likewise.
51780         * tests/test-strftime.c (quarter_test): A new test case.
51782 2016-11-03  Eric Blake  <eblake@redhat.com>
51784         bootstrap: Fix get_version() for AIX 5.3
51785         * build-aux/bootstrap (get_version): Factor out sed script, since
51786         indented comments choke AIX 5.3 sed.
51787         Reported-by: Michael Felt <aixtools@gmail.com>
51789 2016-11-03  Paul Eggert  <eggert@cs.ucla.edu>
51791         intprops: port to older XL C
51792         Problem reported by Alexander Samoilov in:
51793         http://lists.gnu.org/r/bug-gnulib/2016-10/msg00166.html
51794         http://savannah.nongnu.org/bugs/?49448
51795         * lib/intprops.h (_GL_HAVE___TYPEOF__) [__IBM__TYPEOF__]:
51796         Define to 1 only for XL C 12.1 or later, since this bug
51797         occurs in XL C for AIX 6.0 but not in 12.1.
51799 2016-11-02  Pádraig Brady  <P@draigBrady.com>
51801         backupfile: initialize default suffix within the implementation
51802         * lib/backupfile.c (find_backup_file_name): Initialize the
51803         global variable here, to simplify usage, and to only call
51804         getenv() when needed.
51806 2016-11-01  Paul Eggert  <eggert@cs.ucla.edu>
51808         futimens: remove FIXME for old Linux kernels
51809         * m4/futimens.m4 (gl_FUNC_FUTIMENS): Belatedy do a "simplify
51810         this in 2012" FIXME, like that for utimensat.
51812         utimensat: remove FIXME for old Linux kernels
51813         * lib/utimensat.c (rpl_utimensat): Update FIXME comment.
51814         * m4/utimensat.m4 (gl_FUNC_UTIMENSAT): Belatedy do a "simplify
51815         this in 2012" FIXME, by assuming the file system bug is absent
51816         unless demonstrated to be present.  We no longer need to worry
51817         about Linux kernel 2.6.32 when building with newer kernels.
51819 2016-10-16  Bruno Haible  <bruno@clisp.org>
51821         qsort_r: Fix macrology for platforms that lack the function.
51822         * m4/stdlib_h.m4 (gl_STDLIB_H): Check for qsort_r.
51823         (gl_STDLIB_H_DEFAULTS): Initialize HAVE_QSORT_R.
51824         * modules/stdlib (Makefile.am): Substitute HAVE_QSORT_R.
51825         * lib/stdlib.in.h (qsort_r): Provide declaration if the function does
51826         not exist.
51827         * m4/qsort_r.m4 (gl_FUNC_QSORT_R): Use AC_CHECK_FUNCS to test whether
51828         the function exists.
51829         * modules/qsort_r: Add comments.
51831 2016-10-26  Paul Eggert  <eggert@cs.ucla.edu>
51833         sys_types: fix Texinfo typos
51834         * doc/glibc-functions/gnu_dev_major.texi:
51835         * doc/glibc-functions/gnu_dev_makedev.texi:
51836         * doc/glibc-functions/gnu_dev_minor.texi: Fix typos.
51838 2016-10-26  John David Anglin  <dave.anglin@bell.net>
51840         getprogname: port to HP-UX
51841         See Bug#24805.
51842         * lib/getprogname.c (getprogname) [__hpux]: Port.
51843         * tests/test-getprogname.c (STREQ) [__hpux]:
51844         Special-case for HP-UX limitations on program name length.
51846 2016-10-20  Bruno Haible  <bruno@clisp.org>
51848         Update doc about target platforms.
51849         * doc/gnulib-intro.texi (Target Platforms): Update list.
51851 2016-10-15  Bruno Haible  <bruno@clisp.org>
51853         opendir, readdir, closedir: Relicense under LGPLv2+.
51854         * modules/opendir (License): Change to LGPLv2+.
51855         * modules/readdir (License): Likewise.
51856         * modules/closedir (License): Likewise.
51858 2016-10-16  Bruno Haible  <bruno@clisp.org>
51860         Fix conflict between strerror_r-posix module and AC_FUNC_STRERROR_R.
51861         * m4/strerror_r.m4 (gl_FUNC_STRERROR_R): Override the values set by the
51862         AC_FUNC_STRERROR_R macro. Define HAVE_DECL_STRERROR_R_ORIG.
51863         * lib/strerror_r.c: Use HAVE_DECL_STRERROR_R_ORIG instead of
51864         HAVE_DECL_STRERROR_R.
51866 2016-10-16  Bruno Haible  <bruno@clisp.org>
51868         Make the 'argp' module work without the 'error' module.
51869         * m4/argp.m4 (gl_ARGP): Require AC_FUNC_STRERROR_R.
51871 2016-10-25  Paul Eggert  <eggert@cs.ucla.edu>
51873         diffseq: restore TOO_EXPENSIVE heuristic
51874         * lib/diffseq.h: Problem with diffutils reported by Andreas Schwab
51875         (Bug#24715).  The simplest solution is to restore the
51876         TOO_EXPENSIVE heuristic that I added to GNU diff in 1993, while
51877         using a higher threshold to avoid Bug#16848 on smaller files.
51878         * lib/diffseq.h (struct context): Restore member too_expensive.
51879         (struct partition): Restore members lo_minimal, hi_minimal.
51880         (diag, compareseq): Restore arg find_minimal.  All uses changed.
51881         (diag): Restore the TOO_EXPENSIVE heuristic that I added back in
51882         1993 to make 'diff' run faster (but not as well) on large inputs,
51883         but use a threshold of 4096 instead of the old 256.
51884         * lib/fstrcmp.c (strcmp_bounded):
51885         * lib/git-merge-changelog.c (compute_differences):
51886         Adjust to diffseq.h changes.
51888 2016-10-22  Bruno Haible  <bruno@clisp.org>
51890         iconv: Avoid compilation error when bootstrapping GNU libiconv.
51891         * m4/iconv.m4 (AM_ICONV): When the system does not have an iconv()
51892         declaration yet, define ICONV_CONST to empty.
51894 2016-10-15  Bruno Haible  <bruno@clisp.org>
51896         Avoid gnulib-tool warnings about the dependencies of 'parse-datetime'.
51897         * gnulib-tool (func_get_license): Special-case the 'parse-datetime'
51898         module.
51900 2016-10-16  Bruno Haible  <bruno@clisp.org>
51902         system-quote tests: Avoid compiler warning on AIX.
51903         * tests/test-system-quote-child.c (fopen): Redefine like the system's
51904         <stdio.h> does.
51906 2016-10-16  Bruno Haible  <bruno@clisp.org>
51908         Fix some "gcc -Wall" warnings.
51909         * tests/test-ffsl.c (main): Use variable x, not i.
51910         * tests/test-posix_spawn3.c (parent_main): Consider the return value of
51911         freopen.
51912         * tests/test-sethostname1.c (main): Explicitly ignore the return value
51913         of sethostname.
51915 2016-10-16  Bruno Haible  <bruno@clisp.org>
51917         gnulib-tool: Make --create-testdir on all modules work again.
51918         * gnulib-tool (func_create_testdir): Don't include the
51919         non-recursive-gnulib-prefix-hack module.
51921 2016-10-21  Daiki Ueno  <ueno@gnu.org>
51923         libunistring: change the maintainer to 'all'
51924         * modules/gen-uni-tables, modules/libunistring:
51925         * modules/ucs4-utf16, modules/ucs4-utf8, modules/unicodeio:
51926         * modules/unitypes, modules/utf16-ucs4, modules/utf16-ucs4-unsafe:
51927         * modules/utf8-ucs4, modules/utf8-ucs4-unsafe:
51928         * modules/unicase/*, modules/uniconv/*, modules/unictype/*:
51929         * modules/unilbrk/*, modules/uniname/*, modules/uninorm/*:
51930         * modules/unistdio/*, modules/unistr/*, modules/uniwbrk/*:
51931         * modules/uniwidth/*: Change the maintainer to 'all'.
51933 2016-10-16  Bruno Haible  <bruno@clisp.org>
51935         Simplify "configure: checking ..." messages.
51936         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Use AC_MSG_CHECKING instead of
51937         AC_MSG_NOTICE.
51938         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Likewise.
51940 2016-10-20  Paul Eggert  <eggert@cs.ucla.edu>
51942         quotearg-tests: pacify gcc -Wall
51943         Problem reported by Bruno Haible in:
51944         http://lists.gnu.org/r/bug-gnulib/2016-10/msg00066.html
51945         * tests/test-quotearg-simple.c (use_quote_double_quotes): Move here ...
51946         * tests/test-quotearg.h: ... from here.
51948 2016-10-20  Pádraig Brady  <P@draigBrady.com>
51950         canonicalize-lgpl: fix for missing SIZE_MAX on older systems
51951         * lib/canonicalize-lgpl.c [SIZE_MAX]: Define if needed.
51952         Needed on Centos <= 4.
51954 2016-10-20  Jim Meyering  <meyering@fb.com>
51956         printf.m4: fix a bug in detecting printf %j support
51957         * m4/printf.m4 (gl_PRINTF_SIZES_C99): Fail any system for which
51958         uintmax_t is defined in neither stdint.h nor inttypes.h.
51959         Before, this macro might have mistakenly set
51960         gl_cv_func_printf_sizes_c99=yes on such a system.
51961         Spotted by Zev Weiss.
51963 2016-10-19  Paul Eggert  <eggert@cs.ucla.edu>
51965         sched: substitute HAVE_SYS_CDEFS_H too
51966         Problem reported by Tom G. Christensen in:
51967         http://lists.gnu.org/r/bug-gnulib/2016-10/msg00084.html
51968         * m4/sched_h.m4 (gl_SCHED_H): Set and substitute HAVE_SYS_CDEFS_H.
51969         * modules/sched (Depends-on): Substitute HAVE_SYS_CDEFS_H.
51971 2016-10-19  Pádraig Brady  <P@draigBrady.com>
51973         quotearg: never write beyond the returned length
51974         * lib/quotearg.c (quotearg_buffer_restyled): Switch to a read-only
51975         scan of the string when we initially encounter a single quote when
51976         shell quoting, so that if we then switch to a more concise quoting method
51977         we will not have written beyond that returned length.
51978         This is significant for sh-quote, which has separate routines
51979         to determine the length and do the actual quoting.
51980         * tests/test-quotearg.h: Reinstate the buffer bounds checking
51981         now that we never write more than the returned length.
51983 2016-10-18  Bruno Haible  <bruno@clisp.org>
51985         getprogname tests: Avoid failure in packages that use libtool.
51986         * tests/test-getprogname.c (main): Strip "lt-" prefix.
51987         Based on a patch by Jim Meyering.
51989 2016-10-16  Bruno Haible  <bruno@clisp.org>
51991         getprogname: Fix test failure on Cygwin. Comments.
51992         * lib/getprogname.h: Add comments.
51993         * lib/getprogname.c: Add comments. Fix #elif indentation.
51994         * tests/test-getprogname.c (main): On Cygwin, expect a result without
51995         ".exe" suffix.
51997 2016-10-16  Bruno Haible  <bruno@clisp.org>
51999         Make sure the libunistring detection rejects older versions with a
52000         known bug.
52001         * modules/unistr/u8-strtok (configure.ac): Bump required version.
52002         * modules/unistr/u16-strtok (configure.ac): Likewise.
52003         * modules/unistr/u32-strtok (configure.ac): Likewise.
52005 2016-10-18  Bruno Haible  <bruno@clisp.org>
52007         sh-quote, system-quote: revert regression of unit test.
52008         * tests/test-sh-quote.c (check_one): Do detect buffer overruns.
52009         * tests/test-system-quote-main.c (check_one): Likewise.
52011 2016-10-16  Pádraig Brady  <P@draigBrady.com>
52013         quotearg: fix stale tests
52014         * tests/test-quotearg.c [locale_results]: Add the missing str7
52015         entries to the expected results.
52016         * tests/test-system-quote-main.c (check_one): Don't enforce that we
52017         don't write beyond the returned length, since that's no longer the
52018         case if we switch to a more concise quoting style.
52019         * tests/test-sh-quote.c (check_one): Likewise.
52020         (main): Adjust for the new more concise quoting style.
52021         Reported by Bruno Haible.
52023 2016-10-16  Jim Meyering  <meyering@fb.com>
52025         non-recursive-gnulib-prefix-hack: fix inconsequential typo
52026         * m4/non-recursive-gnulib-prefix-hack.m4: Change a hard-coded "lib"
52027         to "$1".  This macro is always invoked with $1 == lib.
52028         Spotted by Bruno Haible
52030 2016-10-16  Bruno Haible  <bruno@clisp.org>
52032         Fix a test crash.
52033         * tests/test-duplocale.c (main): Skip the test if the 'newlocale' call
52034         fails.
52036 2016-10-16  Pádraig Brady  <P@draigBrady.com>
52038         test-limits-h: suppress -Woverlength-strings
52039         * tests/test-limits-h.c [__GNUC__]: Ignore -Woverlength-strings.
52041 2016-10-15  Bruno Haible  <bruno@clisp.org>
52043         gettime, timespec, utimens: Relicense under LGPL.
52044         * modules/gettime (License): Change to LGPL.
52045         * modules/timespec (License): Likewise.
52046         * modules/utimens (License): Likewise.
52048 2016-10-14  Bruno Haible  <bruno@clisp.org>
52049             Pádraig Brady  <P@draigBrady.com>
52051         canonicalize-lgpl: Support the case path_max > INT_MAX.
52052         * lib/canonicalize-lgpl.c (__realpath): Declare n as ssize_t, not int.
52053         Fix overflow check, for platforms where 'size_t' is larger than 'long'.
52055 2016-10-13  Jim Meyering  <meyering@fb.com>
52057         getprogname: IBM z/OS: avoid NULL-dereference
52058         * lib/getprogname.c (getprogname) [__MVS__]: Don't dereference NULL
52059         upon strdup failure.
52061 2016-10-12  Jim Meyering  <meyering@fb.com>
52063         test-stdint: use _GL_VERIFY rather than "verify" for some tests
52064         * tests/test-stdint.c (verify_width): Implement with _GL_VERIFY
52065         and an abbreviated diagnostic rather than verify with the full one,
52066         because the full-length strings would evoke warnings from gcc with
52067         -Woverlength-strings.
52069 2016-10-13  Paul Eggert  <eggert@cs.ucla.edu>
52071         stdint: port SIZE_MAX to glibc s390
52072         Problem reported by Eric Blake in:
52073         http://lists.gnu.org/r/bug-gnulib/2016-10/msg00031.html
52074         * doc/posix-headers/stdint.texi (stdint.h): Document the fix.
52075         * m4/stdint.m4 (gl_STDINT_H): Check that SIZE_MAX has the
52076         correct type, if possible.
52078 2016-10-13  Daniel Richard G.  <skunk@iSKUNK.ORG>
52080         getprogname: port to IBM z/OS
52081         * lib/getprogname.c (getprogname): Use w_getpsent() to get the name.
52083 2016-10-11  Jim Meyering  <meyering@fb.com>
52085         maint: remove stray space after "." in AC_DEFINE comment.
52086         * m4/st_dm_mode.m4 (AC_STRUCT_ST_DM_MODE): Remove space-after-".".
52087         * m4/utimes.m4 (gl_FUNC_UTIMES): Likewise.
52089 2016-10-05  Jim Meyering  <meyering@fb.com>
52091         long-options: avoid new GCC 7 warning from -Wimplicit-fallthrough
52092         * lib/long-options.c (parse_long_options): Add a break statement
52093         to avoid this new warning/failure:
52094         $ CFLAGS='-O -Werror=implicit-fallthrough' ./gnulib-tool \
52095           --create-testdir --dir=/t/x --with-tests --test long-options
52096         ../../gllib/long-options.c: In function 'parse_long_options':
52097         ../../gllib/long-options.c:66:12: error: this statement may \
52098           fall through [-Werror=implicit-fallthrough]
52099                    (*usage_func) (EXIT_SUCCESS);
52100                    ~^~~~~~~~~~~~~~~~~~~~~~~~~~~
52102 2016-10-05  Jim Meyering  <meyering@fb.com>
52104         utimecmp: avoid new GCC 7 warning from -Wbool-operation
52105         Testing this module would fail when using GCC 7 like this:
52106         $ CFLAGS='-O -Werror=bool-operation' ./gnulib-tool --create-testdir \
52107           --dir=/tmp/x --with-tests --test utimecmp
52108         ../../gllib/utimecmp.c: In function ‘utimecmp’:
52109         ../../gllib/utimecmp.c:291:36: error: ‘~’ on a boolean expression \
52110           [-Werror=bool-operation]
52111                          time_t s = src_s & ~ (res == 2 * BILLION);
52112                                             ^
52113         ../../gllib/utimecmp.c:370:16: error: ‘~’ on a boolean expression \
52114           [-Werror=bool-operation]
52115                src_s &= ~ (res == 2 * BILLION);
52116                         ^
52117         * lib/utimecmp.c (utimecmp): Do not apply "~" to a boolean.
52118         Instead, make it explicit that we intend to apply it to 0 or 1.
52120 2016-10-10  Norihiro Tanaka  <noritnk@kcn.ne.jp>
52122         dfa: save memory for states
52123         * src/dfa (dfaexec_main): Beginning of dfa execution, release caches of
52124         states if dfa has a lot of caches.
52126 2016-10-10  Eli Zaretskii  <eliz@gnu.org>
52128         wchar, wctype-h: fix for MinGW 3.22.2
52129         * lib/wchar.in.h [__MINGW32__]: Add one more condition for
52130         special invocation, to fix issues with MinGW 3.22.2 wchar.h
52131         when included from <string.h>.
52132         * lib/wctype.in.h [__MINGW32__]: Add special invocation
52133         convention for MinGW 3.22.2, to solve issues with their
52134         wctype.h when included from <ctype.h>.
52136 2016-10-05  Jim Meyering  <meyering@fb.com>
52138         long-options: avoid new GCC 7 warning from -Wimplicit-fallthrough
52139         * lib/long-options.c (parse_long_options): Add a break statement
52140         to avoid this new warning/failure:
52141         $ CFLAGS='-O -Werror=implicit-fallthrough' ./gnulib-tool \
52142           --create-testdir --dir=/t/x --with-tests --test long-options
52143         ../../gllib/long-options.c: In function ‘parse_long_options’:
52144         ../../gllib/long-options.c:66:12: error: this statement may \
52145           fall through [-Werror=implicit-fallthrough]
52146                    (*usage_func) (EXIT_SUCCESS);
52147                    ~^~~~~~~~~~~~~~~~~~~~~~~~~~~
52149         utimecmp: avoid new GCC 7 warning from -Wbool-operation
52150         Testing this module would fail when using GCC 7 like this:
52151         $ CFLAGS='-O -Werror=bool-operation' ./gnulib-tool --create-testdir \
52152           --dir=/tmp/x --with-tests --test utimecmp
52153         ../../gllib/utimecmp.c: In function ‘utimecmp’:
52154         ../../gllib/utimecmp.c:291:36: error: ‘~’ on a boolean expression \
52155           [-Werror=bool-operation]
52156                          time_t s = src_s & ~ (res == 2 * BILLION);
52157                                             ^
52158         ../../gllib/utimecmp.c:370:16: error: ‘~’ on a boolean expression \
52159           [-Werror=bool-operation]
52160                src_s &= ~ (res == 2 * BILLION);
52161                         ^
52162         * lib/utimecmp.c (utimecmp): Do not apply "~" to a boolean.
52163         Instead, make it explicit that we intend to apply it to 0 or 1.
52165 2016-10-03  Pádraig Brady  <P@draigBrady.com>
52167         quotearg: minimize shell quoting using double quotes
52168         * lib/quotearg.c (quotearg_buffer_restyled): If an ASCII single
52169         quote in encountered then use double quotes (c style quoting)
52170         when possible, as it simplifies the quoting.
52171         * tests/test-quotearg-simple.c: Add test cases.
52172         * tests/test-quotearg.h (use_quotearg_buffer): Adjust to account
52173         for the fact we now may write beyond the returned length.
52175 2016-10-02  Jim Meyering  <meyering@fb.com>
52177         vasnprintf.c: avoid spurious warning from GCC 7
52178         The presence of cpp directives renders this "FALLTHROUGH" comment
52179         ineffective, so does not suppress the -Wimplicit-fallthrough warning
52180         from GCC 7 built from git on 2016-10-02.
52181         * lib/vasnprintf.c (VASNPRINTF): Move comment down past two cpp
52182         directives, so that it takes effect once again.  This is clearly
52183         not a proper change, and I will revert it once this bug is fixed:
52184         https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77817
52186 2016-10-01  Jim Meyering  <meyering@fb.com>
52188         getprogname: correct the test for a __progname variable
52189         * m4/getprogname.m4 (gl_FUNC_GETPROGNAME): Use AC_CACHE_CHECK
52190         and AC_LINK_IFELSE to check for a global __progname.  If found,
52191         define HAVE_VAR___PROGNAME.
52192         * lib/getprogname.c (getprogname): Reflect the new name of the
52193         feature- checked preprocessor symbol:
52194         s/HAVE_DECL___PROGNAME/HAVE_VAR___PROGNAME/
52196 2016-09-28  Jim Meyering  <meyering@fb.com>
52198         u8-uctomb-aux.c: build: placate GCC 7's new -Wimplicit-fallthrough
52199         * lib/unistr/u8-uctomb-aux.c (u8_uctomb_aux): Mark each end of
52200         fall-through case with a /* fallthrough */ comment.
52202         dfa: build: avoid warning from GCC 7's new -Wimplicit-fallthrough
52203         * lib/dfa.c (dfassbuild): Mark the end of this case with a
52204         /* fallthrough */ comment.
52206         getprogname: avoid __progname vs program_invocation_short_name pitfall
52207         I.e., don't let the OpenBSD 5.1 fix induce failure when using newer
52208         glibc.  Would have caused failure with Fedora 25's glibc-2.24-3, but
52209         not with Fedora 24's glibc-2.23.1-10.
52210         * lib/getprogname.c (__progname): Move this declaration down...
52211         (getprogname): ... into the #elif block where used, and make it
52212         explicitly "extern".
52214         getprogname: port to OpenBSD 5.1
52215         * lib/getprogname.c (__progname) [HAVE_DECL___PROGNAME]: Declare.
52216         (getprogname) [HAVE_DECL___PROGNAME]: Return __progname or "?".
52217         * modules/getprogname (configure.ac): Move most of this code...
52218         * m4/getprogname.m4 (gl_FUNC_GETPROGNAME): ... to this function,
52219         increment serial number, and add a test for __progname.
52220         https://bugs.gnu.org/24562
52221         Reported by Nelson H. F. Beebe.
52223 2016-09-24  Paul Eggert  <eggert@cs.ucla.edu>
52225         sched: port to GCC 6.2.1 on macOS Sierra
52226         Problem reported by Denis Davydov in:
52227         http://lists.gnu.org/r/bug-gnulib/2016-09/msg00056.html
52228         * lib/sched.in.h [HAVE_SYS_CDEFS_H]:
52229         Include <sys/cdefs.h> before <sched.h>.
52230         * m4/nproc.m4 (gl_PREREQ_NPROC): Include errno.h before sched.h,
52231         so that we needn’t worry about the sched.h include bug here.
52232         * m4/sched_h.m4 (gl_SCHED_H): Check for sys/cdefs.h,
52233         and include it before <sched.h> if it exists, when
52234         checking for <sched.h>.
52236         tests/init.sh: port Alpine fix to AIX 7.1
52237         * tests/init.sh (compare_): When attempting to use diff -U3,
52238         prefer diff -u to -U3 to -c to plain diff.  Do not insist on
52239         diff -u not outputting a space after leading '+', as the users
52240         of 'compare' should not be that picky about its output format.
52241         In the AIX 7.1 case, return with diff exit status (or with 2 if
52242         trouble), instead of some random nonzero exit status.
52243         * tests/test-init.sh (test_compare): Remove space after leading
52244         '+', so that AIX 7.1 'diff' passes the test.
52246 2016-09-22  Paul Eggert  <eggert@cs.ucla.edu>
52248         nl_langinfo: pacify GCC
52249         * lib/nl_langinfo.c (ctype_codeset): Remove unused local.
52250         (rpl_nl_langinfo): Cast string literals to char *, to pacify GCC.
52252         stdint: also set GL_GENERATE_LIMITS_H
52253         Problem reported by Jim Meyering in:
52254         http://lists.gnu.org/r/bug-gnulib/2016-09/msg00052.html
52255         * m4/stdint.m4 (gl_STDINT_H): Also redo the AM_CONDITIONAL.
52257         limits-h, stdint: Don't assume extensions, fix typo
52258         * m4/limits-h.m4 (gl_LIMITS_H):
52259         * m4/stdint.m4 (gl_STDINT_H):
52260         Don't assume AC_USE_SYSTEM_EXTENSIONS.
52261         * m4/stdint.m4 (gl_STDINT_H): Fix typo in setting of LIMITS_H,
52262         reported by Jim Meyering in:
52263         http://lists.gnu.org/r/bug-gnulib/2016-09/msg00050.html
52265 2016-09-21  Jim Meyering  <meyering@fb.com>
52267         getprogname: port to AIX
52268         * lib/getprogname.c (getprogname) [_AIX]: Use getpid, getprocs64
52269         and strdup to obtain a short program name string.  Using code from
52270         Bruno Haible and an idea from Bastien ROUCARIÈS, in
52271         https://lists.gnu.org/r/bug-gnulib/2010-12/msg00249.html
52272         Assaf Gordon reported that this new file would fail to compile on
52273         AIX-7.1 32bit.
52275 2016-09-16  Paul Eggert  <eggert@cs.ucla.edu>
52277         extensions: fix typo in comment
52278         * m4/extensions.m4: Sync from Autoconf master.
52280         stdint: support new _WIDTH macros
52281         * doc/posix-headers/stdint.texi: Document this.
52282         * lib/stdint.in.h: Add support for INTMAX_WIDTH. etc.
52283         * m4/stdint.m4 (gl_STDINT_H): Require gl_LIMITS_H.  Check for
52284         support for INTMAX_WIDTH, etc. as well as for support for just C99.
52285         * modules/stdint (Depends-on): Add limits-h.
52286         (Makefile.am): Substitute HAVE_C99_STDINT_H.
52287         * modules/stdint-tests (Depends-on): Add extensions, so that
52288         INTMAX_MAX etc. are defined.
52289         * tests/test-stdint.c: Verify the new macros.
52291         limits-h: new module
52292         This adds ISO/IEC TS 18661-1:2014 support to limits.h.
52293         * MODULES.html.sh: Add limits-h,and move size_max to stdint section.
52294         * doc/posix-headers/limits.texi: Document new module.
52295         * lib/limits.in.h, m4/limits-h.m4, modules/limits-h:
52296         * modules/limit-h-tests, tests/test-limits-h.c: New files.
52298         stdio: don't redefine __USE_MINGW_ANSI_STDIO
52299         * m4/stdio_h.m4 (gl_STDIO_H): Don't define __USE_MINGW_ANSI_STDIO
52300         if it is already defined.  Apparently GNU Emacs relies on this.  See:
52301         http://lists.gnu.org/r/emacs-devel/2016-09/msg00416.html
52303 2016-09-15  Eric Blake  <eblake@redhat.com>
52305         sys_types: avoid glibc 2.25 warnings about major()
52306         * m4/sys_types_h.m4 (AC_HEADER_MAJOR): Replace broken version in
52307         older autoconf.
52308         * doc/posix-headers/sys_types.texi (sys/types.h): Document fix.
52309         * doc/glibc-functions/gnu_dev_major.texi (gnu_dev_major): Likewise.
52310         * doc/glibc-functions/gnu_dev_makedev.texi (gnu_dev_makedev): Likewise.
52311         * doc/glibc-functions/gnu_dev_minor.texi (gnu_dev_minor): Likewise.
52313         mountlist: include sysmacros.h for glibc
52314         * m4/mountlist.m4 (gl_PREREQ_MOUTLIST_EXTRA): Include
52315         AC_HEADER_MAJOR.
52316         * lib/mountlist.c (includes): Use correct headers.
52318 2016-09-15  Paul Eggert  <eggert@cs.ucla.edu>
52320         extensions: port to more ISO C TSes
52321         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Sync from Autoconf
52322         master, to add support for more recent ISO C TRs and TSes.
52324 2016-09-13  Paul Eggert  <eggert@cs.ucla.edu>
52326         intprops: new macro TYPE_WIDTH
52327         * lib/intprops.h (TYPE_WIDTH): New macro.
52328         (TYPE_MAXIMUM, _GL_SIGNED_INT_MAXIMUM, INT_STRLEN_BOUND):
52329         * lib/ftoastr.h (_GL_FLOAT_DIG_BITS_BOUND):
52330         * lib/parse-datetime.y (parse_datetime2):
52331         Use it.
52333         extensions: port to recent ISO C TRs
52334         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS):
52335         Sync from Autoconf master, to add support for recent ISO C TRs.
52336         * m4/stdio_h.m4 (gl_STDIO_H): Define __USE_MINGW_ANSI_STDIO here,
52337         since AC_USE_SYSTEM_EXTENSIONS no longer does that as
52338         the MinGW option is not an extension.
52340 2016-09-11  Paul Eggert  <eggert@cs.ucla.edu>
52342         dfa: port to Solaris 9
52343         Problems reported by Tom G. Christensen in:
52344         http://lists.gnu.org/r/bug-gnulib/2016-09/msg00031.html
52345         * modules/dfa (Depends-on): Add isblank.
52346         * modules/dfa-tests (dfa_match_aux_LDADD):
52347         Rename from test_stat_LDADD, to fix typo.
52348         * tests/dfa-match.sh: Don't require 'timeout'; use it if available.
52350 2016-09-10  Jim Meyering  <meyering@fb.com>
52352         strverscmp: avoid link failure on OS X
52353         * lib/strverscmp.c [!weak_alias]: Define __strverscmp to strverscmp.
52354         Reported by Assaf Gordon in https://bugs.gnu.org/24256#26
52356 2016-08-16  Jim Meyering  <meyering@fb.com>
52358         dfa: new module, importing grep's DFA matcher
52359         Since grep's DFA matcher is now being used by two gnulib-enabled
52360         projects, grep and sed, it makes sense to version-control its
52361         sources and unit tests in one place: here.
52362         * modules/dfa: New module.
52363         * modules/dfa-tests: New file.
52364         * lib/dfa.c: New file, from grep.
52365         * lib/dfa.h: Likewise.
52366         * lib/localeinfo.c: Likewise.
52367         * lib/localeinfo.h: Likewise.
52368         * tests/dfa-match-aux.c: Likewise.
52369         * tests/dfa-invalid-char-class.sh: Likewise.
52370         * tests/dfa-match.sh: Likewise, with minor changes.
52371         * MODULES.html.sh (Misc): Add "dfa" to this list.
52373 2016-09-09  Jim Meyering  <meyering@fb.com>
52375         getprogname-tests: don't depend on assert-h
52376         * modules/getprogname-tests (Depends-on): Remove assert-h.
52377         It was not needed, and in fact would cause build failure for
52378         coreutils on some systems.  Reported by Assaf Gordon in https:
52379         //lists.gnu.org/r/coreutils/2016-09/msg00016.html
52381 2016-09-07  Jim Meyering  <meyering@fb.com>
52383         getprogname-tests: work also when EXEEXT is nonempty
52384         * modules/getprogname-tests (Makefile.am): Define EXEEXT.
52385         * tests/test-getprogname.c (main): Use it.
52386         Suggested by Gisle Vanem.
52388 2016-09-07  Gisle Vanem  <gvanem@yahoo.no>
52390         getprogname: fix errors in previous change
52391         * lib/getprogname.c (getprogname) [HAVE_GETEXECNAME]:
52392         s/program_invocation_name/base/
52393         [HAVE_DECL___ARGV]: Handle NULL __argv or __argv[0].
52395 2016-09-08  Pádraig Brady  <P@draigBrady.com>
52397         parse-datetime: restrict debug output to input string
52398         * lib/parse-datetime.y (parse_datetime2): If we parse
52399         all of the input but determine it's invalid, ensure
52400         we don't output the now invalid input pointer.
52401         This issue was seen with `date -d 'now +1'`.
52403 2016-09-07  Paul Eggert  <eggert@cs.ucla.edu>
52405         flexmember: new macro FLEXALIGNOF
52406         * lib/flexmember.h: Include <stddef.h>, for offsetof.
52407         (FLEXALIGNOF): Rename from _GL_XALLOC_ALIGNOF, as Emacs can use
52408         this macro.  Update comments.
52410 2016-09-07  Jim Meyering  <meyering@fb.com>
52412         getprogname: port to systems with __argv (mingw, msvc)
52413         * lib/getprogname.c (getprogname): Include "dirname.h" and use
52414         last_component: more general than open coding it with hard-coded "/".
52415         * lib/getprogname.h (getprogname): Prefer "char const *" consistently.
52416         * modules/getprogname (Depends-on): Add dirname-lgpl.
52417         (configure.ac): Check for __argv in <stdlib.h>.
52418         * modules/getprogname-tests: New file.
52419         * tests/test-getprogname.c: New file.
52420         Suggested by Gisle Vanem in
52421         https://lists.gnu.org/r/bug-gnulib/2016-09/msg00014.html
52423 2016-09-07  Paul Eggert  <eggert@cs.ucla.edu>
52425         flexmember: port better to GCC + valgrind
52426         With a char[] flexible array member in a struct with nontrivial
52427         alignment, GCC-generated code can access past the end of the
52428         array, because GCC assumes there are padding bytes to get the
52429         struct aligned.  So the common idiom of malloc (offsetof (struct
52430         s, m), n) does not properly allocate an n-byte trailing member, as
52431         malloc’s argument should be the next multiple of alignof (struct s).
52432         See GCC Bug#66661: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66661
52433         Although C11 apparently permits this GCC optimization (i.e., there
52434         was a bug in Gnulib not in GCC), possibly this is a defect in C11.
52435         See the thread containing:
52436         https://gcc.gnu.org/ml/gcc-patches/2016-09/msg00317.html
52437         * lib/flexmember.h: New file.
52438         * lib/fnmatch.c, lib/fts.c, lib/glob.c, lib/idcache.c:
52439         * lib/localename.c, lib/time_rz.c:
52440         Include flexmember.h.
52441         * lib/fnmatch_loop.c (struct patternlist):
52442         * lib/localename.c (struct hash_node):
52443         Use FLEXIBLE_ARRAY_MEMBER.
52444         * lib/fnmatch_loop.c (EXT):
52445         * lib/fts.c (fts_alloc):
52446         * lib/glob.c (glob_in_dir):
52447         * lib/idcache.c (getuser, getuidbyname, getgroup, getgidbyname):
52448         * lib/localename.c (gl_lock_define_initialized):
52449         * lib/time_rz.c (tzalloc):
52450         Use FLEXSIZEOF instead of offsetof.
52451         * m4/flexmember.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER):
52452         Check that the size of the struct can be taken.
52453         * modules/flexmember (Files): Add lib/flexmember.h.
52454         * modules/fnmatch, modules/glob, modules/localename (Depends-on):
52455         Add flexmember.
52457 2016-09-06  Paul Eggert  <eggert@cs.ucla.edu>
52459         getprogname: port to Solaris 10
52460         * lib/getprogname.c: Include stdlib.h, for getexecname decl.
52461         (getprogname) [HAVE_GETEXECNAME]: Use that, for Solaris 10.
52462         * m4/getprogname.m4 (gl_FUNC_GETPROGNAME): Check for getexecname.
52464         stdalign: correct mistake in alignof doc
52465         Problem reported by Joseph Myers in:
52466         https://gcc.gnu.org/ml/gcc-patches/2016-09/msg00340.html
52467         * doc/posix-headers/stdalign.texi: Do not imply that C11 prohibits
52468         alignof(S) where S is a structure containing a flexible array
52469         member.  The Gnulib substitute does not support this, but C11 does.
52471 2016-08-18  Pino Toscano  <ptoscano@redhat.com>
52473         main.mk: remove sc_program_name, since there is no more need to
52474         use set_program_name in tools (getprogname is enough for most
52475         of the cases).
52476         * cfg.mk (local-checks-to-skip): Remove sc_program_name.
52477         * top/maint.mk (sc_program_name): Remove.
52479 2016-08-18  Pino Toscano  <ptoscano@redhat.com>
52481         Port tests away from progname, since modules that need the
52482         program name already depend on getprogname.
52483         * modules/acl-tests (Depends-on): Remove progname.
52484         * modules/argmatch (Depends-on): Likewise.
52485         * modules/argmatch-tests (Depends-on): Likewise.
52486         * modules/argp-tests (Depends-on): Likewise.
52487         * modules/argp-version-etc-tests (Depends-on): Likewise.
52488         * modules/array-list-tests (Depends-on): Likewise.
52489         * modules/array-oset-tests (Depends-on): Likewise.
52490         * modules/avltree-list-tests (Depends-on): Likewise.
52491         * modules/avltree-oset-tests (Depends-on): Likewise.
52492         * modules/avltreehash-list-tests (Depends-on): Likewise.
52493         * modules/carray-list-tests (Depends-on): Likewise.
52494         * modules/copy-file-tests (Depends-on): Likewise.
52495         * modules/exclude-tests (Depends-on): Likewise.
52496         * modules/fchownat-tests (Depends-on): Likewise.
52497         * modules/fdopendir-tests (Depends-on): Likewise.
52498         * modules/filenamecat-tests (Depends-on): Likewise.
52499         * modules/fstatat-tests (Depends-on): Likewise.
52500         * modules/fstrcmp-tests (Depends-on): Likewise.
52501         * modules/linked-list-tests (Depends-on): Likewise.
52502         * modules/linkedhash-list-tests (Depends-on): Likewise.
52503         * modules/mkdirat-tests (Depends-on): Likewise.
52504         * modules/nonblocking-pipe-tests (Depends-on): Likewise.
52505         * modules/nonblocking-socket-tests (Depends-on): Likewise.
52506         * modules/obstack-printf-tests (Depends-on): Likewise.
52507         * modules/openat-tests (Depends-on): Likewise.
52508         * modules/parse-datetime-tests (Depends-on): Likewise.
52509         * modules/pipe-filter-gi-tests (Depends-on): Likewise.
52510         * modules/pipe-filter-ii-tests (Depends-on): Likewise.
52511         * modules/quotearg-simple-tests (Depends-on): Likewise.
52512         * modules/quotearg-tests (Depends-on): Likewise.
52513         * modules/rbtree-list-tests (Depends-on): Likewise.
52514         * modules/rbtree-oset-tests (Depends-on): Likewise.
52515         * modules/rbtreehash-list-tests (Depends-on): Likewise.
52516         * modules/spawn-pipe-tests (Depends-on): Likewise.
52517         * modules/system-quote-tests (Depends-on): Likewise.
52518         * modules/uniname/uniname-tests (Depends-on): Likewise.
52519         * modules/uninorm/nfc-tests (Depends-on): Likewise.
52520         * modules/uninorm/nfd-tests (Depends-on): Likewise.
52521         * modules/uninorm/nfkc-tests (Depends-on): Likewise.
52522         * modules/uninorm/nfkd-tests (Depends-on): Likewise.
52523         * modules/unistdio/u16-vsnprintf-tests (Depends-on): Likewise.
52524         * modules/unistdio/u16-vsprintf-tests (Depends-on): Likewise.
52525         * modules/unistdio/u32-vsnprintf-tests (Depends-on): Likewise.
52526         * modules/unistdio/u32-vsprintf-tests (Depends-on): Likewise.
52527         * modules/unistdio/u8-vsnprintf-tests (Depends-on): Likewise.
52528         * modules/unistdio/u8-vsprintf-tests (Depends-on): Likewise.
52529         * modules/unistdio/ulc-vsnprintf-tests (Depends-on): Likewise.
52530         * modules/unistdio/ulc-vsprintf-tests (Depends-on): Likewise.
52531         * modules/unlinkat-tests (Depends-on): Likewise.
52532         * modules/version-etc-tests (Depends-on): Likewise.
52533         * modules/xalloc-die-tests (Depends-on): Likewise.
52534         * modules/xmemdup0-tests (Depends-on): Likewise.
52535         * modules/xprintf-posix-tests (Depends-on): Likewise.
52536         * modules/xvasprintf-tests (Depends-on): Likewise.
52537         * tests/test-argmatch.c: Do not include progname.h.
52538         (main) Stop calling set_program_name.
52539         * tests/test-argp-version-etc.c: Likewise.
52540         * tests/test-argp.c: Likewise.
52541         * tests/test-argv-iter.c: Likewise.
52542         * tests/test-array_list.c: Likewise.
52543         * tests/test-array_oset.c: Likewise.
52544         * tests/test-avltree_list.c: Likewise.
52545         * tests/test-avltree_oset.c: Likewise.
52546         * tests/test-avltreehash_list.c: Likewise.
52547         * tests/test-carray_list.c: Likewise.
52548         * tests/test-copy-acl.c: Likewise.
52549         * tests/test-copy-file.c: Likewise.
52550         * tests/test-exclude.c: Likewise.
52551         * tests/test-fchownat.c: Likewise.
52552         * tests/test-fdopendir.c: Likewise.
52553         * tests/test-filenamecat.c: Likewise.
52554         * tests/test-fstatat.c: Likewise.
52555         * tests/test-fstrcmp.c: Likewise.
52556         * tests/test-linked_list.c: Likewise.
52557         * tests/test-linkedhash_list.c: Likewise.
52558         * tests/test-mkdirat.c: Likewise.
52559         * tests/test-nonblocking-pipe-main.c: Likewise.
52560         * tests/test-nonblocking-socket-main.c: Likewise.
52561         * tests/test-obstack-printf.c: Likewise.
52562         * tests/test-openat.c: Likewise.
52563         * tests/test-parse-datetime.c: Likewise.
52564         * tests/test-pipe-filter-gi1.c: Likewise.
52565         * tests/test-pipe-filter-gi2-main.c: Likewise.
52566         * tests/test-pipe-filter-ii1.c: Likewise.
52567         * tests/test-pipe-filter-ii2-main.c: Likewise.
52568         * tests/test-quotearg-simple.c: Likewise.
52569         * tests/test-quotearg.c: Likewise.
52570         * tests/test-rbtree_list.c: Likewise.
52571         * tests/test-rbtree_oset.c: Likewise.
52572         * tests/test-rbtreehash_list.c: Likewise.
52573         * tests/test-sameacls.c: Likewise.
52574         * tests/test-set-mode-acl.c: Likewise.
52575         * tests/test-spawn-pipe-main.c: Likewise.
52576         * tests/test-system-quote-main.c: Likewise.
52577         * tests/test-unlinkat.c: Likewise.
52578         * tests/test-version-etc.c: Likewise.
52579         * tests/test-xalloc-die.c: Likewise.
52580         * tests/test-xfprintf-posix.c: Likewise.
52581         * tests/test-xmemdup0.c: Likewise.
52582         * tests/test-xprintf-posix.c: Likewise.
52583         * tests/test-xvasprintf.c: Likewise.
52584         * tests/uniname/test-uninames.c: Likewise.
52585         * tests/uninorm/test-u32-nfc-big.c: Likewise.
52586         * tests/uninorm/test-u32-nfd-big.c: Likewise.
52587         * tests/uninorm/test-u32-nfkc-big.c: Likewise.
52588         * tests/uninorm/test-u32-nfkd-big.c: Likewise.
52589         * tests/unistdio/test-u16-vsnprintf1.c: Likewise.
52590         * tests/unistdio/test-u16-vsprintf1.c: Likewise.
52591         * tests/unistdio/test-u32-vsnprintf1.c: Likewise.
52592         * tests/unistdio/test-u32-vsprintf1.c: Likewise.
52593         * tests/unistdio/test-u8-vsnprintf1.c: Likewise.
52594         * tests/unistdio/test-u8-vsprintf1.c: Likewise.
52595         * tests/unistdio/test-ulc-vsnprintf1.c: Likewise.
52596         * tests/unistdio/test-ulc-vsprintf1.c: Likewise.
52597         * tests/test-c-stack.c: (program_name): Do not define.
52598         (main): Do not set program_name.
52599         * tests/test-closein.c: Likewise.
52600         * tests/test-xstrtol.c: Likewise.
52601         * tests/test-yesno.c: Likewise.
52603 2016-08-18  Pino Toscano  <ptoscano@redhat.com>
52605         Port modules to use getprogname explicitly, instead of requiring
52606         progname to be used (or program_name to be provided).
52607         * lib/argmatch.c: Do not include progname.h.
52608         [TEST] (program_name): Do not define.
52609         [TEST] (main): Call getprogname instead of using program_name.
52610         * lib/c-stack.c: Do not include progname.h.
52611         (program_name): Do not define.
52612         (die): Call getprogname instead of using program_name.
52613         * lib/chdir-long.c: Do not include progname.h.
52614         [TEST_CHDIR] (main): Do not set program_name.
52615         * lib/error.c [!_LIBC]: Include progname.h.
52616         [!_LIBC] (program_name): Define using getprogname.
52617         * lib/euidaccess.c: Do not include progname.h.
52618         [TEST] (main): Do not set program_name.
52619         * lib/git-merge-changelog.c: Include getprogname.h instead of
52620         progname.h.
52621         (usage): Call getprogname instead of using program_name.
52622         (main): Likewise.  Stop calling set_program_name.
52623         * lib/group-member.c: Do not include progname.h.
52624         [TEST] (main): Do not set program_name.
52625         * modules/argmatch (Depends-on): Add getprogname.
52626         * modules/c-stack (Depends-on): Likewise.
52627         * modules/error (Depends-on): Likewise.
52628         * modules/git-merge-changelog (Depends-on): Likewise.
52629         Also remove progname.
52631 2016-09-05  Pino Toscano  <ptoscano@redhat.com>
52633         * NEWS: Document the deprecation of the 'progname' module.
52635 2016-08-18  Pino Toscano  <ptoscano@redhat.com>
52637         getprogname: new module
52638         This provides a LGPL module for getting the name of the current
52639         program, using the same API found on *BSD systems.
52640         * lib/getprogname.c, lib/getprogname.h, m4/getprogname.m4:
52641         * modules/getprogname: New files.
52642         * MODULES.html.sh (Misc): Add getprogname.
52644 2016-09-02  Jim Meyering  <meyering@fb.com>
52646         manywarnings: add -fno-common
52647         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Add -fno-common
52648         to the list.  Quoting the manual, "Compiling with -fno-common is
52649         useful on targets for which it provides better performance, or if
52650         you wish to verify that the program will work on other systems that
52651         always treat uninitialized variable declarations this way [putting
52652         it in the data section]."  If diffutils had been using this sooner,
52653         it would have prevented this duplicate declaration issue:
52654         http://git.sv.gnu.org/cgit/diffutils.git/commit/?id=v3.4-10-gc2dc91f
52656 2016-08-31  Simon Josefsson  <simon@josefsson.org>
52658         parse-datetime: Fix typo.
52659         * lib/parse-datetime.y (parse_datetime2): Fix typo.
52661 2016-08-30  Paul Eggert  <eggert@cs.ucla.edu>
52663         intprops: tune INT_NEGATE_OVERFLOW for GCC 5 and 6
52664         * lib/intprops.h (INT_NEGATE_OVERFLOW): Tune for platforms like
52665         GCC 5 and 6 that have __builtin_sub_overflow but not
52666         __builtin_sub_overflow_p.  With the recent changes, these
52667         platforms are a tiny bit faster with the INT_NEGATE_RANGE_OVERFLOW
52668         implementation than with INT_SUBTRACT_OVERFLOW implementation,
52669         since the former needs just one runtime comparison whereas the
52670         latter needs two.
52672         strverscmp: sync with glibc
52673         Although this doesn't exactly synchronize with glibc
52674         byte-for-byte, it makes the code behave the same as glibc.
52675         * lib/strverscmp.c (S_I, S_F, S_Z): Now masks, not powers of 2.
52676         (ISDIGIT): Remove, as glibc is sticking with isdigit, and the
52677         difference shouldn't matter in practical use.  All uses changed
52678         back to isdigit.
52679         (__strverscmp, strverscmp): Use new glibc method for weak aliases.
52680         (next_state): Now unsigned char array; redo elements.
52681         (result_type): Now signed char array; redo elements.
52682         (__strverscmp): Fix glibc bug 9913 by using new states.
52683         * tests/test-strverscmp.c (main): Test glibc bug 9913.
52685 2016-08-29  Jim Meyering  <meyering@fb.com>
52687         xalloc-oversized.h: port __builtin_mul_overflow change to GCC 6.2.0
52688         * lib/xalloc-oversized.h: Port this change to GCC 6.2.0, too,
52689         similarly to how it was done to intprops.h.
52691 2016-08-29  Paul Eggert  <eggert@cs.ucla.edu>
52693         intprops.h: port recent changes to GCC 6.2.0
52694         * lib/intprops.h (__has_builtin): Move earlier.
52695         (_GL_HAS_BUILTIN_OVERFLOW): Rename from
52696         _GL_HAS_BUILTIN_OVERFLOW_WITH_NULL and don't worry about whether
52697         the last argument can be null.  All uses changed.
52698         (_GL_HAS_BUILTIN_OVERFLOW_P): Also test __has_builtin.
52699         (_GL_ADD_OVERFLOW, _GL_SUBTRACT_OVERFLOW, _GL_MULTIPLY_OVERFLOW):
52700         Don't try to use 3rd arg null, as this doesn't work on GCC 6.2.0
52701         and it's not clear which GCC versions it works for.
52702         (_GL_INT_OP_WRAPV): Use _GL_HAS_BUILTIN_OVERFLOW instead of
52703         its definiens.
52705         intprops.h: use __typeof__ with GCC 7
52706         * lib/intprops.h (_GL_ADD_OVERFLOW, _GL_SUBTRACT_OVERFLOW)
52707         (_GL_MULTIPLY_OVERFLOW): Use __typeof__ as in the GCC manual.
52708         This avoids computing the expression's value (which might overflow!).
52710 2016-08-29  Jim Meyering  <meyering@fb.com>
52712         intprops.h, xalloc-oversized.h: work with gcc 7
52713         In gcc 6, __builtin_add_overflow, __builtin_sub_overflow and
52714         __builtin_mul_overflow each accept a NULL pointer as the third
52715         argument.  However in gcc 7, that is no longer accepted.
52716         Instead, one must use the "_p"-suffixed names, with which, the
52717         third parameter is no longer a pointer.
52718         * lib/intprops.h (_GL_HAS_BUILTIN_OVERFLOW_WITH_NULL): Correct
52719         the definition: not true for gcc 7 and subsequent.
52720         (_GL_HAS_BUILTIN_OVERFLOW_P): Define.
52721         (_GL_ADD_OVERFLOW, _GL_SUBTRACT_OVERFLOW, _GL_MULTIPLY_OVERFLOW):
52722         Provide new definitions for gcc 7 and subsequent.
52723         * lib/xalloc-oversized.h (xalloc_oversized): Provide a definition
52724         that works with gcc-7.
52726         intprops.h: fix missing-backslash problems
52727         * lib/intprops.h (_GL_ADD_OVERFLOW): Add backslash.
52728         (_GL_SUBTRACT_OVERFLOW,_GL_MULTIPLY_OVERFLOW): Likewise.
52730 2016-08-24  Paul Eggert  <eggert@cs.ucla.edu>
52732         intprops: fix paren typo on old platforms
52733         Problem reported by John E. Malmberg in: https://bugs.gnu.org/24300#13
52734         * lib/intprops.h (_GL_INT_OP_WRAPV_LONGISH)
52735         [__GNUC__ < 5 && !__has_builtin (__builtin_add_overflow)
52736         && (__STDC_VERSION__ < 201112 || _GL__GENERIC_BOGUS)
52737         && !defined LLONG_MAX]:
52738         Remove stray paren.
52740         intprops: port to OpenVMS
52741         Problem reported by John E. Malmberg in: https://bugs.gnu.org/24300
52742         * doc/posix-headers/limits.texi: Document the problem.
52743         * lib/intprops.h (LLONG_MAX, LLONG_MIN) [__INT64_MAX]:
52744         Define if not already defined.
52746 2016-08-19  Assaf Gordon  <assafgordon@gmail.com>
52748         parse-datetime: improve debug implementation
52749         Follow-up to commit 12ad79069 ("add optional debug printing").
52750         Improve parse-datetime's debug implementation: remove macros,
52751         replace global debug flag variable with a function parameter,
52752         use nstrftime for formatting.
52753         See: https://lists.gnu.org/r/bug-gnulib/2016-08/msg00021.html
52754         * lib/parse-datetime.h: (parse_datetime_debug): Remove global extern.
52755         (parse_datetime2): New function, accepts 'flags' parameter, supporting
52756         debug flag. Existing interface 'parse_datetime' left unmodified.
52757         * lib/parse-datetime.c: (parse_datetime_debug): Remove global variable.
52758         (struct parser_control): add 'parse_datetime_debug' member variable.
52759         (parse_datetime): Call new function 'parse_datetime2' without debug.
52760         (parse_datetime2): Adapted from previous 'parse_datetime', initialize
52761         pc.parse_datetime_debug variable as needed.
52762         (to_year): Accept new flags parameter, instead of using global variable.
52763         (debug_print_current_time,debug_print_relative_time,debug_mktime_not_ok):
52764         use struct 'debug' variable instead of global variable.
52765         (DEBUG,DEBUG_PRINT_CURRENT_TIME,DEBUG_PRINT_RELATIVE_TIME,
52766         DEBUG_MKTIME_NOT_OK,PROGRESS,PROGRESS0): Remove macros. Call
52767         correspnding functions directly instead of using macros.
52768         * modules/parse-datetime: Add gnulib's strftime module.
52770 2016-08-19  Daniel Richard G.  <skunk@iSKUNK.ORG>
52772         c-strcase-tests: port to EBCDIC
52773         * tests/test-c-strncasecmp.c: Allow two c_strncasecmp calls
52774         which assume ASCII encoding semantics to run only in ASCII
52775         mode, as they fail in EBCDIC.
52777         sigpipe-tests: fix typo
52778         * tests/test-sigpipe.sh: C, not B.
52780 2016-08-18  Paul Eggert  <eggert@cs.ucla.edu>
52782         canonicalize-lgpl: fix errno after malloca fails
52783         This fixes a typo I recently introduced.  Suggested by Bruno Haible in:
52784         http://lists.gnu.org/r/bug-gnulib/2016-08/msg00039.html
52785         * lib/canonicalize-lgpl.c (__realpath):
52786         Don't assume malloca sets errno on failure.
52788 2016-08-17  Paul Eggert  <eggert@cs.ucla.edu>
52790         strtod: port errno handling to z/OS
52791         * lib/strtod.c (strtod): Save and restore errno more reliably.
52793 2016-08-17  Daniel Richard G.  <skunk@iSKUNK.ORG>
52795         strtod: port to z/OS
52796         * lib/strtod.c (strtod): Address a couple quirks in the z/OS
52797         implementation.
52799 2016-08-17  Paul Eggert  <eggert@cs.ucla.edu>
52801         strtod: port to z/OS
52802         * lib/strtod.c (strtod): Address a couple quirks in the z/OS
52803         implementation.
52805         regex, string: rename to avoid '__string'
52806         * lib/regex.h, lib/string.in.h: Do not use the identifier
52807         '__string', as it is effectively reserved by string.h on z/OS.
52809         c-strcase-tests, wcwidth-tests: depend on c-ctype
52810         * modules/c-strcase-tests, modules/wcwidth-tests (Depends-on):
52811         Add c-ctype.
52813 2016-08-17  Daniel Richard G.  <skunk@iSKUNK.ORG>
52815         thread: port to z/OS
52816         * lib/glthread/thread.c, lib/glthread/thread.h:
52817         Rudimentary gl_thread support for z/OS.
52819         maint: port tests to z/OS errno behavior
52820         * tests/test-nonblocking-reader.h:
52821         * tests/test-nonblocking-writer.h:
52822         Accommodate z/OS errno code preferences. (I believe this should
52823         still be within spec; IBM is good at following the letter if not
52824         the spirit of such things.)
52826         maint: preprocessor changes to support z/OS
52827         * lib/alloca.in.h, lib/fnmatch.c, lib/get-rusage-as.c:
52828         * lib/glob.c, lib/math.in.h, lib/ptsname_r.c:
52829         * tests/infinity.h, tests/nan.h, tests/test-canonicalize-lgpl.c:
52830         * tests/test-nonblocking-pipe.h:
52832         fclose, strstr-simple, wchar: port to z/OS
52833         * m4/fclose.m4, m4/strstr.m4, m4/wchar_h.m4:
52834         Changes to the Autoconf M4 code to support z/OS.  Note that
52835         fclose() is broken in a different way on z/OS than it is on other
52836         systems, thus the special-case in fclose.m4.
52838         iconv_open-utf-tests, iconv-tests: port to EBCDIC
52839         * tests/test-iconv-utf.c, tests/test-iconv.c:
52840         Added appropriately conditional #pragmas so that the test strings
52841         in test-iconv-utf.c are correctly interpreted in ASCII instead of
52842         EBCDIC (i.e. 'J' == 0x4A and not 0xD1). This issue could be
52843         addressed in a more portable way by simply rewriting all the ASCII
52844         literal characters as octal escapes, but then you would lose the
52845         partial readability that the strings have now. Also, iconv_open()
52846         on z/OS does not recognize "ISO-8859-1", but "ISO8859-1" works.
52848         c-strcase-tests, wcwidth-tests: port to EBCDIC
52849         * tests/test-c-strcasecmp.c: Include c-ctype.h.
52850         (main) [!C_CTYPE_ASCII]: Skip tests that assume ASCII.
52851         * tests/test-wcwidth.c: Likewise.
52853 2016-08-17  Paul Eggert  <eggert@cs.ucla.edu>
52855         stdbool: don't require _Bool for C++
52856         Problem reported by David Seifert in:
52857         http://lists.gnu.org/r/bug-gnulib/2016-06/msg00005.html
52858         * NEWS, doc/posix-headers/stdbool.texi (stdbool.h): Document this.
52859         * m4/stdbool.m4 (AC_CHECK_HEADER_STDBOOL): Make the check
52860         more-forgiving for C++, in that it requires only 'bool'.  Be a bit
52861         stricter about checking that bool and _Bool are compatible in C.
52863 2016-08-16  Paul Eggert  <eggert@cs.ucla.edu>
52865         getdelim: remove dependency on realloc-posix
52866         * lib/canonicalize-lgpl.c (alloc_failed)
52867         [!FUNC_REALPATH_WORKS || defined _LIBC]: New function,
52868         (__realpath) [!FUNC_REALPATH_WORKS || defined _LIBC]: Use it.
52869         Use __set_errno where needed, for consistency.
52870         * lib/getdelim.c (alloc_failed): New function.
52871         (getdelim): Use it.
52873 2016-08-09  Assaf Gordon  <assafgordon@gmail.com>
52875         parse-datetime: add optional debug printing
52876         Print parsing information, warnings, and errors to stderr.
52877         * lib/parse-datetime.h (parse_datetimte_debug): New global variable.
52878         * lib/parse-datetime.y:
52879         (DEBUG_*):  Macros calling debug functions if debugging is enabled.
52880         (PROGRESS*): Same as DEBUG, for progress reporting.
52881         (dbg_printf): Print message to stderr, with 'date' prefix.
52882         (struct parser_control): Add 'debug_*_seen' variables.
52883         (str_days): Converts day ordinal/number to string (e.g. 'last wed').
52884         (debug_print_current_time, debug_print_relateive_time): Prints the
52885         current/relative date/time value of parser_control.
52886         (YACC parser syntax): Print parsed parts with DEBUG_* macros.
52887         (to_year): Warn about 2-digit year parsing.
52888         (yylex):   Warn about unrecognized words.
52889         (get_effective_timezone): Returns current timezone in minutes.
52890         (debug_strf{time,date,datetime}): Convert 'struct tm' to string as
52891         clearly and unambigiously as possible.
52892         (debug_mktime_not_ok): Print detailed information about failed
52893         date/time values.
52894         (parse_datetime): Add DEBUG messages for failures, warnings. Add
52895         PROGRESS messages for status messages.
52896         * modules/parse-datetime: Add 'timegm', 'gettext-h' dependencies.
52898 2016-08-06  Jim Meyering  <meyering@fb.com>
52900         tests/init.sh: exclude dash with bad "local" semantics
52901         * tests/init.sh (gl_shell_test_script_): Add a function to
52902         eliminate a shell like "dash" (unlike bash, zsh) that has
52903         surprising/risky "local var='...'" semantics.  Inspired by
52904         the problem and discussion in https://bugs.gnu.org/24116#11.
52906 2016-08-02  Ján Tomko  <jtomko@redhat.com>
52908         maint.mk: expand the prohibit_doubled_word regex
52909         This check has a static list of words that are checked for
52910         repetitions.  Expand it before running the perl script to
52911         avoid using expensive captures.  This decreases the cost
52912         for libvirt from 1.66s to 0.66s.
52913         * top/maint.mk (prohibit_doubled_word_expanded_): Define.
52914         (sc_prohibit_doubled_word): Use it.
52916 2016-07-26  Ján Tomko  <jtomko@redhat.com>
52918         useless-if-before-free: skip non-matching lines early
52919         * build-aux/useless-if-before-free: First match each line with the
52920         simple/quick /\bif\b/ and reject if there is no match. This often
52921         saves the cost of the much more involved regular expression.
52922         For libvirt, this decreases the cost from 1.44s to 1.02s.
52924 2016-07-26  Ján Tomko  <jtomko@redhat.com>
52926         maint.mk: speed up sc_po_check
52927         sc_po_check would skip files based on their names, or on the
52928         existence of files with derived names. Rewrite it to use perl
52929         instead of shell to make the check faster.
52930         * top/maint.mk (perl_translatable_files_list_): Define.
52931         (sc_po_check): Use it.
52933 2016-07-30  Ján Tomko  <jtomko@redhat.com>
52935         maint.mk: speed up require_config_h_first
52936         Instead of spawning three processes per file,
52937         rewrite the check in perl and run it once for all the files.
52938         * top/maint.mk (perl_config_h_first_): Define.
52939         (sc_require_config_h_first): Use it in place of shell code.
52941 2016-07-26  Ján Tomko  <jtomko@redhat.com>
52943         maint.mk: speed up sc_po_check
52944         sc_po_check would skip files based on their names, or on the
52945         existence of files with derived names. Rewrite it to use perl
52946         instead of shell to make the check faster.
52947         * top/maint.mk (perl_translatable_files_list_): Define.
52948         (sc_po_check): Use it.
52950 2016-07-15  Paul Eggert  <eggert@cs.ucla.edu>
52952         obstack: pacify GCC 6 with -Wnull-dereference
52953         Problem reported by Assaf Gordon in:
52954         http://lists.gnu.org/r/bug-gnulib/2016-07/msg00028.html
52955         * lib/obstack.c, lib/obstack.h (obstack_alloc_failed_handler):
52956         Declare with __attribute_noreturn__.
52957         * lib/obstack.h (__attribute_noreturn__): New macro.
52959 2016-07-13  Eric Blake  <eblake@redhat.com>
52961         doc: mention glibc, OS X, Cygwin [S]SIZE_MAX buglet
52962         * doc/posix-headers/stdint.texi (stdint.h): Document the bugs.
52963         * doc/posix-headers/limits.texi (limits.h): Document the bugs.
52965 2016-07-13  Paul Eggert  <eggert@cs.ucla.edu>
52967         doc: mention glibc SSIZE_MAX buglet
52968         * doc/posix-headers/limits.texi (limits.h): Document the bug.
52970 2016-07-04  Martin Kletzander  <mkletzan@redhat.com>
52972         printf-posix: Fix mingw build
52973         Commit 54615b95ff238e235e806855efc46a9abad09f2e changed the regular
52974         expression for detecting C symbol prefixes but forgot to qoute square
52975         brackets in the command line arguments for grep.  That way when
52976         building with mingw the condition was false although it ought to be
52977         true instead.  In particular scenarios this led to the following
52978         compile error:
52980             Cannot export rpl_printf: symbol not found
52981             Cannot export rpl_scanf: symbol not found
52982             collect2: error: ld returned 1 exit status
52984         Fix this by properly quoting square brackets.
52986 2016-07-03  Paul Eggert  <eggert@cs.ucla.edu>
52988         mktime: call tzset as per POSIX
52989         Problem reported by Ludovic Courtès in:
52990         http://lists.gnu.org/r/bug-gnulib/2016-06/msg00068.html
52991         * lib/mktime.c (mktime) [!_LIBC && HAVE_TZSET]: Call tzset.
52992         * m4/mktime.m4 (gl_FUNC_MKTIME): Check for tzset.
52994 2016-06-26  Pádraig Brady  <P@draigBrady.com>
52996         fts: handle readdir() errors
52997         * lib/fts.c (fts_build): readdir(3) returns NULL when finished,
52998         but also upon error when it will also set errno.  Therefore
52999         flag the error case from readdir().  We treat the case where
53000         no items are read the same as if the dir can't be accessed,
53001         i.e. by setting fts_errno to FTS_DNR.
53003 2016-06-24  Paul Eggert  <eggert@cs.ucla.edu>
53005         intprops: port better to GCC 7
53006         GCC 7 __builtin_add_overflow supports a new usage form, where the
53007         last argument is a null pointer, and which merely returns 1 if an
53008         overflow would occur.  This is a constant expression if all
53009         arguments are constants, and should generate faster code when code
53010         needs to be generated.
53011         * lib/intprops.h (_GL_HAS_BUILTIN_OVERFLOW_WITH_NULL): New macro.
53012         (_GL_ADD_OVERFLOW, _GL_SUBTRACT_OVERFLOW, _GL_MULTIPLY_OVERFLOW):
53013         Use builtin operations if available.
53014         (INT_NEGATE_OVERFLOW): Prefer INT_SUBTRACT_OVERFLOW if builtin
53015         operations are available, as it's almost surely faster.
53017 2016-06-23  Paul Eggert  <eggert@cs.ucla.edu>
53019         intprops-test: port to GCC 6
53020         * tests/test-intprops.c: Ignore -Woverflow if any GCC version,
53021         since the bug is not fixed in GCC 6.1.
53023 2016-06-13  Paul Eggert  <eggert@cs.ucla.edu>
53025         xalloc-oversized: port to GCC 7; fewer warnings
53026         GCC 7 will have a better way to deal with integer overflow.
53027         Plus, fix a warnings problem reported by Tim Ruehsen in:
53028         http://lists.gnu.org/r/bug-gnulib/2016-06/msg00022.html
53029         * lib/xalloc-oversized.h (__xalloc_oversized): New macro.
53030         (xalloc_oversized): Use plain __builtin_mul_overflow if GCC 7 or later.
53031         For GCC 5, use __xalloc_oversized if both args are constants,
53032         or if pedantic.
53034 2016-06-08  Paul Eggert  <eggert@cs.ucla.edu>
53036         regex: port to Sun C
53037         Reported by Daiki Ueno.
53038         * lib/regcomp.c (regcomp, regerror): Use _Restrict_, not
53039         __restrict, in prototype.  This fixes a problem I introduced in
53040         the 2016-02-19 merge from glibc.
53042 2016-05-31  Paul Eggert  <eggert@cs.ucla.edu>
53044         stdbool: Restore __bool_true_false_are_defined check
53045         * m4/stdbool.m4 (AC_CHECK_HEADER_STDBOOL):
53046         __bool_true_false_are_defined is still defined, even with C++11.
53048 2016-05-31  David Seifert  <soap@gentoo.org>  (tiny change)
53050         stdbool: Port AC_CHECK_HEADER_STDBOOL to C++11
53051         * m4/stdbool.m4 (AC_CHECK_HEADER_STDBOOL): Port to C++11.
53053 2016-05-30  Paul Eggert  <eggert@cs.ucla.edu>
53055         Use GCC_LINT, not lint
53056         FreeBSD and Cygwin #define _Noreturn to empty if 'lint' is defined.
53057         Problem reported by Ken Brown in: http://bugs.gnu.org/23640
53058         * doc/posix-headers/stdnoreturn.texi (stdnoreturn.h):
53059         Document problem with lint and _Noreturn.
53060         * lib/diffseq.h (IF_LINT, IF_LINT2):
53061         * lib/fts.c (sccsid):
53062         * lib/getndelim2.c (IF_LINT):
53063         * lib/gl_anylinked_list2.h (gl_linked_iterator)
53064         (gl_linked_iterator_from_to):
53065         * lib/gl_anytree_list2.h (gl_tree_iterator)
53066         (gl_tree_iterator_from_to):
53067         * lib/gl_anytree_oset.h (gl_tree_iterator):
53068         * lib/gl_array_list.c (gl_array_iterator)
53069         (gl_array_iterator_from_to):
53070         * lib/gl_array_oset.c (gl_array_iterator):
53071         * lib/gl_carray_list.c (gl_carray_iterator)
53072         (gl_carray_iterator_from_to):
53073         * lib/idcache.c:
53074         * lib/inet_ntop.c (IF_LINT):
53075         * lib/regcomp.c (build_charclass_op, create_tree):
53076         * lib/regex_internal.c (re_acquire_state)
53077         (re_acquire_state_context):
53078         * lib/trigl.c (rcsid):
53079         * lib/trim.c (IF_LINT):
53080         * lib/vasnprintf.c (IF_LINT):
53081         * lib/verify.h (assume):
53082         Treat GCC_LINT like lint.
53084 2016-05-29  Bruno Haible  <bruno@clisp.org>
53086         secure_getenv: Port to many more platforms.
53087         * m4/secure_getenv.m4 (gl_PREREQ_SECURE_GETENV): Also check for get*id
53088         functions.
53089         * lib/secure_getenv.c (secure_getenv): Add alternate implementations
53090         for non-BSD Unix platforms and for native Windows.
53091         * doc/glibc-functions/secure_getenv.texi: Remove known issue.
53092         Prompted by a request from Nikos Mavrogiannopoulos.
53094 2016-05-27  Eric Blake  <eblake@redhat.com>
53096         canonicalize: Fix broken probe for realpath.
53097         * m4/canonicalize.m4 (gl_FUNC_REALPATH_WORKS): Fix regression
53098         in logic introduced in 54615b95.
53100 2016-05-26  Eric Blake  <eblake@redhat.com>
53102         unsetenv: relax to LGPLv2+
53103         * modules/unsetenv (License): Match setenv license.
53105 2016-05-20  Ludovic Courtès  <ludo@gnu.org>
53107         gendocs.sh: Set default TOP_NODE_UP_URL in HTML output.
53108         Suggested by Gavin Smith <gavinsmith0123@gmail.com>.
53109         Reported by myglc2 <myglc2@gmail.com> in <http://bugs.gnu.org/22651>.
53110         * build-aux/gendocs.sh (MANUAL_TITLE, PACKAGE, EMAIL)
53111         (commonarg, dirargs, dirs, infoarg, generate_ascii)
53112         (generate_html, generate_info, generate_tex, outdir)
53113         (source_extra, split, srcfile, texarg): Move above 'version'.
53114         (htmlarg): Likewise, and add "-c TOP_NODE_UP_URL=/manual".
53116 2016-05-17  Paul Eggert  <eggert@cs.ucla.edu>
53118         manywarnings: update for GCC 6.1
53119         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC):
53120         Add GCC 6.1 options that apply to C.
53121         * build-aux/gcc-warning.spec: Add GCC 6.1 options that
53122         do not apply to C, are obsolescent, etc.
53124 2016-05-12  Paul Eggert  <eggert@cs.ucla.edu>
53126         glob: size_t overflow checks
53127         * lib/glob.c (__has_builtin): New macro.
53128         (size_add_wrapv, glob_use_alloca): New static functions.
53129         (glob, glob_in_dir): Check for size_t overflow in several places,
53130         and fix some size_t checks that were not quite right.
53132         glob: don't assume INT_MAX < SIZE_MAX
53133         * lib/glob.c (glob): Prefer SIZE_MAX to ~((size_t) 0), as the
53134         latter is not portable to (probably theoretical) hosts where
53135         SIZE_MAX <= INT_MAX.
53137 2016-05-09  Bruno Haible  <bruno@clisp.org>
53139         Fix undefined behaviour in gettext.h.
53140         * lib/gettext.h (dcpgettext_expr, dcnpgettext_expr): Avoid accessing a
53141         pointer's value after the storage it points to has been freed.
53142         Reported by Michael Pyne in https://savannah.gnu.org/bugs/?47847.
53143         Spotted by Coverity.
53145 2016-05-08  Paul Eggert  <eggert@cs.ucla.edu>
53147         git-version-gen: avoid undefined shift
53148         Problem reported by Mosè Giordano in:
53149         http://lists.gnu.org/r/bug-gnulib/2016-05/msg00012.html
53150         * build-aux/git-version-gen: Avoid undefined behavior if invoked
53151         with --prefix or --fallback but without a later argument.  While
53152         we're at it, omit unnecessary quotes.
53154 2016-05-04  Paul Eggert  <eggert@cs.ucla.edu>
53156         glob: merge glibc changes into lib/glob.c
53157         * lib/glob.c (glob_in_dir): Sync with glibc/posix/glob.c,
53158         dated 2016-05-04 12:09:35 2016 +0200.  Here are the changes:
53159         2016-05-04 CVE-2016-1234: glob: Do not copy d_name field of
53160           struct dirent [BZ #19779]
53161         2016-04-29 glob: Simplify the interface for the GLOB_ALTDIRFUNC
53162           callback gl_readdir
53163         2015-10-20 Convert miscellaneous function definitions to prototype style
53164         2015-10-20 Convert 113 more function definitions to prototype style
53165           (files with assertions)
53166         2015-06-12 Fix getlogin_r namespace (bug 18527).
53167         2014-02-10 Use glibc_likely instead __builtin_expect.
53168         2013-10-20 When glob pattern contains a trailing slash match only
53169           directories. Fixes bug 10278.
53170         2013-09-04 glob: silence -Wattribute warnings
53171         2013-06-07 Avoid use of "register" as optimization hint.
53172         2012-09-25 Use size_t instead of int for internal variables in glob
53173           (bug 14621)
53174         2011-07-20 Check for overflows in expressions
53175         2011-05-28 Remove unused variable
53176         2011-05-22 Add a few more alloca size checks
53177         2010-03-27 Whitespace fixes
53178         2010-03-27 Fix one more issue with the glob patch
53179         2010-03-24 Fix glob with empty pattern
53180         2008-05-27 Remove useless more "if" tests before "free"
53181         * modules/glob (Depends-on): Add stdint.
53183 2016-05-01  Paul Eggert  <eggert@cs.ucla.edu>
53185         mktime: port to stricter signed overflow checking
53186         * lib/mktime.c: Omit 'pragma GCC optimize ("wrapv")'.
53187         (long_int): Require width for INT_MAX * 3 * (seconds per year),
53188         instead of merely for INT_MAX * 2.  In practice platforms that
53189         do the latter also do the former.
53190         (TIME_T_MIN, TIME_T_MAX, TIME_T_MIDPOINT, SHR): Remove.
53191         (shr): New static function, replacing SHR.  All uses changed.
53192         (mktime_min, mktime_max): New constants, replacing TIME_T_MIN
53193         and TIME_T_MAX.  All uses changed.
53194         (ydhms_diff, guess_time_tm, ranged_convert, __mktime_internal):
53195         Use long_int, not time_t.
53196         (long_int_avg): New static function, replacing time_t_avg.
53197         All uses changed.  Round toward positive infinity, as that
53198         generates slightly better code.
53199         (time_t_add_ok, time_t_int_add_ok): Remove.  All uses replaced
53200         by INT_ADD_WRAPV.
53201         (guess_time_tm): Accept time, not a pointer to it.  All uses changed.
53202         (convert_time): New static function.
53203         (ranged_convert): Use it
53204         (ranged_convert): Check for *T out of [mktime_min, mktime_max] range.
53205         Use simpler test for loop exit.
53206         (__mktime_internal): Store negative of guessed offset, to simplify
53207         overflow checking.  Remove no-longer-needed test for small time_t
53208         overflows.
53210         mktime: speed up DEBUG_MKTIME benchmarks
53211         Call tzset just once, at the start, rather than for every test
53212         case.  This lets us measure the CPU cost of mktime as opposed to
53213         that of tzset.  This is relevant when TZ is not set and glibc is
53214         being used.  This speeds up tests by a factor of 40 on my Fedora
53215         23 x86-64 platform.
53216         * lib/mktime.c (main) [DEBUG_MKTIME]: Call localtime at the start,
53217         to call tzset and as a sanity check.  Later on, use localtime_r
53218         instead of localtime.
53220         mktime: resurrect DEBUG_MKTIME testing
53221         * lib/mktime.c [DEBUG_MKTIME]: Do not include <config.h>.
53222         Include <string.h>, for strcmp.
53224         mktime: simplify DEBUG_MKTIME
53225         * lib/mktime.c (DEBUG_MKTIME): Define to 0 if not defined.
53226         Simplify later usage accordingly.
53228         Port mktime_internal offset to unsigned time_t
53229         This avoids some assumptions about wraparound arithmetic on
53230         signed integer overflow.
53231         * lib/mktime-internal.h (mktime_offset_t): New type.
53232         (mktime_internal): Use it in decl.
53233         * lib/mktime.c, lib/timegm.c (mktime_offset_t) [_LIBC]: New type.
53235         * lib/mktime.c (__mktime_internal, localtime_offset):
53236         * lib/timegm.c (timegm): Use it.
53237         * m4/mktime.m4 (gl_TIME_T_IS_SIGNED): New macro.
53238         (gl_FUNC_MKTIME): Require it.
53240 2016-04-27  Paul Eggert  <eggert@cs.ucla.edu>
53242         xstrtol: prohibit monstrosities like "1bB"
53243         Problem reported by Young Mo Kang in: http://bugs.gnu.org/23388
53244         * lib/xstrtol.c (__xstrtol): Allow trailing second suffixes like
53245         "B" only if the first suffix needs a base.
53246         * tests/test-xstrtol.sh: Test this.
53248 2016-04-21  Pádraig Brady  <P@draigBrady.com>
53250         xstrtod: reinstate setting of *result upon ERANGE
53251         * lib/xstrtod.c (XSTRTOD): The user may decide to use
53252         the returned limits upon ERANGE, so allow and document that.
53254 2016-04-20  Tino Calancha  <f92capac@gmail.com>  (tiny change)
53256         xstrtod: modify *result only if no errors
53257         * lib/xstrtod.c (XSTRTOD).
53259 2016-04-19  Paul Eggert  <eggert@cs.ucla.edu>
53261         btowc: document problems in C locale
53262         * doc/posix-functions/btowc.texi (btowc): Mention incompatibility
53263         with mbrtowc.  See: http://bugs.gnu.org/23269#32
53265 2016-04-13  Paul Eggert  <eggert@cs.ucla.edu>
53267         mktime: improve integer overflow checking
53268         * lib/mktime.c: Include stdbool.h, intprops.h, verify.h.
53269         (WRAPV): Remove; no longer needed.
53270         (verify): Remove.  Replace all uses with call to verify.h 'verify'.
53271         (TYPE_IS_INTEGER, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM):
53272         Remove.  Use intprops.h defns instead.
53273         (leapyear, isdst_differ, time_t_add_ok, time_t_int_ok):
53274         Use bool for Boolean, for clarity.
53275         (time_t_add_ok, time_t_int_add_ok): Use INT_ADD_WRAPV to
53276         detect integer overflow.
53277         * modules/mktime (Depends-on): Add intprops, stdbool, verify.
53279         intprops: check two's complement assumption
53280         Suggested by Eric Blake in:
53281         http://lists.gnu.org/r/bug-gnulib/2016-04/msg00016.html
53282         * lib/intprops.h: Include <verify.h>.  Verify that signed char,
53283         short, int, long, and (if available) long long are two's complement.
53284         * modules/intprops (Depends-on): Add 'verify'.
53286         intprops, mktime, strtol: assume two's complement
53287         These macros were not portable to every conforming C11 ones'
53288         complement platform.  It's not worth the hassle of porting to some
53289         platforms that use ones' complement or signed magnitude, as such
53290         platforms are almost purely theoretical nowadays and porting even
53291         to some of them makes the code harder to review for little
53292         practical benefit.  Problem reported by Florian Weimer in:
53293         https://sourceware.org/ml/libc-alpha/2016-04/msg00295.html
53294         * lib/intprops.h (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT)
53295         (TYPE_SIGNED_MAGNITUDE, _GL_INT_TWOS_COMPLEMENT):
53296         * lib/mktime.c (TYPE_TWOS_COMPLEMENT):
53297         * lib/strtol.c (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT)
53298         (TYPE_SIGNED_MAGNITUDE):
53299         Remove.  All uses rewritten to assume two's complement, which is
53300         all we can reasonably test nowadays anyway.
53301         * top/maint.mk (_intprops_names): Remove the removed macros.
53303 2016-04-11  Paul Eggert  <eggert@cs.ucla.edu>
53305         stdint: port to strict C11 left shift
53306         * lib/stdint.in.h (_STDINT_MIN, _STDINT_MAX):
53307         Pacify clang -Wshift-negative-value, which should be an issue only
53308         on clang setups where stdint.h does not conform to C11 or to C++11.
53309         Problem reported by Philipp Stephani in: http://bugs.gnu.org/23261
53311 2016-04-09  Paul Eggert  <eggert@penguin.cs.ucla.edu>
53313         mbrtowc: work around glibc bug#19932
53314         Fix mbrtowc so that it never returns -1 in the C locale,
53315         as this conflicts with a future version of POSIX
53316         http://austingroupbugs.net/view.php?id=663#c2738
53317         and causes problems with GNU grep: http://bugs.gnu.org/23234
53318         See glibc bug 19932:
53319         https://sourceware.org/bugzilla/show_bug.cgi?id=19932
53320         * doc/posix-functions/mbrlen.texi (mbrlen):
53321         * doc/posix-functions/mbrtowc.texi (mbrtowc):
53322         Document the glibc bug.
53323         * lib/mbrtowc.c [C_LOCALE_MAYBE_EILSEQ]:
53324         Include hard-locale.h, locale.h.
53325         (rpl_mbrtowc): Work around the C_LOCALE_MAYBE_EILSEQ bug,
53326         if the bug is possible.
53327         * m4/mbrtowc.m4 (gl_MBRTOWC_C_LOCALE): New macro.
53328         (gl_FUNC_MBRTOWC): Use it, and define C_LOCALE_MAYBE_EILSEQ as needed.
53329         * modules/hard-locale (License): Now LGPLv2+, for mbrtowc.
53330         * modules/mbrtowc (Depends-on): Add hard-locale.
53331         * modules/mbrtowc-tests (Files, TESTS): Add tests/test-mbrtowc5.sh.
53332         * tests/test-mbrtowc.c (main): Test for bug fix if arg is '5'.
53333         * tests/test-mbrtowc5.sh: New file.
53335 2016-04-03  Pedro Alves  <palves@redhat.com>
53337         stdint: detect good enough pre-C++11 stdint.h in C++ mode
53338         When gnulib is configured in C++ mode for a system with a working C99
53339         implementation of stdint.h that predates C++11, gnulib ends up
53340         substituting stdint.h anyway.  This works on most targets, but on e.g.,
53341         64-bit MinGW, it doesn't, as gnulib's substitute assumes LP64, while
53342         MinGW is LLP64.  Instead of trying to detect the right types, detect
53343         good-enough-pre-C++11 stdint.h and in such case define
53344         __STDC_CONSTANT_MACROS/__STDC_LIMIT_MACROS in config.h.
53345         * m4/stdint.m4 (gl_STDINT_H): Always define __STDC_CONSTANT_MACROS
53346         / __STDC_LIMIT_MACROS while checking whether the system stdint.h
53347         conforms to C99.  If it does, check whether it hides symbols
53348         behind the __STDC_{CONSTANT|LIMIT}_MACROS macros.  Then if it
53349         does, define those macros in config.h.
53351 2016-04-03  Paul Eggert  <eggert@cs.ucla.edu>
53353         argp: merge changes from glibc
53354         Among other things, this should fix problems found by a Coverity
53355         scan and reported by Andrei Borzenkov:
53356         http://lists.gnu.org/r/bug-gnulib/2016-01/msg00015.html
53357         http://lists.gnu.org/r/bug-gnulib/2016-01/msg00016.html
53358         * lib/argp-ba.c, lib/argp-fmtstream.c, lib/argp-fmtstream.h:
53359         * lib/argp-fs-xinl.c, lib/argp-help.c, lib/argp-namefrob.h:
53360         * lib/argp-parse.c, lib/argp-pv.c, lib/argp-pvh.c, lib/argp-xinl.c:
53361         * lib/argp.h:
53362         Merge changes from glibc.
53363         * tests/test-argp-2.sh: Adjust to match new behavior.
53365 2016-04-01  Paul Eggert  <eggert@cs.ucla.edu>
53367         stddef: support configuring with g++
53368         Problem reported by Ángel González in:
53369         http://lists.gnu.org/r/bug-gnulib/2016-04/msg00003.html
53370         * lib/stddef.in.h (_GL_STDDEF_ALIGNAS, max_align_t):
53371         Do not define if _GCC_MAX_ALIGN_T is defined.
53373 2016-03-25  Paul Eggert  <eggert@cs.ucla.edu>
53375         test-framework-sh: minor cleanups
53376         * tests/init.sh (testdir_prefix_): Output a trailing newline,
53377         since strictly speaking POSIX requires this.
53378         (setup_): Do not use the variable 'fail', as that makes the
53379         trace output harder to read ('fail' is typically used by
53380         tests to mean the test failed).  Treat // portably.
53381         Check that new directory is not merely a sibling of the tmp dir.
53382         Avoid unnecessary invocation of tr.
53384         test-framework-sh: revert port to NetBSD 7.0
53385         It was a false alarm; I misinterpreted Assaf Gordon's report.
53386         * tests/init.sh (testdir_prefix_, pfx_, template_length_):
53387         Restore.
53388         (test_dir_): Adjust to mktempd_ change.
53389         (mktempd_): Restore 2nd arg.  Use -t again.
53390         (base_template_, template_, nx_): Resurrect old code.
53392         Port better to Alpine Linux
53393         Its diff implementation does not support -c, but does support -U3.
53394         Problem reported by Assaf Gordon in: http://bugs.gnu.org/23107#13
53395         * tests/init.sh (diff_opt_): New var.
53396         (compare_): Prefer diff -U3 to diff -c to plain diff.
53398 2016-03-24  Paul Eggert  <eggert@cs.ucla.edu>
53400         test-framework-sh: port to NetBSD 7.0
53401         Problem reported by Assaf Gordon in: http://bugs.gnu.org/23107#13
53402         * tests/init.sh (testdir_prefix_, pfx_, template_length_):
53403         Remove.  All uses removed.
53404         (test_dir_): Adjust to mktempd_ change.
53405         (mktempd_): Omit 2nd arg.  Stop using -t, as it is not portable.
53406         (base_template_, template_, nx_): Simplify by hardcoding.
53408 2016-03-22  Paul Eggert  <eggert@cs.ucla.edu>
53410         gitlog-to-changelog: suppress ignored chatter
53411         * build-aux/gitlog-to-changelog: Do not warn about skipping
53412         an SHA if it would have been ignored anyway.
53414 2016-03-22  Geert Janssens  <janssens-geert@telenet.be>
53416         setlocale: add "sv" to Windows language table
53417         * lib/setlocale.c (language_table) [W32]: Add "sv".
53418         Reported in <https://savannah.gnu.org/bugs/?44588>.
53420 2016-03-21  Paul Eggert  <eggert@cs.ucla.edu>
53422         sys_select: port to new Cygwin
53423         Problem reported by Ken Brown in:
53424         https://lists.gnu.org/r/bug-gnulib/2016-03/msg00054.html
53425         * lib/sys_select.in.h [__CYGWIN__]: Avoid "unknown type name"
53426         diagnostics.
53428 2016-03-17  Jim Meyering  <meyering@fb.com>
53430         test-userspec.c: do not trigger gcc's new -Wmisleading-indentation
53431         * tests/test-userspec.c (main): Remove unnecessary braces and fix
53432         misleading indentation. Here is the diagnostic gcc-6.0-to-be issued:
53433           test-userspec.c:176:9: error: statement is indented as if it were \
53434             guarded by... [-Werror=misleading-indentation]
53435                    {
53436                    ^
53437           test-userspec.c:173:7: note: ...this 'if' clause, but it is not
53438                  if (!diag && !T[i].result)
53439                  ^~
53441 2016-03-15  Paul Eggert  <eggert@cs.ucla.edu>
53443         time_rz: port to clang -Wunused-const-variable
53444         * lib/time_rz.c (TZ): Remove.  All uses removed.
53446         std-gnu11: improve clang support
53447         * m4/std-gnu11.m4: Sync with autoconf, incorporating:
53448         2016-03-15 Also try clang
53449         2016-03-15 Port C11 and C++11 testing to clang
53451         select: port more to Intel 2016.1.150 compiler
53452         Problem reported by Balázs Hajgató in:
53453         http://lists.gnu.org/r/bug-gnulib/2016-03/msg00036.html
53454         * m4/select.m4 (gl_FUNC_SELECT): Require AC_C_RESTRICT.
53456 2016-03-14  Paul Eggert  <eggert@cs.ucla.edu>
53458         select: try to port to 2016.1.150 compiler
53459         Problem reported by Balázs Hajgató in:
53460         http://lists.gnu.org/r/bug-gnulib/2016-03/msg00026.html
53461         * lib/sys_select.in.h (select): Use 'restrict' on arguments where
53462         POSIX specifies 'restrict'.
53464 2016-03-13  Paul Eggert  <eggert@cs.ucla.edu>
53466         localename-tests: memory allocation fixes
53467         * tests/test-localename.c (test_locale_name)
53468         (test_locale_name_thread): Don't call freelocale on a locale
53469         that was the base of a successful newlocale, as that
53470         results in a double free.  Problem reported by Assaf Gordon.
53471         (test_locale_name_thread): Free saved names after use, to pacify
53472         gcc -fsanitize=address.
53474 2016-03-08  Paul Eggert  <eggert@cs.ucla.edu>
53476         intprops: make .h file license match module
53477         * lib/intprops.h: Change the license wording to match glibc format.
53478         This is what is in modules/intprops anyway.  See:
53479         https://sourceware.org/bugzilla/show_bug.cgi?id=19738#c8
53481 2016-03-08  Eric Blake  <eblake@redhat.com>
53483         acl: fix missing return on Cygwin
53484         * lib/set-permissions.c (set_acls) [HAVE_FACL && GETACL]: Don't
53485         fall off end of function. Fixes http://bugs.gnu.org/22949
53487 2016-03-05  Bruno Haible  <bruno@clisp.org>
53489         extern-inline: port to PGI CC
53490         * m4/extern-inline.m4 (gl_EXTERN_INLINE): For PGI CC, don't use the
53491         keyword 'inline'.
53492         Reported by Adam James Stewart in:
53493         http://lists.gnu.org/r/bug-gnulib/2016-03/msg00006.html
53495 2016-02-20  Paul Eggert  <eggert@cs.ucla.edu>
53497         signbit: port back to pre-C++11 GCC
53498         * lib/math.in.h (signbit): Do previous change only if
53499         __cplusplus < 201103.  See Jonathan Wakely in:
53500         https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/UY3VX3W7XEXYTUKHG5BALU4ACUD7ZLGE/
53502 2016-02-19  Kamil Dudka  <kdudka@redhat.com>
53504         mountlist: recognize autofs-mounted remote file systems, too
53505         Originally reported at: https://bugzilla.redhat.com/1309247
53506         * lib/mountlist.c (ME_REMOTE): Return true if a file system is named
53507         "-hosts" because it is used by autofs to mount remote file systems.
53509 2016-02-19  Paul Eggert  <eggert@cs.ucla.edu>
53511         signbit: port to C++ with GCC 6
53512         * lib/math.in.h (signbit) [__cplusplus]:
53513         Do not replace with GCC builtin.  Reported by Orion Poplawski in:
53514         http://lists.gnu.org/r/bug-gnulib/2016-02/msg00005.html
53516         * lib/regex_internal.h (IDX_MAX) [_REGEX_LARGE_OFFSETS]: Now SSIZE_MAX.
53518         regex: make it closer to libc
53519         Make Idx a signed type, rather than possibly unsigned.
53520         The unsignedness was not really buying us anything, since the code
53521         overflows for other reasons before getting to PTRDIFF_MAX.  Making
53522         it signed allows us to use -1 and -2 with abandon, like libc does,
53523         thus lessening the number of differences between gnulib and libc.
53524         Also, it should help avoid gratuitous warnings like the one
53525         reported by Nelson H. F. Beebe in: http://bugs.gnu.org/22702
53526         * lib/regex.h (__re_idx_t): Remove.  All uses changed to regoff_t.
53529         regex: merge patches from libc
53531         2015-10-21  Joseph Myers  <joseph@codesourcery.com>
53532         2015-10-20  Joseph Myers  <joseph@codesourcery.com>
53533         Convert miscellaneous function definitions to prototype style.
53534         * lib/regcomp.c (re_compile_pattern, re_set_syntax)
53535         (re_compile_fastmap, regcomp, regerror, regfree, re_comp):
53536         * lib/regexec.c (regexec, re_match, re_search, re_match_2, re_search_2)
53537         (re_search_2_stub, re_search_stub, re_set_registers, re_exec)
53538         (re_search_internal):
53539         Convert to prototype-style function definition.
53540         Use internal_function for internal functions.
53542 2016-02-10  Paul Eggert  <eggert@cs.ucla.edu>
53544         stdalign: port to older HP and IBM cc
53545         * lib/stdalign.in.h (_Alignas): Port better to older HP and IBM
53546         C compilers, by checking their version numbers.  These version
53547         numbers appear in MariaDB and in Qt code that dates way back and
53548         that conditiionally uses the 'aligned' attribute.
53550 2016-02-09  Paul Eggert  <eggert@cs.ucla.edu>
53552         stdalign: port to clang 3.7.0
53553         Problem reported by Herbert J. Skuhra in:
53554         http://lists.gnu.org/r/emacs-devel/2016-02/msg00476.html
53555         * lib/stdalign.in.h (alignas): Fix typo that prevented 'alignas'
53556         from being defined on clang 3.7.0, which has a buggy stdalign.h.  See:
53557         https://llvm.org/bugs/show_bug.cgi?id=26547
53559 2016-02-08  Paul Eggert  <eggert@cs.ucla.edu>
53561         readdir_r: now obsolescent
53562         * doc/posix-functions/readdir_r.texi (readdir_r): Now obsolescent.
53563         * lib/mountlist.c (read_file_system_list): Add a FIXME.
53565 2016-02-06  Paul Eggert  <eggert@cs.ucla.edu>
53567         misc: port better to gcc -fsanitize=address
53568         Without these patches, ./configure CFLAGS='-fsanitize=address'
53569         would compute incorrect values.  This patch fixes some (but not all)
53570         test failures with recent glibc, with this configuration.
53571         * m4/acl.m4 (gl_ACL_GET_FILE):
53572         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF):
53573         * m4/canonicalize.m4 (gl_FUNC_REALPATH_WORKS):
53574         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO):
53575         * m4/duplocale.m4 (gl_FUNC_DUPLOCALE):
53576         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL):
53577         * m4/getdelim.m4 (gl_FUNC_GETDELIM):
53578         * m4/getgroups.m4 (gl_FUNC_GETGROUPS):
53579         * m4/getline.m4 (gl_FUNC_GETLINE):
53580         * m4/malloc.m4 (_AC_FUNC_MALLOC_IF):
53581         * m4/realloc.m4 (_AC_FUNC_REALLOC_IF):
53582         * m4/regex.m4 (gl_REGEX):
53583         * m4/strndup.m4 (gl_FUNC_STRNDUP):
53584         * tests/test-calloc-gnu.c (main):
53585         * tests/test-duplocale.c (main):
53586         * tests/test-getgroups.c (main):
53587         * tests/test-getline.c (main):
53588         * tests/test-inttostr.c (main):
53589         * tests/test-localename.c (test_locale_name)
53590         (test_locale_name_thread, test_locale_name_environ)
53591         (test_locale_name_default):
53592         * tests/test-regex.c (main):
53593         * tests/test-setlocale1.c (main):
53594         * tests/test-stat.h (test_stat_func):
53595         Free heap-allocated storage before exiting.
53596         * m4/asm-underscore.m4 (gl_ASM_SYMBOL_PREFIX):
53597         Don't match *_foo symbols inserted by AddressSanitizer.
53598         * tests/test-regex.c, tests/test-stat.c: Include stdlib.h, for 'free'.
53600 2016-02-02  Jim Meyering  <meyering@fb.com>
53602         verify-tests: also remove stray test-verify.Tpo
53603         * modules/verify-tests (Makefile.am): Arrange for "make clean"
53604         to remove the test-verify.Tpo file that is left behind by
53605         the automake-generated rule upon compilation failure.
53606         Otherwise, that .Tpo file would cause a failed "make distcheck"
53607         at least for grep.
53609 2016-02-02  Paul Eggert  <eggert@cs.ucla.edu>
53611         std-gnu11: new module
53612         This makes it easier for applications to prefer C11 and C++11
53613         to older variants, when compiling C and C++ code.
53614         Unlike most m4/*.m4 files, m4/std-gnu11.m4 is GPLed, as it copies
53615         a nontrivial chunk of GPLed Autoconf source code.
53616         * COPYING: Mention the m4/*.m4 copyright situation.
53617         * MODULES.html.sh (std-gnu11): New module.
53618         * m4/std-gnu11.m4, modules/std-gnu11: New files.
53620 2016-01-25  Paul Eggert  <eggert@cs.ucla.edu>
53622         get-permissions, strftime: fix grammar in comments
53623         * lib/get-permissions.c, lib/strftime.c: Merge into the comments
53624         some grammar fixes Alan Mackenzie made to GNU Emacs.
53626 2016-01-25  Daiki Ueno  <ueno@gnu.org>
53628         gettext: mark as obsolete
53629         Suggested by Paul Eggert in:
53630         https://lists.gnu.org/r/bug-gnulib/2016-01/msg00101.html
53631         * modules/gettext (Status): Mark as obsolete.
53632         (Notice): Suggest to use 'gettext-h' instead.
53633         * modules/gettext-h (Description): Suggest GNU gettext, instead of
53634         the 'gettext' module.
53636 2016-01-24  Paul Eggert  <eggert@cs.ucla.edu>
53638         gnulib-tool: don't give up on ln -s so easily
53639         * gnulib-tool (func_ln_s): Don't give up on a later ln -s merely
53640         because an earlier one failed.  The targets could be on different
53641         file systems.  Problem reported by KO Myung-Hun in:
53642         http://lists.gnu.org/r/bug-gnulib/2016-01/msg00081.html
53644         closedir: fix OS/2-related typos
53645         Problem reported by KO Myung-Hun in:
53646         http://lists.gnu.org/r/bug-gnulib/2016-01/msg00107.html
53647         * m4/closedir.m4 (gl_FUNC_CLOSEDIR): Fix a couple of typos
53648         in the last couple of changes.
53650 2016-01-24  KO Myung-Hun  <komh78@gmail.com>
53652         openat_proc_name: fix that last '/' is overwritten on OS/2 kLIBC
53653         * lib/openat-proc.c (openat_proc_name): Increase dirlen by 1 after
53654         copying a directory.
53656 2016-01-24  Paul Eggert  <eggert@cs.ucla.edu>
53658         regex: treat [x] as x if x is a unibyte encoding error
53659         Problem reported by Aharon Robbins in:
53660         http://lists.gnu.org/r/bug-gnulib/2016-01/msg00091.html
53661         * lib/regcomp.c (parse_byte) [!_LIBC && RE_ENABLE_I18N]: New function.
53662         (build_range_exp) [!_LIBC && RE_ENABLE_I18N]: Use it.
53664         closedir, dirfd, opendir: port to OpenSolaris 5.10
53665         * m4/closedir.m4 (gl_FUNC_CLOSEDIR):
53666         * m4/dirfd.m4 (gl_FUNC_DIRFD):
53667         * m4/opendir.m4 (gl_FUNC_OPENDIR):
53668         Don't use ${word##pat} substitution, as it doesn't work in
53669         OpenSolaris 5.10 /bin/sh.  Problem reported by Assaf Gordon in:
53670         http://bugs.gnu.org/22443#11
53672 2016-01-23  Paul Eggert  <eggert@cs.ucla.edu>
53674         bootstrap: use American spelling
53675         * build-aux/bootstrap: Honor American spelling.
53677 2016-01-22  Karl Berry  <karl@freefriends.org>
53679         * doc/posix-functions/localtime.texi,
53680         * doc/posix-functions/localtime_r.texi: @item needed for @itemize text.
53682 2016-01-21  Bruno Haible  <bruno@clisp.org>
53684         hash-pjw-bare: fix comment
53685         * lib/hash-pjw-bare.h (hash_pjw_bare): Fix comment.
53687         wcwidth: Replace also on OpenBSD 5.8
53688         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Check the value of wcwidth(0xFF1A).
53689         * doc/posix-functions/wcwidth.texi: Update.
53691 2016-01-20  Pádraig Brady  <P@draigBrady.com>
53693         gnu-web-doc-update: fix addition of new files
53694         If there were already added (emnpty) dirs,
53695         then cvs aborts the add with the message:
53696           cvs [add aborted]: there is a version in <./dirname> already
53697         * build-aux/gnu-web-doc-update: Add directories separately
53698         to the addition of files, to avoid the above issue
53699         impacting the addition of files.
53701 2016-01-19  Daiki Ueno  <ueno@gnu.org>
53703         utimens-tests: avoid pulling gettext .m4 files
53704         Although this is not the right fix to the original problem:
53705         http://lists.gnu.org/r/bug-gnulib/2013-01/msg00086.html
53706         it makes it possible again for consumer projects to use arbitrary
53707         version of gettext, through the steps described at:
53708         http://www.gnu.org/software/gnulib/manual/html_node/gettextize-and-autopoint.html
53709         See here for details:
53710         https://lists.gnu.org/r/bug-gnulib/2016-01/msg00079.html
53711         * modules/futimens-tests (Depends-on): Add 'gettext-h' in place of
53712         'gettext'.
53713         * modules/utimens-tests (Depends-on): Add 'gettext-h' in place of
53714         'gettext'.
53716 2016-01-18  Paul Eggert  <eggert@cs.ucla.edu>
53718         regex: pacify static checkers
53719         Problem and draft fix reported by Aharon Robbins in:
53720         http://lists.gnu.org/r/bug-gnulib/2016-01/msg00082.html
53721         * lib/regcomp.c (build_charclass_op, create_tree) [lint]:
53722         Clear memory to pacify static checkers.
53724         regex: fix [ diagnostic
53725         Problem and fix reported by Aharon Robbins in:
53726         http://lists.gnu.org/r/bug-gnulib/2016-01/msg00082.html
53727         * lib/regcomp.c (REG_EBRACK_IDX): Fix misleading diagnostic about [.
53729         regex: fix memory leaks
53730         Problem and draft fix reported by Aharon Robbins in:
53731         http://lists.gnu.org/r/bug-gnulib/2016-01/msg00082.html
53732         * lib/regcomp.c (build_range_exp, build_charclass_op)
53733         * lib/regex_internal.c (re_dfa_add_node):
53734         Fix memory leak on failure.
53736 2016-01-18  Pádraig Brady  <P@draigBrady.com>
53738         fts: don't unconditionally use leaf optimization for NFS
53739         NFS st_nlink are not accurate on all implementations,
53740         leading to aborts() if that assumption is made.
53741         See <https://bugzilla.redhat.com/1299169>
53742         * lib/fts.c (leaf_optimization_applies): Remove NFS from
53743         the white list, and document the issue.
53745 2016-01-15  Paul Eggert  <eggert@cs.ucla.edu>
53746             KO Myung-Hun  <komh@chollian.net>
53748         gnulib-tool: don't assume ln -s works
53749         * gnulib-tool (func_ln_s): New function.
53750         (func_ln): Use it.
53752 2016-01-15  KO Myung-Hun  <komh@chollian.net>
53754         utimes: detect utimes() correctly on OS/2 kLIBC
53755         utimes() of OS/2 kLIBC has some limitations.
53756         1. OS/2 itself supports a file date since 1980 year in local time.
53757         2. OS/2 itself supports only even seconds for a file time.
53758         3. utimes() of OS/2 kLIBC does not work on an opened file.
53759         * m4/utimes.m4: Detect utimes() correctly on OS/2 kLIBC.
53760         * doc/posix-functions/utimes.texi: Document the above limitations of
53761         utimes() on OS/2 kLIBC.
53763 2016-01-15  Paul Eggert  <eggert@cs.ucla.edu>
53764             KO Myung-Hun  <komh@chollian.net>
53766         openat_proc_name: port to OS/2 kLIBC
53767         OS/2 kLIBC provides a function to retrive a path from a fd. Use it
53768         instead of /proc/self/fd.
53769         * lib/openat-proc.c (openat_proc_name):
53770         Don't assume file name length is less than INT_MAX.
53771         Port to OS/2 kLIBC with __libc_Back_ioFHToPath().
53773 2016-01-14  KO Myung-Hun  <komh@chollian.net>
53775         stdint: check _INTPTR_T_DECLARED for intptr_t etc.
53776         OS/2 kLIBC's stdint.h defines _INTPTR_T_DECLARED and needs its own
53777         definitions of intptr_t and uintptr_t (which use int and unsigned)
53778         to avoid clashes with declarations of system functions like sbrk.
53779         * lib/stdint.in.h (intptr_t, uintptr_t): Check
53780         _INTPTR_T_DECLARED before defining them.
53782         opendir, closedir, dirfd, fdopendir: port to OS/2 kLIBC
53783         * lib/closedir.c (closedir): Unregister fd if closedir() succeeds.
53784         * lib/dirent.in.h (_gl_register_dirp_fd, _gl_unregister_dirp_fd):
53785         Declare on kLIBC.
53786         * lib/dirfd.c (struct dirp_fd_list): New. Structures to keep track of
53787         fd associated with dirp.
53788         (_gl_register_dirp_fd): New. Register fd associated with dirp to
53789         dirp_fd_list.
53790         (_gl_unregister_dirp_fd): New. Unregister fd with closing it.
53791         (dirfd): Implemented for kLIBC.
53792         * lib/fdopendir.c (fdopendir): Implemented for kLIBC.
53793         * lib/opendir.c (opendir): New. Register fd and dirp pair if open()
53794         succeeds.
53795         * m4/closedir.m4 (gl_FUNC_CLOSEDIR): Replace if OS/2.
53796         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
53797         (REPLACE_DIRFD): Define to 1 if replaced.
53798         * m4/opendir.m4 (gl_FUNC_OPENDIR): Likewise.
53799         * modules/closedir (Depends-on): Add dirfd.
53800         * modules/dirfd (Depends-on): Add 'test $REPLACE_DIRFD = 1' to errno
53801         condition.
53802         (configure.ac): Add dirfd to LIBOBJS if $REPLACE_DIRFD = 1 as well.
53803         * modules/opendir (Depends-on): Add dirfd.
53805         dup, dup2, fcntl: support a directory fd on OS/2 kLIBC
53806         On OS/2 kLIBC, dup(), dup2() and fcntl() do not work on a directory fd.
53807         * lib/dup.c (dup_nothrow): New.
53808         * lib/dup2.c (klibc_dup2dirfd): New. dup2() for a directory fd.
53809         (klibc_dup2): New.
53810         * lib/fcntl.c (klibc_fcntl): New.
53811         * m4/dup.m4 (gl_FUNC_DUP): Check if dup() works on a directory fd.
53812         * m4/dup2.m4 (gl_FUNC_DUP2): Check if dup2() works on a directory fd.
53813         * m4/fcntl.m4 (gl_FUNC_FCNTL): Check if F_DUPFD works on a directory
53814         fd.
53816         pipe_filter_ii_execute: port to OS/2 kLIBC
53817         Pipes on kLIBC do not support O_NONBLOCK like Win32.
53818         * lib/pipe-filter-ii.c (start_wrapper, _beginthreadex, CloseHandle,
53819         WaiForSingleObject, WaitForMultipleObjects): New on OS/2 kLIBC.
53820         Reuse Win32 code on OS/2 kLIBC.
53821         * lib/spawn-pipe.c: Reuse Win32 code on OS/2 kLIBC.
53822         * lib/w32spawn.h: Do not include windows.h on OS/2 kLIBC.
53824         wchar: fix "conflicting types" error for __wcwidth on OS/2 kLIBC
53825         On OS/2 kLIBC, wcwidth is a macro that expands to the name of a
53826         static inline function.  The implementation of wcwidth in wcwidth.c
53827         causes a "conflicting types" error.
53828         * lib/wchar.in.h: Undefine wcwidth on OS/2 kLIBC.
53830         w32spawn: clear SHELL_SPECIAL_CHARS and SHELL_SPACE_CHAR on OS/2 kLIBC
53831         spawn() on OS/2 kLIBC is not silly like one on Windows
53832         * libc/w32spawn.h (SHELL_SPECIAL_CHARS, SHELL_SPACE_CHAR): Set both to
53833         empty string on OS/2 kLIBC.
53835         pipe-filter-aux: undefine HAVE_SELECT on KLIBC
53836         On OS/2 kLIBC, select() works only on sockets.
53837         * lib/pipe-filter-aux.h (HAVE_SELECT): Undefine on OS/2 kLIBC.
53839         binary-io: don't put fd in binary mode if it is a console on EMX
53840         * lib/binary-io.h (SET_BINARY): Don't put fd in binary mode if it is
53841         a console on EMX.
53843 2016-01-15  Pádraig Brady  <P@draigBrady.com>
53845         doc: mention unfixed issues with unsupported localtime() values
53846         * doc/posix-functions/localtime.texi: Mention that FreeBSD 10
53847         returns nonsense for localtime(2^56).
53848         * doc/posix-functions/localtime_r.texi: Likewise.
53850 2016-01-14  Pádraig Brady  <P@draigBrady.com>
53852         doc: mention setlocale() issues on OpenBSD
53853         * doc/posix-functions/setlocale.texi: Mention setlocale(LC_ALL,"")
53854         never fails, and the need to check categories individually.
53856 2016-01-14  Pádraig Brady  <P@draigBrady.com>
53858         sig2str: list all signals on FreeBSD >= 7
53859         FreeBSD >= 7 is contravening POSIX by not defining NSIG
53860         to the maximal statically defined signal value.
53861         It does define _SIG_MAXSIG though, so base SIGNUM_BOUND on that.
53862         * lib/sig2str.h (SIGNUM_BOUND): Define to (_SIG_MAXSIG - 2)
53863         where available, even when NSIG is defined.
53865 2016-01-13  Paul Eggert  <eggert@cs.ucla.edu>
53867         acl-permissions: port to USE_ACL==0 platforms
53868         I ran into this problem when building bleeding-edge GNU Emacs
53869         with gcc -fsanitize=address on Fedora 23.  On this platform
53870         the ACL library does not pass the 'configure' test and Emacs
53871         then does not build due in part to what appear to be typos in the
53872         ACL part of Gnulib.
53873         * lib/acl-internal.c (free_permission_context):
53874         * lib/acl-internal.h (struct permission_context):
53875         Test whether USE_ACL is nonzero, not whether it is defined.
53877 2016-01-12  Martin Sebor  <msebor@redhat.com>
53879         mktime: rename macro to avoid glibc clash
53880         * lib/mktime.c [DEBUG] (DEBUG): Rename to DEBUG_MKTIME.  See:
53881         https://sourceware.org/ml/libc-alpha/2016-01/msg00267.html
53883 2016-01-12  Paul Eggert  <eggert@cs.ucla.edu>
53885         Port "$@" to OpenIndiana ksh93
53886         In http://lists.gnu.org/r/bug-autoconf/2015-12/msg00000.html
53887         Pavel Raiskup reports that ${1+"$@"} runs afoul of a bug in /bin/sh
53888         (derived from ksh 93t+ 2010-03-05).  ${1+"$@"} works around an ancient
53889         bug long-dead shells, so remove the workaround.
53890         * build-aux/announce-gen, build-aux/do-release-commit-and-tag:
53891         * build-aux/gitlog-to-changelog, build-aux/gnu-web-doc-update:
53892         * build-aux/prefix-gnulib-mk, build-aux/update-copyright:
53893         * build-aux/useless-if-before-free, tests/test-update-copyright.sh:
53894         Use "$@" instead of ${1+"$@"}.
53896         Port Universal Time settings to strict POSIX
53897         * build-aux/announce-gen, build-aux/bootstrap:
53898         * build-aux/do-release-commit-and-tag, build-aux/git-version-gen:
53899         * build-aux/gitlog-to-changelog, build-aux/gnu-web-doc-update:
53900         * build-aux/gnupload, build-aux/mkinstalldirs:
53901         * build-aux/move-if-change, build-aux/prefix-gnulib-mk:
53902         * build-aux/update-copyright, build-aux/useless-if-before-free:
53903         * build-aux/vc-list-files, tests/test-strftime.c:
53904         Use TZ="UTC0", not TZ="UTC".  Either works on GNU platforms,
53905         but POSIX says the behavior of TZ="UTC" is undefined.
53907 2016-01-02  Paul Eggert  <eggert@cs.ucla.edu>
53909         msvc-inval: fix problem with unset shell var
53910         Problem reported by Karl Berry in:
53911         http://lists.gnu.org/r/bug-gnulib/2016-01/msg00004.html
53912         * modules/msvc-inval (Depends-on):
53913         AC_REQUIRE gl_MSVC_INVAL instead of merely calling it.
53914         * modules/msvc-nothrow (Depends-on): Likewise for gl_MSVC_NOTHROW.
53916 2016-01-01  Pádraig Brady  <P@draigBrady.com>
53918         tests: for compare_(), use cmp -s where available
53919         * tests/init.sh (compare_): Only fall back to cmp without
53920         the POSIX defined -s option, where this is not available.
53922 2016-01-01  Paul Eggert  <eggert@cs.ucla.edu>
53924         version-etc: new year
53925         * build-aux/gendocs.sh (version):
53926         * doc/gendocs_template:
53927         * doc/gendocs_template_min:
53928         * doc/gnulib.texi:
53929         * lib/version-etc.c (COPYRIGHT_YEAR):
53930         Update copyright dates by hand in templates and the like.
53931         * all files: Run 'make update-copyright'.
53933 2015-12-31  Paul Eggert  <eggert@cs.ucla.edu>
53935         human: fix output buffer overrun by 1
53936         * lib/human.c (human_readable): Fix off-by-one typo in buffer
53937         calculation that could lead to a one-byte buffer overrun.
53939 2015-12-28  Daiki Ueno  <ueno@gnu.org>
53941         maint: fix operator precedence in mbrtowc test
53942         This is a fix for test breakage introduced by commit 45228d96; the
53943         equality expression must be parenthesized when negated with '!',
53944         otherwise we always get:
53946           test-mbrtowc.c:49: assertion 'ret == (size_t)(-2)' failed
53948         * m4/mbrtowc.m4 (gl_MBRTOWC_EMPTY_INPUT): Negate the entire expression.
53949         * m4/mbrlen.m4 (gl_MBRLEN_EMPTY_INPUT): Likewise.
53951 2015-12-23  James Youngman  <jay@gnu.org>
53953         regexprops-generic: update from regex.h
53954         * doc/regexprops-generic.texi: update by running the regexprops binary
53955         from findutils (the command line is 'regexprops "Regular Expressions"
53956         generic').  The recent (ish) change (5a5a9388) to regex.h aligning
53957         gnulib with GNU grep had made this document out-of-date.
53959 2015-12-23  Pádraig Brady  <P@draigBrady.com>
53961         strftime-tests: avoid false failure on OS X
53962         * tests/test-strftime.c (struct localtime_rz_test): Add an
53963         ahistorical member which is used to warn rather than fail
53964         when tm_isdst isn't set for such entries.  This is the case for
53965         "1970-01-01 13:00:00 +1300 (NZDT)" on Darwin 13/14 at least.
53967 2015-12-20  Kamil Dudka  <kdudka@redhat.com>
53969         fts: ensure leaf optimization is used for NFS
53970         NFS provides usable dirent.d_type but not necessarily for all entries
53971         of large directories.  See <https://bugzilla.redhat.com/1252549>
53972         * lib/fts.c (leaf_optimization_applies): Append NFS on the white list.
53974 2015-12-20  Pádraig Brady  <P@draigBrady.com>
53976         fts: enable leaf optimization for XFS
53977         XFS provides usable dirent.d_type only for DT_DIR,
53978         but the noleaf optimization still applies.
53979         * lib/fts.c (leaf_optimization_applies): Add XFS to the white list.
53981 2015-12-17  Paul Eggert  <eggert@cs.ucla.edu>
53983         intprops: comment fix
53984         * lib/intprops.h: Fix comment.  Reported by Pádraig Brady in:
53985         http://lists.gnu.org/r/bug-gnulib/2015-12/msg00013.html
53987         intprops-test: work around GCC bug 68971
53988         Problem reported by Pádraig Brady in:
53989         http://lists.gnu.org/r/bug-gnulib/2015-12/msg00011.html
53990         * tests/test-intprops.c: Ignore -Woverflow in GCC 6 and earlier.
53991         (main): Add a case that better tests 64-bit long in this area.
53993 2015-12-09  Pavel Raiskup  <praiskup@redhat.com>
53995         gnulib-tool: allow multiple --local-dir usage
53996         * gnulib-tool: Use --local-dir to construct compound
53997         $local_gnulib_path path instead of $local_gnulib_dir.  Determine
53998         PATH_SEPARATOR early.
53999         (local_gnulib_dir): Rename into $local_gnulib_path everywhere.
54000         (func_gnulib_dir): Cut out PATH_SEPARATOR detection code into
54001         func_determine_path_separator because that needs to be detected
54002         earlier now.
54003         (func_determine_path_separator): New function.
54004         (func_path_foreach, func_path_foreach_inner): New functions.
54005         (func_path_prepend, func_path_append): Likewise.
54006         (func_lookup_local_file, func_lookup_local_file_cb): Likewise.
54007         (func_lookup_file, func_all_modules): Use new functions to work
54008         with local_gnulib_path.
54009         (func_modules_in_dir, func_exists_module): New callbacks for
54010         func_path_foreach.
54011         (func_exists_module, func_get_tests_module): Likewise.
54012         (func_is_local_file, func_should_symlink): New helper methods.
54013         (func_add_file, func_update_file): Use new func_should_symlink
54014         instead, DRY.
54015         (func_reconstruct_cached_local_gnulib_path): New helper.
54016         (func_reconstruct_cached_dir): New callback.
54017         (func_import): The cached_local_gnulib_dir renamed to
54018         cached_local_gnulib_path similarly to local_gnulib_dir.
54019         Use new func_reconstruct_cached_local_gnulib_path.
54020         (func_count_relative_local_gnulib_path): New sub-method.
54021         (func_create_testdir): Use func_should_symlink, DRY.
54022         (func_create_megatestdir): Use new functions to work with
54023         local_gnulib_path correctly.
54024         (func_append_local_dir): New helper.
54026 2015-12-08  Pádraig Brady  <P@draigBrady.com>
54028         fix freadptr to work with ungetc on all uClibc configs
54029         Reported at https://bugs.busybox.net/show_bug.cgi?id=4099
54030         where GNU coreutils cut(1) generates invalid output on uClibc
54031         when __UCLIBC_HAS_STDIO_GETC_MACRO__ is not defined.
54032         * lib/freadptr.c (freadptr): Return NULL if there are
54033         ungotten chars.  In this case freadseek() will iterate
54034         again to process the ungotten character.
54036 2015-11-13  Paul Eggert  <eggert@cs.ucla.edu>
54038         xalloc-oversized: improve performance with GCC 5
54039         * lib/xalloc-oversized.h (xalloc_oversized):
54040         Improve performance with GCC 5 by using __builtin_mul_overflow.
54042 2015-11-10  Paul Eggert  <eggert@cs.ucla.edu>
54044         intprops: new public macro EXPR_SIGNED
54045         Emacs can use this macro, so make it public.
54046         * doc/intprops.texi (Arithmetic Type Properties): Rename from
54047         'Integer Type Determination', since some of these macros apply
54048         to non-integer types.  Clarify what kinds of constant expressions
54049         these macros return.  Say when the arguments can be non-integers.
54050         Mention newly published macro EXPR_SIGNED.
54051         * lib/intprops.h (EXPR_SIGNED): Rename from _GL_INT_SIGNED, to
54052         make it public.  All uses changed.
54054         intprops: fix typo in clang port
54055         * lib/intprops.h (_GL_INT_OP_WRAPV): Fix misspelling of
54056         '__builtin_add_overflow' that is not caught by compiler.
54058 2015-11-05  Paul Eggert  <eggert@cs.ucla.edu>
54060         test-timespec: fix typo in previous change
54061         * tests/test-timespec.c (main): Fix typo that reduced test quality.
54063         timespec-sub: fix overflow bug; add tests
54064         * lib/timespec-add.c (timespec_add):
54065         * lib/timespec-sub.c (timespec_sub):
54066         Work even if time_t is narrower than int (a theoretical
54067         possibility).  Redo code for a bit more clarity.
54068         * lib/timespec-sub.c (timespec_sub):
54069         Fix off-by-2 bug if a.tv_sec == TYPE_MINIMUM (time_t) and 0 < b.tv_sec.
54070         * modules/timespec-tests, tests/test-timespec.c: New files.
54072         intprops-test: suppress -Woverlength-strings
54073         Problem reported by Pádraig Brady in:
54074         http://lists.gnu.org/r/bug-gnulib/2015-11/msg00008.html
54075         It is not worth the hassle to port this test to compilers that
54076         cannot handle long strings in diagnostics.
54077         * tests/test-intprops.c [__GNUC__]: Ignore -Woverlength-strings.
54079 2015-11-03  Pádraig Brady  <P@draigBrady.com>
54081         quotearg: add quotearg_n_style_colon()
54082         This quotes with default options of the specified style,
54083         but with quoting enabled for instances of ':'.
54084         * lib/quotearg.h (quotearg_n_style_colon): Description and declaration.
54085         * lib/quotearg.c (quotearg_n_style_colon): New function implementation.
54087 2015-11-04  Paul Eggert  <eggert@cs.ucla.edu>
54089         intprops: revise _WRAPV macros, revert _OVERFLOW
54090         The incompatible changes to the _OVERFLOW macros were too much of
54091         a hassle in practice, so revert them.  Instead, change the new
54092         _WRAPV macros to make them closer in behavior to GCC 5's new
54093         builtin_add_overflow etc. functions.  No other software was using
54094         these newly-added macros yet, so this should be OK.
54095         * NEWS: Revert previous change, since the incompatible change
54096         has been reverted, and nobody used the incompatible version.
54097         * doc/intprops.texi (Wraparound Arithmetic, Integer Type Overflow):
54098         Document revised behavior.
54099         (Integer Range Overflow): Adjust example to match above revisions.
54100         * lib/intprops.h (INT_ADD_OVERFLOW, INT_SUBTRACT_OVERFLOW)
54101         (INT_MULTIPLY_OVERFLOW): Revert previous change, so that
54102         these can be used in integer constant expressions again.
54103         (INT_CONST_ADD_OVERFLOW, INT_CONST_SUBTRACT_OVERFLOW)
54104         (INT_CONST_MULTIPLY_OVERFLOW): Remove, as these are no longer
54105         needed.
54106         (INT_CONST_ADD_WRAPV, INT_CONST_SUBTRACT_WRAPV)
54107         (INT_NEGATE_WRAPV, INT_CONST_MULTIPLY_WRAPV, INT_DIVIDE_WRAPV)
54108         (INT_REMAINDER_WRAPV, INT_LEFT_SHIFT_WRAPV):
54109         Remove, as they did not seem that useful.
54110         (INT_ADD_WRAPV, INT_SUBTRACT_WRAPV, INT_MULTIPLY_WRAPV)
54111         (_GL_INT_OP_WRAPV, _GL_INT_OP_WRAPV_LONGISH)
54112         (_GL_INT_OP_WRAPV_VIA_UNSIGNED):
54113         Support new semantics.
54114         (__has_builtin): New macro, if not alreay defined.
54115         (_GL__GENERIC_BOGUS, _GL_INT_OP_CALC, _GL_INT_OP_CALC1): New macros.
54116         * tests/test-intprops.c (INT_CONST_DIVIDE_OVERFLOW)
54117         (INT_CONST_REMAINDER_OVERFLOW, INT_CONST_LEFT_SHIFT_OVERFLOW)
54118         (INT_CONST_DIVIDE_WRAPV, INT_CONST_REMAINDER_WRAPV)
54119         (INT_CONST_LEFT_SHIFT_WRAPV): Remove.
54120         (CHECK_SBINOP, CHECK_SSUM, CHECK_SUM1, CHECK_SSUM1)
54121         (CHECK_SDIFFERENCE, CHECK_SPRODUCT, CHECK_PRODUCT1, CHECK_SPRODUCT1):
54122         New macros.
54123         (CHECK_BINOP, CHECK_UNOP, main, CHECK_SUM): Test new behavior.
54125 2015-11-03  Jim Meyering  <meyering@fb.com>
54127         intprops: add parentheses for when OP has precedence lower than "-"
54128         * lib/intprops.h (_GL_INT_OP_WRAPV_VIA_UNSIGNED): In "a OP b - c",
54129         "a OP b" must be parenthesized for when OP is like "<<", which has
54130         lower precedence than the following "-". Reported by Pádraig Brady.
54132 2015-11-03  Pádraig Brady  <P@draigBrady.com>
54134         quotearg: constify get_quoting_style parameters
54135         * lib/quotearg.h (get_quoting_style): Mark parameter as const.
54136         * lib/quotearg.c (get_quoting_style): Likewise.
54138 2015-11-02  Pádraig Brady  <P@draigBrady.com>
54140         quotearg: add support for $'' shell escaping
54141         * lib/quotearg.h: Add "shell-escape" and "shell-escape-always"
54142         items and descriptions.
54143         * lib/quotearg.c (quotearg_buffer_restyled): Add support for the
54144         above types by quoting like "shell", but using $'...' syntax
54145         for non printable characters, which should provide unambiguous
54146         printable output for any input.
54147         * tests/test-quotearg-simple.c: Update accordingly.
54149 2015-11-02  Pádraig Brady  <P@draigBrady.com>
54151         maint: use a more standard return from mbrtowc test
54152         * m4/mbrtowc.m4 (gl_MBRTOWC_EMPTY_INPUT): Don't return 1
54153         from the test program as this is non standard and often
54154         indicates an unhandled case in the test program.
54155         * m4/mbrlen.m4 (gl_MBRLEN_EMPTY_INPUT): Likewise.
54157 2015-10-30  Paul Eggert  <eggert@cs.ucla.edu>
54159         intprops: add WRAPV and const flavors for GCC 5
54160         If available, use GCC 5's builtin functions for efficient integer
54161         overflow checking.  Also, add macros like INT_ADD_WRAPV efficently
54162         and safely compute the low-order bits of the correct answer.
54163         A downside of these efficient functions is that they cannot be
54164         used in constant expressions, so add macros like INT_CONST_ADD_OVERFLOW
54165         and INT_CONST_ADD_WRAPV that can be used even in constant expressions.
54166         * NEWS: Document the incompatible changes to INT_ADD_OVERFLOW etc.
54167         * doc/intprops.texi (Integer Properties, Integer Type Overflow):
54168         Document the changes.
54169         (Wraparound Arithmetic): New section.
54170         (Integer Range Overflow):
54171         Put this subsection last, since it's least useful.
54172         * lib/intprops.h (INT_CONST_ADD_OVERFLOW)
54173         (INT_CONST_SUBTRACT_OVERFLOW, INT_CONST_MULTIPLY_OVERFLOW):
54174         New macros, with the meaning that INT_ADD_OVERFLOW etc. used to have.
54175         (INT_CONST_ADD_WRAPV, INT_CONST_SUBTRACT_WRAPV)
54176         (INT_NEGATE_WRAPV, INT_CONST_MULTIPLY_WRAPV, INT_DIVIDE_WRAPV)
54177         (INT_REMAINDER_WRAPV, _GL_INT_OP_WRAPV, _GL_EXPR_CAST)
54178         (_GL_INT_OP_WRAPV_LONGISH, INT_ADD_WRAPV, INT_SUBTRACT_WRAPV)
54179         (INT_MULTIPLY_WRAPV, _GL_OP_OVERFLOW, _GL_OP_WRAPV, _GL_OP_WRAPV_GENSYM):
54180         New macros.
54181         (INT_ADD_OVERFLOW, INT_SUBTRACT_OVERFLOW, INT_MULTIPLY_OVERFLOW):
54182         Generate calls to GCC builtins if available, for speed.
54183         * tests/test-intprops.c (INT_CONST_DIVIDE_OVERFLOW)
54184         (INT_CONST_REMAINDER_OVERFLOW, INT_CONST_LEFT_SHIFT_OVERFLOW)
54185         (INT_CONST_DIVIDE_WRAPV, INT_CONST_REMAINDER_WRAPV)
54186         (INT_CONST_LEFT_SHIFT_WRAPV): New macros.
54187         (main, CHECK_BINOP, CHECK_UNOP, CHECK_SUM, CHECK_PRODUCT)
54188         (CHECK_QUOTIENT, CHECK_REMAINDER):
54189         Test WRAPV and CONST flavors (when available) too.
54191 2015-10-30  Pádraig Brady  <P@draigBrady.com>
54193         doc: use extended timezone format in iso-8601 example
54194         * doc/parse-datetime.texi: The standard states that extended format
54195         is to be used consistently throughout.
54196         Note that lib/parse-datetime.y can handle either tz format.
54198 2015-10-25  Paul Eggert  <eggert@cs.ucla.edu>
54200         stdalign: port to Sun C 5.9
54201         * doc/posix-headers/stdalign.texi: Document this.
54202         * lib/stdalign.in.h (_Alignas): Sun C 5.9 also supports
54203         __attribute__ ((__aligned__ (...))).
54205 2015-10-20  Paul Eggert  <eggert@cs.ucla.edu>
54207         time_rz: fix comment about tzalloc
54208         * lib/time_rz.c (tzalloc): Fix comment.
54210 2015-10-18  Paul Eggert  <eggert@cs.ucla.edu>
54212         stdalign: work around pre-4.9 GCC x86 bug
54213         * lib/stdalign.in.h (_Alignof): Work around bug in pre-4.9 GCC on
54214         x86, when -std=gnu11 is used.  Problem reported by Jim Meyering in:
54215         http://lists.gnu.org/r/bug-gnulib/2015-10/msg00038.html
54217 2015-10-18  Pádraig Brady  <P@draigBrady.com>
54219         maint.mk: sc_tight_scope: remove extraneous expressions
54220         * top/maint.mk (tight_scope): This is not really required since
54221         commit 3ef58f46 as sed_wrap ensures we don't get an empty expression
54222         that matches all nm entries.  But it does remove extraneous entries
54223         that may be confusing or cause issue in future maintenance.
54225 2015-10-18  Paul Eggert  <eggert@cs.ucla.edu>
54227         time_rz: return NULL if localtime_r fails
54228         * lib/time_rz.c (localtime_rz): Return NULL if localtime_r fails,
54229         while still attempting to pacify bleeding-edge GCC.
54231         fts: port to C11 alignof
54232         * doc/posix-headers/stdalign.texi (stdalign.h):
54233         Document the C11 restriction.
54234         * lib/fts.c: Include stddef.h, for max_align_t.
54235         (fts_alloc): Align using max_align_t, not FTSENT.
54236         * modules/fts (Depends-on): Add stddef.
54238 2015-10-18  Jim Meyering  <meyering@fb.com>
54240         time_rz: avoid warning from bleeding-edge gcc's -Wnonnull
54241         Compiling with gcc version 6.0.0 20151017 (experimental) (GCC), I
54242         would see this:
54244         lib/time_rz.c: In function 'localtime_rz':
54245         lib/time_rz.c:292:15: error: nonnull argument 'tm' compared to NULL \
54246           [-Werror=nonnull]
54247                    if (tm && !save_abbr (tz, tm))
54248                        ^
54250         That was complaining about "tm" because it is a parameter that was
54251         declared with the __nonnull__ attribute.
54252         * lib/time_rz.c (localtime_rz): Don't bother setting "tm" to the
54253         result of localtime_r.
54255 2015-10-17  Jim Meyering  <meyering@fb.com>
54257         maint.mk: _gl_TS_function_match: fix "extern" name extracting regexp
54258         * top/maint.mk (_gl_TS_function_match): This heuristic extern-function-
54259         name-extraction regexp mistakenly used \S+, and would mistakenly
54260         extract "*F" from "extern int *F()" rather than the desired "F".
54261         Use \w+ instead.
54263 2015-10-17  Jim Meyering  <meyering@fb.com>
54265         maint.mk: sc_tight_scope: factor and support OS X
54266         * top/maint.mk (_gl_tight_scope): Address three issues:
54267         - factor out four instances of code that wraps a string in "^...$"
54268         - allow nm-reported symbol names to have an optional leading "_"
54269         - add "main" to the list of ignored variable names, because on os x,
54270         "main" has nm-reported type "S" in the variable-checking section.
54272 2015-10-16  Dmitry Smirnov  <onlyjob@member.fsf.org>
54274         safe-alloc-tests: fix typo in license header
54275         * tests/test-safe-alloc.c: Mention LGPL 2.1, not 3.1
54277 2015-10-15  Simon Reinhardt  <simon@keinstein.org>
54279         copy-file: fix mem leak in error case
54280         * lib/copy-file.c (qcopy_file_preserving): Free the 32KiB buffer
54281         upon error opening or performing I/O to the src and dest files.
54283 2015-10-15  Mike Frysinger  <vapier@chromium.org>
54285         localename: control langinfo.h inclusion
54286         This header is only used to work around buggy behavior in old
54287         versions of glibc, so do not include it all the time.  Otherwise
54288         we get build failures on systems that do not provide langinfo.h.
54289         * lib/localename.c: Wrap langinfo.h include with same ifdefs used
54290         in the source later on.
54291         The patch was originally submitted to gettext as:
54292         https://lists.gnu.org/r/bug-gettext/2015-10/msg00011.html
54294 2015-10-13  Paul Eggert  <eggert@cs.ucla.edu>
54296         binary-io, math, pthread, sys_socket, u64, unistd: port to strict C
54297         * lib/binary-io.c, lib/math.c, lib/pthread.c, lib/sys_socket.c:
54298         * lib/u64.c, lib/unistd.c:
54299         Append 'typedef int dummy;', to pacify compilers that are picky
54300         about empty translation units.
54302 2015-10-12  Pino Toscano  <ptoscano@redhat.com>
54304         accept4-tests: fix to avoid non portable flags
54305         * tests/test-accept4.c (main): Pass only SOCK_* flags to accept4(),
54306         as they are the only documented ones, and passing others may trigger
54307         EINVAL (seen on FreeBSD 10.1-RELEASE).
54308         * doc/glibc-functions/accept4.texi: Mention that we don't provide
54309         the SOCK_CLOEXEC or SOCK_NONBLOCK defines.
54311 2015-10-06  Pavel Raiskup  <praiskup@redhat.com>
54313         gnulib-tool: fix tests of 'extensions' module
54314         This complements f8fe25fab60e3c687a124 commit.
54315         * gnulib-tool (func_emit_pre_early_macros): New function, it wraps
54316         emitting of initial gl_EARLY macros.
54317         (func_import, func_create_testdir): All dumps of gl_PROG_AR_RANLIB
54318         replaced with func_emit_pre_early_macros call.
54320 2015-10-06  Paul Eggert  <eggert@cs.ucla.edu>
54322         unicase/locale-language: fix typo in utf-8 cookie
54323         * lib/unicase/locale-languages.gperf: Fix gperf input file format.
54324         Problem reported by Zbigniew Jędrzejewski-Szmek.
54326 2015-10-02  Paul Eggert  <eggert@cs.ucla.edu>
54328         xalloc: do not worry about GCC 5 warning on 32 bit
54329         * lib/xalloc.h: Revert previous change.
54330         I found a better way to fix this in coreutils.
54332 2015-10-02  Pádraig Brady  <P@draigBrady.com>
54334         xalloc: avoid GCC 5.1 warning on 32 bit
54335         * lib/xalloc.h: Disable -Wstrict-overflow for uses of
54336         xalloc_oversized(), which was seen to give this warning
54337         on GCC 5.1 on 32 bit: "assuming signed overflow does not occur
54338         when simplifying conditional".
54340 2015-10-02  Daiki Ueno  <ueno@gnu.org>
54342         uniname/uniname-tests: avoid compiler warnings
54343         * tests/uniname/test-uninames.c (fill_names, fill_aliases): Remove
54344         unused local variables.
54345         (test_alias_lookup): Fix alias name display in failure cases.
54347 2015-09-26  Paul Eggert  <eggert@cs.ucla.edu>
54349         c-ctype: do not worry about EBCDIC + char signed
54350         Drop support for EBCDIC with char being signed, as this breaks too
54351         many programs.  Problem reported by Ben Pfaff in:
54352         http://lists.gnu.org/r/bug-gnulib/2015-09/msg00053.html
54353         * lib/c-ctype.h: Verify that we are not using EBCDIC with
54354         char being signed.
54355         (_C_CTYPE_LOWER_A_THRU_F_N): New macro.
54356         (_C_CTYPE_LOWER_N, _C_CTYPE_A_THRU_F): Use it.
54357         (_C_CTYPE_DIGIT, _C_CTYPE_LOWER, _C_CTYPE_PUNCT, _C_CTYPE_UPPER):
54358         (c_isascii, c_isgraph, c_isprint, c_ispunct, c_tolower, c_toupper):
54359         * tests/test-c-ctype.c (test_all):
54360         Simplify by assuming standard char values cannot be negative.
54361         * tests/test-c-ctype.c (NCHARS, to_char): Remove; all uses removed.
54363 2015-09-25  Paul Eggert  <eggert@cs.ucla.edu>
54365         c-ctype: port better to z/OS EBCDIC
54366         Problems reported by Daniel Richard G. in:
54367         http://lists.gnu.org/r/bug-gnulib/2015-09/msg00050.html
54368         * lib/c-ctype.h (_C_CTYPE_CNTRL): Rewrite in terms of
54369         the C standard escapes and _C_CTYPE_OTHER_CNTRL.
54370         (_C_CTYPE_OTHER_CNTRL): New macro.
54371         * tests/test-c-ctype.c (test_all): Test from CHAR_MIN, not
54372         from SCHAR_MIN, as the functions are defined only from values
54373         promoted from char or from unsigned char, not necessarily from
54374         signed char.
54376 2015-09-25  Pavel Raiskup  <praiskup@redhat.com>
54378         gnulib-common.m4: fix gl_PROG_AR_RANLIB/AM_PROG_AR clash
54380         The gl_PROG_AR_RANLIB (it is always called by gl_EARLY) sets AR
54381         and ARFLAGS variables.  Doing this unconditionally could break
54382         later Automake's AM_PROG_AR invocation (at least it's
54383         AC_CHECK_TOOLS call to detect correct 'ar' binary).
54385         Original purpose of the gl_PROG_AR_RANLIB was only to handle the
54386         Amsterdam Compiler Kit, so make the previous code to have effects
54387         only on ACK, and rather automatically call the Automake's
54388         AM_PROG_AR as soon as possible to decide other cases.
54390         References:
54391         http://lists.gnu.org/r/bug-gnulib/2015-07/msg00001.html
54393         * m4/gnulib-common.m4 (gl_PROG_AR_RANLIB): AC_BEFORE AM_PROG_AR.
54394         Set the AR/ARFLAGS to ACK defaults OR call AM_PROG_AR.  If neither
54395         is possible, keep setting AR/ARFLAGS to reasonable defaults.
54396         * gnulib-tool (func_import): Put the gl_USE_SYSTEM_EXTENSIONS
54397         right before gl_PROG_AR_RANLIB into gnulib-comp.m4 (if the
54398         'extensions' module is used.
54399         * modules/extensions (configure.ac-early): Remove as this snippet
54400         is added to gnulib-comp.m4 earlier anyway.
54402 2015-09-25  Paul Eggert  <eggert@cs.ucla.edu>
54404         sockets: MS Windows initalization fixes
54405         Problem reported by Test User in:
54406         http://lists.gnu.org/r/help-shishi/2015-09/msg00001.html
54407         * lib/sockets.h (SOCKETS_1_0, SOCKETS_2_0, SOCKETS_2_1):
54408         Correct the endianness.
54409         * lib/sockets.c (gl_sockets_startup): Return 2 on any version
54410         number mismatch, not just on <.  Cleanup before any such failure.
54412 2015-09-25  Mats Erik Andersson  <gnu@gisladisker.se>
54414         gc: fix detection of installed libgcrypt version
54415         * m4/gc.m4: Use AM_PATH_LIBCRYPT to test for libcrypt versions
54416         at least as recent as 1.4.4.  The previously used macro is not
54417         available now, since modules were removed in version 1.6.0.
54419 2015-09-25  Paul Eggert  <eggert@cs.ucla.edu>
54421         c-ctype: rewrite to use inline functions
54422         This simplifies maintenance, since it makes for just one
54423         implementation of each function, letting the compiler have the fun
54424         of optimization.  In practice this works well nowadays with GCC.
54425         E.g., c_isascii might need only three instructions even though the
54426         source code lists every ASCII character individually in a large
54427         switch statement.
54428         Also, fix some z/OS porting bugs reported by Daniel Richard G. in:
54429         http://lists.gnu.org/r/bug-gnulib/2015-09/msg00037.html
54430         * NEWS: Document the API change.
54431         * lib/c-ctype.c: Drastically simplify, since this now just expands
54432         inline functions.
54433         * lib/c-ctype.h: Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
54434         (C_CTYPE_INLINE): New macro.
54435         (C_CTYPE_CONSECUTIVE_DIGITS, C_CTYPE_CONSECUTIVE_LOWERCASE)
54436         (C_CTYPE_CONSECUTIVE_UPPERCASE): Remove.
54437         Verify that either ASCII or EBCDIC is being used.
54438         (_C_CTYPE_SIGNED_EBCDIC, _C_CTYPE_CNTRL, _C_CTYPE_A_THRU_F_N)
54439         (_C_CTYPE_DIGIT_N, _C_CTYPE_LOWER_N, _C_CTYPE_UPPER_N)
54440         (_C_CTYPE_CASES, _C_CTYPE_A_THRU_F, _C_CTYPE_DIGIT, _C_CTYPE_LOWER)
54441         (_C_CTYPE_UPPER, _C_CTYPE_PUNCT_PLAIN):
54442         New private macros.
54443         (_C_CTYPE_CNTRL): In EBCDIC, '\x07' is a control, not '\xff'.
54444         (c_isalnum, c_isalpha, c_isascii, c_isblank, c_iscntrl, c_isdigit)
54445         (c_isgraph, c_islower, c_isprint, c_ispunct, c_isspace, c_isupper)
54446         (c_isxdigit, c_tolower, c_toupper): Now inline functions.
54447         (c_tolower, c_toupper): When converting, return the unsigned char,
54448         as that is what z/OS does.
54449         * lib/c-strcaseeq.h (CASEEQ): Simplify in the light of the removal
54450         of some c-ctype.h macros.
54451         * modules/c-ctype (Depends-on): Add extern-inline; remove verify.
54452         * tests/test-c-ctype.c (test_all): Fix test for c_toupper and
54453         c_tolower promotion to be compatible with z/OS.
54455 2015-09-24  Pavel Raiskup  <praiskup@redhat.com>
54457         gitlog-to-changelog: trim only trailing whitespaces
54458         This is fix for --format regression introduced by commit
54459         2b93079a5d1baa4d;  it caused that --format='%s%n%n%b%n' (see the
54460         doubled %n string) had no effect anymore.  This format
54461         specification has been used e.g. by GNU paxuitils (commit
54462         edfd8bcc3).
54464         * build-aux/gitlog-to-changelog (main): Stop squashing multiple
54465         newlines in commmit messages.
54467 2015-09-23  Paul Eggert  <eggert@cs.ucla.edu>
54469         Test that c_iscntrl agrees with iscntrl, etc.
54470         Suggested by Daniel Richard G. in:
54471         http://lists.gnu.org/r/bug-gnulib/2015-09/msg00034.html
54472         * modules/c-ctype-tests (Depends-on): Add ctype.
54473         * tests/test-c-ctype.c: Include <ctype.h>.
54474         (NCHARS): New constant.
54475         (test_agree_with_C_locale): New function.
54476         (main): Use it.
54477         (test_all): Use named constants.
54479         c-ctype: improve c_isascii testing
54480         * tests/test-c-ctype.c (test_all): Port c_isascii test to EBCDIC.
54481         Add a test to count the number of ASCII characters.
54483 2015-09-22  Paul Eggert  <eggert@cs.ucla.edu>
54485         savewd: remove SAVEWD_CHDIR_READABLE
54486         It was problematic in the light of file systems that ignore umask.
54487         Problem reported by Sebastian Unger in: http://bugs.gnu.org/21534
54488         * NEWS: Document this.
54489         * lib/mkancesdirs.c (mkancesdirs): MAKE_DIR now returns 0 if
54490         successful, -1 (setting errno) on failure, rather than something
54491         more complicated than that.
54492         * lib/mkdir-p.c (make_dir_parents):
54493         Do not use SAVEWD_CHDIR_READABLE.
54494         * lib/savewd.c (savewd_chdir):
54495         Remove support for SAVEWD_CHDIR_READABLE.
54496         * lib/savewd.h (SAVEWD_CHDIR_READABLE): Remove.
54498         c-ctype: port better to EBCDIC
54499         Problems reported by Daniel Richard G. in
54500         http://lists.gnu.org/r/bug-gnulib/2015-09/msg00020.html
54501         * lib/c-ctype.c: Include <limits.h>, for CHAR_MIN and CHAR_MAX.
54502         Include "verify.h".
54503         (C_CTYPE_ASCII, C_CTYPE_CONSECUTIVE_DIGITS)
54504         (C_CTYPE_CONSECUTIVE_LOWERCASE, C_CTYPE_CONSECUTIVE_UPPERCASE):
54505         Define as enum constants with value false, if not defined, so that
54506         code can use 'if' instead of 'ifdef'.  Using 'if' helps make the
54507         code more portable, as both branches of the 'if' are compiled on
54508         all platforms.
54509         (C_CTYPE_EBCDIC): New constant.
54510         Verify that the character set is either ASCII or EBCDIC.
54511         (to_char): New static function.
54512         (c_isascii, c_iscntrl):
54513         Assume standard control-character assignments for EBCDIC.
54514         (c_isalnum, c_isalpha, c_isdigit, c_islower, c_isgraph, c_isprint)
54515         (c_ispunct, c_isupper, c_isxdigit, c_tolower, c_toupper):
54516         Rewrite to use 'if' instead of 'ifdef'.
54517         Use to_char if non-ASCII.  Prefer <= to >=.
54518         Prefer true and false to 1 and 0, for booleans.
54519         (c_iscntrl): Use 'if', not 'ifdef'.
54520         * modules/c-ctype (Depends-on): Add verify.
54521         * tests/test-c-ctype.c: Include <limits.h>, for CHAR_MIN
54522         (to_char): New function.
54523         (test_all): Port to EBCDIC.  Add some more tests, e.g., for c_ispunct.
54525 2015-09-21  Pádraig Brady  <P@draigBrady.com>
54527         nanosleep: fix return code for interrupted replacement
54528         * lib/nanosleep.c (nanosleep): In the replaced nanosleep, ensure
54529         that we return -1 in the case the call is interrupted by a signal,
54530         rather than the current value of 1.
54531         Diagnosed and tested by Daniel Richard G.
54533 2015-09-19  Paul Eggert  <eggert@cs.ucla.edu>
54535         Diagnose ERE '()|\1'
54536         Problem reported by Hanno Böck in: http://bugs.gnu.org/21513
54537         * lib/regcomp.c (parse_reg_exp): While parsing alternatives, keep
54538         track of the set of previously-completed subexpressions available
54539         before the first alternative, and restore this set just before
54540         parsing each subsequent alternative.  This lets us diagnose the
54541         invalid back-reference in the ERE '()|\1'.
54543         regex: merge patches from libc
54545         2015-09-08  Joseph Myers  <joseph@codesourcery.com>
54546         Move bits/libc-lock.h and bits/libc-lockP.h out of bits/ (bug 14912).
54547         * lib/regex_internal.h:
54548         Include <libc-lock.h> instead of <bits/libc-lock.h>.
54550         2015-06-09  Joseph Myers  <joseph@codesourcery.com>
54551         Fix regcomp wcscoll, wcscmp namespace (bug 18497).
54552         * lib/regcomp.c (build_range_exp): Call __wcscoll instead of
54553         wcscoll.
54554         * lib/regexec.c (check_node_accept_bytes): Likewise.
54556         2015-06-05  Joseph Myers  <joseph@codesourcery.com>
54557         Fix regex wcrtomb namespace (bug 18496).
54558         * lib/regex_internal.c (build_wcs_upper_buffer): Call __wcrtomb
54559         instead of wcrtomb.
54561         2015-06-05  Joseph Myers  <joseph@codesourcery.com>
54562         Fix regex wctype namespace (bug 18495).
54563         * lib/regcomp.c (re_compile_fastmap_iter): Call __towlower
54564         instead of towlower.
54565         * lib/regex_internal.c (build_wcs_upper_buffer): Call __iswlower
54566         instead of iswlower.  Call __towupper instead of towupper.
54567         * lib/regex_internal.h (IS_WIDE_WORD_CHAR): Call __iswalnum
54568         instead of iswalnum.
54570         2015-01-07  Chris Metcalf  <cmetcalf@ezchip.com>
54571         * lib/regcomp.c (parse_bracket_exp): Initialize type to
54572         COLL_SYM in a couple of places to avoid uninitialized variable
54573         wanings on tilegx gcc 4.8.2.
54575         2014-11-24  Siddhesh Poyarekar  <siddhesh@redhat.com>
54576         * lib/regex_internal.h: Remove NOT_IN_libc.
54578         2014-11-17  Andreas Schwab  <schwab@suse.de>
54579         * lib/regex_internal.h: Don't include <locale/elem-hash.h>.
54581         2014-09-11  Roland McGrath  <roland@hack.frob.com>
54582         Move findidx nested functions to top-level.
54583         * lib/regcomp.c [_LIBC]: #include <locale/weight.h>.
54584         (build_equiv_class) [_LIBC]: Don't #include it inside the function.
54585         Pass new arguments to findidx.
54586         * lib/regexec.c [RE_ENABLE_I18N] [_LIBC]: #include <locale/weight.h>.
54587         [RE_ENABLE_I18N] (check_node_accept_bytes) [_LIBC]:
54588         Don't #include it inside the function.  Pass new arguments to findidx.
54589         * lib/regex_internal.h:
54590         [!NOT_IN_libc] [_LIBC]: #include <locale/weight.h>.
54591         (re_string_elem_size_at): Don't #include it inside the function.
54592         Pass new arguments to findidx.
54594         2014-08-01  Siddhesh Poyarekar  <siddhesh@redhat.com>
54595         Check if DEBUG is defined in regex_internal.c
54596         * lib/regex_internal.c: Check if DEBUG is defined and is set.
54598 2015-09-08   Assaf Gordon  <assafgordon@gmail.com>
54600         ceill: detect buggy OpenBSD implementation
54601         * m4/ceill.m4 (gl_FUNC_CEILL): Detect buggy openBSD implementation
54602         which returns zero for small values.  Discussed here:
54603         http://lists.gnu.org/r/bug-gnulib/2015-08/msg00010.html
54605 2015-09-08  Dave Chiluk  <chiluk@canonical.com>
54607         mountlist: add me_mntroot field on Linux machines
54608         * lib/mountlist.c (read_file_system_list): Populate me_mntroot in
54609         mount_entry so Linux machines based on /proc/self/mountinfo can
54610         distinguish between bind mounts and original mounts.  In reality bind
54611         mounts aren't treated differently than mountroot=/ mounts by the
54612         kernel, but the user often wants these bind mounts distinguished.
54613         * lib/mountlist.h (struct mount_entry): Add me_mntroot element.
54614         More details at https://pad.lv/1432871
54616 2015-09-08  Christian Egli  <christian.egli@sbs.ch>
54618         doc: Describe to use multiple instances of gnulib
54619         * doc/gnulib-tool.texi: Add a section to the manual outlining how two
54620         instances of gnulib with different modules can be used, for example one
54621         for a lib and another one for associated tools.
54623 2015-09-01  Pádraig Brady  <P@draigBrady.com>
54625         base32: mark function as __attribute__ const
54626         * lib/base32.h (isbase32): Mark __attribute__ const as
54627         suggested by GCC, and consistent with the base64 module.
54629 2015-08-20  Daiki Ueno  <ueno@gnu.org>
54631         gnulib-tool: don't transform binary files with sed
54632         * gnulib-tool (func_add_or_update): Don't apply sed_transform_* to
54633         .mo and .class files.
54634         Reported by Denis Denisov.
54636 2015-08-10  Daiki Ueno  <ueno@gnu.org>
54638         gperf: respect silent rules
54639         * modules/gperf (Makefile.am): Define V_GPERF, V_GPERF_, and
54640         V_GPERF_0 for silent rules.
54641         * modules/iconv_open (Makefile.am): Use V_GPERF.
54642         * modules/unicase/locale-language (Makefile.am): Likewise.
54643         * modules/unicase/special-casing (Makefile.am): Likewise.
54644         * modules/unictype/category-byname (Makefile.am): Likewise.
54645         * modules/unictype/combining-class-byname (Makefile.am): Likewise.
54646         * modules/unictype/joininggroup-byname (Makefile.am): Likewise.
54647         * modules/unictype/joiningtype-byname (Makefile.am): Likewise.
54648         * modules/unictype/property-byname (Makefile.am): Likewise.
54649         * modules/unictype/scripts (Makefile.am): Likewise.
54650         * modules/uninorm/composition (Makefile.am): Likewise.
54652 2015-08-03  Paul Eggert  <eggert@cs.ucla.edu>
54654         Improve port of stdalign to C++11
54655         Problem reported by Sundaram in:
54656         http://lists.gnu.org/r/bug-gnulib/2015-08/msg00003.html
54657         * lib/stdalign.in.h (alignof, alignas): Don't define if C++11 or newer.
54658         (__alignas_is_defined): Define if C++11 or newer.
54660 2015-08-01  Assaf Gordon  <assafgordon@gmail.com>  (tiny change)
54662         pmccabe2html: fix gawk regex escaping
54663         * build-aux/pmccabe2html: Add one more backslash to properly
54664         escape the gsub replacement value.  Fixes this error:
54665         gawk: ./build-aux/pmccabe2html:425: \
54666         warning: escape sequence `\&' treated as plain `&'
54668 2015-07-29  Paul Eggert  <eggert@cs.ucla.edu>
54670         time_rz: port to pedantic memcpy
54671         * lib/time_rz.c (tzalloc): Pacify pedantic memcpy implementations
54672         that reject memcpy (..., NULL, 0).
54674 2015-07-27  Paul Eggert  <eggert@cs.ucla.edu>
54676         time_rz: port better to MinGW
54677         Don't change tzname, as this makes MinGW dump core (Bug#21020).
54678         Instead, store the tzname copy in the struct tm_zone object.
54679         Problem reported by Eli Zaretskii in: http://bugs.gnu.org/21020#48
54680         * lib/strftime.c [!_LIBC]:
54681         * lib/time_rz.c: Include time-internal.h.
54682         * lib/strftime.c (strftime_case_) [!HAVE_TM_ZONE]: Infer the zone
54683         name from *TZ rather than from TZNAME, doable because *TZ now has
54684         a tzname_copy member.
54685         * lib/time-internal.h: New file, with contents taken from
54686         lib/time_rz.c.  It's separate because strftime.c now accesses
54687         struct tm_zone members.
54688         (struct tm_zone) [HAVE_TZNAME && !HAVE_TM_ZONE]:
54689         New member tzname_copy.
54690         * lib/time_rz.c (struct tm_zone): Move to time-internal.h.
54691         (tzalloc) [HAVE_TZNAME && !HAVE_TM_ZONE]:
54692         Initialize tzname_copy member.
54693         (save_abbr) [HAVE_TZNAME && !HAVE_TM_ZONE]: Save abbreviation
54694         in tzname_copy member.
54695         (revert_tz) [HAVE_TZNAME]: Remove no-longer-needed tzname saving.
54696         (restore_tzname): Remove; no longer needed.  All calls removed.
54697         * modules/time_rz (Files): Add lib/time-internal.h.
54699         time: port __need_time_t to MinGW
54700         * lib/time.in.h (__need_time_t): Do not treat specially on MinGW.
54701         Fix reported by Eli Zaretskii in: http://bugs.gnu.org/21020#36
54703 2015-07-25  Paul Eggert  <eggert@cs.ucla.edu>
54705         strftime: fix newly-introduced bug on Solaris
54706         * lib/strftime.c (strftime_case_): Set the local variable 'zone'
54707         consistently at the start, rather than doing some of the setup at
54708         the start and some in the %Z format spec.  This is cleaner, and
54709         works better with time_rz on platforms like Solaris where struct
54710         tm lacks a tm_zone member, as when !HAVE_TM_GMTOFF %z's calls to
54711         mktime_z and localtime_rz can mess up the tzname cache.
54713         test-strftime: test for Solaris bug
54714         * modules/strftime-tests (Depends-on): Add strerror.
54715         * tests/test-strftime.c: Include <errno.h>.
54716         (posixtm_test): New function, containing the old 'main'.
54717         (struct tzalloc_test, struct localtime_rz_test): New types.
54718         (TZ, LT): New static vars.
54719         (tzalloc_test): New function.
54720         (main): Rewrite in terms of posixtm_test and tzalloc_test.
54722         time_rz: port to Solaris etc.
54723         Works around a tzname problem on platforms like Solaris that have
54724         tzname but not tm_zone, by setting tzname at the appropriate time
54725         and restoring it later.
54726         * lib/time_rz.c (tzname_address, tzname_value) [HAVE_TZNAME]:
54727         New static vars.
54728         (save_abbr) [HAVE_TZNAME]: Set them.
54729         (revert_tz) [HAVE_TZNAME]: Clear or use them.
54730         (restore_tzname): New function.
54731         (localtime_rz, mktime_z): Use it.
54733         time_rz: now LGPL
54734         * modules/time_rz (License): Now LGPL, because strftime depends on it.
54736         time_rz: make a constant 'const'
54737         * lib/time_rz.c (local_tz): Now const.
54739         time_rz: fix off-by-one typo
54740         * lib/time_rz.c (extend_abbrs): Fix off-by-one typo.
54742 2015-07-23  Paul Eggert  <eggert@cs.ucla.edu>
54744         fprintftime, strftime: use timezone_t args
54745         * NEWS: Document the change.
54746         * lib/fprintftime.h (fprintftime):
54747         * lib/strftime.c (extra_args) [my_strftime]:
54748         * lib/strftime.h (nstrftime):
54749         Time zone arg is now of type timezone_t, not int.
54750         * lib/strftime.c (mktime_z) [_LIBC]: New macro.
54751         (__gmtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: Remove; no longer used.
54752         (my_strftime) [emacs && !my_strftime]:
54753         (emacs_strftimeu) [emacs && !FPRINTFTIME]:
54754         Remove; Emacs doesn't need this any more.
54755         (HAVE_TZSET) [my_strftime]: Unset, since we no longer want
54756         fprintftime and nstrftime to call tzset.
54757         (ut) [!my_strftime]: Remove, replacing with ...
54758         (tz) [!my_stftime]: ... this new macro.  All uses changed.
54759         (strftime_case_): Use localtime_rz and mktime_z instead
54760         of localtime_r and mktime.
54761         * modules/fprintftime (Depends-on): Add time_rz.
54762         * modules/strftime (Depends-on): Add time_rz.  Remove time_r.
54763         * tests/test-strftime.c (main): Adjust to new nstrftime API.
54765         time_rz: new module
54766         * MODULES.html.sh: Add time_rz.
54767         * lib/time_rz.c, m4/time_rz.m4, modules/time_rz: New files.
54768         * lib/time.in.h (timezone_t, tzalloc, tzfree, localtime_rz, mktime_z):
54769         New decls if _GNU_SOURCE && @GNULIB_TIME_RZ@ && ! @HAVE_TIMEZONE_T@.
54770         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_DEFAULTS):
54771         New var HAVE_TIMEZONE_T (default 0).
54772         * m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS):
54773         New var GNULIB_TIME_RZ (default 0).
54774         * modules/time (time.h): Substitute the new vars.
54776         flexmember: license is now unlimited
54777         * modules/flexmember (License): Change to unlimited,
54778         since its only source file gives an unlimited license.
54780 2015-07-15  Eric Blake  <eblake@redhat.com>
54782         maint: update copyright paper procedures
54783         * config/srclist.txt: Drop outdated files.
54784         * doc/Copyright/conditions.txt: Update to latest.
54785         * doc/Copyright/assign.changes.manual: Delete.
54786         * doc/Copyright/assign.future.manual: Likewise.
54787         * doc/Copyright/assign.manual: Likewise.
54788         * doc/Copyright/assign.translation.manual: Likewise.
54789         * doc/Copyright/disclaim.changes.manual: Likewise.
54790         * doc/Copyright/disclaim.manual: Likewise.
54791         * doc/Copyright/disclaim.program: Likewise.
54793 2015-07-07  Daiki Ueno  <ueno@gnu.org>
54795         localename: fix link error on Illumos
54796         Illumos defines __sun, but does not have getlocalename_l nor the
54797         equivalent.  This partially reverts commit 387c214.
54798         * m4/localename.m4 (gl_LOCALENAME): Check if getlocalename_l is
54799         available, as well as uselocale.
54800         * lib/localename.c [HAVE_USELOCALE && __sun]: Don't fallback to
54801         use getlocalename_l if it is not available.
54803 2015-07-07  Daiki Ueno  <ueno@gnu.org>
54805         unistr/uN-strtok-tests: avoid a trivial leak
54806         * tests/unistr/test-u-strtok.h (test_u_strtok): Untabify.  Free
54807         input and delim after the multibyte delimiter tests.
54809 2015-07-04  Paul Eggert  <eggert@cs.ucla.edu>
54811         file-has-acl, acl-permissions: fix HP-UX typos
54812         Problem reported by John David Anglin in: http://bugs.gnu.org/20979
54813         * lib/file-has-acl.c (file_has_acl):
54814         * lib/set-permissions.c (context_acl_from_mode)
54815         (context_aclv_from_mode, set_acls):
54816         Fix some obvious typos when HAVE_GETCL /* HP-UX */.
54817         They were introduced by the recent ACL changes.
54819         regex: match current GNU grep behavior
54820         These symbols have not matched GNU grep behavior for quite some time.
54821         Fix prompted by Balazs Kezes bug report at: http://bugs.gnu.org/20974
54822         * lib/regex.h (RE_SYNTAX_GREP, RE_SYNTAX_EGREP):
54823         Change to match current GNU behavior.
54824         Simplify by expressing it as differences from POSIX BREs and EREs.
54825         (RE_SYNTAX_POSIX_EGREP): No longer differs from GNU behavior.
54827 2015-07-03  Jim Meyering  <meyering@fb.com>
54829         set-permissions.c: adjust acl_from_mode's cpp guard
54830         * lib/set-permissions.c (acl_from_mode): Guard with #ifdef
54831         directives identical to those guarding the sole use.
54832         Otherwise, on some systems, we'd get a warning about
54833         the function being defined but not used.
54834         Also, filter through cppi to correct misleading indentation
54835         of cpp directives.
54837 2015-07-03  Pádraig Brady  <P@draigBrady.com>
54839         tests: restrict shells to those that support 'local'
54840         The local keyword is very widely supported and used
54841         in tests in coreutils and grep at least.  Therefore
54842         restrict to testing with shells that support it.
54843         This mainly excludes /bin/sh on Solaris.
54844         * tests/init.sh (gl_shell_test_script_): Add a test for 'local'.
54846 2015-07-03  Seiya Kawashima  <skawashima@uchicago.edu>  (tiny change)
54847         and Daiki Ueno  <ueno@gnu.org>
54849         unistr/uN-strtok: handle multibyte delimiters
54850         Previously, uN_strtok moved PTR to the next unit to the token end.
54851         When DELIM contained a multibyte character, the new position could
54852         be a middle of a multibyte character.
54853         * lib/unistr/u-strtok.h (FUNC): Place PTR at the next character
54854         after the token.
54855         * lib/unistr/u8-strtok.c (U_STRMBLEN): New macro.
54856         * lib/unistr/u16-strtok.c (U_STRMBLEN): New macro.
54857         * lib/unistr/u32-strtok.c (U_STRMBLEN): New macro.
54858         * modules/unistr/u8-strtok (Depends-on): Depend on
54859         unistr/u8-strmblen.
54860         * modules/unistr/u16-strtok (Depends-on): Depend on
54861         unistr/u16-strmblen.
54862         * modules/unistr/u32-strtok (Depends-on): Depend on
54863         unistr/u32-strmblen.
54864         * tests/unistr/test-u-strtok.h: New file.
54865         * tests/unistr/test-u8-strtok.c: New file.
54866         * tests/unistr/test-u16-strtok.c: New file.
54867         * tests/unistr/test-u32-strtok.c: New file.
54868         * modules/unistr/u8-strtok-tests: New file.
54869         * modules/unistr/u32-strtok-tests: New file.
54870         * modules/unistr/u16-strtok-tests: New file.
54872 2015-07-02  Friedrich Haubensak  <hsk@fli-leibniz.de>
54874         update-copyright: fix test failure with perl >= 5.22 (trivial)
54875         * build-aux/update-copyright: Escape a literal left curly bracket,
54876         required with perl >= 5.22
54878 2015-07-02  Daiki Ueno  <ueno@gnu.org>
54880         u{16,32}-strstr-tests: relax timeout condition
54881         On slower platforms (e.g., Solaris 10/SPARC), u{16,32}-strstr
54882         tests can take longer than 5 seconds to complete.
54883         Reported by Dagobert Michelsen in:
54884         https://lists.gnu.org/r/bug-libunistring/2015-06/msg00006.html
54885         * tests/unistr/test-u16-strstr.c (main): Increase timeout from 5
54886         seconds to 10 seconds.
54887         * tests/unistr/test-u32-strstr.c (main): Likewise.
54889 2015-07-01  Pavel Raiskup  <praiskup@redhat.com>
54891         gnulib-common.m4: change the ARFLAGS default to 'cr'
54892         In some GNU/Linux distributions people started to compile 'ar'
54893         binary with --enable-deterministic-archives (binutils project).
54894         That, however, in combination with previous autotools long time
54895         working default AR{_,}FLAGS=cru causes warnings on such
54896         installations:
54897         ar: `u' modifier ignored since `D' is the default (see `U')
54898         * m4/gnulib-common.m4 (gl_PROG_AR_RANLIB): Set ARFLAGS='cr' if not
54899         set already.
54901 2015-07-01  Pavel Raiskup  <praiskup@redhat.com>
54903         selinux-h: avoid double free after *getfilecon()
54904         Originally reported by Ben Shelton on bug-tar:
54905         http://lists.gnu.org/r/bug-tar/2015-04/msg00009.html
54906         * lib/getfilecon.c (map_to_failure): Set the already freed '*con'
54907         pointer to NULL.  Man getfilecon(3) says that any non-NULL '*con'
54908         param should be freed by freecon(3) (regardless the return value).
54910 2015-07-01  Pavel Fedin  <p.fedin@samsung.com>
54912         fix pty related tests issues on Windows (trivial)
54913         * lib/grantpt.c (grantpt): grantpt.c seems to be never used on Windows,
54914         however it's still present in tests/ subdirectory of the final project.
54915         Therefore avoid it to pass `make check`.
54916         * tests/test-openpty.c (main): Windows has no PTYs and gnulib's openpty()
54917         will just return -ENOSYS, so avoid this non applicable test allowing
54918         the build to proceed.
54920 2015-07-01  Pádraig Brady  <P@draigBrady.com>
54922         acl: fix definition of acl_from_mode on FreeBSD
54923         This was causing basic coreutils copy operations to fail
54924         with ENOTSUP or ENOENT error messages.
54925         * lib/acl-internal.h (acl_from_mode): Only define when
54926         ! defined HAVE_ACL_FROM_TEXT.  That allows the version
54927         of acl_from_mode() defined in lib/set-permissions.c to
54928         be used on FreeBSD at least.
54929         * lib/set-permissions.c: Fix up comment spelling,
54930         and a redundant variable assignment; noticed in passing.
54932 2015-06-30  Pádraig Brady  <P@draigBrady.com>
54934         readutmp: port to FreeBSD >= 9
54935         * lib/readutmp.h: Map utmpxname() to setutxdb().
54936         With that coreutils who(1) and pinky(1) tests pass.
54938 2015-06-30  Paul Eggert  <eggert@cs.ucla.edu>
54940         mgetgroups: port to strict OS X
54941         The previous fix wasn't working, so use a bigger hammer (Bug#20923).
54942         * lib/mgetgroups.c: Ignore -Wpointer-sign diagnostics.
54943         (getgrouplist_gids) [HAVE_GETGROUPLIST]: Remove.  All uses removed.
54944         * m4/mgetgroups.m4 (gl_MGETGROUPS): Revert recent changes.
54946 2015-06-29  Paul Eggert  <eggert@cs.ucla.edu>
54948         mgetgroups: port to strict OS X
54949         * doc/glibc-functions/getgrouplist.texi (getgrouplist):
54950         Document the getgrouplist problem.
54951         * lib/mgetgroups.c (getgrouplist_gids) [HAVE_GETGROUPLIST]:
54952         New macro.
54953         (mgetgroups): Use it.
54954         * m4/mgetgroups.m4 (gl_MGETGROUPS):
54955         Check for OS X signature for getgrouplist.
54957 2015-06-29  Jim Meyering  <meyering@fb.com>
54959         linkat: fix invalid definition of LINKAT_SYMLINK_NOTSUP on OS X
54960         It started like this when building coreutils' latest on OS X,
54961         invoking ./configure with a nonempty --cache=.cache:
54963           lib/linkat.c:46:42: error: operator '||' has no right operand
54964           lib/linkat.c: In function 'rpl_linkat':
54965           lib/linkat.c:330:27: error: #if with no expression
54967         Here's linkat.c's line 46:
54969           #if !HAVE_LINKAT || LINKAT_SYMLINK_NOTSUP
54971         Here's some context:
54973           $ grep linkat_nofoll .cache
54974           gl_cv_func_linkat_nofollow=${gl_cv_func_linkat_nofollow=no}
54975           $ grep LINKAT_SYM lib/config.h
54976           #define LINKAT_SYMLINK_NOTSUP
54978         The problem is that m4/linkat.m4's gl_FUNC_LINKAT
54979         uses AC_CACHE_CHECK to set LINKAT_SYMLINK_NOTSUP,
54980         but that violates a tenet of AC_CACHE_CHECK: it must
54981         have no side effect other than setting its cache variable.
54983         What happens is that when the cache is set, we'd skip the
54984         code in that AC_CACHE_CHECK call, and leave LINKAT_SYMLINK_NOTSUP
54985         defined to whatever value it happened to have in configure's
54986         environment.  In my case, it was not defined, so this later code:
54988           AC_DEFINE_UNQUOTED([LINKAT_SYMLINK_NOTSUP], [$LINKAT_SYMLINK_NOTSUP],
54989             [Define to 1 if linkat can create hardlinks to symlinks])
54991         would emit code with an empty RHS.
54993         * m4/linkat.m4 (gl_FUNC_LINKAT): Move the setting of
54994         $LINKAT_SYMLINK_NOTSUP out of the AC_CACHE_CHECK code block.
54996 2015-06-28  Jim Meyering  <meyering@fb.com>
54998         mountlist: avoid an unused-label warning on OS X
54999         * lib/mountlist.c (read_file_system_list) [MOUNTED_GETMNTINFO]:
55000         Building on OS X, I saw a warning about the "free_then_fail" label
55001         being unused.  Give it the _GL_UNUSED_LABEL attribute.
55003         error.c: correct printf-style format: %d -> %u
55004         * lib/error.c (error_at_line): Correct __fxprintf format to use %u,
55005         rather than %d, to match the type of "line_number", unsigned int.
55007 2015-06-25  Pádraig Brady  <P@draigBrady.com>
55009         fts: avoid reading beyond the heap allocation
55010         GCC 5.1.1 with -O2 and -fsanitize=address reports
55011         a read of size 4 from a heap object of size 3 is indeed invalid,
55012         though this may be due to incorrect padding assumptions by GCC, see:
55013         https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66661
55014         * lib/fts.c (fts_alloc): Increase allocation to alignof(FTSENT).
55015         * modules/fts: Depend on stdalign.
55017 2015-06-24  Pádraig Brady  <P@draigBrady.com>
55019         savedir: avoid undefined behavior in qsort call
55020         GCC 5.1.1 -fsanitize=undefined with glibc 2.21 is returning:
55021         "runtime error: null pointer passed as argument 1,
55022          which is declared to never be null"
55023         * lib/savedir.c (streamsavedir): Avoid the call with no entries.
55025 2015-06-24  Pádraig Brady  <P@draigBrady.com>
55027         userspec: avoid undefined behavior in gettext call
55028         GCC 5.1.1 -fsanitize=undefined with glibc 2.21 is returning:
55029         "runtime error: null pointer passed as argument 2,
55030          which is declared to never be null"
55031         * lib/userspec.c (parse_with_separator): Avoid passing NULL to gettext()
55033 2015-06-20  Glenn Morris  <rgm@gnu.org>
55035         gitlog-to-changelog: improve gitmerge.el commits
55036         Let the Emacs ChangeLog generation process exclude "skipped"
55037         messages from merge commits (Bug#20717).
55038         * build-aux/gitlog-to-changelog: Handle gitmerge.el skipped commits.
55040 2015-06-20  Paul Eggert  <eggert@cs.ucla.edu>
55042         wchar: fix MinGW compilation warnings
55043         This lets Texinfo compile cleanly.  See Eli Zaretskii in:
55044         http://lists.gnu.org/r/bug-gnulib/2015-06/msg00050.html
55045         * lib/wchar.in.h: Do not use special invocation convention on MinGW.
55047 2015-06-20  Daiki Ueno  <ueno@gnu.org>
55049         uniname/uniname-tests: use pristine data files
55050         For copyright and maintenance reasons, use the data files from UCD
55051         without modification.
55052         * tests/uniname/test-uninames.c (FIELDLEN): Remove.
55053         (getfield): Remove.
55054         (aliases_count): New global variable.
55055         (fill_names): Skip comments and empty lines in the input.  Don't
55056         use getfield.
55057         (fill_aliases): Likewise.
55058         (main): Change the expected command line arguments to:
55059         NAMES... ["--" ALIASES...].
55060         * tests/uniname/test-uninames.sh: Adjust to the change in
55061         test-uninames.c.
55062         * tests/uniname/UnicodeDataNames.txt: Remove.
55063         * tests/uniname/UnicodeData.txt: New file, from Unicode 8.0.0.
55064         * tests/uniname/NameAliases.txt: Use the pristine copy of the data
55065         file from Unicode 8.0.0.
55067 2015-06-19  Pádraig Brady  <P@draigBrady.com>
55069         linked-list, linkedhash-list: avoid compiler warnings
55070         * lib/gl_anytree_list2.h: Add _GL_ATTRIBUTE_PURE to avoid
55071         -Werror=suggest-attribute=pure (from GCC 5.1.1).
55073 2015-06-19  Daiki Ueno  <ueno@gnu.org>
55075         libunistring: bump minimum version to 0.9.6
55076         * all modules depending on updated Unicode data: Regenerate.
55077         The modules are listed by a script that does:
55078         - for each file listed by: git show --oneline --name-only 705f4efc
55079           - deduce the containing modules, based on "Files:"
55080         - deduce the modules which depend on the containing modules, based
55081           on "Depends-on:"
55083 2015-06-18  Daiki Ueno  <ueno@gnu.org>
55085         uniname/uniname: update to Unicode 8.0.0
55086         * lib/uniname/uninames.h: Regenerate.
55087         * tests/uniname/NameAliases.txt: Update from Unicode 8.0.0.
55088         * tests/uniname/UnicodeDataNames.txt: Update from Unicode 8.0.0.
55090 2015-06-18  Daiki Ueno  <ueno@gnu.org>
55092         libunistring: update to Unicode 8.0.0
55093         * lib/gen-uni-tables.c (SIZEOF): New macro.
55094         (output_numeric): Increase the maximum number of fractions from
55095         128 to 160.  Increase the level3 value width from 7 bits to 8
55096         bits.  Use SIZEOF instead of a hard-coded integer.
55097         (output_blocks): Decrease the cut-off threshold from 0x30000 to
55098         0x28000.
55099         (fill_blocks): Increase the maximum number of blocks from 256 to
55100         384.  Use SIZEOF instead of a hard-coded integer.
55101         (get_lbp): Adjust to new characters added in Unicode 8.0.0.
55102         * lib/unictype/numeric.c (uc_numeric_value): Adjust the level3
55103         value width.
55104         * lib/unilbrk/lbrktables.c (unilbrk_table): Implement LBP21b and
55105         a new case added to LBP22.
55106         * lib/uniwidth/width.c (nonspacing_table_data): Add U+08E3,
55107         U+A69E, U+FE2E..U+FE2F, U+111CA..U+111CC, U+11300,
55108         U+115DC..U+115DD, U+1171D..U+1171F, U+11722..U+11725,
55109         U+11727..U+1172B, U+1DA00..U+1DA36, U+1DA3B..U+1DA6C, U+1DA75,
55110         U+1DA84, U+1DA9B..U+1DA9F, and U+1DAA1..U+1DAAF.
55111         * tests/uniwidth/test-uc_width2.sh: Same updates as in
55112         lib/uniwidth/width.c.
55113         * all generated files under lib/uni* and tests/uni*: Regenerate.
55115 2015-06-16  Pádraig Brady  <P@draigBrady.com>
55117         gnu-web-doc-update: add --mirror to remove stale files
55118         * build-aux/gnu-web-doc-update: Add a --mirror option to remove
55119         out of date files from the CVS server.  Since this is usually
55120         appropriate, a prompt is given when the option is not specified,
55121         along with the `cvs remove` command that would be run.
55123 2015-06-06  Paul Eggert  <eggert@cs.ucla.edu>
55125         acl-permissions: pacify -Wsuggest-attribute=const
55126         Problem reported by Masanari Iida in: http://bugs.gnu.org/20753
55127         * lib/acl-internal.h (free_permission_context):
55128         Declare with attribute const if ! (defined USE_ACL &&
55129         (HAVE_ACL_GET_FILE || defined GETACL)).
55131         fsync: document AIX misbehavior
55132         * doc/posix-functions/fsync.texi (fsync):
55133         Document failure on AIX with read-only file descriptor.
55135 2015-06-05  Jonathan Perkin  <jperkin@joyent.com>  (tiny change)
55137         stdio: Don't redefine gets when using C++
55138         * lib/stdio.in.h (gets): Disable warning on C++.
55140 2015-06-05  Paul Eggert  <eggert@cs.ucla.edu>
55142         acl-permissions: port to AIX, C89 HP-UX
55143         Problems reported by Michael Felt.
55144         * lib/file-has-acl.c (file_has_acl) [HAVE_STATACL]:
55145         * lib/get-permissions.c (get_permissions) [USE_ACL && HAVE_STATACL]:
55146         * lib/readutmp.c (read_utmp) [UTMP_NAME_FUNCTION]:
55147         * lib/set-permissions.c (set_acls) [HAVE_ACLX_GET && ACL_AIX_WIP]:
55148         Add cast for AIX, whose system calls are declared to accept
55149         char * even though the arguments are really char const *.
55150         * lib/get-permissions.c (get_permissions):
55151         If USE_ACL && HAVE_GETACL /* HP-UX */, don't assume C99.
55152         If USE_ACL && HAVE_STATACL /* older AIX */, add missing decl
55153         that broke a build.
55154         * lib/mountlist.c (read_file_system_list) [MOUNTED_VMOUNT]:
55155         Rework types to pacify xlc.
55157 2015-06-03  Pádraig Brady  <P@draigBrady.com>
55159         vasprintf-posix: avoid compiling vasnprintf where possible
55160         * modules/vasprintf-posix: Avoid compiling the large vasnprintf
55161         module where not required.  For example on a GNU/Linux system
55162         when gnulib-tool is run with the --conditional-dependencies option.
55164 2015-06-02  Pádraig Brady  <P@draigBrady.com>
55166         file-has-acl: fix build on Mac OS X 10
55167         This reverts commit f1b37e3a which doesn't work on Mac OS X >= 10.4
55168         which has an incompatible 6 parameter getxattr() call.
55169         * doc/glibc-functions/getxattr.texi: Mention the divergent getxattr()
55170         call on Mac OS X >= 10.4.
55171         * doc/glibc-functions/fgetxattr.texi: Likewise.
55172         * lib/file-has-acl.c: Revert to more complete combined check.
55173         * m4/acl.m4 (gl_FILE_HAS_ACL): Likewise.
55174         Reported by Jack Howarth.
55176 2015-06-02  Pádraig Brady  <P@draigBrady.com>
55178         prefix-gnulib-mk: remove no longer needed special case
55179         * build-aux/prefix-gnulib-mk (prefix): Since commit e3704b9c,
55180         continued lib_SOURCES lines are no longer present,
55181         so special case handling of such entries is not required.
55183 2015-06-01  Pádraig Brady  <P@draigBrady.com>
55185         acl: don't depend on the deprecated qacl module
55186         * modules/acl (Depends-on): Use q{copy,set}-acl instead.
55188 2015-06-01  Pádraig Brady  <P@draigBrady.com>
55190         gnulib-tool: concatenate lib_SOURCES to a single line
55191         * gnulib-tool: Refactor the line merging sed logic,
55192         and use that to output a single lib_SOURCES line for each module.
55193         gnulib using projects often postprocess this output to prepend
55194         subdir paths to each item, and having a single line simplifies this
55195         processing allowing better decoupling from the gnulib-tool output.
55197 2015-06-01  Pavel Fedin  <p.fedin@samsung.com>
55199         pthread_sigmask: discount system version if a simple macro (trivial)
55200         MinGW64 has: #define pthread_sigmask(H, S1, S2) 0
55201         * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK): Call the
55202         function to ensure it's available.
55204 2015-05-31  Pádraig Brady  <P@draigBrady.com>
55206         readlinkat: avoid OS X 10.10 trailing slash bug
55207         * doc/posix-functions/readlink.texi: Mention that OS X 10.10
55208         has this bug.
55209         * doc/posix-functions/readlinkat.texi: Likewise.  Also mention
55210         that OS X 10.10 has this function.
55211         * lib/readlinkat.c (rpl_readlinkat): Handle the trailing slash bug,
55212         as done for readlink().
55213         * m4/readlinkat.m4 (gl_FUNC_READLINKAT): Check for the readlink()
55214         trailing slash bug, and assume readlinkat() has the same issue.
55215         Also fix a typo where $gl_cv_decl_readlink_works was tested,
55216         rather than the correct $gl_cv_decl_readlinkat_works.
55218 2015-05-29  Andreas Gruenbacher  <andreas.gruenbacher@gmail.com>
55220         acl-permissions: Fix build on Mac OS X and older AIX (Bug#20681)
55221         * lib/set-permissions.c (set_acls): Fix more errors introduced in the acl
55222         module rewrite.
55224         acl-permissions: Fix build on Solaris and Cygwin
55225         Reported by Tom G. Christensen <tgc@jupiterrise.com>:
55226         * lib/set-permissions.c (set_acls): The count, entries, ace_count, and
55227         ace_entries variables have moved into struct permission_context but
55228         they were still accessed as local variables here.
55230 2015-05-29  Pádraig Brady  <P@draigBrady.com>
55232         linkat: avoid OS X 10.10 trailing slash with symlink bug
55233         On Darwin 14.3.0 linkat(,"path1",,"dangling_symlink/",)
55234         causes the symlink to be dereferenced, and if it points
55235         to a non existent file, that file will be created as
55236         a hard link to "path1".
55237         This fixes a test failure in test-linkat.c.
55238         * m4/linkat.m4 (gl_FUNC_LINKAT): Augment the test with
55239         this case.  The existing workaround in linkat.c for
55240         trailing slash issues, suffices for this case.
55241         * doc/posix-functions/linkat.texi: Add OS X 10.10 to
55242         the list of platforms with trailing slash issues.
55244 2015-05-28  Pádraig Brady  <P@draigBrady.com>
55246         unlinkat: handle ignoring of ".." on Darwin 14
55247         * lib/unlinkat.c: unlinkat() has the same bug as unlink()
55248         on Mac OS X 10.10, where it ignores paths with a trailing "..",
55249         so handle in the same manner.
55250         * m4/unlinkat.m4: Comment on this Darwin issue.
55251         * doc/posix-functions/unlink.texi: Update the latest version
55252         where the issue was seen.
55253         * doc/posix-functions/unlinkat.texi: Mention this issue.
55254         Fixes a test failure in test-unlinkat.c.
55256 2015-05-27  Paul Eggert  <eggert@cs.ucla.edu>
55258         qacl: split into qcopy-acl and qset-acl
55259         Emacs needs the former, but not the latter.
55260         * modules/acl-permissions: New file, containing most of the old qacl.
55261         * modules/file-has-acl (Depends-on): Depend on acl-permissions, not qacl.
55262         * modules/qacl: Now merely depends on qcopy-acl and qset-acl.
55263         * modules/qcopy-acl, modules/qset-acl: New files.
55264         * MODULES.html.sh (File system functions):
55265         Mention the new modules, and mention qacl while we're at it.
55267 2015-05-27  Glenn Morris  <rgm@gnu.org>
55269         gitlog-to-changelog: new option --ignore-line
55270         (This patch is imported from the GNU Emacs master.)
55271         This option ignores individual commit lines matching a pattern.
55272         * build-aux/gitlog-to-changelog: Add --ignore-line option.
55274 2015-05-27  Andreas Gruenbacher  <agruenba@redhat.com>
55276         qacl: Reimplement qset_acl and qcopy_acl (Bug#20666)
55277         Implement get_permissions and set_permissions primitives for getting all
55278         the permissions of a file, storing them, and later setting them. (In the
55279         minimal case, the permissions consist only of a file mode.) Reimplement
55280         qset_acl and qcopy_acl based on these new primitives: this avoids code
55281         duplication and makes error handling more consistent.
55282         The Solaris and Cygwin code still uses duplicate code paths for setting
55283         a file mode while making sure that no acls exist and setting an explicit
55284         acl; this is no worse than before, but could be cleaned up.  The AIX
55285         code still doesn't read ACLs, it only makes sure that acls don't get in
55286         the way when setting a file mode.
55287         * lib/acl-internal.h (struct permission_context): New data structure.
55288         (get_permissions, set_permissions, free_permission_context): Declare.
55289         * lib/acl-internal.c (free_permission_context): New helper function.
55290         * lib/get-permissions.c (get_permissions): New helper function split off
55291         from qcopy_acl.
55292         * lib/set-permissions.c: (set_acls_from_mode): On Solaris, Cygwin, and
55293         AIX, set a file's permissions based only on a file mode.
55294         (acl_from_mode, context_acl_from_mode, context_aclv_from_mode): All
55295         other platforms construct a temporary acl from the file mode and set
55296         that acl in the same way as setting an acl read from the source file.
55297         This should help avoid code duplication and inconsistent / buggy
55298         behavior.
55299         (set_acls): New helper function Split off from qcopy_acl.
55300         (chmod_or_fchmod): Moved here from qset-acl.c.
55301         (set_permissions): New helper function.
55302         * lib/qcopy-acl.c (qcopy_acl): Rewrite using get_permissions and
55303         set_permissions.
55304         * lib/qset-acl.c (qset_acl): Rewrite using set_permissions.
55305         * modules/qacl: Add get-permissions.c and set-permissions.c.
55307         file-has-acl: Split feature tests again (Bug#20667)
55308         * lib/file-has-acl.c: Instead of testing for
55309         XATTR_NAME_POSIX_ACL_ACCESS and XATTR_NAME_POSIX_ACL_DEFAULT,
55310         define them when needed.
55311         * m4/acl.m4 (gl_FILE_HAS_ACL): With that, Paul's
55312         GETXATTR_WITH_POSIX_ACLS change shouldn't be needed anymore.
55314 2015-05-27  Pádraig Brady  <P@draigBrady.com>
55316         string: fix build failure on BSD/OSX with FORTIFY_SOURCE
55317         This avoids a conflict with "FORTIFY_SOURCE" variants
55318         of the string functions when they're replaced on NetBSD-6.0.1
55319         and Darwin-14.3.0 at least.
55320         * lib/string.in.h: Avoid including our "lib/string.h" while
55321         including the system <string.h>.
55323 2015-05-26  Eric Blake  <eblake@redhat.com>
55325         stdio: limit __gnu_printf__ witness to gcc 4.4+
55326         * lib/error.h (_GL_ATTRIBUTE_SPEC_PRINTF): Move gcc version probe...
55327         * m4/stdio_h.m4 (gl_STDIO_H): ...here.
55329         error: use correct printf attributes on mingw
55330         * lib/stdio.in.h (_GL_ATTRIBUTE_SPEC_PRINTF): New define.
55332         inttypes: force correct mingw PRIdMAX even without <stdio.h>
55333         * modules/inttypes (Depends-on): Require extensions, so that mingw
55334         always uses GNU style inttypes.
55335         * lib/inttypes.in.h: On mingw, include <stdio.h>.
55337         stdio: fix probe on mingw under gcc 5.1
55338         * m4/stdio_h.m4 (gl_STDIO_H): Change to compile test, to work
55339         around new gcc preprocessor rules.
55341 2015-05-07  Glenn Morris  <rgm@gnu.org>
55343         gitlog-to-changelog: parse "Tiny-change"
55344         * build-aux/gitlog-to-changelog: Treat "Tiny-change" like
55345         "Copyright-paperwork-exempt".  (Bug#20324)
55347 2015-05-06  Pádraig Brady  <P@draigBrady.com>
55349         doc: document glibc posix_fallocate() issues
55350         * doc/posix-functions/posix_fallocate.texi: Mention the
55351         glibc efficiency problems and issues with NFS.
55353 2015-05-05  Karl Berry  <karl@freefriends.org>
55355         * build-aux/gendocs.sh (usage): document new css default
55356         for HTML (--htmlarg).
55358 2015-04-29  Paul Eggert  <eggert@cs.ucla.edu>
55360         extern-inline: no need for workaround in GCC 5.1
55361         * doc/extern-inline.texi (extern inline):
55362         * m4/extern-inline.m4 (gl_EXTERN_INLINE):
55363         GCC bugs 54113 and 63877 are fixed in GCC 5.1, so don't work
55364         around these bugs in GCC 5.1 and later.  Maybe in a decade or
55365         two we can remove these workarounds.
55367 2015-04-28  Pádraig Brady  <P@draigBrady.com>
55369         eealloc, pagealign_alloc, xalloc: avoid clang warnings
55370         Avoid [-Wunknown-attributes] warnings like:
55371         warning: unknown attribute '__alloc_size__' ignored
55372         * lib/xalloc.h: Don't use the __alloc_size__  attribute
55373         with clang, as support has been fully removed as of clang 3.5:
55374         https://github.com/llvm-mirror/clang/commit/c047507a
55375         * lib/eealloc.h: Likewise.
55376         * lib/pagealign_alloc.h: Likewise.
55378 2015-04-27  Paul Eggert  <eggert@cs.ucla.edu>
55380         tests: pacify GCC 5.1's stricter printf checking
55381         * tests/test-dirname.c (main):
55382         * tests/test-getaddrinfo.c (simple):
55383         * tests/test-getlogin.c (main):
55384         * tests/test-getndelim2.c (main):
55385         * tests/test-inttostr.c (CK):
55386         * tests/test-md5.c (main):
55387         * tests/test-read-file.c (main):
55388         * tests/test-sha1.c (main):
55389         Fix mismatches between printf format and value signedness.
55390         * tests/test-inttostr.c (FMT, CAST_VAL, V_min, V_max):
55391         Remove, as CAST_VAL always returned a value of type uintmax_t.
55393         fts: port to GCC 5.1 with --enable-gcc-warnings
55394         Without this fix, GCC 5.1 (correctly) warns about a subscript
55395         error on the fts_name component of FTSENT.  It's actually a
55396         flexible member, so define it that way on C99 or later hosts.
55397         * lib/fts.c (fts_alloc): Use offsetof, not sizeof, for a
55398         structure that now has a flexible array member.
55399         * lib/fts_.h (__FLEXIBLE_ARRAY_MEMBER): New macro.
55400         (FTSENT): fts_name is now flexible on C99-or-later platforms.
55401         * modules/fts (Depends-on): Add flexmember.
55403 2015-04-26  Paul Eggert  <eggert@cs.ucla.edu>
55405         file-has-acl: port to CentOS 6
55406         Problem reported by Tom G. Christensen in:
55407         http://lists.gnu.org/r/bug-gnulib/2015-04/msg00074.html
55408         * lib/file-has-acl.c: Use GETXATTR_WITH_POSIX_ACLS instead of a
55409         combination of HAVE_SYS_XATTR_H, HAVE_LINUX_XATTR_H, and
55410         HAVE_GETXATTR.
55411         * m4/acl.m4 (gl_FILE_HAS_ACL): Test fot the entire combination of
55412         linux/xattr.h, sys/xattr.h, getxattr, XATTR_NAME_POSIX_ACL_ACCESS,
55413         and XATTR_NAME_POSIX_ACL_DEFAULT, since that's what
55414         file-has-acl.c actually needs.
55416 2015-04-26  Pádraig Brady  <P@draigBrady.com>
55418         file-has-acl: always return false when ACLs aren't supported
55419         * lib/file-has-acl.c (file_has_acl): Consistent with other paths,
55420         change the GNU/Linux getxattr path, to transform "not supported"
55421         errors to a false return rather than an error.  This is handled
55422         within file_has_acl() due to the platform specific tests to
55423         determine if ACLs are not supported.
55425 2015-04-25  Paul Eggert  <eggert@cs.ucla.edu>
55427         gettext: propagate po/Makefile.in.in too
55428         * build-aux/po/Makefile.in.in: Copy from latest gettext.
55429         * config/srclist.txt: In build-aux/po, copy Makefile.in.in and
55430         remove-potcdate.sin from $GETTEXT.  This fixes a version mismatch
55431         between Makefile.in.in and the gettext-runtime m4 files.
55433 2015-04-24  Paul Eggert  <eggert@cs.ucla.edu>
55435         file-has-acl: new module, split from acl
55436         And add a new module file-has-acl-tests to match.
55437         I ran into a problem with the recent changes to the acl module,
55438         as they introduced a typo 'test use_xattrs = 0' into 'configure'.
55439         When using the fixed version with Emacs, I discovered that
55440         file-has-acl wasn't separated out well enough for Emacs (e.g., it
55441         had multiple libraries, but needed only one), so I fixed that too.
55442         * NEWS: Document this incompatible change.
55443         * modules/file-has-acl, modules/file-has-acl-tests: New files.
55444         * m4/acl.m4 (gl_FUNC_ACL_ARG): New macro, split from gl_FUNC_ACL.
55445         Initialize gl_need_lib_has_acl.
55446         (gl_FUNC_ACL): Require it.
55447         Simplify use of 'test'.  Set LIB_HAS_ACL if gl_need_lib_has_acl.
55448         Move the file-has-acl.c-relevant stuff to ...
55449         (gl_FILE_HAS_ACL): ... this new macro.  Rewrite to fix 'test
55450         use_xattrs = 0' typo, and omit some needless work.  Set
55451         gl_need_lib_has_acl=1 if we'll need LIB_HAS_ACL to be set
55452         when gl_FUNC_ACL is called.
55453         * modules/acl (Files, lib_SOURCES): Remove lib/file-has-acl.c.
55454         (Link): Remove $(LIB_HAS_ACL).
55455         * modules/acl-tests (Files, Depends-on, configure.ac, TESTS)
55456         (check_PROGRAMS): Move stuff relevant to file-has-acl to
55457         modules/file-has-acl-tests.
55458         (test_file_has_acl_LDADD): Move to modules/file-has-acl-tests.
55460         manywarnings: add GCC 5.1 warnings
55461         * build-aux/gcc-warning.spec: Add -Wabi=, -Warray-bounds,
55462         -Warray-bounds=, -Wc++14-compat, -Wc90-c99-compat,
55463         -Wc99-c11-compat, -Wshadow-ivar, -Wsized-deallocation,
55464         -Wsuggest-override, -Wuse-without-only.  Change
55465         -Wnormalized=... operands to match 5.1.
55466         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Add -Wbool-compare,
55467         -Wchkp, -Wdesignated-init, -Wdiscarded-array-qualifiers,
55468         -Wdiscarded-qualifiers, -Wformat-signedness,
55469         -Wincompatible-pointer-types, -Wint-conversion,
55470         -Wlogical-not-parentheses, -Wmemset-transposed-args, -Wodr,
55471         -Wshift-count-negative, -Wshift-count-overflow,
55472         -Wsizeof-array-argument, -Wsuggest-final-methods,
55473         -Wsuggest-final-types, -Wswitch-bool.  Remove -Warray-bounds,
55474         and add -Warray-bounds=2 as a special case.
55476 2015-04-21  Simon Josefsson  <simon@josefsson.org>
55478         doc: update FDL template to match FDL examples.
55479         * doc/alloca-opt.texi:
55480         * doc/alloca.texi:
55481         * doc/c-ctype.texi:
55482         * doc/c-strcase.texi:
55483         * doc/c-strcaseeq.texi:
55484         * doc/c-strcasestr.texi:
55485         * doc/c-strstr.texi:
55486         * doc/c-strtod.texi:
55487         * doc/c-strtold.texi:
55488         * doc/ctime.texi:
55489         * doc/error.texi:
55490         * doc/gcd.texi:
55491         * doc/gnulib-tool.texi:
55492         * doc/inet_ntoa.texi:
55493         * doc/intprops.texi:
55494         * doc/lib-symbol-visibility.texi:
55495         * doc/maintain.texi:
55496         * doc/parse-datetime.texi:
55497         * doc/quote.texi:
55498         * doc/regexprops-generic.texi:
55499         * doc/standards.texi: Remove spurious 'with' in FDL license
55500         template.
55502 2015-04-21  Paul Eggert  <eggert@cs.ucla.edu>
55504         lstat: fix cross-compilation 'ln -s' problem
55505         * m4/lstat.m4 (gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK):
55506         Have the test program call 'symlink' rather than a separate
55507         script run 'ln -s'; this is more likely to work in
55508         cross-compilation environments.  Reported by Pavel Fedin in:
55509         http://lists.gnu.org/r/bug-gnulib/2015-04/msg00060.html
55511 2015-04-16  Ludovic Courtès  <ludo@gnu.org>
55513         gendocs.sh: default to a common CSS style sheet for HTML output
55514         * build-aux/gendocs.sh (htmlarg): Change default value.
55516 2015-04-15  Mats Erik Andersson  <gnu@gisladisker.se>
55518         gnulib-tool: output bold attribute more portably
55519         * gnulib-tool (func_show_module_list): Change hexadecimal
55520         numbers to octal in BOLD_ON and BOLD_OFF.  The use of hex
55521         encoded numbers as arguments to `printf' is not portable,
55522         and is not claimed by POSIX.  This is the case with FreeBSD.
55524 2015-04-15  Andreas Gruenbacher  <andreas.gruenbacher@gmail.com>
55526         qacl: Simplify HP-UX acl_nontrivial check
55527         * lib/acl-internal.c: Remove struct stat parameter from HP-UX's version of
55528         acl_nontrivial. Check if the acl has at most three entries instead (it must
55529         have exactly three entries according to the HP-UX documentation). Ignore
55530         uids and gids as long as an entry is either for a user (i.e., the owner),
55531         a group (i.e., the owning group), or others.
55532         * lib/acl-internal.h: Change HP-UX's acl_nontrivial prototype.
55533         * lib/qcopy-acl.c (qcopy_acl): With that, we no longer need to stat the file.
55535 2015-04-15  Andreas Gruenbacher   <andreas.gruenbacher@gmail.com>
55537         acl: On Linux, check for acls without libacl
55538         On Linux, use the getxattr syscall instead of the acl_extended_file libacl
55539         library function to check for the presence of acls, avoiding a library.
55540         * lib/file-has-acl.c: Include xattr headers if we have them.
55541         (file_has_acl): On Linux, use getxattr().
55542         * m4/acl.m4 (gl_FUNC_ACL): Define LIB_HAS_ACL as the libraries to link with for
55543         file_has_acl(). Check for xattr headers and getxattr().
55545 2015-04-14  Ángel González  <keisial@gmail.com>
55547         tempname: avoid unused parameter warnings (trivial)
55548         * lib/tempname.c (try_dir): Tag with __GL_UNUSED.
55549         (try_nocreate): Likewise.
55551 2015-04-14  HIRAMATSU Yoshifumi  <hiramatu@boreas.dti.ne.jp>
55553         fseeko: fix build failure on NetBSD >= 6 (trivial)
55554         * lib/fseeko.c (feeko): NetBSD 6 changed the definition of _offset
55555         from 'fpos_t struct' to __off_t, which is a typedef of __int64_t.
55557 2015-04-09  Paul Eggert  <eggert@cs.ucla.edu>
55559         gitlog-to-changelog: port to MS-Windows
55560         * build-aux/gitlog-to-changelog (git_dir_option):
55561         Use strftime with "%Y-%m-%d", not "%F", to avoid a bug in
55562         MS-Windows Perl.  Reported by Eli Zaretskii in:
55563         http://lists.gnu.org/r/emacs-devel/2015-04/msg00504.html
55565 2015-04-07  Karl Berry  <karl@gnu.org>
55567         gendocs: new option --tex for passing args to texi2dvi.
55568         * build-aux/gendocs.sh: new option --tex, default -t @finalout.
55569         (TEXI2DVI): cut to just command name.
55570         (usage): mention new option, and update copyright.
55571         <generate_tex>: use it.
55573 2015-04-07  Karl Berry  <karl@gnu.org>
55575         * config/srclistvars.sh (GETTEXT): new definition.
55576         * config/srclist.txt: use it for gettext .m4 files.
55577         Thread starting at http://lists.gnu.org/r/bug-gnulib/201
55578         and confirmed at http://lists.gnu.org/r/bug-gnulib/2015-02/msg00146.html
55579         and continuing into April.
55581 2015-04-07  Daiki Ueno  <ueno@gnu.org>
55583         uniname/uniname-tests: fix failure due to alias
55584         Reported by Jack Howarth in:
55585         <https://lists.gnu.org/r/bug-libunistring/2015-04/msg00000.html>.
55586         * tests/uniname/test-uninames.c (name_has_alias): New function.
55587         (test_inverse_lookup): Exclude character name with valid alias,
55588         from randomly generated character names.
55589         (main): Fill unicode_aliases before calling test functions.
55591 2015-04-03  Giuseppe Scrivano  <gscrivan@redhat.com>
55593         hash: remove deprecated hash_insert0 function
55594         * lib/hash.h (hash_insert0): Remove deprecated function.
55595         * lib/hash.c (hash_insert0): Likewise.
55597 2015-04-02  Pádraig Brady  <P@draigBrady.com>
55599         mountlist: remove dependency on libmount
55600         * lib/mountlist.c (read_file_system_list): Parse /proc/self/mountinfo
55601         directly, rather than depending on libmount, which has many
55602         dependencies due to its dependence on libselinux, as detailed at:
55603         http://lists.gnu.org/r/bug-gnulib/2015-01/msg00063.html
55604         Note we restrict this to __linux__ as that's probably where this
55605         interface will remain.  If ever porting, it would be best
55606         to first pull the makedev() wrapper from coreutils to a gnulib module.
55607         Note also we don't add a getline dependency to the mountlist module,
55608         as all Linux versions are sufficient.
55610 2015-04-02  Paul Eggert  <eggert@cs.ucla.edu>
55612         stddef: port to pre-C11 GCC on x86
55613         On this platform, max_align_t should have an alignment of 8 even
55614         though the storage alignments of double, long, etc. max out at 4.
55615         Inspired by a comment of Andreas Schwab's here:
55616         https://sourceware.org/ml/libc-alpha/2015-04/msg00017.html
55617         * lib/stddef.in.h (_GL_STDDEF_ALIGNAS) [!HAVE_MAX_ALIGN_T]: New macro.
55618         (max_align_t) [!HAVE_MAX_ALIGN_T]: Use it.
55619         * tests/test-stddef.c: Test __alignof__ too, if available.
55621 2015-03-24  Pádraig Brady  <P@draigBrady.com>
55623         quotearg-simple-tests: add missing gl_FUNC_MMAP_ANON dependency
55624         * modules/quotearg-simple-tests: Reference m4/mmap-anon.m4
55626 2015-03-24  Tobias Stoeckmann  <tobias@stoeckmann.org>
55628         yesno: make EOL optional in ENABLE_NLS case also (trival)
55629         * lib/yesno.c (yesno): Check for EOL before replacing.
55630         * tests/test-yesno.sh: Add a test case (test along with gettext).
55632 2015-03-22  Paul Eggert  <eggert@cs.ucla.edu>
55634         fdopendir-tests: test it does not close its arg
55635         * tests/test-fdopendir.c (main): Test that fdopendir does not
55636         close its argument.  From a suggestion by David Grayson in:
55637         http://lists.gnu.org/r/bug-gnulib/2015-03/msg00039.html
55639 2015-03-20  Paul Eggert  <eggert@cs.ucla.edu>
55641         gitlog-to-changelog: trim trailing white space
55642         * build-aux/gitlog-to-changelog (main):
55643         Trim trailing white space from commit message lines.
55644         This is helpful for processing the GNU Emacs repository,
55645         which dates back to 1985 and contains a lot of such lines.
55647         gitlog-to-changelog: new option --ignore-matching
55648         * build-aux/gitlog-to-changelog (usage, git_dir_option, main):
55649         Support new option --ignore-matching=PAT, which ignores all
55650         commit messages whose first line matches PAT.
55652 2015-03-19  Paul Eggert  <eggert@cs.ucla.edu>
55654         fdopendir: port better to MinGW
55655         * lib/fdopendir.c (fd_clone_opendir) [REPLACE_FCHDIR]:
55656         Use 'dup' if dirfd fails.  Suggested by Eli Zaretskii in:
55657         http://lists.gnu.org/r/bug-gnulib/2015-03/msg00033.html
55658         * modules/fdopendir (Depends-on): Add dirfd.
55660 2015-03-18  Paul Eggert  <eggert@cs.ucla.edu>
55662         fdopendir: fix typo in comment
55663         * lib/fdopendir.c (fdopendir_with_dup): REPLACE_FCHDIR was misspelled.
55665 2015-03-09  Eric Blake  <eblake@redhat.com>
55667         error: document all entry points provided
55668         * doc/glibc-functions/error_print_progname.texi
55669         (error_print_progname): Mention the error module.
55670         * doc/glibc-functions/error_at_line.texi (error_at_line):
55671         Likewise.
55672         * doc/glibc-functions/error_message_count.texi
55673         (error_message_count): Likewise.
55674         * doc/glibc-functions/error_one_per_line.texi
55675         (error_one_per_line): Likewise.
55677 2015-03-03  Paul Eggert  <eggert@cs.ucla.edu>
55679         vasnprintf: pacify clang 3.5.0
55680         Problem reported by Werner Lemberg in:
55681         http://lists.gnu.org/r/bug-gnulib/2015-03/msg00000.html
55682         * lib/vasnprintf.c (VASNPRINTF): Omit casts that clang objects to.
55683         The casts aren't needed, since the characters in question are ASCII.
55685 2015-02-24  Paul Eggert  <eggert@cs.ucla.edu>
55687         glob, etc.: port to MSVC v18 on MS-Windows 8.1
55688         * lib/dirent--.h (GNULIB_defined_opendir):
55689         * lib/dirent.in.h (GNULIB_defined_opendir)
55690         (GNULIB_defined_closedir):
55691         * lib/getcwd.c, lib/glob.c, lib/mountlist.c (opendir, closedir):
55692         #undef only if Gnulib defined it.
55694         poll: port to MSVC v18 on MS-Windows 8.1
55695         Problem reported by Gisle Vanem in:
55696         http://lists.gnu.org/r/bug-gnulib/2015-02/msg00139.html
55697         * lib/poll.c: Always include <sys/select.h> and <sys/socket.h>.
55698         * modules/poll (Depends-on) [!HAVE_POLL || REPLACE_POLL]:
55699         Add sys_socket.
55701 2015-02-24  Pádraig Brady  <P@draigBrady.com>
55703         tests: support stderr verification with returns_()
55704         * tests/init.sh (returns_): Disable tracing for this wrapper
55705         function, so that stderr of the wrapped command is unchanged,
55706         allowing for verification of the contents.
55708 2015-02-24  Pavel Hrdina  <phrdina@redhat.com>
55710         passfd: avoid valgrind uninitalised data warning
55711         * lib/passfd.c (sendfd): Reset the msg_controllen of msghdr,
55712         to include just the fd we've initialized, rather than including
55713         the extra space used for alignment.
55715 2015-02-23  Paul Eggert  <eggert@cs.ucla.edu>
55717         uniwbrk/u32-wordbreaks-tests: fix copyright
55718         * tests/uniwbrk/test-uc-wordbreaks.c: Fix copyright date.
55720         dup2: doc and test for Android bug
55721         Reported by Kevin Cernekee in:
55722         http://lists.gnu.org/r/bug-gnulib/2015-02/msg00125.html
55723         * doc/posix-functions/dup2.texi (dup2): Document the bug.
55724         * m4/dup2.m4 (gl_FUNC_DUP2): Test for the bug.
55726 2015-02-23  Kevin Cernekee  <cernekee@google.com>
55728         Replace dup2() on Android
55729         * m4/dup2.m4 (gl_FUNC_DUP2): Android implements dup2() using dup3().
55730         Since dup3(fd, fd) fails but dup2(fd, fd) should pass, test-dup2
55731         fails.  Using rpl_dup2() fixes this because it has an explicit test
55732         for this condition.
55734 2015-02-22  Paul Eggert  <eggert@cs.ucla.edu>
55736         Android doesn't define RLIM_SAVED_*
55737         Portability problem reported by Kevin Cernekee in:
55738         http://lists.gnu.org/r/bug-gnulib/2015-02/msg00122.html
55739         * doc/posix-headers/sys_resource.texi (sys/resource.h):
55740         Mention the portability problem.
55741         * lib/getdtablesize.c (RLIM_SAVED_CUR, RLIM_SAVED_MAX):
55742         Define if not defined.
55743         * m4/dup2.m4 (gl_FUNC_DUP2):
55744         * m4/fcntl.m4 (gl_FUNC_FCNTL):
55745         Likewise.
55747 2015-02-21  Paul Eggert  <eggert@cs.ucla.edu>
55749         vasnprintf-posix-tests: use consistent test
55750         * tests/test-vasnprintf-posix.c (test_function):
55751         Use "<" in assert instead of "<=", for consistency with other tests.
55753 2015-02-20  Paul Eggert  <eggert@cs.ucla.edu>
55755         printf, isinf, etc.: noncanonical != NaN
55756         Do not require that isinf, printf, etc. treat noncanonical
55757         values as NaNs.  Instead, require only that they do not crash.
55758         Problem reported by Joseph Myers in:
55759         https://sourceware.org/ml/libc-alpha/2015-02/msg00244.html
55760         * doc/posix-functions/dprintf.texi (dprintf):
55761         * doc/posix-functions/fprintf.texi (fprintf):
55762         * doc/posix-functions/isfinite.texi (isfinite):
55763         * doc/posix-functions/isinf.texi (isinf):
55764         * doc/posix-functions/isnan.texi (isnan):
55765         * doc/posix-functions/printf.texi (printf):
55766         * doc/posix-functions/snprintf.texi (snprintf):
55767         * doc/posix-functions/sprintf.texi (sprintf):
55768         * doc/posix-functions/vdprintf.texi (vdprintf):
55769         * doc/posix-functions/vfprintf.texi (vfprintf):
55770         * doc/posix-functions/vprintf.texi (vprintf):
55771         * doc/posix-functions/vsnprintf.texi (vsnprintf):
55772         * doc/posix-functions/vsprintf.texi (vsprintf):
55773         Document this.
55774         * m4/isfinite.m4 (gl_ISFINITEL_WORKS):
55775         * m4/isinf.m4 (gl_ISINFL_WORKS):
55776         * m4/isnanl.m4 (gl_FUNC_ISNANL_WORKS):
55777         * m4/printf.m4 (gl_PRINTF_INFINITE_LONG_DOUBLE):
55778         * tests/test-isfinite.c (test_isfinitel):
55779         * tests/test-isinf.c (test_isinfl):
55780         * tests/test-isnan.c (test_long_double):
55781         * tests/test-isnanl.h (main):
55782         * tests/test-snprintf-posix.h (test_function):
55783         * tests/test-sprintf-posix.h (test_function):
55784         * tests/test-vasnprintf-posix.c (test_function):
55785         * tests/test-vasprintf-posix.c (test_function):
55786         Test only that noncanonical values do not cause crashes, not that
55787         they are treated as NaNs.  In some cases this means a larger
55788         output buffer is needed.
55790 2015-02-20  Jaroslav Skarvada  <jskarvad@redhat.com>
55792         fts: remove redundant close() (trivial)
55793         * lib/fts.c (fts_read): Remove redundant call to close().
55794         Spotted by coverity.
55796 2015-02-20  Paul Eggert  <eggert@cs.ucla.edu>
55798         getdtablesize: port better for Android
55799         Problem reported by Kevin Cernekee in:
55800         http://lists.gnu.org/r/bug-gnulib/2015-02/msg00112.html
55801         * doc/glibc-functions/getdtablesize.texi (getdtablesize): Mention bug.
55802         * lib/getdtablesize.c (getdtablesize): Don't fall back on _SC_OPEN_MAX.
55803         Instead, just use getrlimit, taking care to avoid Cygwin bug.
55805         poll: fixes for large fds
55806         * lib/poll.c (poll): Don't check directly for NFD too large.
55807         Don't rely on undefined behavior in FD_SET when an arg exceeds
55808         FD_SETSIZE.  Always set revents afterwards, even if to zero.
55809         * tests/test-poll.c (poll1): Set revents to -1 instead of 0,
55810         as that makes the test a bit stricter.
55812 2015-02-19  Kevin Cernekee  <cernekee@google.com>
55814         fcntl: Fix cross compiling
55815         * m4/fcntl.m4 (gl_FUNC_FCNTL): Assign the guessed result to the
55816         correct variable name (gl_cv_func_fcntl_f_dupfd_works).
55818 2015-02-18  Paul Eggert  <eggert@cs.ucla.edu>
55820         dup2, fcntl: cross-compile better for Android
55821         Problem reported by Kevin Cernekee in:
55822         http://lists.gnu.org/r/bug-gnulib/2015-02/msg00109.html
55823         * m4/dup2.m4 (gl_FUNC_DUP2): Don't guess no when cross-compiling
55824         for a Linux kernel.  That kernel bug was fixed on 2009-05-11, and
55825         there's little need to cross-compile for older kernels nowadays.
55826         * m4/fcntl.m4 (gl_FUNC_FCNTL): When cross-compiling, guess no only
55827         for systems where the bug is known to occur (AIX, Cygwin, Haiku).
55829 2015-02-18  Pádraig Brady  <P@draigBrady.com>
55831         getopt: don't crash on memory exhaustion
55832         * lib/getopt.c (_getopt_internal_r): Use degraded diagnostics on
55833         memory exhaustion.  In the _LIBC case we use alloca() as is
55834         already done in glibc, so we don't need to consider the separate
55835         error path in that awkward case.  Also fix a memory leak when
55836         ambiguous options are present.
55837         Reported by Tobias Stoeckmann
55839 2015-02-17  Mike Miller  <mtmiller@ieee.org>
55841         tempname: allow compilation with C++ (trivial)
55842         * lib/tempname.h [C++]: Specify extern "C" linkage.
55843         * lib/tempname.h (try_tempname):
55844         * lib/tempname.c (__try_tempname, __gen_tempname):
55845         Rename 'try' to 'tryfunc'.
55847 2015-02-17  Paul Eggert  <eggert@cs.ucla.edu>
55849         dup2, fcntl: port to AIX
55850         * m4/dup2.m4 (gl_FUNC_DUP2):
55851         * m4/fcntl.m4 (gl_FUNC_FCNTL):
55852         Prefer getrusage (RLIM_NOFILE ...)/rlim_cur to sysconf (_SC_OPEN_MAX).
55853         The former works on AIX 7.1 but the latter does not.
55854         Also, this may work better with Android; see:
55855         http://lists.gnu.org/r/bug-gnulib/2015-02/msg00100.html
55857 2015-02-16  Paul Eggert  <eggert@cs.ucla.edu>
55859         getdtablesize, dup2, fcntl: port to Android
55860         Problem reported by Kevin Cernekee in:
55861         http://lists.gnu.org/r/bug-gnulib/2015-02/msg00092.html
55862         * doc/glibc-functions/getdtablesize.texi (getdtablesize):
55863         Mention that getdtablesize doesn't work on Android.
55864         * lib/getdtablesize.c: Use getrlimit substitute only if
55865         getdtablesize is declared.  This should suffice for Cygwin
55866         while not breaking Android.
55867         * m4/dup2.m4 (gl_FUNC_DUP2):
55868         * m4/fcntl.m4 (gl_FUNC_FCNTL):
55869         Prefer sysconf (_SC_OPEN_MAX) to getdtablesize, as the former is
55870         standardized but the latter is not, and sysconf works on Android.
55871         * m4/getdtablesize.m4 (gl_FUNC_GETDTABLESIZE):
55872         Also check that getdtablesize is declared.
55873         This removes the need for a special case for Android.
55875 2015-02-16  Kevin Cernekee  <cernekee@google.com>
55877         localename: Implement gl_locale_name_thread_unsafe for Android
55878         * lib/localename.c: Android API level >= 21 supports two hardcoded
55879         locales: C (POSIX) and C.UTF-8.  Distinguish them by checking
55880         the internal __locale_t struct.
55882 2015-02-16  Kamil Dudka  <kdudka@redhat.com>
55884         fts: avoid crash when a cycle is added while traversing
55885         This could be triggered by auto-mounting a recursive bind mount.
55886         Reported by Michael Chapman in: https://bugzilla.redhat.com/1188498
55887         * lib/fts.c (fts_read): Avoid removing the original hash table item
55888         when leaving a directory that caused a cycle, and preserve the FTS_DC
55889         flag.
55891 2015-02-16  Daiki Ueno  <ueno@gnu.org>
55893         uniname/uniname: support character alias
55894         * lib/uniname/gen-uninames.lisp (main): New argument ALIASFILE.
55895         Generate one-way mapping from aliases to codepoints in the
55896         generated tables.  Special case variation selectors to reduce
55897         table size.
55898         * lib/uniname/uniname.c (unicode_character_name): Special case
55899         variation selectors.
55900         (unicode_name_character): Special case variation selectors and
55901         their aliases.
55902         * lib/uniname/uninames.h: Regenerate.
55903         * tests/uniname/NameAliases.txt: New file, taken from UCD 7.0.0.
55904         * modules/uniname/uniname-tests (Files): Add
55905         tests/uniname/NameAliases.txt.
55906         * tests/uniname/test-uninames.c: Mark as static.
55907         (ALIASLEN): Define.
55908         (struct unicode_alias): New struct.
55909         (unicode_aliases): New variable.
55910         (fill_aliases): New function.
55911         (test_alias_lookup): New test function.
55912         (main): Run the 'test_alias_lookup' test if the second argument is
55913         given.
55914         * tests/uniname/test-uninames.sh: Supply NameAliases.txt as the
55915         second argument.
55917 2015-02-11  Kevin Cernekee  <cernekee@google.com>
55919         Fix FILE struct compatibility with Android API level >= 21
55920         * lib/stdio-impl.h: Test explicitly for __ANDROID__ instead of
55921         __sferror.  Recent versions of Bionic's stdio.h no longer define
55922         __sferror.
55923         * lib/fbufmode.c: Likewise.
55924         * lib/fflush.c: Likewise.
55925         * lib/fpurge.c: Likewise.
55926         * lib/freadable.c: Likewise.
55927         * lib/freadahead.c: Likewise.
55928         * lib/freading.c: Likewise.
55929         * lib/freadptr.c: Likewise.
55930         * lib/freadseek.c: Likewise.
55931         * lib/fseeko.c: Likewise.
55932         * lib/fseterr.c: Likewise.
55933         * lib/fwritable.c: Likewise.
55935         Assume unbroken ungetc() on Android
55936         * m4/ungetc.m4: Add Android case to host OS check.  The ungetc()
55937         test case passed when running on an Android host, and the code
55938         hasn't really changed since 2009.
55940         getdtablesize: Fix Android build
55941         * m4/getdtablesize.m4: Add Android case to host OS check.  Recent NDK
55942         versions have this symbol in the .so library (at least 32-bit
55943         platforms) but are missing the declaration in the header file,
55944         causing the m4 logic to guess incorrectly.
55946         localename: Fix Android build
55947         * modules/localename (Depends-on): Add langinfo.
55949         getugroups: Fix Android build
55950         * lib/getugroups.c: Don't reference unsupported {get,set,end}grent
55951         functions.
55953         euidaccess: Fix Android build
55954         * modules/euidaccess (Depends-on): Add fcntl-h to ensure that
55955         AT_EACCESS gets declared.
55957         linkat_nofollow: Add fallback case for cross compiling
55958         * m4/linkat.m4: Guess no for Darwin, yes otherwise.
55960         net_if: Handle content-free <net/if.h> system headers
55961         * m4/net_if_h.m4: Check to make sure <net/if.h> actually defines
55962         struct if_nameindex.  If not, enable the replacement header.
55964         signal_h: Fix Android build
55965         * lib/signal.in.h: Add Android to the list of platforms that declare
55966         pthread_sigmask() in <pthread.h> instead of <signal.h>.
55968         duplocale: Fix Android build of duplocale-tests
55969         * modules/duplocale-tests (Depends-on): Add langinfo, as the header
55970         is included by test-duplocale.c (but not by duplocale.c).
55971         * modules/duplocale-tests (configure.ac): Check for monetary.h.
55972         * tests/test-duplocale.c: Skip test if monetary.h is absent.
55973         * doc/posix-headers/monetary.texi: Add Android to the list of
55974         platforms missing monetary.h.
55976 2015-02-11  Pádraig Brady  <P@draigBrady.com>
55978         tests: avoid recent -Werror=unused-variable regression in test-locale
55979         * tests/test-locale.c (main): Reference the variable to avoid the
55980         "unused variable" warning.
55982 2015-02-11  Pádraig Brady  <P@draigBrady.com>
55984         maint: various whitespace cleanups in tempname
55985         * lib/tempname.c: Normalize spacing and line length.
55986         * lib/tempname.h: Likewise.
55987         * modules/tempname: Likewise.
55989 2015-02-11  Pádraig Brady  <P@draigBrady.com>
55991         tests: provide returns_() to simplify exit status checking
55992         * tests/init.sh (returns_): A new function for use in tests,
55993         to allow for easier checking of return values, where you expect
55994         a command to exit with failure status.  By checking for a particular
55995         exit code, you don't hide any crashes for example.
55997 2015-02-11  Pádraig Brady  <P@draigBrady.com>
55999         mountlist: only use libmount when specified
56000         There are currently many shared libs dependencies introduced by
56001         libmount with associated runtime and virt mem overhead.
56002         Therefore don't enable by default.
56003         * m4/ls-mntd-fs.m4: Use --with-libmount to enable at build time.
56005 2015-02-08  Daiki Ueno  <ueno@gnu.org>
56007         uniname/unimame-tests: don't link with -lunistring
56008         * modules/uniname/uniname-tests (Makefile.am): Don't link against
56009         $(LIBUNISTRING).  Document the rationale why we need to
56010         conditionalize the test.
56012 2015-02-07  Paul Eggert  <eggert@cs.ucla.edu>
56014         fstrcmp: don't assume strlen < INT_MAX
56015         * lib/fstrcmp.c: Include stddef.h and stdint.h.
56016         (uintptr_t): Remove, as we're now assuming stdint.
56017         (OFFSET, EXTRA_CONTEXT_FIELDS, fstrcmp_bounded):
56018         Prefer ptrdiff_t to int when the value could exceed INT_MAX
56019         if the input string is long.
56020         (fstrcmp_bounded): Check for size-calculation overflow.  Prefer
56021         uintptr_t to size_t when the underlying value is a pointer casted
56022         to an unsigned integer.  Avoid unnecessary 'buffer != NULL' test.
56023         * modules/fstrcmp (Depends-on): Add stdint.
56025         diffseq: prefer ptrdiff_t to ssize_t
56026         * lib/diffseq.h: In commentary, prefer ptrdiff_t to ssize_t.
56027         ptrdiff_t is the natural type for signed indexes.
56028         On a few older platforms, ssize_t is narrower than size_t.
56030         xalloc: fix typo that suppressed warnings
56031         * lib/xalloc.h: Add missing _GL_INLINE_HEADER_END.
56032         This typo, introduced a couple of years ago, mistakenly suppressed
56033         some -Wsuggest-attribute=const, -Wmissing-prototypes, and
56034         -Wmissing-declarations warnings.
56036         full-read: fix license notice typo
56037         * lib/full-read.h: Remove a stray line in the license notice.
56038         Reported by Sam Ellis in: http://bugs.gnu.org/19808
56040         crypto/gc: fix a -Wswitch warning
56041         Reported by Bruce Korb in:
56042         http://lists.gnu.org/r/bug-gnulib/2015-02/msg00046.html
56043         * lib/gc-gnulib.c (gc_hash_open): Fail faster if MODE is nonzero.
56045 2015-02-03  Pádraig Brady  <P@draigBrady.com>
56047         gnulib-tool: fix handling of patch(1) diagnostics
56048         * gnulib-tool: Send diagnostics from patch(1) to stderr,
56049         as otherwise gnulib-tool will reparse that output and attempt
56050         to lookup modules.
56052 2015-02-03  Pádraig Brady  <P@draigBrady.com>
56054         bootstrap: exit immediately upon gnulib-tool failure
56055         * build-aux/bootstrap: Exit immediately if gnulib-tool fails.
56056         This was noticed when gnulib-tool exited early due to failure
56057         to apply a patch in coreutils at http://hydra.nixos.org/eval/1172233,
56058         but various confusing errors were then given as the build proceeded.
56060 2015-02-02  Andreas Gruenbacher  <agruen@gnu.org>
56062         symlinkat: include all required header files
56063         * lib/symlinkat.c (HAVE_SYMLINK_AT): Add <sys/stat.h> for fstatat(),
56064         and string.h for strlen(), required at least on OS X 10.10 (Yosemite).
56065         Reported at https://savannah.gnu.org/bugs/index.php?44151
56066         and by Jack Howarth.
56068 2015-01-29  Pádraig Brady  <P@draigBrady.com>
56070         localename: support Solaris 12 and illumos
56071         * lib/localename.c (gl_locale_name_thread_unsafe): call
56072         getlocalename_l() on newer __sun platforms.
56073         Reported by Alexander Pyhalov.
56074         Fix suggested by Rich Burridge.
56076 2015-01-29  Alexander Pyhalov  <alp@rsu.ru>
56078         locale: fix tests on illumos (trivial)
56079         * tests/test-locale.c: LC_GLOBAL_LOCALE is a function call on illumos,
56080         so move from global scope to main().
56082 2015-01-24  Daiki Ueno  <ueno@gnu.org>
56084         unictype: avoid undefined left-shift behavior
56085         * lib/unictype/bidi_of.c (uc_bidi_class): Building libunistring with
56086         gcc's -fsanitize=shift and running its tests triggered:
56087           unictype/bidi_of.c:43:60: runtime error: left shift of 40167 by 16 \
56088             places cannot be represented in type 'int'
56089         Cast LHS to 'unsigned int' after integer promotion.
56090         * lib/unictype/categ_of.c (lookup_withtable): Likewise.
56091         * lib/unictype/joininggroup_of.c (uc_joining_group): Likewise.
56093 2015-01-20  Daiki Ueno  <ueno@gnu.org>
56095         libunistring: bump version of unitypes dependants
56096         Due to the header file search order, all the headers which depend
56097         on unitypes.h need to be generated, when the preinstalled
56098         libunistring is older.
56099         * modules/unicase/base (configure.ac): Bump minimum version to
56100         0.9.4.
56101         * modules/uniconv/base (configure.ac): Likewise.
56102         * modules/unilbrk/base (configure.ac): Likewise.
56103         * modules/uninorm/base (configure.ac): Likewise.
56104         * modules/unistdio/base (configure.ac): Likewise.
56105         * modules/unistr/base (configure.ac): Likewise.
56106         * modules/uniwbrk/base (configure.ac): Likewise.
56107         * modules/uniwidth/base (configure.ac): Likewise.
56109 2015-01-20  Daiki Ueno  <ueno@gnu.org>
56111         unictype/category-none: fix link with libunistring
56112         Since _UC_CATEGORY_NONE is not a public symbol, it will be
56113         prefixed with "libstring_" when compiled as part of libunistring.
56114         To avoid undefined symbol at link time, increase the minimum
56115         version when the dependant modules are updated.
56116         * modules/unictype/category-none (configure.ac): Bump minimum
56117         version to 0.9.5.
56119 2015-01-20  Daiki Ueno  <ueno@gnu.org>
56121         unitypes: fix build with installed libunistring
56122         The minimum version has not bumped after _UC_ATTRIBUTE_CONST and
56123         _UC_ATTRIBUTE_PURE were added to unitypes.in.h.
56124         * modules/unitypes (configure.ac): Bump minimum version to 0.9.4.
56126 2015-01-15  Paul Eggert  <eggert@cs.ucla.edu>
56128         time: port to MinGW32 3.21
56129         Problem reported by Eli Zaretskii in:
56130         http://lists.gnu.org/r/bug-gnulib/2015-01/msg00042.html
56131         * lib/time.in.h:
56132         * m4/time_h.m4 (gl_CHECK_TYPE_STRUCT_TIMESPEC):
56133         * modules/time (Depends-on):
56134         Fall back on unistd.h if the other include files don't define
56135         struct timespec.
56137         update-copyright: apply to self
56138         * build-aux/update-copyright: Fix copyright date.  How ironic!
56140 2015-01-15  Daiki Ueno  <ueno@gnu.org>
56142         libunistring: update to Unicode 7.0.0
56143         * lib/unictype/joininggroup_byname.gperf: Add Straight Waw and
56144         Manichaean names.
56145         * lib/unictype/joininggroup_name.h: Likewise.
56146         * lib/unictype.in.h (UC_JOINING_GROUP_STRAIGHT_WAW)
56147         (UC_JOINING_GROUP_MANICHAEAN_ALEPH): New enumeration values.
56148         * lib/gen-uni-tables.c (UC_JOINING_GROUP_STRAIGHT_WAW)
56149         (UC_JOINING_GROUP_MANICHAEAN_*): New enumeration values.
56150         (fill_arabicshaping, joining_group_as_c_identifier): Support those
56151         enum values.
56152         (is_property_alphabetic): Accept newly added characters to
56153         cuneiform numeric signs.
56154         (is_property_default_ignorable_code_point): Reject U+0605.
56155         (FIELDLEN): Increase from 120 to 160.
56156         * lib/uniwidth/width.c (nonspacing_table_data): Add U+0605,
56157         U+08FF, U+0C00, U+0C81, U+0D01, U+1AB0..U+1ABE, U+1BAC..U+1BAD,
56158         U+1CF8..U+1CF9, U+1DE7..U+1DF5, U+A9E5, U+AA7C, U+FE27..U+FE2D,
56159         U+102E0, U+10376..U+1037A, U+10AE5..U+10AE6, U+1107F, U+11173,
56160         U+1122F..U+11231, U+11234, U+11236..U+11237, U+112DF,
56161         U+112E3..U+112EA, U+11301, U+1133C, U+11340, U+11366..U+1136C,
56162         U+11370..U+11374, U+114B3..U+114B8, U+114BA, U+114BF..U+114C0,
56163         U+114C2..U+114C3, U+115B2..U+115B5, U+115BC..U+115C0,
56164         U+11633..U+1163A, U+1163D, U+1163F..U+11640, U+16AF0..U+16AF4,
56165         U+16B30..U+16B36, U+1BC9D..U+1BC9E, U+1BCA0..U+1BCA3, and
56166         U+1E8D0..U+1E8D6.
56167         (uc_width): Adjust nonspacing_table_ind boundary from 240 to 248.
56168         * tests/uniwidth/test-uc_width2.sh: Same updates as in
56169         lib/uniwidth/width.c.
56170         * all generated files under lib/uni* and tests/uni*: Regenerate.
56172 2015-01-14  Daiki Ueno  <ueno@gnu.org>
56174         libunistring: update to Unicode 6.3.0
56175         * lib/uniwbrk.in.h (WBP_DQ, WBP_SQ, WBP_HL): New enumeration values.
56176         * lib/uniwbrk/u-wordbreaks.h (FUNC): Support WB7a, WB7b, and WB7c.
56177         Update WB5, WB6, WB7, WB9, WB11, WB12, WB13a, and WB13b.
56178         * lib/uniwbrk/wbrktable.h (uniwbrk_table): Adjust table size.
56179         * lib/uniwbrk/wbrktable.c (uniwbrk_table): Support rule WB7a.
56180         Update WB5, WB9, WB10, WB13a, and WB13b.
56181         * tests/uniwbrk/test-uc-wordbreaks.c
56182         (wordbreakproperty_to_string): Support WBP_DQ, WBP_SQ, and WBP_HL.
56183         * lib/gen-uni-tables.c (UC_BIDI_LRI, UC_BIDI_RLI, UC_BIDI_FSI)
56184         (UC_BIDI_PDI): New enumeration values.
56185         (bidi_category_byname): Support those enum values.
56186         (is_WBP_MIDNUMLET): Exclude 0x0027 (SINGLE QUOTE), which is now a
56187         dedicated property assigned.
56188         (is_property_case_ignorable): Check 0x0027.
56189         (WBP_DQ, WBP_SQ, WBP_HL): New enumeration values.
56190         (get_wbp, debug_output_wbp, fill_org_wbp, debug_output_org_wbp)
56191         (output_wbp): Support those enum values.
56192         * lib/unictype.in.h (UC_BIDI_LRI, UC_BIDI_RLI, UC_BIDI_FSI)
56193         (UC_BIDI_PDI): New enumeration values.
56194         * lib/unictype/bidi_byname.gperf: Add those property names.
56195         * lib/uniwidth/width.c (nonspacing_table_data): Add U+061C,
56196         U+180E, U+1A1B, and U+2066..U+2069.
56197         * tests/uniwidth/test-uc_width2.sh: Same updates as in
56198         lib/uniwidth/width.c.
56199         * all generated files under lib/uni* and tests/uni*: Regenerate.
56201 2015-01-14  Daiki Ueno  <ueno@gnu.org>
56203         libunistring: update to Unicode 6.2.0
56204         * lib/unilbrk/lbrktables.h (LBP_RI): New enumeration value.
56205         (unilbrk_table): Adjust table size.
56206         * lib/unilbrk/lbrktables.c (unilbrk_table): Add a row and column
56207         for LBP_RI.
56208         * lib/uniwbrk.in.h (WBP_RI): New enumeration value.
56209         * lib/uniwbrk/u-wordbreaks.h (FUNC): Support rule WB13c.
56210         Normalize table index skipping ignored properties.
56211         * lib/uniwbrk/wbrktable.c (uniwbrk_table): Support WBP_RI.  Remove
56212         WBP_EXTEND and WBP_FORMAT, which are now computed without using
56213         the table.
56214         * lib/uniwbrk/wbrktable.h: Adjust table size.
56215         * lib/unigbrk.in.h (GBP_RI): New enumeration value.
56216         * lib/unigbrk/uc-is-grapheme-break.c (UC_IS_GRAPHEME_BREAK):
56217         Support rule GB8a.
56218         (UC_GRAPHEME_BREAKS_FOR, gb_table): Support GBP_RI.
56219         * tests/unigbrk/test-uc-is-grapheme-break.c
56220         (graphemebreakproperty_to_string): Support GBP_RI.
56221         * tests/uniwbrk/test-uc-wordbreaks.c
56222         (wordbreakproperty_to_string): Support WBP_RI.
56223         * lib/gen-uni-tables.c (LBP_RI): New enumeration value.
56224         (get_lbp, debug_output_lbp, fill_org_lbp, debug_output_org_lbp)
56225         (output_lbp): Support LBP_RI.  Adjust some characters changed from
56226         LBP_AL to LBP_ID.
56227         (output_lbp): Support LBP_RI.
56228         (WBP_RI): New enumeration value.
56229         (debug_output_wbp, fill_org_wbp, debug_output_org_wbp)
56230         (output_wbp): Support WBP_RI.
56231         (GBP_RI): New enumeration value.
56232         (output_gbp_test, fill_org_gbp): Support GBP_RI.
56233         * all generated files under lib/uni* and tests/uni*: Regenerate.
56235 2015-01-14  Daiki Ueno  <ueno@gnu.org>
56237         libunistring: update to Unicode 6.1.0
56238         * lib/gen-uni-tables.c (output_joining_group): Switch to
56239         3-level table to accommodate joining groups defined with higher
56240         codepoint value.  Since there are only 88 groups defined in
56241         Unicode 7.0.0, use 7-bit packed format for level3 entries.
56242         (get_lbp): Update for Unicode 6.1.0.
56243         * lib/unictype/joininggroup_of.c (uc_joining_group): Adjust to use
56244         3-level table.
56245         * lib/unictype/joininggroup_byname.gperf: Add Rohingya Yeh
56246         joining group name.
56247         * lib/unictype/joininggroup_name.h: Likewise.
56248         * lib/unilbrk/lbrktables.h (LBP_HL): New enumeration value.
56249         (unilbrk_table): Adjust table size.
56250         * lib/unilbrk/lbrktables.c (unilbrk_table): Add a row and column
56251         for LBP_HL.
56252         * lib/uniwidth/width.c (nonspacing_table_data): Add U+0604,
56253         U+08E4..U+08FE, U+1BAB, U+1CF4, U+A674..U+A67B, U+A69F,
56254         U+AAEC..U+AAED, U+AAF6, U+11100..U+11102, U+11127..U+1112B,
56255         U+1112D..U+11134, U+11180..U+11181, U+111B6..U+111BE, U+116AB,
56256         U+116AD, U+116B0..U+116B5, U+116B7, U+16F8F..U+16F92.  Remove
56257         U+302E..U+302F.
56258         * tests/uniwidth/test-uc_width2.sh: Same updates as in
56259         lib/uniwidth/width.c.
56260         * all generated files under lib/uni* and tests/uni*: Regenerate.
56261         * modules/uni*/* (configure.ac): Bump minimum version to 0.9.5.
56263 2015-01-15  Daiki Ueno  <ueno@gnu.org>
56265         uniwbrk/u32-wordbreaks-tests: add conformance test
56266         * modules/uniwbrk/u32-wordbreaks-tests (Files): Add
56267         tests/uniwbrk/test-uc-wordbreaks.c,
56268         tests/uniwbrk/test-uc-wordbreaks.sh, and
56269         tests/uniwbrk/WordBreakTest.txt.
56270         (Makefile.am): Add uniwbrk/test-uc-wordbreaks.sh to $(TESTS), add
56271         test-uc-wordbreaks to $(check_PROGRAMS), and define
56272         test_uc_wordbreaks_SOURCES and test_uc_wordbreaks_LDADD.
56273         * tests/uniwbrk/test-uc-wordbreaks.sh: New file.
56274         * tests/uniwbrk/test-uc-wordbreaks.c: New file.
56276 2015-01-15  Daiki Ueno  <ueno@gnu.org>
56278         uniwbrk: ignore Extended/Format characters at BOL not BOS
56279         * lib/uniwbrk/u-wordbreaks.h (FUNC): Ignore Extend and Format
56280         characters if the previous character property is one of
56281         WBP_NEWLINE, WBP_CR, and WBP_LF.
56283 2015-01-11  Jim Meyering  <meyering@fb.com>
56285         test-strstr.c: avoid a trivial leak
56286         * tests/test-strstr.c (main): Free haystack.
56288         update-copyright: recognize groff's \(co marker
56289         * build-aux/update-copyright (circle_c_re): Also accept
56290         uses of \(co, as found in gzip.1.
56292 2015-01-08  Pádraig Brady  <P@draigBrady.com>
56294         maint.mk: fix compatibility with OS X nm
56295         * top/maint.mk (_gl_tight_scope): Use the -g option to
56296         show exported items rather than the -e option which is
56297         ignored on all platforms except OS X where it gives an error.
56298         Reported by Assaf Gordon.
56300 2015-01-07  KO Myung-Hun  <komh@chollian.net>
56302         localcharset: improve charset detection on OS/2
56303         Use system codepage when appropriate.  Map OS/2 codepages to
56304         GNU canonical charset names if possible.
56305         * lib/config.charset: Don't output aliases if "$os" is os2*.
56306         * lib/localcharset.c (get_charset_aliases) [OS2]: Hardcode the
56307         result for OS/2.
56308         (locale_charset) [OS2]: Use system codepage if codeset is omitted
56309         from the locale name which is neither "C" nor "POSIX".
56311 2015-01-06  Paul Eggert  <eggert@cs.ucla.edu>
56313         count-leading-zeros: use 64-bit intrinsics on 32-bit Windows
56314         This reverts the last patch but one, as it shouldn't be needed now
56315         that the typo is fixed.
56316         * lib/count-leading-zeros.h (count_leading_zeros_ll):
56317         * lib/count-trailing-zeros.h:
56318         * lib/count-one-bits.h:
56319         Go back to using 64-bit intrinsics.
56321         count-leading-zeros: fix pragma typos
56322         * lib/count-leading-zeros.h (_BitScanReverse, _BitScanReverse64):
56323         Fix typos in declaration of intrinsics when _MSC_VER.
56325 2015-01-06  Pádraig Brady  <P@draigBrady.com>
56327         count-leading-zeros: avoid 64-bit intrinsics on 32-bit Windows
56328         * lib/count-leading-zeros.h (count_leading_zeros_ll): Use 32 bit
56329         intrinsics in this case.
56330         * lib/count-trailing-zeros.h: Likewise.
56331         * lib/count-one-bits.h: Likewise.
56333 2015-01-06  Daiki Ueno  <ueno@gnu.org>
56335         uniname/uniname: update to Unicode 7.0.0
56336         To accommodate new characters added since Unicode 5.1.0, this
56337         changes the internal representation of codepoint ranges.
56338         Previously, we grouped codepoint ranges by manually assigned 4-bit
56339         tag, which only allowed 16 groups.  This removes the limitation by
56340         switching to binary search on a table.  For the detail rationale
56341         and the benchmark results, see:
56342         https://lists.gnu.org/r/bug-libunistring/2014-06/msg00001.html
56343         * lib/uniname/gen-uninames.lisp (unicode-char): Rename CODE member
56344         to INDEX, as it no longer represents a codepoint.
56345         (range): New struct.
56346         (main): Switch to intervals list from a bit-pattern based
56347         classification.
56348         * lib/uniname/uninames.h: Regenerate.
56349         * tests/uniname/UnicodeDataNames.txt: Update to Unicode 7.0.0.
56350         * modules/uniname/base (configure.ac): Bump minimum version to
56351         0.9.5.
56352         * modules/uniname/uniname (configure.ac): Bump minimum version to
56353         0.9.5.
56355 2015-01-05  Eric Blake  <eblake@redhat.com>
56357         doc: update INSTALL from autoconf
56358         * doc/install.texi: Resync from autoconf.
56359         * doc/INSTALL: Reflect recent autoconf update.
56360         * doc/INSTALL.ISO: Likewise.
56361         * doc/INSTALL.UTF-8: Likewise.
56363         stdio: fix use of PRIdMAX on modern mingw
56364         * m4/stdio_h.m4 (gl_STDIO_H): Probe for printf flavor via inttypes.
56365         * lib/stdio.in.h (_GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM): Use result
56366         to work with modern mingw.
56368 2015-01-05  Daniel P. Berrange  <berrange@redhat.com>  (tiny change)
56370         pthread: detect git mingw builds with only partial pollution
56371         * m4/pthread.m4 (gl_PTHREAD_CHECK): Check for additional
56372         pollution, as seen temporarily in Fedora 21.
56374 2015-01-04  Paul Eggert  <eggert@cs.ucla.edu>
56376         lib-symbol-versions: cache script check
56377         * m4/ld-version-script.m4 (gl_LD_VERSION_SCRIPT):
56378         Cache the check for linker version scripts.
56379         From a suggestion by Christophe Curis in:
56380         http://lists.gnu.org/r/bug-gnulib/2015-01/msg00011.html
56382 2015-01-04  Benno Schulenberg  <bensberg@justemail.net>
56384         maint: fix grammar nits in propername (trivial change)
56385         * lib/propername.h: Remove a mistaken comma and a duplicate "from",
56386         and use an adequate verb and tense.
56388 2015-01-02  Ludovic Courtès  <ludo@gnu.org>
56390         Suggested by Paul Eggert <eggert@cs.ucla.edu>.
56391         * module/gendocs: Add 'doc/gendocs_template_min'.
56393         * build-aux/gendocs.sh: Change email addresses and upstream URLs
56394         from to Gnulib's.
56395         (scripturl, templateurl): Adjust accordingly.
56397 2015-01-01  Paul Eggert  <eggert@cs.ucla.edu>
56399         gendocs: copyright date and version fix
56400         Reported by Karl Berry in:
56401         http://lists.gnu.org/r/bug-gnulib/2015-01/msg00002.html
56402         * build-aux/gendocs.sh, doc/gendocs_template, doc/gendocs_template_min:
56403         Fix copyright date.
56404         * build-aux/gendocs.sh (scriptversion): Update.
56406 2015-01-01  Karl Berry  <karl@gnu.org>
56408         * doc/install.texi,
56409         * build-aux/mdate-sh,
56410         * build-aux/depcomp,
56411         * build-aux/config.guess,
56412         * build-aux/config.sub,
56413         * build-aux/ar-lib,
56414         * build-aux/compile: revert copyright updates (some from last
56415         year) in slaved files.
56417 2015-01-01  Paul Eggert  <eggert@cs.ucla.edu>
56419         version-etc: new year
56420         * doc/gnulib.texi:
56421         * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright date.
56422         * all files: Run 'make update-copyright'.
56424 2014-12-30  Pádraig Brady  <P@draigBrady.com>
56426         xstrtol: ensure errno is reset
56427         Since commit 3bf75404, on 26-09-1998, errno may not have been reset.
56428         Noticed with a spurious coreutils test failure on Darwin 14.0.0.
56430         * lib/xstrtol.c (__xstrtol): Always reset errno before returning.
56432 2014-12-28  Paul Eggert  <eggert@cs.ucla.edu>
56434         utimens: fix dependency typo
56435         * modules/utimens (Depends-on): Remove 'assure'.
56436         This bug was introduced in the recent 'assure' patch.
56438 2014-12-22  Eric Blake  <eblake@redhat.com>
56440         docs: mention why libgen.h is bad
56441         * doc/posix-headers/libgen.texi (libgen.h): Refer to dirname module.
56443 2014-12-20  Paul Eggert  <eggert@cs.ucla.edu>
56445         assure: new module
56446         This works better than 'assert' when compiling with -DNDEBUG,
56447         as it avoids some compiler diagnostics in that case.
56448         Reported by Norihiro Tanaka in:
56449         http://lists.gnu.org/r/bug-gnulib/2014-12/msg00215.html
56450         * MODULES.html.sh (func_all_modules): Add 'assure'.
56451         * lib/assure.h, modules/assure: New files.
56452         * lib/chdir-long.c, lib/cycle-check.c, lib/fchdir.c, lib/fts.c:
56453         * lib/poll.c, lib/savewd.c, lib/xstrtol.c:
56454         Prefer 'assure' to 'assert'.
56455         * lib/utimens.c: Stop using 'assert'; it wasn't helpful.
56456         * modules/chdir-long, modules/cycle-check, modules/fchdir:
56457         * modules/poll, modules/savewd, modules/utimens, modules/xstrtol:
56458         Depend on 'assure'.
56460 2014-12-16  Paul Eggert  <eggert@cs.ucla.edu>
56462         stdalign: port better to HP compilers
56463         * m4/stdalign.m4 (gl_STDALIGN_H): Try the test if __HP_cc or
56464         __HP_aCC are nonzero, to be consistent with the 2014-01-20 patch.
56466         stdalign: work around Apple GCC 4.0 bug
56467         Reported by David Fang in:
56468         http://lists.gnu.org/r/bug-gnulib/2014-12/msg00194.html
56469         * lib/stdalign.in.h (_Alignas):
56470         * m4/stdalign.m4 (gl_STDALIGN_H):
56471         Do not use aligned attribute with GCC 4.0 on Apple.
56473 2014-12-16  Pádraig Brady  <P@draigBrady.com>
56475         getcwd: fix test failure on OS X 10.9
56476         * m4/getcwd-path-max.m4: Avoid the replacement if it
56477         won't be effective due to the PATH_MAX limitation of lstat().
56478         (gl_cv_func_getcwd_path_max): Adjust to indicate this case.
56479         * m4/getcwd.m4 (gl_FUNC_GETCWD): Define HAVE_GETCWD_SHORTER
56480         for this case for use in tests, and also exclude this
56481         case when setting REPLACE_GETCWD.
56482         * tests/test-getcwd.c (test_long_name): Restrict the
56483         tested path length so that lstat() will not be passed
56484         a path greater than PATH_MAX.
56485         Also key a test condition on HAVE_OPENAT_SUPPORT rather
56486         than AT_FDCWD, since the latter is set unconditionally
56487         since Sep 2009 in commit 52c658e9.
56489 2014-12-14  Tim Rühsen  <tim.ruehsen@gmx.de>
56491         parse-datetime: avoid a compiler warning with byacc (trivial)
56492         * lib/parse-datetime.y (yylex): Use the same prototype in the
56493         function definition as the declaration, to avoid a -Wstrict-prototypes
56494         warning seen when using byacc.
56496 2014-12-12  Daiki Ueno  <ueno@gnu.org>
56498         unicase/locale-language-tests: fix LOCALE_FR test
56499         * tests/unicase/test-locale-language.sh: Really use $LOCALE_FR for
56500         a French locale with traditional encoding.
56501         Reported by umerqayam in:
56502         http://lists.gnu.org/r/bug-libunistring/2014-12/msg00000.html
56504 2014-12-12  Paul Eggert  <eggert@cs.ucla.edu>
56506         stddef: support C11's max_align_t
56507         * doc/posix-headers/stddef.texi (stddef.h): Document max_align_t.
56508         * lib/stddef.in.h (_@GUARD_PREFIX@_STDDEF_H) [__need_wint_t]:
56509         Do not undef, as that might cause max_align_t to be defined twice.
56510         Instead, change use to check for _GL_STDDEF_WINT_T too.
56511         (max_align_t) [!HAVE_MAX_ALIGN_T]: New decl.
56512         * m4/stddef_h.m4 (gl_STDDEF_H, gl_STDDEF_H_DEFAULTS):
56513         Check for max_align_t.
56514         * modules/stddef (stddef.h): Substitute HAVE_MAX_ALIGN_T.
56515         * modules/stddef-tests (Depends-on): Add stdalign.
56516         * tests/test-stddef.c: Test max_align_t.
56518 2014-12-11  Daiki Ueno  <ueno@gnu.org>
56520         unistd: fix iOS check conditional
56521         On Mac OS X 10.8, the TARGET_* macros are unconditonally defined
56522         as 0 or 1 in <TargetConditionals.h>, and the previous check always
56523         yielded true on non-iOS environment.
56524         * lib/unistd.in.h (environ) [__APPLE__]: Check the values of
56525         TARGET_OS_IPHONE and TARGET_IPHONE_SIMULATOR, instead of whether
56526         they are defined.
56528 2014-12-09  Paul Eggert  <eggert@cs.ucla.edu>
56530         posixtm: avoid compiler warning in a better way
56531         * lib/posixtm.c (IF_LINT): Remove.
56532         (year, posix_time_parse):
56533         Return true (not 0) if successful.  All callers changed.
56534         (posix_time_parse): Simplify to pacify GCC without need for IF_LINT.
56536 2014-12-08  KO Myung-Hun  <komh78@gmail.com>
56538         * lib/relocatable.c (relocate): Prepend $UNIXROOT to pathname if it is
56539         started with '/' on EMX.
56541 2014-12-08  KO Myung-Hun  <komh78@gmail.com>
56543         freopen: workaround freopen() on OS/2 kLIBC
56544         * lib/freopen.c (rpl_freopen): Workaround.
56545         * m4/freopen.m4: Add os2* case.
56547         get_shared_library_fullname: port to EMX
56548         * lib/relocatable.c: Define strcmp and strncmp to stricmp and strnicmp
56549         on EMX, respectively.
56550         (_DLL_InitTerm): New on EMX.
56551         (get_shared_library_fullname): Implement on EMX.
56553         find_executable: port to EMX
56554         * lib/progreloc.c (find_executable): Implement on EMX.
56556         sched: check struct sched_param in spawn.h as well
56557         * lib/sched.in.h: Include spawn.h on kLIBC.
56558         * lib/sched_h.m4: Check struct sched_param in spawn.h as well.
56560 2014-12-08  Martin Kletzander  <mkletzan@redhat.com>  (tiny change)
56562         bootstrap: Allow perl modules in $buildreq
56563         * build-aux/bootstrap: Add case for perl modules.
56565 2014-12-08  Pádraig Brady  <P@draigBrady.com>
56567         apply _GL_ATTRIBUTE_PURE to some inline functions
56568         clang 3.4.2 flagged these inline functions as pure
56569         * lib/savewd.h (savewd_errno): Set _GL_ATTRIBUTE_PURE.
56570         * lib/sig-handler.h (get_handler): Likewise.
56571         * lib/stat-time.h (get_stat_{a,c,m,birth}time{,_ns}): Likewise.
56572         * lib/timespec.h (timespec_cmp, timespec_sign): Likewise.
56574 2014-12-06  Pádraig Brady  <P@draigBrady.com>
56576         vasnprintf: fix potential use after free
56577         * lib/vasnprintf.c (VASNPRINTF): Fix free-memory read,
56578         flagged by clang-analyzer 3.4.2.
56580 2014-12-05  Pádraig Brady  <P@draigBrady.com>
56582         filevercmp, posixtm: avoid compiler warnings with -O3
56583         * lib/filevercmp.h (filevercmp): Tag with _GL_ATTRIBUTE_PURE
56584         * lib/posixtm.c: (IF_LINT): Define.
56585         (posix_time_parse): Use it to void a "may be used uninitialized"
56586         warning, seen only with -O3.
56588 2014-12-05  Bruno Haible  <bruno@clisp.org>
56590         Fix LDBL80_WORDS macro on big endian platforms.
56591         * m4/isfinite.m4 (gl_ISFINITEL_WORKS): Add missing parenthesis in
56592         LDBL80_WORDS macro.
56593         * m4/isinf.m4 (gl_ISINFL_WORKS): Likewise.
56594         * m4/isnanl.m4 (gl_FUNC_ISNANL_WORKS): Likewise.
56595         * tests/test-isfinite.c (test_isfinitel): Likewise.
56596         * tests/test-isinf.c (test_isinfl): Likewise.
56597         * tests/test-isnan.c (test_long_double): Likewise.
56598         * tests/test-isnanl.h (main): Likewise.
56599         * tests/test-snprintf-posix.h (LDBL80_WORDS): Add missing parenthesis.
56600         * tests/test-sprintf-posix.h (LDBL80_WORDS): Likewise.
56601         * tests/test-vasnprintf-posix.c (LDBL80_WORDS): Likewise.
56602         * tests/test-vasprintf-posix.c (LDBL80_WORDS): Likewise.
56603         Reported by Pádraig Brady.
56605 2014-12-02  KO Myung-Hun  <komh78@gmail.com>
56607         git-version-gen: do not print new line characters
56608         * build-aux/git-version-gen: Use printf instead of echo and tr.
56610         gnulib-tool: recognize x:* as an absolute path
56611         * gnulib-tool (func_gnulib_dir): Add ?:* case.
56612         (func_relconcat): Likewise.
56614 2014-12-02  Andrei Borzenkov  <arvidjaar@gmail.com>
56616         argp: avoid extraneous translation and mem leak with empty pre doc
56617         * lib/argp-help.c (argp_doc): Never translate the empty string,
56618         when "\v" is the first or last character of the string, as that
56619         has a reserved meaning to return the header info from a po file.
56620         This also fixes a small memory leak in the !post case.
56621         The issue can be seen with this command for example:
56622         LC_MESSAGES=en_US grub2-mknetdir --help
56624 2014-11-27  Daiki Ueno  <ueno@gnu.org>
56626         uniname/uniname-tests: skip if system's libunistring is used
56627         * modules/uniname/uniname-tests (Makefile.am): Skip test if
56628         uniname/uniname module is not compiled.
56630 2014-11-27  Pádraig Brady  <P@draigBrady.com>
56632         printf: fix configure check on big endian systems
56633         * m4/printf.m4 (gl_PRINTF_INFINITE_LONG_DOUBLE): Add missing bracket.
56635 2014-11-22  Daiki Ueno  <ueno@gnu.org>
56637         pipe-filter-gi, pipe-filter-ii: port to AIX
56638         On AIX 7.1, 'select' is defined as static and cannot be referred
56639         to from inline function.
56640         * lib/pipe-filter-aux.h (nointr_select): Remove, manually expand
56641         the definition...
56642         * lib/pipe-filter-gi.c (filter_loop): ...here, and...
56643         * lib/pipe-filter-ii.c (pipe_filter_ii_execute): ...here.
56645 2014-11-20  Paul Eggert  <eggert@cs.ucla.edu>
56647         gitlog-to-changelog: add --until
56648         * build-aux/gitlog-to-changelog: Support new --until option.
56649         Need described by Eli Zaretskii in: http://bugs.gnu.org/19113
56651 2014-11-14  Paul Eggert  <eggert@cs.ucla.edu>
56653         extern-inline: update commentary about GCC bugs
56654         * m4/extern-inline.m4: Add another GCC bug number to comments.
56656 2014-11-13  Daiki Ueno  <ueno@gnu.org>
56658         gen-uni-tables: untabify
56659         * lib/gen-uni-tables.c: Untabify.
56661 2014-11-13  Daiki Ueno  <ueno@gnu.org>
56663         gen-uni-tables: check out-of-range values added to 3-level tables
56664         * lib/gen-uni-tables.c (output_category, output_bidi_category)
56665         (output_joining_type, output_ident_category): Check out-of-range
56666         values added to 3-level tables.
56668 2014-11-13  Daiki Ueno  <ueno@gnu.org>
56670         gen-uni-tables: utilize 'assert'
56671         * lib/gen-uni-tables.c: Include <assert.h>.
56672         (output_category, output_combclass, output_decimal_digit_test)
56673         (output_decimal_digit, output_digit_test, output_digit)
56674         (output_numeric, get_mirror_value, fill_properties)
56675         (fill_property30, is_property_alphabetic)
56676         (is_property_default_ignorable_code_point)
56677         (is_property_uppercase, is_property_lowercase)
56678         (is_property_cased, is_property_case_ignorable)
56679         (is_property_changes_when_lowercased, is_property_iso_control)
56680         (is_property_math, fill_arabicshaping, output_joining_group)
56681         (fill_scripts, fill_blocks, output_lbp, fill_org_wbp)
56682         (output_wbp, fill_org_gbp, get_decomposition)
56683         (output_decomposition, fill_composition_exclusions)
56684         (debug_output_composition_tables, output_composition_tables)
56685         (redistribute_casefolding_rules, output_casing_rules): Use
56686         'assert (EXPR);' instead of 'if (!EXPR) abort ();' for better error
56687         reporting.
56689 2014-11-13  Daiki Ueno  <ueno@gnu.org>
56691         gen-uni-tables: cosmetic improvements
56692         * lib/gen-uni-tables.c: Escape newlines in the Emacs file local
56693         variables specification.
56694         (is_outdigit): Remove unused function.
56696 2014-11-12  Jeroen Roovers  <jer@gentoo.org>  (tiny change)
56698         fcntl-h-tests: port to PA-RISC GNU/Linux
56699         * tests/test-fcntl-h.c (main): Check O_SYNC is different from O_DSYNC.
56701 2014-11-10  Paul Eggert  <eggert@cs.ucla.edu>
56703         fts: port to C89
56704         Problem reported for MSVC 16 by Gisle Vanem in:
56705         http://lists.gnu.org/r/bug-gnulib/2014-11/msg00027.html
56706         * lib/fts.c (fts_build): Avoid declaration before statement.
56708 2014-11-06  Paul Eggert  <eggert@cs.ucla.edu>
56710         unistd: port to iOS
56711         Problem reported by André Klitzing in:
56712         http://lists.gnu.org/r/bug-gnulib/2014-11/msg00013.html
56713         * lib/unistd.in.h (environ): Do not include crt_externs.h on iOS.
56715 2014-11-05  Paul Eggert  <eggert@cs.ucla.edu>
56717         obstack: do not reject malloc-style obstack_chunkfun, obstack_freefun
56718         Problem reported by Alan Modra in:
56719         http://lists.gnu.org/r/bug-gnulib/2014-11/msg00007.html
56720         * lib/obstack.h (obstack_chunkfun, obstack_freefun):
56721         Always cast the function arg, reverting this part of the previous
56722         change.
56724 2014-11-04  Paul Eggert  <eggert@cs.ucla.edu>
56726         obstack: avoid potentially-nonportable function casts
56727         * lib/obstack.c (CALL_CHUNKFUN, CALL_FREEFUN):
56728         Remove, replacing with ...
56729         (call_chunkfun, call_freefun): New static functions.
56730         All uses changed.  Avoid potentially-nonportable casts.
56731         (chunkfun_type, freefun_type): Remove typedefs; no longer used.
56732         (_obstack_begin_worker): Omit last two args, since they
56733         rely on potentially-nonportable casts.  All callers changed.
56734         * lib/obstack.h (_OBSTACK_CAST): New macro.
56735         Use it everywhere the old API used a potentially-nonportable cast.
56736         The new API doesn't cast.
56737         (struct obstack): Use unions rather than requiring
56738         potentially-nonportable casts.
56739         (obstack_chunkfun, obstack_freefun): Return void.
56741 2014-11-03  Alan Modra  <amodra@gmail.com>
56743         obstack: fix macro return values
56744         * lib/obstack.h (obstack_next_free): Return void *.
56745         (obstack_1grow_fast, obstack_blank_fast): Return void.
56746         For __GNUC__ macros:
56747         (obstack_1grow, obstack_blank): Remove now unnecessary (void) 0.
56748         For !__GNUC__ macros:
56749         (obstack_make_room, obstack_grow, obstack_grow0)
56750         (obstack_ptr_grow_fast, obstack_int_grow_fast): Return void.
56752 2014-11-03  Paul Eggert  <eggert@cs.ucla.edu>
56754         obstack: do not assume system-supplied obstack is size_t safe
56755         * m4/obstack.m4: New file.
56756         * modules/obstack (Files): Add it.
56758         obstack: port to platforms that #define __alignof__
56759         * lib/obstack.c: Include <alignof.h> if !defined __alignof__,
56760         not if !_LIBC.  We don't know of any platforms that #define
56761         __alignof__, but it might be useful in tests.  Conversely,
56762         glibc assumes GCC.
56764 2014-11-03  Pádraig Brady  <P@draigBrady.com>
56766         linkat: don't unconditionally replace on GNU/Linux
56767         * m4/linkat.m4 (gl_FUNC_LINKAT): The compile check for AT_SYMLINK_FOLLOW
56768         was redundant for a few reasons.  It was present to support compiling
56769         on new systems but running on the old narrow window of Linux 2.6.1[67].
56770         It setup and cleaned up test files which weren't actually used.
56771         On non __linux__ it compile tested AT_SYMLINK_FOLLOW, but that is
56772         implicit in the following check.
56774 2014-11-03  Pádraig Brady  <P@draigBrady.com>
56776         linkat: wrap to handle symlinks on OS X 10.10
56777         * m4/linkat.m4 (gl_FUNC_LINKAT): linkat() is available on Yosemite
56778         but not usable because it doesn't support creating hardlinks
56779         to symlinks.  Therefore add a generic test for this capability
56780         and fallback to our emulation if linkat() fails with ENOTSUP.
56782 2014-11-02  Paul Eggert  <eggert@cs.ucla.edu>
56784         open, openat: document nonstandard FreeBSD, NetBSD O_NOFOLLOW errno
56785         * doc/posix-functions/open.texi (open):
56786         * doc/posix-functions/openat.texi (openat):
56787         Document that these functions do not set errno to ELOOP when
56788         a symlink is opened with O_NOFOLLOW.
56790 2014-10-31  Paul Eggert  <eggert@cs.ucla.edu>
56792         obstack: add NEWS entry for recent incompatible changes
56793         * NEWS: Describe recent changes.
56795 2014-10-30  Pádraig Brady  <P@draigBrady.com>
56797         mountlist: don't use libmount to decide on dummy/remote
56798         * lib/mountlist.c (read_file_system_list): Don't use the libmount
56799         routines to determine whether a file system is dummy or remote,
56800         as they're not currently compatible.  For example the remoteness
56801         is determined on file system type (for which the list seems incomplete),
56802         rather than simply checking for a ':' in the device name.
56803         Also libmount currently determines that 'tmpfs' is a dummy file system
56804         even though it has associated storage.
56806 2014-10-29  Paul Eggert  <eggert@cs.ucla.edu>
56808         obstack: prefer __alignof__ to alignof
56809         This is for portability to pre-4.7 GCC when compiling glibc.
56810         See Joseph S. Myers in:
56811         http://sourceware.org/ml/libc-alpha/2014-10/msg00703.html
56812         * lib/obstack.c (__alignof__) [!_LIBC && !__GNUC__]:
56813         New macro, defined by including and using <alignof.h>.
56814         (MAX): New macro.
56815         (DEFAULT_ALIGNMENT, DEFAULT_ROUNDING): Redefine in terms of these.
56816         Do not use enums as they are not portable to some broken compilers.
56817         * modules/obstack (Depends-on): Depend on alignof, not stdalign.
56819         obstack: prefer alignof to calculating alignments by hand
56820         * lib/obstack.c: Include <stdalign.h>.
56821         (struct fooalign): Remove.
56822         (DEFAULT_ALIGNMENT): Use alignof rather than the old offsetof hack.
56823         * modules/obstack (Depends-on): Add stdalign.
56825 2014-10-28  Paul Eggert  <eggert@cs.ucla.edu>
56827         obstack: use size_t alignments and check for overflow
56828         * lib/obstack.c, lib/obstack.h (_obstack_begin, _obstack_begin_1):
56829         * lib/obstack.c (_obstack_begin_worker, _obstack_newchunk):
56830         * lib/obstack.h (struct obstack.alignment_mask):
56831         Use _OBSTACK_SIZE_T, not int, for alignments.
56832         * lib/obstack.c (_obstack_newchunk): Fail if the size calculation
56833         overflows, e.g., when adding the alignment.
56835 2014-10-29  Alan Modra  <amodra@gmail.com>
56837         obstack: 64-bit obstack support, part 3
56838         This finally enables full 64-bit obstack support.  The glibc
56839         shared library specific code is removed from obstack.c too, and
56840         the error handling code conditionally compiled under control of
56841         another macro, _OBSTACK_NO_ERROR_HANDLER.
56842         * lib/obstack.h: Include string.h earlier.
56843         (_OBSTACK_INTERFACE_VERSION): Define.
56844         (_OBSTACK_SIZE_T, _CHUNK_SIZE_T): Define as size_t for version 2.
56845         * lib/obstack.c: Don't include shlib-compat.h.
56846         (OBSTACK_INTERFACE_VERSION): Delete.
56847         (_OBSTACK_ELIDE_CODE): Rename from ELIDE_CODE.  Define when version 1
56848         glibc code is compatible with version 2.  Don't include stdio.h for
56849         __GNU_LIBRARY.
56850         (obstack_exit_failure, print_and_abort, obstack_alloc_failed_handler):
56851         Omit when _OBSTACK_NO_ERROR_HANDLER defined.  Include stdio.h here.
56852         (_obstack_compat, _obstack, _obstack_newchunk, obstack_free): Delete
56853         glibc shared library specific source.
56855         obstack: 64-bit obstack support, part 2
56856         This gets us 4G obstack support, without changing ABI
56857         compatibility, apart from possibly introducing some
56858         signed/unsigned comparison warnings in code that uses obstack.h.
56859         a) Replace "int" size parameters, return values, and macro local vars
56860            with _OBSTACK_SIZE_T, an "unsigned int" for now.
56861         b) Make obstack.chunk_size a _CHUNK_SIZE_T, an "unsigned long" for now.
56862         c) Make all obstack macros checking available room use obstack_room.
56863            "next_free + desired > chunk_limit" may wrap the lhs for chunks
56864            allocated near the top of memory.
56865         d) Use unsigned comparisons, and macro locals to support >2G on 32-bit.
56866         * lib/obstack.h (_OBSTACK_SIZE_T): Define.  Use throughout
56867         in place of "int" size parameters, return values and local vars.
56868         (_CHUNK_SIZE_T): Define.
56869         (struct obstack): Make chunk_size a _CHUNK_SIZE_T.  Make temp
56870         union use an _OBSTACK_SIZE_T integer type.
56871         For __GNUC__ versions of the following macros...
56872         (obstack_room): Rename local var.
56873         (obstack_make_room): Use obstack_room.
56874         (obstack_grow, obstack_grow0, obstack_1grow, obstack_ptr_grow,
56875         obstack_int_grow, obstack_blank): Likewise.
56876         (obstack_finish): Use unsigned comparison when comparing aligned
56877         next_free against chunk_limit.
56878         (obstack_free): Cast OBJ to remove possible const qualifier.
56879         For !__GNUC__ versions of the following macros...
56880         (obstack_make_room): Use obstack_room.
56881         (obstack_grow, obstack_grow0, obstack_1grow, obstack_ptr_grow,
56882         obstack_int_grow, obstack_blank): Likewise.
56883         (obstack_finish): Use unsigned comparision when comparing aligned
56884         next_free against chunk_limit.
56885         (obstack_free): Use temp.p and same comparisons as __GNUC__ version.
56886         * lib/obstack.c (_obstack_begin_worker): Make "size" parameter
56887         _OBSTACK_SIZE_T.
56888         (_obstack_begin, _obstack_begin_1): Likewise.
56889         (_obstack_newchunk): Likewise for length parameter.  Use size_t locals.
56890         (_obstack_memory_used): Return and use _OBSTACK_SIZE_T local.
56892         obstack: 64-bit obstack support, part 1
56893         a) Correct calls to alloc function, to use a size_t arg.  "long" is
56894            just wrong on targets like x86_64-mingw64 where "long" is 32 bits
56895            and "size_t" 64 bits.
56896         b) Consolidate _obstack_begin and _obstack_begin1 code.
56897         * lib/obstack.h (struct obstack <chunkfun>): Correct prototype to
56898         use "size_t" rather than "long".
56899         (_obstack_begin, _obstack_begin1): Likewise.
56900         (obstack_init, obstack_begin, obstack_specify_allocation_with_arg,
56901         obstack_chunkfun): Update alloc function casts.
56902         * lib/obstack.c (CALL_CHUNKFUN): Update chunkfun cast.
56903         (chunkfun_type, freefun_type): New typdefs.
56904         (_obstack_begin_worker): Split out from ..
56905         (_obstack_begin, _obstack_begin_1): ..here.
56907         obstack: tidy part 2
56908         a) Don't be concerned about "not polluting the namespace with stddef.h
56909            symbols" in obstack.h, since gnulib string.h includes stddef.h
56910            anyway, and it seems unlikely that anyone would care.
56911         b) Don't roll our own slow memcpy in _obstack_newchunk.
56912         c) Rename obstack_free to _obstack_free.  This makes the naming
56913            consistent with other obstack functions and obviates the need for
56914            __obstack_free.  Ancient obstack.c defined both obstack_free and
56915            _obstack_free.  We continue to do that for _LIBC via an alias.
56916         d) Miscellaneous macro fixes.  The expression used to test for gcc-2.8
56917            is clever, but nowadays gcc warns on undefined macros.  You'll get
56918            an undefined macro warning if simulating an old gcc with -U__GNUC__
56919            -U__GNUC_MINOR__ -D__GNUC__=1.
56920         * lib/obstack.h: Include stddef.h unconditionally.  Formatting fixes.
56921         (PTR_INT_TYPE): Delete, replace with ptrdiff_t.
56922         (__obstack_free): Delete, update refs.
56923         (_obstack_free): Rename from obstack_free.
56924         (__extension__): Avoid undefined macro warning for __GNUC_MINOR__.
56925         (obstack_object_size, obstack_room): Parenthesise !__GNUC__ versions.
56926         * lib/obstack.c: Don't include stddef.h.
56927         (COPYING_UNIT): Delete.
56928         (_obstack_begin): Formatting fix.
56929         (_obstack_newchunk): Use memcpy to move existing object to new chunk.
56930         (_obstack_free): Rename from __obstack_free, update alias.  Move
56931         undef of obstack_free to where it is needed.
56933         obstack: tidy part 1
56934         a) Rename temp fields.  temp.tempint and temp.tempptr just looks ugly
56935            to me, and result in overlong lines after later patches.
56936         b) Move error handling code, to avoid a forward declaration and to
56937            simplify later patches in this series.
56938         * lib/obstack.h (struct obstack <temp>): Rename fields of union
56939         and update all uses.
56940         * lib/obstack.c: Include stdlib.h earlier.
56941         (obstack_exit_failure, obstack_alloc_failed_handler): Move later
56942         in file.
56943         (print_and_abort): Remove now redundant forward declaration.
56945 2014-10-24  Paul Eggert  <eggert@cs.ucla.edu>
56947         socketlib, sockets, sys_socket: Use AC_REQUIRE to pacify autoconf.
56948         Without this change, in bleeding-edge fileutils Autoconf complains
56949         that gl_SOCKETLIB etc. are AC_REQUIREd after being invoked.
56950         * modules/socketlib (configure.ac): AC_REQUIRE gl_SOCKETLIB.
56951         * modules/sockets (configure.ac): AC_REQUIRE gl_SOCKETS.
56952         * modules/sys_socket (configure.ac): AC_REQUIRE gl_HEADER_SYS_SOCKET.
56954 2014-10-24  Daiki Ueno  <ueno@gnu.org>
56956         iconv: avoid false detection of non-working iconv
56957         The INBUF arguments of iconv can be either 'const char **'
56958         or 'char **'.  If CC is g++, the difference causes a compile error
56959         and thus leads to a false detection of non-working iconv.
56960         Reported by Eli Zaretskii and Werner LEMBERG in:
56961         <https://lists.gnu.org/r/bug-gnulib/2014-10/msg00023.html>.
56962         * m4/iconv.m4 (AM_ICONV_LINK): Try all possible argument types of
56963         iconv.  Bump serial number.
56965 2014-10-23  Pádraig Brady  <P@draigBrady.com>
56967         bootstrap: print more diagnostics for missing programs
56968         * build-aux/bootstrap: only suppress stderr when checking for
56969         alternative program names.  This supports programs issuing non
56970         standard error messages.
56972 2014-10-23  Pádraig Brady  <P@draigBrady.com>
56974         bootstrap: only update the gnulib submodule
56975         * build-aux/bootstrap: Restrict the "submodule update" command
56976         to the gnulib path.
56978 2014-10-18  Paul Eggert  <eggert@cs.ucla.edu>
56980         symlinkat: port to AIX 7.1
56981         * doc/posix-functions/symlinkat.texi (symlinkat):
56982         Mention AIX porting problem.
56983         * lib/symlinkat.c: Always include errno.h.
56984         (rpl_symlinkat) [HAVE_SYMLINKAT]: New function.
56985         * lib/unistd.in.h (symlinkat): Add replacement machinery.
56986         * m4/symlinkat.m4 (gl_FUNC_SYMLINKAT): Check symlinkat behavior.
56987         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add REPLACE_SYMLINKAT.
56988         * modules/symlinkat (Depends-on): Add fstatat if REPLACE_SYMLINKAT.
56989         (configure.ac): Also compile replacement if REPLACE_SYMLINKAT.
56990         * modules/unistd (unistd.h): Substitute REPLACE_SYMLINKAT.
56992         readlinkat: port to AIX 7.1
56993         * doc/posix-functions/readlink.texi (readlink):
56994         * doc/posix-functions/readlinkat.texi (readlinkat):
56995         Mention AIX porting problem.
56996         * lib/readlinkat.c (rpl_readlinkat) [HAVE_READLINKAT]:
56997         New function.
56998         * lib/unistd.in.h (readlinkat): Add replacement machinery.
56999         * m4/readlinkat.m4 (gl_FUNC_READLINKAT): Check readlinkat signature.
57000         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add REPLACE_READLINKAT.
57001         * modules/readlinkat (configure.ac): Also compile replacement
57002         if REPLACE_READLINKAT.
57003         * modules/unistd (unistd.h): Substitute REPLACE_READLINKAT.
57005 2014-10-12  Karl Berry  <karl@gnu.org>
57007         * doc/posix-functions/dirname.texi: remove spurious {.
57009 2014-09-28  Ben Pfaff  <blp@cs.stanford.edu>
57011         basename, dirname: Improve documentation.
57012         * doc/posix-functions/basename.texi: Mention dirname module and
57013         base_name() function.
57014         * doc/posix-functions/dirname.texi: Mention dir_name() and
57015         mdir_name() functions.
57016         Suggested by Werner LEMBERG <wl@gnu.org>.
57018 2014-09-24  Jim Meyering  <meyering@fb.com>
57020         exclude: declare exclude_patopts static
57021         * lib/exclude.c (exclude_patopts): Declare static,
57022         to avoid triggering a -Wmissing-prototypes warning.
57023         The alternative (declaring it in the .h file) would
57024         require publicizing the private "struct patopts".
57026 2014-09-21  Werner Lemberg  <wl@gnu.org>
57028         dirname: support compilation with C++
57029         * lib/dirname.h: Add necessary C linkage declarations.
57031 2014-09-16  Paul Eggert  <eggert@cs.ucla.edu>
57033         qsort_r: include <config.h>
57034         Problem reported by Tom G. Christensen in:
57035         http://lists.gnu.org/r/bug-gnulib/2014-09/msg00071.html
57036         * lib/qsort.c [!_LIBC]: Include <config.h> first.
57038 2014-09-16  Dylan Cali  <calid1984@gmail.com>
57040         avltree-list: avoid compiler warnings (trivial)
57041         * lib/gl_anytree_list2.h: Add _GL_ATTRIBUTE_PURE to avoid
57042         -Werror=suggest-attribute=pure.
57043         * lib/gl_array_list.c: Likewise.
57044         * lib/gl_avltree_list.c (gl_avltree_list_check_invariants): Add extern
57045         declaration to avoid -Werror=missing-prototypes.  This is not added
57046         to a header as only exported for tests.  Add (void) to the
57047         check_invariants() call to indicate we're discarding the result
57048         in this context which avoids -Werror=unused-value.  Note we don't
57049         use ignore_value here to avoid a dependency as we know we'll not
57050         be adding __attribute__((warn_unused_result)) to check_invariants().
57051         Add _GL_ATTRIBUTE_CONST to avoid -Werror=suggest-attribute=const.
57053 2014-09-15  Paul Eggert  <eggert@cs.ucla.edu>
57055         qsort_r: new module, for GNU-style qsort_r
57056         * m4/qsort_r.m4: New file.  Forgot to add this earlier.
57058 2014-09-15  Werner LEMBERG  <wl@gnu.org>
57060         strerror_r-posix: support compilation with C++
57061         * lib/strerror_r.c: Add necessary C linkage declarations.
57063 2014-09-11  Johannes Zarl  <johannes.zarl@jku.at>
57065         fcntl-h: fix compilation with Intel C++ compiler (trivial)
57066         * lib/fcntl.in.h: ICC has the same issue as GCC <= 4.2.
57068 2014-09-09  Fridolin Pokorny  <fpokorny@redhat.com>
57070         mountlist: use /proc/self/mountinfo when available
57071         Use libmount to propagate device IDs provided by Linux in
57072         /proc/self/mountinfo.  This will give more accurate output when
57073         using df in chroot'ed environments as the device IDs are not
57074         determined by stat() which may be inaccurate within the chroot.
57075         * lib/mountlist.c (read_file_system_list): Use the libmount routines
57076         from util-linux to parse "/proc/self/mountinfo" or fall back to
57077         standard getmntent() processing.
57078         * m4/ls-mntd-fs.m4: Check for libmount only when 1-argument
57079         getmntent() is used, as is the case on GNU/Linux.
57081 2014-09-07  Eric Wong  <normalperson@yhbt.net>
57083         users.txt: add cmogstored
57084         cmogstored has used gnulib since the beginning in 2012 to support
57085         GNU/Linux, FreeBSD, and GNU/kFreeBSD.
57087 2014-09-05  Mathieu Anquetin  <mathieu@anquetin.eu>
57089         Trivial change.
57090         * gnulib-tool: Use same options as build-aux/bootstrap to download
57091         PO files.
57093 2014-09-05  Mathieu Anquetin  <mathieu@anquetin.eu>
57095         Trivial change.
57096         * gnulib-tool: Fallback to wget when rsync of PO files fails.
57098 2014-09-04  Eric Blake  <eblake@redhat.com>
57100         maintainer-makefile: add syntax check for useless ';;'
57101         * top/maint.mk (sc_prohibit_double_semicolon): New rule.
57103 2014-09-04  Paul Eggert  <eggert@cs.ucla.edu>
57105         pthread, pthread_sigmask, threadlib: port to Ubuntu 14.04
57106         Problem reported by Assaf Gordon in:
57107         http://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
57108         Apparently Ubuntu is doing some fancy link-time optimization
57109         that doesn't work with -lpthread but does work with -pthread.
57110         Work around the bug by preferring -pthread to -lpthread.
57111         * m4/pthread.m4 (gl_PTHREAD_CHECK):
57112         * m4/threadlib.m4 (gl_THREADLIB_BODY): Prefer -pthread to -lpthread.
57113         * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK):
57114         Treat -pthread like -lpthread.
57116 2014-09-04  Eric Blake  <eblake@redhat.com>
57118         error: drop spurious semicolon
57119         * lib/error.c (__error_at_line): Fix ';;'.
57121 2014-09-02  Paul Eggert  <eggert@cs.ucla.edu>
57123         gnulib-common.m4: port to GCC 4.2.1 and Sun Studio 12 C++
57124         * m4/gnulib-common.m4 (AC_C_RESTRICT):
57125         Override AC_C_RESTRICT unconditionally.
57126         Update from autoconf, incorporating:
57127         2014-09-02 autoconf: port 'restrict' to GCC 4.2.1
57128         2009-01-28 Fix AC_C_RESTRICT for Sun Studio 12 C++.
57130 2014-09-01  Paul Eggert  <eggert@cs.ucla.edu>
57132         manywarnings: add GCC 4.9 warnings
57133         Also, make it easier to maintain this in the future.
57134         * build-aux/gcc-warning.spec: Add -Wabi-tag,
57135         -Wconditionally-supported, -Wdelete-incomplete,
57136         -Winherited-variadic-ctor, -Wvirtual-move-assign, -Wzerotrip.
57137         Remove duplicates.  Use tabs uniformly, as that's what 'cut' wants.
57138         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Add -Wdate-time,
57139         -Wopenmp-simd.  Use -fdiagnostics-show-option and -funit-at-a-time
57140         only for older GCC versions that need them.  Handle
57141         -Wnormalized=nfc specially, so that the 'comm' command used
57142         for maintenance doesn't get confused.
57144 2014-08-31  Paul Eggert  <eggert@cs.ucla.edu>
57146         vasnprintf: fix bugs in width computation
57147         * lib/vasnprintf.c (VASNPRINTF):
57148         Rework previous change, which introduced a bug,
57149         to avoid the warning in a different way.
57150         Avoid undefined behavior if the width arg is less than -INT_MAX.
57151         Avoid unnecessary use of HAS_WIDTH local.
57153 2014-08-31  Thien-Thi Nguyen  <ttn@gnu.org>  (tiny change)
57155         vasnprintf: Avoid signed/unsigned comparison warning.
57156         * lib/vasnprintf.c (VASNPRINTF): To calculate padding,
57157         compare end addr of generated string w/ maximum end addr.
57159 2013-08-30  Mats Erik Andersson  <gnu@gisladisker.se>  (tiny change)
57161         parse-datetime: Avoid pointer difference.
57162         * lib/parse-datetime.y (yylex): Compare pointer to end of buffer,
57163         instead of calculating difference of pointers.  This removes an
57164         annoying warning, devoid of any use.
57166 2014-08-29  Paul Eggert  <eggert@cs.ucla.edu>
57168         qsort_r: new module, for GNU-style qsort_r
57169         This works even on FreeBSD, which has an incompatible qsort_r API.
57170         * MODULES.html.sh: Add it.
57171         * doc/glibc-functions/qsort_r.texi: It's now supported.
57172         * lib/qsort.c: New file, taken from glibc with minor changes
57173         inside "#ifndef _LIBC" and with an unnecessary "#include <alloca.h>"
57174         removed.
57175         * lib/qsort_r.c: New file, compiled only on FreeBSD.
57176         * lib/stdlib.in.h (qsort_r): Declare in the usual way.
57177         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS):
57178         * modules/qsort_r, modules/qsort_r-tests: New files.
57179         * modules/stdlib (Makefile): Set up its defaults.
57180         * tests/test-qsort_r.c: New file.
57182 2014-08-08  Paul Eggert  <eggert@cs.ucla.edu>
57184         vla: new module
57185         GNU RCS can use this, mostly for documentation I expect.  See:
57186         http://lists.gnu.org/r/bug-gnulib/2014-08/msg00025.html
57187         * MODULES.html.sh: Add vla.
57188         * lib/vla.h, modules/vla: New files.
57190 2014-08-07  Daiki Ueno  <ueno@gnu.org>
57192         localename: make gl_locale_name_thread really thread-safe on Windows
57193         * lib/localename.c [WINDOWS_NATIVE && !IN_LIBINTL]: Include
57194         "glthread/lock.h".
57195         (get_lcid_lock) [WINDOWS_NATIVE]: New variable.
57196         (get_lcid) [WINDOWS_NATIVE]: Lock while looking for an LCID.
57198 2014-08-07  Paul Eggert  <eggert@cs.ucla.edu>
57200         getpass: don't assume struct termios
57201         Problem report and trivial fix by Jonas 'Sortie' Termansen in:
57202         http://lists.gnu.org/r/bug-gnulib/2014-08/msg00015.html
57203         * lib/getpass.c (getpass): Port to systems lacking struct termios.
57205         getdtablesize: fall back on sysconf (_SC_OPEN_MAX)
57206         Problem reported by Jonas 'Sortie' Termansen in:
57207         http://lists.gnu.org/r/bug-gnulib/2014-08/msg00023.html
57208         * lib/getdtablesize.c (getdtablesize) [_SC_OPEN_MAX]:
57209         Implement via sysconf for platforms that lack getdtablesize.
57211         vararrays: modernize AC_C_VARARRAYS for C11
57212         This backports a change I recently made to Autoconf.
57213         * m4/vararrays.m4 (AC_C_VARARRAYS): Define __STDC_NO_VLA__ if
57214         VLAs are not supported, as this is what C11 does.  The old macro
57215         HAVE_C_VARARRAYS is still defined if they are supported, but is
57216         now obsolescent.  Also, check for VLA bug in GCC 3.4.3.
57218 2014-08-07  Alessandro Degano  <degano@cern.ch>  (tiny change)
57220         relocatable-prog-wrapper: port gettext to OS X 10.8 + GCC 4.8.1
57221         * build-aux/install-reloc (func_create_wrapper): Also wrap
57222         strerror-override, stat, stat.
57224 2014-08-05  Paul Eggert  <eggert@cs.ucla.edu>
57226         sys_select: fix FD_ZERO problem on Solaris 10
57227         * lib/sys_select.in.h: Fix Solaris 10 bug where "#include
57228         <sys/time.h>" followed by "#include <sys/select.h>" caused FD_ZERO
57229         to expand to an expression that invoked memset without necessarily
57230         including <string.h>.  The problem was that the first include
57231         defined _SYS_TIME_H, causing the second include to short-circuit.
57232         Fix a similar problem with <sys/types.h> followed by <sys/select.h>.
57233         Also, fix what appears to be a cut-and-paste typo, by replacing
57234         _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TIME_H with
57235         _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TYPES_H.
57237         accept: document Solaris 10 type glitch
57238         * doc/posix-functions/accept.texi (accept): Mention that
57239         Solaris 10 'accept' takes void * last arg, not socklen_t *.
57241 2014-08-04  Paul Eggert  <eggert@cs.ucla.edu>
57243         extern-inline: port to FreeBSD, DragonFly
57244         * m4/extern-inline.m4 (gl_EXTERN_INLINE): Also assume the bug
57245         is present if either __DragonFly__ or __FreeBSD__ is defined.
57246         FreeBSD problem reported by Andrey Borzenkov in:
57247         http://lists.gnu.org/r/bug-gnulib/2014-07/msg00104.html
57248         Also, worry about __APPLE__ only if __MACH__ is also defined,
57249         as this is more consistent with the rest of gnulib.
57250         (_GL_EXTERN_INLINE_STDHEADER_BUG): Rename this internal macro from
57251         _GL_EXTERN_INLINE_APPLE_BUG, since the bug is not limited to Apple.
57253 2014-08-01  Siddhesh Poyarekar  <siddhesh@redhat.com>
57255         regex: Make #if/#ifdef usage consistent for DEBUG
57256         * lib/regex_internal.c: Use "#if defined DEBUG && DEBUG" instead
57257         of the inconsistent usage of #if and #ifdef as that works with
57258         both Glibc and Gnulib's style.
57260 2014-07-31  Eric Blake  <eblake@redhat.com>
57262         openat-die: use _Noreturn markup
57263         * modules/openat-die (Depends-on): Add snippet/_Noreturn.
57264         * lib/openat-die.c (openat_save_fail, openat_restore_fail): Mark
57265         _Noreturn.
57267 2014-07-30  Eric Blake  <eblake@redhat.com>
57269         test-open: port to cygwin, which lacks Fortify
57270         * tests/test-open.h (ALWAYS_INLINE): New macro.
57271         (__always_inline): Don't abuse internal symbol on non-glibc.
57273 2014-07-19  Eli Zaretskii  <eliz@gnu.org>
57275         localename: Enforce declarations before statements.
57276         * localename.c (gl_locale_name_thread): Declare 'lcid' before the
57277         first statement.
57279 2014-07-18  Jim Meyering  <meyering@fb.com>
57281         test-userspec: don't look up numeric user names
57282         * tests/test-userspec.c: I found a system for which getpwnam("0")
57283         returned a pointer to a non-root user's entry, and that made the
57284         test fail.
57285         (T): Prefix each numeric input with "+", to inhibit lookup.
57287 2014-07-15  Eli Zaretskii  <eliz@gnu.org>
57289         localcharset, localename: MS-Windows support for non-default locales
57290         * lib/localcharset.c (locale_charset) [WINDOWS_NATIVE]: Before
57291         falling back on the default system codepage, try extracting
57292         the codepage from what 'setlocale' returns.  This allows to
57293         take into account changes of the codeset due to non-default
57294         locale set by a previous call to 'setlocale'.
57295         * lib/localename.c (LOCALE_NAME_MAX_LENGTH) [WINDOWS_NATIVE]:
57296         Define if not already defined.
57297         (enum_locales_fn, get_lcid) [WINDOWS_NATIVE]: New functions.
57298         (gl_locale_name_thread) [WINDOWS_NATIVE]: Produce the
57299         current locale by calling 'setlocale', then converting the
57300         locale name into LCID by calling 'get_lcid'.  This allows to
57301         take into account changes in the current locale from the
57302         default one, in contrast to GetThreadLocale.
57304 2014-07-14  Daiki Ueno  <ueno@gnu.org>
57306         announce-gen: avoid failure when Digest::SHA is installed
57307         When Digest::SHA is available, Digest::SHA1 is not loaded and thus
57308         Digest::SHA1->new in print_checksums fails.
57309         * build-aux/announce-gen (digest_classes): New associative array
57310         for available message digest implementations.
57311         (print_locations): Use it.
57313 2014-07-13  Pádraig Brady  <P@draigBrady.com>
57315         gettext: revert "update macros to version 0.19"
57316         This reverts commit 9b9370ca, as it currently requires that
57317         developers of any project that explicitly uses the gettext module
57318         or implicitly uses it through the utimens-tests or
57319         futimens-tests modules, use gettext >= 0.19.
57320         However there are some stability and availablity issues with
57321         that version at present.  We can reinstate this soon, when stability
57322         is addressed and packages are more readily available.
57324 2014-07-12  Jim Meyering  <meyering@fb.com>
57326         regex: don't deref NULL upon heap allocation failure
57327         * lib/regcomp.c (parse_dup_op): Handle duplicate_tree
57328         failure in one more place.
57329         To trigger the segfault, configure grep -with-included-regex,
57330         build it, and run these commands:
57331         ( ulimit -v 300000; echo a|src/grep -E a+++++++++++++++++++++ )
57332         I discovered this while replying to a private report from
57333         Jens Schleusener about excessive memory consumption by grep
57334         when using a regular expression like the one above.
57336 2014-07-11  Paul Eggert  <eggert@cs.ucla.edu>
57338         regex: fix memory leak in compiler
57339         Fix by Andreas Schwab in:
57340         https://sourceware.org/ml/libc-alpha/2014-06/msg00503.html
57341         * lib/regcomp.c (parse_reg_exp): Deallocate partially
57342         constructed tree before returning error.
57344 2014-07-10  Assaf Gordon  <assafgordon@gmail.com>
57346         announce-gen: avoid perl warnings
57347         * build-aux/announce-gen: add two minor checks to avoid
57348         "use of uninitialized value" warnings when command-line parameters are
57349         missing.
57351 2014-07-10  Assaf Gordon  <assafgordon@gmail.com>
57353         localename: avoid -Wsuggest-attribute={const,pure} warnings
57354         * lib/localename.c (string_has): Tag internal function as pure.
57355         * lib/localename.h (gl_locale_name_default): Tag extern declaration
57356         as const when appropriate.
57358 2014-07-10  Eli Zaretskii  <eliz@gnu.org>
57360         nl_langinfo: Fix last change.
57361         * lib/nl_langinfo.c (includes): Drop redundant include.
57363 2014-07-10  Siddhesh Poyarekar  <siddhesh@redhat.com>
57365         error: Fix -Wundef warnings in glibc
57366         * lib/error.c [_LIBC]: Define default macros for
57367         glibc.
57368         (print_errno_message) [defined HAVE_STRERROR_R || _LIBC]:
57369         Check _LIBC before STRERROR_R_CHAR_P.
57371         error: Sync from glibc master
57372         * lib/error.c [_LIBC]: Remove INTUSE usage.
57373         (error_tail): Remove unused macro ALLOCA_LIMIT.
57374         Fix potential buffer overflow.  Fix potential NULL dereference
57375         in strcmp.
57377 2014-07-09  Pavel Hrdina  <phrdina@redhat.com> (tiny change)
57379         nl_langinfo: fix build under mingw
57380         * lib/nl_langinfo.c (includes): Pick up <windows.h> for GetACP().
57382 2014-07-09  Andrew D Warshall  <warshall@99main.com>
57384         mountlist: do not classify a bind-mounted dir entry as "dummy"
57385         * m4/ls-mntd-fs.m4: Check for hasmntopt() on platforms with
57386         1-argument getmntent() (instead of assuming absence).
57388 2014-07-08  Eric Blake  <eblake@redhat.com>
57390         maint.mk: less syntax-check noise when SIGPIPE is ignored
57391         * top/maint.mk (_sc_header_without_use)
57392         (sc_require_config_h_first): Parse full list.
57394 2014-07-07  Eli Zaretskii  <eliz@gnu.org>
57395             Paul Eggert  <eggert@cs.ucla.edu>
57397         nl_langinfo: CODESET on MS-Windows and more items from localeconv
57398         * lib/langinfo.in.h (DECIMAL_POINT, THOUSANDS_SEP, GROUPING)
57399         (CURRENCY_SYMBOL, INT_CURR_SYMBOL, MON_DECIMAL_POINT)
57400         (MON_THOUSANDS_SEP, MON_GROUPING, POSITIVE_SIGN, NEGATIVE_SIGN)
57401         (FRAC_DIGITS, INT_FRAC_DIGITS, P_CS_PRECEDES, N_CS_PRECEDES)
57402         (P_SEP_BY_SPACE, N_SEP_BY_SPACE, P_SIGN_POSN, N_SIGN_POSN): Define.
57403         * lib/nl_langinfo.c: Include <locale.h> and <string.h> early.
57404         Include <stdio.h> if Microsoft Windows.
57405         Include <time.h> if !REPLACE_NL_LANGINFO.
57406         (ctype_codeset): New function, taken from rpl_nl_langinfo,
57407         and with improvements for Microsoft Windows.
57408         (rpl_nl_langinfo): Use it.
57409         (nl_langinfo) [!REPLACE_NL_LANGINFO]: Likewise.
57410         Compute the values of RADIXCHAR, THOUSEP, GROUPING, CRNCYSTR,
57411         INT_CURR_SYMBOL, MON_DECIMAL_POINT, MON_THOUSANDS_SEP,
57412         MON_GROUPING, POSITIVE_SIGN, NEGATIVE_SIGN, FRAC_DIGITS,
57413         INT_FRAC_DIGITS, P_CS_PRECEDES, N_CS_PRECEDES, P_SEP_BY_SPACE,
57414         N_SEP_BY_SPACE, P_SIGN_POSN, and N_SIGN_POSN from the
57415         corresponding values returned by 'localeconv'.  Compute the values
57416         of AM_STR, PM_STR, DAY_n, ABDAY_n, MON_n, and ABMON_n by calling
57417         'strftime' with a suitable struct tm value.
57419 2014-07-05  Paul Eggert  <eggert@cs.ucla.edu>
57421         Bruno Haible has stepped down as maintainer.
57422         See Karl Berry in:
57423         http://lists.gnu.org/r/bug-gnulib/2014-07/msg00004.html
57424         Daiki Ueno has volunteered to maintain libunistring; see:
57425         http://lists.gnu.org/r/bug-gnulib/2014-07/msg00005.html
57426         * modules/gen-uni-tables, modules/libunistring:
57427         * modules/libunistring-optional, modules/ucs4-utf16, modules/ucs4-utf8:
57428         * modules/unicase/base, modules/unicase/cased:
57429         * modules/unicase/empty-prefix-context:
57430         * modules/unicase/empty-suffix-context, modules/unicase/ignorable:
57431         * modules/unicase/locale-language, modules/unicase/special-casing:
57432         * modules/unicase/tocasefold, modules/unicase/tolower:
57433         * modules/unicase/totitle, modules/unicase/toupper:
57434         * modules/unicase/u16-casecmp, modules/unicase/u16-casecoll:
57435         * modules/unicase/u16-casefold, modules/unicase/u16-casemap:
57436         * modules/unicase/u16-casexfrm, modules/unicase/u16-ct-casefold:
57437         * modules/unicase/u16-ct-tolower, modules/unicase/u16-ct-totitle:
57438         * modules/unicase/u16-ct-toupper, modules/unicase/u16-is-cased:
57439         * modules/unicase/u16-is-casefolded, modules/unicase/u16-is-invariant:
57440         * modules/unicase/u16-is-lowercase, modules/unicase/u16-is-titlecase:
57441         * modules/unicase/u16-is-uppercase, modules/unicase/u16-prefix-context:
57442         * modules/unicase/u16-suffix-context, modules/unicase/u16-tolower:
57443         * modules/unicase/u16-totitle, modules/unicase/u16-toupper:
57444         * modules/unicase/u32-casecmp, modules/unicase/u32-casecoll:
57445         * modules/unicase/u32-casefold, modules/unicase/u32-casemap:
57446         * modules/unicase/u32-casexfrm, modules/unicase/u32-ct-casefold:
57447         * modules/unicase/u32-ct-tolower, modules/unicase/u32-ct-totitle:
57448         * modules/unicase/u32-ct-toupper, modules/unicase/u32-is-cased:
57449         * modules/unicase/u32-is-casefolded, modules/unicase/u32-is-invariant:
57450         * modules/unicase/u32-is-lowercase, modules/unicase/u32-is-titlecase:
57451         * modules/unicase/u32-is-uppercase, modules/unicase/u32-prefix-context:
57452         * modules/unicase/u32-suffix-context, modules/unicase/u32-tolower:
57453         * modules/unicase/u32-totitle, modules/unicase/u32-toupper:
57454         * modules/unicase/u8-casecmp, modules/unicase/u8-casecoll:
57455         * modules/unicase/u8-casefold, modules/unicase/u8-casemap:
57456         * modules/unicase/u8-casexfrm, modules/unicase/u8-ct-casefold:
57457         * modules/unicase/u8-ct-tolower, modules/unicase/u8-ct-totitle:
57458         * modules/unicase/u8-ct-toupper, modules/unicase/u8-is-cased:
57459         * modules/unicase/u8-is-casefolded, modules/unicase/u8-is-invariant:
57460         * modules/unicase/u8-is-lowercase, modules/unicase/u8-is-titlecase:
57461         * modules/unicase/u8-is-uppercase, modules/unicase/u8-prefix-context:
57462         * modules/unicase/u8-suffix-context, modules/unicase/u8-tolower:
57463         * modules/unicase/u8-totitle, modules/unicase/u8-toupper:
57464         * modules/unicase/ulc-casecmp, modules/unicase/ulc-casecoll:
57465         * modules/unicase/ulc-casexfrm, modules/unicodeio:
57466         * modules/uniconv/base, modules/uniconv/u16-conv-from-enc:
57467         * modules/uniconv/u16-conv-to-enc:
57468         * modules/uniconv/u16-strconv-from-enc:
57469         * modules/uniconv/u16-strconv-from-locale:
57470         * modules/uniconv/u16-strconv-to-enc:
57471         * modules/uniconv/u16-strconv-to-locale:
57472         * modules/uniconv/u32-conv-from-enc, modules/uniconv/u32-conv-to-enc:
57473         * modules/uniconv/u32-strconv-from-enc:
57474         * modules/uniconv/u32-strconv-from-locale:
57475         * modules/uniconv/u32-strconv-to-enc:
57476         * modules/uniconv/u32-strconv-to-locale:
57477         * modules/uniconv/u8-conv-from-enc, modules/uniconv/u8-conv-to-enc:
57478         * modules/uniconv/u8-strconv-from-enc:
57479         * modules/uniconv/u8-strconv-from-locale:
57480         * modules/uniconv/u8-strconv-to-enc:
57481         * modules/uniconv/u8-strconv-to-locale, modules/unictype/base:
57482         * modules/unictype/bidicategory-all:
57483         * modules/unictype/bidicategory-byname:
57484         * modules/unictype/bidicategory-name, modules/unictype/bidicategory-of:
57485         * modules/unictype/bidicategory-test, modules/unictype/bidiclass-all:
57486         * modules/unictype/bidiclass-byname:
57487         * modules/unictype/bidiclass-longname, modules/unictype/bidiclass-name:
57488         * modules/unictype/bidiclass-of, modules/unictype/bidiclass-test:
57489         * modules/unictype/block-all, modules/unictype/block-list:
57490         * modules/unictype/block-of, modules/unictype/block-test:
57491         * modules/unictype/category-C, modules/unictype/category-Cc:
57492         * modules/unictype/category-Cf, modules/unictype/category-Cn:
57493         * modules/unictype/category-Co, modules/unictype/category-Cs:
57494         * modules/unictype/category-L, modules/unictype/category-LC:
57495         * modules/unictype/category-Ll, modules/unictype/category-Lm:
57496         * modules/unictype/category-Lo, modules/unictype/category-Lt:
57497         * modules/unictype/category-Lu, modules/unictype/category-M:
57498         * modules/unictype/category-Mc, modules/unictype/category-Me:
57499         * modules/unictype/category-Mn, modules/unictype/category-N:
57500         * modules/unictype/category-Nd, modules/unictype/category-Nl:
57501         * modules/unictype/category-No, modules/unictype/category-P:
57502         * modules/unictype/category-Pc, modules/unictype/category-Pd:
57503         * modules/unictype/category-Pe, modules/unictype/category-Pf:
57504         * modules/unictype/category-Pi, modules/unictype/category-Po:
57505         * modules/unictype/category-Ps, modules/unictype/category-S:
57506         * modules/unictype/category-Sc, modules/unictype/category-Sk:
57507         * modules/unictype/category-Sm, modules/unictype/category-So:
57508         * modules/unictype/category-Z, modules/unictype/category-Zl:
57509         * modules/unictype/category-Zp, modules/unictype/category-Zs:
57510         * modules/unictype/category-all, modules/unictype/category-and:
57511         * modules/unictype/category-and-not, modules/unictype/category-byname:
57512         * modules/unictype/category-longname, modules/unictype/category-name:
57513         * modules/unictype/category-none, modules/unictype/category-of:
57514         * modules/unictype/category-or, modules/unictype/category-test:
57515         * modules/unictype/category-test-withtable:
57516         * modules/unictype/combining-class:
57517         * modules/unictype/combining-class-all:
57518         * modules/unictype/combining-class-byname:
57519         * modules/unictype/combining-class-longname:
57520         * modules/unictype/combining-class-name, modules/unictype/ctype-alnum:
57521         * modules/unictype/ctype-alpha, modules/unictype/ctype-blank:
57522         * modules/unictype/ctype-cntrl, modules/unictype/ctype-digit:
57523         * modules/unictype/ctype-graph, modules/unictype/ctype-lower:
57524         * modules/unictype/ctype-print, modules/unictype/ctype-punct:
57525         * modules/unictype/ctype-space, modules/unictype/ctype-upper:
57526         * modules/unictype/ctype-xdigit, modules/unictype/decimal-digit:
57527         * modules/unictype/digit, modules/unictype/joininggroup-all:
57528         * modules/unictype/joininggroup-byname:
57529         * modules/unictype/joininggroup-name, modules/unictype/joininggroup-of:
57530         * modules/unictype/joiningtype-all:
57531         * modules/unictype/joiningtype-byname:
57532         * modules/unictype/joiningtype-longname:
57533         * modules/unictype/joiningtype-name, modules/unictype/joiningtype-of:
57534         * modules/unictype/mirror, modules/unictype/numeric:
57535         * modules/unictype/property-all, modules/unictype/property-alphabetic:
57536         * modules/unictype/property-ascii-hex-digit:
57537         * modules/unictype/property-bidi-arabic-digit:
57538         * modules/unictype/property-bidi-arabic-right-to-left:
57539         * modules/unictype/property-bidi-block-separator:
57540         * modules/unictype/property-bidi-boundary-neutral:
57541         * modules/unictype/property-bidi-common-separator:
57542         * modules/unictype/property-bidi-control:
57543         * modules/unictype/property-bidi-embedding-or-override:
57544         * modules/unictype/property-bidi-eur-num-separator:
57545         * modules/unictype/property-bidi-eur-num-terminator:
57546         * modules/unictype/property-bidi-european-digit:
57547         * modules/unictype/property-bidi-hebrew-right-to-left:
57548         * modules/unictype/property-bidi-left-to-right:
57549         * modules/unictype/property-bidi-non-spacing-mark:
57550         * modules/unictype/property-bidi-other-neutral:
57551         * modules/unictype/property-bidi-pdf:
57552         * modules/unictype/property-bidi-segment-separator:
57553         * modules/unictype/property-bidi-whitespace:
57554         * modules/unictype/property-byname:
57555         * modules/unictype/property-case-ignorable:
57556         * modules/unictype/property-cased:
57557         * modules/unictype/property-changes-when-casefolded:
57558         * modules/unictype/property-changes-when-casemapped:
57559         * modules/unictype/property-changes-when-lowercased:
57560         * modules/unictype/property-changes-when-titlecased:
57561         * modules/unictype/property-changes-when-uppercased:
57562         * modules/unictype/property-combining:
57563         * modules/unictype/property-composite:
57564         * modules/unictype/property-currency-symbol:
57565         * modules/unictype/property-dash:
57566         * modules/unictype/property-decimal-digit:
57567         * modules/unictype/property-default-ignorable-code-point:
57568         * modules/unictype/property-deprecated:
57569         * modules/unictype/property-diacritic:
57570         * modules/unictype/property-extender:
57571         * modules/unictype/property-format-control:
57572         * modules/unictype/property-grapheme-base:
57573         * modules/unictype/property-grapheme-extend:
57574         * modules/unictype/property-grapheme-link:
57575         * modules/unictype/property-hex-digit:
57576         * modules/unictype/property-hyphen:
57577         * modules/unictype/property-id-continue:
57578         * modules/unictype/property-id-start:
57579         * modules/unictype/property-ideographic:
57580         * modules/unictype/property-ids-binary-operator:
57581         * modules/unictype/property-ids-trinary-operator:
57582         * modules/unictype/property-ignorable-control:
57583         * modules/unictype/property-iso-control:
57584         * modules/unictype/property-join-control:
57585         * modules/unictype/property-left-of-pair:
57586         * modules/unictype/property-line-separator:
57587         * modules/unictype/property-logical-order-exception:
57588         * modules/unictype/property-lowercase, modules/unictype/property-math:
57589         * modules/unictype/property-non-break:
57590         * modules/unictype/property-not-a-character:
57591         * modules/unictype/property-numeric:
57592         * modules/unictype/property-other-alphabetic:
57593         * modules/unictype/property-other-default-ignorable-code-point:
57594         * modules/unictype/property-other-grapheme-extend:
57595         * modules/unictype/property-other-id-continue:
57596         * modules/unictype/property-other-id-start:
57597         * modules/unictype/property-other-lowercase:
57598         * modules/unictype/property-other-math:
57599         * modules/unictype/property-other-uppercase:
57600         * modules/unictype/property-paired-punctuation:
57601         * modules/unictype/property-paragraph-separator:
57602         * modules/unictype/property-pattern-syntax:
57603         * modules/unictype/property-pattern-white-space:
57604         * modules/unictype/property-private-use:
57605         * modules/unictype/property-punctuation:
57606         * modules/unictype/property-quotation-mark:
57607         * modules/unictype/property-radical:
57608         * modules/unictype/property-sentence-terminal:
57609         * modules/unictype/property-soft-dotted:
57610         * modules/unictype/property-space:
57611         * modules/unictype/property-terminal-punctuation:
57612         * modules/unictype/property-test, modules/unictype/property-titlecase:
57613         * modules/unictype/property-unassigned-code-value:
57614         * modules/unictype/property-unified-ideograph:
57615         * modules/unictype/property-uppercase:
57616         * modules/unictype/property-variation-selector:
57617         * modules/unictype/property-white-space:
57618         * modules/unictype/property-xid-continue:
57619         * modules/unictype/property-xid-start:
57620         * modules/unictype/property-zero-width, modules/unictype/scripts:
57621         * modules/unictype/scripts-all, modules/unictype/syntax-c-ident:
57622         * modules/unictype/syntax-c-whitespace:
57623         * modules/unictype/syntax-java-ident:
57624         * modules/unictype/syntax-java-whitespace, modules/unigbrk/base:
57625         * modules/unigbrk/u16-grapheme-breaks:
57626         * modules/unigbrk/u16-grapheme-next, modules/unigbrk/u16-grapheme-prev:
57627         * modules/unigbrk/u32-grapheme-breaks:
57628         * modules/unigbrk/u32-grapheme-next, modules/unigbrk/u32-grapheme-prev:
57629         * modules/unigbrk/u8-grapheme-breaks, modules/unigbrk/u8-grapheme-next:
57630         * modules/unigbrk/u8-grapheme-prev, modules/unigbrk/uc-gbrk-prop:
57631         * modules/unigbrk/uc-is-grapheme-break:
57632         * modules/unigbrk/ulc-grapheme-breaks, modules/unilbrk/base:
57633         * modules/unilbrk/tables, modules/unilbrk/u16-possible-linebreaks:
57634         * modules/unilbrk/u16-width-linebreaks:
57635         * modules/unilbrk/u32-possible-linebreaks:
57636         * modules/unilbrk/u32-width-linebreaks:
57637         * modules/unilbrk/u8-possible-linebreaks:
57638         * modules/unilbrk/u8-width-linebreaks, modules/unilbrk/ulc-common:
57639         * modules/unilbrk/ulc-possible-linebreaks:
57640         * modules/unilbrk/ulc-width-linebreaks, modules/uniname/base:
57641         * modules/uniname/uniname, modules/uninorm/base:
57642         * modules/uninorm/canonical-decomposition:
57643         * modules/uninorm/compat-decomposition, modules/uninorm/composition:
57644         * modules/uninorm/decompose-internal, modules/uninorm/decomposing-form:
57645         * modules/uninorm/decomposition, modules/uninorm/decomposition-table:
57646         * modules/uninorm/filter, modules/uninorm/nfc, modules/uninorm/nfd:
57647         * modules/uninorm/nfkc, modules/uninorm/nfkd:
57648         * modules/uninorm/u16-normalize, modules/uninorm/u16-normcmp:
57649         * modules/uninorm/u16-normcoll, modules/uninorm/u16-normxfrm:
57650         * modules/uninorm/u32-normalize, modules/uninorm/u32-normcmp:
57651         * modules/uninorm/u32-normcoll, modules/uninorm/u32-normxfrm:
57652         * modules/uninorm/u8-normalize, modules/uninorm/u8-normcmp:
57653         * modules/uninorm/u8-normcoll, modules/uninorm/u8-normxfrm:
57654         * modules/unistdio/base, modules/unistdio/u-printf-args:
57655         * modules/unistdio/u16-asnprintf, modules/unistdio/u16-asprintf:
57656         * modules/unistdio/u16-printf-parse, modules/unistdio/u16-snprintf:
57657         * modules/unistdio/u16-sprintf, modules/unistdio/u16-u16-asnprintf:
57658         * modules/unistdio/u16-u16-asprintf, modules/unistdio/u16-u16-snprintf:
57659         * modules/unistdio/u16-u16-sprintf:
57660         * modules/unistdio/u16-u16-vasnprintf:
57661         * modules/unistdio/u16-u16-vasprintf:
57662         * modules/unistdio/u16-u16-vsnprintf:
57663         * modules/unistdio/u16-u16-vsprintf, modules/unistdio/u16-vasnprintf:
57664         * modules/unistdio/u16-vasprintf, modules/unistdio/u16-vsnprintf:
57665         * modules/unistdio/u16-vsprintf, modules/unistdio/u32-asnprintf:
57666         * modules/unistdio/u32-asprintf, modules/unistdio/u32-printf-parse:
57667         * modules/unistdio/u32-snprintf, modules/unistdio/u32-sprintf:
57668         * modules/unistdio/u32-u32-asnprintf:
57669         * modules/unistdio/u32-u32-asprintf, modules/unistdio/u32-u32-snprintf:
57670         * modules/unistdio/u32-u32-sprintf:
57671         * modules/unistdio/u32-u32-vasnprintf:
57672         * modules/unistdio/u32-u32-vasprintf:
57673         * modules/unistdio/u32-u32-vsnprintf:
57674         * modules/unistdio/u32-u32-vsprintf, modules/unistdio/u32-vasnprintf:
57675         * modules/unistdio/u32-vasprintf, modules/unistdio/u32-vsnprintf:
57676         * modules/unistdio/u32-vsprintf, modules/unistdio/u8-asnprintf:
57677         * modules/unistdio/u8-asprintf, modules/unistdio/u8-printf-parse:
57678         * modules/unistdio/u8-snprintf, modules/unistdio/u8-sprintf:
57679         * modules/unistdio/u8-u8-asnprintf, modules/unistdio/u8-u8-asprintf:
57680         * modules/unistdio/u8-u8-snprintf, modules/unistdio/u8-u8-sprintf:
57681         * modules/unistdio/u8-u8-vasnprintf, modules/unistdio/u8-u8-vasprintf:
57682         * modules/unistdio/u8-u8-vsnprintf, modules/unistdio/u8-u8-vsprintf:
57683         * modules/unistdio/u8-vasnprintf, modules/unistdio/u8-vasprintf:
57684         * modules/unistdio/u8-vsnprintf, modules/unistdio/u8-vsprintf:
57685         * modules/unistdio/ulc-asnprintf, modules/unistdio/ulc-asprintf:
57686         * modules/unistdio/ulc-fprintf, modules/unistdio/ulc-printf-parse:
57687         * modules/unistdio/ulc-snprintf, modules/unistdio/ulc-sprintf:
57688         * modules/unistdio/ulc-vasnprintf, modules/unistdio/ulc-vasprintf:
57689         * modules/unistdio/ulc-vfprintf, modules/unistdio/ulc-vsnprintf:
57690         * modules/unistdio/ulc-vsprintf, modules/unistr/base:
57691         * modules/unistr/u16-check, modules/unistr/u16-chr:
57692         * modules/unistr/u16-cmp, modules/unistr/u16-cmp2:
57693         * modules/unistr/u16-cpy, modules/unistr/u16-cpy-alloc:
57694         * modules/unistr/u16-endswith, modules/unistr/u16-mblen:
57695         * modules/unistr/u16-mbsnlen, modules/unistr/u16-mbtouc:
57696         * modules/unistr/u16-mbtouc-unsafe, modules/unistr/u16-mbtoucr:
57697         * modules/unistr/u16-move, modules/unistr/u16-next:
57698         * modules/unistr/u16-prev, modules/unistr/u16-set:
57699         * modules/unistr/u16-startswith, modules/unistr/u16-stpcpy:
57700         * modules/unistr/u16-stpncpy, modules/unistr/u16-strcat:
57701         * modules/unistr/u16-strchr, modules/unistr/u16-strcmp:
57702         * modules/unistr/u16-strcoll, modules/unistr/u16-strcpy:
57703         * modules/unistr/u16-strcspn, modules/unistr/u16-strdup:
57704         * modules/unistr/u16-strlen, modules/unistr/u16-strmblen:
57705         * modules/unistr/u16-strmbtouc, modules/unistr/u16-strncat:
57706         * modules/unistr/u16-strncmp, modules/unistr/u16-strncpy:
57707         * modules/unistr/u16-strnlen, modules/unistr/u16-strpbrk:
57708         * modules/unistr/u16-strrchr, modules/unistr/u16-strspn:
57709         * modules/unistr/u16-strstr, modules/unistr/u16-strtok:
57710         * modules/unistr/u16-to-u32, modules/unistr/u16-to-u8:
57711         * modules/unistr/u16-uctomb, modules/unistr/u32-check:
57712         * modules/unistr/u32-chr, modules/unistr/u32-cmp:
57713         * modules/unistr/u32-cmp2, modules/unistr/u32-cpy:
57714         * modules/unistr/u32-cpy-alloc, modules/unistr/u32-endswith:
57715         * modules/unistr/u32-mblen, modules/unistr/u32-mbsnlen:
57716         * modules/unistr/u32-mbtouc, modules/unistr/u32-mbtouc-unsafe:
57717         * modules/unistr/u32-mbtoucr, modules/unistr/u32-move:
57718         * modules/unistr/u32-next, modules/unistr/u32-prev:
57719         * modules/unistr/u32-set, modules/unistr/u32-startswith:
57720         * modules/unistr/u32-stpcpy, modules/unistr/u32-stpncpy:
57721         * modules/unistr/u32-strcat, modules/unistr/u32-strchr:
57722         * modules/unistr/u32-strcmp, modules/unistr/u32-strcoll:
57723         * modules/unistr/u32-strcpy, modules/unistr/u32-strcspn:
57724         * modules/unistr/u32-strdup, modules/unistr/u32-strlen:
57725         * modules/unistr/u32-strmblen, modules/unistr/u32-strmbtouc:
57726         * modules/unistr/u32-strncat, modules/unistr/u32-strncmp:
57727         * modules/unistr/u32-strncpy, modules/unistr/u32-strnlen:
57728         * modules/unistr/u32-strpbrk, modules/unistr/u32-strrchr:
57729         * modules/unistr/u32-strspn, modules/unistr/u32-strstr:
57730         * modules/unistr/u32-strtok, modules/unistr/u32-to-u16:
57731         * modules/unistr/u32-to-u8, modules/unistr/u32-uctomb:
57732         * modules/unistr/u8-check, modules/unistr/u8-chr:
57733         * modules/unistr/u8-cmp, modules/unistr/u8-cmp2, modules/unistr/u8-cpy:
57734         * modules/unistr/u8-cpy-alloc, modules/unistr/u8-endswith:
57735         * modules/unistr/u8-mblen, modules/unistr/u8-mbsnlen:
57736         * modules/unistr/u8-mbtouc, modules/unistr/u8-mbtouc-unsafe:
57737         * modules/unistr/u8-mbtoucr, modules/unistr/u8-move:
57738         * modules/unistr/u8-next, modules/unistr/u8-prev:
57739         * modules/unistr/u8-set, modules/unistr/u8-startswith:
57740         * modules/unistr/u8-stpcpy, modules/unistr/u8-stpncpy:
57741         * modules/unistr/u8-strcat, modules/unistr/u8-strchr:
57742         * modules/unistr/u8-strcmp, modules/unistr/u8-strcoll:
57743         * modules/unistr/u8-strcpy, modules/unistr/u8-strcspn:
57744         * modules/unistr/u8-strdup, modules/unistr/u8-strlen:
57745         * modules/unistr/u8-strmblen, modules/unistr/u8-strmbtouc:
57746         * modules/unistr/u8-strncat, modules/unistr/u8-strncmp:
57747         * modules/unistr/u8-strncpy, modules/unistr/u8-strnlen:
57748         * modules/unistr/u8-strpbrk, modules/unistr/u8-strrchr:
57749         * modules/unistr/u8-strspn, modules/unistr/u8-strstr:
57750         * modules/unistr/u8-strtok, modules/unistr/u8-to-u16:
57751         * modules/unistr/u8-to-u32, modules/unistr/u8-uctomb, modules/unitypes:
57752         * modules/uniwbrk/base, modules/uniwbrk/table:
57753         * modules/uniwbrk/u16-wordbreaks, modules/uniwbrk/u32-wordbreaks:
57754         * modules/uniwbrk/u8-wordbreaks, modules/uniwbrk/ulc-wordbreaks:
57755         * modules/uniwbrk/wordbreak-property, modules/uniwidth/base:
57756         * modules/uniwidth/u16-strwidth, modules/uniwidth/u16-width:
57757         * modules/uniwidth/u32-strwidth, modules/uniwidth/u32-width:
57758         * modules/uniwidth/u8-strwidth, modules/uniwidth/u8-width:
57759         * modules/uniwidth/width, modules/utf16-ucs4:
57760         * modules/utf16-ucs4-unsafe, modules/utf8-ucs4:
57761         * modules/utf8-ucs4-unsafe:
57762         Change maintainer from Bruno Haible to Daiki Ueno.
57763         This is my guess at the libunistring modules; please feel free
57764         to fix if I guessed incorrectly.
57765         * modules/accept4, modules/acl, modules/acos, modules/acosf:
57766         * modules/alignof, modules/amemxfrm, modules/ansi-c++-opt:
57767         * modules/areadlink, modules/array-list, modules/array-mergesort:
57768         * modules/array-oset, modules/asin, modules/asinf, modules/astrxfrm:
57769         * modules/atan, modules/atan2, modules/atan2f, modules/atanf:
57770         * modules/avltree-list, modules/avltree-oset, modules/avltreehash-list:
57771         * modules/binary-io, modules/bison-i18n, modules/btowc:
57772         * modules/c-ctype, modules/c-strcase, modules/c-strcaseeq:
57773         * modules/c-strcasestr, modules/c-strstr, modules/calloc-posix:
57774         * modules/canonicalize-lgpl, modules/careadlinkat, modules/carray-list:
57775         * modules/cbrt, modules/cbrt-ieee, modules/cbrtf, modules/cbrtf-ieee:
57776         * modules/cbrtl, modules/cbrtl-ieee, modules/ceil, modules/ceil-ieee:
57777         * modules/ceilf, modules/ceilf-ieee, modules/ceill, modules/ceill-ieee:
57778         * modules/chdir, modules/classpath, modules/clean-temp, modules/close:
57779         * modules/closedir, modules/concat-filename, modules/copy-file:
57780         * modules/copysign, modules/copysignf, modules/copysignl, modules/cos:
57781         * modules/cosf, modules/cosh, modules/coshf, modules/csharpcomp:
57782         * modules/csharpcomp-script, modules/csharpexec:
57783         * modules/csharpexec-script, modules/ctype, modules/diffseq:
57784         * modules/dprintf, modules/dprintf-posix, modules/dup:
57785         * modules/dup2-obsolete, modules/dup3, modules/duplocale:
57786         * modules/eealloc, modules/environ, modules/erf, modules/erfc:
57787         * modules/errno, modules/execute, modules/exp, modules/exp-ieee:
57788         * modules/exp2, modules/exp2-ieee, modules/exp2f, modules/exp2f-ieee:
57789         * modules/exp2l, modules/exp2l-ieee, modules/expf, modules/expf-ieee:
57790         * modules/expl, modules/expl-ieee, modules/expm1, modules/expm1-ieee:
57791         * modules/expm1f, modules/expm1f-ieee, modules/expm1l:
57792         * modules/expm1l-ieee, modules/fabs, modules/fabs-ieee, modules/fabsf:
57793         * modules/fabsf-ieee, modules/fabsl, modules/fabsl-ieee:
57794         * modules/fatal-signal, modules/fbufmode, modules/fchdir:
57795         * modules/fclose, modules/fd-hook, modules/fdopen, modules/filename:
57796         * modules/findprog, modules/findprog-lgpl, modules/floor:
57797         * modules/floor-ieee, modules/floorf, modules/floorf-ieee:
57798         * modules/floorl, modules/floorl-ieee, modules/fma, modules/fma-ieee:
57799         * modules/fmaf, modules/fmaf-ieee, modules/fmal, modules/fmal-ieee:
57800         * modules/fmod, modules/fmod-ieee, modules/fmodf, modules/fmodf-ieee:
57801         * modules/fmodl, modules/fmodl-ieee, modules/fopen, modules/fpieee:
57802         * modules/fprintf-posix, modules/fpucw, modules/fpurge:
57803         * modules/freadable, modules/freadahead, modules/freadptr:
57804         * modules/freadseek, modules/freopen, modules/frexp:
57805         * modules/frexp-ieee, modules/frexp-nolibm, modules/frexpf:
57806         * modules/frexpf-ieee, modules/frexpl, modules/frexpl-ieee:
57807         * modules/frexpl-nolibm, modules/fseek, modules/fseeko:
57808         * modules/fseterr, modules/fstat, modules/fstrcmp, modules/ftell:
57809         * modules/ftello, modules/full-read, modules/full-write:
57810         * modules/fwritable, modules/fwriteerror, modules/gcd:
57811         * modules/get-rusage-as, modules/get-rusage-data:
57812         * modules/getdtablesize, modules/getrusage, modules/gettext:
57813         * modules/gettext-h, modules/git-merge-changelog, modules/gperf:
57814         * modules/grantpt, modules/havelib, modules/host-cpu-c-abi:
57815         * modules/hostent, modules/hypot, modules/hypot-ieee, modules/hypotf:
57816         * modules/hypotf-ieee, modules/hypotl, modules/hypotl-ieee:
57817         * modules/iconv, modules/iconv-h, modules/iconv_open:
57818         * modules/iconv_open-utf, modules/idpriv-drop, modules/idpriv-droptemp:
57819         * modules/ilogb, modules/ilogbf, modules/ilogbl, modules/imaxabs:
57820         * modules/imaxdiv, modules/integer_length, modules/integer_length_l:
57821         * modules/integer_length_ll, modules/ioctl, modules/isatty:
57822         * modules/isblank, modules/isnand, modules/isnand-nolibm:
57823         * modules/isnanf, modules/isnanf-nolibm, modules/isnanl:
57824         * modules/isnanl-nolibm, modules/iswblank, modules/iswctype:
57825         * modules/j0, modules/j1, modules/javacomp, modules/javacomp-script:
57826         * modules/javaexec, modules/javaexec-script, modules/javaversion:
57827         * modules/jn, modules/langinfo, modules/ldd, modules/ldexp:
57828         * modules/ldexp-ieee, modules/ldexpf, modules/ldexpf-ieee:
57829         * modules/ldexpl, modules/ldexpl-ieee, modules/lgamma:
57830         * modules/lib-symbol-visibility, modules/libsigsegv:
57831         * modules/linked-list, modules/linkedhash-list, modules/list:
57832         * modules/localcharset, modules/locale, modules/localeconv:
57833         * modules/localename, modules/lock, modules/log, modules/log-ieee:
57834         * modules/log10, modules/log10-ieee, modules/log10f:
57835         * modules/log10f-ieee, modules/log10l, modules/log10l-ieee:
57836         * modules/log1p, modules/log1p-ieee, modules/log1pf:
57837         * modules/log1pf-ieee, modules/log1pl, modules/log1pl-ieee:
57838         * modules/log2, modules/log2-ieee, modules/log2f, modules/log2f-ieee:
57839         * modules/log2l, modules/log2l-ieee, modules/logb, modules/logb-ieee:
57840         * modules/logbf, modules/logbf-ieee, modules/logbl, modules/logbl-ieee:
57841         * modules/logf, modules/logf-ieee, modules/login_tty:
57842         * modules/logl-ieee, modules/malloc-posix, modules/malloca:
57843         * modules/mbchar, modules/mbfile, modules/mbiter, modules/mbmemcasecmp:
57844         * modules/mbmemcasecoll, modules/mbrlen, modules/mbrtowc:
57845         * modules/mbscasecmp, modules/mbscasestr, modules/mbschr:
57846         * modules/mbscspn, modules/mbsinit, modules/mbslen:
57847         * modules/mbsncasecmp, modules/mbsnlen, modules/mbsnrtowcs:
57848         * modules/mbspbrk, modules/mbspcasecmp, modules/mbsrchr:
57849         * modules/mbsrtowcs, modules/mbssep, modules/mbsspn, modules/mbsstr:
57850         * modules/mbstok_r, modules/mbswidth, modules/mbtowc, modules/mbuiter:
57851         * modules/memchr-obsolete, modules/memcmp2, modules/minmax:
57852         * modules/mkdtemp, modules/mkostemp, modules/mktime-internal:
57853         * modules/modf, modules/modf-ieee, modules/modff, modules/modff-ieee:
57854         * modules/modfl, modules/modfl-ieee, modules/msvc-inval:
57855         * modules/msvc-nothrow, modules/multiarch, modules/nextafter:
57856         * modules/nl_langinfo, modules/no-c++, modules/nocrash:
57857         * modules/nonblocking, modules/open, modules/opendir, modules/openmp:
57858         * modules/oset, modules/pclose, modules/pipe, modules/pipe-filter-gi:
57859         * modules/pipe-filter-ii, modules/pipe2, modules/poll-h:
57860         * modules/posix_spawn, modules/posix_spawn-internal:
57861         * modules/posix_spawn_file_actions_addclose:
57862         * modules/posix_spawn_file_actions_adddup2:
57863         * modules/posix_spawn_file_actions_addopen:
57864         * modules/posix_spawn_file_actions_destroy:
57865         * modules/posix_spawn_file_actions_init:
57866         * modules/posix_spawnattr_destroy, modules/posix_spawnattr_getflags:
57867         * modules/posix_spawnattr_getpgroup:
57868         * modules/posix_spawnattr_getschedparam:
57869         * modules/posix_spawnattr_getschedpolicy:
57870         * modules/posix_spawnattr_getsigdefault:
57871         * modules/posix_spawnattr_getsigmask, modules/posix_spawnattr_init:
57872         * modules/posix_spawnattr_setflags, modules/posix_spawnattr_setpgroup:
57873         * modules/posix_spawnattr_setschedparam:
57874         * modules/posix_spawnattr_setschedpolicy:
57875         * modules/posix_spawnattr_setsigdefault:
57876         * modules/posix_spawnattr_setsigmask, modules/posix_spawnp:
57877         * modules/pow, modules/powf, modules/printf-frexp:
57878         * modules/printf-frexpl, modules/printf-posix, modules/printf-safe:
57879         * modules/progname, modules/propername, modules/pselect:
57880         * modules/pthread_sigmask, modules/ptsname, modules/ptsname_r:
57881         * modules/qacl, modules/quotearg-simple, modules/raise, modules/random:
57882         * modules/rbtree-list, modules/rbtree-oset, modules/rbtreehash-list:
57883         * modules/read, modules/readdir, modules/readlink:
57884         * modules/realloc-posix, modules/regex-quote, modules/relocatable-lib:
57885         * modules/relocatable-lib-lgpl, modules/relocatable-perl:
57886         * modules/relocatable-prog, modules/relocatable-prog-wrapper:
57887         * modules/relocatable-script, modules/remainder:
57888         * modules/remainder-ieee, modules/remainderf, modules/remainderf-ieee:
57889         * modules/remainderl, modules/remainderl-ieee, modules/rewinddir:
57890         * modules/rint, modules/rint-ieee, modules/rintf, modules/rintf-ieee:
57891         * modules/rintl, modules/rintl-ieee, modules/round-ieee:
57892         * modules/roundf-ieee, modules/roundl-ieee, modules/safe-read:
57893         * modules/safe-write, modules/sched, modules/servent, modules/setenv:
57894         * modules/setlocale, modules/sh-quote, modules/shutdown:
57895         * modules/signal, modules/signbit, modules/sigpipe:
57896         * modules/sigpipe-die, modules/sigprocmask, modules/sin, modules/sinf:
57897         * modules/sinh, modules/sinhf, modules/size_max, modules/sleep:
57898         * modules/snippet/arg-nonnull, modules/snippet/c++defs:
57899         * modules/snippet/link-warning, modules/snippet/unused-parameter:
57900         * modules/snprintf, modules/snprintf-posix, modules/spawn:
57901         * modules/spawn-pipe, modules/sprintf-posix, modules/sqrt:
57902         * modules/sqrt-ieee, modules/sqrtf, modules/sqrtf-ieee:
57903         * modules/sqrtl-ieee, modules/stdalign, modules/stdarg:
57904         * modules/stdbool, modules/stpcpy, modules/stpncpy, modules/strcase:
57905         * modules/strcasestr, modules/strcasestr-simple, modules/strcspn:
57906         * modules/streq, modules/strerror_r-posix, modules/striconv:
57907         * modules/striconveh, modules/striconveha, modules/strncat:
57908         * modules/strnlen1, modules/strpbrk, modules/strtod-obsolete:
57909         * modules/sublist, modules/sys_resource, modules/sys_utsname:
57910         * modules/sys_wait, modules/system-posix, modules/system-quote:
57911         * modules/tan, modules/tanf, modules/tanh, modules/tanhf:
57912         * modules/tcgetsid, modules/termios, modules/threadlib, modules/tls:
57913         * modules/tmpdir, modules/towctrans, modules/trunc, modules/trunc-ieee:
57914         * modules/truncf, modules/truncf-ieee, modules/truncl:
57915         * modules/truncl-ieee, modules/ttyname_r, modules/uname:
57916         * modules/unlockpt, modules/unsetenv, modules/vasnprintf:
57917         * modules/vasnprintf-posix, modules/vasprintf, modules/vasprintf-posix:
57918         * modules/vdprintf, modules/vdprintf-posix, modules/vfprintf-posix:
57919         * modules/vfscanf, modules/vma-iter, modules/vprintf-posix:
57920         * modules/vscanf, modules/vsnprintf-posix, modules/vsprintf-posix:
57921         * modules/wait-process, modules/waitpid, modules/wcpcpy:
57922         * modules/wcpncpy, modules/wcrtomb, modules/wcscasecmp, modules/wcscat:
57923         * modules/wcschr, modules/wcscmp, modules/wcscoll, modules/wcscpy:
57924         * modules/wcscspn, modules/wcsdup, modules/wcslen, modules/wcsncasecmp:
57925         * modules/wcsncat, modules/wcsncmp, modules/wcsncpy, modules/wcsnlen:
57926         * modules/wcsnrtombs, modules/wcspbrk, modules/wcsrchr:
57927         * modules/wcsrtombs, modules/wcsspn, modules/wcsstr, modules/wcstok:
57928         * modules/wcswidth, modules/wcsxfrm, modules/wctob, modules/wctomb:
57929         * modules/wctrans, modules/wctype, modules/wcwidth, modules/wmemchr:
57930         * modules/wmemcmp, modules/wmemcpy, modules/wmemmove, modules/wmemset:
57931         * modules/write, modules/xconcat-filename, modules/xlist:
57932         * modules/xmalloca, modules/xoset, modules/xprintf-posix:
57933         * modules/xreadlink, modules/xsetenv, modules/xsize, modules/xstriconv:
57934         * modules/xstriconveh, modules/xsublist, modules/xvasprintf-posix:
57935         * modules/y0, modules/y1, modules/yn:
57936         Remove Bruno Haible as maintainer; if he's the sole maintainer,
57937         change the maintainer to 'all'.  Let's hope someone volunteers.
57939 2014-06-27  Paul Eggert  <eggert@cs.ucla.edu>
57941         mktime: merge #if/#ifdef usage from glibc
57942         * lib/mktime.c: Use "#if defined DEBUG && DEBUG", not "#if DEBUG",
57943         as that works with both Glibc's and Gnulib's style.
57944         See thread starting at Siddhesh Poyarekar's bug report at:
57945         http://lists.gnu.org/r/bug-gnulib/2014-06/msg00102.html
57947 2014-06-20  Alfred M. Szmidt  <ams@gnu.org>
57949         git-version-gen: improve option descriptions
57950         * build-aux/git-version-gen: Mention that --prefix and --fallback
57951         have a mandatory argument.
57953 2014-06-19  Paul Eggert  <eggert@penguin.cs.ucla.edu>
57955         regex: fix memory leak in compiler
57956         Fix by Andreas Schwab in:
57957         https://sourceware.org/ml/libc-alpha/2014-06/msg00462.html
57958         * lib/regcomp.c (parse_expression): Deallocate partially
57959         constructed tree before returning error.
57961         regex: merge patch from libc
57962         2014-02-12  Joseph Myers  <joseph@codesourcery.com>
57963         Combine __USE_BSD and __USE_SVID into __USE_MISC.
57964         * lib/regex.h [__USE_BSD]: Change condition to [__USE_MISC].
57966 2014-06-17  Paul Eggert  <eggert@cs.ucla.edu>
57968         acl: port to gcc -Wredundant-decls
57969         From a request by Dmitry Antipov in:
57970         http://lists.gnu.org/r/emacs-devel/2014-06/msg00263.html
57971         * lib/acl.h (_GL_ACL_H): New macro.  Protect entire contents with
57972         "#ifndef _GL_ACL_H".
57974 2014-06-11  Bruce Korb  <bkorb@gnu.org>
57975         Jim Meyering  <meyering@fb.com>
57977         parse-duration: eliminate 68-year duration limit
57978         * lib/parse-duration.c: Include "intprops.h".
57979         (TIME_MAX): Rename to MAX_DURATION and define to
57980         TYPE_MAXIMUM(time_t).
57981         * modules/parse-duration (Depends-on): Add intprops.
57982         Reported by Jonas 'Sortie' Termansen.
57984 2014-06-14  Paul Eggert  <eggert@cs.ucla.edu>
57986         pthread: don't assume AC_CANONICAL_HOST, port better to Solaris, etc.
57987         * modules/pthread (Depends-on): Add 'extensions', as it defines
57988         _POSIX_PTHREAD_SEMANTICS, which is needed on Solaris.
57989         (configure.ac-early): New section.
57990         * m4/pthread.m4 (gl_PTHREAD_CHECK): Revert previous change, as
57991         it is no longer needed.
57993 2014-06-14  Pádraig Brady  <P@draigBrady.com>
57995         pthread: define thread-safe macros on some platforms
57996         * m4/pthread.m4 (gl_PTHREAD_CHECK): Define macros needed
57997         for thread-safe operation on some platforms.
57999 2014-06-13  Paul Eggert  <eggert@cs.ucla.edu>
58001         regex: don't be multithreaded if USE_UNLOCKED_IO.
58002         Problem reported by Michael Felt in: http://bugs.gnu.org/17773
58003         * lib/regex_internal.h: Do not use multithreaded version if
58004         USE_UNLOCKED_IO is defined.  This is a hack, but it works
58005         around a porting bug with coreutils 8.22 on AIX 7.1.
58007 2014-06-11  Daiki Ueno  <ueno@gnu.org>
58009         gettext: update macros to version 0.19
58010         * m4/intl.m4, m4/po.m4: Update from gettext-0.19.  In particular,
58011         depend on gl_EXTERN_INLINE and drop support for older Bison
58012         versions.
58014 2014-06-10  Pádraig Brady  <P@draigBrady.com>
58016         select,poll: fix console handle check on windows 8
58017         lib/poll.c (IsConsoleHandle): Change from testing the lower
58018         2 bits of the handle to the more expensive but accurate syscall.
58019         lib/select.c: Likewise.
58021 2014-06-10  Eli Zaretskii  <eliz@gnu.org>
58023         select: fix waiting on anonymous pipes on MS-Windows
58024         * lib/select.c (rpl_select): Fall back to polling when select()
58025         indicates there is nothing to check, while due to the timeout not
58026         expiring, activity is indicated on one of the handles.
58027         Also clear the TIMEOUT argument if the timer does expire.
58029 2014-06-10  Eli Zaretskii  <eliz@gnu.org>
58031         times: fix to return non constant value on MS-Windows
58032         * lib/times.c (times): Don't use the process creation time,
58033         rather clock() which on windows returns the number of
58034         clock ticks since the process started.
58036 2014-06-09  Michael Goffioul  <michael.goffioul@gmail.com>
58038         isatty: fix to work on windows 8
58039         * lib/isatty.c (IsConsoleHandle): Change from testing the lower
58040         2 bits of the handle to the more expensive but accurate syscall.
58042 2014-06-07  Paul Eggert  <eggert@cs.ucla.edu>
58044         maint: fix typo in fdl.texi
58045         * doc/fdl.texi: Fix typo (missing '@').
58046         Somehow this was in fdl.texi but not fdl-1.3.texi.
58048 2014-06-06  Ben Walton  <bdwalton@gmail.com>
58050         mountlist: avoid hasmntopt const type warning on solaris
58051         * lib/mountlist.c: Solaris defines the OPT param of hasmntopt()
58052         with char * instead of const char *.  Passing the constant string
58053         "ignore" generates a compiler warning.  For Solaris cast MNT_IGNORE
58054         to avoid the warning.
58056 2014-06-04  Eric Blake  <eblake@redhat.com>
58058         maintainer-makefile: delete obsolete code
58059         * top/maint.mk (build_aux): Drop old code, as threatened.
58061         maintainer-makefile: avoid spurious error messages
58062         * top/maint.mk (syntax-check): Guard definition and use of
58063         $(shell) by whether Makefile is present.
58065 2014-06-03  Ben Walton  <bdwalton@gmail.com>
58067         rename: avoid unused-but-set-variable compiler warning
58068         * lib/rename.c (rpl_rename):  In the non-Win32 variant of rpl_rename,
58069         it is possible that dst_exists may be set but not used.  Mark it with
58070         the unused attribute to avoid compiler warnings.
58072 2014-06-02  Ben Walton  <bdwalton@gmail.com>
58074         rename: mark a label as potentially unused
58075         * lib/rename.c (rpl_rename): Avoid compiler warnings seen on Solaris,
58076         by marking the out label as potentially unused.
58077         * m4/gnulib-common.m4: Mention the need for the trailing ; for C++.
58079 2014-06-01  Paul Eggert  <eggert@cs.ucla.edu>
58081         gnulib-common.m4: Fix typo in _GL_UNUSED_LABEL.
58082         * m4/gnulib-common.m4 (_GL_UNUSED_LABEL): Omit trailing semicolon.
58084 2014-06-02  Ben Walton  <bdwalton@gmail.com>
58086         acl: apply pure attribute to two functions
58087         * lib/acl-internal.h (acl_nontrivial, acl_ace_nontrivial):
58088         Mark as "pure" as flagged by gcc 4.9 on Solaris 10.
58090 2014-06-01  Pádraig Brady  <P@draigBrady.com>
58092         gnulib-common.m4: add _GL_UNUSED_LABEL
58093         * m4/gnulib-common.m4: Add _GL_UNUSED_LABEL which is similar to
58094         _GL_UNUSED, but handles g++ < 4.5 not supporting this syntax.
58096 2014-05-31  Paul Eggert  <eggert@cs.ucla.edu>
58098         dup2, fcntl, fcntl-h: port to AIX 7.1
58099         This fixes some porting problems discovered when testing the latest
58100         grep snapshot on AIX 7.1.  I don't think if fixes any bugs
58101         in grep but it could be important for other applications.
58102         * doc/posix-functions/dup2.texi:
58103         * doc/posix-functions/fcntl.texi:
58104         * doc/posix-headers/fcntl.texi:
58105         Document AIX bugs.
58106         * lib/fcntl.in.h (O_CLOEXEC, O_NOFOLLOW, O_TTY_INIT) [_AIX]:
58107         Define to 0 if outside 'int' range.
58108         * m4/dup2.m4 (gl_FUNC_DUP2):
58109         * m4/fcntl.m4 (gl_FUNC_FCNTL):
58110         Check for getdtablesize.  If it's available, test a value just
58111         outside its range instead of testing 1000000.  When cross-compiling,
58112         guess that AIX will fail this improved test.
58114 2014-05-30  Paul Eggert  <eggert@cs.ucla.edu>
58116         printf, config.rpath: Port to FreeBSD 10.
58117         Problem reported by Tijl Coosemans in:
58118         http://lists.gnu.org/r/bug-gnulib/2014-05/msg00078.html
58119         * build-aux/config.rpath (hardcode_libdir_flag_spec)
58120         (hardcode_direct): Simplify FreeBSD configuration.
58121         (library_names_spec): Don't mishandle FreeBSD 10+.
58122         * m4/printf.m4 (gl_PRINTF_SIZES_C99, gl_PRINTF_LONG_DOUBLE)
58123         (gl_PRINTF_INFINITE_LONG_DOUBLE, gl_PRINTF_DIRECTIVE_F)
58124         (gl_SNPRINTF_TRUNCATION_C99, gl_SNPRINTF_RETVAL_C99)
58125         (gl_SNPRINTF_DIRECTIVE_N, gl_VSNPRINTF_ZEROSIZE_C99):
58126         Don't mishandle FreeBSD 10+ when cross-compiling.
58128         ftoastr: work around compiler bug in IBM xlc 12.1
58129         * lib/ftoastr.h (_GL_FLT_PREC_BOUND, _GL_DBL_PREC_BOUND)
58130         (_GL_LDBL_PREC_BOUND): Make these macros, not enums, to work
58131         around a compiler bug in IBM xlc 12.1.0.0: it complains
58132         '"ftoastr.c", line 80.37: 1506-045 (S) Undeclared identifier
58133         _GL_FLT_PREC_BOUND.'
58135 2014-05-30  Kieran Colford  <colfordk@gmail.com>
58137         valgrind-tests: fixed misleading help message
58138         * m4/valgrind-tests.m4: The help message generated by configure
58139         implied that valgrind was disabled by default, which it wasn't.
58140         Adjusted the help message using s/enable/disable/ to clarify.
58142 2014-05-30  Ulrich Weigand  <uweigand@de.ibm.com>
58144         isfinite, isinf, isnan tests: fix for little-endian PowerPC
58145         * tests/test-isfinite.c (test_isfinitel): Only manipulate the
58146         first double of a PowerPC "double double" pair.
58147         * tests/test-isinf.c (test_isinfl): Likewise.
58148         * tests/test-isnan.c (test_long_double): Likewise.
58149         * tests/test-isnanl.h (main): Likewise.
58150         * tests/test-signbit.c (test_signbitl): Likewise.
58152 2014-05-29  Paul Eggert  <eggert@cs.ucla.edu>
58154         exclude-tests: port to AIX 7.1
58155         * modules/exclude-tests (test_exclude_LDADD): Add $(LIBTHREAD).
58156         Needed on AIX 7.1 with xlc V12.1, otherwise it won't link because
58157         the regex code uses locks.
58159 2014-05-28  Paul Eggert  <eggert@cs.ucla.edu>
58161         pthread_sigmask, timer-time: use gl_THREADLIB only if needed
58162         Without this fix, Emacs would sometimes call sigprocmask instead
58163         of pthread_sigmask, which is a no-no in multithreaded applications.
58164         Problem reported by Jorgen Schaefer in <http://bugs.gnu.org/17561>.
58165         * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK):
58166         Suppress check for pthread_sigmask working without -lpthread if
58167         the application always links with -lpthread.  Do not link with
58168         $LIBMULTITHREAD if gl_THREADLIB is not defined.
58169         * m4/timer_time.m4 (gl_TIMER_TIME):
58170         Require gl_THREADLIB only if it is defined.  Do not append
58171         $LIBMULTITHREAD to LIB_TIMER_TIME if gl_THREADLIB is not defined.
58173 2014-05-27  Sylvain Beucler  <beuc@beuc.net>.
58175         gnulib-tool: wget translations using --no-verbose rather than --quiet
58176         This allows the user to see error messages if any (--quiet hides them)
58177         * gnulib-tool: Invoke wget with --no-verbose, rather than --quiet.
58179 2014-05-27  Sylvain Beucler  <beuc@beuc.net>
58181         gnulib-tool: adjust translation wget to avoid a https redirection
58182         Context: http://translationproject.org/latest/gnulib redirects to
58183            https://translationproject.org/latest/gnulib/
58184         Rationale: if the user falls back to wget, she doesn't have rsync and
58185         is probably in a minimal build environment, where packages such as
58186         'ca-certificates' are missing as well, resulting in a failed (and
58187         difficult to detect since ignored) translation initial fetch.
58188         Consequently let's avoid https if possible, and add the missing
58189         trailing slash.  This also avoids an unnecessary 302 redirection.
58190         * gnulib-tool: Add trailing slash to gnulib URL.
58192 2014-05-22  Pádraig Brady  <P@draigBrady.com>
58194         getlogin_r-tests: check return value rather than errno
58195         * tests/test-getlogin_r.c (main): As per POSIX we should be
58196         verifying the return value from getlogin_r() rather than errno.
58198 2014-05-22  Pádraig Brady  <P@draigBrady.com>
58200         getlogin_r-tests: fix various issues in recent change
58201         * tests/test-getlogin_r.c: Include required headers that were
58202         missed in recent commit eec20b4e.
58203         Also consistently check the errno rather than the return value from
58204         getlogin_r as POSIX only specifies that non zero is returned on error.
58205         * modules/getlogin_r-tests (configure.ac): Add the check for ttyname().
58207 2014-05-21  Paul Eggert  <eggert@cs.ucla.edu>
58209         fchdir: port 'open' and 'close' redefinitions to AIX 7.1
58210         * lib/chown.c, lib/clean-temp.c, lib/copy-file.c, lib/execute.c:
58211         * lib/fsusage.c, lib/gc-gnulib.c, lib/javacomp.c, lib/mountlist.c:
58212         * lib/openat-proc.c, lib/pagealign_alloc.c, lib/progreloc.c:
58213         * lib/spawn-pipe.c:
58214         Do not #undef 'open' and 'close'.  AIX 7 does '#define open open64'
58215         and then 'int open64(const char *, int, ...);', which means the
58216         declaration for 'open' gets lost if we later '#undef open'.
58217         Discovered while building grep pretest 2.18.151-1c770 on AIX 7.1,
58218         where the compilation reported the non-fatal error "In function
58219         'openat_proc_name' ... warning: implicit declaration of function
58220         'open'".  In this case the error is relatively harmless, but in
58221         other cases it might not be so minor.
58223 2014-05-20  Paul Eggert  <eggert@cs.ucla.edu>
58225         xalloc: don't potentially generate invalid code for xmemdup calls
58226         * lib/xalloc.h (xmemdup): Do not mark with _GL_ATTRIBUTE_ALLOC, as
58227         this function can initialize the newly-allocated storage with new
58228         pointers, which means this function is not malloc-like.  See:
58229         https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56955
58231 2014-05-19  Pádraig Brady  <P@draigBrady.com>
58233         getlogin_r-tests: avoid false failure under sudo/ssh etc.
58234         * tests/test-getlogin_r.c (main): Sync up with test-getlogin.c
58235         changes from commit 97249cf29 to not depend on environment variables.
58237 2014-05-18  Pádraig Brady  <P@draigBrady.com>
58239         getlogin-tests: avoid false failure under cron
58240         * tests/test-getlogin.c (main): Avoid verifying errnos from ttyname()
58241         since that's not what's under test.  Centos 6 was seen to return
58242         EINVAL for ttyname() when run from cron.
58244 2014-05-16  Jim Meyering  <meyering@fb.com>
58246         mbrtowc.m4: fix a comment typo
58247         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): Fix typo s/2/-2/ in
58248         emitted documentation string.
58250 2014-05-16  Paul Eggert  <eggert@cs.ucla.edu>
58252         mbrlen, mbrtowc: fix bug with empty input
58253         * lib/mbrtowc.c (rpl_mbrtowc) [MBRTOWC_EMPTY_INPUT_BUG]: Fix the bug.
58254         * m4/mbrlen.m4 (gl_MBRLEN_EMPTY_INPUT): New macro.  It's not used,
58255         so this is mainly for documentation.
58256         * m4/mbrtowc.m4 (gl_MBRTOWC_EMPTY_INPUT): New macro.
58257         (gl_FUNC_MBRTOWC): Use it.
58258         * tests/test-mbrtowc.c (main): Test for the bug.
58260 2014-05-15  Paul Eggert  <eggert@cs.ucla.edu>
58262         doc: document mbrtowc and mbrlen problem with empty input
58263         * doc/posix-functions/mbrlen.texi (mbrlen):
58264         * doc/posix-functions/mbrtowc.texi (mbrtowc):
58265         Document portability problem when the input string is empty.  See:
58266         https://sourceware.org/bugzilla/show_bug.cgi?id=16950
58268         doc: document exec* = spawn+exit bug with non-Cygwin Windows platforms
58269         Problem reported by Eli Zaretskii in:
58270         http://lists.gnu.org/r/bug-grep/2014-05/msg00118.html
58271         * doc/posix-functions/execl.texi (execl):
58272         * doc/posix-functions/execle.texi (execle):
58273         * doc/posix-functions/execlp.texi (execlp):
58274         * doc/posix-functions/execv.texi (execv):
58275         * doc/posix-functions/execve.texi (execve):
58276         * doc/posix-functions/execvp.texi (execvp):
58277         Mention spawn+exit problem on non-Cygwin Windows platforms.
58279 2014-05-14  Guilherme de Almeida Suckevicz  <guito.linux@gmail.com>
58281         getlogin-tests: avoid false failure under sudo/ssh etc.
58282         * modules/getlogin-tests (configure.ac): Check for ttyname().
58283         * tests/test-getlogin.c (main): Don't depend on environment variables
58284         to correlate with getlogin(), since sudo and ssh etc. can tamper
58285         with the LOGNAME and USER env vars.  Instead lookup the name from
58286         the uid associated with the stdin tty.
58288 2014-05-11  Paul Eggert  <eggert@cs.ucla.edu>
58290         mbsstr, quotearg, xstrtol: pacify IRIX 6.5 cc
58291         These were found when building the latest grep snapshot on IRIX 6.5.
58292         * lib/mbsstr.c (knuth_morris_pratt_multibyte): Break "a=b=c;" into
58293         "b=c; a=b;", since IRIX 6.5 cc complains about the former if b is
58294         never used later.
58295         * lib/quotearg.c (quoting_options_from_style):
58296         * lib/xstrtol.c (__xstrtol):
58297         Use enum instead of 0, to pacify IRIX 6.5 cc.
58299 2014-04-18  Pádraig Brady  <P@draigBrady.com>
58301         gitlog-to-changelog: revert inclusion of git-log-fix file
58302         * build-aux/git-log-fix: Delete dummy file.
58303         * modules/gitlog-to-changelog: Don't reference (overwrite)
58304         the project specific git-log-fix file.
58306 2014-04-18  Assaf Gordon  <agordon@wi.mit.edu>
58308         maint.mk: Relax the copyright check to cater for non FSF projects
58309         * top/maint.mk (sc_copyright_check): Relax the check for $PACKAGE.texi
58310         to not require the "Free" suffix after the copyright years.
58312 2014-04-18  Natanael Copa  <ncopa@alpinelinux.org>
58314         physmem: use sysinfo on linux-gnu if _SC_PHYS_PAGES unavailable
58315         * lib/physmem.c (physmem_total): Some systems like musl libc don't yet
58316         support _SC_PHYS_PAGES.  Use the linux syscall sysinfo as fallback
58317         if _SC_PHYS_PAGES or _SC_PAGESIZE fails.
58318         (physmem_available): Likewise for _SC_AVPHYS_PAGES.
58320 2014-04-18  Paul Eggert  <eggert@cs.ucla.edu>
58322         exclude: port to strict C99
58323         Strict C does not allow converting a function pointer to void *
58324         and vice versa.  Pass a pointer to a function pointer instead.
58325         * lib/exclude.c (add_exclude_file):
58326         Pass the address of the function pointer.
58327         (call_addfn): And deference the address here, to match.
58329 2014-04-17  Paul Eggert  <eggert@cs.ucla.edu>
58331         regex: do not depend on malloc-gnu
58332         * modules/regex (Depends-on): Remove malloc-gnu.
58333         It's no longer needed, because of the 2012-12-29 patch
58334         "regex: port to hosts where malloc (0) == NULL".
58335         Reported by Nathan Kennedy in:
58336         http://lists.gnu.org/r/bug-gnulib/2014-04/msg00026.html
58338 2014-04-16  Assaf Gordon  <agordon@wi.mit.edu>
58340         expl: avoid incorrect expl(small_value) on OpenBSD 5.4
58341         * m4/expl.m4 (gl_FUNC_EXPL): Add a check for this condition.
58342         * doc/posix-functions/expl.texi: Mention the workaround.
58344 2014-04-12  Paul Eggert  <eggert@cs.ucla.edu>
58346         xalloc: allow x2nrealloc (P, PN, S) where P && !*PN
58347         * lib/xalloc.h (x2nrealloc): Extend slightly, to allow the current
58348         size to be zero even when the pointer is nonnull.  This
58349         accommodates the use case where P is malloc (0) and *PN is 0 on a
58350         host where malloc (0) yields nonnull.
58352 2014-04-09  Eric Blake  <eblake@redhat.com>
58354         fts: avoid unnecessary strlen calls
58355         * lib/fts.c (_D_EXACT_NAMLEN): Restore definition when needed.
58357 2014-04-09  Paul Eggert  <eggert@cs.ucla.edu>
58359         fts: avoid unnecessary strlen calls
58360         * lib/fts.c (fts_build): Go back to using _D_EXECT_NAMLEN
58361         when that can be faster than strlen.
58363 2014-03-26  Bernhard Voelker  <mail@bernhard-voelker.de>
58365         fts: avoid unnecessary strlen calls
58366         * lib/fts.c (_D_EXACT_NAMLEN): Remove macro.
58367         (fts_build): Store the length of the dp->d_name entry in a local variable
58368         instead of calling strlen() several times via the above, removed macro.
58369         For 'rm -rf some-dir' with e.g. 1M directory entries, this speeds up the
58370         run by ~4%, yet this reduces the execution time by about a third if run
58371         via "ltrace -c rm -rf some-dir".
58373 2014-03-27  Paul Eggert  <eggert@cs.ucla.edu>
58375         obstack: Remove ancient NeXTSTEP gcc support conditional
58376         This change will ease merging with glibc.  The "#if ... __NEXT__"
58377         causes a warning with -Wundef which glibc now enables by default.
58378         Problem reported by Will Newton in
58379         <http://lists.gnu.org/r/bug-gnulib/2014-03/msg00032.html>.
58380         glibc <sys/cdefs.h> now uses __extension__ for GCC 2.8 or later,
58381         so go with that.
58382         * lib/obstack.h (__extension__):
58384 2014-03-27  Paul Eggert  <eggert@cs.ucla.edu>
58386         obstack: merge with glibc changes
58387         * lib/obstack.c, lib/obstack.h: Merge from glibc.
58388         This is mostly indenting and commentary changes.
58389         Instances of 'register' have been removed.
58391 2014-03-26  Bernhard Voelker  <mail@bernhard-voelker.de>
58393         strftime: wrap macros in "do {...} while(0)"
58394         * lib/strftime.c (DO_NUMBER): Wrap multi-statement code block of
58395         this macro in "do {...} while(0)" to prevent false use as a
58396         single statement, e.g., in an un-braced "{}" else-block.
58397         (DO_SIGNED_NUMBER, DO_TZ_OFFSET, DO_NUMBER_SPACEPAD): Likewise.
58398         (strftime_case_): Remove 'else' after 'goto' - which was the
58399         only non-fatal, un-braced use of one of the above macros.
58400         Spotted by coverity (NESTING_INDENT_MISMATCH).
58402 2014-03-26  Bernhard Voelker  <mail@bernhard-voelker.de>
58404         modechange: avoid memory leaks for invalid octal modes
58405         * lib/modechange.c (mode_compile): During the parsing of
58406         notations like +40, free the 'mc' buffer for invalid mode
58407         strings like +17777 (greater than the maximum octal mode),
58408         =18 (bad octal mode characters) or u=1 ('affected' with
58409         octal modes).
58410         Reproducer, e.g.:
58411             $ valgrind --leak-check=full chmod +17777 file
58412         Introduced via the 2012-03-09 commit, 4730c3e3, "modechange:
58413         add notations +40, 00440, etc.".
58414         Spotted by coverity (RESOURCE_LEAK).
58416 2014-03-24  Paul Eggert  <eggert@cs.ucla.edu>
58418         gitlog-to-changelog: include a dummy git-log-fix file
58419         Problem reported by Nathan Stratton Treadway in:
58420         http://lists.gnu.org/r/bug-tar/2014-03/msg00082.html
58421         * build-aux/git-log-fix: New file.
58423 2014-03-13  Jim Meyering  <meyering@fb.com>
58425         gitlog-to-changelog: also include the file, git-log-fix
58426         * modules/gitlog-to-changelog (Files): Add git-log-fix.
58427         Reported by Assaf Gordon.
58429 2014-03-06  Paul Eggert  <eggert@cs.ucla.edu>
58431         regex: port to OS X 10.8.5 en_US.UTF-8 locale
58432         This fixes a bug when ignoring case and when comparing the
58433         titlecase letter 'Lj' (U+01C8 LATIN CAPITAL LETTER L WITH SMALL
58434         LETTER J) to the corresponding uppercase letter 'LJ' (U+01C7 LATIN
58435         CAPITAL LETTER LJ).  In the OS X 10.8.5 en_US.UTF-8 locale, the
58436         titlecase letter is neither lowercase nor uppercase, but
58437         uppercasing the titlecase letter (via towupper) yields the
58438         uppercase letter, so the two letters should match when ignoring case.
58439         Problem reported by Jim Meyering in <http://debbugs.gnu.org/16911#16>.
58440         * lib/regex_internal.c (build_wcs_upper_buffer, build_upper_buffer):
58441         Don't test whether a character is lowercase before uppercasing it.
58443 2014-03-04  Kevin Cernekee  <cernekee@gmail.com>
58445         stdint, read-file: fix missing SIZE_MAX on Android (tiny change)
58446         This is basically one of the options Bruno Haible proposed in:
58447         http://lists.gnu.org/r/bug-gnulib/2012-01/msg00282.html
58448         * lib/sys_types.in.h (_GL_INCLUDING_UNISTD_H): New macro.
58449         * lib/stdint.in.h: Use it.
58450         * modules/stdint (Depends-on): Add sys_types.
58452 2014-02-26  Pádraig Brady  <P@draigBrady.com>
58454         parse-datetime: fix crash or infloop in TZ="" parsing
58455         * lib/parse-datetime.y (parse_datetime): Break out of the
58456         TZ="" parsing loop once the second significant " is found.
58457         Also skip over any subsequent whitespace to be consistent
58458         with the non TZ= case.
58459         * tests/test-parse-datetime.c: Add test cases for TZ="" parsing.
58461 2014-02-26  Paul Eggert  <eggert@cs.ucla.edu>
58463         savedir: new symbol for fast-read version
58464         * lib/savedir.h (SAVEDIR_SORT_FASTREAD): New symbol, for programs
58465         like GNU cp that want to use SAVEDIR_SORT_INODE if available,
58466         SAVEDIR_SORT_NONE otherwise.  Problem reported by Bernhard Voelker in:
58467         http://lists.gnu.org/r/coreutils/2014-02/msg00037.html
58469 2014-02-25  Paul Eggert  <eggert@penguin.cs.ucla.edu>
58471         unistd: port readlink to Mac OS X 10.3.9
58472         * lib/unistd.in.h (_GL_INCLUDING_UNISTD_H): New macro, to work
58473         around self-include problem in Mac OS X 10.3.9 when combined with
58474         readlink module.  Problem reported by Klaus Zietler in
58475         <http://bugs.gnu.org/16825>.
58477 2014-02-23  Paul Eggert  <eggert@cs.ucla.edu>
58479         diffseq: remove TOO_EXPENSIVE heuristic
58480         Problem with diffutils reported by Vincent Lefevre in
58481         <http://bugs.gnu.org/16848>.  The simplest solution is to remove
58482         the TOO_EXPENSIVE heuristic that I added to GNU diff in 1993.
58483         Although appropriate for circa-1993 hardware, these days the heuristic
58484         seems to be more trouble than it's worth.
58485         * lib/diffseq.h: Modernize citations.
58486         (struct context): Remove member too_expensive.
58487         All uses changed.
58488         (struct partition): Remove members lo_minimal, hi_minimal.
58489         All uses changed.
58490         (diag, compareseq): Remove arg find_minimal.  All uses changed.
58491         (diag): Remove the TOO_EXPENSIVE heuristic that I added back in
58492         1993 to make 'diff' run faster (but not as well) on large inputs.
58493         These days, computers are fast enough that it's typically better
58494         to run slower but more accurately.
58495         * lib/fstrcmp.c: Remove duplicate comment.
58496         * lib/fstrcmp.c (strcmp_bounded):
58497         * lib/git-merge-changelog.c (compute_differences):
58498         Adjust to diffseq.h changes.
58499         * NEWS: Document the change.
58501         savedir: simplify by using stpcpy
58502         * lib/savedir.c (direntry_t): Remove size member.  All uses removed.
58503         (streamsavedir): Use stpcpy instead.
58504         * modules/savedir (Depends-on): Add stpcpy.
58506 2014-02-21  Pádraig Brady  <P@draigBrady.com>
58508         spawn: fix link error on uclibc
58509         * m4/spawn_h.m4 (gl_HAVE_POSIX_SPAWN): use AC_SEARCH_LIBS,
58510         to incorporate -lrt if needed (on uclibc for example).
58511         * modules/posix_spawn: Reference the substituted LIB.
58513 2014-02-21  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>  (tiny change)
58514         timer: fix uClibc detection of threading
58515         * m4/time_time.m4 (gl_TIMER_TIME): Detect whether threads are
58516         enabled in uClibc.
58518 2014-02-21  Eric Blake  <eblake@redhat.com>
58520         maintainer-makefiles: provide AC_PROG_SED for older autoconf
58521         * m4/gnulib-common.m4 (AC_PROG_SED): Copy from newer autoconf.
58523 2014-02-21  Sergey Poznyakoff  <gray@gnu.org.ua>
58525         exclude: add support for posix regexps
58527         This commit adds support for POSIX extended regular expressions
58528         and fixes a long-standing memory leak (pattern buffer was never
58529         freed).  It also implements a new interface function to read
58530         exclude patterns from a FILE, which passes an additional parameter
58531         to its callback function, thereby allowing to preserve its state
58532         between invocations.
58534         * lib/exclude.c (struct patopts): Pack regex and pattern into union.
58535         (pattern_buffer): New struct.
58536         (exclude): New member patbuf.
58537         (exclude_add_pattern_buffer): New function.
58538         (free_exclude_segment): Free regexps.
58539         (free_exclude): Free allocated pattern buffers.
58540         (exclude_patopts): New function.
58541         (file_pattern_matches): Use exclude_patopts.
58542         (add_exclude): support regexps.
58543         (add_exclude_fp): New function.
58544         (add_exclude_file): Rewrite using add_exclude_fp.
58545         (fnmatch_pattern_has_wildcards): Support posix extended regexps.
58546         * lib/exclude.h (EXCLUDE_REGEX, EXCLUDE_ALLOC): New flags.
58547         (add_exclude_fp)
58548         (add_exclude_file): Rewrite using add_exclude_fp.
58549         (fnmatch_pattern_has_wildcards): Support posix extended regexps.
58550         * lib/exclude.h (EXCLUDE_REGEX, EXCLUDE_ALLOC): New flags.
58551         (add_exclude_fp)
58552         (exclude_add_pattern_buffer): New prototypes.
58553         * modules/exclude: Depends on regex and filename.
58555 2014-02-20  Eric Blake  <eblake@redhat.com>
58557         maintainer-makefiles: use $(SED) for syntax check
58558         * modules/maintainer-makefile (configure.ac): Check for sane sed.
58559         * top/maint.mk: Change sed to $(SED).
58561 2014-02-11  Sergey Poznyakoff  <gray@gnu.org.ua>
58562             Paul Eggert  <eggert@cs.ucla.edu>
58564         savedir: add sorting arg to savedir, streamsavedir; remove fdsavedir
58565         Patch based on an idea by Dick Streefland in
58566         <https://savannah.gnu.org/patch/?7892>.
58567         * NEWS: Document this.
58568         * lib/savedir.c (NAME_SIZE_DEFAULT): Remove.
58569         (direntry_t, comparison_function): New types.
58570         (direntry_cmp_name): New function.
58571         (direntry_cmp_inode) [D_INO_IN_DIRENT]: New function.
58572         (streamsavedir, savedir): New arg OPTION.
58573         (streamsavedir): Simplify memory allocation.
58574         (fdsavedir): Remove.
58575         * lib/savedir.h (enum savedir_option): New type.
58576         (streamsavedir, savedir): New arg OPTION.
58577         (fdsavedir): Remove.
58579 2014-02-05  Paul Eggert  <eggert@cs.ucla.edu>
58581         file-type: add support for doors and other less-common file types
58582         Problem with S_ISDOOR reported by Rich Burridge.
58583         * lib/file-type.c (file_type): Do S_ISLNK early too.  Do S_TYPEIS*
58584         macros before the rest.  Add S_ISCTG, S_ISDOOR, S_ISMPB, S_ISMPC,
58585         S_ISMPX, S_ISNAM, S_ISNWK, S_ISOFD, S_ISOFL, S_ISPORT, S_ISWHT.
58587 2014-01-23  Eric Blake  <eblake@redhat.com>
58589         pthread: work around winpthread header pollution on mingw
58590         * lib/time.in.h: Move pthread workarounds...
58591         * lib/pthread.in.h: ...here.
58592         * m4/pthread.m4 (gl_PTHREAD_CHECK): Also build pthread.h when we
58593         detect macro pollution on mingw.
58594         * doc/posix-headers/pthread.texi (pthread.h): Document the problems.
58596 2014-01-22  Paul Eggert  <eggert@cs.ucla.edu>
58598         qacl: check for fchmod
58599         * m4/acl.m4 (gl_FUNC_ACL): Check for fchmod, since acl-internal.h
58600         and qset-acl.c both use HAVE_FCHMOD.
58602 2014-01-20  Paul Eggert  <eggert@cs.ucla.edu>
58604         fdopen-tests: port to Tru64
58605         * tests/test-fdopen.c (main): Don't invoke fdopen on a file
58606         descriptor that is not open, as POSIX doesn't specify the
58607         resulting behavior and the test does not work on Tru64.
58608         Problem reported by Steven M. Schweda in:
58609         http://lists.gnu.org/r/bug-gnulib/2014-01/msg00079.html
58611         stdalign: port to HP-UX compilers
58612         * lib/stdalign.in.h (_Alignas): Use __attribute__ (__aligned__ (x))
58613         if __HP_cc or __HP_aCC are nonzero.
58615 2014-01-16  Paul Eggert  <eggert@cs.ucla.edu>
58617         strtoimax: port to platforms lacking 'long long'
58618         VMS's pre-C99 compiler lacks 'long long', so 'configure' doesn't
58619         check whether strtoll is declared, which causes the C file to
58620         wrongly report an error.  Problem reported by Steven M. Schweda in:
58621         http://lists.gnu.org/r/bug-diffutils/2014-01/msg00003.html
58622         * lib/strtoimax.c (strtoull):
58623         Declare only if HAVE_UNSIGNED_LONG_LONG_INT.
58624         (strtoll): Declare only if HAVE_LONG_LONG_INT.
58626 2014-01-16  Daniel Albers  <daniel@lbe.rs>  (tiny change)
58628         relocatable-perl: fix texi syntax
58629         * doc/relocatable-maint.texi: Escape braces.
58631 2014-01-09  Reuben Thomas  <rrt@sc3d.org>
58633         relocatable-perl: like relocatable-script, but for Perl scripts
58634         * build-aux/relocatable.pl.in: Add.
58635         * doc/relocatable-maint.texi: Add documentation.
58636         * modules/relocatable-perl: Add.
58638 2014-01-07  Paul Eggert  <eggert@cs.ucla.edu>
58640         tests: fix export bug in previous patch
58641         Problem reported by Jim Meyering.
58642         * tests/init.sh (re_shell): New var, which is exported instead of
58643         re_shell_.
58645         tests: simplify porting to Solaris 10 /bin/sh
58646         Some test cases in 'grep' need a shell that groks '$(';
58647         export re_shell_ for their benefit.  Problem reported for 'grep'
58648         by Dagobert Michelsen in <http://bugs.gnu.org/16380>.
58649         * tests/init.sh (re_shell_): Export if it's used.
58651 2014-01-06  Eric Blake  <eblake@redhat.com>
58653         md5, sha1, sha256, sha512: support older autoconf
58654         * m4/00gnulib.m4 (m4_divert_push): Wrap diversion stack
58655         for autoconf < 2.63b.
58657         include_next: port to autoconf 2.63
58658         * m4/gnulib-common.m4 (AS_VAR_COPY): Define if missing.
58660 2014-01-04  Jim Meyering  <meyering@fb.com>
58662         maint: add a gnulib-local rule to keep non-ascii out of .texi files
58663         * cfg.mk (sc_keep_gnulib_texi_files_mostly_ascii): New rule,
58664         so that "make sc_maint" will ding anyone who puts non-ascii
58665         in any of gnulib's .texi files.
58667 2014-01-03  Jim Meyering  <meyering@fb.com>
58669         freadable, fwritable, fwriting: declare with the "pure" attribute
58670         * lib/freadable.h (freadable): Declare with the "pure" attribute.
58671         * lib/fwritable.h (fwritable): Likewise.
58672         * lib/fwriting.h (fwriting): Likewise.
58673         Suggested by Bruno Haible.
58675         maint.mk: adapt openat.h-include-without-use test
58676         * top/maint.mk (sc_prohibit_openat_without_use): Also check for
58677         FCHMODAT_INLINE, FCHOWNAT_INLINE and STATAT_INLINE, to avoid
58678         failing on gnulib's own lib/{chmod,chown,stat}at.c files.
58679         With this change, running "make sc_maint" in gnulib's top-level
58680         directory now passes for me.
58682 2014-01-03  Paul Eggert  <eggert@cs.ucla.edu>
58684         doc: use ASCII in .texi files where UTF-8 isn't needed
58685         * doc/posix-functions/crypt.texi, doc/posix-functions/encrypt.texi:
58686         * doc/posix-functions/setkey.texi, doc/regex.texi:
58687         Use ASCII input, not UTF-8.
58689 2014-01-02  Jim Meyering  <meyering@fb.com>
58691         freading: declare with the "pure" attribute
58692         * lib/freading.h (freading): Declare with the "pure" attribute.
58694         manywarnings: remove -Wmudflap
58695         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Remove -Wmudflap, since
58696         it is no longer supported in gcc-4.9-to-be.
58698 2014-01-01  Paul Eggert  <eggert@cs.ucla.edu>
58700         relocatable-script: remove unused code
58701         Problem reported by Reuben Thomas in:
58702         http://lists.gnu.org/r/bug-gnulib/2013-12/msg00117.html
58703         * build-aux/relocatable.sh.in (func_tmpdir): Remove unused function.
58705 2014-01-01  Jim Meyering  <meyering@fb.com>
58707         maint: fix public-submodule-commit to work with newer git
58708         * top/maint.mk (public-submodule-commit): Remove excess quoting.
58709         We were over-quoting the test arguments, and somewhere prior to
58710         version 1.8.5.2.229, git stopped removing those excess quotes,
58711         which made the test fail, since the unexpanded strings would
58712         always differ; using GIT_TRACE=1 confirmed that the git merge-base
58713         command wasn't even being run.
58715 2014-01-01  Paul Eggert  <eggert@cs.ucla.edu>
58717         doc: update main copyright year
58718         * doc/gnulib.texi: Update copyright date.
58720 2014-01-01  Eric Blake  <eblake@redhat.com>
58722         version-etc: new year
58723         * lib/version-etc.c (COPYRIGHT_YEAR): Bump to 2014.
58724         * all files: run 'make update-copyright'
58726 2013-12-24  Eric Blake  <eblake@redhat.com>
58728         passfd: give nicer error for recvfd at eof
58729         * lib/passfd.c (recvfd): Fake ENOTCONN if other end closes early.
58730         * tests/test-passfd.c (main): Enhance test to cover this.
58732 2013-12-17  Paul Eggert  <eggert@cs.ucla.edu>
58734         gettimeofday: port recent C++ fix to Emacs
58735         Without this further patch, Emacs won't build due to
58736         the portcheck failing.  Also, this simplifies the patch a bit.
58737         * lib/time.in.h (localtime, gmtime): Don't replace unless
58738         GNULIB_GETTIMEOFDAY.  Treat them more like mktime.
58739         * lib/time.in.h (localtime, gmtime):
58740         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME):
58741         * m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS):
58742         * modules/time (time.h):
58743         Don't worry about the possibility of localtime and gmtime
58744         being absent; they're present in all C libraries we know about.
58745         * m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS):
58746         Don't assume sys_time is present and has been initialized.
58747         Instead, use a hack that should work even if it hasn't been.
58748         Don't use a portcheck for gmtime or localtime; this supports
58749         the hack.
58750         * modules/time (time.h): Substitute GNULIB_GETTIMEOFDAY.
58752 2013-12-17  John W. Eaton  <jwe@gnu.org>
58754         gettimeofday: fix C++ crosscompilation
58756         Never replace gmtime and localtime by macros when compiling with
58757         C++, this prevents <ctime> from being included.
58759         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Do not
58760         define gmtime and localtime as preprocessor macros.  Instead
58761         define some HAVE_GMTIME, HAVE_LOCALTIME, REPLACE_GMTIME, and
58762         REPLACE_LOCALTIME substitutions.
58763         * lib/time.in.h: Declare gmtime and localtime when needed.
58764         * m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS): AC_SUBST HAVE_GMTIME,
58765         HAVE_LOCALTIME, REPLACE_GMTIME, and REPLACE_LOCALTIME.
58766         * modules/time: Depend on gettimeofday, and substitute the above
58767         variables in time.h.
58769 2013-12-17  Paul Eggert  <eggert@cs.ucla.edu>
58771         qacl: port to Windows better
58772         See Eli Zaretskii in
58773         <http://lists.gnu.org/r/emacs-devel/2013-12/msg00593.html>.
58774         * lib/file-has-acl.c (acl_access_nontrivial):
58775         Return -1 and set errno if !HAVE_ACL_FIRST_ENTRY &&
58776         !HAVE_ACL_TO_SHORT_TEXT && !HAVE_ACL_FREE_TEXT.
58778 2013-12-12  Alexander V. Lukyanov  <lav@netis.ru>
58780         md5, sha1, sha256, sha512: fix (trivial) compile error in c++ mode.
58781         * lib/gl_openssl.h: Cast void pointers to a specific type.
58783 2013-12-07  Pádraig Brady  <P@draigBrady.com>
58785         open-tests: fix build failure with -Werror=old-style-declaration
58786         * tests/test-open.h: Reorder the inline to avoid the issue.
58788 2013-12-07  Pádraig Brady  <P@draigBrady.com>
58790         md5, sha1, sha256, sha512: fix link error with partial libcrypto
58791         * m4/gl-openssl.m4 (gl_CRYPTO_CHECK): Only clear LIB_CRYPTO at
58792         init time, so that if early checks find crypto routines,
58793         while the last does not, then @LIB_CRYPTO@ is replaced correctly,
58794         avoiding link failures.
58796 2013-12-07  Paul Eggert  <eggert@cs.ucla.edu>
58798         md5, sha1, sha256, sha512: add gl_SET_CRYPTO_CHECK_DEFAULT
58799         This provides a new way to specify the default for
58800         gl_CRYPTO_CHECK, one that is reflected in the --help message.
58801         Emacs uses this, as well as the old way.
58802         This attempts to implement a suggestion by Pádraig Brady in
58803         <http://lists.gnu.org/r/coreutils/2013-12/msg00080.html>.
58804         * m4/gl-openssl.m4(gl_SET_CRYPTO_CHECK_DEFAULT): New macro.
58805         (gl_CRYPTO_CHECK): Use it.  Mention the default in --help output.
58807         md5, sha1, sha256, sha512: add 'auto', and a way to specify default
58808         * m4/gl-openssl.m4 (gl_CRYPTO_CHECK):
58809         Add support for a new option, --with-openssl=auto, which causes
58810         the library to be used if available and silently ignored if not.
58811         Add support to allow configure.ac to specify its own
58812         default, by setting with_openssl_default before invoking gl_INIT.
58814 2013-12-05  Paul Eggert  <eggert@cs.ucla.edu>
58816         open-tests: port to glibc with _FORTIFY_SOURCE and -O1
58817         Problem reported by Daiki Ueno in:
58818         http://lists.gnu.org/r/bug-gnulib/2013-06/msg00052.html
58819         * tests/test-open.h (__always_inline):
58820         New macro, if not already defined.
58821         (test_open): Use it.
58823 2013-12-04  Eric Blake  <eblake@redhat.com>
58825         include_next: minimize code duplication
58826         * modules/include_next (Depends-on): Add absolute-header.
58827         * m4/include_next.m4 (gl_NEXT_HEADERS_INTERNAL): Reuse
58828         gl_ABSOLUTE_HEADER_ONE instead of open-coding it.
58830 2013-12-04  Pádraig Brady  <P@draigBrady.com>
58832         getcwd: fix compile error in configure check
58833         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): Include errno.h
58835 2013-12-04  Pádraig Brady  <P@draigBrady.com>
58837         regex: suppress core dumps from detection code
58838         * m4/regex.m4 (gl_REGEX): Catch the SIGABRT and convert to SIGTERM
58839         to suppress core dumps that may well occur on glibc systems.
58840         These core dumps might not be cleaned up automatically, or could
58841         trigger some system core dump handling logic.
58843 2013-12-03  Pádraig Brady  <P@draigBrady.com>
58845         md5, sha1, sha256, sha512: support mandating use of openssl
58846         * m4/gl-openssl.m4 (gl_crypto_check): Adjust the --with-openssl
58847         description, to list the now 3 separate options.  also don't
58848         mention the default=no, since this is implicit given the option
58849         is described as --with-openssl rather than --without-openssl.
58850         If projects change the default they're free to document that.
58851         with --with-openssl[=yes] we now error out when the specified
58852         hash algorithm is not available in libcrypto.
58854 2013-12-03  Ivailo  <xakepa10@gmail.com>
58856         test-xvasprintf: (trivial) fix to disable some -Wformat-security diags
58857         * tests/test-xvasprintf.c: Disable -Wformat-zero-length and
58858         -Wformat-nonliteral checks, as these edge cases are part of the test.
58860 2013-12-03  Eric Blake  <eblake@redhat.com>
58862         regex: avoid glibc deadlock during configure
58863         * m4/regex.m4 (gl_REGEX): Avoid recursive malloc deadlock when
58864         glibc bug 15078 in turn triggers bug 16159.
58865         Reported by Michal Privoznik.
58867 2013-12-02  Pádraig Brady  <P@draigBrady.com>
58869         md5, sha1, sha256, sha512: use openssl routines if available.
58870         --with-openssl the libcrypto md5, sha1, sha224, sha256, sha384, sha256
58871         routines will be used if available, requiring apps to link @LIB_CRYPTO@
58872         * lib/gl_openssl.h: Provide wrappers for specified openssl hash.
58873         * m4/gl-openssl.m4 (gl_CRYPTO_CHECK): New function to lookup libcrypto
58874         in the standard system location.
58875         * m4/sha1.m4: Call gl_CRYPTO_CHECK() for SHA1.
58876         * m4/sha256.m4: Likewise with SHA256.
58877         * m4/sha512.m4: Likewise with SHA512.
58878         * m4/md5.m4: Likewise with MD5.
58879         * m4/gc.m4: Ensure @LIB_CRYPTO@ set for tests.
58880         * lib/sha1.h: Include wrappers if HAVE_OPENSSL_SHA1.
58881         * lib/sha256.h: Likewise with SHA256.
58882         * lib/sha512.h: Likewise with SHA512.
58883         * lib/md5.h: Likewise with MD5.
58884         * lib/sha1.c: Exlude functionality if HAVE_OPENSSL_SHA1.
58885         * lib/sha256.c: Likewise with SHA256.
58886         * lib/sha512.c: Likewise with SHA512.
58887         * lib/md5.c: Likewise with MD5.
58888         * modules/crypto/sha1 (Link:): Add the new optional lib.
58889         (Depends-on:): Add dependency on extern-inline.
58890         * modules/crypto/sha256: Likewise.
58891         * modules/crypto/sha512: Likewise.
58892         * modules/crypto/md5: Likewise.
58893         * modules/crypto/sha1-tests: Reference the lib here too.
58894         * modules/crypto/md5-tests: Likewise.
58895         * modules/crypto/gc-des-tests: Likewise.
58896         * modules/crypto/gc-hmac-md5-tests: Likewise.
58897         * modules/crypto/gc-hmac-sha1-tests: Likewise.
58898         * modules/crypto/gc-hmac-sha256-tests: Likewise.
58899         * modules/crypto/gc-hmac-sha512-tests: Likewise.
58900         * modules/crypto/gc-md5-tests: Likewise.
58901         * modules/crypto/gc-pbkdf2-sha1-tests: Likewise.
58902         * modules/crypto/gc-sha1-tests: Likewise.
58903         * modules/crypto/gc-tests: Likewise.
58904         * modules/crypto/hmac-md5-tests: Likewise.
58905         * modules/crypto/hmac-sha1-tests: Likewise.
58906         * modules/crypto/hmac-sha256-tests: Likewise.
58907         * modules/crypto/hmac-sha512-tests: Likewise.
58909 2013-11-29  RV1971  <rv1971@web.de>
58911         base64: (trivial) fix compilation regression on some compilers
58912         * lib/base64.c: Don't return the void function,
58913         instead split to a separate return statement.
58915 2013-11-28  Paul Eggert  <eggert@cs.ucla.edu>
58917         ignore-value: revert previous code change
58918         * lib/ignore-value.h (ignore_value): Use __extension__ and
58919         __typeof__ only for GCC 3.4 and later.  Reported by Eric Blake in
58920         <http://lists.gnu.org/r/bug-gnulib/2013-11/msg00102.html>.
58921         Change the comment to try to explain this better.
58923 2013-11-27  Pádraig Brady  <P@draigBrady.com>
58925         selinux-h: improve stub types and add more stub functions
58927         * lib/se-selinux.in.h: Change security_context_t to a typedef
58928         rather than a define, as it's a pointer type and so is better
58929         as a typedef to avoid issues declaring multiple variables
58930         with the comma operator.  Also add stub for string_to_security_class().
58931         * lib/se-context.in.h: Add stub functions for
58932         context_{type,range,role,user}_get().
58934 2013-11-27  Paul Eggert  <eggert@cs.ucla.edu>
58936         ignore-value: prefer GCC version back through 2.0
58937         The code didn't match the comments, so I did a bit of software
58938         archaeology.  GCC 2.0 seems to support __extension__ and
58939         __typeof__, so fix both code and comments to use 2.0.
58940         * lib/ignore-value.h (ignore_value): Use __extension__ and
58941         __typeof__ for GCC 2.0 through 3.3, too.
58943 2013-11-25  Mats Erik Andersson  <gnu@gisladisker.se>
58945         pty: Activate the signature wrapper of forkpty.
58946         The intended preprocessor macro HAVE_FORKPTY is
58947         never defined, yet `lib/forkpty.c' depends on it.
58949         * m4/pty.m4 (gl_FUNC_FORKPTY): At completed analysis,
58950         apply AC_DEFINE_UNQUOTED to HAVE_FORKPTY with value
58951         $HAVE_FORKPTY for access to wrapper in `lib/forkpty.c'.
58953 2013-11-18  Jim Meyering  <meyering@fb.com>
58954         and Paul Eggert  <eggert@cs.ucla.edu>
58956         quotearg: don't attempt to store 1 << 31 into an "int"
58957         * lib/quotearg.c (quotearg_buffer_restyled): Building coreutils with
58958         gcc's new -fsanitize=undefined and running its tests triggered some
58959         new test failures due to undefined behavior, all with this diagnostic:
58960           lib/quotearg.c:629:62: runtime error: left shift of 1 by 31 places \
58961             cannot be represented in type int
58962         Rather than shifting "1" left to form a mask, shift the bits right and
58963         simply use "1" as the mask.
58965 2013-11-21  Paul Eggert  <eggert@cs.ucla.edu>
58967         error: depend on stdio
58968         Problem reported by Nikos Mavrogiannopoulos in
58969         <http://lists.gnu.org/r/bug-gnulib/2013-11/msg00084.html>
58970         * modules/error (Depends-on): Add stdio.
58972 2013-11-18  Ben Pfaff  <blp@cs.stanford.edu>
58974         * doc/relocatable-maint.texi (Supporting Relocation): Improve
58975         wording.
58976         Reported by Reuben Thomas <rrt@sc3d.org>.
58978 2013-11-13  Paul Eggert  <eggert@cs.ucla.edu>
58980         * lib/getgroups.c (posix_getgroups, getgroups) [__APPLE__]:
58981         New function and macro, to work around _DARWIN_C_SOURCE problem.
58982         Reported by Jack Howarth in <http://bugs.gnu.org/14463>.
58984 2013-11-11  Pádraig Brady  <P@draigBrady.com>
58986         base64: provide a fast path for encoding well sized buffers
58987         Avoid conditionals in the base64 encoding loop,
58988         which was seen to give 60% better throughput.
58989         * lib/base64.c (base64_encode_fast): A new function to be called
58990         when we don't want to NUL terminate, and we have enough space
58991         in the output to encode the given input.
58992         (base64_encode): Call the _fast() version when appropriate.
58993         Also remove a redundant mask with 0x3F on the first encoded byte.
58995 2013-11-08  Paul Eggert  <eggert@cs.ucla.edu>
58997         extern-inline: port better to OS X 10.9
58998         * m4/extern-inline.m4: Omit serial number; this file doesn't use them.
58999         (gl_EXTERN_INLINE): Do not suppress the use of extern inline on
59000         OS X 10.9, except for g++ where the bug is still present.
59001         See <http://trac.macports.org/ticket/41033>.
59003 2013-11-08  Eric Blake  <eblake@redhat.com>
59005         fpending: fix regression on DragonFly BSD
59006         * m4/fpending.m4 (gl_FUNC_FPENDING): Check for declaration.
59007         * lib/fpending.h (__fpending): Don't declare twice.
59008         Reported by GW in
59009         <https://lists.gnu.org/r/bug-m4/2013-11/msg00000.html>
59011 2013-11-05  Jim Meyering  <meyering@fb.com>
59013         hash: relax license to LGPLv2+, for libguestfs
59014         * modules/hash (License): Change from GPL to LGPLv2+.
59016 2013-11-03  Paul Eggert  <eggert@cs.ucla.edu>
59018         intprops: port to Oracle Studio c99
59019         * lib/intprops.h (_GL_HAVE___TYPEOF__) [__SUNPRO_C && __STDC__]:
59020         Define to 0, to avoid diagnostics when Oracle Studio is pedantic.
59022 2013-10-31  Paul Eggert  <eggert@cs.ucla.edu>
59024         obstack: pacify HP C
59025         * lib/obstack.h (obstack_free) [!__GNUC__]: Rewrite to avoid
59026         warning "conversion from pointer to smaller integer" from HP
59027         C-ANSI-C - cc version B9007AA/B3910B A.06.26.  It's safe to assume
59028         C89 or later nowadays, so cast to void instead of int.  Privately
59029         reported by H.Merijn Brand.  Also, change header to match glibc's,
59030         to make checking against glibc easier.
59032 2013-10-29  Jim Meyering  <meyering@fb.com>
59034         maint.mk: prefer gpgv2 over gpgv
59035         * top/maint.mk (gpgv): Use gpgv2 if present, else gpgv.
59036         (gpg_key_ID): Use $(gpgv), rather than hard-coding "gpgv".
59037         Reported by Gary Vaughan.
59039 2013-10-30  Paul Eggert  <eggert@cs.ucla.edu>
59041         isnan: port to VAX
59042         Reported by John Klos for NetBSD-5/VAX in
59043         <http://lists.gnu.org/r/bug-gnulib/2013-10/msg00133.html>.
59044         * lib/isnan.c (IEEE_FLOATING_POINT): New macro, stolen from Emacs.
59045         (FUNC): Use it.
59047 2013-10-28  Jim Meyering  <meyering@fb.com>
59049         gnulib-tool: protect against CDPATH
59050         * gnulib-tool: Many "cd" built-in functions print a directory name
59051         to stdout when CDPATH is set, e.g.,
59052           $ bash -c 'CDPATH=/; cd tmp'
59053           /tmp
59054         Unset it, when possible.  Prompted by a comment from Bruce Korb.
59056         maint.mk: restore functionality removed by recent change...
59057         Sunday's change, v0.0-8062-g6b24f60, may have appeared correct from
59058         the context of a shallow-cloned gnulib repository: "git describe"
59059         would fail in such a directory.  However, that change made it so
59060         the reported gnulib revision no longer includes the version number
59061         or a commit count, even when run from a full clone.
59062         * top/maint.mk (gnulib-version): Use the full "git describe"
59063         output when possible, e.g., the form above, rather than the
59064         abbreviated, no-tag, no-commit-count string, and fall back to
59065         using a 10-byte hash, rather than the default minimal-length
59066         hash prefix, since while the minimal-length one may be fine today,
59067         it is likely not to be unique for very long.
59069 2013-10-26  Jim Meyering  <meyering@fb.com>
59071         maint.mk: fix "release" target to build _version
59072         This fixes a bug in README-release whereby following the outlined
59073         steps, one would publish a tarball whose programs would report
59074         --version output not consistent with the package version number.
59075         This bug caused grep-2.15 to produce a grep program whose
59076         --version option made it print 2.14.56-1e3d rather than 2.15.
59077         * top/maint.mk (release): Making this target build "_version"
59078         ensures that the new version number is reflected in configure.
59080 2013-10-21  Ben Pfaff  <blp@cs.stanford.edu>
59082         install-reloc: Support multi-binary installation.
59083         * build-aux/install-reloc: Support installing multiple programs in
59084         one invocation, as done by Automake starting with commit
59085         4295fe33eb23f (Multi-file install for PROGRAMS.).  From Bruno
59086         Haible <bruno@clisp.org>, archived at
59087         http://lists.debian.org/debian-bsd/2012/05/msg00032.html.
59088         Reported by Sylvain <beuc@gnu.org>.
59090 2013-10-21  Michael Haubenwallner  <michael.haubenwallner@salomon.at>
59092         selinux-h: Really build without selinux when library is missing.
59093         * m4/selinux-selinux-h.m4: When the selinux library is missing, really
59094         continue without selinux, as already told in the warning message.
59096 2013-10-21  Jim Meyering  <meyering@fb.com>
59098         regex: also remove dependency on HAVE_WCSCOLL
59099         * lib/regex_internal.h: Remove final vestige of the wcscoll dependency.
59101 2013-10-21  Reuben Thomas  <rrt@sc3d.org>
59103         xfreopen: Fix typo. s/frepoen/freopen/
59104         * lib/xfreopen.c: Fix description.
59105         * modules/xfreopen: Likewise.
59107 2013-10-21  Jim Meyering  <meyering@fb.com>
59109         regex: don't depend on wcscoll
59110         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for wcscoll.
59111         It is no longer used.
59113 2013-10-20  Jim Meyering  <meyering@fb.com>
59115         error: add the printf attribute to a static function
59116         * lib/error.c (error_tail): Add the printf attribute, to placate
59117         gcc's -Werror=suggest-attribute=format option.
59119 2013-09-30  Jim Meyering  <meyering@fb.com>
59121         fpending, obstack, strerror-override: use pure+const function attrs
59122         * lib/fpending.h (__fpending): Declare with the "pure" attribute.
59123         * lib/obstack.c (_obstack_allocated_p): Likewise.
59124         * lib/obstack.h (_obstack_memory_used): Likewise.
59125         (_obstack_memory_used): Likewise.
59126         * lib/strerror-override.h (strerror_override): Declare with
59127         the "const" attribute.
59129 2013-10-18  Eric Blake  <eblake@redhat.com>
59131         extern-inline: make safe for -Wundef usage
59132         Reported by Vladimir 'phcoder' Serbinenko in
59133         https://lists.gnu.org/r/bug-gnulib/2013-10/msg00078.html
59134         * m4/extern-inline.m4 (gl_EXTERN_INLINE): Port to older gcc.
59136 2013-10-16  Paul Eggert  <eggert@cs.ucla.edu>
59138         mkfifo-tests, etc.: allow HP-UX 11.11 bug
59139         Problem reported by Daniel Richard G. in
59140         <http://lists.gnu.org/r/bug-gnulib/2013-10/msg00068.html>.
59141         * doc/posix-functions/mkfifo.texi (mkfifo):
59142         * doc/posix-functions/mkfifoat.texi (mkfifoat):
59143         * doc/posix-functions/mknod.texi (mknod):
59144         * doc/posix-functions/mknodat.texi (mknodat):
59145         Document the HP-UX 11.11 bug.
59146         * tests/test-mkfifo.h (test_mkfifo):
59147         Allow the HP-UX 11.11 bug.
59149 2013-10-14  Paul Eggert  <eggert@cs.ucla.edu>
59151         acl: allow cross-compilation to Gentoo
59152         Problem reported by Gabriel Marcano in
59153         <http://lists.gnu.org/r/bug-gnulib/2013-10/msg00058.html>.
59154         * m4/acl.m4 (gl_ACL_GET_FILE): When cross-compiling,
59155         test only whether it links.
59157 2013-10-13  Paul Eggert  <eggert@cs.ucla.edu>
59159         mgetgroups: remove dependency on realloc-gnu
59160         The dependency violates the comment in realloc-gnu, which
59161         says that tests can't depend on realloc-gnu; some tests depend
59162         on mgetgroups, so mgetgroups can't depend on realloc-gnu.
59163         Problem reported by Daniel Richard G. in
59164         <http://lists.gnu.org/r/bug-gnulib/2013-10/msg00056.html>.
59165         * lib/mgetgroups.c (mgetgroups): Don't call realloc (NULL, 0).
59166         * modules/mgetgroups (Depends-on): Depend on realloc-posix,
59167         not realloc-gnu.
59169 2013-10-12  Paul Eggert  <eggert@cs.ucla.edu>
59171         regex-tests: port to HP-UX 11.11
59172         Problem reported by Daniel Richard G. in
59173         <http://lists.gnu.org/r/bug-gnulib/2013-10/msg00052.html>.
59174         * modules/regex-tests (test_regex_LDADD): Add LIBTHREAD, LIB_PTHREAD.
59176 2013-10-10  Paul Eggert  <eggert@cs.ucla.edu>
59178         verify: document some 'assume' pitfalls
59179         * doc/verify.texi (Compile-time Assertions):
59180         Mention that 'assume (E)' can sometimes slow things down.
59181         Use CHAR_MAX + 1, not UCHAR_MAX + 1.
59183 2013-10-10  Eric Blake  <eblake@redhat.com>
59185         strtoumax: fix typo in previous commit.
59186         * modules/strtoumax (Depends-on): Fix typo.
59187         * modules/strtoimax (Depends-on): Likewise.
59189 2013-10-10  Paul Eggert  <eggert@cs.ucla.edu>
59191         strtoumax: port to Solaris 8
59192         This problem was introduced in the recent HP-UX patch.
59193         Reported by Tom G. Christensen in
59194         <http://lists.gnu.org/r/bug-gnulib/2013-10/msg00037.html>.
59195         * modules/strtoumax (Depends-on): Test HAVE_STRTOUMAX
59196         and REPLACE_STRTOUMAX rather than ac_cv_func_strtoumax.
59198 2013-10-09  Paul Eggert  <eggert@cs.ucla.edu>
59200         strtoimax, strtoumax: port to HP-UX 11.11
59201         Problem reported by Daniel Richard G. in
59202         <http://lists.gnu.org/r/bug-gnulib/2013-10/msg00023.html>.
59203         * lib/inttypes.in.h (strtoumax): Replace strtoumax if
59204         REPLACE_STRTOUMAX, thus treating it consistently with strtoimax.
59205         * m4/inttypes.m4 (gl_INTTYPES_H_DEFAULTS): Add default for
59206         REPLACE_STRTOUMAX.
59207         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX):
59208         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX):
59209         Replace the function if defined as a macro but not as a function.
59210         * modules/inttypes-incomplete (inttypes.h): Substitute
59211         REPLACE_STRTOUMAX.
59212         * modules/strtoumax (configure.ac): Replace strtoumax if
59213         REPLACE_STRTOUMAX.
59215 2013-10-08  Paul Eggert  <eggert@cs.ucla.edu>
59217         strtoimax: port to HP-UX 11.11
59218         Problem reported by Daniel Richard G.
59219         * lib/strtoimax.c (Strtoimax, Strtol, Strtoll): New macros.
59220         (strtoimax, strtol, strtoll) [UNSIGNED]: Remove, since
59221         they might clash with inttypes.h.
59223 2013-10-06  Paul Eggert  <eggert@cs.ucla.edu>
59225         New module 'count-trailing-zeros'.
59226         * MODULES.html.sh: Mention it.
59227         * lib/count-trailing-zeros.c, lib/count-trailing-zeros.h:
59228         * m4/count-trailing-zeros.m4, modules/count-trailing-zeros:
59229         * modules/count-trailing-zeros-tests:
59230         * tests/test-count-trailing-zeros.c:
59231         New files.
59233         count-leading-zeros: port to MSC; support types wider than 64 bits
59234         The ideas behind the MSC port are stolen from Emacs.
59235         * lib/count-leading-zeros.h:
59236         Don't include verify.h: it's no longer needed, as types wider than
59237         64 bits are now supported.
59238         (COUNT_LEADING_ZEROS): New arg MSC_BUILTIN, for better
59239         performance with MSC.  All uses changed.  Do not assume that TYPE
59240         has at most 64 bits.
59241         (count_leading_zeros_32): Assume 0 < X < 2**32, for speed.
59242         All uses changed.  Fold the subtraction from 31 into the table.
59244         count-one-bits: port to MSC; support types wider than 64 bits
59245         The ideas behind the MSC port are stolen from Emacs.
59246         * lib/count-one-bits.c (popcount_support) [_MSC_VER]: New variable.
59247         * lib/count-one-bits.h: Include limits.h, for CHAR_BIT.
59248         Don't include verify.h: it's no longer needed, as types wider than
59249         64 bits are now supported.
59250         (COUNT_ONE_BITS_GENERIC): New macro.
59251         (popcount_supported) [_MSC_VER]: New inline function.
59252         (COUNT_ONE_BITS): Use it.  New arg MSC_BUILTIN, for better
59253         performance with MSC.  All uses changed.  Do not assume that TYPE
59254         has at most 64 bits.
59255         * modules/count-one-bits (Depends-on): Do not depend on 'verify'.
59257 2013-10-06  Andrew Borodin  <aborodin@vmail.ru>
59259         mountlist: fix resource leak with MOUNTED_INTERIX_STATVFS
59260         * lib/mountlist.c (read_file_system_list): fix leak of directory
59261         streams in case of #ifdef MOUNTED_INTERIX_STATVFS.
59263 2013-10-06  Paul Eggert  <eggert@cs.ucla.edu>
59265         tests: improve diagnostic when an assertion fails
59266         * tests/macros.h (ASSERT): Report the assertion that failed.
59268 2013-10-02  Paul Eggert  <eggert@cs.ucla.edu>
59270         verify: new macro 'assume'
59271         This is taken from Emacs, and should be generally useful.
59272         * doc/verify.texi (assume): Document it.
59273         * lib/verify.h (assume): New macro.
59274         (__has_builtin): Expand to 0 if not defined.
59276 2013-09-26  Eric Blake  <eblake@redhat.com>
59278         dup2, dup3: work around another cygwin crasher
59279         * m4/dup2.m4 (gl_FUNC_DUP2): Expose the bug.
59280         * m4/dup3.m4 (gl_FUNC_DUP3): Likewise.
59281         * tests/test-dup2.c (main): Likewise.
59282         * lib/dup2.c (rpl_dup2): Use setdtablesize to avoid it.
59283         * lib/dup3.c (dup3): Likewise.
59284         * doc/posix-functions/dup2.texi (dup2): Document it.
59285         * doc/glibc-functions/dup3.texi (dup3): Likewise.
59287         getdtablesize: work around cygwin issue
59288         * m4/getdtablesize.m4 (gl_FUNC_GETDTABLESIZE): Detect problem.
59289         * modules/getdtablesize (configure.ac): Build replacement.
59290         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Set up a witness.
59291         * modules/unistd (Makefile.am): Expose the witness.
59292         * lib/unistd.in.h (getdtablesize): Declare replacement.
59293         * lib/getdtablesize.c (rpl_getdtablesize): Work around it.
59294         * tests/test-getdtablesize.c (main): Test it.
59295         * doc/glibc-functions/getdtablesize.texi (getdtablesize): Document it.
59297 2013-09-25  Mats Erik Andersson  <gnu@gisladisker.se>
59299         pmccabe2html: escaping of special characters
59300         Escape all '<', '>', and '&' in HTML output.
59301         * build-aux/pmccabe2html (html_fnc): Call gsub()
59302         instead of sub() to capture all '<', '>', and '&'.
59303         Neither of '<' and '>' is special in a regexp,
59304         so first arguments to gsub() are corrected. Also,
59305         in replacement strings, ampersand must be escaped.
59306         Finally, '&' must be handled first, then '<' and '>'.
59308 2013-09-24  Eric Blake  <eblake@redhat.com>
59310         manywarnings: enable nicer gcc warning messages
59311         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Older gcc requires
59312         some -f options for optimal warnings.
59314 2013-09-21  Jim Meyering  <meyering@fb.com>
59316         timespec: use the new TIMESPEC_RESOLUTION in a few more places
59317         * lib/timespec-add.c (timespec_add): Also replace 999999999
59318         with TIMESPEC_RESOLUTION - 1.
59319         * lib/timespec-sub.c (timespec_sub): Likewise.
59321 2013-09-23  Paul Eggert  <eggert@cs.ucla.edu>
59323         warnings: port --enable-gcc-warnings to Solaris Studio 12.3
59324         Problem reported by Dagobert Michelsen via Eric Blake in
59325         <http://lists.gnu.org/r/bug-gnulib/2013-09/msg00052.html>.
59326         * m4/warnings.m4 (gl_COMPILER_OPTION_IF): Use AC_LINK_IFELSE,
59327         not AC_COMPILE_IFELSE.
59329 2013-09-23  Eric Blake  <eblake@redhat.com>
59331         configmake: support new --runstatedir option
59332         * m4/configmake.m4 (gl_CONFIGMAKE_PREP): Substitute runstatedir
59333         even if autoconf was too old to provide the command line option.
59334         * modules/configmake (Makefile.am): Propagate it to .h file.
59336 2013-09-22  Paul Eggert  <eggert@cs.ucla.edu>
59338         ctype, string: depend on extern-inline
59339         This is needed to complete the recent OS X fixes.
59340         Also, fix related documentation as suggested by Eric Blake.
59341         * doc/posix-functions/isalnum.texi, doc/posix-functions/isalpha.texi:
59342         * doc/posix-functions/isascii.texi, doc/posix-functions/iscntrl.texi:
59343         * doc/posix-functions/isdigit.texi, doc/posix-functions/isgraph.texi:
59344         * doc/posix-functions/islower.texi, doc/posix-functions/isprint.texi:
59345         * doc/posix-functions/ispunct.texi, doc/posix-functions/isspace.texi:
59346         * doc/posix-functions/isupper.texi, doc/posix-functions/isxdigit.texi:
59347         * doc/posix-functions/toascii.texi, doc/posix-functions/tolower.texi:
59348         * doc/posix-functions/toupper.texi:
59349         List the 'ctype' gnulib module.
59350         * doc/posix-functions/strcat.texi, doc/posix-functions/strcpy.texi:
59351         * doc/posix-functions/strncpy.texi:
59352         List the 'string' gnulib module.
59353         * modules/memcpy, modules/memmove, modules/memset (Depends-on):
59354         Add string.
59355         * modules/ctype, modules/string (Depends-on): Add extern-inline.
59357 2013-09-19  Pádraig Brady  <P@draigBrady.com>
59359         userspec: support optional parameters to parse_user_spec()
59360         * lib/userspec.c (parse_user_spec): If the GID param is NULL,
59361         then avoid group processing and treat the full spec as a user.
59362         (parse_with_separator): Allow the USERNAME and GROUPNAME to
59363         be optional params (NULL), in which case they're ignored.
59365 2013-09-19  Paul Eggert  <eggert@cs.ucla.edu>
59367         timespec: new function make_timespec, and new constants
59368         * lib/timespec.h: Incorporate recent changes on the Emacs trunk.
59369         (TIMESPEC_RESOLUTION, LOG10_TIMESPEC_RESOLUTION): New constants.
59370         (make_timespec): New function.
59371         * lib/dtotimespec.c (dtotimespec):
59372         * lib/timespec-add.c (timespec_add):
59373         * lib/timespec-sub.c (timespec_sub):
59374         * lib/utimens.c (validate_timespec):
59375         * lib/utimensat.c (rpl_utimensat):
59376         Use these new constants and functions.
59378         stdio: OS X port of putc_unlocked + extern inline
59379         * lib/stdio.in.h (putc_unlocked): #undef on problematic Apple platforms.
59380         * doc/posix-functions/putc_unlocked.texi:
59381         * doc/posix-functions/putchar_unlocked.texi:
59382         Document this portability problem.
59384         signal: OS X port of sigaddset etc. + extern inline
59385         * lib/signal.in.h (sigaddset, sigdelset, sigemptyset, sigfillset)
59386         (sigismember): #undef on problematic Apple platforms.
59387         * doc/posix-functions/sigaddset.texi:
59388         * doc/posix-functions/sigdelset.texi:
59389         * doc/posix-functions/sigemptyset.texi:
59390         * doc/posix-functions/sigfillset.texi:
59391         * doc/posix-functions/sigismember.texi:
59392         Document this portability problem.
59394         extern-inline: do not always suppress extern inline on OS X
59395         * m4/extern-inline.m4 (gl_EXTERN_INLINE): Suppress the use of
59396         extern inline on Apple only if the particular compile-time
59397         configuration is known to have the problem.
59398         (_GL_EXTERN_INLINE_APPLE_BUG): New private macro, to implement this.
59399         (_GL_EXTERN_INLINE_IN_USE): New macro, intended for use by
59400         other Gnulib modules.
59402         extern-inline: document fixes for ctype and wctype macros
59403         * doc/posix-functions/isalnum.texi, doc/posix-functions/isalpha.texi:
59404         * doc/posix-functions/isascii.texi, doc/posix-functions/isblank.texi:
59405         * doc/posix-functions/iscntrl.texi, doc/posix-functions/isdigit.texi:
59406         * doc/posix-functions/isgraph.texi, doc/posix-functions/islower.texi:
59407         * doc/posix-functions/isprint.texi, doc/posix-functions/ispunct.texi:
59408         * doc/posix-functions/isspace.texi, doc/posix-functions/isupper.texi:
59409         * doc/posix-functions/iswalnum.texi, doc/posix-functions/iswalpha.texi:
59410         * doc/posix-functions/iswcntrl.texi, doc/posix-functions/iswctype.texi:
59411         * doc/posix-functions/iswdigit.texi, doc/posix-functions/iswgraph.texi:
59412         * doc/posix-functions/iswlower.texi, doc/posix-functions/iswprint.texi:
59413         * doc/posix-functions/iswpunct.texi, doc/posix-functions/iswspace.texi:
59414         * doc/posix-functions/iswupper.texi, doc/posix-functions/iswxdigit.texi:
59415         * doc/posix-functions/isxdigit.texi, doc/posix-functions/toascii.texi:
59416         * doc/posix-functions/memcpy.texi, doc/posix-functions/memmove.texi:
59417         * doc/posix-functions/memset.texi, doc/posix-functions/stpcpy.texi:
59418         * doc/posix-functions/stpncpy.texi, doc/posix-functions/strcat.texi:
59419         * doc/posix-functions/strcpy.texi, doc/posix-functions/strncat.texi:
59420         * doc/posix-functions/strncpy.texi:
59421         * doc/posix-functions/tolower.texi, doc/posix-functions/toupper.texi:
59422         * doc/posix-functions/towlower.texi, doc/posix-functions/towupper.texi:
59423         Document that Gnulib fixes portability problems with these
59424         functions on OS X 10.8 and earlier when called from plain inline
59425         or extern inline functions.
59427 2013-09-17  Kevin Cernekee  <cernekee@gmail.com>
59429         fflush, freadahead, fseeko: Fix for Android
59430         Suggested by Bruno Haible in:
59431         <http://lists.gnu.org/r/bug-gnulib/2012-01/msg00306.html>
59432         * lib/stdio-impl.h: Use local __sfileext definition.
59434 2013-09-17  Mats Erik Andersson  <gnu@gisladisker.se>
59436         pmccabe2html: Portability to other awk versions.
59437         The functions systime() and strftime() are available
59438         in Gawk only.  Properly close two HTML-tags 'style'
59439         and 'span'.
59440         * build-aux/pmccabe2html (BEGIN): Store timing
59441         strings in EPOCH_TIME and CHRONOS_TIME.  Replace
59442         systime() in HTML_COMMENT.
59443         (html_header): Correctly close tag 'style'.
59444         (END): Replace strftime() by CHRONOS_TIME.  Close
59445         tag 'span' correctly, not as 'div'.
59447 2013-09-17  Mats Erik Andersson  <gnu@gisladisker.se>  (tiny change)
59449         getgroups: statement without effect
59450         * lib/getgroups.c (rpl_getgroups) [HAVE_GETGROUPS]:
59451         Change equality conditional to expected assignment.
59453 2013-09-09  Eric Blake  <eblake@redhat.com>
59455         glob: fix compilation
59456         * lib/glob.in.h (__THROW): Fix missing line in previous commit.
59458 2013-09-07  Eric Blake  <eblake@redhat.com>
59460         glob: fix build for platforms without __THROW
59461         * lib/glob.in.h (__THROW): Add definition again.
59463 2013-09-04  Anton Ovchinnikov  <revolver112@gmail.com>  (tiny change)
59465         regex-quote: fix buffer access out of bounds
59466         http://lists.gnu.org/r/bug-gnulib/2013-09/msg00001.html
59467         * lib/regex-quote.c (regex_quote_spec_pcre):
59468         Fix typo that resulted in an out-of-bounds read.
59470 2013-09-04  Eric Blake  <eblake@redhat.com>
59472         glob: avoid -Wattribute warnings on glibc
59473         * lib/glob.c (next_brace_sub, prefix_array, collated_compare): Use
59474         __THROWNL, not __THROW, on static functions.
59475         * lib/glob.in.h (__THROW): Adjust...
59476         (__THROWNL): ...accordingly.
59478 2013-08-28  Paul Eggert  <eggert@cs.ucla.edu>
59480         headers: check that _GL_INLINE_HEADER_BEGIN is defined
59481         Suggested by Bruce Korb in:
59482         http://lists.gnu.org/r/bug-gnulib/2013-08/msg00070.html
59483         * doc/extern-inline.texi (extern inline):
59484         Suggest checking that _GL_INLINE_HEADER_BEGIN is defined.
59485         * lib/acl-internal.h, lib/argp-fmtstream.h, lib/argp.h:
59486         * lib/binary-io.h, lib/bitrotate.h, lib/count-leading-zeros.h:
59487         * lib/count-one-bits.h, lib/eealloc.h, lib/execinfo.in.h:
59488         * lib/gethrxtime.h, lib/gl_list.h, lib/gl_oset.h, lib/gl_xlist.h:
59489         * lib/gl_xoset.h, lib/gl_xsublist.h, lib/glthread/cond.h:
59490         * lib/glthread/thread.h, lib/math.in.h, lib/mbchar.h, lib/mbfile.h:
59491         * lib/mbiter.h, lib/mbuiter.h, lib/openat.h, lib/pipe-filter-aux.h:
59492         * lib/priv-set.h, lib/pthread.in.h, lib/savewd.h, lib/se-context.in.h:
59493         * lib/se-selinux.in.h, lib/sig-handler.h, lib/stat-time.h:
59494         * lib/sys_socket.in.h, lib/timespec.h, lib/u64.h, lib/unistd.in.h:
59495         * lib/utimens.h, lib/wctype.in.h, lib/xalloc.h, lib/xsize.h:
59496         * lib/xtime.h:
59497         Check that _GL_INLINE_HEADER_BEGIN is defined.
59499 2013-08-29  Pádraig Brady  <P@draigBrady.com>
59501         bootstrap: remove the --version requirement from ancillary tools
59502         * build-aux/bootstrap (check_exists): A new refactored function to
59503         determine if a command exists.
59504         (find_tool): Use the new function which does not require the
59505         --version option to be supported.
59506         (check_versions): Use the new function.
59508 2013-08-26  Simon Josefsson  <simon@josefsson.org>
59510         gc: support HMAC-SHA256 and HMAC-SHA512.
59511         * lib/gc.h: Add gc_hmac_sha256 and gc_hmac_sha512.
59512         * lib/gc-libgcrypt.c (gc_hmac_sha256, gc_hmac_sha512): New
59513         functions.
59514         (gc_hmac_md5): Use symbolic constant.
59515         * lib/gc-gnulib.c: Include hmac.h for HMAC-SHA256/512 too.
59516         (gc_hmac_sha256, gc_hmac_sha512): New functions.
59517         * lib/hmac.h: Add hmac_sha256 and hmac_sha512 prototypes.
59518         * m4/sha256.m4: Protect against empty expansion.
59519         * m4/sha512.m4: Likewise.
59520         * lib/hmac-sha256.c: New file.
59521         * lib/hmac-sha512.c: Likewise.
59522         * m4/gc-hmac-sha256.m4: Likewise.
59523         * m4/gc-hmac-sha512.m4: Likewise.
59524         * m4/gc-sha256.m4: Likewise.
59525         * m4/gc-sha512.m4: Likewise.
59526         * modules/crypto/gc-hmac-sha256: Likewise.
59527         * modules/crypto/gc-hmac-sha256-tests: Likewise.
59528         * modules/crypto/gc-hmac-sha512: Likewise.
59529         * modules/crypto/gc-hmac-sha512-tests: Likewise.
59530         * modules/crypto/hmac-sha256: Likewise.
59531         * modules/crypto/hmac-sha256-tests: Likewise.
59532         * modules/crypto/hmac-sha512: Likewise.
59533         * modules/crypto/hmac-sha512-tests: Likewise.
59534         * tests/test-gc-hmac-sha256.c: Likewise.
59535         * tests/test-gc-hmac-sha512.c: Likewise
59536         * tests/test-hmac-sha256.c: Likewise.
59537         * tests/test-hmac-sha512.c: Likewise
59539 2013-08-24  Daiki Ueno  <ueno@gnu.org>
59541         * m4/intl.m4: Update from gettext-0.18.3.1, which fixes a misuse
59542         of AC_CHECK_DECLS.
59544 2013-08-23  Paul Eggert  <eggert@cs.ucla.edu>
59546         selinux-at: omit unnecessary include
59547         * lib/selinux-at.c: Don't include dosname.h; not needed, since
59548         this source file doesn't use its macros, and subsidiary files that
59549         use the macros already include it.
59551 2013-08-21  Eric Blake  <eblake@redhat.com>
59553         d-ino: avoid false negative on symlink
59554         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Use lstat.
59555         Reported by Stephane Chazelas.
59557 2013-08-12  Mike Miller  <mtmiller@ieee.org>  (tiny change)
59559         bootstrap: port to OpenBSD sed
59560         * build-aux/bootstrap (insert_if_absent): Port to OpenBSD sed which
59561         does not interpret `-' as a file argument to mean stdin.
59563 2013-08-15  Eric Blake  <eblake@redhat.com>
59565         warnings: minor optimization
59566         * m4/warnings.m4 (gl_COMPILER_OPTION_IF): Use fewer processes.
59568         warnings: check -Wfoo rather than -Wno-foo
59569         * m4/warnings.m4 (gl_COMPILER_OPTION_IF): If name begins with
59570         -Wno-, test if the compiler recognizes the positive form instead.
59572 2013-08-15  Karl Berry  <karl@gnu.org>
59574         * config/srclist-update: add option "doclicense" to placate
59575         pulling *.texi files from Emacs.  Write terse usage
59576         documentation at the top.
59578 2013-08-13  Paul Eggert  <eggert@cs.ucla.edu>
59580         xvasprintf-tests: port to GCC with hardening flags
59581         * tests/test-xvasprintf.c (test_xasprintf): Pass another arg to
59582         xasprintf, to pacify GCC.  Reported by Santiago Vila in:
59583         http://lists.gnu.org/r/bug-diffutils/2013-08/msg00002.html
59585 2013-08-11  Paul Eggert  <eggert@cs.ucla.edu>
59587         fpending: port to recent Cygwin change to stdio_ext.h
59588         Reported by LRN in
59589         <http://lists.gnu.org/r/bug-gnulib/2013-08/msg00028.html>.
59590         * lib/fpending.h: Don't worry about HAVE_DECL___FPENDING;
59591         just declare __fpending unless it's a macro.
59592         A duplicate decl shouldn't hurt.
59593         * m4/fpending.m4 (gl_FUNC_FPENDING): Check that an __fpending
59594         call compiles and links, instead of separately checking for
59595         decl and lib function.
59596         * modules/fpending (configure-ac):
59597         Adjust to fpending.m4's renaming of shell variable.
59599 2013-08-10  Paul Eggert  <eggert@cs.ucla.edu>
59601         sys_time: port to OpenBSD
59602         * lib/sys_time.in.h: Simply delegate to the system's header
59603         in the BSDish cases as well.  Problem reported by Mike Miller in
59604         <http://lists.gnu.org/r/bug-gnulib/2013-08/msg00016.html>.
59605         * tests/test-sys_select.c, tests/test-sys_time.c (verify_tv_sec_type):
59606         Allow platforms like 64-bit OpenBSD where timeval's tv_sec is
59607         wider than time_t.
59609 2013-08-09  Pádraig Brady  <P@draigBrady.com>
59611         bootstrap: support checksum utils having -c but not --status
59612         * build-aux/bootstrap: Only look for sha1sum if updating po files.
59613         Add sha1 to the list of supported checksum utils since it's now
59614         supported through adjustments below.
59615         (update_po_files): Remove the use of --status
59616         in a way that will suppress all error messages, but since this is
59617         only used to minimize updates, it shouldn't cause an issue.
59618         Exit early if there is a problem updating the po file checksums.
59619         (find_tool): Remove the check for --version support as this
59620         is optional as per commit 86186b17.  Don't even check for the
59621         presence of the command as if that is needed, it's supported
59622         through configuring prerequisites in bootstrap.conf.
59623         Prompt that when a tool isn't found, one can define an environment
59624         variable to add to the hardcoded search list.
59626 2013-08-05  Jim Meyering  <meyering@fb.com>
59628         regex: port to non-glibc/lock-using systems
59629         Since 29-05-2013 commit, 55ba71f4, compilation on a non-glibc
59630         system with GNULIB_LOCK would fail due to absence of the
59631         included "glthread/lock.h".  This would affect any package
59632         for which the "lock" module is used only by the regex module,
59633         and not explicitly used.
59634         * m4/regex.m4 (gl_PREREQ_REGEX): Require gl_GLIBC21.
59635         * modules/regex (Depends-on) [!GLIBC && $ac_use_included_regex]:
59636         Add a dependency on the "lock" module.
59638 2013-07-20  Daiki Ueno  <ueno@gnu.org>
59640         localecharset: make locale_charset thread-safe on Mac OS X
59641         * lib/localcharset.c (locale_charset) [DARWIN7]: Use MB_CUR_MAX_L
59642         instead of MB_CUR_MAX.
59644 2013-07-20  Daiki Ueno  <ueno@gnu.org>
59646         gettext: update to version 0.18.3
59647         * m4/intl.m4, m4/po.m4: Update from gettext-0.18.3.  In particular,
59648         require AC_PROG_SED to allow user to specify custom sed command when
59649         generating en@quot PO file.
59651 2013-07-18  Werner Lemberg  <wl@gnu.org>  (tiny change)
59653         bootstrap: use correct source when copying build-aux files
59654         * build-aux/bootstrap (gnulib_extra_files): This variable is
59655         relative to upstream gnulib layout, not downstream.
59657 2013-07-17  Paul Eggert  <eggert@cs.ucla.edu>
59659         tmpdir: fix bug in VMS port
59660         * lib/tmpdir.c (path_search) [__VMS]: Never add slash.
59661         See Steven M. Schweda in
59662         <http://lists.gnu.org/r/bug-gnulib/2013-07/msg00026.html>.
59664 2013-07-15  Paul Eggert  <eggert@cs.ucla.edu>
59666         tmpdir: port to VMS, to // != /, and to long dirs
59667         * lib/tmpdir.c (__libc_secure_getenv) [!_LIBC]: Rename from
59668         __secure_getenv, so that we're more like the glibc version.
59669         All uses changed.
59670         (path_search): Don't put slash after directory if __VMS.
59671         Problem reported by Steven M. Schweda in
59672         <http://lists.gnu.org/r/bug-gnulib/2013-07/msg00019.html>.
59673         Simplify code to add slash; no need for a loop.
59674         Do not remove trailing slash from "//".
59675         Do not assume dlen <= INT_MAX.
59677 2013-07-09  Paul Eggert  <eggert@cs.ucla.edu>
59679         regex: port to --with-included-regex --enable-gcc-warnings non-threaded
59680         * lib/regex_internal.h (lock_fini, lock_lock): Rework to avoid
59681         gcc warnings in the non-threaded case.  Reported by Charlie Brown in
59682         <http://lists.gnu.org/r/bug-gnulib/2013-07/msg00015.html>.
59684         accept4, dup3, pipe2: port to Cygwin
59685         Problem reported for Emacs by Ken Brown in <http://bugs.gnu.org/14821>.
59686         * lib/accept4.c (accept4) [O_BINARY]:
59687         * lib/dup3.c (dup3) [O_BINARY]:
59688         * lib/pipe2.c (pipe2) [O_BINARY]:
59689         Use set_binary_mode, not setmode.
59690         * lib/pipe2.c [!GNULIB_BINARY_IO]: Include binary-io.h.
59691         * modules/binary-io (Depends-on): Remove module indicator.
59692         These last two bits undo the previous change to pipe2 and binary-io.
59694 2013-07-09  Pádraig Brady  <P@draigBrady.com>
59696         mountlist: add support for deallocating returned list entries
59697         * lib/mountlist.c (free_mount_entry): A new exported function
59698         to deallocate a mount list entry.
59699         (read_file_system_list): Refactor to use the new deallocation function.
59700         Suggested by Anton Ovchinnikov.
59702 2013-07-07  Paul Eggert  <eggert@cs.ucla.edu>
59704         stdalign, verify: port to FreeBSD 9.1, to C11, and to C++11
59705         Problem reported by Ulrich Mueller in <http://bugs.gnu.org/14812>.
59706         * lib/stdalign.in.h (_Alignas, _Alignof):
59707         Port to FreeBSD 9.1, and to C11 and C++11.
59708         (_Alignas): Also support ICC.
59709         * lib/verify.h (_Static_assert): Undef if <stddef.h> defines it.
59710         * m4/stdalign.m4 (gl_STDALIGN_H): Port to ICC and to C++11.
59712 2013-07-06  Paul Eggert  <eggert@cs.ucla.edu>
59714         fnmatch: don't goto over declaration
59715         * lib/fnmatch_loop.c (FCT): Hoist local up one level, to avoid
59716         undefined behavior for goto over a declaration.
59717         Problem reported by Charlie Brown in
59718         <http://lists.gnu.org/r/bug-gnulib/2013-07/msg00009.html>.
59720         pipe2: decouple from binary-io a bit
59721         This is for Emacs, which needs pipe2 but not binary-io.
59722         * lib/pipe2.c [!GNULIB_BINARY_IO]: Don't include binary-io.h.
59723         * modules/binary-io (Depends-on): Add module indicator.
59725 2013-07-03  Eric Blake  <eblake@redhat.com>
59727         mgetgroups: relax license to LGPLv2+
59728         * modules/getugroups (License): Change from GPLv3+.
59729         * modules/mgetgroups (License): Likewise.
59730         * modules/getgroups (License): Change from LGPLv3+.
59732         xalloc-oversized: relax license to LGPLv2+
59733         * modules/xalloc-oversized (License): Change from GPLv3+.
59735         nproc: relax license to LGPLv2+
59736         * modules/nproc (License): Change from LGPLv3+.
59738         bootstrap: honor --no-git
59739         * build-aux/bootstrap: Don't even try to use git when user is
59740         pointing to a static checkout.
59742 2013-06-23  Paul Eggert  <eggert@cs.ucla.edu>
59744         ignore-value: port to gcc -pedantic
59745         * lib/ignore-value.h (ignore_value):
59746         Port to gcc -pedantic, by using __extension__.
59747         Reindent as per usual gnulib style nowadays.
59748         Simplify GCC version check.
59750 2013-06-21  Paul Eggert  <eggert@cs.ucla.edu>
59752         extern-inline: port to gcc -std=c89
59753         * m4/extern-inline.m4 (gl_EXTERN_INLINE):
59754         Do not use __gnu_inline__ if pedantic and pre-C99.
59756 2013-06-18  Paul Eggert  <eggert@cs.ucla.edu>
59758         doc: document extern-inline
59759         * doc/extern-inline.texi: New file.
59760         * doc/gnulib.texi (alloca-opt): Include it.
59761         * m4/extern-inline.m4: Move some comments to documentation,
59762         and others closer to what they describe.
59764         doc: chatter less
59765         * doc/Makefile (NEWEST_GNULIB_TEXI_FILE): New macro.
59766         (updated-stamp): Use it.  This causes 'make' to output just
59767         one file name rather than zillions.
59769         fflush, fseeko: port to musl cross-compiles
59770         * lib/fseeko.c (fseeko): Assume that fflushing stdin works if
59771         on some implementation that (1) is not known to be buggy,
59772         (2) claims conformance to POSIX.1-2008 or later, and (3) is being
59773         cross-compiled to so we can't easily check for lack of
59774         conformance.  This is for cross-compiling to musl.
59775         Reported by Rich Felker in
59776         <http://lists.gnu.org/r/bug-gnulib/2013-06/msg00043.html>.
59777         * m4/fclose.m4 (gl_FUNC_FCLOSE):
59778         * m4/fflush.m4 (gl_FUNC_FFLUSH):
59779         * m4/fseeko.m4 (gl_FUNC_FSEEKO):
59780         Adjust to above change.
59781         * m4/fflush.m4 (gl_FUNC_FFLUSH_STDIN): Set gl_cv_func_fflush_stdin
59782         to 'cross', not to 'no', when cross-compiling.  AC_DEFINE
59783         FUNC_FFLUSH_STDIN to 1, 0, -1 if fflushing stdin is known to work,
59784         known not to work, or unknown.
59786 2013-06-15  Paul Eggert  <eggert@cs.ucla.edu>
59788         msvc-inval: port to mingw-w64
59789         * lib/msvc-inval.c (gl_msvc_invalid_parameter_handler):
59790         Use __cdecl, not cdecl, for mingw-w64.  Reported by LRN in
59791         <http://lists.gnu.org/r/bug-gnulib/2013-06/msg00039.html>.
59793 2013-06-11  Paul Eggert  <eggert@cs.ucla.edu>
59795         getcwd-lgpl: port to Tru64
59796         * lib/getcwd-lgpl.c: Include <stdlib.h>, for malloc etc.
59797         Problem reported by Steven M. Schweda in
59798         <http://lists.gnu.org/r/bug-gzip/2013-06/msg00010.html>.
59800         tests: port large-fd POSIX spawn tests to OS X
59801         Problem reported by Daiki Ueno in
59802         <http://lists.gnu.org/r/bug-gnulib/2013-06/msg00031.html>.
59803         * tests/test-posix_spawn_file_actions_addclose.c:
59804         * tests/test-posix_spawn_file_actions_adddup2.c:
59805         * tests/test-posix_spawn_file_actions_addopen.c:
59806         Include <limits.h>, for OPEN_MAX, if available.
59807         (big_fd): New static function.
59808         (main): Use it.
59810 2013-06-04  Bernhard Voelker  <mail@bernhard-voelker.de>
59812         tests/nap.h: use an adaptive delay to avoid ctime update issues
59813         The recent change in nap.h (5191133e) decreased the probability of lost
59814         races to about a third, however such problems could still be observed
59815         in virtual machines and openSUSE's OBS.
59816         Before, nap() detected the needed time once empirically and then used
59817         that delay (together with a small correction multiplier) in further
59818         calls.  This problem has been reported and discussed several times,
59819         including guesses about possible kernel issues:
59820         https://lists.gnu.org/r/bug-gnulib/2013-04/msg00071.html
59821         http://lists.gnu.org/r/coreutils/2012-03/msg00088.html
59822         https://lists.gnu.org/r/bug-gnulib/2011-11/msg00226.html
59823         http://bugs.gnu.org/12820
59824         https://lists.gnu.org/r/bug-gnulib/2010-11/msg00113.html
59825         https://lists.gnu.org/r/bug-gnulib/2009-11/msg00007.html
59826         Now, nap() avoids the race alltogether by verifying on a reference
59827         file whether a timestamp difference has happened.
59828         * tests/nap.h (nap_fd): Define file descriptor variable for the
59829         witness file.
59830         (nap_works): Change return value to bool.  Change passing
59831         the old file's status by value instead of by reference as this function
59832         does no longer update that timestamp; rename the function argument from
59833         st to old_st.  Remove the local variables cdiff and mdiff because that
59834         function now returns true/false instead of the precise delay.
59835         (guess_delay): Remove function.
59836         (clear_tmp_file): Add new function to close and unlink the witness file.
59837         (nap): Instead of re-using the delay which has been calculated during
59838         the first call, avoid the race by actually verifying that a timestamp
59839         difference can be observed on the current file system.  Use an adaptive
59840         approach for the delay to minimize execution time.  Assert that the
59841         maximum delay is <= ~2 seconds, more precisely sum(2^n) from 0 to 30
59842         = 2^31 - 1 = 2.1s.
59843         Use atexit to call clear_tmp_file when the process terminates.
59845 2013-06-02  Paul Eggert  <eggert@cs.ucla.edu>
59847         sig2str: port to C++
59848         * lib/sig2str.h (sig2str, str2sig): Declare as extern "C".
59849         Reported by Daniel J Sebald in
59850         <http://lists.gnu.org/r/bug-gnulib/2013-06/msg00000.html>.
59852 2013-05-30  Eric Blake  <eblake@redhat.com>
59854         docs: mention cygwin shortcoming in <sys/un.h>
59855         * doc/posix-headers/sys_un.texi (sys/un.h): Mention problem.
59857         vasnprintf: silence mingw compiler warning
59858         * lib/vasnprintf.c (VASNPRINTF): Avoid unused variable warning.
59860 2013-05-29  Paul Eggert  <eggert@cs.ucla.edu>
59862         c-ctype, regex, verify: port to gcc -std=c90 -pedantic
59863         Avoid constructions that are rejected by gcc -std=c90 -pedantic.
59864         This fixes a porting bug I recently reintroduced in regex, and
59865         some other instances that I discovered while testing the fix.
59866         * lib/c-ctype.h [__STRICT_ANSI__]: Avoid ({ ... }).
59867         * lib/regcomp.c (utf8_sb_map) [__STRICT_ANSI__]: Avoid [0 ... N] = E.
59868         * lib/regex_internal.h [!_LIBC && GNULIB_LOCK]: Do not use a macro
59869         with an empty argument if this is a pedantic pre-C99 GCC.
59870         * lib/verify.h: Do not use _Static_assert if this is a pedantic
59871         pre-C11 GCC.
59873         regex: adapt to locking regime instead of depending on pthread
59874         Instead of depending on pthread, adapt to whatever thread
59875         modules are in use.  Problem reported by Ludovic Courtès in
59876         <http://lists.gnu.org/r/bug-gnulib/2013-05/msg00082.html>
59877         and by Mats Erik Andersson in
59878         <http://lists.gnu.org/r/bug-gnulib/2013-05/msg00100.html>.
59879         * lib/regex_internal.h (lock_define, lock_init, lock_fini):
59880         Support either the 'lock' module, or the 'pthread' module, or
59881         no module.
59882         (lock_lock, lock_unlock): New macros.
59883         * lib/regexec.c (regexec, re_search_stub): Use the new macros.
59884         * modules/lock, modules/pthread (configure.ac): Add module indicator.
59885         * modules/regex (Depends-on): Remove pthread.
59887 2013-05-22  Eric Blake  <eblake@redhat.com>
59889         getgroups: document portability issues
59890         * doc/glibc-functions/initgroups.texi (initgroups): Mention
59891         multithread safety.
59892         * doc/posix-functions/getpwuid.texi (getpwuid): Likewise.
59893         * doc/posix-functions/getpwuid_r.texi (getpwuid_r): Likewise.
59894         * doc/glibc-functions/getgrouplist.texi (getgrouplist): Mention
59895         getugroups.
59896         * doc/posix-functions/getgroups.texi (getgroups): Mention
59897         multithread safety and mgetgroups.
59899 2013-05-22  Bernhard Voelker  <mail@bernhard-voelker.de>
59901         test-lchown, test-chown: also skip test if chown fails with EPERM
59902         * tests/test-lchown.h (test_lchown): Add EPERM to the condition to
59903         skip this test, to handle FAT file systems.
59904         * tests/test-chown.h (test_chown): Likewise.
59906 2013-05-19  Paul Eggert  <eggert@cs.ucla.edu>
59908         regex: fix dfa race in multithreaded uses
59909         Problem reported by Ludovic Courtès in
59910         <http://lists.gnu.org/r/bug-gnulib/2013-05/msg00058.html>.
59911         * lib/regex_internal.h (lock_define, lock_init, lock_fini):
59912         New macros.  All uses of __libc_lock_define, __libc_lock_init
59913         changed to use the first two of these.
59914         (__libc_lock_lock, __libc_lock_unlock): New macros, for
59915         non-glibc platforms.
59916         (struct re_dfa_t): Define the lock unconditionally.
59917         * lib/regexec.c (regexec, re_search_stub): Remove some now-incorrect
59918         '#ifdef _LIBC"s.
59919         * modules/regex (Depends-on): Add pthread, if we use the
59920         included regex.
59922         * lib/regcomp.c: Do actions that are not needed for glibc,
59923         but may be needed elsewhere.
59924         (regfree, re_compile_internal): Destroy the lock.
59925         (re_compile_internal): Check for lock-initialization failure.
59927         malloca: port to compilers that reject size-zero arrays
59928         This fixes a bug introduced in my previous patch.
59929         * lib/malloca.c (struct preliminary_header): Use an int
59930         rather than a character array of size int; that's simpler.
59931         (struct header): Remove, replacing with ...
59932         (union header): New type.  This avoids the need for declaring a
59933         character array of size zero, which is not allowed on some platforms.
59934         All uses changed.
59936 2013-05-18  Paul Eggert  <eggert@cs.ucla.edu>
59938         parse-datetime, tests: don't use "string" + int
59939         Recent versions of 'clang' complain about C source code that
59940         uses expressions of the form '"string literal" + integer',
59941         I guess on the theory that it's confusing for readers who are
59942         used to C++.  On those grounds I suppose it's OK to make this
59943         minor style change.
59944         * lib/parse-datetime.y (parse_datetime):
59945         * tests/test-fchdir.c (main):
59946         * tests/test-snprintf-posix.h (test_function):
59947         * tests/test-snprintf.c (main):
59948         * tests/test-vasnprintf-posix.c (test_function):
59949         * tests/test-vasnprintf.c (test_function):
59950         * tests/test-vsnprintf.c (main):
59951         * tests/unistdio/test-ulc-asnprintf1.h (test_function):
59952         Rewrite '"str" + E' to '&"str"[E]'.
59954 2013-05-17  Alexandre Duret-Lutz  <adl@lrde.epita.fr>
59956         argmatch: port to C++
59957         * lib/argmatch.h [__cplusplus]: Add extern "C".
59959         argp: typo fix
59960         * lib/argp-help.c: Typo in comment.
59962 2013-05-15  Paul Eggert  <eggert@cs.ucla.edu>
59964         manywarnings: update for GCC 4.8.0
59965         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC):
59966         Add -Waggressive-loop-optimizations, -Wreturn-local-addr, which
59967         are new to GCC 4.8.  Remove -Wformat=2, -Wmissing-format-attribute,
59968         -Wmissing-noreturn, as they are duplicates of other warnings.
59969         Remove -Wunreachable-code, as it is removed in GCC 4.8 and
59970         was documented to be flaky in earlier versions of GCC.
59972         spawn-tests, sys_socket-tests, sys_wait-tests: port to clang
59973         * tests/test-spawn.c (main):
59974         * tests/test-sys_socket.c (main):
59975         * tests/test-sys_wait.c (main):
59976         Don't have a switch value that isn't covered by a case.
59978         getaddrinfo-tests: port --enable-gcc-warnings to clang
59979         * tests/test-getaddrinfo.c (simple):
59980         Avoid casts from looser to stricter-aligned pointers.
59982         thread: port --enable-gcc-warnings to clang
59983         * lib/glthread/thread.h [__clang__ && USE_POSIX_THREADS_WEAK]:
59984         Include <signal.h>, to pacify a warning about pthread_sigmask.
59986         stdio: use __REDIRECT for fwrite, fwrite_unlocked
59987         * lib/stdio.in.h (fwrite):
59988         When working around bug 11959, use __REDIRECT rather than '#define
59989         fwrite(...) ... fwrite (...) ...'.  This is a more-targeted way to
59990         fix the -Wunused-value issue with clang, and it works with GCC too.
59991         Problem with targeting reported by Eric Blake in
59992         <http://lists.gnu.org/r/bug-gnulib/2013-05/msg00067.html>.
59993         (fwrite_unlocked): Treat like fwrite.  I ran into this issue while
59994         debugging the fwrite issue.
59996         stdio: port --enable-gcc-warnings to clang
59997         * lib/stdio.in.h (fwrite) [__clang__]: Ignore -Wunused-value entirely,
59998         since the GCC workaround for fwrite does not pacify clang.
60000         sig2str: port --enable-gcc-warnings to clang
60001         * lib/sig2str.c (sig2str): Avoid warning about unused printf argument.
60003         obstack: port --enable-gcc-warnings to clang
60004         * lib/obstack.h (obstack_ptr_grow_fast, obstack_int_grow_fast):
60005         Avoid casts from looser to stricter-aligned pointers.
60007         memchr2: port --enable-gcc-warnings to clang
60008         * lib/memchr2.c (memchr2):
60009         Avoid casts from looser to stricter-aligned pointers.
60011         mbsstr: port --enable-gcc-warnings to clang
60012         * lib/mbsstr.c (knuth_morris_pratt_multibyte):
60013         Avoid casts from looser to stricter-aligned pointers.
60015         malloca: port --enable-gcc-warnings to clang
60016         * lib/malloca.c (struct header): New member 'magic', to avoid casts.
60017         (mmalloca): Avoid casts from looser to stricter-aligned pointers.
60019         inttostr: port --enable-gcc-warnings to clang
60020         * lib/anytostr.c [__clang__]: Ignore -Wtautological-compare.
60022         warnings: port to clang
60023         Problem reported by Daniel P. Berrange via Eric Blake in
60024         <http://lists.gnu.org/r/bug-gnulib/2013-05/msg00055.html>.
60025         * m4/warnings.m4 (gl_UNKNOWN_WARNINGS_ARE_ERRORS): New macro.
60026         (gl_WARN_ADD): Use it.
60028 2013-05-11  Jim Meyering  <meyering@fb.com>
60030         quotearg: do not read beyond end of buffer
60031         * lib/quotearg.c (quotearg_buffer_restyled): Do not read beyond the
60032         end of an ARG for which no length was specified.  With an N-byte
60033         quote string, (e.g., N is 3 in the fr_FR.UTF-8 locale), this function
60034         would read N-2 bytes beyond ARG's trailing NUL.  This was triggered
60035         via coreutils' misc/sort-debug-keys.sh test and detected by running
60036         the test against a binary compiled with gcc-4.8.0's -fsanitize=address.
60037         * tests/test-quotearg-simple.c (main): Add a test to trigger the bug.
60038         * modules/quotearg-simple-tests (Files): Add tests/zerosize-ptr.h.
60039         Introduced via the 2000-01-15 commit, c4b7f3f8, "Quote multibyte
60040         characters correctly."
60042 2013-05-11  Daiki Ueno  <ueno@gnu.org>
60044         lock: work around pthread recursive mutexes bug in Mac OS X 10.6
60045         * m4/lock.m4: Don't define HAVE_PTHREAD_MUTEX_RECURSIVE if the
60046         compilation target is Mac OS X 10.6.
60047         Problem reported by parafin and Andoni Morales in
60048         <http://savannah.gnu.org/bugs/?37844> and
60049         <http://lists.gnu.org/r/bug-gettext/2013-05/msg00007.html>.
60051 2013-05-11  Paul Eggert  <eggert@cs.ucla.edu>
60053         mkdir-p: remove assumptions about umask and mode
60054         * lib/mkdir-p.c (make_dir_parents): Do not assume that the current
60055         umask is 0, or that MODE is a subset of MODE_BITS.
60057 2013-05-10  Eric Blake  <eblake@redhat.com>
60059         maint.mk: catch more abuse of HAVE_DECL in syntax-check
60060         * top/maint.mk (sc_prohibit_defined_have_decl_tests): Relax regex.
60062 2013-05-10  Stefano Lattarini  <stefano.lattarini@gmail.com>
60064         deps: require Automake >= 1.9.6 in generated Makefile fragments
60066         That is the same minimal version required in the DEPENDENCIES file.
60067         Moreover, the old code generated a requirement of Automake >= 1.5,
60068         and that is an insanely outdated version.
60070         * gnulib-tool: Bump minimal version requirement in AUTOMAKE_OPTIONS.
60071         * tests/havelib/rpathlx/Makefile.am: Likewise.
60072         * tests/havelib/rpathly/Makefile.am: Likewise.
60073         * tests/havelib/rpathlyx/Makefile.am: Likewise.
60074         * tests/havelib/rpathlz/Makefile.am: Likewise.
60075         * tests/havelib/rpathlzyx/Makefile.am: Likewise.
60076         * tests/havelib/rpathx/Makefile.am: Likewise.
60077         * tests/havelib/rpathy/Makefile.am: Likewise.
60078         * tests/havelib/rpathz/Makefile.am: Likewise.
60080 2013-05-08  Eric Blake  <eblake@redhat.com>
60082         bootstrap: AC_INIT may have more than four parameters
60083         * build-aux/bootstrap (extract_package_name): Correctly extract
60084         non-empty tarname field.  Avoid range in regex.
60085         Based on a report by Sami Kerola <kerolasa@iki.fi>.
60087 2013-05-07  Paul Eggert  <eggert@cs.ucla.edu>
60089         qacl: port to MS-Windows port of GNU Emacs
60090         * lib/acl-errno-valid.c (acl_errno_valid) [ENOTSUP == ENOSYS]:
60091         Omit the duplicate ENOTSUP case.  Needed for the MS-Windows
60092         port of GNU Emacs.  Problem reported by Eli Zaretskii in
60093         <http://bugs.gnu.org/14295#14>.
60095 2013-05-07  Mike Frysinger  <vapier@gentoo.org>
60097         acl: include quote.h
60098         * lib/copy-acl.c: Include quote.h.
60099         * lib/set-acl.c: Likewise.
60101 2013-05-06  Mike Frysinger  <vapier@gentoo.org>
60103         fchownat, renameat, unlinkat: update statat dependencies
60104         These modules use statat and lstatat, not fstatat; so depend on
60105         the statat module, which was split out recently from fstatat.
60106         * modules/fchownat, modules/unlinkat: Change fstatat to statat.
60107         * modules/renameat: Likewise.  Also delete fstat.
60108         URL: http://bugs.gentoo.org/468790
60110 2013-05-04  Stefano Lattarini  <stefano.lattarini@gmail.com>
60112         Assume gnulib is checked out from Git, not CVS
60114         In fact, access to the gnulib repository through CVS has been
60115         disabled, or more precisely, got broken and was never restored; see:
60116         <http://lists.gnu.org/r/bug-gnulib/2013-05/msg00008.html>
60118         Note that support for CVS is not removed completely and unthinkingly
60119         by this change: only support for CVS checkouts of gnulib itself is
60120         removed.  For example, the 'bootstrap' script still cater to .cvsingore
60121         files and CVS directories, for the benefit of those poor gnulib clients
60122         still stuck with CVS.  Ditto for the 'gnulib-tool' script itself.
60124         * gnulib-tool: Simplify accordingly.
60125         * posix-modules: Likewise.
60126         * MODULES.html.sh: Likewise.
60127         * doc/gnulib.texi: No longer mention the decommissioned CVS gnulib
60128         repository.
60129         * doc/gnulib-intro.texi: Likewise.
60130         * doc/gnulib-readme.texi: Likewise.
60131         * doc/gnulib-tool.texi: In the examples and explanations, refer to a
60132         sample '.gitignore' file rather than a sample '.cvsignore'.
60133         * NEWS: Update.
60134         * m4/extensions.m4: While at it, remove a comment mistakenly referring
60135         to "CVS Autoconf" rather than "git Autoconf".
60137 2013-04-30  Paul Eggert  <eggert@cs.ucla.edu>
60139         utimensat-tests, etc.: try to fix some races
60140         Problem reported by Bernhard Voelker in
60141         <http://lists.gnu.org/r/bug-gnulib/2013-04/msg00071.html>.
60142         I don't know whether this patch fixes that race condition, but it
60143         fixes *some* race conditions, so it should be a win.
60144         * modules/chown-tests (Depends-on):
60145         * modules/fchownat-tests (Depends-on):
60146         * modules/fdutimensat-tests (Depends-on):
60147         * modules/futimens-tests (Depends-on):
60148         * modules/lchown-tests (Depends-on):
60149         * modules/stat-time-tests (Depends-on):
60150         * modules/utimens-tests (Depends-on):
60151         * modules/utimensat-tests (Depends-on):
60152         Depend on nanosleep, not usleep.
60153         * modules/chown-tests (test_chown_LDADD):
60154         * modules/lchown-tests (test_lchown_LDADD):
60155         * modules/stat-time-tests (test_stat_time_LDADD):
60156         New macro.
60157         * modules/fchownat-tests (test_fchownat_LDADD):
60158         * modules/fdutimensat-tests (test_fdutimensat_LDADD):
60159         * modules/futimens-tests (test_futimens_LDADD):
60160         * modules/utimens-tests (test_utimens_LDADD):
60161         * modules/utimensat-tests (test_utimensat_LDADD):
60162         Add $(LIB_NANOSLEEP).
60163         * modules/stat-time-tests (Files): Add tests/nap.h.
60164         * tests/nap.h: Include <limits.h>, for INT_MAX.
60165         (lt_mtime): Remove.
60166         (diff_timespec): New function.
60167         (get_stat): Rename from get_mtime.  All callers changed.
60168         (nap_works): Determine the needed delay by inspecting the
60169         file system's timestamp jumps; this should be more reliable.
60170         Look at both mtime and ctime, and take the maximum of the two jumps.
60171         (nap_works, guess_delay):
60172         Return a nanosecond count, not a microsecond count.
60173         All callers changed.
60174         (nap_works, nap): Use nanosleep, not usleep.  Check for nanosleep
60175         failure.
60176         (nap): Multiply the guess by 1.125, to accommodate the case where
60177         the file system's clock is a bit slower than nanosleep's clock.
60178         * tests/test-stat-time.c (BASE): New macro.
60179         Include nap.h.
60180         (nap): Remove; nap.h now defines this.  This removes a duplicate
60181         implementation of 'nap'.
60183         utimens, utimensat: work around Solaris UTIME_OMIT bug
60184         Solaris 11.1 and Solaris 10 have the same UTIME_OMIT bug that
60185         Linux kernel 2.6.32 does.  Work around it in the same way.
60186         * doc/posix-functions/futimens.texi (futimens):
60187         * doc/posix-functions/utimensat.texi (utimensat): Document the bug.
60188         * lib/utimens.c (fdutimens, lutimens):
60189         * lib/utimensat.c (rpl_utimensat): Work around the bug.
60191         gettext: now it's your responsibility to add -I$(top_builddir)/intl
60192         Formerly, it was your responsibility to do this for all Makefile.ams
60193         other than Gnulib's.  Now it's your responsibility to do it for
60194         Gnulib's Makefile.am, too.
60195         * NEWS: Document this.
60196         * modules/gettext (AM_CPPFLAGS): Don't append -$(top_builddir)/intl.
60198         acl: include errno.h to get errno
60199         Reported by Daiki Ueno in
60200         <http://lists.gnu.org/r/bug-gnulib/2013-04/msg00073.html>.
60201         * lib/copy-acl.c, lib/set-acl.c: Include errno.h.
60203 2013-04-29  Paul Eggert  <eggert@cs.ucla.edu>
60205         tests: don't assume getdtablesize () <= 10000000
60206         * modules/cloexec-tests:
60207         * modules/dup2-tests:
60208         * modules/dup3-tests:
60209         * modules/nonblocking-tests:
60210         * modules/posix_spawn_file_actions_addclose-tests:
60211         * modules/posix_spawn_file_actions_adddup2-tests:
60212         * modules/posix_spawn_file_actions_addopen-tests:
60213         * modules/unistd-safer-tests:
60214         Depend on the getdtablesize module.
60215         * tests/test-cloexec.c:
60216         * tests/test-dup-safer.c:
60217         * tests/test-dup2.c:
60218         * tests/test-dup3.c:
60219         * tests/test-fcntl.c:
60220         * tests/test-nonblocking.c:
60221         * tests/test-posix_spawn_file_actions_addclose.c:
60222         * tests/test-posix_spawn_file_actions_adddup2.c:
60223         * tests/test-posix_spawn_file_actions_addopen.c:
60224         Don't assume getdtablesize () <= 10000000.
60226 2013-04-28  Paul Eggert  <eggert@cs.ucla.edu>
60228         extern-inline: work around bug in Sun c99
60229         * m4/extern-inline.m4 (_GL_INLINE, _GL_EXTERN_INLINE):
60230         Work around bug in Sun C 5.12 c99's implementation of 'inline'.
60232 2013-04-27  Paul Eggert  <eggert@cs.ucla.edu>
60234         qacl: new module, broken out from the acl module
60235         This is for GNU Emacs, which wants the acl functions but does
60236         not want 'error' invoked when they fail.
60237         * lib/acl-internal.h: Do not include error.h, quote.h.
60238         (ENOSYS, ENOTSUP): Remove; no longer needed.
60239         (ACL_NOT_WELL_SUPPORTED): Remove; replaced by acl_errno_valid.
60240         * lib/acl.h: Include <stdbool.h>.
60241         (acl_errno_valid): New function.
60242         * lib/copy-acl.c, lib/set-acl.c: Include errno,h, not acl-internal.h.
60243         * lib/copy-acl.c (qcopy_acl): Move to lib/qcopy-acl.c.
60244         * lib/set-acl.c: Rename from lib/set-mode-acl.c.
60245         (chmod_or_fchmod, qset_acl): Move to lib/qset-acl.c.
60246         (ACL_INTERNAL_INLINE): Remove; no longer needed.
60247         * lib/file-has-acl.c (file_has_acl):
60248         * lib/qcopy-acl.c (qcopy_acl):
60249         * lib/qset-acl.c (qset_acl):
60250         Use acl_errno_valid instead of ACL_NOT_WELL_SUPPORTED.
60251         * modules/acl (Files): Move lib/acl.h, lib/acl-internal.h,
60252         lib/acl_entries.c, lib/set-mode-acl.c (renamed to lib/set-acl.c),
60253         lib/file-has-acl.c, m4/acl.m4 to qacl module.
60254         Add lib/set-acl.c.
60255         (Depends-on): Move extern-inline, fstat, sys_stat to qacl module.
60256         Add qacl.
60257         (configure.ac): Move gl_FUNC_ACL to qacl module.
60258         (lib_SOURCES): Remove file-has-acl.c (moved to qacl module).
60259         Rename set-mode-acl.c to set-acl.c.
60260         * lib/acl-errno-valid.c: New file.
60261         * lib/qcopy-acl.c: New file, moved from the old lib/copy-acl.c; the
60262         copy_acl function remains in copy-acl.c.
60263         * lib/qcopy-acl.c, lib/qset-acl.c: Do not include gettext.h.
60264         (_): Remove; not needed.
60265         * lib/qset-acl.c: New file, moved from the old lib/set-mode-acl.c; the
60266         set_acl function remains in set-acl.c (renamed from set-mode-acl.c).
60267         * modules/qacl: New file, moved from the old modules/acl.
60268         (Files, lib_SOURCES): Add acl-errno-valid.c, qcopy-acl.c, qset-acl.c.
60269         Remove set-mode-acl.c, copy-acl.c.
60270         (Depends-on): Remove error, gettext-h, quote.  Add stdbool.
60272         alignof, intprops, malloca: port better to IBM's C compiler
60273         * lib/alignof.h (alignof_type) [__IBM_ALIGNOF__]: Use __alignof__.
60274         * lib/intprops.h (_GL_HAVE___TYPEOF__) [__IBM_TYPEOF__]: Now 1.
60275         * lib/malloca.h (sa_alignof): [__IBM_ALIGNOF__]: Use __alignof__.
60277 2013-04-25  Daiki Ueno  <ueno@gnu.org>
60279         wctype-h: fix gettext link error on mingw
60280         Reported by Josue Andrade Gomes and Takayuki Tsunakawa in
60281         <https://lists.gnu.org/r/bug-gettext/2013-03/msg00086.html>.
60282         * lib/wctype.in.h [__MINGW32__]: Include <ctype.h> before defining
60283         rpl_towupper and rpl_towupper.
60285 2013-04-11  Dmitry V. Levin  <ldv@altlinux.org>
60287         regex-tests, regex: allow glibc re_search behavior
60288         * tests/test-regex.c (main): In test for glibc bug 15078, reformat
60289         re_search input data to make the multi-character collating element
60290         in it clearly visible, and treat re_search return code 0 as valid.
60291         * m4/regex.m4 (gl_REGEX): Likewise.
60293 2013-03-30  Paul Eggert  <eggert@cs.ucla.edu>
60295         stdalign: doc fix
60296         * doc/posix-headers/stdalign.texi (stdalign.h):
60297         Gnulib doesn't support '_Alignof expr'.
60299 2013-03-29  Paul Eggert  <eggert@cs.ucla.edu>
60301         stdalign: port to stricter ISO C11
60302         ISO C11 says that _Alignof's operand must be a parenthesized type.
60303         Problem reported by Eli Zaretskii in
60304         <http://lists.gnu.org/r/emacs-devel/2013-03/msg00960.html>.
60305         * doc/posix-headers/stdalign.texi (stdalign.h): Document this.
60306         * m4/stdalign.m4 (gl_STDALIGN_H): Don't use _Alignof (expr).
60308 2013-03-21  Paul Eggert  <eggert@cs.ucla.edu>
60310         sys_select, sys_time: port 2013-01-30 Solaris 2.6 fix to Cygwin
60311         Problem reported by Marco Atzeri in
60312         <http://lists.gnu.org/r/bug-gnulib/2013-03/msg00000.html>.
60313         * lib/sys_select.in.h [HAVE_SYS_SELECT_H && _CYGWIN_SYS_TIME_H]:
60314         Simply delegate to the system <sys/select.h> in this case too.
60315         Also, pay attention to _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TIME_H only
60316         if OSF/1, since otherwise Cygwin breaks, and it doesn't seem to
60317         be needed on Solaris either.
60318         * lib/sys_time.in.h [_CYGWIN_SYS_TIME_H]:
60319         Simply delegate to the system <sys/time.h> in this case.
60321 2013-03-19  Karl Berry  <karl@gnu.org>
60323         * build-aux/gnupload: check for erroneous (with gnupload) use of
60324         ftp-upload.gnu.org, tweak help.
60326 2013-03-19  Paul Eggert  <eggert@cs.ucla.edu>
60328         copy-file, rpmatch: fix problems found by cppcheck
60329         Reported by Arno Onken in
60330         <http://lists.gnu.org/r/bug-gnulib/2013-03/msg00069.html>.
60331         * lib/rpmatch.c (try): Fix memory leak.
60332         * lib/copy-file.c: Include "ignore-value.h".
60333         (qcopy_file_preserving): Ignore chown value.
60334         * modules/copy-file (Depends-on): Add ignore-value.
60336 2013-01-27  Jim Meyering  <jim@meyering.net>
60338         prefix-gnulib-mk: give better diagnostics
60339         * build-aux/prefix-gnulib-mk: Don't just "die".
60340         Give better diagnostics upon failure.
60342 2013-03-13  Paul Eggert  <eggert@cs.ucla.edu>
60344         putenv: port to Solaris 10
60345         * lib/putenv.c (_unsetenv, putenv): Use HAVE_DECL__PUTENV, not
60346         HAVE__PUTENV.  Solaris 10 has a _putenv that's not declared and
60347         is not what is wanted here.
60348         * m4/putenv.m4 (gl_PREREQ_PUTENV): Check for _putenv's
60349         declaration, not for its existence.
60351 2013-03-12  Paul Eggert  <eggert@cs.ucla.edu>
60353         mktime: fix configure typo
60354         * m4/mktime.m4 (gl_FUNC_MKTIME): Fix typo in previous change.
60356 2013-03-12  Eric Blake  <eblake@redhat.com>
60358         regex-tests: skip UTF-8 test on mingw
60359         * modules/regex-tests (Depends-on): Add localcharset.
60360         * tests/test-regex.c (main): Use it to skip test on mingw.
60362 2013-03-11  Eric Blake  <eblake@redhat.com>
60364         tests: make it easier to bypass alarm time in debugger
60365         * tests/test-file-has-acl.c (main): Allow gdb to override alarm.
60366         * tests/test-memmem.c (main): Likewise.
60367         * tests/test-passfd.c (main): Likewise.
60368         * tests/test-ptsname.c (main): Likewise.
60369         * tests/test-ptsname_r.c (main): Likewise.
60370         * tests/test-strcasestr.c (main): Likewise.
60371         * tests/test-strstr.c (main): Likewise.
60373         regex: port to mingw's recent addition of undeclared alarm
60374         * doc/posix-functions/alarm.texi (alarm): Document that alarm
60375         exists but still doesn't work in newer mingw.
60376         * m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Check for alarm declaration,
60377         not existence.  Ensure SIGALRM is not trapped.
60378         * m4/mktime.m4 (gl_FUNC_MKTIME): Likewise.
60379         * m4/regex.m4 (gl_REGEX): Likewise.
60380         * m4/remainderf.m4 (gl_FUNC_REMAINDERF_WORKS): Likewise.
60381         * tests/test-regex.c (main): Use correct probe for alarm.
60383         putenv: avoid compilation warning on mingw
60384         * lib/putenv.c (_unsetenv): Protect variable declaration.
60385         (putenv): Fix indentation.
60387 2013-03-11  Gary V. Vaughan  <gary@gnu.org>
60389         unistd: don't prevent Tru64 Unix from using gnulib strtod.
60390         * lib/unistd.in.h: be careful not to include un-needed system
60391         stdlib.h from here, because that prevents gnulib stdlib.h from
60392         defining rpl_strtod correctly.
60394 2013-03-09  Gary V. Vaughan  <gary@gnu.org>
60396         vasprintf-posix-tests: allow rounding 1.51 to 1, per the previous
60397         changesets, but for the 'precision 0' test.
60398         * tests/test-vasprintf-posix.c (test_function): Don't insist on
60399         round-to-even, since POSIX says rounding is implementation-defined
60400         and OS X 10.8.2 rounds 1.51 to 1 here.
60402         vasprintf-posix-tests: allow rounding 1.5 to 1, per the previous
60403         changeset.
60404         * tests/test-vasprintf-posix.c (test_function): Don't insist on
60405         round-to-even, since POSIX says rounding is implementation-defined
60406         and OS X 10.8.2 rounds 1.5 to 1 here.
60408 2013-03-08  Paul Eggert  <eggert@cs.ucla.edu>
60410         vasnprintf-posix-tests: allow rounding 1.5 to 1
60411         * tests/test-vasnprintf-posix.c (test_function): Don't insist on
60412         round-to-even, since POSIX says rounding is implementation-defined
60413         and OS X 10.8.2 rounds 1.5 to 1 here.  Reported by Gary V. Vaughan in
60414         <http://lists.gnu.org/r/bug-gnulib/2013-03/msg00019.html>.
60416         bootstrap: port to FreeBSD
60417         * build-aux/bootstrap (bootstrap_sync): Port sh -c usage to shells
60418         that treat '--' differently.  Reported by Mats Erik Andersson in
60419         <http://lists.gnu.org/r/bug-gnulib/2013-03/msg00012.html>.
60421 2013-03-08  Gary V. Vaughan  <gary@gnu.org>
60423         regex: rename remaining __attribute calls to __attribute__.
60424         2012-02-25 changed definition of __attribute, but left some uses
60425         unchanged, preventing compilation of regex module on most non-gcc
60426         environments.
60427         * lib/regcomp.c (re_set_fastmap, seek_collating_symbol_entry)
60428         (lookup_collation_sequence_value, build_range_exp)
60429         (build_collating_symbol): Set attributes with newly renamed
60430         __attribute__ decorator.
60431         * lib/regex_internal.c (re_string_peek_byte_case)
60432         (re_node_set_compare, re_node_set_contains): Likewise.
60433         * lib/regexec.c (acquire_init_state_context): Likewise.
60435 2013-03-06  Bruno Haible  <bruno@clisp.org>
60437         execute: Revert last change, but use a different condition.
60438         * lib/execute.c (nonintr_close, nonintr_open): Reintroduce, but only
60439         on Windows.
60441 2013-03-05  Eric Blake  <eblake@redhat.com>
60443         execute: drop dead code
60444         * lib/execute.c (nonintr_close, nonintr_open): Delete.
60446 2013-03-04  Paul Eggert  <eggert@cs.ucla.edu>
60448         non-recursive-gnulib-prefix-hack: port coreutils 8.21 to HP NonStop
60449         * m4/non-recursive-gnulib-prefix-hack.m4
60450         (gl_NON_RECURSIVE_GNULIB_PREFIX_HACK): Don't mess with ALLOCA.
60451         Problem reported for HP NonStop + coreutils 8.21 by Joachim Schmitz in
60452         <http://bugs.gnu.org/10305#237>.
60454 2013-03-04  Eric Blake  <eblake@redhat.com>
60456         test-getsockopt: avoid compiler warning
60457         * tests/test-getsockopt.c (includes): Ensure close is declared.
60459 2013-03-02  Bruno Haible  <bruno@clisp.org>
60461         sys_types: Avoid autoconf warning about gl_SYS_TYPES_H.
60462         * m4/sys_types_h.m4 (gl_SYS_TYPES_H): Define through AC_DEFUN_ONCE.
60464 2013-03-02  Bruno Haible  <bruno@clisp.org>
60466         gettext: Update to version 0.18.2.
60467         * m4/intl.m4, m4/po.m4: Update from gettext-0.18.2. In particular:
60468         2012-12-07  Stefano Lattarini  <stefano.lattarini@gmailcom>
60469                 * intl.m4, po.m4: Bump requirement in AC_PREREQ to 2.60.
60471 2013-02-25  Paul Eggert  <eggert@cs.ucla.edu>
60473         regex: merge patches from libc
60475         2013-02-26  Siddhesh Poyarekar  <siddhesh@redhat.com>
60476         * lib/regex_internal.h (__attribute__): Rename from __attribute.
60477         All uses changed.
60478         (bitset_not, bitset_merge, bitset_mask, re_string_char_size_at)
60479         (re_string_wchar_at, re_string_elem_size_at):
60480         Mark function as possibly unused.
60482         2013-02-12  Andreas Schwab  <schwab@suse.de>  [BZ #11561]
60483         * lib/regcomp.c (parse_bracket_exp) [_LIBC]: When looking up collating
60484         elements compare against the byte sequence of it, not its name.
60486 2013-02-21  Paul Eggert  <eggert@cs.ucla.edu>
60488         putenv: port better to native Windows
60489         * lib/putenv.c [(_WIN32 || __WIN32__) && ! __CYGWIN__]:
60490         Define WIN32_LEAN_AND_MEAN and include <windows.h>.
60491         (_unsetenv): Use _putenv if available.
60492         (putenv): Temporarily set NAME=' ' rather than NAME='x' as that's
60493         a bit less likely to cause damage.
60494         (putenv) [(_WIN32 || __WIN32__) && ! __CYGWIN__]:
60495         Fix the wrong value with SetEnvironmentVariable.
60496         (putenv) [!HAVE__PUTENV]: Simplify and match the HAVE__PUTENV
60497         code better.
60499 2013-02-20  Paul Eggert  <eggert@cs.ucla.edu>
60501         regex: ignore old-style-definition warnings
60502         * lib/regex.c: Add pragma to ignore these warnings.
60503         Problem reported for GNU tar by Pavel Raiskup.
60505 2013-02-19  Paul Eggert  <eggert@cs.ucla.edu>
60507         getcwd: support coreutils better
60508         Like strtod, getcwd incorrectly referred to HAVE_RAW_DECL_GETCWD,
60509         but this might not be correct in coreutils, which disables
60510         the raw decl checks.  Problem reported by Nagendra in
60511         <http://bugs.gnu.org/10305#192>.
60512         * lib/getcwd.c (__getcwd): Do not depend on HAVE_RAW_DECL_GETCWD.
60513         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX):
60514         Test the getcwd function, not any macro, since getcwd.c wants the
60515         function.
60516         * m4/getcwd.m4 (gl_FUNC_GETCWD):
60517         Don't define HAVE_MINIMALLY_WORKING_GETCWD if the code doesn't
60518         compile, as might happen if there's a macro but no function.
60520         strtod: support coreutils better
60521         * lib/strtod.c (underlying_strtod): Just invoke the underlying strtod.
60522         HAVE_RAW_DECL_STRTOD might not be correct in coreutils, which
60523         disables the raw decl checks.  This assumes there is an underlying
60524         strtod, but that's a safe assumption these days.
60525         (HAVE_RAW_DECL_STRTOD): Remove; no longer used.
60527         mountlist: port to HP NonStop
60528         Reported by Joachim Schmitz in
60529         <http://lists.gnu.org/r/bug-gnulib/2013-02/msg00084.html>.
60530         * lib/mountlist.c (hasmntopt) [!HAVE_HASMNTOPT]: New function.
60531         (MNT_IGNORE) [MNTOPT_IGNORE]: Use it.
60533 2013-02-18  Paul Eggert  <eggert@cs.ucla.edu>
60535         extern-inline: avoid compilation error with HP-UX cc
60536         Reported by Richard Lloyd in
60537         <http://lists.gnu.org/r/bug-texinfo/2013-02/msg00030.html>.
60538         * m4/extern-inline.m4 (_GL_INLINE, _GL_EXTERN_INLINE):
60539         Suppress extern inline with HP-UX cc.  This should be safe,
60540         though it may hurt performance.  Perhaps someone with some HP-UX
60541         experience can come up with a higher-performance fix.
60543 2013-02-14  Paul Eggert  <eggert@cs.ucla.edu>
60545         putenv: fix heap corruption with mixed putenv/_putenv
60546         Problem reported by Michael Goffioul in
60547         <http://lists.gnu.org/r/bug-gnulib/2013-02/msg00061.html>.
60548         * lib/putenv.c (putenv) [HAVE__PUTENV]:
60549         Rely on _putenv to allocate the new environment.
60550         * m4/putenv.m4 (gl_PREREQ_PUTENV): New macro.
60551         * modules/putenv (configure.ac): Use it.
60553 2013-02-11  Paul Eggert  <eggert@cs.ucla.edu>
60555         unsetenv etc.: port to Solaris 11 + GNU Emacs
60556         * lib/canonicalize-lgpl.c, lib/getaddrinfo.c, lib/getdelim.c:
60557         * lib/glob.c, lib/random_r.c, lib/setenv.c, lib/tsearch.c:
60558         * lib/unsetenv.c (_GL_ARG_NONNULL): Define before including <config.h>.
60559         GNU Emacs's <config.h> includes <stdlib.h> (which is not a great
60560         idea but is too painful to fix right now), and without this gnulib
60561         change <stdlib.h> was defining _GL_ARG_NONNULL incorrectly when
60562         compiling unsetenv.c on Solaris 11.  Fix the problem for
60563         unsetenv.c, and fix other similar occurrences.
60565 2013-02-09  Paul Eggert  <eggert@cs.ucla.edu>
60567         secure_getenv: fix C++ declaration typo
60568         * lib/stdlib.in.h (secure_getenv): Fix typo with return type
60569         in _GL_CXXALIAS_SYS macro.  Reported by John W. Eaton in
60570         <http://lists.gnu.org/r/bug-gnulib/2013-02/msg00057.html>.
60572 2013-02-08  Paul Eggert  <eggert@cs.ucla.edu>
60574         careadlinkat: stop exporting careadlinkatcwd
60575         Only Emacs used it directly, and Emacs no longer needs it.
60576         * NEWS: Document this simplification.
60577         * lib/areadlink.c (careadlinkatcwd): Move here from careadlinkat.c,
60578         and make it static.  Include <stdlib.h>, for abort, and unistd.h,
60579         for readlink.
60580         * lib/careadlinkat.c (careadlinkatcwd): Move to areadlink.c.
60581         Don't include stdlib.h; no longer needed.
60582         * lib/careadlinkat.h (careadlinkatcwd): Remove decl.
60583         * lib/relocwrapper.c: Adjust comment to match new dependencies.
60584         * modules/areadlink (Depends-on): Add readlink.
60585         (Maintainer): Add self.
60586         * modules/careadlinkat (Depends-on): Remove readlink.
60588         extensions: port better to HP-UX
60589         This is merged from git Autoconf.
60590         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS):
60591         On hosts that need _XOPEN_SOURCE, define it when configuring, too,
60592         so that it's compatible with the value used when compiling.
60594         openpty: fix bug where HAVE_OPENPTY is mistakenly 1
60595         Problem reported by Mats Erik Andersson in
60596         <http://lists.gnu.org/r/bug-gnulib/2013-02/msg00051.html>.
60597         * m4/pty.m4 (gl_FUNC_OPENPTY): Define HAVE_OPENPTY when the
60598         openpty function exists, not merely when we intend to replace it.
60599         This corrects the 2013-01-31 patch, which mistakenly defined
60600         HAVE_OPENPTY even on hosts that lacked it.
60602 2013-02-07  Paul Eggert  <eggert@cs.ucla.edu>
60604         secure_getenv: fix include typo
60605         * lib/secure_getenv.c: Include config.h.  Somehow I forgot!
60607         secure_getenv: port better to FreeBSD and Solaris
60608         * lib/secure_getenv.c [!HAVE___SECURE_GETENV]:
60609         Include unistd.h if HAVE_ISSETUGID, otherwise define a dummy issetugid.
60610         (secure_getenv) [!HAVE___SECURE_GETENV]: Use getenv if not issetugid.
60611         This works better on BSDish platforms.
60612         * m4/secure_getenv.m4 (gl_PREREQ_SECURE_GETENV):
60613         Test for issetugid if __secure_getenv is missing.
60615 2013-02-06  Paul Eggert  <eggert@cs.ucla.edu>
60617         extensions: port better to MINIX 3, HP-UX, autoheader 2.62
60618         Some of these changes are merged in from git Autoconf.
60619         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS):
60620         When deciding whether to define _XOPEN_SOURCE, inspect the
60621         preprocessor macro __hpux instead of the more-heavyweight
60622         operation of requiring AC_CANONICAL_HOST.  Define _NETBSD_HOST on
60623         MINIX, for MINIX 3.  Use USE_SYSTEM_EXTENSIONS, not __EXTENSIONS__,
60624         as the key for __EXTENSIONS__.
60626         unistd: avoid namespace pollution on non-glibc systems
60627         * lib/unistd.in.h: #define __need_getopt before including <getopt.h>.
60628         This avoids namespace pollution on non-glibc systems, by causing
60629         gnulib unistd.h to behave more like glibc unistd.h.  I also hope
60630         that this fixes a bug on FreeBSD, reported by Mats Erik Andersson in
60631         <http://lists.gnu.org/r/bug-gnulib/2013-02/msg00027.html>.
60633 2013-02-04  Paul Eggert  <eggert@cs.ucla.edu>
60635         tmpdir: use secure_getenv
60636         * lib/tmpdir.c (__secure_getenv) [!LIBC]:
60637         Define to secure_getenv, not getenv.
60638         * m4/tmpdir.m4 (gt_TMPDIR): Don't check for __secure_getenv,
60639         as that's now secure_getenv's job.
60640         * modules/tmpdir (Depends-on): Add secure_getenv.
60642         tempname: use secure_getenv
60643         * lib/tempname.c (__secure_getenv) [!_LIBC]:
60644         Define to secure_getenv, not getenv.
60645         * modules/tempname (Depends-on):
60646         Add secure_getenv.
60648         secure_getenv: new module
60649         * MODULES.html.sh (Extra functions based on ANSI C 89):
60650         Add secure_getenv.
60651         * doc/glibc-functions/secure_getenv.texi: New file.
60652         * doc/gnulib.texi: Include it.
60653         * lib/secure_getenv.c, m4/secure_getenv.m4, modules/secure_getenv:
60654         New files.
60655         * lib/stdlib.in.h (secure_getenv): New decl.
60656         * m4/stdlib_h.m4 (gl_STDLIB_H, gl_STDLIB_H_DEFAULTS):
60657         * modules/stdlib (stdlib.h):
60658         Add secure_getenv checks.
60660 2013-02-03  Paul Eggert  <eggert@cs.ucla.edu>
60662         getcwd: break fdopendir + save_cwd recursive loop (Bug#13516)
60663         Reported for OS X 10.8.2 by Assaf Gordon in
60664         <http://bugs.gnu.org/13516>.
60665         * lib/getcwd.c (HAVE_OPENAT_SUPPORT): Do not define if
60666         !HAVE_OPENAT && !HAVE_FDOPENDIR.
60667         * m4/getcwd-abort-bug.m4: Reformat to match test-getcwd.c
60668         so that they can be kept in sync more easily.  Avoid PATH_MAX
60669         test on the Hurd.  Sync from test-getcwd.c for errno tests after
60670         mkdir or chdir failure.
60671         * tests/test-getcwd.c (HAVE_OPENAT_SUPPORT): New macro, from
60672         lib/getcwd.c.
60673         (test_abort_bug): Do not test for the deep directory bug unless we
60674         have openat support.  Avoid PATH_MAX test on the Hurd.
60676         regex-tests, regex: fix bug: memset undeclared
60677         * tests/test-regex.c: Don't include regex.h twice.  Include
60678         string.h, to declare memset.  Christensen's report also mentioned
60679         this issue.
60680         * m4/regex.m4 (gl_REGEX): Keep test program more in sync with
60681         test-regex.c, to avoid future problems like this.  Remove
60682         AC_INCLUDES_DEFAULT.  Include <string.h>.  Don't include <regex.h>
60683         twice.
60685         regex-tests: fix link errors on older Solaris
60686         These need to link with @LIBINTL@ to get libintl_gettext.
60687         Problem reported by Tom G. Christensen in
60688         <http://lists.gnu.org/r/bug-gnulib/2013-02/msg00003.html>.
60689         * modules/regex-tests (test_regex_LDADD): New macro.
60691 2013-01-31  Paul Eggert  <eggert@cs.ucla.edu>
60693         regex-tests: new module
60694         * modules/regex-tests, tests/test-regex.c: New files.
60696         regex: fix off-by-one error in configure test
60697         * m4/regex.m4 (gl_REGEX): Test should return 21, not 20.
60699 2013-01-31  Eric Blake  <eblake@redhat.com>
60701         regex: avoid infinite configure test
60702         * m4/regex.m4 (gl_REGEX): Add an alarm escape hatch.
60704 2013-01-31  Reuben Thomas  <rrt@sc3d.org>
60706         openpty: fix bug where HAVE_OPENPTY wasn't defined
60707         See the thread starting at:
60708         http://lists.gnu.org/r/bug-gnulib/2013-01/msg00185.html
60709         * m4/pty.m4 (gl_FUNC_OPENPTY): Define HAVE_OPENPTY when the
60710         openpty function exists, not merely when we intend to replace it.
60712 2013-01-30  Paul Eggert  <eggert@cs.ucla.edu>
60714         sys_time: port to Solaris 2.6
60715         There is a circularity problem on Solaris 2.6, where <time.h> includes
60716         <sys/time.h> for struct timespec.  The include nesting is gnulib
60717         <time.h>, system <time.h>, gnulib <sys/time.h>, system
60718         <sys/time.h>, gnulib <sys/types.h>, system <sys/types.h>, gnulib
60719         <sys/select.h>, gnulib <signal.h>, system <sys/signal.h>, system
60720         <sys/siginfo.h>; the last, innermost file needs struct
60721         timestruc_t, which is defined in <sys/time.h>, which has not been
60722         fully parsed.  Problem reported by Tom G. Christensen in
60723         <http://lists.gnu.org/r/bug-gnulib/2013-01/msg00113.html>.
60724         * lib/sys_select.in.h: Treat Solaris 2.6's problem with
60725         <sys/time.h> and <sys/types.h> like OSF/1's similar problem.
60726         * lib/sys_time.in.h: Redo to resemble sys_select.in.h, which
60727         uses split double-inclusion guards.
60729 2013-01-29  Paul Eggert  <eggert@cs.ucla.edu>
60731         regex: test for buffer overrun
60732         * m4/regex.m4 (gl_REGEX): Add test case, by Andreas Schwab,
60733         for the just-fixed regex bug.
60735 2013-01-29  Andreas Schwab  <schwab@suse.de>
60737         regex: fix buffer overrun in regexp matcher [BZ #15078]
60738         * lib/regexec.c (extend_buffers): Add parameter min_len.
60739         (check_matching): Pass minimum needed length.
60740         (clean_state_log_if_needed): Likewise.
60741         (get_subexp): Likewise.
60743 2013-01-28  Pádraig Brady  <P@draigBrady.com>
60745         mountlist: don't consider "devtmpfs" as dummy
60746         * lib/mountlist.c (ME_DUMMY_0): Remove "devtmpfs"
60747         as there is storage associcated with it.
60749 2013-01-27  Paul Eggert  <eggert@cs.ucla.edu>
60751         futimens-tests, utimens-tests: Depend on gettext.
60752         This works around a problem introduced in my 2013-01-12 patch,
60753         which added @LIBINTL@ to these modules.
60754         * modules/futimens-tests (Depends-on):
60755         * modules/utimens-tests (Depends-on): Add gettext.
60757 2013-01-26  Eric Blake  <eblake@redhat.com>
60759         test-getpeername: fix typo
60760         * tests/test-getpeername.c: Fix typo introduced in fd cleanup.
60762 2013-01-20  Bernhard Voelker  <mail@bernhard-voelker.de>
60764         bootstrap: remove the need for a sorted .gitignore file
60765         * build-aux/bootstrap (insert_sorted_if_absent): Adjust and
60766         rename to insert_if_absent(), so that we don't need or generate
60767         a sorted .gitignore file.  We do require a .gitignore with no
60768         existing duplicate entries and enforce that.
60769         (sort_patterns): Remove this function as we now use the simpler
60770         technigue of inserting blacklist entries at the top of the file,
60771         assuming gnulib won't be inserting !whitelist entries.
60773 2013-01-23  Paul Eggert  <eggert@cs.ucla.edu>
60775         readlinkat: don't depend on gl_FUNC_OPENAT
60776         * m4/readlinkat.m4 (gl_FUNC_READLINKAT): Don't require gl_FUNC_OPENAT.
60777         Perhaps a similar change needs to be made for linkat.m4, mkfifoat.m4,
60778         renameat.m4, symlinkat.m4; but one thing at a time.
60780         statat: new module, split out from fstatat
60781         GNU Emacs needs the POSIX-specified fstatat, but not the
60782         gnulib-specified statat and lstat.  Split the latter two into a
60783         new module 'statat'.
60784         * lib/openat.h: Depend on GNULIB_STATAT, not GNULIB_FSTATAT.
60785         * lib/openat.h, lib/statat.c (STATAT_INLINE):
60786         Rename from FSTATAT_INLINE. All uses changed.
60787         * modules/fstatat (Files): Remove lib/statat.c.
60788         (gl_MODULE_INDICATOR([fstatat])): Remove.
60789         (lib_SOURCES): Remove.
60790         (Maintainer): Add self.
60791         * modules/statat, modules/statat-tests, tests/test-statat.c: New files.
60792         * tests/test-fstatat.c (BASE): Don't define if already defined.
60793         (do_stat, do_lstat) [!TEST_STATAT]: Test fstatat instead.
60795 2013-01-22  Paul Eggert  <eggert@cs.ucla.edu>
60797         tests: don't assume fd 99 is closed
60798         * tests/test-accept.c, tests/test-accept4.c, tests/test-bind.c:
60799         * tests/test-close.c, tests/test-connect.c, tests/test-dprintf.c:
60800         * tests/test-dup.c, tests/test-dup2.c, tests/test-faccessat.c:
60801         * tests/test-fchdir.c, tests/test-fchmod.c, tests/test-fchmodat.c:
60802         * tests/test-fchown.c, tests/test-fchownat.c, tests/test-fclose.c:
60803         * tests/test-fdatasync.c, tests/test-fdopen.c, tests/test-fdopendir.c:
60804         * tests/test-fflush.c, tests/test-fgetc.c, tests/test-fputc.c:
60805         * tests/test-fread.c, tests/test-freopen.c, tests/test-fseeko4.c:
60806         * tests/test-fstat.c, tests/test-fstatat.c, tests/test-fsync.c:
60807         * tests/test-ftello4.c, tests/test-ftruncate.c, tests/test-futimens.h:
60808         * tests/test-fwrite.c, tests/test-getpeername.c:
60809         * tests/test-getsockname.c, tests/test-getsockopt.c:
60810         * tests/test-grantpt.c, tests/test-ioctl.c, tests/test-isatty.c:
60811         * tests/test-linkat.c, tests/test-listen.c, tests/test-lseek.c:
60812         * tests/test-mkdirat.c, tests/test-mkfifoat.c, tests/test-openat.c:
60813         * tests/test-pread.c, tests/test-pwrite.c, tests/test-read.c:
60814         * tests/test-readlinkat.c, tests/test-recv.c, tests/test-recvfrom.c:
60815         * tests/test-renameat.c, tests/test-select.h, tests/test-send.c:
60816         * tests/test-sendto.c, tests/test-setsockopt.c, tests/test-shutdown.c:
60817         * tests/test-symlinkat.c, tests/test-ttyname_r.c:
60818         * tests/test-unlinkat.c, tests/test-unlockpt.c:
60819         * tests/test-utimensat.c, tests/test-vdprintf.c, tests/test-write.c:
60820         Close file descriptor 99, instead of assuming it's already closed.
60822 2013-01-21  Paul Eggert  <eggert@cs.ucla.edu>
60824         stpncpy: port to OS X 10.8
60825         * lib/stpncpy.c (__stpncpy): Parenthesize name when defining function.
60826         Problem reported by Assaf Gordon in <http://bugs.gnu.org/13495>.
60828 2013-01-16  Paul Eggert  <eggert@cs.ucla.edu>
60830         unistd: port to recent mingw
60831         * lib/unistd.in.h: Remove special invocation convention for mingw,
60832         which breaks for the latest mingw version.  See John W. Eaton in
60833         <http://lists.gnu.org/r/bug-gnulib/2013-01/msg00100.html>.
60835         largefile: port better to Mac OS X 10.5
60836         This patch is backported from Autoconf git.
60837         * m4/largefile.m4 (AC_SYS_LARGEFILE): Use AC_DEFINE, not
60838         AH_VERBATIM, to define _DARWIN_USE_64_BIT_INODE, to avoid problems
60839         with ino_t size being different for configuration time versus
60840         build/run time.  Problem reported by PHO in
60841         <http://lists.gnu.org/r/bug-autoconf/2013-01/msg00040.html>.
60843 2013-01-15  Paul Eggert  <eggert@cs.ucla.edu>
60845         doc: clarify -Werror
60846         * doc/warnings.texi (warnings): -Werror is not always a bad idea;
60847         clarify that it's intended for developers, not for ordinary builds,
60848         and mention --enable-gcc-warnings as one possible use.
60850 2013-01-15  Andoni Morales Alastruey  <ylatuya@gmail.com>  (tiny change)
60852         stdint: fix build with Android's Bionic fox x86
60853         * lib/stdint.in.h: fix check to test if included-fixed/sys/types.h
60854         was already included as _SSIZE_T_DEFINED_ might also be defined
60855         in include/machine/_types.h, which is included by stdio.h
60857 2013-01-13  Paul Eggert  <eggert@cs.ucla.edu>
60859         net_if-tests: port to Solaris 7 + GCC 3.4.6
60860         Problem reported by Tom G. Christensen in
60861         <http://lists.gnu.org/r/bug-gnulib/2013-01/msg00091.html>.
60862         * tests/test-net_if.c (ni): Move to next the code that uses it,
60863         so that it's declared only if needed.
60865 2013-01-12  Paul Eggert  <eggert@cs.ucla.edu>
60867         net_if-tests: port to older Solaris
60868         Problem reported by Tom G. Christensen in
60869         <http://lists.gnu.org/r/bug-gnulib/2013-01/msg00086.html>.
60870         * modules/net_if-tests (NET_IF_LIB): New substitution.
60871         (test_net_if_LDADD): New makefile macro, which uses NET_IF_LIB.
60872         (HAVE_IF_NAMEINDEX): New C macro.
60873         * tests/test-net_if.c: Bypass most of the test if !HAVE_IF_NAMEINDEX.
60875         system-quote-tests: port to older Solaris
60876         Problem reported by Tom G. Christensen in
60877         <http://lists.gnu.org/r/bug-gnulib/2013-01/msg00086.html>.
60878         * tests/test-system-quote-child.c (fopen, fread): Undef.
60880         c-xvasprintf etc.: fix link errors on older Solaris
60881         These need to link with @LIBINTL@ to get libintl_gettext.
60882         Problem reported by Tom G. Christensen in
60883         <http://lists.gnu.org/r/bug-gnulib/2013-01/msg00086.html>.
60884         * modules/c-xvasprintf-tests (test_c_xvasprintf_LDADD):
60885         * modules/readtokens-tests (test_readtokens_LDADD): New macros.
60886         * modules/futimens-tests (test_futimens_LDADD):
60887         * modules/utimens-tests (test_utimens_LDADD): Add @LIBINTL@.
60889 2013-01-10  Paul Eggert  <eggert@cs.ucla.edu>
60891         locale: port to Solaris 2.6 and 7 + GNU gettext
60892         * lib/locale.in.h: Just include_next <locale.h> when
60893         being invoked recursively.  This prevents problems on Solaris 2.6 and 7
60894         when combining the localename module with GNU gettext 0.18.2.
60895         Problem reported by Tom G. Christensen in
60896         <http://lists.gnu.org/r/bug-gnulib/2013-01/msg00084.html>.
60898 2013-01-09  Paul Eggert  <eggert@cs.ucla.edu>
60900         stdlib: port to Solaris 2.6
60901         Also, the code worked on Solaris 7 through 9 only by accident.
60902         Problem reported by Tom G. Christensen in
60903         <http://lists.gnu.org/r/bug-gnulib/2013-01/msg00059.html>.
60904         * lib/stdlib.in.h: If __need_system_stdlib_h is defined,
60905         simply include the system stdlib.h.
60906         * lib/getopt.in.h (__need_system_stdlib_h):
60907         * lib/pthread.in.h (__need_system_stdlib_h):
60908         * lib/unistd.in.h (__need_system_stdlib_h) [!__GLIBC__]:
60909         Define when including <stdlib.h>, to avoid problems at least for
60910         the pthread case on Solaris 2.6 and 7.  These .h files can get by
60911         with the system stdlib.h.
60913 2013-01-06  Paul Eggert  <eggert@cs.ucla.edu>
60915         doc: update main copyright year
60916         * doc/gnulib.texi: Update copyright date.
60918         doc: improve ISO 8601 discussion
60919         * doc/parse-datetime.texi (Combined date and time of day items):
60920         Specify more carefully what formats are supported and what is
60921         done with excess precision.
60923 2013-01-05  Paul Eggert  <eggert@cs.ucla.edu>
60925         doc: avoid small caps
60926         * doc/parse-datetime.texi, doc/regex.texi: Don't use small caps;
60927         they're more trouble than they're worth.  Suggested by Karl Berry
60928         in <http://bugs.gnu.org/13360>.
60930         regex: conform to strict C
60931         * lib/regcomp.c (parse_bracket_exp): Add cast to conform to strict C.
60932         From Aharon Robbins.
60934         gnulib-tool: fix incompatibility with autopoint 0.18.2
60935         * gnulib-tool: Don't indent AM_GNU_GETTEXT_VERSION line.
60936         Problem reported by Tom G. Christensen in
60937         <http://lists.gnu.org/r/bug-gnulib/2013-01/msg00053.html>.
60939 2013-01-04  Paul Eggert  <eggert@cs.ucla.edu>
60941         fprintftime: bring back and reword fwrite comment
60942         * lib/strftime.c (cpy) [FPRINTFTIME]: Re-add reworded comment.
60944         stdio: remove now-unnecessary stdio.c
60945         Since stdio.in.h no longer uses inline functions, we no longer
60946         need to compile the extern versions.
60947         * lib/stdio.c: Remove.
60948         * modules/stdio (Files): Remove lib/stdio.c.
60949         (lib_SOURCES): Remove.
60951         unicodeio: depend on stdio, not ignore-value
60952         * lib/unicodeio.c: Do not include ignore-value.h.
60953         (fwrite_success_callback): Use plain fwrite, not ignore_value + fwrite.
60954         * modules/unicodeio (Depends-on): Depend on stdio, not ignore-value.
60956         fprintftime: depend on stdio, not ignore-value
60957         * lib/strftime.c [FPRINTFTIME]: Do not include ignore-value.h.
60958         (cpy) [FPRINTFTIME]: Use plain fwrite, not ignore_value of fwrite,
60959         since the stdio module arranges to silence that warning now.
60960         * modules/fprintftime (Depends-on): Depend on stdio, not ignore-value.
60962 2012-10-04  Simon Josefsson  <simon@josefsson.org>
60964         stdint-tests: Fix expanded-before-required-warning.
60965         * modules/stdint-tests (Depends-on): Use AC_REQUIRE.
60967 2013-01-03  Paul Eggert  <eggert@cs.ucla.edu>
60969         fwrite: silence __wur only for older glibc versions
60970         * lib/stdio.in.h (fwrite): Limit workaround to glibc 2.4 through 2.15.
60971         This will help us remove this workaround some time in the far future.
60973 2013-01-03  Eric Blake  <eblake@redhat.com>
60975         fwrite: silence __wur without using inline
60976         * lib/stdio.in.h (fwrite): Limit warn_unused_result workaround to
60977         just gcc, and in a way that avoids inline issues.
60978         * modules/stdio (Depends-on): Drop extern-inline.
60980 2013-01-03  Jim Meyering  <jim@meyering.net>
60982         update-copyright: avoid copyright notice date corruption
60983         Given a sequence of copyright year numbers in which the final
60984         one was a two-digit number that happened to be a substring of
60985         a preceding four-digit year number, we would mistakenly update
60986         the substring (from two- to four-digit) rather than the two-digit
60987         number at the end, which, combined with the addition of the current
60988         4-digit year number would yield two 5-digit year numbers, e.g.,
60989         here, it would convert the first "99" to "1999, 2013" rather than
60990         the final one:
60991           1991, 99
60992           11999, 20131, 1999
60993         * build-aux/update-copyright: Tighten a regexp.
60994         * tests/test-update-copyright.sh: Add a test case to trigger the bug.
60995         Reported by Joseph Myers in
60996         http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/32281
60998 2013-01-01  Paul Eggert  <eggert@cs.ucla.edu>
61000         regex: omit needless signed-pointer casts
61001         * lib/regcomp.c (build_charclass, build_charclass_op):
61002         Use char *, not unsigned char *, for class name and extra.
61003         The char values are always nonnegative so there's no need to
61004         insist on unsigned char * here, and using char * removes the need
61005         for casts.  Reported by Aharon Robbins in
61006         <http://sourceware.org/ml/libc-alpha/2012-12/msg00456.html>.
61008         regex: support Gawk, which never uses alloca
61009         * lib/regex_internal.h [!_LIBC && !HAVE_ALLOCA]:
61010         Do not include in this case.  Gawk doesn't supply a substitute
61011         alloca.h and doesn't need one.
61013         regex: port __libc_lock_define usage to C89
61014         * lib/regex_internal.h (__libc_lock_define) [!_LIBC]: Remove.
61015         (struct re_dfa_t): Use #ifdef instead.  '__libc_lock_define (, lock)'
61016         does not conform to C89, as it has an empty macro argument.
61017         Reported by Aharon Robbins in
61018         <http://sourceware.org/ml/libc-alpha/2012-12/msg00456.html>.
61020 2013-01-01  Eric Blake  <eblake@redhat.com>
61022         maint: update all copyright year number ranges
61023         Run "make update-copyright".
61025         version-etc: bump copyright year reported in --version
61026         * lib/version-etc.c (COPYRIGHT_YEAR): Update to 2013.
61028 2012-12-31  Eric Blake  <eblake@redhat.com>
61030         sigprocmask-tests: skip test if pid is unexpectedly large
61031         * tests/test-sigprocmask.c (main): Add range check.
61033         git-version-gen: avoid test -z portability glitch
61034         * build-aux/git-version-gen: Prefer portable test spelling, since
61035         git-version-gen is run on more than just developer machines.
61037 2012-12-31  Peter Rosin  <peda@lysator.liu.se>  (tiny change)
61039         git-version-gen: add --fallback option to use if git is not present
61040         * build-aux/git-version-gen: Add support for the new option --fallback,
61041         which comes into play when there is no $tarball_version_file and
61042         git is not working.
61043         (scriptversion): Update.
61045         maint.mk: handle missing git with more grace
61046         * top/maint.mk (no-submodule-changes, public-submodule-commit):
61047         Quietly proceed if git is not present.
61049 2012-12-31  Eric Blake  <eblake@redhat.com>
61051         dup2: work around cygwin bug
61052         * m4/dup2.m4 (gl_FUNC_DUP2): Flush out cygwin core dump.
61053         * lib/dup2.c (rpl_dup2): Work around it.
61054         * doc/posix-functions/dup2.texi (dup2): Document it.
61056 2012-12-30  Paul Eggert  <eggert@cs.ucla.edu>
61058         regex: remove unnecessary dependency on localcharset.h
61059         * lib/regex_internal.h [!_LIBC]: Don't include localcharset.h;
61060         hasn't been needed for years.
61061         * modules/regex (Depends-on): Remove localcharset.
61063         regex: revert single-byte change
61064         * lib/regexec.c (check_node_accept_bytes): Revert previous change
61065         to this function.  This was alredy fixed in a different way, at
61066         bdb56bacd57070eced9998569ffe3f3c37ef5964 in the glibc git; see
61067         <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=510219> and
61068         <http://sourceware.org/bugzilla/show_bug.cgi?id=9697>.
61070         regex: simplify based on Gawk version
61071         * lib/regex_internal.c (re_dfa_add_node): Simplify.
61072         Reported by Aharon Robbins in
61073         <http://sourceware.org/ml/libc-alpha/2012-12/msg00456.html>.
61075 2012-12-29  Paul Eggert  <eggert@cs.ucla.edu>
61077         regex: check that pattern char is single-byte
61078         Reported by Aharon Robbins in
61079         <http://sourceware.org/ml/libc-alpha/2012-12/msg00456.html>.
61080         * lib/regexec.c (check_node_accept_bytes):
61081         Return 0 if the pattern string has a multibyte character here.
61083         regex: implement rational ranges
61084         Reported by Aharon Robbins in
61085         <http://sourceware.org/ml/libc-alpha/2012-12/msg00456.html>.
61086         * lib/regcomp.c (build_range_exp) [!_LIBC]:
61087         * lib/regexec.c (check_node_accept_bytes) [!_LIBC]:
61088         Implement rational ranges.
61090         regex: avoid redefining __wctype
61091         Reported by Aharon Robbins in
61092         <http://sourceware.org/ml/libc-alpha/2012-12/msg00456.html>.
61093         * lib/regex_internal.h (__wctype, __iswctype) [!_LIBC]:
61094         #undef before defining.
61096         regex: port to hosts where malloc (0) == NULL
61097         Reported by Aharon Robbins in
61098         <http://sourceware.org/ml/libc-alpha/2012-12/msg00456.html>.
61099         * lib/regex_internal.c (re_node_set_alloc):
61100         Don't assume that malloc (0) yields nonnull.
61101         * lib/regex_internal.h (MALLOC_0_IS_NONNULL): New macro.
61102         * m4/regex.m4 (gl_PREREQ_REGEX): Require gl_EEMALLOC.
61103         * modules/regex (Files): Add m4/eealloc.m4.
61105         regex: port to C89
61106         Reported by Aharon Robbins in
61107         <http://sourceware.org/ml/libc-alpha/2012-12/msg00456.html>.
61108         * lib/regcomp.c (init_word_char): Declaration before statement.
61110         regex: merge glibc changes
61111         Also, copy the license wording from glibc.  This simplifies
61112         merging changes.  gnulib-tool will change the wording to GPL as
61113         appropriate, when importing it to other packages.  The only
61114         glibc change made since the last merge, which needs merging, is:
61115         2012-05-24 Andreas Schwab <schwab@linux-m68k.org>
61116         * lib/regex_internal.h (gettext): Remove use of INTUSE.
61118         * users.txt: Add Emacs.
61120         doc: omit mention of version when not needed
61121         * doc/gnulib-intro.texi (Portability and Application Code):
61122         * doc/gnulib.texi (Brief Overview, Legacy Function Substitutes):
61123         Don't mention particular dates or versions when not necessary, so
61124         that the documentation won't go out of date so quickly.
61126         * doc/intprops.texi (Integer Properties): Fix Texinfo typo.
61128 2012-12-28  Akim Demaille  <akim@lrde.epita.fr>
61130         bootstrap: pass --force to autoreconf.
61131         * build-aux/bootstrap (AUTORECONFFLAGS): New.
61132         Add "--force" so that Automake's ylwrap and other such tools
61133         be updated at each bootstrap invocation.
61134         Use it.
61136 2012-12-27  Paul Eggert  <eggert@cs.ucla.edu>
61138         argp: fix port of port new 'inline' approach to Sun C 5.12 + Solaris 10
61139         The earlier patch forgot to update one of the #if conditions, causing
61140         a problem on Debian testing i386 reported by Mats Erik Andersson
61141         <http://lists.gnu.org/r/bug-gnulib/2012-12/msg00124.html>.
61142         * lib/argp-fmtstream.h (__argp_fmtstream_putc, argp_fmtstream_putc)
61143         (__argp_fmtstream_puts, argp_fmtstream_puts)
61144         (__argp_fmtstream_write, argp_fmtstream_write)
61145         [!_LIBC && !__OPTIMIZE__]: Declare as ARGP_FS_EI, not as extern.
61147         * doc/gnulib-readme.texi: Minor fixups.
61148         (Portability guidelines): Modernize URLs.  Remove some repetition.
61149         (Indent with spaces not TABs): Reword to avoid too-long lines.
61150         Remove some '@ifset standalone' stuff that isn't used.
61152         * doc/gnulib-readme.texi (Portability guidelines):
61153         ctype.h, not ctime.h.
61155         Correct name of POSIX.1-2001.
61156         * doc/posix-functions/fgetc.texi (fgetc):
61157         * doc/posix-functions/fgets.texi (fgets):
61158         * doc/posix-functions/fread.texi (fread):
61159         * doc/posix-functions/fscanf.texi (fscanf):
61160         * doc/posix-functions/getc.texi (getc):
61161         * doc/posix-functions/getchar.texi (getchar):
61162         * doc/posix-functions/scanf.texi (scanf):
61163         POSIX.1-2001, not POSIX-2001.
61165         doc: move README into manual
61166         * README: Move contents to new file doc/gnulib-readme.texi.
61167         Replace with a one-line summary.
61168         * doc/gnulib.texi (Brief Overview): New section,
61169         with old intro preface.  Include gnulib-readme.texi for contents.
61170         (Philosophy): Rename from "Introduction", since this
61171         section no longer introduces the rest.  Write a new preface.
61172         * doc/gnulib-readme.texi: New file, with the old contents of
61173         README texinfo-ized.  This way, the README info appears
61174         in the online and printed manual.
61176 2012-12-25  Ben Pfaff  <blp@cs.stanford.edu>
61178         c-xvasprintf: Fix "implicit declaration of function" GCC warning.
61179         * lib/c-xvasprintf.c: Add missing #include "c-vasprintf.h", for
61180         c_vasprintf() prototype.
61182 2012-12-24  Ben Pfaff  <blp@cs.stanford.edu>
61184         c-vasprintf: Fix "empty declaration" warning reported by GCC.
61185         * lib/c-vasprintf.h: Remove stray semicolon.
61187 2012-12-23  Paul Eggert  <eggert@cs.ucla.edu>
61189         gettext: avoid obsolete macro AM_PROG_MKDIR_P
61190         It is obsolete and is planned to be removed from Automake 1.14; see
61191         <http://lists.gnu.org/r/automake/2012-12/msg00029.html>.
61192         * build-aux/po/Makefile.in.in (install-data, install-data-yes)
61193         (installdirs-data, installdirs-data-yes):
61194         Use $(MKDIR_P), not $(mkdir_p).
61195         * m4/intl.m4 (AM_INTL_SUBDIR):
61196         * m4/po.m4 (AM_PO_SUBDIRS):
61197         Require AC_PROG_MKDIR_P, not AM_PROG_MKDIR_P.
61199 2012-12-22  Paul Eggert  <eggert@cs.ucla.edu>
61201         argp: port new 'inline' approach to Sun C 5.12 + Solaris 10
61202         On this platform, we are not optimizing but we are using
61203         the substitute for extern inlines, so compile as if
61204         C99-style extern inline, or a substitute, is available.
61205         * lib/argp-fmtstream.h (argp_fmtstream_set_lmargin)
61206         (__argp_fmtstream_set_lmargin, argp_fmtstream_set_rmargin)
61207         (__argp_fmtstream_set_rmargin, argp_fmtstream_set_wmargin)
61208         (__argp_fmtstream_set_wmargin, argp_fmtstream_point)
61209         (__argp_fmtstream_point) [!_LIBC && !__OPTIMIZE__]:
61210         Declare as ARGP_FS_EI, not as extern.
61211         * lib/argp.h (argp_usage, __argp_usage, _option_is_short)
61212         (__option_is_short, _option_is_end, __option_is_end)
61213         [!_LIBC && __USE_EXTERN_INLINES]:
61214         Declare as ARGP_EI, not as extern.
61216 2012-12-21  Paul Eggert  <eggert@cs.ucla.edu>
61218         AC_PROG_MKDIR_P: port workaround to pre-2.62 Autoconf
61219         * m4/gnulib-common.m4 (AC_PROG_MKDIR_P, AC_C_RESTRICT):
61220         Use m4_ifndef([AC_AUTOCONF_VERSION], ...), not
61221         m4_if(m4_version_compare(m4_defn([AC_AUTOCONF_VERSION]),[2.62]),[-1],
61222         ...), as the latter is fatal with older Autoconfs.
61223         Problem reported and fix suggested by Eric Blake in thread starting at
61224         <http://lists.gnu.org/r/bug-gnulib/2012-12/msg00097.html>.
61226 2012-12-20  Paul Eggert  <eggert@cs.ucla.edu>
61228         AC_PROG_MKDIR_P: don't workaround if not buggy
61229         * m4/gnulib-common.m4 (AC_PROG_MKDIR_P):
61230         Define only for Autoconf versions before 2.62.
61231         (AC_C_RESTRICT): Use documented AC_AUTOCONF_VERSION, not
61232         undocumented m4_PACKAGE_VERSION, for consistency with the
61233         abovementioned change to AC_PROG_MKDIR_P.  This should suffice
61234         since we're checking for 2.62 or later, and AC_AUTOCONF_VERSION
61235         was introduced in 2.62.
61237 2012-12-15  Ben Pfaff  <blp@cs.stanford.edu>
61239         New 'c-*printf' modules for formatted output in C locale.
61241         New module 'c-vasnprintf'.
61242         * modules/c-vasnprintf: New file.
61243         * lib/c-vasnprintf.c: New file.
61244         * lib/c-vasnprintf.h: New file.
61246         New module 'c-snprintf'.
61247         * modules/c-snprintf: New file.
61248         * modules/c-snprintf-tests: New file.
61249         * lib/c-snprintf.c: New file.
61250         * lib/c-snprintf.h: New file.
61251         * tests/test-c-snprintf.c: New file.
61252         * tests/test-c-snprintf.sh: New file.
61254         New module 'c-vsnprintf'.
61255         * modules/c-vsnprintf: New file.
61256         * modules/c-vsnprintf-tests: New file.
61257         * lib/c-vsnprintf.c: New file.
61258         * lib/c-vsnprintf.h: New file.
61259         * tests/test-c-vsnprintf.c: New file.
61260         * tests/test-c-vsnprintf.sh: New file.
61262         New module 'c-vasprintf'.
61263         * modules/c-vasprintf: New file.
61264         * modules/c-vasprintf-tests: New file.
61265         * lib/c-asprintf.c: New file.
61266         * lib/c-vasprintf.c: New file.
61267         * lib/c-vasprintf.h: New file.
61268         * tests/test-c-vasprintf.c  +: New file.
61269         * tests/test-c-vasprintf.sh: New file.
61271         New module 'c-xvasprintf'.
61272         * modules/c-xvasprintf: New file.
61273         * modules/c-xvasprintf-tests: New file.
61274         * lib/c-xasprintf.c: New file.
61275         * lib/c-xvasprintf.c: New file.
61276         * lib/c-xvasprintf.h: New file.
61277         * tests/test-c-xvasprintf.c: New file.
61278         * tests/test-c-xvasprintf.sh: New file.
61280 2012-12-18  Paul Eggert  <eggert@cs.ucla.edu>
61282         argp: better 'inline'
61283         Use extern-inline module to declare extern inline functions.
61284         This avoids some bogus warning diagnostics.  Problem discovered
61285         when modifying GNU tar to use the manywarnings module.
61286         * lib/argp.h, lib/argp-xinl.c (ARGP_EI) [!_LIBC]:
61287         * lib/argp-fmtstream.h, lib/argp-fs-xinl.c (ARGP_FS_EI) [!_LIBC]:
61288         Define based on extern-inline.
61289         * modules/argp (Depends-on): Add extern-inline.
61291 2012-12-17  Paul Eggert  <eggert@cs.ucla.edu>
61293         filemode, sys_stat: Handle MPX files a la AIX.
61294         * lib/filemode.c (ftypelet): Report 'm' for MPX files.
61295         * lib/sys_stat.in.h (S_ISMPX): New macro.
61296         * tests/test-sys_stat.c: Add tests for MPX files.
61298 2012-12-16  Alexandre Duret-Lutz  <adl@lrde.epita.fr>
61300         x-to-1: honor $PERL
61301         * build-aux/x-to-1.in: Run $HELP2MAN via $PERL so that the user gets
61302         a chance to use his preferred version of Perl.  This is typically
61303         required by Darwin users whose default /usr/bin/perl does not have all
61304         the libraries required by help2man, and who need to use their MacPorts
61305         installation of Perl instead.
61307 2012-12-16  Akim Demaille  <akim@lrde.epita.fr>
61309         gnu-web-doc-update: add all the new files, even in new directories
61310         See http://lists.gnu.org/r/bug-gnulib/2012-12/msg00057.html
61311         * build-aux/gnu-web-doc-update (--dry-run, $dryrun): New.
61312         Use it.
61313         (main): Don't use cvsutils to get the list of unknown files,
61314         just add all the existing files and directories.
61316 2012-12-16  Akim Demaille  <akim@lrde.epita.fr>
61318         gnu-web-doc-update: improve --help
61319         * build-aux/gnu-web-doc-update: Move comments into --help.
61321 2012-12-07  Eric Wong  <normalperson@yhbt.net>
61323         mountlist: recognize more "dummy" file systems
61324         * lib/mountlist.c (ME_DUMMY_0):
61325         Add these dummy FS names to the list:
61326         - "debugfs" virtual filesystem for kernel debugging
61327         - "devpts" PTY slave filesystem
61328         - "devtmpfs" device filesystem on top of tmpfs/ramfs
61329         - "fusectl" control filesystem for FUSE
61330         - "mqueue" enumerates POSIX message queues
61331         - "rpc_pipefs" kernel <-> userspace bridge for NFS
61332         - "sysfs" is for exporting kernel objects
61333         - "devfs" device filesystem for Linux 2.4 and FreeBSD
61335 2012-12-11  Paul Eggert  <eggert@cs.ucla.edu>
61337         extern-inline: avoid incompatibility with Darwin Libc
61338         * m4/extern-inline.m4 (_GL_INLINE, _GL_EXTERN_INLINE): Do not use
61339         extern inline if __APPLE__.  Use _GL_UNUSED in the non-inline branch.
61340         Problem reported by Akim Demaille in
61341         <http://lists.gnu.org/r/bug-gnulib/2012-12/msg00023.html>.
61343 2012-12-11  Simon Josefsson  <simon@josefsson.org>
61345         gnupload: Work with GnuPG using gpg-agent (for smartcards).
61346         * build-aux/gnupload: If GnuPG is configured to use gpg-agent,
61347         let it handle password prompting.
61349 2012-12-10  Eli Zaretskii  <eliz@gnu.org>
61351         canonicalize, canonicalize-lgpl: Microsoft Windows prefix fixes
61352         * lib/canonicalize.c (canonicalize_filename_mode):
61353         * lib/canonicalize-lgpl.c (__realpath): Recompute prefix_len after
61354         fetching the current directory.  Don't overrun the beginning of
61355         rpath if there's no slashes after the MS-Windows drive letter.
61357 2012-12-08  Stefano Lattarini  <stefano.lattarini@gmail.com>
61359         maint.mk: avoid extra forks
61360         * top/maint.mk (_cfg_mk): The GNU make manual documents that
61361         "$(wildcard FILE)" expands to empty if FILE doesn't exist.
61362         So use that instead of "$(shell test -f FILE && echo FILE)".
61364 2012-12-07  Paul Eggert  <eggert@cs.ucla.edu>
61366         vasnprintf: fix ASCII_ONLY typo
61367         * lib/unistdio/u8-vasnprintf.c (FCHAR_T_ONLY_ASCII):
61368         * lib/unistdio/u16-vasnprintf.c (FCHAR_T_ONLY_ASCII):
61369         * lib/unistdio/u32-vasnprintf.c (FCHAR_T_ONLY_ASCII):
61370         New macro, replacing ASCII_ONLY.  This fixes a typo.  See thread at
61371         <http://lists.gnu.org/r/bug-gnulib/2012-12/msg00021.html>.
61373 2012-12-05  Paul Eggert  <eggert@cs.ucla.edu>
61375         list, oset, xlist, xoset: fix extern inline issue with C99
61376         This was introduced by my recent changes for 'inline'.
61377         Problem reported for gettext by Daiki Ueno in
61378         <http://lists.gnu.org/r/bug-gnulib/2012-12/msg00000.html>.
61379         * lib/gl_list.h (gl_list_nx_create_empty, gl_list_create)
61380         (gl_list_nx_create, gl_list_size, gl_list_node_value)
61381         (gl_list_node_set_value, gl_list_node_nx_set_value, gl_list_next_node)
61382         (gl_list_previous_node, gl_list_get_at)
61383         (gl_list_nx_set_at, gl_list_search, gl_list_search_from)
61384         (gl_list_search_from_to, gl_list_indexof, gl_list_indexof_from)
61385         (gl_list_indexof_from_to, gl_list_nx_add_first, gl_list_nx_add_last)
61386         (gl_list_nx_add_before, gl_list_nx_add_after, gl_list_nx_add_at)
61387         (gl_list_remove_node, gl_list_remove_at, gl_list_remove, gl_list_free)
61388         (gl_list_iterator, gl_list_iterator_from_to, gl_list_iterator_next)
61389         (gl_list_iterator_free, gl_sortedlist_search)
61390         (gl_sortedlist_search_from_to, gl_sortedlist_indexof)
61391         (gl_sortedlist_indexof_from_to, gl_sortedlist_add, gl_sortedlist_nx_add)
61392         (gl_sortedlist_remove):
61393         * lib/gl_oset.h (go_oset_nx_create_empty, gl_oset_size, gl_oset_search)
61394         (gl_oset_search_atleast, gl_oset_nx_add, gl_oset_remove, gl_oset_free)
61395         (gl_oset_iterator, gl_oset_iterator_next, gl_oset_iterator_free):
61396         * lib/gl_xlist.h (gl_list_create_empty, gl_list_create)
61397         (gl_list_node_set_value, gl_list_set_at, gl_list_add_first)
61398         (gl_list_add_last, gl_list_add_before, gl_list_add_after)
61399         (gl_list_add_at, gl_sortedlist_add):
61400         * lib/gl_xoset.h (gl_oset_create_empty, gl_oset_add):
61401         Wrap these extern decls inside "#if 0", because they are implemented
61402         as inline functions, and extern inline is not what's wanted here.
61403         It would simplify these .h files to remove the extern decls entirely,
61404         although a downside would be less-clear separation between
61405         specification and implementation.
61407 2012-11-29  Paul Eggert  <eggert@cs.ucla.edu>
61409         sys_stat: no 'static inline'
61410         * lib/sys_stat.in.h (rpl_mkdir): Now static, not static inline.
61411         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Do not require AC_C_INLINE.
61413         extern-inline: no 'static inline'
61414         * m4/extern-inline.m4 (gl_EXTERN_INLINE):
61415         Do not require AC_C_INLINE.
61416         (_GL_INLINE, _GL_EXTERN_INLINE): Define as 'static', not as
61417         'static inline', for older compilers.
61419         snippet/warn-on-use: no 'static inline'
61420         * build-aux/snippet/warn-on-use.h:
61421         Remove unnecessary 'inline' in comment.
61423         rbtree-list, rbtreehash-list: no 'static inline'
61424         * lib/gl_anyrbtree_list2.h (rotate_left, rotate_right):
61425         * lib/gl_anytree_list2.h (node_at):
61426         * lib/gl_anytreehash_list1.h (hash_resize_after_add)
61427         (gl_oset_first, add_nodes_to_buckets):
61428         Now static, not static inline.
61430         regex: no 'static inline'
61431         * lib/regex_internal.c (calc_state_hash):
61432         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain)
61433         (bitset_empty, bitset_set_all, bitset_copy, bitset_not, bitset_merge)
61434         (bitset_mask, re_string_char_size_at, re_string_wchar_at):
61435         Now static, not static inline.
61436         (inline) [__GNUC__ < 3 && _LIBC]:
61437         Remove macro; no longer needed.
61439         xvasprintf: no 'static inline'
61440         * lib/xvasprintf.c (xstrcat):
61441         Now static, not static inline.
61442         * m4/xvasprintf.m4 (gl_XVASPRINTF):
61443         Do not require AC_C_INLINE.
61445         parse-datetime, parse-duration: no 'static inline'
61446         * lib/parse-datetime.y (to_uchar):
61447         * lib/parse-duration.c (str_const_to_ul, str_const_to_l)
61448         (scale_n_add):
61449         Now static, not static inline.
61450         * m4/parse-datetime.m4 (gl_PARSE_DATETIME):
61451         * modules/parse-duration (configure.ac):
61452         Do not require AC_C_INLINE.
61454         getaddrinfo: no 'static inline'
61455         * lib/getaddrinfo.c (validate_family):
61456         Now static, not static inline.
61457         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO):
61458         Do not require AC_C_INLINE.
61460         ftruncate, fts, lstat, openat, raise: no 'static inline'
61461         * lib/ftruncate.c (chsize_nothrow):
61462         * lib/fts.c (opendirat, diropen):
61463         * lib/lstat.c (orig_lstat):
61464         * lib/openat.c (orig_openat):
61465         * lib/raise.c (raise_nothrow):
61466         Now static, not static inline.
61467         * m4/ftruncate.m4 (gl_PREREQ_FTRUNCATE):
61468         * m4/fts.m4 (gl_FUNC_FTS_CORE):
61469         * m4/lstat.m4 (gl_PREREQ_LSTAT):
61470         * m4/openat.m4 (gl_PREREQ_OPENAT):
61471         * m4/raise.m4 (gl_PREREQ_RAISE):
61472         Do not require AC_C_INLINE.
61474         fflush, stat: no 'static inline'
61475         * lib/fflush.c (clear_ungetc_buffer_preserving_position)
61476         (clear_ungetc_buffer, disable_seek_optimization)
61477         (restore_seek_optimization, update_fpos_cache):
61478         * lib/stat.c (orig_stat):
61479         Now static, not static inline.
61480         * lib/fflush.c (disable_seek_optimization, restore_seek_optimization)
61481         (update_fpos_cache):
61482         Define only if ! (defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1).
61483         * m4/fflush.m4 (gl_PREREQ_FFLUSH):
61484         * m4/stat.m4 (gl_PREREQ_STAT):
61485         Do not require AC_C_INLINE.
61487         error, filevercmp: no 'static inline'
61488         * lib/error.c (is_open, flush_stdout):
61489         * lib/filevercmp.c (order):
61490         Now static, not static inline.
61491         * m4/error.m4 (gl_PREREQ_ERROR):
61492         * modules/filevercmp (configure.ac):
61493         Do not require AC_C_INLINE.
61495         dup, execute, fatal-signal, etc.: no 'static inline'
61496         * lib/dup.c (dup_nothrow):
61497         * lib/execute.c (nonintr_close, nonintr_open):
61498         * lib/fatal-signal.c (uninstall_handlers, install_handlers):
61499         * lib/fopen.c (orig_fopen):
61500         * lib/freadseek.c (freadptrinc):
61501         * lib/freopen.c (orig_freopen):
61502         * lib/fstat.c (orig_fstat, fstat_nothrow):
61503         * lib/get-rusage-as.c (get_rusage_as_via_setrlimit)
61504         (get_rusage_as_via_iterator):
61505         * lib/get-rusage-data.c (get_rusage_data_via_setrlimit):
61506         * lib/getdtablesize.c (_setmaxstdio_nothrow):
61507         * lib/isatty.c (_isatty_nothrow):
61508         * lib/open.c (orig_open):
61509         * lib/read.c (read_nothrow):
61510         * lib/sigprocmask.c (signal_nothrow):
61511         * lib/spawn-pipe.c (nonintr_close, nonintr_open):
61512         * lib/vasnprintf.c (MAX_ROOM_NEEDED):
61513         * lib/wait-process.c (unregister_slave_subprocess):
61514         * lib/write.c (write_nothrow):
61515         Now static, not static inline.
61516         * lib/spawn-pipe.c (nonintr_open): Define only if
61517         (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__.
61518         * m4/dup.m4 (gl_PREREQ_DUP):
61519         * m4/execute.m4 (gl_EXECUTE):
61520         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL):
61521         * m4/fopen.m4 (gl_PREREQ_FOPEN):
61522         * m4/freadseek.m4 (gl_FUNC_FREADSEEK):
61523         * m4/freopen.m4 (gl_PREREQ_FREOPEN):
61524         * m4/fstat.m4 (gl_PREREQ_FSTAT):
61525         * m4/getdtablesize.m4 (gl_PREREQ_GETDTABLESIZE):
61526         * m4/isatty.m4 (gl_PREREQ_ISATTY):
61527         * m4/open.m4 (gl_PREREQ_OPEN):
61528         * m4/read.m4 (gl_PREREQ_READ):
61529         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK):
61530         * m4/spawn-pipe.m4 (gl_SPAWN_PIPE):
61531         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF):
61532         * m4/wait-process.m4 (gl_WAIT_PROCESS):
61533         * m4/write.m4 (gl_PREREQ_WRITE):
61534         * modules/get-rusage-as, modules/get-rusage-data (configure.ac):
61535         Do not require AC_C_INLINE.
61537         c-strtod, memcoll, readutmp: no 'static inline'
61538         * lib/c-strtod.c (c_locale):
61539         * lib/memcoll.c (strcoll_loop):
61540         * lib/readutmp.c (desirable_utmp_entry):
61541         Now static, not static inline.
61542         * m4/c-strtod.m4 (gl_C_STRTOD, gl_C_STRTOLD):
61543         * m4/memcoll.m4 (gl_MEMCOLL):
61544         * m4/readutmp.m4 (gl_READUTMP):
61545         Do not require AC_C_INLINE.
61547         arctwo, md4, md5, sha1, sha256, sha512: no 'static inline'
61548         * lib/arctwo.c (to_uchar):
61549         * lib/md4.c (set_uint32):
61550         * lib/md5.c (set_uint32):
61551         * lib/sha1.c (set_uint32):
61552         * lib/sha256.c (set_uint32):
61553         * lib/sha512.c (set_uint64):
61554         Now static, not static inline.  This is a bit simpler, and doesn't
61555         affect performance with GCC and default optimization.
61556         * m4/arctwo.m4 (gl_ARCTWO):
61557         * m4/md4.m4 (gl_MD4):
61558         * m4/md5.m4 (gl_MD5):
61559         * m4/sha1.m4 (gl_SHA1):
61560         * m4/sha256.m4 (gl_SHA256):
61561         * m4/sha512.m4 (gl_SHA512):
61562         Do not require AC_C_INLINE.
61564         cond, lock, thread: better 'inline'
61565         * lib/glthread/cond.c, lib/glthread/cond.h (_GLTHREAD_COND_INLINE):
61566         * lib/glthread/thread.c, lib/glthread/thread.h (_GLTHREAD_THREAD_INLINE):
61567         New macros.  Use them instead of static inline, for header functions.
61568         * lib/glthread/cond.c (gl_waitqueue_init, gl_waitqueue_remove)
61569         (gl_waitqueue_notify_first, gl_waitqueue_notify_all):
61570         * lib/glthread/lock.c (gl_waitqueue_init)
61571         (gl_waitqueue_notify_first, gl_waitqueue_notify_all):
61572         * lib/glthread/thread.c (get_current_thread_handle):
61573         Change 'static inline' to 'inline'.
61574         * lib/glthread/cond.h, lib/glthread/thread.h:
61575         Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
61576         * m4/cond.m4 (gl_COND):
61577         * m4/lock.m4 (gl_PREREQ_LOCK):
61578         * m4/thread.m4 (gl_THREAD):
61579         Do not require AC_C_INLINE.
61580         * modules/cond, modules/thread (Depends-on): Add extern-inline.
61582         chdir-long, cycle-check, savewd: better 'inline'
61583         * lib/chdir-long.c (cdb_init, cdb_fchdir, cdb_free)
61584         (find_non_slash):
61585         * lib/cycle-check.c (is_zero_or_power_of_two):
61586         * lib/savewd.c (savewd_delegating):
61587         Change 'static inline' to 'inline'.
61588         * lib/savewd.c, lib/savewd.h (SAVEWD_INLINE): New macro.
61589         Replace all remaining uses of 'static inline' with it.
61590         * lib/savewd.h:
61591         Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
61592         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG):
61593         * m4/cycle-check.m4 (gl_CYCLE_CHECK):
61594         * m4/savewd.m4 (gl_SAVEWD):
61595         Do not require AC_C_INLINE.
61596         * modules/savewd (Depends-on): Add extern-inline.
61598         base32, base64: no need for 'inline'
61599         * lib/base32.c (to_uchar, get_8, decode_8):
61600         * lib/base64.c (to_uchar, get_4, decode_4):
61601         Change 'static inline' to 'inline'.
61602         * m4/base32.m4 (gl_PREREQ_BASE32):
61603         * m4/base64.m4 (gl_PREREQ_BASE64):
61604         Do not require AC_C_INLINE.
61606         array-oset, linkedhash-list, rbtree-oset: no need for 'inline'
61607         * lib/gl_array_oset.c (gl_array_nx_add_at):
61608         (gl_array_remove_at):
61609         * lib/gl_linkedhash_list.c (hash_resize_after_add)
61610         (add_to_bucket, remove_from_bucket):
61611         * lib/gl_rbtree_oset.c (rotate_left, rotate_right):
61612         Change 'static inline' to 'static', as it's simpler to omit
61613         'inline' unless there's a significant performance advantage.
61615         list, oset, xlist, xoset, xsublist: simplify via extern inline
61616         * lib/gl_list.h, lib/gl_list.c (GL_LIST_INLINE):
61617         * lib/gl_oset.c, lib/gl_oset.h (GL_OSET_INLINE):
61618         * lib/gl_xlist.c, lib/gl_xlist.h (GL_XLIST_INLINE):
61619         * lib/gl_xoset.c, lib/gl_xoset.h (GL_XOSET_INLINE):
61620         * lib/gl_xsublist.c, lib/gl_xsublist.h (GL_XSUBLIST_INLINE):
61621         New macro.  Replace all uses of 'static inline' with it.
61622         [HAVE_INLINE]: Implement functions as *_INLINE functions,
61623         instead of as macros FOO that are defined to static inline
61624         functions FOO_inline.
61625         * lib/gl_list.c, lib/gl_oset.c, lib/gl_xlist.c, lib/gl_xoset.c:
61626         * lib/gl_xsublist.c:
61627         Reimplement from scratch, by defining the corresponding *_INLINE
61628         macro and including the corresponding .h file.  This is simpler.
61629         * modules/list, modules/oset, modules/xlist, modules/xoset:
61630         (Files): Remove m4/gl_list.m4.
61631         (configure.ac): Remove gl_LIST.
61632         * m4/gl_list.m4: Remove.
61633         * modules/list, modules/oset, modules/xlist, modules/xoset:
61634         * modules/xsublist:
61635         (Depends-on): Depend on extern-inline, not inline.
61637         xalloc: better 'inline'
61638         * lib/xmalloc.c, lib/xalloc.h (XALLOC_INLINE):
61639         New macro.  Replace all uses of 'static inline' with it.
61640         (static_inline): Remove.
61641         * lib/xalloc.h (xnmalloc, xnrealloc, x2nrealloc, xcharalloc):
61642         Let 'extern inline' do the work automatically, instead of doing
61643         it by hand.
61644         * m4/xalloc.m4 (gl_PREREQ_XALLOC, gl_PREREQ_XMALLOC):
61645         Remove.  All uses removed.
61646         * modules/xalloc (Depends-on): Remove 'inline'.  Add 'extern-inline'.
61648         gethrxtime: better 'inline'
61649         * lib/xtime.c: New file.
61650         * lib/gethrxtime.c, lib/gethrxtime.h (GETHRXTIME_INLINE):
61651         * lib/xtime.h (XTIME_INCLUDE):
61652         New macros.  Replace all uses of 'static inline' with them.
61653         * lib/gethrxtime.c (gethrxtime): Define only if
61654         ! (HAVE_ARITHMETIC_HRTIME_T && HAVE_DECL_GETHRTIME), since
61655         this source file is now always compiled, because of the extern inline.
61656         * lib/gethrxtime.h, lib/xtime.h:
61657         Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
61658         * m4/gethrxtime.m4 (gl_GETHRXTIME): Do not check for clock macros
61659         if gethrtime works, as they're not needed in that case.
61660         (gl_XTIME): Do not require AC_C_INLINE.
61661         (gl_PREREQ_GETHRXTIME): Remove; all uses removed, as it's always
61662         compiled now.  Move the check into gl_GETHRXTIME.
61663         * modules/gethrxtime (Files, lib_SOURCES): Add lib/xtime.c.
61664         (Depends-on): Add extern-inline.
61665         (configure.ac): gethrxtime is always compiled now.
61666         (lib_SOURCES): Add gethrxtime.c.
61668         wctype-h: better 'inline'
61669         * lib/wctype-h.c: New file.
61670         * lib/wctype.in.h (_GL_WCTYPE_INLINE):
61671         New macro.  Replace all uses of 'static inline' with it.
61672         Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
61673         * m4/wctype_h.m4 (gl_WCTYPE_H): Do not require AC_C_INLINE.
61674         * modules/wctype-h (Files, lib_SOURCES): Add lib/wctype-h.c.
61675         (Depends-on): Add extern-inline.
61677         unistd: better 'inline'
61678         * lib/unistd.c: New file.
61679         * lib/unistd.in.h (_GL_UNISTD_INLINE):
61680         New macro.  Replace all uses of 'static inline' with it.
61681         Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
61682         * m4/unistd_h.m4 (gl_UNISTD_H): Do not require AC_C_INLINE.
61683         * modules/unistd (Files, lib_SOURCES): Add lib/unistd.c.
61684         (Depends-on): Add extern-inline.
61686         sys_socket: better 'inline'
61687         * lib/sys_socket.c: New file.
61688         * lib/sys_socket.in.h (_GL_SYS_SOCKET_INLINE):
61689         New macro.  Replace all uses of 'static inline' with it.
61690         Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
61691         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Do not require AC_C_INLINE.
61692         * modules/sys_socket (Files, lib_SOURCES): Add lib/sys_socket.c.
61693         (Depends-on): Add extern-inline.
61695         stdio: better 'inline'
61696         * lib/stdio.c: New file.
61697         * lib/stdio.in.h (_GL_STDIO_INLINE):
61698         New macro.  Replace all uses of 'static inline' with it.
61699         Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
61700         * m4/stdio_h.m4 (gl_STDIO_H): Do not require AC_C_INLINE.
61701         * modules/stdio (Files, lib_SOURCES): Add lib/stdio.c.
61702         (Depends-on): Add extern-inline.
61704         sigaction: better 'inline'
61705         * lib/sig-handler.c: New file.
61706         * lib/sig-handler.h (SIG_HANDLER_INLINE):
61707         New macro.  Replace all uses of 'static inline' with it.
61708         Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
61709         * m4/sigaction.m4 (gl_PREREQ_SIG_HANDLER_H): Do not require AC_C_INLINE.
61710         * modules/sigaction (Files, lib_SOURCES): Add lib/sig-handler.c.
61711         (Depends-on): Add extern-inline.
61713         selinux-h: better 'inline'
61714         * lib/se-context.c, lib/se-selinux.c: New files.
61715         * lib/getfilecon.c (map_to_failure): Omit 'inline' for static function.
61716         * lib/se-context.in.h (SE_CONTEXT_INLINE):
61717         New macro.  Replace all uses of 'static inline' with it.
61718         Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
61719         * lib/se-selinux.in.h (SE_SELINUX_INLINE):
61720         New macro.  Replace all uses of 'static inline' with it.
61721         Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
61722         * modules/selinux-h (Files, lib_SOURCES):
61723         Add lib/se-context.c, lib/se-selinux.c.
61724         (Depends-on): Add extern-inline.
61725         (configure.ac): Do not require AC_C_INLINE.
61727         pthread: better 'inline'
61728         * lib/pthread.c: New file.
61729         * lib/pthread.in.h (_GL_PTHREAD_INLINE):
61730         New macro.  Replace all uses of 'static inline' with it.
61731         Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
61732         * m4/pthread.m4 (gl_PTHREAD_CHECK):
61733         Add AC_LIBOBJ([pthread]).  Do not require AC_C_INLINE.
61734         * modules/pthread (Files): Add lib/pthread.c.
61735         (Depends-on): Add extern-inline.
61737         math: better 'inline'
61738         * lib/math.c: New file.
61739         * lib/math.in.h (_GL_MATH_INLINE):
61740         New macro.  Replace all uses of 'static inline' with it.
61741         Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
61742         * m4/math_h.m4 (gl_MATH_H):
61743         Do not require AC_C_INLINE.
61744         * modules/math (Files, lib_SOURCES):
61745         Add lib/math.c.
61746         (Depends-on): Add extern-inline.
61748         count-one-bits: better 'inline'
61749         * lib/count-one-bits.c: New file.
61750         * lib/count-one-bits.h (COUNT_ONE_BITS_INLINE):
61751         New macro.  Replace all uses of 'static inline' with it.
61752         Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
61753         * m4/count-one-bits.m4 (gl_COUNT_ONE_BITS):
61754         Do not require AC_C_INLINE.
61755         * modules/count-one-bits (Files, lib_SOURCES):
61756         Add lib/count-one-bits.c.
61757         (Depends-on): Add extern-inline.
61759         count-leading-zeros: better 'inline'
61760         * lib/count-leading-zeros.c: New file.
61761         * lib/count-leading-zeros.h (COUNT_LEADING_ZEROS_INLINE):
61762         New macro.  Replace all uses of 'static inline' with it.
61763         Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
61764         * m4/count-leading-zeros.m4 (gl_COUNT_LEADING_ZEROS):
61765         Do not require AC_C_INLINE.
61766         * modules/count-leading-zeros (Files, lib_SOURCES):
61767         Add lib/count-leading-zeros.c.
61768         (Depends-on): Add extern-inline.
61770         bitrotate: better 'inline'
61771         * lib/bitrotate.c: New file.
61772         * lib/bitrotate.h (BITROTATE_INLINE):
61773         New macros.
61774         Replace all uses of 'static inline' with them.
61775         Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
61776         * modules/bitrotate (Files, lib_SOURCES): Add lib/bitrotate.c.
61777         (Depends-on): Add extern-inline.
61778         (configure.ac): Do not require AC_C_INLINE.
61780 2012-11-20  Theophile Ranquet  <ranquet@lrde.epita.fr>
61782         maint.mk: avoid gratuitous failure
61783         Reported by Stefano Lattarini in
61784         <http://lists.gnu.org/r/bug-bison/2012-11/msg00022.html>
61785         * top/maint.mk (public-submodule-commit): Quote more safely.
61787 2012-11-20  Eli Zaretskii  <eliz@gnu.org>
61789         canonicalize, canonicalize-lgpl: support MS-Windows file names
61790         See <http://lists.gnu.org/r/bug-gnulib/2012-11/msg00074.html>
61791         for test cases, which it'd be nice to add at some point.
61792         * lib/canonicalize.c, lib/canonicalize-lgpl.c: Include dosname.h.
61793         * lib/canonicalize.c (canonicalize_filename_mode):
61794         * lib/canonicalize-lgpl.c (__realpath):
61795         Use FILE_SYSTEM_PREFIX_LEN instead of assuming that the first
61796         slash is at the beginning of the file name.  Use ISSLASH, instead
61797         of a literal '/'.  Use IS_ABSOLUTE_FILE_NAME instead of comparing
61798         the first character with '/'.  Test for
61799         DOUBLE_SLASH_IS_DISTINCT_ROOT only if the file name does not begin
61800         with a drive letter.
61801         * lib/canonicalize.c (SLASHES): New macro.
61802         (canonicalize_filename_mode): Use SLASHES instead of a literal "/".
61804 2012-11-17  Dmitry V. Levin  <ldv@altlinux.org>
61806         fts: introduce FTS_VERBATIM
61807         * lib/fts_.h (FTS_VERBATIM): New bit flag.
61808         (FTS_OPTIONMASK, FTS_NAMEONLY, FTS_STOP): Adjust.
61809         * lib/fts.c (fts_open): Honor it.
61811 2012-11-09  Pádraig Brady  <P@draigBrady.com>
61813         getlogin-tests: allow errno == ENXIO
61814         * tests/test-getlogin.c (main): Skip tests if getlogin fails
61815         with errno == ENXIO (No controlling tty).
61816         getlogin_r-tests: Likewise. Also allow errno == ENOENT
61817         * tests/test-getlogin_r.c (main): Skip tests if getlogin_r fails
61818         with errno == ENOENT.  This was reported to happen in various
61819         situations on GNU/Linux.
61821 2012-11-09  Paul Eggert  <eggert@cs.ucla.edu>
61823         getlogin-tests: allow errno == ENOENT
61824         * tests/test-getlogin.c (main): Skip tests if getlogin fails
61825         with errno == ENOENT.  This happened to me on Ubuntu 12.04.1 x86,
61826         when running a test in an Emacs shell buffer.
61828 2012-11-08  Jim Meyering  <jim@meyering.net>
61830         tests/nap.h: avoid warning about unused variable
61831         * tests/nap.h (nap_works): Remove now-unused declaration of "result".
61833         prefix-gnulib-mk: avoid overzealous "lib/"-prefix addition
61834         * build-aux/prefix-gnulib-mk (prefix): Tighten a regexp to require
61835         white space before each of the special-cased file names, to avoid
61836         adding "lib/" after $(libdir)/.  Reported by Matias A. fonzo
61837         in http://bugs.gnu.org/12830.
61839 2012-11-08  Paul Eggert  <eggert@cs.ucla.edu>
61841         fcntl-h: default O_SEARCH, O_EXEC back to O_RDONLY
61842         O_PATH doesn't work with Linux kernel 3.6.5, as fchmod (fd, ...)
61843         fails with errno == EBADF when fd is opened with O_PATH.
61844         Reported by Jim Meyering in
61845         <http://lists.gnu.org/r/bug-gnulib/2012-11/msg00026.html>.
61846         * doc/posix-headers/fcntl.texi (fcntl.h): Document this.
61847         * lib/fcntl.in.h (O_EXEC, O_SEARCH) [O_PATH]: Default back to O_RDONLY.
61849 2012-11-07  Paul Eggert  <eggert@cs.ucla.edu>
61851         test-utimens: speed up by taking shorter naps
61852         * tests/nap.h (lt_mtime, get_mtime, nap_works, guess_delay):
61853         New functions.
61854         (nap): Use them, to do a better job of guessing the delay.
61855         On Fedora 17 with ext4 atop md atop hard disks, this made
61856         test-utimens run 10x faster, because the test napped for
61857         1 ms at a time rather than 20 ms.  Reported by Stefano Lattarini in
61858         <http://bugs.gnu.org/12820#11>.
61860 2012-11-07  Jim Meyering  <jim@meyering.net>
61862         mountlist.c: fix a compilation failure
61863         * lib/mountlist.c (read_file_system_list): Fix a compilation failure
61864         I introduced while transforming commit v0.0-7683-g613bcb6
61866 2012-11-05  Paul Eggert  <eggert@cs.ucla.edu>
61868         errno: port to LynxOS 178 2.2.2
61869         Problem reported by Joel Brobecker in
61870         <http://lists.gnu.org/r/bug-gnulib/2012-10/msg00088.html>.
61871         * doc/posix-headers/errno.texi (errno.h): Document this.
61872         * lib/errno.in.h (EILSEQ, GNULIB_defined_EILSEQ) [!EILSEQ]: New macros.
61873         * lib/strerror-override.c, lib/strerror-override.h (strerror_override):
61874         Supply a string for EILSEQ.
61875         * m4/errno_h.m4 (gl_HEADER_ERRNO_H): Check for EILSEQ.
61877 2012-11-05  Paul Eggert  <eggert@cs.ucla.edu>
61879         fcntl-h: default O_SEARCH, O_EXEC to O_PATH if available
61880         Linux kernel 2.6.39 introduced O_PATH (see
61881         <http://lwn.net/Articles/433854/>) and this is a better fallback
61882         for O_SEARCH and O_EXEC than O_RDONLY, if O_PATH is available.
61883         * doc/posix-headers/fcntl.texi (fcntl.h): Document this.
61884         * lib/fcntl.in.h (O_EXEC, O_SEARCH) [O_PATH]: Default to O_PATH.
61885         * lib/fcntl.in.h (O_ACCMODE):
61886         * tests/test-fcntl-h.c (main):
61887         Do not reject O_ACCMODE merely because it has more than the
61888         minimal number of bits, as POSIX allows extensions here.
61890 2012-11-04  Andrew Warshall  <warshall@99main.com>  (tiny change)
61892         mountlist: do not classify a bind-mounted dir entry as "dummy"
61893         * lib/mountlist.c (ME_DUMMY_0): Rename from ME_DUMMY, but omit
61894         the "none"-testing clause.
61895         (ME_DUMMY) [MOUNTED_GETMNTENT1]: New macro to encapsulate the
61896         exception for bind-mounted directories.
61898 2012-11-01  Akim Demaille  <akim@lrde.epita.fr>
61900         quote: provide a means to escape strings with nul characters
61901         * lib/quote.h, lib/quotearg.c (quote_mem, quote_n_mem): New functions.
61902         (quote, quote_n): Rename formal arguments for consistency with
61903         quotearg.
61905 2012-10-30  Paul Eggert  <eggert@cs.ucla.edu>
61907         test-raise: don't assume 199 is an invalid signal
61908         * tests/test-raise.c (main): Don't assume 199 is not a signal number.
61910         sh-quote-tests: port to Solaris 9
61911         * modules/sh-quote-tests (test_sh_quote_LDADD): Add @LIBINTL@.
61912         Problem reported by Dagobert Michelsen in
61913         <http://lists.gnu.org/r/bug-gnulib/2012-10/msg00114.html>.
61915 2012-10-28  Jim Meyering  <jim@meyering.net>
61917         maint.mk: rename a new configurable variable
61918         * top/maint.mk (_gl_translatable_string_re): Rename from
61919         translation-markers: _gl_ prefix to insulate from user Makefile code,
61920         and the _re suffix to inform that it's a regular expression.
61922 2012-10-26  Eric Blake  <eblake@redhat.com>
61924         maint.mk: let packages tweak sc_po_check pattern
61925         * top/maint.mk (sc_po_check): Add translation-markers, to allow
61926         finding files with other translation markers.
61928 2012-10-16  Paul Eggert  <eggert@cs.ucla.edu>
61930         euidaccess: speed up 'configure' on GNU hosts
61931         * m4/euidaccess.m4 (gl_FUNC_NONREENTRANT_EUIDACCESS):
61932         Check for setregid here, not in gl_PREREQ_EUIDACCESS, since
61933         it's needed only in this case.  Use AC_CHECK_DECLS, not
61934         AC_CHECK_DECLS_ONCE.
61935         (gl_PREREQ_EUIDACCESS): Do not use AC_CHECK_HEADERS_ONCE libgen.h
61936         or AC_REQUIRE for AC_FUNC_GETGROUPS.
61938         * lib/regexec.c (re_search_internal): Fix grammar in comment.
61940 2012-10-15  Paul Eggert  <eggert@cs.ucla.edu>
61942         fchmodat, fchownat, fstatat: port to non-inlining compilers
61943         Problem reported for FreeBSD 9 by Jim Meyering in
61944         <http://lists.gnu.org/r/bug-gnulib/2012-10/msg00070.html>.
61945         * lib/chmodat.c, lib/chownat.c, lib/statat.c:
61946         New files, which define FCHMODAT_INLINE etc.
61947         * lib/fchmodat.c (FCHMODAT_INLINE):
61948         * lib/fchownat.c (FCHOWNAT_INLINE):
61949         * lib/fstatat.c (FSTATAT_INLINE):
61950         Remove, as chmodat.c etc. now do this.
61951         * modules/fchmodat (Files): Add lib/chmodat.c.
61952         * modules/fchownat (Files): Add lib/chownat.c.
61953         * modules/fstatat (Files): Add lib/statat.c.
61955 2012-10-15  Jim Meyering  <jim@meyering.net>
61957         fchmodat.c, fchownat.c: compile-impeding typos
61958         * lib/fchmodat.c (FCHMODAT_INLINE): Fix typo: s/#include/#define/
61959         * lib/fchownat.c (FCHOWNAT_INLINE): Likewise.
61960         Introduced in commit v0.0-7636-gd202279.
61962 2012-10-15  Paul Eggert  <eggert@cs.ucla.edu>
61964         fcntl-h: support GNU flags like O_IGNORE_CTTY
61965         * doc/posix-headers/fcntl.texi (fcntl.h): Support O_IGNORE_CTTY,
61966         O_NOLINK, and O_NOTRANS.  These flags are nonzero on GNU/Hurd
61967         systems.  Discovered when using fcntl-h with GNU Emacs, which uses
61968         O_IGNORE_CTTY.  Fix misspelling of F_SETLKW.
61969         * lib/fcntl.in.h (O_IGNORE_CTTY, O_NOLINK, O_NOTRANS):
61970         Define to 0 if not already defined.
61971         * tests/test-fcntl-h.c: Test these new flags.
61973 2012-10-14  Paul Eggert  <eggert@cs.ucla.edu>
61975         faccessat, etc.: support AT_FDCWD-only use
61976         * lib/at-func.c: If GNULIB_SUPPORT_ONLY_AT_FDCWD, then support
61977         this function only if its first argument is AT_FDCWD.
61978         Emacs wants faccessat for AT_EACCESS but not for any first-arg
61979         values other than AT_FDCWD, so it doesn't want all the openat
61980         machinery with fchdir etc.
61981         * modules/faccessat, modules/fchmodat, modules/fchownat (Files):
61982         * modules/fstatat, modules/mkdirat, modules/openat (Files):
61983         * modules/unlinkat (Files):
61984         Remove lib/openat-priv.h, as at-internal supplies this file.
61985         Removing this file here allows us to support programs like Emacs
61986         that avoid at-internal.
61988         faccessat: speed up 'configure' on mainstream hosts
61989         * m4/faccessat.m4 (gl_PREREQ_FACCESSAT):
61990         Use AT_CHECK_FUNCS for 'access', not AC_CHECK_FUNCS_ONCE,
61991         since it's only on unusual platforms that we need to check for
61992         'access', and it's better not to slow 'configure' down on all
61993         platforms.
61995         faccessat: port to Solaris 10
61996         * lib/faccessat.c: Include <fcntl.h>, for AT_EACCESS.
61997         Needed on Solaris 10, which doesn't have AT_EACCESS,
61998         so we need the Gnulib fcntl.h, which defines it.
62000 2012-10-14  Pádraig Brady  <P@draigBrady.com>
62001         canonicalize: fix C89 compilation
62002         * lib/canonicalize.c (canonicalize_filename_mode): Swap order of
62003         declarations so C89 is supported.  Also remove the comment
62004         referencing memorty allocation as the suggested feature could
62005         not be implemented as suggested.
62006         Reported by Michael Goffioul.
62008 2012-10-12  Paul Eggert  <eggert@cs.ucla.edu>
62010         group-member: omit unnecessary dependencies
62011         This is for Emacs, which has its own allocator and where we
62012         don't want to use xalloc.
62013         * lib/group-member.c: Include xalloc-oversized.h, not xalloc.h,
62014         since we no longer use xmalloc.  Do not include stdbool.h, since
62015         the changes below happen to remove the only use of bool.
62016         (GROUPBUF_SIZE): New constant.
62017         (struct group_info): Remove n_groups member.  Add groupbuf member.
62018         This lets us get the groups without using malloc, usually.
62019         (free_group_info, get_group_info): Adjust to this.
62020         (get_group_info): Return the number of groups found, or -1 on error.
62021         Use plain malloc not xmalloc, and treat its failure as if there
62022         are no groups, as the user already loses in case of error.
62023         (group_member): Simplify, based on changes to get_group_info.
62024         * modules/group-member (Depends-on): Remove dependencies on
62025         xalloc and stdbool.  Add dependency on xalloc-oversized.
62027 2012-10-08  Alexandre Duret-Lutz  <adl@lrde.epita.fr>  (tiny change)
62029         gethrxtime: port to C++
62030         * lib/gethrxtime.h, lib/xtime.h [__cplusplus]: Add extern "C".
62032 2012-10-04  Paul Eggert  <eggert@cs.ucla.edu>
62034         ptsname: fix macro-name typo
62035         * lib/stdlib.in.h (ptsname): Fix misspelling of GNULIB_NAMESPACE.
62037 2012-10-03  Simon Josefsson  <simon@josefsson.org>
62039         inttostr: Relax license.
62040         * modules/inttostr (License): Change from LGPL to LGPLv2+.
62042 2012-10-03  Eric Blake  <eblake@redhat.com>
62044         ptsname_r: support ptys returned by FreeBSD posix_openpt
62045         * lib/ptsname_r.c (__ptsname_r): Don't munge name if it already
62046         lives in /dev/pts/.
62048 2012-10-02  Eric Blake  <eblake@redhat.com>
62050         pselect: reject invalid file descriptors
62051         * m4/pselect.m4 (gl_FUNC_PSELECT): Probe for FreeBSD bug.
62052         * lib/pselect.c (rpl_pselect) [!win32]: Work around it.
62053         * modules/pselect (Depends-on): Add dup2.
62054         * doc/posix-functions/pselect.texi (pselect): Document this.
62056         select: reject invalid file descriptors
62057         * m4/select.m4 (gl_FUNC_SELECT): Probe for FreeBSD bug.
62058         * lib/select.c (rpl_select) [!win32]: Work around it.
62059         * modules/select (Depends-on): Add dup2.
62060         * doc/posix-functions/select.texi (select): Document this.
62062         select: enhance test
62063         * tests/test-select.h (do_select_bad_nfd_nowait, test_bad_nfd):
62064         New functions.
62065         (test_function): Enhance test.
62066         (do_select_bad_fd): Avoid any stale errno values.
62068         ptsname: reject invalid file descriptors
62069         http://www.austingroupbugs.net/view.php?id=503
62070         * m4/ptsname.m4 (gl_FUNC_PTSNAME): Probe for FreeBSD bug.
62071         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Add new witness.
62072         * modules/stdlib (Makefile.am): Replace witness.
62073         * lib/stdlib.in.h (ptsname): Allow for replacement.
62074         * modules/ptsname (configure.ac): Trigger replacement.
62075         * doc/posix-functions/ptsname.texi (ptsname): Document this.
62077 2012-10-02  Nikos Mavrogiannopoulos  <nmav@gnutls.org>  (tiny change)
62079         hash-pjw-bare: new module
62080         * lib/hash-pjw-bare.c: New file, very much like hash-pjw.c.
62081         * lib/hash-pjw-bare.h: Likewise.
62082         * modules/hash-pjw-bare: New file.
62083         * MODULES.html.sh (Misc): Add it.
62085 2012-10-02  Eric Blake  <eblake@redhat.com>
62087         manywarnings: cater to more gcc infelicities
62088         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Add test for
62089         -Wuninitialized without -O.
62091 2012-10-01  Ed Maste  <emaste@freebsd.org>  (tiny change)
62093         select, poll tests: Make setsockopt invocation effective.
62094         * tests/test-poll.c (open_server_socket): Move setsockopt() call before
62095         the bind() call.
62096         * tests/test-select.h (open_server_socket): Likewise.
62098 2012-09-30  Paul Eggert  <eggert@cs.ucla.edu>
62100         sockets, sys_stat: restore AC_C_INLINE
62101         This undoes the 2012-09-22 patch.
62102         * m4/sockets.m4 (gl_SOCKETS):
62103         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H):
62104         Restore AC_C_INLINE, since MSVC requires __inline or _inline
62105         and does not support plain 'inline'.  Reported by Bruno Haible in
62106         <http://lists.gnu.org/r/bug-gnulib/2012-09/msg00183.html>.
62108 2012-09-30  Bruno Haible  <bruno@clisp.org>
62110         localeconv tests: Avoid test failure on OpenIndiana.
62111         * tests/test-localeconv.c (main): On OpenIndiana (a Solaris 11 variant)
62112         skip the 'grouping' and 'mon_grouping' tests.
62113         Reported by Jim Meyering.
62115 2012-09-30  Bruno Haible  <bruno@clisp.org>
62117         havelib: Follow libtool developments.
62118         * m4/lib-ld.m4: Rebase on libtool.m4 from libtool-2.4.
62119         Suggested by Simon Josefsson.
62121 2012-09-29  Jim Meyering  <meyering@redhat.com>
62123         fstatat.c: fix a compile-impeding typo
62124         * lib/fstatat.c (FSTATAT_INLINE): Fix typo: s/#include/#define/
62125         Introduced in commit v0.0-7636-gd202279.
62126         Mats Erik Andersson reported the resulting OpenBSD compilation failure.
62128 2012-09-28  Akim Demaille  <akim@lrde.epita.fr>
62130         extern-inline: provide a -Wundef safe config.h
62131         * m4/extern-inline.m4 (gl_EXTERN_INLINE): Protect
62132         "#if __GNUC_STDC_INLINE__" with "defined __GNUC_STDC_INLINE__"
62133         to produce a -Wundef warning free config.h.
62135 2012-09-26  Paul Eggert  <eggert@cs.ucla.edu>
62137         hash-pjw: relax license to LGPLv2+
62138         * modules/hash-pjw (License): Relax, with consent of author.
62140 2012-09-25  Akim Demaille  <akim@lrde.epita.fr>
62142         maint.mk: fix strict vs. lazy variable issues with RELEASE
62143         * top/maint.mk (_equal): New function.
62144         (member_check): Strip the result to avoid spurious spaces.
62145         (url_dir_list): Do not use ifeq, which is strict, as it will
62146         require RELEASE_TYPE to be defined.
62147         (announcement_Cc_, announcement_mail_headers_): Likewise: instead
62148         of relying on ifeq, use $(release_type) to dispatch (lazily) onto...
62149         (announcement_Cc_alpha,announcement_mail_headers_alpha)
62150         (announcement_Cc_beta,announcement_mail_headers_beta)
62151         (announcement_Cc_stable,announcement_mail_headers_stable): these.
62152         (release): Do not depend on $(release-type), as it forces its
62153         evaluation.  Bounce to it.
62155 2012-09-25  Akim Demaille  <akim@lrde.epita.fr>
62157         maint.mk: formatting changes
62158         * top/maint.mk: Indent bodies of if's.
62160 2012-09-21  Akim Demaille  <akim@lrde.epita.fr>
62162         maint.mk: factor the validation of RELEASE_TYPE
62163         With help from Jim Meyering.
62164         http://lists.gnu.org/r/bug-gnulib/2012-09/msg00132.html
62165         * top/maint.mk (_empty, _sp): Move their definition earlier.
62166         (member-check, release-type): New.
62167         Use the latter instead of $(RELEASE_TYPE).
62168         Remove now useless local checks.
62170 2012-09-20  Akim Demaille  <akim@lrde.epita.fr>
62172         maint.mk: provide "make upload" to ease uploading
62173         See
62174         <http://lists.gnu.org/r/bug-gnulib/2012-08/msg00028.html>.
62175         Do not depend simply on the current $(VERSION), as there may have been
62176         new commits since the tarball generation.  Rather, rely on $(RELEASE),
62177         as "make release-commit" already does.
62179         For consistency, add "make release RELEASE='X.Y TYPE'" as an alias for
62180         "make TYPE".
62182         * top/maint.mk (upload_command, upload, release): New.
62183         (RELEASE_TYPE): If undefined, default to the second word of $(RELEASE).
62184         (VERSION): first word of $(RELEASE) is always right.
62185         (emit_upload_commands): Adjust.
62186         * top/README-release: Update.
62188 2012-09-20  Akim Demaille  <akim@lrde.epita.fr>
62190         maint.mk: silent rules
62191         With help from Stefano Lattarini.
62192         * top/maint.mk (writable-files): Use $(AM_V_GEN).
62193         (announcement): Use $(AM_V_at).
62195 2012-09-24  Paul Eggert  <eggert@cs.ucla.edu>
62197         localename: port gl_locale_name_thread_unsafe to FreeBSD
62198         * lib/localename.c (gl_locale_name_thread_unsafe): Port to FreeBSD,
62199         and use the simpler FreeBSD implementation on Mac OS X as well.
62200         Original idea suggested by Ed Maste in
62201         <http://lists.gnu.org/r/bug-gnulib/2012-09/msg00094.html>.
62203 2012-09-22  Paul Eggert  <eggert@cs.ucla.edu>
62205         binary-io, eealloc, mbfile, mbiter, mbutil, xsize: better 'inline'
62206         * lib/binary-io.c, lib/eealloc.c, lib/mbfile.c, lib/mbiter.c:
62207         * lib/mbuiter.c, lib/xsize.c: New files.
62208         * lib/binary-io.h (BINARY_IO_INLINE):
62209         * lib/eealloc.h (EEALLOC_INLINE):
62210         * lib/mbfile.h (MBFILE_INLINE):
62211         * lib/mbiter.h (MBITER_INLINE):
62212         * lib/mbuiter.h (MBUITER_INLINE):
62213         * lib/xsize.h (XSIZE_INLINE):
62214         New macros.
62215         Replace all uses of 'static inline' with them.
62216         Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
62217         * m4/eealloc.m4 (gl_EEALLOC):
62218         * m4/mbfile.m4 (gl_MBFILE):
62219         * m4/mbiter.m4 (gl_MBITER):
62220         * m4/xsize.m4 (gl_XSIZE):
62221         Do not require AC_C_INLINE.
62222         * modules/binary-io (Files, lib_SOURCES): Add lib/binary-io.c
62223         * modules/eealloc (Files, lib_SOURCES): Add lib/eealloc.c.
62224         * modules/mbfile (Files, lib_SOURCES): Add lib/mbfile.c.
62225         * modules/mbiter (Files, lib_SOURCES): Add lib/mbiter.c.
62226         * modules/mbuiter (Files, lib_SOURCES): Add lib/mbuiter.c.
62227         * modules/xsize (Files, lib_SOURCES): Add lib/xsize.c.
62228         * modules/binary-io, modules/eealloc, modules/mbfile:
62229         * modules/mbiter, modules/mbuiter:
62230         (Depends-on): Add extern-inline.
62232         pipe-filter-gi, pipe-filter-ii: better use of 'inline'
62233         * lib/pipe-filter-aux.c: New file.
62234         * lib/pipe-filter-aux.h (PIPE_FILTER_AUX_INLINE): New macro.
62235         Replace all uses of 'static inline' with it.
62236         Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
62237         * lib/pipe-filter-gi.c (filter_init, filter_cleanup)
62238         (filter_retcode): No real need for inline here.
62239         * modules/pipe-filter-gi, modules/pipe-filter-ii:
62240         (Files): Add lib/pipe-filter-aux.c.
62241         (Depends-on): Add extern-inline.
62242         (configure.ac): Do not require AC_C_INLINE.
62243         (lib_SOURCES): Add pipe-filter-aux.c.
62245         fdutimensat: omit unnecessary AC_C_INLINE
62246         * modules/fdutimensat (configure.ac): Remove AC_C_INLINE.
62248         fchmodat, fchownat, fstatat: use extern-inline
62249         * lib/fchmodat.c, lib/openat.h (FCHMODAT_INLINE):
62250         * lib/fchownat.c, lib/openat.h (FCHOWNAT_INLINE):
62251         * lib/fstatat.c, lib/openat.h (FSTATAT_INLINE):
62252         New macros.
62253         * lib/openat.h:
62254         Replace all uses of 'static inline' with them.
62255         Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
62256         * modules/fchmodat, modules/fchownat, modules/fstatat:
62257         * modules/openat-h:
62258         (Depends-on):
62259         Add extern-inline.
62260         (configure.ac): Remove AC_C_INLINE.
62262         acl, mbchar, priv-set: use extern-inline
62263         * lib/set-mode-acl.c, lib/acl-internal.h (ACL_INTERNAL_INLINE):
62264         * lib/mbchar.c, lib/mbchar.h (MBCHAR_INLINE):
62265         * lib/priv-set.c, lib/priv-set.h (PRIV_SET_INLINE):
62266         New macros.
62267         * lib/acl-internal.h, lib/mbchar.h, lib/priv-set.h:
62268         Replace all uses of 'static inline' with it.
62269         Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
62270         * m4/acl.m4 (gl_FUNC_ACL):
62271         * m4/mbchar.m4 (gl_MBCHAR):
62272         * m4/priv-set.m4 (gl_PRIV_SET):
62273         Remove AC_C_INLINE, since 'inline' is no longer used directly.
62274         * modules/acl, modules/mbchar, modules/priv-set (Depends-on):
62275         Add extern-inline.
62277         sockets, sys_stat: remove AC_C_INLINE in MSVC-only cases
62278         * m4/sockets.m4 (gl_SOCKETS):
62279         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H):
62280         Remove AC_C_INLINE.  Here, 'inline' is used only in MSVC
62281         environments where it's already guaranteed to work, so we needn't
62282         check for it at 'configure'-time.
62284         tls-tests: omit unnecessary 'inline'
62285         * tests/test-tls.c (perhaps_yield): No longer inline.
62286         Simplicity and portability trump efficiency in test cases.
62288         utimens-tests: avoid unnecessary 'inline'
62289         * modules/fdutimensat-tests (configure.ac):
62290         * modules/futimens-tests (configure.ac):
62291         * modules/utimens-tests (configure.ac):
62292         * modules/utimensat-tests (configure.ac):
62293         Remove AC_C_INLINE.
62294         * tests/test-utimens-common.h (ctime_compare):
62295         No longer inline.  Simplicity and portability trump efficiency here.
62297         misc: don't limit commentary to inline functions
62298         * lib/binary-io.h, lib/malloca.h, lib/safe-alloc.c:
62299         * lib/xalloc-oversized.h, lib/xsize.h:
62300         Contrast macros to functions in general, not just to inline functions,
62301         when the commentary does not apply only to inline functions.
62303 2012-09-20  Jim Meyering  <meyering@redhat.com>
62305         non-recursive-gnulib-prefix-hack: new module
62306         * build-aux/prefix-gnulib-mk: Copied from coreutils, derived from
62307         the file that originated in Bison.
62308         * m4/non-recursive-gnulib-prefix-hack.m4: Likewise, this code is
62309         largely copied from a snippet that resided in bison's configure.ac.
62310         * modules/non-recursive-gnulib-prefix-hack: New file.
62311         * MODULES.html.sh (Support for maintaining and releasing projects):
62312         Add it.
62314 2012-09-18  Jim Meyering  <meyering@redhat.com>
62316         maint.mk: generalize _gl_tight_scope for non-recursive make
62317         * top/maint.mk (_gl_tight_scope): Remove a hard-coded assumption
62318         that *.h would describe additional .h files in the directory
62319         specified by $(_gl_TS_dir).  I.e., add this...
62320         (_gl_TS_other_headers): New variable.
62322         maint.mk: exempt trailing blanks found in "binary" files
62323         * top/maint.mk (sc_trailing_blank): Filter out any matches found in
62324         "binary" files, as reported by grep.  Suggested by Richard W.M. Jones
62325         in http://thread.gmane.org/gmane.comp.emulators.guestfs/1902
62327 2012-09-17  Jim Meyering  <meyering@redhat.com>
62329         maint.mk: sc_prohibit_path_max_allocation: don't FP for UNIX_PATH_MAX
62330         * top/maint.mk (sc_prohibit_path_max_allocation): Avoid false-positive
62331         match for symbols like UNIX_PATH_MAX. Reported by Richard W.M. Jones
62332         in http://thread.gmane.org/gmane.comp.emulators.guestfs/1902
62334 2012-09-17  Jim Meyering  <meyering@redhat.com>
62336         maint.mk: teach sc_prohibit_magic_number_exit to accept 77
62337         * top/maint.mk (sc_prohibit_magic_number_exit): Do not complain about
62338         uses like "exit (77)".  "77" is automake's "skip this test" exit code.
62339         It is not in the same category as "exit (0)" or "exit (1)", and
62340         besides, I know of no symbolic name for that 77.  Reported by
62341         Richard W.M. Jones in
62342         http://thread.gmane.org/gmane.comp.emulators.guestfs/1902
62344 2012-09-17  Jim Meyering  <meyering@redhat.com>
62346         maint.mk: relax sc_prohibit_strcmp, to avoid a false positive
62347         * top/maint.mk (sc_prohibit_strcmp): Relax regexp, so as to match
62348         all uses of #define, not just those that start in column 1.
62349         Richard W.M. Jones reported a false positive in
62350         http://thread.gmane.org/gmane.comp.emulators.guestfs/1902
62352 2012-09-16  Paul Eggert  <eggert@cs.ucla.edu>
62354         localcharset: work around Mac OS X bug with UTF-8 and MB_CUR_MAX
62355         * lib/localcharset.c (locale_charset) [DARWIN7]:
62356         Return "ASCII" if the system reports "UTF-8" and MB_CUR_MAX <= 1,
62357         as these two values are incompatible.  Problem reported by Max Horn.
62358         For more discussion, please see
62359         <http://lists.gnu.org/r/bug-gnulib/2012-09/msg00061.html>.
62361         doc: document sticky-EOF issue
62362         * doc/posix-functions/fgetc.texi (fgetc):
62363         * doc/posix-functions/fgets.texi (fgets):
62364         * doc/posix-functions/fread.texi (fread):
62365         * doc/posix-functions/fscanf.texi (fscanf):
62366         * doc/posix-functions/getc.texi (getc):
62367         * doc/posix-functions/getchar.texi (getchar):
62368         * doc/posix-functions/scanf.texi (scanf):
62369         Mention that glibc and default Solaris do not conform to
62370         C99 and POSIX-2001 or later, with respect to how getchar
62371         etc. behave when feof reports nonzero.
62373 2012-09-13  Joachim Schmitz  <jojo@schmitz-digital.de>  (tiny change)
62375         poll: fix poll(0, NULL, msec)
62376         * lib/poll.c: don't exit early if NULL is the 1st arg to poll(),
62377         but nfd is 0.  In that case poll should behave like select.
62379 2012-09-13  Joachim Schmitz  <jojo@schmitz-digital.de>  (tiny change)
62380             Paolo Bonzini  <bonzini@gnu.org>
62382         poll: fix for systems that can't recv() on a non-socket
62383         * lib/poll.c: if recv returns ENOTSOCK, assume the descriptor
62384         is readable.  In this case POLLHUP will not be supported.
62385         * doc/posix-functions/poll.texi: Document this.
62387 2012-09-13  Paolo Bonzini  <bonzini@gnu.org>
62389         poll/select: document portability problems not fixed by Gnulib.
62390         * doc/posix-functions/poll.texi: poll does not work well on
62391         pipes under Windows.  It has the same limitations as select on
62392         BeOS.
62393         * doc/posix-functions/select.texi: select does not work well
62394         on pipes under Windows.
62396 2012-09-10  Paul Eggert  <eggert@cs.ucla.edu>
62398         fcntl-h: check for AIX 7.1 bug with O_NOFOLLOW and O_CREAT
62399         * m4/fcntl-o.m4 (gl_FCNTL_O_FLAGS): Check for AIX 7.1 bug
62400         that caused a GNU tar test failure.  Problem reported by Jez Wain; see
62401         <http://lists.gnu.org/r/bug-tar/2012-07/msg00018.html>.
62403 2012-09-06  Eric Blake  <eblake@redhat.com>
62405         net_if: give more details about the bug being fixed
62406         * doc/posix-headers/net_if.texi: Add clarification.
62408 2012-09-05  Eric Blake  <eblake@redhat.com>
62410         net_if: new module
62411         * modules/net_if: New module, borrowing ideas from netinet_in.
62412         * m4/net_if_h.m4: New file.
62413         * lib/net_if.in.h: Likewise.
62414         * doc/posix-headers/net_if.texi (net/if.h): Document it.
62415         * MODULES.html.sh (lacking POSIX:2008): Likewise.
62416         * tests/test-net_if.c: Make function checks conditional.
62417         Reported by Jasper Lievisse Adriaanse <jasper@humppa.nl>.
62419 2012-09-05  Mats Erik Andersson  <gnu@gisladisker.se>  (tiny change)
62421         readutmp: fix non-portable UT_PID use
62422         * lib/readutmp.c (desirable_utmp_entry) <READ_UTMP_CHECK_PIDS>:
62423         Use `UT_PID (u) > 0' as absolute condition.
62425 2012-09-04  Jim Meyering  <meyering@redhat.com>
62427         fts: reduce two or more trailing spaces to just one, usually
62428         * lib/fts.c (fts_open): Upon initialization, if a name ends in two
62429         or more slashes, trim all but the final one.  But if a name consists
62430         solely of two slashes, don't modify it.  If it consists solely of
62431         three or more slashes, strip all but one.
62433         This is part of the solution to a minor problem with rm:
62434         it would print a bogus ELOOP diagnostic when failing to remove
62435         the slash-decorated name of a symlink-to-directory:
62437             $ mkdir d && ln -s d s && env rm -r s/
62438             rm: cannot remove 's': Too many levels of symbolic links
62440         With the change below and a trivial don't-trim-trailing-slashes
62441         adjustment to remove.c, it does this:
62443             $ env rm -r s/
62444             rm: cannot remove 's/': Not a directory
62446         Improved by: Eric Blake
62448         fts: when there is no risk of overlap, use memcpy, not memmove
62449         * lib/fts.c (fts_alloc): Fix unjustified memcopy: s/memmove/memcpy/
62451 2012-08-29  Paul Eggert  <eggert@cs.ucla.edu>
62453         stdbool: be more compatible with mixed C/C++ compiles
62454         * lib/stdbool.in.h (_Bool, true, false) [__cplusplus]:
62455         Define to bool, true, false, respectively, as GCC's builtin
62456         stdbool.h does.  Problem reported by Michael Goffioul in
62457         <http://lists.gnu.org/r/bug-gnulib/2012-08/msg00143.html>.
62459 2012-08-28  Jim Meyering  <meyering@redhat.com>
62461         revert last change: it was not needed
62462         * tests/test-vc-list-files-git.sh: There's already a test for
62463         a working git, just below.
62465 2012-08-28  Jim Meyering  <meyering@redhat.com>
62467         tests: test-vc-list-files-git.sh: skip if git is not available
62468         * tests/test-vc-list-files-git.sh: Skip this test when git is
62469         not available.
62471 2012-08-26  Bruno Haible  <bruno@clisp.org>
62473         gnulib-tool: Remove no-op option --no-changelog.
62474         * gnulib-tool (func_usage): Don't mention --no-changelog.
62475         (do_changelog): Remove variable.
62476         Reported by Dmitriy Selyutin <ghostman.sd@gmail.com>.
62478 2012-08-24  Paul Eggert  <eggert@cs.ucla.edu>
62480         doc: remove fdl-1.2.texi
62481         It is no longer used or maintained, and its use of @acronym
62482         is problematic.  See the thread containing
62483         <http://lists.gnu.org/r/bug-gnulib/2012-08/msg00134.html>.
62484         * config/srclist.txt: Remove doc/old-licenses/fdl-1.2.texi.
62485         * doc/old-licenses/fdl-1.2.texi: Remove.
62487         execinfo: port to FreeBSD
62488         * m4/execinfo.m4 (gl_EXECINFO_H): Set LIB_EXECINFO to -lexecinfo
62489         if needed, as in FreeBSD.  Reported by Bastien Roucariès in
62490         <http://lists.gnu.org/r/bug-gnulib/2012-08/msg00113.html>.
62491         * modules/execinfo (Link): Add $(LIB_EXECINFO).
62493 2012-08-23  Jim Meyering  <meyering@redhat.com>
62495         xstrtol.h: avoid "_Noreturn is not at beginning of declaration" warning
62496         * lib/xstrtol.h: Put "_Noreturn" before "void" in declaration,
62497         to placate gcc's -Wold-style-declaration.
62499 2012-08-24  Paul Eggert  <eggert@cs.ucla.edu>
62501         doc: do not use @acronym
62502         * doc/inet_ntoa.texi (inet_ntoa):
62503         * doc/parse-datetime.texi (Seconds since the Epoch)
62504         (Specifying time zone rules):
62505         * doc/posix-functions/inet_ntoa.texi (inet_ntoa):
62506         Don't use @acronym.  Problem reported by John Darlington in
62507         <http://lists.gnu.org/r/bug-gnulib/2012-08/msg00124.html>.
62509 2012-08-23  Paul Eggert  <eggert@cs.ucla.edu>
62511         stdnoreturn: port to newer GCCs
62512         * m4/stdnoreturn.m4 (gl_STDNORETURN_H): Avoid problems with
62513         bleeding-edge GCC that complains about 'int _Noreturn foo (void);'.
62514         Problem reported by Jim Meyering in
62515         <http://lists.gnu.org/r/bug-gnulib/2012-08/msg00121.html>.
62516         Also, rename the 'test' function to a void a clash with the
62517         already-supplied 'main' function; this fixes a bug that incorrectly
62518         rejected GCC 4.7.1's <stdnoreturn.h>.
62519         * doc/posix-headers/stdnoreturn.texi (stdnoreturn.h):
62520         Document GCC problem.
62522 2012-08-22  Reuben Thomas  <rrt@sc3d.org>
62524         pipe-filter: fix comment typo
62525         * lib/pipe-filter.h: Mention correct function.
62527 2012-08-22  Paul Eggert  <eggert@cs.ucla.edu>
62529         execinfo: new module
62530         This is for Emacs.  Currently, it provides a no-effect stub
62531         on all platforms where it does not already work.
62532         It already works on glibc-based systems, and on Solaris 11.
62533         * lib/execinfo.c, lib/execinfo.in.h, m4/execinfo.m4, modules/execinfo:
62534         New files.
62535         * doc/glibc-headers/execinfo.texi (execinfo.h):
62536         * MODULES.html.sh (Misc): Document it.
62538 2012-08-20  Paul Eggert  <eggert@cs.ucla.edu>
62540         extern-inline: support old GCC 'inline'
62541         * m4/extern-inline.m4 (gl_EXTERN_INLINE): Use pre-C99 GCC 'inline'
62542         if available.  This applies to GCC versions 2.7 through 4.2, or
62543         when newer GCC is using -fgnu89-inline.  The goal is to address
62544         some of the performance issues mentioned by Bruno Haible in
62545         <http://lists.gnu.org/r/bug-gnulib/2012-08/msg00097.html>.
62547 2012-08-20  Eric Blake  <eblake@redhat.com>
62549         maint.mk: avoid redundant file name in message
62550         * top/maint.mk (sc_prohibit_strcmp, sc_unmarked_diagnostics)
62551         (sc_prohibit_defined_have_decl_tests, sc_const_long_option)
62552         (sc_makefile_path_separator_check): Remove bogus $(ME).
62554 2012-08-20  Mike Frysinger  <vapier@gentoo.org>
62556         timer-time: fix link order when static linking on glibc
62557         * m4/timer_time.m4 (LIB_TIMER_TIME): Add -lpthread
62558         _after_ -lrt so that it's significant.
62560 2012-08-19  Paul Eggert  <eggert@cs.ucla.edu>
62562         timespec: omit unnecessary AC_C_INLINE
62563         * m4/timespec.m4 (gl_TIMESPEC): Do not require AC_C_INLINE.
62565         stat-time: omit unnecessary AC_C_INLINE
62566         * m4/stat-time.m4 (gl_STAT_TIME, gl_STAT_BIRTHTIME):
62567         Do not require AC_C_INLINE.
62569         ignore-value: omit unnecessary AC_C_INLINE
62570         * modules/ignore-value (configure.ac): Do not require AC_C_INLINE.
62572         sys_select: avoid 'static inline'
62573         * lib/sys_select.in.h (rpl_fd_isset): Now static, not static inline.
62575         mktime: avoid 'static inline'
62576         * lib/mktime.c (leapyear, ydhms_diff): Now static, not static inline.
62577         * m4/mktime.m4 (gl_PREREQ_MKTIME): Do not require AC_C_INLINE.
62579 2012-08-19  Bruno Haible  <bruno@clisp.org>
62581         gnulib-tool: Improve coding style.
62582         * gnulib-tool (func_emit_tests_Makefile_am): Set perhapsLT, like in
62583         func_emit_lib_Makefile_am.
62584         Reported and fix suggested by Dmitriy Selyutin <ghostman.sd@gmail.com>.
62586 2012-08-19  Bruno Haible  <bruno@clisp.org>
62588         gnulib-tool: Fix indentation.
62589         * gnulib-tool (func_import): Fix indentation.
62591 2012-08-19  Bruno Haible  <bruno@clisp.org>
62593         gnulib-tool: Remove old file names from .cvsignore, .gitignore.
62594         * gnulib-tool (func_update_ignorelist): Don't use 'join -v 1' command
62595         on the list of removed files.
62597 2012-08-17  Paul Eggert  <eggert@cs.ucla.edu>
62599         test-parse-datetime: avoid glibc leap-second glitch
62600         * tests/test-parse-datetime.c (main): Set TZ to US Eastern time
62601         with the 2012 rules.  Problem reported by Bruce Dubbs in
62602         <http://bugs.gnu.org/12206>.
62604 2012-08-14  Bruno Haible  <bruno@clisp.org>
62606         gnulib-tool: Fix indentation of generated gnulib-comp.m4 file.
62607         * gnulib-tool (func_emit_autoconf_snippet): Initialize indentation
62608         from argument.
62609         Reported and fix suggested by Dmitriy Selyutin <ghostman.sd@gmail.com>.
62611 2012-08-14  Eric Blake  <eblake@redhat.com>
62613         ldexp: relax license
62614         * modules/ldexp (License): Trivial relax, since the module only
62615         provides a permissively licensed m4 file.
62617 2012-08-13  Bruno Haible  <bruno@clisp.org>
62619         gnulib-tool: Fix persistence of --witness-c-macro option.
62620         * gnulib-tool (func_import): Fix typo in emit of gl_WITNESS_C_MACRO.
62621         Reported by Dmitriy Selyutin <ghostman.sd@gmail.com>.
62623 2012-08-11  Eric Blake  <eblake@redhat.com>
62625         count-leading-zeros: use a lookup table on non-gcc compilers
62626         * lib/count-leading-zeros.h (count_leading_zeros_32): Use an
62627         alternate implementation, suggested by Jim Meyering.
62629 2012-08-10  Eric Blake  <eblake@redhat.com>
62631         count-leading-zeros: new module
62632         * modules/count-leading-zeros: New module.
62633         * m4/count-leading-zeros.m4: New file.
62634         * lib/count-leading-zeros.h: Likewise.
62635         * modules/count-leading-zeros-tests: New test.
62636         * tests/test-count-leading-zeros.c: New file.
62637         * MODULES.html.sh (Integer arithmetic functions): Document it.
62639 2012-08-07  Simon Josefsson  <simon@josefsson.org>
62640             Jim Meyering  <meyering@redhat.com>
62642         maintainer-makefile: Fix syntax error with dash.
62643         * top/maint.mk (sc_vulnerable_makefile_CVE-2009-4029): Quote arguments.
62644         (sc_vulnerable_makefile_CVE-2012-3386): Likewise.
62646 2012-08-05  Jim Meyering  <meyering@redhat.com>
62648         extern-inline: also ignore -Wmissing-declarations
62649         * m4/extern-inline.m4: Also ignore -Wmissing-declarations,
62650         required with gcc-4.8.0-to-be.
62652         maint.mk: sc_prohibit_magic_number_exit: avoid new false positives
62653         * top/maint.mk (sc_prohibit_magic_number_exit): Also filter out matches
62654         for /error ?([^,]*)/.  This avoids false-positives for strings like
62655         "Unknown error (252)", introduced via commit v0.0-7538-g92875a6.
62657 2012-08-02  Stefano Lattarini  <stefano.lattarini@gmail.com>
62659         gnumakefile: better interaction with Automake-NG
62660         * modules/gnumakefile [Makefile.am]: The makefiles generated by
62661         Automake-NG always contain a definition of VPATH, even in non-VPATH
62662         builds (its value being simply '.' in that case).  So, in the
62663         'clean-GNUmakefile' rule, to determine whether running under a
62664         VPATH setup, compare '$(srcdir)' to '.' rather than checking whether
62665         '$(VPATH)' expands to the empty string.
62667 2012-08-02  Carlo de Falco  <carlo.defalco@polimi.it>  (tiny change)
62669         base64: Use extern C scope in header file, for C++.
62670         * lib/base64.h: Add C++ namespace protection.
62672 2012-08-02  Paul Eggert  <eggert@cs.ucla.edu>
62674         stat-time, timespec, u64: support naive out-of-dir builds
62675         * lib/stat-time.c, lib/timespec.c, lib/u64.c:
62676         Use '#include "foo.h"', not '#include <foo.h>', when including
62677         one's own interface.  This works better when configuring with
62678         out-of-directory builds, since packages need not add an
62679         otherwise-unnecessary -I$(topdir_src)/lib to DEFAULT_INCLUDES.
62681 2012-08-01  Paul Eggert  <eggert@cs.ucla.edu>
62683         utimens: use extern-inline
62684         * lib/utimens.c (_GL_UTIMENS_INLINE): Define when including utimens.h.
62685         * lib/utimens.h: Add copyright notice, since this is now large enough
62686         to copyright.  Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
62687         (_GL_UTIMENS_INLINE): New macro.  Use it instead of 'static inline'.
62688         * modules/utimens (Depends-on): Add extern-inline.
62690         u64: use extern-inline
62691         * lib/u64.c: New file.
62692         * lib/u64.h: Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
62693         (_GL_U64_INLINE): New macro.  Use it instead of 'static inline'.
62694         * modules/u64 (Files): Add lib/u64.c.
62695         (Depends-on): Add extern-inline.
62696         (configure.ac): No need to require AC_C_INLINE, since extern-inline
62697         does that now.
62698         (lib_SOURCES): Add u64.c.
62700         timespec: use extern-inline
62701         * lib/timespec.c: New file.
62702         * lib/timespec.h: Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
62703         (_GL_TIMESPEC_INLINE): New macro.  Use it instead of 'static inline'.
62704         * modules/timespec (Files): Add lib/timespec.c.
62705         (Depends-on): Add extern-inline.
62706         (lib_SOURCES): Add timespec.c.
62708         stat-time: use extern-inline
62709         * lib/stat-time.c: New file.
62710         * lib/stat-time.h: Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
62711         (_GL_STAT_TIME_INLINE): New macro.  Use it instead of 'static inline'.
62712         * modules/stat-time (Files): Add lib/stat-time.c.
62713         (Depends-on): Add extern-inline.
62714         (lib_SOURCES): Add stat-time.c.
62716         extern-inline: new module
62717         * modules/extern-inline, m4/extern-inline.m4: New files.
62718         This is for better support of 'extern inline' a la ISO C99,
62719         with a portable alternative on compilers that do not support
62720         C99-style 'extern inline'.  Using 'extern inline' shrinks the size
62721         of the Emacs executable, when compiled with debugging disabled,
62722         which is a typical way that Emacs is built while developing.
62724 2012-08-01  Akim Demaille  <akim@lrde.epita.fr>
62726         maint.mk: a "release-commit" wrapper to do-release-commit-and-tag
62727         * build-aux/do-release-commit-and-tag: Move variable definitions
62728         together.
62729         ($branch): Instead of defaulting to "master", default to the current
62730         branch (as gnu-web-doc-update does).
62731         (help): Display the current values of the option arguments.
62732         * top/maint.mk (release-commit): New.
62733         * top/README-release: Simplify the corresponding step.
62735 2012-07-30  Eric Blake  <eblake@redhat.com>
62737         passfd: fix comment on recvfd
62738         * lib/passfd.c (recvfd): Fix comment.
62739         Reported by Jann Horn <jannhorn@googlemail.com>.
62741 2012-07-30  Jim Meyering  <meyering@redhat.com>
62743         maint.mk: avoid a sub-shell
62744         * top/maint.mk (release-prep): Remove unneeded sub-shell.
62746 2012-07-30  Akim Demaille  <akim@lrde.epita.fr>
62748         maint.mk: use silent-rules support from Automake
62749         * top/maint.mk (news-check, vc-diff-check, announcement)
62750         (no-submodule-changes, alpha beta stable, release-prep)
62751         (web-manual, update-copyright): Use $(AM_V_GEN) and $(AM_V_at).
62753 2012-07-30  Akim Demaille  <akim@lrde.epita.fr>
62755         maint.mk: provide a web-manual-update target
62756         * top/maint.mk: here.
62757         * top/README-release: Use it to simplify the web manual update step.
62759 2012-07-30  Akim Demaille  <akim@lrde.epita.fr>
62761         README-release: shorten the circuit to post a news
62762         * top/README-release: Point directly to the news submission form.
62764 2012-07-30  Akim Demaille  <akim@lrde.epita.fr>
62766         gnu-web-doc-update: fix --help
62767         * build-aux/gnu-web-doc-update: The information "top level" was written
62768         twice.
62770 2012-07-30  Akim Demaille  <akim@lrde.epita.fr>
62772         maint.mk: absolute VPATH issue
62773         * top/maint.mk (release-prep): Help Git find .git/.
62774         From Jim Meyering.
62776 2012-07-29  Akim Demaille  <akim@lrde.epita.fr>
62778         gitlog-to-changelog: fix previous change
62779         * build-aux/gitlog-to-changelog: Fix condition.
62780         Add missing ";".
62782 2012-07-29  Akim Demaille  <akim@lrde.epita.fr>
62784         gitlog-to-changelog: don't expect .git to be in $srcdir
62785         Reported by Bruno Haible.
62786         <http://lists.gnu.org/r/bug-gnulib/2012-07/msg00265.html>
62787         * build-aux/gitlog-to-changelog (&git_dir_option): New.
62788         Use it.
62790 2012-07-29  Akim Demaille  <akim@lrde.epita.fr>
62792         maint.mk: absolute VPATH build fix
62793         * top/maint.mk (gpg_key_ID): Help git find .git when, for instance,
62794         $(srcdir) is not a parent of $(builddir).
62796 2012-07-28  John Darrington  <john@darrington.wattle.id.au>
62798         clean-temp: Fix memory leak.
62799         * lib/clean-temp.c (cleanup_temp_dir): Free also the 'subdirs' and
62800         'files' members of tmpdir.
62802 2012-07-27  Jim Meyering  <meyering@redhat.com>
62804         maint.mk: new rule: refresh-gnulib-patches
62805         I noticed that 8 of coreutils' 9 gl/**/*.diff files were stale.
62806         Use this rule to refresh them.
62807         * top/maint.mk (refresh-gnulib-patches): New rule.
62809 2012-07-24  Bruno Haible  <bruno@clisp.org>
62811         gnulib-tool: Fix handling of inctests variable.
62812         * gnulib-tool: Canonicalize $inctests also in 'update' mode.
62813         Reported by Nick Bowler <nbowler@elliptictech.com>.
62815 2012-07-22  Bruno Haible  <bruno@clisp.org>
62817         getpass: Assume AC_CHECK_DECLS_ONCE invocation, like in getpass.m4.
62818         * lib/getpass.h: Assume HAVE_DECL_GETPASS is defined.
62819         * cfg.mk (exclude_file_name_regexp--sc_prohibit_defined_have_decl_tests):
62820         Remove exemption for getpass.h.
62821         Suggested by Eric Blake.
62823 2012-07-20  Eric Blake  <eblake@redhat.com>
62825         verify: document conflict with -Wnested-externs
62826         * lib/verify.h: Give hint about usage when gcc warnings are enabled.
62828         maint.mk: forbid exit(-1)
62829         * top/maint.mk (sc_prohibit_magic_number_exit): Detect negatives.
62831 2012-07-20  Paul Eggert  <eggert@cs.ucla.edu>
62833         fsusage: port back to Solaris
62834         * lib/fsusage.c (get_fs_usage): Fix busted logic causing compile-time
62835         error (fsd not declared) on Solaris 10.  Reported privately by
62836         Andrew Borodin.
62838 2012-07-19  Akim Demaille  <akim@lrde.epita.fr>
62840         gnu-web-doc-update: fix error messages
62841         * build-aux/gnu-web-doc-update: Don't pass $ME to die.
62843         gnu-web-doc-update: check the requirements.
62844         * build-aux/gnu-web-doc-update (find_tool): Import from bootstrap.
62845         ($CVS, $CVSU, $GIT, $RSYNC, $XARGS): New.
62846         * build-aux/bootstrap (find_tool): Comment change.
62848 2012-07-17  Akim Demaille  <akim@lrde.epita.fr>
62850         maint.mk: minor simplication.
62851         * top/maint.mk (_sc_excl): Use $(or...) instead of $(if...)
62852         for default values.
62854 2012-07-15  Akim Demaille  <akim@lrde.epita.fr>
62856         gitlog-to-changelog: VPATH build issues
62857         If builddir is not a subdirectory of srcdir, running git from it will
62858         fail.
62859         * build-aux/gitlog-to-changelog (--srcdir): New option.
62861 2012-07-15  Bruno Haible  <bruno@clisp.org>
62863         fpending: Assume AC_CHECK_DECLS_ONCE invocation, like in fpending.m4.
62864         * lib/fpending.h: Assume HAVE_DECL___FPENDING is defined.
62865         * cfg.mk (exclude_file_name_regexp--sc_prohibit_defined_have_decl_tests)
62866         Remove exemption for fpending.h.
62867         Suggested by Eric Blake.
62869 2012-07-15  Paul Eggert  <eggert@cs.ucla.edu>
62871         pthread_sigmask: fix bug on FreeBSD 9
62872         * lib/pthread_sigmask.c [PTHREAD_SIGMASK_INEFFECTIVE]:
62873         Include string.h.
62874         (pthread_sigmask) [PTHREAD_SIGMASK_INEFFECTIVE]:
62875         When calling pthread_sigmask (1729, NEW, OLD), specify non-null NEW;
62876         this avoids a bug on FreeBSD 9, where pthread_sigmask is effective
62877         but pthread_sigmask (1729, NULL, NULL) returns zero.
62878         See <http://bugs.gnu.org/11884>.
62879         Avoid the need to call pthread_sigmask (1729, ...) in most cases,
62880         by inspecting whether the main call changed the old mask.
62882 2012-07-15  Reuben Thomas  <rrt@sc3d.org>
62884         README-release: make it more legible
62885         * top/README-release: Improve typography slightly.
62887 2012-07-15  Jim Meyering  <meyering@redhat.com>
62889         maint: require that each sc_... command start with "@"
62890         * Makefile (sc_prohibit_sc_omitted_at): New rule so that
62891         "make sc_maint" helps us avoid this nit.
62893 2012-07-15  Jim Meyering  <meyering@redhat.com>
62895         maint.mk: add leading "@" to quiet new "make syntax-check" rule
62896         * top/maint.mk (sc_prohibit_defined_have_decl_tests): Add "@".
62898 2012-07-13  Eric Blake  <eblake@redhat.com>
62900         maint.mk: new syntax check for HAVE_DECL checks
62901         * top/maint.mk (sc_prohibit_defined_have_decl_tests): New rule.
62902         * cfg.mk
62903         (exclude_file_name_regexp--sc_prohibit_defined_have_decl_tests):
62904         Exempt some false positives.
62905         Based on a report by Karel Zak.
62907         argp: make HAVE_DECL usage consistent
62908         * lib/argp-parse.c (__argp_parse): Check contents of HAVE_DECL
62909         macros, not whether they are defined.
62910         * m4/argp.m4 (gl_ARGP): Always define HAVE_DECL_* macros, per
62911         convention with other declaration checks.
62912         Reported by Karel Zak, with suggestions from Paul Eggert.
62914         stat-time: relax license to LGPLv2+
62915         * modules/stat-time (License): Relax, with consent of all authors.
62917         strndup: fix m4 usage error
62918         * m4/strndup.m4 (gl_FUNC_STRNDUP): HAVE_DECL_STRNDUP is always
62919         defined, to either 0 or 1.
62920         Reported by Karel Zak.
62922 2012-07-11  Jim Meyering  <meyering@redhat.com>
62924         maint: enable the sc_avoid_if_before_free syntax-check rule
62925         * cfg.mk (local-checks-to-skip): Enable sc_avoid_if_before_free.
62926         (if_before_free_offenders_): Define.
62927         (if_before_free_basename_re_): Define.
62928         Exempt current files with useless if-before-free.
62930 2012-07-11  Paul Eggert  <eggert@cs.ucla.edu>
62932         gettext: do not assume '#define ... defined ...' behavior
62933         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS):
62934         Do not use '#define FOO ... defined BAR ...', as the C standard says
62935         it's not portable to expect that this works after macro expansion.
62936         Problem reported for gzip by Steven M. Schweda in
62937         <http://lists.gnu.org/r/bug-gzip/2012-07/msg00000.html>.
62939 2012-07-10  Paul Eggert  <eggert@cs.ucla.edu>
62941         getloadavg: clean out old Emacs and Autoconf cruft
62942         See Glenn Morris in <http://bugs.gnu.org/11905>.
62943         * lib/getloadavg.c: Include <config.h>, <stdbool.h> always.
62944         Include <sys/param.h> if HAVE_SYS_PARAM_H, not if unix or __unix.
62945         (LDAV_CVT): Remove no-longer-used LOAD_AVE_CVT hook.
62946         * m4/getloadavg.m4 (gl_PREREQ_GETLOADAVG): Check for <sys/param.h>.
62948 2012-07-10  Akim Demaille  <akim@lrde.epita.fr>
62950         bootstrap: let warn be like tests/init.sh's warn_
62951         Reported by Jim Meyering.
62952         * build-aux/bootstrap (warn): Remove, replaced by...
62953         (warnf_, warn_): these.
62954         Adjust callers.
62955         Shorten messages that no longer fit in 80 columns.
62957 2012-07-09  Bruno Haible  <bruno@clisp.org>
62959         getopt: Simplify after Emacs changed.
62960         * m4/getopt.m4 (gl_FUNC_GETOPT_POSIX): Inline gl_GETOPT_IFELSE.
62961         (gl_GETOPT_IFELSE): Remove macro.
62963 2012-07-09  Jim Meyering  <meyering@redhat.com>
62965         maint.mk: add sc_vulnerable_makefile_CVE-2012-3386
62966         * top/maint.mk (sc_vulnerable_makefile_CVE-2012-3386): New rule.
62968         maint.mk: _sc_search_regexp, sc_vulnerable_makefile_CVE-2009-4029: fix
62969         Bugs in both of those conspired to make the
62970         sc_vulnerable_makefile_CVE-2009-4029 rule 99% useless.
62971         _sc_search_regexp's handling of non-empty $in_files would filter
62972         out any offending file names.  sc_vulnerable_makefile_CVE-2009-4029's
62973         choice of in_files value meant there would be no match in most
62974         projects, due to the presence of two or more Makefile.in files.
62975         * top/maint.mk (_sc_search_regexp) [in_vc_files,in_files]: Clarify.
62976         Fix a bug in how a non-empty $$in_files was processed:
62977         (sc_vulnerable_makefile_CVE-2009-4029): Fix erroneous use of in_files:
62978         in spite of the name, it's a regexp, not a list of file names.
62980 2012-07-09  Paul Eggert  <eggert@cs.ucla.edu>
62982         getloadavg, getopt: fix commentary re configure.in
62983         Autoconf is deprecating the name 'configure.in', so change it to
62984         to the new name 'configure.ac' in a couple of places.
62985         * lib/getloadavg.c: configure.in -> configure.ac, in comment.
62986         * m4/getopt.m4 (gl_GETOPT_IFELSE, gl_GETOPT_SUBSTITUTE_HEADER)
62987         (gl_PREREQ_GETOPT): Remove obsolete commentary re Emacs configure.in.
62988         Emacs has renamed it to configure.ac, and it no longer refers
62989         to these macros anyway.
62991         timespec: mark functions with const attributes
62992         * lib/timespec.h (timespec_add, timespec_sub, dtotimespec):
62993         Mark with _GL_ATTRIBUTE_CONST.
62995 2012-07-07  Ludovic Courtès  <ludo@gnu.org>
62997         canonicalize[-lgpl]: handle "guessing" values when cross-building
62998         * m4/canonicalize.m4 (gl_FUNC_CANONICALIZE_FILENAME_MODE)
62999         (gl_CANONICALIZE_LGPL): Check whether $gl_cv_func_realpath_works
63000         matches "*yes" instead of just "yes".  Regression introduced in commit
63001         e0bcf6626cde8dad4bfbdc4045c744f0cd8b9e24.
63003 2012-07-07  Ludovic Courtès  <ludo@gnu.org>
63004             Bruno Haible  <bruno@clisp.org>
63006         canonicalize: make the right guess when cross-compiling to GNU
63007         * m4/canonicalize.m4 (gl_FUNC_REALPATH_WORKS): Match also "gnu*" to
63008         determine whether cross-compiling to glibc systems, so as to
63009         include GNU/Hurd.
63011 2012-07-06  Paul Eggert  <eggert@cs.ucla.edu>
63013         timespec-sub: avoid duplicate include
63014         * lib/timespec-sub.c: Do not include <config.h> twice.
63015         Reported by Juanma Barranquero.
63017 2012-07-06  Akim Demaille  <akim@lrde.epita.fr>
63019         bootstrap: use a more consistent error reporting scheme
63020         * build-aux/bootstrap (warn, die): New.
63021         Use them.
63023 2012-07-05  Paul Eggert  <eggert@cs.ucla.edu>
63025         sys_time: allow too-wide tv_sec
63026         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Allow struct
63027         timeval even if tv_sec is wider than time_t.  This allows
63028         OpenBSD 5.1 amd64 and fixes an Emacs porting glitch with utimens.c,
63029         as without this patch gnulib replaces struct timeval
63030         and OpenBSD futimes therefore has a type mismatch.
63031         * doc/posix-headers/sys_time.texi: Mention this.
63033         pthread: check for both pthread_create and pthread_join
63034         * m4/pthread.m4 (gl_PTHREAD_CHECK): Revert previous change, but
63035         alter the check so that it tests for both pthread_create and
63036         pthread_join.  This should be more portable to hosts like OSF/1 5.1.
63037         Suggested by Bruno Haible and Richard Yao in
63038         <http://lists.gnu.org/r/bug-gnulib/2012-07/msg00048.html>.
63040         parse-datetime: doc tuneup
63041         * doc/parse-datetime.texi: Index "leap seconds" and fix minor
63042         spacing issues.
63044 2012-07-05  Akim Demaille  <akim@lrde.epita.fr>
63046         do-release-commit-and-tag: fix the previous commit
63047         * build-aux/do-release-commit-and-tag: Actually the test was right,
63048         but the comment and the error message were misleading.
63049         Fix comment, and improve error message.
63050         Perform check first, so that NEWS is not modified uselessly.
63052         do-release-commit-and-tag: fix typo
63053         * build-aux/do-release-commit-and-tag: Be sure that NEWS does
63054         _not_ start with a stub.
63056 2012-07-04  Paul Eggert  <eggert@cs.ucla.edu>
63058         pthread: check for pthread_create, not pthread_join
63059         * m4/pthread.m4 (gl_PTHREAD_CHECK): Check for pthread_create, not
63060         pthread_join.  On FreeBSD 9, pthread_create is in libpthread but
63061         pthread_join in libc.  I hope this removes the need for all the
63062         OSF/1 5.1 pthread_join business.  Reported by Richard Yao in
63063         <http://lists.gnu.org/r/bug-gnulib/2012-07/msg00042.html>.
63065 2012-07-04  Jim Meyering  <meyering@redhat.com>
63067         parse-datetime: fix failure to diagnose invalid input
63068         date -d "$(printf '\xb0')" would print 00:00:00 with today's date
63069         rather than diagnosing the invalid input.  Now it reports this:
63070         date: invalid date '\260'
63071         * lib/parse-datetime.y (to_uchar): Define.
63072         (yylex): Don't sign-extend "other" bytes.
63073         * m4/parse-datetime.m4: Require AC_C_INLINE for first use of "inline".
63074         Thanks to Bruno Haible for the patch to this file.
63075         * tests/test-parse-datetime.c (main): Add a test to trigger the bug.
63076         Peter Evans reported the bug in GNU date: http://bugs.gnu.org/11843
63078 2012-07-03  Jim Meyering  <meyering@redhat.com>
63080         bootstrap: do not require now-removed build-aux/missing
63081         Now that build-aux/missing is, er, missing, bootstrap would
63082         silently fail.
63083         * build-aux/bootstrap (gnulib_extra_files): Remove $build_aux/missing
63084         from the list, now that (since commit v0.0-7489-gd0f486f) the file is
63085         no longer part of gnulib.
63086         Diagnose the failure.
63088 2012-07-03  Paul Eggert  <eggert@cs.ucla.edu>
63090         alloca: add support for HP NonStop TNS/E native
63091         * lib/alloca.in.h (alloca): Support the new host.
63092         From a suggestion by Joachim Schmitz in
63093         <http://lists.gnu.org/r/bug-gnulib/2012-06/msg00355.html>.
63095 2012-07-02  Pádraig Brady  <P@draigBrady.com>
63097         fsusage: remove code not needed on non GNU/Linux systems.
63099         * lib/fsusage.c [STAT_STATVFS || STAT_STATVFS64]:
63100         Don't include headers no longer needed in this case.
63101         * lib/fsusage.c [STAT_STATVFS &&
63102         ! (__linux__ && (__GLIBC__||__UCLIBC__))]: Undefine
63103         STAT_STATFS2_FRSIZE to exclude code not used in this case.
63105 2012-07-02  Paul Eggert  <eggert@cs.ucla.edu>
63107         fsusage: include files needed for glibc 2.6 fallback
63108         * lib/fsusage.c [STAT_STATVFS || STAT_STATVFS64]:
63109         Include <sys/param.h>, <sys/mount.h>, <sys/vfs.h>
63110         as they are needed for the 2.6 < glibc/Linux < 2.6.36 fallback.
63111         Problem reported by Ludovic Courtès in
63112         <http://lists.gnu.org/r/bug-gnulib/2012-07/msg00005.html>.
63114         fsusage: avoid needless check on GNU/Linux
63115         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Omit STAT_STATFS3_OSF1 check
63116         on GNU/Linux systems, since it can't possibly work.
63118 2012-07-01  Bruno Haible  <bruno@clisp.org>
63120         log: Fix an autoconf >= 2.64 warning.
63121         * modules/log (configure.ac): Require, not invoke, gl_FUNC_LOG.
63122         Reported by Carlos O'Donell <carlos_odonell@mentor.com>.
63124 2012-06-28  Bruno Haible  <bruno@clisp.org>
63126         log10f: Fix possible configuration problem.
63127         * m4/log10f.m4 (gl_FUNC_LOG10F): Augment LIBS by $LOG10F_LIBM, not
63128         $LOGF_LIBM.
63129         Reported by Carlos O'Donell <carlos_odonell@mentor.com>.
63131 2012-06-28  Bruno Haible  <bruno@clisp.org>
63133         remove: No longer override on all platforms. Fixes bug from 2010-03-20.
63134         * m4/remove.m4 (gl_FUNC_REMOVE): Test gl_cv_func_unlink_honors_slashes,
63135         not gl_cv_func_unlink_works.
63136         Reported by Carlos O'Donell <carlos_odonell@mentor.com>.
63138 2012-06-27  Eric Blake  <eblake@redhat.com>
63140         config: drop scripts that automake says are not independent
63141         * config/srclist.txt: Drop elisp-comp, missing, and ylwrap.
63142         * build-aux/elisp-comp: Delete.
63143         * build-aux/missing: Likewise.
63144         * build-aux/ylwrap: Likewise.
63145         * modules/elisp-comp: Likewise.
63146         * MODULES.html.sh: Drop mention of elisp-comp.
63147         * NEWS: Mention this.
63149 2012-06-26  Paul Eggert  <eggert@cs.ucla.edu>
63151         root-uid: new module
63152         This is for portability to Tandem's NonStop Kernel.
63153         * lib/root-uid.h, modules/root-uid: New files.
63154         * lib/euidaccess.c, lib/pt_chown.c, lib/unlinkdir.c:
63155         * lib/write-any-file.c, tests/test-sethostname2.c:
63156         Include "root-uid.h".
63157         * lib/euidaccess.c (euidaccess):
63158         * lib/pt_chown.c (main):
63159         * lib/unlinkdir.c (cannot_unlink_dir):
63160         * lib/write-any-file.c (can_write_any_file):
63161         * m4/mknod.m4 (gl_FUNC_MKNOD):
63162         * tests/test-sethostname2.c (geteuid, main):
63163         Don't assume ROOT_UID == 0.
63164         * modules/euidaccess (Depends-on):
63165         * modules/pt_chown (Depends-on):
63166         * modules/sethostname-tests (Depends-on):
63167         * modules/unlinkdir (Depends-on):
63168         * modules/write-any-file (Depends-on):
63169         Add root-uid.
63171         regex: use locale-independent comparison for codeset name
63172         See Bruno Haible's comment in <http://bugs.gnu.org/10305#120>.
63173         * lib/regcomp.c (init_dfa): Use just ASCII case comparison
63174         for codeset name.
63175         * lib/regex_internal.h: Do not include <strings.h>, since we
63176         no longer use strcasecmp.
63177         * modules/regex (Depends-on): Remove strcase.
63179 2012-06-23  Bruno Haible  <bruno@clisp.org>
63181         getopt-posix: No longer guarantee that option processing is resettable.
63182         * doc/posix-functions/getopt.texi: Drop description of problem with
63183         internal state. Fix info about mingw and msvc9.
63184         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Don't require a resettable
63185         option processing by getopt(). Run three test programs instead of one.
63186         Simplify cross-compilation guess.
63187         * NEWS: Mention the change.
63188         Reported by Rich Felker <dalias@aerifal.cx>.
63190 2012-06-26  Bruno Haible  <bruno@clisp.org>
63192         argp, regex: Ensure strcasecmp gets declared.
63193         * lib/argp-help.c: Include <strings.h>.
63194         * lib/regex_internal.h: Likewise.
63195         Reported and suggested by Joachim Schmitz <jojo@schmitz-digital.de>.
63197 2012-06-24  Bruno Haible  <bruno@clisp.org>
63199         ptsname_r: Make it consistent with ptsname on AIX.
63200         * lib/ptsname_r.c (__ptsname_r): For AIX, use nearly the same
63201         implementation as for OSF/1.
63202         * tests/test-ptsname_r.c (main) [AIX]: Use the modern way of opening
63203         a pty master.
63205         ptsname_r: Make it consistent with ptsname on OSF/1.
63206         * lib/ptsname_r.c (__ptsname_r): Add a different implementation for
63207         OSF/1.
63209 2012-06-24  Bruno Haible  <bruno@clisp.org>
63211         ttyname_r: Fix result on OSF/1, Solaris.
63212         * lib/ttyname_r.c (ttyname_r): Produce a NUL-terminated result.
63214 2012-06-24  Bruno Haible  <bruno@clisp.org>
63216         ptsname_r: Add support for Solaris.
63217         * lib/ptsname_r.c (__ptsname_r): Add a different implementation for
63218         Solaris.
63220         ptsname_r: Fix test failure on native Windows.
63221         * modules/ptsname_r (Depends-on): Add isatty.
63223         ptsname_r: Fix test failures on IRIX, Solaris.
63224         * m4/ptsname_r.m4 (gl_PREREQ_PTSNAME_R): Test whether isatty sets
63225         errno when it fails. Define ISATTY_FAILS_WITHOUT_SETTING_ERRNO
63226         accordingly.
63227         * lib/ptsname_r.c: Include <fcntl.h>.
63228         (__ptsname_r): When isatty returned false, then on IRIX, Solaris
63229         set errno if fd is invalid.
63230         * tests/test-isatty.c (main): Update comments.
63232 2012-06-24  Bruno Haible  <bruno@clisp.org>
63234         ptsname test: Extend test.
63235         * tests/test-ptsname.c: Include <errno.h>.
63236         (main): Test behaviour with invalid file descriptor.
63238 2012-06-23  Paul Eggert  <eggert@cs.ucla.edu>
63240         time: fix obsolete comment
63241         * m4/time_h.m4 (gl_CHECK_TYPE_STRUCT_TIMESPEC): Remove obsolete
63242         reference to HAVE_STRUCT_TIMESPEC in comment.
63244 2012-06-23  Bruno Haible  <bruno@clisp.org>
63246         getopt-gnu: Handle suboptimal getopt_long's abbreviation handling.
63247         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): If getopt_long exists but
63248         does not handle abbreviated long options with equivalent
63249         disambiguations, set gl_replace_getopt to yes.
63250         * doc/posix-functions/getopt.texi: Mention the OpenBSD 5.0 problem.
63252 2012-06-22  Paul Eggert  <eggert@cs.ucla.edu>
63254         time_r: fix typo that always overrode localtime_r decl
63255         * m4/time_r.m4 (gl_TIME_R): Use AC_CHECK_DECLS, not
63256         AC_CHECK_DECLS_ONCE, since localtime_r is declared in <time.h>,
63257         not in a standard include.
63259 2012-06-22  Bruno Haible  <bruno@clisp.org>
63261         Write "Mac OS X" instead of "MacOS X".
63262         * README: Write "Mac OS X" instead of "MacOS X".
63263         * build-aux/bootstrap: Likewise.
63264         * build-aux/install-reloc: Likewise.
63265         * lib/acl-internal.h: Likewise.
63266         * lib/acl_entries.c: Likewise.
63267         * lib/argp-ba.c: Likewise.
63268         * lib/argp-pv.c: Likewise.
63269         * lib/config.charset: Likewise.
63270         * lib/copy-acl.c: Likewise.
63271         * lib/csharpexec.c: Likewise.
63272         * lib/euidaccess.c: Likewise.
63273         * lib/fbufmode.c: Likewise.
63274         * lib/fflush.c: Likewise.
63275         * lib/file-has-acl.c: Likewise.
63276         * lib/filemode.h: Likewise.
63277         * lib/fpurge.c: Likewise.
63278         * lib/freadable.c: Likewise.
63279         * lib/freadahead.c: Likewise.
63280         * lib/freading.c: Likewise.
63281         * lib/freadptr.c: Likewise.
63282         * lib/freadseek.c: Likewise.
63283         * lib/fseeko.c: Likewise.
63284         * lib/fseterr.c: Likewise.
63285         * lib/fsusage.c: Likewise.
63286         * lib/fwritable.c: Likewise.
63287         * lib/fwriting.c: Likewise.
63288         * lib/get-rusage-as.c: Likewise.
63289         * lib/get-rusage-data.c: Likewise.
63290         * lib/getdomainname.c: Likewise.
63291         * lib/idpriv-drop.c: Likewise.
63292         * lib/idpriv-droptemp.c: Likewise.
63293         * lib/localcharset.c: Likewise.
63294         * lib/locale.in.h: Likewise.
63295         * lib/localename.c: Likewise.
63296         * lib/mbsrtowcs-state.c: Likewise.
63297         * lib/nproc.c: Likewise.
63298         * lib/passfd.c: Likewise.
63299         * lib/posix_openpt.c: Likewise.
63300         * lib/printf-parse.c: Likewise.
63301         * lib/progreloc.c: Likewise.
63302         * lib/safe-read.h: Likewise.
63303         * lib/safe-write.h: Likewise.
63304         * lib/sched.in.h: Likewise.
63305         * lib/set-mode-acl.c: Likewise.
63306         * lib/signal.in.h: Likewise.
63307         * lib/stdint.in.h: Likewise.
63308         * lib/stdio-impl.h: Likewise.
63309         * lib/stdlib.in.h: Likewise.
63310         * lib/strtod.c: Likewise.
63311         * lib/sys_select.in.h: Likewise.
63312         * lib/tcgetsid.c: Likewise.
63313         * lib/unistd.in.h: Likewise.
63314         * lib/unlockpt.c: Likewise.
63315         * lib/vasnprintf.c: Likewise.
63316         * lib/vma-iter.c: Likewise.
63317         * lib/wcsrtombs-state.c: Likewise.
63318         * m4/acl.m4: Likewise.
63319         * m4/acosl.m4: Likewise.
63320         * m4/asinl.m4: Likewise.
63321         * m4/atanl.m4: Likewise.
63322         * m4/c-stack.m4: Likewise.
63323         * m4/cosl.m4: Likewise.
63324         * m4/expl.m4: Likewise.
63325         * m4/extensions.m4: Likewise.
63326         * m4/fdatasync.m4: Likewise.
63327         * m4/fmal.m4: Likewise.
63328         * m4/frexp.m4: Likewise.
63329         * m4/frexpf.m4: Likewise.
63330         * m4/frexpl.m4: Likewise.
63331         * m4/fsusage.m4: Likewise.
63332         * m4/getdomainname.m4: Likewise.
63333         * m4/getloadavg.m4: Likewise.
63334         * m4/getopt.m4: Likewise.
63335         * m4/gettext.m4: Likewise.
63336         * m4/gnulib-common.m4: Likewise.
63337         * m4/intdiv0.m4: Likewise.
63338         * m4/intlmacosx.m4: Likewise.
63339         * m4/largefile.m4: Likewise.
63340         * m4/ldexpl.m4: Likewise.
63341         * m4/link-follow.m4: Likewise.
63342         * m4/locale-ar.m4: Likewise.
63343         * m4/locale-fr.m4: Likewise.
63344         * m4/locale-ja.m4: Likewise.
63345         * m4/locale-tr.m4: Likewise.
63346         * m4/locale-zh.m4: Likewise.
63347         * m4/locale_h.m4: Likewise.
63348         * m4/lock.m4: Likewise.
63349         * m4/logl.m4: Likewise.
63350         * m4/mathfunc.m4: Likewise.
63351         * m4/minus-zero.m4: Likewise.
63352         * m4/mktime.m4: Likewise.
63353         * m4/mmap-anon.m4: Likewise.
63354         * m4/multiarch.m4: Likewise.
63355         * m4/nanosleep.m4: Likewise.
63356         * m4/nocrash.m4: Likewise.
63357         * m4/poll.m4: Likewise.
63358         * m4/printf-frexpl.m4: Likewise.
63359         * m4/printf.m4: Likewise.
63360         * m4/signbit.m4: Likewise.
63361         * m4/sinl.m4: Likewise.
63362         * m4/sqrtl.m4: Likewise.
63363         * m4/strerror_r.m4: Likewise.
63364         * m4/tanl.m4: Likewise.
63365         * m4/threadlib.m4: Likewise.
63366         * m4/ttyname_r.m4: Likewise.
63367         * m4/unlink.m4: Likewise.
63368         * m4/visibility.m4: Likewise.
63369         * m4/wcwidth.m4: Likewise.
63370         * tests/minus-zero.h: Likewise.
63371         * tests/test-alloca-opt.c: Likewise.
63372         * tests/test-copy-acl.sh: Likewise.
63373         * tests/test-copy-file.sh: Likewise.
63374         * tests/test-fdatasync.c: Likewise.
63375         * tests/test-file-has-acl.sh: Likewise.
63376         * tests/test-flock.c: Likewise.
63377         * tests/test-fsync.c: Likewise.
63378         * tests/test-localename.c: Likewise.
63379         * tests/test-malloca.c: Likewise.
63380         * tests/test-nonblocking-pipe.h: Likewise.
63381         * tests/test-nonblocking-socket.h: Likewise.
63382         * tests/test-openpty.c: Likewise.
63383         * tests/test-posix_openpt.c: Likewise.
63384         * tests/test-ptsname.c: Likewise.
63385         * tests/test-ptsname_r.c: Likewise.
63386         * tests/test-sameacls.c: Likewise.
63387         * tests/test-select.h: Likewise.
63388         * tests/test-set-mode-acl.sh: Likewise.
63389         * tests/test-snprintf-posix.h: Likewise.
63390         * tests/test-sprintf-posix.h: Likewise.
63391         * tests/test-strtod.c: Likewise.
63392         * tests/test-time.c: Likewise.
63393         * tests/test-vasnprintf-posix.c: Likewise.
63394         * tests/test-vasprintf-posix.c: Likewise.
63395         * doc/acl-resources.txt: Likewise.
63396         * doc/**/*.texi: Likewise.
63397         Reported by Max Horn <max@quendi.de>.
63399 2012-06-22  Bruno Haible  <bruno@clisp.org>
63401         grantpt: Relax requirement regarding invalid file descriptors.
63402         * lib/grantpt.c: Don't include <fcntl.h>.
63403         (grantpt): Don't verify the validity of the file descriptor.
63404         * modules/grantpt (Depends-on): Remove fcntl-h.
63405         * tests/test-grantpt.c (main): Allow grantpt to succeed for invalid
63406         file descriptors.
63407         * doc/posix-functions/grantpt.texi: Document more platforms on which
63408         grantpt succeeds for invalid file descriptors.
63409         Reported by Rich Felker <dalias@aerifal.cx>.
63411 2012-06-22  Bruno Haible  <bruno@clisp.org>
63413         fbufmode test: Don't test unportable behaviour.
63414         * tests/test-fbufmode.c (test_mode): New function, extracted from main.
63415         (main): Invoke it three times.
63416         Reported by Szabolcs Nagy <nsz@port70.net>
63417         and Rich Felker <dalias@aerifal.cx>.
63419 2012-06-21  Bruno Haible  <bruno@clisp.org>
63421         gnulib-tool: Refactor inctests variable.
63422         * gnulib-tool: Normalize inctests to 'true' or 'false', not ''.
63423         (func_modules_transitive_closure,
63424         func_modules_transitive_closure_separately,
63425         func_import, func_create_testdir): Update.
63427         gnulib-tool: --create-[mega]testdir, --[mega]test implies --with-tests.
63428         * gnulib-tool: Accept option --without-tests.
63429         (func_usage): Document --without-tests option. Rearrange.
63430         (inctests): Normalize according to the mode.
63431         * NEWS: Mention the change.
63432         Suggested by Simon Josefsson.
63434 2012-06-21  Bruce Korb  <bkorb@gnu.org>
63436         parse-duration test: Avoid spurious output.
63437         * tests/test-parse-duration.sh: Reindent with leading tabs.
63439 2012-06-21  Jim Meyering  <meyering@redhat.com>
63441         maint: disable the strncpy prohibition
63442         * cfg.mk: Do not prohibit strncpy here.
63444 2012-06-21  Bruno Haible  <bruno@clisp.org>
63446         nonblocking: Avoid compilation error on mingw64.
63447         * m4/stdio_h.m4 (gl_STDIO_H): Invoke gl_MODULE_INDICATOR for scanf,
63448         fscanf.
63449         * modules/vscanf (configure.ac): Invoke gl_MODULE_INDICATOR.
63450         * modules/vfscanf (configure.ac): Likewise.
63451         * lib/stdio-read.c (scanf, fscanf, vscanf, vfscanf): Enable function
63452         definition only if stdio.h has prepared it.
63453         Reported by Daniel P. Berrange <berrange@redhat.com>.
63455 2012-06-20  Bernd Jendrissek  <bernd.jendrissek@gmail.com>  (tiny change)
63457         gnulib-tool: Use readlink if it is available.
63458         * gnulib-tool (func_readlink): Choose function more appropriately.
63460 2012-06-21  Paul Eggert  <eggert@cs.ucla.edu>
63462         posixtm-tests: port to buggy compiler
63463         Problem reported by Simon Josefsson in
63464         <http://lists.gnu.org/r/bug-gnulib/2012-06/msg00246.html>.
63465         * modules/posixtm-tests (Depends-on): Add stdint.
63466         * tests/test-posixtm.c (struct posixtm_test.t_expected):
63467         Now of type int_least64_t, not int64_t, both because that's
63468         what INT64_C returns and because int_least64_t works even
63469         on 72-bit hosts.
63470         (T): Use INT64_C on constants outside the traditional int range,
63471         to work around compiler bug noted by Simon.
63473         mktime: fix integer overflow in 'configure'-time test
63474         * m4/mktime.m4 (gl_FUNC_MKTIME): Do not rely on undefined behavior
63475         after integer overflow.  Problem reported by Rich Felker in
63476         <http://lists.gnu.org/r/bug-gnulib/2012-06/msg00257.html>.
63477         Also, don't look for further instances of a bug if we've already
63478         found one instance; this helps 'configure' run faster.
63480 2012-06-20  John Darrington  <john@darrington.wattle.id.au>  (tiny change)
63482         tmpfile, clean-temp: Fix invocation of GetVersionEx.
63483         * lib/tmpfile.c (supports_delete_on_close): Initialize parameter for
63484         GetVersionEx correctly.
63485         * lib/clean-temp.c (supports_delete_on_close): Likewise.
63487 2012-06-20  Bruno Haible  <bruno@clisp.org>
63489         fdopen: Allow implementations that don't reject invalid fd arguments.
63490         * m4/fdopen.m4 (gl_FUNC_FDOPEN): Let the test pass if fdopen(-1,...)
63491         succeeds.
63492         Reported by Rich Felker <dalias@aerifal.cx>.
63494 2012-06-20  Simon Josefsson  <simon@josefsson.org>
63496         * modules/parse-duration-tests (test_parse_duration_LDADD): Don't
63497         bring in LIBINTL.
63499 2012-06-20  Paul Eggert  <eggert@cs.ucla.edu>
63501         init.sh: do not rely on autoupated PWD
63502         This addresses symptoms of the problem reported by Nelson H.F. Beebe in
63503         <http://lists.gnu.org/r/bug-gzip/2012-06/msg00008.html>.
63504         Although Nelson's bug was not necessarily fixed by this patch,
63505         it seems wise to make the change for safety.
63506         * tests/init.sh (path_prepend_): Do not rely on PWD updating
63507         automagically after 'cd'; this is not reliable on older shells.
63508         (setup_): Fail if we cannot cd to temporary directory.
63510 2012-06-19  Bruno Haible  <bruno@clisp.org>
63512         stat, fstat: Avoid warnings on mingw64.
63513         * lib/stat.c (stat) [_GL_WINDOWS_64_BIT_ST_SIZE]: Undefine before
63514         redefining.
63515         * lib/fstat.c (stat, fstat) [_GL_WINDOWS_64_BIT_ST_SIZE]: Likewise.
63516         Reported by Daniel P. Berrange <berrange@redhat.com>.
63518 2012-06-19  Bruno Haible  <bruno@clisp.org>
63520         stdioext: Add support for musl libc.
63522         * m4/fbufmode.m4 (gl_FUNC_FBUFMODE): Test whether __fbufsize exists.
63523         * lib/fbufmode.c (fbufmode): Add conditional code for musl.
63525         * m4/fseterr.m4: New file.
63526         * lib/fseterr.h (fseterr): Define as an alias of __fseterr if that
63527         function exists.
63528         * modules/fseterr (Files): Add m4/fseterr.m4.
63529         (configure.ac): Invoke gl_FUNC_FSETERR. Compile fseterr.c if
63530         __fseterr does not exist.
63531         (Makefile.am): Remove fseterr.c from lib_SOURCES.
63533         * lib/freadable.h: Update comment.
63535         * lib/fwritable.h: Update comment.
63537         * lib/freading.h: Update comment.
63539         * lib/fwriting.h: Update comment.
63541         * m4/freadahead.m4: New file.
63542         * lib/freadahead.h (freadahead): Define as an alias of __freadahead if
63543         that function exists.
63544         * modules/freadahead (Files): Add m4/freadahead.m4.
63545         (configure.ac): Invoke gl_FUNC_FREADAHEAD. Compile freadahead.c if
63546         __freadahead does not exist.
63547         (Makefile.am): Remove freadahead.c from lib_SOURCES.
63549         * m4/freadptr.m4: New file.
63550         * lib/freadptr.h (freadptr): Define as an alias of __freadptr if that
63551         function exists.
63552         * modules/freadptr (Files): Add m4/freadptr.m4.
63553         (configure.ac): Invoke gl_FUNC_FREADPTR. Compile freadptr.c if
63554         __freadptr does not exist.
63555         (Makefile.am): Remove freadptr.c from lib_SOURCES.
63557         * m4/freadseek.m4: New file.
63558         * lib/freadseek.c (freadptrinc): Use __freadptrinc if that function
63559         exists.
63560         * modules/freadseek (Files): Add m4/freadseek.m4.
63561         (configure.ac): Invoke gl_FUNC_FREADSEEK.
63563         * lib/fpurge.c (fpurge): Update comment.
63565         Reported by and with help from Rich Felker <dalias@aerifal.cx>.
63567 2012-06-19  Bruno Haible  <bruno@clisp.org>
63569         *printf-posix: Put more info into config.log.
63570         * m4/printf.m4 (gl_PRINTF_ENOMEM): Emit conftest's error output and
63571         exit code into config.log.
63573 2012-06-19  Bruno Haible  <bruno@clisp.org>
63575         getopt-gnu: Fix exit code overflow in autoconf test.
63576         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Squash exit code values,
63577         to keep them below < 128.
63579 2012-06-17  Jim Meyering  <meyering@redhat.com>
63581         maint.mk: fix typo in code to derive GPG key at release time
63582         * top/maint.mk (gpg_key_ID): Fix typo: $3 -> $$3
63584 2012-06-17  Paul Eggert  <eggert@cs.ucla.edu>
63586         regex: avoid warning when pointers are not long
63587         * lib/regcomp.c (parse_dup_op, mark_opt_subexp): Cast between void *
63588         and uintptr_t, not long, for portability to hosts where pointers and
63589         long have different sizes.  Issue noted by Daniel P. Berrange in
63590         <http://lists.gnu.org/r/bug-gnulib/2012-06/msg00122.html>
63591         and fix suggested by Bruno Haible in
63592         <http://lists.gnu.org/r/bug-gnulib/2012-06/msg00128.html>.
63594 2012-06-17  Bruno Haible  <bruno@clisp.org>
63596         dummy: Relicense into the public domain.
63597         * modules/dummy (License): Set to "public domain".
63598         Suggested by Reuben Thomas.
63600 2012-06-12  Akim Demaille  <akim@lrde.epita.fr>
63602         announce-gen: VPATH issues
63603         * build-aux/announce-gen (--srcdir): New option, used to trim the
63604         $srcdir part of the path from $builddir to NEWS.
63605         * top/maint.mk (announcement): Adjust.
63607 2012-06-12  Akim Demaille  <akim@lrde.epita.fr>
63609         gnu-web-doc-update: VPATH builds
63610         * build-aux/gnu-web-doc-update (--builddir): New option.
63611         Revamp the handling of options.
63612         Prefer $(...) to `...`.
63613         Don't pass --tmpdir=. to mktemp, it is useless given that we specify
63614         the template, and it is GNU mktemp specific.
63615         Prefer set -e to long series of &&.
63616         Restore the initial git branch, not "master".
63617         Properly initialize submodules (don't rely only on bootstrap).
63618         Do not reconfigure blindly, use config.status.
63619         * top/README-release: Update instructions for gnu-web-doc-update.
63621 2012-06-11  Jim Meyering  <meyering@redhat.com>
63623         maint.mk: revert most of the previous change re "all these"
63624         * top/maint.mk (prohibit_undesirable_word_seq_RE_): Remove that pair.
63625         For rationale, see the discussion at
63626         http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/30912
63628 2012-06-10  Karl Berry  <karl@gnu.org>
63630         * build-aux/gnupload: with --dry-run, do not ask for gpg pw.
63632         * build-aux/gnupload: implement --replace, ftp-upload protocol v1.2.
63634 2012-06-10  Bruce Korb  <bkorb@gnu.org>
63636         parse-duration: Relicense under LGPLv2+.
63637         * modules/parse-duration (License): Change to LGPLv2+.
63639 2012-06-10  Jim Meyering  <meyering@redhat.com>
63641         maint.mk: prohibit common grammar error: "all these"
63642         * top/maint.mk (prohibit_undesirable_word_seq_RE_): Add "all these" to
63643         the list of prohibited word sequences.  It should be "all of these".
63644         * lib/tempname.c (__gen_tempname): Fix one of them.
63646 2012-06-07  Akim Demaille  <akim@lrde.epita.fr>
63648         do-release-commit-and-tag: support VPATH builds
63649         * build-aux/do-release-commit-and-tag: Prefer $(...) to `...`.
63650         (noteworthy): Defined earlier to factor its value.
63651         (noteworthy_stub): New.
63652         Use it to factor.
63653         (help_version): Split into...
63654         (help, version): these.
63655         Adjust the option processing part.
63656         Support "--option=value" in addition to "--option value".
63657         (builddir): New.
63658         (--builddir): New option.
63659         * top/README-release: Document this.
63660         Reword slightly so that the reader cannot understand that he
63661         has to do these steps before calling do-release-commit-and-tag.
63663 2012-06-07  Akim Demaille  <akim@lrde.epita.fr>
63665         readme-release: also require announce-gen and maintainer-makefile
63666         * modules/readme-release (Depends-on): here.
63667         * modules/announce-gen, modules/do-release-commit-and-tag,
63668         modules/gnu-web-doc-update, modules/maintainer-makefile
63669         (Description): Point to readme-release.
63671 2012-06-07  Akim Demaille  <akim@lrde.epita.fr>
63673         maint.mk: fix VPATH issues.
63674         * top/maint.mk (news-check): GNU Make understand $< very well.
63675         (release-prep): NEWS is in $(srcdir).
63677 2012-06-05  Akim Demaille  <akim@lrde.epita.fr>
63679         readme-release: require the promoted modules.
63680         * modules/readme-release (Depends-on): Add
63681         do-release-commit-and-tag, gnupload, and gnu-web-doc-update, used
63682         in this text.
63684 2012-05-21  Paolo Bonzini  <bonzini@gnu.org>
63685             Bruno Haible  <bruno@clisp.org>
63687         error, strerror-override: Support mingw64 from Fedora 17.
63688         * lib/errno.in.h (GNULIB_defined_ESTREAMS): Use a different indicator
63689         for ETXTBSY, ENODATA, ENOSR, ENOSTR, ETIME, EOTHER, compared to
63690         EINPROGRESS.
63691         * lib/strerror-override.h (strerror_override): Test it.
63692         * lib/strerror-override.c (strerror_override): Likewise.
63693         * m4/errno_h.m4 (gl_HEADER_ERRNO_H): Test also ETXTBSY.
63695 2012-05-21  Paolo Bonzini  <bonzini@gnu.org>
63696             Bruno Haible  <bruno@clisp.org>
63698         error, strerror-override: Support mingw64 from Fedora 17.
63699         * lib/errno.in.h (GNULIB_defined_ENOTRECOVERABLE): Use a different
63700         indicator for ENOTRECOVERABLE, compared to EOWNERDEAD.
63701         * lib/strerror-override.h (strerror_override): Test it.
63702         * lib/strerror-override.c (strerror_override): Likewise.
63704 2012-06-03  Bruno Haible  <bruno@clisp.org>
63706         error, strerror-override: Support new errno values from POSIX:2008.
63707         * m4/errno_h.m4 (gl_HEADER_ERRNO_H): Test also EOWNERDEAD and
63708         ENOTRECOVERABLE.
63709         * lib/errno.in.h (EOWNERDEAD, ENOTRECOVERABLE): Define on all
63710         platforms.
63711         * lib/strerror-override.c (strerror_override): Conditionalize the
63712         EOWNERDEAD, ENOTRECOVERABLE handling on GNULIB_defined_EOWNERDEAD.
63713         * lib/strerror-override.h (strerror_override): Declare also if
63714         GNULIB_defined_EOWNERDEAD is defined.
63715         * tests/test-errno.c (e130, e131): New variables.
63716         * doc/posix-headers/errno.texi: Mention the status for EOWNERDEAD,
63717         ENOTRECOVERABLE.
63718         Reported by Paolo Bonzini.
63720 2012-05-31  Jim Meyering  <meyering@redhat.com>
63722         savewd: add missing dependency on sys_wait module
63723         * modules/savewd (Depends-on): Add sys_wait, needed at least
63724         for MSVC.  Report and suggested change by Michael Goffioul.
63726 2012-05-29  Paul Eggert  <eggert@cs.ucla.edu>
63728         system-quote-tests: port to CentOS 5
63729         Problem reported by Tom G. Christensen in
63730         <http://lists.gnu.org/r/bug-gnulib/2012-05/msg00255.html>.
63731         * tests/test-system-quote-child.c (fclose, fprintf): Undef.
63733 2012-05-29  Jim Meyering  <meyering@redhat.com>
63735         maint: fix typos in comments and ChangeLog
63736         Culprits identified and fixed mostly automatically using these commands:
63737         git ls-files | misspellings -f - |grep -v '^ERROR:' |perl -pe \
63738         's/^(.*?)\[(\d+)\]: (\w+) -> "(.*?)"$/sed -i '\''${2}s!$3!$4!'\'' $1/'
63739         using http://github.com/lyda/misspell-check
63740         * ChangeLog: Fix typos.
63741         * doc/solaris-versions: Likewise.
63742         * lib/regexec.c (re_search_stub): Likewise.
63743         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Likewise.
63745 2012-05-27  Paul Eggert  <eggert@cs.ucla.edu>
63747         manywarnings: remove duplicate -Wmultichar entry
63748         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Remove duplicate
63749         entry for -Wmultichar.  -Wno-multichar is in the GCC 4.7.0 manual,
63750         so keep the entry marked as documented.
63752 2012-05-27  Karl Berry  <karl@gnu.org>
63754         * config/srclist.txt (mktime.c): remove last libc sync,
63755         perhaps just temporarily.
63757 2012-05-26  Paul Eggert  <eggert@cs.ucla.edu>
63759         regex: don't assume uint64_t or uint32_t
63760         * lib/regcomp.c (init_word_char): Don't assume that the types
63761         uint64_t and uint32_t exist.  The C standard doesn't guarantee
63762         them, and on some 32-bit compilers there is no uint64_t.
63763         Problem reported by Gianluigi Tiesi in
63764         <http://lists.gnu.org/r/bug-gnulib/2012-03/msg00154.html>.
63766 2012-05-25  Jim Meyering  <meyering@redhat.com>
63768         maint.mk: add strncpy-prohibiting syntax-check rule
63769         * top/maint.mk (sc_prohibit_strncpy): New rule, from coreutils.
63771 2012-05-24  Jim Meyering  <meyering@redhat.com>
63773         maint.mk: compute $(gpg_key_ID) more portably
63774         * top/maint.mk (gpg_key_ID): Use awk in place of sed '{...;...;}'.
63775         That use of sed is not portable to some fringe systems.
63776         Reported by Paul Eggert in
63777         http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/30793/focus=30802
63779 2012-05-23  Paul Eggert  <eggert@cs.ucla.edu>
63781         mktime: sync from glibc
63782         * config/srclist.txt: Uncomment mktime.c.
63783         * lib/mktime.c: Sync from glibc master.  This incorporates 3 changes.
63784         First, indent with tabs, since glibc uses tabs and doesn't want to
63785         change and we'd rather be identical to glibc.  Also, two small
63786         coding changes:
63787         (isdst_differ): Use &&, not &, as && is the usual style.
63788         (__mktime_internal): Rename local var from abs_diff to approx_abs_diff
63789         for clarity.
63791 2012-05-23  Akim Demaille  <akim@lrde.epita.fr>
63793         announce-gen: du -h is more portable than du --human
63794         * build-aux/announce-gen (sizes): Invoke du with -h instead
63795         of --human.  Accept leading white space in its output.
63797 2012-05-23  Akim Demaille  <akim@lrde.epita.fr>
63799         announce-gen: Improve diagnostics.
63800         * build-aux/announce-gen: When parsing command line options,
63801         prefer "announce-gen: option --release-type requires an argument"
63802         to "Option release-type requires an argument".
63804 2012-05-23  Akim Demaille  <akim@lrde.epita.fr>
63806         maint.mk: gpg_key_ID: use sed more portably
63807         * top/maint.mk (gpg_key_ID): End sed block with a semicolon before
63808         the closing brace.
63809         (refresh-po): Fuse two sed invocations into one.
63811 2012-05-15  Akim Demaille  <akim@lrde.epita.fr>
63813         gitlog-to-changelog: support the log message format used in Bison.
63814         * build-aux/gitlog-to-changelog: Support --strip-tab and
63815         --strip-cherry-picked.
63817 2012-05-21  Paolo Bonzini  <bonzini@gnu.org>
63819         poll/select: prevent busy-waiting.  SwitchToThread() only gives away
63820         the rest of the current time slice to another thread in the current
63821         process. So if the thread that feeds the file decscriptor we're
63822         polling is not in the current process, we get busy-waiting.
63823         * lib/poll.c: Use SleepEx(1, TRUE) instead of SwitchToThread().
63824         Patch from Theodore Leblond.
63825         * lib/select.c: Split polling out of the loop that sets the output
63826         fd_sets.  Check for zero result and loop if the wait timeout is
63827         infinite.
63829 2012-05-21  Simon Josefsson  <simon@josefsson.org>
63831         select: Fix build error on IRIX 6.5.
63832         * lib/select.c: Include stddef.h for NULL.
63834 2012-05-21  Simon Josefsson  <simon@josefsson.org>
63836         gc: fix libgcrypt detection on older machines.
63837         * m4/gc.m4: Reject libgcrypt earlier than 1.4.4.  Collapse
63838         copyright years because the file has been distributed every year
63839         since it was created.
63841 2012-05-18  Paul Eggert  <eggert@cs.ucla.edu>
63843         crypto: fix bug in large buffer handling
63844         Problem reported by Serge Belyshev for glibc in
63845         <http://sourceware.org/bugzilla/show_bug.cgi?id=14090> and for gnulib in
63846         <http://lists.gnu.org/r/bug-gnulib/2012-05/msg00226.html>.
63847         * lib/md4.c (md4_process_block):
63848         * lib/md5.c (md5_process_block):
63849         * lib/sha1.c (sha1_process_block):
63850         * lib/sha256.c (sha256_process_block):
63851         Don't assume the buffer length is less than 2**32.
63852         * lib/sha512.c (sha512_process_block): Likewise.
63853         Here, the bug is present only in the rare case where the host does
63854         not support uint64_t or where size_t is wider than 64 bits.
63855         Use u64size to work around the problems.
63856         * lib/u64.h (u64size): New macro.
63858 2012-05-15  Pádraig Brady  <P@draigBrady.com>
63860         fsusage: fix block size returned on older Linux 2.6
63862         * lib/fsusage.c: Fall back to (struct statfs).f_frsize
63863         which is available since Linux 2.6.
63864         * m4/fsusage.m4 (STAT_STATFS2_FRSIZE): Always define
63865         when the member is available so it can be used as a fallback.
63866         * doc/posix-functions/statvfs.texi: Mention the hang issue
63867         on Linux < 2.6.36.
63869 2012-05-14  Paul Eggert  <eggert@cs.ucla.edu>
63871         bootstrap: suppress stderr chatter
63872         * build-aux/bootstrap (insert_sorted_if_absent, main program):
63873         Omit unnecessary chatter to stderr.  The main program chatter
63874         was there only inadvertantly.
63876         bootstrap: .gitignore files created by autopoint, libtool
63877         I ran into this problem when bootstrapping the latest diffutils.
63878         After './bootstrap', 'git status' reported lots of untracked files
63879         m4/codeset.m4, m4/gettext.m4, etc.  These files were created by
63880         autopoint and do not need to be version-controlled.
63881         * build-aux/bootstrap: Put into .gitignore the files that
63882         autopoint and libtool create, by keeping track of files that exist
63883         after but not before these programs are run.
63884         (version_controlled_file): Move up.  2nd arg is now full file
63885         name, not base name; this is more convenient.  Put CVS at the end,
63886         as it's now somewhat deprecated.
63888 2012-05-14  Jim Meyering  <meyering@redhat.com>
63890         ignore-value.h: remove unused _GL_ATTRIBUTE_DEPRECATED definition
63891         * lib/ignore-value.h (_GL_ATTRIBUTE_DEPRECATED): Remove now-unused
63892         definition.  Reported by Bruno Haible.
63894 2012-05-13  Bruno Haible  <bruno@clisp.org>
63895             Paul Eggert  <eggert@cs.ucla.edu>
63897         binary-io: Define set_binary_mode function.
63898         * lib/binary-io.h (set_binary_mode): New function.
63899         (SET_BINARY): Define in terms of set_binary_mode.
63900         * modules/binary-io (configure.ac): Require AC_C_INLINE.
63901         * tests/test-binary-io.c (main): Accept an argument, and test either
63902         set_binary_mode or SET_BINARY depending on the argument.
63903         * tests/test-binary-io.sh: Invoke test-binary-io twice, with an
63904         argument. Clean up also t-bin-out0.tmp.
63906 2012-05-13  Stefano Lattarini  <stefano.lattarini@gmail.com>
63908         bootstrap: take advantage of POSIX shell features
63910         The 'bootstrap' script offered by Gnulib script already uses POSIX
63911         shell features (like $((...)) arithmetic expansions) that are not
63912         supported by legacy Bourne shells like Solaris 10 /bin/sh.  This
63913         means that bootstrap must already be run using a proper POSIX shell,
63914         which will thus provide more features, like ${var#pattern} parameter
63915         expansion or inversion of a command exit status with '!'.  We can
63916         thus use these features to improve the clarity and the performances
63917         of the bootstrap script.
63919         Suggested by Eric Blake.
63921         * build-aux/bootstrap: Prefer xpg4 parameter expansions over use
63922         of sed/expr plus command substitutions, to save some forks.  While
63923         we are at it, prefer the POSIX $(...) form of command substitution,
63924         rather than the legacy form `...` (since the former is visually
63925         clearer and interacts better with quoting), and prefer the idiom:
63926           "if ! CMD; then ACTION ..."
63927         over the idiom:
63928           "if CMD; then :; else ACTION ..."
63929         which was required by legacy Bourne shells not supporting '!'.
63931 2012-05-12  Bruno Haible  <bruno@clisp.org>
63933         system-quote: Add more comments.
63934         * lib/system-quote.h: Add more comments about wilcards and limitations.
63935         Suggested by Eli Zaretskii <eliz@gnu.org>.
63937         sh-quote, system-quote: Add comments about wildcards.
63938         * lib/sh-quote.h: Clarify what happens with wildcard characters.
63939         * lib/system-quote.h: Likewise.
63940         Reported by Eli Zaretskii <eliz@gnu.org>.
63942 2012-05-11  Paul Eggert  <eggert@cs.ucla.edu>
63944         fsusage: check for GNU/Linux statvfs problem dynamically
63945         * lib/fsusage.c [STAT_STATVFS && __linux__ && (__GLIBC__||__UCLIBC__)]:
63946         Define STAT_STATFS2_BSIZE too, since in this case the code now
63947         checks dynamically whether statvfs is reliable, falling back on
63948         Linux-style statfs otherwise.
63949         (statvfs_works): New function, for dynamically testing statvfs.
63950         (get_fs_usage) [STAT_STATVFS]: Use it.
63951         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Remove static check for
63952         statvfs on GNU/Linux hosts, since it's now done dynamically.
63954 2012-05-10  Bruno Haible  <bruno@clisp.org>
63956         system-quote, execute, spawn-pipe: Escape '?' on Windows.
63957         * lib/system-quote.c (SHELL_SPECIAL_CHARS, CMD_SPECIAL_CHARS): Add the
63958         '?' character.
63959         * lib/w32spawn.h (SHELL_SPECIAL_CHARS): Likewise.
63960         * tests/test-system-quote-main.c (check_all): Check also strings like
63961         "??????????".
63962         Reported by Eli Zaretskii <eliz@gnu.org>.
63964 2012-05-10  Paul Eggert  <eggert@cs.ucla.edu>
63966         _Noreturn: port config.h to gcc -Wundef
63967         * m4/gnulib-common.m4 (gl_COMMON_BODY): Check that __STDC_VERSION__ is
63968         defined before using it, for gcc -Wundef.  Reported by Akim Demaille in
63969         <http://lists.gnu.org/r/bug-gnulib/2012-05/msg00147.html>.
63971 2012-05-10  Bruno Haible  <bruno@clisp.org>
63973         system-quote: Refactor.
63974         * lib/system-quote.h (system_quote_copy): Fix comment.
63975         * lib/system-quote.c (windows_createprocess_quote, windows_cmd_quote):
63976         New functions, extracted from system_quote_copy.
63977         (system_quote_length, system_quote_copy): Use these functions.
63978         Reported by Paul Eggert.
63980 2012-05-08  Bruno Haible  <bruno@clisp.org>
63982         execute, spawn-pipe: Escape '*' characters in arguments on Windows.
63983         * lib/w32spawn.h (SHELL_SPECIAL_CHARS): Add the '*' character.
63985 2012-05-08  Bruno Haible  <bruno@clisp.org>
63987         Tests for module 'system-quote'.
63988         * modules/system-quote-tests: New file.
63989         * tests/test-system-quote.sh: New file.
63990         * tests/test-system-quote-main.c: New file.
63991         * tests/test-system-quote-child.c: New file.
63993         New module 'system-quote'.
63994         * lib/system-quote.h: New file.
63995         * lib/system-quote.c: New file.
63996         * modules/system-quote: New file.
63998 2012-05-08  Bruno Haible  <bruno@clisp.org>
64000         sh-quote: Make C++ safe and allow multiple inclusion.
64001         * lib/sh-quote.h: Add double-inclusion guard. For C++, wrap function
64002         declarations in extern "C".
64004 2012-05-08  Bruno Haible  <bruno@clisp.org>
64006         sh-quote tests: Make tests stricter.
64007         * tests/test-sh-quote.c (check_one): Check the return value of
64008         shell_quote_copy.
64009         (main): Check a string with a CR character. Check a string that
64010         contains UCHAR_MAX.
64012 2012-05-08  Akim Demaille  <akim@lrde.epita.fr>
64014         warnings.m4: provide a means to specify the program to compile.
64015         * m4/warnings.m4 (gl_COMPILER_OPTION_IF): New, extracted from...
64016         (gl_WARN_ADD): here.
64017         Use gl_AS_VAR_APPEND.
64018         Support an argument to specify the program to compile.
64019         (gl_WARN_ADD): Accept an argument to specify the program to compile.
64020         AC_SUBST the WARN_CFLAGS when they are used.
64021         * modules/warnings (configure.ac): Don't AC_SUBST WARN_CFLAGS,
64022         leave this to gl_WARN_ADD.
64024 2012-05-08  Eric Blake  <eblake@redhat.com>
64026         doc: recommendations on gettext version
64027         * doc/gnulib-tool.texi (gettextize and autopoint): Document the
64028         choice between versions.
64029         * DEPENDENCIES (gettext): Cover both approaches.
64031 2012-05-08  Jim Meyering  <meyering@redhat.com>
64033         init.sh: explain why EXEEXT support uses aliases rather than functions
64034         * tests/init.sh: Add a comment.
64036         init.sh: don't let bash aliases interfere with tests
64037         * tests/init.sh: Undefine any pre-defined aliases if the selected shell
64038         is bash.  This avoids problems for those who alias standard commands to
64039         non-conforming uses, like those reported in http://bugs.gnu.org/11256.
64040         Suggested by Tim Mooney <Tim.Mooney@ndsu.edu>.
64042 2012-05-07  Paul Eggert  <eggert@cs.ucla.edu>
64044         stdint: be more consistent with glibc, SunOS libc
64045         * lib/stdint.in.h (gl_int_fast8_t, gl_uint_fast8_t)
64046         (gl_int_fast16_t, gl_uint_fast16_t)
64047         (gl_int_fast32_t, gl_uint_fast32_t)
64048         (INT_FAST8_MIN, INT_FAST8_MAX, UINT_FAST8_MAX)
64049         (INT_FAST16_MIN, INT_FAST16_MAX, UINT_FAST16_MAX)
64050         (INT_FAST32_MIN, INT_FAST32_MAX, UINT_FAST32_MAX):
64051         Be consistent with glibc by default, and with SunOS 5.10 and later
64052         if __sun is defined.  This lessens the likelihood of clashes if
64053         code compiled for older hosts is combined with code compiled for
64054         newer ones.  Problem reported by Niels Möller in
64055         <http://lists.gnu.org/r/bug-gnulib/2012-05/msg00074.html>.
64057 2012-05-07  Eric Blake  <eblake@redhat.com>
64059         isatty: relax license to LGPLv2+
64060         * modules/isatty (License): Relax license.
64062 2012-05-06  Paul Eggert  <eggert@cs.ucla.edu>
64064         stat-size: comment fix
64065         * lib/stat-size.h: Remove obsolete comment about indenting.
64067 2012-05-06  Bruno Haible  <bruno@clisp.org>
64069         Tests for module 'sh-quote'.
64070         * modules/sh-quote-tests: New file.
64071         * tests/test-sh-quote.c: New file.
64073 2012-05-06  Bruno Haible  <bruno@clisp.org>
64075         sh-quote: Improve shell_quote_argv's signature.
64076         * lib/sh-quote.h (shell_quote_argv): Make argument array a 'const *'.
64077         * lib/sh-quote.c (shell_quote_argv): Likewise.
64079 2012-05-06  Paul Eggert  <eggert@cs.ucla.edu>
64081         stdint: document issues with int_fast8_t etc.
64082         * doc/posix-headers/stdint.texi (stdint.h): Say that other
64083         stdint.h substitutes may define these types differently.  See
64084         <http://lists.gnu.org/r/bug-gnulib/2012-05/msg00071.html>.
64086 2012-05-05  Bruno Haible  <bruno@clisp.org>
64088         nanosleep: Avoid guessing wrong when cross-compiling to Linux.
64089         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Require AC_CANONICAL_HOST. When
64090         cross-compiling, set gl_cv_func_nanosleep to either 'guessing no'
64091         or 'guessing no (mishandles large arguments)'.
64093 2012-05-05  Bruno Haible  <bruno@clisp.org>
64095         link-follow: Avoid guessing wrong when cross-compiling to glibc/Linux.
64096         * m4/link-follow.m4 (gl_FUNC_LINK_FOLLOWS_SYMLINK): Require
64097         AC_CANONICAL_HOST. When cross-compiling to a glibc/Linux platform,
64098         set gl_cv_func_link_follows_symlink to "guessing no".
64100 2012-05-05  Bruno Haible  <bruno@clisp.org>
64102         tzset: Avoid guessing wrong when cross-compiling to glibc systems.
64103         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Require AC_CANONICAL_HOST. When
64104         cross-compiling to a glibc platform, set gl_cv_func_tzset_clobber to
64105         "guessing no".
64106         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): Update.
64108 2012-05-05  Bruno Haible  <bruno@clisp.org>
64110         d-ino: Avoid guessing "no" when cross-compiling to glibc/Linux systems.
64111         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Require
64112         AC_CANONICAL_HOST. When cross-compiling to a glibc/Linux platform,
64113         set gl_cv_struct_dirent_d_ino to "guessing yes".
64115 2012-05-05  Bruno Haible  <bruno@clisp.org>
64117         fseeko-tests, ftello-tests: Avoid "guessing no" when cross-compiling.
64118         * m4/ungetc.m4 (gl_FUNC_UNGETC_WORKS): Require AC_CANONICAL_HOST. When
64119         cross-compiling to a glibc platform, set gl_cv_func_ungetc_works to
64120         "guessing yes".
64122 2012-05-05  Bruno Haible  <bruno@clisp.org>
64124         signbit: Avoid "guessing no" when cross-compiling to glibc systems.
64125         * m4/signbit.m4 (gl_SIGNBIT): Require AC_CANONICAL_HOST. When cross-
64126         compiling to a glibc system, set gl_cv_func_signbit and
64127         gl_cv_func_signbit_gcc to "guessing yes".
64129 2012-05-05  Bruno Haible  <bruno@clisp.org>
64131         strerror: Avoid "guessing no" when cross-compiling to glibc systems.
64132         * m4/strerror.m4 (gl_FUNC_STRERROR): Require AC_CANONICAL_HOST. When
64133         cross-compiling to a glibc platform, set gl_cv_func_working_strerror
64134         to "guessing yes".
64135         (gl_FUNC_STRERROR_0): Require AC_CANONICAL_HOST. When cross-compiling
64136         to a glibc platform, set gl_cv_func_strerror_0_works to "guessing yes".
64138 2012-05-05  Bruno Haible  <bruno@clisp.org>
64140         canonicalize[-lgpl]: Avoid "guessing no" when cross-compiling to glibc.
64141         * m4/canonicalize.m4 (gl_FUNC_REALPATH_WORKS): Require
64142         AC_CANONICAL_HOST. When cross-compiling to a glibc system, set
64143         gl_cv_func_realpath_works to "guessing yes".
64145 2012-05-05  Bruno Haible  <bruno@clisp.org>
64147         gettimeofday: Avoid bad guess when cross-compiling to glibc systems.
64148         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY_CLOBBER): Require
64149         AC_CANONICAL_HOST. When cross-compiling, guess no on glibc platforms.
64151 2012-05-04  Bruno Haible  <bruno@clisp.org>
64153         Tweak last commit.
64154         * m4/off_t.m4 (gl_TYPE_OFF_T): Tweak comments.
64155         * m4/unistd_h.m4 (gl_UNISTD_H): Likewise.
64157 2012-05-04  Paul Eggert  <eggert@cs.ucla.edu>
64159         unistd_h: make it easier to avoid sys_types_h
64160         This is useful for Emacs, which has its own method of porting to
64161         Windows, and which therefore does not need the sys_types_h module.
64162         * m4/off_t.m4: New file, defining gl_TYPE_OFF_T, which contains
64163         code moved here from gl_SYS_TYPES_H.
64164         * m4/sys_types_h.m4 (gl_SYS_TYPES_H): Require it instead of
64165         using the code directly.
64166         * m4/unistd_h.m4 (gl_UNISTD_H): Require gl_TYPE_OFF_T, not
64167         gl_SYS_TYPES_H.
64168         * modules/sys_types (Files):
64169         * modules/unistd (Files): Add m4/off_t.m4.
64171 2012-05-03  Bruno Haible  <bruno@clisp.org>
64173         lstat: Avoid "guessing no" when cross-compiling to glibc systems.
64174         * m4/lstat.m4 (gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): When cross-
64175         compiling, set gl_cv_func_lstat_dereferences_slashed_symlink to
64176         "guessing yes" or "guessing no".
64177         (gl_FUNC_LSTAT): Update.
64178         * m4/fstatat.m4 (gl_FUNC_FSTATAT): Update.
64179         * m4/openat.m4 (gl_FUNC_OPENAT): Update.
64180         * m4/unlinkat.m4 (gl_FUNC_UNLINKAT): Update.
64182 2012-05-03  Bruno Haible  <bruno@clisp.org>
64184         *alloc-gnu, eealloc: Avoid "guessing no" when cross-compiling to glibc.
64185         * m4/malloc.m4 (_AC_FUNC_MALLOC_IF): Override in autoconf < 2.70.
64186         * m4/realloc.m4 (_AC_FUNC_REALLOC_IF): Override in autoconf < 2.70.
64187         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Require AC_CANONICAL_HOST. When
64188         cross-compiling, choose the first alternative on glibc systems.
64189         * modules/eealloc (Files): Add m4/malloc.m4, m4/realloc.m4.
64191 2012-05-03  Bruno Haible  <bruno@clisp.org>
64193         getgroups: Avoid "guessing no" when cross-compiling to glibc systems.
64194         * m4/getgroups.m4 (AC_FUNC_GETGROUPS): Override in autoconf < 2.70.
64195         (gl_FUNC_GETGROUPS): Adapt to change of ac_cv_func_getgroups_works.
64197 2012-05-03  Bruno Haible  <bruno@clisp.org>
64199         chown: Avoid "guessing no" when cross-compiling to glibc systems.
64200         * m4/chown.m4 (AC_FUNC_CHOWN): Override in autoconf < 2.70.
64202 2012-05-03  Bruno Haible  <bruno@clisp.org>
64204         Avoid "guessing no" guesses when cross-compiling to glibc systems.
64205         * m4/cbrtl.m4 (gl_FUNC_CBRTL): Require AC_CANONICAL_HOST. When cross-
64206         compiling to glibc systems, set gl_cv_func_cbrtl_ieee to "guessing yes".
64207         * m4/ceil.m4 (gl_FUNC_CEIL): Require AC_CANONICAL_HOST. When cross-
64208         compiling to glibc systems, set gl_cv_func_ceil_ieee to "guessing yes".
64209         * m4/ceilf.m4 (gl_FUNC_CEILF): Require AC_CANONICAL_HOST. When cross-
64210         compiling to glibc systems, set gl_cv_func_ceilf_ieee to "guessing yes".
64211         * m4/ceill.m4 (gl_FUNC_CEILL): Require AC_CANONICAL_HOST. When cross-
64212         compiling to glibc systems, set gl_cv_func_ceill_ieee to "guessing yes".
64213         * m4/chown.m4 (gl_FUNC_CHOWN): Require AC_CANONICAL_HOST. When cross-
64214         compiling to glibc systems, set gl_cv_func_chown_slash_works,
64215         gl_cv_func_chown_ctime_works to "guessing yes".
64216         * m4/lchown.m4 (gl_FUNC_LCHOWN): Update.
64217         * m4/exp2l.m4 (gl_FUNC_EXP2L): Require AC_CANONICAL_HOST. When cross-
64218         compiling to glibc systems, set gl_cv_func_exp2l_ieee to "guessing yes".
64219         * m4/expm1.m4 (gl_FUNC_EXPM1): Require AC_CANONICAL_HOST. When cross-
64220         compiling to glibc systems, set gl_cv_func_expm1_ieee to "guessing yes".
64221         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require AC_CANONICAL_HOST. When cross-
64222         compiling to glibc systems, set gl_cv_func_open_directory_works to
64223         "guessing yes".
64224         * m4/fstat.m4 (gl_FUNC_FSTAT): Update.
64225         * m4/fdopendir.m4 (gl_FUNC_FDOPENDIR): Require AC_CANONICAL_HOST. When
64226         cross-compiling to glibc systems, set gl_cv_func_fdopendir_works to
64227         "guessing yes".
64228         * m4/floor.m4 (gl_FUNC_FLOOR): Require AC_CANONICAL_HOST. When cross-
64229         compiling to glibc systems, set gl_cv_func_floor_ieee to "guessing yes".
64230         * m4/floorf.m4 (gl_FUNC_FLOORF): Require AC_CANONICAL_HOST. When cross-
64231         compiling to glibc systems, set gl_cv_func_floorf_ieee to
64232         "guessing yes".
64233         * m4/fmod.m4 (gl_FUNC_FMOD): Require AC_CANONICAL_HOST. When cross-
64234         compiling to glibc systems, set gl_cv_func_fmod_ieee to "guessing yes".
64235         * m4/fmodf.m4 (gl_FUNC_FMODF): Require AC_CANONICAL_HOST. When cross-
64236         compiling to glibc systems, set gl_cv_func_fmodf_ieee to "guessing yes".
64237         * m4/fmodl.m4 (gl_FUNC_FMODL): Require AC_CANONICAL_HOST. When cross-
64238         compiling to glibc systems, set gl_cv_func_fmodl_ieee to "guessing yes".
64239         * m4/getgroups.m4 (gl_FUNC_GETGROUPS): Require AC_CANONICAL_HOST. When
64240         cross-compiling to glibc systems, set gl_cv_func_getgroups_works to
64241         "guessing yes".
64242         * m4/hypot.m4 (gl_FUNC_HYPOT): Require AC_CANONICAL_HOST. When cross-
64243         compiling to glibc systems, set gl_cv_func_hypot_ieee to "guessing yes".
64244         * m4/hypotf.m4 (gl_FUNC_HYPOTF): Require AC_CANONICAL_HOST. When cross-
64245         compiling to glibc systems, set gl_cv_func_hypotf_ieee to
64246         "guessing yes".
64247         * m4/hypotl.m4 (gl_FUNC_HYPOTL): Require AC_CANONICAL_HOST. When cross-
64248         compiling to glibc systems, set gl_cv_func_hypotl_ieee to
64249         "guessing yes".
64250         * m4/link.m4 (gl_FUNC_LINK): Require AC_CANONICAL_HOST. When cross-
64251         compiling to glibc systems, set gl_cv_func_link_works to "guessing yes".
64252         * m4/log.m4 (gl_FUNC_LOG): Require AC_CANONICAL_HOST. When cross-
64253         compiling to glibc systems, set gl_cv_func_log_ieee to "guessing yes".
64254         * m4/logf.m4 (gl_FUNC_LOGF): Require AC_CANONICAL_HOST. When cross-
64255         compiling to glibc systems, set gl_cv_func_logf_ieee to "guessing yes".
64256         * m4/log10.m4 (gl_FUNC_LOG10): Require AC_CANONICAL_HOST. When cross-
64257         compiling to glibc systems, set gl_cv_func_log10_ieee to "guessing yes".
64258         * m4/log10f.m4 (gl_FUNC_LOG10F): Require AC_CANONICAL_HOST. When cross-
64259         compiling to glibc systems, set gl_cv_func_log10f_ieee to
64260         "guessing yes".
64261         * m4/log1p.m4 (gl_FUNC_LOG1P): Require AC_CANONICAL_HOST. When cross-
64262         compiling to glibc systems, set gl_cv_func_log1p_ieee to "guessing yes".
64263         * m4/log1pf.m4 (gl_FUNC_LOG1PF): Require AC_CANONICAL_HOST. When cross-
64264         compiling to glibc systems, set gl_cv_func_log1pf_ieee to
64265         "guessing yes".
64266         * m4/log1pl.m4 (gl_FUNC_LOG1PL): Require AC_CANONICAL_HOST. When cross-
64267         compiling to glibc systems, set gl_cv_func_log1pl_ieee to
64268         "guessing yes".
64269         * m4/log2.m4 (gl_FUNC_LOG2): Require AC_CANONICAL_HOST. When cross-
64270         compiling to glibc systems, set gl_cv_func_log2_ieee to "guessing yes".
64271         * m4/log2f.m4 (gl_FUNC_LOG2F): Require AC_CANONICAL_HOST. When cross-
64272         compiling to glibc systems, set gl_cv_func_log2f_ieee to "guessing yes".
64273         * m4/mkdir.m4 (gl_FUNC_MKDIR): Require AC_CANONICAL_HOST. When cross-
64274         compiling to glibc systems, set gl_cv_func_mkdir_trailing_slash_works,
64275         gl_cv_func_mkdir_trailing_dot_works to "guessing yes".
64276         * m4/mkfifo.m4 (gl_FUNC_MKFIFO): Require AC_CANONICAL_HOST. When cross-
64277         compiling to glibc systems, set gl_cv_func_mkfifo_works to
64278         "guessing yes".
64279         * m4/mknod.m4 (gl_FUNC_MKNOD): Require AC_CANONICAL_HOST. When cross-
64280         compiling to glibc systems, set gl_cv_func_mknod_works to
64281         "guessing yes".
64282         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require AC_CANONICAL_HOST. When
64283         cross-compiling to glibc systems, set gl_cv_func_working_mkstemp to
64284         "guessing yes".
64285         * m4/modf.m4 (gl_FUNC_MODF): Require AC_CANONICAL_HOST. When cross-
64286         compiling to glibc systems, set gl_cv_func_modf_ieee to "guessing yes".
64287         * m4/modff.m4 (gl_FUNC_MODFF): Require AC_CANONICAL_HOST. When cross-
64288         compiling to glibc systems, set gl_cv_func_modff_ieee to "guessing yes".
64289         * m4/modfl.m4 (gl_FUNC_MODFL): Require AC_CANONICAL_HOST. When cross-
64290         compiling to glibc systems, set gl_cv_func_modfl_ieee to "guessing yes".
64291         * m4/putenv.m4 (gl_FUNC_PUTENV): Require AC_CANONICAL_HOST. When cross-
64292         compiling to glibc systems, set gl_cv_func_svid_putenv to
64293         "guessing yes".
64294         * m4/readlink.m4 (gl_FUNC_READLINK): Require AC_CANONICAL_HOST. When
64295         cross-compiling to glibc systems, set gl_cv_func_readlink_works to
64296         "guessing yes".
64297         * m4/remainder.m4 (gl_FUNC_REMAINDER): Require AC_CANONICAL_HOST. When
64298         cross-compiling to glibc systems, set gl_cv_func_remainder_ieee to
64299         "guessing yes".
64300         * m4/remainderf.m4 (gl_FUNC_REMAINDERF): Require AC_CANONICAL_HOST.
64301         When cross-compiling to glibc systems, set gl_cv_func_remainderf_ieee
64302         to "guessing yes".
64303         * m4/remainderl.m4 (gl_FUNC_REMAINDERL): Require AC_CANONICAL_HOST.
64304         When cross-compiling to glibc systems, set gl_cv_func_remainderl_ieee
64305         to "guessing yes".
64306         * m4/rmdir.m4 (gl_FUNC_RMDIR): Require AC_CANONICAL_HOST. When cross-
64307         compiling to glibc systems, set gl_cv_func_rmdir_works to
64308         "guessing yes".
64309         * m4/unlink.m4 (gl_FUNC_UNLINK): Require AC_CANONICAL_HOST. When cross-
64310         compiling to glibc systems, set gl_cv_func_unlink_honors_slashes,
64311         gl_cv_func_unlink_parent_fails to "guessing yes".
64312         * m4/remove.m4 (gl_FUNC_REMOVE): Update.
64313         * m4/rename.m4 (gl_FUNC_RENAME): Require AC_CANONICAL_HOST. When cross-
64314         compiling to glibc systems, set gl_cv_func_rename_slash_dst_works,
64315         gl_cv_func_rename_slash_src_works, gl_cv_func_rename_link_works,
64316         gl_cv_func_rename_dest_works to "guessing yes".
64317         * m4/round.m4 (gl_FUNC_ROUND): Require AC_CANONICAL_HOST. When cross-
64318         compiling to glibc systems, set gl_cv_func_round_ieee to "guessing yes".
64319         * m4/roundf.m4 (gl_FUNC_ROUNDF): Require AC_CANONICAL_HOST. When cross-
64320         compiling to glibc systems, set gl_cv_func_roundf_ieee to
64321         "guessing yes".
64322         * m4/roundl.m4 (gl_FUNC_ROUNDL): Require AC_CANONICAL_HOST. When cross-
64323         compiling to glibc systems, set gl_cv_func_roundl_ieee to
64324         "guessing yes".
64325         * m4/setenv.m4 (gl_FUNC_SETENV): Require AC_CANONICAL_HOST. When cross-
64326         compiling to glibc systems, set gl_cv_func_setenv_works to
64327         "guessing yes".
64328         (gl_FUNC_UNSETENV): Require AC_CANONICAL_HOST. When cross-
64329         compiling to glibc systems, set gl_cv_func_unsetenv_works to
64330         "guessing yes".
64331         * m4/sleep.m4 (gl_FUNC_SLEEP): Require AC_CANONICAL_HOST. When cross-
64332         compiling to glibc systems, set gl_cv_func_sleep_works to
64333         "guessing yes".
64334         * m4/stat.m4 (gl_FUNC_STAT): Require AC_CANONICAL_HOST. When cross-
64335         compiling to glibc systems, set gl_cv_func_stat_file_slash to
64336         "guessing yes".
64337         * m4/symlink.m4 (gl_FUNC_SYMLINK): Require AC_CANONICAL_HOST. When
64338         cross-compiling to glibc systems, set gl_cv_func_symlink_works to
64339         "guessing yes".
64340         * m4/trunc.m4 (gl_FUNC_TRUNC): Require AC_CANONICAL_HOST. When cross-
64341         compiling to glibc systems, set gl_cv_func_trunc_ieee to "guessing yes".
64342         * m4/truncf.m4 (gl_FUNC_TRUNCF): Require AC_CANONICAL_HOST. When cross-
64343         compiling to glibc systems, set gl_cv_func_truncf_ieee to
64344         "guessing yes".
64345         * m4/truncl.m4 (gl_FUNC_TRUNCL): Require AC_CANONICAL_HOST. When cross-
64346         compiling to glibc systems, set gl_cv_func_truncl_ieee to
64347         "guessing yes".
64348         * m4/usleep.m4 (gl_FUNC_USLEEP): Require AC_CANONICAL_HOST. When cross-
64349         compiling to glibc systems, set gl_cv_func_usleep_works to
64350         "guessing yes".
64351         * m4/utimens.m4 (gl_UTIMENS): Require AC_CANONICAL_HOST. When cross-
64352         compiling to glibc systems, set gl_cv_func_futimesat_works to
64353         "guessing yes".
64355 2012-05-03  Bruno Haible  <bruno@clisp.org>
64357         Say "guessing yes" or "guessing no" when cross-compiling.
64358         * m4/dup2.m4 (gl_FUNC_DUP2): When cross-compiling, set
64359         gl_cv_func_dup2_works to "guessing yes" or "guessing no".
64360         * m4/getdelim.m4 (gl_FUNC_GETDELIM): When cross-compiling, set
64361         gl_cv_func_working_getdelim to "guessing yes" or "guessing no".
64362         * m4/getline.m4 (gl_FUNC_GETLINE): When cross-compiling, set
64363         am_cv_func_working_getline to "guessing yes" or "guessing no".
64364         * m4/memmem.m4 (gl_FUNC_MEMMEM_SIMPLE): When cross-compiling, set
64365         gl_cv_func_memmem_works_always to "guessing yes" or "guessing no".
64366         (gl_FUNC_MEMMEM): When cross-compiling, set
64367         gl_cv_func_memmem_works_fast to "guessing yes" or "guessing no".
64368         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): When cross-compiling, set
64369         gl_cv_func_stpncpy to "guessing yes" or "guessing no".
64370         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR_SIMPLE): When cross-compiling,
64371         set gl_cv_func_strcasestr_works_always to "guessing yes" or
64372         "guessing no".
64373         (gl_FUNC_STRCASESTR): When cross-compiling, set
64374         gl_cv_func_strcasestr_linear to "guessing yes" or "guessing no".
64375         * m4/strstr.m4 (gl_FUNC_STRSTR_SIMPLE): When cross-compiling, set
64376         gl_cv_func_strstr_works_always to "guessing yes" or "guessing no".
64377         (gl_FUNC_STRSTR): When cross-compiling, set
64378         gl_cv_func_strstr_linear to "guessing yes" or "guessing no".
64379         * m4/strtod.m4 (gl_FUNC_STRTOD): When cross-compiling, set
64380         gl_cv_func_strtod_works to "guessing yes" or "guessing no".
64381         * m4/wctype_h.m4 (gl_WCTYPE_H): When cross-compiling, set
64382         gl_cv_func_iswcntrl_works to "guessing yes" or "guessing no".
64384 2012-05-01  Bruno Haible  <bruno@clisp.org>
64386         relocatable-prog: Enable ELF ORIGIN trick also on GNU/kFreeBSD.
64387         * m4/relocatable.m4 (gl_RELOCATABLE_BODY): Treat kFreeBSD like Linux.
64388         * build-aux/reloc-ldflags: Likewise.
64389         Suggested by Steven Chamberlain <steven@pyro.eu.org>.
64391 2012-05-01  Bruno Haible  <bruno@clisp.org>
64393         gnulib-tool: Remove transitional code.
64394         * gnulib-tool: Don't warn about --import with 0 arguments any more.
64395         Reported by Dmitriy Selyutin <ghostman.sd@gmail.com>.
64397 2012-05-01  Bruno Haible  <bruno@clisp.org>
64399         getcwd: Fix misindentation.
64400         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Fix indentation.
64402 2012-04-29  Paul Eggert  <eggert@cs.ucla.edu>
64404         exclude: process exclude and include directives in order
64405         This restores the pre-2009 behavior, and is part of a fix of a
64406         grep bug reported by Quentin Arce in
64407         <http://lists.gnu.org/r/bug-grep/2012-04/msg00056.html>.
64408         * lib/exclude.c (struct exclude): Remove 'tail' member.
64409         (new_exclude_segment): Prepend the new segment instead of appending.
64410         Return void, since that's now more convenient.
64411         (file_pattern_matches): Renamed from excluded_file_pattern_p.
64412         (file_name_matches): Renamed from excluded_file_name_p.
64413         (file_pattern_matches, file_name_matches):
64414         Return true if the pattern matches, not if it excludes.
64415         All callers changed.
64416         (excluded_file_name): Process the list in reverse order;
64417         since the list is now reversed this restores the pre-2009 behavior.
64418         (add_exclude): Adjust to new reversed-order list.  Use local var
64419         rather than macro, for clarity.
64420         * tests/test-exclude7.sh: Adjust to corrected behavior.
64422         exclude: handle wildcards with FNM_NOESCAPE and with trailing \
64423         * lib/exclude.c (unescape_pattern): Don't worry about unescaped [;
64424         it's not possible here.  Handle the case of \ at end of pattern
64425         without dumping core.
64426         (add_exclude): Do not unescape the pattern if FNM_NOESCAPE is used.
64428         _Noreturn: future-proof non-GNU and non-MSVC compilers
64429         * build-aux/snippet/_Noreturn.h (_Noreturn):
64430         * m4/gnulib-common.m4 (gl_COMMON_BODY):
64431         Do not define _Noreturn if __STDC_VERSION__ indicates this is
64432         C11 or later.  This is more likely to work with random future C
64433         compilers that are neither GNUish nor MSVCish.  See Vincent Lefevre in
64434         <http://lists.gnu.org/r/bug-gnulib/2012-04/msg00195.html>.
64436         exclude: handle wildcards with FNM_EXTMATCH
64437         * lib/exclude.c (fnmatch_pattern_has_wildcards): Also treat '+(',
64438         '+@', '!(' as wildcards, if FNM_EXTMATCH.  Make it clear in a
64439         comment that "has wildcards" really means "has or may have
64440         wildcards".  Simplify by avoiding the need to call strcspn.
64442 2012-04-29  Bruno Haible  <bruno@clisp.org>
64444         gnulib-tool: Fix list of authors.
64445         * gnulib-tool (func_version): Add Paul Eggert to list of authors.
64447 2012-04-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
64449         bootstrap: support Automake-NG in $buildreq
64450         * bootstrap (check_versions): Handle automake and aclocal from
64451         Automake-NG specially.  They can be specified as respectively
64452         the "automake-ng" and "aclocal-ng" requirements.
64454 2012-04-25  Eric Blake  <eblake@redhat.com>
64456         bootstrap: only force latest Makefile.in.in for gettext module
64457         * build-aux/bootstrap (with_gettext): Only install latest
64458         Makefile.in.in for projects requesting bleeding edge gettext.
64460 2012-04-22  Bruno Haible  <bruno@clisp.org>
64462         doc: Mention reason for replacement on glibc/Linux systems.
64463         * doc/posix-functions/dprintf.texi: Mention the problem with special
64464         'long double' values.
64465         * doc/posix-functions/fprintf.texi: Likewise.
64466         * doc/posix-functions/printf.texi: Likewise.
64467         * doc/posix-functions/snprintf.texi: Likewise.
64468         * doc/posix-functions/sprintf.texi: Likewise.
64469         * doc/posix-functions/vdprintf.texi: Likewise.
64470         * doc/posix-functions/vfprintf.texi: Likewise.
64471         * doc/posix-functions/vprintf.texi: Likewise.
64472         * doc/posix-functions/vsnprintf.texi: Likewise.
64473         * doc/posix-functions/vsprintf.texi: Likewise.
64474         * doc/posix-functions/fcntl.texi: Add glibc/Linux to the list of
64475         platforms with F_DUPFD_CLOEXEC problems.
64476         * doc/posix-functions/glob.texi: Mention which platforms are affected
64477         by the problem with symbolic links.
64478         * doc/posix-functions/linkat.texi: Mention the problem with
64479         AT_SYMLINK_FOLLOW on Linux.
64481 2012-04-22  Bruno Haible  <bruno@clisp.org>
64483         pwrite: Don't replace on all platforms.
64484         * m4/pwrite.m4 (gl_FUNC_PWRITE): Fix syntax error in test program.
64486 2012-04-22  Bruno Haible  <bruno@clisp.org>
64488         rint* tests: Avoid gcc warnings.
64489         * tests/test-rint.c (INFINITY, NAN): Undefine before redefining.
64490         * tests/test-rintf.c (INFINITY, NAN): Likewise.
64491         * tests/test-rintl.c (INFINITY, NAN): Likewise.
64493 2012-04-21  Bruno Haible  <bruno@clisp.org>
64495         users.txt: Update.
64496         * users.txt: Add freedink, wdiff. Update URLs for projects that have
64497         switched from CVS to git, bzr, or svn.
64499 2012-04-21  Bruno Haible  <bruno@clisp.org>
64501         Large File Support for native Windows platforms.
64503         * m4/largefile.m4 (gl_LARGEFILE): New macro.
64504         * modules/largefile (configure.ac): Require gl_LARGEFILE.
64506         * lib/sys_types.in.h (off_t) [WINDOWS_64_BIT_OFF_T]: Define to a 64-bit
64507         type.
64508         * m4/sys_types_h.m4 (gl_SYS_TYPES_H): Set WINDOWS_64_BIT_OFF_T.
64509         * modules/sys_types (Makefile.am): Substitute WINDOWS_64_BIT_OFF_T.
64510         * doc/posix-headers/sys_types.texi: Mention the effect of the
64511         'largefile' module.
64513         * lib/fcntl.in.h: Add comments about off_t.
64514         * modules/fcntl-h (Depends-on): Add sys_types.
64516         * lib/unistd.in.h [WINDOWS_64_BIT_OFF_T]: Include <sys/types.h>.
64517         (ftruncate): Replace it if REPLACE_FTRUNCATE is 1.
64518         * m4/unistd_h.m4 (gl_UNISTD_H): Require gl_SYS_TYPES_H.
64519         (gl_UNISTD_H_DEFAULTS): Initialize REPLACE_FTRUNCATE.
64520         * modules/unistd (Depends-on): Add sys_types.
64521         (Makefile.am): Substitute WINDOWS_64_BIT_OFF_T, REPLACE_FTRUNCATE.
64523         * lib/lseek.c (rpl_lseek) [_GL_WINDOWS_64_BIT_OFF_T]: Use _lseeki64
64524         instead of lseek.
64525         * m4/lseek.m4 (gl_FUNC_LSEEK): Require gl_SYS_TYPES_H. Set
64526         REPLACE_LSEEK if WINDOWS_64_BIT_OFF_T is 1.
64527         * modules/lseek (Depends-on): Add sys_types.
64529         * lib/ftruncate.c: Put under GPLv3+. Include <windows.h>,
64530         msvc-nothrow.h.
64531         (SetFileSize): New function.
64532         (ftruncate) [_GL_WINDOWS_64_BIT_OFF_T]: New implementation.
64533         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Set REPLACE_FTRUNCATE on Windows
64534         if Large File Support is requested.
64535         * modules/ftruncate (configure.ac): Consider REPLACE_FTRUNCATE.
64536         (Depends-on): Add sys_types, msvc-nothrow. Update conditions.
64538         * lib/stdio.in.h: Add comments about off_t.
64539         * modules/stdio (Depends-on): Add sys_types.
64541         * lib/ftello.c [_GL_WINDOWS_64_BIT_OFF_T]: Use _ftelli64 or ftello64
64542         instead of ftello.
64543         * m4/ftello.m4 (gl_FUNC_FTELLO): Require gl_SYS_TYPES_H. Set
64544         REPLACE_FTELLO if WINDOWS_64_BIT_OFF_T is 1.
64545         (gl_PREREQ_FTELLO): New macro.
64546         * modules/ftello (Depends-on): Add sys_types.
64547         (configure.ac): Incoke gl_PREREQ_FTELLO.
64549         * lib/fseeko.c [_GL_WINDOWS_64_BIT_OFF_T]: Use _fseeki64 or fseeko64
64550         instead of fseeko.
64551         * m4/fseeko.m4 (gl_FUNC_FSEEKO): Require gl_SYS_TYPES_H. Set
64552         REPLACE_FSEEKO if WINDOWS_64_BIT_OFF_T is 1.
64553         (gl_PREREQ_FSEEKO): New macro.
64554         * modules/fseeko (Depends-on): Add sys_types.
64555         (configure.ac): Invoke gl_PREREQ_FSEEKO.
64557         * lib/sys_stat.in.h: Add comments about off_t.
64558         (stat, fstat) [WINDOWS_64_BIT_ST_SIZE]: Define to variants that use a
64559         64-bit integer for st_size in 'struct stat'.
64560         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Set WINDOWS_64_BIT_ST_SIZE.
64561         Define _GL_WINDOWS_64_BIT_ST_SIZE.
64562         * modules/sys_stat (Depends-on): Add sys_types.
64563         (Makefile.am): Substitute WINDOWS_64_BIT_ST_SIZE.
64565         * lib/stat.c (stat) [_GL_WINDOWS_64_BIT_ST_SIZE]: Define to _stati64
64566         instead of stat or _stat.
64568         * lib/fstat.c [_GL_WINDOWS_64_BIT_ST_SIZE]: Use _fstati64 and
64569         'struct _stati64' instead of fstat and 'struct stat'.
64570         * m4/fstat.m4 (gl_FUNC_FSTAT): Require gl_HEADER_SYS_STAT_H. Set
64571         REPLACE_FSTAT if WINDOWS_64_BIT_ST_SIZE is 1.
64573         Reported by Ray Satiro <raysatiro@yahoo.com>.
64575 2012-04-19  Eric Blake  <eblake@redhat.com>
64577         bootstrap: accommodate older libtool
64578         * build-aux/bootstrap (use_libtool): Cater to libtool 1.5.22.
64579         Reported by Daniel P. Berrange.
64581 2012-04-19  Jim Meyering  <meyering@redhat.com>
64583         announce-gen: avoid failure due to lack of Digest::SHA1
64584         Even with the preferred Digest::SHA available, this script
64585         would fail when the backup module, Digest::SHA1, was not installed.
64586         * build-aux/announce-gen: Quote the conditional use of "use".
64587         Reported by Reuben Thomas in:
64588         http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/30444
64590         bootstrap: don't let a user's CDPATH setting affect this script
64591         When CDPATH is set, cd will sometimes generate output.
64592         When "cd" is run in a subshell whose output matters, that
64593         surprising-to-some output can cause malfunction.
64594         Unsetting CDPATH turns off this shell "feature."
64595         * build-aux/bootstrap (CDPATH): Unset.
64596         Reported by Reuben Thomas in:
64597         http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/30435
64598         and inspired by his patch here:
64599         http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/30440
64601 2012-04-16  Akim Demaille  <akim@lrde.epita.fr>
64602         and Jim Meyering  <meyering@redhat.com>
64604         maint.mk: catch "see @xref{}" and similar
64605         * top/maint.mk (prohibit_undesirable_word_seq_RE_): Also
64606         prohibit "See also @xref{", "Also see @pxref{", and similar.
64608 2012-04-16  Jim Meyering  <meyering@redhat.com>
64610         bootstrap: really use gnulib's po/Makefile.in.in
64611         * build-aux/bootstrap: Correct the source file name in previous change.
64612         Reported by Akim Demaille.
64614         configmake: correct minor inconsistency in Makefile rule
64615         * modules/configmake (Makefile.am): All other rules like this one
64616         run the final "mv -f ..." in the same backslash-continued command
64617         as the one that does everything else.  This one put the mv -f ...
64618         command on a separate, non-backslash-continued line.
64619         Make it like the others.
64621         bootstrap: use gnulib's po/Makefile.in.in, not the one from gettext
64622         * build-aux/bootstrap: Use gnulib's po/Makefile.in.in, not
64623         the one from gettext.  Reported by Akim Demaille.
64625 2012-04-16  Joel E. Denny  <joeldenny@joeldenny.org>
64627         Fix recursion of install-* into po directories.
64628         Bison's install-pdf bug reported by Hans Aberg at
64629         <http://lists.gnu.org/r/bug-bison/2011-05/msg00008.html>.
64630         * build-aux/po/Makefile.in.in (install-dvi, install-html)
64631         (install-info, install-pdf, install-ps): New targets.
64633 2012-04-16  Jim Meyering  <meyering@redhat.com>
64635         maint: avoid spurious "make sc_maint" failure
64636         * cfg.mk (exclude_file_name_regexp--sc_trailing_blank): Also
64637         exempt all *.class file names, for lib/javaversion.class.
64639 2012-04-15  Bruno Haible  <bruno@clisp.org>
64641         lseek: Make configure test independent of environment.
64642         * m4/lseek.m4 (gl_FUNC_LSEEK): Require AC_CANONICAL_HOST. On native
64643         Windows, we know that lseek() on pipes is broken; skip the runtime
64644         test.
64646 2012-04-14  Bruno Haible  <bruno@clisp.org>
64648         stat: Bypass buggy override in mingw64.
64649         * m4/stat.m4 (gl_FUNC_STAT): Update comments.
64650         * lib/stat.c (stat) [mingw64]: Define to _stat.
64651         * doc/posix-functions/stat.texi: Mention mingw64 bug.
64653 2012-04-14  Bruno Haible  <bruno@clisp.org>
64655         pathmax: Fix compilation error on MSVC 9.
64656         * modules/pathmax (Depends-on): Add unistd.
64658 2012-04-12  Paul Eggert  <eggert@cs.ucla.edu>
64660         README: document pointer comparison assumption
64661         * README (Portability guidelines): Document assumption about
64662         pointer comparisons, in response to a recent bug-gnulib comment by
64663         Jeffrey Kegler.
64665 2012-04-12  Bruno Haible  <bruno@clisp.org>
64667         Tests for module 'getrusage'.
64668         * modules/getrusage-tests: New file.
64669         * tests/test-getrusage.c: New file.
64671         New module 'getrusage'.
64672         * lib/sys_resource.in.h: Include arg-nonnull.h, c++defs.h,
64673         warn-on-use.h.
64674         (getrusage): New declaration.
64675         * lib/getrusage.c: New file.
64676         * m4/getrusage.m4: New file.
64677         * m4/sys_resource_h.m4 (gl_HEADER_SYS_RESOURCE): Test whether getrusage
64678         is declared.
64679         (gl_SYS_RESOURCE_H_DEFAULTS): Initialize GNULIB_GETRUSAGE,
64680         HAVE_GETRUSAGE.
64681         * modules/sys_resource (Depends-on): Add snippet/arg-nonnull,
64682         snippet/c++defs, snippet/warn-on-use.
64683         (Makefile.am): Update generation of sys/resource.h. Substitute
64684         GNULIB_GETRUSAGE, HAVE_GETRUSAGE.
64685         * modules/getrusage: New file.
64686         * doc/posix-functions/getrusage.texi: Mention the new module.
64688 2012-04-12  Bruno Haible  <bruno@clisp.org>
64690         Tests for module 'sys_resource'.
64691         * modules/sys_resource-tests: New file.
64692         * tests/test-sys_resource.c: New file.
64694         New module 'sys_resource'.
64695         * lib/sys_resource.in.h: New file.
64696         * m4/sys_resource_h.m4: New file.
64697         * modules/sys_resource: New file.
64698         * doc/posix-headers/sys_resource.texi: Mention the new module.
64700 2012-04-12  LRN  <lrn1986@gmail.com>  (tiny change)
64702         ioctl: Fix compilation error on mingw.
64703         * lib/ioctl.c: Include <windows.h>.
64704         Also reported by Ray Satiro <raysatiro@yahoo.com>.
64706 2012-04-04  Jim Meyering  <meyering@redhat.com>
64708         regex: correct #pragma guard expression
64709         * lib/regex.c: -Wsuggest-attribute=pure was introduced in gcc-4.6,
64710         not 4.3.  Correct its cpp guard expression.
64712 2012-04-04  Paul Eggert  <eggert@cs.ucla.edu>
64714         regex: remove unnecessary type punning
64715         Problem reported by Vladimir Serbinenko in
64716         <http://lists.gnu.org/r/bug-gnulib/2012-04/msg00006.html>.
64717         * lib/regex.h (struct re_pattern_buffer): Change the type of
64718         __REPB_PREFIX(buffer) from unsigned char * to struct re_dfa_t *.
64719         Fix comment to match code.
64720         * lib/regcomp.c (re_compile_fastmap, re_compile_fastmap_iter, regfree)
64721         (re_compile_internal, free_workarea_compile, analyze, lower_subexp)
64722         (parse, parse_reg_exp, parse_branch, parse_expression, parse_sub_exp):
64723         * lib/regexec.c (regexec, re_search_stub, re_search_internal)
64724         (set_regs):
64725         Omit no-longer-necessary casts.
64727 2012-04-03  Bruno Haible  <bruno@clisp.org>
64729         Tests for module 'ilogbl'.
64730         * modules/ilogbl-tests: New file.
64731         * tests/test-ilogbl.c: New file.
64733         New module 'ilogbl'.
64734         * lib/math.in.h (ilogbl): New declaration.
64735         * lib/ilogbl.c: New file.
64736         * m4/ilogbl.m4: New file.
64737         * m4/math_h.m4 (gl_MATH_H): Test whether ilogbl is declared.
64738         (gl_MATH_H_DEFAULTS): Initialize GNULIB_ILOGBL, HAVE_ILOGBL.
64739         * modules/math (Makefile.am): Substitute GNULIB_ILOGBL, HAVE_ILOGBL.
64740         Split sed invocation, to avoid the limit of 100 substitutions of
64741         HP-UX 'sed'.
64742         * modules/ilogbl: New file.
64743         * tests/test-math-c++.cc: Check the declaration of ilogbl.
64744         * doc/posix-functions/ilogbl.texi: Mention the new module.
64746 2012-04-03  Bruno Haible  <bruno@clisp.org>
64748         Tests for module 'ilogbf'.
64749         * modules/ilogbf-tests: New file.
64750         * tests/test-ilogbf.c: New file.
64752         New module 'ilogbf'.
64753         * lib/math.in.h (ilogbf): New declaration.
64754         * lib/ilogbf.c: New file.
64755         * m4/ilogbf.m4: New file.
64756         * m4/math_h.m4 (gl_MATH_H): Test whether ilogbf is declared.
64757         (gl_MATH_H_DEFAULTS): Initialize GNULIB_ILOGBF, HAVE_ILOGBF,
64758         REPLACE_ILOGBF.
64759         * modules/math (Makefile.am): Substitute GNULIB_ILOGBF, HAVE_ILOGBF,
64760         REPLACE_ILOGBF.
64761         * modules/ilogbf: New file.
64762         * tests/test-math-c++.cc: Check the declaration of ilogbf.
64763         * doc/posix-functions/ilogbf.texi: Mention the new module.
64765 2012-04-03  Bruno Haible  <bruno@clisp.org>
64767         Tests for module 'ilogb'.
64768         * modules/ilogb-tests: New file.
64769         * tests/test-ilogb.c: New file.
64770         * tests/test-ilogb.h: New file, based on tests/test-logb.h and
64771         tests/test-logb-ieee.h.
64773         New module 'ilogb'.
64774         * lib/math.in.h (ilogb): New declaration.
64775         * lib/ilogb.c: New file.
64776         * m4/ilogb.m4: New file.
64777         * m4/math_h.m4 (gl_MATH_H): Test whether ilogb is declared.
64778         (gl_MATH_H_DEFAULTS): Initialize GNULIB_ILOGB, HAVE_ILOGB,
64779         REPLACE_ILOGB.
64780         * modules/math (Makefile.am): Substitute GNULIB_ILOGB, HAVE_ILOGB,
64781         REPLACE_ILOGB.
64782         * modules/ilogb: New file.
64783         * tests/test-math-c++.cc: Check the declaration of ilogb.
64784         * doc/posix-functions/ilogb.texi: Mention the new module.
64786 2012-04-03  Bruno Haible  <bruno@clisp.org>
64788         math: Provide FP_ILOGB0 and FP_ILOGBNAN.
64789         * lib/math.in.h (FP_ILOGB0, FP_ILOGBNAN): Define fallback.
64790         * tests/test-math.c: Check that FP_ILOGB0, FP_ILOGBNAN are defined.
64791         (main): Check their values.
64792         * doc/posix-headers/math.texi: Mention the FP_ILOGB0, FP_ILOGBNAN
64793         problem.
64795 2012-04-03  Bruno Haible  <bruno@clisp.org>
64797         Tests for module 'logbl-ieee'.
64798         * modules/logbl-ieee-tests: New file.
64799         * tests/test-logbl-ieee.c: New file.
64801         New module 'logbl-ieee'.
64802         * modules/logbl-ieee: New file.
64804         Tests for module 'logb-ieee'.
64805         * modules/logb-ieee-tests: New file.
64806         * tests/test-logb-ieee.c: New file.
64808         New module 'logb-ieee'.
64809         * modules/logb-ieee: New file.
64811         Tests for module 'logbf-ieee'.
64812         * modules/logbf-ieee-tests: New file.
64813         * tests/test-logbf-ieee.c: New file.
64814         * tests/test-logb-ieee.h: New file.
64816         New module 'logbf-ieee'.
64817         * modules/logbf-ieee: New file.
64819 2012-04-03  Bruno Haible  <bruno@clisp.org>
64821         Tests for module 'logbl'.
64822         * modules/logbl-tests: New file.
64823         * tests/test-logbl.c: New file.
64825         New module 'logbl'.
64826         * lib/math.in.h (logbl): New declaration.
64827         * lib/logbl.c: New file.
64828         * m4/logbl.m4: New file.
64829         * m4/math_h.m4 (gl_MATH_H): Test whether logbl is declared.
64830         (gl_MATH_H_DEFAULTS): Initialize GNULIB_LOGBL, HAVE_LOGBL,
64831         REPLACE_LOGBL.
64832         * modules/math (Makefile.am): Substitute GNULIB_LOGBL, HAVE_LOGBL,
64833         REPLACE_LOGBL.
64834         * modules/logbl: New file.
64835         * tests/test-math-c++.cc: Check the declaration of logbl.
64836         * doc/posix-functions/logbl.texi: Mention the new module.
64838 2012-04-02  Bruno Haible  <bruno@clisp.org>
64840         Tests for module 'logbf'.
64841         * modules/logbf-tests: New file.
64842         * tests/test-logbf.c: New file.
64844         New module 'logbf'.
64845         * lib/math.in.h (logbf): New declaration.
64846         * lib/logbf.c: New file.
64847         * m4/logbf.m4: New file.
64848         * m4/math_h.m4 (gl_MATH_H): Test whether logbf is declared.
64849         (gl_MATH_H_DEFAULTS): Initialize GNULIB_LOGBF, HAVE_LOGBF,
64850         REPLACE_LOGBF.
64851         * modules/math (Makefile.am): Substitute GNULIB_LOGBF, HAVE_LOGBF,
64852         REPLACE_LOGBF.
64853         * modules/logbf: New file.
64854         * tests/test-math-c++.cc: Check the declaration of logbf.
64855         * doc/posix-functions/logbf.texi: Mention the new module.
64857 2012-04-02  Bruno Haible  <bruno@clisp.org>
64859         logb tests: More tests.
64860         * tests/test-logb.h: New file, based on tests/test-logb.c and
64861         tests/test-frexp.h.
64862         * tests/test-logb.c: Include minus-zero.h, test-logb.h.
64863         (main): Just invoke test_function.
64864         * modules/logb-tests (Files): Add tests/test-logb.h,
64865         tests/minus-zero.h, tests/randomd.c.
64866         (Makefile.am): Add randomd.c to test_logb_SOURCES.
64868         logb: Provide replacement and workarounds.
64869         * lib/math.in.h (logb): Ensure declaration. Replace if REPLACE_LOGB
64870         is 1.
64871         * lib/logb.c: New file.
64872         * m4/logb.m4 (gl_FUNC_LOGB_WORKS): New macro.
64873         (gl_FUNC_LOGB): Invoke it. Set HAVE_LOGB, REPLACE_LOGB.
64874         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_LOGB.
64875         * modules/math (Makefile.am): Substitute REPLACE_LOGB.
64876         * modules/logb (Files): Add lib/logb.c.
64877         (Depends-on): Add isfinite, frexp, isnand.
64878         (configure.ac): Compile the replacement code logb.c if needed.
64879         * tests/test-math-c++.cc: Check the declaration of logb.
64880         * doc/posix-functions/logb.texi: Mention the replacement and the bug
64881         with subnormal numbers.
64883 2012-04-02  Bruno Haible  <bruno@clisp.org>
64885         log10* tests: Speed up.
64886         * tests/test-log10.h (test_function): Reduce amount of random numbers
64887         to test.
64889 2012-04-01  Bruno Haible  <bruno@clisp.org>
64891         logf-ieee: Fix test whether logf works.
64892         * m4/logf.m4 (gl_FUNC_LOGF): Fix typo in test program.
64894 2012-04-01  Bruno Haible  <bruno@clisp.org>
64896         log10l: Work around log10l-ieee test failure on IRIX 6.5.
64897         * lib/log10l.c: Include <float.h>
64898         (log10l): On IRIX, normalize the +Infinity value.
64899         * modules/log10l (Depends-on): Add 'float'.
64900         * doc/posix-functions/log10l.texi: Mention the IRIX problem with
64901         +Infinity.
64903         log10f-ieee: Work around test failure on NetBSD 5.1.
64904         * m4/log10f-ieee.m4: New file.
64905         * m4/log10f.m4 (gl_FUNC_LOG10F): If gl_FUNC_LOG10F_IEEE is present,
64906         test whether log10f works with a negative argument. Replace it if not.
64907         * lib/log10f.c (log10f): For negative arguments, return NaN.
64908         * modules/log10f-ieee (Files): Add m4/log10f-ieee.m4.
64909         (configure.ac): Invoke gl_FUNC_LOG10F_IEEE.
64910         * doc/posix-functions/log10f.texi: Mention the log10f-ieee module.
64912         log10f-ieee: Work around test failure on Solaris 9.
64913         * modules/log10f-ieee (Depends-on): Add log10-ieee.
64914         (configure.ac): Require gl_FUNC_LOG10F.
64916         log10-ieee: Work around test failure on NetBSD 5.1 and Solaris 11.
64917         * m4/log10-ieee.m4: New file.
64918         * m4/log10.m4 (gl_FUNC_LOG10): If gl_FUNC_LOG10_IEEE is present, test
64919         whether log10 works with a negative argument. Replace it if not.
64920         * lib/log10.c (log10): For negative arguments, return NaN.
64921         * modules/log10-ieee (Files): Add m4/log10-ieee.m4.
64922         (configure.ac): Invoke gl_FUNC_LOG10_IEEE.
64923         * doc/posix-functions/log10.texi: Mention the log10-ieee module.
64925         Tests for module 'log10l-ieee'.
64926         * modules/log10l-ieee-tests: New file.
64927         * tests/test-log10l-ieee.c: New file.
64929         New module 'log10l-ieee'.
64930         * modules/log10l-ieee: New file.
64932         Tests for module 'log10-ieee'.
64933         * modules/log10-ieee-tests: New file.
64934         * tests/test-log10-ieee.c: New file.
64936         New module 'log10-ieee'.
64937         * modules/log10-ieee: New file.
64939         Tests for module 'log10f-ieee'.
64940         * modules/log10f-ieee-tests: New file.
64941         * tests/test-log10f-ieee.c: New file.
64942         * tests/test-log10-ieee.h: New file.
64944         New module 'log10f-ieee'.
64945         * modules/log10f-ieee: New file.
64947 2012-04-01  Bruno Haible  <bruno@clisp.org>
64949         log10l: Work around AIX 5.1, IRIX 6.5, OSF/1 5.1 bug.
64950         * lib/math.in.h (log10l): Override if REPLACE_LOG10L is 1.
64951         * lib/log10l.c (log10l): If log10l exists, use it and provide just the
64952         workaround.
64953         * m4/log10l.m4 (gl_FUNC_LOG10L_WORKS): New macro.
64954         (gl_FUNC_LOG10L): Invoke it. Set REPLACE_LOG10L.
64955         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_LOG10L.
64956         * modules/math (Makefile.am): Substitute REPLACE_LOG10L.
64957         * modules/log10l (configure.ac): Consider REPLACE_LOG10L.
64958         (Depends-on): Update conditions.
64959         * doc/posix-functions/log10l.texi: Mention the MSVC9, AIX 5.1,
64960         IRIX 6.5, OSF/1 5.1 problems.
64962 2012-04-01  Bruno Haible  <bruno@clisp.org>
64964         log10f: Work around OSF/1 5.1 bug.
64965         * lib/math.in.h (log10f): Override if REPLACE_LOG10F is 1.
64966         * lib/log10f.c (log10f): If logf exists, use it and provide just the
64967         workaround.
64968         * m4/log10f.m4 (gl_FUNC_LOG10F_WORKS): New macro.
64969         (gl_FUNC_LOG10F): Invoke it. Set REPLACE_LOG10F.
64970         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_LOG10F.
64971         * modules/math (Makefile.am): Substitute REPLACE_LOG10F.
64972         * modules/log10f (configure.ac): Consider REPLACE_LOG10F.
64973         (Depends-on): Update conditions.
64974         * doc/posix-functions/log10f.texi: Mention the OSF/1 5.1 problem.
64976 2012-04-01  Bruno Haible  <bruno@clisp.org>
64978         log10: Work around OSF/1 5.1 bug.
64979         * lib/math.in.h (log10): New declaration.
64980         * lib/log10.c: New file.
64981         * m4/log10.m4 (gl_FUNC_LOG10_WORKS): New macro.
64982         (gl_FUNC_LOG10): Invoke it. Set REPLACE_LOG10.
64983         * m4/math_h.m4 (gl_MATH_H): Test whether log10 is declared.
64984         (gl_MATH_H_DEFAULTS): Initialize GNULIB_LOG10, REPLACE_LOG10.
64985         * modules/math (Makefile.am): Substitute GNULIB_LOG10, REPLACE_LOG10.
64986         * modules/log10 (Files): Add lib/log10.c.
64987         (Depends-on): Add math.
64988         (configure.ac): If REPLACE_LOG10 is 1, compile an override.
64989         * tests/test-math-c++.cc: Check the declaration of log10.
64990         * doc/posix-functions/log10.texi: Mention the OSF/1 5.1 problem.
64992 2012-03-31  Bruno Haible  <bruno@clisp.org>
64994         log10l tests: More tests.
64995         * modules/log10l-tests (Files): Add tests/test-log10l.h,
64996         tests/minus-zero.h, tests/randoml.c.
64997         (Makefile.am): Add randoml.c to test_log10l_SOURCES.
64998         * tests/test-log10l.c: Include <float.h>, minus-zero.h, test-log10l.h.
64999         (main): Invoke test_function.
65001         log10f tests: More tests.
65002         * modules/log10f-tests (Files): Add tests/test-log10.h,
65003         tests/minus-zero.h, tests/randomf.c.
65004         (Makefile.am): Add randomf.c to test_log10f_SOURCES.
65005         * tests/test-log10f.c: Include <float.h>, minus-zero.h, test-log10.h.
65006         (main): Invoke test_function.
65008         log10 tests: More tests.
65009         * tests/test-log10.h: New file.
65010         * modules/log10-tests (Files): Add tests/test-log10.h,
65011         tests/minus-zero.h, tests/randomd.c.
65012         (Makefile.am): Add randomd.c to test_log10_SOURCES.
65013         * tests/test-log10.c: Include <float.h>, minus-zero.h, test-log10.h.
65014         (main): Invoke test_function.
65016 2012-03-31  Simon Josefsson  <simon@josefsson.org>
65018         fflush: Fix syntax error.
65019         * lib/fflush.c: Include unused-parameter.h, needed for
65020         _GL_UNUSED_PARAMETER.
65021         * modules/fflush (Depends-on): Add snippet/unused-parameter.
65023 2012-03-30  Paul Eggert  <eggert@cs.ucla.edu>
65025         regex: pacify GCC when compiling GRUB
65026         * lib/regcomp.c (init_dfa): Make a pointer 'const', to avoid
65027         a diagnostic.  Reported by Vladimir Serbinenko in
65028         <http://lists.gnu.org/r/bug-gnulib/2012-03/msg00163.html>.
65030 2012-03-29  Eric Blake  <eblake@redhat.com>
65032         stdio: don't assume gets any more
65033         * m4/stdio_h.m4 (gl_STDIO_H, gl_STDIO_H_DEFAULTS): Drop gets
65034         support.
65035         * modules/stdio (Makefile.am): Likewise.
65036         * lib/stdio-read.c (gets): Likewise.
65037         * tests/test-stdio-c++.cc: Likewise.
65038         * m4/warn-on-use.m4 (gl_WARN_ON_USE_PREPARE): Fix comment.
65039         * lib/stdio.in.h (gets): Make warning occur in more places.
65040         * doc/posix-functions/gets.texi (gets): Update documentation.
65041         Reported by Christer Solskogen.
65043         maint.mk: fix syntax checks without exclusions
65044         * top/maint.mk (_sc_search_regexp): Allow for empty variable.
65045         Reported by Daniel P. Berrange.
65047         strerror_r: avoid compiler warning
65048         * lib/strerror_r.c (strerror_r): Hoist extern declaration to top
65049         level.
65051         fflush: avoid compiler warning
65052         * lib/fflush.c (update_fpos_cache): Mark variables that are
65053         potentially unused.
65055 2012-03-25  Bruno Haible  <bruno@clisp.org>
65057         Tests for module 'localeconv'.
65058         * modules/localeconv-tests: New file.
65059         * tests/test-localeconv.c: New file.
65061         New module 'localeconv'.
65062         * lib/locale.in.h (localeconv): New declaration.
65063         * lib/localeconv.c: New file.
65064         * m4/localeconv.m4: New file.
65065         * m4/locale_h.m4 (gl_LOCALE_H_DEFAULTS): Initialize GNULIB_LOCALECONV,
65066         REPLACE_LOCALECONV.
65067         * modules/locale (Makefile.am): Substitute GNULIB_LOCALECONV,
65068         REPLACE_LOCALECONV.
65069         * modules/localeconv: New file.
65070         * modules/nl_langinfo (Depends-on): Add localeconv.
65071         * modules/human (Depends-on): Likewise.
65072         * doc/posix-functions/localeconv.texi: Mention the new module.
65074 2012-03-25  Bruno Haible  <bruno@clisp.org>
65076         locale: Provide a complete 'struct lconv'.
65077         * m4/locale_h.m4 (gl_LOCALE_H): Set REPLACE_STRUCT_LCONV to 1 if
65078         'struct lconv' does not contain int_p_cs_precedes.
65079         * tests/test-locale.c (main): Check that 'struct lconv' is complete.
65080         * doc/posix-headers/locale.texi: Update.
65082         locale: Provide a complete 'struct lconv' on Solaris 10, 11.
65083         * m4/locale_h.m4 (gl_LOCALE_H): On Solaris, define _LCONV_C99.
65084         * doc/posix-headers/locale.texi: Update.
65086         locale: Provide a working 'struct lconv'.
65087         * lib/locale.in.h (lconv): Override if REPLACE_STRUCT_LCONV is 1.
65088         * m4/locale_h.m4 (gl_LOCALE_H): Set REPLACE_STRUCT_LCONV to 1 if
65089         'struct lconv' does not even contain decimal_point.
65090         (gl_LOCALE_H_DEFAULTS): Initialize REPLACE_STRUCT_LCONV.
65091         * modules/locale (Makefile.am): Substitute REPLACE_STRUCT_LCONV.
65092         * tests/test-locale.c (main): Check that 'struct lconv' is complete.
65093         * doc/posix-headers/locale.texi: Mention the problems with
65094         'struct lconv'.
65095         Reported by Gianluigi Tiesi <sherpya@netfarm.it>.
65097 2012-03-24  Bruno Haible  <bruno@clisp.org>
65099         Enable common subexpression optimization in GCC.
65100         * lib/unitypes.in.h (_UC_ATTRIBUTE_CONST, _UC_ATTRIBUTE_PURE): New
65101         macros.
65102         * lib/unicase.in.h (uc_toupper, uc_tolower, uc_totitle): Declare with
65103         GCC attribute 'const'.
65104         (uc_locale_language): Declare with GCC attribute 'pure'.
65105         * lib/unicase/caseprop.h (uc_is_cased, uc_is_case_ignorable): Declare
65106         with GCC attribute 'const'.
65107         * lib/unictype.in.h (uc_is_general_category_withtable,
65108         uc_combining_class, uc_combining_class_name,
65109         uc_combining_class_long_name, uc_bidi_class_name,
65110         uc_bidi_category_name, uc_bidi_class_long_name, uc_bidi_class,
65111         uc_bidi_category, uc_is_bidi_class, uc_is_bidi_category,
65112         uc_decimal_value, uc_digit_value, uc_numeric_value,
65113         uc_joining_type_name, uc_joining_type_long_name, uc_joining_type,
65114         uc_joining_group_name, uc_joining_group, uc_is_property_*, uc_script,
65115         uc_block, uc_is_c_whitespace, uc_is_java_whitespace,
65116         uc_c_ident_category, uc_java_ident_category, uc_is_alnum, uc_is_alpha,
65117         uc_is_cntrl, uc_is_digit, uc_is_graph, uc_is_lower, uc_is_print,
65118         uc_is_punct, uc_is_space, uc_is_upper, uc_is_xdigit, uc_is_blank):
65119         Declare with GCC attribute 'const'.
65120         (uc_general_category_name, uc_general_category_long_name,
65121         uc_general_category_byname, uc_general_category,
65122         uc_is_general_category, uc_combining_class_byname,
65123         uc_bidi_class_byname, uc_bidi_category_byname, uc_joining_type_byname,
65124         uc_joining_group_byname, uc_script_byname, uc_is_script, uc_is_block):
65125         Declare with GCC attribute 'pure'.
65126         * lib/unigbrk.in.h (uc_graphemeclusterbreak_property,
65127         uc_is_grapheme_break, u8_grapheme_next, u16_grapheme_next,
65128         u32_grapheme_next, u8_grapheme_prev, u16_grapheme_prev,
65129         u32_grapheme_prev, lib/uniname.in.h (unicode_name_character): Declare
65130         with GCC attribute 'pure'.
65131         * lib/uninorm.in.h (uc_composition): Declare with GCC attribute
65132         'const'.
65133         (uninorm_decomposing_form): Declare with GCC attribute 'pure'.
65134         * lib/unistr.in.h (): Declare with GCC attribute 'const'.
65135         (u8_check, u16_check, u32_check, u8_mblen, u16_mblen, u32_mblen,
65136         u8_cmp, u16_cmp, u32_cmp, u8_cmp2, u16_cmp2, u32_cmp2, u8_chr, u16_chr,
65137         u32_chr, u8_mbsnlen, u16_mbsnlen, u32_mbsnlen, u8_strmblen,
65138         u16_strmblen, u32_strmblen, u8_strlen, u16_strlen, u32_strlen,
65139         u8_strnlen, u16_strnlen, u32_strnlen, u8_strcmp_gnu, u8_strcmp,
65140         u16_strcmp, u32_strcmp, u8_strncmp, u16_strncmp, u32_strncmp,
65141         u8_strchr, u16_strchr, u32_strchr, u8_strrchr, u16_strrchr,
65142         u32_strrchr, u8_strcspn, u16_strcspn, u32_strcspn, u8_strspn,
65143         u16_strspn, u32_strspn, u8_strpbrk, u16_strpbrk, u32_strpbrk,
65144         u8_strstr, u16_strstr, u32_strstr, u8_startswith, u16_startswith,
65145         u32_startswith, u8_endswith, u16_endswith, u32_endswith): Declare with
65146         GCC attribute 'pure'.
65147         * lib/uniwbrk.in.h (uc_wordbreak_property): Declare with GCC attribute
65148         'const'.
65149         * lib/uniwidth.in.h (uc_width): Simplify declaration.
65150         (u8_width, u16_width, u32_width, u8_strwidth, u16_strwidth,
65151         u32_strwidth): Declare with GCC attribute 'pure'.
65153         Enable common subexpression optimization in GCC.
65154         * lib/dirent.in.h (_GL_ATTRIBUTE_PURE): Define, like in string.in.h.
65155         (alphasort): Declare with GCC attribute 'pure'.
65156         * lib/stdlib.in.h (_GL_ATTRIBUTE_PURE): Define, like in string.in.h.
65157         (atoll): Declare with GCC attribute 'pure'.
65158         * lib/string.in.h (mbslen, mbsnlen, mbschr, mbsrchr, mbsstr,
65159         mbscasecmp, mbsncasecmp, mbspcasecmp, mbscasestr, mbscspn, mbspbrk,
65160         mbsspn, strverscmp): Declare with GCC attribute 'pure'.
65161         * lib/wchar.in.h (_GL_ATTRIBUTE_PURE): Define, like in string.in.h.
65162         (btowc, wctob, wcwidth, wmemchr, wmemcmp, wcslen, wcsnlen, wcscmp,
65163         wcsncmp, wcscasecmp, wcsncasecmp, wcschr, wcsrchr, wcscspn, wcsspn,
65164         wcspbrk, wcsstr, wcswidth): Declare with GCC attribute 'pure'.
65166 2012-03-24  Bruno Haible  <bruno@clisp.org>
65168         gnulib-tool: Avoid unintended error output from 'cmp'.
65169         * gnulib-tool (func_add_file, func_update_file, func_import): Use
65170         "cmp -s", not "cmp > /dev/null".
65172 2012-03-23  Stefano Lattarini  <stefano.lattarini@gmail.com>
65174         gnulib-tool: fix imprecise comments w.r.t. an automake bug
65176         It's not just Automake versions < 1.9b that creates an empty
65177         pkgdatadir at installation time if pkgdata_DATA is specified
65178         to empty; modern automake versions do this as well, at least
65179         until automake 1.11.4 (not yet released at the moment of writing,
65180         but soon to appear).  That behaviour was generally considered a
65181         feature rather than a bug, at least until this discussion:
65182         <http://lists.gnu.org/r/automake/2012-03/msg00014.html>
65184         See also automake bugs #10997 and #11030.
65186         * gnulib-tool (func_emit_lib_Makefile_am): Adjust comments.  Add
65187         reference to relevant automake bug numbers.
65188         (func_emit_tests_Makefile_am): Likewise.
65190 2012-03-20  Reuben Thomas  <rrt@sc3d.org>
65192         announce-gen: use Digest::SHA when possible
65193         * build-aux/announce-gen: Use Digest::SHA when possible, falling
65194         back to Digest::SHA1 if necessary.
65196 2012-03-20  Jim Meyering  <meyering@redhat.com>
65198         tests: avoid gcc warnings about argv vs. const initializers
65199         * tests/test-posix_spawn1.c (main): Cast to "(char *)" to avoid two
65200         warnings about discarding 'const' qualifier from pointer target type.
65201         * tests/test-posix_spawn2.c (main): Likewise.
65203 2012-03-20  Reuben Thomas  <rrt@sc3d.org>
65205         README-release: simplify slightly
65206         * top/README-release: Run "git checkout master" only once.
65208 2012-03-15  Mark Wielaard  <mark@klomp.org>
65210         git-merge-changelog: add specific example on how to use with hg.
65211         * lib/git-merge-changelog.c: Add example on how to use in .hgrc.
65213 2012-03-18  Mark Wielaard  <mark@klomp.org>
65215         lib/git-merge-changelog.c (status): Report bugs to bug-gnulib@gnu.org.
65217 2012-03-18  Andreas Oberritter  <obi@opendreambox.org>
65219         git-version-gen: don't let "prefix" envvar cause trouble
65220         * build-aux/git-version-gen (prefix): Initialize properly,
65221         so as not to use a value specified via the environment.
65222         Details here: http://thread.gmane.org/gmane.comp.gnu.parted.bugs/10810
65224 2012-03-16  Paul Eggert  <eggert@cs.ucla.edu>
65226         regex: diagnose too-large repeat counts in EREs
65227         Previously, the code did not diagnose the too-large repeat count
65228         in EREs like 'b{1000000000}'; instead, it silently treated the ERE
65229         as if it were 'b\{1000000000}', which is unexpected.
65230         * lib/regcomp.c (parse_dup_op): Fail with REG_ESIZE if a repeat count
65231         is too large.  REG_ESIZE is used nowhere else, and the diagnostic
65232         is a reasonable one for this problem.  Another option would be to
65233         create a new REG_OVERFLOW error for repeat counts that are too large.
65234         (fetch_number): Return RE_DUP_MAX + 1, not REG_ERROR, if the repeat
65235         count is too large, so that the caller can distinguish the two cases.
65236         * lib/regex.h (_REG_ESIZE): Document that this is now a generic
65237         "Too large" return code, and that repeat counts are one example of this.
65239 2012-03-16  Paul Eggert  <eggert@cs.ucla.edu>
65241         doc: some glibc x32 integer width issues
65242         * doc/posix-headers/sys_types.texi (sys/types.h):
65243         * doc/posix-headers/time.texi (time.h):
65244         Mention that glibc x32 does not conform to POSIX in a couple of
65245         areas related to integer widths.
65247 2012-03-15  Bruno Haible  <bruno@clisp.org>
65249         fmal: Avoid test failure on OpenBSD 5.1/SPARC64.
65250         * lib/fma.c (VOLATILE): New macro.
65251         (FUNC): Use it to work around a GCC compiler bug.
65253 2012-03-13  Bruno Haible  <bruno@clisp.org>
65255         hypotl: Bypass broken implementation in OpenBSD 5.1/SPARC.
65256         * m4/hypotl.m4 (gl_FUNC_HYPOTL_WORKS): New macro.
65257         (gl_FUNC_HYPOTL): Invoke it. If the function does not work, set
65258         REPLACE_HYPOTL to 1.
65259         * doc/posix-functions/hypotl.texi: Mention the OpenBSD 5.1/SPARC bug.
65261 2012-03-13  Bruno Haible  <bruno@clisp.org>
65263         remainderl: Bypass broken implementation in OpenBSD 5.1/SPARC.
65264         * m4/remainderl.m4 (gl_FUNC_REMAINDERL_WORKS): New macro.
65265         (gl_FUNC_REMAINDERL): Invoke it. If the function does not work, set
65266         REPLACE_REMAINDERL to 1.
65267         * doc/posix-functions/remainderl.texi: Mention the OpenBSD 5.1/SPARC
65268         bug.
65270 2012-03-13  Bruno Haible  <bruno@clisp.org>
65272         sqrtl: Bypass broken implementation in OpenBSD 5.1/SPARC.
65273         * lib/math.in.h (sqrtl): Replace it if REPLACE_SQRTL is 1.
65274         * m4/sqrtl.m4 (gl_FUNC_SQRTL_WORKS): New macro.
65275         (gl_FUNC_SQRTL): Invoke it. Set REPLACE_SQRTL to 1 if sqrtl() produces
65276         too big rounding errors.
65277         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_SQRTL.
65278         * modules/math (Makefile.am): Substitute REPLACE_SQRTL.
65279         * modules/sqrtl (configure.ac): Consider REPLACE_SQRTL.
65280         (Depends-on): Update conditions.
65281         * tests/test-sqrtl.c (my_ldexpl): New function.
65282         (main): Add test of a particular value.
65283         * doc/posix-functions/sqrtl.texi: Mention the OpenBSD 5.1/SPARC bug.
65285 2012-03-13  Pádraig Brady  <P@draigBrady.com>
65287         doc: Update timer_* platform portability notes.
65288         * doc/posix-functions/timer_create.texi: Add platforms (OpenBSD 4.9)
65289         that always return ENOSYS.
65290         * doc/posix-functions/timer_delete.texi: Likewise.
65291         * doc/posix-functions/timer_gettime.texi: Likewise.
65292         * doc/posix-functions/timer_settime.texi: Likewise.
65294 2012-03-13  Bruno Haible  <bruno@clisp.org>
65296         cbrtl: Bypass broken implementation in OpenBSD 5.1/SPARC.
65297         * m4/cbrtl.m4 (gl_FUNC_CBRTL_WORKS): New macro.
65298         (gl_FUNC_CBRTL): Invoke it. If the function does not work, set
65299         REPLACE_CBRTL to 1.
65300         * doc/posix-functions/cbrtl.texi: Mention the OpenBSD 5.1/SPARC bug.
65302 2012-03-13  Bruno Haible  <bruno@clisp.org>
65304         remainderl: Avoid compilation error on AIX >= 5.2.
65305         * lib/math.in.h (remainderl): Undefine macro from the system header.
65307 2012-03-13  Bruno Haible  <bruno@clisp.org>
65309         Avoid compilation errors with MSVC option -fp:strict.
65310         * lib/cbrt.c: Use MSVC specific pragma fenv_access.
65311         * lib/cbrtf.c: Likewise.
65312         Reported by Michael Goffioul <michael.goffioul@gmail.com>.
65314 2012-03-12  Bruno Haible  <bruno@clisp.org>
65316         uninorm: Don't crash in out-of-memory conditions.
65317         * lib/uninorm/u-normalize-internal.h (FUNC): Handle malloc() failure
65318         gracefully.
65319         * lib/uninorm/uninorm-filter.c (uninorm_filter_write): Likewise.
65320         Based on a report and patch by Stephen Gallagher <sgallagh@redhat.com>.
65322 2012-03-13  Akim Demaille  <akim@lrde.epita.fr>
65324         quote: fix syntax-check
65325         * top/maint.mk (sc_prohibit_quote_without_use): quote.h
65326         also exports quote_quoting_options.
65328 2012-03-12  Simon Josefsson  <simon@josefsson.org>
65330         Collapse list of copyright years to ranges.  See
65331         <https://lists.gnu.org/r/bug-gnulib/2012-03/msg00051.html>.
65332         * build-aux/bootstrap.conf, build-aux/csharpcomp.sh.in,
65333         build-aux/csharpexec.sh.in, build-aux/gnupload,
65334         build-aux/install-reloc, build-aux/javacomp.sh.in,
65335         build-aux/javaexec.sh.in, build-aux/ldd.sh.in,
65336         build-aux/move-if-change, build-aux/reloc-ldflags,
65337         build-aux/relocatable.sh.in, build-aux/x-to-1.in: Fix copyright.
65339 2012-03-11  Bruno Haible  <bruno@clisp.org>
65341         log2f-ieee: Work around test failure on NetBSD 5.1 and Solaris 10.
65342         * m4/log2f-ieee.m4: New file.
65343         * m4/log2f.m4 (gl_FUNC_LOG2F): If gl_FUNC_LOG2F_IEEE is present, test
65344         whether log2f works with a minus zero argument. Replace it if not.
65345         * modules/log2f-ieee (Files): Add m4/log2f-ieee.m4.
65346         (Depends-on): Add log2-ieee.
65347         (configure.ac): Invoke gl_FUNC_LOG2F_IEEE.
65348         * doc/posix-functions/log2f.texi: Mention the log2f-ieee module.
65350         log2-ieee: Work around test failure on NetBSD 5.1 and Solaris 10.
65351         * m4/log2-ieee.m4: New file.
65352         * m4/log2.m4 (gl_FUNC_LOG2): If gl_FUNC_LOG2_IEEE is present, test
65353         whether log2 works with a minus zero argument. Replace it if not.
65354         * modules/log2-ieee (Files): Add m4/log2-ieee.m4.
65355         (configure.ac): Invoke gl_FUNC_LOG2_IEEE.
65356         * doc/posix-functions/log2.texi: Mention the log2-ieee module.
65358         Tests for module 'log2l-ieee'.
65359         * modules/log2l-ieee-tests: New file.
65360         * tests/test-log2l-ieee.c: New file.
65362         New module 'log2l-ieee'.
65363         * modules/log2l-ieee: New file.
65365         Tests for module 'log2-ieee'.
65366         * modules/log2-ieee-tests: New file.
65367         * tests/test-log2-ieee.c: New file.
65369         New module 'log2-ieee'.
65370         * modules/log2-ieee: New file.
65372         Tests for module 'log2f-ieee'.
65373         * modules/log2f-ieee-tests: New file.
65374         * tests/test-log2f-ieee.c: New file.
65375         * tests/test-log2-ieee.h: New file.
65377         New module 'log2f-ieee'.
65378         * modules/log2f-ieee: New file.
65380 2012-03-11  Bruno Haible  <bruno@clisp.org>
65382         Tests for module 'log2l'.
65383         * modules/log2l-tests: New file.
65384         * tests/test-log2l.c: New file.
65386         New module 'log2l'.
65387         * lib/math.in.h (log2l): New declaration.
65388         * lib/log2l.c: New file.
65389         * m4/log2l.m4: New file.
65390         * m4/math_h.m4 (gl_MATH_H): Test whether log2l is declared.
65391         (gl_MATH_H_DEFAULTS): Initialize GNULIB_LOG2L, HAVE_DECL_LOG2L,
65392         REPLACE_LOG2L.
65393         * modules/math (Makefile.am): Substitute GNULIB_LOG2L, HAVE_DECL_LOG2L,
65394         REPLACE_LOG2L.
65395         * modules/log2l: New file.
65396         * tests/test-math-c++.cc: Check the declaration of log2l.
65397         * doc/posix-functions/log2l.texi: Mention the new module and the IRIX
65398         and OSF/1 problems.
65400 2012-03-11  Bruno Haible  <bruno@clisp.org>
65402         Tests for module 'log2f'.
65403         * modules/log2f-tests: New file.
65404         * tests/test-log2f.c: New file.
65406         New module 'log2f'.
65407         * lib/math.in.h (log2f): New declaration.
65408         * lib/log2f.c: New file.
65409         * m4/log2f.m4: New file.
65410         * m4/math_h.m4 (gl_MATH_H): Test whether log2f is declared.
65411         (gl_MATH_H_DEFAULTS): Initialize GNULIB_LOG2F, HAVE_DECL_LOG2F,
65412         REPLACE_LOG2F.
65413         * modules/math (Makefile.am): Substitute GNULIB_LOG2F, HAVE_DECL_LOG2F,
65414         REPLACE_LOG2F.
65415         * modules/log2f: New file.
65416         * tests/test-math-c++.cc: Check the declaration of log2f.
65417         * doc/posix-functions/log2f.texi: Mention the new module and the IRIX
65418         and OSF/1 and Cygwin problems.
65420 2012-03-11  Bruno Haible  <bruno@clisp.org>
65422         Tests for module 'log2'.
65423         * modules/log2-tests: New file.
65424         * tests/test-log2.c: New file.
65425         * tests/test-log2.h: New file.
65427         New module 'log2'.
65428         * lib/math.in.h (log2): New declaration.
65429         * lib/log2.c: New file.
65430         * m4/log2.m4: New file.
65431         * m4/math_h.m4 (gl_MATH_H): Test whether log2 is declared.
65432         (gl_MATH_H_DEFAULTS): Initialize GNULIB_LOG2, HAVE_DECL_LOG2,
65433         REPLACE_LOG2.
65434         * modules/math (Makefile.am): Substitute GNULIB_LOG2, HAVE_DECL_LOG2,
65435         REPLACE_LOG2.
65436         * modules/log2: New file.
65437         * tests/test-math-c++.cc: Check the declaration of log2.
65438         * doc/posix-functions/log2.texi: Mention the new module and the IRIX
65439         and OSF/1 and Cygwin problems.
65441 2012-03-11  Bruno Haible  <bruno@clisp.org>
65443         exp2* tests: More tests.
65444         * tests/test-exp2.h (test_function): Test all integral arguments that
65445         don't need to overflow or denormalized numbers.
65446         * tests/test-exp2.c (MAX_EXP, MIN_EXP): New macros.
65447         * tests/test-exp2f.c (MAX_EXP, MIN_EXP): Likewise.
65448         * tests/test-exp2l.c (MAX_EXP, MIN_EXP): Likewise.
65450 2012-03-10  Bruno Haible  <bruno@clisp.org>
65452         log1pl-ieee: Work around test failure on AIX 7.1.
65453         * modules/log1pl-ieee (Depends-on): Add log1p-ieee.
65455         log1pl-ieee: Work around test failure on IRIX 6.5.
65456         * m4/log1pl-ieee.m4: New file.
65457         * m4/log1pl.m4 (gl_FUNC_LOG1PL): If gl_FUNC_LOG1PL_IEEE is present,
65458         test whether log1pl works with a minus zero argument. Replace it if
65459         not.
65460         * lib/math.in.h (log1pl): Override if REPLACE_LOG1PL is 1.
65461         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_LOG1PL.
65462         * modules/math (Makefile.am): Substitute REPLACE_LOG1PL.
65463         * modules/log1pl (configure.ac): Consider REPLACE_LOG1PL.
65464         (Depends-on): Update conditions.
65465         * modules/log1pl-ieee (Files): Add m4/log1p-ieee.m4, m4/minus-zero.m4,
65466         m4/signbit.m4.
65467         (configure.ac): Invoke gl_FUNC_LOG1PL_IEEE.
65468         * doc/posix-functions/log1pl.texi: Mention the log1pl-ieee module.
65470         log1pf-ieee: Work around test failure on OpenBSD 4.9 and AIX 7.1.
65471         * m4/log1pf-ieee.m4: New file.
65472         * m4/log1pf.m4 (gl_FUNC_LOG1PF): If gl_FUNC_LOG1PF_IEEE is present,
65473         test whether log1pf works with a minus zero argument. Replace it if
65474         not.
65475         * modules/log1pf-ieee (Files): Add m4/log1pf-ieee.m4, m4/minus-zero.m4,
65476         m4/signbit.m4.
65477         (configure.ac): Invoke gl_FUNC_LOG1PF_IEEE.
65478         * doc/posix-functions/log1pf.texi: Mention the log1pf-ieee module.
65480         log1pf-ieee: Work around test failure on AIX 5.1 and HP-UX 11.
65481         * modules/log1pf-ieee (Depends-on): Add log1p-ieee.
65482         (configure.ac): Require gl_FUNC_LOG1PF.
65484         log1p-ieee: Work around test failure on AIX 7.1 and HP-UX 11.
65485         * m4/log1p-ieee.m4: New file.
65486         * m4/log1p.m4 (gl_FUNC_LOG1P): If gl_FUNC_LOG1P_IEEE is present, test
65487         whether log1p works with a minus zero argument. Replace it if not.
65488         * lib/math.in.h (log1p): Override if REPLACE_LOG1P is 1.
65489         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_LOG1P.
65490         * modules/math (Makefile.am): Substitute REPLACE_LOG1P.
65491         * modules/log1p (configure.ac): Consider REPLACE_LOG1P.
65492         (Depends-on): Update conditions.
65493         * modules/log1p-ieee (Files): Add m4/log1p-ieee.m4, m4/minus-zero.m4,
65494         m4/signbit.m4.
65495         (configure.ac): Invoke gl_FUNC_LOG1P_IEEE.
65496         * doc/posix-functions/log1p.texi: Mention the log1p-ieee module.
65498         Tests for module 'log1pl-ieee'.
65499         * modules/log1pl-ieee-tests: New file.
65500         * tests/test-log1pl-ieee.c: New file.
65502         New module 'log1pl-ieee'.
65503         * modules/log1pl-ieee: New file.
65505         Tests for module 'log1p-ieee'.
65506         * modules/log1p-ieee-tests: New file.
65507         * tests/test-log1p-ieee.c: New file.
65509         New module 'log1p-ieee'.
65510         * modules/log1p-ieee: New file.
65512         Tests for module 'log1pf-ieee'.
65513         * modules/log1pf-ieee-tests: New file.
65514         * tests/test-log1pf-ieee.c: New file.
65515         * tests/test-log1p-ieee.h: New file.
65517         New module 'log1pf-ieee'.
65518         * modules/log1pf-ieee: New file.
65520 2012-03-10  Bruno Haible  <bruno@clisp.org>
65522         Tests for module 'log1pl'.
65523         * modules/log1pl-tests: New file.
65524         * tests/test-log1pl.c: New file.
65526         New module 'log1pl'.
65527         * lib/math.in.h (log1pl): New declaration.
65528         * lib/log1pl.c: New file.
65529         * m4/log1pl.m4: New file.
65530         * m4/math_h.m4 (gl_MATH_H): Test whether log1pl is declared.
65531         (gl_MATH_H_DEFAULTS): Initialize GNULIB_LOG1PL, HAVE_LOG1PL.
65532         * modules/math (Makefile.am): Substitute GNULIB_LOG1PL, HAVE_LOG1PL.
65533         * modules/log1pl: New file.
65534         * tests/test-math-c++.cc: Check the declaration of log1pl.
65535         * doc/posix-functions/log1pl.texi: Mention the new module.
65537 2012-03-10  Bruno Haible  <bruno@clisp.org>
65539         Tests for module 'log1pf'.
65540         * modules/log1pf-tests: New file.
65541         * tests/test-log1pf.c: New file.
65543         New module 'log1pf'.
65544         * lib/math.in.h (log1pf): New declaration.
65545         * lib/log1pf.c: New file.
65546         * m4/log1pf.m4: New file.
65547         * m4/math_h.m4 (gl_MATH_H): Test whether log1pf is declared.
65548         (gl_MATH_H_DEFAULTS): Initialize GNULIB_LOG1PF, HAVE_LOG1PF,
65549         REPLACE_LOG1PF.
65550         * modules/math (Makefile.am): Substitute GNULIB_LOG1PF, HAVE_LOG1PF,
65551         REPLACE_LOG1PF.
65552         * modules/log1pf: New file.
65553         * tests/test-math-c++.cc: Check the declaration of log1pf.
65554         * doc/posix-functions/log1pf.texi: Mention the new module.
65556 2012-03-10  Bruno Haible  <bruno@clisp.org>
65558         log1p tests: More tests.
65559         * tests/test-log1p.h: New file.
65560         * modules/log1p-tests (Files): Add tests/test-log1p.h, tests/randomd.c.
65561         (Makefile.am): Add randomd.c to test_log1p_SOURCES.
65562         * tests/test-log1p.c: Include <float.h> and test-log1p.h.
65563         (main): Invoke test_function.
65565         log1p: Provide replacement for Minix and MSVC.
65566         * lib/math.in.h (log1p): New declaration.
65567         * lib/log1p.c: New file.
65568         * m4/log1p.m4: New file.
65569         * m4/math_h.m4 (gl_MATH_H): Test whether log1p is declared.
65570         (gl_MATH_H_DEFAULTS): Initialize GNULIB_LOG1P, HAVE_LOG1P.
65571         * modules/math (Makefile.am): Substitute GNULIB_LOG1P, HAVE_LOG1P.
65572         * modules/log1p (Files): Add lib/log1p.c, m4/log1p.m4.
65573         (Depends-on): Add math, isnand, log, round.
65574         (configure.ac): Invoke gl_FUNC_LOG1P. Arrange to compile replacement if
65575         HAVE_LOG1P is 0.
65576         * tests/test-math-c++.cc: Check the declaration of log1p.
65577         * doc/posix-functions/log1p.texi: Mention the replacement.
65579 2012-03-10  Bruno Haible  <bruno@clisp.org>
65581         math tests: Small simplification.
65582         * tests/test-exp.h (test_function): Use the same err_bound for
65583         'double' on platforms with sizeof (long double) == sizeof (double)
65584         than on platforms with sizeof (long double) > sizeof (double).
65585         * tests/test-exp2.h (test_function): Likewise.
65586         * tests/test-expm1.h (test_function): Likewise.
65587         * tests/test-log.h (test_function): Likewise.
65589 2012-03-10  Bruno Haible  <bruno@clisp.org>
65591         Fix some comments.
65592         * lib/expl.c: Fix an ambiguous comment.
65593         * lib/expm1.c: Likewise.
65594         * lib/expm1l.c: Likewise.
65595         * lib/exp2.c: Likewise.
65596         * lib/exp2l.c: Likewise.
65598 2012-03-10  Paul Eggert  <eggert@cs.ucla.edu>
65600         regex: allow inclusion of <regex.h> before <limits.h>
65601         Without this patch, portable programs had to include <limits.h> before
65602         <regex.h> if they wanted a consistent value for RE_DUP_MAX.
65603         I ran into this problem with a test version of GNU grep on Solaris 8.
65604         * lib/regex.h: Include <limits.h> if _REGEX_INCLUDE_LIMITS_H.
65605         This is done conditionally so that this change can be merged
65606         back to glibc.
65607         * m4/regex.m4 (gl_REGEX): Define _REGEX_INCLUDE_LIMITS_H if
65608         using the included regex.
65610         fts: depend on fdopendir
65611         * modules/fts (Depends-on): Depend on fdopendir.  This is needed
65612         on Solaris 8, at least, since it lacks fdopendir.  Evidently the
65613         problem was introduced when fdopendir was split out.
65615 2012-03-10  Bruno Haible  <bruno@clisp.org>
65617         Remove unused variables.
65618         * m4/fmodf.m4 (gl_FUNC_FMODF): Remove unused variable 'i'.
65619         * m4/remainderf.m4 (gl_FUNC_REMAINDERF): Likewise.
65621 2012-03-10  Bruno Haible  <bruno@clisp.org>
65623         isnanf-nolibm: Fix last commit.
65624         * lib/isnanf-nolibm.h [IRIX]: Don't include <ieeefp.h>. Declare isnanf.
65626         isnanf-nolibm: Make it work on IRIX 6.5 with cc.
65627         * lib/isnanf-nolibm.h [IRIX]: Include <ieeefp.h>.
65629 2012-03-10  Bruno Haible  <bruno@clisp.org>
65631         logf-ieee: Work around test failure on NetBSD 5.1.
65632         * m4/logf-ieee.m4: New file.
65633         * m4/logf.m4 (gl_FUNC_LOGF): If gl_FUNC_LOGF_IEEE is present, test
65634         whether logf works with a negative argument. Replace it if not.
65635         * lib/logf.c (logf): For negative arguments, return NaN.
65636         * modules/logf-ieee (Files): Add m4/logf-ieee.m4.
65637         (configure.ac): Invoke gl_FUNC_LOGF_IEEE.
65638         * doc/posix-functions/logf.texi: Mention the logf-ieee module.
65640         logf-ieee: Work around test failure on Solaris 9.
65641         * modules/logf-ieee (Depends-on): Add log-ieee.
65642         (configure.ac): Require gl_FUNC_LOGF.
65644         log-ieee: Work around test failure on NetBSD 5.1 and Solaris 11.
65645         * m4/log-ieee.m4: New file.
65646         * m4/log.m4 (gl_FUNC_LOG): If gl_FUNC_LOG_IEEE is present, test whether
65647         log works with a negative argument. Replace it if not.
65648         * lib/log.c (log): For negative arguments, return NaN.
65649         * modules/log-ieee (Files): Add m4/log-ieee.m4.
65650         (configure.ac): Invoke gl_FUNC_LOG_IEEE.
65651         * doc/posix-functions/log.texi: Mention the log-ieee module.
65653         Tests for module 'logl-ieee'.
65654         * modules/logl-ieee-tests: New file.
65655         * tests/test-logl-ieee.c: New file.
65657         New module 'logl-ieee'.
65658         * modules/logl-ieee: New file.
65660         Tests for module 'log-ieee'.
65661         * modules/log-ieee-tests: New file.
65662         * tests/test-log-ieee.c: New file.
65664         New module 'log-ieee'.
65665         * modules/log-ieee: New file.
65667         Tests for module 'logf-ieee'.
65668         * modules/logf-ieee-tests: New file.
65669         * tests/test-logf-ieee.c: New file.
65670         * tests/test-log-ieee.h: New file.
65672         New module 'logf-ieee'.
65673         * modules/logf-ieee: New file.
65675 2012-03-10  Bruno Haible  <bruno@clisp.org>
65677         log: Fix bug introduced on 2012-03-09.
65678         * m4/log.m4 (gl_FUNC_LOG): Require gl_MATH_H_DEFAULTS.
65680 2012-03-10  Pádraig Brady  <P@draigBrady.com>
65682         timer-time: link explicitly with pthreads on glibc
65683         * m4/timer_time.m4 (LIB_TIMER_TIME): Add -lpthread
65684         to support static linking, when newer glibc is
65685         detected, as that contains pthread emulation of
65686         POSIX timer functions where required.
65687         * modules/timer-time: Depend on threadlib to
65688         pull in the appropriate library to link.
65690 2012-03-10  Bruno Haible  <bruno@clisp.org>
65692         log* tests: More tests.
65693         * tests/test-log.h: New file.
65694         * tests/test-log.c: Include <float.h>, minus-zero.h, test-log.h.
65695         (main): Invoke test_function.
65696         * tests/test-logf.c: Include <float.h>, minus-zero.h, test-log.h.
65697         (main): Invoke test_function.
65698         * tests/test-logl.c: Include <float.h>, minus-zero.h, test-log.h.
65699         (main): Invoke test_function.
65700         * modules/log-tests (Files): Add tests/test-log.h, tests/minus-zero.h,
65701         tests/randomd.c.
65702         (Makefile.am): Add randomd.c to test_log_SOURCES.
65703         * modules/logf-tests (Files): Add tests/test-log.h, tests/minus-zero.h,
65704         tests/randomf.c.
65705         (Makefile.am): Add randomf.c to test_logf_SOURCES.
65706         * modules/logl-tests (Files): Add tests/test-log.h, tests/minus-zero.h,
65707         tests/randoml.c.
65708         (Depends-on): Add 'float'.
65709         (Makefile.am): Add randoml.c to test_logl_SOURCES.
65711 2012-03-09  Bruno Haible  <bruno@clisp.org>
65713         logl: Work around OSF/1 5.1 bug.
65714         * lib/math.in.h (logl): Override if REPLACE_LOGL is 1.
65715         * lib/logl.c (logl): If logl exists, use it and provide just the
65716         workaround.
65717         * m4/logl.m4 (gl_FUNC_LOGL_WORKS): New macro.
65718         (gl_FUNC_LOGL): Invoke it. Set REPLACE_LOGL.
65719         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_LOGL.
65720         * modules/math (Makefile.am): Substitute REPLACE_LOGL.
65721         * modules/logl (configure.ac): Consider REPLACE_LOGL.
65722         (Depends-on): Update conditions.
65723         * doc/posix-functions/logl.texi: Mention the OSF/1 5.1 problem.
65725 2012-03-09  Bruno Haible  <bruno@clisp.org>
65727         logf: Work around OSF/1 5.1 bug.
65728         * lib/math.in.h (logf): Override if REPLACE_LOGF is 1.
65729         * lib/logf.c (logf): If logf exists, use it and provide just the
65730         workaround.
65731         * m4/logf.m4 (gl_FUNC_LOGF_WORKS): New macro.
65732         (gl_FUNC_LOGF): Invoke it. Set REPLACE_LOGF.
65733         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_LOGF.
65734         * modules/math (Makefile.am): Substitute REPLACE_LOGF.
65735         * modules/logf (configure.ac): Consider REPLACE_LOGF.
65736         (Depends-on): Update conditions.
65737         * doc/posix-functions/logf.texi: Mention the OSF/1 5.1 problem.
65739 2012-03-09  Bruno Haible  <bruno@clisp.org>
65741         log: Work around OSF/1 5.1 bug.
65742         * lib/math.in.h (log): New declaration.
65743         * lib/log.c: New file.
65744         * m4/log.m4 (gl_FUNC_LOG_WORKS): New macro.
65745         (gl_FUNC_LOG): Invoke it. Set REPLACE_LOG.
65746         * m4/math_h.m4 (gl_MATH_H): Test whether log is declared.
65747         (gl_MATH_H_DEFAULTS): Initialize GNULIB_LOG, REPLACE_LOG.
65748         * modules/math (Makefile.am): Substitute GNULIB_LOG, REPLACE_LOG.
65749         * modules/log (Files): Add lib/log.c.
65750         (Depends-on): Add math.
65751         (configure.ac): If REPLACE_LOG is 1, compile an override.
65752         * tests/test-math-c++.cc: Check the declaration of log.
65753         * doc/posix-functions/log.texi: Mention the OSF/1 5.1 problem.
65755 2012-03-09  Jim Meyering  <meyering@redhat.com>
65757         readtokens.c: adjust wording in a comment
65758         * lib/readtokens.c: Insert omitted "that" in a comment.
65760 2012-03-08  Paul Eggert  <eggert@cs.ucla.edu>
65762         modechange: add notations +40, 00440, etc.
65763         * lib/modechange.c (mode_compile): Support new notations
65764         +40, -40, =440, 00440.  See <http://debbugs.gnu.org/8391>.
65766 2012-03-08  Bruno Haible  <bruno@clisp.org>
65768         exp2l-ieee: Work around test failure on OpenBSD 4.9 and IRIX 6.5.
65769         * m4/exp2l-ieee.m4: New file.
65770         * m4/exp2l.m4 (gl_FUNC_EXP2L): If gl_FUNC_EXP2L_IEEE is present,
65771         test whether exp2l works with a NaN argument and with a negative
65772         infinity argument. Replace it if not.
65773         * lib/math.in.h (exp2l): Override if REPLACE_EXP2L is 1.
65774         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_EXP2L.
65775         * modules/math (Makefile.am): Substitute REPLACE_EXP2L.
65776         * modules/exp2l (configure.ac): Consider REPLACE_EXP2L.
65777         (Depends-on): Update conditions.
65778         * modules/exp2l-ieee (Files): Add m4/exp2l-ieee.m4.
65779         (configure.ac): Invoke gl_FUNC_EXP2L_IEEE.
65780         * doc/posix-functions/exp2l.texi: Mention the exp2l-ieee module.
65782         Tests for module 'exp2l-ieee'.
65783         * modules/exp2l-ieee-tests: New file.
65784         * tests/test-exp2l-ieee.c: New file.
65786         New module 'exp2l-ieee'.
65787         * modules/exp2l-ieee: New file.
65789         Tests for module 'exp2-ieee'.
65790         * modules/exp2-ieee-tests: New file.
65791         * tests/test-exp2-ieee.c: New file.
65793         New module 'exp2-ieee'.
65794         * modules/exp2-ieee: New file.
65796         Tests for module 'exp2f-ieee'.
65797         * modules/exp2f-ieee-tests: New file.
65798         * tests/test-exp2f-ieee.c: New file.
65799         * tests/test-exp2-ieee.h: New file.
65801         New module 'exp2f-ieee'.
65802         * modules/exp2f-ieee: New file.
65804 2012-03-08  Bruno Haible  <bruno@clisp.org>
65806         Tests for module 'exp2l'.
65807         * modules/exp2l-tests: New file.
65808         * tests/test-exp2l.c: New file.
65810         New module 'exp2l'.
65811         * lib/math.in.h (exp2l): New declaration.
65812         * lib/exp2l.c: New file.
65813         * lib/expl-table.c: New file, extracted from lib/expl.c.
65814         * lib/expl.c (gl_expl_table): New declaration.
65815         (expl): Remove expl_table. Update reference.
65816         * m4/exp2l.m4: New file.
65817         * m4/math_h.m4 (gl_MATH_H): Test whether exp2l is declared.
65818         (gl_MATH_H_DEFAULTS): Initialize GNULIB_EXP2L, HAVE_DECL_EXP2L.
65819         * modules/math (Makefile.am): Substitute GNULIB_EXP2L, HAVE_DECL_EXP2L.
65820         * modules/exp2l: New file.
65821         * modules/expl (Files): Add lib/expl-table.c.
65822         (configure.ac): Compile also expl-table.c.
65823         * tests/test-math-c++.cc: Check the declaration of exp2l.
65824         * doc/posix-functions/exp2l.texi: Mention the new module and the IRIX
65825         problem.
65827 2012-03-08  Bruno Haible  <bruno@clisp.org>
65829         Tests for module 'exp2f'.
65830         * modules/exp2f-tests: New file.
65831         * tests/test-exp2f.c: New file.
65833         New module 'exp2f'.
65834         * lib/math.in.h (exp2f): New declaration.
65835         * lib/exp2f.c: New file.
65836         * m4/exp2f.m4: New file.
65837         * m4/math_h.m4 (gl_MATH_H): Test whether exp2f is declared.
65838         (gl_MATH_H_DEFAULTS): Initialize GNULIB_EXP2F, HAVE_DECL_EXP2F.
65839         * modules/math (Makefile.am): Substitute GNULIB_EXP2F, HAVE_DECL_EXP2F.
65840         * modules/exp2f: New file.
65841         * tests/test-math-c++.cc: Check the declaration of exp2f.
65842         * doc/posix-functions/exp2f.texi: Mention the new module and the
65843         IRIX problem.
65845 2012-03-08  Bruno Haible  <bruno@clisp.org>
65847         Tests for module 'exp2'.
65848         * modules/exp2-tests: New file.
65849         * tests/test-exp2.c: New file.
65850         * tests/test-exp2.h: New file.
65852         New module 'exp2'.
65853         * lib/math.in.h (exp2): New declaration.
65854         * lib/exp2.c: New file.
65855         * m4/exp2.m4: New file.
65856         * m4/math_h.m4 (gl_MATH_H): Test whether exp2 is declared.
65857         (gl_MATH_H_DEFAULTS): Initialize GNULIB_EXP2, HAVE_DECL_EXP2,
65858         REPLACE_EXP2.
65859         * modules/math (Makefile.am): Substitute GNULIB_EXP2, HAVE_DECL_EXP2,
65860         REPLACE_EXP2.
65861         * modules/exp2: New file.
65862         * tests/test-math-c++.cc: Check the declaration of exp2.
65863         * doc/posix-functions/exp2.texi: Mention the new module and the IRIX
65864         and OpenBSD problems.
65866 2012-03-08  Paul Eggert  <eggert@cs.ucla.edu>
65868         savedir: fix comment typo
65869         * lib/savedir.c (savedirstream): Fix typo in comment.
65871 2012-03-08  Bruno Haible  <bruno@clisp.org>
65873         test-readtokens.c: use const; remove unwarranted cast
65874         * tests/test-readtokens.c: Declare delim to be const, to avoid a cast.
65876 2012-03-08  Bruno Haible  <bruno@clisp.org>
65878         fmal: Avoid compilation error on AIX.
65879         * lib/math.in.h (fmal): Undefine macro before declaration. Needed on
65880         AIX 5.2..7.1.
65882 2012-03-08  Bruno Haible  <bruno@clisp.org>
65884         fma, fmaf, fmal: Override undeclared system functions on IRIX 6.5.
65885         * m4/fma.m4 (gl_FUNC_FMA): If fma() exists but is not declared,
65886         arrange to set REPLACE_FMA=1, not HAVE_FMA=0.
65887         * m4/fmaf.m4 (gl_FUNC_FMAF): If fmaf() exists but is not declared,
65888         arrange to set REPLACE_FMAF=1, not HAVE_FMAF=0.
65889         * m4/fmal.m4 (gl_FUNC_FMAL): If fmal() exists but is not declared,
65890         arrange to set REPLACE_FMAL=1, not HAVE_FMAL=0.
65892 2012-03-08  Bruno Haible  <bruno@clisp.org>
65894         remainderf: Override buggy system function on IRIX 6.5.
65895         * m4/remainderf.m4 (gl_FUNC_REMAINDERF_WORKS): New macro.
65896         (gl_FUNC_REMAINDERF): Invoke it. Don't assume remainderf() is declared
65897         when it exists.
65898         * doc/posix-functions/remainderf.texi: Mention the IRIX problems.
65900 2012-03-08  Jim Meyering  <meyering@redhat.com>
65902         test-readtokens.c: avoid const-related compilation warnings
65903         * tests/test-readtokens.c: Avoid const-related compilation warnings.
65905 2012-03-07  Jim Meyering  <meyering@redhat.com>
65906             Bruno Haible  <bruno@clisp.org>
65908         frexp-nolibm, frexpl-nolibm tests: Fix bug introduced on 2012-03-03.
65909         * modules/frexp-nolibm-tests (Files): Add tests/test-frexp.h,
65910         tests/randomd.c.
65911         (Makefile.am): Add randomd.c to test_frexp_nolibm_SOURCES.
65912         * modules/frexpl-nolibm-tests (Files): Add tests/test-frexp.h,
65913         tests/randoml.c.
65914         (Makefile.am): Add randoml.c to test_frexpl_nolibm_SOURCES.
65916 2012-03-07  Bruno Haible  <bruno@clisp.org>
65918         expm1l: Avoid compilation error on AIX.
65919         * lib/math.in.h (expm1l): Undefine macro before declaration. Needed on
65920         AIX 5.2..7.1.
65922 2012-03-07  Bruno Haible  <bruno@clisp.org>
65924         expm1l: Don't override undeclared system function on IRIX 6.5.
65925         * lib/math.in.h (expm1l): Test HAVE_DECL_EXPM1L, not HAVE_EXPM1L.
65926         * m4/expm1l.m4 (gl_FUNC_EXPM1L): Don't assume expm1l() is declared when
65927         it exists. Set HAVE_DECL_EXPM1L.
65928         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize HAVE_DECL_EXPM1L, not
65929         HAVE_EXPM1L.
65930         * modules/math (Makefile.am): Substitute HAVE_DECL_EXPM1L, not
65931         HAVE_EXPM1L.
65932         * doc/posix-functions/expm1l.texi: Mention missing declaration problem.
65934 2012-03-07  Bruno Haible  <bruno@clisp.org>
65936         remainderl: Don't override undeclared system function on IRIX 6.5.
65937         * lib/math.in.h (remainderl): Test HAVE_DECL_REMAINDERL, not
65938         HAVE_REMAINDERL.
65939         * m4/remainderl.m4 (gl_FUNC_REMAINDERL): Don't assume remainderl() is
65940         declared when it exists. Set HAVE_DECL_REMAINDERL.
65941         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize HAVE_DECL_REMAINDERL,
65942         not HAVE_REMAINDERL.
65943         * modules/math (Makefile.am): Substitute HAVE_DECL_REMAINDERL, not
65944         HAVE_REMAINDERL.
65945         * doc/posix-functions/remainderl.texi: Mention missing declaration
65946         problem.
65948 2012-03-07  Bruno Haible  <bruno@clisp.org>
65950         rintf: Don't override undeclared system function on IRIX 6.5.
65951         * lib/math.in.h (rintf): Test HAVE_DECL_RINTF, not HAVE_RINTF.
65952         * m4/rintf.m4 (gl_FUNC_RINTF): Don't assume rintf() is declared when it
65953         exists. Set HAVE_DECL_RINTF.
65954         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize HAVE_DECL_RINTF, not
65955         HAVE_RINTF.
65956         * modules/math (Makefile.am): Substitute HAVE_DECL_RINTF, not
65957         HAVE_RINTF.
65958         * doc/posix-functions/rintf.texi: Mention missing declaration problem.
65960 2012-03-07  Bruno Haible  <bruno@clisp.org>
65962         roundl: Avoid compilation error on AIX.
65963         * lib/math.in.h (roundl): Undefine macro before declaration. Needed on
65964         AIX 5.2..7.1.
65966 2012-03-07  Bruno Haible  <bruno@clisp.org>
65968         roundl: Don't override undeclared system function on IRIX 6.5.
65969         * m4/roundl.m4 (gl_FUNC_ROUNDL): Search for roundl() in the libraries
65970         also when it is not declared. Set HAVE_ROUNDL. For replacement code,
65971         test HAVE_ROUNDL, not HAVE_DECL_ROUNDL.
65972         * modules/roundl (configure.ac): For replacement code, test
65973         HAVE_ROUNDL, not HAVE_DECL_ROUNDL.
65974         (Depends-on): Update conditions.
65975         * doc/posix-functions/roundl.texi: Mention the IRIX problem.
65977 2012-03-07  Bruno Haible  <bruno@clisp.org>
65979         roundf: Don't override undeclared system function on IRIX 6.5.
65980         * m4/roundf.m4 (gl_FUNC_ROUNDF): Search for roundf() in the libraries
65981         also when it is not declared. Set HAVE_ROUNDF. For replacement code,
65982         test HAVE_ROUNDF, not HAVE_DECL_ROUNDF.
65983         * modules/roundf (configure.ac): For replacement code, test
65984         HAVE_ROUNDF, not HAVE_DECL_ROUNDF.
65985         (Depends-on): Update conditions.
65986         * modules/roundf-ieee (Depends-on): Update conditions.
65987         * doc/posix-functions/roundf.texi: Mention the IRIX problem.
65989 2012-03-07  Bruno Haible  <bruno@clisp.org>
65991         round: Don't override undeclared system function on IRIX 6.5.
65992         * m4/check-math-lib.m4 (gl_CHECK_MATH_LIB): Accept an optional third
65993         argument.
65994         * m4/round.m4 (gl_FUNC_ROUND): Search for round() in the libraries
65995         also when it is not declared. Set HAVE_ROUND. For replacement code,
65996         test HAVE_ROUND, not HAVE_DECL_ROUND.
65997         * modules/round (configure.ac): For replacement code, test HAVE_ROUND,
65998         not HAVE_DECL_ROUND.
65999         (Depends-on): Update conditions.
66000         * modules/round-ieee (Depends-on): Update conditions.
66001         * doc/posix-functions/round.texi: Mention the IRIX problem.
66003 2012-03-07  Bruno Haible  <bruno@clisp.org>
66005         copysignf: Don't override undeclared system function on IRIX 6.5.
66006         * lib/math.in.h (copysignf): Test HAVE_DECL_COPYSIGNF, not
66007         HAVE_COPYSIGNF.
66008         * m4/copysignf.m4 (gl_FUNC_COPYSIGNF): Don't assume copysignf() is
66009         declared when it exists. Set HAVE_DECL_COPYSIGNF.
66010         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize HAVE_DECL_COPYSIGNF,
66011         not HAVE_COPYSIGNF.
66012         * modules/math (Makefile.am): Substitute HAVE_DECL_COPYSIGNF, not
66013         HAVE_COPYSIGNF.
66014         * doc/posix-functions/copysignf.texi: Mention missing declaration
66015         problem.
66017 2012-03-07  Jim Meyering  <meyering@redhat.com>
66019         readtokens: add tests
66020         * modules/readtokens-tests: New file.
66021         * tests/test-readtokens.c: New file.
66023 2012-03-07  Jim Meyering  <meyering@redhat.com>
66025         quotearg: the module must now include quote.h
66026         With commit v0.0-7133-g6417476, quotearg.c includes "quote.h".
66027         So must the module.
66028         * modules/quotearg (Files): Add quote.h.
66030 2012-03-06  Paul Eggert  <eggert@cs.ucla.edu>
66032         readtokens: avoid core dumps with unusual calling patterns
66033         Reported by Xu Zhongxing in <http://debbugs.gnu.org/10953>.
66034         * lib/readtokens.c: Include limits.h.
66035         (word, bits_per_word, get_nth_bit, set_nth_bit): New.
66036         (readtoken): Don't cache the delimiters; the cache code was buggy
66037         if !delim && saved_delim, or if the new n_delim differs from the old.
66038         Also, it wasn't thread-safe.
66040 2012-03-07  Bruno Haible  <bruno@clisp.org>
66042         quote: Adhere to common module description layout.
66043         * modules/quote (Makefile.am): Add back empty section.
66045 2012-03-06  Akim Demaille  <demaille@gostai.com>
66047         quote: fuse into quotearg
66048         This patch is made for the benefit of Bison.
66049         quote does not leave the choice of the quoting style to the user.
66050         quoting_style provides poor customizability, yet quoting_options,
66051         which is very rich, is hidden inside quotearg.c.  So in order to
66052         allow quote customization, move its implementation to quotearg.c.
66053         * lib/quote.c: Remove.
66054         * modules/quote: Adjust.
66055         * lib/quotearg.c (quoting_options_from_style): Fix a compiler
66056         warning: provide all the members of literal structs.
66057         (quote_quoting_options): New.
66058         (quote, quote_n): Import implementation from quote.c.
66059         * lib/quote.h: Import the comments from quote.c.
66060         (quote_quoting_options): New.
66062 2012-03-06  Bruno Haible  <bruno@clisp.org>
66064         Tests for module 'expm1l-ieee'.
66065         * modules/expm1l-ieee-tests: New file.
66066         * tests/test-expm1l-ieee.c: New file.
66068         New module 'expm1l-ieee'.
66069         * modules/expm1l-ieee: New file.
66071         Tests for module 'expm1f-ieee'.
66072         * modules/expm1f-ieee-tests: New file.
66073         * tests/test-expm1f-ieee.c: New file.
66075         New module 'expm1f-ieee'.
66076         * modules/expm1f-ieee: New file.
66078         Tests for module 'expm1-ieee'.
66079         * modules/expm1-ieee-tests: New file.
66080         * tests/test-expm1-ieee.c: New file.
66081         * tests/test-expm1-ieee.h: New file.
66083         New module 'expm1-ieee'.
66084         * modules/expm1-ieee: New file.
66085         * m4/expm1-ieee.m4: New file.
66086         * m4/expm1.m4 (gl_FUNC_EXPM1): If gl_FUNC_EXPM1_IEEE is present, test
66087         whether expm1 works with a minus zero argument. Replace it if not.
66088         * lib/math.in.h (expm1): Override if REPLACE_EXPM1 is 1.
66089         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_EXPM1.
66090         * modules/math (Makefile.am): Substitute REPLACE_EXPM1.
66091         * modules/expm1 (configure.ac): Consider REPLACE_EXPM1.
66092         (Depends-on): Update conditions.
66093         * doc/posix-functions/expm1.texi: Mention the expm1-ieee module and the
66094         AIX problem.
66096 2012-03-06  Bruno Haible  <bruno@clisp.org>
66098         Work around expm1f bug on IRIX 6.5.
66099         * lib/math.in.h (expm1f): Override if REPLACE_EXPM1F is 1.
66100         * m4/expm1f.m4 (gl_FUNC_EXPM1F_WORKS): New macro.
66101         (gl_FUNC_EXPM1F): Invoke it. Set REPLACE_EXPM1F to 1 if expm1f() does
66102         not work.
66103         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_EXPM1F.
66104         * modules/math (Makefile.am): Substitute REPLACE_EXPM1F.
66105         * modules/expm1f (configure.ac): Consider REPLACE_EXPM1F.
66106         (Depends-on): Update conditions.
66107         * doc/posix-functions/expm1f.texi: Mention the IRIX 6.5 bug.
66109 2012-03-06  Bruno Haible  <bruno@clisp.org>
66111         Tests for module 'expm1l'.
66112         * modules/expm1l-tests: New file.
66113         * tests/test-expm1l.c: New file.
66115         New module 'expm1l'.
66116         * lib/math.in.h (expm1l): New declaration.
66117         * lib/expm1l.c: New file.
66118         * m4/expm1l.m4: New file.
66119         * m4/math_h.m4 (gl_MATH_H): Test whether expm1l is declared.
66120         (gl_MATH_H_DEFAULTS): Initialize GNULIB_EXPM1L, HAVE_EXPM1L.
66121         * modules/math (Makefile.am): Substitute GNULIB_EXPM1L, HAVE_EXPM1L.
66122         * modules/expm1l: New file.
66123         * tests/test-math-c++.cc: Check the declaration of expm1l.
66124         * doc/posix-functions/expm1l.texi: Mention the new module.
66126 2012-03-06  Bruno Haible  <bruno@clisp.org>
66128         Tests for module 'expm1f'.
66129         * modules/expm1f-tests: New file.
66130         * tests/test-expm1f.c: New file.
66132         New module 'expm1f'.
66133         * lib/math.in.h (expm1f): New declaration.
66134         * lib/expm1f.c: New file.
66135         * m4/expm1f.m4: New file.
66136         * m4/math_h.m4 (gl_MATH_H): Test whether expm1f is declared.
66137         (gl_MATH_H_DEFAULTS): Initialize GNULIB_EXPM1F, HAVE_EXPM1F.
66138         * modules/math (Makefile.am): Substitute GNULIB_EXPM1F, HAVE_EXPM1F.
66139         * modules/expm1f: New file.
66140         * tests/test-math-c++.cc: Check the declaration of expm1f.
66141         * doc/posix-functions/expm1f.texi: Mention the new module.
66143 2012-03-06  Bruno Haible  <bruno@clisp.org>
66145         Tests for module 'expm1'.
66146         * modules/expm1-tests: New file.
66147         * tests/test-expm1.c: New file.
66148         * tests/test-expm1.h: New file.
66150         New module 'expm1'.
66151         * lib/math.in.h (expm1): New declaration.
66152         * lib/expm1.c: New file.
66153         * m4/expm1.m4: New file.
66154         * m4/math_h.m4 (gl_MATH_H): Test whether expm1 is declared.
66155         (gl_MATH_H_DEFAULTS): Initialize GNULIB_EXPM1, HAVE_EXPM1.
66156         * modules/math (Makefile.am): Substitute GNULIB_EXPM1, HAVE_EXPM1.
66157         * modules/expm1: New file.
66158         * tests/test-math-c++.cc: Check the declaration of expm1.
66159         * doc/posix-functions/expm1.texi: Mention the new module.
66161 2012-03-06  Bruno Haible  <bruno@clisp.org>
66163         math: Ensure declarations of math functions.
66164         * modules/acosf (Depends-on): Add 'extensions'.
66165         * modules/asinf (Depends-on): Likewise.
66166         * modules/atan2f (Depends-on): Likewise.
66167         * modules/atanf (Depends-on): Likewise.
66168         * modules/cbrt (Depends-on): Likewise.
66169         * modules/cbrtf (Depends-on): Likewise.
66170         * modules/cbrtl (Depends-on): Likewise.
66171         * modules/copysignf (Depends-on): Likewise.
66172         * modules/copysignl (Depends-on): Likewise.
66173         * modules/cosf (Depends-on): Likewise.
66174         * modules/coshf (Depends-on): Likewise.
66175         * modules/expf (Depends-on): Likewise.
66176         * modules/fabsf (Depends-on): Likewise.
66177         * modules/fabsl (Depends-on): Likewise.
66178         * modules/fmaf (Depends-on): Likewise.
66179         * modules/fmal (Depends-on): Likewise.
66180         * modules/fmodf (Depends-on): Likewise.
66181         * modules/fmodl (Depends-on): Likewise.
66182         * modules/frexpf (Depends-on): Likewise.
66183         * modules/frexpl (Depends-on): Likewise.
66184         * modules/hypot (Depends-on): Likewise.
66185         * modules/hypotf (Depends-on): Likewise.
66186         * modules/hypotl (Depends-on): Likewise.
66187         * modules/ldexpf (Depends-on): Likewise.
66188         * modules/ldexpl (Depends-on): Likewise.
66189         * modules/log10f (Depends-on): Likewise.
66190         * modules/log10l (Depends-on): Likewise.
66191         * modules/log1p (Depends-on): Likewise.
66192         * modules/logb (Depends-on): Likewise.
66193         * modules/logf (Depends-on): Likewise.
66194         * modules/modff (Depends-on): Likewise.
66195         * modules/modfl (Depends-on): Likewise.
66196         * modules/powf (Depends-on): Likewise.
66197         * modules/remainderf (Depends-on): Likewise.
66198         * modules/remainderl (Depends-on): Likewise.
66199         * modules/rintf (Depends-on): Likewise.
66200         * modules/rintl (Depends-on): Likewise.
66201         * modules/sinf (Depends-on): Likewise.
66202         * modules/sinhf (Depends-on): Likewise.
66203         * modules/sqrtf (Depends-on): Likewise.
66204         * modules/tanf (Depends-on): Likewise.
66205         * modules/tanhf (Depends-on): Likewise.
66206         * m4/acosf.m4 (gl_FUNC_ACOSF): Require gl_USE_SYSTEM_EXTENSIONS.
66207         * m4/asinf.m4 (gl_FUNC_ASINF): Likewise.
66208         * m4/atan2f.m4 (gl_FUNC_ATAN2F): Likewise.
66209         * m4/atanf.m4 (gl_FUNC_ATANF): Likewise.
66210         * m4/cbrt.m4 (gl_FUNC_CBRT): Likewise.
66211         * m4/cbrtf.m4 (gl_FUNC_CBRTF): Likewise.
66212         * m4/cbrtl.m4 (gl_FUNC_CBRTL): Likewise.
66213         * m4/copysignf.m4 (gl_FUNC_COPYSIGNF): Likewise.
66214         * m4/copysignl.m4 (gl_FUNC_COPYSIGNL): Likewise.
66215         * m4/cosf.m4 (gl_FUNC_COSF): Likewise.
66216         * m4/coshf.m4 (gl_FUNC_COSHF): Likewise.
66217         * m4/expf.m4 (gl_FUNC_EXPF): Likewise.
66218         * m4/fabsf.m4 (gl_FUNC_FABSF): Likewise.
66219         * m4/fabsl.m4 (gl_FUNC_FABSL): Likewise.
66220         * m4/fmaf.m4 (gl_FUNC_FMAF): Likewise.
66221         * m4/fmal.m4 (gl_FUNC_FMAL): Likewise.
66222         * m4/fmodf.m4 (gl_FUNC_FMODF): Likewise.
66223         * m4/fmodl.m4 (gl_FUNC_FMODL): Likewise.
66224         * m4/frexpf.m4 (gl_FUNC_FREXPF): Likewise.
66225         * m4/frexpl.m4 (gl_FUNC_FREXPL): Likewise.
66226         * m4/hypot.m4 (gl_FUNC_HYPOT): Likewise.
66227         * m4/hypotf.m4 (gl_FUNC_HYPOTF): Likewise.
66228         * m4/hypotl.m4 (gl_FUNC_HYPOTL): Likewise.
66229         * m4/ldexpf.m4 (gl_FUNC_LDEXPF): Likewise.
66230         * m4/ldexpl.m4 (gl_FUNC_LDEXPL): Likewise.
66231         * m4/log10f.m4 (gl_FUNC_LOG10F): Likewise.
66232         * m4/log10l.m4 (gl_FUNC_LOF10L): Likewise.
66233         * m4/logb.m4 (gl_FUNC_LOGB): Likewise.
66234         * m4/logf.m4 (gl_FUNC_LOGF): Likewise.
66235         * m4/modff.m4 (gl_FUNC_MODFF): Likewise.
66236         * m4/modfl.m4 (gl_FUNC_MODFL): Likewise.
66237         * m4/powf.m4 (gl_FUNC_POWF): Likewise.
66238         * m4/remainderf.m4 (gl_FUNC_REMAINDERF): Likewise.
66239         * m4/remainderl.m4 (gl_FUNC_REMAINDERL): Likewise.
66240         * m4/rintf.m4 (gl_FUNC_RINTF): Likewise.
66241         * m4/rintl.m4 (gl_FUNC_RINTL): Likewise.
66242         * m4/sinf.m4 (gl_FUNC_SINF): Likewise.
66243         * m4/sinhf.m4 (gl_FUNC_SINHF): Likewise.
66244         * m4/sqrtf.m4 (gl_FUNC_SQRTF): Likewise.
66245         * m4/tanf.m4 (gl_FUNC_TANF): Likewise.
66246         * m4/tanhf.m4 (gl_FUNC_TANHF): Likewise.
66248 2012-03-06  Bruno Haible  <bruno@clisp.org>
66250         math: Update module names in warnings.
66251         * lib/math.in.h (acosl, asinl, atanl, cosl, expl, logl, sinl, sqrtl,
66252         tanl): Use specific module name in warn-on-use warning.
66254 2012-03-06  Bruno Haible  <bruno@clisp.org>
66256         expl: Simplify computation.
66257         * lib/expl.c (expl): Simplify computation of exp_y. Fix comment.
66259 2012-03-05  Bruno Haible  <bruno@clisp.org>
66261         exp* tests: More tests.
66262         * tests/test-exp.h: New file.
66263         * tests/test-exp.c: Include <float.h> and test-exp.h.
66264         (main): Invoke test_function.
66265         * tests/test-expf.c: Include <float.h> and test-exp.h.
66266         (main): Invoke test_function.
66267         * tests/test-expl.c: Include <float.h> and test-exp.h.
66268         (main): Invoke test_function.
66269         * modules/exp-tests (Files): Add tests/test-exp.h, tests/randomd.c.
66270         (Makefile.am): Add randomd.c to test_exp_SOURCES.
66271         * modules/expf-tests (Files): Add tests/test-exp.h, tests/randomf.c.
66272         (Makefile.am): Add randomf.c to test_expf_SOURCES.
66273         * modules/expl-tests (Files): Add tests/test-exp.h, tests/randoml.c.
66274         (Depends-on): Add 'float'.
66275         (Makefile.am): Add randoml.c to test_expl_SOURCES.
66277         expl: Fix precision of computed result.
66278         * lib/expl.c: Completely rewritten.
66279         * modules/expl (Depends-on): Add isnanl, roundl, ldexpl. Remove floorl.
66280         (Maintainer): Add me.
66281         * m4/expl.m4 (gl_FUNC_EXPL): Update computation of EXPL_LIBM.
66283 2012-03-05  Bruno Haible  <bruno@clisp.org>
66285         cbrt* tests: More tests.
66286         * tests/test-cbrt.h: New file.
66287         * tests/test-cbrt.c: Include <float.h> and test-cbrt.h.
66288         (main): Invoke test_function.
66289         * tests/test-cbrtf.c: Include <float.h> and test-cbrt.h.
66290         (main): Invoke test_function.
66291         * tests/test-cbrtl.c: Include <float.h> and test-cbrt.h.
66292         (main): Invoke test_function.
66293         * modules/cbrt-tests (Files): Add tests/test-cbrt.h, tests/randomd.c.
66294         (Makefile.am): Add randomd.c to test_cbrt_SOURCES.
66295         * modules/cbrtf-tests (Files): Add tests/test-cbrt.h, tests/randomf.c.
66296         (Makefile.am): Add randomf.c to test_cbrtf_SOURCES.
66297         * modules/cbrtl-tests (Files): Add tests/test-cbrt.h, tests/randoml.c.
66298         (Depends-on): Add 'float'.
66299         (Makefile.am): Add randoml.c to test_cbrtl_SOURCES.
66301 2012-03-05  Bruno Haible  <bruno@clisp.org>
66303         hypot* tests: More tests.
66304         * tests/test-hypot.h: New file, partially extracted from
66305         tests/test-hypotl.c.
66306         * tests/test-hypot.c: Include test-hypot.h.
66307         (main): Invoke test_function.
66308         * tests/test-hypotf.c: Include test-hypot.h.
66309         (main): Invoke test_function.
66310         * tests/test-hypotl.c: Include fpucw.h and test-hypot.h.
66311         (main): Invoke BEGIN_LONG_DOUBLE_ROUNDING and test_function.
66312         * modules/hypot-tests (Files): Add tests/test-hypot.h, tests/randomd.c.
66313         (Makefile.am): Add randomd.c to test_hypot_SOURCES.
66314         * modules/hypotf-tests (Files): Add tests/test-hypot.h,
66315         tests/randomf.c.
66316         (Makefile.am): Add randomf.c to test_hypotf_SOURCES.
66317         * modules/hypotl-tests (Files): Add tests/test-hypot.h,
66318         tests/randoml.c.
66319         (Depends-on): Add 'fpucw', 'float'.
66320         (Makefile.am): Add randoml.c to test_hypotl_SOURCES.
66322 2012-03-05  Bruno Haible  <bruno@clisp.org>
66324         fpucw: Doc about FreeBSD.
66325         * lib/fpucw.h: Mention FreeBSD in comments.
66327 2012-03-04  Bruno Haible  <bruno@clisp.org>
66329         sqrt* tests: More tests.
66330         * tests/test-sqrt.h: New file.
66331         * tests/test-sqrt.c: Include <float.h> and test-sqrt.h.
66332         (main): Invoke test_function.
66333         * tests/test-sqrtf.c: Include <float.h> and test-sqrt.h.
66334         (main): Invoke test_function.
66335         * tests/test-sqrtl.c: Include <float.h> and test-sqrt.h.
66336         (main): Invoke test_function.
66337         * modules/sqrt-tests (Files): Add tests/test-sqrt.h, tests/randomd.c.
66338         (Makefile.am): Add randomd.c to test_sqrt_SOURCES.
66339         * modules/sqrtf-tests (Files): Add tests/test-sqrt.h, tests/randomf.c.
66340         (Makefile.am): Add randomf.c to test_sqrtf_SOURCES.
66341         * modules/sqrtl-tests (Files): Add tests/test-sqrt.h, tests/randoml.c.
66342         (Depends-on): Add 'float'.
66343         (Makefile.am): Add randoml.c to test_sqrtl_SOURCES.
66345 2012-03-04  Bruno Haible  <bruno@clisp.org>
66347         remainder* tests: More tests.
66348         * tests/test-remainder.h: New file, based on tests/test-fmod.h.
66349         * tests/test-remainder.c: Include <float.h> and test-remainder.h.
66350         (main): Invoke test_function.
66351         * tests/test-remainderf.c: Include <float.h> and test-remainder.h.
66352         (main): Invoke test_function.
66353         * tests/test-remainderl.c: Include <float.h> and test-remainder.h.
66354         (main): Invoke test_function.
66355         * modules/remainder-tests (Files): Add tests/test-remainder.h,
66356         tests/randomd.c.
66357         (Makefile.am): Add randomd.c to test_remainder_SOURCES.
66358         * modules/remainderf-tests (Files): Add tests/test-remainder.h,
66359         tests/randomf.c.
66360         (Makefile.am): Add randomf.c to test_remainderf_SOURCES.
66361         * modules/remainderl-tests (Files): Add tests/test-remainder.h,
66362         tests/randoml.c.
66363         (Depends-on): Add 'float'.
66364         (Makefile.am): Add randoml.c to test_remainderl_SOURCES.
66366 2012-03-04  Bruno Haible  <bruno@clisp.org>
66368         remainder, remainderf, remainderl: Fix computation for large quotients.
66369         * lib/remainder.c: Completely rewritten.
66370         * lib/remainderf.c (remainderf): Use implementation of remainder.c with
66371         USE_FLOAT.
66372         * lib/remainderl.c (remainderl): Use implementation of remainder.c with
66373         USE_LONG_DOUBLE.
66374         * modules/remainder (Depends-on): Add isfinite, signbit, fabs, fmod,
66375         isnand, isinf. Remove round, fma.
66376         * modules/remainderf (Files): Add lib/remainder.c.
66377         (Depends-on): Add isfinite, signbit, fabsf, fmodf, isnanf, isinf.
66378         Remove roundf, fmaf.
66379         * modules/remainderl (Files): Add lib/remainder.c.
66380         (Depends-on): Add float, isfinite, signbit, fabsl, fmodl, isnanl,
66381         isinf. Remove roundl, fmal.
66382         * m4/remainder.m4 (gl_FUNC_REMAINDER): Update computation of
66383         REMAINDER_LIBM.
66384         * m4/remainderf.m4 (gl_FUNC_REMAINDERF): Update computation of
66385         REMAINDERF_LIBM.
66386         * m4/remainderl.m4 (gl_FUNC_REMAINDERL): Update computation of
66387         REMAINDERL_LIBM.
66389 2012-03-04  Bruno Haible  <bruno@clisp.org>
66391         fmod* tests: More tests.
66392         * tests/test-fmod.h (my_ldexp): New function.
66393         (test_function): Reduce amount of random numbers to test. Add tests
66394         of very large quotients x / y.
66395         * tests/test-fmod.c (MAX_EXP): New macro.
66396         * tests/test-fmodf.c (MAX_EXP): Likewise.
66397         * tests/test-fmodl.c (MAX_EXP): Likewise.
66399 2012-03-04  Bruno Haible  <bruno@clisp.org>
66401         fmod, fmodl: Fix computation for large quotients x / y.
66402         * lib/fmod.c: Completely rewritten.
66403         * lib/fmodl.c (fmodl): Use implementation of fmod.c with
66404         USE_LONG_DOUBLE.
66405         * modules/fmod (Depends-on): Add isfinite, signbit, fabs, frexp, ldexp,
66406         isnand. Remove fma.
66407         * modules/fmodl (Files): Add lib/fmod.c.
66408         (Depends-on): Add float, isfinite, signbit, fabsl,
66409         frexpl, ldexpl, isnanl. Remove fma.
66410         * m4/fmod.m4 (gl_FUNC_FMOD): Update computation of FMOD_LIBM.
66411         * m4/fmodl.m4 (gl_FUNC_FMODL): Update computation of FMODL_LIBM.
66413 2012-03-03  Bruno Haible  <bruno@clisp.org>
66415         fmod* tests: More tests.
66416         * tests/test-fmod.h: New file.
66417         * tests/test-fmod.c: Include <float.h> and test-fmod.h.
66418         (main): Invoke test_function.
66419         * tests/test-fmodf.c: Include <float.h> and test-fmod.h.
66420         (main): Invoke test_function.
66421         * tests/test-fmodl.c: Include <float.h> and test-fmod.h.
66422         (main): Invoke test_function.
66423         * modules/fmod-tests (Files): Add tests/test-fmod.h, tests/randomd.c.
66424         (Makefile.am): Add randomd.c to test_fmod_SOURCES.
66425         * modules/fmodf-tests (Files): Add tests/test-fmod.h, tests/randomf.c.
66426         (Makefile.am): Add randomf.c to test_fmodf_SOURCES.
66427         * modules/fmodl-tests (Files): Add tests/test-fmod.h, tests/randoml.c.
66428         (Depends-on): Add 'float'.
66429         (Makefile.am): Add randoml.c to test_fmodl_SOURCES.
66431 2012-03-03  Bruno Haible  <bruno@clisp.org>
66433         rint* tests: More tests.
66434         * tests/test-rint.h: New file, partially extracted from
66435         tests/test-rintl.c.
66436         * tests/test-rint.c: Include test-rint.h.
66437         (main): Invoke test_function.
66438         * tests/test-rintf.c: Include test-rint.h.
66439         (main): Invoke test_function.
66440         * tests/test-rintl.c: Include test-rint.h.
66441         (main): Invoke test_function.
66442         * modules/rint-tests (Files): Add tests/test-rint.h, tests/randomd.c.
66443         (Makefile.am): Add randomd.c to test_rint_SOURCES.
66444         * modules/rintf-tests (Files): Add tests/test-rint.h, tests/randomf.c.
66445         (Makefile.am): Add randomf.c to test_rintf_SOURCES.
66446         * modules/rintl-tests (Files): Add tests/test-rint.h, tests/randoml.c.
66447         (Makefile.am): Add randoml.c to test_rintl_SOURCES.
66449 2012-03-03  Bruno Haible  <bruno@clisp.org>
66451         modf* tests: More tests.
66452         * tests/test-modf.h: New file.
66453         * tests/test-modf.c: Include <float.h> and test-modf.h.
66454         (main): Invoke test_function.
66455         * tests/test-modff.c: Include <float.h> and test-modf.h.
66456         (main): Invoke test_function.
66457         * tests/test-modfl.c: Include <float.h> and test-modf.h.
66458         (main): Invoke test_function.
66459         * modules/modf-tests (Files): Add tests/test-modf.h, tests/randomd.c.
66460         (Makefile.am): Add randomd.c to test_modf_SOURCES.
66461         * modules/modff-tests (Files): Add tests/test-modf.h, tests/randomf.c.
66462         (Makefile.am): Add randomf.c to test_modff_SOURCES.
66463         * modules/modfl-tests (Files): Add tests/test-modf.h, tests/randoml.c.
66464         (Depends-on): Add 'float'.
66465         (Makefile.am): Add randoml.c to test_modfl_SOURCES.
66467 2012-03-03  Bruno Haible  <bruno@clisp.org>
66469         fabs* tests: More tests.
66470         * tests/test-fabs.h: New file, partially extracted from
66471         tests/test-fabsl.c.
66472         * tests/test-fabs.c (RANDOM): New macro.
66473         * tests/test-fabsf.c (RANDOM): New macro.
66474         * tests/test-fabsl.c (RANDOM): New macro.
66475         * modules/fabs-tests (Files): Add tests/randomd.c.
66476         (Makefile.am): Add randomd.c to test_fabs_SOURCES.
66477         * modules/fabsf-tests (Files): Add tests/randomf.c.
66478         (Makefile.am): Add randomf.c to test_fabsf_SOURCES.
66479         * modules/fabsl-tests (Files): Add tests/randoml.c.
66480         (Makefile.am): Add randoml.c to test_fabsl_SOURCES.
66482 2012-03-03  Bruno Haible  <bruno@clisp.org>
66484         ldexp* tests: More tests.
66485         * tests/test-ldexp.h (test_function): Add some pseudo-randomized tests.
66486         * tests/test-ldexp.c (RANDOM): New macro.
66487         * tests/test-ldexpf.c (RANDOM): New macro.
66488         * tests/test-ldexpl.c (RANDOM): New macro.
66489         * modules/ldexp-tests (Files): Add tests/randomd.c.
66490         (Makefile.am): Add randomd.c to test_ldexp_SOURCES.
66491         * modules/ldexpf-tests (Files): Add tests/randomf.c.
66492         (Makefile.am): Add randomf.c to test_ldexpf_SOURCES.
66493         * modules/ldexpl-tests (Files): Add tests/randoml.c.
66494         (Makefile.am): Add randoml.c to test_ldexpl_SOURCES.
66496 2012-03-03  Bruno Haible  <bruno@clisp.org>
66498         frexp* tests: More tests.
66499         * tests/test-frexp.h (test_function): Add some pseudo-randomized tests.
66500         * tests/test-frexp.c (RANDOM): New macro.
66501         * tests/test-frexpf.c (RANDOM): New macro.
66502         * tests/test-frexpl.c (RANDOM): New macro.
66503         * modules/frexp-tests (Files): Add tests/randomd.c.
66504         (Makefile.am): Add randomd.c to test_frexp_SOURCES.
66505         * modules/frexpf-tests (Files): Add tests/randomf.c.
66506         (Makefile.am): Add randomf.c to test_frexpf_SOURCES.
66507         * modules/frexpl-tests (Files): Add tests/randoml.c.
66508         (Makefile.am): Add randoml.c to test_frexpl_SOURCES.
66510 2012-03-03  Bruno Haible  <bruno@clisp.org>
66512         Support for pseudo-random numbers in tests.
66513         * tests/randomf.c: New file.
66514         * tests/randomd.c: New file.
66515         * tests/randoml.c: New file.
66516         * tests/macros.h (randomf, randomd, randoml): New declarations.
66518 2012-03-03  Bruno Haible  <bruno@clisp.org>
66520         frexp* tests: Refactor.
66521         * tests/test-frexp.h: New file, extracted from tests/test-frexpl.c.
66522         * tests/test-frexp.c: Include and use it.
66523         * tests/test-frexpf.c: Likewise.
66524         * tests/test-frexpl.c: Likewise.
66525         * modules/frexp-tests (Files): Add tests/test-frexp.h.
66526         * modules/frexpf-tests (Files): Likewise.
66527         * modules/frexpl-tests (Files): Likewise.
66529 2012-03-02  Jim Meyering  <meyering@redhat.com>
66531         maint: don't specify XZ_OPT=-9ev in dist-related rule
66532         Using xz's -9 option is warranted only if you have a very large
66533         tarball (see xz's documentation for the sizes vs. presets), and
66534         requires 64MiB of memory at decompression time.
66535         * top/maint.mk (alpha beta stable): Don't specify XZ_OPT=-9ev.
66536         Automake's default of just "-e" is fine.  Override on a
66537         per-package basis by setting XZ_OPT e.g., in cfg.mk.
66539 2012-03-01  Eric Blake  <eblake@redhat.com>
66541         maint.mk: allow announcement for non-gnulib project
66542         * maint.mk (announcement): Skip gnulib version if not used.
66544 2012-03-01  Jim Meyering  <meyering@redhat.com>
66546         maint.mk: avoid spurious failure of _sc_search_regexp-using tests
66547         * top/maint.mk: Initialize _sc_search_regexp parameters, so that
66548         envvar settings cannot interfere.  Otherwise, setting envvars like
66549         prohibit=foo require=bar, etc. would cause spurious test failures.
66551 2012-03-01  Eric Blake  <eblake@redhat.com>
66553         maint.mk: add per-line exclusions to prohibitions
66554         * maint.mk (_sc_search_regexp): Add $exclude parameter.
66555         (sc_prohibit_strcmp, sc_unmarked_diagnostics)
66556         (sc_const_long_option): Use it.
66558 2012-03-01  Bruno Haible  <bruno@clisp.org>
66560         Tests for module 'expl-ieee'.
66561         * modules/expl-ieee-tests: New file.
66562         * tests/test-expl-ieee.c: New file.
66564         New module 'expl-ieee'.
66565         * modules/expl-ieee: New file.
66567         Tests for module 'exp-ieee'.
66568         * modules/exp-ieee-tests: New file.
66569         * tests/test-exp-ieee.c: New file.
66571         New module 'exp-ieee'.
66572         * modules/exp-ieee: New file.
66574         Tests for module 'expf-ieee'.
66575         * modules/expf-ieee-tests: New file.
66576         * tests/test-expf-ieee.c: New file.
66577         * tests/test-exp-ieee.h: New file.
66579         New module 'expf-ieee'.
66580         * modules/expf-ieee: New file.
66582 2012-02-29  Bruno Haible  <bruno@clisp.org>
66584         cbrtl-ieee: Work around test failure on IRIX 6.5.
66585         * m4/cbrtl-ieee.m4: New file.
66586         * m4/cbrtl.m4 (gl_FUNC_CBRTL): If gl_FUNC_CBRTL_IEEE is present,
66587         test whether cbrtl works with a minus zero argument. Replace it if not.
66588         * lib/math.in.h (cbrtl): Override if REPLACE_CBRTL is 1.
66589         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_CBRTL.
66590         * modules/math (Makefile.am): Substitute REPLACE_CBRTL.
66591         * modules/cbrtl (configure.ac): Consider REPLACE_CBRTL.
66592         (Depends-on): Update conditions.
66593         * modules/cbrtl-ieee (Files): Add m4/cbrtl-ieee.m4, m4/minus-zero.m4,
66594         m4/signbit.m4.
66595         (configure.ac): Invoke gl_FUNC_CBRTL_IEEE.
66596         * lib/cbrtl.c (cbrtl) [IRIX]: Avoid an unnecessary addition.
66597         * doc/posix-functions/cbrtl.texi: Mention the cbrtl-ieee module.
66599         Tests for module 'cbrtl-ieee'.
66600         * modules/cbrtl-ieee-tests: New file.
66601         * tests/test-cbrtl-ieee.c: New file.
66603         New module 'cbrtl-ieee'.
66604         * modules/cbrtl-ieee: New file.
66606         Tests for module 'cbrt-ieee'.
66607         * modules/cbrt-ieee-tests: New file.
66608         * tests/test-cbrt-ieee.c: New file.
66610         New module 'cbrt-ieee'.
66611         * modules/cbrt-ieee: New file.
66613         Tests for module 'cbrtf-ieee'.
66614         * modules/cbrtf-ieee-tests: New file.
66615         * tests/test-cbrtf-ieee.c: New file.
66616         * tests/test-cbrt-ieee.h: New file.
66618         New module 'cbrtf-ieee'.
66619         * modules/cbrtf-ieee: New file.
66621 2012-02-29  Bruno Haible  <bruno@clisp.org>
66623         cbrtf: Work around bug in IRIX 6.5 system function.
66624         * lib/math.in.h (cbrtf): Override if REPLACE_CBRTF is 1.
66625         * m4/cbrtf.m4 (gl_FUNC_CBRTF_WORKS): New macro.
66626         (gl_FUNC_CBRTF): Invoke it. Set REPLACE_CBRTF to 1 if cbrtf() does not
66627         work.
66628         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_CBRTF.
66629         * modules/math (Makefile.am): Substitute REPLACE_CBRTF.
66630         * modules/cbrtf (configure.ac): Consider REPLACE_CBRTF.
66631         (Depends-on): Update conditions.
66632         * doc/posix-functions/cbrtf.texi: Mention the IRIX 6.5 problem.
66634 2012-02-29  Bruno Haible  <bruno@clisp.org>
66636         Tests for module 'cbrtl'.
66637         * modules/cbrtl-tests: New file.
66638         * tests/test-cbrtl.c: New file.
66640         New module 'cbrtl'.
66641         * lib/math.in.h (cbrtl): New declaration.
66642         * lib/cbrtl.c: New file.
66643         * m4/cbrtl.m4: New file.
66644         * m4/math_h.m4 (gl_MATH_H): Test whether cbrtl is declared.
66645         (gl_MATH_H_DEFAULTS): Initialize GNULIB_CBRTL, HAVE_CBRTL,
66646         HAVE_DECL_CBRTL.
66647         * modules/math (Makefile.am): Substitute GNULIB_CBRTL, HAVE_CBRTL,
66648         HAVE_DECL_CBRTL.
66649         * modules/cbrtl: New file.
66650         * tests/test-math-c++.cc: Check the declaration of cbrtl.
66651         * doc/posix-functions/cbrtl.texi: Mention the new module.
66653 2012-02-29  Bruno Haible  <bruno@clisp.org>
66655         Tests for module 'cbrtf'.
66656         * modules/cbrtf-tests: New file.
66657         * tests/test-cbrtf.c: New file.
66659         New module 'cbrtf'.
66660         * lib/math.in.h (cbrtf): New declaration.
66661         * lib/cbrtf.c: New file.
66662         * m4/cbrtf.m4: New file.
66663         * m4/math_h.m4 (gl_MATH_H): Test whether cbrtf is declared.
66664         (gl_MATH_H_DEFAULTS): Initialize GNULIB_CBRTF, HAVE_CBRTF,
66665         HAVE_DECL_CBRTF.
66666         * modules/math (Makefile.am): Substitute GNULIB_CBRTF, HAVE_CBRTF,
66667         HAVE_DECL_CBRTF.
66668         * modules/cbrtf: New file.
66669         * tests/test-math-c++.cc: Check the declaration of cbrtf.
66670         * doc/posix-functions/cbrtf.texi: Mention the new module.
66672 2012-02-29  Bruno Haible  <bruno@clisp.org>
66674         cbrt: Provide replacement on MSVC and Minix.
66675         * lib/math.in.h (cbrt): New declaration.
66676         * lib/cbrt.c: New file.
66677         * m4/cbrt.m4: New file.
66678         * m4/math_h.m4 (gl_MATH_H): Test whether cbrt is declared.
66679         (gl_MATH_H_DEFAULTS): Initialize GNULIB_CBRT, HAVE_CBRT.
66680         * modules/math (Makefile.am): Substitute GNULIB_CBRT, HAVE_CBRT.
66681         * modules/cbrt (Files): Add lib/cbrt.c, m4/cbrt.m4.
66682         (Depends-on): Add dependencies.
66683         (configure.ac): Arrange to compile replacement if HAVE_CBRT is 0.
66684         * tests/test-math-c++.cc: Check the declaration of cbrt.
66685         * doc/posix-functions/cbrt.texi: Mention that the module provides a
66686         replacement.
66688 2012-02-29  Bruno Haible  <bruno@clisp.org>
66690         hypotl-ieee: Work around test failure on OSF/1 and native Windows.
66691         * m4/hypotl-ieee.m4: New file.
66692         * m4/hypotl.m4 (gl_FUNC_HYPOTL): If gl_FUNC_HYPOTL_IEEE is present,
66693         test whether hypotl works with mixed NaN and Infinity arguments.
66694         Replace it if not.
66695         * lib/math.in.h (hypotl): Override if REPLACE_HYPOTL is 1.
66696         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_HYPOTL.
66697         * modules/math (Makefile.am): Substitute REPLACE_HYPOTL.
66698         * modules/hypotl (configure.ac): Consider REPLACE_HYPOTL.
66699         (Depends-on): Update conditions.
66700         * modules/hypotl-ieee (Files): Add m4/hypotl-ieee.m4.
66701         (Depends-on): Add hypot-ieee.
66702         (configure.ac): Invoke gl_FUNC_HYPOTL_IEEE.
66703         * doc/posix-functions/hypotl.texi: Mention the hypotl-ieee module.
66705         hypotf-ieee: Work around test failure on OSF/1 and native Windows.
66706         * m4/hypotf-ieee.m4: New file.
66707         * m4/hypotf.m4 (gl_FUNC_HYPOTF): If gl_FUNC_HYPOTF_IEEE is present,
66708         test whether hypotf works with mixed NaN and Infinity arguments.
66709         Replace it if not.
66710         * modules/hypotf-ieee (Files): Add m4/hypotf-ieee.m4.
66711         (Depends-on): Add hypot-ieee.
66712         (configure.ac): Invoke gl_FUNC_HYPOTF_IEEE.
66713         * doc/posix-functions/hypotf.texi: Mention the hypotf-ieee module.
66715         hypot-ieee: Work around test failure on OSF/1 and native Windows.
66716         * lib/math.in.h (hypot): New declaration.
66717         * lib/hypot.c: New file.
66718         * m4/hypot-ieee.m4: New file.
66719         * m4/hypot.m4 (gl_FUNC_HYPOT): If gl_FUNC_HYPOT_IEEE is present, test
66720         whether hypot works with mixed NaN and Infinity arguments. Replace it
66721         if not.
66722         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_HYPOT,
66723         REPLACE_HYPOT.
66724         * modules/math (Makefile.am): Substitute GNULIB_HYPOT, REPLACE_HYPOT.
66725         * modules/hypot (Files): Add lib/hypot.c.
66726         (Depends-on): Add dependencies.
66727         (configure.ac): Arrange to compile replacement if REPLACE_HYPOT is 1.
66728         * modules/hypot-ieee (Files): Add m4/hypot-ieee.m4.
66729         (configure.ac): Invoke gl_FUNC_HYPOT_IEEE.
66730         * tests/test-math-c++.cc: Check the declaration of hypot.
66731         * doc/posix-functions/hypot.texi: Mention the hypot-ieee module.
66733         Tests for module 'hypotl-ieee'.
66734         * modules/hypotl-ieee-tests: New file.
66735         * tests/test-hypotl-ieee.c: New file.
66737         New module 'hypotl-ieee'.
66738         * modules/hypotl-ieee: New file.
66740         Tests for module 'hypot-ieee'.
66741         * modules/hypot-ieee-tests: New file.
66742         * tests/test-hypot-ieee.c: New file.
66744         New module 'hypot-ieee'.
66745         * modules/hypot-ieee: New file.
66747         Tests for module 'hypotf-ieee'.
66748         * modules/hypotf-ieee-tests: New file.
66749         * tests/test-hypotf-ieee.c: New file.
66750         * tests/test-hypot-ieee.h: New file.
66752         New module 'hypotf-ieee'.
66753         * modules/hypotf-ieee: New file.
66755 2012-02-29  Bruno Haible  <bruno@clisp.org>
66757         Remove unused variables.
66758         * m4/fmod.m4 (gl_FUNC_FMOD): Remove unused variable 'i'.
66759         * m4/fmodl.m4 (gl_FUNC_FMODL): Likewise.
66760         * m4/remainder.m4 (gl_FUNC_REMAINDER): Likewise.
66761         * m4/remainderl.m4 (gl_FUNC_REMAINDERL): Likewise.
66763 2012-02-29  Eric Blake  <eblake@redhat.com>
66765         termios: fix pid_t always, not just for tcgetsid
66766         * doc/posix-headers/termios.texi (termios.h): Mention problem.
66767         * lib/termios.in.h (include): Ensure pid_t on all platforms, not
66768         just when building tcgetsid.
66770 2012-02-29  Bruno Haible  <bruno@clisp.org>
66772         Tests for module 'hypotl'.
66773         * modules/hypotl-tests: New file.
66774         * tests/test-hypotl.c: New file.
66776         New module 'hypotl'.
66777         * lib/math.in.h (hypotl): New declaration.
66778         * lib/hypotl.c: New file.
66779         * m4/hypotl.m4: New file.
66780         * m4/math_h.m4 (gl_MATH_H): Test whether hypotf is declared.
66781         (gl_MATH_H_DEFAULTS): Initialize GNULIB_HYPOTL, HAVE_HYPOTL.
66782         * modules/math (Makefile.am): Substitute GNULIB_HYPOTL, HAVE_HYPOTL.
66783         * modules/hypotl: New file.
66784         * tests/test-math-c++.cc: Check the hypotl declaration.
66785         * doc/posix-functions/hypotl.texi: Mention the new module.
66787 2012-02-29  Eric Blake  <eblake@redhat.com>
66789         tcgetsid: fix cygwin header bug
66790         * lib/termios.in.h (includes) [Cygwin]: Ensure pid_t is defined.
66792         docs: update cygwin progress
66793         * doc/posix-functions/llround.texi (llround): Added in cygwin
66794         1.7.8.
66795         * doc/posix-functions/llroundf.texi (llroundf): Likewise.
66796         * doc/glibc-functions/program_invocation_name.texi
66797         (program_invocation_name): Likewise.
66798         * doc/glibc-functions/program_invocation_short_name.texi
66799         (program_invocation_short_name): Likewise.
66800         * doc/glibc-functions/madvise.texi (madvise): Likewise.
66801         * doc/glibc-functions/pthread_yield.texi (pthread_yield):
66802         Likewise.
66803         * doc/posix-functions/pthread_spin_destroy.texi
66804         (pthread_spin_destroy): Added in cygwin 1.7.10.
66805         * doc/posix-functions/pthread_spin_init.texi (pthread_spin_init):
66806         Likewise.
66807         * doc/posix-functions/pthread_spin_lock.texi (pthread_spin_lock):
66808         Likewise.
66809         * doc/posix-functions/pthread_spin_trylock.texi
66810         (pthread_spin_trylock): Likewise.
66811         * doc/posix-functions/pthread_spin_unlock.texi
66812         (pthread_spin_unlock): Likewise.
66813         * doc/posix-functions/pthread_setschedprio.texi
66814         (pthread_setschedprio): Likewise.
66815         * doc/posix-functions/pthread_attr_getstack.texi
66816         (pthread_attr_getstack): Likewise.
66817         * doc/pastposix-functions/pthread_attr_getstackaddr.texi
66818         (pthread_attr_getstackaddr): Likewise.
66819         * doc/glibc-functions/pthread_getattr_np.texi
66820         (pthread_getattr_np): Likewise.
66821         * doc/glibc-functions/sys_siglist.texi (sys_siglist): Likewise.
66822         * doc/glibc-functions/sysinfo.texi (sysinfo): Likewise.
66823         * doc/posix-functions/clock_settime.texi (clock_settime):
66824         Likewise.
66825         * doc/posix-functions/pthread_attr_getguardsize.texi
66826         (pthread_attr_getguardsize): Likewise.
66827         * doc/posix-functions/pthread_attr_setguardsize.texi
66828         (pthread_attr_setguardsize): Likewise.
66829         * doc/posix-functions/pthread_attr_setstack.texi
66830         (pthread_attr_setstack): Likewise.
66831         * doc/pastposix-functions/pthread_attr_setstackaddr.texi
66832         (pthread_attr_setstackaddr): Likewise.
66833         * doc/posix-functions/clock_getcpuclockid.texi
66834         (clock_getcpuclockid): Likewise.
66835         * doc/posix-functions/pthread_getcpuclockid.texi
66836         (pthread_getcpuclockid): Likewise.
66837         * doc/glibc-functions/error.texi (error): Likewise.
66838         * doc/glibc-functions/error_at_line.texi (error_at_line):
66839         Likewise.
66840         * doc/glibc-functions/error_message_count.texi
66841         (error_message_count): Likewise.
66842         * doc/glibc-functions/error_one_per_line.texi
66843         (error_one_per_line): Likewise.
66844         * doc/glibc-functions/error_print_progname.texi
66845         (error_print_progname): Likewise.
66846         * doc/posix-functions/pthread_condattr_getclock.texi
66847         (pthread_condattr_getclock): Likewise.
66848         * doc/posix-functions/pthread_condattr_setclock.texi
66849         (pthread_condattr_setclock): Likewise.
66850         * doc/posix-functions/clock_nanosleep.texi (clock_nanosleep):
66851         Likewise.
66852         * doc/glibc-functions/getgrouplist.texi (getgrouplist): Likewise.
66853         * doc/glibc-functions/getpt.texi (getpt): Likewise.
66854         * doc/glibc-functions/get_current_dir_name.texi
66855         (get_current_dir_name): Likewise.
66856         * doc/glibc-functions/pthread_sigqueue.texi (pthread_sigqueue):
66857         Likewise.
66858         * doc/posix-functions/tcgetsid.texi (tcgetsid): Likewise, but with
66859         wrong return type.
66860         * doc/glibc-functions/scandirat.texi (scandirat): Added in cygwin
66861         1.7.11.
66863 2012-02-29  Bruno Haible  <bruno@clisp.org>
66865         Tests for module 'hypotf'.
66866         * modules/hypotf-tests: New file.
66867         * tests/test-hypotf.c: New file.
66869         New module 'hypotf'.
66870         * lib/math.in.h (hypotf): New declaration.
66871         * lib/hypotf.c: New file.
66872         * m4/hypotf.m4: New file.
66873         * m4/math_h.m4 (gl_MATH_H): Test whether hypotf is declared.
66874         (gl_MATH_H_DEFAULTS): Initialize GNULIB_HYPOTF, HAVE_HYPOTF,
66875         REPLACE_HYPOTF.
66876         * modules/math (Makefile.am): Substitute GNULIB_HYPOTF, HAVE_HYPOTF,
66877         REPLACE_HYPOTF.
66878         * modules/hypotf: New file.
66879         * tests/test-math-c++.cc: Check the hypotf declaration.
66880         * doc/posix-functions/hypotf.texi: Mention the new module.
66882         hypot: Prepare for hypotf module.
66883         * m4/hypot.m4: New file.
66884         * modules/hypot (Files): Add m4/hypot.m4.
66885         (configure.ac): Invoke gl_FUNC_HYPOT.
66887 2012-02-29  Bruno Haible  <bruno@clisp.org>
66889         hypot tests: More tests.
66890         * tests/test-hypot.c: Include <float.h>.
66891         (main): Add tests about overflow and underflow.
66893 2012-02-29  Bruno Haible  <bruno@clisp.org>
66895         math code: Add comments.
66896         * lib/acosl.c: Add comment about related glibc source files.
66897         * lib/asinl.c: Likewise.
66898         * lib/atanl.c: Likewise.
66899         * lib/expl.c: Likewise.
66900         * lib/logl.c: Likewise.
66901         * lib/sincosl.c: Likewise.
66902         * lib/sinl.c: Likewise.
66903         * lib/tanl.c: Likewise.
66904         * lib/trigl.c: Likewise.
66905         * lib/cosl.c: Likewise. Fix comments.
66907 2012-02-28  Bruno Haible  <bruno@clisp.org>
66909         math: Ensure HUGE_VAL, HUGE_VALF, HUGE_VALL are defined.
66910         * lib/math.in.h (HUGE_VAL, HUGE_VALF, HUGE_VALL): Define fallbacks.
66911         * tests/test-math.c: Include macros.h. Check that HUGE_VAL, HUGE_VALF,
66912         HUGE_VALL are defined.
66913         (numeric_equald): Renamed from numeric_equal.
66914         (numeric_equalf, numeric_equall): New functions.
66915         (main): Check also HUGE_VALF, HUGE_VALL.
66916         * modules/math-tests (Files): Add tests/macros.h.
66917         * doc/posix-headers/math.texi: Document the problems with HUGE_VALF and
66918         HUGE_VALL.
66920 2012-02-28  Bruno Haible  <bruno@clisp.org>
66922         doc: Move ISO C11 feature notes into POSIX chapters.
66923         * doc/posix-functions/aligned_alloc.texi: Renamed from
66924         doc/glibc-functions/aligned_alloc.texi.
66925         * doc/posix-functions/quick_exit.texi: Renamed from
66926         doc/glibc-functions/quick_exit.texi.
66927         * doc/posix-headers/uchar.texi: Renamed from
66928         doc/glibc-headers/uchar.texi.
66929         * doc/posix-functions/c16rtomb.texi: Renamed from
66930         doc/glibc-functions/c16rtomb.texi.
66931         * doc/posix-functions/c32rtomb.texi: Renamed from
66932         doc/glibc-functions/c32rtomb.texi.
66933         * doc/posix-functions/mbrtoc16.texi: Renamed from
66934         doc/glibc-functions/mbrtoc16.texi.
66935         * doc/posix-functions/mbrtoc32.texi: Renamed from
66936         doc/glibc-functions/mbrtoc32.texi.
66937         * doc/gnulib.texi: Update.
66938         (Glibc uchar.h): Remove section.
66939         Suggested by Eric Blake.
66941 2012-02-29  Paul Eggert  <eggert@cs.ucla.edu>
66943         stdnoreturn: port to MSVC better
66944         MSVC standard headers use __declspec(noreturn), so #define noreturn
66945         to empty on that platform.  Reported by Bruno Haible in
66946         <http://lists.gnu.org/r/bug-gnulib/2012-02/msg00152.html>.
66947         * lib/stdnoreturn.in.h (noreturn): Define to empty on MSVC.
66948         * doc/posix-headers/stdnoreturn.texi (stdnoreturn.h): Document this.
66950 2012-02-28  Bruno Haible  <bruno@clisp.org>
66952         doc: Mention new glibc headers and functions.
66953         * doc/glibc-headers/uchar.texi: New file.
66954         * doc/glibc-functions/aligned_alloc.texi: New file.
66955         * doc/glibc-functions/c16rtomb.texi: New file.
66956         * doc/glibc-functions/c32rtomb.texi: New file.
66957         * doc/glibc-functions/clock_adjtime.texi: New file.
66958         * doc/glibc-functions/fanotify_init.texi: New file.
66959         * doc/glibc-functions/fanotify_mark.texi: New file.
66960         * doc/glibc-functions/inet6_opt_append.texi: New file.
66961         * doc/glibc-functions/inet6_opt_find.texi: New file.
66962         * doc/glibc-functions/inet6_opt_finish.texi: New file.
66963         * doc/glibc-functions/inet6_opt_get_val.texi: New file.
66964         * doc/glibc-functions/inet6_opt_init.texi: New file.
66965         * doc/glibc-functions/inet6_opt_next.texi: New file.
66966         * doc/glibc-functions/inet6_opt_set_val.texi: New file.
66967         * doc/glibc-functions/inet6_rth_add.texi: New file.
66968         * doc/glibc-functions/inet6_rth_getaddr.texi: New file.
66969         * doc/glibc-functions/inet6_rth_init.texi: New file.
66970         * doc/glibc-functions/inet6_rth_reverse.texi: New file.
66971         * doc/glibc-functions/inet6_rth_segments.texi: New file.
66972         * doc/glibc-functions/inet6_rth_space.texi: New file.
66973         * doc/glibc-functions/login.texi: New file.
66974         * doc/glibc-functions/mbrtoc16.texi: New file.
66975         * doc/glibc-functions/mbrtoc32.texi: New file.
66976         * doc/glibc-functions/name_to_handle_at.texi: New file.
66977         * doc/glibc-functions/ntp_gettimex.texi: New file.
66978         * doc/glibc-functions/open_by_handle_at.texi: New file.
66979         * doc/glibc-functions/prlimit.texi: New file.
66980         * doc/glibc-functions/process_vm_readv.texi: New file.
66981         * doc/glibc-functions/process_vm_writev.texi: New file.
66982         * doc/glibc-functions/recvmmsg.texi: New file.
66983         * doc/glibc-functions/scandirat.texi: New file.
66984         * doc/glibc-functions/sendmmsg.texi: New file.
66985         * doc/glibc-functions/setns.texi: New file.
66986         * doc/glibc-functions/timespec_get.texi: New file.
66987         * doc/gnulib.texi: Include them.
66988         (Glibc sys/fanotify.h, Glibc sys/resource.h, Glibc uchar.h): New
66989         sections.
66990         Reported by Eric Blake.
66992 2012-02-28  Bruno Haible  <bruno@clisp.org>
66994         Avoid compilation errors with MSVC option -fp:strict.
66995         * lib/floor.c: Use MSVC specific pragma fenv_access.
66996         * lib/ceil.c: Likewise.
66997         * lib/trunc.c: Likewise.
66998         * lib/round.c: Likewise.
66999         * lib/rint.c: Likewise.
67000         * lib/fma.c: Likewise.
67001         * lib/integer_length.c: Likewise.
67002         * m4/round.m4 (gl_FUNC_ROUND): Likewise.
67003         * m4/roundf.m4 (gl_FUNC_ROUNDF): Likewise.
67004         * tests/test-floor2.c: Likewise.
67005         * tests/test-floorf2.c: Likewise.
67006         * tests/test-ceil2.c: Likewise.
67007         * tests/test-ceilf2.c: Likewise.
67008         * tests/test-trunc2.c: Likewise.
67009         * tests/test-truncf2.c: Likewise.
67010         Reported by Michael Goffioul <michael.goffioul@gmail.com>.
67012 2012-02-27  Bruno Haible  <bruno@clisp.org>
67014         Tests for module 'sqrtl-ieee'.
67015         * modules/sqrtl-ieee-tests: New file.
67016         * tests/test-sqrtl-ieee.c: New file.
67018         New module 'sqrtl-ieee'.
67019         * modules/sqrtl-ieee: New file.
67021         Tests for module 'sqrt-ieee'.
67022         * modules/sqrt-ieee-tests: New file.
67023         * tests/test-sqrt-ieee.c: New file.
67025         New module 'sqrt-ieee'.
67026         * modules/sqrt-ieee: New file.
67028         Tests for module 'sqrtf-ieee'.
67029         * modules/sqrtf-ieee-tests: New file.
67030         * tests/test-sqrtf-ieee.c: New file.
67031         * tests/test-sqrt-ieee.h: New file.
67033         New module 'sqrtf-ieee'.
67034         * modules/sqrtf-ieee: New file.
67036 2012-02-27  Bruno Haible  <bruno@clisp.org>
67038         remainderl-ieee: Work around test failure on OSF/1.
67039         * m4/remainderl-ieee.m4: New file.
67040         * m4/remainderl.m4 (gl_FUNC_REMAINDERL): If gl_FUNC_REMAINDERL_IEEE is
67041         present, test whether remainderl works with a zero second argument.
67042         Replace it if not.
67043         * lib/math.in.h (remainderl): Override if REPLACE_REMAINDERL is 1.
67044         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_REMAINDERL.
67045         * modules/math (Makefile.am): Substitute REPLACE_REMAINDERL.
67046         * modules/remainderl (configure.ac): Consider REPLACE_REMAINDERL.
67047         (Depends-on): Update conditions.
67048         * modules/remainderl-ieee (Files): Add m4/remainderl-ieee.m4.
67049         (Depends-on): Add remainder-ieee.
67050         (configure.ac): Invoke gl_FUNC_REMAINDERL_IEEE.
67051         * doc/posix-functions/remainderl.texi: Mention the remainderl-ieee
67052         module.
67054         remainderf-ieee: Work around test failure on OSF/1.
67055         * m4/remainderf-ieee.m4: New file.
67056         * m4/remainderf.m4 (gl_FUNC_REMAINDERF): If gl_FUNC_REMAINDERF_IEEE is
67057         present, test whether remainderf works with a zero second argument.
67058         Replace it if not.
67059         * lib/math.in.h (remainderf): Override if REPLACE_REMAINDERF is 1.
67060         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_REMAINDERF.
67061         * modules/math (Makefile.am): Substitute REPLACE_REMAINDERF.
67062         * modules/remainderf (configure.ac): Consider REPLACE_REMAINDERF.
67063         (Depends-on): Update conditions.
67064         * modules/remainderf-ieee (Files): Add m4/remainderf-ieee.m4.
67065         (Depends-on): Add remainder-ieee.
67066         (configure.ac): Invoke gl_FUNC_REMAINDERF_IEEE.
67067         * doc/posix-functions/remainderf.texi: Mention the remainderf-ieee
67068         module.
67070         remainder-ieee: Work around test failure on OSF/1.
67071         * m4/remainder-ieee.m4: New file.
67072         * m4/remainder.m4 (gl_FUNC_REMAINDER): If gl_FUNC_REMAINDER_IEEE is
67073         present, test whether remainder works with a zero second argument.
67074         Replace it if not.
67075         * lib/math.in.h (remainder): Override if REPLACE_REMAINDER is 1.
67076         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_REMAINDER.
67077         * modules/math (Makefile.am): Substitute REPLACE_REMAINDER.
67078         * modules/remainder (configure.ac): Consider REPLACE_REMAINDER.
67079         (Depends-on): Update dependencies.
67080         * modules/remainder-ieee (Files): Add m4/remainder-ieee.m4.
67081         (configure.ac): Invoke gl_FUNC_REMAINDER_IEEE.
67082         * doc/posix-functions/remainder.texi: Mention the remainder-ieee module.
67084         Tests for module 'remainderl-ieee'.
67085         * modules/remainderl-ieee-tests: New file.
67086         * tests/test-remainderl-ieee.c: New file.
67088         New module 'remainderl-ieee'.
67089         * modules/remainderl-ieee: New file.
67091         Tests for module 'remainder-ieee'.
67092         * modules/remainder-ieee-tests: New file.
67093         * tests/test-remainder-ieee.c: New file.
67095         New module 'remainder-ieee'.
67096         * modules/remainder-ieee: New file.
67098         Tests for module 'remainderf-ieee'.
67099         * modules/remainderf-ieee-tests: New file.
67100         * tests/test-remainderf-ieee.c: New file.
67101         * tests/test-remainder-ieee.h: New file.
67103         New module 'remainderf-ieee'.
67104         * modules/remainderf-ieee: New file.
67106 2012-02-27  Bruno Haible  <bruno@clisp.org>
67108         modff, modfl: Fix configure syntax error.
67109         * m4/modff.m4 (gl_FUNC_MODFF): Insert ':' command in 'if'.
67110         * m4/modfl.m4 (gl_FUNC_MODFL): Likewise.
67112 2012-02-27  Bruno Haible  <bruno@clisp.org>
67114         fmodl-ieee: Work around test failures on OSF/1, MSVC 9.
67115         * m4/fmodl-ieee.m4: New file.
67116         * m4/fmodl.m4 (gl_FUNC_FMODL): If gl_FUNC_FMODL_IEEE is present, test
67117         whether fmodl works with zero arguments. Replace it if not.
67118         * modules/fmodl-ieee (Files): Add m4/fmodl-ieee.m4.
67119         (Depends-on): Add fmod-ieee.
67120         (configure.ac): Invoke gl_FUNC_FMODL_IEEE.
67121         * doc/posix-functions/fmodl.texi: Mention the fmodl-ieee module.
67123         fmodf-ieee: Work around test failure on OSF/1.
67124         * m4/fmodf-ieee.m4: New file.
67125         * m4/fmodf.m4 (gl_FUNC_FMODF): If gl_FUNC_FMODF_IEEE is present, test
67126         whether fmodf works with zero arguments. Replace it if not.
67127         * lib/math.in.h (fmodf): Override if REPLACE_FMODF is 1.
67128         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_FMODF.
67129         * modules/math (Makefile.am): Substitute REPLACE_FMODF.
67130         * modules/fmodf (configure.ac): Consider REPLACE_FMODF.
67131         (Depends-on): Update dependencies.
67132         * modules/fmodf-ieee (Files): Add m4/fmodf-ieee.m4.
67133         (configure.ac): Invoke gl_FUNC_FMODF_IEEE.
67134         * doc/posix-functions/fmodf.texi: Mention the problem on OSF/1.
67136         fmodf-ieee: Work around test failure on MSVC 9.
67137         * modules/fmodf-ieee (Depends-on): Add fmod-ieee.
67138         * doc/posix-functions/fmodf.texi: Mention the fmodf-ieee module.
67140         fmod-ieee: Work around test failures on OSF/1, mingw.
67141         * m4/fmod-ieee.m4: New file.
67142         * m4/fmod.m4 (gl_FUNC_FMOD): If gl_FUNC_FMOD_IEEE is present, test
67143         whether fmod works with zero arguments. Replace it if not.
67144         * lib/math.in.h (fmod): New declaration.
67145         * lib/fmod.c: New file.
67146         * m4/math_h.m4 (gl_MATH_H): Test whether fmod is declared.
67147         (gl_MATH_H_DEFAULTS): Initialize GNULIB_FMOD, REPLACE_FMOD.
67148         * modules/math (Makefile.am): Substitute GNULIB_FMOD, REPLACE_FMOD.
67149         * modules/fmod (Files): Add lib/fmod.c.
67150         (Depends-on): Add math, isinf, trunc, fma.
67151         (configure.ac): Arrange to compile lib/fmod.c if needed.
67152         * modules/fmod-ieee (Files): Add m4/fmod-ieee.m4, m4/minus-zero.m4,
67153         m4/signbit.m4.
67154         (configure.ac): Invoke gl_FUNC_FMOD_IEEE.
67155         * tests/test-math-c++.cc: Check the declaration of fmod.
67156         * doc/posix-functions/fmod.texi: Mention the fmod-ieee module.
67158         fmodl-ieee: Fix test failures.
67159         * lib/fmodl.c (fmodl): Treat Inf specially.
67160         * modules/fmodl (Depends-on): Add isinf.
67162         Tests for module 'fmodl-ieee'.
67163         * modules/fmodl-ieee-tests: New file.
67164         * tests/test-fmodl-ieee.c: New file.
67166         New module 'fmodl-ieee'.
67167         * modules/fmodl-ieee: New file.
67169         Tests for module 'fmod-ieee'.
67170         * modules/fmod-ieee-tests: New file.
67171         * tests/test-fmod-ieee.c: New file.
67173         New module 'fmod-ieee'.
67174         * modules/fmod-ieee: New file.
67176         Tests for module 'fmodf-ieee'.
67177         * modules/fmodf-ieee-tests: New file.
67178         * tests/test-fmodf-ieee.c: New file.
67179         * tests/test-fmod-ieee.h: New file.
67181         New module 'fmodf-ieee'.
67182         * modules/fmodf-ieee: New file.
67184 2012-02-27  Bruno Haible  <bruno@clisp.org>
67186         Tests for module 'rintl-ieee'.
67187         * modules/rintl-ieee-tests: New file.
67188         * tests/test-rintl-ieee.c: New file.
67190         New module 'rintl-ieee'.
67191         * modules/rintl-ieee: New file.
67193         Tests for module 'rint-ieee'.
67194         * modules/rint-ieee-tests: New file.
67195         * tests/test-rint-ieee.c: New file.
67197         New module 'rint-ieee'.
67198         * modules/rint-ieee: New file.
67200         Tests for module 'rintf-ieee'.
67201         * modules/rintf-ieee-tests: New file.
67202         * tests/test-rintf-ieee.c: New file.
67203         * tests/test-rint-ieee.h: New file.
67205         New module 'rintf-ieee'.
67206         * modules/rintf-ieee: New file.
67208 2012-02-26  Paul Eggert  <eggert@cs.ucla.edu>
67210         regex: re_search etc. should return -2 when memory exhausted
67211         This bug was uncovered when testing 'grep'.  Without the fix,
67212         re_search and friends return -1 when memory is exhausted, but -1
67213         means no match, and this causes grep to falsely report no-match
67214         instead of memory-exhaustion.  See
67215         <http://sources.redhat.com/bugzilla/show_bug.cgi?id=13762>.
67216         * lib/regexec.c (re_search_stub): Return -2 (not -1) if there is
67217         trouble; this can occur if re_search_internal ran out of memory.
67219 2012-02-26  Bruno Haible  <bruno@clisp.org>
67221         modfl-ieee: Work around test failures on IRIX, OSF/1, mingw.
67222         * m4/modfl-ieee.m4: New file.
67223         * m4/modfl.m4 (gl_FUNC_MODFL): If gl_FUNC_MODFL_IEEE is present, test
67224         whether modfl works with Inf. Replace it if not.
67225         * lib/math.in.h (modfl): Override if REPLACE_MODFF is 1.
67226         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_MODFL.
67227         * modules/math (Makefile.am): Substitute REPLACE_MODFL.
67228         * modules/modfl (configure.ac): Consider REPLACE_MODFL.
67229         (Depends-on): Update dependencies.
67230         * modules/modfl-ieee (Files): Add m4/modfl-ieee.m4, m4/minus-zero.m4,
67231         m4/signbit.m4.
67232         (configure.ac): Invoke gl_FUNC_MODFL_IEEE.
67233         * doc/posix-functions/modfl.texi: Mention the modfl-ieee module.
67235         modfl-ieee: Fix dependencies.
67236         * modules/modfl-ieee (Depends-on): Add modf-ieee.
67238         modfl-ieee: Fix test failures.
67239         * lib/modfl.c (modfl): Treat NaN and Inf specially.
67240         * modules/modfl (Depends-on): Add isfinite, isinf.
67242         modff-ieee: Work around test failures on *BSD, IRIX, OSF/1, etc.
67243         * m4/modff-ieee.m4: New file.
67244         * m4/modff.m4 (gl_FUNC_MODFF): If gl_FUNC_MODFF_IEEE is present, test
67245         whether modff works with NaN and Inf. Replace it if not.
67246         * lib/math.in.h (modff): Override if REPLACE_MODFF is 1.
67247         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_MODFF.
67248         * modules/math (Makefile.am): Substitute REPLACE_MODFF.
67249         * modules/modff (configure.ac): Consider REPLACE_MODFF.
67250         (Depends-on): Update dependencies.
67251         * modules/modff-ieee (Files): Add m4/modff-ieee.m4, m4/minus-zero.m4,
67252         m4/signbit.m4.
67253         (Depends-on): Add modf-ieee.
67254         (configure.ac): Invoke gl_FUNC_MODFF_IEEE.
67255         * doc/posix-functions/modff.texi: Mention the modff-ieee module.
67257         modf-ieee: Work around test failures on *BSD, IRIX, OSF/1, Cygwin.
67258         * m4/modf-ieee.m4: New file.
67259         * m4/modf.m4 (gl_FUNC_MODF): If gl_FUNC_MODF_IEEE is present, test
67260         whether modf works with NaN and Inf. Replace it if not.
67261         * lib/math.in.h (modf): New declaration.
67262         * lib/modf.c: New file.
67263         * m4/math_h.m4 (gl_MATH_H): Test whether modf is declared.
67264         (gl_MATH_H_DEFAULTS): Initialize GNULIB_MODF, REPLACE_MODF.
67265         * modules/math (Makefile.am): Substitute GNULIB_MODF, REPLACE_MODF.
67266         * modules/modf (Files): Add lib/modf.c.
67267         (Depends-on): Add math, isfinite, trunc, isinf.
67268         (configure.ac): Addrange to compile lib/modf.c if needed.
67269         * modules/modf-ieee (Files): Add m4/modf-ieee.m4, m4/minus-zero.m4,
67270         m4/signbit.m4.
67271         (configure.ac): Invoke gl_FUNC_MODF_IEEE.
67272         * tests/test-math-c++.cc: Check the declaration of modf.
67273         * doc/posix-functions/modf.texi: Mention the modf-ieee module.
67275         Tests for module 'modfl-ieee'.
67276         * modules/modfl-ieee-tests: New file.
67277         * tests/test-modfl-ieee.c: New file.
67279         New module 'modfl-ieee'.
67280         * modules/modfl-ieee: New file.
67282         Tests for module 'modf-ieee'.
67283         * modules/modf-ieee-tests: New file.
67284         * tests/test-modf-ieee.c: New file.
67286         New module 'modf-ieee'.
67287         * modules/modf-ieee: New file.
67289         Tests for module 'modff-ieee'.
67290         * modules/modff-ieee-tests: New file.
67291         * tests/test-modff-ieee.c: New file.
67292         * tests/test-modf-ieee.h: New file.
67294         New module 'modff-ieee'.
67295         * modules/modff-ieee: New file.
67297 2012-02-26  Bruno Haible  <bruno@clisp.org>
67299         Tests for module 'fabsl-ieee'.
67300         * modules/fabsl-ieee-tests: New file.
67301         * tests/test-fabsl-ieee.c: New file.
67303         New module 'fabsl-ieee'.
67304         * modules/fabsl-ieee: New file.
67306         Tests for module 'fabs-ieee'.
67307         * modules/fabs-ieee-tests: New file.
67308         * tests/test-fabs-ieee.c: New file.
67310         New module 'fabs-ieee'.
67311         * modules/fabs-ieee: New file.
67313         Tests for module 'fabsf-ieee'.
67314         * modules/fabsf-ieee-tests: New file.
67315         * tests/test-fabsf-ieee.c: New file.
67316         * tests/test-fabs-ieee.h: New file.
67318         New module 'fabsf-ieee'.
67319         * modules/fabsf-ieee: New file.
67321 2012-02-26  Bruno Haible  <bruno@clisp.org>
67323         Tests for module 'fmal-ieee'.
67324         * modules/fmal-ieee-tests: New file.
67325         * tests/test-fmal-ieee.c: New file.
67327         New module 'fmal-ieee'.
67328         * modules/fmal-ieee: New file.
67330         Tests for module 'fma-ieee'.
67331         * modules/fma-ieee-tests: New file.
67332         * tests/test-fma-ieee.c: New file.
67334         New module 'fma-ieee'.
67335         * modules/fma-ieee: New file.
67337         Tests for module 'fmaf-ieee'.
67338         * modules/fmaf-ieee-tests: New file.
67339         * tests/test-fmaf-ieee.c: New file.
67340         * tests/test-fma-ieee.h: New file.
67342         New module 'fmaf-ieee'.
67343         * modules/fmaf-ieee: New file.
67345 2012-02-26  Bruno Haible  <bruno@clisp.org>
67347         Tests for module 'ldexpl-ieee'.
67348         * modules/ldexpl-ieee-tests: New file.
67349         * tests/test-ldexpl-ieee.c: New file.
67351         New module 'ldexpl-ieee'.
67352         * modules/ldexpl-ieee: New file.
67354         Tests for module 'ldexp-ieee'.
67355         * modules/ldexp-ieee-tests: New file.
67356         * tests/test-ldexp-ieee.c: New file.
67358         New module 'ldexp-ieee'.
67359         * modules/ldexp-ieee: New file.
67361         Tests for module 'ldexpf-ieee'.
67362         * modules/ldexpf-ieee-tests: New file.
67363         * tests/test-ldexpf-ieee.c: New file.
67364         * tests/test-ldexp-ieee.h: New file.
67366         New module 'ldexpf-ieee'.
67367         * modules/ldexpf-ieee: New file.
67369 2012-02-26  Bruno Haible  <bruno@clisp.org>
67371         Refactor frexp*-ieee tests.
67372         * tests/test-frexp-ieee.h: New file.
67373         * tests/test-frexpf-ieee.c: Include test-frexp-ieee.h.
67374         (main): Just call test_function.
67375         * tests/test-frexp-ieee.c: Include test-frexp-ieee.h.
67376         (main): Just call test_function.
67377         * tests/test-frexpl-ieee.c: Include test-frexp-ieee.h.
67378         (main): Just call test_function.
67379         * modules/frexpf-ieee-tests (Files): Add tests/test-frexp-ieee.h.
67380         * modules/frexp-ieee-tests (Files): Likewise.
67381         * modules/frexpl-ieee-tests (Files): Likewise.
67383         Tests for module 'frexpl-ieee'.
67384         * modules/frexpl-ieee-tests: New file.
67385         * tests/test-frexpl-ieee.c: New file.
67387         New module 'frexpl-ieee'.
67388         * modules/frexpl-ieee: New file.
67390         Tests for module 'frexp-ieee'.
67391         * modules/frexp-ieee-tests: New file.
67392         * tests/test-frexp-ieee.c: New file.
67394         New module 'frexp-ieee'.
67395         * modules/frexp-ieee: New file.
67397         Tests for module 'frexpf-ieee'.
67398         * modules/frexpf-ieee-tests: New file.
67399         * tests/test-frexpf-ieee.c: New file.
67401         New module 'frexpf-ieee'.
67402         * modules/frexpf-ieee: New file.
67404 2012-02-26  Bruno Haible  <bruno@clisp.org>
67406         roundl-ieee tests: More tests.
67407         * tests/test-roundl-ieee.c: Include isnanl-nolibm.h, infinity.h, nan.h.
67408         (main): Add tests for [MX] shaded specification in POSIX.
67409         * modules/roundl-ieee-tests (Files): Add tests/infinity.h, tests/nan.h.
67410         (Depends-on): Add isnanl-nolibm.
67412         round-ieee tests: More tests.
67413         * tests/test-round-ieee.c: Include isnand-nolibm.h, infinity.h, nan.h.
67414         (main): Add tests for [MX] shaded specification in POSIX.
67415         * modules/round-ieee-tests (Files): Add tests/infinity.h, tests/nan.h.
67416         (Depends-on): Add isnand-nolibm.
67418         roundf-ieee tests: More tests.
67419         * tests/test-roundf-ieee.c: Include isnanf-nolibm.h, infinity.h, nan.h.
67420         (main): Add tests for [MX] shaded specification in POSIX.
67421         * modules/roundf-ieee-tests (Files): Add tests/infinity.h, tests/nan.h.
67422         (Depends-on): Add isnanf-nolibm.
67424         truncl-ieee tests: More tests.
67425         * tests/test-truncl-ieee.c: Include isnanl-nolibm.h, infinity.h, nan.h.
67426         (main): Add tests for [MX] shaded specification in POSIX.
67427         * modules/truncl-ieee-tests (Files): Add tests/infinity.h, tests/nan.h.
67428         (Depends-on): Add isnanl-nolibm.
67430         trunc-ieee tests: More tests.
67431         * tests/test-trunc-ieee.c: Include isnand-nolibm.h, infinity.h, nan.h.
67432         (main): Add tests for [MX] shaded specification in POSIX.
67433         * modules/trunc-ieee-tests (Files): Add tests/infinity.h, tests/nan.h.
67434         (Depends-on): Add isnand-nolibm.
67436         truncf-ieee tests: More tests.
67437         * tests/test-truncf-ieee.c: Include isnanf-nolibm.h, infinity.h, nan.h.
67438         (main): Add tests for [MX] shaded specification in POSIX.
67439         * modules/truncf-ieee-tests (Files): Add tests/infinity.h, tests/nan.h.
67440         (Depends-on): Add isnanf-nolibm.
67442         ceill-ieee tests: More tests.
67443         * tests/test-ceill-ieee.c: Include isnanl-nolibm.h, infinity.h, nan.h.
67444         (main): Add tests for [MX] shaded specification in POSIX.
67445         * modules/ceill-ieee-tests (Files): Add tests/infinity.h, tests/nan.h.
67446         (Depends-on): Add isnanl-nolibm.
67448         ceil-ieee tests: More tests.
67449         * tests/test-ceil-ieee.c: Include isnand-nolibm.h, infinity.h, nan.h.
67450         (main): Add tests for [MX] shaded specification in POSIX.
67451         * modules/ceil-ieee-tests (Files): Add tests/infinity.h, tests/nan.h.
67452         (Depends-on): Add isnand-nolibm.
67454         ceilf-ieee tests: More tests.
67455         * tests/test-ceilf-ieee.c: Include isnanf-nolibm.h, infinity.h, nan.h.
67456         (main): Add tests for [MX] shaded specification in POSIX.
67457         * modules/ceilf-ieee-tests (Files): Add tests/infinity.h, tests/nan.h.
67458         (Depends-on): Add isnanf-nolibm.
67460         floorl-ieee tests: More tests.
67461         * tests/test-floorl-ieee.c: Include isnanl-nolibm.h, infinity.h, nan.h.
67462         (main): Add tests for [MX] shaded specification in POSIX.
67463         * modules/floorl-ieee-tests (Files): Add tests/infinity.h, tests/nan.h.
67464         (Depends-on): Add isnanl-nolibm.
67466         floor-ieee tests: More tests.
67467         * tests/test-floor-ieee.c: Include isnand-nolibm.h, infinity.h, nan.h.
67468         (main): Add tests for [MX] shaded specification in POSIX.
67469         * modules/floor-ieee-tests (Files): Add tests/infinity.h, tests/nan.h.
67470         (Depends-on): Add isnand-nolibm.
67472         floorf-ieee tests: More tests.
67473         * tests/test-floorf-ieee.c: Include isnanf-nolibm.h, infinity.h, nan.h.
67474         (main): Add tests for [MX] shaded specification in POSIX.
67475         * modules/floorf-ieee-tests (Files): Add tests/infinity.h, tests/nan.h.
67476         (Depends-on): Add isnanf-nolibm.
67478 2012-02-26  Bruno Haible  <bruno@clisp.org>
67480         fpieee: More comments.
67481         * m4/fpieee.m4 (gl_FP_IEEE): Add more comments.
67483 2012-02-25  Bruno Haible  <bruno@clisp.org>
67485         Tests for module 'log10l'.
67486         * modules/log10l-tests: New file.
67487         * tests/test-log10l.c: New file.
67488         * tests/test-math-c++.cc: Check the declaration of log10l.
67490         New module 'log10l'.
67491         * lib/math.in.h (log10l): New declaration.
67492         * lib/log10l.c: New file.
67493         * m4/log10l.m4: New file.
67494         * modules/log10l: New file.
67495         * m4/math_h.m4 (gl_MATH_H): Test whether log10l is declared.
67496         (gl_MATH_H_DEFAULTS): Initialize GNULIB_LOG10L, HAVE_LOG10L,
67497         HAVE_DECL_LOG10L.
67498         * modules/math (Makefile.am): Substitute GNULIB_LOG10L, HAVE_LOG10L,
67499         HAVE_DECL_LOG10L.
67500         * doc/posix-functions/log10l.texi: Mention the new module.
67502 2012-02-25  Bruno Haible  <bruno@clisp.org>
67504         fmodl, remainder*: Avoid wrong results due to rounding errors.
67505         * lib/fmodl.c (fmodl): Correct the result if it is not within the
67506         expected bounds.
67507         * lib/remainderf.c (remainderf): Likewise.
67508         * lib/remainder.c (remainder): Likewise.
67509         * lib/remainderl.c (remainderl): Likewise.
67511 2012-02-25  Bruno Haible  <bruno@clisp.org>
67513         Tests for module 'remainderl'.
67514         * modules/remainderl-tests: New file.
67515         * tests/test-remainderl.c: New file.
67516         * tests/test-math-c++.cc: Check the declaration of remainderl.
67518         New module 'remainderl'.
67519         * lib/math.in.h (remainderl): New declaration.
67520         * lib/remainderl.c: New file.
67521         * m4/remainderl.m4: New file.
67522         * modules/remainderl: New file.
67523         * m4/math_h.m4 (gl_MATH_H): Test whether remainderl is declared.
67524         (gl_MATH_H_DEFAULTS): Initialize GNULIB_REMAINDERL, HAVE_REMAINDERL.
67525         * modules/math (Makefile.am): Substitute GNULIB_REMAINDERL,
67526         HAVE_REMAINDERL.
67527         * doc/posix-functions/remainderl.texi: Mention the new module.
67529 2012-02-25  Bruno Haible  <bruno@clisp.org>
67531         Tests for module 'remainderf'.
67532         * modules/remainderf-tests: New file.
67533         * tests/test-remainderf.c: New file.
67534         * tests/test-math-c++.cc: Check the declaration of remainderf.
67536         New module 'remainderf'.
67537         * lib/math.in.h (remainderf): New declaration.
67538         * lib/remainderf.c: New file.
67539         * m4/remainderf.m4: New file.
67540         * modules/remainderf: New file.
67541         * m4/math_h.m4 (gl_MATH_H): Test whether remainderf is declared.
67542         (gl_MATH_H_DEFAULTS): Initialize GNULIB_REMAINDERF, HAVE_REMAINDERF.
67543         * modules/math (Makefile.am): Substitute GNULIB_REMAINDERF,
67544         HAVE_REMAINDERF.
67545         * doc/posix-functions/remainderf.texi: Mention the new module.
67547 2012-02-25  Bruno Haible  <bruno@clisp.org>
67549         remainder: Support for MSVC.
67550         * lib/math.in.h (remainder): New declaration.
67551         * lib/remainder.c: New file.
67552         * m4/remainder.m4: New file.
67553         * modules/remainder (Files): Add lib/remainder.c, m4/remainder.m4.
67554         (Depends-on): Add math, round, fma.
67555         (configure.ac): Use results of gl_FUNC_REMAINDER.
67556         * m4/math_h.m4 (gl_MATH_H): Test whether remainder is declared.
67557         (gl_MATH_H_DEFAULTS): Initialize GNULIB_REMAINDER, HAVE_REMAINDER,
67558         HAVE_DECL_REMAINDER.
67559         * modules/math (Makefile.am): Substitute GNULIB_REMAINDER,
67560         HAVE_REMAINDER, HAVE_DECL_REMAINDER.
67561         * tests/test-math-c++.cc: Check the declaration of remainder.
67562         * doc/posix-functions/remainder.texi: Mention that the MSVC and IRIX 5
67563         problems are fixed.
67565 2012-02-25  Bruno Haible  <bruno@clisp.org>
67567         Tests for module 'fmodl'.
67568         * modules/fmodl-tests: New file.
67569         * tests/test-fmodl.c: New file.
67570         * tests/test-math-c++.cc: Check the declaration of fmodl.
67572         New module 'fmodl'.
67573         * lib/math.in.h (fmodl): New declaration.
67574         * lib/fmodl.c: New file.
67575         * m4/fmodl.m4: New file.
67576         * m4/math_h.m4 (gl_MATH_H): Test whether fmodl is declared.
67577         (gl_MATH_H_DEFAULTS): Initialize GNULIB_FMODL, HAVE_FMODL,
67578         REPLACE_FMODL.
67579         * modules/math (Makefile.am): Substitute GNULIB_FMODL, HAVE_FMODL,
67580         REPLACE_FMODL.
67581         * modules/fmodl: New file.
67582         * doc/posix-functions/fmodl.texi: Mention the new module.
67584 2012-02-25  Bruno Haible  <bruno@clisp.org>
67586         Tests for module 'modfl'.
67587         * modules/modfl-tests: New file.
67588         * tests/test-modfl.c: New file.
67589         * tests/test-math-c++.cc: Check the declaration of modfl.
67591         New module 'modfl'.
67592         * lib/math.in.h (modfl): New declaration.
67593         * lib/modfl.c: New file.
67594         * m4/modfl.m4: New file.
67595         * m4/math_h.m4 (gl_MATH_H): Test whether modfl is declared.
67596         (gl_MATH_H_DEFAULTS): Initialize GNULIB_MODFL, HAVE_MODFL.
67597         * modules/math (Makefile.am): Substitute GNULIB_MODFL, HAVE_MODFL.
67598         * modules/modfl: New file.
67599         * doc/posix-functions/modfl.texi: Mention the new module.
67601 2012-02-25  Bruno Haible  <bruno@clisp.org>
67603         Tests for module 'fabsl'.
67604         * modules/fabsl-tests: New file.
67605         * tests/test-fabsl.c: New file.
67606         * tests/test-math-c++.cc: Check the declaration of fabsl.
67608         New module 'fabsl'.
67609         * lib/math.in.h (fabsl): New declaration.
67610         * lib/fabsl.c: New file.
67611         * m4/fabsl.m4: New file.
67612         * m4/math_h.m4 (gl_MATH_H): Test whether fabsl is declared.
67613         (gl_MATH_H_DEFAULTS): Initialize GNULIB_FABSL, HAVE_FABSL,
67614         REPLACE_FABSL.
67615         * modules/math (Makefile.am): Substitute GNULIB_FABSL, HAVE_FABSL,
67616         REPLACE_FABSL.
67617         * modules/fabsl: New file.
67618         * doc/posix-functions/fabsl.texi: Mention the new module.
67620 2012-02-25  Bruno Haible  <bruno@clisp.org>
67622         fabs tests: More tests.
67623         * tests/test-fabs.c: Include <string.h>, minus-zero.h.
67624         (zero): New variable.
67625         (main): Add tests for signed zero.
67626         * modules/fabs-tests (Files): Add tests/minus-zero.h.
67628         fabsf tests: More tests.
67629         * tests/test-fabsf.c: Include <string.h>, minus-zero.h.
67630         (zero): New variable.
67631         (main): Add tests for signed zero.
67632         * modules/fabsf-tests (Files): Add tests/minus-zero.h.
67634 2012-02-24  Bruno Haible  <bruno@clisp.org>
67636         atanl: Provide function definition on MSVC.
67637         * m4/atanl.m4 (gl_FUNC_ATANL): Test also whether atanl can be used as a
67638         function pointer.
67639         * lib/math.in.h (atanl): Undefine if it does not exist as a function.
67641 2012-02-24  Bruno Haible  <bruno@clisp.org>
67643         acosl: Provide function definition on MSVC.
67644         * m4/acosl.m4 (gl_FUNC_ACOSL): Test also whether acosl can be used as a
67645         function pointer.
67646         * lib/math.in.h (acosl): Undefine if it does not exist as a function.
67648 2012-02-24  Bruno Haible  <bruno@clisp.org>
67650         asinl: Provide function definition on MSVC.
67651         * m4/asinl.m4 (gl_FUNC_ASINL): Test also whether asinl can be used as a
67652         function pointer.
67653         * lib/math.in.h (asinl): Undefine if it does not exist as a function.
67655 2012-02-24  Bruno Haible  <bruno@clisp.org>
67657         tanl: Provide function definition on MSVC.
67658         * m4/tanl.m4 (gl_FUNC_TANL): Test also whether tanl can be used as a
67659         function pointer.
67660         * lib/math.in.h (tanl): Undefine if it does not exist as a function.
67662 2012-02-24  Bruno Haible  <bruno@clisp.org>
67664         cosl: Provide function definition on MSVC.
67665         * m4/cosl.m4 (gl_FUNC_COSL): Test also whether cosl can be used as a
67666         function pointer.
67667         * lib/math.in.h (cosl): Undefine if it does not exist as a function.
67669 2012-02-24  Bruno Haible  <bruno@clisp.org>
67671         sinl: Provide function definition on MSVC.
67672         * m4/sinl.m4 (gl_FUNC_SINL): Test also whether sinl can be used as a
67673         function pointer.
67674         * lib/math.in.h (sinl): Undefine if it does not exist as a function.
67676 2012-02-24  Bruno Haible  <bruno@clisp.org>
67678         logl: Provide function definition on MSVC.
67679         * m4/logl.m4 (gl_FUNC_LOGL): Test also whether logl can be used as a
67680         function pointer.
67681         * lib/math.in.h (logl): Undefine if it does not exist as a function.
67683 2012-02-24  Bruno Haible  <bruno@clisp.org>
67685         expl: Provide function definition on MSVC.
67686         * m4/expl.m4 (gl_FUNC_EXPL): Test also whether expl can be used as a
67687         function pointer.
67688         * lib/math.in.h (expl): Undefine if it does not exist as a function.
67690 2012-02-24  Bruno Haible  <bruno@clisp.org>
67692         sqrtl: Provide function definition on MSVC.
67693         * m4/sqrtl.m4 (gl_FUNC_SQRTL): Test also whether sqrtl can be used as
67694         a function pointer.
67695         * lib/math.in.h (sqrtl): Undefine if it does not exist as a function.
67697 2012-02-24  Bruno Haible  <bruno@clisp.org>
67699         ceill: Provide function definition on MSVC.
67700         * m4/ceill.m4 (gl_FUNC_CEILL_LIBS): Test also whether ceill can be
67701         used as a function pointer.
67702         * lib/math.in.h (ceill): Undefine if it is not declared as a function.
67704 2012-02-24  Bruno Haible  <bruno@clisp.org>
67706         floorl: Provide function definition on MSVC.
67707         * m4/floorl.m4 (gl_FUNC_FLOORL_LIBS): Test also whether floorl can be
67708         used as a function pointer.
67709         * lib/math.in.h (floorl): Undefine if it is not declared as a function.
67711 2012-02-24  Bruno Haible  <bruno@clisp.org>
67713         ceilf: Provide function definition on MSVC.
67714         * m4/ceilf.m4 (gl_FUNC_CEILF_LIBS): Test also whether ceilf can be
67715         used as a function pointer.
67716         * lib/math.in.h (ceilf): Undefine if it is not declared as a function.
67718 2012-02-24  Bruno Haible  <bruno@clisp.org>
67720         floorf: Provide function definition on MSVC.
67721         * m4/floorf.m4 (gl_FUNC_FLOORF_LIBS): Test also whether floorf can be
67722         used as a function pointer.
67723         * lib/math.in.h (floorf): Undefine if it is not declared as a function.
67725 2012-02-24  Paul Eggert  <eggert@cs.ucla.edu>
67727         stdnoreturn: new module
67728         This implements a replacement for C11's <stdnoreturn.h>.
67729         * doc/gnulib.texi (Header File Substitutes): Add stdnoreturn.
67730         * doc/posix-headers/stdnoreturn.texi, lib/stdnoreturn.in.h:
67731         * m4/stdnoreturn.m4, modules/stdnoreturn, modules/stdnoreturn-tests:
67732         * tests/test-stdnoreturn.c: New files.
67734 2012-02-24  Stanislav Brabec  <sbrabec@suse.cz>  (tiny change)
67736         regex: fix false multibyte matches in some regular expressions
67737         See <http://sourceware.org/bugzilla/show_bug.cgi?id=13637>
67738         and <http://sourceware.org/ml/libc-alpha/2012-02/msg00521.html>.
67739         * lib/regex_internal.c (re_string_skip_chars):
67740         Fix miscomputation of remain_len that may cause incomplete
67741         multi-byte character and false match.
67743 2012-02-24  Jim Meyering  <meyering@redhat.com>
67745         maint.mk: tell sc_prohibit_strcmp to ding "0 == strcmp (...)", too
67746         * top/maint.mk (sc_prohibit_strcmp): Also prohibit uses of strcmp
67747         uses with "==" *before* the call, e.g., 0 == strcmp (...)
67748         Remove now-unnecessary str''cmp obfuscation.
67749         Suggested by Akim Demaille.
67751 2012-02-24  Bruno Haible  <bruno@clisp.org>
67753         streq: Rename macro.
67754         * lib/streq.h (STREQ_OPT): Renamed from STREQ.
67755         * NEWS: Mention the change.
67756         * lib/mbrtowc.c (mbrtowc): Update.
67757         * lib/uniwidth/cjk.h (is_cjk_encoding): Update.
67758         * lib/wcwidth.c (wcwidth): Update.
67759         Suggested by Akim Demaille and Jim Meyering.
67761 2012-02-20  Paul Eggert  <eggert@cs.ucla.edu>
67763         regex: fix typo in definition of MIN
67764         * lib/regex_internal.h (MIN): Fix typo.  Problem reported by Thomas
67765         Schwinge in <http://sourceware.org/bugzilla/show_bug.cgi?id=11638#c4>.
67767 2012-02-19  Paul Eggert  <eggert@cs.ucla.edu>
67768             Bruno Haible  <bruno@clisp.org>
67770         acl: Don't use ACL_CNT and similar ops, since they are unreliable.
67771         * lib/file-has-acl.c (file_has_acl) [HP-UX, NonStop Kernel]: Read the
67772         entries into a stack-allocated buffer directly.
67773         * lib/copy-acl.c (qcopy_acl) [HP-UX, NonStop Kernel]: Likewise.
67775 2012-02-19  Paul Eggert  <eggert@cs.ucla.edu>
67776             Bruno Haible  <bruno@clisp.org>
67778         acl: Don't use GETACLCNT and similar ops, since they are unreliable.
67780          - There were several instances of this pattern:
67782              for (;;) {
67783                n = acl (f, GETACLCNT, 0, NULL);
67784                [ allocate an array A of size N ]
67785                if (acl (f, GETACL, n, a) == n)
67786                  break;
67787              }
67789            This loop might never terminate if some other process is constantly
67790            manipulating the file's ACL.  The loop should be rewritten to
67791            terminate.
67793          - The acl (... GETACLNT ...) call is merely an optimization; its value
67794            is merely a hint as to how big to make the array.  A better
67795            optimization is to avoid the acl (... GETACLNT ...)  call entirely,
67796            and just guess a reasonably-big size, growing the size and trying
67797            again if it's not large enough.  This guarantees termination, and
67798            saves a system call.
67800         * lib/acl-internal.h: Include <limits.h>.
67801         (MIN, SIZE_MAX): New macros.
67802         * lib/file-has-acl.c (file_has_acl) [Solaris]: Read the entries into
67803         a stack-allocated buffer, and use malloc if it does not fit. Don't
67804         use GETACLCNT.
67805         * lib/set-mode-acl.c (qset_acl) [Solaris]: Likewise.
67807 2012-02-19  Bruno Haible  <bruno@clisp.org>
67809         acl: Fix endless loop on Solaris with vxfs.
67810         * lib/file-has-acl.c (file_has_acl) [Solaris]: Treat a failing
67811         acl()/facl() call for ACE_GETACL like a failing call for ACE_GETACLCNT.
67812         * lib/set-mode-acl.c (qset_acl) [Solaris]: Likewise.
67813         * lib/copy-acl.c (qcopy_acl)[Solaris]: Likewise.
67814         * tests/test-sameacls.c (main)[Solaris]: Likewise.
67815         Reported by Bill Jones in
67816         <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10639>, via Paul Eggert.
67818 2012-02-19  Bruno Haible  <bruno@clisp.org>
67820         acl: Fix copy-acl test failure on Solaris 11.0.
67821         * lib/file-has-acl.c (NEW_ACE_WRITEA_DATA): New macro.
67822         (acl_ace_nontrivial): Relax the restrictions on access_masks[] so
67823         that this function returns 0 in some more cases.
67825 2012-02-19  Bruno Haible  <bruno@clisp.org>
67827         acl: Update doc references.
67828         * doc/acl-resources.txt: Update links to Solaris documentation.
67830 2012-02-19  Bruno Haible  <bruno@clisp.org>
67832         Fix test failure in many locales on Solaris 11.
67833         * tests/test-pipe-filter-gi1.c (main): Don't use range expression in
67834         'tr' arguments.
67835         * tests/test-pipe-filter-ii1.c (main): Likewise.
67836         * build-aux/bootstrap (check_versions): Run 'tr' command with range
67837         expressions in the C locale.
67838         * m4/fnmatch.m4 (gl_FUNC_FNMATCH_POSIX): Likewise.
67839         * m4/host-os.m4 (gl_HOST_OS): Likewise.
67841 2012-02-19  Bruno Haible  <bruno@clisp.org>
67843         gnulib-tool: Improve usage message.
67844         * gnulib-tool (func_usage): Move doc of --help and --version to the
67845         section "Operation modes".
67847 2012-02-18  Reuben Thomas  <rrt@sc3d.org>
67849         README-release: make it easier to execute commands
67850         * top/README-release: break commands out on to separate lines.
67852 2012-02-16  Stefano Lattarini  <stefano.lattarini@gmail.com>
67854         GNUmakefile: simplify detection of unconfigured trees
67855         * top/GNUmakefile: Use $(wildcard) instead of $(shell) to determine
67856         whether the tree make is being run from is already configured or
67857         not.  Related simplifications.
67859 2012-02-13  Simon Josefsson  <simon@josefsson.org>
67861         * gnulib-tool (func_usage): Document --help and --version.
67863 2012-02-11  Jim Meyering  <meyering@redhat.com>
67865         bootstrap: don't exit 0 upon gnulib-tool failure
67866         * build-aux/bootstrap (gnulib_tool): If gnulib-tool fails, exit with
67867         its exit status, not 0.
67869 2011-12-19  Reuben Thomas  <rrt@sc3d.org>
67871         README-release: various improvements
67872         * top/README-release: Give a command to push changes for the
67873         release.  Add "distcheck" to list of other pre-release checks.
67874         Fix instance of "make stable" which should be "make TYPE".
67876 2012-02-09  Paul Eggert  <eggert@cs.ucla.edu>
67878         maint: replace FSF snail-mail addresses with URLs
67879         * config/argz.mk, lib/accept4.c, lib/alignof.h, lib/alloca.in.h:
67880         * lib/alphasort.c, lib/arcfour.c, lib/arcfour.h, lib/arctwo.c:
67881         * lib/arctwo.h, lib/argz.c, lib/arpa_inet.in.h, lib/asnprintf.c:
67882         * lib/asprintf.c, lib/assert.in.h, lib/base32.c, lib/base32.h:
67883         * lib/base64.c, lib/base64.h, lib/c-ctype.c, lib/c-ctype.h:
67884         * lib/c-strcase.h, lib/c-strcasecmp.c, lib/c-strncasecmp.c:
67885         * lib/check-version.c, lib/check-version.h, lib/config.charset:
67886         * lib/ctype.in.h, lib/des.c, lib/des.h, lib/dup3.c, lib/errno.in.h:
67887         * lib/float+.h, lib/fnmatch.c, lib/fnmatch.in.h, lib/fnmatch_loop.c:
67888         * lib/fseeko.c, lib/gai_strerror.c, lib/gc-gnulib.c:
67889         * lib/gc-libgcrypt.c, lib/gc-pbkdf2-sha1.c, lib/gc.h:
67890         * lib/getaddrinfo.c, lib/getdelim.c, lib/getfilecon.c, lib/getline.c:
67891         * lib/getlogin_r.c, lib/getpass.c, lib/getpass.h, lib/gettext.h:
67892         * lib/gettimeofday.c, lib/glob.in.h, lib/glthread/cond.c:
67893         * lib/glthread/cond.h, lib/glthread/lock.c, lib/glthread/lock.h:
67894         * lib/glthread/thread.c, lib/glthread/thread.h:
67895         * lib/glthread/threadlib.c, lib/glthread/yield.h, lib/hmac-md5.c:
67896         * lib/hmac-sha1.c, lib/hmac.h, lib/iconv.c, lib/iconv.in.h:
67897         * lib/iconv_close.c, lib/iconv_open.c, lib/inet_ntop.c, lib/isfinite.c:
67898         * lib/isinf.c, lib/iswblank.c, lib/langinfo.in.h, lib/link.c:
67899         * lib/localcharset.c, lib/localcharset.h, lib/lseek.c, lib/malloc.c:
67900         * lib/malloca.c, lib/malloca.h, lib/md2.c, lib/md2.h, lib/md4.c:
67901         * lib/md4.h, lib/md5.c, lib/md5.h, lib/memmem.c, lib/mempcpy.c:
67902         * lib/memset.c, lib/memxor.c, lib/memxor.h, lib/minmax.h, lib/mktime.c:
67903         * lib/msvc-inval.c, lib/msvc-inval.h, lib/msvc-nothrow.c:
67904         * lib/msvc-nothrow.h, lib/netdb.in.h, lib/netinet_in.in.h, lib/nproc.c:
67905         * lib/nproc.h, lib/obstack_printf.c, lib/pathmax.h, lib/pipe.c:
67906         * lib/pipe2.c, lib/poll.c, lib/poll.in.h, lib/printf-args.c:
67907         * lib/printf-args.h, lib/printf-parse.c, lib/printf-parse.h:
67908         * lib/pselect.c, lib/pthread.in.h, lib/pty-private.h, lib/pty.in.h:
67909         * lib/read-file.c, lib/read-file.h, lib/ref-add.sin, lib/ref-del.sin:
67910         * lib/regcomp.c, lib/regex.c, lib/regex.h, lib/regex_internal.c:
67911         * lib/regex_internal.h, lib/regexec.c, lib/rijndael-alg-fst.c:
67912         * lib/rijndael-alg-fst.h, lib/rijndael-api-fst.c:
67913         * lib/rijndael-api-fst.h, lib/rint.c, lib/rintf.c, lib/rintl.c:
67914         * lib/round.c, lib/roundf.c, lib/roundl.c, lib/scandir.c, lib/select.c:
67915         * lib/sha1.c, lib/sha1.h, lib/size_max.h, lib/snprintf.c:
67916         * lib/stdalign.in.h, lib/stdarg.in.h, lib/stdbool.in.h:
67917         * lib/stddef.in.h, lib/stdint.in.h, lib/stdio.in.h, lib/str-kmp.h:
67918         * lib/str-two-way.h, lib/strcasecmp.c, lib/strcasestr.c, lib/strdup.c:
67919         * lib/striconv.c, lib/striconv.h, lib/string.in.h, lib/strings.in.h:
67920         * lib/strncasecmp.c, lib/strndup.c, lib/strnlen.c, lib/strpbrk.c:
67921         * lib/strptime.c, lib/strsep.c, lib/strstr.c, lib/strverscmp.c:
67922         * lib/sys_file.in.h, lib/sys_ioctl.in.h, lib/sys_select.in.h:
67923         * lib/sys_socket.in.h, lib/sys_stat.in.h, lib/sys_time.in.h:
67924         * lib/sys_times.in.h, lib/sys_types.in.h, lib/sys_uio.in.h:
67925         * lib/sys_utsname.in.h, lib/sys_wait.in.h, lib/tcgetsid.c:
67926         * lib/termios.in.h, lib/time.in.h, lib/time_r.c, lib/timegm.c:
67927         * lib/times.c, lib/unictype/3level.h, lib/unictype/3levelbit.h:
67928         * lib/unistd.in.h, lib/vasnprintf.c, lib/vasnprintf.h, lib/vasprintf.c:
67929         * lib/vsnprintf.c, lib/waitpid.c, lib/wchar.in.h, lib/wctype.in.h:
67930         * lib/xsize.h, tests/test-closein.c, tests/test-des.c:
67931         * tests/test-fclose.c, tests/test-fgetc.c, tests/test-filevercmp.c:
67932         * tests/test-fputc.c, tests/test-fread.c, tests/test-fwrite.c:
67933         * tests/test-gc-arcfour.c, tests/test-gc-arctwo.c, tests/test-gc-des.c:
67934         * tests/test-gc-hmac-md5.c, tests/test-gc-hmac-sha1.c:
67935         * tests/test-gc-md2.c, tests/test-gc-md4.c, tests/test-gc-md5.c:
67936         * tests/test-gc-pbkdf2-sha1.c, tests/test-gc-rijndael.c:
67937         * tests/test-gc-sha1.c, tests/test-gc.c, tests/test-getdelim.c:
67938         * tests/test-getline.c, tests/test-getndelim2.c, tests/test-md2.c:
67939         * tests/test-md4.c, tests/test-parse-datetime.c, tests/test-perror.c:
67940         * tests/test-perror2.c, tests/test-pipe.c, tests/test-pipe2.c:
67941         * tests/test-poll.c, tests/test-quotearg-simple.c:
67942         * tests/test-quotearg.c, tests/test-quotearg.h:
67943         * tests/test-round-ieee.c, tests/test-round1.c:
67944         * tests/test-roundf-ieee.c, tests/test-roundf1.c:
67945         * tests/test-roundl-ieee.c, tests/test-roundl.c:
67946         * tests/test-safe-alloc.c, tests/test-sigpipe.c:
67947         * tests/test-spawn-pipe-child.c, tests/test-spawn-pipe-main.c:
67948         * tests/test-strerror.c, tests/test-strerror_r.c:
67949         * tests/test-strsignal.c, tests/test-strverscmp.c:
67950         * tests/test-xmemdup0.c:
67951         Replace FSF snail mail addresses with URLs, as per GNU coding
67952         standards.  See glibc bug
67953         <http://sourceware.org/bugzilla/show_bug.cgi?id=13673>.
67955 2011-12-22  Reuben Thomas  <rrt@sc3d.org>
67957         README-release: capitalize a word and split a line
67958         * top/README-release: Fix punctuation and spacing.
67960 2012-02-08  Akim Demaille  <demaille@gostai.com>
67962         fatal-signal: use C prototypes (with explicit void).
67963         * lib/fatal-signal.c (uninstall_handlers, install_handlers)
67964         (init_fatal_signal_set, block_fatal_signals): Fix signatures.
67966 2012-02-07  Paul Eggert  <eggert@cs.ucla.edu>
67968         regex: spelling fix
67969         * lib/regexec.c: spelling fix
67971         regex: rely on stdint.h for SIZE_MAX
67972         * lib/regex_internal.h (SIZE_MAX): Remove; stdint.h supplies this now.
67974 2012-02-07  Paul Eggert  <eggert@cs.ucla.edu>
67976         regex: merge glibc changes
67978         * lib/regcomp.c (init_dfa): Tighten overflow checks to test
67979         for IDX_MAX too, since IDX_MAX can be much less than SIZE_MAX.
67980         (init_word_char): Work even if bitset words are not exactly 32 or
67981         64 bits wide.  Don't assume there are no padding bits.
67982         * lib/regex.c [_LIBC]: Do not include <config.h>.
67983         [!_LIBC]: Add pragmas to ignore -Wsuggest-attributes=pure
67984         and -Wtype-limits.
67985         * lib/regex.h (__USE_GNU): Renamed from __USE_GNU_REGEX, to avoid
67986         needless disagreement with glibc.  All uses changed.  Define it to
67987         1 only if _GNU_SOURCE, to match glibc.
67988         (_REG_RM_NAME): Remove; no longer needed, since the names in
67989         question are now all protected by __USE_GNU.
67990         (_REG_RE_NAME): Remove; replaced by glibc's __REPB_PREFIX.
67991         (REG_TRANSLATE_TYPE): Remove; replaced by glibc's __RE_TRANSLATE_TYPE.
67992         * lib/regex_internal.h (MIN): New macro.
67994         2012-01-03 Ulrich Drepper <drepper@gmail.com>
67995         * lib/regcomp.c (init_word_char): Optimize regex a bit.
67997         2011-12-30 Jakub Jelinek <jakub@redhat.com>
67998         * lib/regex_internal.c (re_string_fetch_byte_case):
67999         Fix up regcomp/regexec.  The problem is that parse_bracket_symbol
68000         is miscompiled, and it turns out it is because of an incorrect
68001         attribute on re_string_fetch_byte_case.  Unlike
68002         re_string_peek_byte_case, this one is really not pure, it modifies
68003         memory (increments pstr->cur_idx), and with the pure attribute GCC
68004         assumed it doesn't and it cached the presumed value of
68005         regexp->cur_idx in a variable across the
68006          for (;; ++i)
68007            {
68008              if (i >= BRACKET_NAME_BUF_SIZE)
68009                return REG_EBRACK;
68010              if (token->type == OP_OPEN_CHAR_CLASS)
68011                ch = re_string_fetch_byte_case (regexp);
68012              else
68013                ch = re_string_fetch_byte (regexp);
68014              if (re_string_eoi(regexp))
68015                return REG_EBRACK;
68016              if (ch == delim && re_string_peek_byte (regexp, 0) == ']')
68017                break;
68018              elem->opr.name[i] = ch;
68019            }
68021         2011-11-29 Andreas Schwab <schwab@redhat.com>
68022         * lib/regcomp.c (build_equiv_class):
68023         Fix access after end of search string in regex matcher.
68025         2011-11-12 Ulrich Drepper <drepper@redhat.com>
68026         * lib/regex_internal.c, lib/regex_internal.h: Fix warnings in regex.
68028         2011-10-12 Ulrich Drepper <drepper@redhat.com>
68029         * lib/regcomp.c (parse_branch): One more regex memory leak fixed.
68031         2011-10-11 Ulrich Drepper <drepper@redhat.com>
68032         * lib/regcomp.c (parse_branch, parse_sub_exp):
68033         More regex memory leak fixes and tests.
68034         (parse_sub_exp, parse_bracket_exp):
68035         Fix memory leak for some invalid regular expressions.
68037         2011-05-28 Ulrich Drepper <drepper@gmail.com>
68038         * lib/regex_internal.c, lib/regexec.c:
68039         Fix unnecessary overallocation due to incomplete character.  When
68040         incomplete characters are found at the end of a string the code
68041         ran amok and allocated lots of memory.  Stricter limits are now in
68042         place.
68044         2011-05-20 Reuben Thomas <rrt@sc3d.org>
68045         * lib/regex.h: Update documentation.
68047         2011-05-16 Aharon Robbins <arnold@skeeve.com>
68048         * lib/regex.h: Update RE_SYNTAX*_AWK constants.
68050         2010-05-05 Andreas Schwab <schwab@redhat.com>
68051         * lib/regexec.c (find_collation_sequence_value):
68052         Fix lookup of collation sequence value during regexp matching.
68054         2010-01-22 Ulrich Drepper <drepper@redhat.com>
68055         * lib/regex_internal.c (re_dfa_add_node): Extend overflow detection.
68057         2008-01-16 Ulrich Drepper <drepper@redhat.com>
68058         * lib/regex.h: Cleanup namespace.
68060         2007-11-26 Ulrich Drepper <drepper@redhat.com>
68061         * lib/regex.h (REG_ENOSYS): Define REG_ENOSYS also for __USE_XOPEN2K.
68063         2007-08-26 Ulrich Drepper <drepper@redhat.com>
68064         * lib/regex_internal.h: Prevent some declarations and definitions
68065         to be seen when used in tests.
68067         2005-05-06 Ulrich Drepper <drepper@redhat.com>
68068         * lib/regex_internal.h: Include bits/libc-lock.h or define dummy
68069         __libc_lock_* macros if not _LIBC.
68070         (struct re_dfa_t): Add lock.
68072 2012-02-07  Eric Blake  <eblake@redhat.com>
68074         maint.mk: also prohibit lower-case @var@
68075         * top/maint.mk (sc_makefile_at_at_check): Enhance check to cover
68076         lower case, like @top_srcdir@.
68078 2012-02-04  Eric Blake  <eblake@redhat.com>
68080         canonicalize: avoid uninitialized memory use
68081         * lib/canonicalize-lgpl.c (__realpath): Avoid possibility of
68082         random '/' left in dest.
68083         * lib/canonicalize.c (canonicalize_filename_mode): Likewise.
68085 2012-02-04  Bruno Haible  <bruno@clisp.org>
68087         isatty: Fix test failure of ptsname_r on native Windows.
68088         * lib/isatty.c (_isatty_nothrow): Upon exception, return 0, not -1,
68089         and don't set errno.
68090         (isatty): Test first whether fd is valid. Set errno when returning 0.
68092 2012-02-04  Bruno Haible  <bruno@clisp.org>
68094         spawn-pipe tests: Fix a NULL program name in a diagnostic.
68095         * tests/test-spawn-pipe-main.c: Include progname.h.
68096         (main): Invoke set_program_name.
68097         * modules/spawn-pipe-tests (Depends-on): Add progname.
68099         nonblocking-socket tests: Fix a NULL program name in a diagnostic.
68100         * tests/test-nonblocking-socket-main.c: Include progname.h.
68101         (main): Invoke set_program_name.
68102         * modules/nonblocking-socket-tests (Depends-on): Add progname.
68104         nonblocking-pipe tests: Fix a NULL program name in a diagnostic.
68105         * tests/test-nonblocking-pipe-main.c: Include progname.h.
68106         (main): Invoke set_program_name.
68107         * modules/nonblocking-pipe-tests (Depends-on): Add progname.
68109 2012-02-04  Eric Blake  <eblake@redhat.com>
68111         canonicalize-lgpl: fix // handling
68112         * lib/canonicalize-lgpl.c (__realpath): Don't convert /// to //.
68114         canonicalize: fix // handling
68115         * lib/canonicalize.c (canonicalize_filename_mode): Don't convert
68116         /// to //, since only // is special.
68118 2012-02-04  Bruno Haible  <bruno@clisp.org>
68120         ioctl: Fix test failure on native Windows.
68121         * lib/ioctl.c: Include msvc-nothrow.h.
68122         (primary_ioctl): If fd is not a valid handle, set errno to EBADF.
68124 2012-02-04  Bruno Haible  <bruno@clisp.org>
68126         fsync: Avoid test failure on native Windows.
68127         * lib/fsync.c (fsync) [Windows]: Don't fail if the handle is merely
68128         read-only.
68130 2012-02-04  Bruno Haible  <bruno@clisp.org>
68132         sys_select: Avoid syntax error on OpenBSD 5.0.
68133         * lib/sys_select.in.h [OpenBSD]: When /usr/include/pthread.h is
68134         currently being included, just include the system's <sys/select.h>.
68136 2012-02-04  Bruno Haible  <bruno@clisp.org>
68138         sys_select: Avoid syntax error on OpenBSD 5.0.
68139         * lib/sys_select.in.h: Include <signal.h> only after the include_next
68140         <sys/select.h>, not before.
68141         Reported by Jiri B <jirib@devio.us>.
68143 2012-02-04  Bruno Haible  <bruno@clisp.org>
68145         get-rusage-as, get-rusage-data tests: Avoid test failure with gcc-4.7.
68146         * tests/test-get-rusage-as.c (main): Assign the malloc() results to
68147         global variables.
68148         * tests/test-get-rusage-data.c (main): Likewise.
68149         Reported by Jim Meyering.
68151 2012-02-04  Bruno Haible  <bruno@clisp.org>
68153         stdioext: Fix last commit.
68154         * lib/fwritable.c [EPLAN9]: Include <fcntl.h>.
68156 2012-02-03  Bruno Haible  <bruno@clisp.org>
68158         stdioext: Add tentative support for Plan9.
68159         * lib/stdio-impl.h: Include <errno.h>.
68160         * lib/fseterr.c (fseterr) [EPLAN9]: Add conditional code.
68161         * lib/freadable.c (freadable): Likewise.
68162         * lib/fwritable.c (fwritable): Likewise.
68163         * lib/fbufmode.c (fbufmode): Likewise.
68164         * lib/freading.c (freading): Likewise.
68165         * lib/fwriting.c (fwriting): Likewise.
68166         * lib/freadptr.c (freadptr): Likewise.
68167         * lib/freadseek.c (freadptrinc): Likewise.
68168         * lib/freadahead.c (freadahead): Likewise.
68169         * lib/fpurge.c (fpurge): Likewise.
68170         * lib/fseeko.c (rpl_fseeko): Likewise.
68171         * m4/fpending.m4 (gl_PREREQ_FPENDING): Add a variant for Plan9.
68172         Reported by Jens Staal <staal1978@gmail.com>.
68174 2012-02-02  Jim Meyering  <meyering@redhat.com>
68176         file-has-acl: suppress a warning from gcc -Wsuggest-attribute=const
68177         * lib/file-has-acl.c (file_has_acl): This function (for some #ifdefs)
68178         would evoke a new gcc warning.  Given all of the #ifdefs, it is better
68179         not even to try to add the attribute.  Instead, add a pragma to suppress
68180         the suggestion/warning.
68182 2012-01-31  Karl Berry  <karl@gnu.org>
68184         setstate doc: typo.
68185         * doc/posix-functions/setstate.texi (setstate): { not (.
68187 2012-01-31  Bruno Haible  <bruno@clisp.org>
68189         popen: Make more robust on Windows.
68190         * lib/popen.c: On native Windows, use the _popen based code even if
68191         HAVE_POPEN is set.
68192         * doc/posix-functions/popen.texi: Mention necessity of COMSPEC
68193         environment variable on native Windows.
68195 2012-01-30  Bruno Haible  <bruno@clisp.org>
68197         pclose: Fix typo.
68198         * lib/stdio.in.h (pclose): Fix typo in warning message.
68200 2012-01-30  Bruno Haible  <bruno@clisp.org>
68202         doc about getlogin_r, setstate.
68203         * doc/posix-functions/getlogin_r.texi: List the incompatible
68204         declaration problem under "not fixed by gnulib".
68205         * doc/posix-functions/setstate.texi: Mention incompatible declaration
68206         problem on Solaris 11 and other platforms.
68208 2012-01-30  Chuanchang Jia  <chuanchang.jia@gmail.com>  (tiny change)
68209             Bruno Haible  <bruno@clisp.org>
68211         poll tests: Make test more robust.
68212         * tests/test-poll.c: Include macros.h.
68213         (test_accept_first, test_pair, test_socket_pair, test_pipe): Verify
68214         return value of various I/O operations.
68215         * modules/poll-tests (Files): Add tests/macros.h.
68217 2012-01-30  Bruno Haible  <bruno@clisp.org>
68219         sys_stat: Fix support for mingw64 and MSVC.
68220         * lib/sys_stat.in.h (stat) [AIX]: Don't redefine 'stat' if the system
68221         header files already do it.
68222         (stat) [mingw, msvc]: Redefine the symbol to which stat is defined, not
68223         stat itself.
68224         Reported by Marc-André Lureau <marcandre.lureau@redhat.com>.
68226 2012-01-30  Bruno Haible  <bruno@clisp.org>
68228         wcwidth: Work around bug in UTF-8 locale on OpenBSD 5.0.
68229         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Test also wcwidth of U+05B0.
68230         * doc/posix-functions/wcwidth.texi: Mention the OpenBSD 5.0 bug.
68232 2012-01-29  Bruno Haible  <bruno@clisp.org>
68234         quotearg: Fix test failure on MacOS X 10.5.
68235         * tests/test-quotearg-simple.c: Include localcharset.h.
68236         (main): If the locale encoding is not ASCII, bypass the tests of
68237         locale_quoting_style and clocale_quoting_style.
68238         * modules/quotearg-tests (Depends-on): Add 'localcharset'.
68240 2012-01-29  Jim Meyering  <meyering@redhat.com>
68242         maint.mk: sc_prohibit_canonicalize_without_use: avoid false positive
68243         * top/maint.mk (sc_prohibit_canonicalize_without_use): Also
68244         detect uses of canonicalize_file_name.
68246 2012-01-28  Bruno Haible  <bruno@clisp.org>
68248         test-framework-sh: Fix test failure with AIX 7.1 diff.
68249         * tests/init.sh (compare_): Don't use 'diff -u' if it inserts a space
68250         in column 1, like 'diff -c' does.
68251         * tests/test-init.sh (test_compare): Don't repeat the test from init.sh
68252         whether 'diff -u' is used. Instead, test whether the output contains
68253         some '@' character.
68255 2012-01-28  Paul Eggert  <eggert@cs.ucla.edu>
68257         strtoimax: eliminate need for stdint.h, inttypes.h checks
68258         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Don't use
68259         gl_AC_HEADER_STDINT_H or gl_AC_HEADER_INTTYPES_H.  This reduces
68260         the prerequisites for a recently-introduced strtoimax test.
68261         I guess this might cause strtoimax to be replaced when not
68262         strictly necessary on older hosts, but this shouldn't introduce
68263         any bugs and it should make Emacs 'configure' faster on typical
68264         modern hosts.  Problem discovered when importing the latest gnulib
68265         to an Emacs test version.
68266         * modules/strtoimax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4.
68268 2012-01-28  Bruno Haible  <bruno@clisp.org>
68270         sys_time: Override 'struct timeval' on some native Windows platforms.
68271         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Test whether tv_sec
68272         has the right type. Set REPLACE_STRUCT_TIMEVAL if not.
68273         (gl_HEADER_SYS_TIME_H_DEFAULTS): Initialize REPLACE_STRUCT_TIMEVAL.
68274         * lib/sys_time.in.h: Include <winsock2.h> also when 'struct timeval'
68275         needs to be overridden.
68276         (timeval): Override if REPLACE_STRUCT_TIMEVAL is set.
68277         * modules/sys_time (Makefile.am): Substitute REPLACE_STRUCT_TIMEVAL.
68278         * tests/test-sys_select.c: Check that the tv_sec member has the same
68279         size as a 'time_t'.
68280         * tests/test-sys_time.c: Likewise.
68281         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): If REPLACE_STRUCT_TIMEVAL
68282         is set, set also REPLACE_GETTIMEOFDAY.
68283         * lib/gettimeofday.c (gettimeofday): If 'struct timeval' is overridden,
68284         convert the resulting 'struct timeval' before returning.
68285         * lib/select.c: Include <sys/time.h>.
68286         (select, timeval): Undefine at the right place.
68287         * modules/select (Depends-on): Add sys_time.
68288         * doc/posix-headers/sys_time.texi: Mention the problem with tv_sec on
68289         some Windows platforms.
68290         Reported by Marc-André Lureau <marcandre.lureau@redhat.com>.
68292 2012-01-28  Marc-André Lureau  <marcandre.lureau@redhat.com>  (tiny change)
68294         accept4, fcntl, socket modules: Avoid warnings on x86_64 mingw64.
68295         * lib/accept4.c (accept4): Use intptr_t to convert handle pointer to
68296         an integer.
68297         * lib/fcntl.c (dupfd): Likewise.
68298         * lib/w32sock.h (SOCKET_TO_FD): Likewise.
68300 2012-01-28  Bruno Haible  <bruno@clisp.org>
68302         fcntl: Avoid compilation error on native Windows.
68303         * modules/fcntl (Depends-on): Add 'close'.
68305 2012-01-28  Marc-André Lureau  <marcandre.lureau@redhat.com>  (tiny change)
68307         select, poll, isatty: Avoid warnings on x86_64 mingw64.
68308         * lib/select.c (IsConsoleHandle): Use intptr_t to convert handle
68309         pointer to an integer.
68310         * lib/poll.c (IsConsoleHandle): Likewise.
68311         * lib/isatty.c (IsConsoleHandle): Likewise.
68313 2012-01-28  Jim Meyering  <meyering@redhat.com>
68315         doc: clarify README-release
68316         * top/README-release: Clarify: you should make a point to have
68317         the latest stable versions of build tools in your PATH, and the
68318         reference to buildreq is solely for its list of tool names, not
68319         for its minimal-functional version numbers.
68320         Prompted by discussion with Reuben Thomas and Gary V. Vaughan.
68322         maint.mk: use more readable (yet functionally equivalent) quoting
68323         It is common to quote a single quote in a single quoted string like
68324         this:  '...'\''...'.  Unless you know the idiom, that looks like
68325         gibberish, so prefer to double-quote the string when possible.
68326         Then you can use a more readable, lone single quote: "...'..."
68327         * top/maint.mk (sc_cast_of_argument_to_free): Quoting like this
68328         "don't" is more readable than the equivalent 'don'\''t'.
68329         (sc_cast_of_x_alloc_return_value): Likewise.
68330         (sc_cast_of_alloca_return_value): Likewise.
68331         (sc_makefile_path_separator_check): Similar: use ":" in '...',
68332         rather than '\'':'\''.
68334 2012-01-27  Paul Eggert  <eggert@cs.ucla.edu>
68336         stdalign: relax _Alignof and tighten _Alignas test
68337         * m4/stdalign.m4 (gl_STDALIGN_H): Relax the _Alignof test,
68338         as it was too strict: alignof must divide offsetof, but it need
68339         not equal offsetof.  Inspired by Joseph S. Myers's comment
68340         <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023#c10>.
68341         Conversely, tighten the _Alignas test a bit, as the resulting
68342         alignment must be exactly 8.
68344 2012-01-27  Bruno Haible  <bruno@clisp.org>
68346         stdalign: Document the last change.
68347         * doc/posix-headers/stdalign.texi: Mention GCC bug 52023.
68349 2012-01-27  Paul Eggert  <eggert@cs.ucla.edu>
68351         stdalign: check that alignof and offsetof are consistent
68352         * m4/stdalign.m4 (gl_STDALIGN_H): Check for GCC bug 52023.
68353         Problem reported for gnulib by Richard W.M. Jones in
68354         <http://lists.gnu.org/r/bug-gnulib/2012-01/msg00340.html>.
68356 2012-01-27  Jim Meyering  <meyering@redhat.com>
68358         update-copyright: accept new option: UPDATE_COPYRIGHT_USE_INTERVALS=2
68359         * build-aux/update-copyright: When UPDATE_COPYRIGHT_USE_INTERVALS=2,
68360         convert a sequence with gaps to the minimal containing range.
68361         For example, convert 2000, 2004-2007, 2009 to 2000-2009.
68362         * tests/test-update-copyright.sh: Test for this.
68363         The FSF confirmed it is ok to do this, assuming there is at
68364         least one significant change per year in the affected range:
68365         http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/29554/focus=29860
68367 2012-01-26  Bruno Haible  <bruno@clisp.org>
68369         pipe2: refine doc about thread-safety
68370         * doc/glibc-functions/pipe2.texi: Clarify the extent of the
68371         multithread-safety problem.
68372         * doc/glibc-functions/accept4.texi: Likewise.
68374 2012-01-26  Bruno Haible  <bruno@clisp.org>
68376         posix_spawn_file_actions_addopen: Fix 2012-01-08 commit.
68377         * m4/posix_spawn.m4 (gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN):
68378         In the test program, include <fcntl.h>, for O_RDONLY.
68380 2012-01-26  Eric Blake  <eblake@redhat.com>
68382         pipe2: document lack of thread-safety in replacement
68383         * doc/glibc-functions/pipe2.texi (pipe2): Mention thread safety
68384         issue in replacement.
68385         * doc/glibc-functions/accept4.texi (accept4): Likewise.
68386         Based on a report by Eric Wong.
68388 2012-01-24  Marc-André Lureau  <marcandre.lureau@redhat.com>  (tiny change)
68389             Bruno Haible  <bruno@clisp.org>
68391         malloca: Avoid warnings on x86_64 mingw64.
68392         * lib/malloca.c: Include <stdint.h>.
68393         (mmalloca, freea): Use uintptr_t to convert pointers to integers.
68394         * modules/malloca (Depends-on): Add stdint.
68395         * modules/relocatable-prog-wrapper (Depends-on): Likewise.
68397 2012-01-25  Paul Eggert  <eggert@cs.ucla.edu>
68399         obstack: remove __STDC__ conditionals
68400         * lib/obstack.h: Remove __STDC__ conditionals, as suggested by Joseph
68401         S. Myers in <http://cygwin.com/ml/libc-alpha/2012-01/msg00104.html>.
68402         This leaves lib/localcharset.c, m4/iconv.m4, and a confusing comment in
68403         m4/include_next.m4 as the only gnulib-maintained places that still
68404         refer to __STDC__.
68406 2012-01-24  Bruno Haible  <bruno@clisp.org>
68408         havelib: Modern quoting.
68409         * build-aux/config.rpath: Quote 'like this', not `like this', as per
68410         the recent change to the GNU coding standards.
68412 2012-01-24  Bruno Haible  <bruno@clisp.org>
68414         stdint: Improve support for Android.
68415         * lib/stdint.in.h: Test __ANDROID__, not __BIONIC__.
68416         Reported by Simon Josefsson <simon@josefsson.org>.
68418 2012-01-23  Paul Eggert  <eggert@cs.ucla.edu>
68420         doc: omit trailing empty lines from INSTALL etc.
68421         * doc/Makefile (INSTALL): Omit trailing empty lines.
68422         (INSTALL.ISO, INSTALL.UTF-8): Build from INSTALL, so that these also
68423         omit trailing empty lines.  This simplifies the build procedure.
68425 2012-01-23  Jim Meyering  <meyering@redhat.com>
68427         tests: avoid spurious warnings about gl_sockets_startup
68428         Fedora rawhide's gcc version 4.7.0 20120119 with -Wunused-value
68429         would warn about every use of "gl_sockets_startup (SOCKETS_1_1);"
68430         reporting a "statement with no effect".
68431         * tests/test-accept.c (main): Mark as "(void)".
68432         * tests/test-accept4.c (main): Likewise.
68433         * tests/test-bind.c (main): Likewise.
68434         * tests/test-connect.c (main): Likewise.
68435         * tests/test-getpeername.c (main): Likewise.
68436         * tests/test-getsockname.c (main): Likewise.
68437         * tests/test-getsockopt.c (main): Likewise.
68438         * tests/test-listen.c (main): Likewise.
68439         * tests/test-recv.c (main): Likewise.
68440         * tests/test-recvfrom.c (main): Likewise.
68441         * tests/test-send.c (main): Likewise.
68442         * tests/test-sendto.c (main): Likewise.
68443         * tests/test-setsockopt.c (main): Likewise.
68444         * tests/test-shutdown.c (main): Likewise.
68446 2012-01-21  Bruno Haible  <bruno@clisp.org>
68448         locale-fr.m4: Fix for Android.
68449         * m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): Avoid compilation
68450         failure of the test program on Bionic libc.
68452 2012-01-21  Jim Meyering  <meyering@redhat.com>
68454         bootstrap: fail when bootstrap_post_import_hook fails
68455         Otherwise, it's far too easy to miss diagnostics emitted
68456         between gnulib-tool's output and that of running configure.
68457         * build-aux/bootstrap: Fail when bootstrap_post_import_hook fails.
68459 2012-01-17  Jim Meyering  <meyering@redhat.com>
68461         maint: enable sc_trailing_blank
68462         * build-aux/pmccabe.css: Remove trailing blanks.
68463         * doc/acl-cygwin.txt: Likewise.
68464         * doc/gnu-oids.texi: Likewise
68465         * cfg.mk: Enable sc_trailing_blank.
68466         Exempt build-aux/texinfo.tex and doc/Copyright/assign.future.manual.
68468 2012-01-17  Jim Meyering  <meyering@redhat.com>
68470         maint: enable sc_prohibit_openat_without_use
68471         * cfg.mk: Enable sc_prohibit_openat_without_use.
68472         Exempt lib/selinux-at.c.
68474 2012-01-17  Jim Meyering  <meyering@redhat.com>
68476         maint: enable sc_prohibit_cloexec_without_use
68477         * cfg.mk: Enable sc_prohibit_cloexec_without_use.
68478         * lib/dup-safer-flag.c: Don't include "cloexec.h".  Not needed.
68480 2012-01-17  Jim Meyering  <meyering@redhat.com>
68482         maint: enable sc_prohibit_intprops_without_use
68483         * cfg.mk: Enable sc_prohibit_intprops_without_use
68484         * tests/test-nanosleep.c: Don't include "intprops.h".  Not needed.
68486 2012-01-17  Jim Meyering  <meyering@redhat.com>
68488         maint: enable sc_prohibit_hash_pjw_without_use
68489         * cfg.mk: Enable sc_prohibit_hash_pjw_without_use.
68490         * top/maint.mk (sc_prohibit_hash_pjw_without_use): Adjust regexp
68491         to match any use of \<hash_pjw\>, i.e., not necessarily with a
68492         following " (".
68494 2012-01-17  Jim Meyering  <meyering@redhat.com>
68496         maint: enable double-word-prohibiting rule
68497         * cfg.mk (local-checks-to-skip): Enable sc_prohibit_doubled_word.
68498         Exempt three files.
68500 2012-01-17  Jim Meyering  <meyering@redhat.com>
68502         maint: remove empty lines at EOF, but excluding modules/*
68503         Apply syntax rules at home as well as abroad.  Most changes
68504         were induced by running this:
68505           make srcdir=. _build-aux=build-aux -f top/maint.mk \
68506             sc_prohibit_empty_lines_at_EOF | grep -v modules/ \
68507             | xargs perl -pi -0777 -e 's/\n\n+$/\n/'
68508         * cfg.mk (local-checks-to-skip): Enable sc_prohibit_empty_lines_at_EOF.
68509         Exempt modules/* and two binary files.
68510         Also exempt doc/INSTALL*, per request from Bruno Haible.
68511         * doc/regexprops-generic.texi: *Add* a newline at EOF.  There was none.
68512         * doc/Copyright/assign.translation.manual: Remove empty lines at EOF.
68513         * doc/Copyright/request-assign.future: Likewise.
68514         * doc/Copyright/request-disclaim.changes: Likewise.
68515         * doc/INSTALL: Likewise.
68516         * doc/INSTALL.ISO: Likewise.
68517         * doc/INSTALL.UTF-8: Likewise.
68518         * doc/acl-cygwin.txt: Likewise.
68519         * doc/acl-resources.txt: Likewise.
68520         * doc/fdl-1.2.texi: Likewise.
68521         * doc/fdl-1.3.texi: Likewise.
68522         * doc/fdl.texi: Likewise.
68523         * lib/argp-pin.c: Likewise.
68524         * lib/round.c: Likewise.
68525         * lib/unicase/u16-totitle.c: Likewise.
68526         * lib/unictype/block_test.c: Likewise.
68527         * lib/uninorm/canonical-decomposition.c: Likewise.
68528         * m4/README: Likewise.
68529         * m4/relocatable-lib.m4: Likewise.
68530         * tests/test-isnand-nolibm.c: Likewise.
68531         * tests/test-isnand.c: Likewise.
68532         * tests/uninorm/NormalizationTest.txt: Likewise.
68534 2012-01-17  Jim Meyering  <meyering@redhat.com>
68536         maint: add framework to run syntax-check rules against gnulib sources
68537         * cfg.mk: New file, to disable all currently-failing tests.
68538         We'll enable them one by one, as they are made to pass.
68539         * Makefile (sc_maint): New rule.
68541 2012-01-21  Bruno Haible  <bruno@clisp.org>
68543         stdint: Add support for Android.
68544         * lib/stdint.in.h: When included from Bionic <sys/types.h>, just
68545         include the system's <stdint.h>.
68546         Reported by Simon Josefsson <simon@josefsson.org>.
68548 2012-01-19  Jim Meyering  <meyering@redhat.com>
68550         bootstrap: add bootstrap_post_import_hook
68551         Bison does still need something like the gnulib_mk_hook whose
68552         invocation I had to remove along with slurp in commit 767ccd40.
68553         Technically, we could get along without it, but doing so would
68554         have required living with a warning and a mandatory post-bootstrap
68555         automake rerun.
68556         * build-aux/bootstrap (gnulib_mk_hook): Remove definition, too.
68557         (bootstrap_post_import_hook): New function.
68558         Invoke it after gnulib-tool --import and before autoreconf.
68560 2012-01-18  Jim Meyering  <meyering@redhat.com>
68562         gitlog-to-changelog: don't use "no_"-prefixed variable name
68563         * build-aux/gitlog-to-changelog (main): Use getopt's "!" attribute
68564         to enable both --cluster and --no-cluster.  Change variable name,
68565         s/\$no_cluster/$cluster/, and reverse usage to match.
68567         gitlog-to-changelog: use "||", not "or" in expressions
68568         * build-aux/gitlog-to-changelog (main): Use "||", not "or" in
68569         expressions.
68571 2012-01-17  Joel E. Denny  <joeldenny@joeldenny.org>
68573         gitlog-to-changelog: new option --no-cluster
68574         * build-aux/gitlog-to-changelog: New option --no-cluster, disables
68575         clustering of adjacent commit messages.
68577 2012-01-17  Jim Meyering  <meyering@redhat.com>
68579         maint: spell file systems with two words, not one
68580         * m4/ls-mntd-fs.m4 (MOUNTED_INTERIX_STATVFS): Spell file systems with
68581         two words, not one.
68583 2012-01-16  Jim Meyering  <meyering@redhat.com>
68585         bootstrap: add a FIXME comment to ensure we eventually remove the hack
68586         * build-aux/bootstrap (gnulib_tool_options): Add comment.
68588 2012-01-16  Eric Blake  <eblake@redhat.com>
68590         bootstrap: cater to autoconf 2.59
68591         * build-aux/bootstrap (AUTORECONF): Work even when --no-recursive
68592         is not available.
68594         bootstrap: properly check for libtool
68595         * build-aux/bootstrap (libtoolize): Also run libtool when older
68596         usage is detected.
68598 2012-01-15  Bruno Haible  <bruno@clisp.org>
68600         Improve support for MSVC 9.
68601         * lib/unistd.in.h: Include <io.h> when needed to avoid redefinition
68602         clashes on MSVC.
68603         * lib/fcntl.in.h: Likewise.
68604         * lib/stdlib.in.h: Likewise.
68605         * lib/sys_stat.in.h: Likewise.
68607 2011-01-15  Stefano Lattarini  <stefano.lattarini@gmail.com>
68609         gnupload: we hold the master copy of this script now
68610         For motivation and more information, see:
68611         <http://lists.gnu.org/r/bug-gnulib/2012-01/msg00222.html>
68612         * build-aux/gnupload: Make it clear in the heading comments that the
68613         master copy of this file is maintained by gnulib.  Since we are at
68614         it, bump its copyright year and ...
68615         ($scriptversion): ... the date in its version.
68616         ($usage): Patches and bug reports should be sent to the gnulib list,
68617         not the automake one.
68618         * config/srclist.txt: Don't try to sync 'gnupload' from automake
68619         anymore.
68621 2012-01-15  Bruno Haible  <bruno@clisp.org>
68623         Fix module 'random'.
68624         * m4/stdlib_h.m4 (gl_STDLIB_H): Test whether random, srandom,
68625         initstate, setstate are declared.
68627 2012-01-14  Bruno Haible  <bruno@clisp.org>
68629         Tests for module 'random'.
68630         * modules/random-tests: New file.
68631         * tests/test-random.c: New file, based on tests/test-random_r.c.
68633         New module 'random'.
68634         * lib/stdlib.in.h (random, srandom, initstate, setstate): New
68635         declarations.
68636         * lib/random.c: New file, based on glibc/stdlib/random.c.
68637         * m4/random.m4: New file.
68638         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize GNULIB_RANDOM,
68639         HAVE_RANDOM.
68640         * modules/stdlib (Makefile.am): Substitute GNULIB_RANDOM, HAVE_RANDOM.
68641         * modules/random: New file.
68642         * config/srclist.txt: Add an entry for random.c.
68643         * doc/posix-functions/random.texi: Mention the 'random' module.
68644         * doc/posix-functions/initstate.texi: Likewise.
68645         * doc/posix-functions/setstate.texi: Likewise.
68646         * doc/posix-functions/srandom.texi: Likewise.
68648 2012-01-12  Bruno Haible  <bruno@clisp.org>
68650         random_r: Use common idioms.
68651         * lib/random_r.c: Include <stdlib.h> first.
68653         random_r: Override incompatible API on AIX, OSF/1.
68654         * lib/stdlib.in.h (random_r, srandom_r, initstate_r, setstate_r):
68655         Override the system function if REPLACE_RANDOM_R is 1.
68656         * m4/random_r.m4 (gl_FUNC_RANDOM_R): Require AC_CANONICAL_HOST. On AIX
68657         and OSF/1, set REPLACE_RANDOM_R.
68658         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize REPLACE_RANDOM_R.
68659         * modules/stdlib (Makefile.am): Substitute REPLACE_RANDOM_R.
68660         * modules/random_r (configure.ac): Test REPLACE_RANDOM_R.
68661         * doc/glibc-functions/initstate_r.texi: Mention the AIX, OSF/1 problem.
68662         * doc/glibc-functions/random_r.texi: Likewise.
68663         * doc/glibc-functions/setstate_r.texi: Likewise.
68665         random_r: Support for MSVC 9.
68666         * lib/random_r.c: Include stdint.h, not inttypes.h.
68668 2012-01-12  Eric Blake  <eblake@redhat.com>
68670         inet_ntop: guard extra work by IF_LINT
68671         * lib/inet_ntop.c (inet_ntop6): Mark spurious initialization, for
68672         better code generation when not checking for warnings.
68673         Suggested by Paul Eggert and Jim Meyering.
68675         strptime: fix regression on mingw
68676         * lib/strptime.c (__strptime_internal) [!_LIBC && !HAVE_TM_GMTOFF]:
68677         Fix regression.  Reported by Bruno Haible.
68679 2012-01-11  Reuben Thomas  <rrt@sc3d.org>
68680             Bruno Haible  <bruno@clisp.org>
68682         copy-file: add error-code-returning variant.
68683         * lib/copy-file.h (GL_COPY_ERR_*): New enumeration items.
68684         (qcopy_file_preserving): New declaration.
68685         * lib/copy-file.c (qcopy_file_preserving): Renamed from
68686         copy_file_preserving. Change return type to 'int'. Don't emit an error
68687         message here.
68688         (copy_file_preserving): New function.
68689         * tests/test-copy-file.c: Include <stdlib.h>.
68690         (main): Test qcopy_file_preserving if the environment variable
68691         NO_STDERR_OUTPUT is set.
68692         * tests/test-copy-file-1.sh: Invoke test-copy-file.sh a second time,
68693         with NO_STDERR_OUTPUT
68694         * tests/test-copy-file-2.sh: Likewise.
68696 2012-01-10  Bruno Haible  <bruno@clisp.org>
68698         copy-file: Use 'quote' module consistently.
68699         * lib/copy-file.c (copy_file_preserving): Use quote().
68701         copy-file: Refactor.
68702         * lib/copy-file.c: Include quote.h.
68703         (copy_file_preserving): Call qcopy_acl instead of copy_acl. Emit error
68704         message here.
68705         * modules/copy-file (Depends-on): Add quote.
68707         acl: Export qcopy_acl.
68708         * lib/acl.h (qcopy_acl): New declaration.
68709         * lib/copy-acl.c (qcopy_acl): Make non-static.
68711         acl: Rename a local variable.
68712         * lib/set-mode-acl.c (set_acl): Use same variable name as in copy_acl.
68714         acl: Align return values of copy_acl and qcopy_acl.
68715         * lib/copy-acl.c (copy_acl): Return the same value as qcopy_acl,
68716         maybe < -1.
68718 2012-01-11  Eric Blake  <eblake@redhat.com>
68720         strptime: silence gcc warnings
68721         * lib/strptime.c (__strptime_internal) [!_NL_CURRENT],
68722         [!_LIBC && !HAVE_TM_GMTOFF]: Avoid unused variables.
68723         Reported by Daniel P. Berrange.
68725         inet_ntop: silence gcc warning
68726         * lib/inet_ntop.c (inet_ntop6): Initialize best.base.
68727         Reported by Daniel P. Berrange.
68729 2012-01-11  Dmitry V. Levin  <ldv@altlinux.org>
68731         getloadavg test: skip the test on GNU/Linux without /proc mounted
68732         GNU libc implements getloadavg(3) on Linux by parsing /proc/loadavg
68733         file.  When /proc is not mounted, it always fails with ENOENT.
68734         * tests/test-getloadavg.c (main): Treat ENOENT return code from
68735         getloadavg(3) the same way as ENOSYS and ENOTSUP.
68737 2012-01-10  Bruno Haible  <bruno@clisp.org>
68739         regex: Avoid link error on MSVC 9.
68740         * modules/regex (Depends-on): Add wctype.
68742 2012-01-10  Bruno Haible  <bruno@clisp.org>
68744         doc: Mention --with-tests option.
68745         * gnulib-tool (func_usage): Suggest --with-tests for --test etc.
68746         * doc/gnulib.texi (Extra tests modules): Mention the need to pass
68747         --with-tests.
68748         Reported by Reuben Thomas.
68750 2012-01-10  Reuben Thomas  <rrt@sc3d.org>
68752         users.txt: order package names lexicographically.
68753         * users.txt: Order package names lexicographically.
68755 2012-01-10  Jim Meyering  <meyering@redhat.com>
68757         maint.mk: fix description in comment
68758         * top/maint.mk (require_exactly_one_NL_at_EOF_): Fix comment.
68760         ignore-value: remove deprecated ignore_ptr function
68761         * lib/ignore-value.h (ignore_ptr): Remove deprecated function.
68762         * NEWS: Note this.
68764 2012-01-09  Jim Meyering  <meyering@redhat.com>
68766         test-init.sh: avoid a subshell
68767         * tests/test-init.sh: Remove protective subshell.
68768         Suggested by Bernhard Voelker.  While a subshell is normally
68769         required to protect against older shells (Solaris, FreeBSD) that
68770         warn about a missing program before performing redirection, the
68771         shell-selection tests performed by init.sh probably exclude any
68772         offending shell.
68774 2012-01-08  Bruno Haible  <bruno@clisp.org>
68776         setlocale tests: Avoid test failure on Solaris 11.0.
68777         * tests/test-setlocale2.sh: Use 'env' to set the LC_ALL environment
68778         variable.
68780 2012-01-08  Bruno Haible  <bruno@clisp.org>
68782         posix_spawn_file_actions_addopen: Work around Solaris 11.0 bug.
68783         * m4/spawn_h.m4 (gl_SPAWN_H_DEFAULTS): Initialize
68784         REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN.
68785         * m4/posix_spawn.m4 (gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN): New
68786         macro.
68787         * lib/spawn.in.h (posix_spawn_file_actions_addopen): Test
68788         REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN, not REPLACE_POSIX_SPAWN.
68789         * lib/spawn_faction_addopen.c: Add workaround implementation if
68790         HAVE_WORKING_POSIX_SPAWN.
68791         * modules/spawn (Makefile): Substitute
68792         REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN.
68793         * modules/posix_spawn_file_actions_addopen (configure.ac): Invoke
68794         gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN. Test
68795         REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN, not REPLACE_POSIX_SPAWN.
68796         (Depends-on): Update conditions.
68797         * doc/posix-functions/posix_spawn_file_actions_addopen.texi: Mention
68798         the Solaris 11 bug.
68800 2012-01-08  Bruno Haible  <bruno@clisp.org>
68802         posix_spawn_file_actions_adddup2: Work around Solaris 11.0 bug.
68803         * m4/spawn_h.m4 (gl_SPAWN_H_DEFAULTS): Initialize
68804         REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2.
68805         * m4/posix_spawn.m4 (gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2): New
68806         macro.
68807         * lib/spawn.in.h (posix_spawn_file_actions_adddup2): Test
68808         REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2, not REPLACE_POSIX_SPAWN.
68809         * lib/spawn_faction_adddup2.c: Add workaround implementation if
68810         HAVE_WORKING_POSIX_SPAWN.
68811         * modules/spawn (Makefile): Substitute
68812         REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2.
68813         * modules/posix_spawn_file_actions_adddup2 (configure.ac): Invoke
68814         gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2. Test
68815         REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2, not REPLACE_POSIX_SPAWN.
68816         (Depends-on): Update conditions.
68817         * doc/posix-functions/posix_spawn_file_actions_adddup2.texi: Mention
68818         the Solaris 11 bug.
68820 2012-01-08  Bruno Haible  <bruno@clisp.org>
68822         posix_spawn_file_actions_addclose: Work around Solaris 11.0 bug.
68823         * m4/spawn_h.m4 (gl_SPAWN_H_DEFAULTS): Initialize
68824         REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE.
68825         * m4/posix_spawn.m4 (gl_POSIX_SPAWN_BODY): Define
68826         HAVE_WORKING_POSIX_SPAWN.
68827         (gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE): New macro.
68828         * lib/spawn.in.h (posix_spawn_file_actions_addclose): Test
68829         REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE, not REPLACE_POSIX_SPAWN.
68830         * lib/spawn_faction_addclose.c: Add workaround implementation if
68831         HAVE_WORKING_POSIX_SPAWN.
68832         * modules/spawn (Makefile): Substitute
68833         REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE.
68834         * modules/posix_spawn_file_actions_addclose (configure.ac): Invoke
68835         gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE. Test
68836         REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE, not REPLACE_POSIX_SPAWN.
68837         (Depends-on): Update conditions.
68838         * doc/posix-functions/posix_spawn_file_actions_addclose.texi: Mention
68839         the Solaris 11 bug.
68841 2012-01-08  Bruno Haible  <bruno@clisp.org>
68843         doc: Update for Solaris 11.0.
68844         * doc/*/*.texi: Mention Solaris 11.0 where appropriate.
68845         * m4/printf.m4: Update comments.
68847 2012-01-08  Bruno Haible  <bruno@clisp.org>
68849         mktime: Avoid compilation error on Solaris 11.
68850         * lib/mktime.c (WRAPV): Define to 0 on all non-glibc systems.
68852 2012-01-08  Bruno Haible  <bruno@clisp.org>
68854         doc: Small fix.
68855         * doc/posix-headers/nl_types.texi: Correct platforms list.
68857 2012-01-08  Simon Josefsson  <simon@josefsson.org>
68859         Add lgpl-3.0 module.
68860         * MODULES.html.sh (Support for building documentation): Add
68861         lgpl-3.0.
68862         * modules/lgpl-3.0: New file.
68864 2012-01-08  Jim Meyering  <meyering@redhat.com>
68866         select.c: indent with spaces, not TABs
68867         * lib/select.c (windows_poll_handle): Indent with spaces, not TABs.
68869 2012-01-07  Paolo Bonzini  <bonzini@gnu.org>
68871         quotearg: do not use grave accent for left quote
68872         * lib/quotearg.c (gettext_quote): Map "`" to "'" for
68873         locale_quoting_style.
68874         (quotearg_buffer_restyled): Fix example.
68875         * tests/test-quotearg-simple.c (results_g): Adjust test vectors.
68877 2012-01-07  Paolo Bonzini  <bonzini@gnu.org>
68879         quotearg: fall back to Unicode single quotes in UTF-8, GB-18030 locales
68880         Most programs do not have translation catalogs for English and much
68881         less separate catalogs for British and American English.  Drop the
68882         suggestion to translators about these two, and provide it
68883         automatically for Unicode locales.  Like most programs, even those
68884         using American English, we use single quotation marks.  This conflicts
68885         with the American typographic convention, but works better when you
68886         cite the entire error message within double quotes.  It also tries not
68887         to clash with established practice and with what non-gnulib programs
68888         will usually do.
68889         * lib/quotearg.c (gettext_quote): Hard-code U+2018 and U+2019 when
68890         using an UTF-8 or GB-18030 locale.  The list of other locales with
68891         quotes was provided by Bruno Haible.
68892         (quotearg_buffer_restyled): Adjust instructions to translators.
68893         * lib/quotearg.h (locale_quoting_style): Do not put an example in the
68894         text, since this would be wrong when using Unicode.
68895         * modules/quotearg: Depend on c-strcaseeq.
68897 2012-01-07  Paolo Bonzini  <bonzini@gnu.org>
68899         quotearg: fix Wikipedia link
68900         * lib/quotearg.c (quotearg_buffer_restyled): Fix link to Wikipedia.
68902 2012-01-07  Simon Josefsson  <simon@josefsson.org>
68904         Fix for mingw with MSVC9.
68905         * m4/ld-version-script.m4: Check that compiler rejects version
68906         scripts with syntax errors.  Reported by Bruno Haible
68907         <bruno@clisp.org>.
68909 2012-01-06  Bruno Haible  <bruno@clisp.org>
68911         Talk about "native Windows API", not "Woe32".
68912         * lib/accept4.c: Update comments to mention native Windows.
68913         * lib/execute.c: Likewise.
68914         * lib/fatal-signal.c: Likewise.
68915         * lib/localcharset.c: Likewise.
68916         * lib/nanosleep.c: Likewise.
68917         * lib/nl_langinfo.c: Likewise.
68918         * lib/pclose.c: Likewise.
68919         * lib/pipe-filter-gi.c: Likewise.
68920         * lib/pipe-filter-ii.c: Likewise.
68921         * lib/pipe.c: Likewise.
68922         * lib/pipe2.c: Likewise.
68923         * lib/popen.c: Likewise.
68924         * lib/progreloc.c: Likewise.
68925         * lib/relocatable.c: Likewise.
68926         * lib/sigaction.c: Likewise.
68927         * lib/sigprocmask.c: Likewise.
68928         * lib/spawn-pipe.h: Likewise.
68929         * lib/spawn-pipe.c: Likewise.
68930         * lib/spawni.c: Likewise.
68931         * lib/stat-time.h: Likewise.
68932         * lib/w32spawn.h: Likewise.
68933         * tests/test-isatty.c: Likewise.
68934         * lib/config.charset: More comments.
68935         * doc/gnulib-intro.texi: Mention native Windows.
68936         * doc/posix-functions/_Exit_C99.texi: Likewise.
68937         * doc/posix-headers/fcntl.texi: Likewise.
68939 2012-01-06  Guillem Jover  <guillem@hadrons.org>  (tiny change)
68941         argp: Avoid crash if translator uses % characters in a translation.
68942         * lib/argp-parse.c (argp_version_parser): Use a "%s" format string.
68943         Reported by Mats Erik Andersson <gnu@gisladisker.se>.
68945 2012-01-06  Paul Eggert  <eggert@cs.ucla.edu>
68947         doc: C11 and C++11 are now official
68948         * doc/posix-headers/assert.texi, doc/posix-headers/stdalign.texi:
68949         * doc/verify.texi, stdalign.in.h, verify.h, m4/gnulib-common.m4:
68950         * m4/stdalign.m4, modules/assert-h, modules/snippet/_Noreturn:
68951         * modules/stdalign:
68952         Replace references to draft C1X to C11, and to draft C++0X to C++11.
68954 2012-01-06  Bruno Haible  <bruno@clisp.org>
68956         uc-is-grapheme-break tests: Tweak.
68957         * tests/unigbrk/test-uc-is-grapheme-break.c (main): Fix an error
68958         message.
68960 2012-01-06  Bruno Haible  <bruno@clisp.org>
68962         test-init.sh: correct the test for diff -u
68963         * tests/test-init.sh: Also redirect stdout to /dev/null.
68965 2012-01-05  Paul Eggert  <eggert@cs.ucla.edu>
68967         Use ', not `, for quoting output.
68968         * build-aux/announce-gen (usage, sizes, print_news_deltas)
68969         (print_changelog_deltas, get_tool_versions, main program):
68970         * build-aux/git-version-gen:
68971         * build-aux/gitlog-to-changelog (usage, parse_amend_file):
68972         * build-aux/move-if-change (help):
68973         * build-aux/useless-if-before-free (usage, main program):
68974         * check-module (parse_module_file, usage)
68975         (find_included_lib_files, check_module):
68976         * lib/argmatch.c (main) [TEST]:
68977         * lib/argp-help.c (_help):
68978         * lib/getopt1.c (main) [TEST]:
68979         * lib/git-merge-changelog.c (usage):
68980         * lib/xstrtol-error.c (xstrtol_error):
68981         * m4/alloca.m4 (_AC_LIBOBJ_ALLOCA):
68982         * m4/argz.m4 (gl_FUNC_ARGZ):
68983         * m4/bison.m4 (gl_BISON):
68984         * m4/calloc.m4 (gl_FUNC_CALLOC_GNU):
68985         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS):
68986         * m4/flexmember.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER):
68987         * m4/fpending.m4 (gl_PREREQ_FPENDING):
68988         * m4/gc-random.m4 (gl_GC_RANDOM):
68989         * m4/intl.m4 (gt_CHECK_DECL):
68990         * m4/link-follow.m4 (gl_FUNC_LINK_FOLLOWS_SYMLINK):
68991         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT)
68992         (AC_TYPE_UNSIGNED_LONG_LONG_INT):
68993         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS):
68994         * m4/lstat.m4 (gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK):
68995         * m4/onceonly.m4 (AC_CHECK_FUNCS_ONCE):
68996         * m4/posixver.m4 (gl_DEFAULT_POSIX2_VERSION):
68997         * tests/test-dirname.c (main):
68998         * tests/test-getpass.c (main):
68999         * tests/test-iconvme.c (main):
69000         * tests/test-parse-datetime.c (LOG):
69001         * tests/test-xstrtoimax.sh:
69002         * tests/test-xstrtol.sh:
69003         * tests/test-xstrtoll.sh:
69004         * tests/test-xstrtoumax.sh:
69005         * tests/unigbrk/test-uc-is-grapheme-break.c (main):
69006         * top/GNUmakefile (abort-due-to-no-makefile):
69007         Quote 'like this', not `like this', as per the recent change to
69008         the GNU coding standards.
69010 2012-01-05  Bruno Haible  <bruno@clisp.org>
69012         strtoimax: Don't force a replacement on systems where intmax_t is int.
69013         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Use a different test if
69014         'intmax_t' is not larger than 'int'.
69015         Reported by Pádraig Brady <P@draigBrady.com>.
69017 2012-01-05  Bruno Haible  <bruno@clisp.org>
69019         doc: Mention NetBSD bugs.
69020         * doc/posix-functions/*printf.texi: Mention a NetBSD 5.1 bug.
69021         * doc/posix-functions/nl_langinfo.texi: Mention another NetBSD 5.1 bug.
69023 2012-01-05  Bruno Haible  <bruno@clisp.org>
69025         strtoumax tests: Enhance tests.
69026         * tests/test-strtoumax.c (main): Add tests for large values.
69028 2012-01-05  Bruno Haible  <bruno@clisp.org>
69030         strtoimax: Work around AIX 5.1 bug.
69031         * lib/inttypes.in.h (strtoimax): Allow overriding the system's
69032         definition.
69033         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Check against the AIX 5.1 bug.
69034         Set HAVE_STRTOIMAX.
69035         * m4/inttypes.m4 (gl_INTTYPES_H_DEFAULTS): Initialize
69036         REPLACE_STRTOIMAX.
69037         * modules/inttypes-incomplete (Makefile.am): Substitute
69038         REPLACE_STRTOIMAX.
69039         * modules/strtoimax (Files): Add m4/stdint_h.m4, m4/inttypes_h.m4.
69040         (configure.ac): Test HAVE_STRTOIMAX, REPLACE_STRTOIMAX.
69041         (Depends-on): Update conditions.
69042         * tests/test-strtoimax.c (main): Add tests for large values.
69043         * doc/posix-functions/strtoimax.texi: Mention the AIX 5.1 bug.
69045 2012-01-05  Bruno Haible  <bruno@clisp.org>
69047         inttypes: Modernize.
69048         * lib/inttypes.in.h (strtoimax, strtoumax): Use the C++ safe idioms.
69049         * modules/inttypes-incomplete (Depends-on): Add snippet/c++defs.
69050         (Makefile.am): Update inttypes.h rule.
69052 2012-01-05  Jim Meyering  <meyering@redhat.com>
69054         init.sh: don't waste a subshell just to redirect stderr
69055         * tests/init.sh: In testing for diff -u and diff -c, use a
69056         stderr-redirecting exec inside `...` rather than a subshell.
69058         test-init.sh: avoid failure on HP-UX 11.00
69059         * tests/test-init.sh: Skip "diff -u"-comparing step when compare
69060         resolves to diff -c or cmp.  Reported by Bruno Haible.
69062 2012-01-05  Bruno Haible  <bruno@clisp.org>
69064         Tests for module 'strtoull'.
69065         * modules/strtoull-tests: New file.
69066         * tests/test-strtoull.c: New file, based on tests/test-strtoumax.c.
69068 2012-01-05  Bruno Haible  <bruno@clisp.org>
69070         Tests for module 'strtoll'.
69071         * modules/strtoll-tests: New file.
69072         * tests/test-strtoll.c: New file, based on tests/test-strtoimax.c.
69074 2012-01-05  Bruno Haible  <bruno@clisp.org>
69076         Tests for module 'strtoul'.
69077         * modules/strtoul-tests: New file.
69078         * tests/test-strtoul.c: New file, based on tests/test-strtoumax.c.
69080 2012-01-05  Bruno Haible  <bruno@clisp.org>
69082         Tests for module 'strtol'.
69083         * modules/strtol-tests: New file.
69084         * tests/test-strtol.c: New file, based on tests/test-strtoimax.c.
69086 2012-01-04  Jim Meyering  <meyering@redhat.com>
69088         test-init.sh: accommodate Solaris 5.10's different diff -u output
69089         * tests/test-init.sh: Also exempt @@ lines from the comparison
69090         of diff output, since Solaris 5.10 and GNU diff formats differ.
69091         Reported by Stefano Lattarini.
69093 2012-01-04  Paul Eggert  <eggert@cs.ucla.edu>
69095         test-posixtm: don't assume signed integer wraparound
69096         * tests/test-posixtm.c (main): Don't assume wraparound semantics
69097         after signed integer overflow.  Inspired by (though it may not
69098         fix) Bruno Haible's bug report in
69099         <http://lists.gnu.org/r/bug-gnulib/2012-01/msg00066.html>.
69101         Spell out "Windows 9x" and "Windows XP".
69102         * lib/poll.c, lib/select.c: In comments, replace "Win9x" with
69103         "Windows 9x" and "WinXP" with "Windows XP".
69105 2012-01-04  Jim Meyering  <meyering@redhat.com>
69107         test-vc-list-files-cvs.sh: remove obsolete comment
69108         * tests/test-vc-list-files-cvs.sh: Remove obsolete comment about
69109         double exit.  Now that's all encapsulated via skip_ and Exit.
69111 2012-01-04  Bruno Haible  <bruno@clisp.org>
69113         Talk about "native Windows API", not "Win32".
69114         * lib/classpath.c: Update comments to mention native Windows.
69115         * lib/csharpexec.c: Likewise.
69116         * lib/dup2.c: Likewise.
69117         * lib/error.c: Likewise.
69118         * lib/fcntl.c: Likewise.
69119         * lib/filename.h: Likewise.
69120         * lib/findprog.c: Likewise.
69121         * lib/get-rusage-as.c: Likewise.
69122         * lib/get-rusage-data.c: Likewise.
69123         * lib/getpagesize.c: Likewise.
69124         * lib/javaexec.c: Likewise.
69125         * lib/msvc-inval.c: Likewise.
69126         * lib/msvc-nothrow.c: Likewise.
69127         * lib/nanosleep.c: Likewise.
69128         * lib/nonblocking.c: Likewise.
69129         * lib/printf-parse.c: Likewise.
69130         * lib/setlocale.c: Likewise.
69131         * lib/sigaction.c: Likewise.
69132         * lib/strerror_r.c: Likewise.
69133         * lib/tmpdir.c: Likewise.
69134         * lib/vasnprintf.c: Likewise.
69135         * lib/w32spawn.h: Likewise.
69136         * lib/waitpid.c: Likewise.
69137         * lib/stdio.in.h (fdopen, fopen, freopen): Likewise.
69138         * m4/locale-ar.m4: Likewise.
69139         * m4/locale-fr.m4: Likewise.
69140         * m4/locale-ja.m4: Likewise.
69141         * m4/locale-tr.m4: Likewise.
69142         * m4/locale-zh.m4: Likewise.
69143         * m4/printf.m4: Likewise.
69144         * tests/test-cloexec.c: Likewise.
69145         * tests/test-copy-acl.sh: Likewise.
69146         * tests/test-copy-file.sh: Likewise.
69147         * tests/test-file-has-acl.sh: Likewise.
69148         * tests/test-set-mode-acl.sh: Likewise.
69149         * tests/test-dup-safer.c: Likewise.
69150         * tests/test-dup2.c: Likewise.
69151         * tests/test-dup3.c: Likewise.
69152         * tests/test-fcntl.c: Likewise.
69153         * tests/test-nonblocking-pipe.h: Likewise.
69154         * tests/test-nonblocking-socket.h: Likewise.
69155         * tests/test-pipe.c: Likewise.
69156         * tests/test-pipe2.c: Likewise.
69157         * tests/test-spawn-pipe-child.c: Likewise.
69158         * doc/acl-resources.txt: Likewise.
69159         * lib/getaddrinfo.c (WINDOWS_NATIVE): Renamed from WIN32_NATIVE.
69160         * tests/test-poll.c (WINDOWS_NATIVE): Likewise.
69161         * tests/test-select.h (WINDOWS_NATIVE): Likewise.
69162         * lib/localcharset.c: Update comments to mention native Windows.
69163         (WINDOWS_NATIVE): Renamed from WIN32_NATIVE.
69164         * lib/localename.c: Likewise.
69165         * lib/progreloc.c: Likewise.
69166         * lib/relocatable.c: Likewise.
69167         * lib/poll.c (WINDOWS_NATIVE): Renamed from WIN32_NATIVE.
69168         (windows_compute_revents): Renamed from win32_compute_revents.
69169         (windows_compute_revents_socket): Renamed from
69170         win32_compute_revents_socket.
69171         * lib/select.c: Update comments to mention native Windows.
69172         (windows_poll_handle): Renamed from win32_poll_handle.
69173         * m4/threadlib.m4: Update comments to mention native Windows.
69174         (gl_THREADLIB_EARLY_BODY, gl_THREADLIB_BODY): Expect
69175         --enable-threads=windows instead of --enable-threads=win32. Set
69176         USE_WINDOWS_THREADS, not USE_WIN32_THREADS.
69177         * lib/glthread/lock.h: Update comments to mention native Windows.
69178         (USE_WINDOWS_THREADS): Renamed from USE_WIN32_THREADS.
69179         * lib/glthread/lock.c (USE_WINDOWS_THREADS): Renamed from
69180         USE_WIN32_THREADS.
69181         * lib/glthread/cond.h (USE_WINDOWS_THREADS): Likewise.
69182         * lib/glthread/cond.c (USE_WINDOWS_THREADS): Likewise.
69183         * lib/glthread/thread.h (USE_WINDOWS_THREADS): Likewise.
69184         * lib/glthread/thread.c (USE_WINDOWS_THREADS): Likewise.
69185         * lib/glthread/tls.h (USE_WINDOWS_THREADS): Likewise.
69186         * lib/glthread/tls.c (USE_WINDOWS_THREADS): Likewise.
69187         * lib/glthread/yield.h (USE_WINDOWS_THREADS): Likewise.
69188         * tests/test-cond.c (USE_WINDOWS_THREADS): Likewise.
69189         * tests/test-thread_create.c (USE_WINDOWS_THREADS): Likewise.
69190         * tests/test-lock.c (USE_WINDOWS_THREADS): Likewise.
69191         (TEST_WINDOWS_THREADS): Renamed from TEST_WIN32_THREADS.
69192         * tests/test-tls.c: Likewise.
69193         Rationale:
69194         Microsoft renamed the "Win32 API" to "Windows API", as it is available
69195         on both 32-bit and 64-bit Windows systems.
69196         But in gnulib, we treat Cygwin like a Unix platform, therefore the main
69197         line of distinction is between "native Windows" on one side and Unix/
69198         POSIX systems on the other side. More details in
69199         <https://lists.gnu.org/r/bug-gnulib/2012-01/msg00027.html>.
69200         Suggested by Paul Eggert.
69202 2012-01-03  Bruno Haible  <bruno@clisp.org>
69204         isatty: Support for MSVC 9.
69205         * doc/posix-functions/isatty.texi: Mention the MSVC problem.
69206         * lib/isatty.c: Include <errno.h>, msvc-inval.h.
69207         (_isatty_nothrow): New function.
69208         (isatty): Use it instead of _isatty.
69209         (IsConsoleHandle): Add comment, from Paolo Bonzini.
69210         * lib/poll.c (IsConsoleHandle): Likewise.
69211         * lib/select.c (IsConsoleHandle): Likewise.
69212         * m4/isatty.m4 (gl_FUNC_ISATTY): Fix comment. Reported by Eli Zaretskii.
69213         (gl_PREREQ_ISATTY): New macro.
69214         * modules/isatty (Depends-on): Add msvc-inval.
69215         (configure.ac): Invoke gl_PREREQ_ISATTY.
69217 2012-01-03  Jim Meyering  <meyering@redhat.com>
69219         maint.mk: remove temporary transition aid from over 1.5 years ago
69220         * top/maint.mk (_prohibit_regexp): Remove definition whose sole
69221         purpose was to aid in the transition (avoiding silent malfunction)
69222         from that old name to the new _sc_search_regexp.  This shim was
69223         added by commit 219c504b.
69225         init.sh: do not try to accommodate compare arguments starting with "-"
69226         * tests/init.sh (compare_dev_null_): Do not try to accommodate
69227         compare arguments that start with "-".  Besides, we do not worry
69228         about this when invoking diff or cmp; why start now with sed?
69229         Using "--" to separate options from argument would trigger sed
69230         failure in at least Solaris 7, HP-UX 11.00, IRIX 6.5, FreeBSD 6.4,
69231         OpenBSD 4.9 and NetBSD 5.1.  Reported by Bruno Haible.
69233 2012-01-02  Bruno Haible  <bruno@clisp.org>
69235         Enhance tests for module 'isatty'.
69236         * modules/isatty-tests (Depends-on): Add pipe-posix.
69237         * tests/test-isatty.c: Include <fcntl.h>.
69238         (DEV_NULL): New macro.
69239         (main): Test the resut of isatty() also on regular files, pipes, and
69240         /dev/null.
69242         New module 'isatty'.
69243         * lib/unistd.in.h (isatty): New declaration.
69244         * lib/isatty.c: New file, based on an idea of
69245         Bastien Roucariès <roucaries.bastien@gmail.com>.
69246         * m4/isatty.m4: New file.
69247         * m4/unistd_h.m4 (gl_UNISTD_H): Test whether isatty is declared.
69248         (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_ISATTY, REPLACE_ISATTY.
69249         * modules/unistd (Makefile.am): Substitute GNULIB_ISATTY,
69250         REPLACE_ISATTY.
69251         * modules/isatty: New file.
69252         * doc/posix-functions/isatty.texi: Mention the new module.
69253         Suggested by Paolo Bonzini.
69255 2012-01-02  Bruno Haible  <bruno@clisp.org>
69257         canonicalize: Tweak 2011-12-29 commit.
69258         * lib/canonicalize.c (canonicalize_filename_mode): Fix typo in comment.
69259         * lib/canonicalize.h (canonicalize_filename_mode): Update specification.
69261 2012-01-02  Jim Meyering  <meyering@redhat.com>
69263         gitlog-to-changelog: describe input syntax in --help output
69264         * build-aux/gitlog-to-changelog (usage) [SPECIAL SYNTAX]: New section.
69266         gitlog-to-changelog: fix typo in --help: show backslash before email @
69267         * build-aux/gitlog-to-changelog (usage): An "@" was backslash-escaped
69268         in sources, but not in actual output.
69270 2011-12-30  Jim Meyering  <meyering@redhat.com>
69272         gitlog-to-changelog: don't malfunction when name contains %-directive
69273         * build-aux/gitlog-to-changelog (main): Don't let a %-directive
69274         in a name string cause trouble.  E.g., with a user name of "%s",
69275         gitlog-to-changelog would fail with "Missing argument in sprintf at..."
69277 2011-12-30  Gary V. Vaughan  <gary@gnu.org>
69279         gitlog-to-changelog: Copyright-paperwork-exempt: yes == (tiny change)
69280         * build-aux/gitlog-to-changelog (main): Map the string, at beginning
69281         of line in a git commit log, "Copyright-paperwork-exempt: yes", to
69282         the "  (tiny change)" notation that is appended to the standard
69283         ChangeLog "date  name  email" header line.
69285 2012-01-01  Jim Meyering  <meyering@redhat.com>
69287         test-framework-sh: init.sh: fix "make dist" failure
69288         When using gnulib-tool's --with-tests option and any module that
69289         depends on test-framework-sh, "make dist" would fail due to the
69290         lack of init.sh *in lib/*.  The EXTRA_DIST += init.sh is required
69291         in the gltests directory, and not in the gllib/ directory.
69292         One way to work around that is to move the EXTRA_DIST += init.sh
69293         from the primary module to the -tests one:
69294         * modules/test-framework-sh-tests (EXTRA_DIST): Add init.sh here, ...
69295         * modules/test-framework-sh (Makefile.am): ...not here.
69296         Reported by Tom G. Christensen in
69297         http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/29519
69299         version-etc: update copyright year reported by --version
69300         * lib/version-etc.c (COPYRIGHT_YEAR): Update to 2012.
69302 2011-12-31  Pádraig Brady  <P@draigBrady.com>
69304         canonicalize: only stat() if required
69305         * lib/canonicalize.c (canonicalize_filename_mode):
69306         Avoid calling l?stat() when both CAN_MISSING,
69307         and CAN_NOLINKS are set, as we neither need
69308         to resolve symlinks or test component existence.
69310 2011-12-31  Paul Eggert  <eggert@cs.ucla.edu>
69312         doc: cover st_ino issues once; add OpenVMS etc.
69313         * doc/posix-functions/stat.texi (stat):
69314         * doc/posix-functions/lstat.texi (lstat):
69315         * doc/posix-functions/fstatat.texi (fstatat):
69316         * doc/posix-functions/fstat.texi (fstat):
69317         Move general 'struct stat' stuff to sys_stat.texi,
69318         leaving behind a pointer.
69319         * doc/posix-headers/sys_stat.texi (sys/stat.h):
69320         Merge duplicate info about 'struct stat' problems into here.
69321         Mention issues with OpenVMS, GNU/Linux NFS, NetApp, ClearCase,
69322         and suggest partial workarounds.
69324         same-inode: port to OpenVMS
69325         * lib/same-inode.h (SAME_INODE): Port to OpenVMS by checking all
69326         three st_ino values.
69328 2011-12-30  Pádraig Brady  <P@draigBrady.com>
69330         canonicalize: fix references to stat() and lstat()
69331         * lib/canonicalize.c (canonicalize_filename_mode):
69332         Ensure references always resolve to a replacement
69333         function if required (even via a macro).
69335 2011-12-30  Jim Meyering  <meyering@redhat.com>
69337         gitlog-to-changelog: remove a little duplication
69338         * build-aux/gitlog-to-changelog (main): Grep @lines once,
69339         rather than twice.
69341 2011-12-29  Pádraig Brady  <P@draigBrady.com>
69343         canonicalize: add support for not resolving symlinks
69344         * lib/canonicalize.h: Add the CAN_NOLINKS flag to
69345         indicate we don't want to follow symlinks.  Also
69346         provide CAN_MODE_MASK to aid setting these existing
69347         mutually exclusive values.
69348         * lib/canonicalize.c (canonicalize_filename_mode):
69349         Extract the flags from can_mode parameter, which
69350         are currently just used to select between stat()
69351         and lstat().  Also ensure that mutually exclusive
69352         values are flagged immediately as invalid.
69353         * tests/test-canonicalize.c: Verify symlinks are
69354         not followed, and that invalid flag combinations
69355         are diagnosed.
69357 2011-12-25  Jim Meyering  <meyering@redhat.com>
69359         gitlog-to-changelog: do not clump multi-paragraph entries
69360         Identical header lines (date,name,email+coauthors) are suppressed,
69361         thus putting all entries with those same characteristics under
69362         a single header.  However, when a log entry consists of two or
69363         more paragraphs, it may not be clear where it starts and ends.
69364         This change makes it so that such an entry is always separated
69365         from others by a header line, even when that header would
69366         otherwise be suppressed.
69367         * build-aux/gitlog-to-changelog: Implement the above.
69368         Inspired by a related request from Stefano Lattarini in
69369         http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/29456
69371 2011-12-25  Paul Eggert  <eggert@cs.ucla.edu>
69373         announce-gen: fix `cmd' typo in diagnostic
69374         * build-aux/announce-gen (print_changelog_deltas): Fix typo in
69375         diagnostic: a missing '$' meant that the command was not output.
69377 2011-12-23  Jim Meyering  <meyering@redhat.com>
69379         test-framework-sh: distribute init.sh
69380         * modules/test-framework-sh (EXTRA_DIST): Append init.sh.
69381         Otherwise, "make -C gnulib-tests check" (at least in grep) would
69382         fail due to the lack of init.sh.
69384         maint: remove explicit Files: tests/init.sh; depend on test-framework-sh
69385         * modules/atexit-tests: Rather than listing tests/init.sh,
69386         now that there's a module for it, simply depend on that new module.
69387         * modules/closein-tests: Likewise.
69388         * modules/exclude-tests: Likewise.
69389         * modules/getcwd-tests: Likewise.
69390         * modules/perror-tests: Likewise.
69391         * modules/pread-tests: Likewise.
69392         * modules/pwrite-tests: Likewise.
69393         * modules/vc-list-files-tests: Likewise.
69394         * modules/verify-tests: Likewise.
69395         * modules/xalloc-die-tests: Likewise.
69396         * modules/xstrtoimax-tests: Likewise.
69397         * modules/xstrtol-tests: Likewise.
69398         * modules/xstrtoll-tests: Likewise.
69399         * modules/xstrtoumax-tests: Likewise.
69400         * modules/yesno-tests: Likewise.
69402 2011-12-22  Jim Meyering  <meyering@redhat.com>
69404         test-framework-sh: add minimal tests of init.sh's compare function
69405         * modules/test-framework-sh-tests: New file.
69406         * tests/test-init.sh: New file.
69408         test-framework-sh: new module
69409         * modules/test-framework-sh: New file.
69410         * MODULES.html.sh (Support for maintaining and releasing projects):
69411         List it.
69413         init.sh: do not emit simulated diff output to stderr
69414         * tests/init.sh (compare_dev_null_): Print to stdout, not stderr.
69416 2011-12-22  Reuben Thomas  <rrt@sc3d.org>
69418         .gitignore: ignore gnulib.dvi and regex.info
69419         * doc/.gitignore:add gnulib.dvi and regex.info
69421 2011-12-22  Jim Meyering  <meyering@redhat.com>
69423         init.sh: correct previous change
69424         * tests/init.sh (compare): My previous change was wrong.
69425         Don't clobber "$?".  Spotted by Stefano Lattarini and Pádraig Brady.
69427         init.sh: avoid unwarranted test failure when using "set -e"
69428         * tests/init.sh (compare): Ignore nonzero exit from compare_dev_null_.
69429         Otherwise, in a test script that uses "set -e" (like many in vc-dwim)
69430         a use like "compare exp out" would get evoke an unconditional failure.
69432 2011-12-21  Alfred M. Szmidt  <ams@gnu.org>
69434         bootstrap: fix it to honor $ACLOCAL_FLAGS once again
69435         The 2011-12-17 change, commit 767ccd40, replaced a manual invocation
69436         of aclocal that used explicit $ACLOCAL_FLAGS with an invocation of
69437         autoreconf that did not.
69438         * build-aux/bootstrap: Use $ACLOCAL_FLAGS when invoking autoreconf.
69439         Reported by Mats Erik Andersson <gnu@gisladisker.se>.
69441 2011-12-17  Jim Meyering  <meyering@redhat.com>
69443         bootstrap: remove some now-unneeded code
69444         This script arose back when gnulib-tool was young.
69445         Since then, it has seen improvements that render much of this
69446         script unnecessary.  In particular, it can now make symlinks
69447         to the files it uses.  Also, I no longer see as much value in
69448         marking files as read-only via comments.
69449         If you relied on the symlink-creation feature of the preceding
69450         version of this script, you can get most of that functionality
69451         by adding the --symlink option to the definition of
69452         gnulib_tool_option_extras in your bootstrap.conf file.
69453         * build-aux/bootstrap (AUTOPOINT, AUTORECONF): Factor out definitions.
69454         Run autopoint and libtoolize *before* gnulib-tool.
69455         After it, run an abbreviated autoreconf, rather than a loop around
69456         all tools.
69457         (slirp, bt_mark_as_generated): Remove functions.
69459 2011-12-18  Paul Eggert  <eggert@cs.ucla.edu>
69461         ftoastr: fix typo
69462         * lib/ftoastr.h: Fix misspelling in comment.
69464 2011-12-18  Reuben Thomas  <rrt@sc3d.org>
69466         * top/README-release: fix punctuation.
69468 2011-12-17  Jim Meyering  <meyering@redhat.com>
69470         bootstrap: correct the recent buildreq change
69471         The 2011-12-07 commit, 39f5f1e4, omitted some '*'s, and thus
69472         had no effect.
69473         * build-aux/bootstrap (buildreq): Bracket each search term with
69474         "*...*", so that the shell "case" statement works as intended.
69475         Add comments.
69477 2011-12-17  Bernhard Voelker  <mail@bernhard-voelker.de>
69479         build: let bootstrap resort to wget when downloading .po files
69480         * build-aux/bootstrap (download_po_files): Fallback to wget when
69481         downloading the .po files via rsync fails.  This is necessary to
69482         bootstrap from behind a strict firewall.
69484 2011-12-15  Paul Eggert  <eggert@cs.ucla.edu>
69486         stdint: don't assume C++11 when compiling with g++
69487         Problem reported for glibc 2.14 and g++ by Alexander V. Lukyanov in
69488         <http://lists.gnu.org/r/bug-gnulib/2011-12/msg00099.html>.
69489         * m4/stdint.m4 (gl_STDINT_H): Don't go to extra work to make it
69490         work also in C++ before C++11, as that improperly inhibits
69491         generating a substitute stdint.h for that case.
69493 2011-12-15  Paul Eggert  <eggert@cs.ucla.edu>
69495         alloca: protect comment from gnulib-tool
69496         * lib/alloca.c: Change "GCC version 2" to "GCC 2" in comment, so
69497         that gnulib-tool doesn't think it's a license, and munge it to
69498         say "GCC version 3".
69500 2011-12-15  Ludovic Courtès  <ludo@gnu.org>  (tiny change)
69502         localcharset: Use an absolute path in TESTS_ENVIRONMENT.
69503         * modules/localcharset (LOCALCHARSET_TESTS_ENVIRONMENT): Use
69504         $(abs_top_builddir) instead of $(top_builddir).
69506 2011-12-14  Alex Nelson  <ajnelson@cs.ucsc.edu>  (tiny change)
69508         strftime-tests: also test nanoseconds
69509         * tests/test-strftime.c (T): Add a test of %N.
69511 2011-12-13  Paul Eggert  <eggert@cs.ucla.edu>
69513         inttypes, stdint: add C++11 support
69514         C++11 says there's no need to define __STDC_CONSTANT_MACROS etc.
69515         when including inttypes.h and stdint.h.  Support this change to
69516         the standard.
69517         * doc/posix-headers/inttypes.texi (inttypes.h):
69518         * doc/posix-headers/stdint.texi (stdint.h): Document this.
69519         * lib/inttypes.in.h (__STDC_FORMAT_MACROS) [! __cplusplus]:
69520         Define if not defined already, for the benefit of pre-C++11 hosts.
69521         Define the standard format macros (e.g., PRId8) always.
69522         * lib/stdint.in.h (__STDC_CONSTANT_MACROS, __STDC_LIMIT_MACROS):
69523         Likewise, if __cpluspus.  Define the standard constant and limit
69524         macros (e.g., INT8_C, INT8_MAX) always.
69525         * m4/inttypes.m4 (gl_INTTYPES_INCOMPLETE): Do not define
69526         GL_TRIGGER_STDC_LIMIT_MACROS or __STDC_LIMIT_MACROS; no longer needed.
69527         * m4/stdint.m4 (gl_STDINT_H): Update comments about these macros.
69528         * tests/test-inttypes.c (__STDC_LIMIT_MACROS, __STDC_CONSTANT_MACROS)
69529         (__STDC_FORMAT_MACROS): Do not define, since we assume C++11 API now.
69530         * tests/test-stdint.c (__STDC_LIMIT_MACROS, __STDC_CONSTANT_MACROS):
69531         Likewise.
69533 2011-12-12  Paul Eggert  <eggert@cs.ucla.edu>
69535         nonblocking tests: Fix test failure on Linux/PPC.
69536         Suggested by Prerna Saxena in
69537         <http://lists.gnu.org/r/bug-gnulib/2011-12/msg00080.html>.
69538         * tests/test-nonblocking-pipe.h (PIPE_DATA_BLOCK_SIZE) [Linux/PPC64]:
69539         Set to 1100000.
69541 2011-12-12  Jim Meyering  <meyering@redhat.com>
69543         argmatch: don't hard-code `' when listing valid option arguments
69544         * lib/argmatch.c (argmatch_valid): Don't hard-code `%s'.  Instead,
69545         use the quote function to add quotes.  Use fputs rather than
69546         fprintf for the format string with no format directive.
69548 2011-12-07  Eric Blake  <eblake@redhat.com>
69550         bootstrap: detect tools required by gnulib-tool
69551         * build-aux/bootstrap (buildreq): Provide minimum implicit
69552         dependencies.
69553         * DEPENDENCIES: Mention patch as a prereq.
69555 2011-12-04  Bruno Haible  <bruno@clisp.org>
69557         sethostname: Port to Windows platforms.
69558         * lib/sethostname.c: Provide an alternate implementation for Windows
69559         platforms.
69560         * tests/test-sethostname2.c (geteuid): Redefine on Cygwin.
69561         (main): Skip the test if sethostname() fails with EPERM. On Windows
69562         platforms, don't check the result of gethostname().
69564 2011-12-04  Bruno Haible  <bruno@clisp.org>
69565             Jim Meyering  <meyering@redhat.com>
69567         tests: Avoid spurious error message on platforms without mktemp program.
69568         * tests/init.sh (mktempd_): Run mktemp in a subcommand.
69570 2011-12-04  Bruno Haible  <bruno@clisp.org>
69572         sethostname: Fix documentation.
69573         * doc/glibc-functions/sethostname.texi: Move the Solaris problem to the
69574         "not fixed" section.
69576 2011-12-03  Bruno Haible  <bruno@clisp.org>
69578         gnulib-tool: Verify that the License field is present and non-empty.
69579         * gnulib-tool (func_get_license_raw): New function, extracted from
69580         func_get_license.
69581         (func_get_license): Use it. Warn if the module is not a test module and
69582         has no license.
69583         Suggested by Jim Meyering.
69585 2011-12-03  Bruno Haible  <bruno@clisp.org>
69587         sethostname tests: Fix link error on mingw.
69588         * tests/test-sethostname1.c: New file, extracted from
69589         tests/test-sethostname.c.
69590         * tests/test-sethostname2.c: New file, extracted from
69591         tests/test-sethostname.c.
69592         * tests/test-sethostname.c: Remove file.
69593         * modules/sethostname-tests (Files): Add tests/test-sethostname1.c,
69594         tests/test-sethostname2.c. Remove tests/test-sethostname.c.
69595         (Depends-on): Add gethostname.
69596         (Makefile.am): Compile both test-sethostname1 and test-sethostname2.
69597         Link the latter with $(GETHOSTNAME_LIB).
69599         sethostname tests: Fix compilation error on mingw.
69600         * tests/test-sethostname.c: Don't include <sys/types.h>.
69601         (geteuid): Use a dummy value without uid_t.
69602         * modules/sethostname-tests (Depends-on): Remove sys_types.
69604         sethostname tests: Avoid a gcc warning.
69605         * tests/test-sethostname.c (main): Remove an unused variable.
69607         Tweak last commit.
69608         * modules/sethostname-tests (Files): Sort by decreasing importance.
69609         (configure.ac): Check for geteuid.
69610         * tests/test-sethostname.c (main): Emit error messages to stderr. Skip
69611         the test when there's nothing to test. Drop an unnecessary cast.
69612         Improve an error message. Verify that the final sethostname() call
69613         succeeds.
69615 2011-12-01  Ben Walton  <bwalton@artsci.utoronto.ca>
69617         Add a test suite for the sethostname module.
69618         * modules/sethostname-tests: New file.  A test program
69619         for the sethostname module.
69620         * tests/test-sethostname.c: Likewise.
69622 2011-12-03  Bruno Haible  <bruno@clisp.org>
69624         Tweak last commit.
69625         * lib/unistd.in.h (sethostname): Keep declarations in alphabetic order.
69626         Fix preprocessor directives indentation. Fix typos.
69627         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Keep alphabetic order.
69628         * modules/unistd (Makefile): Likewise.
69630 2011-12-01  Ben Walton  <bwalton@artsci.utoronto.ca>
69632         Integrate the sethostname module into unistd.
69633         * lib/unistd.in.h: Integrate the SETHOSTNAME preprocessor handling
69634         into the unistd.h header.
69635         * m4/unistd_h.m4: Setup the autoconf handling for the SETHOSTNAME
69636         preprocessor directives.
69637         * modules/unistd: Setup the Makefile substitutions of the
69638         SETHOSTNAME preprocessor directives.
69640 2011-12-03  Bruno Haible  <bruno@clisp.org>
69642         Tweak last commit.
69643         * lib/sethostname.c: Don't include <string.h>.
69644         (sethostname): No need to copy the argument string to the stack. Don't
69645         call clearerr. Preserve errno when fprintf failed.
69646         * m4/sethostname.m4 (gl_FUNC_SETHOSTNAME): Comment about HOST_NAME_MAX.
69647         Don't invoke AC_REPLACE_FUNCS.
69648         * modules/sethostname (Link): Remove empty section.
69649         * doc/glibc-functions/sethostname.texi: Gnulib does not fix the ENOSYS
69650         failure problem.
69652 2011-12-01  Ben Walton  <bwalton@artsci.utoronto.ca>
69654         New module 'sethostname'.
69655         * lib/sethostname.c (sethostname): New file.  Provide sethostname
69656         for systems that lack it.
69657         * m4/sethostname.m4 (gl_FUNC_SETHOSTNAME): New file.  Detection of
69658         sethostname declaration and function.
69659         * modules/sethostname: New file.  Define the sethostname module.
69661 2011-12-03  Bruno Haible  <bruno@clisp.org>
69663         Tweak last commit.
69664         * m4/gethostname.m4 (gl_PREREQ_HOST_NAME_MAX): Trim blank line.
69666 2011-12-01  Ben Walton  <bwalton@artsci.utoronto.ca>
69668         Split the HOST_NAME_MAX detection into a separate m4 macro.
69669         * m4/gethostname.m4 (gl_PREREQ_HOST_NAME_MAX): Make this a separate
69670         macro so it can be used by the pending sethostname module.
69672 2011-12-03  Bruno Haible  <bruno@clisp.org>
69674         Fix module descriptions syntax.
69675         * modules/argv-iter (License): Fix syntax.
69676         * modules/di-set (License): Likewise.
69677         * modules/ino-map (License): Likewise.
69678         Reported by Stefano Lattarini <stefano.lattarini@gmail.com>.
69680 2011-12-02  Paul Eggert  <eggert@cs.ucla.edu>
69682         stdalign: port to Clang 3.0
69683         Problem reported by Simon Josefsson in
69684         <http://lists.gnu.org/r/bug-gnulib/2011-12/msg00005.html>.
69685         * doc/posix-headers/stdalign.texi (stdalign.h): Mention Clang 3.0,
69686         which has <stdalign.h> but which does not define alignof.
69687         * m4/stdalign.m4 (gl_STDALIGN_H): Check for Clang 3.0's problem.
69689 2011-12-01  Eric Blake  <eblake@redhat.com>
69691         mktempd: silence dd usage
69692         * build-aux/mktempd (rand_bytes): Silence dd.
69694 2011-11-30  Simon Josefsson  <simon@josefsson.org>
69696         manywarnings: Don't mention gcc version in docstring.
69697         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Doc fix.  Suggested by
69698         Jim Meyering <meyering@redhat.com>.
69700 2011-11-30  Jim Meyering  <meyering@redhat.com>
69702         hash: mark a few floating point constants with "f" suffix
69703         * lib/hash.c (DEFAULT_GROWTH_THRESHOLD, DEFAULT_GROWTH_FACTOR)
69704         (DEFAULT_SHRINK_THRESHOLD, DEFAULT_SHRINK_FACTOR): Mark literal
69705         floating point constants with "f", since they're destined to be
69706         saved/used as "float"s.
69708 2011-11-29  Paolo Bonzini  <bonzini@gnu.org>
69710         float tests: Correct and re-enable assertion about LDBL_MIN_EXP.
69711         * tests/test-float.c (test_long_double): Correct and re-enable the
69712         assertion about LDBL_MIN_EXP that was disabled on 2011-08-31.
69714 2011-11-29  Matthew Wala  <wala1@illinois.edu>  (tiny change)
69716         Avoid subtracting two pointers that don't point into the same block.
69717         * lib/argp-help.c (hol_append): Reorder pointer subtractions so that
69718         only pointers into the same memory block are subtracted. We cannot
69719         assume that sizeof (ptrdiff_t) == sizeof (void *).
69721 2011-11-29  Eric Blake  <eblake@redhat.com>
69723         maint.mk: add syntax check for use of compare from init.sh
69724         * top/maint.mk (sc_prohibit_reversed_compare_failure): New rule,
69725         moved here from coreutils.
69727         manywarnings: drop -Wunsuffixed-float-constants
69728         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): C99 does not allow
69729         '1.0D', which is the only way to silence this warning for 'double'.
69731 2011-11-29  Jim Meyering  <meyering@redhat.com>
69733         hash: mark compute_bucket_size with the pure attribute
69734         * lib/hash.c (compute_bucket_size): Use _GL_ATTRIBUTE_PURE.
69736         quotearg, propername: correct pragma guard expression
69737         * lib/quotearg.c: Enable pragma for gcc-4.6 and newer, not 4.3 and newer.
69738         * lib/propername.c: Likewise.  Reported by Bernhard Voelker.
69740 2011-11-28  Jim Meyering  <meyering@redhat.com>
69742         propername: do not mark proper_name with the const attribute
69743         * lib/propername.h (proper_name): Do *not* mark as _GL_ATTRIBUTE_CONST,
69744         since it examines data pointed to by its parameter.
69745         * lib/propername.c (proper_name): Instead, add a pragma to suppress
69746         the suggestion from -Wsuggest-attribute=const.
69748         propername: mark one more function as const
69749         * lib/propername.h (proper_name): Mark as _GL_ATTRIBUTE_CONST.
69751 2011-11-27  Jim Meyering  <meyering@redhat.com>
69753         mark functions with const and pure attributes
69755         Mark functions per suggestions from gcc-4.6 when using these options:
69756         -Wsuggest-attribute=pure -Wsuggest-attribute=const.
69757         Use gnulib's _GL_ATTRIBUTE_PURE and _GL_ATTRIBUTE_CONST macros.
69758         Follow these guidelines: when possible, apply the attribute to
69759         an extern declaration, not to its definition.  Apply it to the
69760         definition only when the definition is static.
69761         * lib/argmatch.h (argmatch, argmatch_to_argument): Mark.
69762         * lib/argv-iter.h (argv_iter_n_args): Likewise.
69763         * lib/base64.h (isbase64): Likewise.
69764         * lib/basename-lgpl.c (last_component, base_len): Likewise.
69765         * lib/c-ctype.h (c_isascii, c_isalnum, c_isalpha): Likewise.
69766         (c_isblank, c_iscntrl, c_isdigit, c_islower, c_isgraph): Likewise.
69767         (c_isprint, c_ispunct, c_isspace, c_isupper, c_isxdigit): Likewise.
69768         (c_tolower, c_toupper): Likewise.
69769         * lib/c-strcase.h (c_strcasecmp, c_strncasecmp): Likewise.
69770         * lib/chdir-long.c (find_non_slash): Likewise.
69771         * lib/dirname.h (base_len, dir_len, last_component): Likewise.
69772         * lib/exclude.h (fnmatch_pattern_has_wildcards): Likewise.
69773         * lib/file-type.h (file_type): Likewise.
69774         * lib/filenamecat-lgpl.c (longest_relative_suffix): Likewise.
69775         * lib/filevercmp.c (verrevcmp): Likewise.
69776         * lib/freadahead.h (freadahead): Likewise.
69777         * lib/fts.c (fts_maxarglen): Likewise.
69778         * lib/hash-pjw.h (hash_pjw): Likewise.
69779         * lib/hash-triple.h (triple_hash_no_name, triple_compare_ino_str):
69780         * lib/hash.c (is_prime, next_prime): Likewise.
69781         * lib/hash.c (hash_get_n_buckets, hash_get_n_buckets_used): Likewise.
69782         (hash_get_n_entries, hash_get_max_bucket_length): Likewise.
69783         (hash_table_ok, hash_get_first, hash_string): Likewise.
69784         (compute_bucket_size): Likewise.
69785         * lib/i-ring.h (i_ring_empty): Likewise.
69786         * lib/isnan.c (isnanl): Likewise.
69787         * lib/math.h (isnanl, rpl_isnanl): Likewise.
69788         * lib/memcasecmp.h (memcasecmp): Likewise.
69789         * lib/memchr2.h (memchr2): Likewise.
69790         * lib/memcmp2.h (memcmp2): Likewise.
69791         * lib/parse-datetime.y (lookup_zone): Likewise.
69792         * lib/sockets.h (gl_sockets_startup, gl_sockets_cleanup)
69793         [!WINDOWS_SOCKETS]: Likewise.
69794         * lib/strnlen1.h (strnlen1): Likewise.
69795         * lib/uniwidth.in.h (uc_width): Likewise.
69796         * lib/quotearg.c: Add pragma to avoid unwarranted suggestion from
69797         gcc's -Wsuggest-attribute=pure for quoting_options_from_style.
69798         (quoting_options_from_style): Add a comment.
69799         * lib/propername.h (proper_name): Add a comment.
69801 2011-11-27  Bruno Haible  <bruno@clisp.org>
69803         Remove unused macros from !_LIBC code in glibc-borrowed files.
69804         * lib/fnmatch.c (STRCOLL): Remove macro.
69805         * lib/fnmatch_loop.c (STRCOLL): Remove undef.
69806         * lib/glob.c (__stat, __readdir64): Remove macros.
69807         * lib/tempname.c (__open64, __xstat64): Remove macros.
69808         Suggested by Paul Eggert.
69810 2011-11-27  Bruno Haible  <bruno@clisp.org>
69812         getcwd: Fix link error on MSVC 9.
69813         * modules/getcwd (Depends-on): Add readdir, rewinddir.
69815 2011-11-27  Bruno Haible  <bruno@clisp.org>
69817         Don't set REPLACE_FOO to 1 if HAVE_FOO is 0.
69818         * m4/opendir.m4 (gl_FUNC_OPENDIR): Don't set REPLACE_OPENDIR to 1 if
69819         HAVE_OPENDIR is 0.
69820         * m4/closedir.m4 (gl_FUNC_CLOSEDIR): Don't set REPLACE_CLOSEDIR to 1 if
69821         HAVE_CLOSEDIR is 0.
69822         * m4/dup2.m4 (gl_FUNC_DUP2): Don't set REPLACE_DUP2 to 1 if HAVE_DUP2
69823         is 0.
69824         * m4/dup3.m4 (gl_FUNC_DUP3): Update comments.
69826 2011-11-27  Bruno Haible  <bruno@clisp.org>
69828         getcwd: Fix bug from 2011-08-17.
69829         * m4/getcwd.m4 (gl_FUNC_GETCWD): Set REPLACE_GETCWD to 1 only on
69830         platforms that need it.
69831         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): Consider a return
69832         code of 4 to be a failure, not a success. This ensures that
69833         REPLACE_GETCWD becomes 1 on OpenBSD 4.9 and NetBSD 5.1.
69835 2011-11-27  Bruno Haible  <bruno@clisp.org>
69837         binary-io tests: Avoid test failure on mingw when libtool is used.
69838         * tests/test-binary-io.c (main): Don't remove t-bin-out2.tmp here.
69839         Don't verify the size of t-bin-out1.tmp here.
69840         * tests/test-binary-io.sh: Verify it here.
69841         Reported by Simon Josefsson.
69843 2011-11-26  Bruno Haible  <bruno@clisp.org>
69845         Fix conflict between two instantiations of module 'unistd'.
69846         * gnulib-tool (func_emit_autoconf_snippet): Substitute
69847         ${include_guard_prefix} also in the autoconf snippet.
69848         * m4/getopt.m4 (gl_FUNC_GETOPT_POSIX): Don't set GNULIB_UNISTD_H_GETOPT.
69849         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Don't initialize
69850         GNULIB_UNISTD_H_GETOPT.
69851         * modules/getopt-posix (configure.ac): Set the
69852         GNULIB_${gl_include_guard_prefix}_UNISTD_H_GETOPT variable.
69853         * modules/getopt-gnu (configure.ac): Likewise.
69854         * modules/unistd (Makefile.am): Change the substitution value of
69855         GNULIB_UNISTD_H_GETOPT to depend on the include guard prefix.
69856         Reported by Simon Josefsson.
69858 2011-11-25  Bruno Haible  <bruno@clisp.org>
69860         pagealign_alloc: Doc and comments.
69861         * doc/posix-functions/posix_memalign.texi: Refer to the pagealign_alloc
69862         module.
69863         * lib/pagealign_alloc.c (pagealign_alloc): Add comment.
69865 2011-11-25  Jim Meyering  <meyering@redhat.com>
69867         test-update-copyright.sh: avoid false-positive failure
69868         * tests/test-update-copyright.sh: Use $TMP.? (not $TMP.*), to work
69869         around false positive failure on Cygwin/Windows.  The latter was
69870         matching erroneously-created files with names like
69871         update-copyright.test-ex.4.bak.  Reported by Simon Josefsson.
69873 2011-11-25  Simon Josefsson  <simon@josefsson.org>
69875         valgrind-tests.m4: Avoid breakage if valgrind on bash fails.
69876         * m4/valgrind-tests.m4: Check that the parameters that will be
69877         used works, not just a subset of them.  Reported by Bruno Haible
69878         <bruno@clisp.org>.
69880 2011-11-24  Jim Meyering  <meyering@redhat.com>
69882         test-stdalign.c: comment out long double tests
69883         * tests/test-stdalign.c: Don't try to reduce alignment of long double
69884         variables.  That provokes errors like this from gcc-4.7.0 20111124:
69885         error: '_Alignas' specifiers cannot reduce alignment of \
69886         'static_longdouble_alignas'.
69888 2011-11-22  Jim Meyering  <meyering@redhat.com>
69890         init.sh: make "compare /dev/null FILE" output more readable
69891         * tests/init.sh (compare_): Document the preferred order of arguments.
69892         (emit_diff_u_header_): New function.
69893         (compare_dev_null_): Emit a simulated diff, rather than just the
69894         contents of the unexpected file.  Suggestion from Bruno Haible.
69896 2011-11-21  Jim Meyering  <meyering@redhat.com>
69897             Eric Blake  <eblake@redhat.com>
69899         init.sh: work around OSF/1 5.1's mishandling of /dev/null
69900         * tests/init.sh: Make our compare function slightly more portable.
69901         Reported by Bruno Haible in
69902         http://thread.gmane.org/gmane.comp.gnu.grep.bugs/4020
69904 2011-11-21  Simon Josefsson  <simon@josefsson.org>
69906         * m4/gnulib-common.m4 (_Noreturn): Check that _MSC_VER is defined
69907         before using it, in code that ends up in config.h.
69909 2011-11-20  Bruno Haible  <bruno@clisp.org>
69911         getcwd: Work around getcwd bug on AIX 5..7.
69912         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Require
69913         AC_CANONICAL_HOST. Assign exit code 31 to the bug seen on AIX 5.1..7.1.
69914         Use a different value for gl_cv_func_getcwd_path_max. Move the
69915         definition of HAVE_PARTLY_WORKING_GETCWD from here...
69916         * m4/getcwd.m4 (gl_FUNC_GETCWD): ... to here. Invoke
69917         gl_FUNC_GETCWD_PATH_MAX also when $gl_cv_func_getcwd_null is 'no'.
69918         Define HAVE_MINIMALLY_WORKING_GETCWD.
69919         * lib/getcwd.c (__getcwd): Don't use the system's getcwd on platforms
69920         where it is not even minimally working, that is, on AIX.
69921         * tests/test-getcwd.c (test_long_name): Distinguish the same cases as
69922         m4/getcwd-path-max.m4.
69923         (main): Update exit code computation.
69924         * doc/posix-functions/getcwd.texi: Mention list of platforms where
69925         getcwd does not handle long file names.
69927 2011-11-20  Bruno Haible  <bruno@clisp.org>
69929         getcwd: Fix bug from 2009-09-10.
69930         * m4/getcwd.m4 (gl_FUNC_GETCWD): Treat "guessing yes" like "yes", not
69931         like "no".
69933 2011-11-20  Simon Josefsson  <simon@josefsson.org>
69935         * m4/manywarnings.m4: Add more warnings from gcc 4.6.2.
69937 2011-11-20  Bruno Haible  <bruno@clisp.org>
69939         fma tests: Avoid shadowing local variables.
69940         * tests/test-fma2.h (test_function): Reduce scope of x, y, z, result,
69941         expected.
69943 2011-11-20  Bruno Haible  <bruno@clisp.org>
69945         copysignf tests: Fix.
69946         * tests/test-copysignf.c: Fix signature check.
69948 2011-11-20  Bruno Haible  <bruno@clisp.org>
69950         fma: Remove unused code.
69951         * lib/fma.c (DECL_ROUNDING, BEGIN_ROUNDING, END_ROUNDING): Remove
69952         unused macros.
69954 2011-11-20  Bruno Haible  <bruno@clisp.org>
69956         sethostname: Fix doc about AIX.
69957         * doc/glibc-functions/sethostname.texi: Drop mention that AIX 5.1 lacks
69958         sethostname; it has it.
69960         sethostname: Mention more portability problems.
69961         * doc/glibc-functions/sethostname.texi: Mention the missing declaration
69962         problem.
69963         Reported by Ben Walton <bwalton@artsci.utoronto.ca>.
69965 2011-11-19  Bruno Haible  <bruno@clisp.org>
69967         Depend on module fcntl-h when AT_FDCWD is used.
69968         * modules/utimens (Depends-on): Add fcntl-h.
69969         * modules/areadlinkat (Depends-on): Likewise.
69970         * modules/areadlinkat-with-size (Depends-on): Likewise.
69971         * modules/faccessat (Depends-on): Likewise.
69972         * modules/fchmodat (Depends-on): Likewise.
69973         * modules/fchownat (Depends-on): Likewise.
69974         * modules/getcwd (Depends-on): Likewise.
69975         * modules/mkdirat (Depends-on): Likewise.
69976         * modules/mkfifoat (Depends-on): Likewise.
69977         * modules/readlinkat (Depends-on): Likewise.
69978         * modules/symlinkat (Depends-on): Likewise.
69979         * modules/dup2-tests (Depends-on): Likewise.
69980         * modules/fdutimensat-tests (Depends-on): Likewise.
69981         * modules/futimens-tests (Depends-on): Likewise.
69983 2011-11-19  Bruno Haible  <bruno@clisp.org>
69985         euidaccess: Update a comment.
69986         * lib/euidaccess.c: Update comment about platforms with faccessat.
69988 2011-11-19  Bruno Haible  <bruno@clisp.org>
69990         openat: Fix file list.
69991         * modules/openat (Files): Remove lib/at-func.c.
69993 2011-11-19  Bruno Haible  <bruno@clisp.org>
69995         fstatat: Simplify.
69996         * lib/fstatat.c (AT_FUNC_NAME): Define as fstatat. On platforms where
69997         gnulib should define rpl_fstatat, there is a
69998         "#define fstatat rpl_fstatat" in <sys/stat.h>.
70000 2011-11-19  Bruno Haible  <bruno@clisp.org>
70002         Ensure 'inline' can be used in tests/test-utimens-common.h.
70003         * modules/fdutimensat-tests (configure.ac): Require AC_C_INLINE.
70004         * modules/futimens-tests (configure.ac): Likewise.
70005         * modules/utimens-tests (configure.ac): Likewise.
70006         * modules/utimensat-tests (configure.ac): Likewise.
70008 2011-11-19  Simon Josefsson  <simon@josefsson.org>
70010         * lib/hash.c (hash_insert): Use hash_insert_if_absent,
70011         not hash_insert0.
70012         (hash_insert_if_absent): Doc fix.
70014 2011-11-19  Simon Josefsson  <simon@josefsson.org>
70016         * m4/readline.m4 (gl_FUNC_READLINE): Check for readline/history.h.
70018 2011-11-18  Paul Eggert  <eggert@cs.ucla.edu>
70020         test-getcwd: disambiguate exit status
70021         * tests/test-getcwd.c (test_long_name): Return 0..7.
70022         (main): Exit with an unambiguous exit status.  The old
70023         code yielded a mysterious mixture of two failure codes.
70025         fstatat: fix configuration bug on mingw, OpenBSD 4, Solaris 8
70026         * lib/fstatat.c (AT_FUNC_NAME): Use HAVE_FSTAT, not
70027         HAVE_WORKING_FSTATAT_ZERO_FLAG, to decide whether to define
70028         rpl_fstatat or fstatat.  This should fix the other problem
70029         reported by Kai Habel in
70030         <http://lists.gnu.org/r/bug-gnulib/2011-11/msg00237.html>.
70031         A similar problem was reported for OpenBSD 4.6 by Mats Erik Andersson
70032         <http://lists.gnu.org/r/bug-gnulib/2011-11/msg00239.html>
70033         and I reproduced it on a Solaris 8 host we still have in production.
70035 2011-11-18  Jim Meyering  <meyering@redhat.com>
70037         hash: deprecate poorly-named hash_insert0: use hash_insert_if_absent
70038         * lib/hash.c (hash_insert_if_absent): Rename from hash_insert0.
70039         Add a sentence to the comment.
70040         (hash_insert0): New function that simply calls hash_insert_if_absent.
70041         * lib/hash.h (hash_insert_if_absent): Declare it.
70042         (hash_insert0): Add deprecation attribute.
70043         (_GL_ATTRIBUTE_DEPRECATED): Define.
70044         * lib/di-set.c (di_set_insert): Use hash_insert_if_absent,
70045         not hash_insert0.
70046         * NEWS: Mention it, even though it's not really an incompatible change.
70048 2011-11-18  Dagobert Michelsen  <dam@opencsw.org>  (tiny change)
70050         openat: avoid compilation failure due to lack of <errno.h> inclusion
70051         * lib/openat.c: Include <errno.h>.
70053 2011-11-17  Paul Eggert  <eggert@cs.ucla.edu>
70055         * modules/getcwd (Depends-on): Add fdopendir.
70056         This fixes one of the two problems reported by Kai Habel in
70057         <http://lists.gnu.org/r/bug-gnulib/2011-11/msg00237.html>.
70059         modules/crypto/gc-*: simplify dependencies and fix stdalign.h bug
70060         stdalign problem reported by Ian Beckwith in
70061         <http://lists.gnu.org/r/bug-gnulib/2011-11/msg00238.html>.
70062         * modules/crypto/gc-arcfour (Depends-on):
70063         Depend conditionally on crypto/arcfour.
70064         * modules/crypto/gc-arctwo (Depends-on):
70065         Depend conditionally on crypto/arctwo.
70066         * modules/crypto/gc-des (Depends-on):
70067         Depend conditionally on crypto/des.
70068         * modules/crypto/gc-hmac-md5 (Depends-on):
70069         Depend conditionally on crypto/hmac-md5.
70070         * modules/crypto/gc-hmac-sha1 (Depends-on):
70071         Depend conditionally on crypto/hmac-sha1.
70072         * modules/crypto/gc-md2 (Depends-on): Remove stdint, minmax.
70073         * modules/crypto/gc-md4 (Depends-on):
70074         Depend conditionally on crypto/md4.
70075         * modules/crypto/gc-md5 (Depends-on):
70076         Depend conditionally on crypto/md5.
70077         * modules/crypto/gc-rijndael (Depends-on):
70078         Depend conditionally on crypto/rijndael.
70079         * modules/crypto/gc-sha1 (Depends-on):
70080         Depend conditionally on crypto/sha1.
70081         * modules/crypto/gc-arcfour:
70082         * modules/crypto/gc-arctwo:
70083         * modules/crypto/gc-des:
70084         * modules/crypto/gc-hmac-md5:
70085         * modules/crypto/gc-hmac-sha1:
70086         * modules/crypto/gc-md2:
70087         * modules/crypto/gc-md4:
70088         * modules/crypto/gc-md5:
70089         * modules/crypto/gc-rijndael:
70090         * modules/crypto/gc-sha1:
70091         (Files, Depends-on, configure.ac): Remove now-unnecessary stuff,
70092         now that the conditional dependencies do the work for us.
70094 2011-11-17  Jim Meyering  <meyering@redhat.com>
70096         tests: factor st_ctime-comparison out of two headers
70097         * tests/test-utimens-common.h (ctime_compare): Define.
70098         * tests/test-futimens.h (test_futimens): Replace open-coded equivalent.
70099         * tests/test-lutimens.h (test_lutimens): Likewise.
70100         * tests/test-utimens.h (test_utimens): Likewise.
70102         test-getcwd: don't leave behind a confdir3/ directory upon interrupt
70103         Invoke the test program via an init.sh-using wrapper.
70104         * tests/test-getcwd.sh: New file.
70105         * modules/getcwd-tests (Files): Add it.
70106         (Makefile.am) [TESTS]: Invoke the shell script wrapper.
70108 2011-11-01  Gary V. Vaughan  <gary@gnu.org>
70110         gitlog-to-changelog: support multi-author commits.
70111         The FSF cares about keeping track of all authors of patches to its
70112         projects, but Git doesn't provide obvious support for multi-author
70113         changesets. Consensus seems to be forming around the use of extra
70114         Signed-off-by inspired lines in the log message formatted as
70115         `Co-authored-by: A U Thor <email@example.com>' for round-tripping
70116         multi-author commits between version control systems.
70117         * gitlog-to-changelog: Extract `Co-authored-by:' lines from the git
70118         log message and output in standard ChangeLog multi-author format.
70119         Reported by Peter Rosin <peda@lysator.liu.se>
70121 2011-11-15  Ben Walton  <bwalton@artsci.utoronto.ca>  (tiny change)
70122             Bruno Haible  <bruno@clisp.org>
70124         Fix some modules' file list.
70125         * modules/fstatat (Files): Add m4/lstat.m4.
70126         * modules/openat (Files): Likewise.
70127         * modules/unlinkat (Files): Likewise.
70129 2011-11-15  Gary V. Vaughan  <gary@gnu.org>
70131         maint.mk: fix tight-scope.mk generation in VPATH builds.
70132         * top/maint.mk (tight-scope.mk): Make sure to prefix file
70133         reference with $(srcdir) so that the file is found correctly even
70134         when running `make syntax-check' in a VPATH build.
70136 2011-11-13  Bruno Haible  <bruno@clisp.org>
70137             Jim Meyering  <meyering@redhat.com>
70139         Silence successful tests that use 'compare' on AIX, HP-UX, Solaris.
70140         * tests/init.sh (compare): Remove "No differences encountered" or
70141         synonymous output from the 'diff' program.
70143 2011-11-13  Bruno Haible  <bruno@clisp.org>
70145         Makefile: Tweak indentation.
70146         * Makefile: Use tab as first character in every line that contains rule
70147         commands.
70149 2011-11-13  Bruno Haible  <bruno@clisp.org>
70151         Syntax check for copyright statements.
70152         * check-copyright: New file.
70153         * Makefile (sc_check_copyright): New rule.
70155 2011-11-13  Simon Josefsson  <simon@josefsson.org>
70157         * build-aux/git-version-gen: Add --prefix to configure the tag
70158         match string.
70160 2011-11-13  Simon Josefsson  <simon@josefsson.org>
70162         * build-aux/git-version-gen: Add --help and --version.
70164 2011-11-12  Jim Meyering  <meyering@redhat.com>
70166         revamp the other test-exclude?.sh scripts to use init.sh, too
70167         * tests/test-exclude1.sh: Use init.sh.
70168         * tests/test-exclude2.sh: Likewise.
70169         * tests/test-exclude3.sh: Likewise.
70170         * tests/test-exclude4.sh: Likewise.
70171         * tests/test-exclude5.sh: Likewise.
70172         * tests/test-exclude6.sh: Likewise.
70173         * tests/test-exclude7.sh: Likewise.
70174         * tests/test-exclude8.sh: Likewise.
70175         * modules/exclude-tests (Files): List init.sh.
70177         test-exclude2.sh, test-exclude5.sh: fail if test-exclude fails
70178         These shell scripts ignored failure of the binary test-exclude,
70179         so making the latter return 77 didn't cause them to be skipped.
70180         * tests/test-exclude5.sh: Exit with test-exclude's error status
70181         when that program fails.  Revamp to use init.sh.
70182         * tests/test-exclude2.sh: Likewise.
70184         test-exclude: fix a typo
70185         * tests/test-exclude.c (main): Test for "leading_dir", not "leading-dir".
70187 2011-11-11  Bruno Haible  <bruno@clisp.org>
70189         obstack: Fix compilation error on MSVC 9.
70190         * lib/obstack.c (print_and_abort): Declare with _Noreturn specifier.
70192 2011-11-11  Jim Meyering  <meyering@redhat.com>
70194         test-exclude: skip tests rather than failing on deficient systems
70195         * tests/test-exclude.c (main): Skip tests that use FNM_CASEFOLD
70196         and FNM_LEADING_DIR on systems that lack the definitions.  This affects
70197         at least Solaris 9.  Reported and diagnosed by Dagobert Michelsen in
70198         http://thread.gmane.org/gmane.comp.gnu.grep.bugs/3947/focus=3950
70200 2011-11-10  Bruno Haible  <bruno@clisp.org>
70202         ptsname_r test: Avoid gcc warning on glibc systems.
70203         * tests/test-ptsname_r.c (null_ptr): New function.
70204         (test_errors): Use it.
70206 2011-11-10  Bruno Haible  <bruno@clisp.org>
70208         ptsname_r: Avoid compilation error on OSF/1 5.1.
70209         * lib/stdlib.in.h (ptsname_r): Override if REPLACE_PTSNAME_R is 1.
70210         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize REPLACE_PTSNAME_R.
70211         * m4/ptsname_r.m4 (gl_FUNC_PTSNAME_R): Set REPLACE_PTSNAME_R if the
70212         function is not declared or incompatibly declared.
70213         * modules/stdlib (Makefile.am): Substitute REPLACE_PTSNAME_R.
70214         * modules/ptsname_r (Depends-on, configure.ac): Update.
70215         * doc/glibc-functions/ptsname_r.texi: Mention the OSF/1 problems.
70217 2011-11-10  Bruno Haible  <bruno@clisp.org>
70219         fstatat: Make cross-compilation guess succeed everywhere except on AIX.
70220         * m4/fstatat.m4 (gl_FUNC_FSTATAT): Require AC_CANONICAL_HOST.
70221         When cross-compiling, guess yes on all platforms except AIX.
70222         Reported by Ludovic Courtès <ludo@gnu.org>.
70224 2011-11-09  Bruno Haible  <bruno@clisp.org>
70226         ptsname_r tests: Fix bugs.
70227         * tests/test-ptsname_r.c (test_errors): Change return type to 'void'.
70228         Fix ptsname_r calls. Reduce loop rounds to a reasonable amount.
70230 2011-11-09  Paul Eggert  <eggert@cs.ucla.edu>
70232         fstatat: work with cross-compilation
70233         Problem reported by Ludovic Courtès in
70234         <http://lists.gnu.org/r/bug-gnulib/2011-11/msg00136.html>.
70235         * m4/fstatat.m4 (gl_FUNC_FSTATAT): When cross-compiling, report
70236         "cross-compiling" and assume the bug is present.  Replace
70237         FSTATAT_ZERO_FLAG_BROKEN with HAVE_WORKING_FSTATAT_ZERO_FLAG with
70238         an inverted sense, to be more conservative about our assumptions.
70239         * lib/fstatat.c (rpl_fstatat): Adjust to renamed macro.
70241 2011-11-09  Bruno Haible  <bruno@clisp.org>
70243         Improve MODULES.html output.
70244         * modules/mkfifoat (Description): Use the word "function".
70245         * modules/readlinkat (Description): Likewise.
70246         * modules/symlinkat (Description): Likewise.
70248 2011-11-09  Eric Blake  <eblake@redhat.com>
70250         ptsname_r-tests: new test module
70251         * modules/ptsname_r-tests: New module.
70252         * tests/test-ptsname_r.c: New file.
70254         ptsname_r: new module
70255         * modules/ptsname_r: New module.
70256         * m4/ptsname_r.m4 (gl_FUNC_PTSNAME_R): New file.
70257         * lib/ptsname.c (__ptsname_r): Split...
70258         * lib/ptsname_r.c: ...into new file.
70259         * m4/stdlib_h.m4 (gl_STDLIB_H): Check for decl.
70260         (gl_STDLIB_H_DEFAULTS): Set witness defaults.
70261         * modules/stdlib (Makefile.am): Substitute witnesses.
70262         * lib/stdlib.in.h (ptsname_r): Declare it.
70263         * doc/glibc-functions/ptsname_r.texi (ptsname_r): Document it.
70264         * MODULES.html.sh (Misc): Likewise.
70265         * modules/ptsname (Depends-on): Alter dependency.
70266         * doc/posix-functions/ptsname.texi (ptsname): Mention new module.
70268 2011-11-09  Jim Meyering  <meyering@redhat.com>
70270         announce-gen: be more concise when there's only one URL+tarball
70271         * build-aux/announce-gen (get_tool_versions): When you distribute
70272         only one type of tarball, combine the first two "Here are..."
70273         sections and make the key-checking grammar independent of
70274         how many tarballs there are.
70276 2011-11-09  Eric Blake  <eblake@redhat.com>
70278         openpty: provide a stub on mingw
70279         * lib/pty.in.h (includes): Provide forward declarations.
70280         * lib/openpty.c (openpty) [mingw]: Provide ENOSYS stub.
70282         raise: fix mingw handling of SIGPIPE
70283         * lib/sigprocmask.c (_gl_raise_SIGPIPE): Provide a return value.
70285 2011-11-08  Bruno Haible  <bruno@clisp.org>
70287         More conditional dependencies.
70288         * modules/faccessat (Depends-on): Add conditions.
70289         * modules/fchmodat (Depends-on): Likewise.
70290         * modules/fchownat (Depends-on): Likewise.
70291         * modules/fstatat (Depends-on): Likewise.
70292         * modules/mkfifoat (Depends-on): Likewise.
70293         * modules/readlinkat (Depends-on): Likewise.
70294         * modules/symlinkat (Depends-on): Likewise.
70295         * modules/unlinkat (Depends-on): Likewise.
70296         * modules/utimensat (Depends-on): Likewise.
70297         * modules/mkdirat (Depends-on): Add sys_stat. Add conditions.
70298         * modules/linkat (Depends-on): Refine the conditions.
70299         * modules/renameat (Depends-on): Likewise.
70301 2011-11-08  Bruno Haible  <bruno@clisp.org>
70303         faccessat: Move AC_LIBOBJ invocation to module description.
70304         * m4/faccessat.m4 (gl_PREREQ_FACCESSAT): New macro.
70305         (gl_FUNC_FACESSAT): Don't test for access() here. Move AC_LIBOBJ
70306         invocation from here...
70307         * modules/faccessat (configure.ac): ... to here. Invoke
70308         gl_PREREQ_FACCESSAT.
70310 2011-11-08  Bruno Haible  <bruno@clisp.org>
70312         faccessat: Simplify autoconf macro.
70313         * m4/faccessat.m4 (gl_FUNC_FACCESSAT): Don't require gl_FUNC_OPENAT,
70314         gl_FUNC_EUIDACCESS.
70316 2011-11-08  Bruno Haible  <bruno@clisp.org>
70318         renameat: Fix dependencies.
70319         * modules/renameat (Depends-on): Add stdbool.
70321 2011-11-08  Bruno Haible  <bruno@clisp.org>
70323         mkfifoat: Fix module description.
70324         * modules/mkfifoat (configure.ac): Invoke gl_SYS_STAT_MODULE_INDICATOR,
70325         not gl_UNISTD_MODULE_INDICATOR.
70327 2011-11-08  Bruno Haible  <bruno@clisp.org>
70329         fstatat: Remove unused dependency.
70330         * modules/fstatat (Depends-on): Remove fstat.
70332 2011-11-08  Simon Josefsson  <simon@josefsson.org>
70334         GNUmakefile: behave when Makefile is missing.
70335         * top/GNUmakefile: Always initialize _build-aux and _autoreconf.
70337 2011-11-08  Bruno Haible  <bruno@clisp.org>
70339         openat: Conditionalize dependencies.
70340         * lib/openat.c: Reduce the scope of some #includes.
70341         * modules/openat (Depends-on): Add conditions.
70343 2011-11-07  Jim Meyering  <meyering@redhat.com>
70345         maint.mk: extract GPG key ID without using a temporary file
70346         * top/maint.mk (gpg_key_ID): Extract GPG key ID from signed tag, but
70347         without using a temporary file.  Based on a suggestion from Werner Koch
70348         in http://thread.gmane.org/gmane.comp.encryption.gpg.devel/16496
70350 2011-11-07  Eric Blake  <eblake@redhat.com>
70352         grantpt: fix typo
70353         * lib/stdlib.in.h (grantpt): Check correct function.
70355         maint.mk: silence new syntax check
70356         * top/maint.mk (sc_prohibit_dirent_without_use): Add missing @.
70358 2011-11-06  Bruno Haible  <bruno@clisp.org>
70360         Doc about floating-point and math API.
70361         * doc/posix-headers/float.texi: Mention problem with FLT_ROUNDS.
70362         * doc/posix-headers/math.texi: Mention problem with math_errhandling.
70364 2011-11-06  Bruno Haible  <bruno@clisp.org>
70366         stdalign tests: Skip the test when compiled by Sun C.
70367         * tests/test-stdalign.c (main): Skip the test on Sun C.
70369 2011-11-06  Bruno Haible  <bruno@clisp.org>
70371         ansi-c++-opt: Complete the 2011-06-05 change.
70372         * m4/ansi-c++.m4 (gl_PROG_ANSI_CXX): When a C++ compiler is found but
70373         does not support namespaces, set the variable to "no", not to ":".
70375 2011-11-06  Paul Eggert  <eggert@cs.ucla.edu>
70377         * doc/posix-headers/stdalign.texi (stdalign.h): Mention Sun review ID.
70379 2011-11-06  Bruno Haible  <bruno@clisp.org>
70381         copysignl: Fix result for zero argument on HP-UX 11 with HP C.
70382         * lib/copysignl.c (compute_minus_zerol) [HP-UX]: New function.
70383         (minus_zerol) [HP-UX]: New macro.
70384         (unary_minus) [HP-UX]: New function.
70385         (copysignl) [HP-UX]: Use unary_minus function.
70387 2011-11-06  Bruno Haible  <bruno@clisp.org>
70389         ldexp, ldexpf, ldexpl: Enhance tests.
70390         * tests/test-ldexp.h: New file, combining code from tests/test-ldexp.c
70391         and tests/test-ldexpl.c.
70392         * tests/test-ldexpl.c: (DOUBLE, ISNAN, INFINITY, NAN, L_, MINUS_ZERO,
70393         LDEXP, MIN_EXP, MAX_EXP): New macros.
70394         Include test-ldexp.h.
70395         (main): Just call test_function.
70396         * tests/test-ldexp.c: Include float.h, isnand-nolibm.h, minus-zero.h,
70397         infinity.h, nan.h.
70398         (DOUBLE, ISNAN, INFINITY, NAN, L_, MINUS_ZERO, LDEXP, MIN_EXP,
70399         MAX_EXP): New macros.
70400         Include test-ldexp.h.
70401         (x, y): Remove variables.
70402         (main): Just call test_function.
70403         * tests/test-ldexpf.c: Include float.h, isnanf-nolibm.h, minus-zero.h,
70404         infinity.h, nan.h.
70405         (DOUBLE, ISNAN, INFINITY, NAN, L_, MINUS_ZERO, LDEXP, MIN_EXP,
70406         MAX_EXP): New macros.
70407         Include test-ldexp.h.
70408         (x, y): Remove variables.
70409         (main): Just call test_function.
70410         * modules/ldexpl-tests (Files): Add tests/test-ldexp.h.
70411         * modules/ldexp-tests (Files): Add tests/test-ldexp.h,
70412         tests/minus-zero.h, tests/infinity.h, tests/nan.h.
70413         (Depends-on): Add isnand-nolibm, signbit, float.
70414         * modules/ldexpf-tests (Files): Add tests/test-ldexp.h,
70415         tests/minus-zero.h, tests/infinity.h, tests/nan.h.
70416         (Depends-on): Add isnanf-nolibm, signbit, float.
70418 2011-11-06  Bruno Haible  <bruno@clisp.org>
70420         math tests: Cosmetics.
70421         * tests/test-math-c++.cc: Reorder declarations.
70423 2011-11-05  Bruno Haible  <bruno@clisp.org>
70425         fma*: Simplify test.
70426         * tests/test-fma2.h (FORGIVE_GLIBC_BUG): Remove macro.
70427         (test_function): Remove all if (FORGIVE_GLIBC_BUG) statements.
70429         Tests for module 'fmal'.
70430         * modules/fmal-tests: New file.
70431         * tests/test-fmal1.c: New file.
70432         * tests/test-fmal2.c: New file.
70434         New module 'fmal'.
70435         * lib/math.in.h (fmal): New declaration.
70436         * lib/fmal.c: New file.
70437         * m4/fmal.m4: New file.
70438         * m4/math_h.m4 (gl_MATH_H): Test whethern fmal is declared.
70439         (gl_MATH_H_DEFAULTS): Initialize GNULIB_FMAL, HAVE_FMAL, REPLACE_FMAL.
70440         * modules/math (Makefile.am): Substitute GNULIB_FMAL, HAVE_FMAL,
70441         REPLACE_FMAL.
70442         * modules/fmal: New file.
70443         * doc/posix-functions/fmal.texi: Mention the new module and the various
70444         bugs.
70446         Tests for module 'fmaf'.
70447         * modules/fmaf-tests: New file.
70448         * tests/test-fmaf1.c: New file.
70449         * tests/test-fmaf2.c: New file.
70451         New module 'fmaf'.
70452         * lib/math.in.h (fmaf): New declaration.
70453         * lib/fmaf.c: New file.
70454         * m4/fmaf.m4: New file.
70455         * m4/math_h.m4 (gl_MATH_H): Test whethern fmaf is declared.
70456         (gl_MATH_H_DEFAULTS): Initialize GNULIB_FMAF, HAVE_FMAF, REPLACE_FMAF.
70457         * modules/math (Makefile.am): Substitute GNULIB_FMAF, HAVE_FMAF,
70458         REPLACE_FMAF.
70459         * modules/fmaf: New file.
70460         * doc/posix-functions/fmaf.texi: Mention the new module and the various
70461         bugs.
70463         Tests for module 'fma'.
70464         * modules/fma-tests: New file.
70465         * tests/test-fma1.c: New file.
70466         * tests/test-fma1.h: New file.
70467         * tests/test-fma2.c: New file.
70468         * tests/test-fma2.h: New file.
70470         New module 'fma'.
70471         * lib/math.in.h (fma): New declaration.
70472         * lib/fma.c: New file.
70473         * m4/fma.m4: New file.
70474         * m4/fegetround.m4: New file.
70475         * m4/math_h.m4 (gl_MATH_H): Test whethern fma is declared.
70476         (gl_MATH_H_DEFAULTS): Initialize GNULIB_FMA, HAVE_FMA, REPLACE_FMA.
70477         * modules/math (Makefile.am): Substitute GNULIB_FMA, HAVE_FMA,
70478         REPLACE_FMA.
70479         * modules/fma: New file.
70480         * doc/posix-functions/fma.texi: Mention the new module and the various
70481         bugs.
70483         Extend gl_MATHFUNC.
70484         * m4/mathfunc.m4 (gl_MATHFUNC): Accept an 4th parameter of INCLUDES.
70485         Support 'void' as argument type.
70486         * m4/rint.m4 (gl_FUNC_RINT): Update gl_MATHFUNC invocation.
70488 2011-11-05  Jim Meyering  <meyering@redhat.com>
70490         maint.mk: also prohibit inclusion of dirent.h without use
70491         * top/maint.mk (sc_prohibit_dirent_without_use): New rule.
70493 2011-11-05  Bruno Haible  <bruno@clisp.org>
70495         ldexpl tests: Avoid test failure on MSVC 9.
70496         * tests/test-ldexpl.c (main): Use a temporary variable for the expected
70497         value. Needed in order to enforce the conversion from a value greater
70498         than LDBL_MAX to Infinity.
70500 2011-11-05  Bruno Haible  <bruno@clisp.org>
70502         New modules 'at-internal', 'openat-h', split off from module 'openat'.
70503         * modules/at-internal: New file, extracted from modules/openat.
70504         * modules/openat-h: New file.
70505         * m4/openat.m4 (gl_FUNC_OPENAT): Don't set GNULIB_OPENAT. Don't
70506         invoke gl_PREREQ_OPENAT and gl_MODULE_INDICATOR.
70507         * modules/openat (Description): Add reference to POSIX function.
70508         (Files): Remove lib/openat.h, lib/openat-proc.c.
70509         (Depends-on): Add at-internal, openat-h. Remove fdopendir, gettext-h,
70510         intprops, unistd.
70511         (configure.ac): Remove AC_LIBOBJ of openat-proc. Invoke
70512         gl_PREREQ_OPENAT, gl_MODULE_INDICATOR here. Invoke
70513         gl_FCNTL_MODULE_INDICATOR.
70514         (Include): Remove unistd.h, openat.h.
70515         * modules/areadlinkat (Files): Add lib/at-func.c.
70516         (Depends-on): Add at-internal, dosname, errno, extensions, fchdir,
70517         openat-die, openat-h, save-cwd.
70518         * modules/areadlinkat-with-size (Files): Add lib/at-func.c.
70519         (Depends-on): Add at-internal, dosname, errno, extensions, fchdir,
70520         openat-die, openat-h, save-cwd, unistd.
70521         * modules/faccessat (Files): Add lib/at-func.c, lib/openat-priv.h.
70522         (Depends-on): Add at-internal, dosname, errno, fchdir, openat-die,
70523         openat-h, save-cwd. Remove fcntl-h, openat.
70524         * modules/fchmodat (Files): Remove lib/openat.h.
70525         (Depends-on): Add at-internal, openat-h. Remove dirent, fcntl-h,
70526         openat, stdbool, unistd.
70527         * modules/fchownat (Files): Remove lib/openat.h.
70528         (Depends-on): Add at-internal, openat-h. Remove dirent, fcntl-h,
70529         openat, stdbool, sys_stat.
70530         * modules/fdopendir (Files): Remove lib/openat-priv.h,
70531         lib/openat-proc.c.
70532         (Depends-on): Add at-internal.
70533         (condigure.ac): Remove AC_LIBOBJ of openat-proc.
70534         * modules/fstatat (Files): Remove lib/openat.h.
70535         (Depends-on): Add at-internal, openat-h. Remove dirent, openat,
70536         stdbool, unistd.
70537         * modules/fts (Depends-on): Add openat-h.
70538         * modules/linkat (Depends-on): Add at-internal, openat-h. Remove
70539         openat.
70540         * modules/mkdirat (Files): Remove lib/openat.h.
70541         (Depends-on): Add at-internal, openat-h. Remove dirent, fcntl-h,
70542         openat, stdbool, sys_stat.
70543         * modules/mkfifoat (Files): Add lib/at-func.c.
70544         (Depends-on): Add at-internal, dosname, errno, fchdir, openat-die,
70545         openat-h, save-cwd. Remove fcntl-h, openat.
70546         * modules/openat-die (Depends-on): Add openat-h. Remove openat.
70547         * modules/readlinkat (Files): Add lib/at-func.c.
70548         (Depends-on): Add at-internal, dosname, errno, fchdir, openat-die,
70549         openat-h, save-cwd. Remove fcntl-h, openat.
70550         * modules/renameat (Depends-on): Add at-internal, openat-h. Remove
70551         openat.
70552         * modules/selinux-at (Files): Add lib/at-func.c.
70553         (Depends-on): Add at-internal, dosname, errno, extensions, fchdir,
70554         fcntl-h, openat-die, openat-h, save-cwd, unistd. Remove openat.
70555         * modules/symlinkat (Files): Add lib/at-func.c.
70556         (Depends-on): Add at-internal, dosname, errno, fchdir, openat-die,
70557         openat-h, save-cwd. Remove fcntl-h, openat.
70558         * modules/unlinkat (Files): Remove lib/openat.h.
70559         (Depends-on): Add at-internal, openat-h. Remove dirent, openat,
70560         stdbool.
70561         * modules/utimensat (Files): Add lib/at-func.c.
70562         (Depends-on): Add at-internal, dosname, errno, fchdir, fcntl-h,
70563         openat-die, openat-h, save-cwd.
70564         * modules/fchownat-tests (Depends-on): Add openat-h. Remove openat.
70565         * modules/fdutimensat-tests (Depends-on): Add openat.
70566         * modules/fstatat-tests (Depends-on): Add openat-h.
70567         * modules/readlinkat-tests (Depends-on): Add openat.
70568         * modules/symlinkat-tests (Depends-on): Add openat.
70570 2011-11-05  Bruno Haible  <bruno@clisp.org>
70572         openat: Include <stdbool.h>.
70573         * lib/openat.c: Include <stdbool.h>.
70575 2011-11-04  Bruno Haible  <bruno@clisp.org>
70577         fchownat, renameat, unlinkat: Fix dependencies.
70578         * modules/fchownat (Depends-on): Add fstatat.
70579         * modules/renameat (Depends-on): Likewise.
70580         * modules/unlinkat (Depends-on): Likewise.
70582 2011-11-04  Paul Eggert  <eggert@cs.ucla.edu>
70584         openat: remove direct dependency on dirent
70585         * lib/openat.h: Don't include <dirent.h>; it's no longer needed,
70586         and hasn't been needed ever since fdopendir was split into its own
70587         module on 2009-08-31.
70588         * modules/openat (Depends-on): Remove dirent.
70590 2011-11-04  Bruno Haible  <bruno@clisp.org>
70592         renameat: Optimize code size.
70593         * modules/renameat (configure.ac): Don't compile at-func2.c if
70594         REPLACE_RENAMEAT is 1.
70596 2011-11-04  Bruno Haible  <bruno@clisp.org>
70598         openat tests: Fix file list.
70599         * modules/openat-tests (Files): Add tests/test-open.h.
70601 2011-11-04  Bruno Haible  <bruno@clisp.org>
70603         openat, fchmodat, fchownat, linkat, renameat: Fix dependencies.
70604         * modules/fchmodat (Depends-on): Add openat-die.
70605         * modules/fchownat (Depends-on): Likewise.
70606         * modules/linkat (Depends-on): Likewise.
70607         * modules/renameat (Depends-on): Likewise.
70608         * modules/openat (Depends-on): Add dirent.
70610 2011-11-04  Jim Meyering  <meyering@redhat.com>
70612         at-func*.c: fix comments
70613         * lib/at-func2.c: Correct/improve first-line comment.
70614         * lib/at-func.c: Correct grammar in first-line comment.
70616 2011-11-04  Bruno Haible  <bruno@clisp.org>
70618         New module 'mkdirat', split off from module 'openat'.
70619         * m4/mkdirat.m4: New file. extracted from m4/openat.m4.
70620         * m4/openat.m4 (gl_FUNC_OPENAT): Don't require gl_SYS_STAT_H_DEFAULTS.
70621         Don't test for mkdirat. Don't set GNULIB_MKDIRAT, HAVE_MKDIRAT.
70622         * modules/mkdirat: New file, extracted from modules/openat.
70623         * modules/openat (Files): Remove lib/mkdirat.c.
70624         (Depends-on): Remove mkdir.
70625         (configure.ac): Remove AC_LIBOBJ of mkdirat.
70626         (Include): Remove <sys/stat.h>.
70627         * modules/mkdirat-tests: New file, extracted from modules/openat-tests.
70628         * modules/openat-tests (Files): Remove tests/test-mkdirat.c,
70629         tests/test-mkdir.h.
70630         (Depends-on): Remove ignore-value.
70631         (Makefile.am): Remove rules for test-mkdirat.
70632         * doc/posix-functions/mkdirat.texi: Mention module 'mkdirat' instead
70633         of module 'openat'.
70634         * NEWS: Mention the change.
70636 2011-11-04  Bruno Haible  <bruno@clisp.org>
70638         closedir: Avoid warning on mingw.
70639         * lib/closedir.c: Include <unistd.h>.
70641 2011-11-04  Bruno Haible  <bruno@clisp.org>
70643         New module 'fstatat', split off from module 'openat'.
70644         * lib/openat.h (statat, lstatat): Enable only if GNULIB_FSTATAT is
70645         defined.
70646         * m4/fstatat.m4: New file. extracted from m4/openat.m4.
70647         * m4/openat.m4 (gl_FUNC_OPENAT): Don't set GNULIB_FSTATAT. Don't invoke
70648         gl_FUNC_FSTATAT.
70649         (gl_FUNC_FSTATAT): Moved to m4/fstatat.m4.
70650         * modules/fstatat: New file, extracted from modules/openat.
70651         * modules/openat (Files): Remove lib/fstatat.c.
70652         (Depends-on): Remove lstat.
70653         (configure.ac): Remove AC_LIBOBJ of fstatat.
70654         * modules/fstatat-tests: New file, extracted from modules/openat-tests.
70655         * modules/openat-tests (Files): Remove tests/test-fstatat.c,
70656         tests/test-lstat.h, tests/test-stat.h.
70657         (Depends-on): Remove getcwd-lgpl.
70658         (Makefile.am): Remove rules for test-fstatat.
70659         * doc/posix-functions/fstatat.texi: Mention module 'fstatat' instead
70660         of module 'openat'.
70661         * NEWS: Mention the change.
70662         * modules/getcwd (Depends-on): Add fstatat.
70663         * modules/linkat (Depends-on): Likewise.
70664         * modules/mkfifoat-tests (Depends-on): Likewise.
70665         * modules/utimensat (Depends-on): Add fstatat. Remove openat.
70667 2011-11-03  Bruno Haible  <bruno@clisp.org>
70669         New module 'unlinkat', split off from module 'openat'.
70670         * m4/unlinkat.m4: New file, extracted from m4/openat.m4.
70671         * m4/openat.m4 (gl_FUNC_OPENAT): Don't set GNULIB_UNLINKAT,
70672         REPLACE_UNLINKAT, HAVE_UNLINKAT. Don't test for unlinkat.
70673         * modules/unlinkat: New file, extracted from modules/openat. Correct
70674         the dependency conditions.
70675         * modules/openat (Files): Remove lib/unlinkat.c.
70676         (Depends-on): Remove rmdir, unlink.
70677         (configure.ac): Remove AC_LIBOBJ of unlinkat.
70678         * modules/unlinkat-tests: New file, extracted from modules/openat-tests.
70679         * modules/openat-tests (Files): Remove tests/test-unlinkat.c,
70680         tests/test-rmdir.h, tests/test-unlink.h.
70681         (Depends-on): Remove unlinkdir.
70682         (Makefile.am): Remove rules for test-unlinkat.
70683         * doc/posix-functions/unlinkat.texi: Mention module 'unlinkat' instead
70684         of module 'openat'.
70685         * NEWS: Mention the change.
70686         * modules/linkat-tests (Depends-on): Add unlinkat.
70687         * modules/mkfifoat-tests (Depends-on): Likewise.
70688         * modules/readlinkat-tests (Depends-on): Likewise.
70690 2011-11-02  Bruno Haible  <bruno@clisp.org>
70692         New module 'fchmodat', split off from module 'openat'.
70693         * lib/openat.h (chmodat, lchmodat): Enable only if GNULIB_FCHMODAT is
70694         defined.
70695         * m4/fchmodat.m4: New file, extracted from m4/openat.m4.
70696         * m4/openat.m4 (gl_FUNC_OPENAT): Don't set GNULIB_FCHMODAT. Don't test
70697         for fchmodat, lchmod. Don't set HAVE_FCHMODAT.
70698         * modules/fchmodat: New file, extracted from modules/openat.
70699         * modules/openat (Files): Remove lib/fchmodat.c.
70700         (configure.ac): Remove AC_LIBOBJ of fchmodat.
70701         * modules/fchmodat-tests: New file, extracted from modules/openat-tests.
70702         * modules/openat-tests (Files): Remove tests/test-fchmodat.c.
70703         (Makefile.am): Remove rules for test-fchmodat.
70704         * doc/posix-functions/fchmodat.texi: Mention module 'fchmodat' instead
70705         of module 'openat'.
70706         * NEWS: Mention the change.
70708 2011-11-02  Jim Meyering  <meyering@redhat.com>
70710         putenv: indent #definition of "environ" to placate cppi
70711         * lib/putenv.c (environ): Make indentation reflect cpp nesting.
70713         gitlog-to-changelog: provide a ChangeLog-repair mechanism
70714         Git logs are often treated as immutable, because editing them
70715         changes the SHA1 checksums of all descendants.  Thus, errors in
70716         git logs tend to stay there forever.  However, when we generate
70717         a ChangeLog file -- typically for distribution -- from that git log,
70718         we can actually make corrections in the generated file.  The key
70719         lies in recording in machine-readable/applicable form the desired
70720         corrections.  See --help for description and an example.
70721         * build-aux/gitlog-to-changelog (parse_amend_file): New function.
70722         (usage): Describe it; alphabetize option descriptions.
70723         (main): Honor the new option, carefully.
70725 2011-11-01  Jim Meyering  <meyering@redhat.com>
70727         gitlog-to-changelog: avoid an infloop
70728         * build-aux/gitlog-to-changelog: Don't infloop for a commit log
70729         that ends up being empty.
70731 2011-11-01  Paul Eggert  <eggert@cs.ucla.edu>
70733         * MODULES.html.sh: Fix sed-script shell quoting and locale issues.
70734         (func_module): Replace foo=` ... sed -e COMPLICATED ... ` with
70735         bar=COMPLICATED; foo=` ... sed -e "$bar" ... ` when COMPLICATED
70736         contains (possibly-quoted) backslashes.  This should avoid
70737         all-too-common shell bugs if COMPLICATED contains backslashes in
70738         the "wrong" places.  Reported by David Evans in
70739         <http://lists.gnu.org/r/bug-gnulib/2011-11/msg00013.html>.
70740         When 'sed' uses character ranges like A-Z, invoke it in the C locale,
70741         because we want ASCII ranges.  Is there some reason we don't use
70742         the C locale everywhere in this script?
70743         (func_module, top level): Avoid unwanted pathname expansion when
70744         $repo_url_prefix or $repo_url_suffix_repl contain shell
70745         metacharacters like '?' and '*'.
70747 2011-11-01  Bruno Haible  <bruno@clisp.org>
70749         fchownat: Improve description.
70750         * modules/fchownat (Description): Add link to function.
70752 2011-11-01  Paul Eggert  <eggert@cs.ucla.edu>
70754         * tests/test-stdalign.c (TEST_ALIGNMENT): Shrink back to 8.
70755         mingw supports alignments only up to 8 (!).  Reported by Bruno Haible in
70756         <http://lists.gnu.org/r/bug-gnulib/2011-11/msg00006.html>.
70757         * doc/posix-headers/stdalign.texi (stdalign.h): Document this.
70759 2011-11-01  Bruno Haible  <bruno@clisp.org>
70761         alignof: Avoid collision with stdalign module.
70762         * lib/alignof.h (alignof): Remove macro.
70763         * NEWS: Mention the change.
70764         Reported by Paul Eggert.
70766 2011-11-01  Bruno Haible  <bruno@clisp.org>
70768         New module 'fchownat', split off from module 'openat'.
70769         * lib/openat.h (chownat, lchownat): Enable only if GNULIB_FCHOWNAT is
70770         defined.
70771         * m4/fchownat.m4: New file, extracted from m4/openat.m4.
70772         * m4/openat.m4 (gl_FUNC_OPENAT): Don't set GNULIB_FCHOWNAT. Don't
70773         invoke gl_FUNC_FCHOWNAT.
70774         (gl_FUNC_FCHOWNAT_DEREF_BUG, gl_FUNC_FCHOWNAT_EMPTY_FILENAME_BUG,
70775         gl_FUNC_FCHOWNAT): Moved to m4/fchownat.m4.
70776         * modules/fchownat: New file, extracted from modules/openat.
70777         * modules/openat (Files): Remove lib/fchownat.c.
70778         (Depends-on): Remove lchown.
70779         (configure.ac): Remove AC_LIBOBJ of fchownat.
70780         * modules/fchownat-tests: New file, extracted from modules/openat-tests.
70781         * modules/openat-tests (Files): Remove tests/test-fchownat.c,
70782         tests/test-chown.h, tests/test-lchown.h, tests/nap.h.
70783         (Depends-on): Remove mgetgroups, usleep, stat-time.
70784         (configure.ac): Remove test for getegid.
70785         (Makefile.am): Remove rules for test-fchownat.
70786         * doc/posix-functions/fchownat.texi: Mention module 'fchownat' instead
70787         of module 'openat'.
70788         * NEWS: Mention the change.
70790 2011-10-31  Paul Eggert  <eggert@cs.ucla.edu>
70792         stdalign: port better to MSVC and to Sun C 5.11
70793         This fixes some of the problems reported by Bruno Haible in
70794         <http://lists.gnu.org/r/bug-gnulib/2011-10/msg00300.html>.
70795         * doc/posix-headers/stdalign.texi (stdalign.h): Document more
70796         shortcomings of MSVC and of Sun C 5.11.
70797         * lib/stdalign.in.h (_Alignas): Omit bogus extra parenthesis
70798         around __declspec arg.
70799         * modules/stdalign-tests (Files): Add tests/macros.h.
70800         * tests/test-stdalign.c: Do not include <stdlib.h>; no longer needed.
70801         Include macros.h, for ASSERT.
70802         (DECLARE_ALIGNED): Remove.
70803         (TEST_ALIGNMENT): Define to 16 if alignment is supported (more likely
70804         to catch bug), and to 1 if not (simplifies the rest of the code).
70805         (CHECK_STATIC): Always declare the alignment test vars; that's simpler.
70806         (CHECK_AUTO): Remove.
70807         (CHECK_ALIGNED): Check only the alignment of the static vars,
70808         since auto var alignment isn't supported by Sun C 5.11.
70809         (CHECK_TYPES): Remove.  All uses replaced by inline code, so that
70810         ASSERT failures are easier to diagnose.
70812 2011-10-31  Bruno Haible  <bruno@clisp.org>
70814         doc about some IRIX 5.3 problems.
70815         * doc/posix-functions/getpwnam_r.texi: Mention incompatible declaration
70816         on IRIX 5.3.
70817         * doc/posix-headers/poll.texi: Mention missing nfds_t on IRIX 5.3.
70818         * doc/posix-functions/ptsname.texi: Mention missing declaration on IRIX
70819         5.3.
70820         * doc/posix-functions/grantpt.texi: Likewise.
70821         * doc/posix-functions/unlockpt.texi: Likewise.
70822         * doc/posix-functions/lgamma.texi: Likewise.
70823         * doc/posix-functions/nextafter.texi: Likewise.
70824         * doc/posix-functions/remainder.texi: Likewise.
70825         * doc/posix-functions/select.texi: Mention misplaced declaration on
70826         IRIX 5.3.
70827         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
70829 2011-10-31  Dmitry V. Levin  <ldv@altlinux.org>
70831         gitlog-to-changelog: fix git-log invocation.
70832         git-log mishandles date strings before 1970-01-01 UTC, and there is
70833         no use to specify --since=1970-01-01 by default anyway.
70834         * build-aux/gitlog-to-changelog: By default, when no --since option
70835         was given, do not specify explicit --since option to git-log.
70837 2011-10-30  Dmitry V. Levin  <ldv@altlinux.org>
70839         gitlog-to-changelog: new option --append-dot.
70840         * build-aux/gitlog-to-changelog: New option --append-dot, makes the
70841         first non-blank line of each commit message terminated with a dot.
70843 2011-10-30  Bruno Haible  <bruno@clisp.org>
70845         ffsl, ffsll: Avoid compilation error due to 'restrict'.
70846         * lib/ffsl.h: Include <config.h>.
70847         Suggested by Tom G. Christensen <tgc@jupiterrise.com>.
70849 2011-10-30  Jim Meyering  <meyering@redhat.com>
70851         GNUmakefile: reenable "make syntax-check" for most projects
70852         Since Friday's commit 05e2d798, "maint.mk: don't maintain a second
70853         build-aux variable", "syntax-check" would do nothing but succeed with
70854         the "No version control files detected..." diagnostic (unless you
70855         happened to override _build-aux via cfg.mk).
70856         * top/GNUmakefile (_autoreconf, _build-aux): Move default definitions
70857         to precede inclusion of maint.mk.  Otherwise, these variables would
70858         be used undefined in any project that does not override the default.
70860 2011-10-29  Dmitry V. Levin  <ldv@altlinux.org>
70862         gitlog-to-changelog: treat a message with only blank lines as empty.
70863         * build-aux/gitlog-to-changelog: Move the code that removes leading and
70864         trailing blank lines before the code that issues a warning about an
70865         empty commit message.
70867 2011-10-30  Jim Meyering  <meyering@redhat.com>
70869         test-parse-datetime.c: avoid new DST-related false positive test failure
70870         * tests/test-parse-datetime.c (gmt_offset): Determine the "gmt_offset"
70871         based on the time/date we'll convert, not the current time.
70872         Otherwise, the moment we cross a DST boundary like today's in
70873         Europe, (CEST to CET), that offset ends up being one hour off.
70875 2011-10-27  Bruno Haible  <bruno@clisp.org>
70877         fstat: Tweak documentation.
70878         * modules/fstat (Description): More precise description.
70880 2011-10-27  Bruno Haible  <bruno@clisp.org>
70882         Update documentation regarding 'largefile' module.
70883         * doc/posix-functions/fstat.texi: Tweak wording.
70884         * doc/posix-functions/opendir.texi: Mention that the module fixes the
70885         problems with huge directories and/or small ino_t types.
70886         * doc/posix-functions/readdir.texi: Likewise.
70887         * doc/posix-functions/rewinddir.texi: Likewise.
70889 2011-10-28  Gary V. Vaughan  <gary@gnu.org>
70891         maint.mk: don't maintain a second build-aux variable.
70892         * maint.mk (build_aux): Removed.  The maintainer-makefile module
70893         depends on GNUmakefile, which already maintains a cfg.mk
70894         overridable $(_build-aux) for projects with a non-standard
70895         build-aux directory location, although without the $(srcdir)
70896         prefix.  Use that variable consistently instead of introducing a
70897         second one.  Adjust all call sites.
70899 2011-10-27  Paul Eggert  <eggert@cs.ucla.edu>
70901         Add stdalign module and use it in other modules.
70902         This is based on a previous proposal by Bruno Haible
70903         <https://lists.gnu.org/r/bug-gnulib/2011-07/msg00226.html>.
70905         stdalign: new module
70906         * doc/posix-headers/stdalign.texi, lib/stdalign.in.h, m4/stdalign.m4:
70907         * modules/stdalign: New files.
70908         * MODULES.html.sh (c1x_core_properties): Add stdalign.
70909         * doc/gnulib.texi (Header File Substitutes): Add stdalign.
70911         stdalign-tests: new module
70912         * modules/stdalign-tests, tests/test-stdalign.c: New files.
70914         argp: use stdalign
70915         * lib/argp-parse.c: Include <stdalign.h>.
70916         (alignof): Remove.
70917         * modules/argp (Depends-on): Add stdalign.
70919         crypto libraries: use stdalign
70920         * lib/md4.c, lib/md5.c, lib/sha1.c, lib/sha256.c, lib/sha512.c:
70921         Include <stdalign.h> and <stdint.h>.  Do not include <stddef.h>.
70922         Do not include <stdlib.h> twice, in md4.c.
70923         (UNALIGNED_P): Simplify by using alignof.  Use uintptr_t, not size_t,
70924         because we are accessing a pointer's bit-pattern, not a size.
70925         * modules/crypto/gc-md4 (Depends-on): Add stdalign.
70926         * modules/crypto/gc-md5, modules/crypto/gc-sha1, modules/crypto/md4:
70927         * modules/crypto/md5, modules/crypto/sha1, modules/crypto/sha256:
70928         * modules/crypto/sha512: Likewise.
70930         sys_socket: use stdalign, not alignof
70931         * lib/sys_socket.in.h: Include <stdalign.h> instead of <alignof.h>.
70932         * modules/sys_socket (Depends-on): Depend on stdalign, not alignof.
70934 2011-10-27  Bruno Haible  <bruno@clisp.org>
70936         raise test: Avoid a test failure on Linux/MIPS.
70937         * tests/test-raise.c (main): Try raising signal 199, not 99. Needed
70938         because 99 is a valid signal on Linux/MIPS.
70940 2011-10-27  Bruno Haible  <bruno@clisp.org>
70942         nonblocking tests: Fix test failure on Linux/MIPS.
70943         * tests/test-nonblocking-pipe.h (PIPE_DATA_BLOCK_SIZE) [Linux/MIPS]:
70944         Set to 270000.
70946 2011-10-27  Bruno Haible  <bruno@clisp.org>
70948         utimensat: Work around problem on Linux/hppa.
70949         * lib/utimensat.c (rpl_utimensat) [Linux/hppa]: Reject invalid tv_nsec
70950         values.
70951         * doc/posix-functions/utimensat.texi: Mention the problem on Linux/hppa.
70953 2011-10-25  Jim Meyering  <meyering@redhat.com>
70955         maint.mk: fix a bug in sc_prohibit_stddef_without_use
70956         * top/maint.mk (sc_prohibit_stddef_without_use): Don't require / *\(/
70957         after symbols like NULL, size_t, etc.
70958         Reported by Alfred M. Szmidt.
70960         maint.mk: exempt ENODATA from a syntax-check rule
70961         * top/maint.mk (gl_extract_significant_defines_): Also exempt ENODATA
70962         from the sc_prohibit_always-defined_macros syntax-check rule.
70963         Add a comment.  See this for more details:
70964         http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/28739/focus=28795
70966 2011-10-23  Jim Meyering  <meyering@redhat.com>
70968         fts: close parent dir FD before returning from post-traversal fts_read
70969         The problem: the fts-using "mkdir -p A/B; rm -rf A" would attempt to
70970         unlink A, even though an FD open on A remained.  This is suboptimal
70971         (holding a file descriptor open longer than needed), but otherwise not
70972         a problem on Unix-like kernels.  However, on Cygwin with certain Novell
70973         file systems, (see http://cygwin.com/ml/cygwin/2011-10/msg00365.html),
70974         that represents a real problem: it causes the removal of A to fail
70975         with e.g., "rm: cannot remove `A': Device or resource busy"
70977         fts visits each directory twice and keeps a cache (fts_fd_ring) of
70978         directory file descriptors.  After completing the final, FTS_DP,
70979         visit of a directory, RESTORE_INITIAL_CWD intended to clear the FD
70980         cache, but then proceeded to add a new FD to it via the subsequent
70981         FCHDIR (which calls cwd_advance_fd and i_ring_push).  Before, the
70982         final file descriptor would be closed only via fts_close's call to
70983         fd_ring_clear.  Now, it is usually closed earlier, via the final
70984         FTS_DP-returning fts_read call.
70985         * lib/fts.c (restore_initial_cwd): New function, converted from
70986         the macro.  Call fd_ring_clear *after* FCHDIR, not before it.
70987         Update callers.
70988         Reported by Franz Sirl via the above URL, with analysis by Eric Blake
70989         in http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/28739
70991 2011-10-23  Gary V. Vaughan  <gary@gnu.org>
70992             Bruno Haible  <bruno@clisp.org>
70993             Jim Meyering  <jim@meyering.net>
70995         readme-release: improve safety of release prep instructions.
70996         * README-release: Don't git pull all branches when only master
70997         is needed for the release process.
70998         Run make maintainer-clean before changing trees and merging.
70999         Don't try to run ./configure right after git pull in case files
71000         that influence the bootstrap process have changed, move the
71001         ./configure step to after running ./bootstrap.
71002         Don't bootstrap "one last time"... it's the first time!
71004 2011-10-22  Bruno Haible  <bruno@clisp.org>
71006         errno, strerror-override: Support for MSVC 10.
71007         * lib/errno.in.h (GNULIB_defined_ETXTBSY): Remove macro.
71008         (ENOMSG, EIDRM, ENOLINK, EPROTO, EBADMSG, EOVERFLOW, ENOTSUP,
71009         ENETRESET, ECONNABORTED, ECANCELED, EINPROGRESS, EALREADY, ENOTSOCK,
71010         EDESTADDRREQ, EMSGSIZE, EPROTOTYPE, ENOPROTOOPT, EPROTONOSUPPORT,
71011         EOPNOTSUPP, EAFNOSUPPORT, EADDRINUSE, EADDRNOTAVAIL, ENETDOWN,
71012         ENETUNREACH, ECONNRESET, ENOBUFS, EISCONN, ENOTCONN, ETIMEDOUT,
71013         ECONNREFUSED, ELOOP, EHOSTUNREACH, EWOULDBLOCK, ETXTBSY) [Win32]:
71014         Assign values compatible with MSVC 10.
71015         (ENODATA, ENOSR, ENOSTR, ENOTRECOVERABLE, EOWNERDEAD, ETIME, EOTHER):
71016         New macros.
71017         (GNULIB_defined_EWINSOCK): New macro.
71018         * lib/strerror-override.c (strerror_override): Update accordingly.
71019         * lib/strerror-override.h: Likewise.
71020         * lib/w32sock.h (set_winsock_errno): Map those WSA* values that are no
71021         longer equal to the corresponding errno value.
71022         Reported by Michael Goffioul <michael.goffioul@gmail.com>.
71024 2011-10-22  Bruno Haible  <bruno@clisp.org>
71026         perror: Recognize when test program crashes.
71027         * m4/perror.m4 (gl_FUNC_PERROR): If the test program crashes due to
71028         strerror, set gl_cv_func_perror_works to no.
71029         Reported by Daniel Richard G. <skunk@iskunk.org>.
71031         perror: Fix indentation.
71032         * m4/perror.m4 (gl_FUNC_PERROR): Fix indentation.
71034 2011-10-22  Bruno Haible  <bruno@clisp.org>
71036         isfinite, isinf, isnan, signbit: Don't define as a macro in C++.
71037         * lib/math.in.h (_GL_MATH_CXX_REAL_FLOATING_DECL_1,
71038         _GL_MATH_CXX_REAL_FLOATING_DECL_2): nEW MACROS.
71039         (isfinite, isinf, isnan, signbit): In C++, define as overloaded
71040         functions, not as a macro.
71041         * tests/test-math-c++.cc (REAL_FLOATING_CHECK, OVERLOADED_CHECK): New
71042         macros.
71043         (isfinite, isinf, isnan, signbit): Check overloaded functions and
71044         absence of macro.
71045         Suggested by Eric Blake.
71046         Reported by Michael Goffioul <michael.goffioul@gmail.com>.
71048 2011-10-21  Bruno Haible  <bruno@clisp.org>
71050         relocatable-prog-wrapper: Don't leave object files behind.
71051         * build-aux/install-reloc: Re-synchronize list of .o files to be
71052         removed with list of compilation units.
71054 2011-10-20  Bruno Haible  <bruno@clisp.org>
71056         openpty, posix_openpt: Remove code duplication.
71057         * lib/posix_openpt.c: Add comments about platforms, from lib/openpty.c.
71058         * lib/openpty.c: Include <stdlib.h>.
71059         (openpty): Use posix_openpt on all platforms except IRIX.
71060         * modules/openpty (Depends-on): Add posix_openpt. Add conditions.
71062 2011-10-20  Bruno Haible  <bruno@clisp.org>
71064         unlockpt: Detect invalid argument.
71065         * lib/unlockpt.c: Include <fcntl.h>.
71066         (unlockpt): Check whether fd is valid, using fcntl().
71067         * modules/unlockpt (Depends-on): Add fcntl-h.
71069 2011-10-20  Bruno Haible  <bruno@clisp.org>
71071         openpty: Avoid compilation error on AIX 6.1.
71072         * lib/pty.in.h [AIX]: Include <sys/ioctl.h>, for 'struct winsize'.
71074 2011-10-20  Bruno Haible  <bruno@clisp.org>
71076         posix_openpt: Support for OpenBSD.
71077         * lib/posix_openpt.c [OpenBSD]: Include <sys/ioctl.h>, <sys/tty.h>.
71078         (posix_openpt) [OpenBSD]: New code.
71079         * lib/grantpt.c: Include <fcntl.h>.
71080         (grantpt) [OpenBSD]: Only test whether fd is valid, nothing else.
71081         * modules/grantpt (Depends-on): Add fcntl-h.
71083 2011-10-20  Bruno Haible  <bruno@clisp.org>
71085         posix_openpt test: Coding style.
71086         * tests/test-posix_openpt.c: Use GNU coding style.
71088 2011-10-20  Bruno Haible  <bruno@clisp.org>
71090         grantpt: Support --avoid=pt_chown.
71091         * modules/grantpt (Files): Add lib/pty-private.h.
71093 2011-10-20  Bruno Haible  <bruno@clisp.org>
71095         posix_openpt: Fix autoconf macro.
71096         * m4/posix_openpt.m4 (gl_FUNC_POSIX_OPENPT): Fix variable name. Remove
71097         unneeded check for _getpty.
71099 2011-10-20  Bruno Haible  <bruno@clisp.org>
71101         openpty: Update comments.
71102         * lib/openpty.c: Add comments about Minix.
71104 2011-10-19  Eric Blake  <eblake@redhat.com>
71106         openpty: relax license
71107         * modules/openpty (License): Change from LGPLv3+ to LGPLv2+.
71109         pt_chown: use configmake to simplify build
71110         * modules/pt_chown (Makefile.am): Drop line guaranteed by configmake.
71112         ptsname and others: relax license
71113         * modules/grantpt (License): Change from LGPLv3+ to LGPLv2+.
71114         * modules/unlockpt (License): Likewise.
71115         * modules/pt_chown (License): Likewise.
71116         * modules/ptsname (License): Likewise.
71117         * modules/ttyname_r (License): Likewise.
71119 2011-10-19  Jim Meyering  <meyering@redhat.com>
71121         posix_openpt: remove spurious #endif
71122         * lib/posix_openpt.c (posix_openpt): Remove spurious #endif.
71124 2011-10-19  Gary V. Vaughan  <gary@gnu.org>
71126         maint.mk: Respect $(build_aux) in web-manual rule.
71127         * top/maint.mk (web-manual): Find gen-announce script in user's
71128         $(build_aux) directory instead of hard-coding 'build-aux'.
71130 2011-10-19  Bruno Haible  <bruno@clisp.org>
71132         posix_openpt: Fix compilation error.
71133         * lib/posix_openpt.c (posix_openpt): Renamed from posix_openpty.
71134         * doc/posix-functions/posix_openpt.texi: Mention ENOENT error code.
71135         Mention the openpty module as an alternative.
71137 2011-10-19  Bruno Haible  <bruno@clisp.org>
71139         Support for old NeXTstep 3.3 frexp().
71140         * m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Check for alarm. Limit the
71141         execution time of the test to 5 seconds.
71142         Reported by Daniel Richard G. <skunk@iskunk.org>.
71144 2011-10-19  Bruno Haible  <bruno@clisp.org>
71146         Support for old NeXTstep 3.3 sed.
71147         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER_ONE): In the sed address
71148         part, use /.../, not \|...|. Escape periods in the header file name.
71149         * m4/include_next.m4 (gl_NEXT_HEADERS_INTERNAL): Likewise.
71150         Reported by Daniel Richard G. <skunk@iskunk.org>.
71152 2011-10-18  Daniel Richard G.  <skunk@iskunk.org>  (tiny change)
71154         Support for old NeXTstep 3.3 gcc.
71155         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Write
71156         'defined __STRICT_ANSI__', not '__STRICT_ANSI__'.
71157         * lib/math.in.h (_GL_NUM_UINT_WORDS etc.): Likewise.
71158         * lib/spawn.in.h (_Restrict_arr_): Likewise.
71159         * lib/regex.h (_Restrict_arr_): Likewise.
71160         * lib/regex_internal.h (re_token_t): Likewise.
71161         * lib/regexec.c (check_node_accept_bytes): Likewise.
71162         * tests/test-printf-posix.c (func1, func2, func3, func4): Likewise.
71164 2011-10-18  Eric Blake  <eblake@redhat.com>
71166         posix_openpt: new module
71167         * modules/posix_openpt: New module.
71168         * m4/posix_openpt.m4: New file.
71169         * lib/posix_openpt.c: Likewise.
71170         * m4/stdlib_h.m4 (gl_STDLIB_H): Check for decl.
71171         (gl_STDLIB_H_DEFAULTS): Set defaults.
71172         * modules/stdlib (Makefile.am): Substitute macros.
71173         * lib/stdlib.in.h (posix_openpt): Declare.
71174         * MODULES.html.sh (systems lacking POSIX:2008): Document it.
71175         * doc/posix-functions/posix_openpt.texi (posix_openpt): Likewise.
71176         * modules/posix_openpt-tests: New test module.
71177         * tests/test-posix_openpt.c: New test.
71179 2011-10-15  Bruno Haible  <bruno@clisp.org>
71181         xstrtoll: Fix compilation failure.
71182         * lib/xstrtol.c (ULLONG_MAX, LLONG_MAX, LLONG_MIN): New macros, taken
71183         from lib/strtol.c.
71184         * doc/posix-headers/limits.texi: Mention missing numerical limits on
71185         some platforms.
71186         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
71188 2011-10-15  Bruno Haible  <bruno@clisp.org>
71190         vasnprintf: Optimize bit search operation.
71191         * lib/vasnprintf.c (divide): Use optimizations from integer_length.c.
71192         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Require
71193         gl_DOUBLE_EXPONENT_LOCATION.
71194         * modules/vasnprintf (Files): Add m4/exponentd.m4.
71195         * modules/unistdio/u8-vasnprintf (Files): Likewise.
71196         * modules/unistdio/u8-u8-vasnprintf (Files): Likewise.
71197         * modules/unistdio/u16-vasnprintf (Files): Likewise.
71198         * modules/unistdio/u16-u16-vasnprintf (Files): Likewise.
71199         * modules/unistdio/u32-vasnprintf (Files): Likewise.
71200         * modules/unistdio/u32-u32-vasnprintf (Files): Likewise.
71201         * modules/unistdio/ulc-vasnprintf (Files): Likewise.
71202         * m4/isnand.m4 (gl_PREREQ_ISNAND): Use AC_REQUIRE.
71204 2011-10-15  Bruno Haible  <bruno@clisp.org>
71206         vasnprintf: Fix comments.
71207         * lib/vasnprintf.c (decode_long_double, decode_double): Fix comments.
71209 2011-10-14  Bruno Haible  <bruno@clisp.org>
71211         Tests for module 'integer_length_ll'.
71212         * modules/integer_length_ll-tests: New file.
71213         * tests/test-integer_length_ll.c: New file.
71215         New module 'integer_length_ll'.
71216         * lib/integer_length_ll.c: New file.
71217         * modules/integer_length_ll: New file.
71219 2011-10-14  Bruno Haible  <bruno@clisp.org>
71221         Tests for module 'integer_length_l'.
71222         * modules/integer_length_l-tests: New file.
71223         * tests/test-integer_length_l.c: New file.
71225         New module 'integer_length_l'.
71226         * lib/integer_length_l.c: New file.
71227         * modules/integer_length_l: New file.
71229 2011-10-14  Bruno Haible  <bruno@clisp.org>
71231         Tests for module 'integer_length'.
71232         * modules/integer_length-tests: New file.
71233         * tests/test-integer_length.c: New file.
71235         New module 'integer_length'.
71236         * lib/integer_length.h: New file.
71237         * lib/integer_length.c: New file.
71238         * modules/integer_length: New file.
71240 2011-10-14  Daniel Richard G.  <skunk@iskunk.org>  (tiny change)
71242         popen: Fix dependency conditions.
71243         * modules/popen (Depends-on, configure.ac): Fix shell syntax error.
71245 2011-10-14  Daniel Richard G.  <skunk@iskunk.org>  (tiny change)
71247         perror: Fix autoconf test.
71248         * m4/perror.m4 (gl_FUNC_PERROR): In the test program, include
71249         <stdlib.h> and <string.h>.
71251 2011-10-14  Bruno Haible  <bruno@clisp.org>
71253         ffsl: Optimize on 64-bit platforms.
71254         * lib/ffsl.h (FUNC): Omit a test from the last loop round. Do loop
71255         unrolling.
71257 2011-10-13  Bruno Haible  <bruno@clisp.org>
71259         ffsl: Optimize on 32-bit platforms.
71260         * lib/ffsl.h (FUNC): If TYPE has the same representation as 'int', just
71261         use ffs() without a loop.
71263         ffsl, ffsll: Optimize for GCC.
71264         * lib/ffsl.h (FUNC): Use GCC_BUILTIN if defined.
71265         * lib/ffsl.c (GCC_BUILTIN): New macro.
71266         * lib/ffsll.c (GCC_BUILTIN): Likewise.
71268 2011-10-13  Bruno Haible  <bruno@clisp.org>
71270         ffs, bcopy, memset: Support symbol renaming via config.h.
71271         * lib/ffs.c: Include <config.h>.
71272         * lib/bcopy.c: Likewise.
71273         * lib/memset.c: Likewise.
71275 2011-10-10  Bruno Haible  <bruno@clisp.org>
71277         atanl: Simplify for platforms where 'long double' == 'double'.
71278         * lib/atanl.c (atanl) [HAVE_SAME_LONG_DOUBLE_AS_DOUBLE]: New
71279         alternative implementation.
71280         * m4/atanl.m4 (gl_FUNC_ATANL): Require gl_LONG_DOUBLE_VS_DOUBLE.
71281         Determine ATANL_LIBM according to HAVE_SAME_LONG_DOUBLE_AS_DOUBLE.
71282         * modules/atanl (Depends-on): Add atan. Update conditions.
71284 2011-10-10  Bruno Haible  <bruno@clisp.org>
71286         acosl: Simplify for platforms where 'long double' == 'double'.
71287         * lib/acosl.c (acosl) [HAVE_SAME_LONG_DOUBLE_AS_DOUBLE]: New
71288         alternative implementation.
71289         * m4/acosl.m4 (gl_FUNC_ACOSL): Require gl_LONG_DOUBLE_VS_DOUBLE.
71290         Determine ACOSL_LIBM according to HAVE_SAME_LONG_DOUBLE_AS_DOUBLE.
71291         * modules/acosl (Depends-on): Add acos. Update conditions.
71293 2011-10-10  Bruno Haible  <bruno@clisp.org>
71295         asinl: Simplify for platforms where 'long double' == 'double'.
71296         * lib/asinl.c (asinl) [HAVE_SAME_LONG_DOUBLE_AS_DOUBLE]: New
71297         alternative implementation.
71298         * m4/asinl.m4 (gl_FUNC_ASINL): Require gl_LONG_DOUBLE_VS_DOUBLE.
71299         Determine ASINL_LIBM according to HAVE_SAME_LONG_DOUBLE_AS_DOUBLE.
71300         * modules/asinl (Depends-on): Add asin. Update conditions.
71302 2011-10-10  Bruno Haible  <bruno@clisp.org>
71304         tanl: Simplify for platforms where 'long double' == 'double'.
71305         * lib/tanl.c (tanl) [HAVE_SAME_LONG_DOUBLE_AS_DOUBLE]: New alternative
71306         implementation.
71307         * m4/tanl.m4 (gl_FUNC_TANL): Require gl_LONG_DOUBLE_VS_DOUBLE.
71308         Determine TANL_LIBM according to HAVE_SAME_LONG_DOUBLE_AS_DOUBLE.
71309         * modules/tanl (Depends-on): Add tan. Update conditions.
71310         (configure.ac): Don't compile trigl.c if
71311         HAVE_SAME_LONG_DOUBLE_AS_DOUBLE.
71313 2011-10-10  Bruno Haible  <bruno@clisp.org>
71315         cosl: Simplify for platforms where 'long double' == 'double'.
71316         * lib/cosl.c (cosl) [HAVE_SAME_LONG_DOUBLE_AS_DOUBLE]: New alternative
71317         implementation.
71318         * m4/cosl.m4 (gl_FUNC_COSL): Require gl_LONG_DOUBLE_VS_DOUBLE.
71319         Determine COSL_LIBM according to HAVE_SAME_LONG_DOUBLE_AS_DOUBLE.
71320         * modules/cosl (Depends-on): Add cos. Update conditions.
71321         (configure.ac): Don't compile sincosl.c and trigl.c if
71322         HAVE_SAME_LONG_DOUBLE_AS_DOUBLE.
71324 2011-10-10  Bruno Haible  <bruno@clisp.org>
71326         sinl: Simplify for platforms where 'long double' == 'double'.
71327         * lib/sinl.c (sinl) [HAVE_SAME_LONG_DOUBLE_AS_DOUBLE]: New alternative
71328         implementation.
71329         * m4/sinl.m4 (gl_FUNC_SINL): Require gl_LONG_DOUBLE_VS_DOUBLE.
71330         Determine SINL_LIBM according to HAVE_SAME_LONG_DOUBLE_AS_DOUBLE.
71331         * modules/sinl (Depends-on): Add sin. Update conditions.
71332         (configure.ac): Don't compile sincosl.c and trigl.c if
71333         HAVE_SAME_LONG_DOUBLE_AS_DOUBLE.
71335 2011-10-10  Bruno Haible  <bruno@clisp.org>
71337         logl: Simplify for platforms where 'long double' == 'double'.
71338         * lib/logl.c (logl) [HAVE_SAME_LONG_DOUBLE_AS_DOUBLE]: New alternative
71339         implementation.
71340         * m4/logl.m4 (gl_FUNC_LOGL): Require gl_LONG_DOUBLE_VS_DOUBLE.
71341         Determine LOGL_LIBM according to HAVE_SAME_LONG_DOUBLE_AS_DOUBLE.
71342         * modules/logl (Depends-on): Add log. Update conditions.
71344 2011-10-10  Bruno Haible  <bruno@clisp.org>
71346         expl: Simplify for platforms where 'long double' == 'double'.
71347         * lib/expl.c (expl) [HAVE_SAME_LONG_DOUBLE_AS_DOUBLE]: New alternative
71348         implementation.
71349         * m4/expl.m4 (gl_FUNC_EXPL): Require gl_LONG_DOUBLE_VS_DOUBLE.
71350         Determine EXPL_LIBM according to HAVE_SAME_LONG_DOUBLE_AS_DOUBLE.
71351         * modules/expl (Depends-on): Add exp. Update conditions.
71353 2011-10-10  Bruno Haible  <bruno@clisp.org>
71355         sqrtl: Simplify for platforms where 'long double' == 'double'.
71356         * lib/sqrtl.c (sqrtl) [HAVE_SAME_LONG_DOUBLE_AS_DOUBLE]: New
71357         alternative implementation.
71358         * m4/sqrtl.m4 (gl_FUNC_SQRTL): Require gl_LONG_DOUBLE_VS_DOUBLE.
71359         Determine SQRTL_LIBM according to HAVE_SAME_LONG_DOUBLE_AS_DOUBLE.
71360         * modules/sqrtl (Depends-on): Update conditions.
71362 2011-10-10  Bruno Haible  <bruno@clisp.org>
71364         ldexpl: Simplify for platforms where 'long double' == 'double'.
71365         * lib/ldexpl.c (ldexpl) [HAVE_SAME_LONG_DOUBLE_AS_DOUBLE]: New
71366         alternative implementation.
71367         * m4/ldexpl.m4 (gl_FUNC_LDEXPL): Require gl_LONG_DOUBLE_VS_DOUBLE.
71368         Determine LDEXPL_LIBM according to HAVE_SAME_LONG_DOUBLE_AS_DOUBLE.
71369         * modules/ldexpl (Depends-on): Add ldexp. Update conditions.
71371 2011-10-10  Tom G. Christensen  <tgc@jupiterrise.com>  (tiny change)
71373         ffsll: set correct witness
71374         * modules/ffsll (configure.ac): Fix typo.
71376 2011-10-10  Bruno Haible  <bruno@clisp.org>
71378         printf-frexpl: Simplify for platforms where 'long double' == 'double'.
71379         * lib/printf-frexpl.c: Include <config.h>.
71380         (printf_frexpl) [HAVE_SAME_LONG_DOUBLE_AS_DOUBLE]: New function.
71381         * lib/printf-frexp.c [!USE_LONG_DOUBLE]: Don't include <config.h> a
71382         second time.
71383         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Require
71384         gl_LONG_DOUBLE_VS_DOUBLE.
71385         * modules/printf-frexpl (Depends-on): Add printf-frexp. Update
71386         conditions.
71388 2011-10-10  Bruno Haible  <bruno@clisp.org>
71390         frexpl: Simplify for platforms where 'long double' == 'double'.
71391         * lib/frexpl.c: Include <config.h>.
71392         (frexpl) [HAVE_SAME_LONG_DOUBLE_AS_DOUBLE]: New function.
71393         * lib/frexp.c [!USE_LONG_DOUBLE]: Don't include <config.h> a second
71394         time.
71395         * m4/frexpl.m4 (gl_FUNC_FREXPL): Require gl_LONG_DOUBLE_VS_DOUBLE.
71396         Determine FREXPL_LIBM according to HAVE_SAME_LONG_DOUBLE_AS_DOUBLE.
71397         (gl_FUNC_FREXPL_NO_LIBM): Require gl_LONG_DOUBLE_VS_DOUBLE.
71398         * modules/frexpl (Depends-on): Add frexp. Update conditions.
71399         * modules/frexpl-nolibm (Depends-on): Add frexp-nolibm. Update
71400         conditions.
71402 2011-10-10  Jim Meyering  <meyering@redhat.com>
71404         test-renameat: don't leave behind a temporary file
71405         * tests/test-renameat.c (main): Don't forget to remove a temporary file.
71406           ERROR: files left in build directory after distclean:
71407           ./gltests/test-renameat.too
71408           make[1]: *** [distcleancheck] Error 1
71409         Reported by Tom G. Christensen.
71411 2011-10-09  Bruno Haible  <bruno@clisp.org>
71413         rint: Determine RINT_LIBM correctly on AIX 7.
71414         * m4/mathfunc.m4 (gl_MATHFUNC): Try to invoke the function also
71415         directly, not only through a function pointer. Also accept an optional
71416         4th argument with extra code.
71417         * m4/rint.m4 (gl_FUNC_RINT): Pass an extra code that gets turned into a
71418         rintf() call by gcc when optimizing.
71420         mathfunc.m4: Refactor.
71421         * m4/mathfunc.m4 (gl_MATHFUNC): Assign the argument list to a temporary
71422         m4 variable.
71424 2011-10-09  Bruno Haible  <bruno@clisp.org>
71426         rintl: Simplify for platforms where 'long double' == 'double'.
71427         * lib/rintl.c: Include <config.h>.
71428         (rintl) [HAVE_SAME_LONG_DOUBLE_AS_DOUBLE]: New function.
71429         * lib/rint.c [!USE_LONG_DOUBLE]: Don't include <config.h> a second
71430         time.
71431         * m4/rintl.m4 (gl_FUNC_RINTL): Require gl_LONG_DOUBLE_VS_DOUBLE.
71432         Determine RINTL_LIBM according to HAVE_SAME_LONG_DOUBLE_AS_DOUBLE.
71433         * modules/rintl (Depends-on): Add rint. Update conditions.
71435 2011-10-09  Bruno Haible  <bruno@clisp.org>
71437         roundl: Simplify for platforms where 'long double' == 'double'.
71438         * lib/roundl.c: Include <config.h>.
71439         (roundl) [HAVE_SAME_LONG_DOUBLE_AS_DOUBLE]: New function.
71440         * lib/round.c [!USE_LONG_DOUBLE]: Don't include <config.h> a second
71441         time.
71442         * m4/roundl.m4 (gl_FUNC_ROUNDL): Require gl_LONG_DOUBLE_VS_DOUBLE.
71443         Determine ROUNDL_LIBM according to HAVE_SAME_LONG_DOUBLE_AS_DOUBLE.
71444         * modules/roundl (Depends-on): Add round. Update conditions.
71446 2011-10-09  Bruno Haible  <bruno@clisp.org>
71448         truncl: Simplify for platforms where 'long double' == 'double'.
71449         * lib/truncl.c: Include <config.h>.
71450         (truncl) [HAVE_SAME_LONG_DOUBLE_AS_DOUBLE]: New function.
71451         * lib/trunc.c [!USE_LONG_DOUBLE]: Don't include <config.h> a second
71452         time.
71453         * m4/truncl.m4 (gl_FUNC_TRUNCL): Require gl_LONG_DOUBLE_VS_DOUBLE.
71454         Determine TRUNCL_LIBM according to HAVE_SAME_LONG_DOUBLE_AS_DOUBLE.
71455         * modules/truncl (Depends-on): Add trunc. Update conditions.
71457 2011-10-09  Bruno Haible  <bruno@clisp.org>
71459         ceill: Simplify for platforms where 'long double' == 'double'.
71460         * lib/ceill.c: Include <config.h>.
71461         (ceill) [HAVE_SAME_LONG_DOUBLE_AS_DOUBLE]: New function.
71462         * lib/ceil.c [!USE_LONG_DOUBLE]: Don't include <config.h> a second
71463         time.
71464         * m4/ceill.m4 (gl_FUNC_CEILL): Require gl_LONG_DOUBLE_VS_DOUBLE.
71465         Determine CEILL_LIBM according to HAVE_SAME_LONG_DOUBLE_AS_DOUBLE.
71466         * modules/ceill (Depends-on): Add ceil. Update conditions.
71468 2011-10-09  Bruno Haible  <bruno@clisp.org>
71470         floorl: Simplify for platforms where 'long double' == 'double'.
71471         * lib/floorl.c: Include <config.h>.
71472         (floorl) [HAVE_SAME_LONG_DOUBLE_AS_DOUBLE]: New function.
71473         * lib/floor.c [!USE_LONG_DOUBLE]: Don't include <config.h> a second
71474         time.
71475         * m4/floorl.m4 (gl_FUNC_FLOORL): Require gl_LONG_DOUBLE_VS_DOUBLE.
71476         Determine FLOORL_LIBM according to HAVE_SAME_LONG_DOUBLE_AS_DOUBLE.
71477         * modules/floorl (Depends-on): Add floor. Update conditions.
71479 2011-10-09  Bruno Haible  <bruno@clisp.org>
71481         rint: Fix ordering constraints.
71482         * m4/rint.m4 (gl_FUNC_RINT): Require gl_MATH_H_DEFAULTS.
71483         * m4/rintf.m4 (gl_FUNC_RINTF): Likewise.
71484         * m4/rintl.m4 (gl_FUNC_RINTL): Likewise.
71486 2011-10-09  Bruno Haible  <bruno@clisp.org>
71488         copysignl: Simplify for platforms where 'long double' == 'double'.
71489         * lib/copysignl.c (copysignl) [HAVE_SAME_LONG_DOUBLE_AS_DOUBLE]: New
71490         alternative.
71491         * m4/copysignl.m4 (gl_FUNC_COPYSIGNL): Require gl_LONG_DOUBLE_VS_DOUBLE.
71492         Determine COPYSIGNL_LIBM according to HAVE_SAME_LONG_DOUBLE_AS_DOUBLE.
71493         * modules/copysignl (Depends-on): Add copysign. Update conditions.
71495 2011-10-09  Bruno Haible  <bruno@clisp.org>
71497         Tests for module 'rintl'.
71498         * modules/rintl-tests: New file.
71499         * tests/test-rintl.c: New file.
71501         New module 'rintl'.
71502         * lib/math.in.h (rintl): New declaration.
71503         * lib/rintl.c: New file.
71504         * m4/rintl.m4: New file.
71505         * m4/math_h.m4 (gl_MATH_H): Test whether rintl is declared.
71506         (gl_MATH_H_DEFAULTS): Initialize GNULIB_RINTL, HAVE_RINTL.
71507         * modules/math (Makefile.am): Substitute GNULIB_RINTL, HAVE_RINTL.
71508         * modules/rintl: New file.
71509         * tests/test-math-c++.cc: Check the declaration of rintl.
71510         * modules/math-c++-tests (Makefile.am): Link test-math-c++ against
71511         $(RINTL_LIBM). Needed on IRIX 6.5 with cc.
71512         * doc/posix-functions/rintl.texi: Mention the new module.
71514 2011-10-09  Bruno Haible  <bruno@clisp.org>
71516         Tests for module 'rintf'.
71517         * modules/rintf-tests: New file.
71518         * tests/test-rintf.c: New file.
71520         New module 'rintf'.
71521         * lib/math.in.h (rintf): New declaration.
71522         * lib/rintf.c: New file.
71523         * m4/rintf.m4: New file.
71524         * m4/math_h.m4 (gl_MATH_H): Test whether rintf is declared.
71525         (gl_MATH_H_DEFAULTS): Initialize GNULIB_RINTF, HAVE_RINTF.
71526         * modules/math (Makefile.am): Substitute GNULIB_RINTF, HAVE_RINTF.
71527         * modules/rintf: New file.
71528         * tests/test-math-c++.cc: Check the declaration of rintf.
71529         * doc/posix-functions/rintf.texi: Mention the new module.
71531 2011-10-09  Bruno Haible  <bruno@clisp.org>
71533         rint: Support for MSVC.
71534         * lib/math.in.h (rint): New declaration.
71535         * lib/rint.c: New file.
71536         * m4/rint.m4: New file.
71537         * m4/math_h.m4 (gl_MATH_H): Test whether rint is declared.
71538         (gl_MATH_H_DEFAULTS): Initialize GNULIB_RINT, HAVE_RINT.
71539         * modules/math (Makefile.am): Substitute GNULIB_RINT, HAVE_RINT.
71540         * modules/rint (Description): Fix.
71541         (Files): Add lib/rint.c, m4/rint.m4.
71542         (Depends-on): Add math.
71543         (configure.ac): Invoke gl_FUNC_RINT, AC_LIBOBJ,
71544         gl_MATH_MODULE_INDICATOR.
71545         * tests/test-math-c++.cc: Check the declaration of rint.
71546         * modules/math-c++-tests (Makefile.am): Link test-math-c++ against
71547         $(RINT_LIBM). Needed on IRIX 6.5 with cc.
71548         * doc/posix-functions/rint.texi: Mention the replacement provided by
71549         the module.
71551         rint tests: More tests.
71552         * tests/test-rint.c: Include <float.h>, <stdio.h>, isnand-nolibm.h,
71553         minus-zero.h, infinity.h, nan.h.
71554         (main): Skip the test if the current rounding mode is not standard. Add
71555         tests for negative numbers, minus zero, infinity, NaN.
71556         * modules/rint-tests (Files): Add tests/minus-zero.h, tests/infinity.h,
71557         tests/nan.h.
71558         (Depends-on): Add isnand-nolibm.
71560 2011-10-09  Bruno Haible  <bruno@clisp.org>
71562         Tests for module 'copysignl'.
71563         * modules/copysignl-tests: New file.
71564         * tests/test-copysignl.c: New file.
71566         New module 'copysignl'.
71567         * lib/math.in.h (copysignl): New declaration.
71568         * lib/copysignl.c: New file.
71569         * m4/copysignl.m4: New file.
71570         * m4/math_h.m4 (gl_MATH_H): Test whether copysignl is declared.
71571         (gl_MATH_H_DEFAULTS): Initialize GNULIB_COPYSIGNL, HAVE_COPYSIGNL.
71572         * modules/math (Makefile.am): Substitute GNULIB_COPYSIGNL,
71573         HAVE_COPYSIGNL.
71574         * modules/copysignl: New file.
71575         * tests/test-math-c++.cc: Check the declaration of copysignl.
71576         * modules/math-c++-tests (Makefile.am): Link test-math-c++ against
71577         $(COPYSIGNL_LIBM). Needed on IRIX 6.5 with cc.
71578         * doc/posix-functions/copysignl.texi: Mention the new module.
71580 2011-10-09  Bruno Haible  <bruno@clisp.org>
71582         Tests for module 'copysignf'.
71583         * modules/copysignf-tests: New file.
71584         * tests/test-copysignf.c: New file.
71586         New module 'copysignf'.
71587         * lib/math.in.h (copysignf): New declaration.
71588         * lib/copysignf.c: New file.
71589         * m4/copysignf.m4: New file.
71590         * m4/math_h.m4 (gl_MATH_H): Test whether copysignf is declared.
71591         (gl_MATH_H_DEFAULTS): Initialize GNULIB_COPYSIGNF, HAVE_COPYSIGNF.
71592         * modules/math (Makefile.am): Substitute GNULIB_COPYSIGNF,
71593         HAVE_COPYSIGNF.
71594         * modules/copysignf: New file.
71595         * tests/test-math-c++.cc: Check the declaration of copysignf.
71596         * doc/posix-functions/copysignf.texi: Mention the new module.
71598 2011-10-09  Bruno Haible  <bruno@clisp.org>
71600         Ensure that HAVE_* variables are set to 1 before they are set to 0.
71601         * m4/fdopendir.m4 (gl_FUNC_FDOPENDIR): Require gl_DIRENT_H_DEFAULTS.
71602         * m4/inet_ntop.m4 (gl_FUNC_INET_NTOP): Require gl_ARPA_INET_H_DEFAULTS.
71603         * m4/inet_pton.m4 (gl_FUNC_INET_PTON): Likewise.
71604         * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK): Require
71605         gl_SIGNAL_H_DEFAULTS.
71607 2011-10-09  Bruno Haible  <bruno@clisp.org>
71609         poll: Make macro safer.
71610         * m4/poll.m4 (gl_FUNC_POLL): Complain if, after invoking gl_POLL_H,
71611         ac_cv_header_poll_h is not set.
71613 2011-10-09  Bruno Haible  <bruno@clisp.org>
71615         copysign: Provide replacement.
71616         * lib/math.in.h (copysign): New declaration.
71617         * lib/copysign.c: New file.
71618         * m4/copysign.m4: New file.
71619         * m4/math_h.m4 (gl_MATH_H): Test whether copysign is declared.
71620         (gl_MATH_H_DEFAULTS): Initialize GNULIB_COPYSIGN, HAVE_COPYSIGN.
71621         * modules/math (Makefile.am): Substitute GNULIB_COPYSIGN,
71622         HAVE_COPYSIGN.
71623         * modules/copysign (Description): Clarify.
71624         (Files): Add lib/copysign.c, m4/copysign.m4.
71625         (Depends-on): Add math, signbit.
71626         (configure.ac): Invoke gl_FUNC_COPYSIGN, AC_LIBOBJ,
71627         gl_MATH_MODULE_INDICATOR.
71628         * tests/test-math-c++.cc: Check the declaration of copysign.
71629         * doc/posix-functions/copysign.texi: Mention the effects of the module
71630         on Minix and MSVC.
71632 2011-10-09  Bruno Haible  <bruno@clisp.org>
71634         isinf: Ensure macro on AIX 5.1.
71635         * m4/isinf.m4 (gl_ISINF): Also test whether isinf is defined as a
71636         macro.
71637         * doc/posix-functions/isinf.texi: Mention also AIX 5.1 as deficient.
71639 2011-10-09  Bruno Haible  <bruno@clisp.org>
71641         *printf-posix tests: Fix for platforms where 'long double' == 'double'.
71642         * modules/snprintf-posix-tests (configure.ac): Require
71643         gl_LONG_DOUBLE_VS_DOUBLE.
71644         * modules/sprintf-posix-tests (configure.ac): Likewise.
71645         * modules/vasnprintf-posix-tests (configure.ac): Likewise.
71646         * modules/vasprintf-posix-tests (configure.ac): Likewise.
71647         * modules/vsnprintf-posix-tests (configure.ac): Likewise.
71648         * modules/vsprintf-posix-tests (configure.ac): Likewise.
71649         * tests/test-snprintf-posix.h (test_function): Avoid 80-bit long double
71650         tests on platforms where 'long double' is the same as 'double'.
71651         * tests/test-sprintf-posix.h (test_function): Likewise.
71652         * tests/test-vasnprintf-posix.c (test_function): Likewise.
71653         * tests/test-vasprintf-posix.c (test_function): Likewise.
71655         *printf: Fix for platforms where 'long double' == 'double'.
71656         * m4/printf.m4 (gl_PRINTF_INFINITE_LONG_DOUBLE): Require
71657         gl_LONG_DOUBLE_VS_DOUBLE. Don't blindly assume 80-bit 'long double'.
71658         * modules/dprintf-posix (Files): Add m4/math_h.m4.
71659         * modules/fprintf-posix (Files): Likewise.
71660         * modules/obstack-printf-posix (Files): Likewise.
71661         * modules/snprintf-posix (Files): Likewise.
71662         * modules/sprintf-posix (Files): Likewise.
71663         * modules/vasnprintf (Files): Likewise.
71664         * modules/vasnprintf-posix (Files): Likewise.
71665         * modules/vasprintf-posix (Files): Likewise.
71666         * modules/vdprintf-posix (Files): Likewise.
71667         * modules/vfprintf-posix (Files): Likewise.
71668         * modules/vsnprintf-posix (Files): Likewise.
71669         * modules/vsprintf-posix (Files): Likewise.
71670         * modules/unistdio/u8-vasnprintf (Files): Likewise.
71671         * modules/unistdio/u8-u8-vasnprintf (Files): Likewise.
71672         * modules/unistdio/u16-vasnprintf (Files): Likewise.
71673         * modules/unistdio/u16-u16-vasnprintf (Files): Likewise.
71674         * modules/unistdio/u32-vasnprintf (Files): Likewise.
71675         * modules/unistdio/u32-u32-vasnprintf (Files): Likewise.
71676         * modules/unistdio/ulc-vasnprintf (Files): Likewise.
71678         isnanl[-nolibm]: Fix for platforms where 'long double' == 'double'.
71679         * lib/isnan.c (rpl_isnanl): Don't blindly assume 80-bit 'long double'.
71680         * m4/isnanl.m4 (gl_PREREQ_ISNANL): Require gl_LONG_DOUBLE_VS_DOUBLE.
71681         (gl_FUNC_ISNANL_WORKS): Likewise. Don't blindly assume 80-bit
71682         'long double'.
71683         * modules/isnanl-nolibm (Files): Add m4/math_h.m4.
71685         isinf: Fix for platforms where 'long double' == 'double'.
71686         * m4/isinf.m4 (gl_ISINFL_WORKS): Require gl_LONG_DOUBLE_VS_DOUBLE.
71687         Don't blindly assume 80-bit 'long double'.
71689         isfinite: Fix for platforms where 'long double' == 'double'.
71690         * m4/isfinite.m4 (gl_ISFINITEL_WORKS): Require gl_LONG_DOUBLE_VS_DOUBLE.
71691         Don't blindly assume 80-bit 'long double'.
71693         isfinite, isinf, isnan tests: Avoid syntax error on MSVC 9.
71694         * m4/math_h.m4 (gl_LONG_DOUBLE_VS_DOUBLE): New macro.
71695         * modules/isfinite-tests (configure.ac): Require
71696         gl_LONG_DOUBLE_VS_DOUBLE.
71697         * modules/isinf-tests (configure.ac): Likewise.
71698         * modules/isnan-tests (configure.ac): Likewise.
71699         * modules/isnanl-tests (configure.ac): Likewise.
71700         * modules/isnanl-nolibm-tests (configure.ac): Likewise.
71701         * tests/test-isfinite.c (test_isfinitel): Avoid 80-bit long double
71702         tests on platforms where 'long double' is the same as 'double'.
71703         * tests/test-isinf.c (test_isinfl): Likewise.
71704         * tests/test-isnan.c (test_long_double): Likewise.
71705         * tests/test-isnanl.h (main): Likewise.
71707 2011-10-08  Bruno Haible  <bruno@clisp.org>
71709         Tests for module 'tanhf'.
71710         * modules/tanhf-tests: New file.
71711         * tests/test-tanhf.c: New file.
71713         New module 'tanhf'.
71714         * lib/math.in.h (tanhf): New declaration.
71715         * lib/tanhf.c: New file.
71716         * m4/tanhf.m4: New file.
71717         * m4/math_h.m4 (gl_MATH_H): Test whether tanhf is declared.
71718         (gl_MATH_H_DEFAULTS): Initialize GNULIB_TANHF, HAVE_TANHF.
71719         * modules/math (Makefile.am): Substitute GNULIB_TANHF, HAVE_TANHF.
71720         * modules/tanhf: New file.
71721         * tests/test-math-c++.cc: Check the declaration of tanhf.
71722         * doc/posix-functions/tanhf.texi: Mention the new module.
71724         tanh: Use a .m4 file.
71725         * m4/tanh.m4: New file.
71726         * modules/tanh (Files): Add it.
71727         (configure.ac): Just invoke gl_FUNC_TANH.
71729 2011-10-08  Bruno Haible  <bruno@clisp.org>
71731         Tests for module 'coshf'.
71732         * modules/coshf-tests: New file.
71733         * tests/test-coshf.c: New file.
71735         New module 'coshf'.
71736         * lib/math.in.h (coshf): New declaration.
71737         * lib/coshf.c: New file.
71738         * m4/coshf.m4: New file.
71739         * m4/math_h.m4 (gl_MATH_H): Test whether coshf is declared.
71740         (gl_MATH_H_DEFAULTS): Initialize GNULIB_COSHF, HAVE_COSHF.
71741         * modules/math (Makefile.am): Substitute GNULIB_COSHF, HAVE_COSHF.
71742         * modules/coshf: New file.
71743         * tests/test-math-c++.cc: Check the declaration of coshf.
71744         * doc/posix-functions/coshf.texi: Mention the new module.
71746         cosh: Use a .m4 file.
71747         * m4/cosh.m4: New file.
71748         * modules/cosh (Files): Add it.
71749         (configure.ac): Just invoke gl_FUNC_COSH.
71751 2011-10-08  Bruno Haible  <bruno@clisp.org>
71753         Tests for module 'sinhf'.
71754         * modules/sinhf-tests: New file.
71755         * tests/test-sinhf.c: New file.
71757         New module 'sinhf'.
71758         * lib/math.in.h (sinhf): New declaration.
71759         * lib/sinhf.c: New file.
71760         * m4/sinhf.m4: New file.
71761         * m4/math_h.m4 (gl_MATH_H): Test whether sinhf is declared.
71762         (gl_MATH_H_DEFAULTS): Initialize GNULIB_SINHF, HAVE_SINHF.
71763         * modules/math (Makefile.am): Substitute GNULIB_SINHF, HAVE_SINHF.
71764         * modules/sinhf: New file.
71765         * tests/test-math-c++.cc: Check the declaration of sinhf.
71766         * doc/posix-functions/sinhf.texi: Mention the new module.
71768         sinh: Use a .m4 file.
71769         * m4/sinh.m4: New file.
71770         * modules/sinh (Files): Add it.
71771         (configure.ac): Just invoke gl_FUNC_SINH.
71773 2011-10-08  Bruno Haible  <bruno@clisp.org>
71775         Tests for module 'atan2f'.
71776         * modules/atan2f-tests: New file.
71777         * tests/test-atan2f.c: New file.
71779         New module 'atan2f'.
71780         * lib/math.in.h (atan2f): New declaration.
71781         * lib/atan2f.c: New file.
71782         * m4/atan2f.m4: New file.
71783         * m4/math_h.m4 (gl_MATH_H): Test whether atan2f is declared.
71784         (gl_MATH_H_DEFAULTS): Initialize GNULIB_ATAN2F, HAVE_ATAN2F.
71785         * modules/math (Makefile.am): Substitute GNULIB_ATAN2F, HAVE_ATAN2F.
71786         * modules/atan2f: New file.
71787         * tests/test-math-c++.cc: Check the declaration of atan2f.
71788         * doc/posix-functions/atan2f.texi: Mention the new module.
71790         atan2: Use a .m4 file.
71791         * m4/atan2.m4: New file.
71792         * modules/atan2 (Files): Add it.
71793         (configure.ac): Just invoke gl_FUNC_ATAN2.
71795 2011-10-08  Bruno Haible  <bruno@clisp.org>
71797         Tests for module 'atanf'.
71798         * modules/atanf-tests: New file.
71799         * tests/test-atanf.c: New file.
71801         New module 'atanf'.
71802         * lib/math.in.h (atanf): New declaration.
71803         * lib/atanf.c: New file.
71804         * m4/atanf.m4: New file.
71805         * m4/math_h.m4 (gl_MATH_H): Test whether atanf is declared.
71806         (gl_MATH_H_DEFAULTS): Initialize GNULIB_ATANF, HAVE_ATANF.
71807         * modules/math (Makefile.am): Substitute GNULIB_ATANF, HAVE_ATANF.
71808         * modules/atanf: New file.
71809         * tests/test-math-c++.cc: Check the declaration of atanf.
71810         * doc/posix-functions/atanf.texi: Mention the new module.
71812         atan: Use a .m4 file.
71813         * m4/atan.m4: New file.
71814         * modules/atan (Files): Add it.
71815         (configure.ac): Just invoke gl_FUNC_ATAN.
71817 2011-10-08  Bruno Haible  <bruno@clisp.org>
71819         Tests for module 'acosf'.
71820         * modules/acosf-tests: New file.
71821         * tests/test-acosf.c: New file.
71823         New module 'acosf'.
71824         * lib/math.in.h (acosf): New declaration.
71825         * lib/acosf.c: New file.
71826         * m4/acosf.m4: New file.
71827         * m4/math_h.m4 (gl_MATH_H): Test whether acosf is declared.
71828         (gl_MATH_H_DEFAULTS): Initialize GNULIB_ACOSF, HAVE_ACOSF.
71829         * modules/math (Makefile.am): Substitute GNULIB_ACOSF, HAVE_ACOSF.
71830         * modules/acosf: New file.
71831         * tests/test-math-c++.cc: Check the declaration of acosf.
71832         * doc/posix-functions/acosf.texi: Mention the new module.
71834         acos: Use a .m4 file.
71835         * m4/acos.m4: New file.
71836         * modules/acos (Files): Add it.
71837         (configure.ac): Just invoke gl_FUNC_ACOS.
71839 2011-10-08  Bruno Haible  <bruno@clisp.org>
71841         Tests for module 'asinf'.
71842         * modules/asinf-tests: New file.
71843         * tests/test-asinf.c: New file.
71845         New module 'asinf'.
71846         * lib/math.in.h (asinf): New declaration.
71847         * lib/asinf.c: New file.
71848         * m4/asinf.m4: New file.
71849         * m4/math_h.m4 (gl_MATH_H): Test whether asinf is declared.
71850         (gl_MATH_H_DEFAULTS): Initialize GNULIB_ASINF, HAVE_ASINF.
71851         * modules/math (Makefile.am): Substitute GNULIB_ASINF, HAVE_ASINF.
71852         * modules/asinf: New file.
71853         * tests/test-math-c++.cc: Check the declaration of asinf.
71854         * doc/posix-functions/asinf.texi: Mention the new module.
71856         asin: Use a .m4 file.
71857         * m4/asin.m4: New file.
71858         * modules/asin (Files): Add it.
71859         (configure.ac): Just invoke gl_FUNC_ASIN.
71861 2011-10-08  Bruno Haible  <bruno@clisp.org>
71863         Tests for module 'tanf'.
71864         * modules/tanf-tests: New file.
71865         * tests/test-tanf.c: New file.
71867         New module 'tanf'.
71868         * lib/math.in.h (tanf): New declaration.
71869         * lib/tanf.c: New file.
71870         * m4/tanf.m4: New file.
71871         * m4/math_h.m4 (gl_MATH_H): Test whether tanf is declared.
71872         (gl_MATH_H_DEFAULTS): Initialize GNULIB_TANF, HAVE_TANF.
71873         * modules/math (Makefile.am): Substitute GNULIB_TANF, HAVE_TANF.
71874         * modules/tanf: New file.
71875         * tests/test-math-c++.cc: Check the declaration of tanf.
71876         * doc/posix-functions/tanf.texi: Mention the new module.
71878         tan: Use a .m4 file.
71879         * m4/tan.m4: New file.
71880         * modules/tan (Files): Add it.
71881         (configure.ac): Just invoke gl_FUNC_TAN.
71883 2011-10-08  Bruno Haible  <bruno@clisp.org>
71885         Tests for module 'cosf'.
71886         * modules/cosf-tests: New file.
71887         * tests/test-cosf.c: New file.
71889         New module 'cosf'.
71890         * lib/math.in.h (cosf): New declaration.
71891         * lib/cosf.c: New file.
71892         * m4/cosf.m4: New file.
71893         * m4/math_h.m4 (gl_MATH_H): Test whether cosf is declared.
71894         (gl_MATH_H_DEFAULTS): Initialize GNULIB_COSF, HAVE_COSF.
71895         * modules/math (Makefile.am): Substitute GNULIB_COSF, HAVE_COSF.
71896         * modules/cosf: New file.
71897         * tests/test-math-c++.cc: Check the declaration of cosf.
71898         * doc/posix-functions/cosf.texi: Mention the new module.
71900         cos: Use a .m4 file.
71901         * m4/cos.m4: New file.
71902         * modules/cos (Files): Add it.
71903         (configure.ac): Just invoke gl_FUNC_COS.
71905 2011-10-08  Bruno Haible  <bruno@clisp.org>
71907         Tests for module 'sinf'.
71908         * modules/sinf-tests: New file.
71909         * tests/test-sinf.c: New file.
71911         New module 'sinf'.
71912         * lib/math.in.h (sinf): New declaration.
71913         * lib/sinf.c: New file.
71914         * m4/sinf.m4: New file.
71915         * m4/math_h.m4 (gl_MATH_H): Test whether sinf is declared.
71916         (gl_MATH_H_DEFAULTS): Initialize GNULIB_SINF, HAVE_SINF.
71917         * modules/math (Makefile.am): Substitute GNULIB_SINF, HAVE_SINF.
71918         * modules/sinf: New file.
71919         * tests/test-math-c++.cc: Check the declaration of sinf.
71920         * doc/posix-functions/sinf.texi: Mention the new module.
71922         sin: Use a .m4 file.
71923         * m4/sin.m4: New file.
71924         * modules/sin (Files): Add it.
71925         (configure.ac): Just invoke gl_FUNC_SIN.
71927 2011-10-08  Bruno Haible  <bruno@clisp.org>
71929         Tests for module 'powf'.
71930         * modules/powf-tests: New file.
71931         * tests/test-powf.c: New file.
71933         New module 'powf'.
71934         * lib/math.in.h (powf): New declaration.
71935         * lib/powf.c: New file.
71936         * m4/powf.m4: New file.
71937         * m4/math_h.m4 (gl_MATH_H): Test whether powf is declared.
71938         (gl_MATH_H_DEFAULTS): Initialize GNULIB_POWF, HAVE_POWF.
71939         * modules/math (Makefile.am): Substitute GNULIB_POWF, HAVE_POWF.
71940         * modules/powf: New file.
71941         * tests/test-math-c++.cc: Check the declaration of powf.
71942         * doc/posix-functions/powf.texi: Mention the new module.
71944         pow: Use a .m4 file.
71945         * m4/pow.m4: New file.
71946         * modules/pow (Files): Add it.
71947         (configure.ac): Just invoke gl_FUNC_POW.
71949 2011-10-08  Bruno Haible  <bruno@clisp.org>
71951         Tests for module 'log10f'.
71952         * modules/log10f-tests: New file.
71953         * tests/test-log10f.c: New file.
71955         New module 'log10f'.
71956         * lib/math.in.h (log10f): New declaration.
71957         * lib/log10f.c: New file.
71958         * m4/log10f.m4: New file.
71959         * m4/math_h.m4 (gl_MATH_H): Test whether log10f is declared.
71960         (gl_MATH_H_DEFAULTS): Initialize GNULIB_LOG10F, HAVE_LOG10F.
71961         * modules/math (Makefile.am): Substitute GNULIB_LOG10F, HAVE_LOG10F.
71962         * modules/log10f: New file.
71963         * tests/test-math-c++.cc: Check the declaration of log10f.
71964         * doc/posix-functions/log10f.texi: Mention the new module.
71966         log10: Use a .m4 file.
71967         * m4/log10.m4: New file.
71968         * modules/log10 (Files): Add it.
71969         (configure.ac): Just invoke gl_FUNC_LOG10.
71971 2011-10-08  Bruno Haible  <bruno@clisp.org>
71973         Tests for module 'logf'.
71974         * modules/logf-tests: New file.
71975         * tests/test-logf.c: New file.
71977         New module 'logf'.
71978         * lib/math.in.h (logf): New declaration.
71979         * lib/logf.c: New file.
71980         * m4/logf.m4: New file.
71981         * m4/math_h.m4 (gl_MATH_H): Test whether logf is declared.
71982         (gl_MATH_H_DEFAULTS): Initialize GNULIB_LOGF, HAVE_LOGF.
71983         * modules/math (Makefile.am): Substitute GNULIB_LOGF, HAVE_LOGF.
71984         * modules/logf: New file.
71985         * tests/test-math-c++.cc: Check the declaration of logf.
71986         * doc/posix-functions/logf.texi: Mention the new module.
71988         log: Use a .m4 file.
71989         * m4/log.m4: New file.
71990         * modules/log (Files): Add it.
71991         (configure.ac): Just invoke gl_FUNC_LOG.
71993 2011-10-08  Bruno Haible  <bruno@clisp.org>
71995         Tests for module 'expf'.
71996         * modules/expf-tests: New file.
71997         * tests/test-expf.c: New file.
71999         New module 'expf'.
72000         * lib/math.in.h (expf): New declaration.
72001         * lib/expf.c: New file.
72002         * m4/expf.m4: New file.
72003         * m4/math_h.m4 (gl_MATH_H): Test whether expf is declared.
72004         (gl_MATH_H_DEFAULTS): Initialize GNULIB_EXPF, HAVE_EXPF.
72005         * modules/math (Makefile.am): Substitute GNULIB_EXPF, HAVE_EXPF.
72006         * modules/expf: New file.
72007         * tests/test-math-c++.cc: Check the declaration of expf.
72008         * doc/posix-functions/expf.texi: Mention the new module.
72010         exp: Use a .m4 file.
72011         * m4/exp.m4: New file.
72012         * modules/exp (Files): Add it.
72013         (configure.ac): Just invoke gl_FUNC_EXP.
72015 2011-10-08  Bruno Haible  <bruno@clisp.org>
72017         Tests for module 'sqrtf'.
72018         * modules/sqrtf-tests: New file.
72019         * tests/test-sqrtf.c: New file.
72021         New module 'sqrtf'.
72022         * lib/math.in.h (sqrtf): New declaration.
72023         * lib/sqrtf.c: New file.
72024         * m4/sqrtf.m4: New file.
72025         * m4/math_h.m4 (gl_MATH_H): Test whether sqrtf is declared.
72026         (gl_MATH_H_DEFAULTS): Initialize GNULIB_SQRTF, HAVE_SQRTF.
72027         * modules/math (Makefile.am): Substitute GNULIB_SQRTF, HAVE_SQRTF.
72028         * modules/sqrtf: New file.
72029         * tests/test-math-c++.cc: Check the declaration of sqrtf.
72030         * doc/posix-functions/sqrtf.texi: Mention the new module.
72032 2011-10-08  Bruno Haible  <bruno@clisp.org>
72034         Tests: Avoid link failures w.r.t. libintl.
72035         * modules/faccessat-tests (Makefile.am): Link test-faccessat against
72036         $(LIBINTL).
72037         * modules/fchdir-tests (Makefile.am): Link test-fchdir against
72038         $(LIBINTL).
72039         * modules/getcwd-lgpl-tests (Makefile.am): Link test-getcwd-lgpl
72040         against $(LIBINTL).
72041         * modules/getcwd-tests (Makefile.am): Link test-getcwd against
72042         $(LIBINTL).
72043         * modules/openat-tests (Makefile.am): Link test-fchmodat against
72044         $(LIBINTL).
72045         * modules/stat-tests (Makefile.am): Link test-stat against $(LIBINTL).
72047 2011-10-08  Bruno Haible  <bruno@clisp.org>
72049         pow tests: Defeat compiler optimizations.
72050         * tests/test-pow.c (main): Assign arguments to x and y before use.
72052 2011-10-08  Bruno Haible  <bruno@clisp.org>
72054         gnulib-tool: Improve last commit.
72055         * gnulib-tool (func_modules_transitive_closure): Simplify code.
72056         (func_emit_autoconf_snippets): Instead of invoking func_acceptable,
72057         ignore dependencies that are not among the modules list.
72059 2011-10-07  Paul Eggert  <eggert@cs.ucla.edu>
72061         gnulib-tool: don't follow dependencies to avoided modules
72062         This fixes a bug that is related to the previous one.
72063         * gnulib-tool (func_modules_transitive_closure)
72064         (func_emit_autoconf_snippets):
72065         Check whether a dependency is acceptable before using it.
72066         (--extract-dependencies): Report an error if --avoid is also used,
72067         since this combination of options is not yet supported.
72069         gnulib-tool: fix typo that broke Emacs on powerpc-apple-darwin9.8.0.
72070         Problem reported by Peter Dyballa in
72071         <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9696>.
72072         * gnulib-tool (func_emit_autoconf_snippets): Quote with "", not '',
72073         when echoing "$condition".
72075 2011-10-07  Bruno Haible  <bruno@clisp.org>
72077         Fix documentation about math functions on MacOS X.
72078         * doc/posix-functions/exp2.texi: Don't say the function is missing on
72079         MacOS X 10.5.
72080         * doc/posix-functions/fdim.texi: Likewise.
72081         * doc/posix-functions/feclearexcept.texi: Likewise.
72082         * doc/posix-functions/fegetenv.texi: Likewise.
72083         * doc/posix-functions/fegetround.texi: Likewise.
72084         * doc/posix-functions/feholdexcept.texi: Likewise.
72085         * doc/posix-functions/feraiseexcept.texi: Likewise.
72086         * doc/posix-functions/fesetenv.texi: Likewise.
72087         * doc/posix-functions/fesetround.texi: Likewise.
72088         * doc/posix-functions/fetestexcept.texi: Likewise.
72089         * doc/posix-functions/feupdateenv.texi: Likewise.
72090         * doc/posix-functions/fmax.texi: Likewise.
72091         * doc/posix-functions/fmin.texi: Likewise.
72092         * doc/posix-functions/log2.texi: Likewise.
72093         * doc/posix-functions/modff.texi: Likewise.
72094         * doc/posix-functions/nan.texi: Likewise.
72095         * doc/posix-functions/nanf.texi: Likewise.
72096         * doc/posix-functions/nextafterf.texi: Likewise.
72097         * doc/posix-functions/remquo.texi: Likewise.
72099 2011-10-07  Bruno Haible  <bruno@clisp.org>
72101         modff: Drop assumption about library that defines modff.
72102         * m4/modff.m4 (gl_FUNC_MODFF): Use gl_MATHFUNC macro instead of
72103         AC_CHECK_FUNCS.
72104         * modules/modff (Files): Add m4/mathfunc.m4.
72106 2011-10-07  Bernhard Voelker  <mail@bernhard-voelker.de>
72108         raise tests: Avoid a GCC warning.
72109         * tests/test-raise.c (handler): Use _Noreturn.
72111 2011-10-07  Bruno Haible  <bruno@clisp.org>
72113         Tests for module 'ldexpf'.
72114         * modules/ldexpf-tests: New file.
72115         * tests/test-ldexpf.c: New file.
72117         New module 'ldexpf'.
72118         * lib/math.in.h (ldexpf): New declaration.
72119         * lib/ldexpf.c: New file.
72120         * m4/ldexpf.m4: New file.
72121         * m4/math_h.m4 (gl_MATH_H): Test whether ldexpf is declared.
72122         (gl_MATH_H_DEFAULTS): Initialize GNULIB_LDEXPF, HAVE_LDEXPF.
72123         * modules/math (Makefile.am): Substitute GNULIB_LDEXPF, HAVE_LDEXPF.
72124         * modules/ldexpf: New file.
72125         * tests/test-math-c++.cc: Check the declaration of ldexpf.
72126         * doc/posix-functions/ldexpf.texi: Mention the new module.
72128 2011-10-06  Bruno Haible  <bruno@clisp.org>
72130         frexpf: Work around problems on IRIX and mingw.
72131         * lib/math.in.h (frexpf): Consider also REPLACE_FREXPF.
72132         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_FREXPF.
72133         * m4/frexpf.m4 (gl_FUNC_FREXPF_WORKS): New macro.
72134         (gl_FUNC_FREXPF): Invoke it. Set REPLACE_FREXPF.
72135         * modules/frexpf (Depends-on, configure.ac): Consider REPLACE_FREXPF.
72136         * modules/math (Makefile.am): Substitute REPLACE_FREXPF.
72137         * doc/posix-functions/frexpf.texi: Mention the IRIX and mingw problems.
72139 2011-10-06  Bruno Haible  <bruno@clisp.org>
72141         fabsf: Drop assumption about library that defines fabsf.
72142         * m4/fabsf.m4 (gl_FUNC_FABSF): Use gl_MATHFUNC macro instead of
72143         AC_CHECK_FUNCS.
72144         * modules/fabsf (Files): Add m4/mathfunc.m4.
72146 2011-10-06  Bruno Haible  <bruno@clisp.org>
72148         frexpf: Drop assumption about library that defines frexpf.
72149         * m4/mathfunc.m4 (gl_MATHFUNC): Support also the argument types
72150         'int *', 'float *', 'long double *', 'float', 'long double'.
72151         * m4/frexpf.m4 (gl_FUNC_FREXPF): Use gl_MATHFUNC macro instead of
72152         AC_CHECK_FUNCS.
72153         * modules/frexpf (Files): Add m4/mathfunc.m4.
72155         Tests for module 'frexpf'.
72156         * modules/frexpf-tests: New file.
72157         * tests/test-frexpf.c: New file.
72159         New module 'frexpf'.
72160         * lib/math.in.h (frexpf): New declaration.
72161         * lib/frexpf.c: New file.
72162         * m4/frexpf.m4: New file.
72163         * m4/math_h.m4 (gl_MATH_H): Test whether frexpf is declared.
72164         (gl_MATH_H_DEFAULTS): Initialize GNULIB_FREXPF, HAVE_FREXPF.
72165         * modules/math (Makefile.am): Substitute GNULIB_FREXPF, HAVE_FREXPF.
72166         * modules/frexpf: New file.
72167         * tests/test-math-c++.cc: Check the declaration of frexpf.
72168         * doc/posix-functions/frexpf.texi: Mention the new module.
72170 2011-10-06  Bruno Haible  <bruno@clisp.org>
72172         math: Sort function declarations of math.in.h.
72173         * lib/math.in.h (frexp, logb): Move declarations.
72175 2011-10-05  Bruno Haible  <bruno@clisp.org>
72177         Tests for module 'modff'.
72178         * modules/modff-tests: New file.
72179         * tests/test-modff.c: New file.
72181         New module 'modff'.
72182         * lib/math.in.h (modff): New declaration.
72183         * lib/modff.c: New file.
72184         * m4/modff.m4: New file.
72185         * m4/math_h.m4 (gl_MATH_H): Test whether modff is declared.
72186         (gl_MATH_H_DEFAULTS): Initialize GNULIB_MODFF, HAVE_MODFF.
72187         * modules/math (Makefile.am): Substitute GNULIB_MODFF, HAVE_MODFF.
72188         * modules/modff: New file.
72189         * tests/test-math-c++.cc: Check the declaration of modff.
72190         * doc/posix-functions/modff.texi: Mention the new module.
72192         modf tests: Make test sharper.
72193         * tests/test-modf.c (main): Strengthen upper bound.
72195         modf: Use a .m4 file.
72196         * m4/modf.m4: New file.
72197         * modules/modf (Files): Add it.
72198         (configure.ac): Just invoke gl_FUNC_MODF.
72200 2011-10-05  Bruno Haible  <bruno@clisp.org>
72202         Tests for module 'fmodf'.
72203         * modules/fmodf-tests: New file.
72204         * tests/test-fmodf.c: New file.
72206         New module 'fmodf'.
72207         * lib/math.in.h (fmodf): New declaration.
72208         * lib/fmodf.c: New file.
72209         * m4/fmodf.m4: New file.
72210         * m4/math_h.m4 (gl_MATH_H): Test whether fmodf is declared.
72211         (gl_MATH_H_DEFAULTS): Initialize GNULIB_FMODF, HAVE_FMODF.
72212         * modules/math (Makefile.am): Substitute GNULIB_FMODF, HAVE_FMODF.
72213         * modules/fmodf: New file.
72214         * tests/test-math-c++.cc: Check the declaration of fmodf.
72215         * doc/posix-functions/fmodf.texi: Mention the new module.
72217         fmod: Use a .m4 file.
72218         * m4/fmod.m4: New file.
72219         * modules/fmod (Files): Add it.
72220         (configure.ac): Just invoke gl_FUNC_FMOD.
72222 2011-10-05  Bruno Haible  <bruno@clisp.org>
72224         Tests for module 'fabsf'.
72225         * modules/fabsf-tests: New file.
72226         * tests/test-fabsf.c: New file.
72228         New module 'fabsf'.
72229         * lib/math.in.h (fabsf): New declaration.
72230         * lib/fabsf.c: New file.
72231         * m4/fabsf.m4: New file.
72232         * m4/math_h.m4 (gl_MATH_H): Test whether fabsf is declared.
72233         (gl_MATH_H_DEFAULTS): Initialize GNULIB_FABSF, HAVE_FABSF.
72234         * modules/math (Makefile.am): Substitute GNULIB_FABSF, HAVE_FABSF.
72235         * modules/fabsf: New file.
72236         * tests/test-math-c++.cc: Check the declaration of fabsf.
72237         * doc/posix-functions/fabsf.texi: Mention the new module.
72239         fabs: Use a .m4 file.
72240         * m4/fabs.m4: New file.
72241         * modules/fabs (Files): Add it.
72242         (configure.ac): Just invoke gl_FUNC_FABS.
72244 2011-10-05  Jim Meyering  <meyering@redhat.com>
72246         file-has-acl: revert both recent changes, 80af92af and 95f7c57f
72247         * lib/file-has-acl.c: While the 2011-10-03 change does fix the
72248         ls -lL regression introduced in coreutils-8.12, it does so at the
72249         cost of an additional stat call in the common case.  Besides, now
72250         that the kernel change that prompted commit 95f7c57f has been reverted
72251         (see https://bugzilla.redhat.com/show_bug.cgi?id=720325#c24)
72252         we have no use for commit 95f7c57f, "file-has-acl: use
72253         acl_extended_file_nofollow if available".
72255 2011-10-03  Kamil Dudka  <kdudka@redhat.com>
72257         file-has-acl: revert unintended change in behavior of ls -L
72258         * lib/file-has-acl.c (acl_extended_file_wrap): New function,
72259         derived from...
72260         (file_has_acl): ...code here.  Call it.
72261         This problem was introduced with 2011-07-22 commit 95f7c57f,
72262         "file-has-acl: use acl_extended_file_nofollow if available".
72263         See http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/28538
72265 2011-10-03  Bruno Haible  <bruno@clisp.org>
72267         poll: Avoid link errors on MSVC.
72268         * m4/poll.m4 (gl_FUNC_POLL): Determine LIB_POLL.
72269         * modules/poll (Depends-on): Add sockets.
72270         (Link): New section.
72271         * NEWS: Mention the change.
72272         * modules/poll-tests (Makefile.am): Link test-poll against $(LIB_POLL).
72273         * modules/poll-h-c++-tests (Makefile.am): Link test-poll-h-c++ against
72274         $(LIB_POLL) instead of $(LIBSOCKET).
72276 2011-10-03  Bruno Haible  <bruno@clisp.org>
72278         sys_select tests: Fix link error on MSVC 9.
72279         * modules/sys_select-c++-tests (Makefile.am): Link test-sys_select-c++
72280         with $(LIB_SELECT) instead of $(LIBSOCKET).
72282 2011-10-03  Bruno Haible  <bruno@clisp.org>
72284         sys_select: Fix compilation error on mingw.
72285         * lib/sys_select.in.h: On native Windows, include <io.h>.
72287 2011-10-03  Bruno Haible  <bruno@clisp.org>
72289         wmemset: Support for MSVC.
72290         * m4/wmemset.m4 (gl_FUNC_WMEMSET): Use a small test program to test
72291         whether wmemset() exists.
72293 2011-10-03  Bruno Haible  <bruno@clisp.org>
72295         wmemmove: Support for MSVC.
72296         * m4/wmemmove.m4 (gl_FUNC_WMEMMOVE): Use a small test program to test
72297         whether wmemmove() exists.
72299 2011-10-03  Bruno Haible  <bruno@clisp.org>
72301         wmemcpy: Support for MSVC.
72302         * m4/wmemcpy.m4 (gl_FUNC_WMEMCPY): Use a small test program to test
72303         whether wmemcpy() exists.
72305 2011-10-03  Bruno Haible  <bruno@clisp.org>
72307         wmemcmp: Support for MSVC.
72308         * m4/wmemcmp.m4 (gl_FUNC_WMEMCMP): Use a small test program to test
72309         whether wmemcmp() exists.
72311 2011-10-03  Bruno Haible  <bruno@clisp.org>
72313         wmemchr: Support for MSVC.
72314         * m4/wmemchr.m4 (gl_FUNC_WMEMCHR): Use a small test program to test
72315         whether wmemchr() exists.
72317 2011-10-03  Bruno Haible  <bruno@clisp.org>
72319         glthread/*, strsignal: Support for MSVC.
72320         * lib/glthread/cond.h: Define WIN32_LEAN_AND_MEAN, so as to avoid
72321         including <winsock.h> on MSVC 9.
72322         * lib/glthread/lock.h: Likewise.
72323         * lib/glthread/thread.h: Likewise.
72324         * lib/glthread/tls.h: Likewise.
72325         * lib/glthread/yield.h: Likewise.
72326         * lib/strsignal.c: Include <string.h> first. Don't include <unistd.h>
72327         if HAVE_UNISTD_H is false.
72328         * m4/strsignal.m4 (gl_PREREQ_STRSIGNAL): Test for <unistd.h>.
72330 2011-10-03  Bruno Haible  <bruno@clisp.org>
72332         nonblocking tests: Fix test failure on OpenBSD/SPARC64.
72333         * tests/test-nonblocking-socket.h (SOCKET_DATA_BLOCK_SIZE) [OpenBSD]:
72334         Set to 100000.
72336 2011-10-03  Bruno Haible  <bruno@clisp.org>
72338         acl: Fix specification.
72339         * lib/file-has-acl.c (file_has_acl): Fix specification.
72341 2011-10-03  Bruno Haible  <bruno@clisp.org>
72343         relocatable-lib[-lgpl]: Avoid expensive /proc access on Linux, Cygwin.
72344         * lib/relocatable.c (ENABLE_COSTLY_RELOCATABLE): New macro.
72345         (compute_curr_prefix, shared_library_fullname,
72346         find_shared_library_fullname, get_shared_library_fullname, relocate):
72347         Use it together with PIC && INSTALLDIR.
72348         Reported by <jojelino@gmail.com>
72349         via Charles Wilson <cygwin@cwilson.fastmail.fm>.
72351 2011-10-01  Jim Meyering  <meyering@redhat.com>
72353         maint.mk: adjust a release-related rule not to require use of gzip
72354         * top/maint.mk (writable-files): Don't hard-code use of .tar.gz.
72355         Instead, check each file in $(DIST_ARCHIVES).  This is better for
72356         projects that build only .tar.xz files.  Also fix an erroneous test.
72358         test-linkat: don't leave behind a temporary file
72359         * tests/test-linkat.c (main): Don't forget to remove a temporary file.
72360         Otherwise, coreutils' "make distcheck" would fail with this:
72361           Only in /c/cu/tests/torture/coreutils/test/\
72362             coreutils-8.13.22-d5caf.old/gnulib-tests: test-linkat.too
72363           make[2]: *** [my-distcheck] Error 1
72365         float, math: add omitted file
72366         * lib/itold.c: Add file, required for yesterday's float change.
72368 2011-10-01  Bruno Haible  <bruno@clisp.org>
72370         isinf: Fix for OpenBSD/x86.
72371         * m4/isinf.m4 (gl_ISINFL_WORKS): Also test the behaviour of isinf on
72372         pseudo-NaNs, pseudo-Infinities, and other non-IEEE values.
72373         * doc/posix-functions/isinf.texi: Mention the problem on OpenBSD/x86.
72375 2011-10-01  Bruno Haible  <bruno@clisp.org>
72377         isfinite: Fix syntax error in configure test.
72378         * m4/isfinite.m4 (gl_ISFINITEL_WORKS): Fix syntax error.
72380         isfinite: Fix typo.
72381         * m4/isfinite.m4 (gl_ISFINITEL_WORKS): When cross-compiling, set
72382         gl_cv_func_isfinitel_works, not gl_cv_func_isnanl_works.
72384 2011-10-01  Bruno Haible  <bruno@clisp.org>
72386         nonblocking tests: Fix test failure on Linux/IA-64.
72387         * tests/test-nonblocking-pipe.h (PIPE_DATA_BLOCK_SIZE) [Linux/IA-64]:
72388         Set to 270000.
72390 2011-10-01  Bruno Haible  <bruno@clisp.org>
72392         mkfifoat tests: Fix a test failure on mingw.
72393         * tests/test-mkfifoat.c (main): Allow mkfifoat or test_mknodat to fail
72394         with error ENOSYS.
72396 2011-09-30  Bruno Haible  <bruno@clisp.org>
72398         float, math: Fix 'int' to 'long double' conversion on Linux/SPARC64.
72399         * m4/float_h.m4 (gl_FLOAT_H): Test conversion from 'int' to
72400         'long double'. Set REPLACE_ITOLD.
72401         * lib/float.in.h (_Qp_itoq, _gl_float_fix_itold): New declarations.
72402         * lib/math.in.h (_Qp_itoq, _gl_math_fix_itold): New declarations.
72403         * lib/itold.c: New file.
72404         * modules/float (Files): Add lib/itold.c.
72405         (configure.ac): When REPLACE_ITOLD is 1, arrange to compile itold.c.
72406         (Makefile.am): Substitute REPLACE_ITOLD.
72407         * modules/math (Depends-on): Add float.
72408         (Makefile.am): Substitute REPLACE_ITOLD.
72409         * doc/posix-headers/float.texi: Mention problem on Linux/SPARC64.
72410         * doc/posix-headers/math.texi: Likewise.
72411         * doc/posix-functions/logl.texi: Likewise.
72413 2011-09-30  Bruno Haible  <bruno@clisp.org>
72415         nonblocking tests: Fix test failure on Linux/SPARC (32-bit and 64-bit).
72416         * tests/test-nonblocking-pipe.h (PIPE_DATA_BLOCK_SIZE) [Linux/SPARC]:
72417         Set to 140000.
72419 2011-09-30  Bruno Haible  <bruno@clisp.org>
72421         gnulib-tool: Improve suggestion where to put gl_EARLY invocation.
72422         * gnulib-tool (func_import): If the configure.ac has an AC_PROG_CC_STDC
72423         invocation, say "right after AC_PROG_CC_STDC", not "right after
72424         AC_PROG_CC".
72425         Reported by Gary V. Vaughan <gary@gnu.org>.
72427 2011-09-30  Bruno Haible  <bruno@clisp.org>
72429         Centralize C99 requirement.
72430         * m4/gnulib-common.m4 (gl_PROG_CC_C99): New macro.
72431         * modules/stdarg (configure.ac-early): Invoke it instead of
72432         AC_PROG_CC_STDC.
72433         Reported by Gary V. Vaughan and Paul Eggert.
72435 2011-09-29  Bruno Haible  <bruno@clisp.org>
72437         float: Fix LDBL_MAX value on Linux/PowerPC.
72438         * m4/float_h.m4 (gl_FLOAT_H): Set FLOAT_H and REPLACE_FLOAT_LDBL also
72439         on Linux/PowerPC.
72440         * lib/float.in.h (LDBL_MAX): Redefine also on Linux/PowerPC.
72441         * lib/float.c (gl_LDBL_MAX): Also define on Linux/PowerPC.
72442         * doc/posix-headers/float.texi: Mention Linux/PowerPC as an affected
72443         platform.
72444         Reported by Andreas Metzler <ametzler@downhill.at.eu.org>.
72446 2011-09-29  Bruno Haible  <bruno@clisp.org>
72448         doc: Improve doc about gl_EARLY.
72449         * doc/gnulib-tool.texi (Initial import): Mention where to place an
72450         AC_PROG_CC_STDC invocation.
72451         Reported by Gary V. Vaughan <gary@gnu.org>.
72453 2011-09-28  Bruno Haible  <bruno@clisp.org>
72455         fgetc, fputc, fread, fwrite tests: Fix link error.
72456         * tests/test-fgetc.c (main): Don't invoke gl_msvc_inval_ensure_handler
72457         on non-MSVC platforms.
72458         * tests/test-fputc.c (main): Likewise.
72459         * tests/test-fread.c (main): Likewise.
72460         * tests/test-fwrite.c (main): Likewise.
72461         Reported by Jim Meyering.
72463 2011-09-27  Bruno Haible  <bruno@clisp.org>
72465         fputc, fwrite tests: Avoid test failure on MSVC.
72466         * tests/test-fgetc.c: Include msvc-inval.h.
72467         (main): Invoke gl_msvc_inval_ensure_handler.
72468         * tests/test-fputc.c: Include msvc-inval.h.
72469         (main): Invoke gl_msvc_inval_ensure_handler.
72470         * tests/test-fread.c: Include msvc-inval.h.
72471         (main): Invoke gl_msvc_inval_ensure_handler.
72472         * tests/test-fwrite.c: Include msvc-inval.h.
72473         (main): Invoke gl_msvc_inval_ensure_handler.
72474         * modules/fgetc-tests (Depends-on): Add msvc-inval.
72475         * modules/fputc-tests (Depends-on): Likewise.
72476         * modules/fread-tests (Depends-on): Likewise.
72477         * modules/fwrite-tests (Depends-on): Likewise.
72479 2011-09-27  Bruno Haible  <bruno@clisp.org>
72481         raise: Fix double declaration with modules 'sigprocmask' and 'sigpipe'.
72482         * lib/signal.in.h (GNULIB_defined_signal_blocking): New macro.
72483         (raise): Remove older, duplicated declaration.
72484         (_gl_raise_SIGPIPE): New declaration.
72485         * lib/sigprocmask.c (_gl_raise_SIGPIPE): New function.
72486         (rpl_raise): Remove function.
72487         * lib/raise.c (rpl_raise, raise): Merge into a single function. Handle
72488         a gnulib-defined SIGPIPE here.
72489         * m4/raise.m4 (gl_FUNC_RAISE): Set REPLACE_RAISE also if the module
72490         'sigprocmask' has detected missing signal-blocking and the module
72491         'sigpipe' is enabled.
72492         Reported by Tatsuro MATSUOKA <tmacchant5@yahoo.co.jp>.
72494 2011-09-26  Gijs van Tulder  <gvtulder@gmail.com>
72496         base64-tests: avoid memory leak
72497         * tests/test-base64.c (main): Plug memory leak.
72499         base32: new module
72500         * modules/base32: New module.
72501         * lib/base32.c: New file.
72502         * lib/base32.h: Likewise.
72503         * m4/base32.m4: Likewise.
72504         * modules/base32-tests: New test.
72505         * tests/test-base32.c: Likewise.
72506         * MODULES.html.sh (Misc): Mention it.
72508 2011-09-26  Paul Eggert  <eggert@cs.ucla.edu>
72510         gnulib: use more-standard license notice wording
72511         * gnulib-tool (func_emit_copyright_notice): When emitting a
72512         license notice into a file, use the standard wording as suggested
72513         by the current information for GNU maintainers, except say "file"
72514         rather than "program".  The new wording gives a license version
72515         number, which addresses an issue raised by Glenn Morris in
72516         <http://lists.gnu.org/r/bug-gnulib/2011-09/msg00397.html>.
72517         * m4/onceonly.m4: Use that same wording here, too.
72519         dup2: minor simplification
72520         * m4/dup2.m4 (gl_PREREQ_DUP2): Don't require AC_C_INLINE,
72521         as lib/dup2.c no longer uses 'inline'.
72523 2011-09-25  Bruno Haible  <bruno@clisp.org>
72525         strings: Fix compilation error on MSVC.
72526         * lib/strings.in.h: Include <stddef.h> for size_t.
72528 2011-09-25  Bruno Haible  <bruno@clisp.org>
72530         fflush et al.: Document limitation on MSVC.
72531         * doc/posix-functions/fflush.texi: Document possible crash in handling
72532         mode other than DEFAULT_HANDLING.
72533         * doc/posix-functions/fgetc.texi: Likewise.
72534         * doc/posix-functions/fputc.texi: Likewise.
72535         * doc/posix-functions/fread.texi: Likewise.
72536         * doc/posix-functions/fwrite.texi: Likewise.
72538 2011-09-25  Bruno Haible  <bruno@clisp.org>
72540         msvc-inval: Allow three invalid parameter handling modes.
72541         * lib/msvc-inval.h: Don't include <stdlib.h> here.
72542         (DEFAULT_HANDLING, HAIRY_LIBRARY_HANDLING, SANE_LIBRARY_HANDLING): New
72543         macros.
72544         (gl_msvc_inval_ensure_handler, TRY_MSVC_INVAL, CATCH_MSVC_INVAL,
72545         DONE_MSVC_INVAL): Implement DEFAULT_HANDLING. Treat
72546         SANE_LIBRARY_HANDLING as a no-op.
72547         * lib/msvc-inval.c: Treat SANE_LIBRARY_HANDLING as a no-op. Include
72548         <stdlib.h>.
72549         (gl_msvc_invalid_parameter_handler): Implement DEFAULT_HANDLING.
72551 2011-09-25  Bruno Haible  <bruno@clisp.org>
72553         msvc-inval: Make handler multithread-safe.
72554         * lib/msvc-inval.h (struct gl_msvc_inval_per_thread): New type.
72555         (gl_msvc_inval_restart, gl_msvc_inval_restart_valid): Remove
72556         declarations.
72557         (gl_msvc_inval_current): New declaration.
72558         (TRY_MSVC_INVAL, CATCH_MSVC_INVAL, DONE_MSVC_INVAL) [!_MSC_VER]:
72559         Operate on the structure returned by gl_msvc_inval_current().
72560         * lib/msvc-inval.c (gl_msvc_inval_restart, gl_msvc_inval_restart_valid):
72561         Remove varaiables.
72562         (tls_index, tls_initialized): New variables.
72563         (not_per_thread): New variable.
72564         (gl_msvc_inval_current): New function.
72565         (gl_msvc_invalid_parameter_handler) [!_MSC_VER]: Use the structure
72566         returned by gl_msvc_inval_current().
72568 2011-09-25  Bruno Haible  <bruno@clisp.org>
72570         msvc-inval: Install handler globally.
72571         * lib/msvc-inval.h (STATUS_GNULIB_INVALID_PARAMETER): Define also for
72572         !_MSC_VER.
72573         (gl_msvc_invalid_parameter_handler): Remove declaration.
72574         (gl_msvc_inval_restart_valid, gl_msvc_inval_ensure_handler): New
72575         declarations.
72576         (TRY_MSVC_INVAL, CATCH_MSVC_INVAL, DONE_MSVC_INVAL) [!_MSC_VER]:
72577         Install the handler globally, don't uninstall it.
72578         * lib/msvc-inval.c (gl_msvc_inval_restart_valid): New variable.
72579         (gl_msvc_invalid_parameter_handler): Make static. If the restart is not
72580         currently valid, call RaiseException instead.
72581         (gl_msvc_inval_initialized, gl_msvc_inval_ensure_handler): Define also
72582         for !_MSC_VER.
72584 2011-09-25  Bruno Haible  <bruno@clisp.org>
72586         strerror_r-posix: Fix for MSVC 9.
72587         * lib/strerror_r.c (local_snprintf): New function.
72588         (snprintf): Define to local_snprintf, not to _snprintf.
72590 2011-09-25  Bruno Haible  <bruno@clisp.org>
72592         ftruncate: Support for MSVC 9.
72593         * lib/ftruncate.c: Include errno.h, msvc-inval.h.
72594         (chsize_nothrow): New function.
72595         (chsize): Redefine as a macro.
72596         * m4/ftruncate.m4 (gl_PREREQ_FTRUNCATE): Require AC_C_INLINE.
72597         * modules/ftruncate (Depends-on): Add msvc-inval.
72599 2011-09-25  Bruno Haible  <bruno@clisp.org>
72601         New module 'fstat'.
72602         * lib/sys_stat.in.h (fstat): Declare only if GNULIB_FSTAT is set.
72603         * lib/fstat.c: New file, based on a piece of lib/fchdir.c.
72604         * lib/fchdir.c (rpl_fstat): Remove function.
72605         * m4/fstat.m4: New file.
72606         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Don't set REPLACE_FSTAT.
72607         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Test whether fstat is
72608         declared.
72609         (gl_SYS_STAT_H_DEFAULTS): Initialize GNULIB_FSTAT.
72610         * modules/sys_stat (Makefile.am): Substitute GNULIB_FSTAT.
72611         * modules/fstat: New file.
72612         * modules/sys_stat-tests (Depends-on): Remove fstat-tests.
72613         * tests/test-sys_stat-c++.cc (fstat): Check only if GNULIB_TEST_FSTAT
72614         is set.
72615         * doc/posix-functions/fstat.texi: Mention the new module and the
72616         problem on MSVC.
72617         * NEWS: Mention the change.
72618         * modules/acl (Depends-on): Add fstat.
72619         * modules/chdir-safer (Depends-on): Likewise.
72620         * modules/chown (Depends-on): Likewise.
72621         * modules/copy-file (Depends-on): Likewise.
72622         * modules/fchdir (Depends-on): Likewise.
72623         * modules/fdopendir (Depends-on): Likewise.
72624         * modules/fopen (Depends-on): Likewise.
72625         * modules/fts (Depends-on): Likewise.
72626         * modules/getcwd (Depends-on): Likewise.
72627         * modules/isapipe (Depends-on): Likewise.
72628         * modules/linkat (Depends-on): Likewise.
72629         * modules/lseek (Depends-on): Likewise.
72630         * modules/mkdir-p (Depends-on): Likewise.
72631         * modules/open (Depends-on): Likewise.
72632         * modules/openat (Depends-on): Likewise.
72633         * modules/read-file (Depends-on): Likewise.
72634         * modules/renameat (Depends-on): Likewise.
72635         * modules/utimens (Depends-on): Likewise.
72637 2011-09-25  Bruno Haible  <bruno@clisp.org>
72639         linkat: Fix compilation on MSVC 9.
72640         * lib/linkat.c: Don't include <stdint.h>.
72642 2011-09-25  Bruno Haible  <bruno@clisp.org>
72644         fclose: Support for MSVC 9.
72645         * lib/fclose.c: Include msvc-inval.h.
72646         (fclose_nothrow): New function.
72647         (rpl_fclose): Use it.
72648         * modules/fclose (Depends-on): Add msvc-inval.
72649         * doc/posix-functions/fclose.texi: Mention the problem on MSVC.
72651 2011-09-24  Paul Eggert  <eggert@cs.ucla.edu>
72653         dup2: minor simplifications
72654         * lib/dup2.c (ms_windows_dup2): Omit 'inline' as it's not clear
72655         that it's a performance win.
72656         (rpl_dup2): Change "if !((defined _WIN32 || defined __WIN32__) &&
72657         ! defined __CYGWIN__)" to "ifdef F_GETFL".
72659 2011-09-24  Jim Meyering  <meyering@redhat.com>
72661         test-futimens: avoid a warning from gcc -Wshadow
72662         * tests/test-futimens.h (test_futimens): Rename inner local, s/fd/fd0/
72663         to avoid a shadowing warning.
72665 2011-09-24  Bruno Haible  <bruno@clisp.org>
72667         fdopen: Support for MSVC 9.
72668         * m4/fdopen.m4 (gl_FUNC_FDOPEN): Set REPLACE_FDOPEN also if
72669         HAVE_MSVC_INVALID_PARAMETER_HANDLER is 1.
72670         * lib/fdopen.c: Include msvc-inval.h.
72671         (fdopen_nothrow): New function.
72672         (rpl_fdopen): Use it.
72673         * modules/fdopen (Depends-on): Add msvc-inval.
72674         * modules/fclose-tests (Depends-on): Add fdopen.
72675         * modules/fflush-tests (Depends-on): Likewise.
72676         * modules/fgetc-tests (Depends-on): Likewise.
72677         * modules/fputc-tests (Depends-on): Likewise.
72678         * modules/fread-tests (Depends-on): Likewise.
72679         * modules/freopen-tests (Depends-on): Likewise.
72680         * modules/fseeko-tests (Depends-on): Likewise.
72681         * modules/ftello-tests (Depends-on): Likewise.
72682         * modules/fwrite-tests  (Depends-on): Likewise.
72683         * doc/posix-functions/fdopen.texi: Mention the problem on MSVC.
72685 2011-09-24  Bruno Haible  <bruno@clisp.org>
72687         fgetc, fputc, fread, fwrite tests: Avoid compilation error on MSVC.
72688         * modules/fgetc-tests (Depends-on): Add unistd.
72689         * modules/fputc-tests (Depends-on): Likewise.
72690         * modules/fread-tests (Depends-on): Likewise.
72691         * modules/fwrite-tests (Depends-on): Likewise.
72693 2011-09-24  Bruno Haible  <bruno@clisp.org>
72695         dup: Simplify autoconf test.
72696         * m4/dup.m4 (gl_FUNC_DUP): Don't run a test program. Instead, just rely
72697         on gl_MSVC_INVAL's result.
72699 2011-09-24  Bruno Haible  <bruno@clisp.org>
72701         Tests for function fwrite().
72702         * modules/fwrite-tests: New file.
72703         * tests/test-fwrite.c: New file.
72704         * modules/stdio-tests (Depends-on): Add fwrite-tests.
72706         Tests for function fread().
72707         * modules/fread-tests: New file.
72708         * tests/test-fread.c: New file.
72709         * modules/stdio-tests (Depends-on): Add fread-tests.
72711         Activate fputc tests.
72712         * modules/stdio-tests (Depends-on): Add fputc-tests.
72714         Enhance fgetc, fputc tests.
72715         * tests/test-fgetc.c (main): Also test the stream's error indicator.
72716         * tests/test-fputc.c (main): Likewise.
72718 2011-09-24  Bruno Haible  <bruno@clisp.org>
72720         write: Support for MSVC 9.
72721         * lib/unistd.in.h (write): Replace also when GNULIB_UNISTD_H_NONBLOCKING
72722         is not 1.
72723         * lib/write.c (write_nothrow): New function.
72724         (rpl_write): Define also when GNULIB_NONBLOCKING or GNULIB_SIGPIPE is
72725         not 1. Use write_nothrow.
72726         * m4/write.m4 (gl_FUNC_WRITE): Replace read if the platform has an
72727         invalid parameter handler.
72728         (gl_PREREQ_WRITE): New macro.
72729         * modules/write (Depends-on): Add msvc-inval.
72730         (configure.ac): Invoke gl_PREREQ_WRITE.
72731         * doc/posix-functions/write.texi: Mention the problem on MSVC.
72733 2011-09-24  Bruno Haible  <bruno@clisp.org>
72735         read: Fix last commit.
72736         * lib/read.c (read_nothrow): Change return type to 'ssize_t'.
72738 2011-09-24  Bruno Haible  <bruno@clisp.org>
72740         dup2: Fix last commit.
72741         * lib/dup2.c: Restore comments. Treat Cygwin like Unix.
72742         (rpl_dup2): Disable fcntl workaround on native Windows.
72744         sigprocmask: Make code safer.
72745         * lib/sigprocmask.c: Move '#include "msvc-inval.h"' before the code
72746         section that changes macro definitions for this compilation unit.
72748 2011-09-23  Paul Eggert  <eggert@cs.ucla.edu>
72750         dup2: clarify by coalescing Windows-specific material
72751         * lib/dup2.c: Move '#include "msvc-inval.h"' and '#include
72752         "msvc-nothrow.h"' to the Windows-specific section, so that the
72753         Emacs source need not contain these include files.
72754         (ms_windows_dup2): Rename from dup2_nothrow, and move all the
72755         Windows-specific fixes into this function rather than just the
72756         nothrow fix, as this shortens and clarifies the code.  Always
72757         define as a function, as that's a bit cleaner than having it be
72758         sometimes a function and sometimes a macro.
72759         (rpl_dup2): Move the Windows-specific stuff out of here and into
72760         ms_windows_dup2.  Don't protect the Haiku-related fix with
72761         "#if !defined __linux__", as the same code also works around
72762         a Linux kernel bug, and it doesn't add any system calls on any
72763         platform.  Add comment about FreeBSD 6.1.
72765         sigprocmask: move #include directive
72766         * lib/sigprocmask.c: Move '#include "msvc-inval.h"' to the
72767         Windows-specific section, so that the Emacs source need not
72768         contain msvc-inval.h.
72770 2011-09-23  Bruno Haible  <bruno@clisp.org>
72772         read: Support for MSVC 9.
72773         * lib/unistd.in.h (read): Replace also when GNULIB_UNISTD_H_NONBLOCKING
72774         is not 1.
72775         * lib/read.c (read_nothrow): New function.
72776         (rpl_read): Define also when GNULIB_NONBLOCKING is not 1. Use
72777         read_nothrow.
72778         * m4/read.m4 (gl_FUNC_READ): Replace read if the platform has an
72779         invalid parameter handler.
72780         (gl_PREREQ_READ): New macro.
72781         * modules/read (Depends-on): Add msvc-inval.
72782         (configure.ac): Invoke gl_PREREQ_READ.
72783         * doc/posix-functions/read.texi: Mention the problem on MSVC.
72785 2011-09-23  Bruno Haible  <bruno@clisp.org>
72787         close: Support for MSVC 9.
72788         * lib/close.c: Include <errno.h>, msvc-inval.h.
72789         (close_nothrow): New function.
72790         (rpl_close): Use it.
72791         * m4/close.m4 (gl_FUNC_CLOSE): Replace close if the platform has an
72792         invalid parameter handler.
72793         * modules/close (Depends-on): Add msvc-inval.
72794         * modules/dup2-tests (Depends-on): Add close.
72795         * modules/dup3-tests (Depends-on): Likewise.
72796         * modules/fcntl-tests (Depends-on): Likewise.
72797         * modules/spawn-pipe-tests (Depends-on): Likewise.
72798         * modules/unistd-safer-tests (Depends-on): Likewise.
72799         * doc/posix-functions/close.texi: Mention the problem on MSVC.
72801 2011-09-23  Bruno Haible  <bruno@clisp.org>
72803         New module 'dup'.
72804         * lib/unistd.in.h (dup): Declare only if the 'dup' module is in use.
72805         Allow replacement.
72806         * lib/dup.c: New file.
72807         * lib/fchdir.c (rpl_dup): Remove function.
72808         * m4/dup.m4: New file.
72809         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Don't set REPLACE_DUP here.
72810         * m4/unistd_h.m4 (gl_UNISTD_H): Test whether 'dup' is declared.
72811         (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_DUP.
72812         * modules/unistd (Makefile.am): Substitute GNULIB_DUP.
72813         * modules/dup: New file.
72814         * tests/test-unistd-c++.cc: Check the signature of 'dup' only if the
72815         'dup' module is in use.
72816         * modules/fdopendir (Depends-on): Add dup.
72817         * modules/fdutimensat-tests (Depends-on): Likewise.
72818         * modules/fts (Depends-on): Likewise.
72819         * modules/futimens-tests (Depends-on): Likewise.
72820         * modules/posix_spawnp-tests (Depends-on): Likewise.
72821         * modules/unistd-safer-tests (Depends-on): Likewise.
72822         * modules/utimens-tests (Depends-on): Likewise.
72823         * doc/posix-functions/dup.texi: Mention the new module and the problem
72824         on MSVC.
72826 2011-09-23  Bruno Haible  <bruno@clisp.org>
72828         getdtablesize: Support for MSVC 9.
72829         * lib/getdtablesize.c: Include msvc-inval.h.
72830         (_setmaxstdio_nothrow): New function.
72831         (_setmaxstdio): Redefine it.
72832         * m4/getdtablesize.m4 (gl_PREREQ_GETDTABLESIZE): New macro.
72833         * modules/getdtablesize (Depends-on): Add msvc-inval.
72834         (configure.ac): Invoke gl_PREREQ_GETDTABLESIZE.
72836 2011-09-23  Bruno Haible  <bruno@clisp.org>
72838         signal-h: Rename from signal.
72839         * modules/signal-h: Renamed from modules/signal.
72840         * modules/pthread_sigmask (Depends-on): Update.
72841         * modules/raise (Depends-on): Likewise.
72842         * modules/sigaction (Depends-on): Likewise.
72843         * modules/sigpipe (Depends-on): Likewise.
72844         * modules/sigprocmask (Depends-on): Likewise.
72845         * modules/sys_select (Depends-on): Likewise.
72846         * modules/signal-h-tests: Renamed from modules/signal-tests.
72847         (Files, Depends-on, Makefile.am): Update.
72848         * tests/test-signal-h.c: Renamed from tests/test-signal.c.
72849         * modules/signal-h-c++-tests: Renamed from modules/signal-c++-tests.
72850         (Files, Makefile.am): Update.
72851         * tests/test-signal-h-c++.cc: Renamed from tests/test-signal-c++.cc.
72852         * tests/test-signal-h-c++2.cc: Renamed from tests/test-signal-c++2.cc.
72853         * modules/signal: New placeholder file.
72854         * MODULES.html.sh (Support for systems lacking POSIX:2008): Update.
72855         * doc/posix-headers/signal.texi: Update.
72856         * NEWS: Mention the change.
72858 2011-09-23  Bruno Haible  <bruno@clisp.org>
72860         sigprocmask: Avoid crashes through signal() on MSVC 9.
72861         * lib/sigprocmask.c: Include msvc-inval.h.
72862         (signal_nothrow): New function.
72863         (signal): Redefine it.
72864         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Require AC_C_INLINE.
72865         * modules/sigprocmask (Depends-on): Add msvc-inval.
72866         * doc/posix-functions/signal.texi: Mention the problem on MSVC.
72868 2011-09-23  Bruno Haible  <bruno@clisp.org>
72870         Tests for module 'raise'.
72871         * modules/raise-tests: New file.
72872         * tests/test-raise.c: New file.
72874         raise: Support for MSVC.
72875         * lib/signal.in.h (raise): New declaration.
72876         * lib/raise.c (raise_nothrow, rpl_raise): New alternate implementation
72877         for native Windows platforms.
72878         * m4/raise.m4: New file.
72879         * m4/signal_h.m4 (gl_SIGNAL_H_DEFAULTS): Initialize GNULIB_RAISE,
72880         HAVE_RAISE, REPLACE_RAISE.
72881         * modules/signal (Makefile.am): Substitute GNULIB_RAISE, HAVE_RAISE,
72882         REPLACE_RAISE.
72883         * modules/raise (Status, Notice): Remove fields.
72884         (Files): Add m4/raise.m4.
72885         (Depends-on): Add signal, msvc-inval.
72886         (configure.ac): Use the common idioms.
72887         (Maintainer): Add me.
72888         * tests/test-signal-c++.cc: Check the signature of raise.
72889         * doc/posix-functions/raise.texi: Mention the problem on MSVC.
72891 2011-09-23  Bruno Haible  <bruno@clisp.org>
72893         pipe2: Fix compilation on pre-C99 compilers.
72894         * lib/pipe2.c (pipe2): Surround verify(...) declaration with braces.
72896 2011-09-23  Bruno Haible  <bruno@clisp.org>
72898         New module 'msvc-nothrow'. Makes _get_osfhandle safe on MSVC 9.
72899         * lib/msvc-nothrow.h: New file.
72900         * lib/msvc-nothrow.c: New file.
72901         * m4/msvc-nothrow.m4: New file.
72902         * modules/msvc-nothrow: New file.
72903         * lib/dup2.c: Include msvc-nothrow.h.
72904         (rpl_dup2): No need to protect _get_osfhandle call here.
72905         * lib/accept4.c: Include msvc-nothrow.h.
72906         * lib/error.c: Likewise.
72907         * lib/fcntl.c: Likewise.
72908         * lib/lseek.c: Likewise.
72909         * lib/nonblocking.c: Likewise.
72910         * lib/poll.c: Likewise.
72911         * lib/read.c: Likewise.
72912         * lib/select.c: Likewise.
72913         * lib/sockets.h: Likewise.
72914         * lib/sockets.c: Likewise.
72915         * lib/stdio-read.c: Likewise.
72916         * lib/stdio-write.c: Likewise.
72917         * lib/write.c: Likewise.
72918         * lib/w32sock.h: Likewise.
72919         * lib/w32spawn.h: Likewise.
72920         * lib/flock.c: Include msvc-nothrow.h instead of <io.h>.
72921         * lib/fsync.c: Likewise.
72922         * lib/isapipe.c: Likewise.
72923         * modules/dup2 (Depends-on): Add msvc-nothrow.
72924         * modules/accept4 (Depends-on): Likewise.
72925         * modules/error (Depends-on): Likewise.
72926         * modules/fcntl (Depends-on): Likewise.
72927         * modules/lseek (Depends-on): Likewise.
72928         * modules/nonblocking (Depends-on): Likewise.
72929         * modules/poll (Depends-on): Likewise.
72930         * modules/read (Depends-on): Likewise.
72931         * modules/select (Depends-on): Likewise.
72932         * modules/sockets (Depends-on): Likewise.
72933         * modules/sigpipe (Depends-on): Likewise.
72934         * modules/write (Depends-on): Likewise.
72935         * modules/accept (Depends-on): Likewise.
72936         * modules/bind (Depends-on): Likewise.
72937         * modules/connect (Depends-on): Likewise.
72938         * modules/gethostname (Depends-on): Likewise.
72939         * modules/getpeername (Depends-on): Likewise.
72940         * modules/getsockname (Depends-on): Likewise.
72941         * modules/getsockopt (Depends-on): Likewise.
72942         * modules/ioctl (Depends-on): Likewise.
72943         * modules/listen (Depends-on): Likewise.
72944         * modules/recv (Depends-on): Likewise.
72945         * modules/recvfrom (Depends-on): Likewise.
72946         * modules/send (Depends-on): Likewise.
72947         * modules/sendto (Depends-on): Likewise.
72948         * modules/setsockopt (Depends-on): Likewise.
72949         * modules/shutdown (Depends-on): Likewise.
72950         * modules/socket (Depends-on): Likewise.
72951         * modules/execute (Depends-on): Likewise.
72952         * modules/spawn-pipe (Depends-on): Likewise.
72953         * modules/flock (Depends-on): Likewise.
72954         * modules/fsync (Depends-on): Likewise.
72955         * modules/isapipe (Depends-on): Likewise.
72956         * tests/test-cloexec.c: Include msvc-nothrow.h.
72957         * tests/test-dup-safer.c: Likewise.
72958         * tests/test-dup2.c: Likewise.
72959         * tests/test-dup3.c: Likewise.
72960         * tests/test-fcntl.c: Likewise.
72961         * tests/test-pipe.c: Likewise.
72962         * tests/test-pipe2.c: Likewise.
72963         * modules/cloexec-tests (Depends-on): Add msvc-nothrow.
72964         * modules/unistd-safer-tests (Depends-on): Likewise.
72965         * modules/dup2-tests (Depends-on): Likewise.
72966         * modules/dup3-tests (Depends-on): Likewise.
72967         * modules/fcntl-tests (Depends-on): Likewise.
72968         * modules/pipe-posix-tests (Depends-on): Likewise.
72969         * modules/pipe2-tests (Depends-on): Likewise.
72971 2011-09-23  Bruno Haible  <bruno@clisp.org>
72973         dup2: Make code more maintainable.
72974         * lib/dup2.c (dup2_nothrow): New function, extracted from rpl_dup2.
72975         (rpl_dup2): Use it.
72976         * m4/dup2.m4 (gl_PREREQ_DUP2): New macro.
72977         * modules/dup2 (configure.ac): Invoke it.
72978         Reported by Paul Eggert.
72980 2011-09-23  Bruno Haible  <bruno@clisp.org>
72982         msvc-inval: Fix compilation error.
72983         * lib/msvc-inval.h: Include <excpt.h>.
72985 2011-09-23  Bruno Haible  <bruno@clisp.org>
72987         mkdir: Tweak for MSVC 9.
72988         * lib/sys_stat.in.h: Update comments.
72989         * doc/posix-functions/mkdir.texi: Mention problem on MSVC 9.
72991         Tests for module 'chdir'.
72992         * modules/chdir-tests: New file.
72993         * tests/test-chdir.c: New file.
72995         New module 'chdir'.
72996         * modules/chdir: New file.
72997         * lib/unistd.in.h: Include <io.h>, <direct.h> also for chdir.
72998         (chdir): New declaration.
72999         * m4/unistd_h.m4 (gl_UNISTD_H): Test whether chdir is declared.
73000         (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_CHDIR.
73001         * modules/unistd (Makefile.am): Substitute GNULIB_CHDIR.
73002         * tests/test-unistd-c++.cc: Check signature of chdir.
73003         * doc/posix-functions/chdir.texi: Mention problem on native Windows.
73004         * modules/chdir-long (Depends-on): Add chdir.
73005         * modules/fchdir (Depends-on): Likewise.
73006         * modules/rename (Depends-on): Likewise.
73007         * modules/savewd (Depends-on): Likewise.
73009         rmdir: Support for mingw, MSVC 9.
73010         * lib/unistd.in.h: Include <io.h> and <direct.h> also for rmdir.
73011         * doc/posix-functions/getcwd.texi: Mention problem on native Windows.
73013         getcwd: Tweak for MSVC 9.
73014         * lib/unistd.in.h: Update comments.
73015         * doc/posix-functions/getcwd.texi: Mention problem on MSVC 9.
73017 2011-09-22  Bruno Haible  <bruno@clisp.org>
73019         strerror_r-posix: Avoid a link error on MSVC.
73020         * m4/strerror_r.m4 (gl_PREREQ_STRERROR_R): Check for snprintf.
73021         * lib/strerror_r.c (snprintf): Define to _snprintf if it doesn't exist.
73023 2011-09-22  Bruno Haible  <bruno@clisp.org>
73025         select: Avoid link errors on MSVC.
73026         * m4/select.m4 (gl_FUNC_SELECT): Determine LIB_SELECT.
73027         * modules/select (Link): Replace $(LIBSOCKET) with $(LIB_SELECT).
73028         * modules/pselect (Link): Likewise.
73029         * NEWS: Mention the change.
73030         * modules/select-tests (Makefile.am): Link test-select, test-select-fd,
73031         test-select-stdin against $(LIB_SELECT).
73032         * modules/pselect-tests (Makefile.am): Link test-pselect against
73033         $(LIB_SELECT).
73035 2011-09-22  Bruno Haible  <bruno@clisp.org>
73037         select: Avoid compilation error on MSVC.
73038         * lib/select.c: Don't include <stdbool.h>.
73040 2011-09-21  Bruno Haible  <bruno@clisp.org>
73042         Consolidate all uses of PATH_MAX in *.m4 files.
73043         * m4/pathmax.m4 (gl_PATHMAX_SNIPPET, gl_PATHMAX_SNIPPET_PREREQ): New
73044         macros.
73045         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Use gl_PATHMAX_SNIPPET_PREREQ
73046         and gl_PATHMAX_SNIPPET.
73047         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): Likewise.
73048         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
73049         * modules/chdir-long (Files): Add m4/pathmax.m4.
73050         * modules/getcwd (Files): Likewise.
73052 2011-09-21  Bruno Haible  <bruno@clisp.org>
73054         ftruncate: Un-deprecate, concentrate on Win32 support.
73055         * modules/ftruncate (Status, Notice): Remove sections.
73056         (Depends-on): Add largefile.
73057         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Drop failure message on
73058         non-mingw platforms.
73059         * lib/ftruncate.c: Remove code for the older platforms. For Win32,
73060         include <io.h>.
73061         * modules/perror-tests (Depends-on): Add ftruncate.
73062         * doc/posix-functions/ftruncate.texi: Mention the MSVC problem and the
73063         'ftruncate' module.
73065 2011-09-21  Bruno Haible  <bruno@clisp.org>
73067         Add dependencies to new dirent related modules.
73068         * modules/opendir (Depends-on): Add closedir.
73069         * modules/getcwd (Depends-on): Add opendir, closedir.
73070         * modules/dirent-safer-tests (Depends-on): Likewise.
73071         * modules/fdopendir-tests (Depends-on): Likewise.
73072         * modules/rename-tests (Depends-on): Add opendir, readdir, closedir.
73073         * modules/renameat-tests (Depends-on): Likewise.
73075 2011-09-21  Bruno Haible  <bruno@clisp.org>
73077         opendir: Avoid compilation error on mingw.
73078         * lib/opendir.c: Include <stddef.h> always. Include <unistd.h> as well.
73079         * modules/opendir (Depends-on): Add unistd.
73081 2011-09-21  Bruno Haible  <bruno@clisp.org>
73083         ftruncate tests: Avoid a test failure on mingw.
73084         * tests/test-ftruncate.c (main): Allow a failure with EACCES.
73086 2011-09-21  Bruno Haible  <bruno@clisp.org>
73088         select tests: Avoid test failures on OSF/1 5.1 and mingw.
73089         * tests/test-select.h (test_bad_fd): Disable all tests on OSF/1 and
73090         native Windows.
73092 2011-09-21  Bruno Haible  <bruno@clisp.org>
73094         New module 'fdopen'.
73095         * lib/stdio.in.h (fdopen): New declaration.
73096         * lib/fdopen.c: New file.
73097         * m4/fdopen.m4: New file.
73098         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Initialize GNULIB_FDOPEN,
73099         REPLACE_FDOPEN.
73100         * modules/stdio (Makefile.am): Substitute GNULIB_FDOPEN,
73101         REPLACE_FDOPEN.
73102         * modules/fdopen: New file.
73103         * modules/stdio-tests (Depends-on): Remove fdopen-tests.
73104         * tests/test-stdio-c++.cc: Check signature of fdopen.
73105         * doc/posix-functions/fdopen.texi: Mention the new module.
73107 2011-09-21  Bruno Haible  <bruno@clisp.org>
73109         unlockpt tests: Avoid test failure on NetBSD 5.1.
73110         * tests/test-unlockpt.c (main): Skip the EBADF tests on NetBSD.
73111         * doc/posix-functions/unlockpt.texi: Mention the bug on NetBSD.
73113 2011-09-21  Bruno Haible  <bruno@clisp.org>
73115         getlogin, getlogin_r tests: Avoid test failure on Linux/SPARC.
73116         * tests/test-getlogin.c (main): Allow a failure with EINVAL.
73117         * tests/test-getlogin_r.c (main): Likewise.
73119 2011-09-20  Bruno Haible  <bruno@clisp.org>
73121         time tests: Don't require pid_t.
73122         * doc/posix-headers/time.texi: Revert last change.
73123         * m4/time_h.m4 (gl_HEADER_TIME_H_BODY): Revert last change.
73124         * tests/test-time.c: Comment out the check for pid_t.
73126 2011-09-20  Bruno Haible  <bruno@clisp.org>
73128         fsync tests: Avoid a test failure on mingw.
73129         * tests/test-fsync.c (main): Allow a failure with EIO.
73131 2011-09-20  Bruno Haible  <bruno@clisp.org>
73133         euidaccess: Update comments.
73134         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Update comments.
73136 2011-09-20  Bruno Haible  <bruno@clisp.org>
73138         Ensure EBADF returns for socket functions on mingw.
73139         * lib/accept.c (rpl_accept): Fail with error EBADF if the file
73140         descriptor is invalid.
73141         * lib/bind.c (rpl_bind): Likewise.
73142         * lib/connect.c (rpl_connect): Likewise.
73143         * lib/getpeername.c (rpl_getpeername): Likewise.
73144         * lib/getsockname.c (rpl_getsockname): Likewise.
73145         * lib/getsockopt.c (rpl_getsockopt): Likewise.
73146         * lib/listen.c (rpl_listen): Likewise.
73147         * lib/recv.c (rpl_recv): Likewise.
73148         * lib/recvfrom.c (rpl_recvfrom): Likewise.
73149         * lib/send.c (rpl_send): Likewise.
73150         * lib/sendto.c (rpl_sendto): Likewise.
73151         * lib/setsockopt.c (rpl_setsockopt): Likewise.
73152         * lib/shutdown.c (rpl_shutdown): Likewise.
73154 2011-09-20  Bruno Haible  <bruno@clisp.org>
73156         select tests: EBADF tests.
73157         * tests/test-select.h (do_select_bad_fd, do_select_bad_fd_nowait,
73158         test_bad_fd): New functions.
73159         (test_function): Invoke also test_bad_fd.
73161 2011-09-20  Bruno Haible  <bruno@clisp.org>
73163         Tests for module 'posix_spawn_file_actions_addopen.
73164         * modules/posix_spawn_file_actions_addopen-tests: New file.
73165         * tests/test-posix_spawn_file_actions_addopen.c: New file.
73167         Tests for module 'posix_spawn_file_actions_adddup2'.
73168         * modules/posix_spawn_file_actions_adddup2-tests: New file.
73169         * tests/test-posix_spawn_file_actions_adddup2.c: New file.
73171         Tests for module 'posix_spawn_file_actions_addclose'.
73172         * modules/posix_spawn_file_actions_addclose-tests: New file.
73173         * tests/test-posix_spawn_file_actions_addclose.c: New file.
73175 2011-09-20  Bruno Haible  <bruno@clisp.org>
73177         Tests for module 'unlockpt'.
73178         * modules/unlockpt-tests: New file.
73179         * tests/test-unlockpt.c: New file.
73180         * doc/posix-functions/unlockpt.texi: Mention the Cygwin 1.7 problem.
73182         Tests for module 'grantpt'.
73183         * modules/grantpt-tests: New file.
73184         * tests/test-grantpt.c: New file.
73185         * doc/posix-functions/grantpt.texi: Mention the Cygwin 1.7 problem.
73187 2011-09-20  Bruno Haible  <bruno@clisp.org>
73189         freopen tests: EBADF tests.
73190         * tests/test-freopen.c: Include errno.h, unistd.h.
73191         (main): Add tests for EBADF, commented out for the moment.
73193         fclose tests: EBADF tests.
73194         * tests/test-fclose.c (main): Add tests for EBADF.
73196         fflush tests: EBADF tests.
73197         * tests/test-fflush.c: Include errno.h, macros.h.
73198         (main): Add tests for EBADF.
73200         ftello tests: EBADF tests.
73201         * tests/test-ftello4.sh: New file.
73202         * tests/test-ftello4.c: New file.
73203         * modules/ftello-tests (Files): Add them.
73204         (Makefile.am): Arrange to compile test-ftello4 and run test-ftello4.sh.
73206         fseeko tests: EBADF tests.
73207         * tests/test-fseeko4.sh: New file.
73208         * tests/test-fseeko4.c: New file.
73209         * modules/fseeko-tests (Files): Add them.
73210         (Makefile.am): Arrange to compile test-fseeko4 and run test-fseeko4.sh.
73212         Tests for function fputc().
73213         * modules/fputc-tests: New file.
73214         * tests/test-fputc.c: New file.
73215         * modules/stdio-tests (Depends-on): Add fputc-tests.
73217         Tests for function fgetc().
73218         * modules/fgetc-tests: New file.
73219         * tests/test-fgetc.c: New file.
73220         * modules/stdio-tests (Depends-on): Add fgetc-tests.
73222         Tests for function fdopen().
73223         * modules/fdopen-tests: New file.
73224         * tests/test-fdopen.c: New file.
73225         * modules/stdio-tests (Depends-on): Add fdopen-tests.
73227         Tests for module 'vdprintf'.
73228         * modules/vdprintf-tests: New file.
73229         * tests/test-vdprintf.c: New file.
73231         Tests for module 'dprintf'.
73232         * modules/dprintf-tests: New file.
73233         * tests/test-dprintf.c: New file.
73235 2011-09-20  Bruno Haible  <bruno@clisp.org>
73237         Tests for module 'ioctl'.
73238         * modules/ioctl-tests: New file.
73239         * tests/test-ioctl.c: New file.
73241 2011-09-20  Bruno Haible  <bruno@clisp.org>
73243         fcntl tests: EBADF tests.
73244         * tests/test-fcntl.c (main): Add more tests for EBADF.
73246 2011-09-20  Bruno Haible  <bruno@clisp.org>
73248         utimensat tests: EBADF tests.
73249         * tests/test-utimensat.c (main): Add tests for EBADF.
73251         renameat tests: EBADF tests.
73252         * tests/test-renameat.c (main): Add tests for EBADF.
73254         mkfifoat tests: EBADF tests.
73255         * tests/test-mkfifoat.c (main): Add tests for EBADF.
73257         readlinkat tests: EBADF tests.
73258         * tests/test-readlinkat.c (main): Add tests for EBADF.
73260         symlinkat tests: EBADF tests.
73261         * tests/test-symlinkat.c (main): Add tests for EBADF.
73263         linkat tests: EBADF tests.
73264         * tests/test-linkat.c (main): Add tests for EBADF.
73266         Tests for module 'faccessat'.
73267         * modules/faccessat-tests: New file.
73268         * tests/test-faccessat.c: New file.
73270         fdopendir tests: EBADF tests.
73271         * tests/test-fdopendir.c (main): Add more tests for EBADF.
73273         openat tests: EBADF tests.
73274         * tests/test-fchownat.c (main): Add tests for EBADF.
73275         * tests/test-fstatat.c (main): Likewise.
73276         * tests/test-mkdirat.c (main): Likewise.
73277         * tests/test-openat.c (main): Likewise.
73278         * tests/test-unlinkat.c (main): Likewise.
73279         * tests/test-fchmodat.c: New file.
73280         * modules/openat-tests (Files): Add tests/test-fchmodat.c.
73281         (Makefile.am): Also run 'test-fchmodat'.
73283 2011-09-20  Bruno Haible  <bruno@clisp.org>
73285         utimens, futimens, fdutimensat tests: EBADF tests.
73286         * tests/test-futimens.h (test_futimens): Add more tests for EBADF.
73288         Tests for function fstat().
73289         * modules/fstat-tests: New file.
73290         * tests/test-fstat.c: New file.
73291         * modules/sys_stat-tests (Depends-on): Add fstat-tests.
73293 2011-09-20  Bruno Haible  <bruno@clisp.org>
73295         test-ttyname_r tests: EBADF tests.
73296         * tests/test-ttyname_r.c (main): Add tests for EBADF.
73298         Tests for module 'isatty'.
73299         * modules/isatty-tests: New file.
73300         * tests/test-isatty.c: New file.
73302         Tests for module 'write'.
73303         * modules/write-tests: New file.
73304         * tests/test-write.c: New file.
73306         Tests for module 'read'.
73307         * modules/read-tests: New file.
73308         * tests/test-read.c: New file.
73310         pwrite tests: EBADF tests.
73311         * tests/test-pwrite.c (main): Add tests for EBADF.
73313         pread tests: EBADF tests.
73314         * tests/test-pread.c (main): Add tests for EBADF.
73316         lseek tests: EBADF tests.
73317         * tests/test-lseek.c (main): Add more tests for EBADF.
73319         Tests for module 'ftruncate'.
73320         * modules/ftruncate-tests: New file.
73321         * tests/test-ftruncate.sh: New file.
73322         * tests/test-ftruncate.c: New file.
73324         fsync tests: EBADF tests.
73325         * tests/test-fsync.c (main): Add more tests for EBADF.
73327         fdatasync tests: EBADF tests.
73328         * tests/test-fdatasync.c (main): Add more tests for EBADF.
73330         Tests for module 'fchown'.
73331         * modules/fchown-tests: New file.
73332         * tests/test-fchown.c: New file.
73334         Tests for module 'fchmod'.
73335         * modules/fchmod-tests: New file.
73336         * tests/test-fchmod.c: New file.
73338         fchdir tests: EBADF tests.
73339         * tests/test-fchdir.c (main): Add more tests for EBADF.
73341         dup2 tests: EBADF tests.
73342         * tests/test-dup2.c (main): Add more tests for EBADF.
73344         Tests for module 'dup'.
73345         * modules/dup-tests: New file.
73346         * tests/test-dup.c: New file.
73348         Tests for module 'close'.
73349         * modules/close-tests: New file.
73350         * tests/test-close.c: New file.
73352 2011-09-20  Bruno Haible  <bruno@clisp.org>
73354         Tests for module 'shutdown'.
73355         * modules/shutdown-tests: New file.
73356         * tests/test-shutdown.c: New file.
73358         Tests for module 'setsockopt'.
73359         * modules/setsockopt-tests: New file.
73360         * tests/test-setsockopt.c: New file.
73362         Tests for module 'sendto'.
73363         * modules/sendto-tests: New file.
73364         * tests/test-sendto.c: New file.
73366         Tests for module 'send'.
73367         * modules/send-tests: New file.
73368         * tests/test-send.c: New file.
73370         Tests for module 'recvfrom'.
73371         * modules/recvfrom-tests: New file.
73372         * tests/test-recvfrom.c: New file.
73374         Tests for module 'recv'.
73375         * modules/recv-tests: New file.
73376         * tests/test-recv.c: New file.
73378         Tests for module 'listen'.
73379         * modules/listen-tests: New file.
73380         * tests/test-listen.c: New file.
73382         Tests for module 'getsockopt'.
73383         * modules/getsockopt-tests: New file.
73384         * tests/test-getsockopt.c: New file.
73386         Tests for module 'getsockname'.
73387         * modules/getsockname-tests: New file.
73388         * tests/test-getsockname.c: New file.
73390         Tests for module 'getpeername'.
73391         * modules/getpeername-tests: New file.
73392         * tests/test-getpeername.c: New file.
73394         Tests for module 'connect'.
73395         * modules/connect-tests: New file.
73396         * tests/test-connect.c: New file.
73398         Tests for module 'bind'.
73399         * modules/bind-tests: New file.
73400         * tests/test-bind.c: New file.
73402         accept4 tests: Fix for native Windows.
73403         * tests/test-accept4.c: Include sockets.h.
73404         (main): Invoke gl_sockets_startup.
73405         * modules/accept4-tests (Depends-on): Add sockets.
73407         accept tests: Fix for native Windows.
73408         * tests/test-accept.c: Include sockets.h.
73409         (main): Invoke gl_sockets_startup.
73410         * modules/accept-tests (Depends-on): Add sockets.
73412 2011-09-19  Bruno Haible  <bruno@clisp.org>
73414         msvc-inval: Require a semicolon after DONE_MSVC_INVAL.
73415         * lib/msvc-inval.h (TRY_MSVC_INVAL, DONE_MSVC_INVAL): Wrap in a
73416         do...while(0).
73417         * lib/dup2.c (rpl_dup2): Add a semicolon after DONE_MSVC_INVAL.
73418         Suggested by Paul Eggert.
73420 2011-09-19  Bruno Haible  <bruno@clisp.org>
73422         sched: Ensure pid_t is defined.
73423         * m4/sched_h.m4 (gl_SCHED_H): Arrange to override <sched.h> if it does
73424         not define pid_t.
73425         * lib/sched.in.h: Include <sys/types.h>.
73426         * doc/posix-headers/sched.texi: Mention the pid_t problem.
73427         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
73429 2011-09-19  Bruno Haible  <bruno@clisp.org>
73431         msvc-inval: Ensure the entire expansion is a single statement.
73432         * lib/msvc-inval.h (TRY_MSVC_INVAL, DONE_MSVC_INVAL): Add an extra pair
73433         of braces.
73435 2011-09-19  Jim Meyering  <meyering@redhat.com>
73437         tests: use printf, not echo in init.sh's warn_ function
73438         * tests/init.sh (warn_): Use printf, not echo.  The latter would
73439         misbehave when given strings containing a backslash or starting
73440         with e.g., -n.  James Youngman suggested setting IFS.
73442 2011-09-19  Eric Blake  <eblake@redhat.com>
73444         futimens: enhance test
73445         * tests/test-futimens.h (test_futimens): Also check for EBADF on
73446         closed non-negative fd.
73448         date: accept 'hence' as opposite of 'ago'
73449         * lib/parse-datetime.y (relative_time_table): Add 'hence'.
73450         * tests/test-parse-datetime.c (main): Enhance test.
73451         Suggested by Jesse Wilson.
73453 2011-09-19  Jim Meyering  <meyering@redhat.com>
73455         getcwd: don't fail in a deep directory on a system without openat
73456         Before this change, getcwd would fail when called from a directory
73457         of depth PATH_MAX / 3 or greater.  That was due to the fact that
73458         the non-openat implementation used "..", "../..", "../../..", etc.
73459         to access ancestor directories.  With too many, that string would
73460         be longer than PATH_MAX.
73461         * lib/getcwd.c (HAVE_OPENAT_SUPPORT): Define also when we are
73462         using gnulib's openat replacement.
73463         * m4/openat.m4: Set GNULIB_OPENAT, so getcwd.c knows when
73464         we're using the replacement function.
73466 2011-09-14  Martin von Gagern  <Martin.vGagern@gmx.net>
73468         maint.mk: avoid warnings from perl about missing files
73469         * top/maint.mk (def_sym_regex): Ignore files listed in
73470         $(gl_other_headers_) that do not exist, say because a project
73471         does not use a corresponding module.
73473 2011-09-18  Paul Eggert  <eggert@cs.ucla.edu>
73475         stat: use pathmax.h only if needed
73476         * lib/stat.c: Include pathmax.h only if REPLACE_FUNC_STAT_DIR.
73477         This is better for Emacs, which does not have a mingw port and
73478         therefore can avoid the pathmax module.
73480         utimens: remove dependency on dup2
73481         * lib/utimens.c (fdutimens): Don't invoke dup2; it's not needed
73482         to work around the Linux kernel bug.
73483         * modules/utimens (Depends-on): Remove dup2.
73485 2011-09-18  Bruno Haible  <bruno@clisp.org>
73487         inet_ntop, inet_pton: Look for it also in libresolv.
73488         * m4/inet_ntop.m4 (gl_FUNC_INET_NTOP): If the function was not found in
73489         libnsl, search for it in libresolv.
73490         * m4/inet_pton.m4 (gl_FUNC_INET_PTON): Likewise.
73491         Needed on Solaris 7.
73493 2011-09-18  Bruno Haible  <bruno@clisp.org>
73495         accept, accept4 tests: Avoid link error on Solaris.
73496         * modules/accept-tests (Makefile.am): Link test-accept against
73497         $(LIBSOCKET).
73498         * modules/accept4-tests (Makefile.am): Link test-accept4 against
73499         $(LIBSOCKET).
73501         accept4: Avoid link error on Solaris.
73502         * modules/accept4 (Link): New section.
73504         socket functions: Avoid link errors on Solaris.
73505         * modules/accept (Depends-on): Add socketlib.
73506         (Link): New section.
73507         * modules/bind (Depends-on): Add socketlib.
73508         (Link): New section.
73509         * modules/connect (Depends-on): Add socketlib.
73510         (Link): New section.
73511         * modules/getpeername (Depends-on): Add socketlib.
73512         (Link): New section.
73513         * modules/getsockname (Depends-on): Add socketlib.
73514         (Link): New section.
73515         * modules/getsockopt (Depends-on): Add socketlib.
73516         (Link): New section.
73517         * modules/listen (Depends-on): Add socketlib.
73518         (Link): New section.
73519         * modules/recv (Depends-on): Add socketlib.
73520         (Link): New section.
73521         * modules/recvfrom (Depends-on): Add socketlib.
73522         (Link): New section.
73523         * modules/send (Depends-on): Add socketlib.
73524         (Link): New section.
73525         * modules/sendto (Depends-on): Add socketlib.
73526         (Link): New section.
73527         * modules/setsockopt (Depends-on): Add socketlib.
73528         (Link): New section.
73529         * modules/shutdown (Depends-on): Add socketlib.
73530         (Link): New section.
73531         * modules/socket (Depends-on): Add socketlib.
73532         (Link): New section.
73534 2011-09-18  Bruno Haible  <bruno@clisp.org>
73536         ptsname tests: Let the test fail rather than hang (e.g. on AIX 5.1).
73537         * tests/test-ptsname.c (main): Terminate the test if it takes longer
73538         than 5 seconds.
73539         * modules/ptsname-tests (configure.ac): Test for alarm.
73541 2011-09-18  Bruno Haible  <bruno@clisp.org>
73543         posix_spawn_file_actions_add*: Fix module dependencies.
73544         * modules/posix_spawn_file_actions_addclose (Dependencies): Add
73545         posix_spawn_file_actions_init.
73546         * modules/posix_spawn_file_actions_adddup2 (Dependencies): Likewise.
73547         * modules/posix_spawn_file_actions_addopen (Dependencies): Likewise.
73549 2011-09-18  Bruno Haible  <bruno@clisp.org>
73551         rename, renameat tests: Avoid test failures on FreeBSD 6.4.
73552         * tests/test-rename.h (test_rename): Allow error code EEXIST.
73553         * tests/test-renameat.c (main): Likewise.
73555 2011-09-18  Bruno Haible  <bruno@clisp.org>
73557         Tests for module 'accept4'.
73558         * modules/accept4-tests: New file.
73559         * tests/test-accept4.c: New file.
73561 2011-09-18  Bruno Haible  <bruno@clisp.org>
73563         Tests for module 'accept'.
73564         * modules/accept-tests: New file.
73565         * tests/test-accept.c: New file.
73567 2011-09-18  Bruno Haible  <bruno@clisp.org>
73569         dup2: Support for MSVC.
73570         * lib/dup2.c: Include msvc-inval.h.
73571         (rpl_dup2): Handle invalid parameter notifications during dup2 and
73572         _get_osfhandle calls.
73573         * modules/dup2 (Depends-on): Add msvc-inval.
73574         * doc/posix-functions/dup2.texi: Mention problem on MSVC.
73576         New module 'msvc-inval'.
73577         * lib/msvc-inval.h: New file.
73578         * lib/msvc-inval.c: New file.
73579         * m4/msvc-inval.m4: New file.
73580         * modules/msvc-inval: New file.
73582 2011-09-17  Bruno Haible  <bruno@clisp.org>
73584         Tests for module 'pclose'.
73585         * modules/pclose-tests: New file.
73587         New module 'pclose'.
73588         * lib/stdio.in.h (pclose): New declaration.
73589         * lib/pclose.c: New file.
73590         * m4/pclose.m4: New file.
73591         * m4/stdio_h.m4 (gl_STDIO_H): Test whether pclose is declared.
73592         (gl_STDIO_H_DEFAULTS): Initialize GNULIB_PCLOSE, HAVE_PCLOSE.
73593         * modules/stdio (Makefile.am): Substitute GNULIB_PCLOSE, HAVE_PCLOSE.
73594         * modules/pclose: New file.
73595         * modules/popen-tests (Depends-on): Add pclose.
73596         * modules/popen-safer-tests (Depends-on): Likewise.
73597         * doc/posix-functions/pclose.texi: Mention the new module.
73599 2011-09-17  Bruno Haible  <bruno@clisp.org>
73601         popen: Support for MSVC.
73602         * lib/stdio.in.h (popen): Declare it if the system lacks this function.
73603         * lib/popen.c (popen): Provide alternate definition for native Windows.
73604         * m4/popen.m4 (gl_FUNC_POPEN): Test if popen exists. Set HAVE_POPEN.
73605         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Initialize HAVE_POPEN.
73606         * modules/popen (Depends-on, configure.ac): Update condition.
73607         * modules/stdio (Makefile.am): Substitute HAVE_POPEN.
73608         * doc/posix-functions/popen.texi: Mention that the MSVC problem is
73609         fixed.
73611 2011-09-17  Bruno Haible  <bruno@clisp.org>
73613         isnanl, isnand, isnanf: Work around MSVC bug.
73614         * lib/isnan.c (FUNC): Use alternate ways of computing NaN and Infinity.
73616 2011-09-17  Bruno Haible  <bruno@clisp.org>
73618         sys_socket tests: Fix recent mistake.
73619         * tests/test-sys_socket.c (t1): Avoid collision of identifiers.
73621 2011-09-17  Bruno Haible  <bruno@clisp.org>
73623         putenv: Support for MSVC.
73624         * modules/putenv (Depends-on): Add environ.
73625         * lib/putenv.c (environ): Disable declaration.
73626         * lib/unistd.in.h: Update comment.
73628 2011-09-17  Bruno Haible  <bruno@clisp.org>
73630         math: Avoid macro redefinition warnings on MSVC.
73631         * lib/math.in.h (ceilf, ceill, floorf, floorl, frexpl, ldexpl):
73632         Undefine before redefining.
73634 2011-09-17  Bruno Haible  <bruno@clisp.org>
73636         doc: Mention functions which are declared as macros.
73637         * doc/posix-functions/*[fl].texi: Mention that some functions are
73638         defined as macros with arguments only.
73640 2011-09-17  Bruno Haible  <bruno@clisp.org>
73642         Add dependencies to new dirent related modules.
73643         * modules/backupfile (Depends-on): Add opendir, readdir, closedir.
73644         * modules/fts (Depends-on): Likewise.
73645         * modules/glob (Depends-on): Likewise.
73646         * modules/savedir (Depends-on): Likewise.
73647         * modules/scandir (Depends-on): Likewise.
73648         * modules/dirent-safer (Depends-on): Add opendir, closedir.
73649         * modules/fdopendir (Depends-on): Add opendir.
73651 2011-09-17  Bruno Haible  <bruno@clisp.org>
73653         inet_pton: Support for MSVC on Windows Vista or newer.
73654         * lib/arpa_inet.in.h (inet_pton): Also consider REPLACE_INET_PTON.
73655         * lib/inet_pton.c (rpl_inet_pton): Use a simple wrapper if
73656         HAVE_DECL_INET_PTON is defined.
73657         * m4/inet_pton.m4 (gl_FUNC_INET_PTON): Invoke gl_PREREQ_SYS_H_WINSOCK2.
73658         On platforms with <winsock2.h>, test whether inet_pton is declared in
73659         <ws2tcpip.h>. If so, arrange to replace it.
73660         * m4/arpa_inet_h.m4 (gl_ARPA_INET_H_DEFAULTS): Initialize
73661         REPLACE_INET_PTON.
73662         * modules/arpa_inet (Makefile.am): Substitute REPLACE_INET_PTON.
73663         * modules/inet_pton (Files): Add m4/sys_socket_h.m4.
73664         (Depends-on, configure.ac): Update condition.
73665         * doc/posix-functions/inet_pton.texi: Mention the MSVC problem.
73667 2011-09-17  Bruno Haible  <bruno@clisp.org>
73669         inet_ntop: Support for MSVC on Windows Vista or newer.
73670         * lib/arpa_inet.in.h (inet_ntop): Also consider REPLACE_INET_NTOP.
73671         * lib/inet_ntop.c (rpl_inet_ntop): Use a simple wrapper if
73672         HAVE_DECL_INET_NTOP is defined.
73673         * m4/inet_ntop.m4 (gl_FUNC_INET_NTOP): Invoke gl_PREREQ_SYS_H_WINSOCK2.
73674         On platforms with <winsock2.h>, test whether inet_ntop is declared in
73675         <ws2tcpip.h>. If so, arrange to replace it.
73676         * m4/arpa_inet_h.m4 (gl_ARPA_INET_H_DEFAULTS): Initialize
73677         REPLACE_INET_NTOP.
73678         * modules/arpa_inet (Makefile.am): Substitute REPLACE_INET_NTOP.
73679         * modules/inet_ntop (Files): Add m4/sys_socket_h.m4.
73680         (Depends-on, configure.ac): Update condition.
73681         * doc/posix-functions/inet_ntop.texi: Mention the MSVC problem.
73683 2011-09-16  Eric Blake  <eblake@redhat.com>
73685         test-fsync: yet another enhancement
73686         * tests/test-fsync.c (main): Also test behavior on read-only text
73687         file.
73689 2011-09-16  Bruno Haible  <bruno@clisp.org>
73691         Enhance fsync, fdatasync tests.
73692         * tests/test-fsync.c (main): Test both STDIN_FILENO and STDOUT_FILENO.
73693         * tests/test-fdatasync.c (main): Likewise.
73695 2011-09-16  Bruno Haible  <bruno@clisp.org>
73697         Support for MSVC compiler: Ensure mode_t gets defined.
73698         * m4/fcntl_h.m4 (gl_FCNTL_H): Require AC_TYPE_MODE_T.
73699         * m4/spawn_h.m4 (gl_SPAWN_H): Likewise.
73700         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Likewise.
73701         * m4/sys_types_h.m4 (gl_SYS_TYPES_H): Likewise.
73702         * tests/test-fcntl-h.c: Check that mode_t is defined.
73703         * tests/test-sys_stat.c: Likewise.
73704         * tests/test-sys_types.c: Likewise.
73705         * doc/posix-headers/fcntl.texi: Mention the missing mode_t problem.
73706         * doc/posix-headers/sys_stat.texi: Likewise.
73707         * doc/posix-headers/sys_types.texi: Likewise.
73709 2011-09-16  Bruno Haible  <bruno@clisp.org>
73711         sys_stat: Support for MSVC.
73712         * lib/sys_stat.in.h (S_IFIFO): Define to _S_IFIFO if that exists.
73713         * tests/test-sys_stat.c: Don't assume that S_IFBLK exists.
73714         * doc/posix-headers/sys_stat.texi: Mention missing S_IFIFO, S_IFBLK on
73715         MSVC.
73717 2011-09-16  Bruno Haible  <bruno@clisp.org>
73719         Support for MSVC compiler: Ensure off_t gets defined.
73720         * lib/unistd.in.h: Include <sys/types.h>.
73721         * tests/test-fcntl-h.c: Check that off_t is defined.
73722         * tests/test-sys_stat.c: Likewise.
73723         * tests/test-sys_types.c: Likewise.
73725 2011-09-16  Eric Blake  <eblake@redhat.com>
73727         fdatasync: port to Solaris
73728         * m4/fdatasync.m4 (gl_FUNC_FDATASYNC): Set LIB_FDATASYNC.
73729         * modules/fdatasync (Link): Document it.
73730         * modules/fdatasync-tests (test_fdatasync_LDADD): Link with it.
73732         fdatasync: port to MacOS X 10.7
73733         * m4/fdatasync.m4 (gl_FUNC_FDATASYNC): Check for present but not
73734         declared.
73735         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Another default.
73736         * modules/unistd (Makefile.am): Substitute it.
73737         * lib/unistd.in.h (fdatasync): Declare on MacOS.
73738         * doc/posix-functions/fdatasync.texi (fdatasync): Document it.
73740         fdatasync: minor improvements
73741         * modules/fdatasync (Depends-on): Add condition for fsync.
73742         * lib/fdatasync.c (fdatasync): Add comment.
73743         * tests/test-unistd-c++.cc: Test fdatasync.
73745         unistd: update refs to newer POSIX
73746         * lib/unistd.in.h: Prefer POSIX 2008 over 2001.
73747         Suggested by Bruno Haible.
73749         fdatasync: new module
73750         * modules/fsync (Description): Document difference to fdatasync.
73751         * modules/fdatasync: New module.
73752         * m4/fdatasync.m4 (gl_FUNC_FDATASYNC): New file.
73753         * lib/fdatasync.c (fdatasync): Likewise.
73754         * m4/unistd_h.m4 (gl_UNISTD_H, gl_UNISTD_H_DEFAULTS): Set up
73755         defaults.
73756         * modules/unistd (Makefile.am): Set witnesses.
73757         * lib/unistd.in.h (fdatasync): Declare.
73758         * MODULES.html.sh: Document it.
73759         * doc/posix-functions/fdatasync.texi (fdatasync): Likewise.
73760         * modules/fdatasync-tests: New test.
73761         * tests/test-fdatasync.c: Likewise.
73763 2011-09-16  Eric Blake  <eblake@redhat.com>
73765         test-fsync: enhance tests
73766         * modules/fsync-tests (Depends-on): Add errno, for mingw.
73767         * tests/test-fsync.c (main): Enhance test.
73769 2011-09-15  Bruno Haible  <bruno@clisp.org>
73771         Support for MSVC compiler: Ensure ssize_t gets defined.
73772         * doc/posix-headers/sys_types.texi: Mention the missing ssize_t problem.
73773         * doc/posix-headers/stdio.texi: Likewise.
73774         * modules/stdio (Depends-on): Add ssize_t.
73775         * modules/sys_socket (Depends-on): Likewise.
73776         * modules/sys_types (Depends-on): Likewise.
73777         * modules/sys_uio (Depends-on): Likewise.
73778         * modules/unistd (Depends-on): Likewise.
73779         * tests/test-sys_socket.c: Check that size_t and ssize_t are defined.
73780         * tests/test-sys_types.c: Check that ssize_t is defined.
73782 2011-09-14  Bruno Haible  <bruno@clisp.org>
73784         Avoid using #, the m4 comment starter character, near brackets.
73785         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER_ONE): Use |, not #, as
73786         delimiter character in sed expressions.
73787         * m4/include_next.m4 (gl_NEXT_HEADERS_INTERNAL): Likewise.
73788         Suggested by Eric Blake.
73790         Properly quote AC_CHECK_DECLS' 4th argument.
73791         * m4/c-stack.m4 (gl_PREREQ_C_STACK): Double-quote AC_CHECK_DECLS' 4th
73792         argument.
73793         * m4/ceilf.m4 (gl_FUNC_CEILF): Likewise.
73794         * m4/ceill.m4 (gl_FUNC_CEILL): Likewise.
73795         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
73796         * m4/floorf.m4 (gl_FUNC_FLOORF): Likewise.
73797         * m4/floorl.m4 (gl_FUNC_FLOORL): Likewise.
73798         * m4/fnmatch.m4 (gl_PREREQ_FNMATCH): Likewise.
73799         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Likewise.
73800         * m4/getdomainname.m4 (gl_FUNC_GETDOMAINNAME): Likewise.
73801         * m4/gethrxtime.m4 (gl_GETHRXTIME): Likewise.
73802         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
73803         * m4/inet_ntop.m4 (gl_FUNC_INET_NTOP): Likewise.
73804         * m4/inet_pton.m4 (gl_FUNC_INET_PTON): Likewise.
73805         * m4/isfinite.m4 (gl_ISFINITE): Likewise.
73806         * m4/isinf.m4 (gl_ISINF): Likewise.
73807         * m4/logb.m4 (gl_FUNC_LOGB): Likewise.
73808         * m4/readutmp.m4 (gl_READUTMP): Likewise.
73809         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
73810         * m4/round.m4 (gl_FUNC_ROUND): Likewise.
73811         * m4/roundf.m4 (gl_FUNC_ROUNDF): Likewise.
73812         * m4/roundl.m4 (gl_FUNC_ROUNDL): Likewise.
73813         * m4/signbit.m4 (gl_SIGNBIT): Likewise.
73814         * m4/sleep.m4 (gl_FUNC_SLEEP): Likewise.
73815         * m4/strsignal.m4 (gl_PREREQ_STRSIGNAL): Likewise.
73816         * m4/trunc.m4 (gl_FUNC_TRUNC): Likewise.
73817         * m4/truncf.m4 (gl_FUNC_TRUNCF): Likewise.
73818         * m4/truncl.m4 (gl_FUNC_TRUNCL): Likewise.
73819         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Likewise.
73820         * m4/wctob.m4 (gl_FUNC_WCTOB): Likewise.
73821         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
73822         Reported by Eric Blake.
73824         Properly quote AC_CHECK_DECL's 4th argument.
73825         * m4/acosl.m4 (gl_FUNC_ACOSL): Double-quote AC_CHECK_DECL's 4th
73826         argument.
73827         * m4/argp.m4 (gl_ARGP): Likewise.
73828         * m4/asinl.m4 (gl_FUNC_ASINL): Likewise.
73829         * m4/atanl.m4 (gl_FUNC_ATANL): Likewise.
73830         * m4/cosl.m4 (gl_FUNC_COSL): Likewise.
73831         * m4/expl.m4 (gl_FUNC_EXPL): Likewise.
73832         * m4/frexpl.m4 (gl_FUNC_FREXPL, gl_FUNC_FREXPL_NO_LIBM): Likewise.
73833         * m4/getloadavg.m4 (gl_GETLOADAVG): Likewise.
73834         * m4/ldexpl.m4 (gl_FUNC_LDEXPL): Likewise.
73835         * m4/logl.m4 (gl_FUNC_LOGL): Likewise.
73836         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Likewise.
73837         * m4/sinl.m4 (gl_FUNC_SINL): Likewise.
73838         * m4/sqrtl.m4 (gl_FUNC_SQRTL): Likewise.
73839         * m4/tanl.m4 (gl_FUNC_TANL): Likewise.
73840         Reported by Eric Blake.
73842 2011-09-14  Eric Blake  <eblake@redhat.com>
73844         opendir: avoid compile warning
73845         * lib/opendir.c (includes): Always include errno.h.
73846         Reported by Tatsuro MATSUOKA.
73848 2011-09-14  Jim Meyering  <meyering@redhat.com>
73850         maint.mk: sc_tight_scope: propagate failure from sub-make
73851         * top/maint.mk (sc_tight_scope): Actually initialize and use $fail.
73852         Reported by Martin von Gagern.
73854 2011-09-13  Bruno Haible  <bruno@clisp.org>
73856         tempname: Support for MSVC.
73857         * doc/posix-headers/fcntl.texi: Document the problem with O_ACCMODE on
73858         MSVC.
73859         * modules/tempname (Depends-on): Add fcntl-h.
73861 2011-09-13  Bruno Haible  <bruno@clisp.org>
73863         sys_time: Support for MSVC.
73864         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Invoke
73865         gl_PREREQ_SYS_H_WINSOCK2. When testing for 'struct timeval', also
73866         include <winsock2.h>.
73867         * lib/sys_time.in.h: On MSVC, include <winsock2.h> and hide its
73868         function declarations that collide with POSIX.
73869         * modules/sys_time (Files): Add m4/sys_socket_h.m4.
73870         (Makefile.am): Substitute HAVE_WINSOCK2_H.
73872 2011-09-13  Bruno Haible  <bruno@clisp.org>
73874         stat: Support for MSVC.
73875         * lib/stat.c: Include pathmax.h.
73876         * modules/stat (Depends-on): Add pathmax.
73878         pathmax: Support for native Windows.
73879         * lib/pathmax.h (PATH_MAX): Define to 260 on native Windows.
73881 2011-09-12  Bruno Haible  <bruno@clisp.org>
73883         New modules 'opendir', 'readdir', 'rewinddir', 'closedir'.
73884         * lib/dirent.in.h (struct dirent): New type.
73885         (DT_UNKNOWN, DT_FIFO, DT_CHR, DT_DIR, DT_BLK, DT_REG, DT_LNK, DT_SOCK,
73886         DT_WHT): New macros.
73887         (DIR): New type.
73888         (opendir, closedir): Declare only if the module 'opendir' is enabled.
73889         (readdir, rewinddir): New declarations.
73890         * lib/dirent-private.h: New file.
73891         * lib/opendir.c: New file.
73892         * lib/readdir.c: New file.
73893         * lib/rewinddir.c: New file.
73894         * lib/closedir.c: New file.
73895         * lib/fchdir.c (rpl_closedir, rpl_opendir): Remove functions.
73896         * m4/opendir.m4: New file.
73897         * m4/readdir.m4: New file.
73898         * m4/rewinddir.m4: New file.
73899         * m4/closedir.m4: New file.
73900         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Don't set REPLACE_OPENDIR,
73901         REPLACE_CLOSEDIR here.
73902         * m4/dirent_h.m4 (gl_DIRENT_H): Also check whether closedir, opendir,
73903         readdir, rewinddir are declared.
73904         (gl_DIRENT_H_DEFAULTS): Initialize GNULIB_OPENDIR, GNULIB_READDIR,
73905         GNULIB_REWINDDIR, GNULIB_CLOSEDIR, HAVE_OPENDIR, HAVE_READDIR,
73906         HAVE_REWINDDIR, HAVE_CLOSEDIR.
73907         * modules/dirent (Makefile.am): Substitute GNULIB_OPENDIR,
73908         GNULIB_READDIR, GNULIB_REWINDDIR, GNULIB_CLOSEDIR, HAVE_OPENDIR,
73909         HAVE_READDIR, HAVE_REWINDDIR, HAVE_CLOSEDIR.
73910         * modules/opendir: New file.
73911         * modules/readdir: New file.
73912         * modules/rewinddir: New file.
73913         * modules/closedir: New file.
73914         * doc/posix-functions/opendir.texi: Mention the 'opendir' module.
73915         * doc/posix-functions/readdir.texi: Mention the 'readdir' module.
73916         * doc/posix-functions/rewinddir.texi: Mention the 'rewinddir' module.
73917         * doc/posix-functions/closedir.texi: Mention the 'closedir' module.
73918         * NEWS: Mention the 'fchdir' change.
73920 2011-09-11  Bruno Haible  <bruno@clisp.org>
73922         asm-underscore.m4: Support for MSVC.
73923         * m4/asm-underscore.m4 (gl_C_ASM): New macro.
73924         (gl_ASM_SYMBOL_PREFIX): Require it. Use its results.
73926 2011-09-11  Reuben Thomas  <rrt@sc3d.org>
73928         Doc about crypt functions.
73929         * doc/posix-functions/crypt.texi: Expand range of glibc versions
73930         needing for _GNU_SOURCE to get crypt.
73931         * doc/posix-functions/encrypt.texi: Likewise.
73932         * doc/posix-functions/setkey.texi: Likewise.
73934 2011-09-11  Bruno Haible  <bruno@clisp.org>
73936         doc: Update regarding MSVC 9.
73937         * doc/gnulib-intro.texi (Target Platforms): Classify MSVC as "rarely
73938         tested".
73939         * doc/posix-functions/*.texi: Update with info about MSVC 9.
73940         * doc/posix-headers/*.texi: Likewise.
73941         * doc/pastposix-functions/*.texi: Likewise.
73942         * doc/glibc-functions/*.texi: Likewise.
73943         * doc/glibc-headers/*.texi: Likewise.
73945 2011-09-11  Bruno Haible  <bruno@clisp.org>
73947         unistd et al.: Don't assume <unistd.h> exists.
73948         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Don't include <unistd.h> if it
73949         does not exist.
73950         * m4/environ.m4 (gl_ENVIRON): Don't include <unistd.h> if it does not
73951         exist. But include <stdlib.h>.
73952         * m4/fcntl-o.m4 (gl_FCNTL_O_FLAGS): If <unistd.h> does not exist,
73953         include <io.h> and <stdlib.h> instead. Don't test symbolink links if
73954         symlink() does not exist.
73955         * m4/fflush.m4 (gl_FUNC_FFLUSH_STDIN): If <unistd.h> does not exist,
73956         include <io.h> instead.
73957         * m4/free.m4 (gl_FUNC_FREE): Assume free(NULL) works on native Windows.
73958         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): If <unistd.h> does not exist,
73959         include <direct.h> instead.
73960         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): Likewise.
73961         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
73962         * m4/lseek.m4 (gl_FUNC_LSEEK): If <unistd.h> does not exist, include
73963         <io.h> instead.
73964         * m4/rename.m4 (gl_FUNC_RENAME): Assume rename() manages hard links
73965         correctly if the system does not have hard links.
73966         * m4/rmdir.m4 (gl_FUNC_RMDIR): If <unistd.h> does not exist, include
73967         <direct.h> instead.
73968         * m4/unistd_h.m4 (gl_UNISTD_H): If <unistd.h> does not exist, bypass
73969         it when looking for function declarations.
73970         * m4/unlink.m4 (gl_FUNC_UNLINK): If <unistd.h> does not exist, include
73971         <direct.h> and <io.h> instead.
73972         * doc/posix-headers/unistd.texi: More details about MSVC problem.
73974 2011-09-11  Bruno Haible  <bruno@clisp.org>
73976         strcase: Support for MSVC.
73977         * modules/strcase (Status, Notice): Remove obsoletion mark.
73978         * doc/posix-functions/strcasecmp.texi: Mention MSVC problem.
73979         * doc/posix-functions/strncasecmp.texi: Likewise.
73981         strings: Don't assume <strings.h> exists.
73982         * lib/strings.in.h: Include <strings.h> only if HAVE_STRINGS_H is 1.
73983         * m4/strings_h.m4 (gl_HEADER_STRINGS_H_BODY): Set HAVE_STRINGS_H.
73984         * modules/strings (Makefile.am): Substitute HAVE_STRINGS_H.
73985         * doc/posix-headers/strings.texi: Mention the MSVC problem.
73987 2011-09-11  Bruno Haible  <bruno@clisp.org>
73989         dirent: Don't assume <dirent.h> exists.
73990         * lib/dirent.in.h: Include <dirent.h> only if HAVE_DIRENT_H is 1.
73991         * m4/dirent_h.m4 (gl_DIRENT_H): Set HAVE_DIRENT_H.
73992         * modules/dirent (Makefile.am): Substitute HAVE_DIRENT_H.
73993         * doc/posix-headers/dirent.texi: Mention the MSVC problem.
73995 2011-09-11  Bruno Haible  <bruno@clisp.org>
73997         Fix wint_t on MSVC.
73998         * lib/wchar.in.h (wint_t): On MSVC, override it.
73999         * lib/wctype.in.h (wint_t): Likewise.
74000         * m4/stdint.m4 (gl_STDINT_TYPE_PROPERTIES): Override BITSIZEOF_WINT_T on
74001         MSVC.
74002         * doc/posix-headers/wchar.texi: Mention the problem with wint_t on MSVC.
74003         * doc/posix-headers/wctype.texi: Likewise.
74005 2011-09-11  Bruno Haible  <bruno@clisp.org>
74007         sys_types: Fix typo.
74008         * lib/sys_types.in.h: Fix typo in comment.
74009         Reported by Paul Eggert.
74011         Support for MSVC compiler: Ensure size_t gets defined.
74012         * modules/strings (Depends-on): Add 'sys_types'.
74013         * modules/sys_uio (Depends-on): Likewise.
74014         * lib/sys_uio.in.h: Update comment.
74016         C++ tests for module 'sys_types'.
74017         * modules/sys_types-c++-tests: New file.
74018         * tests/test-sys_types-c++.cc: New file.
74020         Tests for module 'sys_types'.
74021         * modules/sys_types-tests: New file.
74022         * tests/test-sys_types.c: New file.
74024         New module 'sys_types'.
74025         * lib/sys_types.in.h: New file.
74026         * m4/sys_types_h.m4: New file.
74027         * modules/sys_types: New file.
74028         * doc/posix-headers/sys_types.texi: Mention the new module and the
74029         size_t problem on MSVC 9.
74031 2011-09-11  Bruno Haible  <bruno@clisp.org>
74033         Support for MSVC compiler: Avoid division by a literal 0.
74034         * lib/math.in.h (NAN): Define through a function call also on MSVC.
74035         * m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Divide by 'zero' instead of 0.0.
74036         * m4/printf.m4 (gl_PRINTF_INFINITE, gl_PRINTF_DIRECTIVE_A,
74037         gl_PRINTF_DIRECTIVE_F, gl_PRINTF_FLAG_ZERO): Likewise.
74038         (gl_PRINTF_INFINITE_LONG_DOUBLE): Divide by 'zeroL' instead of 0.0L.
74039         * tests/infinity.h: New file.
74040         * tests/nan.h (NaNf, NaNd, NaNl): Define through a function call also
74041         on MSVC.
74042         * tests/test-ceilf1.c: Include infinity.h.
74043         (main): Use Infinityf.
74044         * tests/test-ceil1.c: Include infinity.h.
74045         (main): Use Infinityd.
74046         * tests/test-ceill.c: Include infinity.h.
74047         (main): Use Infinityl.
74048         * tests/test-dprintf-posix.c: Include infinity.h.
74049         (test_function): Use Infinityd.
74050         * tests/test-floorf1.c: Include infinity.h.
74051         (main): Use Infinityf.
74052         * tests/test-floor1.c: Include infinity.h.
74053         (main): Use Infinityd.
74054         * tests/test-floorl.c: Include infinity.h.
74055         (main): Use Infinityl.
74056         * tests/test-fprintf-posix.c: Include infinity.h.
74057         (test_function): Use Infinityd.
74058         * tests/test-frexp.c: Include infinity.h.
74059         (main): Use Infinityd.
74060         * tests/test-frexpl.c: Include infinity.h.
74061         (main): Use Infinityl.
74062         * tests/test-isfinite.c: Include infinity.h.
74063         (test_isfinitef): Use Infinityf.
74064         (test_isfinited): Use Infinityd.
74065         (test_isfinitel): Use Infinityl.
74066         * tests/test-isinf.c: Include infinity.h.
74067         (test_isinff): Use Infinityf.
74068         (test_isinfd): Use Infinityd.
74069         (test_isinfl): Use Infinityl.
74070         * tests/test-isnan.c: Include infinity.h.
74071         (test_float): Use Infinityf.
74072         (test_double): Use Infinityd.
74073         (test_long_double): Use Infinityl.
74074         * tests/test-isnanf.h: Include infinity.h.
74075         (main): Use Infinityf.
74076         * tests/test-isnand.h: Include infinity.h.
74077         (main): Use Infinityd.
74078         * tests/test-isnanl.h: Include infinity.h.
74079         (main): Use Infinityl.
74080         * tests/test-ldexpl.c: Include infinity.h.
74081         (main): Use Infinityl.
74082         * tests/test-printf-posix.h: Include infinity.h.
74083         (test_function): Use Infinityd.
74084         * tests/test-roundf1.c: Include infinity.h.
74085         (main): Use Infinityf.
74086         * tests/test-round1.c: Include infinity.h.
74087         (main): Use Infinityd.
74088         * tests/test-roundl.c: Include infinity.h.
74089         (main): Use Infinityl.
74090         * tests/test-signbit.c: Include infinity.h.
74091         (test_signbitf): Use Infinityf.
74092         (test_signbitd): Use Infinityd.
74093         (test_signbitl): Use Infinityl.
74094         * tests/test-snprintf-posix.h: Include infinity.h.
74095         (test_function): Use Infinityd, Infinityl.
74096         * tests/test-sprintf-posix.h: Include infinity.h.
74097         (test_function): Use Infinityd, Infinityl.
74098         * tests/test-truncf1.c: Include infinity.h.
74099         (main): Use Infinityf.
74100         * tests/test-trunc1.c: Include infinity.h.
74101         (main): Use Infinityd.
74102         * tests/test-truncl.c: Include infinity.h.
74103         (main): Use Infinityl.
74104         * tests/test-vasnprintf-posix.c: Include infinity.h.
74105         (test_function): Use Infinityd, Infinityl.
74106         * tests/test-vasprintf-posix.c: Include infinity.h.
74107         (test_function): Use Infinityd, Infinityl.
74108         * modules/ceilf-tests (Files): Add tests/infinity.h.
74109         * modules/ceil-tests (Files): Likewise.
74110         * modules/ceill-tests (Files): Likewise.
74111         * modules/dprintf-posix-tests (Files): Likewise.
74112         * modules/floorf-tests (Files): Likewise.
74113         * modules/floor-tests (Files): Likewise.
74114         * modules/floorl-tests (Files): Likewise.
74115         * modules/fprintf-posix-tests (Files): Likewise.
74116         * modules/frexp-tests (Files): Likewise.
74117         * modules/frexp-nolibm-tests (Files): Likewise.
74118         * modules/frexpl-tests (Files): Likewise.
74119         * modules/frexpl-nolibm-tests (Files): Likewise.
74120         * modules/isfinite-tests (Files): Likewise.
74121         * modules/isinf-tests (Files): Likewise.
74122         * modules/isnan-tests (Files): Likewise.
74123         * modules/isnanf-tests (Files): Likewise.
74124         * modules/isnanf-nolibm-tests (Files): Likewise.
74125         * modules/isnand-tests (Files): Likewise.
74126         * modules/isnand-nolibm-tests (Files): Likewise.
74127         * modules/isnanl-tests (Files): Likewise.
74128         * modules/isnanl-nolibm-tests (Files): Likewise.
74129         * modules/ldexpl-tests (Files): Likewise.
74130         * modules/printf-posix-tests (Files): Likewise.
74131         * modules/roundf-tests (Files): Likewise.
74132         * modules/round-tests (Files): Likewise.
74133         * modules/roundl-tests (Files): Likewise.
74134         * modules/signbit-tests (Files): Likewise.
74135         * modules/snprintf-posix-tests (Files): Likewise.
74136         * modules/sprintf-posix-tests (Files): Likewise.
74137         * modules/truncf-tests (Files): Likewise.
74138         * modules/trunc-tests (Files): Likewise.
74139         * modules/truncl-tests (Files): Likewise.
74140         * modules/vasnprintf-posix-tests (Files): Likewise.
74141         * modules/vasprintf-posix-tests (Files): Likewise.
74142         * modules/vdprintf-posix-tests (Files): Likewise.
74143         * modules/vfprintf-posix-tests (Files): Likewise.
74144         * modules/vprintf-posix-tests (Files): Likewise.
74145         * modules/vsnprintf-posix-tests (Files): Likewise.
74146         * modules/vsprintf-posix-tests (Files): Likewise.
74147         * modules/xprintf-posix-tests (Files): Likewise.
74149 2011-09-11  Bruno Haible  <bruno@clisp.org>
74151         Ensure pid_t gets defined.
74152         * m4/fcntl_h.m4 (gl_FCNTL_H): Require AC_TYPE_PID_T.
74153         * m4/sched_h.m4 (gl_SCHED_H): Likewise.
74154         * m4/signal_h.m4 (gl_SIGNAL_H): Likewise.
74155         * m4/spawn_h.m4 (gl_SPAWN_H): Likewise.
74156         * m4/sys_wait_h.m4 (gl_SYS_WAIT_H): Likewise.
74157         * m4/termios_h.m4 (gl_TERMIOS_H): Likewise.
74158         * m4/time_h.m4 (gl_HEADER_TIME_H_BODY): Likewise.
74159         * m4/unistd_h.m4 (gl_UNISTD_H): Likewise.
74160         * tests/test-fcntl-h.c: Check that pid_t is defined.
74161         * tests/test-sched.c: Likewise.
74162         * tests/test-termios.c: Likewise.
74163         * tests/test-time.c: Likewise.
74164         * doc/posix-headers/fcntl.texi: Mention lack of pid_t on MSVC platform.
74165         * doc/posix-headers/signal.texi: Likewise.
74166         * doc/posix-headers/sys_types.texi: Likewise.
74167         * doc/posix-headers/time.texi: Likewise.
74169 2011-09-11  Bruno Haible  <bruno@clisp.org>
74171         acl: Fix compilation on Solaris 10 (older version).
74172         * lib/file-has-acl.c (acl_ace_nontrivial): Use NEW_ACE_EVERYONE instead
74173         of ACE_EVERYONE.
74174         * lib/set-mode-acl.c (qset_acl): Likewise.
74175         Reported by Christian Jullien <eligis@orange.fr>.
74177 2011-09-10  Bruno Haible  <bruno@clisp.org>
74179         iconv, unsetenv: Add support for MSVC compiler.
74180         * m4/iconv.m4 (AM_ICONV): Use ISO C declaration syntax on MSVC.
74181         * m4/setenv.m4 (gl_FUNC_UNSETENV): Drop support for K&R C compilers.
74183 2011-09-10  Bruno Haible  <bruno@clisp.org>
74185         *printf: Add support for MSVC compiler.
74186         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_N): On MSVC, install a handler that
74187         handles the exception caused by the %n directive. When cross-compiling,
74188         guess no on native Windows.
74189         (gl_SNPRINTF_TRUNCATION_C99, gl_SNPRINTF_RETVAL_C99,
74190         gl_SNPRINTF_DIRECTIVE_N, gl_SNPRINTF_SIZE1): When snprintf is missing,
74191         emulate it through vsnprintf.
74192         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Update comment.
74193         * doc/posix-functions/dprintf.texi: Update documentation regarding
74194         MSVC 9.
74195         * doc/posix-functions/fprintf.texi: Likewise.
74196         * doc/posix-functions/printf.texi: Likewise.
74197         * doc/posix-functions/snprintf.texi: Likewise.
74198         * doc/posix-functions/sprintf.texi: Likewise.
74199         * doc/posix-functions/swprintf.texi: Likewise.
74200         * doc/posix-functions/vdprintf.texi: Likewise.
74201         * doc/posix-functions/vfprintf.texi: Likewise.
74202         * doc/posix-functions/vprintf.texi: Likewise.
74203         * doc/posix-functions/vsnprintf.texi: Likewise.
74204         * doc/posix-functions/vsprintf.texi: Likewise.
74205         * doc/glibc-functions/asprintf.texi: Likewise.
74206         * doc/glibc-functions/obstack_printf.texi: Likewise.
74207         * doc/glibc-functions/obstack_vprintf.texi: Likewise.
74208         * doc/glibc-functions/vasprintf.texi: Likewise.
74210 2011-09-10  Bruno Haible  <bruno@clisp.org>
74212         nocrash: Add support for native Windows.
74213         * m4/nocrash.m4 (GL_NOCRASH): Avoid a crash also on native Windows.
74215 2011-09-10  Michael Goffioul  <michael.goffioul@gmail.com>  (tiny change)
74216             Bruno Haible  <bruno@clisp.org>
74218         absolute-header, include-next: Add support for MSVC compiler.
74219         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER_ONE): Require
74220         AC_CANONICAL_HOST. On native Windows, recognize also backslash as
74221         directory separator in #line directives.
74222         * m4/include_next.m4 (gl_NEXT_HEADERS_INTERNAL): On native Windows,
74223         recognize also backslash as directory separator in #line directives.
74225 2011-09-08  Jim Meyering  <meyering@redhat.com>
74227         maint.mk: mark the post-release commit log with "maint: " prefix
74228         * top/maint.mk (emit-commit-log): Add "maint: " prefix to the
74229         one-line commit-log summary.
74231 2011-09-08  Reuben Thomas  <rrt@sc3d.org>
74232             Bruno Haible  <bruno@clisp.org>
74234         Doc about crypt functions.
74235         * doc/posix-functions/crypt.texi: Mention need for _GNU_SOURCE on glibc
74236         systems.
74237         * doc/posix-functions/encrypt.texi: Likewise.
74238         * doc/posix-functions/setkey.texi: Likewise.
74240 2011-09-08  Simon Josefsson  <simon@josefsson.org>
74242         * lib/gc.h: Fix copyright header.
74244 2011-09-07  Bruno Haible  <bruno@clisp.org>
74246         pthread: Determine $(LIB_PTHREAD) correctly on OSF/1 5.1.
74247         * m4/pthread.m4 (gl_PTHREAD_CHECK): Use AC_CACHE_CHECK and
74248         AC_LINK_IFELSE instead of AC_SEARCH_LIBS.
74250 2011-09-07  Bruno Haible  <bruno@clisp.org>
74252         openat: Work around compilation error with OSF/1 5.1 DTK cc.
74253         * lib/fopen.c: Use different syntax for include of <stdio.h>.
74254         * lib/freopen.c: Likewise.
74255         * lib/fstatat.c: Use different syntax for include of <sys/stat.h>.
74256         * lib/lstat.c: Likewise.
74257         * lib/stat.c: Likewise.
74258         * lib/open.c: Use different syntax for include of <fcntl.h>.
74259         * lib/openat.c: Include fcntl.h again, explicitly.
74261 2011-09-04  J.T. Conklin  <jtc@acorntoolworks.com>
74263         parse-datetime: document the newly accepted format
74264         * doc/parse-datetime.texi (Combined date and time of day items):
74265         New section.
74267 2011-09-06  Bruno Haible  <bruno@clisp.org>
74269         acl: Fix a test failure on newer Solaris 10 with ZFS.
74270         * tests/test-sameacls.c (main): Interpret acl GETACLCNT failure with
74271         ENOSYS as no ACL.
74272         Reported by Jim Meyering.
74274 2011-09-06  Bruno Haible  <bruno@clisp.org>
74276         acl: Update for AIX >= 5.3 with NFS.
74277         * lib/file-has-acl.c (file_has_acl): Interpret aclx_get failure with
74278         ENOSYS as no ACL.
74280         acl: Fix a test failure on AIX >= 5.3 with NFS.
74281         * tests/test-sameacls.c (main): Interpret aclx_get failure with ENOSYS
74282         as no ACL.
74284 2011-09-06  Bruno Haible  <bruno@clisp.org>
74286         acl: Fix a test failure on IRIX 6.5 with NFS.
74287         * lib/acl-internal.h (MODE_INSIDE_ACL): Define to 0 on IRIX.
74288         * lib/set-mode-acl.c (qset_acl): Test !HAVE_ACL_TYPE_EXTENDED instead
74289         of MODE_INSIDE_ACL. If !MODE_INSIDE_ACL, do a chmod_or_fchmod always.
74290         * lib/copy-acl.c (qcopy_acl): Likewise.
74292 2011-09-05  Paul Eggert  <eggert@cs.ucla.edu>
74294         openat: port to AIX 7.1 with large files
74295         AIX 7.1 does a "#define openat open64at" if large files are in use,
74296         so we can't simply #undef openat.  Use the orig_openat trick (similar
74297         to orig_open in lib/open.c) to work around the problem.  Problem
74298         reported by Kevin Brott for GNU tar, in the thread containing
74299         <http://lists.gnu.org/r/bug-tar/2011-09/msg00032.html>.
74300         * lib/openat.c (__need_system_fcntl_h): Define first.
74301         Include <fcntl.h> and <sys/types.h> before undefining.
74302         (orig_openat) [HAVE_OPENAT]: New inline function.
74303         (openat) [HAVE_OPENAT]: Do not undef.
74304         (rpl_openat): Use orig_openat, not openat.
74306 2011-09-05  Joachim Schmitz  <schmitz@hp.com>  (tiny change)
74307             Bruno Haible  <bruno@clisp.org>
74309         acl: Avoid errors on NonStop Kernel.
74310         * lib/file-has-acl.c (file_has_acl) [NonStop Kernel]: Ignore ENOSYS and
74311         ENOTSUP errors.
74313 2011-09-05  Bruno Haible  <bruno@clisp.org>
74315         acl: Clean up Solaris code.
74316         * lib/acl-internal.h: Remove no-op #if.
74317         * lib/file-has-acl.c: Likewise.
74318         * lib/set-mode-acl.c (qset_acl): Remove unused Solaris code.
74319         * lib/copy-acl.c (qcopy_acl): Likewise.
74321 2011-09-05  Bruno Haible  <bruno@clisp.org>
74323         acl: Fix a bug with NFSv4 ACLs on Solaris 10 (newer version) in
74324         binaries built on the original Solaris 10.
74325         * lib/file-has-acl.c (file_has_acl): ACLs with 4..6 ACEs can be
74326         trivial.
74328 2011-09-05  Bruno Haible  <bruno@clisp.org>
74330         acl: Improve support of NFSv4 ACLs on Solaris 10 (newer version).
74331         * lib/acl-internal.h (acl_nontrivial): Declare also on newer Solaris
74332         10.
74333         * lib/file-has-acl.c (acl_nontrivial): Define also on newer Solaris 10.
74334         (acl_ace_nontrivial): Likewise. Recognize the trivial ACLs with 6 ACEs.
74335         * lib/copy-acl.c (qcopy_acl): On newer Solaris 10, use acl or facl
74336         instead of acl_get, facl_get, acl_set, facl_set.
74338 2011-09-05  Bruno Haible  <bruno@clisp.org>
74340         copy-file: Try unit tests on more file systems.
74341         * tests/test-copy-file-1.sh: New file.
74342         * tests/test-copy-file-2.sh: New file.
74343         * modules/copy-file-tests (Files): Add them.
74344         (Makefile.am): Add them to TESTS.
74346         acl: Try unit tests on more file systems.
74347         * tests/test-file-has-acl-1.sh: New file.
74348         * tests/test-file-has-acl-2.sh: New file.
74349         * tests/test-set-mode-acl-1.sh: New file.
74350         * tests/test-set-mode-acl-2.sh: New file.
74351         * tests/test-copy-acl-1.sh: New file.
74352         * tests/test-copy-acl-2.sh: New file.
74353         * modules/acl-tests (Files): Add them.
74354         (Makefile.am): Add them to TESTS.
74356 2011-09-04  Bruno Haible  <bruno@clisp.org>
74358         acl: Improve support of NFSv4 ACLs on Solaris 10 (newer version).
74359         * lib/acl-internal.h (ACE_*, NEW_ACE_*): Define also on newer Solaris
74360         10.
74361         (OLD_ALLOW, OLD_DENY): New macros.
74362         (NEW_ACE_ACCESS_ALLOWED_ACE_TYPE): Renamed from
74363         ACE_ACCESS_ALLOWED_ACE_TYPE.
74364         (NEW_ACE_ACCESS_DENIED_ACE_TYPE): Renamed from
74365         ACE_ACCESS_DENIED_ACE_TYPE.
74366         (OLD_ACE_OWNER, OLD_ACE_GROUP, OLD_ACE_OTHER): New macros.
74367         (NEW_ACE_EXECUTE): Fix value.
74368         (NEW_ACE_APPEND_DATA, NEW_ACE_READ_NAMED_ATTRS,
74369         NEW_ACE_WRITE_NAMED_ATTRS, NEW_ACE_DELETE_CHILD,
74370         NEW_ACE_READ_ATTRIBUTES, NEW_ACE_WRITE_ATTRIBUTES, NEW_ACE_DELETE,
74371         NEW_ACE_READ_ACL, NEW_ACE_WRITE_ACL, NEW_ACE_WRITE_OWNER,
74372         NEW_ACE_SYNCHRONIZE): New macros.
74373         * lib/set-mode-acl.c (qset_acl): On newer Solaris 10, use acl or facl
74374         instead of acl_fromtext, acl_set, facl_set.
74375         Fixes a coreutils/tests/cp/perm failure.
74377 2011-09-03  Paul Eggert  <eggert@cs.ucla.edu>
74379         openat: test for fstatat (..., 0) bug
74380         Further testing with tar suggests that fstatat (..., 0)
74381         does not work in general, on AIX 7.1; see
74382         <http://lists.gnu.org/r/bug-tar/2011-09/msg00023.html>.
74383         So, give up entirely on AIX 7.1's fstatat, and fall back on our
74384         replacement fstatat (which is what older AIX releases were using
74385         anyway).
74386         * lib/fstatat.c (fstatat) [HAVE_FSTATAT]: Do not undef.  The only
74387         use is now changed to orig_fstatat.  This was probably the right
74388         thing to do anyway.
74389         (FSTATAT_AT_FDCWD_0_BROKEN): Remove; no longer used.
74390         (rpl_fstatat) [FSTATAT_ZERO_FLAG_BROKEN]: Remove.
74391         (rpl_fstatat): Simplify, assuming !FSTATAT_ZERO_FLAG_BROKEN.
74392         (AT_FUNC_NAME) [FSTATAT_ZERO_FLAG_BROKEN]: Now rpl_fstatat.
74393         * m4/openat.m4 (gl_FUNC_FSTATAT): Test for the more-general bug
74394         and define FSTATAT_ZERO_FLAG_BROKEN, not FSTATAT_AT_FDCWD_0_BROKEN,
74395         if the bug is found.
74397         openat: test for fstatat (AT_FDCWD, ..., 0) bug
74398         This tests for another fstatat bug on AIX 7.1:
74399         fstatat (AT_FDCWD, ..., 0) does not work.  See
74400         <http://lists.gnu.org/r/bug-tar/2011-09/msg00015.html>.
74401         * lib/fstatat.c (FSTATAT_AT_FDCWD_0_BROKEN)
74402         (LSTAT_FOLLOWS_SLASHED_SYMLINK): Default to 0.
74403         (rpl_fstatat): Adjust so that it works around either (or both)
74404         bugs if present.
74405         * m4/openat.m4 (gl_FUNC_FSTATAT): Test for this fstatat bug.
74407 2011-09-03  Karl Berry  <karl@gnu.org>
74409         * doc/regex.texi (Character Class Operators): Avoid literal ":"
74410         in index entries.
74412 2011-09-02  Bruno Haible  <bruno@clisp.org>
74414         Allow the user to override the choice of AR, ARFLAGS, RANLIB.
74415         * m4/gnulib-common.m4 (gl_PROG_AR_RANLIB): Don't override the given
74416         values of AR, ARFLAGS, RANLIB.
74417         Reported by John W. Eaton <jwe@gnu.org> for Octave.
74419 2011-09-02  Bruno Haible  <bruno@clisp.org>
74421         Find 'ar' program that fits with --host argument.
74422         * m4/gnulib-common.m4 (gl_PROG_AR_RANLIB): Use AC_CHECK_TOOL.
74424 2011-09-02  Bruno Haible  <bruno@clisp.org>
74426         tests: init.sh: Support any non-GNU diff.
74427         * tests/init.sh (compare): If "diff -c" is supported but "diff -u" is
74428         not, use "diff -c". Useful on AIX 6.1, HP-UX 11.31, OSF/1 5.1,
74429         Solaris 8.
74431 2011-09-02  Bruno Haible  <bruno@clisp.org>
74433         tests: init.sh: work also with any non-GNU diff that supports -u
74434         * tests/init.sh: Relax check for diff -u support.
74435         Rather than checking for GNU diff via --version, simply check
74436         for support for -u itself.  Useful at least on OpenBSD 4.9,
74437         AIX 7.1, IRIX 6.5, and Solaris 10.
74439 2011-09-01  Bruno Haible  <bruno@clisp.org>
74441         strtoimax, strtoumax: Document problem on HP-UX 11.
74442         * doc/posix-functions/strtoimax.texi: Mention HP-UX 11.11 problem.
74443         * doc/posix-functions/strtoumax.texi: Likewise.
74445 2011-09-01  Bruno Haible  <bruno@clisp.org>
74447         strtoumax: Avoid link error on OSF/1 with DTK cc.
74448         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Always test whether strtoumax is
74449         defined as a function.
74450         * modules/strtoumax (Depends-on, configure.ac): Test only whether
74451         strtoumax is defined, not whether it is declared.
74453 2011-09-01  Bruno Haible  <bruno@clisp.org>
74455         strtoimax: Avoid link error on OSF/1 with DTK cc.
74456         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Always test whether strtoimax is
74457         defined as a function.
74458         * modules/strtoimax (Depends-on, configure.ac): Test only whether
74459         strtoimax is defined, not whether it is declared.
74461 2011-09-01  Bruno Haible  <bruno@clisp.org>
74463         imaxdiv: Avoid link error on OSF/1 with DTK cc.
74464         * m4/imaxdiv.m4 (gl_FUNC_IMAXDIV): Also test whether imaxdiv is defined
74465         as a function.
74466         * modules/imaxdiv (configure.ac): Test whether imaxdiv is defined, not
74467         whether it is declared.
74469 2011-09-01  Bruno Haible  <bruno@clisp.org>
74471         imaxabs: Avoid link error on OSF/1 with DTK cc.
74472         * m4/imaxabs.m4 (gl_FUNC_IMAXABS): Also test whether imaxabs is defined
74473         as a function.
74474         * modules/imaxabs (configure.ac): Test whether imaxabs is defined, not
74475         whether it is declared.
74477 2011-09-01  Bruno Haible  <bruno@clisp.org>
74479         Tests for module 'strtoumax'.
74480         * modules/strtoumax-tests: New file.
74481         * tests/test-strtoumax.c: New file.
74483         Tests for module 'strtoimax'.
74484         * modules/strtoimax-tests: New file.
74485         * tests/test-strtoimax.c: New file.
74487         Tests for module 'imaxdiv'.
74488         * modules/imaxdiv-tests: New file.
74489         * tests/test-imaxdiv.c: New file.
74491         Tests for module 'imaxabs'.
74492         * modules/imaxabs-tests: New file.
74493         * tests/test-imaxabs.c: New file.
74495 2011-09-01  Bruno Haible  <bruno@clisp.org>
74497         pthread: Determine $(LIB_PTHREAD) correctly on IRIX 6.5.
74498         * m4/pthread.m4 (gl_PTHREAD_CHECK): Check for pthread_join, not
74499         pthread_create.
74501 2011-09-01  Paul Eggert  <eggert@cs.ucla.edu>
74503         openat: work around AIX 7.1 fstatat issue
74504         This should fix the problem that was not properly fixed
74505         in the previous change, dated 2011-08-30.
74506         * lib/fstatat.c: Include <sys/stat.h> twice, the first with
74507         __need_system_stat_h defined.
74508         (orig_fstatat) [HAVE_FSTATAT]: New function.
74509         (rpl_fstatat): Go back to the old way of doing things,
74510         except call orig_fstatat instead of fstatat.
74511         * m4/openat.m4 (gl_FUNC_FSTATAT): Remove unnecessary check for openat.
74512         Remove unnecessary check whether fstatat fills in st_size etc.
74514 2011-09-01  Bruno Haible  <bruno@clisp.org>
74516         sys_select: Avoid a syntax error regarding timespec_t on IRIX 6.5.
74517         * lib/sys_select.in.h [__sgi]: When included from <sys/bsd_types.h>,
74518         just include the system's header.
74520 2011-08-31  Jim Meyering  <meyering@redhat.com>
74522         tests: avoid spurious assertion failure in test-float.c on ppc64
74523         * tests/test-float.c (test_long_double): Comment out an assertion,
74524         LDBL_MIN_EXP <= DBL_MIN_EXP, that is failing at least on PowerPC-64
74525         with gcc-4.4.4.
74527         maint: indent with spaces, not TABs
74528         I need to get in the habit of running gnulib's "make check".
74529         Both of these would have been caught.
74530         * m4/largefile.m4: Indent with spaces, not TABs.
74531         * lib/parse-datetime.y (iso_8601_time): Likewise.
74532         Spotted by Pádraig Brady.
74534         test-parse-datetime.c: accommodate a relatively strict gcc warning
74535         * tests/test-parse-datetime.c (gmt_offset): Declare function "static",
74536         to avoid a warning from gcc's -Werror=missing-declarations.
74537         Insert a few spaces-before-funcall-parenthesis.
74539 2011-08-17  J.T. Conklin  <jtc@acorntoolworks.com>
74541         parse-datetime: accept ISO 8601 date and time rep with "T" separator
74542         The parser now accepts ISO 8601 date-time strings with "T" as the
74543         separator.  It has long parsed dates like "2004-02-29 16:21:42"
74544         with a space between the date and time strings.  Now it also parses
74545         "2004-02-29T16:21:42" and fractional-second and time-zone-annotated
74546         variants like "2004-02-29T16:21:42.333-07:00"
74547         * lib/parse-datetime.y: Parse ISO 8601 extended date and time
74548         of day representation using the 'T' separator character.
74549         * doc/parse-datetime.texi (General date syntax): replace use of
74550         deprecated --iso-8601 option with --rfc-3339 in example of date
74551         command output formats that can be parsed.
74552         * tests/test-parse-datetime.c (tm_diff): New function, taken from
74553         lib/parse-datetime.y.
74554         (gmt_offset): New function.
74555         (main): Add additional test cases to validate ISO8601 extended
74556         date and time of day parsing.
74558 2011-08-31  Bruno Haible  <bruno@clisp.org>
74560         freopen: Documentation.
74561         * doc/posix-functions/freopen.texi: Document the bug with the NULL file
74562         name.
74563         Reported by Claudio Bley <claudio.bley@gmail.com>.
74565 2011-08-31  Claudio Bley  <claudio.bley@gmail.com>  (tiny change)
74567         freopen: Don't crash if the filename argument is NULL.
74568         * lib/freopen.c (rpl_freopen): Don't compare the filename if it is
74569         NULL.
74571 2011-08-30  Paul Eggert  <eggert@cs.ucla.edu>
74573         openat: work around AIX 7.1 fstatat bug
74574         Problem reported by Kevin Brott for GNU tar, in the thread containing
74575         <http://lists.gnu.org/r/bug-tar/2011-08/msg00015.html>.
74576         * lib/fstatat.c (rpl_fstatat): Do not invoke underlying fstatat if
74577         FSTATAT_ST_SIZE_ETC_BROKEN.
74578         (fstatat) [FSTATAT_ST_SIZE_ETC_BROKEN && HAVE_FSTATAT]: #define to
74579         rpl_fstatat.
74580         * m4/openat.m4 (gl_FUNC_FSTATAT): New macro, with the fstatat-relevant
74581         part of gl_FUNC_OPENAT.  Also, check for the AIX 7.1 bug, and use
74582         AC_CHECK_FUNCS_ONCE for fstatat.
74583         (gl_FUNC_OPENAT): Use it.  Use AC_CHECK_FUNCS_ONCE for
74584         fchmodat, mkdirat, openat and unlinkat.
74586 2011-08-30  Bruno Haible  <bruno@clisp.org>
74588         Avoid endless recursions if config.h includes some header files.
74589         * lib/fopen.c (__need_FILE): Define already before including config.h.
74590         * lib/freopen.c (__need_FILE): Likewise.
74591         * lib/open.c (__need_system_fcntl_h): Likewise.
74592         * lib/stat.c (__need_system_sys_stat_h): Likewise.
74593         * lib/lstat.c (__need_system_sys_stat_h): Likewise.
74594         Reported by Michael Goffioul <michael.goffioul@gmail.com>.
74596 2011-08-25  Karl Berry  <karl@gnu.org>
74598         * config/srclist.txt (ylwrap): new try.
74599         * build-aux/ylwrap: new file.
74601 2011-08-23  Bruno Haible  <bruno@clisp.org>
74603         tmpdir: Use a good default directory on native Windows.
74604         * lib/tmpdir.c: Include <windows.h>, pathmax.h.
74605         (P_tmpdir): Default to _P_tmpdir on native Windows.
74606         (path_search): On native Windows, try the value returned by GetTempPath
74607         before trying P_tmpdir.
74608         * modules/tmpdir (Depends-on): Add pathmax.
74609         Suggested by John Darrington <john@darrington.wattle.id.au>.
74611 2011-08-20  Reuben Thomas  <rrt@sc3d.org>
74613         doc: fix typo in README-release
74614         * top/README-release: Capitalize first word of a sentence.
74616 2011-08-19  Jim Meyering  <meyering@redhat.com>
74618         fts: do not exhaust memory when processing million-entry directories
74619         Before this change, traversing (via rm -rf, find, du, etc.) an N-entry
74620         directory would require about 256*N bytes of memory.  Thus, it was
74621         easy to construct a directory too large to be processed by any of
74622         those tools.  With this change, fts' maximum memory utilization is
74623         now limited to around 30MB.
74624         * lib/fts.c (FTS_MAX_READDIR_ENTRIES): Define.
74625         (fts_read): When we've processed the final entry (i.e., when
74626         ->fts_link is NULL) and fts_dirp is non-NULL, call fts_build
74627         using the parent entry to read any remaining entries.  Dispatch
74628         depending on what fts_build returns:
74629         - NULL+stop, aka failure: stop
74630         - NULL otherwise: move up in the dir hierarchy
74631         - non-NULL: handle this new entry
74632         (fts_build): Declare and use new local, continue_readdir.
74633         Prepare to be called from fts_read, when the entries
74634         from a partially-read directory have just been exhausted.
74635         In that case, we'll skip the opendir and instead use the parent's
74636         fts_dirp and derive dir_fd from that.
74637         Finally, in the readdir loop, if we read max_entries entries,
74638         exit the loop ensuring *not* to call closedir.  This is required
74639         so that fts_dirp can be reused on a subsequent call.
74640         Prompted by Ben England's report of memory exhaustion in find
74641         and rm -rf vs. NFS: https://bugzilla.redhat.com/719749.
74643         maint: fts: move decl of `dp' down into while loop; split a long line
74644         * lib/fts.c (fts_build): No semantic change.
74646         fts: add/use new struct member, fts_dirp
74647         We are about to use this to manage any directory with
74648         too many entries to read all of them into memory at once.
74649         To do that, we'll need to save the DIR* pointer in each
74650         affected FTSENT struct.
74651         * lib/fts_.h: Include <dirent.h>.
74652         (struct FTSENT) [fts_dirp]: New member.
74653         * lib/fts.c (closedir_and_clear): Define.
74654         Use it in place of closedir so that we are sure to
74655         clear the new fts_dirp member when done with it.
74656         (fts_alloc): Initialize the new member.
74657         (fts_lfree): Free, if needed.
74659         maint: fts: give __opendir2 a new parameter and rename
74660         * lib/fts.c (__opendir2): Give it a new parameter, Pdir_fd, rather
74661         than surreptitiously using sole caller's "dir_fd".
74662         (fts_opendir): Rename from __opendir2.
74664         maint: fts.c: remove __opendir2's now-unused parameter, oflag
74665         * lib/fts.c (__opendir2): Remove unused parameter, oflag.
74667         maint: fts.c: correct off-by-one indentation
74668         * lib/fts.c (fts_build): Correct indentation, change style
74669         of a couple of block comments, and bracing style.
74671         maint: fts.c: move __opendir2 #define "up" out of function body
74672         * lib/fts.c (__opendir2): Move "up".  No semantic change.
74674         maint: fts.c: remove #if-0'd FTS_WHITEOUT code
74675         * lib/fts.c: Remove #if-0'd FTS_WHITEOUT code.  It's been #if-0'd
74676         out for a long time and besides was useful only on BSD systems.
74678 2011-08-18  Paul Eggert  <eggert@cs.ucla.edu>
74680         regex: port to Stratus OpenVOS
74681         * lib/regex_internal.h (internal_function) [!_LIBC]: Simply
74682         define to empty, rather than attempting nonportable optimizations.
74683         Problem reported by Paul Green in:
74684         http://lists.gnu.org/r/bug-diffutils/2011-08/msg00047.html
74685         and fix suggested by Eric Blake in:
74686         http://lists.gnu.org/r/bug-gnulib/2011-08/msg00143.html
74688 2011-08-17  Eric Blake  <eblake@redhat.com>
74690         getcwd: fix test failures on mingw
74691         * lib/getcwd.c (__getcwd): Early exit for ERANGE.
74692         * tests/test-getcwd.c (test_abort_bug, test_long_name): Don't fail
74693         test if long directory cannot be created, and allow mingw errno.
74695         getcwd-lgpl: fix m4 to match relaxed test for BSD
74696         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Relax probe.
74697         (gl_FUNC_GETCWD_SIGNATURE): New macro.
74698         (gl_FUNC_GETCWD_LGPL, gl_FUNC_GETCWD): Use it.
74699         * doc/posix-functions/getcwd.texi (getcwd): Tweak mentions of
74700         signature problem.
74702         getcwd: fix compilation on mingw64
74703         * lib/unistd.in.h (includes) [mingw]: Include <direct.h> for
74704         getcwd.
74705         Reported by Marc-André Lureau.
74707         pipe2: silence compiler warning
74708         * lib/pipe2.c (pipe2): Hide label if it is not used.
74710 2011-08-15  Ben Pfaff  <blp@cs.stanford.edu>
74712         relocatable-prog: fix link error
74713         * modules/relocatable-prog (configure.ac) [RELOCATABLE]: Also
74714         invoke AC_LIBOBJ([relocatable]).  This invocation was previously
74715         in the gl_RELOCATABLE_LIBRARY macro.  That invocation was moved
74716         into modules/relocatable-lib without noticing that
74717         modules/relocatable-prog also invokes gl_RELOCATABLE_LIBRARY and
74718         also needs to build relocatable.c.
74720 2011-08-12  Paul Eggert  <eggert@cs.ucla.edu>
74722         getaddrinfo: fix sh typo in gai_strerrorA decl checking
74723         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Fix typo in the generated
74724         shell code: it contained a 'break' that was not in a loop.
74725         Apparently the macro assumed that AC_CHECK_DECLS is implemenented
74726         via a shell-language loop; this may have been true in old Autoconf
74727         versions, but it's not true in Autoconf 2.68.  I found this bug
74728         when testing coreutils git on Solaris 8, whose shell complains
74729         about the syntax error.
74731 2011-08-12  Simon Josefsson  <simon@josefsson.org>
74733         * lib/base64.c: Fix comment to reference RFC 4648.
74734         Suggested by Bruno Haible <bruno@clisp.org> and Gijs van Tulder
74735         <gvtulder@gmail.com>.
74737 2011-08-11  Paul Eggert  <eggert@cs.ucla.edu>
74739         * build-aux/bootstrap (slurp): Remove obsolescent gettext.m4 patch.
74741         po/Makefile.in.in: fix make -q problem
74742         * build-aux/po/Makefile.in.in (check-macro-version): Remove this
74743         rule, since there's no file named 'check-macro-version' and its
74744         use as a file breaks make -q.
74745         (all): Don't depend on check-macro-version.
74746         (CHECK_MACRO_VERSION): New macro.
74747         (stamp-po): Use it.
74749         configmake: fix make -q problem
74750         * modules/configmake (configmake.h): Update configmake.h's time stamp
74751         even if the file does not change.  Otherwise, 'make -q' fails.
74752         Problem reported by Simon Josefsson in
74753         <http://lists.gnu.org/r/bug-gnulib/2011-08/msg00088.html>.
74755 2011-08-11  Jim Meyering  <meyering@redhat.com>
74757         git-version-gen: correct the advice in a comment
74758         * build-aux/git-version-gen: Correct comment.
74759         Don't recommend to list .tarball-version in .gitignore.
74761 2011-08-10  Paul Eggert  <eggert@cs.ucla.edu>
74763         base64: fix off-by-one buffer size bug
74764         Problem and (trivial) fix reported by Gijs van Tulder in
74765         <http://lists.gnu.org/r/bug-gnulib/2011-08/msg00083.html>.
74766         * lib/base64.c (base64_decode_alloc_ctx): Allocate one more byte.
74767         * tests/test-base64.c (main): Catch the bug.
74769 2011-08-10  Eric Blake  <eblake@redhat.com>
74771         closein: correct comments
74772         * lib/closein.c (close_stdin): Improve comments.
74774 2011-08-09  Bruno Haible  <bruno@clisp.org>
74776         More tests for 'fseeko'.
74777         * tests/test-fseeko3.c: New file, from Eric Blake.
74778         * tests/test-fseeko3.sh: New file.
74779         * modules/fseeko-tests (Files): Add them.
74780         (TESTS): Add test-fseeko3.sh.
74781         (check_PROGRAMS): Add test-fseeko3.
74783 2011-08-09  Eric Blake  <eblake@redhat.com>
74785         fseeko: remove unneeded hack
74786         * lib/fseeko.c (fseeko): Don't special-case SEEK_END.
74788         fseeko: fix bug on glibc
74789         * lib/fseeko.c (fseeko): Set stream offset to match fd offset.
74790         Reported by John W. Eaton.
74792 2011-08-08  Bruno Haible  <bruno@clisp.org>
74794         unictype/base: Fix interoperability with preinstalled libunistring.
74795         * modules/unictype/base (configure.ac): Bump minimum version to 0.9.4.
74796         Reported by Simon Josefsson.
74798 2011-08-08  Bruno Haible  <bruno@clisp.org>
74800         iswblank: Detect declaration correctly.
74801         * m4/iswblank.m4 (gl_FUNC_ISWBLANK): Use correct headers in
74802         AC_CHECK_DECLS invocation.
74804 2011-08-08  Bruno Haible  <bruno@clisp.org>
74806         tcgetsid: Detect declaration correctly.
74807         * m4/tcgetsid.m4 (gl_FUNC_TCGETSID): Use correct headers in
74808         AC_CHECK_DECLS invocation.
74809         Reported by Simon Josefsson.
74811 2011-08-08  Eric Blake  <eblake@redhat.com>
74813         largefile: fix typo that regressed large file support
74814         * modules/largefile (configure.ac-early): Fix section name.
74816 2011-08-06  Karl Berry  <karl@gnu.org>
74818         * MODULES.html.sh (func_all_files): _Noreturn is no longer
74819         a separate module.
74821 2011-08-05  Simon Josefsson  <simon@josefsson.org>
74823         openat: Fix warnings and commens when building unlinkat.c on Hurd.
74824         * lib/unlinkat.c: Mention Hurd in comments.  Include stdlib.h to
74825         get prototype for free.
74827 2011-08-04  Bruno Haible  <bruno@clisp.org>
74829         Tests for module 'pathmax'.
74830         * modules/pathmax-tests: New file.
74831         * tests/test-pathmax.c: New file.
74833         canonicalize-lgpl: Support larger filenames on the Hurd.
74834         * lib/canonicalize-lgpl.c (__realpath): Bump path_max fallback to 8192.
74835         Reported by Paul Eggert.
74837         pathmax: Leave PATH_MAX undefined on the Hurd, and a constant otherwise.
74838         * lib/pathmax.h (PATH_MAX): Leave it undefined on GNU/Hurd.
74839         * lib/chdir-long.h: Include pathmax.h.
74840         * lib/clean-temp.c (PATH_MAX): Remove code that is done by pathmax.h.
74841         * lib/getcwd.c: Include pathmax.h instead of <limits.h>.
74842         (PATH_MAX): Remove code that is done by pathmax.h.
74843         * lib/canonicalize.c (PATH_MAX): Provide a fallback value.
74844         * lib/tmpfile.c: Add a comment.
74845         * m4/pathmax.m4 (gl_PATHMAX): Don't test for pathconf.
74846         * modules/chdir-long (Depends-on): Add pathmax.
74847         * modules/getcwd (Depends-on): Add pathmax.
74848         * tests/test-getcwd.c (test_abort_bug): Avoid syntax error when PATH_MAX
74849         is not defined.
74850         * doc/posix-headers/limits.texi: Mention the pathmax module.
74851         * NEWS: Mention the change.
74853 2011-08-02  Bruno Haible  <bruno@clisp.org>
74855         pthread_sigmask: Actually use results of gl_THREADLIB.
74856         * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK): Test and require
74857         gl_THREADLIB, not gl_[]THREADLIB.
74858         Reported by Eric Blake.
74860 2011-08-02  Jim Meyering  <meyering@redhat.com>
74862         maint.mk: relax the default _gl_TS_function_match regexp
74863         * top/maint.mk (_gl_TS_function_match): Don't require at least one
74864         space between function name and "(" in an "extern" declaration.
74865         That would fail to match a decl with no space there: extern void foo();
74867 2011-07-31  Iain Nicol  <iain@thenicols.net>
74869         git-version-gen: document that EXTRA_DIST must include .version
74870         * build-aux/git-version-gen: In the how-to-use comment, document
74871         that EXTRA_DIST must include .version.  Otherwise, "make distcheck"
74872         will fail when run from an unpacked distribution tarball.
74874 2011-08-01  Bruno Haible  <bruno@clisp.org>
74876         wctype-h: Fix last change.
74877         * m4/wctype_h.m4 (gl_WCTYPE_H): If towlower is defined, set
74878         REPLACE_TOWLOWER to 0.
74879         Reported by Sam Steingold <sds@gnu.org>.
74881 2011-07-31  Bruno Haible  <bruno@clisp.org>
74883         frexpl: Update autoconf test.
74884         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Update overrides of <float.h>,
74885         according to changes of 2011-06-20.
74887 2011-07-31  Bruno Haible  <bruno@clisp.org>
74889         sys_utsname: Add support for Minix.
74890         * lib/sys_utsname.in.h [Minix]: Include <stddef.h> before
74891         <sys/utsname.h>.
74892         * m4/sys_utsname_h.m4 (gl_SYS_UTSNAME_H): Likewise.
74893         * doc/posix-headers/sys_utsname.texi: Document the Minix problem.
74895 2011-07-31  Bruno Haible  <bruno@clisp.org>
74897         strings: Add support for Minix.
74898         * lib/strings.in.h [Minix]: Include <sys/types.h> before <strings.h>.
74899         * m4/strings_h.m4 (gl_HEADER_STRINGS_H_BODY): Likewise.
74900         * doc/posix-headers/strings.texi: Document the Minix problem.
74902 2011-07-31  Bruno Haible  <bruno@clisp.org>
74904         wctype-h: Add support for Minix.
74905         * m4/wctype_h.m4 (gl_WCTYPE_H): Test whether towlower is declared. Set
74906         REPLACE_TOWLOWER.
74907         * modules/wctype-h (Makefile.am): Substitute REPLACE_TOWLOWER.
74908         * lib/wctype.in.h (towlower, towupper): Test REPLACE_TOWLOWER, not
74909         REPLACE_ISWCNTRL.
74911 2011-07-31  Paul Eggert  <eggert@cs.ucla.edu>
74913         * lib/xalloc.h (DEFAULT_MXFAST): Track 64-bit glibc.
74914         This is a performance improvement for 64-bit hosts: it causes the
74915         value of DEFAULT_MXFAST to track what's in glibc on such hosts.
74917 2011-07-31  Bruno Haible  <bruno@clisp.org>
74919         stdioext: Add support for Minix.
74920         * lib/fbufmode.c (fbufmode) [__minix]: Add conditional code.
74921         * lib/fpurge.c (fpurge): Likewise.
74922         * lib/freadahead.c (freadahead): Likewise.
74923         * lib/freadable.c (freadable): Likewise.
74924         * lib/freading.c (freading): Likewise.
74925         * lib/freadptr.c (freadptr): Likewise.
74926         * lib/freadseek.c (freadptrinc): Likewise.
74927         * lib/fseeko.c (rpl_fseeko): Likewise.
74928         * lib/fseterr.c (fseterr): Likewise.
74929         * lib/fwritable.c (fwritable): Likewise.
74930         * lib/fwriting.c (fwriting): Likewise.
74931         * lib/fflush.c (clear_ungetc_buffer): Update comment.
74932         * m4/fpending.m4 (gl_PREREQ_FPENDING): Add a variant for Minix.
74934 2011-07-31  Bruno Haible  <bruno@clisp.org>
74936         errno: Port to Minix.
74937         * m4/errno_h.m4 (gl_HEADER_ERRNO_H): Test also whether ENETRESET and
74938         ECONNABORTED are defined.
74939         * lib/errno.in.h (ENETRESET, GNULIB_defined_ENETRESET, ECONNABORTED,
74940         GNULIB_defined_ECONNABORTED): New macros.
74941         * lib/strerror-override.h (strerror_override): Test also
74942         GNULIB_defined_ENETRESET, GNULIB_defined_ECONNABORTED.
74943         * lib/strerror-override.c (strerror_override): Handle also ENETRESET,
74944         ECONNABORTED.
74945         * doc/posix-headers/errno.texi: Mention the Minix problem.
74947 2011-07-31  Bruno Haible  <bruno@clisp.org>
74949         Work around declaration collisions on Minix.
74950         * m4/mbsinit.m4 (gl_FUNC_MBSINIT): If mbsinit is declared but not
74951         defined, set REPLACE_MBSINIT.
74952         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): If mbrtowc is declared but not
74953         defined, set REPLACE_MBRTOWC.
74954         * m4/mbrlen.m4 (gl_FUNC_MBRLEN): If mbrlen is declared but not defined,
74955         set REPLACE_MBRLEN.
74956         * m4/mbsrtowcs.m4 (gl_FUNC_MBSRTOWCS): If mbsrtowcs is declared but not
74957         defined, set REPLACE_MBSRTOWCS.
74958         * m4/wcrtomb.m4 (gl_FUNC_WCRTOMB): If wcrtomb is declared but not
74959         defined, set REPLACE_WCRTOMB.
74960         * m4/wcsrtombs.m4 (gl_FUNC_WCSRTOMBS): If wcsrtombs is declared but not
74961         defined, set REPLACE_WCSRTOMBS.
74963 2011-07-31  Bruno Haible  <bruno@clisp.org>
74965         Add support for Minix with ACK compiler.
74966         * m4/gnulib-common.m4 (gl_PROG_AR_RANLIB): New macro.
74967         * gnulib-tool (func_import, func_create_testdir): Emit invocation of
74968         gl_PROG_AR_RANLIB instead of AC_PROG_RANLIB.
74970 2011-07-31  Bruno Haible  <bruno@clisp.org>
74972         Documentation about Minix.
74973         * doc/posix-headers/*.texi: Add info about Minix 3.1.8.
74974         * doc/glibc-headers/*.texi: Likewise.
74975         * doc/posix-functions/*.texi: Likewise.
74976         * doc/glibc-functions/*.texi: Likewise.
74978 2011-07-31  Bruno Haible  <bruno@clisp.org>
74980         snippet/warn-on-use: Fix indentation.
74981         * m4/warn-on-use.m4 (gl_WARN_ON_USE_PREPARE): Fix indentation.
74983 2011-07-25  Jim Meyering  <meyering@redhat.com>
74985         tests: test-update-copyright.sh: remove unnecessary "rm" commands
74986         * tests/test-update-copyright.sh: Remove unused rm -f $TMP.*.bak
74987         commands.
74989 2011-07-27  Jim Meyering  <meyering@redhat.com>
74991         maint.mk: avoid sc_prohibit_always-defined_macros failure in coreutils
74992         * top/maint.mk (gl_extract_significant_defines_): Now that
74993         SA_RESETHAND and SA_RESTART are #defined (albeit conditionally) in
74994         gnulib/lib/signal.in.h, and now that we recommend to
74995         define-if-undefined those two symbols in application code,
74996         we must filter them out of the "significant" list.
74997         This avoids a "make syntax-check" failure in coreutils.
74999 2011-07-26  Eric Blake  <eblake@redhat.com>
75001         warnings: add comments about previous patch
75002         * m4/absolute-header.m4: Document AS_VAR_PUSHDEF limitation.
75003         * m4/include_next.m4: Likewise.
75004         * m4/warn-on-use.m4: Likewise.
75005         * m4/warnings.m4: Likewise, and simplify use.
75006         Suggested by Stefano Lattarini.
75008         include-next, warnings: support older autoconf
75009         * m4/include_next.m4 (gl_NEXT_HEADERS_INTERNAL): Use
75010         AS_VAR_PUSHDEF in a way that works with older autoconf.
75011         * m4/warnings.m4 (gl_WARN_ADD): Likewise.
75012         Reported by Daniel P. Berrange.
75014 2011-07-25  Bruno Haible  <bruno@clisp.org>
75016         fseek, ftell: Fix doc.
75017         * doc/posix-functions/fseek.texi: Reword statement about
75018         AC_SYS_LARGEFILE.
75019         * doc/posix-functions/ftell.texi: Likewise.
75021 2011-07-25  Paul Eggert  <eggert@cs.ucla.edu>
75022             Bruno Haible  <bruno@clisp.org>
75024         Add dependencies to the 'largefile' module.
75025         * modules/fopen (Depends-on): Add 'largefile'.
75026         * modules/freopen (Depends-on): Likewise.
75027         * modules/fseeko (Depends-on): Likewise.
75028         * modules/ftello (Depends-on): Likewise.
75029         * modules/glob (Depends-on): Likewise.
75030         * modules/lseek (Depends-on): Likewise.
75031         * modules/lstat (Depends-on): Likewise.
75032         * modules/mkostemp (Depends-on): Likewise.
75033         * modules/mkostemps (Depends-on): Likewise.
75034         * modules/mkstemp (Depends-on): Likewise.
75035         * modules/mkstemps (Depends-on): Likewise.
75036         * modules/open (Depends-on): Likewise.
75037         * modules/openat (Depends-on): Likewise.
75038         * modules/pread (Depends-on): Likewise.
75039         * modules/pwrite (Depends-on): Likewise.
75040         * modules/scandir (Depends-on): Likewise.
75041         * modules/stat (Depends-on): Likewise.
75042         * modules/tmpfile (Depends-on): Likewise.
75043         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Do not require AC_SYS_LARGEFILE,
75044         since the containing module now depends on the largefile module.
75045         * m4/tempname.m4 (gl_FUNC_GEN_TEMPNAME): Likewise.
75046         * doc/posix-functions/fopen.texi: Mention that the problem of 32-bit
75047         off_t is fixed by gnulib.
75048         * doc/posix-functions/freopen.texi: Likewise.
75049         * doc/posix-functions/fseeko.texi: Likewise.
75050         * doc/posix-functions/fstatat.texi: Likewise.
75051         * doc/posix-functions/ftello.texi: Likewise.
75052         * doc/posix-functions/glob.texi: Likewise.
75053         * doc/posix-functions/lseek.texi: Likewise.
75054         * doc/posix-functions/lstat.texi: Likewise.
75055         * doc/posix-functions/mkstemp.texi: Likewise.
75056         * doc/posix-functions/open.texi: Likewise.
75057         * doc/posix-functions/openat.texi: Likewise.
75058         * doc/posix-functions/pread.texi: Likewise.
75059         * doc/posix-functions/pwrite.texi: Likewise.
75060         * doc/posix-functions/scandir.texi: Likewise.
75061         * doc/posix-functions/stat.texi: Likewise.
75062         * doc/posix-functions/tmpfile.texi: Likewise.
75063         * doc/glibc-functions/mkostemp.texi: Likewise.
75064         * doc/glibc-functions/mkostemps.texi: Likewise.
75065         * doc/glibc-functions/mkstemps.texi: Likewise.
75067 2011-07-25  Bruno Haible  <bruno@clisp.org>
75069         fcntl: Move AC_LIBOBJ invocation to module description.
75070         * m4/fcntl.m4 (gl_REPLACE_FCNTL): Don't invoke AC_LIBOBJ.
75071         * modules/fcntl (configure.ac): Invoke AC_LIBOBJ.
75073         fcntl: Remove call-in from fchdir.m4.
75074         * m4/fcntl.m4 (gl_FUNC_FCNTL): Conditionally invoke gl_TEST_FCHDIR.
75075         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Don't invoke gl_REPLACE_FCNTL.
75077         dup3: Remove potential call-in from fchdir.m4.
75078         * m4/dup3.m4 (gl_FUNC_DUP3): Add comment about fchdir.
75079         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Remove comment about dup3.
75081         dup2: Move AC_LIBOBJ invocation to module description.
75082         * m4/dup2.m4 (gl_REPLACE_DUP2): Remove macro.
75083         (gl_FUNC_DUP2): Instead of gl_REPLACE_DUP2, just set REPLACE_DUP2 to 1.
75084         Don't invoke AC_LIBOBJ.
75085         * modules/dup2 (configure.ac): Invoke AC_LIBOBJ.
75087         dup2: Remove call-in from fchdir.m4.
75088         * m4/dup2.m4 (gl_FUNC_DUP2): Conditionally invoke gl_TEST_FCHDIR.
75089         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Don't invoke gl_REPLACE_DUP2.
75091         fclose: Move AC_LIBOBJ invocation to module description.
75092         * m4/fclose.m4 (gl_REPLACE_FCLOSE): Remove macro.
75093         (gl_FUNC_FCLOSE): Instead of gl_REPLACE_FCLOSE, just set REPLACE_FCLOSE
75094         to 1.
75095         * modules/fclose (configure.ac): Invoke AC_LIBOBJ.
75097         fclose: Remove call-in from close.m4.
75098         * m4/fclose.m4 (gl_FUNC_FCLOSE): Invoke gl_FUNC_CLOSE.
75099         * m4/close.m4 (gl_FUNC_CLOSE): Don't invoke gl_REPLACE_FCLOSE.
75101         close: Move AC_LIBOBJ invocation to module description.
75102         * m4/close.m4 (gl_REPLACE_CLOSE): Remove macro.
75103         (gl_FUNC_CLOSE): Instead of gl_REPLACE_CLOSE, just set REPLACE_CLOSE to
75104         1.
75105         * modules/close (configure.ac): Invoke AC_LIBOBJ.
75107         close: Remove call-in from fchdir.m4.
75108         * m4/close.m4 (gl_FUNC_CLOSE): Conditionally invoke gl_TEST_FCHDIR.
75109         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Don't invoke gl_REPLACE_CLOSE.
75111         open: Move AC_LIBOBJ invocation to module description.
75112         * m4/open.m4 (gl_REPLACE_OPEN): Remove macro.
75113         (gl_FUNC_OPEN): Instead of gl_REPLACE_OPEN, just set REPLACE_OPEN to 1.
75114         * modules/open (configure.ac): Invoke AC_LIBOBJ and gl_PREREQ_OPEN.
75116         open: Remove call-in from fchdir.m4.
75117         * m4/open.m4 (gl_FUNC_OPEN): Conditionally invoke gl_TEST_FCHDIR.
75118         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Don't invoke gl_REPLACE_OPEN.
75120         fchdir: Start to remove gl_REPLACE_* idiom.
75121         * m4/fchdir.m4 (gl_TEST_FCHDIR): New macro.
75122         (gl_FUNC_FCHDIR): Invoke it.
75124 2011-07-25  Paul Eggert  <eggert@cs.ucla.edu>
75126         * lib/ftell.c (ftell): Comment out cast.
75128         close: use gl_REPLACE_FCLOSE only if defined
75129         * m4/close.m4 (gl_REPLACE_CLOSE): Use gl_REPLACE_FCLOSE only if it
75130         is defined.  The close module doesn't depend on the fclose module
75131         any more, so gl_REPLACE_CLOSE's existence cannot be assumed.  See
75132         <http://lists.gnu.org/r/bug-gnulib/2011-07/msg00392.html>.
75133         I reproduced the problem with "./gnulib-tool --test close sys_socket".
75135 2011-07-24  Jim Meyering  <meyering@redhat.com>
75137         test-select.h: avoid warning when using gcc's -Wmissing-declarations
75138         * tests/test-select.h (test_function): Declare as "static".
75140 2011-07-24  Bruno Haible  <bruno@clisp.org>
75142         doc: Mention the effects of AC_SYS_LARGEFILE.
75143         * doc/posix-functions/aio_cancel.texi: Mention the effects of AC_SYS_LARGEFILE
75144         on this function.
75145         * doc/posix-functions/aio_error.texi: Likewise.
75146         * doc/posix-functions/aio_fsync.texi: Likewise.
75147         * doc/posix-functions/aio_read.texi: Likewise.
75148         * doc/posix-functions/aio_return.texi: Likewise.
75149         * doc/posix-functions/aio_suspend.texi: Likewise.
75150         * doc/posix-functions/aio_write.texi: Likewise.
75151         * doc/posix-functions/fgetpos.texi: Likewise.
75152         * doc/posix-functions/fopen.texi: Likewise.
75153         * doc/posix-functions/freopen.texi: Likewise.
75154         * doc/posix-functions/fsetpos.texi: Likewise.
75155         * doc/posix-functions/fstatvfs.texi: Likewise.
75156         * doc/posix-functions/ftruncate.texi: Likewise.
75157         * doc/posix-functions/ftw.texi: Likewise.
75158         * doc/posix-functions/getrlimit.texi: Likewise.
75159         * doc/posix-functions/glob.texi: Likewise.
75160         * doc/posix-functions/lio_listio.texi: Likewise.
75161         * doc/posix-functions/lockf.texi: Likewise.
75162         * doc/posix-functions/mkstemp.texi: Likewise.
75163         * doc/posix-functions/mmap.texi: Likewise.
75164         * doc/posix-functions/nftw.texi: Likewise.
75165         * doc/posix-functions/openat.texi: Likewise.
75166         * doc/posix-functions/opendir.texi: Likewise.
75167         * doc/posix-functions/posix_fadvise.texi: Likewise.
75168         * doc/posix-functions/posix_fallocate.texi: Likewise.
75169         * doc/posix-functions/pread.texi: Likewise.
75170         * doc/posix-functions/pwrite.texi: Likewise.
75171         * doc/posix-functions/readdir.texi: Likewise.
75172         * doc/posix-functions/readdir_r.texi: Likewise.
75173         * doc/posix-functions/rewinddir.texi: Likewise.
75174         * doc/posix-functions/scandir.texi: Likewise.
75175         * doc/posix-functions/seekdir.texi: Likewise.
75176         * doc/posix-functions/setrlimit.texi: Likewise.
75177         * doc/posix-functions/statvfs.texi: Likewise.
75178         * doc/posix-functions/telldir.texi: Likewise.
75179         * doc/posix-functions/tmpfile.texi: Likewise.
75180         * doc/posix-functions/truncate.texi: Likewise.
75181         * doc/glibc-functions/fallocate.texi: Likewise.
75182         * doc/glibc-functions/fstatfs.texi: Likewise.
75183         * doc/glibc-functions/fts_children.texi: Likewise.
75184         * doc/glibc-functions/fts_read.texi: Likewise.
75185         * doc/glibc-functions/getdirentries.texi: Likewise.
75186         * doc/glibc-functions/mkostemp.texi: Likewise.
75187         * doc/glibc-functions/mkostemps.texi: Likewise.
75188         * doc/glibc-functions/mkstemps.texi: Likewise.
75189         * doc/glibc-functions/preadv.texi: Likewise.
75190         * doc/glibc-functions/pwritev.texi: Likewise.
75191         * doc/glibc-functions/sendfile.texi: Likewise.
75192         * doc/glibc-functions/statfs.texi: Likewise.
75194 2011-07-24  Bruno Haible  <bruno@clisp.org>
75196         doc: Fix typo.
75197         * doc/posix-functions/fstat.texi: Talk about fstat, not stat.
75199 2011-07-24  Bruno Haible  <bruno@clisp.org>
75201         doc: Mention fsusage.
75202         * doc/posix-functions/statvfs.texi: Mention the fsusage module.
75204 2011-07-24  Bruno Haible  <bruno@clisp.org>
75206         doc: Mention new glibc headers and functions.
75207         * doc/glibc-headers/gshadow.texi: New file.
75208         * doc/glibc-functions/endsgent.texi: New file.
75209         * doc/glibc-functions/fgetsgent.texi: New file.
75210         * doc/glibc-functions/fgetsgent_r.texi: New file.
75211         * doc/glibc-functions/getsgent.texi: New file.
75212         * doc/glibc-functions/getsgent_r.texi: New file.
75213         * doc/glibc-functions/getsgnam.texi: New file.
75214         * doc/glibc-functions/getsgnam_r.texi: New file.
75215         * doc/glibc-functions/putsgent.texi: New file.
75216         * doc/glibc-functions/setsgent.texi: New file.
75217         * doc/glibc-functions/sgetsgent.texi: New file.
75218         * doc/glibc-functions/sgetsgent_r.texi: New file.
75219         * doc/glibc-functions/malloc_info.texi: New file.
75220         * doc/glibc-functions/preadv.texi: New file.
75221         * doc/glibc-functions/pwritev.texi: New file.
75222         * doc/glibc-functions/register_printf_modifier.texi: New file.
75223         * doc/glibc-functions/register_printf_specifier.texi: New file.
75224         * doc/glibc-functions/register_printf_type.texi: New file.
75225         * doc/glibc-functions/pthread_attr_getaffinity_np.texi: New file.
75226         * doc/glibc-functions/pthread_attr_setaffinity_np.texi: New file.
75227         * doc/glibc-functions/pthread_getaffinity_np.texi: New file.
75228         * doc/glibc-functions/pthread_getname_np.texi: New file.
75229         * doc/glibc-functions/pthread_mutex_consistent_np.texi: New file.
75230         * doc/glibc-functions/pthread_mutexattr_getrobust_np.texi: New file.
75231         * doc/glibc-functions/pthread_mutexattr_setrobust_np.texi: New file.
75232         * doc/glibc-functions/pthread_setaffinity_np.texi: New file.
75233         * doc/glibc-functions/pthread_setname_np.texi: New file.
75234         * doc/glibc-functions/pthread_sigqueue.texi: New file.
75235         * doc/glibc-functions/pthread_timedjoin_np.texi: New file.
75236         * doc/glibc-functions/pthread_tryjoin_np.texi: New file.
75237         * doc/glibc-functions/qsort_r.texi: New file.
75238         * doc/glibc-functions/quick_exit.texi: New file.
75239         * doc/glibc-functions/syncfs.texi: New file.
75240         * doc/gnulib.texi: Include them.
75241         (Glibc gshadow.h, Glibc sys/uio.h): New sections.
75242         * doc/posix-functions/psiginfo.texi: Fix info about glibc version.
75243         * doc/posix-functions/pthread_mutex_consistent.texi: Likewise.
75244         * doc/posix-functions/pthread_mutexattr_getrobust.texi: Likewise.
75245         * doc/posix-functions/pthread_mutexattr_setrobust.texi: Likewise.
75246         * doc/glibc-functions/execvpe.texi: Likewise.
75248 2011-07-24  Paul Eggert  <eggert@cs.ucla.edu>
75250         ftell: don't include <unistd.h>
75251         * lib/ftell.c: Don't include <unistd.h>.  <stdio.h> is now
75252         guaranteed to define off_t, and the ftell module depends on the
75253         stdio module.
75255         ftell: do not assume wraparound signed arithmetic
75256         * lib/ftell.c: Include <limits.h>.
75257         (ftell): Don't assume wraparound signed arithmetic.
75259 2011-07-24  Bruno Haible  <bruno@clisp.org>
75261         close: No longer depend on module 'fclose'.
75262         * modules/close (Depends-on): Remove fclose.
75263         * NEWS: Mention the change.
75264         Suggested by Sam Steingold <sds@gnu.org>.
75266 2011-07-24  Bruno Haible  <bruno@clisp.org>
75268         fsusage: Enable large volume support on AIX >= 5.2.
75269         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): If 'struct statvfs64' has a
75270         larger f_blocks field than 'struct statvfs', define STAT_STATVFS64
75271         instead of STAT_STATVFS.
75272         * lib/fsusage.c (get_fs_usage) [STAT_STATVFS64]: Use statvfs64.
75274         fsusage: Restore previous behaviour on AIX, Cygwin, Interix.
75275         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Enforce a 64-bit struct statvfs
75276         f_blocks field only on MacOS X.
75278         fsusage: Support large volumes on glibc/Hurd, HP-UX, Solaris, MacOS X.
75279         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Require AC_SYS_LARGEFILE.
75280         * modules/fsusage (Depends-on): Add largefile.
75282 2011-07-24  Paul Eggert  <eggert@cs.ucla.edu>
75284         * README: Modernize discussion of signed integers.
75285         Assuming overflow wraparound is no longer safe.
75286         Mention ones' complement and signed magnitude.
75288 2011-07-22  Bruno Haible  <bruno@clisp.org>
75290         select tests, pselect tests: Refactor.
75291         * tests/test-select.h: New file, extracted from tests/test-select.c.
75292         (select_fn): New type.
75293         (test, do_select, do_select_nowait, do_select_wait, test_tty,
75294         test_connect_first, test_accept_first, test_pair, test_socket_pair,
75295         test_pipe): Add my_select argument.
75296         (test_function): Renamed from main. Add my_select argument.
75297         * tests/test-select.c: Move most code to tests/test-select.h. Include
75298         test-select.h.
75299         * modules/select-tests (Files): Add tests/test-select.h.
75300         * tests/test-pselect.c: Include test-select.h instead of test-select.c.
75301         (my_select, main): New functions.
75302         * modules/pselect-tests (Files): Add tests/test-select.h,
75303         tests/macros.h, tests/signature.h.
75304         (Depends-on): Remove select-tests. Add dependencies of test-select.h.
75305         (configure.ac): Check for <sys/wait.h>.
75307 2011-07-22  Bruno Haible  <bruno@clisp.org>
75309         sys_select tests: Check the signature of FD_*.
75310         * tests/test-select.c (FD_CLR, FD_ISSET, FD_SET, FD_ZERO): Move
75311         signature tests from here...
75312         * tests/test-sys_select.c (FD_CLR, FD_ISSET, FD_SET, FD_ZERO): ... to
75313         here.
75314         * modules/sys_select-tests (Files): Add tests/signature.h.
75316 2011-07-22  Paul Eggert  <eggert@cs.ucla.edu>
75318         largefile: new module, replacing large-inode
75319         Pádraig Brady suggested this in <http://debbugs.gnu.org/9140#20>.
75320         * MODULES.html.sh: Add largefile, remove large-inode.
75321         * modules/largefile, m4/largefile.m4: New files.
75322         * modules/large-inode, m4/large-inode.m4: Remove.
75324         fsusage: port to MacOS X 10.7 with 4 TiB file systems
75325         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Reject statvfs
75326         implementations that use only 32 bits to count blocks.
75327         On typical hosts with 1024-byte blocks, this fails with file
75328         systems as small as 4 TiB.  Problem reported by Herb Wartens
75329         <http://debbugs.gnu.org/9140> and this should also fix a similar
75330         problem reported by Tim Spriggs <http://debbugs.gnu.org/7355>.
75332         large-inode: New module
75333         * MODULES.html.sh: Add it.
75334         * modules/large-inode, m4/large-inode.m4: New files.
75336         extensions: Enable extensions on MacOS X 10.5 and later.
75337         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Define _DARWIN_C_SOURCE.
75339 2011-07-22  Kamil Dudka  <kdudka@redhat.com>
75341         file-has-acl: use acl_extended_file_nofollow if available
75342         * lib/acl-internal.h (HAVE_ACL_EXTENDED_FILE): New macro.
75343         (acl_extended_file): New macro.
75344         * lib/file-has-acl.c (file_has_acl): Use acl_extended_file_nofollow.
75345         * m4/acl.m4 (gl_FUNC_ACL): Check for acl_extended_file_nofollow.
75347 2011-07-21  Bruno Haible  <bruno@clisp.org>
75349         Declare system functions in a way that works with C++.
75350         * m4/fdopendir.m4 (gl_FUNC_FDOPENDIR) [C++]: In the test program,
75351         declare fdopendir as extern "C".
75352         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS) [C++]: In the test program,
75353         declare frexpl as extern "C".
75354         * m4/getaddrinfo.m4 (gl_GETADDRINFO) [C++]: In the test program,
75355         declare gai_strerror as extern "C".
75356         * m4/getdomainname.m4 (gl_FUNC_GETDOMAINNAME) [C++]: In the test
75357         programs, declare gai_strerror as extern "C".
75358         * m4/getlogin_r.m4 (gl_FUNC_GETLOGIN_R) [C++]: In the test program,
75359         declare getlogin_r as extern "C".
75360         * m4/ioctl.m4 (gl_FUNC_IOCTL) [C++]: In the test program, declare ioctl
75361         as extern "C".
75362         * m4/ldexpl.m4 (gl_FUNC_LDEXPL_WORKS) [C++]: In the test program,
75363         declare ldexpl as extern "C".
75364         * m4/logb.m4 (gl_FUNC_LOGB) [C++]: In the test programs, declare logb
75365         as extern "C".
75366         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS) [C++]: In the test
75367         program, declare getmntinfo as extern "C".
75368         * m4/stpncpy.m4 (gl_FUNC_STPNCPY) [C++]: In the test program, declare
75369         stpncpy as extern "C".
75370         * m4/strerror_r.m4 (gl_FUNC_STRERROR_R_WORKS) [C++]: In the test
75371         program, declare __xpg_strerror_r as extern "C".
75372         * m4/strndup.m4 (gl_FUNC_STRNDUP) [C++]: In the test program, declare
75373         strndup as extern "C".
75374         * m4/sys_select_h.m4 (gl_HEADER_SYS_SELECT) [C++]: In the test program,
75375         declare memset and bzero as extern "C".
75376         Reported by Sam Steingold <sds@gnu.org>.
75378 2011-07-12  Jim Meyering  <meyering@redhat.com>
75380         maint.mk: prohibit inclusion of "verify.h" without use
75381         * top/maint.mk (sc_prohibit_verify_without_use): New rule.
75383 2011-07-19  Pádraig Brady  <P@draigBrady.com>
75385         timer-time: A new module to check for timer_settime()
75386         * m4/timer_time.m4: Check for the posix function.
75387         * modules/timer-time: Add the new module.
75388         * MODULES.html.sh (Compat checks for POSIX:2008 functions):
75389         Mention it.
75391 2011-07-19  Paul Eggert  <eggert@cs.ucla.edu>
75392             Bruno Haible  <bruno@clisp.org>
75394         pthread_sigmask: assume POSIX threads if --avoid=threadlib
75395         * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK): If gl_THREADLIB is
75396         not defined, assume POSIX threads and look for pthread_sigmask in
75397         $LIBS, without changing $CPPFLAGS.
75399 2011-07-19  Bruno Haible  <bruno@clisp.org>
75401         strstr: Update cross-compilation guess.
75402         * m4/strstr.m4 (gl_FUNC_STRSTR): On glibc > 2.12 with x86 or x86_64
75403         CPUs, guess no, in view of glibc
75404         BZ #12100 <http://sourceware.org/bugzilla/show_bug.cgi?id=12100>.
75405         Suggested by Eric Blake. Reported by Reuben Thomas.
75407 2011-07-19  Pádraig Brady  <P@draigBrady.com>
75409         getopt-gnu: suppress core dumps from detection code
75410         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Use the nocrash module
75411         to suppress core dumps that may well occur on glibc systems.
75412         * modules/getopt-gnu: Depend on nocrash.
75414 2011-07-16  Paul Eggert  <eggert@cs.ucla.edu>
75416         pthread_sigmask: ensure usleep is declared
75417         * lib/pthread_sigmask.c [PTHREAD_SIGMASK_UNBLOCK_BUG]:
75418         Include <unistd.h>, to declare usleep.  Needed on Solaris 8,
75420 2011-07-15  Paul Eggert  <eggert@cs.ucla.edu>
75422         doc: Document NonStop portability issues.
75423         * doc/posix-functions/sigaction.texi (sigaction):
75424         * doc/posix-headers/signal.texi (signal.h):
75425         Document NonStop.  See Joachim Schmitz in
75426         http://lists.gnu.org/r/bug-coreutils/2011-07/msg00062.html
75428 2011-07-15  Bruno Haible  <bruno@clisp.org>
75430         ffsl, ffsll: Avoid unportable behaviour.
75431         * lib/ffsl.h (FUNC): Use 'unsigned int' instead of 'int'.
75433 2011-07-15  Bruno Haible  <bruno@clisp.org>
75435         ffs: More tests.
75436         * tests/test-ffs.c (NBITS): New macro.
75437         (main): Add more tests.
75438         * tests/test-ffsl.c (NBITS): New macro.
75439         (main): Add more tests.
75440         * tests/test-ffsll.c (NBITS): New macro.
75441         (main): Add more tests.
75443 2011-07-15  Eric Blake  <eblake@redhat.com>
75445         ffsl, ffsll: new modules
75446         * modules/ffsl: New file.
75447         * modules/ffsll: Likewise.
75448         * m4/ffsl.m4: Likewise.
75449         * m4/ffsll.m4: Likewise.
75450         * lib/ffsl.c: Likewise.
75451         * lib/ffsl.h: Likewise.
75452         * lib/ffsll.c: Likewise.
75453         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY)
75454         (gl_HEADER_STRING_H_DEFAULTS): Add defaults.
75455         * modules/string (Makefile.am): Substitute witnesses.
75456         * lib/strings.in.h (ffsl, ffsll): Declare.
75457         * modules/ffsl-tests: New test file.
75458         * modules/ffsll-tests: Likewise.
75459         * tests/test-ffsl.c: Likewise.
75460         * tests/test-ffsll.c: Likewise.
75461         * MODULES.html.sh (Integer arithmetic functions): Mention it.
75462         * doc/glibc-functions/ffsl.texi (ffsl): Likewise.
75463         * doc/glibc-functions/ffsll.texi (ffsll): Likewise.
75465         ffs: fix m4 prerequisite
75466         * m4/ffs.m4 (gl_FUNC_FFS): Require strings.h defaults.
75468         ffs: avoid undefined behavior
75469         * lib/ffs.c (ffs): Provide fallback for non-32-bit int.
75470         * tests/test-ffs.c (naive, main): Avoid signed shifts.
75471         Reported by Bruno Haible.
75473 2011-07-12  Bruno Haible  <bruno@clisp.org>
75475         pthread_sigmask: Rely on module 'threadlib'.
75476         * modules/pthread_sigmask (Depends-on): Add threadlib.
75477         * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK): Assume gl_THREADLIB
75478         is defined.
75480 2011-07-12  Bruno Haible  <bruno@clisp.org>
75482         regex: Depend on module 'strcase'.
75483         * modules/regex (Depends-on): Add strcase, for strcasecmp().
75485 2011-07-12  Jim Meyering  <meyering@redhat.com>
75487         warn-on-use: fix typo in file name
75488         * modules/snippet/warn-on-use (Files): Correct file name:
75489         include /snippet/ component in "build-aux/snippet/warn-on-use.h".
75491 2011-07-12  Bruno Haible  <bruno@clisp.org>
75493         strings: Document module.
75494         * doc/posix-headers/strings.texi: Mention module 'strings'.
75496 2011-07-12  Bruno Haible  <bruno@clisp.org>
75498         Rename module '_Noreturn' to 'snippet/_Noreturn'.
75499         * modules/snippet/_Noreturn: Renamed from modules/_Noreturn.
75500         (Files, Makefile.am): Update.
75501         * build-aux/snippet/_Noreturn.h: Renamed from build-aux/_Noreturn.h.
75502         * modules/stdlib (Depends-on): Update.
75504 2011-07-12  Bruno Haible  <bruno@clisp.org>
75506         * NEWS: Mention the changes.
75508         Rename module 'warn-on-use' to 'snippet/warn-on-use'.
75509         * modules/snippet/warn-on-use: Renamed from modules/warn-on-use.
75510         (Files, Makefile.am): Update.
75511         * build-aux/snippet/warn-on-use.h: Renamed from build-aux/warn-on-use.h.
75512         * modules/arpa_inet (Depends-on): Update.
75513         * modules/ctype (Depends-on): Update.
75514         * modules/dirent (Depends-on): Update.
75515         * modules/fcntl-h (Depends-on): Update.
75516         * modules/glob (Depends-on): Update.
75517         * modules/iconv-h (Depends-on): Update.
75518         * modules/inttypes-incomplete (Depends-on): Update.
75519         * modules/langinfo (Depends-on): Update.
75520         * modules/locale (Depends-on): Update.
75521         * modules/math (Depends-on): Update.
75522         * modules/netdb (Depends-on): Update.
75523         * modules/poll-h (Depends-on): Update.
75524         * modules/pty (Depends-on): Update.
75525         * modules/search (Depends-on): Update.
75526         * modules/signal (Depends-on): Update.
75527         * modules/spawn (Depends-on): Update.
75528         * modules/stdio (Depends-on): Update.
75529         * modules/stdlib (Depends-on): Update.
75530         * modules/string (Depends-on): Update.
75531         * modules/strings (Depends-on): Update.
75532         * modules/sys_file (Depends-on): Update.
75533         * modules/sys_ioctl (Depends-on): Update.
75534         * modules/sys_select (Depends-on): Update.
75535         * modules/sys_socket (Depends-on): Update.
75536         * modules/sys_stat (Depends-on): Update.
75537         * modules/sys_time (Depends-on): Update.
75538         * modules/sys_times (Depends-on): Update.
75539         * modules/sys_utsname (Depends-on): Update.
75540         * modules/sys_wait (Depends-on): Update.
75541         * modules/termios (Depends-on): Update.
75542         * modules/time (Depends-on): Update.
75543         * modules/unistd (Depends-on): Update.
75544         * modules/wchar (Depends-on): Update.
75545         * modules/wctype-h (Depends-on): Update.
75546         * MODULES.html.sh (Support for building libraries and executables):
75547         Update.
75549         Rename module 'unused-parameter' to 'snippet/unused-parameter'.
75550         * modules/snippet/unused-parameter: Renamed from
75551         modules/unused-parameter.
75552         (Files, Makefile.am): Update.
75553         * build-aux/snippet/unused-parameter.h: Renamed from
75554         build-aux/unused-parameter.h.
75555         * modules/selinux-h (Depends-on): Update.
75556         * modules/unistr/base (Depends-on): Update.
75557         * MODULES.html.sh (Core language properties): Update.
75559         Rename module 'link-warning' to 'snippet/link-warning'.
75560         * modules/snippet/link-warning: Renamed from modules/link-warning.
75561         (Files, Makefile.am): Update.
75562         * build-aux/snippet/link-warning.h: Renamed from
75563         build-aux/link-warning.h.
75564         * MODULES.html.sh (Support for building libraries and executables):
75565         Update.
75567         Rename module 'c++defs' to 'snippet/c++defs'.
75568         * modules/snippet/c++defs: Renamed from modules/c++defs.
75569         (Files, Makefile.am): Update.
75570         * build-aux/snippet/c++defs.h: Renamed from build-aux/c++defs.h.
75571         * modules/arpa_inet (Depends-on): Update.
75572         * modules/ctype (Depends-on): Update.
75573         * modules/dirent (Depends-on): Update.
75574         * modules/fcntl-h (Depends-on): Update.
75575         * modules/glob (Depends-on): Update.
75576         * modules/iconv-h (Depends-on): Update.
75577         * modules/langinfo (Depends-on): Update.
75578         * modules/locale (Depends-on): Update.
75579         * modules/math (Depends-on): Update.
75580         * modules/netdb (Depends-on): Update.
75581         * modules/poll-h (Depends-on): Update.
75582         * modules/pty (Depends-on): Update.
75583         * modules/search (Depends-on): Update.
75584         * modules/signal (Depends-on): Update.
75585         * modules/spawn (Depends-on): Update.
75586         * modules/stdio (Depends-on): Update.
75587         * modules/stdlib (Depends-on): Update.
75588         * modules/string (Depends-on): Update.
75589         * modules/strings (Depends-on): Update.
75590         * modules/sys_ioctl (Depends-on): Update.
75591         * modules/sys_select (Depends-on): Update.
75592         * modules/sys_socket (Depends-on): Update.
75593         * modules/sys_stat (Depends-on): Update.
75594         * modules/sys_time (Depends-on): Update.
75595         * modules/sys_wait (Depends-on): Update.
75596         * modules/termios (Depends-on): Update.
75597         * modules/time (Depends-on): Update.
75598         * modules/unistd (Depends-on): Update.
75599         * modules/wchar (Depends-on): Update.
75600         * modules/wctype-h (Depends-on): Update.
75602         Rename module 'arg-nonnull' to 'snippet/arg-nonnull'.
75603         * modules/snippet/arg-nonnull: Renamed from modules/arg-nonnull.
75604         (Files, Makefile.am): Update.
75605         * build-aux/snippet/arg-nonnull.h: Renamed from build-aux/arg-nonnull.h.
75606         * modules/argv-iter (Depends-on): Update.
75607         * modules/arpa_inet (Depends-on): Update.
75608         * modules/dirent (Depends-on): Update.
75609         * modules/fcntl-h (Depends-on): Update.
75610         * modules/fnmatch (Depends-on): Update.
75611         * modules/getopt-posix (Depends-on): Update.
75612         * modules/glob (Depends-on): Update.
75613         * modules/iconv-h (Depends-on): Update.
75614         * modules/inttypes-incomplete (Depends-on): Update.
75615         * modules/locale (Depends-on): Update.
75616         * modules/math (Depends-on): Update.
75617         * modules/netdb (Depends-on): Update.
75618         * modules/search (Depends-on): Update.
75619         * modules/signal (Depends-on): Update.
75620         * modules/spawn (Depends-on): Update.
75621         * modules/stdio (Depends-on): Update.
75622         * modules/stdlib (Depends-on): Update.
75623         * modules/string (Depends-on): Update.
75624         * modules/strings (Depends-on): Update.
75625         * modules/sys_socket (Depends-on): Update.
75626         * modules/sys_stat (Depends-on): Update.
75627         * modules/sys_time (Depends-on): Update.
75628         * modules/sys_times (Depends-on): Update.
75629         * modules/sys_utsname (Depends-on): Update.
75630         * modules/time (Depends-on): Update.
75631         * modules/unistd (Depends-on): Update.
75632         * modules/wchar (Depends-on): Update.
75633         * MODULES.html.sh (Support for building libraries and executables):
75634         Update.
75636 2011-07-12  Paul Eggert  <eggert@cs.ucla.edu>
75638         Improvements on _Noreturn and related modules.
75640         modules/_Exit-tests: test _Noreturn too
75641         * tests/test-_Exit.c (MTA, Charlie): New functions, taken from the
75642         old tests/test-stdnoreturn.c.  This tests the _Noreturn keyword a bit.
75643         (main): Use them.
75645         stdnoreturn, stdnoreturn-tests: remove modules
75646         They're not needed here and a bit premature for use elsewhere.  See
75647         <http://lists.gnu.org/r/bug-gnulib/2011-07/msg00209.html>.
75648         * m4/stdnoreturn.m4, modules/stdnoreturn, modules/stdnoreturn-tests:
75649         * tests/test-stdnoreturn.c: Remove files.
75650         * MODULES.html.sh (_Noreturn <stdnoreturn.h>): Remove section.
75651         * lib/openat.h, lib/sigpipe-die.h, lib/xalloc.h, lib/xmemdup0.h:
75652         * lib/xstrtol.h: Use _Noreturn rather than including <stdnoreturn.h>
75653         and using noreturn.
75654         * modules/openat, modules/sigpipe-die, modules/xalloc:
75655         * modules/xmemdup0, modules/xstrtol:
75656         Remove dependency on stdnoreturn.
75658         _Noreturn: Ignore __STDC_VERSION__; observe _MSC_VER.
75659         * build-aux/_Noreturn.h (_Noreturn): Ignore __STDC_VERSION__.
75660         Reparenthesize to avoid GCC warning.
75661         Support Microsoft's syntax.
75662         * m4/gnulib-common.m4 (gl_COMMON_BODY): Likewise.
75664         _Noreturn-tests: remove module
75665         * modules/_Noreturn-tests: Remove.
75666         * modules/stdnoreturn-tests (Files): Remove tests/test-_Noreturn.c.
75667         * tests/test-_Noreturn.c: Remove.
75668         * tests/test-stdnoreturn.c: Merge from the old
75669         tests/test-_Noreturn.c, testing both noreturn and _Noreturn.
75671 2011-07-12  Paul Eggert  <eggert@cs.ucla.edu>
75673         _Noreturn, stdnoreturn, and related modules.
75675         * top/maint.mk: Adjust to new noreturn support.
75676         (gl_extract_significant_defines_): Omit pattern ATTRIBUTE_NORETURN.
75677         (def_sym_regex): Do not remove ATTRIBUTE_NORETURN.
75679         xalloc: use stdnoreturn.h
75680         * lib/xalloc.h: Include <stdnoreturn.h>.
75681         (_GL_ATTRIBUTE_NORETURN): Remove; all uses replaced with noreturn.
75682         * modules/xalloc (Depends-on): Add stdnoreturn.
75684         xstrtol: use stdnoreturn.h
75685         * lib/xstrtol.h: Include <stdnoreturn.h>.
75686         (_GL_ATTRIBUTE_NORETURN): Remove; all uses replaced with noreturn.
75687         * modules/xstrtol (Depends-on): Add stdnoreturn.
75689         xmemdup0: use stdnoreturn.h
75690         * lib/xmemdup0.h: Include <stdnoreturn.h>.
75691         (_GL_ATTRIBUTE_NORETURN): Remove; all uses replaced with noreturn.
75692         * modules/xmemdup0 (Depends-on): Add stdnoreturn.
75694         sigpipe-die: use stdnoreturn.h
75695         * lib/sigpipe-die.h: Include <stdnoreturn.h>.
75696         (_GL_ATTRIBUTE_NORETURN): Remove; all uses replaced with noreturn.
75697         * modules/sigpipe-die (Depends-on): Add stdnoreturn.
75699         openat: use stdnoreturn.h
75700         * lib/openat.h: Include <stdnoreturn.h>.
75701         (_GL_ATTRIBUTE_NORETURN): Remove; all uses replaced with noreturn.
75702         * modules/openat (Depends-on): Add stdnoreturn.
75704         * lib/openat-die.c (openat_save_fail): Modernize comment.
75706         * lib/xalloc-die.c (xalloc_die): Modernize comment.
75708         * lib/glthread/thread.h: Modernize comment.
75710         obstack: use _Noreturn
75711         * lib/obstack.c (__attribute__): Remove macro.
75712         (print_and_abort): Use _Noreturn.
75714         c-stack: use _Noreturn
75715         * lib/c-stack.c (die, overflow_handler, segv_handler):
75716         Use _Noreturn rather than __attribute__((noreturn)).
75718         argmatch-tests, exclude_tests: use _Noreturn
75719         * tests/test-argmatch.c, tests/test-exclude.c (_GL_ATTRIBUTE_NORETURN):
75720         Remove.
75721         (ARGMATCH_DIE_DECL): Use _Noreturn instead.
75723         stdlib: use _Noreturn
75724         * lib/stdlib.in.h (_GL_ATTRIBUTE_NORETURN): Remove.
75725         (_Exit): Use _Noreturn rather than _GL_ATTRIBUTE_NORETURN.
75726         * modules/stdlib (Depends-on): Add _Noreturn.
75727         (stdlib.h): Depend on $(_NORETURN_H), and copy it in.
75729         stdnoreturn-tests: new module
75730         * modules/stdnoreturn-tests, tests/test-stdnoreturn.c: New files.
75732         stdnoreturn: new module
75733         * MODULES.html.sh (Noreturn <stdnoreturn.h>): New section.
75734         * m4/stdnoreturn.m4, modules/stdnoreturn: New files.
75736         _Noreturn-tests: new module
75737         * modules/_Noreturn-tests, tests/test-_Noreturn.c: New files.
75739         _Noreturn: new module
75740         * MODULES.html.sh (Support for systems lacking draft ISO C 1X):
75741         New section, mentioning it.
75742         * build-aux/_Noreturn.h, modules/_Noreturn: New files.
75744         * m4/gnulib-common.m4 (gl_COMMON_BODY): Add _Noreturn.
75746 2011-07-11  Eric Blake  <eblake@redhat.com>
75748         ffs: new module
75749         * modules/ffs: New file.
75750         * m4/ffs.m4: Likewise.
75751         * lib/ffs.c: Likewise.
75752         * m4/strings_h.m4 (gl_HEADER_STRINGS_H_DEFAULTS): Add default.
75753         * modules/strings (Makefile.am): Substitute witness.
75754         (Depends-on): Add c++defs.
75755         * lib/strings.in.h (ffs): Declare.
75756         * modules/ffs-tests: New test file.
75757         * tests/test-ffs.c: Test new module.
75758         * MODULES.html.sh (Integer arithmetic functions): Mention it.
75759         * doc/posix-functions/ffs.texi (ffs): Likewise.
75761         regex: avoid compiler warning
75762         * lib/regex.c (includes): Include <strings.h>, for use of
75763         strcasecmp in regcomp.c.
75764         Reported by Joachim Schmitz.
75766 2011-07-09  Paul Eggert  <eggert@cs.ucla.edu>
75768         stdint: respect system's intmax_t if INTMAX_MAX
75769         * lib/stdint.in.h (intmax_t, uintmax_t): If the system defines
75770         INTMAX_MAX, assume its intmax_t is OK.  Similarly for and
75771         uintmax_t.  This is for some Mac OS X builds, where intmax_t is
75772         long but int64_t is long long, and where we will clash with the
75773         system intmax_t if we override it.  See
75774         <http://lists.gnu.org/r/bug-gnulib/2011-07/msg00160.html>.
75775         (INTMAX_C, UINTMAX_C): For consistency, respect the system's
75776         INTMAX_C if INTMAX_MAX and INTMAX_C are both defined, and
75777         similarly for UINTMAX_C.
75779 2011-07-08  Bruno Haible  <bruno@clisp.org>
75781         pthread_sigmask tests: Avoid a compiler warning.
75782         * tests/test-pthread_sigmask1.c (main): Complain if system() returns
75783         non-zero.
75785         sigprocmask tests: A better way to avoid a compiler warning.
75786         * tests/test-sigprocmask.c: Don't include "ignore-value.h".
75787         (main): Complain if system() returns non-zero.
75788         * modules/sigprocmask-tests (Depends-on): Remove ignore-value.
75790 2011-07-08  Bruno Haible  <bruno@clisp.org>
75792         pthread_sigmask: Work around IRIX bug.
75793         * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK): Test for the IRIX
75794         bug.
75795         * lib/pthread_sigmask.c (pthread_sigmask): usleep for some time when
75796         there may be unblocked pending signals.
75797         * doc/posix-functions/pthread_sigmask.texi: Mention the IRIX bug.
75799 2011-07-08  Bruno Haible  <bruno@clisp.org>
75801         pthread_sigmask: Work around Cygwin bug.
75802         * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK): Test for the Cygwin
75803         bug.
75804         * lib/pthread_sigmask.c (pthread_sigmask): Fix the return value from
75805         the system's pthread_sigmask function.
75806         * doc/posix-functions/pthread_sigmask.texi: Mention the Cygwin bug.
75808 2011-07-08  Bruno Haible  <bruno@clisp.org>
75810         pthread_sigmask: Work around bug in single-threaded implementation.
75811         * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK): Test for the
75812         FreeBSD, HP-UX, Solaris bug.
75813         (gl_PREREQ_PTHREAD_SIGMASK): New macro.
75814         * lib/pthread_sigmask.c: Include <stddef.h>.
75815         (pthread_sigmask): If HAVE_PTHREAD_SIGMASK, define as a wrapper around
75816         the system's pthread_sigmask function.
75817         * modules/pthread_sigmask (configure.ac): Invoke
75818         gl_PREREQ_PTHREAD_SIGMASK.
75819         * doc/posix-functions/pthread_sigmask.texi: Mention bug on FreeBSD,
75820         HP-UX, Solaris.
75822 2011-07-08  Eric Blake  <eblake@redhat.com>
75824         test-sigprocmask: avoid compiler warning
75825         * modules/sigprocmask-tests (Depends-on): Add ignore-value.
75826         * tests/test-sigprocmask.c (main): Use it to silence warning.
75827         Reported by Jim Meyering.
75829         test-snprintf: avoid compiler warning
75830         * tests/test-snprintf.c (main): Avoid shadowed declaration.
75831         * tests/test-vsnprintf.c (main): Likewise.
75832         Reported by Jim Meyering.
75834 2011-07-08  Bruno Haible  <bruno@clisp.org>
75836         Tests for module 'pthread_sigmask'.
75837         * modules/pthread_sigmask-tests: New file.
75838         * tests/test-pthread_sigmask1.c: New file, based on
75839         tests/test-sigprocmask.c.
75840         * tests/test-pthread_sigmask2.c: New file.
75842 2011-07-08  Jim Meyering  <meyering@redhat.com>
75844         test-getopt.h: avoid warning about an unused variable
75845         * tests/test-getopt.h (test_getopt): Remove unused variable, "c".
75847 2011-07-07  Jim Meyering  <meyering@redhat.com>
75849         maint: reduce list of files exempt from sc_prohibit_leading_TABs
75850         * Makefile (sc_prohibit_leading_TABs): Don't exempt m4/po.m4,
75851         now that it no longer contains leading TABs.
75852         Remove unused "url=FIXME" statement.
75854 2011-07-08  Paul Eggert  <eggert@cs.ucla.edu>
75856         pthread_sigmask: Assume POSIX when not gl_THREADLIB.
75857         * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK):
75858         When gl_THREADLIB is not in use, assume that the POSIX sematics
75859         are desired.  This is better for Emacs, which uses POSIX semantics
75860         on GNUish and/or POSIXish platforms, and does not use threads at
75861         all otherwise.
75863         pthread_sigmask: fix typo when testing for libraries
75864         * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK):
75865         AC_LINK_IFELSE, not AC_COMPILE_IFELSE.
75867 2011-07-08  Eric Blake  <eblake@redhat.com>
75869         fts: introduce FTS_NOATIME
75870         * lib/fts_.h (FTS_NOATIME): New bit flag.
75871         (FTS_OPTIONMASK): Adjust.
75872         * lib/fts.c (diropen, fts_open, fts_build): Honor it.
75873         (fd_ring_check): Debug code unconditionally uses O_NOATIME.
75875 2011-07-08  Bruno Haible  <bruno@clisp.org>
75877         Tests for module 'thread'.
75878         * modules/thread-tests: New file.
75879         * tests/test-thread_self.c: New file.
75880         * tests/test-thread_create.cc: New file.
75882 2011-07-08  Bruno Haible  <bruno@clisp.org>
75884         thread: Avoid gcc warnings when using gl_thread_self().
75885         * lib/glthread/thread.h (gl_thread_self): Return a pthread_t, not a
75886         'void *'.
75887         (gl_thread_self_pointer): Update.
75889 2011-07-07  Bruno Haible  <bruno@clisp.org>
75891         signal-c++-tests: Check declaration of pthread_sigmask.
75892         * tests/test-signal-c++.cc: Check declaration of pthread_sigmask.
75893         * modules/signal-c++-tests (Makefile.am): Link test-signal-c++ against
75894         $(LIB_PTHREAD_SIGMASK).
75896 2011-07-07  Bruno Haible  <bruno@clisp.org>
75898         pthread_sigmask: Fix link requirements on OSF/1 5.1 and with pth.
75899         * lib/signal.in.h (pthread_sigmask): Override if
75900         REPLACE_PTHREAD_SIGMASK is 1.
75901         * m4/signal_h.m4 (gl_SIGNAL_H_DEFAULTS): Initialize
75902         REPLACE_PTHREAD_SIGMASK.
75903         * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK): Set also
75904         REPLACE_PTHREAD_SIGMASK. Set and substitute LIB_PTHREAD_SIGMASK.
75905         * modules/signal (Makefile.am): Substitute REPLACE_PTHREAD_SIGMASK.
75906         * modules/pthread_sigmask (Depends-on, configure.ac): Update condition.
75907         (Link): Set to $(LIB_PTHREAD_SIGMASK), not $(LIBMULTITHREAD).
75909 2011-07-07  Bruno Haible  <bruno@clisp.org>
75911         pthread_sigmask: Ensure declaration in <signal.h>.
75912         * lib/signal.in.h: On MacOS X, FreeBSD, OpenBSD, OSF/1, Solaris 2.6,
75913         include <pthread.h>.
75914         * doc/posix-functions/pthread_sigmask.texi: Mention the header file
75915         problem.
75917 2011-07-07  Bruno Haible  <bruno@clisp.org>
75919         pthread_sigmask: Document the module.
75920         * doc/posix-functions/pthread_sigmask.texi: Mention the new module.
75922 2011-07-07  Bruno Haible  <bruno@clisp.org>
75924         pthread_sigmask: Follow gnulib conventions.
75925         * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK): Renamed from
75926         gl_PTHREAD_SIGMASK.
75927         * modules/pthread_sigmask (configure.ac): Update.
75929 2011-07-07  Bruno Haible  <bruno@clisp.org>
75931         pthread_sigmask: Make declaration C++ safe.
75932         * lib/signal.in.h: In two special conditions, just do an #include_next.
75933         (pthread_sigmask): Test HAVE_PTHREAD_SIGMASK, not REPLACE_PTHREAD_MASK.
75934         Invoke _GL_CXXALIAS_SYS and _GL_CXXALIASWARN.
75935         * m4/signal_h.m4 (gl_SIGNAL_H_DEFAULTS): Initialize
75936         HAVE_PTHREAD_SIGMASK, not REPLACE_PTHREAD_MASK.
75937         * m4/pthread_sigmask.m4 (gl_PTHREAD_SIGMASK): Set HAVE_PTHREAD_SIGMASK,
75938         not REPLACE_PTHREAD_MASK.
75939         * modules/signal (Makefile.am): Substitute HAVE_PTHREAD_SIGMASK,
75940         not REPLACE_PTHREAD_MASK.
75941         * modules/pthread_sigmask (Depends-on, configure.ac): Update condition.
75943 2011-07-07  Bruno Haible  <bruno@clisp.org>
75945         pthread_sigmask: Fix return value.
75946         * lib/signal.in.h (pthread_sigmask): Declare. Don't define as a macro.
75947         * lib/pthread_sigmask.c: New file.
75948         * modules/pthread_sigmask (Files): Add it.
75949         (configure.ac): Invoke AC_LIBOBJ.
75951 2011-07-07  Eric Blake  <eblake@redhat.com>
75953         getopt: more portable argv creation
75954         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADRS): Rather than casting away
75955         const, use char arrays rather than strings.
75956         Suggested by Paul Eggert.
75958 2011-07-07  Bruno Haible  <bruno@clisp.org>
75960         Tests for module 'sigprocmask'.
75961         * modules/sigprocmask-tests: New file.
75962         * tests/test-sigprocmask.c: New file.
75964 2011-07-07  Bruno Haible  <bruno@clisp.org>
75966         float tests: Tweak.
75967         * tests/test-float.c (main): Tweak skip message.
75969 2011-07-07  Eric Blake  <eblake@redhat.com>
75971         getopt: avoid compiler warning during configure
75972         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADRS): Avoid problems with
75973         assigning string literals to non-const pointer.
75975         getopt-gnu: avoid crash in glibc getopt
75976         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADRS): Detect the problem.
75977         * tests/test-getopt.h (test_getopt): Enhance test.
75978         * tests/test-getopt_long.h (test_getopt_long): Likewise.
75979         * doc/posix-functions/getopt.texi (getopt): Document it.
75980         * doc/glibc-functions/getopt_long.texi (getopt_long): Likewise.
75981         * doc/glibc-functions/getopt_long_only.texi (getopt_long_only):
75982         Likewise.
75984 2011-07-07  Ulrich Drepper  <drepper@gmail.com>
75986         getopt: handle W; without long options in getopt [BZ #12922]
75987         * lib/getopt.c (_getopt_internal_r): When "W;" is in short options
75988         but no long options are defined, just return 'W'.
75990 2011-07-07  Bruno Haible  <bruno@clisp.org>
75992         Avoid literal tabs.
75993         * m4/po,m4 (AM_PO_SUBDIRS, AM_POSTPROCESS_PO_MAKEFILE): Use a shell
75994         variable containing a tab instead of a literal tab.
75995         Reported by Jim Meyering.
75997 2011-07-07  Bruno Haible  <bruno@clisp.org>
75999         Comments.
76000         * m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Update comments about mingw.
76002 2011-07-06  Bruno Haible  <bruno@clisp.org>
76004         sys_select: Fix compilation error on mingw, introduced on 2011-06-30.
76005         * lib/sys_select.in.h: Don't include <sys/socket.h>. Instead, include
76006         <winsock2.h>.
76007         (rpl_fd_isset, FD_ISSET): New definitions, copied from
76008         lib/sys_socket.in.h.
76009         (close, gethostname): Hide declarations from <winsock2.h>.
76010         (socket, connect, accept, bind, getpeername, getsockname, getsockopt,
76011         listen, recv, send, recvfrom, sendto, setsockopt, shutdown): Likewise.
76012         * lib/sys_socket.in.h (close, gethostname): Tweak indentation.
76013         (select): Don't override if gnulib's <sys/select.h> was already
76014         included.
76015         * lib/unistd.in.h (socket, connect, accept, bind, getpeername,
76016         getsockname, getsockopt, listen, recv, send, recvfrom, sendto,
76017         setsockopt, shutdown, select): Tweak indentation.
76019 2011-07-06  Paul Eggert  <eggert@cs.ucla.edu>
76021         * modules/pthread_sigmask (configure.ac): gl_SIGNAL_MODULE_INDICATOR
76022         and not gl_SYS_SELECT_MODULE_INDICATOR, fixing a typo exposed
76023         in an application that does not use the sys_select module.
76025 2011-07-06  Erik Faye-Lund  <kusmabite@gmail.com>
76027         poll: do not return 0 on timeout=-1
76028         * lib/poll.c: Loop with yield if no events occurred.
76030 2011-07-06  Eric Blake  <eblake@redhat.com>
76032         pthread_sigmask: always replace when not using pthread
76033         * m4/pthread_sigmask.m4 (gl_PTHREAD_SIGMASK): Force sigprocmask
76034         replacement when using some threading other than pthread.  Fix
76035         logic bug.
76037 2011-07-06  Bruno Haible  <bruno@clisp.org>
76039         Comments.
76040         * m4/printf.m4: Update comments about mingw.
76042 2011-07-06  Paul Eggert  <eggert@cs.ucla.edu>
76044         sys_select: define sigset_t more portably
76045         * lib/sys_select.in.h: Always include <sys/types.h>, since
76046         we now need sigset_t and mingw defines it there.
76047         Include <signal.h> before split inclusion guard, to avoid
76048         mishaps on Solaris, whose <signal.h> eventually includes us.
76049         * m4/signal_h.m4 (gl_SIGNAL_H): Require gl_CHECK_TYPE_SIGSET_T.
76050         (gl_CHECK_TYPE_SIGSET_T): New macro, most of the contents of
76051         which come from ...
76052         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Require
76053         gl_CHECK_TYPE_SIGSET_T.
76054         (gl_PREREQ_SIGPROCMASK): Now a no-op, since gl_CHECK_TYPE_SIGSET_T
76055         does the real work.
76056         * modules/sys_select (Depends-on): Add 'signal'.
76058         * m4/sys_select_h.m4 (gl_HEADER_SYS_SELECT): Poison pselect.
76059         Suggested by Bruno Haible.
76061         pselect: Use pthread_sigmask, not sigprocmask.
76062         * lib/pselect.c (pselect): Use pthread_sigmask, as it supports
76063         multithreaded apps better than sigprocmask does.
76064         * modules/pselect (Depends-on): Depend on pthread_sigmask, not
76065         sigprocmask directly.
76067 2011-07-05  Paul Eggert  <eggert@cs.ucla.edu>
76069         * lib/pselect.c (pselect): Use plain name, without "rpl_".
76070         Don't #undef,  since we don't need any underlying pselect.
76071         * modules/pselect (configure.ac): Use our pselect.o if !HAVE_PSELECT.
76072         (Depends-on): Add select.
76073         (Link): Add $(LIBSOCKET).
76074         These changes suggested by Bruno Haible.
76076         pselect: document better
76077         * MODULES.html.sh (Support for systems lacking POSIX:2008): Add it.
76078         * doc/posix-functions/pselect.texi (pselect): Document new module.
76080         pthread_sigmask: new module
76081         * MODULES.html.sh (Support for systems lacking POSIX:2008): Add it.
76082         * doc/posix-functions/pthread_sigmask.texi: Document new module.
76083         * lib/signal.in.h (pthread_sigmask): Arrange for replacement.
76084         This is done only as a macro; I don't know how well that'll
76085         work for C++.  Move <sys/types.h> include before the include_next,
76086         to avoid mishap on Solaris.
76087         * m4/signal_h.m4 (gl_SIGNAL_H, gl_SIGNAL_H_DEFAULTS): Check for it.
76088         * modules/signal (Makefile.am): Substitute the check's results.
76089         * modules/pthread_sigmask, m4/pthread_sigmask.m4: New files.
76091         test-pselect: new module
76092         * modules/pselect-tests, tests/test-pselect.c: New files.
76093         * tests/test-select.c, tests/test-sys_select-c++.cc:
76094         If TEST_PSELECT is defined, test pselect instead of testing select.
76096         * tests/test-sys_select.c (sigset_t): Test for it, too.
76097         Suggested by Bruno Haible.
76099 2011-07-05  Eric Blake  <eblake@redhat.com>
76101         snprintf: guarantee %1$d, for libintl
76102         * m4/snprintf.m4 (gl_FUNC_SNPRINTF): Require %1$d support.
76103         * m4/vsnprintf.m4 (gl_FUNC_VSNPRINTF): Likewise.
76104         * doc/posix-functions/snprintf.texi (snprintf): Update.
76105         * doc/posix-functions/vsnprintf.texi (vsnprintf): Likewise.
76106         * tests/test-snprintf.c (main): Enhance test.
76107         * tests/test-vsnprintf.c (main): Likewise.
76109 2011-07-05  Jim Meyering  <meyering@redhat.com>
76111         maint: exempt stdio-read.c and stdio-write.c from the cppi check
76112         * Makefile (sc_cpp_indent_check): Exempt stdio-read.c and stdio-write.c
76113         per Bruno's request, to accommodate this idiom (no space after "#")
76114         even when the function is inside an #if block:
76115         char *
76116         gets (char *s)
76117         #undef gets
76118         {
76119           ...
76120         }
76122 2011-07-04  Jim Meyering  <meyering@redhat.com>
76124         maint: indent with spaces, not TABs, and add a rule to check this
76125         * tests/test-userspec.c: Indent with spaces, not TABs.
76126         * tests/test-argp.c: Likewise.
76127         * tests/test-c-stack2.sh: Likewise.
76128         * tests/test-parse-duration.sh: Likewise
76129         * m4/strtod.m4: Likewise.
76130         * m4/alloca.m4: Likewise.
76131         * m4/pselect.m4: Likewise.
76132         * Makefile (sc_prohibit_leading_TABs): Prohibit leading TABs.
76134 2011-07-03  Jim Meyering  <meyering@redhat.com>
76136         maint.mk: correct omissions in prohibit_argmatch_without_use check
76137         This rule would mistakenly report that argmatch.h is included without
76138         use even when both the argmatch and invalid_arg macro were used.
76139         * top/maint.mk (sc_prohibit_argmatch_without_use): Also detect uses
76140         of argmatch and invalid_arg.
76142 2011-07-03  Bruno Haible  <bruno@clisp.org>
76144         Comments about EINTR.
76145         * lib/safe-read.h: Explain the purpose of this module.
76146         * lib/safe-write.h: Likewise.
76147         * doc/posix-functions/read.texi: Mention EINTR and the 'safe-read'
76148         module.
76149         * doc/posix-functions/write.texi: Mention EINTR and the 'safe-write'
76150         module.
76151         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
76153 2011-06-30  Paul Eggert  <eggert@cs.ucla.edu>
76155         xnanosleep: Rewrite to use new dtotimespec module.
76156         It has the conversion code that used to be in xnanosleep.
76157         * lib/xnanosleep.c: Do not include limits.h, stdbool.h, stdio.h,
76158         assert.h, sys/types.h, or intprops.h.  Include timespec.h instead.
76159         (TIME_T_MAX): Remove.
76160         (xnanosleep): Rewrite in terms of dtotimespec.
76161         * modules/xnanosleep (Depends-on): Add dtotimespec.
76162         Remove intprops, stdbool.
76164         timespec-add, timespec-sub: new modules
76165         * lib/timespec.h (timespec_add, timespec_sub): New decls.
76166         * lib/timespec-add.c, lib/timespec-sub.c:
76167         * modules/timespec-add, modules/timespec-sub: New files.
76169         dtotimespec: new module
76170         * lib/timespec.h (dtotimespec): New decl.
76171         * lib/dtotimespec.c, modules/dtotimespec: New files.
76173         * lib/timespec.h (timespec_sign, timespectod): New inline functions.
76175         pselect: new module
76176         * lib/sys_select.in.h: Include <signal.h>, for 'sigset_t'.
76177         (pselect): New decls.
76178         * m4/sys_select_h.m4 (gl_HEADER_SYS_SELECT): Require AC_C_RESTRICT,
76179         since the standard pselect decl uses 'restrict'.
76180         (gl_SYS_SELECT_H_DEFAULTS): Add defaults for GNULIB_PSELECT,
76181         HAVE_PSELECT, REPLACE_PSELECT.
76182         * modules/sys_select (sys/select.h): Substitute GNULIB_PSELECT,
76183         HAVE_PSELECT, REPLACE_PSELECT.
76184         * lib/pselect.c, m4/pselect.m4, modules/pselect: New files.
76186         sys_select: don't depend on sys_socket
76187         This is so that Emacs doesn't have to drag in m4/sockpfaf.m4 etc; see
76188         <http://lists.gnu.org/r/bug-gnulib/2011-06/msg00358.html>.
76189         This fix works on GNU and GNU-like platforms, but has not been tested
76190         on native Windows.
76191         * lib/sys_select.in.h: Include <sys/socket.h> only if native Windows.
76192         * m4/sys_select_h.m4 (gl_HEADER_SYS_SELECT): Do not require
76193         gl_HEADER_SYS_SOCKET.
76194         * modules/sys_select (Files): Add m4/sys_socket_h.m4, for
76195         gl_PREREQ_SYS_H_WINSOCK2.
76197 2011-06-29  Eric Blake  <eblake@redhat.com>
76199         pipe2: fix C89 compile problem
76200         * lib/pipe2.c (pipe2): Avoid C99 array initialization.
76201         Reported by Bruno Haible.
76203         pipe, pipe2: don't corrupt fd on error
76204         * lib/pipe.c (pipe): Leave fd unchanged on error.
76205         * lib/pipe2.c (pipe2): Likewise.
76206         * doc/posix-functions/pipe.texi (pipe): Document cygwin issue.
76207         * doc/glibc-functions/pipe2.texi (pipe2): Likewise.
76209 2011-06-27  Paolo Bonzini  <bonzini@gnu.org>
76211         mmap-anon: do not use regular expressions inadvertently
76212         * m4/mmap-anon.m4: Remove trailing period from strings sought
76213         in the output.
76215 2011-06-25  Paul Eggert  <eggert@cs.ucla.edu>
76217         nanosleep: fix integer overflow problem
76218         * lib/nanosleep.c (my_usleep): Don't assume signed integer
76219         arithmetic wraps around on overflow.
76221         nanosleep: simplify carrying
76222         * lib/nanosleep.c (nanosleep): Use the requested tv_nsec for the
76223         first call to the underyling nanosleep, not for the last one.
76224         This doesn't fix any bugs, but it simplifies the computation of
76225         the remaining delay.  Found while auditing integer overflow issues.
76227         dup2: remove test for existence of fcntl
76228         * m4/dup2.m4 (gl_FUNC_DUP2): Use "#ifdef FD_CLOEXEC", not
76229         "#if HAVE_FCNTL", in the configure-time test program.
76230         This removes the need for the AC_CHECK_FUNCS_ONCE([fcntl]),
76231         and therefore speeds up "configure" a bit.  Found while
76232         adding the dup2 module to Emacs.
76234 2011-06-24  Eric Blake  <eblake@redhat.com>
76236         maint.mk: enhance useless header checks
76237         * top/maint.mk (_sc_header_without_use): Check both include
76238         styles.
76239         (sc_prohibit_assert_without_use)
76240         (sc_prohibit_close_stream_without_use)
76241         (sc_prohibit_getopt_without_use)
76242         (sc_prohibit_quotearg_without_use)
76243         (sc_prohibit_quote_without_use)
76244         (sc_prohibit_long_options_without_use)
76245         (sc_prohibit_inttostr_without_use)
76246         (sc_prohibit_ignore_value_without_use)
76247         (sc_prohibit_error_without_use, sc_prohibit_xalloc_without_use)
76248         (sc_prohibit_hash_without_use, sc_prohibit_cloexec_without_use)
76249         (sc_prohibit_posixver_without_use, sc_prohibit_same_without_use)
76250         (sc_prohibit_hash_pjw_without_use)
76251         (sc_prohibit_safe_read_without_use)
76252         (sc_prohibit_argmatch_without_use)
76253         (sc_prohibit_canonicalize_without_use)
76254         (sc_prohibit_root_dev_ino_without_use)
76255         (sc_prohibit_openat_without_use)
76256         (sc_prohibit_c_ctype_without_use)
76257         (sc_prohibit_signal_without_use)
76258         (sc_prohibit_stdio--_without_use)
76259         (sc_prohibit_stdio-safer_without_use)
76260         (sc_prohibit_strings_without_use)
76261         (sc_prohibit_intprops_without_use)
76262         (sc_prohibit_stddef_without_use)
76263         (sc_prohibit_xfreopen_without_use): Update clients.
76265 2011-06-24  Jim Meyering  <meyering@redhat.com>
76267         syntax-check: keep one maint.mk rule in sync with its header
76268         * Makefile (sc_check_sym_list): Add a rule to prevent a repeat
76269         of the bug Eric has just fixed, with today's commit 25e4c2ec.
76270         I prefer to avoid temporary files here, so use <(...), but that
76271         is not supported by /bin/sh, so...
76272         (SHELL): Define to /bin/bash.
76274 2011-06-24  Eric Blake  <eblake@redhat.com>
76276         maint.mk: update sc_prohibit_intprops_without_use
76277         * top/maint.mk (_intprops_names): Match recent changes.
76279 2011-06-24  Bruno Haible  <bruno@clisp.org>
76281         strerror-override: No-op tweak.
76282         * lib/strerror-override.h (strerror_override): Reorder conditions,
76283         for consistency with lib/strerror-override.c.
76285 2011-06-23  Eric Blake  <eblake@redhat.com>
76287         maint.mk: test further PATH_MAX issues
76288         * top/maint.mk (sc_prohibit_path_max_array): Rename...
76289         (sc_prohibit_path_max_allocation): ...and also test alloca.
76290         Suggested by Jim Meyering.
76292 2011-06-22  Eric Blake  <eblake@redhat.com>
76294         maint.mk: add syntax-check to avoid char[PATH_MAX]
76295         * top/maint.mk (sc_prohibit_path_max_array): New rule.
76297         stat: be robust to PATH_MAX definition
76298         * lib/stat.c (rpl_stat): Require reasonable PATH_MAX.
76299         * modules/stat (Depends-on): Add verify.
76301         link: work around IRIX bug
76302         * m4/link.m4 (gl_FUNC_LINK): Expose the bug.
76303         * lib/link.c (rpl_link): Work around it.
76304         * tests/test-link.h (test_link): Enhance test.
76305         * doc/posix-functions/link.texi (link): Document the bug.
76307         getopt: silence clang warning
76308         * lib/getopt.c (_getopt_internal_r): Avoid unlikely NULL
76309         dereference.
76310         Reported by Gustavo Martin Domato.
76312 2011-06-22  Jim Meyering  <meyering@redhat.com>
76314         bootstrap: do not insert a blank line into each .gitignore file
76315         * build-aux/bootstrap (sort_patterns): Filter out blank lines.
76317 2011-06-21  Eric Blake  <eblake@redhat.com>
76319         perror: test for output mismatch
76320         * m4/perror.m4 (gl_FUNC_PERROR): Add test, in order to replace
76321         perror on IRIX.
76323         strerror_r: fix OpenBSD behavior on out-of-range
76324         * lib/strerror_r.c (strerror_r): Always use maximal string.
76325         * doc/posix-functions/strerror_r.texi (strerror_r): Document it.
76327         strerror_r: fix OpenBSD behavior on 0
76328         * lib/strerror-override.c (strerror_override): Also override 0
76329         when needed.
76330         * lib/strerror-override.h (strerror_override): Likewise.
76331         * lib/strerror.c (strerror): Simplify, now that 0 override is done
76332         earlier.
76333         * lib/strerror_r.c (strerror_r): Likewise.
76334         * m4/strerror.m4 (gl_FUNC_STRERROR): Split detection of 0
76335         behavior...
76336         (gl_FUNC_STRERROR_0): ...into new macro.
76337         * m4/strerror_r.m4 (gl_FUNC_STRERROR_R): Replace strerror_r if 0
76338         is overridden.
76339         (gl_FUNC_STRERROR_R_WORKS): Avoid extra tests if 0 is broken.
76340         * modules/strerror-override (Files): Add strerror.m4.
76341         (configure.ac): Also provide override for 0 when needed.
76342         * doc/posix-functions/strerror.texi (strerror): Document this.
76343         * doc/posix-functions/perror.texi (perror): Likewise.
76345         perror: adjust array size
76346         * modules/perror (Depends-on): Add strerror-override.
76347         * lib/perror.c (perror): Use it to avoid magic number.
76349         strerror-override: reduce size
76350         * lib/strerror-override.c (strerror_override): Use fewer lines.
76352 2011-06-20  Bruno Haible  <bruno@clisp.org>
76354         pathmax: Ensure correct value for PATH_MAX on HP-UX.
76355         * lib/pathmax.h (PATH_MAX) [HP-UX]: Define to 1024.
76357 2011-06-20  Paul Eggert  <eggert@cs.ucla.edu>
76359         alloca: port to compilers that can optimize like GCC 4.6.0
76360         * lib/alloca.c (find_stack_direction): New signature, taken from
76361         Autoconf git.  This works with GCC 4.6.0.  This code should never
76362         be used with GCC 4.6.0 itself, as GCC has alloca, but it might
76363         be used with other compilers that optimize as well as GCC 4.6.0 does.
76364         (alloca): Adjust to new signature.
76365         * m4/alloca.m4 (__AC_LIBOBJ_ALLOCA) [Autoconf version < 2.69]:
76366         New macro, which patches Autoconf in a similar way.
76368         c-stack: stop worrying about stack direction
76369         * lib/c-stack.c (find_stack_direction): Remove.
76370         (segv_handler): Don't worry about stack direction growth, as it's
76371         too much of a pain to configure this correctly, given how compilers
76372         are optimizing-away our stack-growth detection code.  Instead, assume
76373         that any access to just before or just after the stack is OK.
76374         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC):
76375         Don't require AC_FUNC_ALLOCA; no longer needed.
76377 2011-06-20  Eric Blake  <eblake@redhat.com>
76379         test-stat: don't allocate PATH_MAX bytes
76380         * tests/test-stat.h (test_stat_func): Don't stack-allocate a
76381         PATH_MAX-sized buffer.
76382         * modules/openat-tests (Depends-on): Add getcwd-lgpl, drop pathmax.
76383         * modules/stat-tests (Depends-on): Likewise.
76384         * tests/test-fstatat.c (includes): Drop pathmax.h.
76385         * tests/test-stat.c (includes): Likewise.
76386         Reported by Bruno Haible.
76388 2011-06-20  Bruno Haible  <bruno@clisp.org>
76390         float: Work around <float.h> bugs on FreeBSD/x86, AIX with GCC, IRIX.
76391         * lib/float.in.h: Add workarounds for FreeBSD/x86, AIX with GCC, IRIX.
76392         * lib/float.c: New file.
76393         * m4/float_h.m4 (gl_FLOAT_H): Also handle FreeBSD, AIX, IRIX. Set
76394         REPLACE_FLOAT_LDBL.
76395         * modules/float (Files): Add lib/float.c.
76396         (configure.ac): Invoke AC_LIBOBJ.
76397         * doc/posix-headers/float.texi: Mention problems on FreeBSD, AIX, IRIX.
76399 2011-06-20  Bruno Haible  <bruno@clisp.org>
76401         Tests for module 'float'.
76402         * modules/float-tests: New file.
76403         * tests/test-float.c: New file.
76405 2011-06-19  Bruno Haible  <bruno@clisp.org>
76407         isinf: Coding style.
76408         * lib/isinf.c: Use GNU coding style.
76410 2011-06-19  Bruno Haible  <bruno@clisp.org>
76412         linkat test: Avoid test failure on AIX 7.1.
76413         * tests/test-linkat.c (main): Allow EINVAL as alternate error value.
76414         * tests/test-link.h (test_link): Likewise.
76416 2011-06-19  Bruno Haible  <bruno@clisp.org>
76418         pread test: Avoid test failure on OpenBSD 4.9.
76419         * tests/test-pread.c (main): Allow EFBIG instead of EINBAL.
76421 2011-06-19  Bruno Haible  <bruno@clisp.org>
76423         sprintf-posix: Fix test failure on AIX 7.1.
76424         * m4/printf.m4 (gl_PRINTF_PRECISION): Test against AIX bug.
76425         * doc/posix-functions/dprintf.texi: Mention limited precision problem
76426         on AIX.
76427         * doc/posix-functions/fprintf.texi: Likewise.
76428         * doc/posix-functions/printf.texi: Likewise.
76429         * doc/posix-functions/snprintf.texi: Likewise.
76430         * doc/posix-functions/sprintf.texi: Likewise.
76431         * doc/posix-functions/vdprintf.texi: Likewise.
76432         * doc/posix-functions/vfprintf.texi: Likewise.
76433         * doc/posix-functions/vprintf.texi: Likewise.
76434         * doc/posix-functions/vsnprintf.texi: Likewise.
76435         * doc/posix-functions/vsprintf.texi: Likewise.
76437 2011-06-19  Bruno Haible  <bruno@clisp.org>
76439         roundl-ieee: Fix test failure on AIX 7.1.
76440         * m4/roundl.m4 (gl_FUNC_ROUNDL): Test also the sign of roundl (-0.3L).
76441         * doc/posix-functions/roundl.texi: Mention problem with negative
76442         arguments.
76444 2011-06-19  Bruno Haible  <bruno@clisp.org>
76446         round-ieee: Fix test failures on AIX 7.1 and OSF/1 5.1.
76447         * modules/round-ieee (Depends-on): Add floor-ieee, ceil-ieee.
76448         * doc/posix-functions/round.texi: Mention problem with negative
76449         arguments.
76450         * doc/posix-functions/ceil.texi: Mention problem on OSF/1 5.1.
76452 2011-06-19  Bruno Haible  <bruno@clisp.org>
76454         roundf-ieee: Fix test failures on AIX 7.1 and OSF/1 5.1.
76455         * m4/roundf.m4 (gl_FUNC_ROUNDF): Test also the sign of roundf (-0.3f).
76456         * modules/roundf-ieee (Depends-on): Add floorf-ieee, ceilf-ieee.
76457         * doc/posix-functions/roundf.texi: Mention problem with negative
76458         arguments.
76459         * doc/posix-functions/ceilf.texi: Mention problem on OSF/1 5.1.
76461 2011-06-19  Bruno Haible  <bruno@clisp.org>
76463         ceilf-ieee: Work around bug on MacOS X 10.5.
76464         * doc/posix-functions/ceilf.texi: Mention the MacOS X 10.5 problem.
76466         floor*-ieee, ceil*-ieee, trunc*-ieee, round*-ieee: More robust checks.
76467         * m4/floorf.m4 (gl_FUNC_FLOORF): In the test whether the function is
76468         IEEE compliant, avoid compiler optimizations.
76469         * m4/floor.m4 (gl_FUNC_FLOOR): Likewise.
76470         * m4/ceilf.m4 (gl_FUNC_CEILF): Likewise.
76471         * m4/ceil.m4 (gl_FUNC_CEIL): Likewise.
76472         * m4/ceill.m4 (gl_FUNC_CEILL): Likewise.
76473         * m4/truncf.m4 (gl_FUNC_TRUNCF): Likewise.
76474         * m4/trunc.m4 (gl_FUNC_TRUNC): Likewise.
76475         * m4/truncl.m4 (gl_FUNC_TRUNCL): Likewise.
76476         * m4/roundf.m4 (gl_FUNC_ROUNDF): Likewise.
76477         * m4/round.m4 (gl_FUNC_ROUND): Likewise.
76478         * m4/roundl.m4 (gl_FUNC_ROUNDL): Likewise.
76480 2011-06-19  Bruno Haible  <bruno@clisp.org>
76482         ceilf-ieee: Work around bug on AIX 7.1.
76483         * m4/ceilf.m4 (gl_FUNC_CEILF): Test also the sign of ceilf (-0.3f).
76484         * doc/posix-functions/ceilf.texi: Mention the AIX 7.1 problem.
76486 2011-06-19  Bruno Haible  <bruno@clisp.org>
76488         ceil-ieee: Work around bug on AIX 7.1.
76489         * m4/ceil.m4 (gl_FUNC_CEIL): Test also the sign of ceil (-0.3).
76490         * doc/posix-functions/ceil.texi: Mention the AIX 7.1 problem.
76492 2011-06-18  Bruno Haible  <bruno@clisp.org>
76494         fsync test: Avoid test failure on MacOS X and AIX.
76495         * tests/test-fsync.c (fsync): Allow ENOTSUP and EBADF instead of
76496         EINVAL.
76498 2011-06-18  Bruno Haible  <bruno@clisp.org>
76500         openat, fdopendir tests: Fix link errors.
76501         * modules/openat-tests (Depends-on): Add progname.
76502         * modules/fdopendir-tests (Depends-on): Likewise.
76503         * tests/test-fchownat.c: Include progname.h.
76504         (main): Call set_program_name.
76505         * tests/test-fstatat.c: Include progname.h.
76506         (main): Call set_program_name.
76507         * tests/test-mkdirat.c: Include progname.h.
76508         (main): Call set_program_name.
76509         * tests/test-openat.c: Include progname.h.
76510         (main): Call set_program_name.
76511         * tests/test-unlinkat.c: Include progname.h.
76512         (main): Call set_program_name.
76513         * tests/test-fdopendir.c: Include progname.h.
76514         (main): Call set_program_name.
76516 2011-06-18  Bruno Haible  <bruno@clisp.org>
76518         Doc update.
76519         * doc/posix-functions/pthread_attr_getstack.texi: Update info regarding
76520         HP-UX.
76521         * doc/posix-functions/pthread_attr_setstack.texi: Likewise.
76523 2011-06-18  Bruno Haible  <bruno@clisp.org>
76525         getcwd tests: Avoid compilation error on HP-UX 11.31.
76526         * modules/getcwd-tests (Depends-on): Add pathmax.
76527         * tests/test-getcwd.c: Include pathmax.h.
76529 2011-06-18  Bruno Haible  <bruno@clisp.org>
76531         isfinite, isinf: Fix link error on AIX 6 and 7.
76532         * m4/isfinite.m4 (gl_ISFINITE): When determining whether libm is
76533         needed, also test the macro with a 'float' argument.
76534         * m4/isinf.m4 (gl_ISINF): Likewise.
76536 2011-06-18  Bruno Haible  <bruno@clisp.org>
76538         getloadavg: Don't clobber LIBS. Regression from previous commit.
76539         * m4/getloadavg.m4 (gl_PREREQ_GETLOADAVG): Move tests that use
76540         AC_CHECK_LIB from here...
76541         (gl_GETLOADAVG): ... to here, inside the experiment with LIBS.
76542         (gl_GETLOADAVG, gl_PREREQ_GETLOADAVG): Rename gl_have_func to
76543         gl_func_getloadavg_done.
76544         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
76546 2011-06-18  Bruno Haible  <bruno@clisp.org>
76548         clean-temp: Improve documentation.
76549         * lib/clean-temp.h: Explain better how to use this module.
76550         Reported by John Darrington <john@darrington.wattle.id.au>.
76552 2011-06-17  Bruno Haible  <bruno@clisp.org>
76554         pread, pwrite: Avoid cc warning on AIX.
76555         * lib/unistd.in.h (pread): Undefine before defining as a macro.
76556         (pwrite): Likewise.
76558 2011-06-17  Bruno Haible  <bruno@clisp.org>
76560         spawn-pipe tests: Fix link error.
76561         * tests/test-spawn-pipe-child.c: Undefine fprintf.
76562         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
76564 2011-06-17  Bruno Haible  <bruno@clisp.org>
76566         Tests: Remove unnecessary dependency.
76567         * modules/canonicalize-tests (Depends-on): Remove progname.
76568         * modules/chown-tests (Depends-on): Likewise.
76569         * modules/dirname-tests (Depends-on): Likewise.
76570         * modules/fdopendir-tests (Depends-on): Likewise.
76571         * modules/fdutimensat-tests (Depends-on): Likewise.
76572         * modules/hash-tests (Depends-on): Likewise.
76573         * modules/lchown-tests (Depends-on): Likewise.
76574         * modules/linkat-tests (Depends-on): Likewise.
76575         * modules/renameat-tests (Depends-on): Likewise.
76576         * modules/spawn-pipe-tests (Depends-on): Likewise.
76577         * modules/utimensat-tests (Depends-on): Likewise.
76579 2011-06-17  Bruno Haible  <bruno@clisp.org>
76581         spawn-pipe tests: Fix link error.
76582         * tests/test-spawn-pipe-child.c: Undefine fflush.
76584 2011-06-17  Bruno Haible  <bruno@clisp.org>
76586         Fix tests link errors.
76587         * modules/ceil-ieee-tests (Makefile.am): Use CEIL_LIBM, not FLOOR_LIBM.
76588         * modules/chown-tests (Makefile.am): Don't link test-chown with
76589         LIBINTL.
76590         * modules/lchown-tests (Makefile.am): Don't link test-lchown with
76591         LIBINTL.
76592         * modules/utimens-tests (Makefile.am): Don't link test-utimens with
76593         LIBINTL.
76594         * modules/futimens-tests (Makefile.am): Don't link test-futimens with
76595         LIBINTL.
76597 2011-06-16  Bruno Haible  <bruno@clisp.org>
76599         crypto/gc-sha1: Fix recent regression.
76600         * modules/crypto/gc-sha1 (configure.ac): Invoke AC_LIBOBJ here.
76601         * m4/gc-sha1.m4 (gl_GC_SHA1): Don't invoke gl_SHA1.
76603         crypto/gc-md5: Fix recent regression.
76604         * modules/crypto/gc-md5 (configure.ac): Invoke AC_LIBOBJ here.
76606         crypto/gc-md4: Fix recent regression.
76607         * modules/crypto/gc-md4 (configure.ac): Invoke AC_LIBOBJ here.
76608         * m4/md4.m4 (gl_MD4): Ensure the expansion is non-empty.
76610         crypto/gc-arctwo: Fix recent regression.
76611         * modules/crypto/gc-arctwo (configure.ac): Invoke AC_LIBOBJ here.
76612         * m4/arctwo.m4 (gl_ARCTWO): Ensure the expansion is non-empty.
76614         crypto/gc-rijndael: Fix recent regression.
76615         * modules/crypto/gc-rijndael (Files): Remove m4/rijndael.m4.
76616         (configure.ac): Invoke AC_LIBOBJ here.
76617         * m4/gc-rijndael.m4 (gl_GC_RIJNDAEL): Don't invoke gl_RIJNDAEL.
76618         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
76620         crypto/gc-hmac-sha1: Fix recent regression.
76621         * modules/crypto/gc-hmac-sha1 (Files): Remove m4/hmac-sha1.m4.
76622         (configure.ac): Invoke AC_LIBOBJ here.
76623         * m4/gc-hmac-sha1.m4 (gl_GC_HMAC_SHA1): Don't invoke gl_HMAC_SHA1.
76624         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
76626         crypto/gc-hmac-md5: Fix recent regression.
76627         * modules/crypto/gc-hmac-md5 (Files): Remove m4/hmac-md5.m4.
76628         (configure.ac): Invoke AC_LIBOBJ here.
76629         * m4/gc-hmac-md5.m4 (gl_GC_HMAC_MD5): Don't invoke gl_HMAC_MD5.
76630         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
76632         crypto/gc-des: Fix recent regression.
76633         * modules/crypto/gc-des (Files): Remove m4/des.m4.
76634         (configure.ac): Invoke AC_LIBOBJ here.
76635         * m4/gc-des.m4 (gl_GC_DES): Don't invoke gl_DES.
76636         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
76638         crypto/gc-arcfour: Fix recent regression.
76639         * modules/crypto/gc-arcfour (Files): Remove m4/arcfour.m4.
76640         (configure.ac): Invoke AC_LIBOBJ here.
76641         * m4/gc-arcfour.m4 (gl_GC_ARCFOUR): Don't invoke gl_ARCFOUR.
76642         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
76644 2011-06-16  Paul Eggert  <eggert@cs.ucla.edu>
76646         * m4/lstat.m4 (gl_FUNC_LSTAT): Fix typo in prerequisite.
76647         After the 2011-05-21 change, this macro requires
76648         gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK, not
76649         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
76651 2011-06-16  Bruno Haible  <bruno@clisp.org>
76653         fprintftime: Move AC_LIBOBJ invocations to module description.
76654         * m4/fprintftime.m4: Remove file.
76655         * modules/fprintftime (Files): Remove m4/fprintftime.m4.
76656         (configure.ac): Remove gl_FPRINTFTIME call.
76657         (Makefile.am): Augment lib_SOURCES.
76658         Reported by Jim Meyering.
76660 2011-06-16  Bruno Haible  <bruno@clisp.org>
76662         tmpfile-safer: Finish 2011-05-23 commit.
76663         * m4/stdio-safer.m4: Really remove file.
76664         Reported by Jim Meyering.
76666 2011-06-16  Bruno Haible  <bruno@clisp.org>
76668         syntax-check: Fix typo.
76669         * Makefile (allow_AC_LIBOBJ): Mention printf-posix-rpl.m4, not
76670         printf-posix.m4.
76671         Reported by Jim Meyering.
76673 2011-06-13  Jim Meyering  <meyering@redhat.com>
76675         syntax-check: add a rule to help enforce the no-AC_LIBOBJ-in-m4/ policy
76676         * Makefile (sc_prohibit_AC_LIBOBJ_in_m4): New rule.
76678 2011-05-23  Bruno Haible  <bruno@clisp.org>
76680         yesno: Move AC_LIBOBJ invocations to module description.
76681         * m4/yesno.m4 (gl_YESNO): Remove AC_LIBOBJ invocation.
76682         * modules/yesno (Makefile.am): Augment lib_SOURCES.
76684 2011-05-23  Bruno Haible  <bruno@clisp.org>
76686         xstrtol: Move AC_LIBOBJ invocations to module description.
76687         * m4/xstrtol.m4 (gl_XSTRTOL): Remove AC_LIBOBJ invocations.
76688         * modules/xstrtol (Makefile.am): Augment lib_SOURCES.
76690 2011-05-23  Bruno Haible  <bruno@clisp.org>
76692         xstrtold: Move AC_LIBOBJ invocations to module description.
76693         * m4/xstrtod.m4 (gl_XSTRTOLD): Remove AC_LIBOBJ invocation.
76694         * modules/xstrtold (Makefile.am): Augment lib_SOURCES.
76696 2011-05-23  Bruno Haible  <bruno@clisp.org>
76698         xstrtod: Move AC_LIBOBJ invocations to module description.
76699         * m4/xstrtod.m4 (gl_XSTRTOD): Remove AC_LIBOBJ invocation.
76700         * modules/xstrtod (Makefile.am): Augment lib_SOURCES.
76702 2011-05-23  Bruno Haible  <bruno@clisp.org>
76704         xnanosleep: Move AC_LIBOBJ invocations to module description.
76705         * m4/xnanosleep.m4 (gl_XNANOSLEEP): Remove AC_LIBOBJ invocation.
76706         * modules/xnanosleep (Makefile.am): Augment lib_SOURCES.
76708 2011-05-23  Bruno Haible  <bruno@clisp.org>
76710         xgetcwd: Move AC_LIBOBJ invocations to module description.
76711         * m4/xgetcwd.m4 (gl_XGETCWD): Remove AC_LIBOBJ invocation.
76712         * modules/xgetcwd (Makefile.am): Augment lib_SOURCES.
76714 2011-05-23  Bruno Haible  <bruno@clisp.org>
76716         xalloc: Move AC_LIBOBJ invocations to module description.
76717         * m4/xalloc.m4 (gl_XALLOC): Remove AC_LIBOBJ invocation.
76718         * modules/xalloc (Makefile.am): Augment lib_SOURCES.
76720 2011-05-23  Bruno Haible  <bruno@clisp.org>
76722         write-any-file: Move AC_LIBOBJ invocations to module description.
76723         * m4/write-any-file.m4 (gl_WRITE_ANY_FILE): Remove AC_LIBOBJ
76724         invocation.
76725         * modules/write-any-file (Makefile.am): Augment lib_SOURCES.
76727 2011-05-23  Bruno Haible  <bruno@clisp.org>
76729         utimens: Move AC_LIBOBJ invocations to module description.
76730         * m4/utimens.m4 (gl_UTIMENS): Remove AC_LIBOBJ invocation.
76731         * modules/utimens (Makefile.am): Augment lib_SOURCES.
76733 2011-05-23  Bruno Haible  <bruno@clisp.org>
76735         utimecmp: Move AC_LIBOBJ invocations to module description.
76736         * m4/utimecmp.m4 (gl_UTIMECMP): Remove AC_LIBOBJ invocation.
76737         * modules/utimecmp (Makefile.am): Augment lib_SOURCES.
76739 2011-05-23  Bruno Haible  <bruno@clisp.org>
76741         userspec: Move AC_LIBOBJ invocations to module description.
76742         * m4/userspec.m4 (gl_USERSPEC): Remove AC_LIBOBJ invocation.
76743         * modules/userspec (Makefile.am): Augment lib_SOURCES.
76745 2011-05-23  Bruno Haible  <bruno@clisp.org>
76747         unlinkdir: Move AC_LIBOBJ invocations to module description.
76748         * m4/unlinkdir.m4 (gl_UNLINKDIR): Remove AC_LIBOBJ invocation.
76749         * modules/unlinkdir (Makefile.am): Augment lib_SOURCES.
76751 2011-05-23  Bruno Haible  <bruno@clisp.org>
76753         unistd-safer: Move AC_LIBOBJ invocations to module description.
76754         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Remove AC_LIBOBJ invocations.
76755         * modules/unistd-safer (Makefile.am): Augment lib_SOURCES.
76757 2011-05-23  Bruno Haible  <bruno@clisp.org>
76759         tempname: Move AC_LIBOBJ invocations to module description.
76760         * m4/tempname.m4 (gl_FUNC_GEN_TEMPNAME): Remove AC_LIBOBJ invocation.
76761         * modules/tempname (Makefile.am): Augment lib_SOURCES.
76763 2011-05-23  Bruno Haible  <bruno@clisp.org>
76765         strftime: Move AC_LIBOBJ invocations to module description.
76766         * m4/strftime.m4 (gl_FUNC_STRFTIME): Remove AC_LIBOBJ invocation.
76767         * modules/strftime (Makefile.am): Augment lib_SOURCES.
76769 2011-05-23  Bruno Haible  <bruno@clisp.org>
76771         stdlib-safer: Move AC_LIBOBJ invocations to module description.
76772         * m4/stdlib-safer.m4: Remove file.
76773         * modules/stdlib-safer (Files): Remove m4/stdlib-safer.m4.
76774         (configure.ac): Remove gl_STDLIB_SAFER call.
76775         (Makefile.am): Augment lib_SOURCES.
76777 2011-05-23  Bruno Haible  <bruno@clisp.org>
76779         tmpfile-safer: Move AC_LIBOBJ invocations to module description.
76780         * m4/stdio-safer.m4: Remove file.
76781         * modules/tmpfile-safer (Files): Remove m4/stdio-safer.m4.
76782         (configure.ac): Remove gl_TMPFILE_SAFER call.
76783         (Makefile.am): Augment lib_SOURCES.
76785 2011-05-23  Bruno Haible  <bruno@clisp.org>
76787         popen-safer: Move AC_LIBOBJ invocations to module description.
76788         * m4/stdio-safer.m4 (gl_POPEN_SAFER): Remove macro.
76789         * modules/popen-safer (Files): Remove m4/stdio-safer.m4.
76790         (configure.ac): Remove gl_POPEN_SAFER call.
76791         (Makefile.am): Augment lib_SOURCES.
76793 2011-05-23  Bruno Haible  <bruno@clisp.org>
76795         freopen-safer: Move AC_LIBOBJ invocations to module description.
76796         * m4/stdio-safer.m4 (gl_FREOPEN_SAFER): Remove macro.
76797         * modules/freopen-safer (Files): Remove m4/stdio-safer.m4.
76798         (configure.ac): Remove gl_FREOPEN_SAFER call.
76799         (Makefile.am): Augment lib_SOURCES.
76801 2011-05-23  Bruno Haible  <bruno@clisp.org>
76803         fopen-safer: Move AC_LIBOBJ invocations to module description.
76804         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Remove macro.
76805         * modules/fopen-safer (Files): Remove m4/stdio-safer.m4.
76806         (configure.ac): Remove gl_FOPEN_SAFER call.
76807         (Makefile.am): Augment lib_SOURCES.
76809 2011-05-23  Bruno Haible  <bruno@clisp.org>
76811         crypto/sha512: Move AC_LIBOBJ invocations to module description.
76812         * m4/sha512.m4 (gl_SHA512): Remove AC_LIBOBJ invocation.
76813         * modules/crypto/sha512 (Makefile.am): Augment lib_SOURCES.
76815 2011-05-23  Bruno Haible  <bruno@clisp.org>
76817         crypto/sha256: Move AC_LIBOBJ invocations to module description.
76818         * m4/sha256.m4 (gl_SHA256): Remove AC_LIBOBJ invocation.
76819         * modules/crypto/sha256 (Makefile.am): Augment lib_SOURCES.
76821 2011-05-23  Bruno Haible  <bruno@clisp.org>
76823         crypto/sha1: Move AC_LIBOBJ invocations to module description.
76824         * m4/sha1.m4 (gl_SHA1): Remove AC_LIBOBJ invocation.
76825         * modules/crypto/sha1 (Makefile.am): Augment lib_SOURCES.
76827 2011-05-23  Bruno Haible  <bruno@clisp.org>
76829         settime: Move AC_LIBOBJ invocations to module description.
76830         * m4/settime.m4 (gl_SETTIME): Remove AC_LIBOBJ invocation.
76831         * modules/settime (Makefile.am): Augment lib_SOURCES.
76833 2011-05-23  Bruno Haible  <bruno@clisp.org>
76835         savedir: Move AC_LIBOBJ invocations to module description.
76836         * m4/savedir.m4 (gl_SAVEDIR): Remove AC_LIBOBJ invocation.
76837         * modules/savedir (Makefile.am): Augment lib_SOURCES.
76839 2011-05-23  Bruno Haible  <bruno@clisp.org>
76841         save-cwd: Move AC_LIBOBJ invocations to module description.
76842         * m4/save-cwd.m4 (gl_SAVE_CWD): Remove AC_LIBOBJ invocation.
76843         * modules/save-cwd (Makefile.am): Augment lib_SOURCES.
76845 2011-05-23  Bruno Haible  <bruno@clisp.org>
76847         same: Move AC_LIBOBJ invocations to module description.
76848         * m4/same.m4 (gl_SAME): Remove AC_LIBOBJ invocation.
76849         * modules/same (Makefile.am): Augment lib_SOURCES.
76851 2011-05-23  Bruno Haible  <bruno@clisp.org>
76853         safe-write: Move AC_LIBOBJ invocations to module description.
76854         * m4/safe-write.m4 (gl_SAFE_WRITE): Remove macro.
76855         * modules/safe-write (configure.ac): Invoke gl_PREREQ_SAFE_WRITE
76856         instead of gl_SAFE_WRITE.
76857         (Makefile.am): Augment lib_SOURCES.
76859 2011-05-23  Bruno Haible  <bruno@clisp.org>
76861         safe-read: Move AC_LIBOBJ invocations to module description.
76862         * m4/safe-read.m4 (gl_SAFE_READ): Remove macro.
76863         * modules/safe-read (configure.ac): Invoke gl_PREREQ_SAFE_READ instead
76864         of gl_SAFE_READ.
76865         (Makefile.am): Augment lib_SOURCES.
76867 2011-05-23  Bruno Haible  <bruno@clisp.org>
76869         safe-alloc: Move AC_LIBOBJ invocations to module description.
76870         * m4/safe-alloc.m4 (gl_SAFE_ALLOC): Remove AC_LIBOBJ invocation.
76871         * modules/safe-alloc (Makefile.am): Augment lib_SOURCES.
76873 2011-05-23  Bruno Haible  <bruno@clisp.org>
76875         crypto/rijndael: Move AC_LIBOBJ invocations to module description.
76876         * m4/rijndael.m4: Remove file.
76877         * modules/crypto/rijndael (Files): Remove it.
76878         (configure.ac): Remove gl_RIJNDAEL call.
76879         (Makefile.am): Augment lib_SOURCES.
76881 2011-05-23  Bruno Haible  <bruno@clisp.org>
76883         readtokens: Move AC_LIBOBJ invocations to module description.
76884         * m4/readtokens.m4 (gl_READTOKENS): Remove AC_LIBOBJ invocation.
76885         * modules/readtokens (Makefile.am): Augment lib_SOURCES.
76887 2011-05-23  Bruno Haible  <bruno@clisp.org>
76889         read-file: Move AC_LIBOBJ invocations to module description.
76890         * m4/read-file.m4 (gl_FUNC_READ_FILE): Remove macro.
76891         * modules/read-file (configure.ac): Invoke gl_PREREQ_READ_FILE instead
76892         of gl_FUNC_READ_FILE.
76893         (Makefile.am): Augment lib_SOURCES.
76895 2011-05-23  Bruno Haible  <bruno@clisp.org>
76897         quotearg: Move AC_LIBOBJ invocations to module description.
76898         * m4/quotearg.m4 (gl_QUOTEARG): Remove AC_LIBOBJ invocation.
76899         * modules/quotearg (Makefile.am): Augment lib_SOURCES.
76901 2011-05-23  Bruno Haible  <bruno@clisp.org>
76903         quote: Move AC_LIBOBJ invocations to module description.
76904         * m4/quote.m4 (gl_QUOTE): Remove AC_LIBOBJ invocation.
76905         * modules/quote (Makefile.am): Augment lib_SOURCES.
76907 2011-05-23  Bruno Haible  <bruno@clisp.org>
76909         posixver: Move AC_LIBOBJ invocations to module description.
76910         * m4/posixver.m4 (gl_POSIXVER): Remove AC_LIBOBJ invocation.
76911         * modules/posixver (Makefile.am): Augment lib_SOURCES.
76913 2011-05-23  Bruno Haible  <bruno@clisp.org>
76915         posixtm: Move AC_LIBOBJ invocations to module description.
76916         * m4/posixtm.m4 (gl_POSIXTM): Remove AC_LIBOBJ invocation.
76917         * modules/posixtm (Makefile.am): Augment lib_SOURCES.
76919 2011-05-23  Bruno Haible  <bruno@clisp.org>
76921         physmem: Move AC_LIBOBJ invocations to module description.
76922         * m4/physmem.m4 (gl_PHYSMEM): Remove AC_LIBOBJ invocation.
76923         * modules/physmem (Makefile.am): Augment lib_SOURCES.
76925 2011-05-23  Bruno Haible  <bruno@clisp.org>
76927         pagealign_alloc: Move AC_LIBOBJ invocations to module description.
76928         * m4/pagealign_alloc.m4 (gl_PAGEALIGN_ALLOC): Remove AC_LIBOBJ
76929         invocation.
76930         * modules/pagealign_alloc (Makefile.am): Augment lib_SOURCES.
76932 2011-05-23  Bruno Haible  <bruno@clisp.org>
76934         mpsort: Move AC_LIBOBJ invocations to module description.
76935         * m4/mpsort.m4 (gl_MPSORT): Remove AC_LIBOBJ invocation.
76936         * modules/mpsort (Makefile.am): Augment lib_SOURCES.
76938 2011-05-23  Bruno Haible  <bruno@clisp.org>
76940         modechange: Move AC_LIBOBJ invocations to module description.
76941         * m4/modechange.m4 (gl_MODECHANGE): Remove AC_LIBOBJ invocation.
76942         * modules/modechange (Makefile.am): Augment lib_SOURCES.
76944 2011-05-23  Bruno Haible  <bruno@clisp.org>
76946         mkdir-p: Move AC_LIBOBJ invocations to module description.
76947         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Remove AC_LIBOBJ invocations.
76948         * modules/mkdir-p (Makefile.am): Augment lib_SOURCES.
76950 2011-05-23  Bruno Haible  <bruno@clisp.org>
76952         mkancesdirs: Move AC_LIBOBJ invocations to module description.
76953         * m4/mkancesdirs.m4 (gl_MKANCESDIRS): Remove AC_LIBOBJ invocation.
76954         * modules/mkancesdirs (Makefile.am): Augment lib_SOURCES.
76956 2011-05-23  Bruno Haible  <bruno@clisp.org>
76958         mgetgroups: Move AC_LIBOBJ invocations to module description.
76959         * m4/mgetgroups.m4 (gl_MGETGROUPS): Remove AC_LIBOBJ invocation.
76960         * modules/mgetgroups (Makefile.am): Augment lib_SOURCES.
76962 2011-05-23  Bruno Haible  <bruno@clisp.org>
76964         memxor: Move AC_LIBOBJ invocations to module description.
76965         * m4/memxor.m4 (gl_MEMXOR): Remove AC_LIBOBJ invocation.
76966         * modules/memxor (Makefile.am): Augment lib_SOURCES.
76968 2011-05-23  Bruno Haible  <bruno@clisp.org>
76970         memcoll: Move AC_LIBOBJ invocations to module description.
76971         * m4/memcoll.m4 (gl_MEMCOLL): Remove AC_LIBOBJ invocation.
76972         * modules/memcoll (Makefile.am): Augment lib_SOURCES.
76974 2011-05-23  Bruno Haible  <bruno@clisp.org>
76976         memcasecmp: Move AC_LIBOBJ invocations to module description.
76977         * m4/memcasecmp.m4 (gl_MEMCASECMP): Remove AC_LIBOBJ invocation.
76978         * modules/memcasecmp (Makefile.am): Augment lib_SOURCES.
76980 2011-05-23  Bruno Haible  <bruno@clisp.org>
76982         crypto/md5: Move AC_LIBOBJ invocations to module description.
76983         * m4/md5.m4 (gl_MD5): Remove AC_LIBOBJ invocation.
76984         * modules/crypto/md5 (Makefile.am): Augment lib_SOURCES.
76986 2011-05-23  Bruno Haible  <bruno@clisp.org>
76988         crypto/md4: Move AC_LIBOBJ invocations to module description.
76989         * m4/md4.m4 (gl_MD4): Remove AC_LIBOBJ invocation.
76990         * modules/crypto/md4 (Makefile.am): Augment lib_SOURCES.
76992 2011-05-23  Bruno Haible  <bruno@clisp.org>
76994         crypto/md2: Move AC_LIBOBJ invocations to module description.
76995         * m4/md2.m4: Remove file.
76996         * modules/crypto/md2 (Files): Remove it.
76997         (configure.ac): Remove gl_MD2 call.
76998         (Makefile.am): Augment lib_SOURCES.
77000 2011-05-23  Bruno Haible  <bruno@clisp.org>
77002         long-options: Move AC_LIBOBJ invocations to module description.
77003         * m4/long-options.m4: Remove file.
77004         * modules/long-options (Files): Remove it.
77005         (configure.ac): Remove gl_LONG_OPTIONS call.
77006         (Makefile.am): Augment lib_SOURCES.
77008 2011-05-23  Bruno Haible  <bruno@clisp.org>
77010         i-ring: Move AC_LIBOBJ invocations to module description.
77011         * m4/i-ring.m4 (gl_I_RING): Remove AC_LIBOBJ invocation.
77012         * modules/i-ring (Makefile.am): Augment lib_SOURCES.
77014 2011-05-23  Bruno Haible  <bruno@clisp.org>
77016         idcache: Move AC_LIBOBJ invocations to module description.
77017         * m4/idcache.m4 (gl_IDCACHE): Remove AC_LIBOBJ invocation.
77018         * modules/idcache (Makefile.am): Augment lib_SOURCES.
77020 2011-05-23  Bruno Haible  <bruno@clisp.org>
77022         human: Move AC_LIBOBJ invocations to module description.
77023         * m4/human.m4 (gl_HUMAN): Remove AC_LIBOBJ invocation.
77024         * modules/human (Makefile.am): Augment lib_SOURCES.
77026 2011-05-23  Bruno Haible  <bruno@clisp.org>
77028         crypto/hmac-sha1: Move AC_LIBOBJ invocations to module description.
77029         * m4/hmac-sha1.m4: Remove file.
77030         * modules/crypto/hmac-sha1 (Files): Remove it.
77031         (configure.ac): Remove gl_HMAC_SHA1 call.
77032         (Makefile.am): Augment lib_SOURCES.
77034 2011-05-23  Bruno Haible  <bruno@clisp.org>
77036         crypto/hmac-md5: Move AC_LIBOBJ invocations to module description.
77037         * m4/hmac-md5.m4: Remove file.
77038         * modules/crypto/hmac-md5 (Files): Remove it.
77039         (configure.ac): Remove gl_HMAC_MD5 call.
77040         (Makefile.am): Augment lib_SOURCES.
77042 2011-05-23  Bruno Haible  <bruno@clisp.org>
77044         hash: Move AC_LIBOBJ invocations to module description.
77045         * m4/hash.m4: Remove file.
77046         * modules/hash (Files): Remove it.
77047         (configure.ac): Remove gl_HASH call.
77048         (Makefile.am): Augment lib_SOURCES.
77050 2011-05-23  Bruno Haible  <bruno@clisp.org>
77052         hard-locale: Move AC_LIBOBJ invocations to module description.
77053         * m4/hard-locale.m4 (gl_HARD_LOCALE): Remove AC_LIBOBJ invocation.
77054         * modules/hard-locale (Makefile.am): Augment lib_SOURCES.
77056 2011-05-23  Bruno Haible  <bruno@clisp.org>
77058         getugroups: Move AC_LIBOBJ invocations to module description.
77059         * m4/getugroups.m4 (gl_GETUGROUPS): Remove AC_LIBOBJ invocation.
77060         * modules/getugroups (Makefile.am): Augment lib_SOURCES.
77062 2011-05-23  Bruno Haible  <bruno@clisp.org>
77064         gettime: Move AC_LIBOBJ invocations to module description.
77065         * m4/gettime.m4 (gl_GETTIME): Remove AC_LIBOBJ invocation.
77066         * modules/gettime (Makefile.am): Augment lib_SOURCES.
77068 2011-05-23  Bruno Haible  <bruno@clisp.org>
77070         getndelim2: Move AC_LIBOBJ invocations to module description.
77071         * m4/getndelim2.m4 (gl_GETNDELIM2): Remove AC_LIBOBJ invocation.
77072         * modules/getndelim2 (Makefile.am): Augment lib_SOURCES.
77074 2011-05-23  Bruno Haible  <bruno@clisp.org>
77076         crypto/gc-pbkdf2-sha1: Move AC_LIBOBJ invocations to module description.
77077         * m4/gc-pbkdf2-sha1.m4: Remove file.
77078         * modules/crypto/gc-pbkdf2-sha1 (Files): Remove it.
77079         (configure.ac): Remove gl_GC_PBKDF2_SHA1 call.
77080         (Makefile.am): Augment lib_SOURCES.
77082 2011-05-23  Bruno Haible  <bruno@clisp.org>
77084         fts: Move AC_LIBOBJ invocations to module description.
77085         * m4/fts.m4 (gl_FUNC_FTS_CORE): Move AC_LIBOBJ invocation from here...
77086         * modules/fts (configure.ac): ... to here.
77088 2011-05-23  Bruno Haible  <bruno@clisp.org>
77090         file-type: Move AC_LIBOBJ invocations to module description.
77091         * m4/file-type.m4: Remove file.
77092         * modules/file-type (Files): Remove it.
77093         (configure.ac): Remove gl_FILE_TYPE call.
77094         (Makefile.am): Augment lib_SOURCES.
77096 2011-05-23  Bruno Haible  <bruno@clisp.org>
77098         filenamecat*: Respect rules for use of AC_LIBOBJ.
77099         * m4/filenamecat.m4 (gl_FILE_NAME_CONCAT, gl_FILE_NAME_CONCAT_LGPL):
77100         Remove AC_LIBOBJ invocation.
77101         * modules/filenamecat (Makefile.am): Augment lib_SOURCES.
77102         * modules/filenamecat-lgpl (Makefile.am): Augment lib_SOURCES.
77104 2011-05-23  Bruno Haible  <bruno@clisp.org>
77106         filemode: Move AC_LIBOBJ invocations to module description.
77107         * m4/filemode.m4 (gl_FILEMODE): Remove AC_LIBOBJ invocation.
77108         * modules/filemode (Makefile.am): Augment lib_SOURCES.
77110 2011-05-23  Bruno Haible  <bruno@clisp.org>
77112         openat-safer: Move AC_LIBOBJ invocations to module description.
77113         * m4/fcntl-safer.m4 (gl_OPENAT_SAFER): Remove AC_LIBOBJ invocation.
77114         * modules/openat-safer (Makefile.am): Augment lib_SOURCES.
77116 2011-05-23  Bruno Haible  <bruno@clisp.org>
77118         fcntl-safer: Move AC_LIBOBJ invocations to module description.
77119         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Remove AC_LIBOBJ invocations.
77120         * modules/fcntl-safer (Makefile.am): Augment lib_SOURCES.
77122 2011-05-23  Bruno Haible  <bruno@clisp.org>
77124         exclude: Move AC_LIBOBJ invocations to module description.
77125         * m4/exclude.m4: Remove file.
77126         * modules/exclude (Files): Remove it.
77127         (configure.ac): Remove gl_EXCLUDE call.
77128         (Makefile.am): Augment lib_SOURCES.
77130 2011-05-23  Bruno Haible  <bruno@clisp.org>
77132         dirname*: Respect rules for use of AC_LIBOBJ.
77133         * m4/dirname.m4 (gl_DIRNAME, gl_DIRNAME_LGPL): Remove AC_LIBOBJ
77134         invocations.
77135         * modules/dirname (Makefile.am): Augment lib_SOURCES.
77136         * modules/dirname-lgpl (Makefile.am): Augment lib_SOURCES.
77138 2011-05-23  Bruno Haible  <bruno@clisp.org>
77140         dirent-safer: Move AC_LIBOBJ invocations to module description.
77141         * m4/dirent-safer.m4 (gl_DIRENT_SAFER): Remove AC_LIBOBJ invocation.
77142         * modules/dirent-safer (Makefile.am): Augment lib_SOURCES.
77144 2011-05-23  Bruno Haible  <bruno@clisp.org>
77146         crypto/des: Move AC_LIBOBJ invocations to module description.
77147         * m4/des.m4: Remove file.
77148         * modules/crypto/des (Files): Remove it.
77149         (configure.ac): Remove gl_DES call.
77150         (Makefile.am): Augment lib_SOURCES.
77152 2011-05-23  Bruno Haible  <bruno@clisp.org>
77154         cycle-check: Move AC_LIBOBJ invocations to module description.
77155         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Remove AC_LIBOBJ invocation.
77156         * modules/cycle-check (Makefile.am): Augment lib_SOURCES.
77158 2011-05-23  Bruno Haible  <bruno@clisp.org>
77160         c-strtold: Move AC_LIBOBJ invocations to module description.
77161         * m4/c-strtod.m4 (gl_C_STRTOLD): Remove AC_LIBOBJ invocation.
77162         * modules/c-strtold (Makefile.am): Augment lib_SOURCES.
77164 2011-05-23  Bruno Haible  <bruno@clisp.org>
77166         c-strtod: Move AC_LIBOBJ invocations to module description.
77167         * m4/c-strtod.m4 (gl_C_STRTOD): Remove AC_LIBOBJ invocation.
77168         * modules/c-strtod (Makefile.am): Augment lib_SOURCES.
77170 2011-05-23  Bruno Haible  <bruno@clisp.org>
77172         crc: Move AC_LIBOBJ invocations to module description.
77173         * m4/crc.m4: Remove file.
77174         * modules/crc (Files): Remove it.
77175         (configure.ac): Remove gl_CRC call.
77176         (Makefile.am): Augment lib_SOURCES.
77178 2011-05-23  Bruno Haible  <bruno@clisp.org>
77180         close-stream: Move AC_LIBOBJ invocations to module description.
77181         * m4/close-stream.m4 (gl_CLOSE_STREAM): Remove AC_LIBOBJ invocation.
77182         * modules/close-stream (Makefile.am): Augment lib_SOURCES.
77184 2011-05-23  Bruno Haible  <bruno@clisp.org>
77186         closeout: Move AC_LIBOBJ invocations to module description.
77187         * m4/closeout.m4 (gl_CLOSEOUT): Remove AC_LIBOBJ invocation.
77188         * modules/closeout (Makefile.am): Augment lib_SOURCES.
77190 2011-05-23  Bruno Haible  <bruno@clisp.org>
77192         closein: Move AC_LIBOBJ invocations to module description.
77193         * m4/closein.m4 (gl_CLOSEIN): Remove AC_LIBOBJ invocation.
77194         * modules/closein (Makefile.am): Augment lib_SOURCES.
77196 2011-05-23  Bruno Haible  <bruno@clisp.org>
77198         cloexec: Move AC_LIBOBJ invocations to module description.
77199         * m4/cloexec.m4: Remove file.
77200         * modules/cloexec (Files): Remove it.
77201         (configure.ac): Remove gl_CLOEXEC call.
77202         (Makefile.am): Augment lib_SOURCES.
77204 2011-05-23  Bruno Haible  <bruno@clisp.org>
77206         check-version: Move AC_LIBOBJ invocations to module description.
77207         * m4/check-version.m4: Remove file.
77208         * modules/check-version (Files): Remove it.
77209         (configure.ac): Remove gl_CHECK_VERSION call.
77210         (Makefile.am): Augment lib_SOURCES.
77212 2011-05-23  Bruno Haible  <bruno@clisp.org>
77214         chdir-safer: Move AC_LIBOBJ invocations to module description.
77215         * m4/chdir-safer.m4 (gl_CHDIR_SAFER): Remove AC_LIBOBJ invocation.
77216         * modules/chdir-safer (Makefile.am): Augment lib_SOURCES.
77218 2011-05-23  Bruno Haible  <bruno@clisp.org>
77220         canonicalize: Move AC_LIBOBJ invocations to module description.
77221         * m4/canonicalize.m4 (gl_FUNC_CANONICALIZE_FILENAME_MODE): Remove
77222         AC_LIBOBJ invocation.
77223         * modules/canonicalize (Makefile.am): Augment lib_SOURCES.
77225 2011-05-23  Bruno Haible  <bruno@clisp.org>
77227         canon-host: Move AC_LIBOBJ invocations to module description.
77228         * m4/canon-host.m4 (gl_CANON_HOST): Remove macro.
77229         * modules/canon-host (configure.ac): Invoke gl_PREREQ_CANON_HOST
77230         instead of gl_CANON_HOST.
77231         (Makefile.am): Augment lib_SOURCES.
77233 2011-05-23  Bruno Haible  <bruno@clisp.org>
77235         backupfile: Move AC_LIBOBJ invocations to module description.
77236         * m4/backupfile.m4 (gl_BACKUPFILE): Remove AC_LIBOBJ invocation.
77237         * modules/backupfile (Makefile.am): Augment lib_SOURCES.
77239 2011-05-23  Bruno Haible  <bruno@clisp.org>
77241         argmatch: Move AC_LIBOBJ invocations to module description.
77242         * m4/argmatch.m4: Remove file.
77243         * modules/argmatch (Files): Remove it.
77244         (configure.ac): Remove gl_ARGMATCH call.
77245         (Makefile.am): Augment lib_SOURCES.
77247 2011-05-23  Bruno Haible  <bruno@clisp.org>
77249         crypto/arctwo: Move AC_LIBOBJ invocations to module description.
77250         * m4/arctwo.m4 (gl_ARCTWO): Remove AC_LIBOBJ invocation.
77251         * modules/crypto/arctwo (Makefile.am): Augment lib_SOURCES.
77253 2011-05-23  Bruno Haible  <bruno@clisp.org>
77255         crypto/arcfour: Move AC_LIBOBJ invocations to module description.
77256         * m4/arcfour.m4: Remove file.
77257         * modules/crypto/arcfour (Files): Remove it.
77258         (configure.ac): Remove gl_ARCFOUR call.
77259         (Makefile.am): Augment lib_SOURCES.
77261 2011-05-22  Bruno Haible  <bruno@clisp.org>
77263         write: Move AC_LIBOBJ invocations to module description.
77264         * m4/write.m4 (gl_FUNC_WRITE): Move AC_LIBOBJ invocation from here...
77265         * modules/write (configure.ac): ... to here.
77267 2011-05-22  Bruno Haible  <bruno@clisp.org>
77269         wmemset: Move AC_LIBOBJ invocations to module description.
77270         * m4/wmemset.m4 (gl_FUNC_WMEMSET): Move AC_LIBOBJ invocation from
77271         here...
77272         * modules/wmemset (configure.ac): ... to here.
77274 2011-05-22  Bruno Haible  <bruno@clisp.org>
77276         wmemmove: Move AC_LIBOBJ invocations to module description.
77277         * m4/wmemmove.m4 (gl_FUNC_WMEMMOVE): Move AC_LIBOBJ invocation from
77278         here...
77279         * modules/wmemmove (configure.ac): ... to here.
77281 2011-05-22  Bruno Haible  <bruno@clisp.org>
77283         wmemcpy: Move AC_LIBOBJ invocations to module description.
77284         * m4/wmemcpy.m4 (gl_FUNC_WMEMCPY): Move AC_LIBOBJ invocation from
77285         here...
77286         * modules/wmemcpy (configure.ac): ... to here.
77288 2011-05-22  Bruno Haible  <bruno@clisp.org>
77290         wmemcmp: Move AC_LIBOBJ invocations to module description.
77291         * m4/wmemcmp.m4 (gl_FUNC_WMEMCMP): Move AC_LIBOBJ invocation from
77292         here...
77293         * modules/wmemcmp (configure.ac): ... to here.
77295 2011-05-22  Bruno Haible  <bruno@clisp.org>
77297         wmemchr: Move AC_LIBOBJ invocations to module description.
77298         * m4/wmemchr.m4 (gl_FUNC_WMEMCHR): Move AC_LIBOBJ invocation from
77299         here...
77300         * modules/wmemchr (configure.ac): ... to here.
77302 2011-05-22  Bruno Haible  <bruno@clisp.org>
77304         wcswidth: Move AC_LIBOBJ invocations to module description.
77305         * m4/wcswidth.m4 (gl_FUNC_WCSWIDTH): Move AC_LIBOBJ invocation from
77306         here...
77307         * modules/wcswidth (configure.ac): ... to here.
77309 2011-05-22  Bruno Haible  <bruno@clisp.org>
77311         wcwidth: Respect rules for use of AC_LIBOBJ.
77312         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Set HAVE_WCWIDTH. Move AC_LIBOBJ
77313         invocation from here...
77314         * modules/wcwidth (configure.ac): ... to here.
77315         (Depends-on): Update conditions.
77317 2011-05-22  Bruno Haible  <bruno@clisp.org>
77319         wctype: Move AC_LIBOBJ invocations to module description.
77320         * m4/wctype.m4 (gl_FUNC_WCTYPE): Set HAVE_WCTYPE. Move AC_LIBOBJ
77321         invocation from here...
77322         * modules/wctype (configure.ac): ... to here.
77323         (Depends-on): Update conditions.
77325 2011-05-22  Bruno Haible  <bruno@clisp.org>
77327         wctrans: Move AC_LIBOBJ invocations to module description.
77328         * m4/wctrans.m4 (gl_FUNC_WCTRANS): Set HAVE_WCTRANS. Move AC_LIBOBJ
77329         invocation from here...
77330         * modules/wctrans (configure.ac): ... to here.
77332 2011-05-22  Bruno Haible  <bruno@clisp.org>
77334         wctomb: Move AC_LIBOBJ invocations to module description.
77335         * m4/wctomb.m4 (gl_FUNC_WCTOMB): Move AC_LIBOBJ and gl_PREREQ_WCTOMB
77336         invocations from here...
77337         * modules/wctomb (configure.ac): ... to here.
77339 2011-05-22  Bruno Haible  <bruno@clisp.org>
77341         wctob: Move AC_LIBOBJ invocations to module description.
77342         * m4/wctob.m4 (gl_FUNC_WCTOB): Set HAVE_WCTOB. Move AC_LIBOBJ and
77343         gl_PREREQ_WCTOB invocations from here...
77344         * modules/wctob (configure.ac): ... to here.
77345         (Depends-on): Update conditions.
77347 2011-05-22  Bruno Haible  <bruno@clisp.org>
77349         wcsxfrm: Move AC_LIBOBJ invocations to module description.
77350         * m4/wcsxfrm.m4 (gl_FUNC_WCSXFRM): Move AC_LIBOBJ invocation from
77351         here...
77352         * modules/wcsxfrm (configure.ac): ... to here.
77354 2011-05-22  Bruno Haible  <bruno@clisp.org>
77356         wcstok: Move AC_LIBOBJ invocations to module description.
77357         * m4/wcstok.m4 (gl_FUNC_WCSTOK): Move AC_LIBOBJ invocation from here...
77358         * modules/wcstok (configure.ac): ... to here.
77360 2011-05-22  Bruno Haible  <bruno@clisp.org>
77362         wcsstr: Move AC_LIBOBJ invocations to module description.
77363         * m4/wcsstr.m4 (gl_FUNC_WCSSTR): Move AC_LIBOBJ invocation from here...
77364         * modules/wcsstr (configure.ac): ... to here.
77366 2011-05-22  Bruno Haible  <bruno@clisp.org>
77368         wcsspn: Move AC_LIBOBJ invocations to module description.
77369         * m4/wcsspn.m4 (gl_FUNC_WCSSPN): Move AC_LIBOBJ invocation from here...
77370         * modules/wcsspn (configure.ac): ... to here.
77372 2011-05-22  Bruno Haible  <bruno@clisp.org>
77374         wcsrtombs: Move AC_LIBOBJ invocations to module description.
77375         * m4/wcsrtombs.m4 (gl_FUNC_WCSRTOMBS): Move AC_LIBOBJ and
77376         gl_PREREQ_WCSRTOMBS invocations from here...
77377         * modules/wcsrtombs (configure.ac): ... to here.
77379 2011-05-22  Bruno Haible  <bruno@clisp.org>
77381         wcsrchr: Move AC_LIBOBJ invocations to module description.
77382         * m4/wcsrchr.m4 (gl_FUNC_WCSRCHR): Move AC_LIBOBJ invocation from
77383         here...
77384         * modules/wcsrchr (configure.ac): ... to here.
77386 2011-05-22  Bruno Haible  <bruno@clisp.org>
77388         wcspbrk: Move AC_LIBOBJ invocations to module description.
77389         * m4/wcspbrk.m4 (gl_FUNC_WCSPBRK): Move AC_LIBOBJ invocation from
77390         here...
77391         * modules/wcspbrk (configure.ac): ... to here.
77393 2011-05-22  Bruno Haible  <bruno@clisp.org>
77395         wcsnrtombs: Move AC_LIBOBJ invocations to module description.
77396         * m4/wcsnrtombs.m4 (gl_FUNC_WCSNRTOMBS): Move AC_LIBOBJ and
77397         gl_PREREQ_WCSNRTOMBS invocations from here...
77398         * modules/wcsnrtombs (configure.ac): ... to here.
77400 2011-05-22  Bruno Haible  <bruno@clisp.org>
77402         wcsnlen: Move AC_LIBOBJ invocations to module description.
77403         * m4/wcsnlen.m4 (gl_FUNC_WCSNLEN): Move AC_LIBOBJ invocation from
77404         here...
77405         * modules/wcsnlen (configure.ac): ... to here.
77407 2011-05-22  Bruno Haible  <bruno@clisp.org>
77409         wcsncpy: Move AC_LIBOBJ invocations to module description.
77410         * m4/wcsncpy.m4 (gl_FUNC_WCSNCPY): Move AC_LIBOBJ invocation from
77411         here...
77412         * modules/wcsncpy (configure.ac): ... to here.
77414 2011-05-22  Bruno Haible  <bruno@clisp.org>
77416         wcsncmp: Move AC_LIBOBJ invocations to module description.
77417         * m4/wcsncmp.m4 (gl_FUNC_WCSNCMP): Move AC_LIBOBJ invocation from
77418         here...
77419         * modules/wcsncmp (configure.ac): ... to here.
77421 2011-05-22  Bruno Haible  <bruno@clisp.org>
77423         wcsncat: Move AC_LIBOBJ invocations to module description.
77424         * m4/wcsncat.m4 (gl_FUNC_WCSNCAT): Move AC_LIBOBJ invocation from
77425         here...
77426         * modules/wcsncat (configure.ac): ... to here.
77428 2011-05-22  Bruno Haible  <bruno@clisp.org>
77430         wcsncasecmp: Move AC_LIBOBJ invocations to module description.
77431         * m4/wcsncasecmp.m4 (gl_FUNC_WCSNCASECMP): Move AC_LIBOBJ invocation
77432         from here...
77433         * modules/wcsncasecmp (configure.ac): ... to here.
77435 2011-05-22  Bruno Haible  <bruno@clisp.org>
77437         wcslen: Move AC_LIBOBJ invocations to module description.
77438         * m4/wcslen.m4 (gl_FUNC_WCSLEN): Move AC_LIBOBJ invocation from here...
77439         * modules/wcslen (configure.ac): ... to here.
77441 2011-05-22  Bruno Haible  <bruno@clisp.org>
77443         wcsdup: Move AC_LIBOBJ invocations to module description.
77444         * m4/wcsdup.m4 (gl_FUNC_WCSDUP): Move AC_LIBOBJ invocation from here...
77445         * modules/wcsdup (configure.ac): ... to here.
77447 2011-05-22  Bruno Haible  <bruno@clisp.org>
77449         wcscspn: Move AC_LIBOBJ invocations to module description.
77450         * m4/wcscspn.m4 (gl_FUNC_WCSCSPN): Move AC_LIBOBJ invocation from
77451         here...
77452         * modules/wcscspn (configure.ac): ... to here.
77454 2011-05-22  Bruno Haible  <bruno@clisp.org>
77456         wcscpy: Move AC_LIBOBJ invocations to module description.
77457         * m4/wcscpy.m4 (gl_FUNC_WCSCPY): Move AC_LIBOBJ invocation from here...
77458         * modules/wcscpy (configure.ac): ... to here.
77460 2011-05-22  Bruno Haible  <bruno@clisp.org>
77462         wcscoll: Move AC_LIBOBJ invocations to module description.
77463         * m4/wcscoll.m4 (gl_FUNC_WCSCOLL): Move AC_LIBOBJ invocation from
77464         here...
77465         * modules/wcscoll (configure.ac): ... to here.
77467 2011-05-22  Bruno Haible  <bruno@clisp.org>
77469         wcscmp: Move AC_LIBOBJ invocations to module description.
77470         * m4/wcscmp.m4 (gl_FUNC_WCSCMP): Move AC_LIBOBJ invocation from here...
77471         * modules/wcscmp (configure.ac): ... to here.
77473 2011-05-22  Bruno Haible  <bruno@clisp.org>
77475         wcschr: Move AC_LIBOBJ invocations to module description.
77476         * m4/wcschr.m4 (gl_FUNC_WCSCHR): Move AC_LIBOBJ invocation from here...
77477         * modules/wcschr (configure.ac): ... to here.
77479 2011-05-22  Bruno Haible  <bruno@clisp.org>
77481         wcscat: Move AC_LIBOBJ invocations to module description.
77482         * m4/wcscat.m4 (gl_FUNC_WCSCAT): Move AC_LIBOBJ invocation from here...
77483         * modules/wcscat (configure.ac): ... to here.
77485 2011-05-22  Bruno Haible  <bruno@clisp.org>
77487         wcscasecmp: Move AC_LIBOBJ invocations to module description.
77488         * m4/wcscasecmp.m4 (gl_FUNC_WCSCASECMP): Move AC_LIBOBJ invocation from
77489         here...
77490         * modules/wcscasecmp (configure.ac): ... to here.
77492 2011-05-22  Bruno Haible  <bruno@clisp.org>
77494         wcrtomb: Move AC_LIBOBJ invocations to module description.
77495         * m4/wcrtomb.m4 (gl_FUNC_WCRTOMB): Move AC_LIBOBJ and gl_PREREQ_WCRTOMB
77496         invocations from here...
77497         * modules/wcrtomb (configure.ac): ... to here.
77499 2011-05-22  Bruno Haible  <bruno@clisp.org>
77501         wcpncpy: Move AC_LIBOBJ invocations to module description.
77502         * m4/wcpncpy.m4 (gl_FUNC_WCPNCPY): Move AC_LIBOBJ invocation from
77503         here...
77504         * modules/wcpncpy (configure.ac): ... to here.
77506 2011-05-22  Bruno Haible  <bruno@clisp.org>
77508         wcpcpy: Move AC_LIBOBJ invocations to module description.
77509         * m4/wcpcpy.m4 (gl_FUNC_WCPCPY): Move AC_LIBOBJ invocation from here...
77510         * modules/wcpcpy (configure.ac): ... to here.
77512 2011-05-22  Bruno Haible  <bruno@clisp.org>
77514         waitpid: Move AC_LIBOBJ invocations to module description.
77515         * m4/waitpid.m4 (gl_FUNC_WAITPID): Set HAVE_WAITPID. Move AC_LIBOBJ
77516         invocation from here...
77517         * modules/waitpid (configure.ac): ... to here.
77519 2011-05-22  Bruno Haible  <bruno@clisp.org>
77521         utimensat: Move AC_LIBOBJ invocations to module description.
77522         * m4/utimensat.m4 (gl_FUNC_UTIMENSAT): Move AC_LIBOBJ invocations from
77523         here...
77524         * modules/utimensat (configure.ac): ... to here.
77526 2011-05-22  Bruno Haible  <bruno@clisp.org>
77528         usleep: Move AC_LIBOBJ invocations to module description.
77529         * m4/usleep.m4 (gl_FUNC_USLEEP): Move AC_LIBOBJ invocations from
77530         here...
77531         * modules/usleep (configure.ac): ... to here.
77533 2011-05-22  Bruno Haible  <bruno@clisp.org>
77535         unlockpt: Move AC_LIBOBJ invocations to module description.
77536         * m4/unlockpt.m4 (gl_FUNC_UNLOCKPT): Move AC_LIBOBJ and
77537         gl_PREREQ_UNLOCKPT invocations from here...
77538         * modules/unlockpt (configure.ac): ... to here.
77540 2011-05-22  Bruno Haible  <bruno@clisp.org>
77542         unlink: Respect rules for use of AC_LIBOBJ.
77543         * m4/unlink.m4 (gl_FUNC_UNLINK): Move AC_LIBOBJ invocation from here...
77544         * modules/unlink (configure.ac): ... to here.
77546 2011-05-22  Bruno Haible  <bruno@clisp.org>
77548         uname: Move AC_LIBOBJ invocations to module description.
77549         * m4/uname.m4 (gl_FUNC_UNAME): Call AC_CHECK_FUNCS instead of
77550         AC_REPLACE_FUNCS. Move AC_LIBOBJ and gl_PREREQ_UNAME invocations from
77551         here...
77552         * modules/uname (configure.ac): ... to here.
77554 2011-05-22  Bruno Haible  <bruno@clisp.org>
77556         ttyname_r: Move AC_LIBOBJ invocations to module description.
77557         * m4/ttyname_r.m4 (gl_FUNC_TTYNAME_R): Move AC_LIBOBJ and
77558         gl_PREREQ_TTYNAME_R invocations from here...
77559         * modules/ttyname_r (configure.ac): ... to here.
77561 2011-05-22  Bruno Haible  <bruno@clisp.org>
77563         tsearch: Move AC_LIBOBJ invocations to module description.
77564         * m4/tsearch.m4 (gl_FUNC_TSEARCH): Move AC_LIBOBJ and gl_PREREQ_TSEARCH
77565         invocations from here...
77566         * modules/tsearch (configure.ac): ... to here.
77568 2011-05-22  Bruno Haible  <bruno@clisp.org>
77570         towctrans: Move AC_LIBOBJ invocations to module description.
77571         * m4/towctrans.m4 (gl_FUNC_TOWCTRANS): Set HAVE_TOWCTRANS. Move
77572         AC_LIBOBJ invocation from here...
77573         * modules/towctrans (configure.ac): ... to here.
77575 2011-05-22  Bruno Haible  <bruno@clisp.org>
77577         tmpfile: Move AC_LIBOBJ invocations to module description.
77578         * m4/tmpfile.m4 (gl_FUNC_TMPFILE): Move AC_LIBOBJ and gl_PREREQ_TMPFILE
77579         invocations from here...
77580         * modules/tmpfile (configure.ac): ... to here.
77582 2011-05-22  Bruno Haible  <bruno@clisp.org>
77584         times: Move AC_LIBOBJ invocations to module description.
77585         * m4/times.m4 (gl_FUNC_TIMES): Move AC_LIBOBJ invocation from here...
77586         * modules/times (configure.ac): ... to here.
77588 2011-05-22  Bruno Haible  <bruno@clisp.org>
77590         time_r: Move AC_LIBOBJ invocations to module description.
77591         * m4/time_r.m4 (gl_TIME_R): Move AC_LIBOBJ and gl_PREREQ_TIME_R
77592         invocations from here...
77593         * modules/time_r (configure.ac): ... to here.
77595 2011-05-22  Bruno Haible  <bruno@clisp.org>
77597         timegm: Move AC_LIBOBJ invocations to module description.
77598         * m4/timegm.m4 (gl_FUNC_TIMEGM): Move AC_LIBOBJ and gl_PREREQ_TIMEGM
77599         invocations from here...
77600         * modules/timegm (configure.ac): ... to here.
77602 2011-05-22  Bruno Haible  <bruno@clisp.org>
77604         tcgetsid: Move AC_LIBOBJ invocations to module description.
77605         * m4/tcgetsid.m4 (gl_FUNC_TCGETSID): Set HAVE_TCGETSID. Move AC_LIBOBJ
77606         and gl_PREREQ_TCGETSID invocations from here...
77607         * modules/tcgetsid (configure.ac): ... to here.
77608         (Depends-on): Update conditions.
77610 2011-05-22  Bruno Haible  <bruno@clisp.org>
77612         symlinkat: Move AC_LIBOBJ invocations to module description.
77613         * m4/symlinkat.m4 (gl_FUNC_SYMLINKAT): Move AC_LIBOBJ invocation from
77614         here...
77615         * modules/symlinkat (configure.ac): ... to here.
77617 2011-05-22  Bruno Haible  <bruno@clisp.org>
77619         symlink: Move AC_LIBOBJ invocations to module description.
77620         * m4/symlink.m4 (gl_FUNC_SYMLINK): Move AC_LIBOBJ invocations from
77621         here...
77622         * modules/symlink (configure.ac): ... to here.
77624 2011-05-22  Bruno Haible  <bruno@clisp.org>
77626         strverscmp: Move AC_LIBOBJ invocations to module description.
77627         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP): Call AC_CHECK_FUNCS instead of
77628         AC_REPLACE_FUNCS. Move AC_LIBOBJ and gl_PREREQ_STRVERSCMP invocations
77629         from here...
77630         * modules/strverscmp (configure.ac): ... to here.
77632 2011-05-22  Bruno Haible  <bruno@clisp.org>
77634         strtok_r: Move AC_LIBOBJ invocations to module description.
77635         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Set HAVE_STRTOK_R. Move AC_LIBOBJ
77636         and gl_PREREQ_STRTOK_R invocations from here...
77637         * modules/strtok_r (configure.ac): ... to here.
77638         (Depends-on): Update conditions.
77640 2011-05-22  Bruno Haible  <bruno@clisp.org>
77642         strtoumax: Move AC_LIBOBJ invocations to module description.
77643         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Call AC_CHECK_FUNCS instead of
77644         AC_REPLACE_FUNCS. Move AC_LIBOBJ and gl_PREREQ_STRTOUMAX invocations
77645         from here...
77646         * modules/strtoumax (configure.ac): ... to here.
77648 2011-05-22  Bruno Haible  <bruno@clisp.org>
77650         strtoimax: Move AC_LIBOBJ invocations to module description.
77651         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Call AC_CHECK_FUNCS instead of
77652         AC_REPLACE_FUNCS. Move AC_LIBOBJ and gl_PREREQ_STRTOIMAX invocations
77653         from here...
77654         * modules/strtoimax (configure.ac): ... to here.
77656 2011-05-22  Bruno Haible  <bruno@clisp.org>
77658         strtoull: Move AC_LIBOBJ invocations to module description.
77659         * m4/strtoull.m4 (gl_FUNC_STRTOULL): Call AC_CHECK_FUNCS instead of
77660         AC_REPLACE_FUNCS. Move AC_LIBOBJ and gl_PREREQ_STRTOULL invocations
77661         from here...
77662         * modules/strtoull (configure.ac): ... to here.
77664 2011-05-22  Bruno Haible  <bruno@clisp.org>
77666         strtoll: Move AC_LIBOBJ invocations to module description.
77667         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Call AC_CHECK_FUNCS instead of
77668         AC_REPLACE_FUNCS. Move AC_LIBOBJ and gl_PREREQ_STRTOLL invocations from
77669         here...
77670         * modules/strtoll (configure.ac): ... to here.
77672 2011-05-22  Bruno Haible  <bruno@clisp.org>
77674         strtoul: Move AC_LIBOBJ invocations to module description.
77675         * m4/strtoul.m4 (gl_FUNC_STRTOUL): Call AC_CHECK_FUNCS instead of
77676         AC_REPLACE_FUNCS. Move AC_LIBOBJ invocation from here...
77677         * modules/strtoul (configure.ac): ... to here.
77679 2011-05-22  Bruno Haible  <bruno@clisp.org>
77681         strtol: Move AC_LIBOBJ invocations to module description.
77682         * m4/strtol.m4 (gl_FUNC_STRTOL): Call AC_CHECK_FUNCS instead of
77683         AC_REPLACE_FUNCS. Move AC_LIBOBJ invocation from here...
77684         * modules/strtol (configure.ac): ... to here.
77686 2011-05-22  Bruno Haible  <bruno@clisp.org>
77688         strtod: Move AC_LIBOBJ invocations to module description.
77689         * m4/strtod.m4 (gl_FUNC_STRTOD): Move AC_LIBOBJ and gl_PREREQ_STRTOD
77690         invocations from here...
77691         * modules/strtod (configure.ac): ... to here.
77693 2011-05-22  Bruno Haible  <bruno@clisp.org>
77695         strstr*: Move AC_LIBOBJ invocations to module description.
77696         * m4/strstr.m4 (gl_FUNC_STRSTR_SIMPLE, gl_FUNC_STRSTR): Move AC_LIBOBJ
77697         invocations from here...
77698         * modules/strstr-simple (configure.ac): ... to here.
77699         * modules/strstr (configure.ac): ... and here.
77701 2011-05-22  Bruno Haible  <bruno@clisp.org>
77703         strsignal: Move AC_LIBOBJ invocations to module description.
77704         * m4/strsignal.m4 (gl_FUNC_STRSIGNAL): Set HAVE_STRSIGNAL. Move
77705         AC_LIBOBJ and gl_PREREQ_STRSIGNAL invocations from here...
77706         * modules/strsignal (configure.ac): ... to here.
77707         (Depends-on): Update conditions.
77709 2011-05-22  Bruno Haible  <bruno@clisp.org>
77711         strsep: Move AC_LIBOBJ invocations to module description.
77712         * m4/strsep.m4 (gl_FUNC_STRSEP): Call AC_CHECK_FUNCS instead of
77713         AC_REPLACE_FUNCS. Move AC_LIBOBJ and gl_PREREQ_STRSEP invocations from
77714         here...
77715         * modules/strsep (configure.ac): ... to here.
77717 2011-05-22  Bruno Haible  <bruno@clisp.org>
77719         strptime: Move AC_LIBOBJ invocations to module description.
77720         * m4/strptime.m4 (gl_FUNC_STRPTIME): Move AC_LIBOBJ and
77721         gl_PREREQ_STRPTIME invocations from here...
77722         * modules/strptime (configure.ac): ... to here.
77724 2011-05-22  Bruno Haible  <bruno@clisp.org>
77726         strpbrk: Move AC_LIBOBJ invocations to module description.
77727         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Call AC_CHECK_FUNCS instead of
77728         AC_REPLACE_FUNCS. Move AC_LIBOBJ and gl_PREREQ_STRPBRK invocations from
77729         here...
77730         * modules/strpbrk (configure.ac): ... to here.
77732 2011-05-22  Bruno Haible  <bruno@clisp.org>
77734         strnlen: Move AC_LIBOBJ invocations to module description.
77735         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Move AC_LIBOBJ and gl_PREREQ_STRNLEN
77736         invocations from here...
77737         * modules/strnlen (configure.ac): ... to here.
77739 2011-05-22  Bruno Haible  <bruno@clisp.org>
77741         strndup: Move AC_LIBOBJ invocations to module description.
77742         * m4/strndup.m4 (gl_FUNC_STRNDUP): Set HAVE_STRNDUP. Move AC_LIBOBJ
77743         invocations from here...
77744         * modules/strndup (configure.ac): ... to here.
77745         (Depends-on): Update conditions.
77747 2011-05-22  Bruno Haible  <bruno@clisp.org>
77749         strncat: Move AC_LIBOBJ invocations to module description.
77750         * m4/strncat.m4 (gl_FUNC_STRNCAT): Move AC_LIBOBJ and gl_PREREQ_STRNCAT
77751         invocations from here...
77752         * modules/strncat (configure.ac): ... to here.
77754 2011-05-22  Bruno Haible  <bruno@clisp.org>
77756         strdup, strdup-posix: Move AC_LIBOBJ invocations to module description.
77757         * m4/strdup.m4 (gl_FUNC_STRDUP): Move AC_LIBOBJ and gl_PREREQ_STRDUP
77758         invocations from here...
77759         * modules/strdup (configure.ac): ... to here.
77760         * modules/strdup-posix (configure.ac): ... and here.
77762 2011-05-22  Bruno Haible  <bruno@clisp.org>
77764         strcspn: Move AC_LIBOBJ invocations to module description.
77765         * m4/strcspn.m4 (gl_FUNC_STRCSPN): Call AC_CHECK_FUNCS instead of
77766         AC_REPLACE_FUNCS. Move AC_LIBOBJ and gl_PREREQ_STRCSPN invocations from
77767         here...
77768         * modules/strcspn (configure.ac): ... to here.
77770 2011-05-22  Bruno Haible  <bruno@clisp.org>
77772         strchrnul: Move AC_LIBOBJ invocations to module description.
77773         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Move AC_LIBOBJ and
77774         gl_PREREQ_STRCHRNUL invocations from here...
77775         * modules/strchrnul (configure.ac): ... to here.
77777 2011-05-22  Bruno Haible  <bruno@clisp.org>
77779         strcasestr*: Move AC_LIBOBJ invocations to module description.
77780         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR_SIMPLE, gl_FUNC_STRCASESTR):
77781         Move AC_LIBOBJ and gl_PREREQ_STRCASESTR invocations from here...
77782         * modules/strcasestr-simple (configure.ac): ... to here.
77783         * modules/strcasestr (configure.ac): ... and here.
77785 2011-05-22  Bruno Haible  <bruno@clisp.org>
77787         strcase: Move AC_LIBOBJ invocations to module description.
77788         * m4/strcase.m4 (gl_FUNC_STRNCASECMP): Set HAVE_STRNCASECMP.
77789         (gl_FUNC_STRCASECMP, gl_FUNC_STRNCASECMP): Call AC_CHECK_FUNCS instead
77790         of AC_REPLACE_FUNCS. Move AC_LIBOBJ, gl_PREREQ_STRCASECMP,
77791         gl_PREREQ_STRNCASECMP invocations from here...
77792         * modules/strcase (configure.ac): ... to here.
77794 2011-05-22  Bruno Haible  <bruno@clisp.org>
77796         stpncpy: Move AC_LIBOBJ invocations to module description.
77797         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Move AC_LIBOBJ invocations from
77798         here...
77799         * modules/stpncpy (configure.ac): ... to here.
77801 2011-05-22  Bruno Haible  <bruno@clisp.org>
77803         stpcpy: Move AC_LIBOBJ invocations to module description.
77804         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Call AC_CHECK_FUNCS instead of
77805         AC_REPLACE_FUNCS. Move AC_LIBOBJ and gl_PREREQ_STPCPY invocations from
77806         here...
77807         * modules/stpcpy (configure.ac): ... to here.
77809 2011-05-21  Bruno Haible  <bruno@clisp.org>
77811         stat: Move AC_LIBOBJ invocations to module description.
77812         * m4/stat.m4 (gl_PREREQ_STAT): New macro, extracted from gl_FUNC_STAT.
77813         (gl_FUNC_STAT): Move AC_LIBOBJ and gl_PREREQ_STAT invocations from
77814         here...
77815         * modules/stat (configure.ac): ... to here.
77817 2011-05-21  Bruno Haible  <bruno@clisp.org>
77819         sleep: Move AC_LIBOBJ invocations to module description.
77820         * m4/sleep.m4 (gl_FUNC_SLEEP): Move AC_LIBOBJ invocations from here...
77821         * modules/sleep (configure.ac): ... to here.
77823 2011-05-21  Bruno Haible  <bruno@clisp.org>
77825         signbit: Move AC_LIBOBJ invocations to module description.
77826         * m4/signbit.m4 (gl_SIGNBIT): Move AC_LIBOBJ invocations from here...
77827         * modules/signbit (configure.ac): ... to here.
77829 2011-05-21  Bruno Haible  <bruno@clisp.org>
77831         sigprocmask: Move AC_LIBOBJ invocations to module description.
77832         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Move AC_LIBOBJ and
77833         gl_PREREQ_SIGPROMASK invocations from here...
77834         * modules/sigprocmask (configure.ac): ... to here.
77836 2011-05-21  Bruno Haible  <bruno@clisp.org>
77838         sigaction: Move AC_LIBOBJ invocations to module description.
77839         * m4/sigaction.m4 (gl_SIGACTION): Move AC_LIBOBJ and
77840         gl_PREREQ_SIGACTION invocations from here...
77841         * modules/sigaction (configure.ac): ... to here.
77843 2011-05-21  Bruno Haible  <bruno@clisp.org>
77845         sig2str: Move AC_LIBOBJ invocations to module description.
77846         * m4/sig2str.m4 (gl_FUNC_SIG2STR): Call AC_CHECK_FUNCS instead of
77847         AC_REPLACE_FUNCS. Move AC_LIBOBJ and gl_PREREQ_SIG2STR invocations from
77848         here...
77849         * modules/sig2str (configure.ac): ... to here.
77851 2011-05-21  Bruno Haible  <bruno@clisp.org>
77853         setlocale: Move AC_LIBOBJ invocations to module description.
77854         * m4/setlocale.m4 (gl_FUNC_SETLOCALE): Move AC_LIBOBJ and
77855         gl_PREREQ_SETLOCALE invocations from here...
77856         * modules/setlocale (configure.ac): ... to here.
77858 2011-05-21  Bruno Haible  <bruno@clisp.org>
77860         unsetenv: Move AC_LIBOBJ invocations to module description.
77861         * m4/setenv.m4 (gl_FUNC_UNSETENV): Set HAVE_UNSETENV. Move AC_LIBOBJ
77862         and gl_PREREQ_UNSETENV invocations from here...
77863         * modules/unsetenv (configure.ac): ... to here.
77864         (Depends-on): Update.
77866 2011-05-21  Bruno Haible  <bruno@clisp.org>
77868         setenv: Move AC_LIBOBJ invocations to module description.
77869         * m4/setenv.m4 (gl_FUNC_SETENV): Move AC_LIBOBJ invocations from
77870         here...
77871         * modules/setenv (configure.ac): ... to here.
77873 2011-05-21  Bruno Haible  <bruno@clisp.org>
77875         selinux-h: Move AC_LIBOBJ invocations to module description.
77876         * m4/selinux-selinux-h.m4 (gl_HEADERS_SELINUX_SELINUX_H): Move
77877         AC_LIBOBJ invocation from here...
77878         * modules/selinux-h (configure.ac): ... to here.
77880 2011-05-21  Bruno Haible  <bruno@clisp.org>
77882         select: Respect rules for use of AC_LIBOBJ.
77883         * m4/select.m4 (gl_FUNC_SELECT): Move AC_LIBOBJ invocations from
77884         here...
77885         * modules/select (configure.ac): ... to here.
77887 2011-05-21  Bruno Haible  <bruno@clisp.org>
77889         scandir: Move AC_LIBOBJ invocations to module description.
77890         * m4/scandir.m4 (gl_FUNC_SCANDIR): Move AC_LIBOBJ and gl_PREREQ_SCANDIR
77891         invocations from here...
77892         * modules/scandir (configure.ac): ... to here.
77894 2011-05-21  Bruno Haible  <bruno@clisp.org>
77896         rpmatch: Move AC_LIBOBJ invocations to module description.
77897         * m4/rpmatch.m4 (gl_FUNC_RPMATCH): Call AC_CHECK_FUNCS instead of
77898         AC_REPLACE_FUNCS. Move AC_LIBOBJ and gl_PREREQ_RPMATCH invocations from
77899         here...
77900         * modules/rpmatch (configure.ac): ... to here.
77902 2011-05-21  Bruno Haible  <bruno@clisp.org>
77904         rmdir: Respect rules for use of AC_LIBOBJ.
77905         * m4/rmdir.m4 (gl_FUNC_RMDIR): Move AC_LIBOBJ invocation from here...
77906         * modules/rmdir (configure.ac): ... to here.
77908 2011-05-21  Bruno Haible  <bruno@clisp.org>
77910         renameat: Move AC_LIBOBJ invocations to module description.
77911         * m4/renameat.m4 (gl_FUNC_RENAMEAT): Move AC_LIBOBJ invocations from
77912         here...
77913         * modules/renameat (configure.ac): ... to here.
77915 2011-05-21  Bruno Haible  <bruno@clisp.org>
77917         rename: Respect rules for use of AC_LIBOBJ.
77918         * m4/rename.m4 (gl_FUNC_RENAME): Move AC_LIBOBJ invocations from
77919         here...
77920         * modules/rename (configure.ac): ... to here.
77922 2011-05-21  Bruno Haible  <bruno@clisp.org>
77924         remove: Move AC_LIBOBJ invocations to module description.
77925         * m4/remove.m4 (gl_FUNC_REMOVE): Move AC_LIBOBJ invocations from
77926         here...
77927         * modules/remove (configure.ac): ... to here.
77929 2011-05-21  Bruno Haible  <bruno@clisp.org>
77931         relocatable-lib: Move AC_LIBOBJ invocations to module description.
77932         * m4/relocatable-lib.m4 (gl_RELOCATABLE_LIBRARY_SEPARATE): Remove
77933         macro.
77934         (gl_RELOCATABLE_LIBRARY): Move AC_LIBOBJ invocation from here...
77935         * modules/relocatable-lib (configure.ac): ... to here.
77936         * modules/relocatable-prog-wrapper (configure.ac): Invoke
77937         gl_RELOCATABLE_LIBRARY instead of gl_RELOCATABLE_LIBRARY_SEPARATE.
77939 2011-05-21  Bruno Haible  <bruno@clisp.org>
77941         relocatable-prog: Move AC_LIBOBJ invocations to module description.
77942         * m4/relocatable.m4 (gl_RELOCATABLE): Move AC_LIBOBJ invocation from
77943         here...
77944         * modules/relocatable-prog (configure.ac): ... to here.
77946 2011-05-21  Bruno Haible  <bruno@clisp.org>
77948         regex: Move AC_LIBOBJ invocations to module description.
77949         * m4/regex.m4 (gl_REGEX): Move AC_LIBOBJ and gl_PREREQ_REGEX
77950         invocations from here...
77951         * modules/regex (configure.ac): ... to here.
77953 2011-05-21  Bruno Haible  <bruno@clisp.org>
77955         realloc-*: Move AC_LIBOBJ invocations to module description.
77956         * m4/realloc.m4 (gl_REPLACE_REALLOC): Remove macro.
77957         (gl_FUNC_REALLOC_GNU, gl_FUNC_REALLOC_POSIX): Inline it here. Move
77958         AC_LIBOBJ invocations from here...
77959         * modules/realloc-gnu (configure.ac): ... to here.
77960         * modules/realloc-posix (configure.ac): ... and here.
77962 2011-05-21  Bruno Haible  <bruno@clisp.org>
77964         readutmp: Move AC_LIBOBJ invocations to module description.
77965         * m4/readutmp.m4 (gl_READUTMP): Move AC_LIBOBJ invocation from here...
77966         * modules/readutmp (configure.ac): ... to here.
77968 2011-05-21  Bruno Haible  <bruno@clisp.org>
77970         readlinkat: Move AC_LIBOBJ invocations to module description.
77971         * m4/readlinkat.m4 (gl_FUNC_READLINKAT): Move AC_LIBOBJ invocation from
77972         here...
77973         * modules/readlinkat (configure.ac): ... to here.
77975 2011-05-21  Bruno Haible  <bruno@clisp.org>
77977         readlink: Move AC_LIBOBJ invocations to module description.
77978         * m4/readlink.m4 (gl_FUNC_READLINK): Move AC_LIBOBJ and
77979         gl_PREREQ_READLINK invocations from here...
77980         * modules/readlink (configure.ac): ... to here.
77982 2011-05-21  Bruno Haible  <bruno@clisp.org>
77984         readline: Move AC_LIBOBJ invocations to module description.
77985         * m4/readline.m4 (gl_FUNC_READLINE): Move AC_LIBOBJ and
77986         gl_PREREQ_READLINE invocations from here...
77987         * modules/readline (configure.ac): ... to here.
77989 2011-05-21  Bruno Haible  <bruno@clisp.org>
77991         read: Move AC_LIBOBJ invocations to module description.
77992         * m4/read.m4 (gl_FUNC_READ): Move AC_LIBOBJ invocation from here...
77993         * modules/read (configure.ac): ... to here.
77995 2011-05-21  Bruno Haible  <bruno@clisp.org>
77997         rawmemchr: Move AC_LIBOBJ invocations to module description.
77998         * m4/rawmemchr.m4 (gl_FUNC_RAWMEMCHR): Call AC_CHECK_FUNCS instead of
77999         AC_REPLACE_FUNCS. Move AC_LIBOBJ and gl_PREREQ_RAWMEMCHR invocations
78000         from here...
78001         * modules/rawmemchr (configure.ac): ... to here.
78003 2011-05-21  Bruno Haible  <bruno@clisp.org>
78005         random_r: Move AC_LIBOBJ invocations to module description.
78006         * m4/random_r.m4 (gl_FUNC_RANDOM_R): Move AC_LIBOBJ and
78007         gl_PREREQ_RANDOM_R invocations from here...
78008         * modules/random_r (configure.ac): ... to here.
78010 2011-05-21  Bruno Haible  <bruno@clisp.org>
78012         pwrite: Move AC_LIBOBJ invocations to module description.
78013         * m4/pwrite.m4 (gl_FUNC_PWRITE): Move AC_LIBOBJ invocation from here...
78014         * modules/pwrite (configure.ac): ... to here.
78016 2011-05-21  Bruno Haible  <bruno@clisp.org>
78018         putenv: Move AC_LIBOBJ invocations to module description.
78019         * m4/putenv.m4 (gl_FUNC_PUTENV): Move AC_LIBOBJ invocation from here...
78020         * modules/putenv (configure.ac): ... to here.
78022 2011-05-21  Bruno Haible  <bruno@clisp.org>
78024         login_tty: Move AC_LIBOBJ invocations to module description.
78025         * m4/pty.m4 (gl_FUNC_LOGIN_TTY): Move AC_LIBOBJ invocation from here...
78026         * modules/login_tty (configure.ac): ... to here.
78028 2011-05-21  Bruno Haible  <bruno@clisp.org>
78030         openpty: Move AC_LIBOBJ invocations to module description.
78031         * m4/pty.m4 (gl_FUNC_OPENPTY): Move AC_LIBOBJ invocations from here...
78032         * modules/openpty (configure.ac): ... to here.
78034 2011-05-21  Bruno Haible  <bruno@clisp.org>
78036         forkpty: Move AC_LIBOBJ invocations to module description.
78037         * m4/pty.m4 (gl_FUNC_FORKPTY): Move AC_LIBOBJ invocations from here...
78038         * modules/forkpty (configure.ac): ... to here.
78040 2011-05-21  Bruno Haible  <bruno@clisp.org>
78042         ptsname: Move AC_LIBOBJ invocations to module description.
78043         * m4/ptsname.m4 (gl_FUNC_PTSNAME): Move AC_LIBOBJ and gl_PREREQ_PTSNAME
78044         invocations from here...
78045         * modules/ptsname (configure.ac): ... to here.
78047 2011-05-21  Bruno Haible  <bruno@clisp.org>
78049         pread: Move AC_LIBOBJ invocations to module description.
78050         * m4/pread.m4 (gl_FUNC_PREAD): Move AC_LIBOBJ invocation from here...
78051         * modules/pread (configure.ac): ... to here.
78053 2011-05-21  Bruno Haible  <bruno@clisp.org>
78055         posix_spawn*: Move AC_LIBOBJ invocations to module description.
78056         * m4/posix_spawn.m4 (gl_PREREQ_POSIX_SPAWN_INTERNAL): Renamed from
78057         gl_POSIX_SPAWN_INTERNAL. Move AC_LIBOBJ invocation from here...
78058         * modules/posix_spawn (configure.ac): ... to here.
78059         * modules/posix_spawnp (configure.ac): ... and here.
78061 2011-05-21  Bruno Haible  <bruno@clisp.org>
78063         popen: Move AC_LIBOBJ invocations to module description.
78064         * m4/popen.m4 (gl_FUNC_POPEN): Move AC_LIBOBJ and gl_PREREQ_POPEN
78065         invocations from here...
78066         * modules/popen (configure.ac): ... to here.
78068 2011-05-21  Bruno Haible  <bruno@clisp.org>
78070         poll: Move AC_LIBOBJ invocations to module description.
78071         * m4/poll.m4 (gl_FUNC_POLL): Move AC_LIBOBJ and gl_PREREQ_POLL
78072         invocations from here...
78073         * modules/poll (configure.ac): ... to here.
78075 2011-05-21  Bruno Haible  <bruno@clisp.org>
78077         pipe-posix: Move AC_LIBOBJ invocations to module description.
78078         * m4/pipe.m4 (gl_FUNC_PIPE): Move AC_LIBOBJ invocation from here...
78079         * modules/pipe-posix (configure.ac): ... to here.
78081 2011-05-21  Bruno Haible  <bruno@clisp.org>
78083         openat: Respect rules for use of AC_LIBOBJ.
78084         * m4/openat.m4 (gl_FUNC_OPENAT): Call AC_CHECK_FUNCS instead of
78085         AC_REPLACE_FUNCS. Move AC_LIBOBJ invocations from here...
78086         * modules/openat (configure.ac): ... to here.
78088 2011-05-21  Bruno Haible  <bruno@clisp.org>
78090         obstack-printf*: Move AC_LIBOBJ invocations to module description.
78091         * m4/obstack-printf.m4 (gl_REPLACE_OBSTACK_PRINTF): Move AC_LIBOBJ
78092         invocation from here...
78093         * modules/obstack-printf (configure.ac): ... to here.
78094         * modules/obstack-printf-posix (configure.ac): ... and here.
78096 2011-05-21  Bruno Haible  <bruno@clisp.org>
78098         nl_langinfo: Move AC_LIBOBJ invocations to module description.
78099         * m4/nl_langinfo.m4 (gl_FUNC_NL_LANGINFO): Move AC_LIBOBJ invocations
78100         from here...
78101         * modules/nl_langinfo (configure.ac): ... to here.
78103 2011-05-21  Bruno Haible  <bruno@clisp.org>
78105         nanosleep: Move AC_LIBOBJ invocations to module description.
78106         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Move AC_LIBOBJ and
78107         gl_PREREQ_NANOSLEEP invocations from here...
78108         * modules/nanosleep (configure.ac): ... to here.
78110 2011-05-21  Bruno Haible  <bruno@clisp.org>
78112         mountlist: Move AC_LIBOBJ invocations to module description.
78113         * m4/mountlist.m4 (gl_MOUNTLIST): Move AC_LIBOBJ and
78114         gl_PREREQ_MOUNTLIST_EXTRA invocations from here...
78115         * modules/mountlist (configure.ac): ... to here.
78117 2011-05-21  Bruno Haible  <bruno@clisp.org>
78119         mktime: Respect rules for use of AC_LIBOBJ.
78120         * m4/mktime.m4 (AC_FUNC_MKTIME): Remove macro.
78121         (gl_FUNC_MKTIME): Inline it here. Set gl_cv_func_working_mktime. Move
78122         AC_LIBOBJ and gl_PREREQ_MKTIME invocations from here...
78123         (gl_FUNC_MKTIME_INTERNAL): ... and here...
78124         * modules/mktime (configure.ac): ... to here.
78125         * modules/mktime-internal (configure.ac): ... and here.
78126         * m4/timegm.m4 (gl_FUNC_TIMEGM): Update.
78128 2011-05-21  Bruno Haible  <bruno@clisp.org>
78130         mkstemps: Move AC_LIBOBJ invocations to module description.
78131         * m4/mkstemps.m4 (gl_FUNC_MKSTEMPS): Move AC_LIBOBJ invocation from
78132         here...
78133         * modules/mkstemps (configure.ac): ... to here.
78135 2011-05-21  Bruno Haible  <bruno@clisp.org>
78137         mkstemp: Move AC_LIBOBJ invocations to module description.
78138         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Move AC_LIBOBJ and
78139         gl_PREREQ_MKSTEMP invocations from here...
78140         * modules/mkstemp (configure.ac): ... to here.
78142 2011-05-21  Bruno Haible  <bruno@clisp.org>
78144         mkostemps: Move AC_LIBOBJ invocations to module description.
78145         * m4/mkostemps.m4 (gl_FUNC_MKOSTEMPS): Move AC_LIBOBJ invocation from
78146         here...
78147         * modules/mkostemps (configure.ac): ... to here.
78149 2011-05-21  Bruno Haible  <bruno@clisp.org>
78151         mkostemp: Move AC_LIBOBJ invocations to module description.
78152         * m4/mkostemp.m4 (gl_FUNC_MKOSTEMP): Move AC_LIBOBJ and
78153         gl_PREREQ_MKOSTEMP invocations from here...
78154         * modules/mkostemp (configure.ac): ... to here.
78156 2011-05-21  Bruno Haible  <bruno@clisp.org>
78158         mknod: Move AC_LIBOBJ invocations to module description.
78159         * m4/mknod.m4 (gl_FUNC_MKNOD): Move AC_LIBOBJ invocations from here...
78160         * modules/mknod (configure.ac): ... to here.
78162 2011-05-21  Bruno Haible  <bruno@clisp.org>
78164         mkfifoat: Move AC_LIBOBJ invocations to module description.
78165         * m4/mkfifoat.m4 (gl_FUNC_MKFIFOAT): Move AC_LIBOBJ invocations from
78166         here...
78167         * modules/mkfifoat (configure.ac): ... to here.
78169 2011-05-21  Bruno Haible  <bruno@clisp.org>
78171         mkfifo: Respect rules for use of AC_LIBOBJ.
78172         * m4/mkfifo.m4 (gl_FUNC_MKFIFO): Move AC_LIBOBJ invocations from
78173         here...
78174         * modules/mkfifo (configure.ac): ... to here.
78176 2011-05-21  Bruno Haible  <bruno@clisp.org>
78178         mkdtemp: Move AC_LIBOBJ invocations to module description.
78179         * m4/mkdtemp.m4 (gl_FUNC_MKDTEMP): Move AC_LIBOBJ and gl_PREREQ_MKDTEMP
78180         invocations from here...
78181         * modules/mkdtemp (configure.ac): ... to here.
78183 2011-05-21  Bruno Haible  <bruno@clisp.org>
78185         mkdir: Move AC_LIBOBJ invocations to module description.
78186         * m4/mkdir.m4 (gl_FUNC_MKDIR): Move AC_LIBOBJ invocations from here...
78187         * modules/mkdir (configure.ac): ... to here.
78189 2011-05-21  Bruno Haible  <bruno@clisp.org>
78191         memset: Move AC_LIBOBJ invocations to module description.
78192         * m4/memset.m4 (gl_FUNC_MEMSET): Call AC_CHECK_FUNCS instead of
78193         AC_REPLACE_FUNCS. Move AC_LIBOBJ and gl_PREREQ_MEMSET invocations from
78194         here...
78195         * modules/memset (configure.ac): ... to here.
78197 2011-05-21  Bruno Haible  <bruno@clisp.org>
78199         memrchr: Move AC_LIBOBJ invocations to module description.
78200         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Call AC_CHECK_FUNCS instead of
78201         AC_REPLACE_FUNCS. Move AC_LIBOBJ and gl_PREREQ_MEMRCHR invocations from
78202         here...
78203         * modules/memrchr (configure.ac): ... to here.
78205 2011-05-21  Bruno Haible  <bruno@clisp.org>
78207         mempcpy: Move AC_LIBOBJ invocations to module description.
78208         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Call AC_CHECK_FUNCS instead of
78209         AC_REPLACE_FUNCS. Move AC_LIBOBJ and gl_PREREQ_MEMPCPY invocations from
78210         here...
78211         * modules/mempcpy (configure.ac): ... to here.
78213 2011-05-21  Bruno Haible  <bruno@clisp.org>
78215         memmove: Move AC_LIBOBJ invocations to module description.
78216         * m4/memmove.m4 (gl_FUNC_MEMMOVE): Call AC_CHECK_FUNCS instead of
78217         AC_REPLACE_FUNCS. Move AC_LIBOBJ and gl_PREREQ_MEMMOVE invocations from
78218         here...
78219         * modules/memmove (configure.ac): ... to here.
78221 2011-05-21  Bruno Haible  <bruno@clisp.org>
78223         memmem*: Move AC_LIBOBJ invocations to module description.
78224         * m4/memmem.m4 (gl_FUNC_MEMMEM_SIMPLE): Call AC_CHECK_FUNCS instead of
78225         AC_REPLACE_FUNCS. Set HAVE_MEMMEM. Move AC_LIBOBJ invocations from
78226         here...
78227         (gl_FUNC_MEMMEM): ... and here...
78228         * modules/memmem-simple (configure.ac): ... to here.
78229         * modules/memmem (configure.ac): ... and here.
78231 2011-05-21  Bruno Haible  <bruno@clisp.org>
78233         memcpy: Move AC_LIBOBJ invocations to module description.
78234         * m4/memcpy.m4 (gl_FUNC_MEMCPY): Call AC_CHECK_FUNCS instead of
78235         AC_REPLACE_FUNCS. Move AC_LIBOBJ and gl_PREREQ_MEMCPY invocations from
78236         here...
78237         * modules/memcpy (configure.ac): ... to here.
78239 2011-05-21  Bruno Haible  <bruno@clisp.org>
78241         memcmp: Simplify autoconf macro.
78242         * m4/memcmp.m4 (gl_FUNC_MEMCMP): Merge the cross-compilation code into
78243         the AC_RUN_IFELSE invocation. Set gl_func_memcmp.
78244         * modules/memcmp (Depends-on, configure.ac): Test gl_func_memcmp.
78246 2011-05-21  Bruno Haible  <bruno@clisp.org>
78248         memcmp: Move AC_LIBOBJ invocations to module description.
78249         * m4/memcmp.m4 (AC_FUNC_MEMCMP): Remove macro.
78250         (gl_FUNC_MEMCMP): Inline it here. Set gl_cv_func_memcmp_working. Move
78251         AC_LIBOBJ and gl_PREREQ_MEMCMP invocations from here...
78252         * modules/memcmp (configure.ac): ... to here.
78253         (Depends-on): Update conditions.
78255 2011-05-21  Bruno Haible  <bruno@clisp.org>
78257         memchr: Respect rules for use of AC_LIBOBJ.
78258         * m4/memchr.m4 (gl_FUNC_MEMCHR): Move AC_LIBOBJ and gl_PREREQ_MEMCHR
78259         invocations from here...
78260         * modules/memchr (configure.ac): ... to here.
78262 2011-05-21  Bruno Haible  <bruno@clisp.org>
78264         mbtowc: Move AC_LIBOBJ invocations to module description.
78265         * m4/mbtowc.m4 (gl_FUNC_MBTOWC): Move AC_LIBOBJ and gl_PREREQ_MBTOWC
78266         invocations from here...
78267         * modules/mbtowc (configure.ac): ... to here.
78269 2011-05-21  Bruno Haible  <bruno@clisp.org>
78271         mbsrtowcs: Move AC_LIBOBJ invocations to module description.
78272         * m4/mbsrtowcs.m4 (gl_FUNC_MBSRTOWCS): Move AC_LIBOBJ and
78273         gl_PREREQ_MBSRTOWCS invocations from here...
78274         * modules/mbsrtowcs (configure.ac): ... to here.
78276 2011-05-21  Bruno Haible  <bruno@clisp.org>
78278         mbsnrtowcs: Move AC_LIBOBJ invocations to module description.
78279         * m4/mbsnrtowcs.m4 (gl_FUNC_MBSNRTOWCS): Move AC_LIBOBJ and
78280         gl_PREREQ_MBSNRTOWCS invocations from here...
78281         * modules/mbsnrtowcs (configure.ac): ... to here.
78283 2011-05-21  Bruno Haible  <bruno@clisp.org>
78285         mbsinit: Move AC_LIBOBJ invocations to module description.
78286         * m4/mbsinit.m4 (gl_FUNC_MBSINIT): Move AC_LIBOBJ and gl_PREREQ_MBSINIT
78287         invocations from here...
78288         * modules/mbsinit (configure.ac): ... to here.
78290 2011-05-21  Bruno Haible  <bruno@clisp.org>
78292         mbrlen: Move AC_LIBOBJ invocations to module description.
78293         * m4/mbrlen.m4 (gl_FUNC_MBRLEN): Move AC_LIBOBJ and gl_PREREQ_MBRLEN
78294         invocations from here...
78295         * modules/mbrlen (configure.ac): ... to here.
78297 2011-05-21  Bruno Haible  <bruno@clisp.org>
78299         mbrtowc: Respect rules for use of AC_LIBOBJ.
78300         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): Move AC_LIBOBJ and gl_PREREQ_MBRTOWC
78301         invocations from here...
78302         * modules/mbrtowc (configure.ac): ... to here.
78304 2011-05-21  Bruno Haible  <bruno@clisp.org>
78306         malloc-*: Move AC_LIBOBJ invocations to module description.
78307         * m4/malloc.m4 (gl_REPLACE_MALLOC): Remove macro.
78308         (gl_FUNC_MALLOC_GNU, gl_FUNC_MALLOC_POSIX): Inline it here. Move
78309         AC_LIBOBJ invocations from here...
78310         * modules/malloc-gnu (configure.ac): ... to here.
78311         * modules/malloc-posix (configure.ac): ... and here.
78313 2011-05-21  Bruno Haible  <bruno@clisp.org>
78315         lstat, openat: Respect rules for use of AC_LIBOBJ.
78316         * m4/lstat.m4 (gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Renamed from
78317         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK. Set variable
78318         gl_cv_func_lstat_dereferences_slashed_symlink. Don't invoke AC_LIBOBJ.
78319         (gl_PREREQ_LSTAT): New macro, extracted from gl_FUNC_LSTAT.
78320         (gl_FUNC_LSTAT): Update. Remove gl_PREREQ_LSTAT code.
78321         * modules/lstat (configure.ac): Invoke AC_LIBOBJ and gl_PREREQ_LSTAT
78322         here.
78323         * m4/openat.m4 (gl_FUNC_OPENAT): Update.
78325 2011-05-21  Bruno Haible  <bruno@clisp.org>
78327         lseek: Move AC_LIBOBJ invocations to module description.
78328         * m4/lseek.m4 (gl_REPLACE_LSEEK): Remove macro.
78329         (gl_FUNC_LSEEK): Inline it here. Move AC_LIBOBJ invocation from here...
78330         * modules/lseek (configure.ac): ... to here.
78332 2011-05-21  Bruno Haible  <bruno@clisp.org>
78334         linkat: Move AC_LIBOBJ invocations to module description.
78335         * m4/linkat.m4 (gl_FUNC_LINKAT): Move AC_LIBOBJ invocations from
78336         here...
78337         * modules/linkat (configure.ac): ... to here.
78339 2011-05-21  Bruno Haible  <bruno@clisp.org>
78341         link: Respect rules for use of AC_LIBOBJ.
78342         * m4/link.m4 (gl_FUNC_LINK): Move AC_LIBOBJ invocations from here...
78343         * modules/link (configure.ac): ... to here.
78345 2011-05-21  Bruno Haible  <bruno@clisp.org>
78347         lchown: Move AC_LIBOBJ invocations to module description.
78348         * m4/lchown.m4 (gl_FUNC_EUIDACCESS): Call AC_CHECK_FUNCS instead of
78349         AC_REPLACE_FUNCS. Move AC_LIBOBJ invocations from here...
78350         * modules/lchown (configure.ac): ... to here.
78352 2011-05-21  Bruno Haible  <bruno@clisp.org>
78354         iswctype: Move AC_LIBOBJ invocations to module description.
78355         * m4/iswctype.m4 (gl_FUNC_ISWCTYPE): Move AC_LIBOBJ invocation from
78356         here...
78357         * modules/iswctype (configure.ac): ... to here.
78359 2011-05-21  Bruno Haible  <bruno@clisp.org>
78361         iswblank: Move AC_LIBOBJ invocations to module description.
78362         * m4/iswblank.m4 (gl_FUNC_ISWBLANK): Move AC_LIBOBJ invocation from
78363         here...
78364         * modules/iswblank (configure.ac): ... to here.
78366 2011-05-21  Bruno Haible  <bruno@clisp.org>
78368         atanl: Move AC_LIBOBJ invocations to module description.
78369         * m4/atanl.m4 (gl_FUNC_ATANL): Move AC_LIBOBJ invocation from here...
78370         * modules/atanl (configure.ac): ... to here.
78372 2011-05-21  Bruno Haible  <bruno@clisp.org>
78374         acosl: Move AC_LIBOBJ invocations to module description.
78375         * m4/acosl.m4 (gl_FUNC_ACOSL): Move AC_LIBOBJ invocation from here...
78376         * modules/acosl (configure.ac): ... to here.
78378 2011-05-21  Bruno Haible  <bruno@clisp.org>
78380         asinl: Respect rules for use of AC_LIBOBJ.
78381         * m4/asinl.m4 (gl_FUNC_ASINL): Move AC_LIBOBJ invocation from here...
78382         * modules/asinl (configure.ac): ... to here.
78384 2011-05-21  Bruno Haible  <bruno@clisp.org>
78386         tanl: Move AC_LIBOBJ invocations to module description.
78387         * m4/tanl.m4 (gl_FUNC_TANL): Move AC_LIBOBJ invocations from here...
78388         * modules/tanl (configure.ac): ... to here.
78390 2011-05-21  Bruno Haible  <bruno@clisp.org>
78392         cosl: Move AC_LIBOBJ invocations to module description.
78393         * m4/cosl.m4 (gl_FUNC_COSL): Move AC_LIBOBJ invocations from here...
78394         * modules/cosl (configure.ac): ... to here.
78396 2011-05-21  Bruno Haible  <bruno@clisp.org>
78398         sinl: Move AC_LIBOBJ invocations to module description.
78399         * m4/sinl.m4 (gl_FUNC_SINL): Move AC_LIBOBJ invocations from here...
78400         * modules/sinl (configure.ac): ... to here.
78402 2011-05-21  Bruno Haible  <bruno@clisp.org>
78404         logl: Move AC_LIBOBJ invocations to module description.
78405         * m4/logl.m4 (gl_FUNC_LOGL): Move AC_LIBOBJ invocation from here...
78406         * modules/logl (configure.ac): ... to here.
78408 2011-05-21  Bruno Haible  <bruno@clisp.org>
78410         expl: Move AC_LIBOBJ invocations to module description.
78411         * m4/expl.m4 (gl_FUNC_EXPL): Move AC_LIBOBJ invocation from here...
78412         * modules/expl (configure.ac): ... to here.
78414 2011-05-21  Bruno Haible  <bruno@clisp.org>
78416         roundl: Move AC_LIBOBJ invocations to module description.
78417         * m4/roundl.m4 (gl_FUNC_ROUNDL): Move AC_LIBOBJ invocation from here...
78418         * modules/roundl (configure.ac): ... to here.
78420 2011-05-21  Bruno Haible  <bruno@clisp.org>
78422         round: Move AC_LIBOBJ invocations to module description.
78423         * m4/round.m4 (gl_FUNC_ROUND): Move AC_LIBOBJ invocation from here...
78424         * modules/round (configure.ac): ... to here.
78426 2011-05-21  Bruno Haible  <bruno@clisp.org>
78428         roundf: Move AC_LIBOBJ invocations to module description.
78429         * m4/roundf.m4 (gl_FUNC_ROUNDF): Move AC_LIBOBJ invocation from here...
78430         * modules/roundf (configure.ac): ... to here.
78432 2011-05-21  Bruno Haible  <bruno@clisp.org>
78434         truncl: Move AC_LIBOBJ invocations to module description.
78435         * m4/truncl.m4 (gl_FUNC_TRUNCL): Move AC_LIBOBJ invocation from here...
78436         * modules/truncl (configure.ac): ... to here.
78438 2011-05-21  Bruno Haible  <bruno@clisp.org>
78440         trunc: Move AC_LIBOBJ invocations to module description.
78441         * m4/trunc.m4 (gl_FUNC_TRUNC): Move AC_LIBOBJ invocation from here...
78442         * modules/trunc (configure.ac): ... to here.
78444 2011-05-21  Bruno Haible  <bruno@clisp.org>
78446         truncf: Move AC_LIBOBJ invocations to module description.
78447         * m4/truncf.m4 (gl_FUNC_TRUNCF): Move AC_LIBOBJ invocation from here...
78448         * modules/truncf (configure.ac): ... to here.
78450 2011-05-21  Bruno Haible  <bruno@clisp.org>
78452         ceill: Move AC_LIBOBJ invocations to module description.
78453         * m4/ceill.m4 (gl_FUNC_CEILL): Move AC_LIBOBJ invocation from here...
78454         * modules/ceill (configure.ac): ... to here.
78456 2011-05-21  Bruno Haible  <bruno@clisp.org>
78458         ceil: Move AC_LIBOBJ invocations to module description.
78459         * m4/ceil.m4 (gl_FUNC_CEIL): Move AC_LIBOBJ invocation from here...
78460         * modules/ceil (configure.ac): ... to here.
78462 2011-05-21  Bruno Haible  <bruno@clisp.org>
78464         ceilf: Move AC_LIBOBJ invocations to module description.
78465         * m4/ceilf.m4 (gl_FUNC_CEILF): Move AC_LIBOBJ invocation from here...
78466         * modules/ceilf (configure.ac): ... to here.
78468 2011-05-21  Bruno Haible  <bruno@clisp.org>
78470         floorl: Respect rules for use of AC_LIBOBJ.
78471         * m4/floorl.m4 (gl_FUNC_FLOORL): Move AC_LIBOBJ invocation from here...
78472         * modules/floorl (configure.ac): ... to here.
78474 2011-05-21  Bruno Haible  <bruno@clisp.org>
78476         floor: Respect rules for use of AC_LIBOBJ.
78477         * m4/floor.m4 (gl_FUNC_FLOOR): Move AC_LIBOBJ invocation from here...
78478         * modules/floor (configure.ac): ... to here.
78480 2011-05-21  Bruno Haible  <bruno@clisp.org>
78482         floorf: Move AC_LIBOBJ invocations to module description.
78483         * m4/floorf.m4 (gl_FUNC_FLOORF): Move AC_LIBOBJ invocation from here...
78484         * modules/floorf (configure.ac): ... to here.
78486 2011-05-20  Bruno Haible  <bruno@clisp.org>
78488         sqrtl: Respect rules for use of AC_LIBOBJ.
78489         * m4/sqrtl.m4 (gl_FUNC_SQRTL): Move AC_LIBOBJ invocation from here...
78490         * modules/sqrtl (configure.ac): ... to here.
78492 2011-05-20  Bruno Haible  <bruno@clisp.org>
78494         ldexpl: Respect rules for use of AC_LIBOBJ.
78495         * m4/ldexpl.m4 (gl_FUNC_LDEXPL): Move AC_LIBOBJ invocation from here...
78496         * modules/ldexpl (configure.ac): ... to here.
78498 2011-05-20  Bruno Haible  <bruno@clisp.org>
78500         frexpl*: Respect rules for use of AC_LIBOBJ.
78501         * m4/frexpl.m4 (gl_FUNC_FREXPL, gl_FUNC_FREXPL_NO_LIBM): Move AC_LIBOBJ
78502         invocation from here...
78503         * modules/frexpl (configure.ac): ... to here.
78504         * modules/frexpl-nolibm (configure.ac): ... and here.
78506 2011-05-20  Bruno Haible  <bruno@clisp.org>
78508         frexp, frexp-nolibm: Move AC_LIBOBJ invocations to module description.
78509         * m4/frexp.m4 (gl_FUNC_FREXP, gl_FUNC_FREXP_NO_LIBM): Move AC_LIBOBJ
78510         invocation from here...
78511         * modules/frexp (configure.ac): ... to here.
78512         * modules/frexp-nolibm (configure.ac): ... and here.
78514 2011-05-20  Bruno Haible  <bruno@clisp.org>
78516         isnan: Respect rules for use of AC_LIBOBJ.
78517         * m4/isnan.m4 (gl_ISNAN): Don't do the AC_LIBOBJ and gl_PREREQ_ISNAN*
78518         invocations here.
78519         * modules/isnanf (configure.ac): Require gl_ISNAN if it exists. Test
78520         REPLACE_ISNAN.
78521         * modules/isnand (configure.ac): Likewise.
78522         * modules/isnanl (configure.ac): Likewise.
78524 2011-05-20  Bruno Haible  <bruno@clisp.org>
78526         isnanl*: Respect rules for use of AC_LIBOBJ.
78527         * m4/isnanl.m4 (gl_FUNC_ISNANL, gl_FUNC_ISNANL_NO_LIBM): Move AC_LIBOBJ
78528         invocation from here...
78529         * modules/isnanl (configure.ac): ... to here.
78530         * modules/isnanl-nolibm (configure.ac): ... and here.
78532 2011-05-20  Bruno Haible  <bruno@clisp.org>
78534         isnand*: Move AC_LIBOBJ invocations to module description.
78535         * m4/isnand.m4 (gl_FUNC_ISNAND, gl_FUNC_ISNAND_NO_LIBM): Move AC_LIBOBJ
78536         invocation from here...
78537         * modules/isnand (configure.ac): ... to here.
78538         * modules/isnand-nolibm (configure.ac): ... and here.
78540 2011-05-20  Bruno Haible  <bruno@clisp.org>
78542         isnanf*: Move AC_LIBOBJ invocations to module description.
78543         * m4/isnanf.m4 (gl_FUNC_ISNANF, gl_FUNC_ISNANF_NO_LIBM): Move AC_LIBOBJ
78544         invocation from here...
78545         * modules/isnanf (configure.ac): ... to here.
78546         * modules/isnanf-nolibm (configure.ac): ... and here.
78548 2011-05-20  Bruno Haible  <bruno@clisp.org>
78550         isnan*: Separate the AC_LIBOBJ invocations.
78551         * m4/isnanf.m4 (gl_PREREQ_ISNANF): Renamed from gl_BUILD_ISNANF. Remove
78552         AC_LIBOBJ invocation.
78553         (gl_FUNC_ISNANF, gl_FUNC_ISNANF_NO_LIBM): Update. Invoke AC_LIBOBJ
78554         here.
78555         * m4/isnand.m4 (gl_PREREQ_ISNAND): Renamed from gl_BUILD_ISNAND. Remove
78556         AC_LIBOBJ invocation.
78557         (gl_FUNC_ISNAND, gl_FUNC_ISNAND_NO_LIBM): Update. Invoke AC_LIBOBJ
78558         here.
78559         * m4/isnanl.m4 (gl_PREREQ_ISNANL): Renamed from gl_BUILD_ISNANL. Remove
78560         AC_LIBOBJ invocation.
78561         (gl_FUNC_ISNANL, gl_FUNC_ISNANL_NO_LIBM): Update. Invoke AC_LIBOBJ
78562         here.
78563         * m4/isnan.m4 (gl_ISNAN): Update. Invoke AC_LIBOBJ here.
78565 2011-05-08  Bruno Haible  <bruno@clisp.org>
78567         isinf: Move AC_LIBOBJ invocations to module description.
78568         * m4/isinf.m4 (gl_ISINF): Move AC_LIBOBJ invocation from here...
78569         * modules/isinf (configure.ac): ... to here.
78571 2011-05-08  Bruno Haible  <bruno@clisp.org>
78573         isfinite: Move AC_LIBOBJ invocations to module description.
78574         * m4/isfinite.m4 (gl_ISFINITE): Move AC_LIBOBJ invocation from here...
78575         * modules/isfinite (configure.ac): ... to here.
78577 2011-05-08  Bruno Haible  <bruno@clisp.org>
78579         isblank: Move AC_LIBOBJ invocations to module description.
78580         * m4/isblank.m4 (gl_FUNC_ISBLANK): Move AC_LIBOBJ invocation from
78581         here...
78582         * modules/isblank (configure.ac): ... to here.
78584 2011-05-08  Bruno Haible  <bruno@clisp.org>
78586         isapipe: Move AC_LIBOBJ invocations to module description.
78587         * m4/isapipe.m4 (gl_ISAPIPE): Set HAVE_ISAPIPE. Move AC_LIBOBJ and
78588         gl_PREREQ_ISAPIPE invocations from here...
78589         * modules/isapipe (configure.ac): ... to here.
78590         (Depends-on): Update condition.
78592 2011-05-08  Bruno Haible  <bruno@clisp.org>
78594         ioctl: Move AC_LIBOBJ invocations to module description.
78595         * m4/ioctl.m4 (gl_FUNC_IOCTL): Set HAVE_IOCTL. Move AC_LIBOBJ
78596         invocations from here...
78597         * modules/ioctl (configure.ac): ... to here.
78598         (Depends-on): Update condition.
78600 2011-05-08  Bruno Haible  <bruno@clisp.org>
78602         imaxdiv: Move AC_LIBOBJ invocations to module description.
78603         * m4/imaxdiv.m4 (gl_FUNC_IMAXDIV): Move AC_LIBOBJ and gl_PREREQ_IMAXDIV
78604         invocations from here...
78605         * modules/imaxdiv (configure.ac): ... to here.
78607 2011-05-08  Bruno Haible  <bruno@clisp.org>
78609         imaxabs: Move AC_LIBOBJ invocations to module description.
78610         * m4/imaxabs.m4 (gl_FUNC_IMAXABS): Move AC_LIBOBJ and gl_PREREQ_IMAXABS
78611         invocations from here...
78612         * modules/imaxabs (configure.ac): ... to here.
78614 2011-05-08  Bruno Haible  <bruno@clisp.org>
78616         getaddrinfo: Move AC_LIBOBJ invocations to module description.
78617         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Set HAVE_GETADDRINFO, Move
78618         AC_LIBOBJ invocations from here...
78619         * modules/getaddrinfo (configure.ac): ... to here.
78620         (Depends-on): Add conditions.
78622 2011-05-08  Bruno Haible  <bruno@clisp.org>
78624         inet_pton. getaddrinfo: Respect rules for use of AC_LIBOBJ.
78625         * m4/inet_pton.m4 (gl_FUNC_INET_PTON): Set HAVE_INET_PTON. Call
78626         AC_CHECK_FUNCS instead of AC_REPLACE_FUNCS. Don't invoke
78627         gl_PREREQ_INET_PTON. Move tests for declaration of inet_pton here...
78628         (gl_PREREQ_INET_PTON): ... from here.
78629         * modules/inet_pton (configure.ac): Invoke AC_LIBOBJ and
78630         gl_PREREQ_INET_PTON here.
78631         (Depends-on): Update condition.
78633 2011-05-08  Bruno Haible  <bruno@clisp.org>
78635         inet_ntop. getaddrinfo: Respect rules for use of AC_LIBOBJ.
78636         * m4/inet_ntop.m4 (gl_FUNC_INET_NTOP): Set HAVE_INET_NTOP. Call
78637         AC_CHECK_FUNCS instead of AC_REPLACE_FUNCS. Don't invoke
78638         gl_PREREQ_INET_NTOP. Move tests for declaration of inet_ntop here...
78639         (gl_PREREQ_INET_NTOP): ... from here.
78640         * modules/inet_ntop (configure.ac): Invoke AC_LIBOBJ and
78641         gl_PREREQ_INET_NTOP here.
78642         (Depends-on): Update condition.
78644 2011-05-08  Bruno Haible  <bruno@clisp.org>
78646         iconv_open: Move AC_LIBOBJ invocations to module description.
78647         * m4/iconv_open.m4 (gl_FUNC_ICONV_OPEN, gl_REPLACE_ICONV_OPEN): Move
78648         AC_LIBOBJ invocations from here...
78649         * modules/iconv_open (configure.ac): ... to here.
78651 2011-05-08  Bruno Haible  <bruno@clisp.org>
78653         iconv_open, iconv_open-utf: Respect rules for use of AC_LIBOBJ.
78654         If module 'iconv_open' is among the main modules and module
78655         'iconv_open-utf' is among the tests dependencies, then
78656         REPLACE_ICONV_UTF will be defined to 1, hence iconv_open() in lib may
78657         return the special iconv_t values. Therefore iconv() and iconv_close()
78658         must support these special iconv_t values, already in lib, not only in
78659         tests.
78660         * m4/iconv_open-utf.m4: New file, extracted from m4/iconv_open.m4.
78661         * m4/iconv_open.m4 (gl_FUNC_ICONV_OPEN): Invoke
78662         gl_FUNC_ICONV_OPEN_UTF_SUPPORT if present.
78663         (gl_FUNC_ICONV_OPEN_UTF): Remove macro.
78664         * modules/iconv_open (Files): Add lib/iconv.c, lib/iconv_close.c.
78665         (Depends-on): Add the dependencies of iconv_open-utf.
78666         * modules/iconv_open-utf (Files): Add m4/iconv_open-utf.m4. Remove
78667         m4/iconv_open.m4, lib/iconv.c, lib/iconv_close.c.
78668         (Depends-on): Remove modules needed by lib/iconv.c, lib/iconv_close.c.
78670 2011-05-08  Bruno Haible  <bruno@clisp.org>
78672         group-member: Move AC_LIBOBJ invocations to module description.
78673         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER): Move AC_LIBOBJ and
78674         gl_PREREQ_GROUP_MEMBER invocations from here...
78675         * modules/group-member (configure.ac): ... to here.
78677 2011-05-08  Bruno Haible  <bruno@clisp.org>
78679         grantpt: Move AC_LIBOBJ invocations to module description.
78680         * m4/grantpt.m4 (gl_FUNC_GRANTPT): Move AC_LIBOBJ and gl_PREREQ_GRANTPT
78681         invocations from here...
78682         * modules/grantpt (configure.ac): ... to here.
78684 2011-05-08  Bruno Haible  <bruno@clisp.org>
78686         glob: Move AC_LIBOBJ invocations to module description.
78687         * m4/glob.m4 (gl_GLOB): Move AC_LIBOBJ and gl_PREREQ_GLOB invocations
78688         from here...
78689         * modules/glob (configure.ac): ... to here.
78691 2011-05-08  Bruno Haible  <bruno@clisp.org>
78693         getusershell: Move AC_LIBOBJ invocations to module description.
78694         * m4/getusershell.m4 (gl_FUNC_GETUSERSHELL): Set HAVE_GETUSERSHELL.
78695         Move AC_LIBOBJ invocation from here...
78696         * modules/getusershell (configure.ac): ... to here.
78697         (Depends-on): Update condition.
78699 2011-05-08  Bruno Haible  <bruno@clisp.org>
78701         gettimeofday: Move AC_LIBOBJ invocations to module description.
78702         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY,
78703         gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Move AC_LIBOBJ and
78704         gl_PREREQ_GETTIMEOFDAY invocations from here...
78705         * modules/gettimeofday (configure.ac): ... to here.
78707 2011-05-08  Bruno Haible  <bruno@clisp.org>
78709         gettimeofday, tzset: Respect rules for use of AC_LIBOBJ.
78710         * modules/tzset (configure.ac): Don't invoke gl_FUNC_TZSET_CLOBBER,
78711         just gl_FUNC_TZSET.
78712         * m4/tzset.m4 (gl_FUNC_TZSET): New macro.
78713         (gl_FUNC_TZSET_CLOBBER): Remove actions.
78714         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): Invoke
78715         gl_FUNC_TZSET_CLOBBER and its actions here, if present.
78717 2011-05-08  Bruno Haible  <bruno@clisp.org>
78719         getsubopt: Move AC_LIBOBJ invocations to module description.
78720         * m4/getsubopt.m4 (gl_FUNC_GETSUBOPT): Move AC_LIBOBJ and
78721         gl_PREREQ_GETSUBOPT invocations from here...
78722         * modules/getsubopt (configure.ac): ... to here.
78724 2011-05-08  Bruno Haible  <bruno@clisp.org>
78726         getpass-gnu: Move AC_LIBOBJ invocations to module description.
78727         * m4/getpass.m4 (gl_FUNC_GETPASS_GNU): Set REPLACE_GETPASS. Move
78728         AC_LIBOBJ and gl_PREREQ_GETPASS invocations from here...
78729         * modules/getpass-gnu (configure.ac): ... to here.
78731 2011-05-08  Bruno Haible  <bruno@clisp.org>
78733         getpass: Move AC_LIBOBJ invocations to module description.
78734         * m4/getpass.m4 (gl_FUNC_GETPASS): Set HAVE_GETPASS. Move AC_LIBOBJ and
78735         gl_PREREQ_GETPASS invocations from here...
78736         * modules/getpass (configure.ac): ... to here.
78738 2011-05-08  Bruno Haible  <bruno@clisp.org>
78740         getpagesize: Move AC_LIBOBJ invocations to module description.
78741         * m4/getpagesize.m4 (gl_FUNC_GETPAGESIZE): Move AC_LIBOBJ invocation
78742         from here...
78743         * modules/getpagesize (configure.ac): ... to here.
78745 2011-05-08  Bruno Haible  <bruno@clisp.org>
78747         getopt: Move AC_LIBOBJ invocations to module description.
78748         * m4/getopt.m4 (gl_REPLACE_GETOPT): Remove macro.
78749         (gl_FUNC_GETOPT): Inline it here. Move AC_LIBOBJ and gl_PREREQ_GETOPT
78750         invocations from here...
78751         * modules/getopt-gnu (configure.ac): ... to here.
78752         * modules/getopt-posix (configure.ac): ... and here.
78753         (Depends-on): Update condition.
78755 2011-05-08  Bruno Haible  <bruno@clisp.org>
78757         getopt, argp: Respect rules for use of AC_LIBOBJ.
78758         * m4/argp.m4 (gl_ARGP): Don't invoke gl_REPLACE_GETOPT.
78759         (gl_REPLACE_GETOPT_ALWAYS): New macro.
78760         * m4/getopt.m4 (gl_FUNC_GETOPT_POSIX): Test whether
78761         gl_REPLACE_GETOPT_ALWAYS is defined. Set REPLACE_GETOPT.
78763 2011-05-08  Bruno Haible  <bruno@clisp.org>
78765         getlogin_r: Move AC_LIBOBJ invocations to module description.
78766         * m4/getlogin_r.m4 (gl_FUNC_GETLOGIN_R): Move AC_LIBOBJ and
78767         gl_PREREQ_GETLOGIN_R invocations from here...
78768         * modules/getlogin_r (configure.ac): ... to here.
78770 2011-05-08  Bruno Haible  <bruno@clisp.org>
78772         getlogin: Move AC_LIBOBJ invocations to module description.
78773         * m4/getlogin.m4 (gl_FUNC_GETLOGIN): Move AC_LIBOBJ invocation from
78774         here...
78775         * modules/getlogin (configure.ac): ... to here.
78777 2011-05-08  Bruno Haible  <bruno@clisp.org>
78779         getloadavg: Move AC_LIBOBJ invocations to module description.
78780         * m4/getloadavg.m4 (gl_FUNC_GETDELIM): Set HAVE_GETLOADAVG. Move
78781         AC_LIBOBJ and gl_PREREQ_GETLOADAVG invocations from here...
78782         * modules/getloadavg (configure.ac): ... to here.
78784 2011-05-08  Bruno Haible  <bruno@clisp.org>
78786         gethrxtime: Move AC_LIBOBJ invocations to module description.
78787         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Move code that determines
78788         LIB_GETHRXTIME from here...
78789         (gl_GETHRXTIME): ... to here. Move AC_LIBOBJ and gl_PREREQ_GETHRXTIME
78790         invocations from here...
78791         * modules/gethrxtime (configure.ac): ... to here.
78793 2011-05-08  Bruno Haible  <bruno@clisp.org>
78795         gethostname: Move AC_LIBOBJ invocations to module description.
78796         * m4/gethostname.m4 (gl_FUNC_GETHOSTNAME): Move AC_LIBOBJ and
78797         gl_PREREQ_GETHOSTNAME invocations from here...
78798         * modules/gethostname (configure.ac): ... to here.
78800 2011-05-08  Bruno Haible  <bruno@clisp.org>
78802         getgroups: Move AC_LIBOBJ invocations to module description.
78803         * m4/getgroups.m4 (gl_FUNC_GETGROUPS): Move AC_LIBOBJ invocations from
78804         here...
78805         * modules/getgroups (configure.ac): ... to here.
78807 2011-05-08  Bruno Haible  <bruno@clisp.org>
78809         getdtablesize: Move AC_LIBOBJ invocations to module description.
78810         * m4/getdtablesize.m4 (gl_FUNC_GETDTABLESIZE): Move AC_LIBOBJ
78811         invocation from here...
78812         * modules/getdtablesize (configure.ac): ... to here.
78814 2011-05-08  Bruno Haible  <bruno@clisp.org>
78816         getdomainname: Move AC_LIBOBJ invocations to module description.
78817         * m4/getdomainname.m4 (gl_FUNC_GETDOMAINNAME): Move AC_LIBOBJ and
78818         gl_PREREQ_GETDOMAINNAME invocations from here...
78819         * modules/getdomainname (configure.ac): ... to here.
78821 2011-05-08  Bruno Haible  <bruno@clisp.org>
78823         getline: Move AC_LIBOBJ invocations to module description.
78824         * m4/getline.m4 (gl_FUNC_GETLINE): Move AC_LIBOBJ and gl_PREREQ_GETLINE
78825         invocations from here...
78826         * modules/getline (configure.ac): ... to here.
78828 2011-05-08  Bruno Haible  <bruno@clisp.org>
78830         getline: Simplify.
78831         * m4/getline.m4 (gl_PREREQ_GETLINE): Don't invoke gl_FUNC_GETDELIM.
78832         It's already handled through the module dependency.
78834 2011-05-08  Bruno Haible  <bruno@clisp.org>
78836         getdelim: Move AC_LIBOBJ invocations to module description.
78837         * m4/getdelim.m4 (gl_FUNC_GETDELIM): Set HAVE_GETDELIM. Move AC_LIBOBJ
78838         and gl_PREREQ_GETDELIM invocations from here...
78839         * modules/getdelim (configure.ac): ... to here.
78840         (Depends-on): Fix condition.
78842 2011-05-08  Bruno Haible  <bruno@clisp.org>
78844         getcwd: Move AC_LIBOBJ invocations to module description.
78845         * m4/getcwd.m4 (gl_FUNC_GETCWD): Move AC_LIBOBJ and gl_PREREQ_GETCWD
78846         invocations from here...
78847         * modules/getcwd (configure.ac): ... to here.
78849 2011-05-08  Bruno Haible  <bruno@clisp.org>
78851         getcwd-lgpl: Move AC_LIBOBJ invocations to module description.
78852         * m4/getcwd.m4 (gl_FUNC_GETCWD_LGPL): Move AC_LIBOBJ invocation from
78853         here...
78854         * modules/getcwd-lgpl (configure.ac): ... to here.
78856 2011-05-07  Bruno Haible  <bruno@clisp.org>
78858         crypto/gc: Move AC_LIBOBJ invocations to module description.
78859         * m4/gc.m4 (gl_GC): Move AC_LIBOBJ invocations from here...
78860         * modules/crypto/gc (configure.ac): ... to here.
78862 2011-05-07  Bruno Haible  <bruno@clisp.org>
78864         fwriting: Move AC_LIBOBJ invocations to module description.
78865         * m4/fwriting.m4 (gl_FUNC_FWRITINT): Move AC_LIBOBJ invocation from
78866         here...
78867         * modules/fwriting (configure.ac): ... to here.
78869 2011-05-07  Bruno Haible  <bruno@clisp.org>
78871         fwritable: Move AC_LIBOBJ invocations to module description.
78872         * m4/fwritable.m4 (gl_FUNC_FWRITABLE): Move AC_LIBOBJ invocation from
78873         here...
78874         * modules/fwritable (configure.ac): ... to here.
78876 2011-05-07  Bruno Haible  <bruno@clisp.org>
78878         futimens: Move AC_LIBOBJ invocations to module description.
78879         * m4/futimens.m4 (gl_FUNC_FUTIMENS): Move AC_LIBOBJ invocations from
78880         here...
78881         * modules/futimens (configure.ac): ... to here.
78883 2011-05-07  Bruno Haible  <bruno@clisp.org>
78885         ftruncate: Move AC_LIBOBJ invocations to module description.
78886         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Move AC_LIBOBJ and
78887         gl_PREREQ_FTRUNCATE invocations from here...
78888         * modules/ftruncate (configure.ac): ... to here.
78890 2011-05-07  Bruno Haible  <bruno@clisp.org>
78892         fsync: Move AC_LIBOBJ invocations to module description.
78893         * m4/fsync.m4 (gl_FUNC_FSYNC): Move AC_LIBOBJ and gl_PREREQ_FSYNC
78894         invocations from here...
78895         * modules/fsync (configure.ac): ... to here.
78897 2011-05-07  Bruno Haible  <bruno@clisp.org>
78899         fsusage: Move AC_LIBOBJ invocations to module description.
78900         * m4/fsusage.m4 (gl_FUNC_FREOPEN): Move AC_LIBOBJ and
78901         gl_PREREQ_FSUSAGE_EXTRA invocations from here...
78902         * modules/fsusage (configure.ac): ... to here.
78904 2011-05-07  Bruno Haible  <bruno@clisp.org>
78906         freopen: Move AC_LIBOBJ invocations to module description.
78907         * m4/freopen.m4 (gl_FUNC_FREOPEN): Move AC_LIBOBJ and gl_PREREQ_FREOPEN
78908         invocations from here...
78909         * modules/freopen (configure.ac): ... to here.
78911 2011-05-07  Bruno Haible  <bruno@clisp.org>
78913         free: Move AC_LIBOBJ invocations to module description.
78914         * m4/free.m4 (gl_FUNC_FREE): Move AC_LIBOBJ and missing gl_PREREQ_FREE
78915         invocations from here...
78916         * modules/free (configure.ac): ... to here.
78918 2011-05-07  Bruno Haible  <bruno@clisp.org>
78920         freadable: Move AC_LIBOBJ invocations to module description.
78921         * m4/freadable.m4 (gl_FUNC_FREADABLE): Move AC_LIBOBJ invocation from
78922         here...
78923         * modules/freadable (configure.ac): ... to here.
78925 2011-05-07  Bruno Haible  <bruno@clisp.org>
78927         fpurge: Move AC_LIBOBJ invocations to module description.
78928         * m4/fpurge.m4 (gl_FUNC_FPURGE): Set HAVE_FPURGE. Move AC_LIBOBJ
78929         invocations from here...
78930         * modules/fpurge (configure.ac): ... to here.
78932 2011-05-07  Bruno Haible  <bruno@clisp.org>
78934         fpending: Move AC_LIBOBJ invocations to module description.
78935         * m4/fpending.m4 (gl_PREREQ_FPENDING): New macro, extracted from
78936         gl_FUNC_FPENDING.
78937         (gl_FUNC_FPENDING): Move AC_LIBOBJ and gl_PREREQ_FPENDING
78938         invocations from here...
78939         * modules/fpending (configure.ac): ... to here.
78941 2011-05-07  Bruno Haible  <bruno@clisp.org>
78943         fopen: Move AC_LIBOBJ invocations to module description.
78944         * m4/fopen.m4 (gl_FUNC_FOPEN): Move AC_LIBOBJ and gl_PREREQ_FOPEN
78945         invocations from here...
78946         * modules/fopen (configure.ac): ... to here.
78948 2011-05-07  Bruno Haible  <bruno@clisp.org>
78950         fnmatch, fnmatch-gnu: Move AC_LIBOBJ invocations to module description.
78951         * m4/fnmatch.m4 (gl_PREREQ_FNMATCH): New macro, extracted from
78952         gl_FUNC_FNMATCH_POSIX.
78953         (gl_FUNC_FNMATCH_POSIX): Move AC_LIBOBJ and gl_PREREQ_FNMATCH
78954         invocations from here...
78955         * modules/fnmatch (configure.ac): ... to here.
78956         * modules/fnmatch-gnu (configure.ac): ... and here.
78958 2011-05-07  Bruno Haible  <bruno@clisp.org>
78960         flock: Move AC_LIBOBJ invocations to module description.
78961         * m4/flock.m4 (gl_FUNC_FLOCK): Move AC_LIBOBJ and gl_PREREQ_FLOCK
78962         invocations from here...
78963         * modules/flock (configure.ac): ... to here.
78965 2011-05-07  Bruno Haible  <bruno@clisp.org>
78967         fileblocks: Move AC_LIBOBJ invocations to module description.
78968         * m4/fileblocks.m4 (gl_FILEBLOCKS): Move AC_LIBOBJ and
78969         gl_PREREQ_FILEBLOCKS invocations from here...
78970         * modules/fileblocks (configure.ac): ... to here.
78972 2011-05-06  Bruno Haible  <bruno@clisp.org>
78974         fflush: Move AC_LIBOBJ invocations to module description.
78975         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Remove macro.
78976         (gl_FUNC_FFLUSH): Inline it here. Move AC_LIBOBJ and gl_PREREQ_FFLUSH
78977         invocations from here...
78978         * modules/fflush (configure.ac): ... to here.
78980 2011-05-06  Bruno Haible  <bruno@clisp.org>
78982         fdopendir: Move AC_LIBOBJ invocations to module description.
78983         * m4/fdopendir.m4 (gl_FUNC_FDOPENDIR): Move AC_LIBOBJ invocations from
78984         here...
78985         * modules/fdopendir (configure.ac): ... to here.
78986         (Depends-on): Improve conditions.
78988 2011-05-06  Bruno Haible  <bruno@clisp.org>
78990         _Exit: Move AC_LIBOBJ invocations to module description.
78991         * m4/_Exit.m4 (gl_FUNC__EXIT): Move AC_LIBOBJ and gl_PREREQ__EXIT
78992         invocations from here...
78993         * modules/_Exit (configure.ac): ... to here.
78995 2011-05-21  Bruno Haible  <bruno@clisp.org>
78997         euidaccess: Respect rules for use of AC_LIBOBJ.
78998         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): Call AC_CHECK_FUNCS instead of
78999         AC_REPLACE_FUNCS. Move AC_LIBOBJ and gl_PREREQ_EUIDACCESS invocations
79000         from here...
79001         * modules/euidaccess (configure.ac): ... to here.
79003 2011-05-06  Bruno Haible  <bruno@clisp.org>
79005         error: Move AC_LIBOBJ invocations to module description.
79006         * m4/error.m4 (gl_ERROR): Inline AC_FUNC_ERROR_AT_LINE. Remove
79007         AC_LIBSOURCES invocation. Move AC_LIBOBJ and gl_PREREQ_ERROR
79008         invocations from here...
79009         * modules/error (configure.ac): ... to here.
79011 2011-05-06  Bruno Haible  <bruno@clisp.org>
79013         duplocale: Move AC_LIBOBJ invocations to module description.
79014         * m4/duplocale.m4 (gl_FUNC_DUPLOCALE): Move AC_LIBOBJ and
79015         gl_PREREQ_DUPLOCALE invocations from here...
79016         * modules/duplocale (configure.ac): ... to here.
79018 2011-05-05  Bruno Haible  <bruno@clisp.org>
79020         dirfd: Move AC_LIBOBJ invocations to module description.
79021         * m4/dirfd.m4 (gl_PREREQ_DIRFD): New macro, extracted from
79022         gl_FUNC_DIRFD.
79023         (gl_FUNC_DIRFD): Move AC_LIBOBJ and gl_PREREQ_DIRFD invocations from
79024         here...
79025         * modules/dirfd (configure.ac): ... to here.
79026         (Depends-on): Fix condition.
79028 2011-05-05  Bruno Haible  <bruno@clisp.org>
79030         chown: Respect rules for use of AC_LIBOBJ.
79031         * m4/chown.m4 (gl_FUNC_CHOWN): Move AC_LIBOBJ invocations from here...
79032         * modules/chown (configure.ac): ... to here.
79034 2011-05-05  Bruno Haible  <bruno@clisp.org>
79036         chdir-long: Move AC_LIBOBJ invocations to module description.
79037         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Move AC_LIBOBJ and
79038         gl_PREREQ_CHDIR_LONG invocations from here...
79039         * modules/chdir-long (configure.ac): ... to here.
79041 2011-05-05  Bruno Haible  <bruno@clisp.org>
79043         canonicalize-lgpl: Move AC_LIBOBJ invocations to module description.
79044         * m4/canonicalize.m4 (gl_CANONICALIZE_LGPL): Move AC_LIBOBJ invocation
79045         from here...
79046         * modules/canonicalize-lgpl (configure.ac): ... to here.
79048 2011-05-05  Bruno Haible  <bruno@clisp.org>
79050         calloc-posix, calloc-gnu: Move AC_LIBOBJs to module description.
79051         * m4/calloc.m4 (gl_REPLACE_CALLOC): Remove macro.
79052         (gl_FUNC_CALLOC_GNU, gl_FUNC_CALLOC_POSIX): Instead, just set
79053         REPLACE_CALLOC.
79054         * modules/calloc-posix (configure.ac): Invoke AC_LIBOBJ here.
79055         * modules/calloc-gnu (configure.ac): Likewise.
79057 2011-05-05  Bruno Haible  <bruno@clisp.org>
79059         btowc: Move AC_LIBOBJ invocations to module description.
79060         * m4/btowc.m4 (gl_FUNC_BTOWC): Move AC_LIBOBJ and gl_PREREQ_BTOWC
79061         invocations from here...
79062         * modules/btowc (configure.ac): ... to here.
79064 2011-05-21  Bruno Haible  <bruno@clisp.org>
79066         atexit: Move AC_LIBOBJ invocations to module description.
79067         * m4/atexit.m4 (gl_FUNC_ATEXIT): Call AC_CHECK_FUNCS instead of
79068         AC_REPLACE_FUNCS. Move AC_LIBOBJ and gl_PREREQ_ATEXIT invocations from
79069         here...
79070         * modules/atexit (configure.ac): ... to here.
79072 2011-05-05  Bruno Haible  <bruno@clisp.org>
79074         atoll: Move AC_LIBOBJ invocations to module description.
79075         * m4/atoll.m4 (gl_FUNC_ATOLL): Move AC_LIBOBJ and gl_PREREQ_ATOLL
79076         invocations from here...
79077         * modules/atoll (configure.ac): ... to here.
79079 2011-05-05  Bruno Haible  <bruno@clisp.org>
79081         argz: Move AC_LIBOBJ invocations to module description.
79082         * m4/argz.m4 (gl_FUNC_ARGZ): Move AC_LIBOBJ invocation from here...
79083         * modules/argz (configure.ac): ... to here.
79085 2011-05-05  Bruno Haible  <bruno@clisp.org>
79087         alphasort: Move AC_LIBOBJ invocations to module description.
79088         * m4/alphasort.m4 (gl_FUNC_ALPHASORT): Move AC_LIBOBJ and
79089         gl_PREREQ_ALPHASORT invocations from here...
79090         * modules/alphasort (configure.ac): ... to here.
79092 2011-06-15  Paul Eggert  <eggert@cs.ucla.edu>
79094         verify: new macro verify_expr; verify_true deprecated
79095         * NEWS: Mention this.
79096         * doc/verify.texi (Compile-time Assertions): Document this.
79097         * lib/verify.h (verify_true): Deprecate.
79098         (verify_expr): New macro.
79099         * tests/test-verify.c (function): Test verify_expr.
79101 2011-06-14  Jim Meyering  <meyering@redhat.com>
79103         init.sh: give more portable redirection-related advice in a comment
79104         * tests/init.sh (stderr_fileno_): Update the advice in comments.
79105         See http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/22488
79106         for lots of discussion.  Stefano Lattarini suggested the solution
79107         of putting "9>&2" after the command.  Reported by Bruno Haible.
79109 2011-06-13  Bruno Haible  <bruno@clisp.org>
79111         locale-zh: Reject zh_CN.GB18030 locale on Solaris 8.
79112         * m4/locale-zh.m4 (gt_LOCALE_ZH_CN): On Solaris 8, set LOCALE_ZH_CN to
79113         'none'.
79115 2011-06-13  Paul Eggert  <eggert@cs.ucla.edu>
79117         ftoastr: use strtof only if HAVE_STRTOF
79118         This is needed on HP-UX 11.11 with GCC 4.2.4; see Bruno Haible's report
79119         <http://lists.gnu.org/r/bug-gnulib/2011-06/msg00154.html>.
79120         * lib/ftoastr.c (STRTOF) [LENGTH == 1]: Use strtof only if HAVE_STRTOF.
79121         * modules/ftoastr (configure.ac): Check for strtof.
79123 2011-06-13  Bruno Haible  <bruno@clisp.org>
79125         gnulib-tool: Addendum to 2011-06-08 commit.
79126         * gnulib-tool (func_emit_lib_Makefile_am): If options --makefile-name
79127         and --witness-c-macro have been given, augment AM_CPPFLAGS.
79129 2011-06-13  Bruno Haible  <bruno@clisp.org>
79131         fseeko: Provide a non-inline replacement of fseek().
79132         * lib/stdio.in.h (fseek): Don't provide if module 'fseek' is not used.
79133         * modules/fseeko (Depends-on): Add fseek.
79134         * modules/fseek (License): Change to LGPLv2+.
79136 2011-06-13  Bruno Haible  <bruno@clisp.org>
79138         ftello: Provide a non-inline replacement of ftell().
79139         * lib/stdio.in.h (ftell): Don't provide if module 'ftell' is not used.
79140         * m4/ftell.m4 (gl_FUNC_FTELL): Replace ftell also if the system does
79141         not have ftello() (such as on mingw).
79142         * modules/ftello (Depends-on): Add ftell.
79143         * modules/ftell (License): Change to LGPLv2+.
79145 2011-05-07  Bruno Haible  <bruno@clisp.org>
79147         ftell: Move AC_LIBOBJ invocations to module description.
79148         * m4/ftell.m4 (gl_FUNC_FTELL): Move AC_LIBOBJ invocation from here...
79149         * modules/ftell (configure.ac): ... to here.
79151 2011-05-07  Bruno Haible  <bruno@clisp.org>
79153         ftello: Respect rules for use of AC_LIBOBJ.
79154         * m4/ftello.m4 (gl_REPLACE_FTELLO): Remove macro.
79155         (gl_FUNC_FTELLO): Inline it here. Move AC_LIBOBJ invocation from
79156         here...
79157         * modules/ftello (configure.ac): ... to here.
79159 2011-05-07  Bruno Haible  <bruno@clisp.org>
79161         fseeko: Simplify.
79162         * m4/fseeko.m4 (gl_HAVE_FSEEKO): Remove macro.
79163         (gl_FUNC_FSEEKO): Inline it here.
79165 2011-05-07  Bruno Haible  <bruno@clisp.org>
79167         fseek: Move AC_LIBOBJ invocations to module description.
79168         * m4/fseek.m4 (gl_REPLACE_FSEEK): Remove macro.
79169         (gl_FUNC_FSEEK): Inline it here. Move AC_LIBOBJ invocation from here...
79170         * modules/fseek (configure.ac): ... to here.
79172 2011-05-07  Bruno Haible  <bruno@clisp.org>
79174         fseek: Respect rules for use of AC_LIBOBJ.
79175         * m4/fseeko.m4 (gl_FUNC_FSEEKO): Move gl_REPLACE_FSEEK invocation from
79176         here...
79177         * m4/fseek.m4 (gl_FUNC_FSEEK): ... to here.
79179 2011-05-07  Bruno Haible  <bruno@clisp.org>
79181         fseeko: Respect rules for use of AC_LIBOBJ.
79182         * m4/fseeko.m4 (gl_REPLACE_FSEEKO): Remove macro.
79183         (gl_FUNC_FSEEKO): Inline it here. Move AC_LIBOBJ invocation from
79184         here...
79185         * modules/fseeko (configure.ac): ... to here.
79187 2011-06-13  Bruno Haible  <bruno@clisp.org>
79189         gnulib-tool: Allow comments in the 'Depends-on' section.
79190         * doc/gnulib.texi (Module description): Mention comment syntax in the
79191         Depends-on section.
79192         * gnulib-tool (func_get_dependencies): Filter out comment lines.
79194 2011-06-13  Bruno Haible  <bruno@clisp.org>
79196         file-set.h: guard __attibute__ use, now that it's not always defined
79197         * lib/file-set.h (record_file): Use __attribute__ only with compiler
79198         versions that support it.  This fixes a coreutils build failure with
79199         the vendor cc on HP-UX 11.31.
79201 2011-06-12  Bruno Haible  <bruno@clisp.org>
79203         acl: Add support for HP-UX >= 11.11 JFS ACLs.
79204         * doc/acl-resources.txt: Add info about the ACL APIs on HP-UX.
79205         * m4/acl.m4 (gl_FUNC_ACL): Also test for HP-UX 11.11 API.
79206         * lib/acl-internal.h [HP-UX 11.11]: Include <aclv.h>.
79207         (acl, aclsort): New declarations.
79208         (aclv_nontrivial): New declaration.
79209         * lib/file-has-acl.c (aclv_nontrivial) [HP-UX 11.11]: New function.
79210         (file_has_acl): Read also the second kind of HP-UX ACLs.
79211         * lib/set-mode-acl.c (qset_acl) [HP-UX 11.11]: Try to set the second
79212         kind of HP-UX ACLs if the first kind fails.
79213         * lib/copy-acl.c (qcopy_acl) [HP-UX 11.11]: Read and set also the
79214         second kind of HP-UX ACLs.
79215         * tests/test-sameacls.c [HP-UX 11.11]: Include <aclv.h>.
79216         (main) [HP-UX 11.11]: Test also whether the second kind of HP-UX ACLs
79217         agree.
79218         * tests/test-file-has-acl.sh (acl_flavor) [HP-UX 11.11]: Set to
79219         hpuxjfs.
79220         Handle hpuxjfs.
79221         * tests/test-set-mode-acl.sh (acl_flavor) [HP-UX 11.11]: Set to
79222         hpuxjfs.
79223         Handle hpuxjfs.
79224         * tests/test-copy-acl.sh (acl_flavor) [HP-UX 11.11]: Set to hpuxjfs.
79225         (func_test_same_acls): Use both lsacl and getacl.
79226         Handle hpuxjfs.
79227         * tests/test-copy-file.sh (acl_flavor) [HP-UX 11.11]: Set to hpuxjfs.
79228         (func_test_same_acls): Use both lsacl and getacl.
79229         Handle hpuxjfs.
79231 2011-06-12  Bruno Haible  <bruno@clisp.org>
79233         acl: Complete the 2010-08-10 fix.
79234         * lib/file-has-acl.c (file_has_acl) [HP-UX]: Also test against ENOTSUP.
79235         * lib/set-mode-acl.c (qset_acl) [HP-UX]: Likewise.
79236         * lib/copy-acl.c (qcopy_acl) [HP-UX]: Test for the errno values
79237         explicitly.
79238         * tests/test-sameacls.c (main) [HP-UX]: Also test against ENOTSUP.
79239         Reported in <http://debbugs.gnu.org/db/60/6053.html>.
79241 2011-06-12  Bruno Haible  <bruno@clisp.org>
79243         spawn-pipe tests: Comments.
79244         * tests/test-spawn-pipe-child.c (main): Update comment.
79245         Reported by James Youngman <jay@gnu.org>.
79247 2011-06-11  James Youngman  <jay@gnu.org>
79249         New module 'stat-size'.
79250         * modules/stat-size: New module.  Provides macros for accessing
79251         file size information in instances of struct stat.  Depends on the
79252         fileblocks module because it calls st_blocks.
79253         * lib/stat-size.h: New file, adapted from coreutils' system.h.
79254         * doc/gnulib.texi: Include stat-size.texi.
79255         * doc/stat-size.texi: Documentation for this module.
79256         * m4/stat-size.m4: New file; defines gl_STAT_SIZE.
79257         * m4/fileblocks.m4: Mention that stat-size depends on the call to
79258         AC_STRUCT_ST_BLOCKS.
79260 2011-06-09  Bruno Haible  <bruno@clisp.org>
79262         thread: Support pthreads-win32.
79263         * lib/glthread/thread.h (gl_thread_self): Define differently on
79264         pthreads-win32.
79265         (gl_null_thread): New declaration.
79266         (gl_thread_self_pointer): New macro.
79267         * lib/glthread/thread.c (gl_null_thread): New constant.
79268         * tests/test-lock.c: Use gl_thread_self_pointer instead of
79269         gl_thread_self.
79270         * tests/test-tls.c: Likewise.
79271         Suggested by Paul Eggert. Reported by Eric Blake.
79273 2011-06-09  Bruno Haible  <bruno@clisp.org>
79275         thread: Fix confusion between NULL and 0.
79276         * lib/glthread/thread.h (gl_thread_self): Use NULL and 0 appropriately.
79277         Reported by Paul Eggert.
79279 2011-06-09  Bruno Haible  <bruno@clisp.org>
79281         spawn-pipe tests: Avoid test failure on HP-UX 11.
79282         * tests/test-spawn-pipe-child.c (main) [HP-UX]: Don't assert that fd 2
79283         is closed.
79285 2011-06-09  Bruno Haible  <bruno@clisp.org>
79287         acl tests: Fix compilation error on HP-UX 11.
79288         * tests/test-sameacls.c: Include <sys/acl.h> also on HP-UX.
79290 2011-06-09  Bruno Haible  <bruno@clisp.org>
79292         rmdir: Avoid test failure on HP-UX 10.20.
79293         * tests/test-rmdir.h (test_rmdir_func): Accept ENOTEMPTY error, like
79294         EEXIST.
79296 2011-06-08  Eric Blake  <eblake@redhat.com>
79298         perror: fix test on mingw
79299         * modules/perror-tests (Depends-on): Add dup2.
79301         strerror_r-posix: fix on MacOS
79302         * m4/strerror.m4 (gl_FUNC_STRERROR): Flush out MacOS bug.
79303         * m4/strerror_r.m4 (gl_FUNC_STRERROR_R_WORKS): Likewise, and fix
79304         logic bug.
79305         * lib/strerror_r.c (strerror_r): Fix the bug.
79306         * lib/strerror.c (strerror): Likewise.
79307         * doc/posix-functions/strerror_r.texi (strerror_r): Document the
79308         problem.
79309         * doc/posix-functions/strerror.texi (strerror): Likewise.
79310         * doc/posix-functions/perror.texi (perror): Likewise.
79311         * tests/test-strerror.c (main): Enhance test.
79312         * tests/test-strerror_r.c (main): Likewise.
79314 2011-06-08  Bruno Haible  <bruno@clisp.org>
79316         gnulib-tool: Better isolation between different gnulib-tool invocations.
79317         * gnulib-tool: New option --witness-c-macro.
79318         (witness_c_macro): New variable.
79319         (func_emit_lib_Makefile_am): If --witness-c-macro was specified, let
79320         AM_CPPFLAGS define it as a C macro.
79321         (func_emit_tests_Makefile_am): Likewise.
79322         (func_import): Store witness_c_macro setting in gnulib-cache.m4 and
79323         read it from there.
79324         * m4/gnulib-common.m4 (gl_MODULE_INDICATOR_CONDITION): Define through
79325         m4_define, not AC_DEFUN.
79326         (gl_MODULE_INDICATOR_SET_VARIABLE_AUX,
79327         gl_MODULE_INDICATOR_SET_VARIABLE_AUX_OR): New macros.
79328         (gl_MODULE_INDICATOR_SET_VARIABLE): Use them.
79329         * modules/arpa_inet (Makefile.am): Use sed expression s/.../.../, not
79330         s|...|...|, to substitute the values of the GNULIB_* module indicator
79331         variables.
79332         * modules/dirent (Makefile.am): Likewise.
79333         * modules/fcntl-h (Makefile.am): Likewise.
79334         * modules/iconv-h (Makefile.am): Likewise.
79335         * modules/langinfo (Makefile.am): Likewise.
79336         * modules/locale (Makefile.am): Likewise.
79337         * modules/math (Makefile.am): Likewise.
79338         * modules/netdb (Makefile.am): Likewise.
79339         * modules/poll-h (Makefile.am): Likewise.
79340         * modules/pty (Makefile.am): Likewise.
79341         * modules/search (Makefile.am): Likewise.
79342         * modules/signal (Makefile.am): Likewise.
79343         * modules/spawn (Makefile.am): Likewise.
79344         * modules/stdio (Makefile.am): Likewise.
79345         * modules/stdlib (Makefile.am): Likewise.
79346         * modules/string (Makefile.am): Likewise.
79347         * modules/sys_ioctl (Makefile.am): Likewise.
79348         * modules/sys_select (Makefile.am): Likewise.
79349         * modules/sys_socket (Makefile.am): Likewise.
79350         * modules/sys_stat (Makefile.am): Likewise.
79351         * modules/sys_times (Makefile.am): Likewise.
79352         * modules/sys_utsname (Makefile.am): Likewise.
79353         * modules/sys_wait (Makefile.am): Likewise.
79354         * modules/termios (Makefile.am): Likewise.
79355         * modules/time (Makefile.am): Likewise.
79356         * modules/unistd (Makefile.am): Likewise.
79357         * modules/wchar (Makefile.am): Likewise.
79359 2011-06-08  Eric Blake  <eblake@redhat.com>
79361         strerror: simplify replacement
79362         * m4/strerror.m4 (gl_PREREQ_STRERROR): Delete.
79363         * modules/strerror (configure.ac): No prereqs needed here...
79364         * modules/strerror-override (configure.ac): ...but this needs it.
79365         (Files): Add file for needed prereq macro.
79367 2011-06-08  Bruno Haible  <bruno@clisp.org>
79369         strerror_r-posix: Tweaks.
79370         * m4/strerror.m4 (gl_FUNC_STRERROR): Omit the code that tests
79371         gl_cv_func_strerror_r_works if gl_FUNC_STRERROR_R_WORKS is not present.
79372         * m4/strerror_r.m4 (gl_FUNC_STRERROR_R_WORKS): Fix AC_CACHE_CHECK
79373         message. Move gl_HEADER_STRING_H_DEFAULTS invocation from here...
79374         (gl_FUNC_STRERROR_R): ... to here.
79375         (gl_PREREQ_STRERROR_R): Test for __xpg_strerror_r.
79377 2011-06-07  Eric Blake  <eblake@redhat.com>
79379         perror: document fixed bugs
79380         * doc/posix-functions/perror.texi (perror): Document recent
79381         patches.
79383 2011-06-07  Paul Eggert  <eggert@cs.ucla.edu>
79385         stat-time: get_stat_birthtime failure is better-defined
79386         * lib/stat-time.h (get_stat_birthtime): If the time is not available,
79387         return a timestamp whose tv_sec and tv_nsec values are both -1.
79388         Previously, the spec said only that the tv_nsec value was negative.
79389         This upward-compatible change simplifies GNU tar a bit.
79391 2011-06-07  Eric Blake  <eblake@redhat.com>
79393         strerror_r-posix: work around cygwin 1.7.9
79394         * m4/strerror_r.m4 (gl_FUNC_STRERROR_R): Split...
79395         (gl_FUNC_STRERROR_R_WORKS): ...into new macro, to detect Cygwin
79396         bug without replacing strerror_r.
79397         * m4/strerror.m4 (gl_FUNC_STRERROR): Replace strerror if
79398         strerror_r is buggy, but without requiring strerror_r compilation.
79399         * doc/posix-functions/strerror_r.texi (strerror_r): Fix docs.
79401         test-perror: relax test to ignore cygwin bug
79402         * tests/test-perror2.c (main): Relax test on requiring detection
79403         of stream errors, and use unbuffered stream.
79404         * doc/posix-functions/dprintf.texi (dprintf): Document bug.
79405         * doc/posix-functions/fprintf.texi (fprintf): Likewise.
79406         * doc/posix-functions/fputc.texi (fputc): Likewise.
79407         * doc/posix-functions/fputs.texi (fputs): Likewise.
79408         * doc/posix-functions/fputws.texi (fputws): Likewise.
79409         * doc/posix-functions/fwprintf.texi (fwprintf): Likewise.
79410         * doc/posix-functions/fwrite.texi (fwrite): Likewise.
79411         * doc/posix-functions/getopt.texi (getopt): Likewise.
79412         * doc/posix-functions/perror.texi (perror): Likewise.
79413         * doc/posix-functions/printf.texi (printf): Likewise.
79414         * doc/posix-functions/psiginfo.texi (psiginfo): Likewise.
79415         * doc/posix-functions/psignal.texi (psignal): Likewise.
79416         * doc/posix-functions/putc.texi (putc): Likewise.
79417         * doc/posix-functions/putc_unlocked.texi (putc_unlocked):
79418         Likewise.
79419         * doc/posix-functions/putchar.texi (putchar): Likewise.
79420         * doc/posix-functions/putchar_unlocked.texi (putchar_unlocked):
79421         Likewise.
79422         * doc/posix-functions/puts.texi (puts): Likewise.
79423         * doc/posix-functions/putwc.texi (putwc): Likewise.
79424         * doc/posix-functions/putwchar.texi (putwchar): Likewise.
79425         * doc/posix-functions/vdprintf.texi (vdprintf): Likewise.
79426         * doc/posix-functions/vfprintf.texi (vfprintf): Likewise.
79427         * doc/posix-functions/vfwprintf.texi (vfwprintf): Likewise.
79428         * doc/posix-functions/vprintf.texi (vprintf): Likewise.
79429         * doc/posix-functions/vwprintf.texi (vwprintf): Likewise.
79430         * doc/posix-functions/wordexp.texi (wordexp): Likewise.
79431         * doc/posix-functions/wprintf.texi (wprintf): Likewise.
79433 2011-05-22  Bruno Haible  <bruno@clisp.org>
79435         strerror: Move AC_LIBOBJ invocations to module description.
79436         * m4/strerror.m4 (gl_FUNC_STRERROR): Move AC_LIBOBJ and
79437         gl_PREREQ_STRERROR invocations from here...
79438         * modules/strerror (configure.ac): ... to here.
79440 2011-05-21  Bruno Haible  <bruno@clisp.org>
79442         perror: Use common idiom.
79443         * modules/perror (configure.ac): Reorder statements.
79445 2011-06-07  Stefano Lattarini  <stefano.lattarini@gmail.com>
79447         tests: fix usage message in 'mktempd_'
79448         * tests/init.sh (mktempd_): In the usage message, use literal
79449         'mktempd_', not '$ME' (which is even undefined), as the name of
79450         the subroutine.
79452 2011-06-07  Stefano Lattarini  <stefano.lattarini@gmail.com>
79454         tests init: new function 'fatal_', for hard errors
79455         Before this patch, the only way offered by tests/init.sh to
79456         properly signal a hard error was the `framework_failure_'
79457         function.  But the error message issued by that function,
79458         as its name would suggest, refers to a set-up failure in the
79459         testsuite, while hard errors can obviously also be due to
79460         other reasons.  The best way to fix this inconsistency is to
79461         introduce a new function with a more general error message.
79462         * tests/init.sh (fatal_): New function.
79464 2011-06-06  Eric Blake  <eblake@redhat.com>
79466         canonicalize-lgpl: use common idiom
79467         * m4/canonicalize.m4 (gl_FUNC_REALPATH_WORKS): Prefer older rm -rf
79468         over newer POSIX -Rf.
79469         Reported by Bruno Haible.
79471         canonicalize-lgpl: work around AIX realpath bug
79472         * m4/canonicalize.m4 (gl_FUNC_REALPATH_WORKS): Expose AIX bug.
79473         * doc/posix-functions/realpath.texi (realpath): Document it.
79474         Reported by Bruno Haible.
79476         strerror: work around FreeBSD bug
79477         * lib/strerror.c (strerror): Special case 0.
79478         Reported by Bruno Haible.
79480         strerror-override: avoid bloating errno module
79481         * modules/errno (Files, configure.ac): Move replacement strings...
79482         * modules/strerror-override: ...to new module.
79483         * modules/strerror (Depends-on): Add strerror-override.
79484         * modules/strerror_r-posix (Depends-on): Likewise.
79485         * MODULES.html.sh: Document new module.
79486         Reported by Bruno Haible.
79488 2011-06-06  Bruno Haible  <bruno@clisp.org>
79490         spawn-pipe tests: Rename program.
79491         * tests/test-spawn-pipe-main.c: Renamed from tests/test-spawn-pipe.c.
79492         * tests/test-spawn-pipe-child.c: Update comment.
79493         * tests/test-spawn-pipe.sh: Update.
79494         * modules/spawn-pipe-tests (Files, Makefile.am): Update.
79496         spawn-pipe tests: Link the child program only against libc.
79497         * tests/test-spawn-pipe-child.c: New file, extracted from
79498         tests/test-spawn-pipe.c.
79499         (main): Expect only one argument.
79500         (is_open): New function, copied from tests/test-pipe.c.
79501         * tests/test-spawn-pipe.c: Don't include <errno.h>.
79502         (child_main): Remove function.
79503         (test_pipe): Pass only one argument to the child program.
79504         (main): Remove child process code. Expect the child program's name as
79505         first argument.
79506         * tests/test-spawn-pipe.sh: Pass the child program's name as first
79507         argument.
79508         * modules/spawn-pipe-tests (Files): Add tests/test-spawn-pipe-child.c.
79509         (Makefile.am): Add test-spawn-pipe-child to check_PROGRAMS. Link
79510         test-spawn-pipe-child against no libraries.
79512 2011-06-06  Bruno Haible  <bruno@clisp.org>
79514         careadlinkat: Avoid mismatch between ssize_t and int.
79515         * lib/careadlinkat.h (careadlinkatcwd): Declare as a function always.
79516         * lib/careadlinkat.c (careadlinkatcwd): Define always.
79518 2011-06-06  Jim Meyering  <meyering@redhat.com>
79520         gnulib-common.m4: add _GL_ATTRIBUTE_CONST and _GL_ATTRIBUTE_PURE
79521         * m4/gnulib-common.m4 (gl_COMMON): Emit definitions of
79522         _GL_ATTRIBUTE_CONST and _GL_ATTRIBUTE_PURE.
79524 2011-06-05  Bruno Haible  <bruno@clisp.org>
79526         ansi-c++-opt: Interoperability with libtool.
79527         * m4/ansi-c++.m4 (gl_PROG_ANSI_CXX): When a C++ compiler is not found,
79528         set the variable to "no", not to ":".
79529         * NEWS: Mention the change.
79531 2011-06-05  Bruno Haible  <bruno@clisp.org>
79533         acl: Fix test failure on AIX 7.
79534         * tests/test-sameacls.c (main) [AIX]: Fix aclx_printStr invocation.
79535         Based on a patch by Jørn Amundsen <Jorn.Amundsen@ntnu.no>.
79537 2011-06-05  Bruno Haible  <bruno@clisp.org>
79539         pipe-filter-ii: Fix test failure on AIX and IRIX.
79540         * lib/pipe-filter-ii.c (pipe_filter_ii_execute): When write() fails
79541         with EAGAIN, retry with a smaller buffer size.
79543 2011-06-05  Bruno Haible  <bruno@clisp.org>
79545         localename: Fix link dependencies.
79546         * modules/localename (Link): Mention $(LIBTHREAD) or $(LTLIBTHREAD).
79547         * modules/localename-tests (Makefile.am): Link test-localename with
79548         $(LIBTHREAD).
79550 2011-06-05  Bruno Haible  <bruno@clisp.org>
79552         error: Avoid gcc warning.
79553         * lib/error.c (strerror_r): Declare also when its return type is 'int'.
79555 2011-06-05  Bruno Haible  <bruno@clisp.org>
79557         unsetenv: Avoid gcc warning.
79558         * lib/unsetenv.c (unsetenv): Provide declaration if system lacks it.
79560 2011-06-05  Bruno Haible  <bruno@clisp.org>
79562         setenv: Avoid gcc warning.
79563         * lib/setenv.c (setenv): Provide declaration if system lacks it.
79565 2011-06-05  Bruno Haible  <bruno@clisp.org>
79567         sys_select: Ensure memset is declared also on AIX 7.
79568         * lib/sys_select.in.h: Include <string.h> also on AIX.
79569         * doc/posix-headers/sys_select.texi: Mention that <sys/select.h> is not
79570         self-contained also on AIX 7.1.
79572 2011-06-04  Jim Meyering  <meyering@redhat.com>
79574         maint.mk: sc_unmarked_diagnostics: don't hard-code "error"
79575         * top/maint.mk (sc_unmarked_diagnostics): Don't hard-code the
79576         function name, "error".
79577         (_gl_translatable_diag_func_re): New configurable variable.
79579 2011-06-04  Bruno Haible  <bruno@clisp.org>
79581         getopt: Avoid gcc warning.
79582         * lib/getopt.c (_getopt_internal_r): Remove unused variable 'ambig'.
79584 2011-06-04  Bruno Haible  <bruno@clisp.org>
79586         strerror_r: Fix comments.
79587         * lib/strerror_r.c (strerror_r): Update comments after 2011-06-01
79588         commit.
79590 2011-06-04  Bruno Haible  <bruno@clisp.org>
79592         perror: Fix compilation error.
79593         * lib/perror.c: Don't include intprops.h, verify.h, strerror-impl.h.
79594         Undefine fprintf, not sprintf.
79595         * modules/perror (Depends-on): Remove intprops, verify.
79597 2011-06-04  Bruno Haible  <bruno@clisp.org>
79599         setlocale: Enable replacement on Cygwin 1.5.
79600         * m4/setlocale.m4 (gl_FUNC_SETLOCALE): Set REPLACE_SETLOCALE also on
79601         Cygwin 1.5.x.
79602         * doc/posix-functions/setlocale.texi: Mention that the problem with the
79603         LC_CTYPE category also exists on Cygwin 1.5.x.
79605 2011-06-04  Bruno Haible  <bruno@clisp.org>
79607         strerror-override: Don't disable symbol renamings.
79608         * lib/strerror-override.h: Include errno.h and stddef.h, not string.h.
79609         * lib/strerror-override.c: Include config.h.
79610         (strerror_override): Don't undefine.
79612 2011-06-03  Bruno Haible  <bruno@clisp.org>
79614         Copyright: Use LGPL 2.1 instead of LGPL 2.0.
79615         * lib/localename.h: Update copyright header.
79616         * lib/localename.c: Likewise.
79617         * lib/relocatable.h: Likewise.
79618         * lib/relocatable.c: Likewise.
79620 2011-06-02  Bruno Haible  <bruno@clisp.org>
79622         doc: Fix a module name.
79623         * doc/posix-functions/open.texi: Fix module name 'nonblocking'.
79625 2011-06-02  Bruno Haible  <bruno@clisp.org>
79627         pipe2: Remove dependency on 'nonblocking' module.
79628         * lib/pipe2.c: Include verify.h. Include nonblocking.h only if
79629         O_NONBLOCK is defined by gnulib.
79630         (pipe2) [WIN32]: If O_NONBLOCK is not defined by gnulib, verify that it
79631         is zero.
79632         * modules/pipe2 (Depends-on): Add verify. Remove nonblocking.
79633         * tests/test-pipe2.c: Include nonblocking.h only if O_NONBLOCK is
79634         defined by gnulib.
79635         (get_nonblocking_flag): New function.
79636         (main): Test O_NONBLOCK flag only if it is nonzero.
79637         * doc/glibc-functions/pipe2.texi: Mention the 'nonblocking' module.
79639 2011-06-03  Jim Meyering  <meyering@redhat.com>
79641         maint: three new prohibit-header-without-use rules
79642         Prohibit use of cloexec.h, posixver.h, same.h without use.
79643         * top/maint.mk (sc_prohibit_cloexec_without_use): New rule.
79644         (sc_prohibit_posixver_without_use): Likewise.
79645         (sc_prohibit_same_without_use): Likewise.
79647 2011-06-02  Paul Eggert  <eggert@cs.ucla.edu>
79649         allocator: 'die' routine is now given requested size
79650         * lib/allocator.h (struct allocator.die): New size arg.
79651         * lib/careadlinkat.c (careadlinkat): Pass size to 'die' function.
79652         If the actual problem is an ssize_t limitation, not a size_t or
79653         malloc failure, fail with errno==ENAMETOOLONG instead of calling 'die'.
79655 2011-06-01  Eric Blake  <eblake@redhat.com>
79657         strerror: drop strerror_r dependency
79658         * lib/strerror_r.c (strerror_r): Move gnulib replacement strings...
79659         * lib/strerror-override.c (strerror_override): ...to new file.
79660         * lib/strerror-override.h: Add prototype.
79661         * lib/strerror-impl.h: Delete.
79662         * lib/strerror.c (strerror): New implementation.
79663         * modules/errno (Files): Add new files.
79664         (configure.ac): Compile new file as appropriate.
79665         * modules/strerror (Files): Drop unused file.
79666         (Depends-on): Drop strerror_r-posix.
79667         * MODULES.html.sh: Document strerror_r-posix.
79668         Requested by Sam Steingold.
79670         perror: call strerror_r directly
79671         * modules/perror (Files): Drop strerror-impl.h.
79672         * lib/perror.c (perror): Use our own stack buffer, rather than
79673         calling a wrapper that uses static storage.
79674         * doc/posix-functions/perror.texi (perror): Document a limitation
79675         of our replacement.
79677         strerror_r: fix includes for FreeBSD
79678         * lib/strerror_r.c (includes): Use <stdlib.h> unconditionally,
79679         since we use abort on some platforms.
79680         Reported by Matthias Bolte.
79682 2011-05-31  Bruno Haible  <bruno@clisp.org>
79684         Fix link errors in tests: openat-die uses gettext-h.
79685         * modules/areadlinkat-tests (Makefile.am): Link test-areadlinkat
79686         against $(LIBINTL).
79687         * modules/dirent-safer-tests (Makefile.am): Link test-dirent-safer
79688         against $(LIBINTL).
79689         * modules/fdopendir-tests (Makefile.am): Link test-fdopendir against
79690         $(LIBINTL).
79691         * modules/fdutimensat-tests (Makefile.am): Link test-fdutimensat
79692         against $(LIBINTL).
79693         * modules/linkat-tests (Makefile.am): Link test-linkat against
79694         $(LIBINTL).
79695         * modules/mkfifoat-tests (Makefile.am): Link test-mkfifoat against
79696         $(LIBINTL).
79697         * modules/openat-safer-tests (Makefile.am): Link test-openat-safer
79698         against $(LIBINTL).
79699         * modules/openat-tests (Makefile.am): Link test-fchownat, test-fstatat,
79700         test-mkdirat, test-openat, test-unlinkat against $(LIBINTL).
79701         * modules/readlinkat-tests (Makefile.am): Link test-readlinkat against
79702         $(LIBINTL).
79703         * modules/symlinkat-tests (Makefile.am): Link test-symlinkat against
79704         $(LIBINTL).
79705         * modules/utimensat-tests (Makefile.am): Link test-utimensat against
79706         $(LIBINTL).
79707         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
79709 2011-05-31  Bruno Haible  <bruno@clisp.org>
79711         Fix link errors in tests: wait-process uses gettext-h.
79712         * modules/nonblocking-pipe-tests (Makefile.am): Set
79713         test_nonblocking_pipe_main_LDADD.
79714         * modules/nonblocking-socket-tests (Makefile.am): Link
79715         test-nonblocking-socket-main against $(LIBINTL).
79716         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
79718 2011-05-29  Paul Eggert  <eggert@cs.ucla.edu>
79720         assert-h: work around 'verify' incompatibility
79721         * lib/verify.h: Use @...@ directives, not ifdef.
79722         * modules/assert-h (assert.h): Implement the directives.
79723         (assert.h): Substitute the symbol-prefix more consistently.
79725 2011-05-29  Jim Meyering  <meyering@redhat.com>
79727         trim: remove three superfluous assignments
79728         * lib/trim.c (trim2): Remove three superfluous assignments
79729         and correct brace positioning.
79731 2011-05-29  Bruno Haible  <bruno@clisp.org>
79733         wctype-h: Avoid namespace pollution on Solaris 2.6.
79734         * lib/wctype.in.h: On Solaris, undefine 'multibyte' and a few other
79735         identifiers.
79736         * doc/posix-headers/wctype.texi: Mention the problem.
79737         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
79739 2011-05-28  Jim Meyering  <meyering@redhat.com>
79741         parse-datetime.y: accommodate -Wstrict-overflow
79742         * lib/parse-datetime.y (yylex): Rearrange pointer arithmetic to
79743         placate -Wstrict-overflow.
79745         trim: avoid a warning from -O2 -Wstrict-overflow
79746         * lib/trim.c (trim2): Declare local to be "unsigned int", not "int".
79748 2011-05-29  Bruno Haible  <bruno@clisp.org>
79750         gnulib-tool: Fix bug in yesterday's commit.
79751         * gnulib-tool (func_create_testdir): Don't add gltests to $subdirs
79752         twice.
79754 2011-05-29  Bruno Haible  <bruno@clisp.org>
79756         Allow multiple gnulib generated include files to be combined.
79757         * gnulib-tool (func_compute_include_guard_prefix): New function.
79758         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Resolve also
79759         ${gl_include_guard_prefix} references.
79760         (func_import, func_create_testdir): Invoke
79761         func_compute_include_guard_prefix.
79762         * lib/arpa_inet.in.h: Use the @GUARD_PREFIX@ placeholder.
79763         * lib/ctype.in.h: Likewise.
79764         * lib/dirent.in.h: Likewise.
79765         * lib/errno.in.h: Likewise.
79766         * lib/fcntl.in.h: Likewise.
79767         * lib/float.in.h: Likewise.
79768         * lib/getopt.in.h: Likewise.
79769         * lib/iconv.in.h: Likewise.
79770         * lib/langinfo.in.h: Likewise.
79771         * lib/locale.in.h: Likewise.
79772         * lib/math.in.h: Likewise.
79773         * lib/netdb.in.h: Likewise.
79774         * lib/netinet_in.in.h: Likewise.
79775         * lib/poll.in.h: Likewise.
79776         * lib/pthread.in.h: Likewise.
79777         * lib/pty.in.h: Likewise.
79778         * lib/sched.in.h: Likewise.
79779         * lib/se-selinux.in.h: Likewise.
79780         * lib/search.in.h: Likewise.
79781         * lib/signal.in.h: Likewise.
79782         * lib/spawn.in.h: Likewise.
79783         * lib/stdarg.in.h: Likewise.
79784         * lib/stddef.in.h: Likewise.
79785         * lib/stdint.in.h: Likewise.
79786         * lib/stdio.in.h: Likewise.
79787         * lib/stdlib.in.h: Likewise.
79788         * lib/string.in.h: Likewise.
79789         * lib/strings.in.h: Likewise.
79790         * lib/sys_file.in.h: Likewise.
79791         * lib/sys_ioctl.in.h: Likewise.
79792         * lib/sys_select.in.h: Likewise.
79793         * lib/sys_socket.in.h: Likewise.
79794         * lib/sys_stat.in.h: Likewise.
79795         * lib/sys_time.in.h: Likewise.
79796         * lib/sys_times.in.h: Likewise.
79797         * lib/sys_uio.in.h: Likewise.
79798         * lib/sys_utsname.in.h: Likewise.
79799         * lib/sys_wait.in.h: Likewise.
79800         * lib/sysexits.in.h: Likewise.
79801         * lib/termios.in.h: Likewise.
79802         * lib/time.in.h: Likewise.
79803         * lib/unistd.in.h: Likewise.
79804         * lib/wchar.in.h: Likewise.
79805         * lib/wctype.in.h: Likewise.
79806         * modules/arpa_inet (Makefile.am): Substitute @GUARD_PREFIX@.
79807         * modules/ctype (Makefile.am): Likewise.
79808         * modules/dirent (Makefile.am): Likewise.
79809         * modules/errno (Makefile.am): Likewise.
79810         * modules/fcntl-h (Makefile.am): Likewise.
79811         * modules/float (Makefile.am): Likewise.
79812         * modules/getopt-posix (Makefile.am): Likewise.
79813         * modules/iconv-h (Makefile.am): Likewise.
79814         * modules/langinfo (Makefile.am): Likewise.
79815         * modules/locale (Makefile.am): Likewise.
79816         * modules/math (Makefile.am): Likewise.
79817         * modules/netdb (Makefile.am): Likewise.
79818         * modules/netinet_in (Makefile.am): Likewise.
79819         * modules/poll-h (Makefile.am): Likewise.
79820         * modules/pthread (Makefile.am): Likewise.
79821         * modules/pty (Makefile.am): Likewise.
79822         * modules/sched (Makefile.am): Likewise.
79823         * modules/search (Makefile.am): Likewise.
79824         * modules/selinux-h (Makefile.am): Likewise.
79825         * modules/signal (Makefile.am): Likewise.
79826         * modules/spawn (Makefile.am): Likewise.
79827         * modules/stdarg (Makefile.am): Likewise.
79828         * modules/stddef (Makefile.am): Likewise.
79829         * modules/stdint (Makefile.am): Likewise.
79830         * modules/stdio (Makefile.am): Likewise.
79831         * modules/stdlib (Makefile.am): Likewise.
79832         * modules/string (Makefile.am): Likewise.
79833         * modules/strings (Makefile.am): Likewise.
79834         * modules/sys_file (Makefile.am): Likewise.
79835         * modules/sys_ioctl (Makefile.am): Likewise.
79836         * modules/sys_select (Makefile.am): Likewise.
79837         * modules/sys_socket (Makefile.am): Likewise.
79838         * modules/sys_stat (Makefile.am): Likewise.
79839         * modules/sys_time (Makefile.am): Likewise.
79840         * modules/sys_times (Makefile.am): Likewise.
79841         * modules/sys_uio (Makefile.am): Likewise.
79842         * modules/sys_utsname (Makefile.am): Likewise.
79843         * modules/sys_wait (Makefile.am): Likewise.
79844         * modules/sysexits (Makefile.am): Likewise.
79845         * modules/termios (Makefile.am): Likewise.
79846         * modules/time (Makefile.am): Likewise.
79847         * modules/unistd (Makefile.am): Likewise.
79848         * modules/wchar (Makefile.am): Likewise.
79849         * modules/wctype-h (Makefile.am): Likewise.
79850         * modules/assert-h (Makefile.am): Replace _GL_VERIFY_H specially.
79852 2011-05-29  Bruno Haible  <bruno@clisp.org>
79854         assert-h: Allow multiple gnulib generated replacements to coexist.
79855         * lib/verify.h (struct _gl_verify_type): Avoid identical redefinition.
79857 2011-05-29  Bruno Haible  <bruno@clisp.org>
79859         argp: Allow coexistence with strerror_r-posix module.
79860         * lib/argp-help.c (__argp_failure): If strerror_r is defined as a macro
79861         (either to __xpg_strerror_r by glibc's <string.h> or to rpl_strerror_r
79862         by gnulib's <string.h> replacement), assume it has the POSIX signature,
79863         not the glibc signature.
79865 2011-05-28  Bruno Haible  <bruno@clisp.org>
79867         gnulib-tool: Alternative structure of testdirs, similar to --import.
79868         * gnulib-tool: New option --single-configure.
79869         (func_usage): Document it.
79870         (single_configure): New variable.
79871         (func_modules_transitive_closure_separately,
79872         func_modules_transitive_closure_separately,
79873         func_determine_use_libtests, func_modules_add_dummy_separately,
79874         func_modules_to_filelist_separately): New functions, extracted from
79875         func_import.
79876         (func_emit_tests_Makefile_am): Handle $single_configure = true case.
79877         (func_import): Use the new functions.
79878         (func_create_testdir): Set final_modules. Handle $single_configure =
79879         true case.
79881 2011-05-28  Bruno Haible  <bruno@clisp.org>
79883         getloadavg: Remove an unreliable safety check.
79884         * m4/getloadavg.m4 (gl_GETLOADAVG): Drop argument. Remove test whether
79885         getloadavg.c is in place.
79886         * modules/getloadavg (configure.ac): Drop argument of gl_GETLOADAVG.
79887         Reported by Sam Steingold <sds@gnu.org>.
79889 2011-05-28  Bruno Haible  <bruno@clisp.org>
79891         doc: Cleanup yet another file produced by texinfo.tex.
79892         * doc/Makefile (mostlyclean): Remove also gnulib.cn.
79894 2011-05-28  Bruno Haible  <bruno@clisp.org>
79896         Finish the conditional dependencies mechanism.
79897         * gnulib-tool: New option --no-conditional-dependencies.
79898         (func_usage): Document it. Don't mark --conditional-dependencies as
79899         experimental.
79900         (cond_dependencies): The possible values can now be true, false, empty.
79901         (func_modules_transitive_closure, func_emit_autoconf_snippets): Update.
79902         (func_import): Store setting in gnulib-cache.m4 and read it from there.
79903         * doc/gnulib-tool.texi (Conditional dependencies): New section.
79905 2011-05-28  Bruno Haible  <bruno@clisp.org>
79907         doc: Use a recent texinfo.tex.
79908         * doc/Makefile (tex_opts): New variable.
79909         (%.dvi, %.pdf): Pass it to texi2dvi and texi2pdf.
79911 2011-05-28  Jim Meyering  <meyering@redhat.com>
79913         intprops.h: adjust comment to match code change
79914         * lib/intprops.h (_GL_INT_CONVERT): Adjust comment: now that E is used
79915         only once, it *may* have side effects.  Also fix an unrelated typo.
79916         (_GL_INT_SIGNED): Likewise.
79918 2011-05-26  Simon Josefsson  <simon@josefsson.org>
79920         * lib/gen-uni-tables.c: Say "gen-uni-tables.c" consistently.
79922 2011-05-26  Bruno Haible  <bruno@clisp.org>
79924         mbsrchr: Avoid collision with system function on Interix.
79925         * lib/string.in.h (mbsrchr): Define as rpl_mbsrchr also on Interix.
79926         Reported by Markus Duft <mduft@gentoo.org>.
79928 2011-05-15  James Youngman  <jay@gnu.org>
79930         getopt: for ambiguous options, enumerate the possibilities.
79931         * lib/getopt.c (_getopt_internal_r): Merge glibc change printing
79932         the ambiguous options when an ambiguous prefix is given. This was
79933         http://sourceware.org/bugzilla/show_bug.cgi?id=7101.  The merged
79934         glibc change was
79935         http://sourceware.org/git/?p=glibc.git;a=commit;h=bd25564e1e98910ed69043ed6a6f884ce60e5780.
79937 2011-05-25  Eric Blake  <eblake@redhat.com>
79939         getcwd: work around mingw bug
79940         * lib/getcwd-lgpl.c (rpl_getcwd): Guarantee correct error.
79941         * doc/posix-functions/getcwd.texi (getcwd): Document it.
79942         Reported by Matthias Bolte.
79944 2011-05-24  Paul Eggert  <eggert@cs.ucla.edu>
79946         test-intprops: disable -Wtype-limits diagnostics
79947         * tests/test-intprops.c: Use a pragma to ignore -Wtype-limits
79948         diagnostics.  Otherwise, the integer overflow macros generate many
79949         diagnostics.  Reported by Jim Meyering in
79950         <http://lists.gnu.org/r/bug-gnulib/2011-05/msg00528.html>.
79952         intprops: shorten, to pacify gcc -Woverlength-strings
79953         * lib/intprops.h (_GL_INT_CONVERT, _GL_INT_NEGATE_CONVERT):
79954         (_GL_BINARY_OP_OVERFLOW): Say "0 * (x)" rather than "(x) - (x)",
79955         so that, for example, verify (INT_MULTIPLY_OVERFLOW (...)) is less
79956         likely to run afoul of C compiler limits for string constant lengths.
79957         See <http://lists.gnu.org/r/bug-gnulib/2011-05/msg00528.html>.
79959 2011-05-24  Eric Blake  <eblake@redhat.com>
79961         docs: document recently fixed glibc printf bug
79962         * doc/posix-functions/fprintf.texi (fprintf): Document it.
79963         * doc/posix-functions/printf.texi (printf): Likewise.
79964         * doc/posix-functions/vfprintf.texi (vfprintf): Likewise.
79965         * doc/posix-functions/vprintf.texi (vprintf): Likewise.
79967         closein-tests: convert to init.sh
79968         * modules/closein-tests (Files): Add init.sh
79969         * tests/test-closein.sh Use it.
79971         yesno-tests: convert to init.sh
79972         * modules/yesno-tests (Files): Add init.sh.
79973         * tests/test-yesno.sh: Use it.
79975         atexit-tests: ensure reliable exit status
79976         * tests/test-atexit.sh: Prefer 'Exit' over 'exit'.
79977         Reported by Bruno Haible.
79979 2011-05-24  Bruno Haible  <bruno@clisp.org>
79981         strerror_r-posix: Respect rules for use of AC_LIBOBJ.
79982         * m4/strerror_r.m4 (gl_FUNC_STRERROR_R): Move AC_LIBOBJ and
79983         gl_PREREQ_STRERROR_R invocations from here...
79984         * modules/strerror_r-posix (configure.ac): ... to here.
79986 2011-05-24  Eric Blake  <eblake@redhat.com>
79988         strerror_r: fix missing header
79989         * lib/strerror_r.c: Avoid compiler warning about snprintf.
79991         strerror_r: fix AIX test failures
79992         * lib/strerror_r.c (strerror_r): Convert silent truncation to
79993         ERANGE failure.
79995         strerror_r: fix Solaris test failures
79996         * lib/strerror_r.c (strerror_r): Partially populate buf on ERANGE
79997         failures.
79998         * doc/posix-functions/strerror_r.texi (strerror_r): Document this.
80000         strerror_r: enforce POSIX recommendations
80001         * lib/strerror_r.c (safe_copy): New helper method.
80002         (strerror_r): Guarantee a non-empty string.
80003         * tests/test-strerror_r.c (main): Enhance tests to incorporate
80004         recent POSIX rulings and to match our strerror guarantees.
80005         * doc/posix-functions/strerror_r.texi (strerror_r): Document this.
80007 2011-05-24  Jim Meyering  <meyering@redhat.com>
80009         test-perror2.c: avoid warning about unused variable
80010         * tests/test-perror2.c (main): Remove declaration of unused "fp".
80012 2011-05-24  Eric Blake  <eblake@redhat.com>
80014         perror: avoid spurious test failure on HP-UX
80015         * tests/test-perror.sh: Use Exit to avoid wrong exit status.
80017         tests: fix logic bug in init.sh
80018         * tests/init.sh: (gl_set_x_corrupts_stderr_): Clear for successful
80019         shell.
80021 2011-05-24  Jim Meyering  <meyering@redhat.com>
80023         utimensat: do not reference an out-of-scope buffer
80024         Otherwise, with __linux__ defined, "times" would point to a buffer, "ts"
80025         declared in an inner scope, yet "times" would be dereferenced outside
80026         the scope in which "ts" was valid.
80027         * lib/utimensat.c (rpl_utimensat) [__linux__]: Move the declaration
80028         of ts[2] "out/up", so that the use of aliased "times" (via
80029         "times = ts;") does not end up referencing an out-of-scope "ts"
80031         opendir-safer.c: don't clobber errno; don't close negative FD
80032         * lib/opendir-safer.c (opendir_safer):
80033         [HAVE_FDOPENDIR || GNULIB_FDOPENDIR]: Don't close a negative
80034         file descriptor, and more importantly, don't clobber the
80035         offending errno value with EINVAL.  Before, upon failure
80036         of dup_safer, we would pass the negative file descriptor to
80037         fdopendir, which would clobber errno.
80039 2011-05-23  Bruno Haible  <bruno@clisp.org>
80041         idcache: Fix module description.
80042         * modules/idcache (Include): Set to "idcache.h".
80044 2011-05-23  Paul Eggert  <eggert@cs.ucla.edu>
80046         gnulib-tool: fix portability problem with MacOS sed
80047         A sed command like "/x/{s/a/b/}" is not portable; a newline is needed
80048         before the "}".  Problem reported by Leo in
80049         <http://lists.gnu.org/r/emacs-devel/2011-05/msg00717.html>.
80050         * gnulib-tool (func_modules_transitive_closure): Insert newlines in
80051         sed_extract_condition1, sed_extract_condition2.
80053 2011-05-23  Bruno Haible  <bruno@clisp.org>
80055         hash: Simplify autoconf macro.
80056         * m4/hash.m4 (gl_HASH): Don't require AM_STDBOOL_H.
80058 2011-05-23  Bruno Haible  <bruno@clisp.org>
80060         getugroups: Fix module description.
80061         * modules/getugroups (Include): Set to "getugroups.h".
80063 2011-05-23  Bruno Haible  <bruno@clisp.org>
80065         linkat: Simplify autoconf macro.
80066         * m4/linkat.m4 (gl_FUNC_LINKAT): Don't require gl_FUNC_LINK.
80068 2011-05-23  Bruno Haible  <bruno@clisp.org>
80069             Eric Blake  <eblake@redhat.com>
80071         linkat, renameat: Update dependencies.
80072         * modules/renameat (Depends-on): Add dosname, save-cwd. Remove stpcpy.
80073         * modules/linkat (Depends-on): Likewise. Remove also readlink,
80074         symlinkat.
80076 2011-05-23  Jim Meyering  <meyering@redhat.com>
80078         maint.mk: more tight_scope improvements
80079         * top/maint.mk: (_gl_TS_var_match): Use $(_gl_TS_extern) here, too.
80080         (_gl_TS_headers): Define only in if-0'd block.
80081         (_gl_TS_dir): Omit the $(srcdir)/ prefix.  Sometimes we need it,
80082         sometimes we must *not* use it.  Adjust uses accordingly.
80083         (sc_tight_scope): Use much simpler grep-based test to determine
80084         whether we skip this rule.
80086         maint.mk: generalize/improve the tight-scope rule
80087         * top/maint.mk: Emit a warning when the test is skipped.
80088         (_gl_TS_dir): Add $(srcdir)/ prefix.
80089         (_gl_TS_function_match): Simplify, rather than trying
80090         to enumerate common types.  Otherwise, it would fail to match an
80091         "extern unsigned char const *" declaration in idutils.
80092         (_gl_TS_extern): Do not endorse use of "XTERN", but do provide
80093         a way to support use of that type of macro.
80094         (_gl_TS_var_match): Simplify regexp.
80095         (_gl_TS_obj_files): New configurable variable.
80096         (_gl_TS_headers): Likewise.
80098 2011-05-22  Paul Eggert  <eggert@cs.ucla.edu>
80100         verify: fix bug when gnulib <assert.h> is also included
80101         * lib/verify.h (verify, verify_true): Define if _GL_VERIFY_H
80102         is defined, not if _GL_STATIC_ASSERT_H is not defined.
80103         Perhaps there's a better way, but this fixes the immediate problem.
80104         Problem reported by Bruno Haible in
80105         <http://lists.gnu.org/r/bug-gnulib/2011-05/msg00478.html>.
80107 2011-05-22  Bruno Haible  <bruno@clisp.org>
80109         xgetcwd: Simplify autoconf macro.
80110         * m4/xgetcwd.m4 (gl_XGETCWD): Don't require gl_FUNC_GETCWD.
80112 2011-05-22  Bruno Haible  <bruno@clisp.org>
80114         New module 'mktime-internal'.
80115         * modules/mktime-internal: New file.
80116         * m4/timegm.m4 (gl_PREREQ_TIMEGM): Move contents to ...
80117         * m4/mktime.m4 (gl_FUNC_MKTIME_INTERNAL): New macro. Define
80118         mktime_internal as a C macro if libc has __mktime_internal.
80119         * modules/timegm (Depends-on): Add mktime-internal. Remove mktime. Add
80120         conditions.
80121         * MODULES.html.sh (Date and time <time.h>): Add mktime-internal.
80123 2011-05-22  Bruno Haible  <bruno@clisp.org>
80125         timegm: Correct mktime replacement statements.
80126         * m4/timegm.m4 (gl_PREREQ_TIMEGM): Set REPLACE_MKTIME, instead of
80127         defining mktime as a C macro. This completes a 2009-07-28 commit.
80129 2011-05-22  Bruno Haible  <bruno@clisp.org>
80131         timegm: Simplify autoconf macro.
80132         * m4/timegm.m4 (gl_PREREQ_TIMEGM): Don't require gl_TIME_R.
80134 2011-05-21  Paul Eggert  <eggert@cs.ucla.edu>
80136         clock-time: change to LGPLv2+.
80137         * modules/clock-time: Change from GPL to LGPLv2+.  Actually, it's
80138         BSD-like but we have no mark for that; this is good enough for now.
80140 2011-05-21  Bruno Haible  <bruno@clisp.org>
80142         strerror_r: Fix comments.
80143         * lib/strerror_r.c (strerror_r): Fix comment about Cygwin and sys_nerr.
80145 2011-05-21  Bruno Haible  <bruno@clisp.org>
80147         relocatable-prog-wrapper: Fix possible link error.
80148         * m4/setenv.m4 (gl_FUNC_SETENV_SEPARATE): Move determination of
80149         HAVE_SETENV and REPLACE_SETENV and AC_LIBOBJ invocation from here...
80150         (gl_FUNC_SETENV): ... to here.
80151         * m4/canonicalize.m4 (gl_CANONICALIZE_LGPL_SEPARATE): Update comment.
80152         * m4/readlink.m4 (gl_FUNC_READLINK_SEPARATE): Likewise.
80154 2011-05-21  Bruno Haible  <bruno@clisp.org>
80156         relocatable-prog-wrapper: Assume strerror() exists.
80157         * modules/relocatable-prog-wrapper (Files): Remove lib/strerror.c,
80158         m4/strerror.m4.
80159         (configure.ac): Don't invoke gl_FUNC_STRERROR_SEPARATE.
80160         * lib/relocwrapper.c: Remove mention of strerror module.
80161         * lib/strerror.c: Assume REPLACE_STRERROR is 1.
80162         * m4/strerror.m4 (gl_FUNC_STRERROR_SEPARATE): Remove macro.
80163         (gl_FUNC_STRERROR): Inline it here. Don't define REPLACE_STRERROR as a
80164         C macro.
80166 2011-05-21  Bruno Haible  <bruno@clisp.org>
80168         select: Simplify replacement idiom.
80169         * m4/select.m4 (gl_FUNC_SELECT): Set REPLACE_SELECT also on native
80170         Win32 platforms.
80171         * lib/sys_select.in.h (select): Simplify accordingly.
80172         * modules/select (Depends-on): Likewise.
80174 2011-05-21  Bruno Haible  <bruno@clisp.org>
80176         mkdir-p: Simplify autoconf macro.
80177         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Don't require gl_FUNC_LCHMOD,
80178         gl_FUNC_LCHOWN.
80180 2011-05-21  Eric Blake  <eblake@redhat.com>
80182         strerror_r: avoid clobbering strerror on cygwin
80183         * lib/strerror_r.c (strerror_r): Don't use cygwin's strerror_r;
80184         fall back instead to sys_errlist.
80185         * modules/strerror (configure.ac): Add witness.
80186         * tests/test-strerror_r.c (main): Enhance test.
80187         * doc/posix-functions/strerror_r.texi (strerror_r): Document it.
80188         * tests/test-perror2.c (main): Free memory before exit.
80190 2011-05-21  Bruno Haible  <bruno@clisp.org>
80192         mkdtemp: Use gnulib naming conventions.
80193         * m4/mkdtemp.m4 (gl_FUNC_MKDTEMP): Renamed from gt_FUNC_MKDTEMP.
80194         * modules/mkdtemp (configure.ac): Update.
80196 2011-05-20  Eric Blake  <eblake@redhat.com>
80198         strerror_r: avoid corrupting errno on Solaris
80199         * m4/strerror_r.m4 (gl_FUNC_STRERROR_R): Check for Solaris behavior.
80200         * doc/posix-functions/strerror_r.texi (strerror_r): Document it.
80202         strerror_r: avoid compiler warning
80203         * m4/strerror_r.m4 (gl_FUNC_STRERROR_R): Don't return a char*.
80205         strerror_r: simplify AIX code
80206         * lib/strerror_r.c (strerror_r): Filter out buflen of 1 up front.
80208         test-perror: avoid spurious failure on FreeBSD
80209         * modules/perror-tests (Depends-on): Add strerror, now that
80210         strerror_r no longer pulls it in.
80212 2011-05-20  Bruno Haible  <bruno@clisp.org>
80214         strerror_r-posix: Remove unused dependencies.
80215         * modules/strerror_r-posix (Depends-on): Remove strerror.
80216         Reported by Eric Blake.
80218 2011-05-20  Paul Eggert  <eggert@cs.ucla.edu>
80220         intprops: remove assumption about A|B representation
80221         * lib/intprops.h (_GL_BINARY_OP_OVERFLOW): Do not assume that A|B
80222         is a valid integer if both A and B are.  Although this is true for
80223         all known practical hosts, the C standard doesn't guarantee it,
80224         and the code need not assume it.  Also, this change may work around
80225         HP-UX 11.23 and IRIX 6.5 cc bugs reported by Bruno Haible in
80226         <http://lists.gnu.org/r/bug-gnulib/2011-05/msg00426.html>.
80228 2011-05-20  Eric Blake  <eblake@redhat.com>
80230         perror: work around FreeBSD bug
80231         * m4/perror.m4 (gl_FUNC_PERROR): Also replace perror if strerror_r
80232         is broken.  Move AC_LIBOBJ...
80233         * modules/perror (configure.ac): Here.
80234         * doc/posix-functions/perror.texi (perror): Document this.
80235         * tests/test-perror2.c (main): Enhance test.
80237         test-perror: check for strerror interactions
80238         * tests/macros.h (STREQ): Add macro.
80239         * modules/perror-tests (Files): Add second test.
80240         * tests/test-perror2.c (main): New file.
80241         * doc/posix-functions/perror.texi (perror): Document glibc bug.
80243         test-perror: rewrite to use init script
80244         * modules/perror-tests (Files): Add init.sh.
80245         * tests/test-perror.sh: Use temporary directory.
80247 2011-05-20  Jim Meyering  <meyering@redhat.com>
80249         maint: replace misused "a" with "an"
80250         * doc/intprops.texi: "a integer"
80251         * doc/regex.texi: "a explanation"
80252         * lib/alignof.h: "a object"
80253         * lib/argmatch.h: "a explanation"
80254         * lib/argp-help.c: "a option" and "a OPTION_DOC"
80255         * lib/stdint.in.h: "a integer"
80256         * lib/userspec.c: "a owner"
80257         * doc/gnulib.texi: Fix "a idea", and reword.
80259 2011-05-19  Jim Meyering  <meyering@redhat.com>
80261         maint: correct misuse of "a" and "an"
80262         * doc/regex.texi (Collating Symbol Operators): s/an close.../a close/
80263         * lib/argp-help.c: "an docum...": s/an/a/
80264         * lib/argp-parse.c: "An vector": s/An/A/
80265         * lib/execute.c: "an native": s/an/a/
80266         * lib/spawn-pipe.c: Likewise.
80267         * lib/gc.h: "an Gc_rc": s/an/a/
80268         * lib/unigbrk.in.h: "an grapheme": s/an/a/
80269         * lib/fts.c: "an stat.st_dev": s/an/a/
80271 2011-05-19  Paul Eggert  <eggert@cs.ucla.edu>
80273         intprops-tests: work around HP-UX 11.23 cc bug with constants
80274         * tests/test-intprops.c (VERIFY): New macro.
80275         (main): Use it, instead of verify, to work around the compiler bug; see
80276         <http://lists.gnu.org/r/bug-gnulib/2011-05/msg00401.html>.
80278         intprops: work around IRIX 6.5 cc bug with 0u - 0u + -1
80279         See http://lists.gnu.org/r/bug-gnulib/2011-05/msg00406.html
80280         * lib/intprops.h (_GL_INT_NEGATE_CONVERT): New macro.
80281         (_GL_INT_SIGNED, _GL_INT_MAXIMUM, _GL_DIVIDE_OVERFLOW):
80282         (_GL_REMAINDER_OVERFLOW): Use it.
80284         intprops-tests: revert unsigned part of previous change
80285         * tests/test-intprops.c (UINT_MAX, ULONG_MAX, UINTMAX_MAX, U0, U1):
80286         Remove; they weren't actually needed.  All uses of U0 and U1 removed,
80287         and other casts to 'unsigned int' reverted to 'u' suffixes.  See
80288         <http://lists.gnu.org/r/bug-gnulib/2011-05/msg00406.html>.
80290 2011-05-19  Bruno Haible  <bruno@clisp.org>
80292         strerror_r: Work around strerror_r() change in Cygwin 1.7.8.
80293         * lib/strerror_r.c (strerror_r) [CYGWIN]: Recognize when the system's
80294         strerror_r() returned without filling the buffer.
80295         Reported by Eric Blake.
80297 2011-05-19  Eric Blake  <eblake@redhat.com>
80299         strerror_r: guarantee unchanged errno
80300         * lib/strerror_r.c (strerror_r): Guarantee unchanged errno.
80301         * lib/strerror-impl.h (strerror): Set errno to match strerror_r
80302         failure.
80303         * tests/test-strerror_r.c (main): Enhance test.
80305 2011-05-19  Bruno Haible  <bruno@clisp.org>
80307         strerror_r: Reorder #if blocks.
80308         * lib/strerror_r.c (strerror_r): Reorder conditionals in the function
80309         for consistency with the previous commit.
80311 2011-05-19  Bruno Haible  <bruno@clisp.org>
80313         perror: Avoid clobbering the strerror buffer when possible.
80314         * lib/strerror-impl.h: New file, extracted from lib/strerror.c.
80315         * lib/strerror.c: Include it.
80316         * modules/strerror (Files): Add lib/strerror-impl.h.
80317         * lib/perror.c: Include <stdlib.h>, intprops.h, verify.h.
80318         (my_strerror): New function, defined through lib/strerror-impl.h.
80319         (perror): Use it instead of strerror.
80320         * modules/perror (Files): Add lib/strerror-impl.h.
80321         (Depends-on): Remove strerror. Add intprops, verify, strerror_r-posix.
80323 2011-05-19  Eric Blake  <eblake@redhat.com>
80325         strerror_r: fix on newer cygwin
80326         * lib/strerror_r.c (strerror_r): Cygwin now has
80327         __xpg_strerror_r, use it.
80329 2011-05-19  Bruno Haible  <bruno@clisp.org>
80331         strerror_r: Avoid clobbering the strerror buffer when possible.
80332         * lib/strerror.c: Define _NETBSD_SOURCE. Include <nl_types.h>.
80333         (sys_nerr, sys_errlist): New declarations.
80334         (strerror_r): Be careful not to clobber the strerror buffer on NetBSD,
80335         HP-UX, native Win32, IRIX, and 32-bit Solaris.
80336         * m4/strerror_r.m4 (gl_PREREQ_STRERROR_R): Test whether catgets exists.
80338 2011-05-19  Bruno Haible  <bruno@clisp.org>
80340         strerror_r: Fix test failure on mingw.
80341         * m4/strerror_r.m4 (gl_FUNC_STRERROR_R): Don't define
80342         EXTEND_STRERROR_R.
80343         * lib/strerror_r.c (strerror_r): Test the various GNULIB_defined_*
80344         macros from errno.in.h instead.
80346 2011-05-19  Eric Blake  <eblake@redhat.com>
80348         strerror: relax test for Solaris
80349         * tests/test-strerror.c (main): Permit Solaris behavior.
80350         * tests/test-strerror_r.c (main): Likewise.
80352         strerror: enforce POSIX ruling on strerror(0)
80353         * m4/strerror.m4 (gl_FUNC_STRERROR_SEPARATE): Expose BSD bug.
80354         * m4/strerror_r.m4 (gl_FUNC_STRERROR_R): Likewise.
80355         * lib/strerror_r.c (rpl_strerror_r): Work around it.
80356         * doc/posix-functions/strerror.texi (strerror): Document it.
80357         * doc/posix-functions/strerror_r.texi (strerror_r): Likewise.
80358         * tests/test-strerror.c (main): Strengthen test.
80359         * tests/test-strerror_r.c (main): Likewise.
80361 2011-05-19  Paul Eggert  <eggert@cs.ucla.edu>
80363         intprop-tests: port to older and more-pedantic compilers
80364         * modules/intprops-tests (Files): Add tests/macros.h.
80365         * tests/test-intprops.c: Include macros.h.
80366         (TYPE_IS_INTEGER): Use ASSERT, not verify, to test this macro, as
80367         it's no longer documented to expand to an integer constant expression.
80368         (TYPE_SIGNED): Use ASSERT, not verify, to test this macro when the
80369         argument is floating point, as it's no longer documented to expand
80370         to an integer constant expression in that case.
80371         (UINT_MAX, ULONG_MAX, UINTMAX_MAX): Redefine to work around
80372         compiler bugs reported by Bruno Haible.  See
80373         <http://lists.gnu.org/r/bug-gnulib/2011-05/msg00401.html>.
80374         (U0, U1): New constants, to work around the same bugs.  Also,
80375         in tests, use e.g., "(unsigned int) 39" rather than "39u".
80377         intprops: work around C compiler bugs
80378         * lib/intprops.h (INT_MULTIPLY_RANGE_OVERFLOW): Work around compiler
80379         bug in Sun C 5.11 2010/08/13 and other compilers; see
80380         <http://lists.gnu.org/r/bug-gnulib/2011-05/msg00401.html>.
80382         intprops: TYPE_IS_INTEGER, TYPE_SIGNED not integer constant exprs
80383         * doc/intprops.texi (Integer Type Determination): Fix
80384         documentation for TYPE_IS_INTEGER: it returns an constant
80385         expression, not an integer constant expression.  Fix doc for
80386         TYPE_SIGNED: it returns an integer constant expression only if its
80387         argument is an integer type.  (TYPE_IS_INTEGER is the same, but is
80388         hardly worth documented that way....)
80390 2011-05-18  Bruno Haible  <bruno@clisp.org>
80392         strerror_r: Avoid clobbering the strerror buffer when possible.
80393         * lib/strerror_r.c (strerror_r): Merge the three implementations.
80394         Handle gnulib defined errno values here. When strerror() returns NULL
80395         or an empty string, return EINVAL.
80396         * lib/strerror.c (strerror): Always call strerror_r. Don't handle
80397         gnulib defined errno values here.
80398         * modules/strerror (Depends-on): Add verify, strerror_r-posix.
80400 2011-05-18  Eric Blake  <eblake@redhat.com>
80402         fnmatch: avoid compiler warning
80403         * lib/fnmatch_loop.c (FCT): Use correct type.
80404         Reported by Matthias Bolte.
80406 2011-05-13  Jim Meyering  <meyering@redhat.com>
80408         maint.mk: three new prohibit_<HDR>_without_use rules
80409         * top/maint.mk (sc_prohibit_stdio--_without_use): New rule.
80410         (sc_prohibit_stdio-safer_without_use): Likewise.
80411         (sc_prohibit_xfreopen_without_use): Likewise.
80413 2011-05-17  Jim Meyering  <meyering@redhat.com>
80415         announce-gen: fail if the NEWS delta is empty
80416         If there's nothing noteworthy in NEWS, then either you forgot
80417         or you shouldn't be releasing.
80418         * build-aux/announce-gen: Die if the NEWS delta is effectively empty.
80420 2011-05-17  Pádraig Brady  <P@draigBrady.com>
80422         * top/maint.mk (_gl_tight_scope:): Automatically exclude compiler
80423         reserved symbols starting with double underscore from the check.
80425 2011-05-17  Paul Eggert  <eggert@cs.ucla.edu>
80427         intprops: add doc
80428         * doc/intprops.texi: New file, documenting intprops.
80429         * doc/gnulib.texi (Particular Modules): Include it.
80431         verify: add doc to gnulib manual and fix example
80432         * doc/gnulib.texi (Compile-time Assertions): New node, for 'verify'.
80433         * doc/verify.texi (Compile-time Assertions): Update 'assert' doc.
80434         (Compile-time Assertions): Fix example so it can't overflow.
80436 2011-05-17  Jim Meyering  <meyering@redhat.com>
80438         warnings.m4: don't usurp save_CPPFLAGS variable name
80439         * m4/warnings.m4: Prefix local temporary variable name with gl_.
80441         doc: fix typo
80442         * doc/gnulib-intro.texi (Target Platforms): s/is/are/
80444 2011-05-16  Paul Eggert  <eggert@cs.ucla.edu>
80445             Bruno Haible  <bruno@clisp.org>
80447         doc: Tweak recent change.
80448         * README (Portability guidelines): Tweak new text.
80449         * doc/gnulib-intro.texi (Target Platforms): Likewise. Mention
80450         Interix 6.1.
80452 2011-05-16  Eric Blake  <eblake@redhat.com>
80454         inttypes: avoid autoconf warning
80455         * m4/inttypes.m4 (gl_INTTYPES_INCOMPLETE): Only expand once.
80456         * m4/stdint.m4 (gl_STDINT_H): Likewise.
80458 2011-05-16  Sam Steingold  <sds@gnu.org>
80459         and Eric Blake  <eblake@redhat.com>
80461         vc-list-files: accept multiple directory operands
80462         * build-aux/vc-list-files: Iterate over all remaining operands.
80464 2011-05-16  Bruno Haible  <bruno@clisp.org>
80466         Fix confusion regarding deprecated modules.
80467         * modules/calloc (Status, Notice): Mark module as deprecated, not
80468         obsolete.
80469         * modules/fnmatch-posix (Status, Notice): Likewise.
80470         * modules/getdate (Status, Notice): Likewise.
80471         * modules/getopt (Status, Notice): Likewise.
80472         * modules/malloc (Status, Notice): Likewise.
80473         * modules/pipe (Status, Notice): Likewise.
80474         * modules/realloc (Status, Notice): Likewise.
80475         * modules/rename-dest-slash (Status, Notice): Likewise.
80476         * modules/unictype/bidicategory-all (Status, Notice): Likewise.
80477         * modules/unictype/bidicategory-byname (Status, Notice): Likewise.
80478         * modules/unictype/bidicategory-name (Status, Notice): Likewise.
80479         * modules/unictype/bidicategory-of (Status, Notice): Likewise.
80480         * modules/unictype/bidicategory-test (Status, Notice): Likewise.
80482 2011-05-16  Bruno Haible  <bruno@clisp.org>
80484         doc: List the target platforms.
80485         * doc/gnulib-intro.texi (Target Platforms): New section.
80486         * doc/gnulib.texi (Introduction): Update menu.
80487         * README (Portability guidelines): Refer to the new section. Update
80488         statement about oldest supported environment. Remove rationale why
80489         <errno.h>, <string.h>, <stdlib.h> are assumed. Update example of an
80490         unportable C89 function.
80491         Reported by Bastien Roucariès <roucaries.bastien@gmail.com> and
80492         Charles Wilson <cygwin@cwilson.fastmail.fm>. Feedback from Paul Eggert.
80494 2011-05-16  Paul Eggert  <eggert@cs.ucla.edu>
80496         * build-aux/bootstrap (gnulib_tool): Handle symlink timestamps better.
80498 2011-05-13  Paul Eggert  <eggert@cs.ucla.edu>
80500         intprops-tests: new module
80501         * modules/intprops-tests, tests/test-intprops.c: New files.
80503         intprops: add safe, portable integer overflow checking
80504         * lib/intprops.h (_GL_INT_CONVERT, _GL_INT_TWOS_COMPLEMENT):
80505         (_GL_INT_SIGNED, _GL_INT_MINIMUM, _GL_INT_MAXIMUM):
80506         (_GL_SIGNED_INT_MINIMUM, INT_ADD_RANGE_OVERFLOW):
80507         (INT__SUBTRACT__RANGE_OVERFLOW, INT_NEGATE_RANGE_OVERFLOW):
80508         (INT_MULTIPLY_RANGE_OVERFLOW, INT_REMAINDER_RANGE_OVERFLOW):
80509         (INT_LEFT_SHIFT_RANGE_OVERFLOW, _GL_ADD_OVERFLOW):
80510         (_GL__SUBTRACT__OVERFLOW, _GL_MULTIPLY_OVERFLOW, _GL_DIVIDE_OVERFLOW):
80511         (_GL_REMAINDER_OVERFLOW, _GL_UNSIGNED_NEG_MULTIPLE, INT_ADD_OVERFLOW):
80512         (INT__SUBTRACT__OVERFLOW, INT_NEGATE_OVERFLOW, INT_MULTIPLY_OVERFLOW):
80513         (INT_DIVIDE_OVERFLOW, INT_REMAINDER_OVERFLOW):
80514         (INT_LEFT_SHIFT_OVERFLOW, _GL_BINARY_OP_OVERFLOW): New macros.
80516 2011-05-12  James Youngman  <jay@gnu.org>
80518         Add a test for glibc's Bugzilla bug #12378.
80519         * m4/fnmatch.m4: Use gnulib's fnmatch if the system fnmatch
80520         doesn't allow the literal matching of a lone "[" (which is
80521         required by POSIX).
80522         * tests/test-fnmatch.c (main): Check that "[/b" matches itself.
80524 2011-05-11  Ulrich Drepper  <drepper@gmail.com>
80526         Sync glibc change fixing Bugzilla bug #12378.
80527         * lib/fnmatch_loop.c (FCT): When matching '[' keep track of
80528         beginning and fall back to matching as normal character if the
80529         string ends before the matching ']' is found.  This is what POSIX
80530         requires.
80532 2011-05-13  Eric Blake  <eblake@redhat.com>
80534         getcwd-lgpl: relax test for FreeBSD
80535         * doc/posix-functions/getcwd.texi (getcwd): Document portability
80536         issue.
80537         * tests/test-getcwd-lgpl.c (main): Relax test.
80538         Reported by Matthias Bolte.
80540 2011-05-11  Eric Blake  <eblake@redhat.com>
80542         test-fflush: silence compiler warning
80543         * tests/test-fflush.c (main): Don't fclose a NULL pointer.
80545 2011-05-11  Bruno Haible  <bruno@clisp.org>
80547         canonicalize, canonicalize-lgpl: Avoid crash dialog on MacOS X.
80548         * m4/canonicalize.m4 (gl_FUNC_REALPATH_WORKS): Add GL_NOCRASH code.
80549         * modules/canonicalize (Depends-on): Add 'nocrash'.
80550         * modules/canonicalize-lgpl (Depends-on): Likewise.
80551         * doc/posix-functions/realpath.texi: Update platforms list.
80552         Reported by Ryan Schmidt <ryandesign@macports.org>.
80554 2011-05-11  Bruno Haible  <bruno@clisp.org>
80556         group-member: Declare function in <unistd.h>.
80557         * lib/unistd.in.h (group_member): New declaration.
80558         * lib/group-member.h: Remove file.
80559         * lib/group-member.c: Include <unistd.h> instead of group-member.h.
80560         * tests/test-unistd-c++.cc: Check signature of group_member.
80561         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER): Require
80562         gl_UNISTD_H_DEFAULTS. Set HAVE_GROUP_MEMBER.
80563         * m4/unistd_h.m4 (gl_UNISTD_H): Check whether group_member is declared.
80564         (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_GROUP_MEMBER,
80565         HAVE_GROUP_MEMBER.
80566         * modules/group-member (Files): Remove lib/group-member.h.
80567         (Depends-on): Add unistd. Specify conditions.
80568         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
80569         (Include): Change to <unistd.h>.
80570         * modules/unistd (Makefile.am): Substitute GNULIB_GROUP_MEMBER,
80571         HAVE_GROUP_MEMBER.
80572         * NEWS: Mention the change.
80573         * lib/euidaccess.c: Don't include group-member.h.
80575 2011-05-11  Bruno Haible  <bruno@clisp.org>
80577         group-member: Document module.
80578         * doc/glibc-functions/group_member.texi: Mention the 'group-member'
80579         module.
80581 2011-05-11  Bruno Haible  <bruno@clisp.org>
80583         fclose: Fix mistake earlier today.
80584         * lib/fclose.c (rpl_fclose): Don't assume that EOF < 0.
80586 2011-05-11  Eric Blake  <eblake@redhat.com>
80588         fclose: preserve fflush errors
80589         * lib/fclose.c (rpl_fclose): Don't lose fflush errors.
80590         Reported by Jim Meyering.
80592         bootstrap: support a prereq of 'rpcgen -' on RHEL5
80593         * build-aux/bootstrap (check_versions): When no specific version
80594         is required, merely check that the app produces an exit status
80595         that indicates its existence.
80597         maint.mk: drop redundant check
80598         * top/maint.mk (sc_the_the): Delete; sc_prohibit_doubled_word does
80599         the same but better.
80601 2011-05-11  Bruno Haible  <bruno@clisp.org>
80603         fclose: Fix possible link error.
80604         * lib/fclose.c (rpl_fclose): Invoke _gl_unregister_fd, not
80605         unregister_shadow_fd. Improve comments.
80606         * lib/sockets.c (close_fd_maybe_socket): Add comments. Reported by
80607         Eric Blake.
80609 2011-05-11  Jim Meyering  <meyering@redhat.com>
80611         maint.mk: improve "can not" detection and generalize rule name
80612         * top/maint.mk (sc_prohibit_undesirable_word_seq): Renamed from
80613         sc_prohibit_can_not, since we'll probably add a few more word pairs here.
80614         Use the same technique as in sc_prohibit_doubled_word, so that
80615         we recognize "can not" also when the words are separated by a newline.
80616         Suggested by Eric Blake.
80617         (perl_filename_lineno_text_): Define.  Factored out of...
80618         (prohibit_doubled_word_): ...here.  Use the new definition.
80619         (prohibit_undesirable_word_seq_): New var.  Use it here, too.
80620         (prohibit_undesirable_word_seq_RE_): New overridable variable.
80621         (ignore_undesirable_word_sequence_RE_): New overridable variable.
80623 2011-05-10  Eric Blake  <eblake@redhat.com>
80625         fclose: avoid double close race when possible
80626         * lib/fclose.c (rpl_fclose): Rewrite to avoid double-close race on
80627         all but WINDOWS_SOCKETS.
80629 2011-05-10  Bastien Roucariès  <roucaries.bastien@gmail.com>
80631         openat: correct new comment
80632         * lib/openat-proc.c (openat_proc_name): Correct the comment.
80634 2011-05-10  Jim Meyering  <meyering@redhat.com>
80636         openat: add comments
80637         * lib/openat-proc.c (openat_proc_name): Add comments,
80638         mostly from Eric Blake.
80640 2011-05-09  Eric Blake  <eblake@redhat.com>
80642         openat: reduce syscalls in first probe of /proc
80643         * lib/openat-proc.c (openat_proc_name): Require that /proc/self/fd
80644         be a directory.  Simplify the probe for .. bugs.
80645         * modules/openat (Depends-on): Drop same-inode.
80646         Reported by Bastien ROUCARIES.
80648 2011-05-09  Jim Meyering  <meyering@redhat.com>
80650         maint.mk: change semantics/name of tight_scope variables
80651         * top/maint.mk (_gl_TS_var_match, _gl_TS_function_match):
80652         Rename variables to align with semantics that make them more useful.
80654         maint.mk: tweak new rule's name not to impinge
80655         * top/maint.mk (_gl_tight_scope): Rename from sc_tight_scope-0.
80656         (sc_tight_scope): Use new rule name rather than $@-0.
80658         maint.mk: add a syntax-check rule to ensure tightly-scoped symbols
80659         * top/maint.mk (sc_tight_scope): New rule.
80660         (sc_tight_scope-0): New rule, ifdef'd out.
80661         (_gl_TS_dir): Default.
80662         (_gl_TS_unmarked_extern_functions, _gl_TS_function_regex): Define.
80663         (_gl_TS_unmarked_extern_vars, _gl_TS_var_regex): Define.
80665 2011-05-09  Simon Josefsson  <simon@josefsson.org>
80667         * m4/gc.m4: Remove gl_PREREQ_GC (not used).  Reported by Bruno
80668         Haible <bruno@clisp.org>.
80670 2011-05-08  Bruno Haible  <bruno@clisp.org>
80672         Comments.
80673         * m4/isnanf.m4: Add comment.
80674         * m4/isnanl.m4: Likewise.
80676 2011-05-08  Bruno Haible  <bruno@clisp.org>
80678         glob: Remove obsolete macro.
80679         * m4/glob.m4 (gl_GLOB_SUBSTITUTE): Remove macro.
80681 2011-05-08  Paul Eggert  <eggert@cs.ucla.edu>
80683         intprops: Sun C 5.11 supports __typeof__
80684         * lib/intprops.h (_GL_HAVE___TYPEOF__): New macro, which is set
80685         for either GCC 2 or later, as before, or for Sun C 5.11 or later,
80686         which is new.
80687         (_GL_SIGNED_TYPE_OR_EXPR): Use it.
80689         intprops: switch to usual gnulib indenting and naming
80690         * lib/intprops.h (_GL_INTPROPS_H): Rename from GL_INTPROPS_H.
80691         (_GL_SIGNED_TYPE_OR_EXPR): Rename from signed_type_or_expr__.
80693         * tests/test-inttostr.c (IS_TIGHT): Adjust to above renaming.
80695 2011-05-08  Jim Meyering  <meyering@redhat.com>
80697         maint.mk: suppress "Entering/Leaving directory" diag in announcement
80698         * top/maint.mk (release-prep): Use make's --no-print-directory
80699         option when generating the announcement.  This eliminates the
80700         pesky "make[2]: Entering/Leaving directory" diagnostics in the
80701         generated announcement template.
80703 2011-05-08  Bruno Haible  <bruno@clisp.org>
80705         tzset: Fix gettimeofday wrapper on Solaris 2.6.
80706         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): When invoking
80707         gl_GETTIMEOFDAY_REPLACE_LOCALTIME, also set REPLACE_GETTIMEOFDAY.
80709 2011-05-07  Paul Eggert  <eggert@cs.ucla.edu>
80711         ignore-value, verify: Omit include files from lib_SOURCES.
80712         * modules/ignore-value, modules/verify (Makefile.am):
80713         Don't put ignore-value.h, or verify.h, into lib_SOURCES, as
80714         that leads Automake to duplicate use of am__objects_... variables
80715         in Makefile.in.  See
80716         <http://lists.gnu.org/r/emacs-devel/2011-05/msg00257.html>.
80718 2011-05-07  Bruno Haible  <bruno@clisp.org>
80720         fclose: Simplify autoconf macro.
80721         * m4/fclose.m4 (gl_FUNC_FCLOSE): Assume gl_FUNC_FFLUSH_STDIN is
80722         defined.
80724 2011-05-07  Bruno Haible  <bruno@clisp.org>
80726         canonicalize-lgpl: Fix autoconf macro ordering bug.
80727         * m4/canonicalize.m4 (gl_CANONICALIZE_LGPL): Require
80728         gl_STDLIB_H_DEFAULTS.
80730 2011-05-06  Eric Blake  <eblake@redhat.com>
80732         maintainer-makefile: make sc_po_check easier to tune
80733         * top/maint.mk (sc_po_check): Allow overriding which non-VC files
80734         to probe for strings, such as an alternate location for gnulib.
80736         fclose: guarantee behavior on seekable stdin
80737         * modules/fclose (Depends-on): Add fflush.
80738         * doc/posix-functions/fclose.texi (fclose): Document this.
80739         * tests/test-fclose.c (main): Make test for this unconditional.
80741 2011-05-06  Bruno Haible  <bruno@clisp.org>
80743         fflush, fpurge: Relicense under LGPLv2+.
80744         * modules/fflush (License): Change from LGPLv3+ to LGPLv2+.
80745         * modules/fpurge (License): Likewise.
80746         With permission from Eric Blake and Jim Meyering.
80747         Suggested by Eric Blake.
80749 2011-05-06  Karl Berry  <karl@gnu.org>
80751         * MODULES.html.sh (func_all_modules): remove exit.
80753 2011-05-06  Jim Meyering  <meyering@redhat.com>
80755         maint.mk: use info-gnu@ as the default only for a stable release
80756         * top/maint.mk: Don't default to info-gnu for alpha or beta releases.
80757         For those, just use $(PACKAGE_BUGREPORT), in which case we don't have
80758         to set the Mail-Followup-To header.  Prompted by Reuben Thomas in
80759         http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/26488
80761 2011-05-05  Paul Eggert  <eggert@cs.ucla.edu>
80763         assert-h: new module, which supports C1X-style static_assert
80764         * lib/assert.in.h, m4/assert_h.m4, modules/assert-h: New files.
80765         * lib/verify.h: Revamp so that this can be copied into assert.h,
80766         while retaining the ability to use it standalone as before.
80767         Rename private identifiers so as not to encroach on the
80768         standard C namespace, since this is now used by assert.h.
80769         (_GL_VERIFY_TYPE): New macro, factoring out differing parts of
80770         the old verify_true.
80771         (_GL_VERIFY_TRUE): New macro, with much of the contents of
80772         the old verify_true.  Use _GL_VERIFY_TYPE.
80773         (_GL_VERIFY): New macro, with much of the contents of the old verify.
80774         (static_assert): New macro, if _GL_STATIC_ASSERT_H
80775         is defined and static_assert is not; _GL_STATIC_ASSERT_H is
80776         defined when this file is copied into the replacement assert.h.
80777         (_Static_assert): New macro, if _GL_STATIC_ASSERT_H is defined
80778         and _Static_assert is not built in.
80779         (verify_true, verify): Define only if _GL_STATIC_ASSERT_H is not
80780         defined, and use the new macros mentioned above.
80781         * doc/posix-headers/assert.texi: Document this.
80783 2011-05-05  Bruno Haible  <bruno@clisp.org>
80785         fclose, fflush: Respect rules for use of AC_LIBOBJ.
80786         * m4/fflush.m4 (gl_FUNC_FFLUSH): Don't invoke gl_REPLACE_FCLOSE.
80787         * m4/fclose.m4 (gl_FUNC_FCLOSE): Invoke gl_FUNC_FFLUSH_STDIN and
80788         gl_REPLACE_FCLOSE here.
80789         * modules/fflush (Depends-on): Remove fclose.
80790         * doc/posix-functions/fclose.texi: Mention module 'fflush' only in
80791         combination with module 'fclose'.
80793 2011-05-05  Bruno Haible  <bruno@clisp.org>
80795         fflush, fseeko: Respect rules for use of AC_LIBOBJ.
80796         * m4/fflush.m4 (gl_FUNC_FFLUSH_STDIN): New macro, extracted from
80797         gl_FUNC_FFLUSH.
80798         (gl_FUNC_FFLUSH): Use it.
80799         (gl_REPLACE_FFLUSH): Don't invoke gl_REPLACE_FSEEKO.
80800         * m4/fseeko.m4 (gl_FUNC_FSEEKO): Invoke gl_FUNC_FFLUSH_STDIN and
80801         gl_REPLACE_FSEEKO here.
80803 2011-05-05  Bruno Haible  <bruno@clisp.org>
80805         tzset: Relicense under LGPL.
80806         * modules/tzset (License): Change to LGPL.
80807         No agreement needed; it's a no-op.
80809         strtoimax, strtoumax: Relicense under LGPL.
80810         * modules/strtoimax (License): Change to LGPL.
80811         * modules/strtoumax (License): Likewise.
80812         With permission from Jim Meyering, Paul Eggert:
80813         <http://lists.gnu.org/r/bug-gnulib/2011-05/msg00124.html>
80814         <http://lists.gnu.org/r/bug-gnulib/2011-05/msg00109.html>
80816         getgroups: Relicense under LGPL.
80817         * modules/getgroups (License): Change to LGPL.
80818         With permission from Jim Meyering, Paul Eggert, Eric Blake:
80819         <http://lists.gnu.org/r/bug-gnulib/2011-05/msg00111.html>
80820         <http://lists.gnu.org/r/bug-gnulib/2011-05/msg00148.html>
80821         <http://lists.gnu.org/r/bug-gnulib/2011-05/msg00138.html>
80823         nanosleep: Relicense under LGPL.
80824         * modules/nanosleep (License): Change to LGPL.
80825         With permission from Jim Meyering, Paul Eggert, Eric Blake, Bruno
80826         Haible:
80827         <http://lists.gnu.org/r/bug-gnulib/2011-05/msg00111.html>
80828         <http://lists.gnu.org/r/bug-gnulib/2011-05/msg00148.html>
80829         <http://lists.gnu.org/r/bug-gnulib/2011-05/msg00138.html>
80830         <http://lists.gnu.org/r/bug-gnulib/2011-05/msg00131.html>
80832         futimens: Relicense under LGPL.
80833         * modules/futimens (License): Change to LGPL.
80834         With permission from Eric Blake:
80835         <http://lists.gnu.org/r/bug-gnulib/2011-05/msg00138.html>
80837         fflush: Relicense under LGPL.
80838         * modules/fflush (License): Change to LGPL.
80839         With permission from Eric Blake, Bruno Haible, Jim Meyering:
80840         <http://lists.gnu.org/r/bug-gnulib/2011-05/msg00138.html>
80841         <http://lists.gnu.org/r/bug-gnulib/2011-05/msg00131.html>
80842         <http://lists.gnu.org/r/bug-gnulib/2011-05/msg00133.html>
80844         tmpfile: Relicense under LGPL.
80845         * modules/tmpfile (License): Change to LGPL.
80846         With permission from Ben Pfaff:
80847         <http://lists.gnu.org/r/bug-gnulib/2010-12/msg00185.html>
80849         isfinite: Relicense under LGPL.
80850         * modules/isfinite (License): Change to LGPL.
80851         With permission from Ben Pfaff, Bruno Haible:
80852         <http://lists.gnu.org/r/bug-gnulib/2010-12/msg00185.html>
80853         <http://lists.gnu.org/r/bug-gnulib/2011-05/msg00130.html>
80855         acosl..tanl: Relicense under LGPL.
80856         * modules/acosl (License): Change to LGPL.
80857         * modules/asinl (License): Likewise.
80858         * modules/atanl (License): Likewise.
80859         * modules/cosl (License): Likewise.
80860         * modules/expl (License): Likewise.
80861         * modules/logl (License): Likewise.
80862         * modules/sinl (License): Likewise.
80863         * modules/sqrtl (License): Likewise.
80864         * modules/tanl (License): Likewise.
80865         Source code originally from glibc and Paolo Bonzini. Agreements:
80866         <http://lists.gnu.org/r/bug-gnulib/2011-05/msg00137.html>
80867         <http://lists.gnu.org/r/bug-gnulib/2011-05/msg00128.html>
80869 2011-05-05  Bruno Haible  <bruno@clisp.org>
80871         signal: Define sighandler_t.
80872         * lib/signal.in.h (sighandler_t): New type.
80873         * m4/signal_h.m4 (gl_SIGNAL_H): Require AC_USE_SYSTEM_EXTENSIONS. Test
80874         whether sighandler_t is defined.
80875         (gl_SIGNAL_H_DEFAULTS): Initialize HAVE_SIGHANDLER_T.
80876         * modules/signal (Depends-on): Add extensions.
80877         (Makefile.am): Substitute HAVE_SIGHANDLER_T.
80878         * doc/posix-headers/signal.texi: Mention the problem with sighandler_t.
80879         Suggested by Markus Steinborn <gnugv_maintainer@yahoo.de>.
80881 2011-05-05  Eric Blake  <eblake@redhat.com>
80883         maint: remove useless REPLACE_*_H macros
80884         * m4/arpa_inet_h.m4 (gl_REPLACE_ARPA_INET_H): Delete.
80885         * m4/dirent_h.m4 (gl_REPLACE_DIRENT_H): Likewise.
80886         * m4/locale_h.m4 (gl_REPLACE_LOCALE_H): Likewise.
80887         * m4/poll_h.m4 (gl_REPLACE_POLL_H): Likewise.
80888         * m4/spawn_h.m4 (gl_REPLACE_SPAWN_H): Likewise.
80889         * m4/sys_ioctl_h.m4 (gl_REPLACE_SYS_IOCTL_H): Likewise.
80890         * m4/wchar_h.m4 (gl_REPLACE_WCHAR_H): Likewise.
80891         * m4/btowc.m4: Update callers.
80892         * m4/dirfd.m4: Likewise.
80893         * m4/duplocale.m4: Likewise.
80894         * m4/fchdir.m4: Likewise.
80895         * m4/fdopendir.m4: Likewise.
80896         * m4/inet_ntop.m4: Likewise.
80897         * m4/inet_pton.m4: Likewise.
80898         * m4/ioctl.m4: Likewise.
80899         * m4/mbrlen.m4: Likewise.
80900         * m4/mbrtowc.m4: Likewise.
80901         * m4/mbsinit.m4: Likewise.
80902         * m4/mbsnrtowcs.m4: Likewise.
80903         * m4/mbsrtowcs.m4: Likewise.
80904         * m4/poll.m4: Likewise.
80905         * m4/setlocale.m4: Likewise.
80906         * m4/wcrtomb.m4: Likewise.
80907         * m4/wcsnrtombs.m4: Likewise.
80908         * m4/wcsrtombs.m4: Likewise.
80909         * m4/wctob.m4: Likewise.
80910         * m4/wcwidth.m4: Likewise.
80911         * modules/posix_spawn: Likewise.
80912         * modules/posix_spawn_file_actions_addclose: Likewise.
80913         * modules/posix_spawn_file_actions_adddup2: Likewise.
80914         * modules/posix_spawn_file_actions_addopen: Likewise.
80915         * modules/posix_spawn_file_actions_destroy: Likewise.
80916         * modules/posix_spawn_file_actions_init: Likewise.
80917         * modules/posix_spawnattr_destroy: Likewise.
80918         * modules/posix_spawnattr_getflags: Likewise.
80919         * modules/posix_spawnattr_getpgroup: Likewise.
80920         * modules/posix_spawnattr_getschedparam: Likewise.
80921         * modules/posix_spawnattr_getschedpolicy: Likewise.
80922         * modules/posix_spawnattr_getsigdefault: Likewise.
80923         * modules/posix_spawnattr_getsigmask: Likewise.
80924         * modules/posix_spawnattr_init: Likewise.
80925         * modules/posix_spawnattr_setflags: Likewise.
80926         * modules/posix_spawnattr_setpgroup: Likewise.
80927         * modules/posix_spawnattr_setschedparam: Likewise.
80928         * modules/posix_spawnattr_setschedpolicy: Likewise.
80929         * modules/posix_spawnattr_setsigdefault: Likewise.
80930         * modules/posix_spawnattr_setsigmask: Likewise.
80931         * modules/posix_spawnp: Likewise.
80933 2011-05-04  Reuben Thomas  <rrt@sc3d.org>
80935         Add option to do-release-commit-and-tag to specify branch.
80936         * build-aux/do-release-commit-and-tag: Add --branch.
80938 2011-05-03  Bruno Haible  <bruno@clisp.org>
80940         Avoid unnecessary compilation units, through conditional dependencies.
80941         * modules/accept (Depends-on): Add conditions to the dependencies.
80942         * modules/acosl (Depends-on): Likewise.
80943         * modules/argz (Depends-on): Likewise.
80944         * modules/asinl (Depends-on): Likewise.
80945         * modules/atanl (Depends-on): Likewise.
80946         * modules/atoll (Depends-on): Likewise.
80947         * modules/bind (Depends-on): Likewise.
80948         * modules/btowc (Depends-on): Likewise.
80949         * modules/canonicalize-lgpl (Depends-on): Likewise.
80950         * modules/ceil (Depends-on): Likewise.
80951         * modules/ceilf (Depends-on): Likewise.
80952         * modules/ceill (Depends-on): Likewise.
80953         * modules/chdir-long (Depends-on): Likewise.
80954         * modules/chown (Depends-on): Likewise.
80955         * modules/close (Depends-on): Likewise.
80956         * modules/connect (Depends-on): Likewise.
80957         * modules/cosl (Depends-on): Likewise.
80958         * modules/dirfd (Depends-on): Likewise.
80959         * modules/dprintf (Depends-on): Likewise.
80960         * modules/dprintf-posix (Depends-on): Likewise.
80961         * modules/error (Depends-on): Likewise.
80962         * modules/euidaccess (Depends-on): Likewise.
80963         * modules/expl (Depends-on): Likewise.
80964         * modules/faccessat (Depends-on): Likewise.
80965         * modules/fchdir (Depends-on): Likewise.
80966         * modules/fclose (Depends-on): Likewise.
80967         * modules/fcntl (Depends-on): Likewise.
80968         * modules/fdopendir (Depends-on): Likewise.
80969         * modules/fflush (Depends-on): Likewise.
80970         * modules/floor (Depends-on): Likewise.
80971         * modules/floorf (Depends-on): Likewise.
80972         * modules/floorl (Depends-on): Likewise.
80973         * modules/fnmatch (Depends-on): Likewise.
80974         * modules/fopen (Depends-on): Likewise.
80975         * modules/fprintf-posix (Depends-on): Likewise.
80976         * modules/frexp (Depends-on): Likewise.
80977         * modules/frexp-nolibm (Depends-on): Likewise.
80978         * modules/frexpl (Depends-on): Likewise.
80979         * modules/frexpl-nolibm (Depends-on): Likewise.
80980         * modules/fseek (Depends-on): Likewise.
80981         * modules/fsusage (Depends-on): Likewise.
80982         * modules/ftell (Depends-on): Likewise.
80983         * modules/ftello (Depends-on): Likewise.
80984         * modules/futimens (Depends-on): Likewise.
80985         * modules/getcwd (Depends-on): Likewise.
80986         * modules/getcwd-lgpl (Depends-on): Likewise.
80987         * modules/getdelim (Depends-on): Likewise.
80988         * modules/getdomainname (Depends-on): Likewise.
80989         * modules/getgroups (Depends-on): Likewise.
80990         * modules/gethostname (Depends-on): Likewise.
80991         * modules/getline (Depends-on): Likewise.
80992         * modules/getlogin_r (Depends-on): Likewise.
80993         * modules/getopt-posix (Depends-on): Likewise.
80994         * modules/getpeername (Depends-on): Likewise.
80995         * modules/getsockname (Depends-on): Likewise.
80996         * modules/getsockopt (Depends-on): Likewise.
80997         * modules/getsubopt (Depends-on): Likewise.
80998         * modules/getusershell (Depends-on): Likewise.
80999         * modules/glob (Depends-on): Likewise.
81000         * modules/grantpt (Depends-on): Likewise.
81001         * modules/iconv_open (Depends-on): Likewise.
81002         * modules/iconv_open-utf (Depends-on): Likewise.
81003         * modules/inet_ntop (Depends-on): Likewise.
81004         * modules/inet_pton (Depends-on): Likewise.
81005         * modules/ioctl (Depends-on): Likewise.
81006         * modules/isapipe (Depends-on): Likewise.
81007         * modules/isfinite (Depends-on): Likewise.
81008         * modules/isinf (Depends-on): Likewise.
81009         * modules/lchown (Depends-on): Likewise.
81010         * modules/ldexpl (Depends-on): Likewise.
81011         * modules/link (Depends-on): Likewise.
81012         * modules/linkat (Depends-on): Likewise.
81013         * modules/listen (Depends-on): Likewise.
81014         * modules/logl (Depends-on): Likewise.
81015         * modules/lstat (Depends-on): Likewise.
81016         * modules/mbrlen (Depends-on): Likewise.
81017         * modules/mbrtowc (Depends-on): Likewise.
81018         * modules/mbsinit (Depends-on): Likewise.
81019         * modules/mbsnrtowcs (Depends-on): Likewise.
81020         * modules/mbsrtowcs (Depends-on): Likewise.
81021         * modules/mbtowc (Depends-on): Likewise.
81022         * modules/memcmp (Depends-on): Likewise.
81023         * modules/mkdir (Depends-on): Likewise.
81024         * modules/mkdtemp (Depends-on): Likewise.
81025         * modules/mkfifo (Depends-on): Likewise.
81026         * modules/mkfifoat (Depends-on): Likewise.
81027         * modules/mknod (Depends-on): Likewise.
81028         * modules/mkostemp (Depends-on): Likewise.
81029         * modules/mkostemps (Depends-on): Likewise.
81030         * modules/mkstemp (Depends-on): Likewise.
81031         * modules/mkstemps (Depends-on): Likewise.
81032         * modules/mktime (Depends-on): Likewise.
81033         * modules/nanosleep (Depends-on): Likewise.
81034         * modules/open (Depends-on): Likewise.
81035         * modules/openat (Depends-on): Likewise.
81036         * modules/perror (Depends-on): Likewise.
81037         * modules/poll (Depends-on): Likewise.
81038         * modules/popen (Depends-on): Likewise.
81039         * modules/posix_spawn (Depends-on): Likewise.
81040         * modules/posix_spawn_file_actions_addclose (Depends-on): Likewise.
81041         * modules/posix_spawn_file_actions_adddup2 (Depends-on): Likewise.
81042         * modules/posix_spawn_file_actions_addopen (Depends-on): Likewise.
81043         * modules/posix_spawnp (Depends-on): Likewise.
81044         * modules/pread (Depends-on): Likewise.
81045         * modules/printf-posix (Depends-on): Likewise.
81046         * modules/ptsname (Depends-on): Likewise.
81047         * modules/putenv (Depends-on): Likewise.
81048         * modules/pwrite (Depends-on): Likewise.
81049         * modules/readline (Depends-on): Likewise.
81050         * modules/readlink (Depends-on): Likewise.
81051         * modules/readlinkat (Depends-on): Likewise.
81052         * modules/recv (Depends-on): Likewise.
81053         * modules/recvfrom (Depends-on): Likewise.
81054         * modules/regex (Depends-on): Likewise.
81055         * modules/remove (Depends-on): Likewise.
81056         * modules/rename (Depends-on): Likewise.
81057         * modules/renameat (Depends-on): Likewise.
81058         * modules/rmdir (Depends-on): Likewise.
81059         * modules/round (Depends-on): Likewise.
81060         * modules/roundf (Depends-on): Likewise.
81061         * modules/roundl (Depends-on): Likewise.
81062         * modules/rpmatch (Depends-on): Likewise.
81063         * modules/select (Depends-on): Likewise.
81064         * modules/send (Depends-on): Likewise.
81065         * modules/sendto (Depends-on): Likewise.
81066         * modules/setenv (Depends-on): Likewise.
81067         * modules/setlocale (Depends-on): Likewise.
81068         * modules/setsockopt (Depends-on): Likewise.
81069         * modules/shutdown (Depends-on): Likewise.
81070         * modules/sigaction (Depends-on): Likewise.
81071         * modules/signbit (Depends-on): Likewise.
81072         * modules/sigprocmask (Depends-on): Likewise.
81073         * modules/sinl (Depends-on): Likewise.
81074         * modules/sleep (Depends-on): Likewise.
81075         * modules/snprintf (Depends-on): Likewise.
81076         * modules/snprintf-posix (Depends-on): Likewise.
81077         * modules/socket (Depends-on): Likewise.
81078         * modules/sprintf-posix (Depends-on): Likewise.
81079         * modules/sqrtl (Depends-on): Likewise.
81080         * modules/stat (Depends-on): Likewise.
81081         * modules/strchrnul (Depends-on): Likewise.
81082         * modules/strdup-posix (Depends-on): Likewise.
81083         * modules/strerror (Depends-on): Likewise.
81084         * modules/strerror_r-posix (Depends-on): Likewise.
81085         * modules/strndup (Depends-on): Likewise.
81086         * modules/strnlen (Depends-on): Likewise.
81087         * modules/strptime (Depends-on): Likewise.
81088         * modules/strsep (Depends-on): Likewise.
81089         * modules/strsignal (Depends-on): Likewise.
81090         * modules/strstr-simple (Depends-on): Likewise.
81091         * modules/strtod (Depends-on): Likewise.
81092         * modules/strtoimax (Depends-on): Likewise.
81093         * modules/strtok_r (Depends-on): Likewise.
81094         * modules/strtoumax (Depends-on): Likewise.
81095         * modules/symlink (Depends-on): Likewise.
81096         * modules/symlinkat (Depends-on): Likewise.
81097         * modules/tanl (Depends-on): Likewise.
81098         * modules/tcgetsid (Depends-on): Likewise.
81099         * modules/tmpfile (Depends-on): Likewise.
81100         * modules/trunc (Depends-on): Likewise.
81101         * modules/truncf (Depends-on): Likewise.
81102         * modules/truncl (Depends-on): Likewise.
81103         * modules/uname (Depends-on): Likewise.
81104         * modules/unlink (Depends-on): Likewise.
81105         * modules/unlockpt (Depends-on): Likewise.
81106         * modules/unsetenv (Depends-on): Likewise.
81107         * modules/usleep (Depends-on): Likewise.
81108         * modules/utimensat (Depends-on): Likewise.
81109         * modules/vasprintf (Depends-on): Likewise.
81110         * modules/vdprintf (Depends-on): Likewise.
81111         * modules/vdprintf-posix (Depends-on): Likewise.
81112         * modules/vfprintf-posix (Depends-on): Likewise.
81113         * modules/vprintf-posix (Depends-on): Likewise.
81114         * modules/vsnprintf (Depends-on): Likewise.
81115         * modules/vsnprintf-posix (Depends-on): Likewise.
81116         * modules/vsprintf-posix (Depends-on): Likewise.
81117         * modules/wcrtomb (Depends-on): Likewise.
81118         * modules/wcscasecmp (Depends-on): Likewise.
81119         * modules/wcscspn (Depends-on): Likewise.
81120         * modules/wcsdup (Depends-on): Likewise.
81121         * modules/wcsncasecmp (Depends-on): Likewise.
81122         * modules/wcsnrtombs (Depends-on): Likewise.
81123         * modules/wcspbrk (Depends-on): Likewise.
81124         * modules/wcsrtombs (Depends-on): Likewise.
81125         * modules/wcsspn (Depends-on): Likewise.
81126         * modules/wcsstr (Depends-on): Likewise.
81127         * modules/wcstok (Depends-on): Likewise.
81128         * modules/wcswidth (Depends-on): Likewise.
81129         * modules/wctob (Depends-on): Likewise.
81130         * modules/wctomb (Depends-on): Likewise.
81131         * modules/wctype (Depends-on): Likewise.
81132         * modules/wcwidth (Depends-on): Likewise.
81133         * modules/write (Depends-on): Likewise.
81135 2011-05-03  Bruno Haible  <bruno@clisp.org>
81137         Support for conditional dependencies.
81138         * doc/gnulib.texi (Module description): Document the syntax of
81139         conditional dependencies.
81140         * gnulib-tool: New option --conditional-dependencies.
81141         (func_usage): Document it.
81142         (cond_dependencies): New variable.
81143         (func_get_automake_snippet_conditional,
81144         func_get_automake_snippet_unconditional): New functions, extracted from
81145         func_get_automake_snippet.
81146         (func_get_automake_snippet): Use them.
81147         (sed_first_32_chars): New variable.
81148         (func_module_shellfunc_name): New function.
81149         (func_module_shellvar_name): New function.
81150         (func_module_conditional_name): New function.
81151         (func_uncond_add_module, func_conddep_add_module, func_cond_module_p,
81152         func_cond_module_condition): New functions.
81153         (func_modules_transitive_closure): Add support for conditional
81154         dependencies.
81155         (func_emit_lib_Makefile_am): For a conditional module, enclose the
81156         conditional automake snippet in an automake conditional.
81157         (func_emit_autoconf_snippets): Emit shell functions that contain the
81158         code for conditional modules.
81159         (func_import, func_create_testdir): Update specification.
81161 2011-05-03  Eric Blake  <eblake@redhat.com>
81163         test-getaddrinfo: report error information
81164         * tests/test-getaddrinfo.c (simple): Use err outside of dbprintf.
81166 2011-05-03  Jim Meyering  <meyering@redhat.com>
81168         bootstrap: avoid build failure when $GZIP is set
81169         * build-aux/bootstrap (check_versions): Do not treat $GZIP as a
81170         program name.  If defined at all, it is supposed to list gzip options.
81171         Reported by Alan Curry in http://debbugs.gnu.org/8609
81173 2011-05-03  Reuben Thomas  <rrt@sc3d.org>
81175         readme-release: new module with release instructions
81176         * modules/readme-release: New module.
81177         * top/README-release: New file, from coreutils, grep, diffutils.
81178         * MODULES.html.sh (Support for maintaining and releasing): Add it.
81180 2011-05-02  Eric Blake  <eblake@redhat.com>
81182         fflush: also replace fclose when fixing fflush
81183         * modules/fflush (Depends-on): Add fclose.
81184         * m4/fflush.m4 (gl_FUNC_FFLUSH): Also replace fclose.
81185         * lib/fclose.c (rpl_fclose): Don't cause spurious failures on
81186         memstreams with no backing fd.
81187         * doc/posix-functions/fclose.texi (fclose): Document the use of
81188         fflush module to fix the bug.
81189         * tests/test-fclose.c (main): Relax test when fclose is used in
81190         isolation.
81192         fclose: add some tests
81193         * modules/fclose-tests: New test module.
81194         * tests/test-fclose.c: New file.
81195         * doc/posix-functions/fclose.texi (fclose): Document the bug.
81197         fclose: reduced dependencies
81198         * modules/fclose (Depends-on): Switch from fflush/fseeko to
81199         simpler lseek.
81200         * lib/fclose.c (rpl_fclose): Likewise.
81201         Reported by Simon Josefsson.
81203         exit: drop remaining clients
81204         * modules/argmatch (Depends-on): Replace exit with stdlib.
81205         * modules/copy-file (Depends-on): Likewise.
81206         * modules/execute (Depends-on): Likewise.
81207         * modules/exitfail (Depends-on): Likewise.
81208         * modules/obstack (Depends-on): Likewise.
81209         * modules/pagealign_alloc (Depends-on): Likewise.
81210         * modules/pipe-filter-gi (Depends-on): Likewise.
81211         * modules/pipe-filter-ii (Depends-on): Likewise.
81212         * modules/savewd (Depends-on): Likewise.
81213         * modules/spawn-pipe (Depends-on): Likewise.
81214         * modules/wait-process (Depends-on): Likewise.
81215         * modules/xsetenv (Depends-on): Likewise.
81216         * modules/chdir-long (Depends-on): Add stdlib, for EXIT_FAILURE.
81217         * modules/git-merge-changelog (Depends-on): Likewise.
81218         * modules/long-options (Depends-on): Likewise.
81219         * modules/pt_chown (Depends-on): Likewise.
81220         * modules/sysexits (Depends-on): Likewise.
81222         freading: relax license from LGPLv3+ to LGPLv2+
81223         * modules/freading (License): Relax LGPL version.
81225 2011-05-02  Bruno Haible  <bruno@clisp.org>
81227         fchdir: Remove unused dependencies.
81228         * modules/fchdir (Depends-on): Remove include_next.
81230 2011-05-02  Bruno Haible  <bruno@clisp.org>
81232         gnulib-tool: Refactor.
81233         * gnulib-tool (func_emit_autoconf_snippet): New function, extracted
81234         from func_emit_autoconf_snippets.
81235         (func_emit_autoconf_snippets): Use it.
81237 2011-05-02  Simon Josefsson  <simon@josefsson.org>
81239         * NEWS: Document removal of 'exit'.
81240         * modules/exit: Remove file.
81242 2011-05-01  Bruno Haible  <bruno@clisp.org>
81244         Update DEPENDENCIES.
81245         * DEPENDENCIES (gettext): Recommend the newest release.
81246         Reported by Simon Josefsson.
81248 2011-05-01  Bruno Haible  <bruno@clisp.org>
81250         gnulib-tool: Reduce code duplication.
81251         * gnulib-tool (func_emit_autoconf_snippets): New function.
81252         (func_import, func_create_testdir): Use it.
81254 2011-04-30  Eric Blake  <eblake@redhat.com>
81256         fclose: don't fail on non-seekable input stream
81257         * modules/fclose (Depends-on): Add freading, fflush, fseeko.
81258         * lib/fclose.c (rpl_fclose): Skip fflush for non-seekable input,
81259         since fflush is allowed to fail in that case.
81261 2011-04-30  Bruno Haible  <bruno@clisp.org>
81263         dup3: cleanup
81264         * lib/dup3.c: Remove old code, leftover from 2009-12-16.
81266 2011-04-30  Bruno Haible  <bruno@clisp.org>
81268         netdb: Make it work in C++ mode.
81269         * lib/netdb.in.h (struct addrinfo): In C++, define as a C struct.
81270         (getaddrinfo, freeaddrinfo, getnameinfo): Use macros from c++defs
81271         module.
81272         * m4/netdb_h.m4 (gl_NETDB_MODULE_INDICATOR): Invoke
81273         gl_MODULE_INDICATOR_FOR_TESTS.
81274         * modules/netdb-tests (Depends-on): Add netdb-c++-tests.
81275         * modules/netdb-c++-tests: New file.
81276         * tests/test-netdb-c++.cc: New file.
81278 2011-04-30  Bruno Haible  <bruno@clisp.org>
81280         New modules 'vfscanf', 'vscanf'.
81281         * modules/vfscanf: New file.
81282         * modules/vscanf: New file.
81283         * m4/stdio_h.m4 (gl_STDIO_H): Don't set GNULIB_VFSCANF, GNULIB_VSCANF
81284         here.
81285         * doc/posix-functions/vfscanf.texi: Mention module 'vfscanf'.
81286         * doc/posix-functions/vscanf.texi: Mention module 'vscanf'.
81288 2011-04-30  Bruno Haible  <bruno@clisp.org>
81290         passfd: Add comments.
81291         * lib/passfd.c: Add comments about platforms.
81293 2011-04-30  Bruno Haible  <bruno@clisp.org>
81295         sys_uio: Make <sys/uio.h> self-contained.
81296         * lib/sys_uio.in.h: Include <sys/types.h> before <sys/uio.h>.
81297         * doc/posix-headers/sys_uio.texi: Mention the OpenBSD problem.
81299 2011-04-30  Bruno Haible  <bruno@clisp.org>
81301         sys_socket: Ensure 'struct iovec' definition.
81302         * lib/sys_socket.in.h: Include <sys/uio.h> also on platforms that have
81303         <sys/socket.h>.
81304         * doc/posix-headers/sys_socket.texi: Mention the OpenBSD problem.
81306 2011-04-30  Bruno Haible  <bruno@clisp.org>
81308         sys_uio: Protect definition of 'struct iovec'.
81309         * lib/sys_uio.in.h (struct iovec): Avoid redefinition. In C++, define
81310         it as a C struct.
81312 2011-04-30  Bruno Haible  <bruno@clisp.org>
81314         manywarnings: fix indentation
81315         * m4/manywarnings.m4: Indent by 2 spaces consistently.
81317 2011-04-30  Pádraig Brady  <P@draigBrady.com>
81319         manywarnings: add -Wno-missing-field-initializers if needed.
81320         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Add the above
81321         option if it's needed to allow initialization with { 0, }
81323 2011-04-29  Reuben Thomas  <rrt@sc3d.org>
81325         announce-gen: cosmetic improvement
81326         * build-aux/announce-gen: Strip any leading ./ from the NEWS file name.
81328 2011-04-29  Jim Meyering  <meyering@redhat.com>
81330         vc-list-files: indent with spaces, not TABs
81331         * build-aux/vc-list-files: Convert leading TABs to spaces,
81332         to match the style of most other files in gnulib.
81334         announce-gen: indent with spaces, not TABs
81335         * build-aux/announce-gen: Convert all TABs to spaces, to match
81336         the style of most other files in gnulib.
81338 2011-04-29  Eric Blake  <eblake@redhat.com>
81340         quotearg: avoid uninitialized variable use
81341         * lib/quotearg.c (quoting_options_from_style): Initialize
81342         remaining fields, and ensure that custom styles are only used via
81343         quoting_options rather than quoting_style.
81345 2011-04-29  Jim Meyering  <meyering@redhat.com>
81347         maint.mk: remove unused VC-tag variable
81348         * top/maint.mk (VC-tag): Remove unused variable.
81350 2011-04-29  Bruno Haible  <bruno@clisp.org>
81352         netdb: fix gai_strerror replacements
81353         * lib/netdb.in.h: Add _GL_FUNCDECL_RPL definitions.
81354         * modules/netdb: Substitute it.
81356 2011-04-29  Jim Meyering  <meyering@redhat.com>
81358         test-getcwd.c: avoid new set-but-not-used warning
81359         * tests/test-getcwd.c (test_abort_bug): Exit nonzero for any problem,
81360         not just the glibc/abort one that getcwd-abort-bug.m4 detects.
81361         * m4/getcwd-abort-bug.m4: Update this now-duplicated code to match,
81362         and adjust the code that sets gl_cv_func_getcwd_abort_bug accordingly.
81364         test-hash.c: avoid a new shadowing warning
81365         * tests/test-hash.c (main): Don't shadow "dup".
81367 2011-04-28  Eric Blake  <eblake@redhat.com>
81369         getaddrinfo: fix gai_strerror signature
81370         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Detect broken signatures,
81371         and work around mingw with UNICODE defined.
81372         (gl_PREREQ_GETADDRINFO): Drop redundant decl check.
81373         * m4/netdb_h.m4 (gl_NETDB_H_DEFAULTS): Add witness.
81374         * modules/netdb (Makefile.am): Substitute it.
81375         * lib/netdb.in.h (gai_strerror): Declare replacement.
81376         * lib/gai_strerror.c (rpl_gai_strerror): Fix signature.
81377         * doc/posix-functions/gai_strerror.texi (gai_strerror): Document
81378         the fix.
81380         getsockopt: avoid compiler warning
81381         * lib/getsockopt.c (rpl_getsockopt): Add a cast for mingw.
81382         Reported by Matthias Bolte.
81384         tests: drop unused link dependency
81385         * modules/areadlinkat-tests (Makefile.am): Drop stale LDADD.
81386         * modules/dirent-safer-tests (Makefile.am): Likewise.
81387         * modules/fdopendir-tests (Makefile.am): Likewise.
81388         * modules/mkfifoat-tests (Makefile.am): Likewise.
81389         * modules/openat-safer-tests (Makefile.am): Likewise.
81390         * modules/openat-tests (Makefile.am): Likewise.
81391         * modules/readlinkat-tests (Makefile.am): Likewise.
81392         * modules/symlinkat-tests (Makefile.am): Likewise.
81393         * modules/linkat-tests (Makefile.am): Likewise.
81394         (Depends-on): Switch to filenamecat-lgpl.
81395         * modules/fdutimensat-tests (test_fdutimensat_LDADD): Drop unused
81396         LIBINTL.
81397         * modules/utimensat-tests (test_utimensat_LDADD): Likewise.
81398         * tests/test-linkat.c (main): Don't require xalloc.
81400         hash, mgetgroups: drop xalloc dependency
81401         * lib/hash.c (includes): Adjust includes.
81402         * lib/mgetgroups.c (includes): Likewise.
81403         (xgetgroups): Move...
81404         * lib/xgetgroups.c: ...to new file.
81405         * lib/mgetgroups.h (xgetgroups): Make declaration conditional.
81406         * modules/xgetgroups: New file, split from...
81407         * modules/mgetgroups: ...here.
81408         (Depends-on): Add xalloc-oversized.
81409         * modules/hash (Depends-on): Likewise.
81410         * modules/hash-tests (Depends-on): Drop xalloc.
81411         (test_hash_LDADD): Drop unused library.
81412         * tests/test-hash.c (main): Break xalloc dependency.
81413         (includes): Drop unused include.
81415         xalloc-oversized: new module
81416         * modules/xalloc-oversized: New module.
81417         * modules/xalloc (Depends-on): Add it.
81418         * lib/xalloc.h (xalloc_oversized): Move...
81419         * lib/xalloc-oversized.h: ...into new file.
81421         utimecmp: drop dependency on xmalloc
81422         * lib/utimecmp.c (utimecmp): Work even if hash table cache fails
81423         due to memory pressure.
81424         * modules/utimecmp (Depends-on): Drop xalloc.
81426 2011-04-27  Eric Blake  <eblake@redhat.com>
81428         getcwd: fix mingw bugs
81429         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Detect one mingw bug.
81430         * doc/posix-functions/getcwd.texi (getcwd): Document the problems.
81431         * lib/getcwd-lgpl.c (rpl_getcwd): Fix return type.
81433 2011-04-27  Bruno Haible  <bruno@clisp.org>
81435         mkstemps: Ensure declaration on MacOS X 10.5.
81436         * lib/stdlib.in.h: Include <unistd.h> when mkstemps is requested.
81437         * doc/glibc-functions/mkstemps.texi: Document header file problem on
81438         MacOS X.
81440 2011-04-27  Bruno Haible  <bruno@clisp.org>
81442         mkstemp: More documentation.
81443         * doc/posix-functions/mkstemp.texi: Document header file problem on
81444         MacOS X.
81446 2011-04-27  Bruno Haible  <bruno@clisp.org>
81448         mkstemp: Tweak configure message when cross-compiling.
81449         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): When cross-compiling, qualify the
81450         result as a guess.
81452 2011-04-27  Bruno Haible  <bruno@clisp.org>
81454         clean-temp: Clarify what it does.
81455         * lib/clean-temp.h: Add more comments.
81456         * doc/posix-functions/mkstemp.texi: Tweak reference to 'clean-temp'
81457         module.
81458         * doc/glibc-functions/mkostemp.texi: Mention 'clean-temp' here too.
81459         * doc/glibc-functions/mkstemps.texi: Likewise.
81460         * doc/glibc-functions/mkostemps.texi: Likewise.
81462 2011-04-27  Eric Blake  <eblake@redhat.com>
81464         fchdir: avoid extra chdir and fix test
81465         * modules/fchdir (Depends-on): Add dosname, filenamecat-lgpl,
81466         getcwd-lgpl.
81467         * lib/fchdir.c (get_name): Any absolute name will do; it does not
81468         have to be canonical.
81469         (canonicalize_file_name): Drop unused macro.
81470         * m4/dup2.m4 (gl_REPLACE_DUP2): Ensure dup2 is replaced.
81472         filenamecat-lgpl: fix licence
81473         * modules/filenamecat-lgpl (License): Mark as LGPLv2+, as intended
81474         when it was first created.
81476         linkat, renameat: add missing dependency
81477         * modules/linkat (Depends-on): Require getcwd-lgpl.
81478         * modules/renameat (Depends-on): Likewise.
81480         tests: reduce dependencies
81481         * tests/test-linkat.c (main): Use lighter-weight getcwd.
81482         * tests/test-renameat.c (main): Likewise.
81483         * modules/linkat-tests (Depends-on): Relax dependency.
81484         * modules/renameat-tests (Depends-on): Likewise.
81485         * modules/fchdir-tests (Depends-on): Likewise.  Also make cloexec
81486         dependency explicit.
81488         save-cwd: reduce default dependency
81489         * modules/save-cwd (Depends-on): Use getcwd-lgpl.
81490         * lib/save-cwd.c: Update comments.
81491         * NEWS: Document the semantic change.
81493         getcwd: enhance tests
81494         * tests/test-getcwd-lgpl.c: New file, taken from...
81495         * tests/test-getcwd.c: ...old contents.  Rewrite this file to
81496         repeat long path stress tests from m4 probe.
81497         * modules/getcwd-lgpl-tests: New module.
81498         * modules/getcwd-tests (Depends-on): Depend on lgpl tests.
81499         * m4/getcwd-abort-bug.m4: Update comment.
81500         * m4/getcwd-path-max.m4: Likewise.
81502         getcwd-lgpl: new module
81503         * modules/getcwd-lgpl: New module.
81504         * lib/getcwd-lgpl.c: New file.
81505         * doc/posix-functions/getcwd.texi (getcwd): Document it.
81506         * MODULES.html.sh (lacking POSIX:2008): Likewise.
81507         * modules/getcwd (configure.ac): Set C witness.
81508         * m4/getcwd.m4 (gl_FUNC_GETCWD_LGPL): New macro.
81510         getcwd: tweak comments
81511         * m4/getcwd-abort-bug.m4: Fix comments.
81512         * m4/getcwd-path-max.m4: Likewise.
81513         * m4/getcwd.m4: Likewise.
81515 2011-04-27  Reuben Thomas  <rrt@sc3d.org>
81516         and Eric Blake  <eblake@redhat.com>
81518         mkstemp: replace if system version uses wrong permissions
81519         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Add test for non-owner
81520         read/write mode bits set in file created by mkstemp.
81521         * doc/posix-functions/mkstemp.texi (mkstemp): Document the fix.
81523 2011-04-27  Eric Blake  <eblake@redhat.com>
81525         passfd: avoid compiler warning
81526         * lib/passfd.c (sendfd, recvfd): Avoid shadowing names.
81527         Reported by Laine Stump.
81529 2011-04-27  J.T. Conklin  <jtc@acorntoolworks.com>  (tiny change)
81531         * gnulib-tool: change "join -a 2" to "join -a2", the latter is
81532         required by the NetBSD (and perhaps other 4.4BSD derived) join.
81534 2011-04-27  Reuben Thomas  <rrt@sc3d.org>
81535         and Eric Blake  <eblake@redhat.com>
81537         mkstemp: mention clean-temp module
81538         * lib/mkstemp.c: Add comment.
81539         * doc/posix-functions/mkstemp.texi (mkstemp): Likewise.
81541 2011-04-26  Paul Eggert  <eggert@cs.ucla.edu>
81543         inttypes: also provide default values for 32-bit tests
81544         * m4/inttypes.m4 (gl_INTTYPES_H_DEFAULTS): Also provide default values
81545         for INT32_MAX_LT_INTMAX_MAX and for UINT32_MAX_LT_UINTMAX_MAX.
81547 2011-04-25  Paul Eggert  <eggert@cs.ucla.edu>
81549         strtoumax: remove dependency on strtoimax
81550         This is like the strtoull change of yesterday.
81551         * modules/strtoumax (Files): Add lib/strtoimax.c.
81552         (Depends-on): Remove strtoimax and add verify.
81554         inttypes-incomplete: new module
81555         * m4/inttypes.m4 (gl_INTTYPES_INCOMPLETE): New macro, containing
81556         all but the PRI* and SCN* parts of gl_INTTYPES_H.
81557         (gl_INTTYPES_PRI_SCN): New macro, containing the PRI* and SCN* parts
81558         of gl_INTTYPES_H.
81559         (gl_INTTYPES_H): Rewrite in terms of these new macros.
81560         (gl_INTTYPES_H_DEFAULTS): Provide defaults for the PRI* and SCN*
81561         parts, in case gl_INTTYPE_PRI_SCN is not invoked.
81562         * modules/imaxabs, modules/imaxdiv, modules/strtoimax (Depends-on):
81563         * modules/strtoumax, modules/xstrtol (Depends-on):
81564         Depend on inttypes-incomplete, not inttypes.
81565         * modules/inttypes-incomplete: New module, containing the contents
81566         of the old modules/inttypes module, except that the Files: section
81567         omits m4/inttypes-pri.m4, and the configure.ac section invokes
81568         gl_INTTYPES_INCOMPLETE rather than gl_INTTYPES_H.
81569         * modules/inttypes (Files): Remove lib/inttypes.in.h, m4/inttypes.m4.
81570         (Depends-on): Depend only on inttypes-incomplete.
81571         (Makefile.am): Remove everything; this is now in inttypes-incomplete.
81573         inttypes: omit now-redundant strtoimax and strtoumax work
81574         * m4/inttypes.m4 (gl_INTTYPES_H): Do not check for strtoimax and
81575         strtoumax decls; gl_FUNC_STRTOIMAX and gl_FUNC_STRTOUMAX now do this.
81577         strtoimax, strtoumax: simplify, port to HP-UX 11.00 64-bit
81578         This supports apps that need pointers to strtoimax and strtoumax,
81579         and ports to HP-UX 11.00 64.bit, which has macros that expand to
81580         nonexistent functions.  See
81581         <http://lists.gnu.org/r/bug-gnulib/2011-04/msg00241.html>
81582         et seq.
81583         * lib/inttypes.in.h (strtoimax, strtoumax): #undef before declaring.
81584         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Don't check whether it's
81585         a macro.
81586         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Likewise.
81588 2011-04-25  Simon Josefsson  <simon@josefsson.org>
81590         * modules/gnumakefile (configure.ac): Replace TAB with SPCs.
81592 2011-04-25  Bruno Haible  <bruno@clisp.org>
81594         strtol, strtoul: Mark modules as obsolete.
81595         * modules/strtol (Status, Notice): New sections.
81596         * modules/strtoul (Status, Notice): New sections.
81598 2011-04-25  Bruno Haible  <bruno@clisp.org>
81600         strtod: Remove check for strtod, unless supporting old platforms.
81601         * modules/strtod-obsolete: New file.
81602         * m4/strtod-obsolete.m4: New file.
81603         * m4/strtod.m4 (gl_FUNC_STRTOD): Don't check whether strtod is declared
81604         if gl_FUNC_STRTOD_OBSOLETE is not also defined.
81605         * modules/strtod (Depends-on): Add strtod-obsolete.
81606         * doc/posix-functions/strtod.texi: Mention module strtod-obsolete.
81608 2011-04-25  Bruno Haible  <bruno@clisp.org>
81610         strcase: Make module obsolete.
81611         * modules/strcase (Status, Notice): New sections.
81613 2011-04-25  Bruno Haible  <bruno@clisp.org>
81615         dup2: Remove check for dup2, unless supporting old obsolete platforms.
81616         * modules/dup2-obsolete: New file.
81617         * m4/dup2-obsolete.m4: New file.
81618         * m4/dup2.m4 (gl_FUNC_DUP2): Don't check whether dup2 exists if
81619         gl_FUNC_DUP2_OBSOLETE is not also defined.
81620         * modules/dup2 (Depends-on): Add dup2-obsolete.
81621         * doc/posix-functions/dup2.texi: Mention module dup2-obsolete.
81623 2011-04-25  Bruno Haible  <bruno@clisp.org>
81625         strnlen: Avoid memchr related link error on old obsolete platforms.
81626         * modules/memchr-obsolete: New file.
81627         * m4/memchr-obsolete.m4: New file.
81628         * m4/memchr.m4 (gl_FUNC_MEMCHR): Don't check whether memchr exists if
81629         gl_FUNC_MEMCHR_OBSOLETE is not also defined.
81630         * modules/memchr (Depends-on): Add memchr-obsolete.
81631         * modules/strnlen (Depends-on): Likewise.
81632         * doc/posix-functions/memchr.texi: Mention module memchr-obsolete.
81634 2011-04-25  Jim Meyering  <meyering@redhat.com>
81636         maint.mk: makefile_at_at_check extend and clean up
81637         * top/maint.mk (sc_makefile_at_at_check): Check *.mk files
81638         in addition to */Makefile.am.
81639         Exempt legitimate uses of @VAR@ notation, e.g.,
81640         MAKEINFO = env LANG= LC_MESSAGES= LC_ALL= LANGUAGE= @MAKEINFO@
81641         Remove obsolete coreutils-specific comment.
81642         Prompted by discussion here:
81643         http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/26074
81645 2011-04-24  Paul Eggert  <eggert@cs.ucla.edu>
81647         strtoul: remove dependency on strtol
81648         This is so that 'configure' need not check for strtol merely because
81649         the application needs strtoul.
81650         * modules/strtoul (Files): Add lib/strtol.c.
81651         (Depends-on): Remove strtol.
81653         strtoull: remove dependency on strtoul
81654         This is like the strtoll change.
81655         * modules/strtoull (Files): Add lib/strtol.c, lib/strtoul.c.
81656         (Depends-on): Remove strtoul.
81658         strtoll: remove dependency on strtol
81659         This is so that 'configure' need not check for strtol merely because
81660         the application needs strtoll.
81661         * modules/strtoll (Files): Add lib/strtol.c.
81662         (Depends-on): Remove strtol.
81664 2011-04-22  Paul Eggert  <eggert@cs.ucla.edu>
81666         inttypes: Move some configure check to module 'imaxdiv'.
81667         * m4/imaxdiv.m4 (gl_FUNC_IMAXDIV): Require gl_INTTYPES_H_DEFAULTS
81668         instead of gl_INTTYPES_H.  Check for imaxdiv decl here.
81669         * m4/inttypes.m4 (gl_INTTYPES_H): Don't check for imaxdiv decl here.
81671 2011-04-22  Paul Eggert  <eggert@cs.ucla.edu>
81673         inttypes: Move some configure check to module 'imaxabs'.
81674         * m4/imaxabs.m4 (gl_FUNC_IMAXABS): Require gl_INTTYPES_H_DEFAULTS
81675         instead of gl_INTTYPES_H.  Check for imaxabs decl here.
81676         * m4/inttypes.m4 (gl_INTTYPES_H): Don't check for imaxabs decl here.
81678 2011-04-22  Paul Eggert  <eggert@cs.ucla.edu>
81680         inttypes: Remove configure tests that are not needed since 2009-12-31.
81681         * m4/inttypes.m4 (gl_INTTYPES_H): Remove determination of
81682         gl_cv_header_working_inttypes_h.
81684 2011-04-22  Paul Eggert  <eggert@cs.ucla.edu>
81686         * modules/strnlen (Depends-on): Remove memchr.
81687         The strnlen implementation doesn't need the memchr module's fixes; see
81688         <http://lists.gnu.org/r/bug-gnulib/2011-04/msg00237.html>.
81690         strtol: remove dependency on wchar
81691         * lib/strtol.c: Include <wchar.h> only if USE_WIDE_CHAR is defined.
81692         * modules/strtol (Depends-on): Remove wchar.
81694 2011-04-21  Eric Blake  <eblake@redhat.com>
81696         passfd: fix test regression on Linux
81697         * modules/passfd-tests (configure.ac): Correct socketpair check.
81699         passfd: speed up configure and drop unused code
81700         * m4/afunix.m4 (gl_SOCKET_AFUNIX): Rename...
81701         * m4/passfd.m4 (gl_PASSFD): ...to something more fitting of
81702         its use.  Drop test for setting unused HAVE_UNIXSOCKET_SCM_RIGHTS.
81703         Instead of probing at configure for unix_scm_rights_bsd44_way,
81704         instead probe for CMSG_FIRSTHDR at compile time.  Simplify BSD 4.3
81705         check to a struct member probe.
81706         * lib/passfd.c (includes): Nothing here requires <sys/un.h>.
81707         (sendfd, recvfd): Update preprocessor checks.
81708         * modules/passfd (Files): Reflect rename, and drop unused file.
81709         (Depends-on): Drop unused dependency.
81711         passfd: allow compilation on mingw
81712         * modules/sys_socket (Depends-on): Add sys_uio.
81713         * lib/sys_socket.in.h [!@HAVE_SYS_SOCKET_H@]: Use it for struct
81714         iovec and a minimal struct msghdr.
81715         * m4/afunix.m4 (gl_SOCKET_AFUNIX): Detect recvmsg/sendmsg.
81716         * tests/test-sys_socket.c (main): Enhance test.
81717         * lib/passfd.c (include): Drop <sys/uio.h>; <sys/sockets.h> is
81718         guaranteed to provide what we need.
81719         (sendmsg, recvmsg): Declare fallbacks if we lack sendmsg.
81720         * modules/passfd-tests (Depends-on): Add sys_wait.
81721         * tests/test-passfd.c (main): Skip test on mingw, for now.
81722         * doc/posix-headers/sys_socket.texi (sys/socket.h): Document the
81723         partial 'struct msghdr' implementation.
81725         sys_uio: new module
81726         * modules/sys_uio: New module.
81727         * modules/sys_uio-tests: Likewise.
81728         * lib/sys_uio.in.h: New file.
81729         * m4/sys_uio_h.m4: Likewise.
81730         * tests/test-sys_uio.c: Likewise.
81731         * doc/posix-headers/sys_uio.texi (sys/uio.h): Document it.
81732         * MODULES.html.sh (systems lacking POSIX:2008): Likewise.
81734 2011-04-20  Jim Meyering  <meyering@redhat.com>
81736         useless-if-before-free: avoid false-positive
81737         * build-aux/useless-if-before-free: Adjust regexp for the non-brace
81738         disjunct so that it too requires a terminating ";".  Without that,
81739         this script would identify as useless one statement from gcc that
81740         was not:
81741           if (aligned_ptr)
81742             free (((void **) aligned_ptr) [-1]);
81744 2011-04-20  Giuseppe Scrivano  <gscrivano@gnu.org>
81746         doc: update users.txt.
81747         * users.txt: Add barcode.
81749 2011-04-19  Bruno Haible  <bruno@clisp.org>
81751         ioctl: Remove link dependency on native Windows.
81752         * lib/fd-hook.h: Renamed from lib/close-hook.h.
81753         (gl_close_fn, gl_ioctl_fn): New types.
81754         (struct fd_hook): Renamed from struct close_hook. Change type of
81755         private_close_fn field. Add private_ioctl_fn field.
81756         (close_hook_fn): Add parameter for primary close method.
81757         (execute_close_hooks, execute_all_close_hooks): Likewise.
81758         (ioctl_hook_fn): New type.
81759         (execute_ioctl_hooks, execute_all_ioctl_hooks): New declarations.
81760         (register_fd_hook): Renamed from register_close_hook. Add ioctl_hook
81761         argument.
81762         (unregister_fd_hook): Renamed from unregister_close_hook.
81763         * lib/fd-hook.c: Renamed from lib/close-hook.c.
81764         Don't include <unistd.h>.
81765         (close): Remove undef.
81766         (anchor): Update.
81767         (execute_close_hooks): Add argument for primary close method.
81768         (execute_all_close_hooks): Likewise.
81769         (execute_ioctl_hooks, execute_all_ioctl_hooks): New functions.
81770         (register_fd_hook): Renamed from register_close_hook. Add ioctl_hook
81771         argument. Allow each argument to be NULL.
81772         (unregister_fd_hook): Renamed from unregister_close_hook.
81773         * lib/close.c (rpl_close): Pass 'close' function pointer to
81774         execute_all_close_hooks.
81775         * lib/ioctl.c: Include <errno.h>, fd-hook.h.
81776         (primary_ioctl): New function.
81777         (ioctl): Don't call ioctlsocket here. Instead, call
81778         execute_all_ioctl_hooks.
81779         * lib/sockets.c (close_fd_maybe_socket): Add argument for primary
81780         close method.
81781         (ioctl_fd_maybe_socket): New function, with code from lib/ioctl.c.
81782         (fd_sockets_hook): Renamed from close_sockets_hook.
81783         (gl_sockets_startup, gl_sockets_cleanup): Update.
81784         * modules/fd-hook: Renamed from modules/close-hook. Update.
81785         * modules/close (Depends-on): Add fd-hook, remove close-hook.
81786         * modules/sockets (Depends-on): Likewise.
81787         * modules/ioctl (Depends-on): Add fd-hook.
81788         * tests/test-nonblocking.c (main): Use GNULIB_TEST_SOCKET, not
81789         GNULIB_SOCKET.
81791 2011-04-19  Bruno Haible  <bruno@clisp.org>
81793         Move the support of O_NONBLOCK in open() to the 'open' module.
81794         * modules/nonblocking (Depends-on): Remove 'open'.
81795         * m4/nonblocking.m4 (gl_NONBLOCKING_IO_BODY): Set
81796         gl_cv_have_open_O_NONBLOCK.
81797         * m4/open.m4 (gl_FUNC_OPEN): Replace open() also when required for
81798         O_NONBLOCK support.
81799         * doc/posix-functions/open.texi: Document support for O_NONBLOCK.
81801 2011-04-17  Bruno Haible  <bruno@clisp.org>
81803         pipe2: Simplify code.
81804         * lib/pipe2.c (pipe2): Reduce code duplication.
81806 2011-04-17  Bruno Haible  <bruno@clisp.org>
81808         nonblocking: Add comment.
81809         * lib/fcntl.in.h (O_NONBLOCK): Add comment.
81811 2011-04-17  Bruno Haible  <bruno@clisp.org>
81813         nonblocking: Add tests for sockets.
81814         * tests/test-nonblocking-socket.sh: New file.
81815         * tests/test-nonblocking-socket-main.c: New file.
81816         * tests/test-nonblocking-socket-child.c: New file.
81817         * tests/test-nonblocking-socket.h: New file.
81818         * tests/socket-server.h: New file.
81819         * tests/socket-client.h: New file.
81820         * modules/nonblocking-socket-tests: New file.
81821         * modules/nonblocking-tests (Depends-on): Add nonblocking-socket-tests.
81823 2011-04-17  Bruno Haible  <bruno@clisp.org>
81825         nonblocking: Add tests for pipes.
81826         * tests/test-nonblocking-pipe.sh: New file.
81827         * tests/test-nonblocking-pipe-main.c: New file.
81828         * tests/test-nonblocking-pipe-child.c: New file.
81829         * tests/test-nonblocking-pipe.h: New file.
81830         * tests/test-nonblocking-writer.h: New file.
81831         * tests/test-nonblocking-reader.h: New file.
81832         * tests/test-nonblocking-misc.h: New file.
81833         * modules/nonblocking-pipe-tests: New file.
81834         * modules/nonblocking-tests (Depends-on): Add nonblocking-pipe-tests.
81836 2011-04-16  Bruno Haible  <bruno@clisp.org>
81838         gettext: Clarify the needed programmer actions.
81839         * modules/gettext (Notice): New field.
81840         Suggested by Ben Pfaff <blp@cs.stanford.edu>.
81842 2011-04-16  Bruno Haible  <bruno@clisp.org>
81844         strchrnul: Tweak last commit.
81845         * doc/glibc-functions/strchrnul.texi: Add more details about Cygwin
81846         bug.
81847         * lib/string.in.h (strchrnul): Use same arguments in _GL_FUNCDECL_RPL
81848         as in _GL_FUNCDECL_SYS.
81849         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Invoke gl_PREREQ_STRCHRNUL after
81850         AC_LIBOBJ. When cross-compiling, say "guessing yes" not "yes".
81852 2011-04-15  Eric Blake  <eblake@redhat.com>
81854         strchrnul: work around cygwin bug
81855         * doc/glibc-functions/strchrnul.texi (strchrnul): Document bug.
81856         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Detect it.
81857         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): New witness.
81858         * modules/string (Makefile.am): Substitute it.
81859         * lib/string.in.h (strchrnul): Use it.
81861 2011-04-15  Bruno Haible  <bruno@clisp.org>
81863         Don't require lib/stdio-write.c when only module 'stdio' is used.
81864         * m4/stdio_h.m4 (gl_STDIO_H): Move the AC_LIBOBJ back into the m4_ifdef
81865         invocation.
81866         Reported by Rob Vermaas <rob.vermaas@gmail.com>.
81868 2011-04-14  Bruno Haible  <bruno@clisp.org>
81870         Support non-blocking pipe I/O in read() on native Windows.
81871         * lib/unistd.in.h: Include <sys/types.h> also for 'read'.
81872         (read): New declaration.
81873         * lib/read.c: New file.
81874         * lib/stdio.in.h (_GL_ATTRIBUTE_FORMAT_SCANF,
81875         _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM): New macros.
81876         (fgetc, fgets, fread, fscanf, getc, getchar, gets, scanf, vfscanf,
81877         vscanf): New declarations.
81878         * lib/stdio-read.c: New file.
81879         * m4/read.m4: New file.
81880         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_READ,
81881         REPLACE_READ.
81882         * m4/stdio_h.m4 (gl_STDIO_H): Set GNULIB_FGETC, GNULIB_FGETS,
81883         GNULIB_FREAD, GNULIB_FSCANF, GNULIB_GETC, GNULIB_GETCHAR, GNULIB_GETS,
81884         GNULIB_SCANF, GNULIB_VFSCANF, GNULIB_VSCANF. In non-blocking I/O is
81885         desired and needs workarounds, set REPLACE_STDIO_READ_FUNCS.
81886         (gl_STDIO_H_DEFAULTS): Initialize GNULIB_FGETC, GNULIB_FGETS,
81887         GNULIB_FREAD, GNULIB_FSCANF, GNULIB_GETC, GNULIB_GETCHAR, GNULIB_GETS,
81888         GNULIB_SCANF, GNULIB_VFSCANF, GNULIB_VSCANF, REPLACE_STDIO_READ_FUNCS.
81889         * modules/read: New file.
81890         * modules/nonblocking (Files): Add lib/stdio-read.c.
81891         * modules/unistd (Makefile.am): Substitute GNULIB_READ, REPLACE_READ.
81892         * modules/stdio (Makefile.am): Substitute GNULIB_FGETC, GNULIB_FGETS,
81893         GNULIB_FREAD, GNULIB_FSCANF, GNULIB_GETC, GNULIB_GETCHAR, GNULIB_GETS,
81894         GNULIB_SCANF, GNULIB_VFSCANF, GNULIB_VSCANF, REPLACE_STDIO_READ_FUNCS.
81895         * modules/pread (Depends-on): Add read.
81896         * modules/safe-read (Depends-on): Likewise.
81897         * tests/test-stdio-c++.cc (fgetc, fgets, fread, fscanf, getc, getchar,
81898         gets, scanf, vfscanf, vscanf): Verify signatures.
81899         * doc/posix-functions/read.texi: Mention 'nonblocking' module and
81900         problem with non-blocking pipes.
81901         * doc/posix-functions/fgetc.texi: Likewise.
81902         * doc/posix-functions/fgets.texi: Likewise.
81903         * doc/posix-functions/fread.texi: Likewise.
81904         * doc/posix-functions/fscanf.texi: Likewise.
81905         * doc/posix-functions/getc.texi: Likewise.
81906         * doc/posix-functions/getchar.texi: Likewise.
81907         * doc/posix-functions/gets.texi: Likewise.
81908         * doc/posix-functions/scanf.texi: Likewise.
81909         * doc/posix-functions/vfscanf.texi: Likewise.
81910         * doc/posix-functions/vscanf.texi: Likewise.
81912 2011-04-14  Bruno Haible  <bruno@clisp.org>
81914         Support non-blocking pipe I/O in write() on native Windows.
81915         * lib/write.c (rpl_write): Split a write request that failed merely
81916         because the byte count was larger than the pipe buffer's size.
81917         * doc/posix-functions/write.texi: Mention the problem with large byte
81918         counts.
81920 2011-04-14  Bruno Haible  <bruno@clisp.org>
81922         wchar: Ensure that wchar_t gets defined on uClibc.
81923         * lib/wchar.in.h: On uClibc, include <stddef.h>.
81924         Reported by Giuseppe Scrivano <gscrivano@gnu.org>.
81926 2011-04-13  Bruno Haible  <bruno@clisp.org>
81928         safe-write, full-read: Avoid unnecessary compilation units.
81929         * modules/safe-write (Files): Add lib/safe-read.c, m4/safe-read.m4.
81930         (Depends-on): Remove safe-read. Add ssize_t.
81931         * modules/full-read (Files): Add lib/full-write.c.
81932         (Depends-on): Add full-write.
81934 2011-04-13  Bruno Haible  <bruno@clisp.org>
81936         Support non-blocking pipe I/O and SIGPIPE in pwrite().
81937         * modules/pwrite (Depends-on): Add 'write'.
81939 2011-04-13  Bruno Haible  <bruno@clisp.org>
81941         Support non-blocking pipe I/O in write() on native Windows.
81942         * lib/unistd.in.h (write): Enable replacement also if
81943         GNULIB_UNISTD_H_NONBLOCKING is 1.
81944         * lib/write.c: Enable replacement also if GNULIB_NONBLOCKING.
81945         (rpl_write): When failing to write on a non-blocking pipe, change
81946         errno from ENOSPC to EAGAIN.
81947         * lib/stdio.in.h (fprintf, fputc, fputs, fwrite, printf, putc,
81948         putchar, puts, vfprintf, vprintf): Enable replacement also if
81949         GNULIB_STDIO_H_NONBLOCKING is 1.
81950         * lib/stdio-write.c: Enable replacements also if GNULIB_NONBLOCKING.
81951         (CLEAR_ERRNO, HANDLE_ENOSPC): New macros.
81952         (CLEAR_LastError, HANDLE_ERROR_NO_DATA): New macros, extracted from
81953         CALL_WITH_SIGPIPE_EMULATION.
81954         (CALL_WITH_SIGPIPE_EMULATION): Use them.
81955         * m4/nonblocking.m4: New file.
81956         * m4/write.m4 (gl_FUNC_WRITE): Enable REPLACE_WRITE also if required
81957         for non-blocking I/O support.
81958         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize
81959         GNULIB_UNISTD_H_NONBLOCKING.
81960         * m4/stdio_h.m4 (gl_STDIO_H): Enable REPLACE_STDIO_WRITE_FUNCS also if
81961         required for non-blocking I/O support.
81962         (gl_STDIO_H_DEFAULTS): Initialize GNULIB_STDIO_H_NONBLOCKING.
81963         * modules/nonblocking (Files): Add m4/nonblocking.m4,
81964         lib/stdio-write.c, m4/asm-underscore.m4.
81965         (Depends-on): Add stdio, unistd.
81966         (configure.ac): Invoke gl_NONBLOCKING_IO. Define GNULIB_NONBLOCKING.
81967         Set GNULIB_STDIO_H_NONBLOCKING, GNULIB_UNISTD_H_NONBLOCKING.
81968         * modules/unistd (Makefile.am): Substitute GNULIB_UNISTD_H_NONBLOCKING.
81969         * modules/stdio (Makefile.am): Substitute GNULIB_STDIO_H_NONBLOCKING.
81970         * doc/posix-functions/fprintf.texi: Mention 'nonblocking' module and
81971         problem with non-blocking pipes.
81972         * doc/posix-functions/fputc.texi: Likewise.
81973         * doc/posix-functions/fputs.texi: Likewise.
81974         * doc/posix-functions/fwrite.texi: Likewise.
81975         * doc/posix-functions/printf.texi: Likewise.
81976         * doc/posix-functions/putc.texi: Likewise.
81977         * doc/posix-functions/putchar.texi: Likewise.
81978         * doc/posix-functions/puts.texi: Likewise.
81979         * doc/posix-functions/vfprintf.texi: Likewise.
81980         * doc/posix-functions/vprintf.texi: Likewise.
81981         * doc/posix-functions/write.texi: Likewise.
81983 2011-04-10  Jim Meyering  <meyering@redhat.com>
81985         maint.mk: prohibit doubled words
81986         Detect them also when they're separated by a newline.
81987         There are 3 ways to customize it:
81988           - disable the test on a per file basis, as usual with rules using
81989             $(VC_LIST_EXCEPT)
81990           - replace the default doubled-word-selecting regexp (affects all files)
81991           - ignore a particular file-vs-doubled-word match
81992         I nearly used that last one to ignore the "is is" match in
81993         coreutils' NEWS file, since the text was "ls -is is ..."
81994         To do that, I would have added this line to cfg.mk:
81995           ignore_doubled_word_match_RE_ = ^NEWS:[0-9]+:is[ ]is$
81996         but it would have ignored any "is is" match in NEWS.
81997         Low probability, but still...
81998         Instead, I changed the text, slightly:
81999           -  ls -is is now consistent with ls -lis in ignoring values returned
82000           +  "ls -is" is now consistent with ls -lis in ignoring values returned
82001         * top/maint.mk (prohibit_double_word_RE_): Provide default.
82002         (prohibit_doubled_word_): Define.
82003         (sc_prohibit_doubled_word): New rule.
82004         (sc_prohibit_the_the): Remove.  Subsumed by the above.
82006 2011-04-10  Jim Meyering  <meyering@redhat.com>
82008         maint: fix doubled-word typo in comment
82009         * m4/gethostname.m4: s/is is/it is/
82010         * m4/getdomainname.m4: Likewise.
82012 2011-04-10  Jim Meyering  <meyering@redhat.com>
82014         maint: remove doubled word: s/it it/it/
82015         * lib/stat-time.h (get_stat_birthtime): s/it it/it/
82017 2011-04-10  Jim Meyering  <meyering@redhat.com>
82019         maint.mk: remove useless semicolon and backslash
82020         * top/maint.mk (sc_prohibit_empty_lines_at_EOF): Remove stray
82021         semicolon and backslash.
82023 2011-04-10  Bruno Haible  <bruno@clisp.org>
82025         stdint test: Fix compilation failure on OSF/1 with DTK compiler.
82026         * modules/stdint-tests (Depends-on): Add wchar.
82028 2011-04-10  Jim Meyering  <meyering@redhat.com>
82030         maint: remove doubled words in comments, e.g., s/a a/a/
82031         * lib/strptime.c (day_of_the_week): s/the the/the/
82032         * tests/test-chown.h (test_chown): s/a a/a/
82034         test-chown.h: correct a cast
82035         * tests/test-chown.h (test_chown): Cast -1 to gid_t (not uid_t)
82036         when the destination is a stat.st_gid.
82038 2011-04-09  Mats Erik Andersson  <mats.andersson@gisladisker.se>  (tiny change)
82040         getaddrinfo: Fix test for sa_len member.
82041         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): When testing for sa_len,
82042         include <sys/types.h> before <sys/socket.h>.
82044 2011-04-09  Paul Eggert  <eggert@cs.ucla.edu>
82046         maint: change "can not" to "cannot"
82047         * doc/posix-functions/iconv.texi (iconv): This one crossed line
82048         boundaries.
82050 2011-04-09  Jim Meyering  <meyering@redhat.com>
82052         maint: change "a a" to "a"
82053         * tests/test-lchown.h (test_lchown): s/a a/a/
82055         maint.mk: prohibit \<the the\>
82056         * top/maint.mk (sc_prohibit_the_the): New rule.
82058         maint: fix "the the" in comment
82059         * lib/count-one-bits.h: s/the the/the/
82061         maint: change "can not" to "cannot"
82062         But do not change the occurrences in maintain.texi or in
82063         build-aux/po/Makefile.in.in, which I presume comes from gettext.
82064         * doc/gnulib-tool.texi: s/can not/cannot/
82065         * doc/posix-functions/accept.texi (accept): Likewise.
82066         * doc/posix-functions/socket.texi (socket): Likewise.
82067         * lib/mbrtowc.c: Likewise.
82069         maint.mk: prohibit use of "can not"
82070         * top/maint.mk (sc_prohibit_can_not): New rule.
82071         Writing "can not" (rather than "cannot") is too common.  Prohibit it.
82073 2011-04-09  Bruno Haible  <bruno@clisp.org>
82075         careadlinkat: Guard against misuse of careadlinkatcwd.
82076         * lib/careadlinkat.c: Include <stdlib.h>.
82077         (careadlinkatcwd): Check that the fd argument is as expected.
82079 2011-04-09  Bruno Haible  <bruno@clisp.org>
82081         careadlinkat: Use common coding style.
82082         * lib/careadlinkat.c: Move gnulib includes after system includes.
82084 2011-04-09  Bruno Haible  <bruno@clisp.org>
82086         careadlinkat: Clarify specification.
82087         * lib/careadlinkat.h (careadlinkat): Clarify preadlinkat argument.
82088         (careadlinkatcwd): Add comment.
82089         * lib/careadlinkat.c (careadlinkat): Clarify preadlinkat argument.
82091 2011-04-09  Bruno Haible  <bruno@clisp.org>
82093         areadlinkat: Avoid link error on many platforms.
82094         * modules/areadlinkat (Depends-on): Add areadlink.
82096 2011-04-09  Bruno Haible  <bruno@clisp.org>
82098         allocator, careadlinkat: Fix double-inclusion guard.
82099         * lib/allocator.h: Fix double-inclusion guard.
82100         * lib/careadlinkat.h: Likewise.
82102 2011-04-09  Bruno Haible  <bruno@clisp.org>
82104         relocatable-prog-wrapper: Update after module 'areadlink' changed.
82105         * lib/relocwrapper.c: Update dependencies hierarchy.
82106         * build-aux/install-reloc: Update list of files to be compiled.
82107         * modules/relocatable-prog-wrapper (Files): Add lib/careadlinkat.[hc],
82108         lib/allocator.[hc].
82110 2011-04-08  Eric Blake  <eblake@redhat.com>
82112         strftime: silence gnulib-tool warning
82113         * modules/strftime-tests (Depends-on): Drop automatic dependency.
82115 2011-04-08  Bruno Haible  <bruno@clisp.org>
82117         verify: Fix syntax error with GCC 4.6 in C++ mode.
82118         * lib/verify.h (HAVE__STATIC_ASSERT): Don't define in C++ mode.
82119         (HAVE_STATIC_ASSERT): New macro.
82120         (verify_true, verify): Use 'static_assert' if it is supported and
82121         '_Static_assert' is not supported.
82123 2011-04-08  Paul Eggert  <eggert@cs.ucla.edu>
82125         allocator: New module.
82126         * modules/allocator, lib/allocator.c: New files.
82127         * lib/allocator.h (stdlib_allocator): New decl.
82128         * lib/careadlinkat.c (_GL_USE_STDLIB_ALLOC, standard_allocator):
82129         Remove.  Do not include <stdlib.h>.
82130         (careadlinkat): Use stdlib_allocator instead of rolling our own.
82131         * modules/careadlinkat (Files): Remove lib/allocator.h.
82132         (Depends-on): Add allocator.
82134         stdlib: let modules use system malloc, realloc
82135         * lib/stdlib.in.h (malloc, realloc): Don't #define or add warnings
82136         if !_GL_USE_STDLIB_ALLOC.
82137         (malloc, realloc): Limit this change to a smaller scope.
82139         * lib/careadlinkat.c (_GL_USE_STDLIB_ALLOC): Define.
82140         (malloc, realloc): Don't #undef; no longer needed.
82141         * lib/malloca.c (_GL_USE_STDLIB_ALLOC, malloc): Likewise.
82142         * lib/progreloc.c (_GL_USE_STDLIB_ALLOC, malloc): Likewise.
82143         * lib/setenv.c (_GL_USE_STDLIB_ALLOC, malloc, realloc): Likewise.
82144         * lib/canonicalize-lgpl.c (_GL_USE_STDLIB_ALLOC, malloc): Likewise.
82145         * lib/relocatable.c (_GL_USE_STDLIB_ALLOC, malloc): Likewise.
82146         * lib/relocwrapper.c (_GL_USE_STDLIB_ALLOC, malloc): Likewise.
82147         * lib/malloc.c (_GL_USE_STDLIB_ALLOC, malloc): Likewise.
82148         * lib/realloc.c (_GL_USE_STDLIB_ALLOC, malloc, realloc): Likewise.
82150         careadlinkat: rename members to avoid problem
82151         * lib/allocator.h (struct allocator): Rename members from
82152         malloc/realloc to allocate/reallocate, to avoid problems if malloc
82153         and realloc are #define'd.  Reported by Eric Blake in
82154         <http://lists.gnu.org/r/bug-gnulib/2011-04/msg00091.html>.
82155         * lib/careadlinkat.c (careadlinkat): Adjust to renaming.
82157 2011-04-08  Eric Blake  <eblake@redhat.com>
82159         nonblocking: reduce dependency
82160         * tests/test-nonblocking.c: Only test sockets when in use.
82161         * modules/nonblocking-tests (Depends-on): Drop socket.
82162         (Makefile.am): Link even if sockets are not present.
82163         * modules/pipe2-tests (Makefile.am): Likewise.
82164         * lib/ioctl.c (ioctl) [WIN32]: Fail if sockets are not also in use.
82166         pipe2: fix O_NONBLOCK support on mingw
82167         * modules/pipe2 (Depends-on): Add nonblocking.
82168         * lib/pipe2.c (pipe2) [WIN32]: Add O_NONBLOCK support.
82169         * tests/test-pipe2.c (is_nonblocking): Adjust test accordingly.
82170         * tests/test-nonblocking.c (main): Likewise.
82171         * modules/pipe2-tests (Makefile.am): Avoid link failure.
82173         fcntl-h: fix O_ACCMODE on cygwin
82174         * doc/posix-headers/fcntl.texi (fcntl.h): Document the bug.
82175         * lib/fcntl.in.h (O_ACCMODE): Fix it.
82177         pipe-filter: drop O_NONBLOCK workarounds
82178         * modules/pipe-filter-gi (Depends-on): Add fcntl-h.
82179         * modules/pipe-filter-ii (Depends-on): Likewise.
82180         * lib/pipe-filter-aux.h (O_NONBLOCK): Delete workaround.
82182         nonblocking: provide O_NONBLOCK for mingw
82183         * modules/nonblocking (Depends-on): Add open.
82184         (configure.ac): Set new witness macro.
82185         * m4/fcntl_h.m4 (gl_FCNTL_H_DEFAULTS): Provide default for it.
82186         * modules/fcntl-h (Makefile.am): Substitute it.
82187         * lib/fcntl.in.h (O_NONBLOCK): Guarantee non-zero definition when
82188         nonblocking module is in use.
82189         * lib/nonblocking.c: Adjust portability test.
82190         * lib/open.c (open): Don't let native open see gnulib flag.
82191         * tests/test-fcntl-h.c (main): Enhance test.
82192         * tests/test-open.h (test_open): Likewise.
82193         * doc/posix-headers/fcntl.texi (fcntl.h): Document the replacement.
82195         careadlinkat: fix compilation error on mingw
82196         * lib/careadlinkat.c (standard_allocator): Avoid renaming fields
82197         within struct allocator.
82199 2011-04-06  Eric Blake  <eblake@redhat.com>
82201         binary-io: relicense under LGPLv2+
82202         * modules/binary-io (License): Relax to LGPLv2+.
82203         Requested for libvirt, and required by pipe2.
82205 2011-04-06  Paul Eggert  <eggert@cs.ucla.edu>
82207         verify: use _Static_assert if available
82208         * lib/verify.h (HAVE__STATIC_ASSERT): New macro.
82209         (verify_true, verify): Use it if available.  This generates better
82210         diagnostics with GCC 4.6.0 and later.
82212 2011-04-05  Bruno Haible  <bruno@clisp.org>
82214         Remove leftover generated .h files after config.status changed.
82216         * m4/alloca.m4 (gl_FUNC_ALLOCA): New automake conditional
82217         GL_GENERATE_ALLOCA_H.
82218         * modules/alloca-opt (Makefile.am): Remove alloca.h if
82219         GL_GENERATE_ALLOCA_H evaluates to false.
82221         * m4/argz.m4 (gl_FUNC_ARGZ): New automake conditional
82222         GL_GENERATE_ARGZ_H.
82223         * modules/argz (Makefile.am): Remove argz.h if GL_GENERATE_ARGZ_H
82224         evaluates to false.
82226         * m4/byteswap.m4 (gl_BYTESWAP): New automake conditional
82227         GL_GENERATE_BYTESWAP_H.
82228         * modules/byteswap (Makefile.am): Remove byteswap.h if
82229         GL_GENERATE_BYTESWAP_H evaluates to false.
82231         * m4/errno_h.m4 (gl_HEADER_ERRNO_H): New automake conditional
82232         GL_GENERATE_ERRNO_H.
82233         * modules/errno (Makefile.am): Remove errno.h if GL_GENERATE_ERRNO_H
82234         evaluates to false.
82236         * m4/float_h.m4 (gl_FLOAT_H): New automake conditional
82237         GL_GENERATE_FLOAT_H.
82238         * modules/float (Makefile.am): Remove float.h if GL_GENERATE_FLOAT_H
82239         evaluates to false.
82241         * m4/fnmatch.m4 (gl_FUNC_FNMATCH_POSIX): New automake conditional
82242         GL_GENERATE_FNMATCH_H.
82243         * modules/fnmatch (Makefile.am): Remove fnmatch.h if
82244         GL_GENERATE_FNMATCH_H evaluates to false.
82246         * m4/glob.m4 (gl_GLOB_SUBSTITUTE, gl_GLOB): New automake conditional
82247         GL_GENERATE_GLOB_H.
82248         * modules/glob (Makefile.am): Remove glob.h if GL_GENERATE_GLOB_H
82249         evaluates to false.
82251         * m4/iconv_h.m4 (gl_REPLACE_ICONV_H, gl_ICONV_H_DEFAULTS): New
82252         automake conditional GL_GENERATE_ICONV_H.
82253         * modules/iconv-h (Makefile.am): Remove iconv.h if GL_GENERATE_ICONV_H
82254         evaluates to false.
82256         * m4/netinet_in_h.m4 (gl_HEADER_NETINET_IN): New automake conditional
82257         GL_GENERATE_NETINET_IN_H.
82258         * modules/netinet_in (Makefile.am): Remove netinet/in.h if
82259         GL_GENERATE_NETINET_IN_H evaluates to false.
82261         * m4/pthread.m4 (gl_PTHREAD_CHECK): Set PTHREAD_H here. New automake
82262         conditional GL_GENERATE_PTHREAD_H.
82263         (gl_PTHREAD_DEFAULTS): Don't set PTHREAD_H here.
82264         * modules/pthread (Makefile.am): Remove pthread.h if
82265         GL_GENERATE_PTHREAD_H evaluates to false.
82267         * m4/sched_h.m4 (gl_SCHED_H): New automake conditional
82268         GL_GENERATE_SCHED_H.
82269         * modules/sched (Makefile.am): Remove sched.h if GL_GENERATE_SCHED_H
82270         evaluates to false.
82272         * m4/selinux-context-h.m4 (gl_HEADERS_SELINUX_CONTEXT_H): New automake
82273         conditional GL_GENERATE_SELINUX_CONTEXT_H.
82274         * modules/selinux-h (Makefile.am): Remove selinux/context.h if
82275         GL_GENERATE_SELINUX_CONTEXT_H evaluates to false.
82277         * m4/stdarg.m4 (gl_STDARG_H): New automake conditional
82278         GL_GENERATE_STDARG_H.
82279         * modules/stdarg (Makefile.am): Remove stdarg.h if
82280         GL_GENERATE_STDARG_H evaluates to false.
82282         * m4/stdbool.m4 (AM_STDBOOL_H): New automake conditional
82283         GL_GENERATE_STDBOOL_H.
82284         * modules/stdbool (Makefile.am): Remove stdbool.h if
82285         GL_GENERATE_STDBOOL_H evaluates to false.
82287         * m4/stddef_h.m4 (gl_STDDEF_H): Set STDDEF_H here. New automake
82288         conditional GL_GENERATE_STDDEF_H.
82289         (gl_STDDEF_H_DEFAULTS): Don't set STDDEF_H here.
82290         * modules/stddef (Makefile.am): Remove stddef.h if
82291         GL_GENERATE_STDDEF_H evaluates to false.
82293         * m4/stdint.m4 (gl_STDINT_H): New automake conditional
82294         GL_GENERATE_STDINT_H.
82295         * modules/stdint (Makefile.am): Remove stdint.h if
82296         GL_GENERATE_STDINT_H evaluates to false.
82298         * m4/sysexits.m4 (gl_SYSEXITS): New automake conditional
82299         GL_GENERATE_SYSEXITS_H.
82300         * modules/sysexits (Makefile.am): Remove sysexits.h if
82301         GL_GENERATE_SYSEXITS_H evaluates to false.
82303         Reported by Karl Berry and Ralf Wildenhues.
82305 2011-04-05  Bruno Haible  <bruno@clisp.org>
82307         Ensure to rebuild generated .h files when config.status has changed.
82308         * modules/arpa_inet (Makefile.am): Add dependency from .h file to
82309         config.status.
82310         * modules/ctype (Makefile.am): Likewise.
82311         * modules/dirent (Makefile.am): Likewise.
82312         * modules/errno (Makefile.am): Likewise.
82313         * modules/fcntl-h (Makefile.am): Likewise.
82314         * modules/float (Makefile.am): Likewise.
82315         * modules/getopt-posix (Makefile.am): Likewise.
82316         * modules/glob (Makefile.am): Likewise.
82317         * modules/iconv-h (Makefile.am): Likewise.
82318         * modules/inttypes (Makefile.am): Likewise.
82319         * modules/langinfo (Makefile.am): Likewise.
82320         * modules/locale (Makefile.am): Likewise.
82321         * modules/math (Makefile.am): Likewise.
82322         * modules/netdb (Makefile.am): Likewise.
82323         * modules/netinet_in (Makefile.am): Likewise.
82324         * modules/poll-h (Makefile.am): Likewise.
82325         * modules/pthread (Makefile.am): Likewise.
82326         * modules/pty (Makefile.am): Likewise.
82327         * modules/sched (Makefile.am): Likewise.
82328         * modules/search (Makefile.am): Likewise.
82329         * modules/selinux-h (Makefile.am): Likewise.
82330         * modules/signal (Makefile.am): Likewise.
82331         * modules/spawn (Makefile.am): Likewise.
82332         * modules/stdarg (Makefile.am): Likewise.
82333         * modules/stdbool (Makefile.am): Likewise.
82334         * modules/stddef (Makefile.am): Likewise.
82335         * modules/stdint (Makefile.am): Likewise.
82336         * modules/stdio (Makefile.am): Likewise.
82337         * modules/stdlib (Makefile.am): Likewise.
82338         * modules/string (Makefile.am): Likewise.
82339         * modules/strings (Makefile.am): Likewise.
82340         * modules/sys_file (Makefile.am): Likewise.
82341         * modules/sys_ioctl (Makefile.am): Likewise.
82342         * modules/sys_select (Makefile.am): Likewise.
82343         * modules/sys_socket (Makefile.am): Likewise.
82344         * modules/sys_stat (Makefile.am): Likewise.
82345         * modules/sys_time (Makefile.am): Likewise.
82346         * modules/sys_times (Makefile.am): Likewise.
82347         * modules/sys_utsname (Makefile.am): Likewise.
82348         * modules/sys_wait (Makefile.am): Likewise.
82349         * modules/sysexits (Makefile.am): Likewise.
82350         * modules/termios (Makefile.am): Likewise.
82351         * modules/time (Makefile.am): Likewise.
82352         * modules/unistd (Makefile.am): Likewise.
82353         * modules/wchar (Makefile.am): Likewise.
82354         * modules/wctype-h (Makefile.am): Likewise.
82355         Reported by Karl Berry, Eric Blake, and Ralf Wildenhues.
82357 2011-04-05  Bruno Haible  <bruno@clisp.org>
82359         pipe2: Relicense under LGPLv2+.
82360         * modules/pipe2 (License): Change to LGPLv2+.
82361         Requested by Eric Blake, for libvirt.
82363 2011-04-05  Bruce Korb  <bkorb@gnu.org>
82365         bootstrap: compute gnulib_extra_files after updating build_aux
82366         * build-aux/bootstrap (gnulib_extra_files): bootstrap.conf may
82367         change build_aux or also supply gnulib_extra_files.  Handle correctly.
82369 2011-04-05  Eric Blake  <eblake@redhat.com>
82371         bootstrap: preserve git whitelist item sorting
82372         * build-aux/bootstrap (sort_patterns): New function.
82373         (insert_sorted_if_absent): Use it to sink ! lines to the bottom.
82375 2011-04-05  Simon Josefsson  <simon@josefsson.org>
82377         * top/maint.mk (sc_prohibit_empty_lines_at_EOF): Don't trigger
82378         sc_space_tab check.
82380 2011-04-05  Paul Eggert  <eggert@cs.ucla.edu>
82382         areadlink, areadlinkat: rewrite in terms of careadlinkat
82383         * lib/areadlink.c, lib/areadlinkat.c: Include careadlinkat.h
82384         instead of errno.h, limits.h, stdint.h, stdlib.h, string.h, unistd.h.
82385         (SSIZE_MAX, INITIAL_BUF_SIZE): Remove.
82386         (malloc, realloc): Remove #undefs.
82387         (areadlink, areadlinkat): Rewrite in terms of careadlinkat.
82388         * modules/areadlink (Depends-on): Add careadlinkat.  Remove
82389         readlink, ssize_t, stdint, unistd.
82390         * modules/areadlinkat (Depends-on): Add careadlinkat.  Remove
82391         areadlink, stdint.
82393         careadlinkat: new module
82394         * lib/allocator.h, lib/careadlinkat.h, lib/careadlinkat.c:
82395         * modules/careadlinkat: New files, written by me with
82396         a review and feedback from Ben Pfaff in
82397         <http://lists.gnu.org/r/bug-gnulib/2011-04/msg00008.html>.
82399 2011-04-01  Bruno Haible  <bruno@clisp.org>
82401         wmemchr, wcschr, wcsrchr, wcspbrk, wcsstr: Avoid errors in C++ mode.
82402         * lib/wchar.in.h (wmemchr, wcschr, wcsrchr, wcspbrk, wcsstr): Use
82403         _GL_CXXALIAS_SYS_CAST2 instead of _GL_CXXALIAS_SYS. On glibc >= 2.10
82404         systems, use _GL_CXXALIASWARN1 instead of _GL_CXXALIASWARN.
82405         Reported by Bruce Korb <bruce.korb@gmail.com>.
82407 2011-04-01  Bruno Haible  <bruno@clisp.org>
82409         wcpcpy, wcpncpy: Ensure declaration on glibc >= 2.13 systems.
82410         * m4/wcpcpy.m4 (gl_FUNC_WCPCPY): Require AC_USE_SYSTEM_EXTENSIONS.
82411         * m4/wcpncpy.m4 (gl_FUNC_WCPNCPY): Likewise.
82412         * modules/wcpcpy (Depends-on): Add extensions.
82413         * modules/wcpncpy (Depends-on): Likewise.
82414         * doc/posix-functions/wcpcpy.texi: Mention missing declaration on glibc
82415         systems.
82416         * doc/posix-functions/wcpncpy.texi: Likewise.
82417         * doc/posix-functions/wcwidth.texi: Likewise.
82419 2011-03-31  Eric Blake  <eblake@redhat.com>
82421         nonblocking: fix mingw test failures
82422         * lib/nonblocking.c (set_nonblocking_flag): Succeed when clearing
82423         non-blocking flag on regular file.
82424         (get_nonblocking_flag): Set errno on invalid fd.
82425         * tests/test-nonblocking.c (main): Avoid test failure on
82426         directories if fchdir is not active.
82427         * modules/nonblocking-tests (Depends-on): Drop unused dependency.
82429 2011-03-31  Bruno Haible  <bruno@clisp.org>
82431         Fix bug with gl_WARN_ON_USE_PREPARE, introduced on 2011-01-23.
82432         * m4/gnulib-common.m4 (gl_ASSERT_NO_GNULIB_POSIXCHECK): Hide the
82433         gl_WARN_ON_USE_PREPARE definition from 'aclocal'.
82434         Reported by Simon Josefsson <simon@josefsson.org>.
82436 2011-03-31  Bruno Haible  <bruno@clisp.org>
82437         and Eric Blake  <eblake@redhat.com>
82439         nonblocking: new module
82440         * modules/nonblocking: New module.
82441         * modules/nonblocking-tests: Likewise.
82442         * lib/nonblocking.h: New file.
82443         * lib/nonblocking.c: Likewise.
82444         * tests/test-nonblocking.c: New test.
82445         * lib/ioctl.c (ioctl) [mingw]: Update comment.
82447 2011-03-30  Bruno Haible  <bruno@clisp.org>
82449         stdio: Avoid GCC >= 4.4 warnings when using %lld and similar on mingw.
82450         * lib/stdio.in.h (_GL_ATTRIBUTE_FORMAT_PRINTF): Use 'gnu_printf' format
82451         instead of 'printf' format for GCC >= 4.4.
82452         (_GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM): New macro.
82453         (fprintf, printf, vfprintf, vprintf): Declare with
82454         _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM when the function ends up calling
82455         the system's vfprintf() function.
82456         Reported by Daniel P. Berrange <berrange@redhat.com> via Eric Blake.
82458 2011-03-30  Eric Blake  <eblake@redhat.com>
82460         passfd: fix scoping bug
82461         * lib/passfd.c (sendfd, recvfd): Don't let buf go out of scope
82462         before sendmsg/recvmsg.
82464         passfd: standardize coding conventions
82465         * m4/afunix.m4 (gl_SOCKET_AFUNIX): Drop check for something that
82466         can be learned at compile time.
82467         * lib/passfd.c (MSG_CMSG_CLOEXEC): Reduce number of in-function
82468         ifdefs.
82469         (sendfd, recvfd): Follow gnulib code conventions.
82471         passfd: fix incorrect sendmsg arguments
82472         * lib/passfd.c (sendfd): Avoid uninitialized msg_flags field, and
82473         incorrect msg_controllen value.
82474         * modules/passfd-tests (Depends-on): Check for alarm.
82475         * tests/test-passfd.c (main) [HAVE_DECL_ALARM]: Avoid hanging test.
82476         Reported by Bastien ROUCARIES.
82478 2011-03-30  Bruno Haible  <bruno@clisp.org>
82480         c-strcasestr: Relicense under LGPLv2+.
82481         * modules/c-strcasestr (License): Change to LGPLv2+.
82482         Requested by Eric Blake, for libvirt.
82484 2011-03-30  Simon Josefsson  <simon@josefsson.org>
82486         * users.txt: Add libidn2.  Fix libtasn1 link.
82488 2011-03-30  Jim Meyering  <meyering@redhat.com>
82490         tests: readlink* ("",... fails with EINVAL on newer kernels
82491         readlink and readlinkat have typically failed with ENOENT for
82492         the invalid, empty file name,  "".  However, with the advent
82493         of linux-2.6.39, they fail with EINVAL.
82494         * tests/test-areadlink.h (test_areadlink): Also accept EINVAL
82495         when operating on the empty file name.
82496         * tests/test-readlink.h (test_readlink): Likewise.
82498 2011-03-29  Bruno Haible  <bruno@clisp.org>
82500         Relicense some modules under LGPLv2+, for libidn2.
82501         * modules/array-mergesort (License): Change to LGPLv2+.
82502         * modules/c-strcaseeq (License): Likewise.
82503         * modules/striconveh (License): Likewise.
82504         * modules/striconveha (License): Likewise.
82505         * modules/uniconv/base (License): Likewise.
82506         * modules/uniconv/u8-conv-from-enc (License): Likewise.
82507         * modules/uniconv/u8-strconv-from-enc (License): Likewise.
82508         * modules/uniconv/u8-strconv-from-locale (License): Likewise.
82509         * modules/unictype/base (License): Likewise.
82510         * modules/unictype/bidiclass-of (License): Likewise.
82511         * modules/unictype/category-M (License): Likewise.
82512         * modules/unictype/category-none (License): Likewise.
82513         * modules/unictype/category-of (License): Likewise.
82514         * modules/unictype/category-test (License): Likewise.
82515         * modules/unictype/category-test-withtable (License): Likewise.
82516         * modules/unictype/combining-class (License): Likewise.
82517         * modules/unictype/joiningtype-of (License): Likewise.
82518         * modules/unictype/scripts (License): Likewise.
82519         * modules/uninorm/base (License): Likewise.
82520         * modules/uninorm/canonical-decomposition (License): Likewise.
82521         * modules/uninorm/composition (License): Likewise.
82522         * modules/uninorm/decompose-internal (License): Likewise.
82523         * modules/uninorm/decomposition-table (License): Likewise.
82524         * modules/uninorm/nfc (License): Likewise.
82525         * modules/uninorm/nfd (License): Likewise.
82526         * modules/uninorm/u32-normalize (License): Likewise.
82527         * modules/unistr/base (License): Likewise.
82528         * modules/unistr/u32-cpy (License): Likewise.
82529         * modules/unistr/u32-mbtouc-unsafe (License): Likewise.
82530         * modules/unistr/u32-to-u8 (License): Likewise.
82531         * modules/unistr/u32-uctomb (License): Likewise.
82532         * modules/unistr/u8-check (License): Likewise.
82533         * modules/unistr/u8-mblen (License): Likewise.
82534         * modules/unistr/u8-mbtouc (License): Likewise.
82535         * modules/unistr/u8-mbtouc-unsafe (License): Likewise.
82536         * modules/unistr/u8-mbtoucr (License): Likewise.
82537         * modules/unistr/u8-prev (License): Likewise.
82538         * modules/unistr/u8-strlen (License): Likewise.
82539         * modules/unistr/u8-to-u32 (License): Likewise.
82540         * modules/unistr/u8-uctomb (License): Likewise.
82541         * modules/unitypes (License): Likewise.
82542         Requested by Simon Josefsson.
82544 2011-03-29  Simon Josefsson  <simon@josefsson.org>
82546         lib-symbol-visibility: Add a notice.
82547         * modules/lib-symbol-visibility (Notice): New field.
82549 2011-03-29  Bruno Haible  <bruno@clisp.org>
82551         getaddrinfo: Doc fix.
82552         * doc/posix-functions/getaddrinfo.texi: Mention Windows problem in the
82553         section "fixed in Gnulib".
82555 2011-03-28  Simon Josefsson  <simon@josefsson.org>
82557         * doc/posix-functions/getaddrinfo.texi: Drop netdb.h discussion.
82558         Reported by Bastien ROUCARIES <roucaries.bastien@gmail.com>.
82560 2011-03-26  Bruno Haible  <bruno@clisp.org>
82562         unictype/property-byname: Reduce the number of load-time relocations.
82563         * lib/unictype/pr_byname.c: Include <stdlib.h>.
82564         (UC_PROPERTY_INDEX_*): New enumeration values.
82565         (uc_property_byname): Convert an index from the lookup table to an
82566         uc_property_t.
82567         * lib/unictype/pr_byname.gperf: Store indices instead of uc_property_t
82568         values.
82570 2011-03-26  Bruno Haible  <bruno@clisp.org>
82572         unictype/property-byname: Allow omitted word separators and aliases.
82573         * lib/unictype/pr_byname.gperf: Add property names without word
82574         separators. Add aliases from Unicode 6.0 PropertyAliases.txt, except
82575         for 'space'.
82577 2011-03-26  Bruno Haible  <bruno@clisp.org>
82579         unictype/joininggroup-byname: Allow hyphens, omitted word separators.
82580         * lib/unictype/joininggroup_byname.c (uc_joining_group_byname): Convert
82581         also hyphens to space.
82582         * lib/unictype/joininggroup_byname.gperf: Recognize the names also
82583         without spaces.
82584         * tests/unictype/test-joininggroup_byname.c (main): Add more tests.
82586 2011-03-26  Bruno Haible  <bruno@clisp.org>
82588         unictype/joiningtype-byname: Recognize long names as well.
82589         * lib/unictype.in.h (uc_joiningtype_class_byname): Allow argument to be
82590         a long name.
82591         * lib/unictype/joiningtype_byname.c: Include <string.h>,
82592         unictype/joiningtype_byname.h.
82593         (uc_joiningtype_class_byname): Use uc_joining_type_lookup.
82594         * lib/unictype/joiningtype_byname.gperf: New file.
82595         * modules/unictype/joiningtype-byname (Files): Add
82596         lib/unictype/joiningtype_byname.gperf.
82597         (Depends-on): Add gperf.
82598         (Makefile.am): Add rule for generating unictype/joiningtype_byname.h.
82599         * tests/unictype/test-joiningtype_byname.c (main): Test the recognition of
82600         long names.
82602         Tests for module 'unictype/joiningtype-longname'.
82603         * modules/unictype/joiningtype-longname-tests: New file.
82604         * tests/unictype/test-joiningtype_longname.c: New file.
82606         New module 'unictype/joiningtype-longname'.
82607         * lib/unictype.in.h (uc_joiningtype_class_long_name): New declaration.
82608         * lib/unictype/joiningtype_longname.c: New file.
82609         * modules/unictype/joiningtype-longname: New file.
82610         * modules/unictype/joiningtype-all (Depends-on): Add
82611         unictype/joiningtype-longname.
82613 2011-03-26  Bruno Haible  <bruno@clisp.org>
82615         unictype/bidiclass-byname: Recognize long names as well.
82616         * lib/unictype.in.h (uc_bidi_class_byname): Allow argument to be a long
82617         name.
82618         * lib/unictype/bidi_byname.c: Include <string.h>,
82619         unictype/bidi_byname.h.
82620         (uc_bidi_class_byname): Use uc_bidi_class_lookup.
82621         * lib/unictype/bidi_byname.gperf: New file.
82622         * modules/unictype/bidiclass-byname (Files): Add
82623         lib/unictype/bidi_byname.gperf.
82624         (Depends-on): Add gperf.
82625         (Makefile.am): Add rule for generating unictype/bidi_byname.h.
82626         * tests/unictype/test-bidi_byname.c (main): Test the recognition of
82627         long names.
82629         Tests for module 'unictype/bidiclass-longname'.
82630         * modules/unictype/bidiclass-longname-tests: New file.
82631         * tests/unictype/test-bidi_longname.c: New file.
82633         New module 'unictype/bidiclass-longname'.
82634         * lib/unictype.in.h (uc_bidi_class_long_name): New declaration.
82635         * lib/unictype/bidi_longname.c: New file.
82636         * modules/unictype/bidiclass-longname: New file.
82637         * modules/unictype/bidiclass-all (Depends-on): Add
82638         unictype/bidiclass-longname.
82640 2011-03-26  Bruno Haible  <bruno@clisp.org>
82642         unictype/bidi*: Rename modules.
82643         * modules/unictype/bidiclass-all: Renamed from
82644         modules/unictype/bidicategory-all.
82645         * modules/unictype/bidiclass-name: Renamed from
82646         modules/unictype/bidiclass-name.
82647         (Description): Update.
82648         * modules/unictype/bidiclass-name-tests: Renamed from
82649         modules/unictype/bidicategory-name-tests.
82650         * modules/unictype/bidiclass-byname: Renamed from
82651         modules/unictype/bidicategory-byname.
82652         (Description): Update.
82653         * modules/unictype/bidiclass-byname-tests: Renamed from
82654         modules/unictype/bidicategory-byname-tests.
82655         * modules/unictype/bidiclass-of: Renamed from
82656         modules/unictype/bidicategory-of.
82657         (Description): Update.
82658         * modules/unictype/bidiclass-of-tests: Renamed from
82659         modules/unictype/bidicategory-of-tests.
82660         * modules/unictype/bidiclass-test: Renamed from
82661         modules/unictype/bidicategory-test.
82662         (Description): Update.
82663         * modules/unictype/bidiclass-test-tests: Renamed from
82664         modules/unictype/bidicategory-test-tests.
82665         * modules/unictype/bidicategory-all: New file, a simple redirection.
82666         * modules/unictype/bidicategory-name: Likewise.
82667         * modules/unictype/bidicategory-byname: Likewise.
82668         * modules/unictype/bidicategory-of: Likewise.
82669         * modules/unictype/bidicategory-test: Likewise.
82670         * modules/unictype/property-bidi-* (Dependencies): Update.
82671         * lib/unictype/bidi_*.c: Update comment.
82673 2011-03-26  Bruno Haible  <bruno@clisp.org>
82675         unictype/bidi*: Rename functions, part 2.
82676         * modules/unictype/bidicategory-name (configure.ac): Update required
82677         libunistring version.
82678         * modules/unictype/bidicategory-byname (configure.ac): Likewise.
82680 2011-03-25  Bruno Haible  <bruno@clisp.org>
82682         New module 'unictype/combining-class-all'.
82683         * modules/unictype/combining-class-all: New file.
82685         Tests for module 'unictype/combining-class-byname'.
82686         * modules/unictype/combining-class-byname-tests: New file.
82687         * tests/unictype/test-combiningclass_byname.c: New file.
82689         New module 'unictype/combining-class-byname'.
82690         * lib/unictype.in.h (uc_combining_class_byname): New declaration.
82691         * lib/unictype/combiningclass_byname.c: New file.
82692         * lib/unictype/combiningclass_byname.gperf: New file.
82693         * modules/unictype/combining-class-byname: New file.
82695         Tests for module 'unictype/combining-class-longname'.
82696         * modules/unictype/combining-class-longname-tests: New file.
82697         * tests/unictype/test-combiningclass_longname.c: New file.
82699         New module 'unictype/combining-class-longname'.
82700         * lib/unictype.in.h (uc_combining_class_long_name): New declaration.
82701         * lib/unictype/combiningclass_longname.c: New file.
82702         * modules/unictype/combining-class-longname: New file.
82704         Tests for module 'unictype/combining-class-name'.
82705         * modules/unictype/combining-class-name-tests: New file.
82706         * tests/unictype/test-combiningclass_name.c: New file.
82708         New module 'unictype/combining-class-name'.
82709         * lib/unictype.in.h (uc_combining_class_name): New declaration.
82710         * lib/unictype/combiningclass_name.c: New file.
82711         * modules/unictype/combining-class-name: New file.
82713 2011-03-25  Bruno Haible  <bruno@clisp.org>
82715         unictype/combining-class: Rename source files.
82716         * lib/gen-uni-tables.c (main): Emit unictype/combiningclass.h instead
82717         of unictype/combining.h.
82718         * lib/unictype/combiningclass.c: Renamed from lib/unictype/combining.c.
82719         Update.
82720         * lib/unictype/combiningclass.h: Renamed from lib/unictype/combining.h.
82721         * modules/unictype/combining-class (Description): Fix.
82722         (Files, Makefile.am): Update.
82723         * tests/unictype/test-combiningclass.c: Renamed from
82724         tests/unictype/test-combining.c.
82725         * modules/unictype/combining-class-tests (Files, Makefile.am): Update.
82727 2011-03-25  Bruno Haible  <bruno@clisp.org>
82729         unictype: Update list of canonical combining classes.
82730         * lib/unictype.in.h (UC_CCC_ATA): New enumeration value.
82732 2011-03-25  Bruno Haible  <bruno@clisp.org>
82734         unictype/category-byname: Recognize long names as well.
82735         * lib/unictype.in.h (uc_general_category_byname): Allow argument to be
82736         a long name.
82737         * lib/unictype/categ_byname.c: Include <stdlib.h>, <string.h>,
82738         unictype/categ_byname.h.
82739         (UC_CATEGORY_INDEX_*): New enumeration values.
82740         (uc_general_category_byname): Use uc_general_category_lookup and
82741         convert from index to value.
82742         * lib/unictype/categ_byname.gperf: New file.
82743         * modules/unictype/category-byname (Files): Add
82744         lib/unictype/categ_byname.gperf.
82745         (Depends-on): Add gperf.
82746         (Makefile.am): Add rule for generating unictype/categ_byname.h.
82747         * tests/unictype/test-categ_byname.c (main): Test the recognition of
82748         long names.
82750         Tests for module 'unictype/category-longname'.
82751         * modules/unictype/category-longname-tests: New file.
82752         * tests/unictype/test-categ_longname.c: New file.
82754         New module 'unictype/category-longname'.
82755         * lib/unictype.in.h (uc_general_category_long_name): New declaration.
82756         * lib/unictype/categ_longname.c: New file.
82757         * modules/unictype/category-longname: New file.
82758         * modules/unictype/category-all (Depends-on): Add it.
82760 2011-03-25  Bruno Haible  <bruno@clisp.org>
82762         Tests for module 'unictype/category-LC'.
82763         * modules/unictype/category-LC-tests: New file.
82764         * tests/unictype/test-categ_LC.c: New file, automatically generated.
82766         New module 'unictype/category-LC'.
82767         * lib/unictype.in.h (UC_CATEGORY_MASK_LC): New enumeration value.
82768         (UC_CATEGORY_LC): New declaration.
82769         (UC_CASED_LETTER): New macro.
82770         * lib/gen-uni-tables.c (is_category_LC): New function.
82771         (output_categories): Also handle category LC.
82772         (UC_CATEGORY_MASK_LC): New enumeration value.
82773         (general_category_byname): Also handle category LC.
82774         * lib/unictype/categ_LC.c: New file.
82775         * lib/unictype/categ_LC.h: New file, automatically generated.
82776         * lib/unictype/categ_name.c (uc_general_category_name): Also handle
82777         category LC.
82778         * lib/unictype/categ_byname.c (uc_general_category_byname): Likewise.
82779         * modules/unictype/category-LC: New file.
82780         * modules/unictype/category-byname (Depends-on): Add
82781         unictype/category-LC.
82782         * modules/unictype/category-all (Depends-on): Likewise.
82784 2011-03-25  Eric Blake  <eblake@redhat.com>
82786         xmalloc: revert yesterday's regression
82787         * lib/xmalloc.c (xrealloc): Once again forward xrealloc(NULL,0) to
82788         realloc's underlying behavior (allowing allocation of zero-size
82789         objects, especially if malloc-gnu is also in use).
82791 2011-03-25  Reuben Thomas  <rrt@sc3d.org>
82793         maint.mk: add missing version to VC-tag
82794         * top/maint.mk: git tag was missing actual tag name; add it.
82796         valgrind: do leak checking, and exit with code 1 on error (not 0)
82797         * m4/valgrind-tests.m4: Add `--error-exitcode=1 --leak-check=full'
82798         to VALGRIND.
82800 2010-11-30  Reuben Thomas  <rrt@sc3d.org>
82802         posix-modules: say what it does.
82803         * posix-modules: Add a line to the --help output saying what it does.
82805 2011-03-24  Paul Eggert  <eggert@cs.ucla.edu>
82807         xmalloc: Do not leak if underlying realloc is C99 compatible.
82808         * lib/xmalloc.c (xrealloc): If N is zero, call 'free' directly.
82809         This avoids a leak on C99-based systems.  See
82810         <http://lists.gnu.org/r/bug-gnulib/2011-03/msg00243.html>.
82812 2011-03-24  Eric Blake  <eblake@redhat.com>
82814         realloc: document portability problem
82815         * doc/posix-functions/realloc.texi (realloc): Mention pitfalls of
82816         passing 0 size to realloc.
82818 2011-03-23  Ben Walton  <bwalton@artsci.utoronto.ca>
82820         doc: update users.txt
82821         * users.txt: Add cvsps, tmpwatch
82823 2011-03-23  Matt Rice  <ratmice@gmail.com>
82825         doc: update users.txt
82826         * users.txt: Add gdb.
82828 2011-03-23  Jim Meyering  <meyering@redhat.com>
82830         doc: update users.txt
82831         Looking through matches up to the following URL (there are still
82832         several more pages), I found several projects that use gnulib:
82833         http://codesearch.google.com/codesearch?start=50&q=gnulib-cache\.m4
82834         * users.txt: Add nagios plugins (nagiosplug), acct, gengetopt,
82835         gmediaserver, gtkreindeer, jugtail, libunistring, mini-httpd, reindeer.
82837 2011-03-22  Bruno Haible  <bruno@clisp.org>
82839         unictype/bidi*: Rename functions.
82840         * lib/unictype.in.h (uc_bidi_class_name, uc_bidi_class_byname,
82841         uc_bidi_class, uc_is_bidi_class): New declarations.
82842         * lib/unictype/bidi_byname.c (uc_bidi_class_byname): Renamed from
82843         uc_bidi_category_byname.
82844         (uc_bidi_category_byname): New function.
82845         * lib/unictype/bidi_name.c (u_bidi_class_name): Renamed from
82846         u_bidi_category_name.
82847         (uc_bidi_class_name): Renamed from uc_bidi_category_name.
82848         (uc_bidi_category_name): New function.
82849         * lib/unictype/bidi_of.c (uc_bidi_class): Renamed from
82850         uc_bidi_category.
82851         (uc_bidi_category): New function.
82852         * lib/unictype/bidi_test.c (uc_is_bidi_class): Renamed from
82853         uc_is_bidi_category. Invoke uc_bidi_class.
82854         (uc_is_bidi_category): New function.
82855         * tests/unictype/test-bidi_byname.c (main): Test uc_bidi_class_byname
82856         instead of uc_bidi_category_byname.
82857         * tests/unictype/test-bidi_name.c (main): Test uc_bidi_class_name
82858         instead of uc_bidi_category_name.
82859         * tests/unictype/test-bidi_of.c (main): Test uc_bidi_class instead of
82860         uc_bidi_category.
82861         * tests/unictype/test-bidi_test.c (main): Test uc_is_bidi_class
82862         instead of uc_is_bidi_category.
82864 2011-03-21  Bruno Haible  <bruno@clisp.org>
82866         New module 'unictype/joininggroup-all'.
82867         * modules/unictype/joininggroup-all: New file.
82869         Tests for module 'unictype/joininggroup-of'.
82870         * modules/unictype/joininggroup-of-tests: New file.
82871         * tests/unictype/test-joininggroup_of.c: New file.
82872         * tests/unictype/test-joininggroup_of.h: New file, automatically
82873         generated by gen-uni-tables.
82875         New module 'unictype/joininggroup-of'.
82876         * modules/unictype/joininggroup-of: New file.
82877         * lib/unictype/joininggroup_of.c: New file.
82878         * lib/unictype/joininggroup_of.h: New file, automatically generated by
82879         gen-uni-tables.
82881         Tests for module 'unictype/joininggroup-byname'.
82882         * modules/unictype/joininggroup-byname-tests: New file.
82883         * tests/unictype/test-joininggroup_byname.c: New file.
82885         New module 'unictype/joininggroup-byname'.
82886         * modules/unictype/joininggroup-byname: New file.
82887         * lib/unictype/joininggroup_byname.c: New file.
82888         * lib/unictype/joininggroup_byname.gperf: New file.
82890         Tests for module 'unictype/joininggroup-name'.
82891         * modules/unictype/joininggroup-name-tests: New file.
82892         * tests/unictype/test-joininggroup_name.c: New file.
82894         New module 'unictype/joininggroup-name'.
82895         * modules/unictype/joininggroup-name: New file.
82896         * lib/unictype/joininggroup_name.c: New file.
82897         * lib/unictype/joininggroup_name.h: New file.
82899         New module 'unictype/joiningtype-all'.
82900         * modules/unictype/joiningtype-all: New file.
82902         Tests for module 'unictype/joiningtype-of'.
82903         * modules/unictype/joiningtype-of-tests: New file.
82904         * tests/unictype/test-joiningtype_of.c: New file.
82905         * tests/unictype/test-joiningtype_of.h: New file, automatically
82906         generated by gen-uni-tables.
82908         New module 'unictype/joiningtype-of'.
82909         * modules/unictype/joiningtype-of: New file.
82910         * lib/unictype/joiningtype_of.c: New file.
82911         * lib/unictype/joiningtype_of.h: New file, automatically generated by
82912         gen-uni-tables.
82914         Tests for module 'unictype/joiningtype-byname'.
82915         * modules/unictype/joiningtype-byname-tests: New file.
82916         * tests/unictype/test-joiningtype_byname.c: New file.
82918         New module 'unictype/joiningtype-byname'.
82919         * modules/unictype/joiningtype-byname: New file.
82920         * lib/unictype/joiningtype_byname.c: New file.
82922         Tests for module 'unictype/joiningtype-name'.
82923         * modules/unictype/joiningtype-name-tests: New file.
82924         * tests/unictype/test-joiningtype_name.c: New file.
82926         New module 'unictype/joiningtype-name'.
82927         * modules/unictype/joiningtype-name: New file.
82928         * lib/unictype/joiningtype_name.c: New file.
82930         unictype: Add support for Arabic shaping properties.
82931         * lib/unictype.in.h (UC_JOINING_TYPE_*): New enumeration values.
82932         (uc_joining_type_name, uc_joining_type_byname, uc_joining_type): New
82933         declarations.
82934         (UC_JOINING_GROUP_*): New enumeration values.
82935         (uc_joining_group_name, uc_joining_group_byname, uc_joining_group): New
82936         declarations.
82937         * lib/gen-uni-tables.c (UC_JOINING_TYPE_*): New enumeration values.
82938         (unicode_joining_type): New variable.
82939         (UC_JOINING_GROUP_*): New enumeration values.
82940         (unicode_joining_group): New variable.
82941         (fill_arabicshaping, joining_type_as_c_identifier,
82942         output_joining_type_test, output_joining_type,
82943         joining_group_as_c_identifier, output_joining_group_test,
82944         output_joining_group): New functions.
82945         (main); Add an argument denoting the ArabicShaping.txt file. Invoke
82946         fill_arabicshaping and output_joining_type_test, output_joining_type,
82947         output_joining_group_test, output_joining_group.
82948         Reported by Simon Josefsson.
82950 2011-03-21  Jim Meyering  <meyering@redhat.com>
82952         strftime: fix a bug in yesterday's change
82953         * lib/strftime.c (add): Accommodate width's initial value of -1.
82954         Otherwise, nstrftime would copy uninitialized data into
82955         the result buffer.
82957 2011-03-21  Jim Meyering  <meyering@redhat.com>
82959         tests: add strftime-tests module
82960         * tests/test-strftime.c: New file.
82961         * modules/strftime-tests: New module.
82963 2011-03-20  Paul Eggert  <eggert@cs.ucla.edu>
82965         strftime: don't assume a byte count fits in 'int'
82966         * lib/strftime.c (add): Don't assume first arg fits in 'int'.  I
82967         found this problem by static analysis, using gcc -Wstrict-overflow
82968         (GCC 4.5.2, x86-64).  This reported an optimization that depended
82969         on an integer overflow having undefined behavior, but it turns out
82970         that the argument is a size, which might not fit in 'int' anyway,
82972 2011-03-20  Paul Eggert  <eggert@cs.ucla.edu>
82974         stdio: don't require ignore_value around fwrite
82976         This patch works around libc bug 11959
82977         <http://sources.redhat.com/bugzilla/show_bug.cgi?id=11959>.
82978         Without this patch, applications must often write
82979         ignore_value (fwrite (...)) even though the ignore_value is
82980         not helpful here.  It's common to write many objects, using
82981         fwrite/printf/etc., and then use ferror to detect output error.
82983         I considered making this patch optional, but decided against it,
82984         because libc is obviously being inconsistent here: there is no
82985         reason libc should insist that user code must inspect fwrite
82986         return's value without also insisting that it inspect printf's,
82987         putchar's, etc.  If user code wants to have a strict style where
82988         all these functions' values are checked (so that ferror need not
82989         be checked), we could add support for that style in a new gnulib
82990         module, but in the meantime it's better to be consistent and to
82991         support common usage.
82993         * lib/stdio.in.h (rpl_fwrite): Define this wrapper around fwrite,
82994         to work around libc bug 11959, if __USE_FORTIFY_LEVEL indicates
82995         that we are compiling in checking mode, and if not C++, and
82996         if not already wrapping fwrite for some other reason.
82997         (fwrite): #define to rpl_fwrite if the latter is defined.
82999 2011-03-20  Bruno Haible  <bruno@clisp.org>
83001         verror: Fix compilation error introduced on 2011-02-13.
83002         * lib/verror.h (verror, verror_at_line): Use _GL_ATTRIBUTE_FORMAT macro
83003         instead of __attribute__.
83004         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
83006 2011-03-20  Paul Eggert  <eggert@cs.ucla.edu>
83007             Bruno Haible  <bruno@clisp.org>
83009         socklen: do not depend on sys_socket
83010         While trying to modify Emacs to use gnulib's socklen module,
83011         I discovered a circular dependency: socklen depends on sys_socket
83012         and vice versa.  Emacs can use socklen, but it does not need
83013         sys_socket because it has its own substitute for sys/socket.h.
83014         * m4/socklen.m4 (gl_SOCKET_HEADERS): New macro, extracted from
83015         gl_TYPE_SOCKLEN_T.
83016         (gl_CHECK_SOCKET_HEADERS): New macro, taken from parts of
83017         gl_PREREQ_SYS_H_SOCKET.
83018         (gl_TYPE_SOCKLEN_T): Require it instead of requiring
83019         gl_PREREQ_SYS_H_SOCKET.
83020         * m4/sys_socket_h.m4 (gl_PREREQ_SYS_H_SOCKET): Require
83021         gl_CHECK_SOCKET_HEADERS instead of doing its work ourselves.
83022         * modules/socklen (Depends-on): Do not depend on sys_socket.
83023         (Include): Adjust to match the code used in gl_SOCKET_HEADERS.
83025 2011-03-20  Jim Meyering  <meyering@redhat.com>
83027         maint.mk: sort file names *after* new transformation
83028         * top/maint.mk (sc_po_check): Sorting before removing the $(srcdir)/
83029         prefix would have led to an unwarranted failure in GNU parted.
83030         Sort after that transformation.
83032 2011-03-19  Jim Meyering  <meyering@redhat.com>
83034         maint.mk: fix po-file syntax-check rule
83035         * top/maint.mk (sc_po_check): Fix fatal typo in yesterday's change.
83036         Patch by Bruno Haible.
83038 2011-03-19  Bruno Haible  <bruno@clisp.org>
83040         socklen: Update comment.
83041         * m4/socklen.m4: Update comment about platforms.
83043 2011-03-19  Paul Eggert  <eggert@cs.ucla.edu>
83044             Bruno Haible  <bruno@clisp.org>
83046         inet_ntop, inet_pton: Simplify.
83047         * modules/inet_ntop (Depends-on): Remove socklen, since sys_socket is
83048         documented to provide socklen_t and we already depend on sys_socket.
83049         * modules/inet_pton (Depends-on): Likewise.
83050         * lib/arpa_inet.in.h: Adjust comment.
83052 2011-03-19  Paul Eggert  <eggert@cs.ucla.edu>
83053             Bruno Haible  <bruno@clisp.org>
83055         netdb: Simplify.
83056         * modules/netdb (Depends-on): Remove socklen, since sys_socket is
83057         documented to provide socklen_t and we already depend on sys_socket.
83058         * lib/netdb.in.h: Adjust comment.
83060 2011-03-19  Bruno Haible  <bruno@clisp.org>
83062         sys_socket, netdb: Document problem with socklen_t.
83063         * doc/posix-headers/sys_socket.texi: Mention lack of socklen_t on some
83064         platforms.
83065         * doc/posix-headers/netdb.texi: Likewise.
83067 2011-03-18  Eric Blake  <eblake@redhat.com>
83069         maint.mk: let po check work in VPATH build
83070         * top/maint.mk (po_file): Allow cfg.mk override.
83071         (sc_po_check): Allow VPATH use.
83072         Reported by Jiri Denemark.
83074 2011-03-16  Jim Meyering  <meyering@redhat.com>
83076         maint.mk: allow fine-grained syntax-check exclusion via Make variables
83077         Before, you would have had to create one .x-sc_ file per rule in order
83078         to exempt offending files.  Now, you may instead use a Make variable --
83079         usually defined in cfg.mk -- whose name identifies the affected rule.
83080         * top/maint.mk (_sc_excl): Define.
83081         (VC_LIST_EXCEPT): Use it to exclude names on a per-rule basis.
83082         (_sc_search_regexp): When not using VC_LIST_EXCEPT, exclude here, too.
83084 2011-03-13  Bruno Haible  <bruno@clisp.org>
83086         ignore-value tests: Avoid warnings.
83087         * tests/test-ignore-value.c (_GL_ATTRIBUTE_RETURN_CHECK): Define to
83088         empty for gcc < 3.4.
83090 2011-03-13  Bruno Haible  <bruno@clisp.org>
83092         passfd: Fix link error on Solaris.
83093         * modules/passfd (Description): Correct.
83094         (Depends-on): Add socketlib.
83095         (Link): New section.
83096         * modules/passfd-tests (Makefile.am): Link test-passfd with LIBSOCKET.
83098 2011-03-13  Bruno Haible  <bruno@clisp.org>
83100         passfd: Fix link error on AIX 5.2.
83101         * m4/afunix.m4 (gl_SOCKET_AFUNIX): Define _LINUX_SOURCE_COMPAT.
83103 2011-03-13  Bruno Haible  <bruno@clisp.org>
83105         passfd: Work around bug with CMSG_FIRSTHDR on FreeBSD 6.4.
83106         * lib/sys_socket.in.h: Include <stddef.h>.
83107         * m4/afunix.m4 (gl_SOCKET_AFUNIX): Include <stddef.h> before using
83108         CMSG_FIRSTHDR. Remove unused variable.
83110 2011-03-13  Bruno Haible  <bruno@clisp.org>
83112         passfd: Fix compilation error on OpenBSD.
83113         * lib/passfd.c: Include <sys/uio.h>.
83115 2011-03-13  Bruno Haible  <bruno@clisp.org>
83117         passfd test: Fix warnings.
83118         * tests/test-passfd.c: Include <sys/wait.h>.
83119         (main): Fix typo.
83121 2011-03-13  Bruno Haible  <bruno@clisp.org>
83123         passfd module, part 4, tweaks.
83124         * tests/test-passfd.c: Reorder includes.
83125         (main): Fix perror and printf calls.
83127 2011-03-07  Bastien Roucariès  <roucaries.bastien@gmail.com>
83129         passfd module, part 4.
83130         * modules/passfd-tests: New file.
83131         * tests/test-passfd.c: New file.
83133 2011-03-13  Jim Meyering  <meyering@redhat.com>
83135         Makefile: rely on GNU make; derive syntax-check rule names
83136         Rather than requiring that each sc_ rule be listed as a dependent
83137         of "check", use features of GNU make to derive the list.
83138         * Makefile (syntax-check-rules): Define.
83139         (check): Depend on the new variable, not the hard-coded list.
83141 2011-03-13  Bastien Roucariès  <roucaries.bastien@gmail.com>
83142             Bruno Haible  <bruno@clisp.org>
83144         passfd module, part 3.
83145         * lib/passfd.h (recvfd): Add a flags argument.
83146         * lib/passfd.c: Include <fcntl.h>, cloexec.h.
83147         (recvfd): Add a flags argument.
83148         * m4/afunix.m4 (gl_SOCKET_AFUNIX): Test whether MSG_CMSG_CLOEXEC
83149         exists.
83150         * modules/passfd (Depends-on): Add cloexec.
83151         Suggested by Eric Blake.
83153 2011-03-13  Bruno Haible  <bruno@clisp.org>
83155         passfd module, part 2, tweaks.
83156         * modules/passfd (Files): Reorder.
83157         (Depends-on): Remove errno.
83158         (Include): Remove <sys/socket.h>, <sys/un.h>.
83159         * lib/passfd.h: Use a GPLv3+ header. Make C++ safe.
83160         * lib/passfd.c: Untabify. Use a GPLv3+ header. Really include the
83161         specification header. Include <sys/socket.h> always. Don't include
83162         <winsock2.h>. Use "#if HAVE_..." instead of "#ifdef HAVE_...".
83163         (sendfd): Clarify that it sets errno when it fails.
83164         (recvfd): Fix specification.
83166 2011-03-07  Bastien Roucariès  <roucaries.bastien@gmail.com>
83168         passfd module, part 2.
83169         * modules/passfd: New file.
83170         * lib/passfd.h: New file.
83171         * lib/passfd.c: New file.
83173 2011-03-12  Bruno Haible  <bruno@clisp.org>
83175         wcswidth, mbswidth: Avoid integer overflow.
83176         * lib/wcswidth.c: Include <limits.h>.
83177         * lib/wcswidth-impl.h (wcswidth): Avoid 'int' overflow.
83178         * lib/mbswidth.c: Include <limits.h>.
83179         (mbsnwidth): Avoid 'int' overflow.
83180         Reported by Jim Meyering.
83182 2011-03-12  Bruno Haible  <bruno@clisp.org>
83184         futimens, utimensat: Avoid endless recursion on Solaris 10.
83185         * lib/sys_stat.in.h (futimens, utimensat): Define with rpl_ prefix on
83186         Solaris.
83187         Reported by Ben Walton <bwalton@artsci.utoronto.ca> via Eric Blake
83188         in <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8230>.
83190 2011-03-11  Jim Meyering  <meyering@redhat.com>
83192         maint.mk: relax a regexp to accommodate other formatting styles
83193         * top/maint.mk (sc_unmarked_diagnostics): Allow 0 or 1 space
83194         between "ngettext" and the following "(".
83196 2011-03-11  Pádraig Brady  <P@draigBrady.com>
83198         maint.mk: suppress a false positive warning
83199         * top/maint.mk ((sc_unmarked_diagnostics): Don't warn when
83200         diagnostics are marked with ngettext.
83202 2011-03-10  Eric Blake  <eblake@redhat.com>
83204         wchar: add explicit dependencies, for Tru64
83205         * modules/mbmemcasecoll (Depends-on): Add wchar.
83206         * modules/mbtowc (Depends-on): Likewise.
83207         * modules/vasnprintf (Depends-on): Likewise.
83208         * modules/unistdio/u-printf-args (Depends-on): Likewise.
83209         * modules/wctomb (Depends-on): Likewise.
83210         Reported by Peter O'Gorman.
83212 2011-03-08  Bruno Haible  <bruno@clisp.org>
83214         passfd module, part 1, tweaks.
83215         * m4/afunix.m4 (gl_SOCKET_AFUNIX): Update AC_REQUIRE invocation.
83216         Improve indentation. Improve AC_MSG_CHECKING messages.
83217         * m4/sockpfaf.m4 (gl_SOCKET_FAMILY_UNIX): New macro, extracted from
83218         gl_SOCKET_FAMILIES.
83220 2011-03-07  Bastien Roucariès  <roucaries.bastien@gmail.com>
83222         passfd module, part 1.
83223         * m4/afunix.m4: New file.
83224         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Also test for UNIX domain
83225         sockets.
83227 2011-03-08  Bruno Haible  <bruno@clisp.org>
83229         regex-quote: New API.
83230         * lib/regex-quote.h: Include <stdbool.h>.
83231         (struct regex_quote_spec): New type.
83232         (regex_quote_spec_posix, regex_quote_spec_gnu, regex_quote_spec_pcre):
83233         New declarations.
83234         (regex_quote_length, regex_quote_copy, regex_quote): Take a
83235         'const struct regex_quote_spec *' argument.
83236         * lib/regex-quote.c (RE_*, PCRE_*): New macros.
83237         (pcre_special): New constant.
83238         (regex_quote_spec_posix, regex_quote_spec_gnu, regex_quote_spec_pcre):
83239         New functions.
83240         (regex_quote_length, regex_quote_copy, regex_quote): Take a
83241         'const struct regex_quote_spec *' argument.
83242         * modules/regex-quote (Depends-on): Add stdbool.
83243         * tests/test-regex-quote.c (check): Update for new API. Add test for
83244         anchored results.
83245         * NEWS: Mention the API change.
83246         Reported by Reuben Thomas and Eric Blake.
83248 2011-03-06  Bruno Haible  <bruno@clisp.org>
83250         regex-quote: Fix creation of POSIX extended regular expressions.
83251         * lib/regex-quote.c (ere_special): Add grouping and alternation
83252         operators.
83254 2011-03-05  Bruno Haible  <bruno@clisp.org>
83256         doc: Improve doc regarding autopoint vs. gnulib.
83257         * doc/gnulib-tool.texi (gettextize and autopoint): Recommend to
83258         disable autopoint while running autoreconf.
83259         Suggested by Ralf Wildenhues.
83261 2011-03-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
83263         Update AC_OPENMP macro for Lahey compiler on GNU/Linux.
83264         * m4/openmp.m4 (AC_OPENMP): Sync from Autoconf.
83266 2011-03-03  Bruce Korb  <bkorb@gnu.org>
83268         parse-duration: remove xalloc.h dependency
83269         * lib/parse-duration.c (parse_period): handle NULL return from
83270         strdup instead of calling xstrdup().
83271         * modules/parse-duration: remove "xalloc" dependency
83273 2011-03-03  Matthew Booth  <mbooth@redhat.com>
83275         bootstrap: honor m4_base when running aclocal
83276         * build-aux/bootstrap: Fix hard-coded use of m4 directory name.
83278 2011-03-02  Jim Meyering  <meyering@redhat.com>
83280         getopt-gnu: relax license from LGPLv3+ to LGPLv2+
83281         * modules/getopt-gnu (License): Relax to LGPLv2+, for augeas,
83282         on request from Matt Booth.
83284 2011-03-01  Eric Blake  <eblake@redhat.com>
83286         test-link: work on Hurd
83287         * tests/test-link.h (test_link): Hurd rejects linking directories
83288         with EISDIR instead of the POSIX-mandated EPERM.
83290 2011-02-28  Paul Eggert  <eggert@cs.ucla.edu>
83292         stdio: simplify by moving files to printf-posix, sigpipe
83293         * m4/stdio_h.m4 (gl_STDIO_H): Do not require gl_ASM_SYMBOL_PREFIX,
83294         since this symbol is needed only if printf is replaced.
83295         * m4/printf-posix-rpl.m4 (gl_REPLACE_PRINTF):
83296         Require gl_ASM_SYMBOL_PREFIX.
83297         * modules/printf-posix (Files): Add m4/asm-underscore.m4.
83298         * modules/sigpipe (Files): Likewise.  Also, add m4/stdio-write.c.
83299         (Depends-on): Add 'raise'.
83300         (configure.ac): Require gl_ASM_SYMBOL_PREFIX.
83301         * modules/stdio (Files): Remove lib/stdio-write.c,
83302         m4/asm-underscore.m4.
83303         (Depends-on): Remove 'raise'.
83305         stdio: simplify by moving gl_STDIN_LARGE_OFFSET to fseeko, ftello
83306         * m4/fseeko.m4 (gl_STDIN_LARGE_OFFSET): Moved here, from ...
83307         * m4/stdio_h.m4 (gl_STDIN_LARGE_OFFSET): ... here, because
83308         * modules/ftello (Files): Add m4/fseeko.m4, for gl_STDIN_LARGE_OFFSET.
83310 2011-02-28  Bruno Haible  <bruno@clisp.org>
83312         localcharset: Assume ANSI C behaviour of free().
83313         * lib/localcharset.c (get_charset_aliases): Remove NULL test before
83314         calling free().
83315         Suggested by Simon Josefsson <simon@josefsson.org>.
83317 2011-02-28  Corinna Vinschen  <vinschen@redhat.com>  (tiny change)
83318             Charles Wilson  <cygwin@cwilson.fastmail.fm>  (tiny change)
83319             Bruno Haible  <bruno@clisp.org>  (tiny change)
83321         On Cygwin, use /proc file system instead of win32 API.
83322         * lib/relocatable.c: On Cygwin, use file names from /proc, rather than
83323         Win32 file names.
83324         (DllMain): Simplify by removing Cygwin specific code.
83325         (find_shared_library_fullname): Use Linux specific implementation also
83326         for Cygwin.
83327         (get_shared_library_fullname): Update accordingly.
83328         * lib/progreloc.c: On Cygwin, use file names from /proc, rather than
83329         Win32 file names.
83330         (find_executable): On Cygwin, use /proc, like on Linux. Remove previous
83331         Cygwin specific code.
83333 2011-02-28  Christian Rössel  <christian.roessel@gmx.de>  (tiny change)
83334             Markus Geimer  <m.geimer@fz-juelich.de>  (tiny change)
83336         Fix OpenMP flag detection for various Fortran compilers.
83337         * m4/openmp.m4 (_AC_LANG_OPENMP(Fortran 77)): Use '!$'
83338         OpenMP-conditional compilation construct, to force compile
83339         failure with missing OpenMP flag.
83340         (AC_OPENMP): Add flags for Cray CCE and NEC SX compilers.
83342 2011-02-25  Eric Blake  <eblake@redhat.com>
83344         strstr: expand test coverage
83345         * tests/test-strstr.c (main): Add much shorter trigger.  Fix C89
83346         compilation.
83347         * tests/test-memmem.c (main): Duplicate tests.
83348         * tests/test-strcasestr.c (main): Likewise.
83349         * tests/test-c-strcasestr.c (main): Likewise.
83351 2011-02-25  Jim Meyering  <meyering@redhat.com>
83353         maint.mk: detect missing-NL-at-EOF, too
83354         * top/maint.mk (sc_prohibit_empty_lines_at_EOF): Adjust so that
83355         it also detects when a file lacks a newline at EOF.
83356         (require_exactly_one_NL_at_EOF_): Renamed from
83357         detect_empty_lines_at_EOF_.  I opted not to rename the rule,
83358         since people may well have .x-sc_... file names tied to the
83359         existing name.  Suggested by Eric Blake.
83361 2011-02-25  Paul Eggert  <eggert@cs.ucla.edu>
83363         dirname: move m4/dos.m4 functionality into lib/dosname.h
83365         m4/dos.m4 needs to go.  It laboriously invokes the C compiler, and
83366         extracts symbols from it, puts them into config.h; but it's much
83367         easier to use the symbols directly.  filename.h already does this,
83368         but it disagrees with dos.m4 in some respects.  This patch
83369         introduces a different include file dosname.h that packages up
83370         dos.m4, and then later we can work on merging filename.h and
83371         dosname.h.  Applications that need only the easy-to-configure
83372         symbols should consider including dosname.h rather than dirname.h.
83373         * NEWS: Mention incompatible changes.
83374         * m4/dos.m4: Remove.
83375         * lib/dosname.h, modules/dosname: New files.
83376         * lib/dirname.h (ISSLASH, FILE_SYSTEM_PREFIX_LEN):
83377         (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE):
83378         (IS_ABSOLUTE_FILE_NAME, IS_RELATIVE_FILE_NAME): Move to lib/dosname.h.
83379         * lib/at-func.c, lib/at-func2.c, lib/openat.c, lib/savewd.c:
83380         Include dosname.h, not dirname.h.
83381         * lib/rmdir.c, lib/stat.c, lib/unlink.c, lib/unlinkat.c:
83382         Include dosname.h, for definitions of symbols like ISSLASH
83383         that used to be in config.h.
83384         * m4/dirname.m4 (gl_DIRNAME_LGPL): Do not require gl_AC_DOS.
83385         * m4/rmdir.m4 (gl_FUNC_RMDIR): Likewise.
83386         * m4/stat.m4 (gl_FUNC_STAT): Likewise.
83387         * m4/unlink.m4 (gl_FUNC_UNLINK): Likewise.
83388         * modules/dirname-lgpl (Files): Omit m4/dos.m4.
83389         * modules/rmdir (Files): Likewise.
83390         * modules/stat (Files): Likewise.
83391         * modules/unlink (Files): Likewise.
83392         * modules/dirname-lgpl (Depends-on): Add dosname.
83393         * modules/lstat (Depends-on): Likewise.
83394         * modules/openat (Depends-on): Likewise.
83395         * modules/rmdir (Depends-on): Likewise.
83396         * modules/savewd (Depends-on): Likewise.
83397         * modules/stat (Depends-on): Likewise.
83398         * modules/unlink (Depends-on): Likewise.
83399         * modules/openat (Depends-on): Remove dirname-lgpl.
83400         * modules/savewd (Depends-on): Likewise.
83401         * tests/test-dirname.c: Do not use removed symbols like
83402         FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR.  Instead, use
83403         the remaining symbols, e.g., ISSLASH ('\\').
83405 2011-02-25  Eric Blake  <eblake@redhat.com>
83407         strstr: revert patches that introduced bug and pessimization
83408         * lib/str-two-way.h: Add another reference.
83409         (two_way_short_needle, two_way_long_needle): Revert changes from
83410         2011-02-24; they pessimize search speed.
83411         (critical_factorization): Partially revert changes from
83412         2010-06-22; they violate the requirement that the left half of the
83413         needle be smaller than the period of the needle.
83415 2011-02-24  Paul Eggert  <eggert@cs.ucla.edu>
83417         filenamecat: remove unnecessary dependency on dirname-lgpl
83418         * modules/filenamecat (Depends-on): Remove dirname-lgpl, as there
83419         is no direct dependency, just an indirect one via filenamecat-lgpl.
83421         remove: remove unnecessary use of m4/dos.m4
83422         * m4/remove.m4 (gl_FUNC_REMOVE): Don't require gl_AC_DOS; not needed.
83423         * modules/remove (FILES): Remove m4/dos.m4.
83425         * lib/openat-proc.c: Don't include dirname.h; not needed.
83427         backupfile: remove unnecessary use of m4/dos.m4
83428         * m4/backupfile.m4 (gl_BACKUPFILE): Don't require gl_AC_DOS; none
83429         of its symbols are used by the backupfile code.  backupfile.c does
83430         use a symbol HAVE_DOS_FILE_NAMES, but that symbol is meant only
83431         for the rare case of programs that want all their backup file
83432         names to live within 8+3 limits, and dos.m4 doesn't address that.
83433         * modules/backupfile (Files): Remove m4/dos.m4.
83435 2011-02-24  Jim Meyering  <meyering@redhat.com>
83437         strstr: fix a bug whereby strstr would mistakenly return NULL
83438         * lib/str-two-way.h (two_way_short_needle): Correct off-by-one error
83439         in period calculation.
83440         (two_way_long_needle): Likewise.
83441         The original problem was reported by Mike Stump in
83442         http://thread.gmane.org/gmane.comp.sysutils.autoconf.bugs/7834
83443         Ralf Wildenhues provided the short needle and haystack.
83444         * tests/test-strstr.c: Add Ralf's test case to trigger the bug.
83445         Add a more involved test to trigger the bug in two_way_long_needle.
83447 2011-02-24  Stefano Lattarini  <stefano.lattarini@gmail.com>  (tiny change)
83449         gnulib-tool: remove use of bold display in help screen
83450         * gnulib-tool (func_usage): Do not use bold display anymore in the
83451         help screen.  That was just meant to be a temporary emphasis for a
83452         backward-incompatible change.
83454 2011-02-23  Bruno Haible  <bruno@clisp.org>
83456         Fix misindentation of preprocessor directives.
83457         * lib/argp-namefrob.h: Reindent preprocessor directives.
83458         * lib/getopt_int.h (struct _getopt_data): Likewise.
83459         * lib/progreloc.c (maybe_executable, find_executable): Likewise.
83460         * lib/vasnprintf.c (decode_long_double): Likewise.
83461         * tests/test-argmatch.c: Insert blank lines, for clarity.
83462         * tests/test-exclude.c: Likewise.
83464 2011-02-22  Bruno Haible  <bruno@clisp.org>
83466         ioctl: Fix for MacOS X in 64-bit mode.
83467         * lib/ioctl.c (rpl_ioctl): Zero-extend, not sign-extend, the request
83468         value.
83469         Suggested by Eric Blake.
83470         Reported by Markus Gothe <nietzsche@lysator.liu.se>.
83472 2011-02-22  Jim Meyering  <meyering@redhat.com>
83474         maint: sc_cpp_indent_check: remove the "only in lib/" restriction
83475         * Makefile (sc_cpp_indent_check): Don't limit the check to files
83476         in lib/.
83478 2011-02-22  Eric Blake  <eblake@redhat.com>
83480         maint: avoid any CDPATH issue
83481         * Makefile (sc_cpp_indent_check): Anchor cd argument.
83483         maint: adjust cpp indentation for my modules, as well
83484         * Makefile (sc_cpp_indent_check): Add my name.
83485         * lib/fbufmode.c: Filter through cppi.
83486         * lib/fpurge.c: Likewise.
83487         * lib/freadable.c: Likewise.
83488         * lib/freading.c: Likewise.
83489         * lib/fwritable.c: Likewise.
83490         * lib/fwriting.c: Likewise.
83491         * lib/sigaction.c: Likewise.
83493 2011-02-22  Jim Meyering  <meyering@redhat.com>
83495         maint: adjust cpp indentation to reflect nesting depth
83496         I.e., in a block of code that begins with an unnested "#if",
83497         put one space between the "#" in column 1 and following token.
83498         For example,
83499         -#include <sys/vfs.h>
83500         +# include <sys/vfs.h>
83501         Do this only in .c files that are part of a module I maintain.
83502         * lib/linkat.c: Filter through cppi.
83503         * lib/nanosleep.c: Likewise.
83504         * lib/openat.c: Likewise.
83505         * lib/openat-die.c: Likewise.
83506         * lib/dup3.c: Likewise.
83507         * lib/fchownat.c: Likewise.
83508         * lib/flock.c: Likewise.
83509         * lib/fsync.c: Likewise.
83510         * lib/fts.c: Likewise.
83511         * lib/getpass.c: Likewise.
83512         * lib/gettimeofday.c: Likewise.
83513         * lib/userspec.c: Likewise.
83514         * Makefile (sc_cpp_indent_check): New rule, to check this.
83516 2011-02-22  Bruno Haible  <bruno@clisp.org>
83518         New module 'wctomb'.
83519         * lib/stdlib.in.h (wctomb): New declaration.
83520         * lib/wctomb.c: New file.
83521         * lib/wctomb-impl.h: New file.
83522         * m4/wctomb.m4: New file.
83523         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize GNULIB_WCTOMB,
83524         REPLACE_WCTOMB.
83525         * modules/stdlib (Makefile.am): Substitute GNULIB_WCTOMB,
83526         REPLACE_WCTOMB.
83527         * modules/wctomb: New file.
83528         * tests/test-stdlib-c++.cc: Test signature of wctomb.
83529         * doc/posix-functions/wctomb.texi: Mention the new module.
83530         * modules/wctob (Depends-on): Add wctomb.
83532 2011-02-22  Bruno Haible  <bruno@clisp.org>
83534         New module 'mbtowc'.
83535         * lib/stdlib.in.h (mbtowc): New declaration.
83536         * lib/mbtowc.c: New file.
83537         * lib/mbtowc-impl.h: New file, from libutf8 with modifications.
83538         * m4/mbtowc.m4: New file.
83539         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize GNULIB_MBTOWC,
83540         REPLACE_MBTOWC.
83541         * modules/stdlib (Makefile.am): Substitute GNULIB_MBTOWC,
83542         REPLACE_MBTOWC.
83543         * modules/mbtowc: New file.
83544         * tests/test-stdlib-c++.cc: Test signature of mbtowc.
83545         * doc/posix-functions/mbtowc.texi: Mention the new module.
83546         * modules/btowc (Depends-on): Add mbtowc.
83548 2011-02-22  Bruno Haible  <bruno@clisp.org>
83550         wcrtomb: Add more tests for native Windows platforms.
83551         * tests/test-wcrtomb-w32-1.sh: New file.
83552         * tests/test-wcrtomb-w32-2.sh: New file.
83553         * tests/test-wcrtomb-w32-3.sh: New file.
83554         * tests/test-wcrtomb-w32-4.sh: New file.
83555         * tests/test-wcrtomb-w32-5.sh: New file.
83556         * tests/test-wcrtomb-w32.c: New file.
83557         * modules/wcrtomb-tests (Files): Add them.
83558         (Makefile.am): Arrange to run these tests.
83559         * tests/test-wcrtomb-w32-6.sh: New file, currently unused.
83560         * tests/test-wcrtomb-w32-7.sh: New file, currently unused.
83562 2011-02-20  Bruno Haible  <bruno@clisp.org>
83564         wcrtomb: Enhance test.
83565         * tests/test-wcrtomb.c (main): Add test against bug with NULL argument.
83567 2011-02-20  Bruno Haible  <bruno@clisp.org>
83569         mbrtowc: Tiny optimization.
83570         * lib/mbrtowc.c (mbrtowc): Delay pstate assignment until it is needed.
83572 2011-02-20  Jim Meyering  <meyering@redhat.com>
83574         test-exclude.c: remove unmatched #endif
83575         * tests/test-exclude.c: Remove stray #endif, left over from
83576         the change of a week ago.
83578 2011-02-19  Jim Meyering  <meyering@redhat.com>
83580         git-version-gen: skip "-dirty" check when appropriate
83581         * build-aux/git-version-gen: Don't run any git commands when the
83582         version string comes from .tarball-version.  Prior to this, we
83583         would run git update-index --refresh even from a just-unpacked
83584         tarball directory, and that could affect a .git/ directory in a
83585         parent of the build directory.  Reported by Mike Frysinger.
83587 2011-02-19  Bruno Haible  <bruno@clisp.org>
83589         unictype/property-byname: Reduce the size of the 'data' segment.
83590         * lib/unictype/pr_byname.gperf: Add gperf option '%pic'.
83592 2011-02-19  Bruno Haible  <bruno@clisp.org>
83594         unictype/scripts: Reduce the size of the 'data' segment.
83595         * lib/gen-uni-tables.c (output_scripts_byname): Emit gperf option
83596         '%pic'.
83597         * lib/unictype/scripts_byname.gperf: Regenerated.
83599 2011-02-19  Bruno Haible  <bruno@clisp.org>
83601         stdint: Update documentation.
83602         * doc/posix-headers/stdint.texi: Mention WCHAR_MIN, WCHAR_MAX problem.
83604 2011-02-18  Paul Eggert  <eggert@cs.ucla.edu>
83606         stdint: omit redundant check for wchar.h
83607         * m4/stdint.m4 (gl_STDINT_H): The earlier part of this macro now
83608         always tests whether wchar.h exists, so remove the now-redundant test.
83610 2011-02-18  Bruno Haible  <bruno@clisp.org>
83612         stdint: Cut dependency to module 'wchar'.
83613         * lib/stdint.in.h: Include wchar.h only when HAVE_WCHAR_H is 1. Also
83614         include the necessary prerequisites.
83615         * m4/stdint.m4 (gl_STDINT_H): Test whether wchar.h exists.
83616         * modules/stdint (Depends-on): Remove wchar.
83617         (Makefile.am): Substitute HAVE_WCHAR_H.
83618         This reverts part of a 2007-01-06 commit. Reported by Paul Eggert.
83620 2011-02-18  Eric Blake  <eblake@redhat.com>
83622         longlong: skip, rather than fail, on cross-compilation
83623         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Avoid aborting configure
83624         when cross-compiling; regression from 2011-02-16.
83626 2011-02-17  Paul Eggert  <eggert@cs.ucla.edu>
83628         * NEWS: Mention 2011-02-08 change to stdlib.
83630 2011-02-17  Bruno Haible  <bruno@clisp.org>
83632         getloadavg: Add comments about platforms.
83633         * m4/getloadavg.m4: Add comment.
83634         * lib/getloadavg.c: Likewise.
83636 2011-02-17  Bruno Haible  <bruno@clisp.org>
83638         getloadavg: Fix link error on Solaris 2.6.
83639         * modules/getloadavg (Link): New section.
83640         * modules/getloadavg-tests (Makefile.am): Use GETLOADAVG_LIBS for
83641         linking test-getloadavg.
83642         * doc/glibc-functions/getloadavg.texi: Mention that Solaris 2.6 lacks
83643         getloadavg.
83645 2011-02-17  Paul Eggert  <eggert@cs.ucla.edu>
83647         * lib/getloadavg.c (getloadavg) [sgi]: Make ldav_off of type ptrdiff_t.
83648         It was 'int', but this doesn't match the IRIX 6.5 manual.
83649         Suggested by Bruno Haible in
83650         <http://lists.gnu.org/r/bug-gnulib/2011-02/msg00207.html>.
83652 2011-02-17  Bruno Haible  <bruno@clisp.org>
83654         havelib: Fix comments.
83655         * m4/lib-link.m4 (AC_LIB_RPATH): Update comments after 2007-01-02
83656         change.
83658 2011-02-17  Bruno Haible  <bruno@clisp.org>
83660         havelib: Update config.rpath.
83661         * build-aux/config.rpath: Update to match libtool.m4 from libtool-2.4.
83663 2011-02-17  Bruno Haible  <bruno@clisp.org>
83665         getloadavg test: Add some plausibility checks.
83666         * tests/test-getloadavg.c (check_avg): Print a warning when the value
83667         is improbable.
83669 2011-02-16  Eric Blake  <eblake@redhat.com>
83671         maintainer-makefile: make syntax-check a no-op from tarballs
83672         * top/maint.mk (no-vc-detected): New rule.
83673         (local-checks-available): Use it to avoid hanging if someone tries
83674         'make syntax-check' from a tarball.  Also append to any non-syntax
83675         checks already defined in cfg.mk.
83677 2011-02-16  Paul Eggert  <eggert@cs.ucla.edu>
83679         longlong: tune, particularly for common case of c99
83681         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Don't bother compiling
83682         or running anything if c99, or if unsigned long long int does not
83683         work.  In either case, we know the answer without further tests.
83684         Do not compile _AC_TYPE_LONG_LONG_SNIPPET twice.  Instead, compile
83685         it at most once, and use its results for both long long int and
83686         unsigned long long int.  This is more likely to be efficient in
83687         the common case where the program wants to check for both long
83688         long int and unsigned long long int.
83689         (AC_TYPE_UNSIGNED_LONG_LONG_INT): Don't bother compiling if c99,
83690         since the answer is already known.
83692 2011-02-15  Paul Eggert  <eggert@cs.ucla.edu>
83694         getloadavg: set errno
83695         * lib/getloadavg.c: Set errno when returning -1.  If no other
83696         error number looks appropriate, set it to ENOSYS if the getloadavg
83697         looks like it can't possibly ever work, ENOTSUP otherwise.
83698         Suggested by Bruno Haible in
83699         <http://lists.gnu.org/r/bug-gnulib/2011-02/msg00187.html>.
83701         getloadavg: trim unused parts and speed up 'configure'
83702         * NEWS: Document this.
83703         * lib/getloadavg.c: Ignore HAVE_GETLOADAVG; this file is now
83704         always compiled if getloadavg is absent.
83705         Move test code to ...
83706         * tests/test-getloadavg.c: New file, containing previous
83707         contents of test from lib/getloadavg.c.  It also contains
83708         suggestions by Bruno Haible in
83709         <http://lists.gnu.org/r/bug-gnulib/2011-02/msg00186.html>.
83710         * modules/getloadavg-tests: New file.
83711         * m4/getloadavg.m4 (gl_GETLOADAVG): Do not check for getloadavg twice.
83712         Do tests in the same order as they're needed for getloadavg.c.
83713         Omit setgid-related tests that generate symbols KMEM_GROUP,
83714         NEET_SETGID, GETLOADAVG_PRIVILEGED; nobody seems to use those any more.
83715         Do only the tests that are needed to see whether the system has
83716         getloadavg, moving the other tests into ...
83717         (gl_PREREQ_GETLOADAVG): ... here.  Do not define obsolete symbol
83718         NLIST_NAME_UNION; nobody should be using it.  Do not define
83719         symbols C_GETLOADAVG and HAVE_GETLOADAVG; they're no longer
83720         relevant, as the user of this module shouldn't care how getloadavg
83721         is implemented.
83723         getloadavg: omit unused var
83724         * lib/getloadavg.c (getloadavg): Omit unused local variable.
83726 2011-02-15  Jim Meyering  <meyering@redhat.com>
83728         doc: update users.txt
83729         * users.txt: Update iwhd's URL.
83731 2011-02-13  Bruno Haible  <bruno@clisp.org>
83733         Consistent macro naming for macros that use GCC __attribute__.
83734         * lib/di-set.h (_GL_ATTRIBUTE_NONNULL): Renamed from
83735         _ATTRIBUTE_NONNULL_.
83736         * lib/ino-map.h (_GL_ATTRIBUTE_NONNULL): Likewise.
83737         * lib/hash.h (_GL_ATTRIBUTE_WUR): Renamed from ATTRIBUTE_WUR.
83738         * lib/ignore-value.h (_GL_ATTRIBUTE_DEPRECATED): Renamed from
83739         ATTRIBUTE_DEPRECATED.
83740         * lib/openat.h (_GL_ATTRIBUTE_NORETURN): Renamed from
83741         ATTRIBUTE_NORETURN.
83742         * lib/sigpipe-die.h (_GL_ATTRIBUTE_NORETURN): Likewise.
83743         * lib/xmemdup0.h (_GL_ATTRIBUTE_NORETURN): Likewise.
83744         * lib/xstrtol.h (_GL_ATTRIBUTE_NORETURN): Likewise.
83745         * lib/xalloc.h (_GL_ATTRIBUTE_NORETURN): Likewise.
83746         (_GL_ATTRIBUTE_MALLOC): Renamed from ATTRIBUTE_MALLOC.
83747         (_GL_ATTRIBUTE_ALLOC_SIZE): Renamed from ATTRIBUTE_ALLOC_SIZE.
83748         * lib/version-etc.h (_GL_ATTRIBUTE_SENTINEL): Renamed from
83749         ATTRIBUTE_SENTINEL.
83750         * lib/safe-alloc.h (_GL_ATTRIBUTE_RETURN_CHECK): Renamed from
83751         ATTRIBUTE_RETURN_CHECK.
83752         * tests/test-ignore-value.c (_GL_ATTRIBUTE_RETURN_CHECK): Likewise.
83753         * tests/test-argmatch.c (_GL_ATTRIBUTE_NORETURN): Renamed from
83754         ATTRIBUTE_NORETURN.
83755         * tests/test-exclude.c (_GL_ATTRIBUTE_NORETURN): Likewise.
83756         Reported by Paul Eggert.
83758 2011-02-13  Bruno Haible  <bruno@clisp.org>
83760         Don't interfere with a program's definition of __attribute__.
83761         * lib/argp.h (__attribute__): Remove definition.
83762         (_GL_ATTRIBUTE_FORMAT): New macro.
83763         (argp_error, __argp_error, argp_failure, __argp_failure): Use it.
83764         * lib/argp-fmtstream.h (__attribute__): Remove definition.
83765         (_GL_ATTRIBUTE_FORMAT): New macro.
83766         (__argp_fmtstream_printf, argp_fmtstream_printf): Use it.
83767         * lib/argp-help.c (hol_entry_long_iterate): Use __attribute__ only for
83768         GCC 3 or newer.
83769         * lib/error.h (__attribute__): Remove definition.
83770         (_GL_ATTRIBUTE_FORMAT): New macro.
83771         (error, error_at_line): Use it.
83772         * lib/hash.h (__attribute__): Remove definition.
83773         (ATTRIBUTE_WUR): Update definition. Define always.
83774         * lib/openat.h (__attribute__): Remove definition.
83775         (ATTRIBUTE_NORETURN): Update definition. Define always.
83776         * lib/sigpipe-die.h (__attribute__): Remove definition.
83777         (ATTRIBUTE_NORETURN): Update definition. Define always.
83778         * lib/vasnprintf.h (__attribute__): Remove definition.
83779         (_GL_ATTRIBUTE_FORMAT): New macro.
83780         (asnprintf, vasnprintf): Use it.
83781         * lib/xalloc.h (__attribute__): Remove definition.
83782         (ATTRIBUTE_NORETURN): Update definition. Define always.
83783         (ATTRIBUTE_MALLOC, ATTRIBUTE_ALLOC_SIZE): Define always.
83784         * lib/xmemdup0.h (__attribute__): Remove definition.
83785         (ATTRIBUTE_NORETURN): Update definition. Define always.
83786         * lib/xprintf.h (__attribute__): Remove definition.
83787         (_GL_ATTRIBUTE_FORMAT): New macro.
83788         (xprintf, xvprintf, xfprintf, xvfprintf): Use it.
83789         * lib/xstrtol.h (__attribute__): Remove definition.
83790         (ATTRIBUTE_NORETURN): Update definition. Define always.
83791         * lib/xvasprintf.h (__attribute__): Remove definition.
83792         (_GL_ATTRIBUTE_FORMAT): New macro.
83793         (xasprintf, xvasprintf): Use it.
83794         * tests/test-argmatch.c (__attribute__): Remove definition.
83795         (ATTRIBUTE_NORETURN): Update definition. Define always.
83796         * tests/test-exclude.c (__attribute__): Remove definition.
83797         (ATTRIBUTE_NORETURN): Update definition. Define always.
83798         Reported by Paul Eggert.
83800 2011-02-13  Bruno Haible  <bruno@clisp.org>
83802         mbrtowc: Add more tests for native Windows platforms.
83803         * tests/test-mbrtowc-w32-1.sh: New file.
83804         * tests/test-mbrtowc-w32-2.sh: New file.
83805         * tests/test-mbrtowc-w32-3.sh: New file.
83806         * tests/test-mbrtowc-w32-4.sh: New file.
83807         * tests/test-mbrtowc-w32-5.sh: New file.
83808         * tests/test-mbrtowc-w32.c: New file.
83809         * modules/mbrtowc-tests (Files): Add them.
83810         (Makefile.am): Arrange to run these tests.
83811         * tests/test-mbrtowc-w32-6.sh: New file, currently unused.
83812         * tests/test-mbrtowc-w32-7.sh: New file, currently unused.
83814 2011-02-13  Bruno Haible  <bruno@clisp.org>
83816         mbrtowc: Work around native Windows bug.
83817         * m4/mbrtowc.m4 (gl_MBRTOWC_RETVAL): Detect native Windows bug. Use the
83818         guess when no suitable locale for testing was found.
83819         * doc/posix-functions/mbrtowc.texi: Mention the native Windows bug.
83821 2011-02-13  Bruno Haible  <bruno@clisp.org>
83823         mbsinit: Work around mingw bug.
83824         * m4/mbsinit.m4 (gl_FUNC_MBSINIT): Replace mbsinit also on mingw.
83825         * lib/mbsinit.c (mbsinit): Provide an alternate definition for native
83826         Windows.
83827         * doc/posix-functions/mbsinit.texi: Mention the mingw bug.
83829 2011-02-13  Bruno Haible  <bruno@clisp.org>
83831         mbsinit: Don't crash for a NULL argument.
83832         * lib/mbsinit.c (mbsinit): When the argument is NULL, return 1.
83833         * tests/test-mbsinit.c (mbsinit): Check this behaviour.
83835 2011-02-13  Bruno Haible  <bruno@clisp.org>
83837         Don't interfere with a program's definition of __attribute__.
83838         * lib/stdio.in.h (__attribute__): Remove definition.
83839         (_GL_ATTRIBUTE_FORMAT, _GL_ATTRIBUTE_FORMAT_PRINTF): New macros.
83840         (dprintf, fprintf, obstack_printf, obstack_printf, obstack_vprintf,
83841         printf, snprintf, sprintf, asprintf, vasprintf, vdprintf, vfprintf,
83842         vsnprintf, vsprintf): Use _GL_ATTRIBUTE_FORMAT_PRINTF.
83843         * lib/string.in.h (__attribute__): Remove definition.
83844         Reported by Paul Eggert.
83846 2011-02-12  Paul Eggert  <eggert@cs.ucla.edu>
83848         stdlib: don't get in the way of non-GCC __attribute__
83849         See thread starting at
83850         <http://lists.gnu.org/r/bug-gnulib/2011-02/msg00161.html>.
83851         Revert previous stdlib change, installing the following instead:
83852         * lib/stdlib.in.h (__attribute__): Remove.  We do not want
83853         to get in the way of a non-GCC compiler that supports __attribute__.
83854         (_GL_ATTRIBUTE_RETURN): New macro.
83855         (_Exit): Use it instead of __attribute__.
83857 2011-02-12  Bruno Haible  <bruno@clisp.org>
83859         quotearg test: Avoid test failure on mingw.
83860         * tests/test-quotearg.sh: Convert the locale identifier from native
83861         Windows syntax to Unix syntax.
83863 2011-02-12  Bruno Haible  <bruno@clisp.org>
83865         setlocale: Prefer gnulib's override over libintl's override.
83866         * lib/locale.in.h (GNULIB_defined_setlocale): New macro.
83867         * lib/gettext.h (setlocale): Redefine to rpl_setlocale if
83868         GNULIB_defined_setlocale is set.
83870 2011-02-12  Paul Eggert  <eggert@cs.ucla.edu>
83872         stdlib: support non-GCC __attribute__
83874         Fix a serious and tricky problem encountered when attempting to
83875         add the getloadavg module to Emacs.  Emacs worked fine on RHEL
83876         5.5, but it crashed due to memory corruption on Solaris 10 with
83877         Sun C 5.11.  Emacs normally ORs 3-bit tags into their low-order
83878         bits that are otherwise zero.  This tagging is optional inside
83879         Emacs but is preferred and is used when __attribute__ ((__aligned
83880         (8))) works, as it does with both recent-enough GCC and with Sun C
83881         5.11.  However, Sun C 5.11 is not GCC and does not #define
83882         __GNUC__ and __GNUC_MINOR__.
83884         When I added the getloadavg module to Emacs, it brought in
83885         stdlib.in.h, which contained this fragment:
83887            #ifndef __attribute__
83888            # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8)
83889            #  define __attribute__(Spec)   /* empty */
83890            # endif
83891            #endif
83893         When files that include <stdlib.h> were compiled with Sun C 5.11,
83894         the above code disabled __attribute__ ((__aligned (8))), which
83895         caused variables to not be properly aligned, which eventually led
83896         to the pointer corruption mentioned above.  (This was a bit hard
83897         to diagnose, unfortunately.)
83899         Several "#define __attribute__(X) /* empty */" code snippets need
83900         to be eradicated from Gnulib to work with non-GCC compilers that
83901         support __attribute__.  The Autoconf way to do this is to test for
83902         each kind of attribute that we want support for, and selectively
83903         enable that in source code.
83905         Fix this problem just for stdlib.h, by adding a test for the
83906         __noreturn__ attribute, and change stdlib.in.h to use that test
83907         when needed.  This technique can be easily generalized to the
83908         other *.in.h files and attributes, and a similar technique can be
83909         used for *.h and *.c files.  This patch is enough to solve the
83910         problem for Emacs + getloadavg, and I thought I'd publish it for
83911         feedback before undertaking further, similar fixes in other
83912         modules.
83914         This patch does not arrange to #define HAVE_ATTRIBUTE_NORETURN
83915         because it's not needed for stdlib.h.  It merely substitutes the
83916         value directly into stdlib.h.  We may well need to #define it, or
83917         similar symbols, for other modules, but it's nice to also have an
83918         option to not #define it for applications like Emacs that do not
83919         need it.
83921         * lib/stdlib.in.h (__attribute__): Do not #define.
83922         (_GL_ATTRIBUTE_NORETURN): New macro, which in stdlib.h needs to
83923         be defined only if the _Exit module is also used.
83924         * m4/_Exit.m4 (gl_FUNC__EXIT): Require gl_ATTRIBUTE_NORETURN.
83925         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Subst
83926         HAVE_ATTRIBUTE_NORETURN and default it to 1, its value on GNU
83927         platforms.
83928         * modules/_Exit (Files): Add m4/attribute.m4.
83929         * modules/stdlib (Makefile.am): Substitute HAVE_ATTRIBUTE_NORETURN.
83930         * m4/attribute.m4: New file.
83932 2011-02-12  Bruno Haible  <bruno@clisp.org>
83934         wcsrtombs: Work around bug on native Windows.
83935         * m4/wcsrtombs.m4 (gl_WCSRTOMBS_NULL): Test against mingw bug.
83936         * lib/wcsrtombs.c (rpl_wcsrtombs): When dest is NULL, pass SIZE_MAX
83937         instead of len.
83938         * doc/posix-functions/wcsrtombs.texi: Document mingw bug.
83940 2011-02-12  Bruno Haible  <bruno@clisp.org>
83942         mbsrtowcs: Work around bug on native Windows.
83943         * m4/mbsrtowcs.m4 (gl_MBSRTOWCS_WORKS): Require gt_LOCALE_FR. Test
83944         against mingw bug.
83945         * doc/posix-functions/mbsrtowcs.texi: Document mingw bug.
83947 2011-02-12  Bruno Haible  <bruno@clisp.org>
83949         Avoid setlocale bugs in tests.
83950         * modules/btowc (Dependencies): Add setlocale.
83951         * modules/c-strcase (Dependencies): Likewise.
83952         * modules/mbmemcasecmp (Dependencies): Likewise.
83953         * modules/mbmemcasecoll (Dependencies): Likewise.
83954         * modules/mbrtowc (Dependencies): Likewise.
83955         * modules/mbscasecmp (Dependencies): Likewise.
83956         * modules/mbscasestr (Dependencies): Likewise.
83957         * modules/mbschr (Dependencies): Likewise.
83958         * modules/mbscspn (Dependencies): Likewise.
83959         * modules/mbsinit (Dependencies): Likewise.
83960         * modules/mbsncasecmp (Dependencies): Likewise.
83961         * modules/mbsnrtowcs (Dependencies): Likewise.
83962         * modules/mbspbrk (Dependencies): Likewise.
83963         * modules/mbspcasecmp (Dependencies): Likewise.
83964         * modules/mbsrchr (Dependencies): Likewise.
83965         * modules/mbsrtowcs (Dependencies): Likewise.
83966         * modules/mbsspn (Dependencies): Likewise.
83967         * modules/mbsstr (Dependencies): Likewise.
83968         * modules/nl_langinfo (Dependencies): Likewise.
83969         * modules/quotearg (Dependencies): Likewise.
83970         * modules/unicase/locale-language (Dependencies): Likewise.
83971         * modules/unicase/ulc-casecmp (Dependencies): Likewise.
83972         * modules/unicase/ulc-casecoll (Dependencies): Likewise.
83973         * modules/unigbrk/ulc-grapheme-breaks (Dependencies): Likewise.
83974         * modules/unistdio/u8-vasnprintf (Dependencies): Likewise.
83975         * modules/unistdio/u16-vasnprintf (Dependencies): Likewise.
83976         * modules/unistdio/u32-vasnprintf (Dependencies): Likewise.
83977         * modules/unistdio/ulc-vasnprintf (Dependencies): Likewise.
83978         * modules/uniwbrk/ulc-wordbreaks (Dependencies): Likewise.
83979         * modules/vasnprintf-posix (Dependencies): Likewise.
83980         * modules/wcrtomb (Dependencies): Likewise.
83981         * modules/wcsnrtombs (Dependencies): Likewise.
83982         * modules/wcsrtombs (Dependencies): Likewise.
83984 2011-02-12  Bruno Haible  <bruno@clisp.org>
83986         setlocale: Workaround native Windows bug.
83987         * lib/setlocale.c (rpl_setlocale): On native Windows, when setlocale
83988         succeeds but sets LC_CTYPE to "C", report a failure.
83989         * tests/test-setlocale2.sh: New file.
83990         * tests/test-setlocale2.c: New file.
83991         * modules/setlocale-tests (Files): Add the new files.
83992         (Makefile.am): Enable test-setlocale2.sh test.
83993         * doc/posix-functions/setlocale.texi: Mention workaround.
83995 2011-02-11  Bruno Haible  <bruno@clisp.org>
83997         Tests for module 'setlocale'.
83998         * modules/setlocale-tests: New file.
83999         * tests/test-setlocale1.sh: New file.
84000         * tests/test-setlocale1.c: New file.
84002         New module 'setlocale'.
84003         * lib/locale.in.h (setlocale): New declaration.
84004         * lib/setlocale.c: New file, based on
84005         gettext/gettext-runtime/intl/setlocale.c.
84006         * m4/setlocale.m4: New file.
84007         * m4/locale_h.m4 (gl_LOCALE_H): Test whether setlocale is declared.
84008         (gl_LOCALE_H_DEFAULTS): Initialize GNULIB_SETLOCALE, REPLACE_SETLOCALE.
84009         * modules/locale (Makefile.am): Substitute GNULIB_SETLOCALE,
84010         REPLACE_SETLOCALE.
84011         * modules/setlocale: New file.
84012         * tests/test-locale-c++.cc: Test the declaration of setlocale.
84013         * doc/posix-functions/setlocale.texi: Mention the new module.
84015 2011-02-11  Bruno Haible  <bruno@clisp.org>
84017         Prepare for locale dependent tests on mingw.
84018         * m4/locale-ar.m4 (gt_LOCALE_AR): On native Windows, don't try "ar"
84019         because it has the wrong locale encoding.
84020         * m4/locale-fr.m4 (gt_LOCALE_FR): On native Windows, try
84021         French_France.1252 instead of "fr".
84022         (gt_LOCALE_FR_UTF8): On native Windows, try French_France.65001.
84023         * m4/locale-ja.m4 (gt_LOCALE_JA): On native Windows, don't try "ja"
84024         because it has the wrong locale encoding.
84025         * m4/locale-tr.m4 (gt_LOCALE_TR_UTF8): Require AC_CANONICAL_HOST. On
84026         native Windows, try Turkish_Turkey.65001.
84027         * m4/locale-zh.m4 (gt_LOCALE_ZH_CN): On native Windows, try
84028         Chinese_China.54936.
84030         Prepare for locale dependent tests on mingw.
84031         * m4/locale-ar.m4 (gt_LOCALE_AR): On native Windows, call setlocale
84032         differently.
84033         * m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): Likewise.
84034         * m4/locale-ja.m4 (gt_LOCALE_JA): Likewise.
84035         * m4/locale-tr.m4 (gt_LOCALE_TR_UTF8): Likewise.
84036         * m4/locale-zh.m4 (gt_LOCALE_ZH_CN): Likewise.
84038 2011-02-11  Eric Blake  <eblake@redhat.com>
84040         strptime: avoid compiler warnings
84041         * lib/strptime.c (__strptime_internal) [!_NL_CURRENT]: Avoid
84042         compiler warnings about dead code.
84043         Reported by Daniel P. Berrange.
84045 2011-02-11  Thien-Thi Nguyen  <ttn@gnuvola.org>
84047         doc: update users.txt
84048         * users.txt: Add rcs.
84050 2011-02-10  John W. Eaton  <jwe@gnu.org>
84052         doc: update users.txt
84053         * users.txt: Add octave.
84055 2011-02-10  Jim Meyering  <meyering@redhat.com>
84057         doc: update users.txt
84058         * users.txt: Add iwhd.
84060 2011-02-09  Bruno Haible  <bruno@clisp.org>
84062         gnulib-tool: Make copyright notice adjustment more robust.
84063         * gnulib-tool (func_import): In sed_transform_main_lib_file,
84064         sed_transform_build_aux_file, sed_transform_testsrelated_lib_file,
84065         allow a line break to occur after "GNU" in "GNU [Lesser] General Public
84066         License".
84067         Reported by Glenn Morris <rgm@gnu.org> via Paul Eggert.
84069 2011-02-06  Bruno Haible  <bruno@clisp.org>
84071         New module 'towctrans'.
84072         * modules/towctrans: New file.
84073         * lib/wctype.in.h (towctrans): New declaration.
84074         * lib/towctrans.c: New file.
84075         * lib/towctrans-impl.h: New file.
84076         * m4/towctrans.m4: New file.
84077         * m4/wctype_h.m4 (gl_WCTYPE_H): Test whether towctrans is declared.
84078         (gl_WCTYPE_H_DEFAULTS): Initialize GNULIB_TOWCTRANS.
84079         * modules/wctype-h (Makefile.am): Substitute GNULIB_TOWCTRANS.
84080         * tests/test-wctype-h-c++.cc: Test the declaration of towctrans.
84081         * doc/posix-functions/towctrans.texi: Mention the new module.
84083 2011-02-06  Bruno Haible  <bruno@clisp.org>
84085         New module 'wctrans'.
84086         * modules/wctrans: New file.
84087         * lib/wctype.in.h (wctrans): New declaration.
84088         * lib/wctrans.c: New file.
84089         * lib/wctrans-impl.h: New file.
84090         * m4/wctrans.m4: New file.
84091         * m4/wctype_h.m4 (gl_WCTYPE_H): Test whether wctrans is declared.
84092         (gl_WCTYPE_H_DEFAULTS): Initialize GNULIB_WCTRANS.
84093         * modules/wctype-h (Makefile.am): Substitute GNULIB_WCTRANS.
84094         * tests/test-wctype-h-c++.cc: Test the declaration of wctrans.
84095         * doc/posix-functions/wctrans.texi: Mention the new module.
84097 2011-02-06  Bruno Haible  <bruno@clisp.org>
84099         New module 'iswctype'.
84100         * modules/iswctype: New file.
84101         * lib/wctype.in.h (iswctype): New declaration.
84102         * lib/iswctype.c: New file.
84103         * lib/iswctype-impl.h: New file.
84104         * m4/iswctype.m4: New file.
84105         * m4/wctype_h.m4 (gl_WCTYPE_H): Test whether iswctype is declared.
84106         (gl_WCTYPE_H_DEFAULTS): Initialize GNULIB_ISWCTYPE.
84107         * modules/wctype-h (Makefile.am): Substitute GNULIB_ISWCTYPE.
84108         * tests/test-wctype-h-c++.cc: Test the declaration of iswctype.
84109         * doc/posix-functions/iswctype.texi: Mention the new module and the
84110         HP-UX 11.00 problem.
84112 2011-02-06  Bruno Haible  <bruno@clisp.org>
84114         New module 'wctype'.
84115         * modules/wctype: Change to represent the wctype() substitute.
84116         * lib/wctype.in.h (wctype): New declaration.
84117         * lib/wctype.c: New file.
84118         * lib/wctype-impl.h: New file.
84119         * m4/wctype.m4: New file.
84120         * m4/wctype_h.m4 (gl_WCTYPE_H): Test whether wctype is declared.
84121         (gl_WCTYPE_H_DEFAULTS): Initialize GNULIB_WCTYPE.
84122         * modules/wctype-h (Makefile.am): Substitute GNULIB_WCTYPE.
84123         * tests/test-wctype-h-c++.cc: Test the declaration of wctype.
84124         * doc/posix-functions/wctype.texi: Mention the new module and the
84125         HP-UX 11.00 problem.
84127 2011-02-06  Bruno Haible  <bruno@clisp.org>
84129         wctype-h: Ensure wctype_t and wctrans_t are defined.
84130         * lib/wctype.in.h (wctype_t, wctrans_t): New type declarations.
84131         * m4/wctype_h.m4 (gl_WCTYPE_H): Determine HAVE_WCTYPE_T, HAVE_WCTRANS_T.
84132         (gl_WCTYPE_H_DEFAULTS): Initialize HAVE_WCTYPE_T, HAVE_WCTRANS_T.
84133         * modules/wctype-h (Makefile.am): Substitute HAVE_WCTYPE_T,
84134         HAVE_WCTRANS_T.
84135         * tests/test-wctype-h.c: Check that wctype_t and wctrans_t are defined.
84137 2011-02-09  Paul Eggert  <eggert@cs.ucla.edu>
84139         flock: fix license typo
84141         * lib/flock.c: Fix typo in license.  One of the "Lesser"s was
84142         omitted.
84144 2011-02-08  Bruno Haible  <bruno@clisp.org>
84146         Split large sed scripts, for HP-UX sed.
84147         * modules/math (Makefile.am): Split sed scripts around 50 sed commands,
84148         to avoid HP-UX limit of 99 commands, in the near future.
84149         * modules/stdlib (Makefile.am): Likewise.
84150         * modules/unistd (Makefile.am): Likewise.
84151         * modules/wchar (Makefile.am): Likewise.
84152         Reported by Albert Chin <bug-gnulib@mlists.thewrittenword.com>.
84153         Suggestion by Ralf Wildenhues <Ralf.Wildenhues@gmx.de> in
84154         <http://lists.gnu.org/r/bug-gnulib/2010-01/msg00216.html>.
84156 2011-02-08  Paul Eggert  <eggert@cs.ucla.edu>
84157             Bruno Haible  <bruno@clisp.org>
84159         stdlib: improve random_r modularization
84160         * lib/stdlib.in.h: Encapsulate all the stuff having to do with
84161         random_r inside "#if @GNULIB_RANDOM_R@", so that it's clearer that
84162         you also need the random_r module to get this material right.
84163         * m4/random_r.m4 (gl_FUNC_RANDOM_R): Move check for random.h here ...
84164         * m4/stdlib_h.m4 (gl_STDLIB_H): ... from here.
84165         (gl_STDLIB_H_DEFAULTS): Default HAVE_RANDOM_H to 1, and AC_SUBST it.
84167 2011-02-08  Paul Eggert  <eggert@cs.ucla.edu>
84169         stdlib: don't depend on stdint
84170         * lib/stdlib.in.h: Don't include <stdint.h> merely because
84171         GNULIB_POSIXCHECK is defined.  GNULIB_POSIXCHECK seems to
84172         be independent of whether stdint.h is needed.
84173         * m4/random_r.m4 (gl_FUNC_RANDOM_R): Check for struct random_data
84174         here, instead of ...
84175         * m4/stdlib_h.m4 (gl_STDLIB_H): ... here.  Applications that need
84176         struct random_data should be using the random_r module, not just
84177         the stdlib module (which wouldn't make sense: what package needs
84178         just struct random_data without also needing random_r?).
84179         * modules/stdlib (Depends-on): Remove stdint.
84181         getloadavg: don't depend on c-strtod, cloexec, fcntl-safer
84182         See the thread rooted at
84183         <http://lists.gnu.org/r/bug-gnulib/2011-02/msg00090.html>.
84184         * lib/getloadavg.c: Do not include c-strtod.h, cloexec.h, or fcntl--.h.
84185         Include <fcntl.h> only if (defined __linux__ || defined __CYGWIN__
84186         || defined SUNOS_5 || (defined LOAD_AVE_TYPE && !  defined
84187         __VMS)); previously it was always included (via fcntl--.h).
84188         (getloadavg): Do not use c_strtod.  Instead, approximate it by
84189         hand; this is good enough for load averages.  Also, do not use
84190         set_cloexec_flag; instead, use the O_CLOEXEC and F_DUPFD_CLOEXEC
84191         flags directly if available and don't bother otherwise.  (Packages
84192         that need the extra reliability should use the modules that define
84193         these flags on older platforms that lack them.)
84194         * modules/getloadavg (Depends-on): Remove c-strtod, cloexec,
84195         fcntl-safer.
84197 2011-02-08  Jim Meyering  <meyering@redhat.com>
84199         di-set.h, ino-map.h: add multiple-inclusion guard
84200         Technically, the guard is required only for ino-map.h, due to its
84201         INO_MAP_INSERT_FAILURE definition, but do both for consistency.
84202         * lib/di-set.h: Add file-spanning #ifndef _GL_DI_SET_H.
84203         * lib/ino-map.h: Likewise.
84205 2011-02-06  Bruno Haible  <bruno@clisp.org>
84207         iswblank: Ensure declaration on glibc systems.
84208         * m4/iswblank.m4 (gl_FUNC_ISWBLANK): Require gl_USE_SYSTEM_EXTENSIONS.
84209         * modules/iswblank (Dependencies): Add 'extensions'.
84210         * doc/posix-functions/iswblank.texi: Document the glibc problem.
84212 2011-02-06  Bruno Haible  <bruno@clisp.org>
84214         New module 'iswblank'.
84215         * lib/wctype.in.h (iswblank): Don't declare if GNULIB_ISWBLANK is 0.
84216         * modules/iswblank: New file.
84217         * modules/wctype-h (Files): Remove lib/iswblank.c.
84218         (Makefile.am): Substitute GNULIB_ISWBLANK.
84219         * m4/iswblank.m4: New file, partially extracted from m4/wctype_h.m4.
84220         * m4/wctype_h.m4 (gl_WCTYPE_MODULE_INDICATOR): New macro.
84221         (gl_WCTYPE_H_DEFAULTS): New macro.
84222         (gl_WCTYPE_H): Require it. Remove iswblank related code.
84223         * modules/iswblank-tests: New file.
84224         * tests/test-iswblank.c: New file, extraced from tests/test-wctype-h.c.
84225         * tests/test-wctype-h.c (main): Remove iswblank tests.
84226         * tests/test-wctype-h-c++.cc: Guard the signature test of iswblank.
84227         * doc/posix-functions/iswblank.texi: Mention module 'iswblank' instead
84228         of 'wctype-h'.
84229         * NEWS: Mention the change.
84230         * modules/mbchar (Depends-on): Add iswblank.
84232 2011-02-08  Bruno Haible  <bruno@clisp.org>
84234         di-set tests: Refactor.
84235         * tests/test-di-set.c: Include di-set.h early. Include macros.h. Drop
84236         unnecessary includes.
84237         (ASSERT): Remove macro.
84238         (main): Make C90 compliant by avoiding variable declaration after
84239         statement.
84240         * modules/di-set-tests (Files): Add tests/macros.h.
84242 2011-02-08  Bruno Haible  <bruno@clisp.org>
84244         ino-map tests: Refactor.
84245         * tests/test-ino-map.c: Include ino-map.h early. Include macros.h. Drop
84246         unnecessary includes.
84247         (ASSERT): Remove macro.
84248         (main): Make C90 compliant by avoiding variable declaration after
84249         statement.
84250         * modules/ino-map-tests (Files): Add tests/macros.h.
84252 2011-02-08  Jim Meyering  <meyering@redhat.com>
84254         di-set: add "const" to a cast
84255         * lib/di-set.c (di_set_insert): Cast hash_insert0 argument to
84256         "(void const *)", not "(void *)".  Spotted by Bruno Haible.
84258 2011-02-06  Bruno Haible  <bruno@clisp.org>
84260         Rename module 'wctype' to 'wctype-h'.
84261         * modules/wctype-h: Renamed from modules/wctype.
84262         * modules/wctype: Simplyfy to a redirection to 'wctype-h'.
84263         * modules/wctype-h-tests: Renamed from modules/wctype-tests.
84264         (Files, Depends-on, Makefile.am): Update.
84265         * modules/wctype-h-c++-tests: Renamed from modules/wctype-c++-tests.
84266         (Files, Makefile.am): Update.
84267         * tests/test-wctype-h.c: Renamed from tests/test-wctype.c.
84268         * tests/test-wctype-h-c++.cc: Renamed from tests/test-wctype-c++.cc.
84269         * doc/posix-headers/wctype.texi: Update.
84270         * doc/posix-functions/iswalnum.texi: Update.
84271         * doc/posix-functions/iswalpha.texi: Update.
84272         * doc/posix-functions/iswblank.texi: Update.
84273         * doc/posix-functions/iswcntrl.texi: Update.
84274         * doc/posix-functions/iswdigit.texi: Update.
84275         * doc/posix-functions/iswgraph.texi: Update.
84276         * doc/posix-functions/iswlower.texi: Update.
84277         * doc/posix-functions/iswprint.texi: Update.
84278         * doc/posix-functions/iswpunct.texi: Update.
84279         * doc/posix-functions/iswspace.texi: Update.
84280         * doc/posix-functions/iswupper.texi: Update.
84281         * doc/posix-functions/iswxdigit.texi: Update.
84282         * doc/posix-functions/towlower.texi: Update.
84283         * doc/posix-functions/towupper.texi: Update.
84284         * NEWS: Mention the change.
84285         * modules/fnmatch (Dependencies): Add wctype-h, remove wctype.
84286         * modules/mbchar (Dependencies): Likewise.
84287         * modules/mbswidth (Dependencies): Likewise.
84288         * modules/quotearg (Dependencies): Likewise.
84289         * modules/regex (Dependencies): Likewise.
84290         * modules/wcscasecmp (Dependencies): Likewise.
84291         * modules/wcsncasecmp (Dependencies): Likewise.
84292         * modules/wcwidth (Dependencies): Likewise.
84294 2011-02-06  Bruno Haible  <bruno@clisp.org>
84296         New module 'wcswidth'.
84297         * modules/wcswidth: New file.
84298         * lib/wchar.in.h (wcswidth): New declaration.
84299         * lib/wcswidth.c: New file.
84300         * lib/wcswidth-impl.h: New file, from libutf8 with modifications.
84301         * m4/wcswidth.m4: New file.
84302         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcswidth is declared.
84303         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSWIDTH, HAVE_WCSWIDTH,
84304         REPLACE_WCSWIDTH.
84305         * modules/wchar (Makefile.am): Substitute GNULIB_WCSWIDTH,
84306         HAVE_WCSWIDTH, REPLACE_WCSWIDTH.
84307         * tests/test-wchar-c++.cc: Test the declaration of wcswidth.
84308         * doc/posix-functions/wcswidth.texi: Mention the new module.
84310 2011-02-06  Bruno Haible  <bruno@clisp.org>
84312         New module 'wcstok'.
84313         * modules/wcstok: New file.
84314         * lib/wchar.in.h (wcstok): New declaration.
84315         * lib/wcstok.c: New file.
84316         * lib/wcstok-impl.h: New file, from libutf8 with modifications.
84317         * m4/wcstok.m4: New file.
84318         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcstok is declared.
84319         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSTOK, HAVE_WCSTOK.
84320         * modules/wchar (Makefile.am): Substitute GNULIB_WCSTOK, HAVE_WCSTOK.
84321         * tests/test-wchar-c++.cc: Test the declaration of wcstok.
84322         * doc/posix-functions/wcstok.texi: Mention the new module.
84324 2011-02-06  Bruno Haible  <bruno@clisp.org>
84326         New module 'wcsstr'.
84327         * modules/wcsstr: New file.
84328         * lib/wchar.in.h (wcsstr): New declaration.
84329         * lib/wcsstr.c: New file.
84330         * lib/wcsstr-impl.h: New file, from libutf8 with modifications.
84331         * m4/wcsstr.m4: New file.
84332         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcsstr is declared.
84333         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSSTR, HAVE_WCSSTR.
84334         * modules/wchar (Makefile.am): Substitute GNULIB_WCSSTR, HAVE_WCSSTR.
84335         * tests/test-wchar-c++.cc: Test the declaration of wcsstr.
84336         * doc/posix-functions/wcsstr.texi: Mention the new module.
84338 2011-02-06  Bruno Haible  <bruno@clisp.org>
84340         New module 'wcspbrk'.
84341         * modules/wcspbrk: New file.
84342         * lib/wchar.in.h (wcspbrk): New declaration.
84343         * lib/wcspbrk.c: New file.
84344         * lib/wcspbrk-impl.h: New file, from libutf8 with modifications.
84345         * m4/wcspbrk.m4: New file.
84346         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcspbrk is declared.
84347         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSPBRK, HAVE_WCSPBRK.
84348         * modules/wchar (Makefile.am): Substitute GNULIB_WCSPBRK, HAVE_WCSPBRK.
84349         * tests/test-wchar-c++.cc: Test the declaration of wcspbrk.
84350         * doc/posix-functions/wcspbrk.texi: Mention the new module.
84352 2011-02-06  Bruno Haible  <bruno@clisp.org>
84354         New module 'wcsspn'.
84355         * modules/wcsspn: New file.
84356         * lib/wchar.in.h (wcsspn): New declaration.
84357         * lib/wcsspn.c: New file.
84358         * lib/wcsspn-impl.h: New file, from libutf8 with modifications.
84359         * m4/wcsspn.m4: New file.
84360         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcsspn is declared.
84361         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSSPN, HAVE_WCSSPN.
84362         * modules/wchar (Makefile.am): Substitute GNULIB_WCSSPN, HAVE_WCSSPN.
84363         * tests/test-wchar-c++.cc: Test the declaration of wcsspn.
84364         * doc/posix-functions/wcsspn.texi: Mention the new module.
84366 2011-02-06  Bruno Haible  <bruno@clisp.org>
84368         New module 'wcscspn'.
84369         * modules/wcscspn: New file.
84370         * lib/wchar.in.h (wcscspn): New declaration.
84371         * lib/wcscspn.c: New file.
84372         * lib/wcscspn-impl.h: New file, from libutf8 with modifications.
84373         * m4/wcscspn.m4: New file.
84374         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcscspn is declared.
84375         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSCSPN, HAVE_WCSCSPN.
84376         * modules/wchar (Makefile.am): Substitute GNULIB_WCSCSPN, HAVE_WCSCSPN.
84377         * tests/test-wchar-c++.cc: Test the declaration of wcscspn.
84378         * doc/posix-functions/wcscspn.texi: Mention the new module.
84380 2011-02-06  Bruno Haible  <bruno@clisp.org>
84382         New module 'wcsrchr'.
84383         * modules/wcsrchr: New file.
84384         * lib/wchar.in.h (wcsrchr): New declaration.
84385         * lib/wcsrchr.c: New file.
84386         * lib/wcsrchr-impl.h: New file, from libutf8 with modifications.
84387         * m4/wcsrchr.m4: New file.
84388         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcsrchr is declared.
84389         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSRCHR, HAVE_WCSRCHR.
84390         * modules/wchar (Makefile.am): Substitute GNULIB_WCSRCHR, HAVE_WCSRCHR.
84391         * tests/test-wchar-c++.cc: Test the declaration of wcsrchr.
84392         * doc/posix-functions/wcsrchr.texi: Mention the new module.
84394 2011-02-06  Bruno Haible  <bruno@clisp.org>
84396         New module 'wcschr'.
84397         * modules/wcschr: New file.
84398         * lib/wchar.in.h (wcschr): New declaration.
84399         * lib/wcschr.c: New file.
84400         * lib/wcschr-impl.h: New file, from libutf8 with modifications.
84401         * m4/wcschr.m4: New file.
84402         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcschr is declared.
84403         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSCHR, HAVE_WCSCHR.
84404         * modules/wchar (Makefile.am): Substitute GNULIB_WCSCHR, HAVE_WCSCHR.
84405         * tests/test-wchar-c++.cc: Test the declaration of wcschr.
84406         * doc/posix-functions/wcschr.texi: Mention the new module.
84408 2011-02-06  Bruno Haible  <bruno@clisp.org>
84410         New module 'wcsdup'.
84411         * modules/wcsdup: New file.
84412         * lib/wchar.in.h (wcsdup): New declaration.
84413         * lib/wcsdup.c: New file.
84414         * lib/wcsdup-impl.h: New file, from libutf8 with modifications.
84415         * m4/wcsdup.m4: New file.
84416         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcsdup is declared.
84417         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSDUP, HAVE_WCSDUP.
84418         * modules/wchar (Makefile.am): Substitute GNULIB_WCSDUP, HAVE_WCSDUP.
84419         * tests/test-wchar-c++.cc: Test the declaration of wcsdup.
84420         * doc/posix-functions/wcsdup.texi: Mention the new module.
84422 2011-02-06  Bruno Haible  <bruno@clisp.org>
84424         New module 'wcsxfrm'.
84425         * modules/wcsxfrm: New file.
84426         * lib/wchar.in.h (wcsxfrm): New declaration.
84427         * lib/wcsxfrm.c: New file.
84428         * lib/wcsxfrm-impl.h: New file.
84429         * m4/wcsxfrm.m4: New file.
84430         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcsxfrm is declared.
84431         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSXFRM, HAVE_WCSXFRM.
84432         * modules/wchar (Makefile.am): Substitute GNULIB_WCSXFRM, HAVE_WCSXFRM.
84433         * tests/test-wchar-c++.cc: Test the declaration of wcsxfrm.
84434         * doc/posix-functions/wcsxfrm.texi: Mention the new module.
84436 2011-02-06  Bruno Haible  <bruno@clisp.org>
84438         New module 'wcscoll'.
84439         * modules/wcscoll: New file.
84440         * lib/wchar.in.h (wcscoll): New declaration.
84441         * lib/wcscoll.c: New file.
84442         * lib/wcscoll-impl.h: New file.
84443         * m4/wcscoll.m4: New file.
84444         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcscoll is declared.
84445         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSCOLL, HAVE_WCSCOLL.
84446         * modules/wchar (Makefile.am): Substitute GNULIB_WCSCOLL, HAVE_WCSCOLL.
84447         * tests/test-wchar-c++.cc: Test the declaration of wcscoll.
84448         * doc/posix-functions/wcscoll.texi: Mention the new module.
84450 2011-02-06  Bruno Haible  <bruno@clisp.org>
84452         New module 'wcsncasecmp'.
84453         * modules/wcsncasecmp: New file.
84454         * lib/wchar.in.h (wcsncasecmp): New declaration.
84455         * lib/wcsncasecmp.c: New file.
84456         * lib/wcsncasecmp-impl.h: New file, from libutf8 with modifications.
84457         * m4/wcsncasecmp.m4: New file.
84458         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcsncasecmp is declared.
84459         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSNCASECMP, HAVE_WCSNCASECMP.
84460         * modules/wchar (Makefile.am): Substitute GNULIB_WCSNCASECMP,
84461         HAVE_WCSNCASECMP.
84462         * tests/test-wchar-c++.cc: Test the declaration of wcsncasecmp.
84463         * doc/posix-functions/wcsncasecmp.texi: Mention the new module.
84465 2011-02-06  Bruno Haible  <bruno@clisp.org>
84467         New module 'wcscasecmp'.
84468         * modules/wcscasecmp: New file.
84469         * lib/wchar.in.h (wcscasecmp): New declaration.
84470         * lib/wcscasecmp.c: New file.
84471         * lib/wcscasecmp-impl.h: New file, from libutf8 with modifications.
84472         * m4/wcscasecmp.m4: New file.
84473         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcscasecmp is declared.
84474         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSCASECMP, HAVE_WCSCASECMP.
84475         * modules/wchar (Makefile.am): Substitute GNULIB_WCSCASECMP,
84476         HAVE_WCSCASECMP.
84477         * tests/test-wchar-c++.cc: Test the declaration of wcscasecmp.
84478         * doc/posix-functions/wcscasecmp.texi: Mention the new module.
84480 2011-02-05  Bruno Haible  <bruno@clisp.org>
84482         New module 'wcsncmp'.
84483         * modules/wcsncmp: New file.
84484         * lib/wchar.in.h (wcsncmp): New declaration.
84485         * lib/wcsncmp.c: New file.
84486         * lib/wcsncmp-impl.h: New file, from libutf8 with modifications.
84487         * m4/wcsncmp.m4: New file.
84488         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcsncmp is declared.
84489         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSNCMP, HAVE_WCSNCMP.
84490         * modules/wchar (Makefile.am): Substitute GNULIB_WCSNCMP, HAVE_WCSNCMP.
84491         * tests/test-wchar-c++.cc: Test the declaration of wcsncmp.
84492         * doc/posix-functions/wcsncmp.texi: Mention the new module.
84494 2011-02-05  Bruno Haible  <bruno@clisp.org>
84496         New module 'wcscmp'.
84497         * modules/wcscmp: New file.
84498         * lib/wchar.in.h (wcscmp): New declaration.
84499         * lib/wcscmp.c: New file.
84500         * lib/wcscmp-impl.h: New file, from libutf8 with modifications.
84501         * m4/wcscmp.m4: New file.
84502         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcscmp is declared.
84503         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSCMP, HAVE_WCSCMP.
84504         * modules/wchar (Makefile.am): Substitute GNULIB_WCSCMP, HAVE_WCSCMP.
84505         * tests/test-wchar-c++.cc: Test the declaration of wcscmp.
84506         * doc/posix-functions/wcscmp.texi: Mention the new module.
84508 2011-02-05  Bruno Haible  <bruno@clisp.org>
84510         New module 'wcsncat'.
84511         * modules/wcsncat: New file.
84512         * lib/wchar.in.h (wcsncat): New declaration.
84513         * lib/wcsncat.c: New file.
84514         * lib/wcsncat-impl.h: New file, from libutf8 with modifications.
84515         * m4/wcsncat.m4: New file.
84516         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcsncat is declared.
84517         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSNCAT, HAVE_WCSNCAT.
84518         * modules/wchar (Makefile.am): Substitute GNULIB_WCSNCAT, HAVE_WCSNCAT.
84519         * tests/test-wchar-c++.cc: Test the declaration of wcsncat.
84520         * doc/posix-functions/wcsncat.texi: Mention the new module.
84522 2011-02-05  Bruno Haible  <bruno@clisp.org>
84524         New module 'wcscat'.
84525         * modules/wcscat: New file.
84526         * lib/wchar.in.h (wcscat): New declaration.
84527         * lib/wcscat.c: New file.
84528         * lib/wcscat-impl.h: New file, from libutf8 with modifications.
84529         * m4/wcscat.m4: New file.
84530         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcscat is declared.
84531         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSCAT, HAVE_WCSCAT.
84532         * modules/wchar (Makefile.am): Substitute GNULIB_WCSCAT, HAVE_WCSCAT.
84533         * tests/test-wchar-c++.cc: Test the declaration of wcscat.
84534         * doc/posix-functions/wcscat.texi: Mention the new module.
84536 2011-02-05  Bruno Haible  <bruno@clisp.org>
84538         New module 'wcpncpy'.
84539         * modules/wcpncpy: New file.
84540         * lib/wchar.in.h (wcpncpy): New declaration.
84541         * lib/wcpncpy.c: New file.
84542         * lib/wcpncpy-impl.h: New file, from libutf8 with modifications.
84543         * m4/wcpncpy.m4: New file.
84544         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcpncpy is declared.
84545         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCPNCPY, HAVE_WCPNCPY.
84546         * modules/wchar (Makefile.am): Substitute GNULIB_WCPNCPY, HAVE_WCPNCPY.
84547         * tests/test-wchar-c++.cc: Test the declaration of wcpncpy.
84548         * doc/posix-functions/wcpncpy.texi: Mention the new module.
84550 2011-02-05  Bruno Haible  <bruno@clisp.org>
84552         New module 'wcsncpy'.
84553         * modules/wcsncpy: New file.
84554         * lib/wchar.in.h (wcsncpy): New declaration.
84555         * lib/wcsncpy.c: New file.
84556         * lib/wcsncpy-impl.h: New file, from libutf8 with modifications.
84557         * m4/wcsncpy.m4: New file.
84558         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcsncpy is declared.
84559         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSNCPY, HAVE_WCSNCPY.
84560         * modules/wchar (Makefile.am): Substitute GNULIB_WCSNCPY, HAVE_WCSNCPY.
84561         * tests/test-wchar-c++.cc: Test the declaration of wcsncpy.
84562         * doc/posix-functions/wcsncpy.texi: Mention the new module.
84564 2011-02-05  Bruno Haible  <bruno@clisp.org>
84566         New module 'wcpcpy'.
84567         * modules/wcpcpy: New file.
84568         * lib/wchar.in.h (wcpcpy): New declaration.
84569         * lib/wcpcpy.c: New file.
84570         * lib/wcpcpy-impl.h: New file, from libutf8 with modifications.
84571         * m4/wcpcpy.m4: New file.
84572         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcpcpy is declared.
84573         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCPCPY, HAVE_WCPCPY.
84574         * modules/wchar (Makefile.am): Substitute GNULIB_WCPCPY, HAVE_WCPCPY.
84575         * tests/test-wchar-c++.cc: Test the declaration of wcpcpy.
84576         * doc/posix-functions/wcpcpy.texi: Mention the new module.
84578 2011-02-05  Bruno Haible  <bruno@clisp.org>
84580         New module 'wcscpy'.
84581         * modules/wcscpy: New file.
84582         * lib/wchar.in.h (wcscpy): New declaration.
84583         * lib/wcscpy.c: New file.
84584         * lib/wcscpy-impl.h: New file, from libutf8 with modifications.
84585         * m4/wcscpy.m4: New file.
84586         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcscpy is declared.
84587         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSCPY, HAVE_WCSCPY.
84588         * modules/wchar (Makefile.am): Substitute GNULIB_WCSCPY, HAVE_WCSCPY.
84589         * tests/test-wchar-c++.cc: Test the declaration of wcscpy.
84590         * doc/posix-functions/wcscpy.texi: Mention the new module.
84592 2011-02-05  Bruno Haible  <bruno@clisp.org>
84594         New module 'wcsnlen'.
84595         * modules/wcsnlen: New file.
84596         * lib/wchar.in.h (wcsnlen): New declaration.
84597         * lib/wcsnlen.c: New file.
84598         * lib/wcsnlen-impl.h: New file, from libutf8 with modifications.
84599         * m4/wcsnlen.m4: New file.
84600         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcsnlen is declared.
84601         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSNLEN, HAVE_WCSNLEN.
84602         * modules/wchar (Makefile.am): Substitute GNULIB_WCSNLEN, HAVE_WCSNLEN.
84603         * tests/test-wchar-c++.cc: Test the declaration of wcsnlen.
84604         * doc/posix-functions/wcsnlen.texi: Mention the new module.
84606 2011-02-05  Bruno Haible  <bruno@clisp.org>
84608         New module 'wcslen'.
84609         * modules/wcslen: New file.
84610         * lib/wchar.in.h (wcslen): New declaration.
84611         * lib/wcslen.c: New file.
84612         * lib/wcslen-impl.h: New file, from libutf8 with modifications.
84613         * m4/wcslen.m4: New file.
84614         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcslen is declared.
84615         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSLEN, HAVE_WCSLEN.
84616         * modules/wchar (Makefile.am): Substitute GNULIB_WCSLEN, HAVE_WCSLEN.
84617         * tests/test-wchar-c++.cc: Test the declaration of wcslen.
84618         * doc/posix-functions/wcslen.texi: Mention the new module.
84620 2011-02-05  Bruno Haible  <bruno@clisp.org>
84622         New module 'wmemset'.
84623         * modules/wmemset: New file.
84624         * lib/wchar.in.h (wmemset): New declaration.
84625         * lib/wmemset.c: New file.
84626         * lib/wmemset-impl.h: New file, from libutf8 with modifications.
84627         * m4/wmemset.m4: New file.
84628         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wmemset is declared.
84629         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WMEMSET, HAVE_WMEMSET.
84630         * modules/wchar (Makefile.am): Substitute GNULIB_WMEMSET, HAVE_WMEMSET.
84631         * tests/test-wchar-c++.cc: Test the declaration of wmemset.
84632         * doc/posix-functions/wmemset.texi: Mention the new module.
84634 2011-02-05  Bruno Haible  <bruno@clisp.org>
84636         New module 'wmemmove'.
84637         * modules/wmemmove: New file.
84638         * lib/wchar.in.h (wmemmove): New declaration.
84639         * lib/wmemmove.c: New file.
84640         * lib/wmemmove-impl.h: New file, from libutf8 with modifications.
84641         * m4/wmemmove.m4: New file.
84642         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wmemmove is declared.
84643         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WMEMMOVE, HAVE_WMEMMOVE.
84644         * modules/wchar (Makefile.am): Substitute GNULIB_WMEMMOVE,
84645         HAVE_WMEMMOVE.
84646         * tests/test-wchar-c++.cc: Test the declaration of wmemmove.
84647         * doc/posix-functions/wmemmove.texi: Mention the new module.
84649 2011-02-05  Bruno Haible  <bruno@clisp.org>
84651         New module 'wmemcpy'.
84652         * modules/wmemcpy: New file.
84653         * lib/wchar.in.h (wmemcpy): New declaration.
84654         * lib/wmemcpy.c: New file.
84655         * lib/wmemcpy-impl.h: New file, from libutf8 with modifications.
84656         * m4/wmemcpy.m4: New file.
84657         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wmemcpy is declared.
84658         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WMEMCPY, HAVE_WMEMCPY.
84659         * modules/wchar (Makefile.am): Substitute GNULIB_WMEMCPY, HAVE_WMEMCPY.
84660         * tests/test-wchar-c++.cc: Test the declaration of wmemcpy.
84661         * doc/posix-functions/wmemcpy.texi: Mention the new module.
84663 2011-02-05  Bruno Haible  <bruno@clisp.org>
84665         New module 'wmemcmp'.
84666         * modules/wmemcmp: New file.
84667         * lib/wchar.in.h (wmemcmp): New declaration.
84668         * lib/wmemcmp.c: New file.
84669         * lib/wmemcmp-impl.h: New file, from libutf8 with modifications.
84670         * m4/wmemcmp.m4: New file.
84671         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wmemcmp is declared.
84672         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WMEMCMP, HAVE_WMEMCMP.
84673         * modules/wchar (Makefile.am): Substitute GNULIB_WMEMCMP, HAVE_WMEMCMP.
84674         * tests/test-wchar-c++.cc: Test the declaration of wmemcmp.
84675         * doc/posix-functions/wmemcmp.texi: Mention the new module.
84677 2011-02-07  Jim Meyering  <meyering@redhat.com>
84679         di-set, ino-map: new modules, from coreutils
84680         * lib/di-set.c: New file.
84681         * lib/di-set.h: Likewise.
84682         * lib/ino-map.c: Likewise.
84683         * lib/ino-map.h: Likewise.
84684         * modules/di-set: Likewise.
84685         * modules/di-set-tests: Likewise.
84686         * modules/ino-map: Likewise.
84687         * modules/ino-map-tests: Likewise.
84688         * tests/test-di-set.c: Likewise.
84689         * tests/test-ino-map.c: Likewise.
84691 2011-02-06  Paul Eggert  <eggert@cs.ucla.edu>
84693         getloadavg: merge minor changes from Emacs
84695         * lib/getloadavg.c (getloadavg_initialized): More-accurate comment.
84696         (getloadavg): Use memset, not bzero.
84698         2008-07-25  Chong Yidong  <cyd@stupidchicken.com>
84699         * lib/getloadavg.c (nl): Rename to name_list to avoid ncurses.h
84700         clash (bug#86).
84702 2010-11-14  Bruno Haible  <bruno@clisp.org>
84704         Allow multiple gnulib generated replacements to coexist.
84705         * lib/getopt.in.h (struct option): Avoid identical redefinition.
84706         * lib/inttypes.in.h (imaxdiv_t): Likewise.
84707         * lib/langinfo.in.h (nl_item): Likewise.
84708         * lib/math.in.h (_NaN, NAN): Likewise.
84709         * lib/netdb.in.h (struct addrinfo): Likewise.
84710         * lib/poll.in.h (struct pollfd, nfds_t): Likewise.
84711         * lib/pthread.in.h (pthread_t, pthread_attr_t, pthread_barrier_t,
84712         pthread_barrierattr_t, pthread_cond_t, pthread_condattr_t,
84713         pthread_key_t, pthread_mutex_t, pthread_mutexattr_t, pthread_once_t,
84714         pthread_rwlock_t, pthread_rwlockattr_t, pthread_cond_destroy,
84715         pthread_cond_init, pthread_cond_signal, pthread_cond_wait,
84716         pthread_create, pthread_exit, pthread_join, pthread_mutexattr_destroy,
84717         pthread_mutexattr_init, pthread_mutexattr_settype,
84718         pthread_mutex_destroy, pthread_mutex_init, pthread_mutex_lock,
84719         pthread_mutex_trylock, pthread_mutex_unlock, pthread_spinlock_t,
84720         pthread_spin_init, pthread_spin_destroy, pthread_spin_lock,
84721         pthread_spin_trylock, pthread_spin_unlock): Likewise.
84722         * lib/sched.in.h (struct sched_param): Likewise.
84723         * lib/se-selinux.in.h (security_class_t, security_context_t,
84724         is_selinux_enabled, getcon, freecon, getfscreatecon, setfscreatecon,
84725         matchpathcon, getfilecon, lgetfilecon, fgetfilecon, setfilecon,
84726         lsetfilecon, fsetfilecon, security_check_context,
84727         security_check_context_raw, setexeccon, matchpathcon_init_prefix):
84728         Likewise.
84729         * lib/search.in.h (VISIT, _gl_search_compar_fn, _gl_search_action_fn):
84730         Likewise.
84731         * lib/signal.in.h (sig_atomic_t, sigset_t, verify_NSIG_constraint,
84732         _gl_function_taking_int_returning_void_t, union sigval,
84733         struct siginfo_t, siginfo_t, struct sigaction): Likewise.
84734         * lib/spawn.in.h (posix_spawnattr_t, posix_spawn_file_actions_t,
84735         verify_POSIX_SPAWN_USEVFORK_no_overlap): Likewise.
84736         * lib/stdint.in.h (gl_int8_t, gl_uint8_t, gl_int16_t, gl_uint16_t,
84737         gl_int32_t, gl_uint32_t, gl_int64_t, gl_uint64_t, int_least8_t,
84738         uint_least8_t, int_least16_t, uint_least16_t, int_least32_t,
84739         uint_least32_t, int_least64_t, uint_least64_t, gl_int_fast8_t,
84740         gl_uint_fast8_t, gl_int_fast16_t, gl_uint_fast16_t, gl_int_fast32_t,
84741         gl_uint_fast32_t, int_fast64_t, uint_fast64_t, gl_intptr_t,
84742         gl_uintptr_t, intmax_t, uintmax_t, _verify_intmax_size): Likewise.
84743         * lib/stdio.in.h (rpl_fseek, rpl_ftell): Likewise.
84744         * lib/sys_socket.in.h (sa_family_t, struct sockaddr_storage,
84745         socklen_t, rpl_fd_isset): Likewise.
84746         * lib/sys_stat.in.h (rpl_mkdir): Likewise.
84747         * lib/sys_time.in.h (struct timeval): Likewise.
84748         * lib/sys_times.in.h (struct tms): Likewise.
84749         * lib/sys_utsname.in.h (struct utsname):
84750         * lib/time.in.h (struct timespec, __time_t_must_be_integral): Likewise.
84751         * lib/unistd.in.h (getpagesize): Likewise.
84752         * lib/wchar.in.h (mbstate_t): Likewise.
84753         * lib/wctype.in.h (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit,
84754         iswgraph, iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit,
84755         towlower, towupper): Likewise.
84756         Reported by Sam Steingold <sds@gnu.org>.
84758 2011-02-05  Eric Blake  <eblake@redhat.com>
84760         unsetenv: work around Haiku issues
84761         * m4/setenv.m4 (gl_FUNC_UNSETENV): Also detect Haiku issue.
84762         * doc/posix-functions/unsetenv.texi (unsetenv): Document it.
84764 2010-12-30  Bruce Korb  <bkorb@gnu.org>
84766         libposix: avoid calling error() within libposix
84767         * lib/openat-die.c: remove error module stuff when GNULIB_LIBPOSIX
84768         is defined.
84770 2011-02-05  Eric Blake  <eblake@redhat.com>
84772         strerror_r-posix: port to cygwin
84773         * lib/strerror_r.c (strerror_r) [__CYGWIN__]: Add cygwin
84774         implementation.
84775         * m4/strerror_r.m4 (gl_FUNC_STRERROR_R): Adjust comment.
84776         * tests/test-strerror_r.c (main): Fix test.
84777         * doc/posix-functions/strerror_r.texi (strerror_r): Document the
84778         issue.
84780 2011-02-05  Bruno Haible  <bruno@clisp.org>
84782         New module 'wmemchr'.
84783         * modules/wmemchr: New file.
84784         * lib/wchar.in.h (wmemchr): New declaration.
84785         * lib/wmemchr.c: New file.
84786         * lib/wmemchr-impl.h: New file, from libutf8 with modifications.
84787         * m4/wmemchr.m4: New file.
84788         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wmemchr is declared.
84789         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WMEMCHR, HAVE_WMEMCHR.
84790         * modules/wchar (Makefile.am): Substitute GNULIB_WMEMCHR, HAVE_WMEMCHR.
84791         * tests/test-wchar-c++.cc: Test the declaration of wmemchr.
84792         * doc/posix-functions/wmemchr.texi: Mention the new module.
84794 2011-02-04  Eric Blake  <eblake@redhat.com>
84796         fdopendir: detect FreeBSD bug
84797         * m4/fdopendir.m4 (gl_FUNC_FDOPENDIR): Detect bug.
84798         * doc/posix-functions/fdopendir.texi (fdopendir): Document it.
84800 2011-02-04  Paul Eggert  <eggert@cs.ucla.edu>
84802         stdbool: do not define HAVE_STDBOOL_H
84803         * m4/stdbool.m4 (AC_CHECK_HEADER_STDBOOL): Renamed from
84804         AC_HEADER_STDBOOL.  All uses changed.  Do not define
84805         HAVE_STDBOOL_H, as gnulib does not need this.  This change is
84806         imported from the latest Autoconf git.  It was motivated by Emacs,
84807         which uses gnulib but does not need HAVE_STDBOOL_H.
84809 2011-02-04  Bruno Haible  <bruno@clisp.org>
84811         wcsnrtombs: Prepare for new module wwcsnrtombs.
84812         * lib/wcsnrtombs-impl.h: New file, extracted from lib/wcsnrtombs.c.
84813         * lib/wcsnrtombs.c: Include it.
84814         * modules/wcsnrtombs (Files): Add lib/wcsnrtombs-impl.h.
84816         wcsrtombs: Prepare for new module wwcsrtombs.
84817         * lib/wcsrtombs-impl.h: New file, extracted from lib/wcsrtombs.c.
84818         * lib/wcsrtombs.c: Include it.
84819         * modules/wcsrtombs (Files): Add lib/wcsrtombs-impl.h.
84821         mbsnrtowcs: Prepare for new module mbsnrtowwcs.
84822         * lib/mbsnrtowcs-impl.h: New file, extracted from lib/mbsnrtowcs.c.
84823         * lib/mbsnrtowcs.c: Include it.
84824         * modules/mbsnrtowcs (Files): Add lib/mbsnrtowcs-impl.h.
84826         mbsrtowcs: Prepare for new module mbsrtowwcs.
84827         * lib/mbsrtowcs-impl.h: New file, extracted from lib/mbsrtowcs.c.
84828         * lib/mbsrtowcs.c: Include it.
84829         * modules/mbsrtowcs (Files): Add lib/mbsrtowcs-impl.h.
84831 2011-02-04  Bruno Haible  <bruno@clisp.org>
84833         vasnprintf: Reduce use of malloc for small format strings.
84834         * lib/printf-args.h (N_DIRECT_ALLOC_ARGUMENTS): New macro.
84835         (arguments): Add room for the first 7 arguments.
84836         * lib/printf-parse.h (N_DIRECT_ALLOC_DIRECTIVES): New macro.
84837         (char_directives, u8_directives, u16_directives, u32_directives): Add
84838         room for the first 7 directives.
84839         * lib/printf-parse.c: Include <string.h>.
84840         (PRINTF_PARSE): Change memory handling code so that it uses the first
84841         7 preallocated elements in an 'arguments' or 'DIRECTIVES' struct.
84842         * lib/vasnprintf.c (VASNPRINTF): Update memory handling code.
84843         Reported by Pádraig Brady <P@draigbrady.com>.
84845 2011-01-31  Eric Blake  <eblake@redhat.com>
84847         dup2: work around Haiku bug
84848         * m4/dup2.m4 (gl_FUNC_DUP2): Test for bug.
84849         * lib/dup2.c (rpl_dup2) [!WIN32]: Add workaround.
84850         * doc/posix-functions/dup2.texi (dup2): Document the bug.
84851         * tests/test-dup2.c (main): Enhance test.
84853 2011-01-31  Simon Josefsson  <simon@josefsson.org>
84855         doc: off_t is not available in eglibc 2.11.2 stdio.h.
84856         * doc/posix-headers/stdio.texi (stdio.h): Mention that off_t isn't
84857         declared by eglibc 2.11.2.
84858         * lib/stdio.in.h: Likewise.
84860 2011-01-31  Eric Blake  <eblake@redhat.com>
84862         ignore-value: add missing test dependency
84863         * tests/test-ignore-value.c: Revert previous change; stdio.h
84864         provides off_t.
84865         * modules/ignore-value-tests (Depends-on): Add missing dependency.
84867 2011-01-30  Paul Eggert  <eggert@cs.ucla.edu>
84869         mktime: clarify long_int width checking
84870         * lib/mktime.c (long_int_is_wide_enough): Move this assertion to
84871         the top level, to make it clearer that the assumption about
84872         long_int width is being checked.  See
84873         <http://lists.gnu.org/r/bug-gnulib/2011-01/msg00554.html>.
84875 2011-01-30  Simon Josefsson  <simon@josefsson.org>
84877         ignore-value: Fix self-test.
84878         * tests/test-ignore-value.c: Include sys/types.h for off_t.
84880 2011-01-29  Paul Eggert  <eggert@cs.ucla.edu>
84882         TYPE_MAXIMUM: avoid theoretically undefined behavior
84883         * lib/intprops.h (TYPE_MINIMUM, TYPE_MAXIMUM): Do not shift a
84884         negative number, which the C Standard says has undefined behavior.
84885         In practice this is not a problem, but might as well do it by the book.
84886         Reported by Rich Felker and Eric Blake; see
84887         <http://lists.gnu.org/r/bug-gnulib/2011-01/msg00493.html>.
84888         * lib/strtol.c (TYPE_MINIMUM, TYPE_MAXIMUM): Likewise.
84889         * m4/mktime.m4 (AC_FUNC_MKTIME): Likewise.
84890         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
84891         * m4/parse-datetime.m4 (gl_PARSE_DATETIME): Likewise.
84892         * m4/stdint.m4 (gl_STDINT_H): Likewise.
84893         * lib/mktime.c (TYPE_MAXIMUM): Redo slightly to match the others.
84895         mktime: #undef mktime before #defining it
84896         * lib/mktime.c (mktime) [DEBUG]: #undef mktime before #defining it.
84898         mktime: systematically normalize tm_isdst comparisons
84899         * lib/mktime.c (isdst_differ): New function.
84900         (__mktime_internal): Use it systematically for all isdst comparisons.
84901         This completes the fix for libc BZ #6723, and removes the need for
84902         normalizing tm_isdst.  See
84903         <http://sourceware.org/bugzilla/show_bug.cgi?id=6723>
84904         (not_equal_tm) [DEBUG]: Use isdst_differ here, too.
84906         mktime: fix some integer overflow issues and sidestep the rest
84908         This was prompted by a bug report by Benjamin Lindner for MinGW
84909         <http://lists.gnu.org/r/bug-gnulib/2011-01/msg00472.html>.
84910         His bug is due to signed integer overflow (0 - INT_MIN), and I
84911         I scanned through mktime.c looking for other integer overflow
84912         problems, fixing all the bugs I found.
84914         Although the C Standard says the resulting code is still not safe
84915         in the presence of integer overflow, in practice it should be good
84916         enough for all real-world two's-complement implementations, except
84917         for debugging environments that deliberately trap on integer
84918         overflow (e.g., gcc -ftrapv).
84920         * lib/mktime.c (WRAPV): New macro.
84921         (SHR): Also check that long_int and time_t shift right in the
84922         usual way, before using the fast-but-unportable method.
84923         (TYPE_ONES_COMPLEMENT, TYPE_SIGNED_MAGNITUDE): Remove, no longer
84924         used.  The code already assumed two's complement, so there's
84925         no need to test for alternatives.  All uses removed.
84926         (TYPE_MAXIMUM): Don't rely here on overflow behavior not defined by
84927         the C standard.  Problem reported by Rich Felker in
84928         <http://lists.gnu.org/r/bug-gnulib/2011-01/msg00488.html>.
84929         (twos_complement_arithmetic): Also check long_int and time_t.
84930         (time_t_avg, time_t_add_ok, time_t_int_add_ok): New functions.
84931         (guess_time_tm, ranged_convert, __mktime_internal): Use them.
84932         (__mktime_internal): Avoid integer overflow with unary subtraction
84933         in two instances where -1 - X is an adequate replacement for -X,
84934         since the calculations are approximate.
84936 2011-01-29  Eric Blake  <eblake@redhat.com>
84938         mktime: avoid infinite loop
84939         * m4/mktime.m4 (AC_FUNC_MKTIME): Avoid overflow on possibly-signed
84940         type; behavior is still undefined but portable to all known targets.
84941         Reported by Rich Felker.
84943 2011-01-29  Simon Josefsson  <simon@josefsson.org>
84945         rename, unlink, same-inode: Relicense.
84946         * modules/rename (License): Relax from LGPLv3+ to LGPLv2+.
84947         * modules/unlink (License): Likewise.
84948         * modules/same-inode (License): Likewise.
84950 2011-01-28  Paul Eggert  <eggert@cs.ucla.edu>
84952         mktime: avoid problems on NetBSD 5 / i386
84953         * lib/mktime.c (long_int): New type.  This works around a problem
84954         on NetBSD 5 / i386, where 'long int' and 'int' are both 32 bits
84955         but time_t is 64 bits, and where I expect the existing code is
84956         wrong in some cases.
84957         (leapyear, ydhms_diff, guess_time_tm, __mktime_internal): Use it.
84958         (ydhms_diff): Bring back the compile-time check for wide-enough
84959         year and yday.
84961         mktime: fix misspelling in comment
84962         * lib/mktime.c (__mktime_internal): Fix misspelling in comment.
84963         This merges all recent glibc changes of importance.
84965 2011-01-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
84967         move-if-change: cope with concurrent mv of identical file.
84968         * build-aux/move-if-change (CMPPROG): Accept environment
84969         variable as an override for `cmp'.
84970         (usage): Document CMPPROG.
84971         Adjust comparison to drop stdout.  Cope with failure of mv if
84972         the target file exists and is identical to the source, for
84973         parallel builds.
84974         Report from H.J. Lu against binutils in PR binutils/12283.
84976 2011-01-28  Bruce Korb  <bkorb@gnu.org>
84978         * users.txt: Mention sharutils.
84980 2011-01-28  Simon Josefsson  <simon@josefsson.org>
84982         * users.txt: Mention OATH Toolkit.
84984 2011-01-27  Bruno Haible  <bruno@clisp.org>
84986         Prepare for supporting FreeBSD 10.
84987         * build-aux/config.libpath: Remove handling of freebsd1*.
84989 2011-01-27  Gerald Pfeifer  <gerald@pfeifer.com>  (tiny change)
84991         Prepare for supporting FreeBSD 10.
84992         * build-aux/config.rpath: Remove handling of freebsd1* which soon would
84993         match FreeBSD 10.0.
84995 2011-01-27  Bruno Haible  <bruno@clisp.org>
84997         vma-iter, get-rusage-as: Add OpenBSD support.
84998         * modules/vma-iter (configure.ac): Test for mquery.
84999         * lib/vma-iter.h (VMA_ITERATE_SUPPORTED): Define also on OpenBSD.
85000         * lib/vma-iter.c: Include <sys/mman.h>.
85001         (vma_iterate): Add an implementation based on mquery().
85002         * lib/resource-ext.h (get_rusage_as): Update comments.
85003         * lib/get-rusage-as.c: Likewise.
85004         * lib/get-rusage-data.c: Likewise.
85006 2011-01-26  Karl Berry  <karl@gnu.org>
85008         * doc/Makefile (lang_env, makeinfo_prog, manual_opts): new
85009         variables to make it easier to override the makeinfo program used.
85011 2011-01-26  Eric Blake  <eblake@redhat.com>
85013         fcntl: work around Haiku F_DUPFD bugs
85014         * m4/fcntl.m4 (gl_FUNC_FCNTL): Also catch Haiku errno bug.
85015         * lib/fcntl.c (rpl_fcntl) [F_DUPFD]: Work around Haiku losing
85016         cloexec bit on duplication.
85017         * doc/posix-functions/fcntl.texi (fcntl): Document the bug.
85019 2011-01-26  Bruno Haible  <bruno@clisp.org>
85021         Enable memory leak tests on AIX.
85022         * tests/test-dprintf-posix2.c (main): Don't skip the test on AIX.
85023         * tests/test-fprintf-posix3.c (main): Likewise.
85025 2011-01-26  Bruno Haible  <bruno@clisp.org>
85027         Tests for module 'get-rusage-data'.
85028         * modules/get-rusage-data-tests: New file.
85029         * tests/test-get-rusage-data.c: New file.
85031         New module 'get-rusage-data'.
85032         * lib/resource-ext.h (get_rusage_data): New declaration.
85033         * lib/get-rusage-data.c: New file.
85034         * modules/get-rusage-data: New file.
85036 2011-01-25  Bruno Haible  <bruno@clisp.org>
85038         get-rusage-as: Allow for easier testing.
85039         * lib/resource-ext.h (get_rusage_as): Add comment.
85040         * lib/get-rusage-as.c (get_rusage_as_via_setrlimit): Define always.
85041         (main): New function for interactive testing.
85043 2011-01-25  Bruno Haible  <bruno@clisp.org>
85045         vma-iter: Treat Haiku like BeOS.
85046         * lib/vma-iter.h (VMA_ITERATE_SUPPORTED): Define on Haiku as well.
85047         * lib/vma-iter.c (vma_iterate) [Haiku]: Use the BeOS API.
85049 2011-01-25  Eric Blake  <eblake@redhat.com>
85051         c-stack: fix regression on cygwin when libsigsegv is present
85052         * lib/c-stack.c (die): Don't flatten error if sigsegv is present.
85054 2011-01-24  Bruno Haible  <bruno@clisp.org>
85056         vma-iter: Avoid empty intervals.
85057         * lib/vma-iter.c (vma_iterate) [IRIX, OSF/1]: Don't call the callback
85058         on an empty interval.
85060 2011-01-24  Jim Meyering  <meyering@redhat.com>
85062         u64: remove unnecessary #include
85063         * lib/u64.h: Don't include <stddef.h>.  It was not used.
85065 2011-01-23  Paul Eggert  <eggert@cs.ucla.edu>
85067         Allow the user to avoid the HAVE_RAW_DECL_* macros.
85068         * m4/gnulib-common.m4 (gl_ASSERT_NO_GNULIB_POSIXCHECK): New macro.
85070 2011-01-23  Bruno Haible  <bruno@clisp.org>
85072         New module 'vma-iter'.
85073         * lib/vma-iter.h: New file.
85074         * lib/vma-iter.c: New file, based on lib/get-rusage-as.c.
85075         * modules/vma-iter: New file.
85076         * lib/get-rusage-as.c: Include vma-iter.h. Don't include system headers
85077         for get_rusage_as_via_iterator.
85078         (vma_iterate_callback): New function.
85079         (get_rusage_as_via_iterator): Rewritten to use vma_iterate.
85080         * modules/get-rusage-as (Depends-on): Add vma-iter.
85082 2011-01-23  Bruno Haible  <bruno@clisp.org>
85084         uninorm: Tweak includes.
85085         * lib/uninorm/normalize-internal.h: Don't include <stddef.h>.
85086         Reported by Jim Meyering.
85088 2011-01-23  Bruno Haible  <bruno@clisp.org>
85090         get-rusage-as: Improve on NetBSD.
85091         * lib/get-rusage-as.c (get_rusage_as_via_iterator): On NetBSD, use
85092         /proc, like on FreeBSD.
85094 2011-01-23  Jim Meyering  <meyering@redhat.com>
85096         xreadlink.h: remove unnecessary #include
85097         * lib/xreadlink.h: Don't include <stddef.h>.  It was not used.
85099         maint.mk: add syntax-check rule: detect unnecessary #include <stddef.h>
85100         * top/maint.mk (sc_prohibit_stddef_without_use): New rule.
85102 2011-01-23  Bruno Haible  <bruno@clisp.org>
85104         get-rusage-as: Fix bug.
85105         * lib/get-rusage-as.c (get_rusage_as_via_setrlimit): Restore the
85106         original limit when aborting the first loop.
85108 2011-01-23  Bruno Haible  <bruno@clisp.org>
85110         wctype: Ensure valid C syntax.
85111         * m4/wctype_h.m4 (gl_WCTYPE_H): Invoke gl_CHECK_NEXT_HEADERS
85112         unconditionally, instead of gl_NEXT_HEADERS conditionally.
85114 2011-01-21  Paul Eggert  <eggert@cs.ucla.edu>
85116         getopt: omit HAVE_OPTRESET, HAVE_GETOPT_CLIP from config.h
85117         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Do not put the
85118         symbols HAVE_OPTRESET and HAVE_GETOPT_CLIP into config.h,
85119         as they are needed only for configure's test case.
85120         This removes two unnecessary symbols from config.h.
85122         gl_CHECK_NEXT_HEADERS implies AC_CHECK_HEADERS_ONCE
85123         * m4/include_next.m4 (gl_CHECK_HEXT_HEADERS): Document this.
85124         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Don't bother to invoke
85125         AC_CHECK_HEADERS_ONCE on a header that we also invoke
85126         gl_CHECK_NEXT_HEADERS on, since the latter invokes the former.
85127         * m4/netdb_h.m4 (gl_HEADER_NETDB): Likewise.
85128         * m4/pthread.m4 (gl_PTHREAD_CHECK): Likewise.
85129         * m4/sched_h.m4 (gl_SCHED_H): Likewise.
85130         * m4/search_h.m4 (gl_SEARCH_H): Likewise.
85131         * m4/spawn_h.m4 (gl_SPAWN_H): Likewise.
85132         * m4/sys_file_h.m4 (gl_HEADER_SYS_FILE_H): Likewise.
85133         * m4/sys_select_h.m4 (gl_HEADER_SYS_SELECT): Likewise.
85134         * m4/sys_times_h.m4 (gl_SYS_TIMES_H): Likewise.
85135         * m4/sys_utsname_h.m4 (gl_SYS_UTSNAME_H): Likewise.
85136         * m4/termios_h.m4 (gl_TERMIOS_H): Likewise.
85137         * m4/unistd_h.m4 (gl_UNISTD_H): Likewise.
85138         * m4/wchar_h.m4 (gl_WCHAR_H): Likewise.
85139         * m4/wctype_h.m4 (gl_WCTYPE_H): Likewise.
85141 2011-01-21  Eric Blake  <eblake@redhat.com>
85143         maintainer-makefile: work with older git for submodule check
85144         * top/maint.mk (public-submodule-commit): Rewrite to avoid
85145         merge-base --independent, which Ubuntu 10.04 git 1.7.0.4 lacks.
85146         Reported by Matthias Bolte.
85148         bootstrap: minor portability fixes
85149         * build-aux/bootstrap (me): Use $me instead of $0 in functions.
85150         (usage): Omit leading capital and trailing . on help phrases, per
85151         GNU Coding Standards.
85152         (check_versions, top level): Prefix messages with script name.
85154 2011-01-21  Benjamin Lindner  <bjmldn@gmail.com>  (tiny change)
85156         bootstrap: support --no-git option
85157         * build-aux/bootstrap: Add --no-git option, to be used when
85158         --gnulib-srcdir points to the exact desired checkout.
85160 2011-01-21  Eric Blake  <eblake@redhat.com>
85162         strerror_r-posix: work with glibc 2.13
85163         * lib/strerror_r.c (strerror_r): Fix return type.
85165 2011-01-21  Pádraig Brady  <P@draigBrady.com>
85166             Bruno Haible  <bruno@clisp.org>
85168         uN_strstr: New unit tests.
85169         * modules/unistr/u8-strstr-tests: New file.
85170         * modules/unistr/u16-strstr-tests: New file.
85171         * modules/unistr/u32-strstr-tests: New file.
85172         * tests/unistr/test-u-strstr.h: New file, based on tests/test-strstr.c.
85173         * tests/unistr/test-u8-strstr.c: New file.
85174         * tests/unistr/test-u16-strstr.c: New file.
85175         * tests/unistr/test-u32-strstr.c: New file.
85177 2011-01-21  Pádraig Brady  <P@draigBrady.com>
85178             Bruno Haible  <bruno@clisp.org>
85180         Make uN_strstr functions O(n) worst-case.
85181         * lib/unistr/u-strstr.h (FUNC): In the 8-bit case, use strstr. In the
85182         16-bit and 32-bit unit cases, use the unibyte algorithm from
85183         lib/mbsstr.c.
85184         * lib/unistr/u8-strstr.c: Include <string.h>.
85185         (UNIT_IS_UINT8_T): New macro.
85186         * lib/unistr/u16-strstr.c: Include malloca.h and str-kmp.h.
85187         (U_STRLEN, U_STRNLEN): New macros.
85188         * lib/unistr/u32-strstr.c: Include malloca.h and str-kmp.h.
85189         (U_STRLEN, U_STRNLEN): New macros.
85190         * modules/unistr/u8-strstr (Depends-on): Add strstr.
85191         (configure.ac): Update required libunistring version.
85192         * modules/unistr/u16-strstr (Files): Add lib/str-kmp.h.
85193         (Depends-on): Add unistr/u16-strlen, unistr/u16-strnlen, stdbool,
85194         malloca.
85195         (configure.ac): Update required libunistring version.
85196         * modules/unistr/u32-strstr (Files): Add lib/str-kmp.h.
85197         (Depends-on): Add unistr/u32-strlen, unistr/u32-strnlen, stdbool,
85198         malloca.
85199         (configure.ac): Update required libunistring version.
85201 2011-01-21  Pádraig Brady  <P@draigBrady.com>
85202             Bruno Haible  <bruno@clisp.org>
85204         Prepare for faster uN_strstr functions.
85205         * lib/str-kmp.h: Support definable UNITs.
85206         (knuth_morris_pratt): Renamed from knuth_morris_pratt_unibyte. Add
85207         needle_len argument.
85208         * lib/mbsstr.c (mbsstr): Adjust for the changed str-kmp.h.
85209         * lib/mbscasestr.c (mbscasestr): Likewise.
85211 2011-01-21  Pádraig Brady  <P@draigBrady.com>
85213         malloca-tests: make faster by unsetting MALLOC_PERTURB_
85214         * tests/test-malloca.c (main): Unset the environment variable
85215         to greatly speed up the test.
85216         * tests/init.sh: Don't say that MALLOC_PERTURB_ is cheap.
85217         * modules/malloca-tests: Depend on unsetenv.
85219 2011-01-21  Pádraig Brady  <P@draigBrady.com>
85221         ignore-value: remove stdint dependency
85222         * lib/ignore-value.h: Remove <stdint.h>
85223         * modules/ignore-value: Remove stdint dependency.
85225 2011-01-21  Jim Meyering  <meyering@redhat.com>
85227         maint.mk: adjust variable name to be consistent with other gl_ vars
85228         * top/maint.mk (gl_public_submodule_commit): Rename the variable
85229         to be lower case.
85231 2011-01-20  Jim Meyering  <meyering@redhat.com>
85233         maint.mk: make "check" depend on public-submodule-commit by default
85234         * top/maint.mk (GL_PUBLIC_SUBMODULE_COMMIT): New overridable variable.
85236 2011-01-20  Bruno Haible  <bruno@clisp.org>
85238         mbfile, mbiter: Complete change from 2008-12-21.
85239         * m4/mbfile.m4 (gl_MBFILE): Don't require AC_FUNC_MBRTOWC.
85240         * m4/mbiter.m4 (gl_MBITER): Likewise.
85242 2011-01-20  Jim Meyering  <meyering@redhat.com>
85244         init.sh: insert space between each function name and "()"
85245         * tests/init.sh: Make it a little easier to see that a function's
85246         name is "warn_", and not "warn" when looking at the first part of
85247         its definition: "warn_ ()".  Suggested by Ralf Wildenhues.
85249 2011-01-20  Jim Meyering  <meyering@redhat.com>
85251         mountlist: clean up code formatting
85252         * lib/mountlist.c (read_file_system_list): Split a long line,
85253         correct bracing style, use NULL in place of "(struct statfs *)0",
85254         don't parenthesize return value, add spaces around "=" and after
85255         ";-in-for-stmt".
85257 2011-01-14  Markus Duft  <mduft@gentoo.org>
85259         mountlist: add support for Interix
85260         * lib/mountlist.c (read_file_system_list) [MOUNTED_INTERIX_STATVFS]:
85261         Apply statvfs to all entries of /dev/fs.
85262         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Check for statvfs,
85263         and if found, AC_DEFINE MOUNTED_INTERIX_STATVFS.
85265 2011-01-20  Jim Meyering  <meyering@redhat.com>
85267         maint.mk: improve the public-submodule-commit rule
85268         * top/maint.mk (public-submodule-commit): Prefix with $(AM_V_GEN),
85269         to suppress printing of its commands... unless V=1.
85270         Add git submodule's --quiet option to suppress printing of e.g.,
85271         "Entering gnulib" output.
85272         "cd" into $(srcdir) before running git submodule.
85274 2011-01-20  Bruno Haible  <bruno@clisp.org>
85276         include_next: Fix bug introduced on 2011-01-18.
85277         * m4/include_next.m4 (gl_NEXT_HEADERS_INTERNAL): New macro, extracted
85278         from gl_CHECK_NEXT_HEADERS and gl_NEXT_HEADERS. Omit test of
85279         ac_cv_header_... variable if the second argument is not 'check'.
85280         (gl_CHECK_NEXT_HEADERS, gl_NEXT_HEADERS): Invoke
85281         gl_NEXT_HEADERS_INTERNAL.
85283 2011-01-20  Bruno Haible  <bruno@clisp.org>
85285         Allow the user to avoid the GNULIB_TEST_* macros.
85286         * m4/gnulib-common.m4 (gl_ASSERT_NO_GNULIB_TESTS): New macro.
85287         Suggested by Paul Eggert.
85289 2011-01-14  Jim Meyering  <meyering@redhat.com>
85291         bootstrap: avoid failure when there is no .gitmodules file
85292         ": ${gnulib_path=gnulib}" fails to set $gnulib_path when that variable
85293         has been assigned to, even when its value is the empty string.
85294         * build-aux/bootstrap (gnulib_path): Test explicitly for an empty
85295         "$gnulib_path", rather than using ${gnulib_path=gnulib}.
85296         Reported by John W. Eaton <jwe@gnu.org>.
85298 2011-01-19  Paul Eggert  <eggert@cs.ucla.edu>
85300         assume <ctype.h>, ..., <time.h> exist
85301         For years gnulib has been assuming the existence of the headers
85302         <ctype.h>, <errno.h>, <fcntl.h>, <locale.h>, <signal.h>,
85303         <stdio.h>, <stdlib.h>, <string.h>, and <time.h>.  Omit checks for
85304         them, since they don't appear to be needed.
85305         * README (Portability guidelines): Document this.
85306         * lib/flock.c: Assume <fcntl.h> exists.
85307         * lib/regex_internal.h: Assume <locale.h> exists.
85308         * m4/ctype.m4 (gl_CTYPE_H): Assume <ctype.h> exists.
85309         * m4/errno_h.m4 (gl_HEADER_ERRNO_H): Assume <errno.h> exists.
85310         * m4/fcntl_h.m4 (gl_FCNTL_H): Assume <fcntl.h> exists.
85311         * m4/flock.m4 (gl_PREREQ_FLOCK): Likewise.
85312         * m4/locale_h.m4 (gl_LOCALE_H): Assume <locale.h> exists.
85313         * m4/regex.m4 (gl_REGEX): Likewise.
85314         * m4/signal_h.m4 (gl_SIGNAL_H): Assume <signal.h> exists.
85315         * m4/stdio_h.m4 (gl_STDIO_H): Assume <stdio.h> exists.
85316         * m4/stdlib_h.m4 (gl_STDLIB_H): Assume <stdlib.h> exists.
85317         * m4/string_h.m4 (gl_STRING_H): Assume <string.h> exists.
85318         * tests/test-argp.c: Likewise.
85319         * m4/time_h.m4 (gl_HEADER_TIME_H_BODY): Assume <time.h> exists.
85321         multiarch: remove AA_APPLE_UNIVERSAL_BUILD
85322         * m4/multiarch.m4 (gl_MULTIARCH): Don't AC_DEFINE
85323         AA_APPLE_UNIVERSAL_BUILD.  See
85324         <http://lists.gnu.org/r/bug-gnulib/2011-01/msg00247.html>.
85325         * NEWS: Document this.
85327 2011-01-19  Eric Blake  <eblake@redhat.com>
85329         c-stack: assume stack overflow if SA_SIGINFO unsupported
85330         * lib/c-stack.c (SIGACTION_WORKS): Rename...
85331         (SIGINFO_WORKS): ...since gnulib module guarantees that (most) of
85332         sigaction will work.
85333         (die): Assume stack overflow if siginfo doesn't work, to let Haiku
85334         behavior match Linux.
85335         * tests/test-c-stack.c (main): Prefer NULL for pointers.
85337         stdbool-tests: accommodate Haiku
85338         * tests/test-stdbool.c: Haiku's gcc 2.95 lacks native _Bool.
85340         binary-io: fix O_TEXT on Haiku
85341         * modules/binary-io (Depends-on): Add fcntl-h.
85342         * lib/binary-io.h (O_TEXT): Rely on replacement <fcntl.h> rather
85343         than blindly undefining O_TEXT.
85344         Reported by Scott McCreary.
85346 2011-01-18  Paul Eggert  <eggert@cs.ucla.edu>
85348         include_next: do not check for standard headers like stddef.h
85350         I found this problem when modifying Emacs to use gnulib.
85351         I noticed that it added HAVE_STDDEF_H to config.h, even though
85352         gnulib always assumes <stddef.h> exists as per README and this
85353         symbol is unnecessary.
85354         * m4/include_next.m4 (gl_NEXT_HEADERS): New macro, which does not
85355         use AC_CHECK_HEADERS_ONCE, but which otherwise contains what
85356         gl_CHECK_NEXT_HEADERS used to contain.  This makes 'configure' run
85357         faster for headers like stddef.h that are known to exist.
85358         (gl_CHECK_NEXT_HEADERS): Use it.
85359         * m4/float_h.m4 (gl_FLOAT_H): For float.h, use gl_NEXT_HEADERS
85360         rather than gl_CHECK_NEXT_HEADERS.
85361         * m4/stdarg.m4 (gl_STDARG_H): Likewise, for stdarg.h.
85362         * m4/stddef_h.m4 (gl_STDDEF_H): Likewise, for stddef.h.
85364 2011-01-18  Eric Blake  <eblake@redhat.com>
85366         ansi-c++-opt: skip C++ dependency style if C++ is unused
85367         * m4/ansi-c++.m4 (gl_PROG_ANSI_CXX): Avoid full-blown dependency
85368         tests when we know C++ compilation is not desired.
85369         Reported by Scott McCreary.
85371 2011-01-18  Bruno Haible  <bruno@clisp.org>
85373         *printf-posix: Avoid test failures. Make tests work on MacOS X, Cygwin.
85374         * tests/test-fprintf-posix3.c: Include "resource-ext.h".
85375         (main): Perform test also when getrlimit and setrlimit don't exist or
85376         when setrlimit of RLIMIT_DATA fails (like on Cygwin). Instead of
85377         limiting the address space size using setrlimit, compare the address
85378         space size before and after the test.
85379         * tests/test-dprintf-posix2.c: Likewise.
85380         * tests/test-fprintf-posix3.sh: Update skip messages.
85381         * tests/test-dprintf-posix2.sh: Likewise.
85382         * modules/fprintf-posix-tests (Depends-on): Add get-rusage-as.
85383         * modules/dprintf-posix-tests (Depends-on): Likewise.
85384         Reported by Bruce Korb <bkorb@gnu.org> and
85385         Gary V. Vaughan <gary@gnu.org>.
85387 2011-01-18  Bruno Haible  <bruno@clisp.org>
85389         get-rusage-as: Improvement for Cygwin.
85390         * lib/get-rusage-as.c (get_rusage_as_via_iterator): On Windows, ignore
85391         areas that are merely reserved.
85393 2011-01-18  Paul Eggert  <eggert@cs.ucla.edu>
85395         strftime: remove dependencies on multibyte modules
85397         strftime depended on mbrlen, mbsinit, and wchar, but these modules
85398         are needed only if ! MULTIBYTE_IS_FORMAT_SAFE, and that is true
85399         only if __osf__ is defined, and I suspect OSF doesn't need these
85400         other modules.  If my guess is wrong, we'll need to come up with a
85401         variant of strftime that doesn't need the multibyte modules.
85403         I discovered this problem when attempting modify Emacs to use the
85404         strftime module.  With the previous gnulib, this caused Emacs to
85405         need 31 new files, ranging from lib/config.charset to
85406         m4/wint_t.m4.  This was overkill and I expect would be offputting
85407         to the Emacs maintainers.  After this change, only 6 new files are
85408         needed, namely strftime.[ch], srtftime.m4, stdbool.in.h,
85409         stdbool.m4, and tm_gmtoff.m4.
85411         * lib/strftime.c (MULTIBYTE_IS_FORMAT_SAFE): Define to 1 always.
85412         Suggested by Bruno Haible in
85413         <http://lists.gnu.org/r/bug-gnulib/2011-01/msg00238.html>.
85414         * m4/strftime.m4 (gl_FUNC_STRFTIME): Do not require AC_TYPE_MBSTATE_T,
85415         and do not check for wchar.h.
85416         * modules/strftime (Files): Remove m4/mbstate_t.m4.
85417         (Depends-on): Remove mbrlen, mbsinit, wchar.
85419 2011-01-18  Bruno Haible  <bruno@clisp.org>
85421         Tests for module 'get-rusage-as'.
85422         * modules/get-rusage-as-tests: New file.
85423         * tests/test-get-rusage-as.c: New file.
85425         New module 'get-rusage-as'.
85426         * modules/get-rusage-as: New file.
85427         * lib/resource-ext.h: New file.
85428         * lib/get-rusage-as.c: New file.
85430 2011-01-17  Eric Blake  <eblake@redhat.com>
85432         sigaction: relax license from LGPLv3+ to LGPLv2+
85433         * modules/sigaction (License): Relax to LGPLv2+.
85435 2011-01-14  Bruno Haible  <bruno@clisp.org>
85437         filemode: Make function declarations usable in C++ mode.
85438         * lib/filemode.h: Enclose function declarations in extern "C" block.
85439         Reported by John W. Eaton <jwe@gnu.org>.
85441 2011-01-12  Rob Vermaas  <rob.vermaas@gmail.com>
85443         save-cwd: no longer include "xgetcwd.h"
85444         * lib/save-cwd.c: Don't include "xgetcwd.h"; it's no longer used.
85445         This avoids a compilation failure in projects that use save-cwd
85446         without also using the xgetcwd module.
85448 2011-01-11  Paul Eggert  <eggert@cs.ucla.edu>
85450         ftoastr: split into 3 modules ftoastr, dtoastr, ldtoastr
85451         This is so that a program like Emacs, which needs only dtoastr,
85452         does not have to bother with distributing and compiling ftoastr
85453         and ldtoastr.
85454         * MODULES.html.sh: Document these modules (ftoastr wasn't documented).
85455         * modules/dtoastr, modules/ldtoastr: New files.
85456         * modules/ftoastr: Now works just for 'float'.
85457         (Files): Remove lib/dtoastr.c, lib/ldtoastr.c.
85458         (Makefile.am): Remove ftoastr.h (not needed and no effect),
85459         dtoastr.c, ldtoastr.c.
85461 2011-01-11  Jim Meyering  <meyering@redhat.com>
85463         save-cwd: remove #if-!HAVE_FCHDIR'd code; use the fchdir module
85464         There is no need to work around the lack of the fchdir function,
85465         since gnulib can now provide a replacement when required.
85466         * lib/save-cwd.c: Remove #if !HAVE_FCHDIR...#endif code.
85467         * modules/save-cwd (Depends-on): Add fchdir.
85469 2011-01-11  Paul Eggert  <eggert@cs.ucla.edu>
85471         openat, save-cwd: avoid xmalloc
85473         This removes a direct (but undocumented) dependency of openat on
85474         xalloc, along with an indirect dependency via save-cwd.  It also
85475         removes a dependency of save-cwd on xgetcwd, and thereby
85476         indirectly on xalloc.  This change causes the openat substitute
85477         to fall back on save_cwd when memory is tight, and for save_cwd to
85478         fail instead of dying when memory is tight, but that's good enough.
85479         Problem and initial idea for fix reported by Bastien Roucaries in
85480         <http://lists.gnu.org/r/bug-gnulib/2011-01/msg00170.html>.
85482         * lib/openat-proc.c: Include stdlib.h (for malloc), not
85483         xalloc.h (for xmalloc).
85484         (openat_proc_name): Use malloc, not xmalloc.
85485         * lib/save-cwd.c (save_cwd): Use getcwd, not xgetcwd.
85486         * modules/save-cwd (Files): Depend on getcwd, not xgetcwd.
85488         openat: Increase OPENAT_BUFFER_SIZE from 512 to at least 1024
85489         This avoids heap allocation for file names whose lengths are in
85490         the range 512..1023, with the upper bound increasing to at most
85491         4031 depending on the platform's PATH_MAX.  (We do not want
85492         pathmax.h here as it might supply a non-constant PATH_MAX.)
85493         * lib/openat-priv.h (SAFER_ALLOCA_MAX, SAFER_ALLOCA): New macros.
85494         Perhaps they should be moved to malloca.h?
85495         (OPENAT_BUFFER_SIZE): Use them.
85497 2011-01-10  Bruno Haible  <bruno@clisp.org>
85499         doc: Update users.txt.
85500         * users.txt: Add recutils.
85502 2011-01-09  Karl Berry  <karl@gnu.org>
85504         * doc/posix-functions/gai_strerror.texi: Insert missing @item.
85506         * doc/configmake.texi: New file.
85507         * doc/gnulib.texi: Include it.
85508         * modules/configmake: Move documentation from here.
85510 2011-01-09  Bruno Haible  <bruno@clisp.org>
85512         Update to Unicode 6.0.0.
85513         * lib/gen-uni-tables.c (symbolic_width): Fix bounds of planes.
85514         (get_lbp): Update for Unicode 6.0.0.
85515         * lib/uniwidth/width.c (nonspacing_table_data): Add U+065F,
85516         U+0859..U+085B, U+093A, U+0956..U+0957, U+0F8D..U+0F8F, U+135D..U+135E,
85517         U+1BE6, U+1BE8..U+1BE9, U+1BED, U+1BEF..U+1BF1, U+1DFC, U+2D7F,
85518         U+11001, U+11038..U+11046. Remove U+06DE.
85519         (uc_width): Fix bounds of planes.
85520         * tests/uniwidth/test-uc_width2.sh: Same updates as in
85521         lib/uniwidth/width.c.
85522         * tests/unigbrk/GraphemeBreakTest.txt: Copied from Unicode 6.0.0, with
85523         trailing whitespace removed.
85524         * tests/uninorm/NormalizationTest.txt: Update from Unicode 6.0.0,
85525         without comments, but with the original copyright notice.
85526         * lib/unicase/cased.h: Regenerated for Unicode 6.0.0.
85527         * lib/unicase/ignorable.h: Likewise.
85528         * lib/unicase/tocasefold.h: Likewise.
85529         * lib/unicase/tolower.h: Likewise.
85530         * lib/unicase/totitle.h: Likewise.
85531         * lib/unicase/toupper.h: Likewise.
85532         * lib/unictype/bidi_of.h: Likewise.
85533         * lib/unictype/blocks.h: Likewise.
85534         * lib/unictype/categ_C.h: Likewise.
85535         * lib/unictype/categ_Cn.h: Likewise.
85536         * lib/unictype/categ_L.h: Likewise.
85537         * lib/unictype/categ_Ll.h: Likewise.
85538         * lib/unictype/categ_Lm.h: Likewise.
85539         * lib/unictype/categ_Lo.h: Likewise.
85540         * lib/unictype/categ_Lu.h: Likewise.
85541         * lib/unictype/categ_M.h: Likewise.
85542         * lib/unictype/categ_Mc.h: Likewise.
85543         * lib/unictype/categ_Me.h: Likewise.
85544         * lib/unictype/categ_Mn.h: Likewise.
85545         * lib/unictype/categ_N.h: Likewise.
85546         * lib/unictype/categ_Nd.h: Likewise.
85547         * lib/unictype/categ_No.h: Likewise.
85548         * lib/unictype/categ_P.h: Likewise.
85549         * lib/unictype/categ_Po.h: Likewise.
85550         * lib/unictype/categ_S.h: Likewise.
85551         * lib/unictype/categ_Sc.h: Likewise.
85552         * lib/unictype/categ_Sk.h: Likewise.
85553         * lib/unictype/categ_Sm.h: Likewise.
85554         * lib/unictype/categ_So.h: Likewise.
85555         * lib/unictype/categ_of.h: Likewise.
85556         * lib/unictype/combining.h: Likewise.
85557         * lib/unictype/ctype_alnum.h: Likewise.
85558         * lib/unictype/ctype_alpha.h: Likewise.
85559         * lib/unictype/ctype_graph.h: Likewise.
85560         * lib/unictype/ctype_lower.h: Likewise.
85561         * lib/unictype/ctype_print.h: Likewise.
85562         * lib/unictype/ctype_punct.h: Likewise.
85563         * lib/unictype/ctype_upper.h: Likewise.
85564         * lib/unictype/decdigit.h: Likewise.
85565         * lib/unictype/digit.h: Likewise.
85566         * lib/unictype/numeric.h: Likewise.
85567         * lib/unictype/pr_alphabetic.h: Likewise.
85568         * lib/unictype/pr_bidi_arabic_digit.h: Likewise.
85569         * lib/unictype/pr_bidi_arabic_right_to_left.h: Likewise.
85570         * lib/unictype/pr_bidi_boundary_neutral.h: Likewise.
85571         * lib/unictype/pr_bidi_eur_num_terminator.h: Likewise.
85572         * lib/unictype/pr_bidi_hebrew_right_to_left.h: Likewise.
85573         * lib/unictype/pr_bidi_left_to_right.h: Likewise.
85574         * lib/unictype/pr_bidi_non_spacing_mark.h: Likewise.
85575         * lib/unictype/pr_bidi_other_neutral.h: Likewise.
85576         * lib/unictype/pr_case_ignorable.h: Likewise.
85577         * lib/unictype/pr_cased.h: Likewise.
85578         * lib/unictype/pr_changes_when_casefolded.h: Likewise.
85579         * lib/unictype/pr_changes_when_casemapped.h: Likewise.
85580         * lib/unictype/pr_changes_when_lowercased.h: Likewise.
85581         * lib/unictype/pr_changes_when_titlecased.h: Likewise.
85582         * lib/unictype/pr_changes_when_uppercased.h: Likewise.
85583         * lib/unictype/pr_combining.h: Likewise.
85584         * lib/unictype/pr_composite.h: Likewise.
85585         * lib/unictype/pr_currency_symbol.h: Likewise.
85586         * lib/unictype/pr_decimal_digit.h: Likewise.
85587         * lib/unictype/pr_deprecated.h: Likewise.
85588         * lib/unictype/pr_format_control.h: Likewise.
85589         * lib/unictype/pr_grapheme_base.h: Likewise.
85590         * lib/unictype/pr_grapheme_extend.h: Likewise.
85591         * lib/unictype/pr_grapheme_link.h: Likewise.
85592         * lib/unictype/pr_id_continue.h: Likewise.
85593         * lib/unictype/pr_id_start.h: Likewise.
85594         * lib/unictype/pr_ideographic.h: Likewise.
85595         * lib/unictype/pr_lowercase.h: Likewise.
85596         * lib/unictype/pr_math.h: Likewise.
85597         * lib/unictype/pr_numeric.h: Likewise.
85598         * lib/unictype/pr_other_alphabetic.h: Likewise.
85599         * lib/unictype/pr_other_id_continue.h: Likewise.
85600         * lib/unictype/pr_other_math.h: Likewise.
85601         * lib/unictype/pr_punctuation.h: Likewise.
85602         * lib/unictype/pr_sentence_terminal.h: Likewise.
85603         * lib/unictype/pr_terminal_punctuation.h: Likewise.
85604         * lib/unictype/pr_unassigned_code_value.h: Likewise.
85605         * lib/unictype/pr_unified_ideograph.h: Likewise.
85606         * lib/unictype/pr_uppercase.h: Likewise.
85607         * lib/unictype/pr_xid_continue.h: Likewise.
85608         * lib/unictype/pr_xid_start.h: Likewise.
85609         * lib/unictype/scripts.h: Likewise.
85610         * lib/unictype/scripts_byname.gperf: Likewise.
85611         * lib/unictype/sy_java_ident.h: Likewise.
85612         * lib/unigbrk/gbrkprop.h: Likewise.
85613         * lib/unilbrk/lbrkprop1.h: Likewise.
85614         * lib/unilbrk/lbrkprop2.h: Likewise.
85615         * lib/uninorm/decomposition-table2.h: Likewise.
85616         * lib/uniwbrk/wbrkprop.h: Likewise.
85617         * tests/unicase/test-cased.c: Likewise.
85618         * tests/unicase/test-ignorable.c: Likewise.
85619         * tests/unicase/test-uc_tolower.c: Likewise.
85620         * tests/unicase/test-uc_totitle.c: Likewise.
85621         * tests/unicase/test-uc_toupper.c: Likewise.
85622         * tests/unictype/test-categ_C.c: Likewise.
85623         * tests/unictype/test-categ_Cn.c: Likewise.
85624         * tests/unictype/test-categ_L.c: Likewise.
85625         * tests/unictype/test-categ_Ll.c: Likewise.
85626         * tests/unictype/test-categ_Lm.c: Likewise.
85627         * tests/unictype/test-categ_Lo.c: Likewise.
85628         * tests/unictype/test-categ_Lu.c: Likewise.
85629         * tests/unictype/test-categ_M.c: Likewise.
85630         * tests/unictype/test-categ_Mc.c: Likewise.
85631         * tests/unictype/test-categ_Me.c: Likewise.
85632         * tests/unictype/test-categ_Mn.c: Likewise.
85633         * tests/unictype/test-categ_N.c: Likewise.
85634         * tests/unictype/test-categ_Nd.c: Likewise.
85635         * tests/unictype/test-categ_No.c: Likewise.
85636         * tests/unictype/test-categ_P.c: Likewise.
85637         * tests/unictype/test-categ_Po.c: Likewise.
85638         * tests/unictype/test-categ_S.c: Likewise.
85639         * tests/unictype/test-categ_Sc.c: Likewise.
85640         * tests/unictype/test-categ_Sk.c: Likewise.
85641         * tests/unictype/test-categ_Sm.c: Likewise.
85642         * tests/unictype/test-categ_So.c: Likewise.
85643         * tests/unictype/test-ctype_alnum.c: Likewise.
85644         * tests/unictype/test-ctype_alpha.c: Likewise.
85645         * tests/unictype/test-ctype_graph.c: Likewise.
85646         * tests/unictype/test-ctype_lower.c: Likewise.
85647         * tests/unictype/test-ctype_print.c: Likewise.
85648         * tests/unictype/test-ctype_punct.c: Likewise.
85649         * tests/unictype/test-ctype_upper.c: Likewise.
85650         * tests/unictype/test-decdigit.h: Likewise.
85651         * tests/unictype/test-digit.h: Likewise.
85652         * tests/unictype/test-numeric.h: Likewise.
85653         * tests/unictype/test-pr_alphabetic.c: Likewise.
85654         * tests/unictype/test-pr_bidi_arabic_digit.c: Likewise.
85655         * tests/unictype/test-pr_bidi_arabic_right_to_left.c: Likewise.
85656         * tests/unictype/test-pr_bidi_boundary_neutral.c: Likewise.
85657         * tests/unictype/test-pr_bidi_eur_num_terminator.c: Likewise.
85658         * tests/unictype/test-pr_bidi_hebrew_right_to_left.c: Likewise.
85659         * tests/unictype/test-pr_bidi_left_to_right.c: Likewise.
85660         * tests/unictype/test-pr_bidi_non_spacing_mark.c: Likewise.
85661         * tests/unictype/test-pr_bidi_other_neutral.c: Likewise.
85662         * tests/unictype/test-pr_case_ignorable.c: Likewise.
85663         * tests/unictype/test-pr_cased.c: Likewise.
85664         * tests/unictype/test-pr_changes_when_casefolded.c: Likewise.
85665         * tests/unictype/test-pr_changes_when_casemapped.c: Likewise.
85666         * tests/unictype/test-pr_changes_when_lowercased.c: Likewise.
85667         * tests/unictype/test-pr_changes_when_titlecased.c: Likewise.
85668         * tests/unictype/test-pr_changes_when_uppercased.c: Likewise.
85669         * tests/unictype/test-pr_combining.c: Likewise.
85670         * tests/unictype/test-pr_composite.c: Likewise.
85671         * tests/unictype/test-pr_currency_symbol.c: Likewise.
85672         * tests/unictype/test-pr_decimal_digit.c: Likewise.
85673         * tests/unictype/test-pr_deprecated.c: Likewise.
85674         * tests/unictype/test-pr_format_control.c: Likewise.
85675         * tests/unictype/test-pr_grapheme_base.c: Likewise.
85676         * tests/unictype/test-pr_grapheme_extend.c: Likewise.
85677         * tests/unictype/test-pr_grapheme_link.c: Likewise.
85678         * tests/unictype/test-pr_id_continue.c: Likewise.
85679         * tests/unictype/test-pr_id_start.c: Likewise.
85680         * tests/unictype/test-pr_ideographic.c: Likewise.
85681         * tests/unictype/test-pr_lowercase.c: Likewise.
85682         * tests/unictype/test-pr_math.c: Likewise.
85683         * tests/unictype/test-pr_numeric.c: Likewise.
85684         * tests/unictype/test-pr_other_alphabetic.c: Likewise.
85685         * tests/unictype/test-pr_other_id_continue.c: Likewise.
85686         * tests/unictype/test-pr_other_math.c: Likewise.
85687         * tests/unictype/test-pr_punctuation.c: Likewise.
85688         * tests/unictype/test-pr_sentence_terminal.c: Likewise.
85689         * tests/unictype/test-pr_terminal_punctuation.c: Likewise.
85690         * tests/unictype/test-pr_unassigned_code_value.c: Likewise.
85691         * tests/unictype/test-pr_unified_ideograph.c: Likewise.
85692         * tests/unictype/test-pr_uppercase.c: Likewise.
85693         * tests/unictype/test-pr_xid_continue.c: Likewise.
85694         * tests/unictype/test-pr_xid_start.c: Likewise.
85695         * tests/unigbrk/test-uc-gbrk-prop.h: Likewise.
85696         * lib/unicase/special-casing-table.gperf: Regenerated; only comment
85697         changes.
85698         * lib/unictype/categ_Cc.h: Likewise.
85699         * lib/unictype/categ_Cf.h: Likewise.
85700         * lib/unictype/categ_Co.h: Likewise.
85701         * lib/unictype/categ_Cs.h: Likewise.
85702         * lib/unictype/categ_Lt.h: Likewise.
85703         * lib/unictype/categ_Nl.h: Likewise.
85704         * lib/unictype/categ_Pc.h: Likewise.
85705         * lib/unictype/categ_Pd.h: Likewise.
85706         * lib/unictype/categ_Pe.h: Likewise.
85707         * lib/unictype/categ_Pf.h: Likewise.
85708         * lib/unictype/categ_Pi.h: Likewise.
85709         * lib/unictype/categ_Ps.h: Likewise.
85710         * lib/unictype/categ_Z.h: Likewise.
85711         * lib/unictype/categ_Zl.h: Likewise.
85712         * lib/unictype/categ_Zp.h: Likewise.
85713         * lib/unictype/categ_Zs.h: Likewise.
85714         * lib/unictype/ctype_blank.h: Likewise.
85715         * lib/unictype/ctype_cntrl.h: Likewise.
85716         * lib/unictype/ctype_digit.h: Likewise.
85717         * lib/unictype/ctype_space.h: Likewise.
85718         * lib/unictype/ctype_xdigit.h: Likewise.
85719         * lib/unictype/mirror.h: Likewise.
85720         * lib/unictype/pr_ascii_hex_digit.h: Likewise.
85721         * lib/unictype/pr_bidi_block_separator.h: Likewise.
85722         * lib/unictype/pr_bidi_common_separator.h: Likewise.
85723         * lib/unictype/pr_bidi_control.h: Likewise.
85724         * lib/unictype/pr_bidi_embedding_or_override.h: Likewise.
85725         * lib/unictype/pr_bidi_eur_num_separator.h: Likewise.
85726         * lib/unictype/pr_bidi_european_digit.h: Likewise.
85727         * lib/unictype/pr_bidi_pdf.h: Likewise.
85728         * lib/unictype/pr_bidi_segment_separator.h: Likewise.
85729         * lib/unictype/pr_bidi_whitespace.h: Likewise.
85730         * lib/unictype/pr_dash.h: Likewise.
85731         * lib/unictype/pr_default_ignorable_code_point.h: Likewise.
85732         * lib/unictype/pr_diacritic.h: Likewise.
85733         * lib/unictype/pr_extender.h: Likewise.
85734         * lib/unictype/pr_hex_digit.h: Likewise.
85735         * lib/unictype/pr_hyphen.h: Likewise.
85736         * lib/unictype/pr_ids_binary_operator.h: Likewise.
85737         * lib/unictype/pr_ids_trinary_operator.h: Likewise.
85738         * lib/unictype/pr_ignorable_control.h: Likewise.
85739         * lib/unictype/pr_iso_control.h: Likewise.
85740         * lib/unictype/pr_join_control.h: Likewise.
85741         * lib/unictype/pr_left_of_pair.h: Likewise.
85742         * lib/unictype/pr_line_separator.h: Likewise.
85743         * lib/unictype/pr_logical_order_exception.h: Likewise.
85744         * lib/unictype/pr_non_break.h: Likewise.
85745         * lib/unictype/pr_not_a_character.h: Likewise.
85746         * lib/unictype/pr_other_default_ignorable_code_point.h: Likewise.
85747         * lib/unictype/pr_other_grapheme_extend.h: Likewise.
85748         * lib/unictype/pr_other_id_start.h: Likewise.
85749         * lib/unictype/pr_other_lowercase.h: Likewise.
85750         * lib/unictype/pr_other_uppercase.h: Likewise.
85751         * lib/unictype/pr_paired_punctuation.h: Likewise.
85752         * lib/unictype/pr_paragraph_separator.h: Likewise.
85753         * lib/unictype/pr_pattern_syntax.h: Likewise.
85754         * lib/unictype/pr_pattern_white_space.h: Likewise.
85755         * lib/unictype/pr_private_use.h: Likewise.
85756         * lib/unictype/pr_quotation_mark.h: Likewise.
85757         * lib/unictype/pr_radical.h: Likewise.
85758         * lib/unictype/pr_soft_dotted.h: Likewise.
85759         * lib/unictype/pr_space.h: Likewise.
85760         * lib/unictype/pr_titlecase.h: Likewise.
85761         * lib/unictype/pr_variation_selector.h: Likewise.
85762         * lib/unictype/pr_white_space.h: Likewise.
85763         * lib/unictype/pr_zero_width.h: Likewise.
85764         * lib/unictype/sy_c_ident.h: Likewise.
85765         * lib/unictype/sy_c_whitespace.h: Likewise.
85766         * lib/unictype/sy_java_whitespace.h: Likewise.
85767         * lib/uninorm/composition-table.gperf: Likewise.
85768         * lib/uninorm/decomposition-table1.h: Likewise.
85769         * tests/unilbrk/test-u8-possible-linebreaks.c (main): Add test for rule
85770         LB8.
85771         * tests/unilbrk/test-u16-possible-linebreaks.c (main): Likewise.
85772         * tests/unilbrk/test-u32-possible-linebreaks.c (main): Likewise.
85773         * modules/unictype/*: Bump version number of expected libunistring
85774         version.
85776 2011-01-09  Bruno Haible  <bruno@clisp.org>
85778         Update to Unicode 5.2.0.
85779         * tests/unigbrk/GraphemeBreakTest.txt: Copied from Unicode 5.2.0, with
85780         trailing whitespace removed.
85782 2011-01-09  Bruno Haible  <bruno@clisp.org>
85784         New Unicode character properties, from Unicode 5.2.0.
85785         * lib/unictype.in.h (UC_PROPERTY_CASED, UC_PROPERTY_CASE_IGNORABLE,
85786         UC_PROPERTY_CHANGES_WHEN_LOWERCASED,
85787         UC_PROPERTY_CHANGES_WHEN_UPPERCASED,
85788         UC_PROPERTY_CHANGES_WHEN_TITLECASED,
85789         UC_PROPERTY_CHANGES_WHEN_CASEFOLDED,
85790         UC_PROPERTY_CHANGES_WHEN_CASEMAPPED,
85791         uc_is_property_cased, uc_is_property_case_ignorable,
85792         uc_is_property_changes_when_lowercased,
85793         uc_is_property_changes_when_uppercased,
85794         uc_is_property_changes_when_titlecased,
85795         uc_is_property_changes_when_casefolded,
85796         uc_is_property_changes_when_casemapped): New declarations.
85797         * lib/unictype/pr_byname.gperf: Add the new properties.
85798         * modules/unictype/property-byname (Depends-on): Depend on the new
85799         properties modules.
85800         * modules/unictype/property-all (Depends-on): Likewise.
85801         * MODULES.html.sh (Unicode string functions): Add
85802         unictype/property-case-ignorable, unictype/property-cased,
85803         unictype/property-changes-when-casefolded,
85804         unictype/property-changes-when-casemapped,
85805         unictype/property-changes-when-lowercased,
85806         unictype/property-changes-when-titlecased,
85807         unictype/property-changes-when-uppercased.
85809         New module 'unictype/property-changes-when-casemapped'.
85810         * modules/unictype/property-changes-when-casemapped: New file.
85811         * lib/unictype/pr_changes_when_casemapped.c: New file.
85812         * lib/unictype/pr_changes_when_casemapped.h: New file, automatically
85813         generated by gen-uni-tables.
85814         * modules/unictype/property-changes-when-casemapped-tests: New file.
85815         * tests/unictype/test-pr_changes_when_casemapped.c: New file,
85816         automatically generated by gen-uni-tables.
85818         New module 'unictype/property-changes-when-casefolded'.
85819         * modules/unictype/property-changes-when-casefolded: New file.
85820         * lib/unictype/pr_changes_when_casefolded.c: New file.
85821         * lib/unictype/pr_changes_when_casefolded.h: New file, automatically
85822         generated by gen-uni-tables.
85823         * modules/unictype/property-changes-when-casefolded-tests: New file.
85824         * tests/unictype/test-pr_changes_when_casefolded.c: New file,
85825         automatically generated by gen-uni-tables.
85827         New module 'unictype/property-changes-when-titlecased'.
85828         * modules/unictype/property-changes-when-titlecased: New file.
85829         * lib/unictype/pr_changes_when_titlecased.c: New file.
85830         * lib/unictype/pr_changes_when_titlecased.h: New file, automatically
85831         generated by gen-uni-tables.
85832         * modules/unictype/property-changes-when-titlecased-tests: New file.
85833         * tests/unictype/test-pr_changes_when_titlecased.c: New file,
85834         automatically generated by gen-uni-tables.
85836         New module 'unictype/property-changes-when-uppercased'.
85837         * modules/unictype/property-changes-when-uppercased: New file.
85838         * lib/unictype/pr_changes_when_uppercased.c: New file.
85839         * lib/unictype/pr_changes_when_uppercased.h: New file, automatically
85840         generated by gen-uni-tables.
85841         * modules/unictype/property-changes-when-uppercased-tests: New file.
85842         * tests/unictype/test-pr_changes_when_uppercased.c: New file,
85843         automatically generated by gen-uni-tables.
85845         New module 'unictype/property-changes-when-lowercased'.
85846         * modules/unictype/property-changes-when-lowercased: New file.
85847         * lib/unictype/pr_changes_when_lowercased.c: New file.
85848         * lib/unictype/pr_changes_when_lowercased.h: New file, automatically
85849         generated by gen-uni-tables.
85850         * modules/unictype/property-changes-when-lowercased-tests: New file.
85851         * tests/unictype/test-pr_changes_when_lowercased.c: New file,
85852         automatically generated by gen-uni-tables.
85854         New module 'unictype/property-case-ignorable'.
85855         * modules/unictype/property-case-ignorable: New file.
85856         * lib/unictype/pr_case_ignorable.c: New file.
85857         * lib/unictype/pr_case_ignorable.h: New file, automatically generated
85858         by gen-uni-tables.
85859         * modules/unictype/property-case-ignorable-tests: New file.
85860         * tests/unictype/test-pr_case_ignorable.c: New file, automatically
85861         generated by gen-uni-tables.
85863         New module 'unictype/property-cased'.
85864         * modules/unictype/property-cased: New file.
85865         * lib/unictype/pr_cased.c: New file.
85866         * lib/unictype/pr_cased.h: New file, automatically generated by
85867         gen-uni-tables.
85868         * modules/unictype/property-cased-tests: New file.
85869         * tests/unictype/test-pr_cased.c: New file, automatically generated by
85870         gen-uni-tables.
85872 2011-01-09  Bruno Haible  <bruno@clisp.org>
85874         Update to Unicode 5.2.0.
85875         * lib/gen-uni-tables.c (output_predicate, output_category,
85876         output_combclass, output_bidi_category, output_decimal_digit_test,
85877         output_decimal_digit, output_digit_test, output_digit,
85878         output_numeric_test, output_numeric, output_mirror, output_scripts,
85879         output_scripts_byname, output_blocks, output_ident_category): Fix
85880         comment header.
85881         (is_WBP_MIDNUMLET, is_WBP_MIDLETTER): New functions, extracted from
85882         get_wbp.
85883         (PROP_CASED, PROP_CASE_IGNORABLE, PROP_CHANGES_WHEN_*): New enumeration
85884         items.
85885         (fill_properties): Also fill the peoperties Cased, Case_Ignorable,
85886         Changes_When_Lowercased, Changes_When_Uppercased,
85887         Changes_When_Titlecased, Changes_When_Casefolded,
85888         Changes_When_Casemapped.
85889         (is_property_alphabetic, is_property_default_ignorable_code_point):
85890         Update for Unicode 5.2.0.
85891         (is_property_cased, is_property_case_ignorable,
85892         is_property_changes_when_lowercased,
85893         is_property_changes_when_uppercased,
85894         is_property_changes_when_titlecased,
85895         is_property_changes_when_casefolded,
85896         is_property_changes_when_casemapped): New functions.
85897         (output_properties): Output also the properties cased, case_ignorable,
85898         changes_when_lowercased, changes_when_uppercased,
85899         changes_when_titlecased, changes_when_casefolded,
85900         changes_when_casemapped.
85901         (symbolic_width): Update for Unicode 5.2.0, incorporating changes from
85902         Unicode TR#11 revision 17 -> 19.
85903         (LBP_CP): New enumeration value.
85904         (LBP_*): Adjust values accordingly.
85905         (get_lbp): Update for Unicode 5.2.0, incorporating changes from Unicode
85906         TR#14 revision 22 -> 24.
85907         (debug_output_lbp): Allow for LBP_* bits >= 32. Support LBP_CP.
85908         (fill_org_lbp, debug_output_org_lbp, output_lbp): Support LBP_CP.
85909         (get_wbp): Update for Unicode 5.2.0, incorporating changes from Unicode
85910         TR#29 revision 13 -> 15. Use functions is_WBP_MIDNUMLET,
85911         is_WBP_MIDLETTER.
85912         (output_composition_tables): Allow for 24 bits instead of 16 bits in
85913         the code1 and code2 of each composition rule.
85914         * lib/unicase/cased.h: Regenerated for Unicode 5.2.0.
85915         * lib/unicase/ignorable.h: Likewise.
85916         * lib/unicase/tocasefold.h: Likewise.
85917         * lib/unicase/tolower.h: Likewise.
85918         * lib/unicase/totitle.h: Likewise.
85919         * lib/unicase/toupper.h: Likewise.
85920         * lib/unictype/bidi_of.h: Likewise.
85921         * lib/unictype/blocks.h: Likewise.
85922         * lib/unictype/categ_C.h: Likewise.
85923         * lib/unictype/categ_Cf.h: Likewise.
85924         * lib/unictype/categ_Cn.h: Likewise.
85925         * lib/unictype/categ_L.h: Likewise.
85926         * lib/unictype/categ_Ll.h: Likewise.
85927         * lib/unictype/categ_Lm.h: Likewise.
85928         * lib/unictype/categ_Lo.h: Likewise.
85929         * lib/unictype/categ_Lu.h: Likewise.
85930         * lib/unictype/categ_M.h: Likewise.
85931         * lib/unictype/categ_Mc.h: Likewise.
85932         * lib/unictype/categ_Mn.h: Likewise.
85933         * lib/unictype/categ_N.h: Likewise.
85934         * lib/unictype/categ_Nd.h: Likewise.
85935         * lib/unictype/categ_Nl.h: Likewise.
85936         * lib/unictype/categ_No.h: Likewise.
85937         * lib/unictype/categ_P.h: Likewise.
85938         * lib/unictype/categ_Pd.h: Likewise.
85939         * lib/unictype/categ_Po.h: Likewise.
85940         * lib/unictype/categ_S.h: Likewise.
85941         * lib/unictype/categ_Sc.h: Likewise.
85942         * lib/unictype/categ_So.h: Likewise.
85943         * lib/unictype/categ_of.h: Likewise.
85944         * lib/unictype/combining.h: Likewise.
85945         * lib/unictype/ctype_alnum.h: Likewise.
85946         * lib/unictype/ctype_alpha.h: Likewise.
85947         * lib/unictype/ctype_graph.h: Likewise.
85948         * lib/unictype/ctype_lower.h: Likewise.
85949         * lib/unictype/ctype_print.h: Likewise.
85950         * lib/unictype/ctype_punct.h: Likewise.
85951         * lib/unictype/ctype_upper.h: Likewise.
85952         * lib/unictype/decdigit.h: Likewise.
85953         * lib/unictype/digit.h: Likewise.
85954         * lib/unictype/numeric.h: Likewise.
85955         * lib/unictype/pr_alphabetic.h: Likewise.
85956         * lib/unictype/pr_bidi_arabic_digit.h: Likewise.
85957         * lib/unictype/pr_bidi_eur_num_terminator.h: Likewise.
85958         * lib/unictype/pr_bidi_european_digit.h: Likewise.
85959         * lib/unictype/pr_bidi_hebrew_right_to_left.h: Likewise.
85960         * lib/unictype/pr_bidi_left_to_right.h: Likewise.
85961         * lib/unictype/pr_bidi_non_spacing_mark.h: Likewise.
85962         * lib/unictype/pr_bidi_other_neutral.h: Likewise.
85963         * lib/unictype/pr_combining.h: Likewise.
85964         * lib/unictype/pr_composite.h: Likewise.
85965         * lib/unictype/pr_currency_symbol.h: Likewise.
85966         * lib/unictype/pr_dash.h: Likewise.
85967         * lib/unictype/pr_decimal_digit.h: Likewise.
85968         * lib/unictype/pr_deprecated.h: Likewise.
85969         * lib/unictype/pr_diacritic.h: Likewise.
85970         * lib/unictype/pr_extender.h: Likewise.
85971         * lib/unictype/pr_grapheme_base.h: Likewise.
85972         * lib/unictype/pr_grapheme_extend.h: Likewise.
85973         * lib/unictype/pr_grapheme_link.h: Likewise.
85974         * lib/unictype/pr_id_continue.h: Likewise.
85975         * lib/unictype/pr_id_start.h: Likewise.
85976         * lib/unictype/pr_ideographic.h: Likewise.
85977         * lib/unictype/pr_ignorable_control.h: Likewise.
85978         * lib/unictype/pr_logical_order_exception.h: Likewise.
85979         * lib/unictype/pr_lowercase.h: Likewise.
85980         * lib/unictype/pr_numeric.h: Likewise.
85981         * lib/unictype/pr_other_alphabetic.h: Likewise.
85982         * lib/unictype/pr_punctuation.h: Likewise.
85983         * lib/unictype/pr_sentence_terminal.h: Likewise.
85984         * lib/unictype/pr_terminal_punctuation.h: Likewise.
85985         * lib/unictype/pr_unassigned_code_value.h: Likewise.
85986         * lib/unictype/pr_unified_ideograph.h: Likewise.
85987         * lib/unictype/pr_uppercase.h: Likewise.
85988         * lib/unictype/pr_xid_continue.h: Likewise.
85989         * lib/unictype/pr_xid_start.h: Likewise.
85990         * lib/unictype/pr_zero_width.h: Likewise.
85991         * lib/unictype/scripts.h: Likewise.
85992         * lib/unictype/scripts_byname.gperf: Likewise.
85993         * lib/unictype/sy_java_ident.h: Likewise.
85994         * lib/unigbrk/gbrkprop.h: Likewise.
85995         * lib/unilbrk/lbrkprop1.h: Likewise.
85996         * lib/unilbrk/lbrkprop2.h: Likewise.
85997         * lib/unilbrk/lbrktables.h: Likewise.
85998         * lib/unilbrk/lbrktables.c (unilbrk_table): Add a row and column for
85999         LBP_CP. Implement rule LB30.
86000         * lib/uniwidth/width.c (nonspacing_table_data): Add U+0816..U+0819,
86001         U+081B..U+0823, U+0825..U+0827, U+0829..U+082D, U+0900, U+0955, U+109D,
86002         U+1A56, U+1A58..U+1A5E, U+1A60, U+1A62, U+1A65..U+1A6C, U+1A73..U+1A7C,
86003         U+1A7F, U+1CD0..U+1CD2, U+1CD4..U+1CE0, U+1CE2..U+1CE8, U+1CED, U+1DFD,
86004         U+2CEF..U+2CF1, U+A6F0..U+A6F1, U+A8E0..U+A8F1, U+A980..U+A982, U+A9B3,
86005         U+A9B6..U+A9B9, U+A9BC, U+AAB0, U+AAB2..U+AAB4, U+AAB7..U+AAB8,
86006         U+AABE..U+AABF, U+AAC1, U+ABE5, U+ABE8, U+ABED, U+11080..U+11081,
86007         U+110B3..U+110B6, U+110B9..U+110BA, U+110BD.
86008         (uc_width): Return 2 also for unassigned code points of planes 2 and 3.
86009         * lib/uninorm/composition-table.gperf: Regenerated for Unicode 5.2.0.
86010         * lib/uninorm/composition.c (struct composition_rule): Allow for 24
86011         bits instead of 16 bits in the code1 and code2 of each composition
86012         rule.
86013         (uc_composition): Update for Unicode 5.2.0.
86014         * lib/uninorm/decomposition-table1.h: Regenerated for Unicode 5.2.0.
86015         * lib/uninorm/decomposition-table2.h: Likewise.
86016         * lib/uniwbrk/wbrkprop.h: Likewise.
86017         * tests/unicase/test-cased.c: Likewise.
86018         * tests/unicase/test-ignorable.c: Likewise.
86019         * tests/unicase/test-uc_tolower.c: Likewise.
86020         * tests/unicase/test-uc_totitle.c: Likewise.
86021         * tests/unicase/test-uc_toupper.c: Likewise.
86022         * tests/unictype/test-categ_C.c: Likewise.
86023         * tests/unictype/test-categ_Cf.c: Likewise.
86024         * tests/unictype/test-categ_Cn.c: Likewise.
86025         * tests/unictype/test-categ_L.c: Likewise.
86026         * tests/unictype/test-categ_Ll.c: Likewise.
86027         * tests/unictype/test-categ_Lm.c: Likewise.
86028         * tests/unictype/test-categ_Lo.c: Likewise.
86029         * tests/unictype/test-categ_Lu.c: Likewise.
86030         * tests/unictype/test-categ_M.c: Likewise.
86031         * tests/unictype/test-categ_Mc.c: Likewise.
86032         * tests/unictype/test-categ_Mn.c: Likewise.
86033         * tests/unictype/test-categ_N.c: Likewise.
86034         * tests/unictype/test-categ_Nd.c: Likewise.
86035         * tests/unictype/test-categ_Nl.c: Likewise.
86036         * tests/unictype/test-categ_No.c: Likewise.
86037         * tests/unictype/test-categ_P.c: Likewise.
86038         * tests/unictype/test-categ_Pd.c: Likewise.
86039         * tests/unictype/test-categ_Po.c: Likewise.
86040         * tests/unictype/test-categ_S.c: Likewise.
86041         * tests/unictype/test-categ_Sc.c: Likewise.
86042         * tests/unictype/test-categ_So.c: Likewise.
86043         * tests/unictype/test-ctype_alnum.c: Likewise.
86044         * tests/unictype/test-ctype_alpha.c: Likewise.
86045         * tests/unictype/test-ctype_graph.c: Likewise.
86046         * tests/unictype/test-ctype_lower.c: Likewise.
86047         * tests/unictype/test-ctype_print.c: Likewise.
86048         * tests/unictype/test-ctype_punct.c: Likewise.
86049         * tests/unictype/test-ctype_upper.c: Likewise.
86050         * tests/unictype/test-decdigit.h: Likewise.
86051         * tests/unictype/test-digit.h: Likewise.
86052         * tests/unictype/test-numeric.h: Likewise.
86053         * tests/unictype/test-pr_alphabetic.c: Likewise.
86054         * tests/unictype/test-pr_bidi_arabic_digit.c: Likewise.
86055         * tests/unictype/test-pr_bidi_eur_num_terminator.c: Likewise.
86056         * tests/unictype/test-pr_bidi_european_digit.c: Likewise.
86057         * tests/unictype/test-pr_bidi_hebrew_right_to_left.c: Likewise.
86058         * tests/unictype/test-pr_bidi_left_to_right.c: Likewise.
86059         * tests/unictype/test-pr_bidi_non_spacing_mark.c: Likewise.
86060         * tests/unictype/test-pr_bidi_other_neutral.c: Likewise.
86061         * tests/unictype/test-pr_combining.c: Likewise.
86062         * tests/unictype/test-pr_composite.c: Likewise.
86063         * tests/unictype/test-pr_currency_symbol.c: Likewise.
86064         * tests/unictype/test-pr_dash.c: Likewise.
86065         * tests/unictype/test-pr_decimal_digit.c: Likewise.
86066         * tests/unictype/test-pr_deprecated.c: Likewise.
86067         * tests/unictype/test-pr_diacritic.c: Likewise.
86068         * tests/unictype/test-pr_extender.c: Likewise.
86069         * tests/unictype/test-pr_grapheme_base.c: Likewise.
86070         * tests/unictype/test-pr_grapheme_extend.c: Likewise.
86071         * tests/unictype/test-pr_grapheme_link.c: Likewise.
86072         * tests/unictype/test-pr_id_continue.c: Likewise.
86073         * tests/unictype/test-pr_id_start.c: Likewise.
86074         * tests/unictype/test-pr_ideographic.c: Likewise.
86075         * tests/unictype/test-pr_ignorable_control.c: Likewise.
86076         * tests/unictype/test-pr_logical_order_exception.c: Likewise.
86077         * tests/unictype/test-pr_lowercase.c: Likewise.
86078         * tests/unictype/test-pr_numeric.c: Likewise.
86079         * tests/unictype/test-pr_other_alphabetic.c: Likewise.
86080         * tests/unictype/test-pr_punctuation.c: Likewise.
86081         * tests/unictype/test-pr_sentence_terminal.c: Likewise.
86082         * tests/unictype/test-pr_terminal_punctuation.c: Likewise.
86083         * tests/unictype/test-pr_unassigned_code_value.c: Likewise.
86084         * tests/unictype/test-pr_unified_ideograph.c: Likewise.
86085         * tests/unictype/test-pr_uppercase.c: Likewise.
86086         * tests/unictype/test-pr_xid_continue.c: Likewise.
86087         * tests/unictype/test-pr_xid_start.c: Likewise.
86088         * tests/unictype/test-pr_zero_width.c: Likewise.
86089         * tests/unigbrk/test-uc-gbrk-prop.h: Likewise.
86090         * tests/unilbrk/test-u8-possible-linebreaks.c (main): Update for
86091         changed behaviour: line breaking is now disallowed between a letter
86092         or '=' and '('.
86093         * tests/unilbrk/test-u16-possible-linebreaks.c (main): Likewise.
86094         * tests/unilbrk/test-u32-possible-linebreaks.c (main): Likewise.
86095         * tests/unilbrk/test-ulc-possible-linebreaks.c (main): Likewise.
86096         * tests/unilbrk/test-ulc-width-linebreaks.c (main): Likewise.
86097         * tests/uniwidth/test-uc_width2.sh: Same updates as in
86098         lib/uniwidth/width.c.
86099         * tests/uninorm/NormalizationTest.txt: Update from Unicode 5.2.0,
86100         without comments, but with the original copyright notice.
86101         * lib/unicase/special-casing-table.gperf: Regenerated; only comment
86102         changes.
86103         * lib/unictype/categ_Cc.h: Likewise.
86104         * lib/unictype/categ_Co.h: Likewise.
86105         * lib/unictype/categ_Cs.h: Likewise.
86106         * lib/unictype/categ_Lt.h: Likewise.
86107         * lib/unictype/categ_Me.h: Likewise.
86108         * lib/unictype/categ_Pc.h: Likewise.
86109         * lib/unictype/categ_Pe.h: Likewise.
86110         * lib/unictype/categ_Pf.h: Likewise.
86111         * lib/unictype/categ_Pi.h: Likewise.
86112         * lib/unictype/categ_Ps.h: Likewise.
86113         * lib/unictype/categ_Sk.h: Likewise.
86114         * lib/unictype/categ_Sm.h: Likewise.
86115         * lib/unictype/categ_Z.h: Likewise.
86116         * lib/unictype/categ_Zl.h: Likewise.
86117         * lib/unictype/categ_Zp.h: Likewise.
86118         * lib/unictype/categ_Zs.h: Likewise.
86119         * lib/unictype/ctype_blank.h: Likewise.
86120         * lib/unictype/ctype_cntrl.h: Likewise.
86121         * lib/unictype/ctype_digit.h: Likewise.
86122         * lib/unictype/ctype_space.h: Likewise.
86123         * lib/unictype/ctype_xdigit.h: Likewise.
86124         * lib/unictype/mirror.h: Likewise.
86125         * lib/unictype/pr_ascii_hex_digit.h: Likewise.
86126         * lib/unictype/pr_bidi_arabic_right_to_left.h: Likewise.
86127         * lib/unictype/pr_bidi_block_separator.h: Likewise.
86128         * lib/unictype/pr_bidi_boundary_neutral.h: Likewise.
86129         * lib/unictype/pr_bidi_common_separator.h: Likewise.
86130         * lib/unictype/pr_bidi_control.h: Likewise.
86131         * lib/unictype/pr_bidi_embedding_or_override.h: Likewise.
86132         * lib/unictype/pr_bidi_eur_num_separator.h: Likewise.
86133         * lib/unictype/pr_bidi_pdf.h: Likewise.
86134         * lib/unictype/pr_bidi_segment_separator.h: Likewise.
86135         * lib/unictype/pr_bidi_whitespace.h: Likewise.
86136         * lib/unictype/pr_default_ignorable_code_point.h: Likewise.
86137         * lib/unictype/pr_format_control.h: Likewise.
86138         * lib/unictype/pr_hex_digit.h: Likewise.
86139         * lib/unictype/pr_hyphen.h: Likewise.
86140         * lib/unictype/pr_ids_binary_operator.h: Likewise.
86141         * lib/unictype/pr_ids_trinary_operator.h: Likewise.
86142         * lib/unictype/pr_iso_control.h: Likewise.
86143         * lib/unictype/pr_join_control.h: Likewise.
86144         * lib/unictype/pr_left_of_pair.h: Likewise.
86145         * lib/unictype/pr_line_separator.h: Likewise.
86146         * lib/unictype/pr_math.h: Likewise.
86147         * lib/unictype/pr_non_break.h: Likewise.
86148         * lib/unictype/pr_not_a_character.h: Likewise.
86149         * lib/unictype/pr_other_default_ignorable_code_point.h: Likewise.
86150         * lib/unictype/pr_other_grapheme_extend.h: Likewise.
86151         * lib/unictype/pr_other_id_continue.h: Likewise.
86152         * lib/unictype/pr_other_id_start.h: Likewise.
86153         * lib/unictype/pr_other_lowercase.h: Likewise.
86154         * lib/unictype/pr_other_math.h: Likewise.
86155         * lib/unictype/pr_other_uppercase.h: Likewise.
86156         * lib/unictype/pr_paired_punctuation.h: Likewise.
86157         * lib/unictype/pr_paragraph_separator.h: Likewise.
86158         * lib/unictype/pr_pattern_syntax.h: Likewise.
86159         * lib/unictype/pr_pattern_white_space.h: Likewise.
86160         * lib/unictype/pr_private_use.h: Likewise.
86161         * lib/unictype/pr_quotation_mark.h: Likewise.
86162         * lib/unictype/pr_radical.h: Likewise.
86163         * lib/unictype/pr_soft_dotted.h: Likewise.
86164         * lib/unictype/pr_space.h: Likewise.
86165         * lib/unictype/pr_titlecase.h: Likewise.
86166         * lib/unictype/pr_variation_selector.h: Likewise.
86167         * lib/unictype/pr_white_space.h: Likewise.
86168         * lib/unictype/sy_c_ident.h: Likewise.
86169         * lib/unictype/sy_c_whitespace.h: Likewise.
86170         * lib/unictype/sy_java_whitespace.h: Likewise.
86171         * modules/uni*/*: Bump version number of expected libunistring version.
86172         Reported by Simon Josefsson.
86174 2011-01-09  Karl Heuer  <kwzh@gnu.org>
86176         useless-if-before-free: fix typo in --help and make the internal,
86177         automatic version date update process work once again.
86178         --help output contained a NUL character instead of the
86179         backslash-zero that was intended.  Also, the "must lie within
86180         the first 8 lines" line is on line 9, and hence not getting
86181         automatically updated.
86182         * build-aux/useless-if-before-free: Fix the former by adding a
86183         backslash, and the latter by condensing the three lines of what-it-does
86184         to a single line, leaving one line of slack for the future.
86186 2011-01-09  Bruno Haible  <bruno@clisp.org>
86188         uniwidth/width: Fix width of U+1D173..U+1D17A.
86189         * lib/gen-uni-tables.c (is_nonspacing, output_nonspacing_property,
86190         symbolic_width, output_width_property_test): New functions.
86191         (main): Invoke output_nonspacing_property, output_width_property_test.
86192         * lib/uniwidth/width.c (nonspacing_table_data): Set bits for
86193         U+1D173..U+1D17A.
86194         * tests/uniwidth/test-uc_width2.sh: For U+1D173..U+1D17A, expect 0, not
86195         1.
86196         * modules/uniwidth/*: Bump version number of expected libunistring
86197         version.
86198         * modules/unilbrk/*: Likewise.
86200 2011-01-08  Bruno Haible  <bruno@clisp.org>
86202         uninorm tests: Preserve copyright of Unicode data file.
86203         * tests/uninorm/NormalizationTest.txt: Re-add original copyright.
86204         Mention modifications.
86206 2011-01-08  Bruno Haible  <bruno@clisp.org>
86208         gen-uni-tables: Prepare for Unicode 5.2.0.
86209         * lib/gen-uni-tables.c (get_lbp): Allow for more than 32 LBP_* values.
86210         (debug_output_lbp, output_lbp): Update.
86212 2011-01-08  Bruno Haible  <bruno@clisp.org>
86214         unilbrk: Clarify gen-uni-tables.c code.
86215         * lib/gen-uni-tables.c (get_lbp): Assume REVISION_22 to be false. These
86216         were mistakes in UAX #14 revision 22 that are corrected in revision 24.
86217         Clarify what to do with unilbrk/lbrkprop.txt and uniwbrk/wbrkprop.txt.
86219 2011-01-07  Bruno Haible  <bruno@clisp.org>
86221         strtod: Restore errno when successfully parsing Infinity or NaN.
86222         * lib/strtod.c (strtod): After successfully parsing an Infinity or NaN,
86223         restore the original errno.
86225 2011-01-07  Bruno Haible  <bruno@clisp.org>
86227         remove test: Avoid failure on HP-UX 11.
86228         * tests/test-remove.c (main): Allow EEXIST as alternative error code.
86230 2011-01-07  Bruno Haible  <bruno@clisp.org>
86232         mkdir, mkdirat tests: Avoid failure on HP-UX 11.11.
86233         * tests/test-mkdir.h (test_mkdir): Allow EOPNOTSUPP as alternative
86234         error code.
86236 2011-01-07  Pádraig Brady  <P@draigBrady.com>
86238         ignore-value: fixup comments, and add Eric Blake
86239         as an author since he rewrote the macros.
86240         * lib/ignore-value.h (ignore_value):  State that
86241         we now support aggregates.  Also specify exactly
86242         when the GCC warn_unused_result feature was added.
86244 2011-01-06  Eric Blake  <eblake@redhat.com>
86246         ignore-value: support aggregate types
86247         * lib/ignore-value.h (ignore_value): Provide separate gcc
86248         definition.
86249         * modules/ignore-value-tests: New test module.
86250         * tests/test-ignore-value.c: New test.
86252         maint.mk: improve sc_prohibit_strcmp regex
86253         * top/maint.mk (sc_prohibit_strcmp): Detect strcmp()!=0, as
86254         documented.  Also, detect strcmp((expr),expr) == 0.  Exempt the
86255         definition of STRNEQ.
86257         signal: work around Haiku issue with SIGBUS
86258         * lib/siglist.h: Add comment.
86259         * lib/sig2str.c (numname_table): Swap SIGBUS order, to match
86260         strsignal's favoring of SIGSEGV.
86261         * tests/test-signal.c (main): Avoid test failure.
86262         * doc/posix-headers/signal.texi (signal.h): Document the issue.
86263         Reported by Scott McCreary.
86265         maint.mk: add pre-release check to ensure submodule commits are public
86266         * top/maint.mk (public-submodule-commit): New rule.
86267         (submodule-checks): New variable.
86268         (alpha beta stable): Depend on the variable.
86270 2011-01-05  Pádraig Brady  <P@draigBrady.com>
86271         and Jim Meyering  <meyering@redhat.com>
86273         ignore-value: make ignore_value more generic; deprecate ignore_ptr
86274         * lib/ignore-value.h: Include <stdint.h>, for decl of intptr_t.
86275         (ATTRIBUTE_DEPRECATED): Define.
86276         (_ignore_case): New function.
86277         (ignore_value): New macro, to replace the old function.
86278         (ignore_ptr): Arrange for any use to evoke a deprecation warning.
86279         * modules/ignore-value (Depends-on): Add stdint.
86281 2011-01-04  Eric Blake  <eblake@redhat.com>
86283         doc: regenerate INSTALL
86284         * doc/Makefile (INSTALL, INSTALL.ISO, INSTALL.UTF-8): Re-add
86285         @firstparagraphindent support, now that autoconf dropped it.
86286         (INSTALL_PRELUDE): Reinstate old macro.
86287         * doc/install.texi: Resync from autoconf.
86288         * doc/INSTALL: Reflect recent autoconf update.
86289         * doc/INSTALL.ISO: Likewise.
86290         * doc/INSTALL.UTF-8: Likewise.
86291         Reported by Karl Berry.
86293 2011-01-04  Bruce Korb  <address@hidden>
86295         git-version-gen: avoid a sub-shell
86296         * build-aux/git-version-gen: Redirect stderr in `...` via
86297         "exec 2>...", rather than via an added sub-shell.
86299 2011-01-03  Ben Pfaff  <blp@cs.stanford.edu>
86301         git-version-gen: use (...) rather than sh -c '...'
86302         * build-aux/git-version-gen: Rather than hard-coding a shell's name
86303         with "sh -c '...'", just use "(...)".  Less syntax is better, too.
86305 2011-01-03  Jim Meyering  <meyering@redhat.com>
86307         git-version-gen: convert leading TABs to spaces
86308         * build-aux/git-version-gen: Expand leading TABs.
86310         git-version-gen: handle failed "git rev-list"
86311         * build-aux/git-version-gen: Rather than leaking a "fatal" error
86312         from git and proceeding as if it had succeeded but printed no SHA1
86313         checksums, suppress the diagnostic and handle the failure.
86314         Reported by Bruce Korb in http://marc.info/?l=git&m=129399145930450&w=2
86316         git-version-gen: include command name in one more diagnostic
86317         * build-aux/git-version-gen: When the required .tarball-version file
86318         was missing or unreadable, you might see the diagnostic from "cat",
86319         but no trace of the name of the invoking script.  Now, you still see
86320         the diagnostic from cat, but also get one from "git-version-gen: ".
86321         Inspired by a patch from Bruce Korb.
86323         update-copyright: adjust test to match changed code
86324         * tests/test-update-copyright.sh: Change test's expected output
86325         to match new actual output.
86327 2011-01-02  Bruno Haible  <bruno@clisp.org>
86329         getlogin_r: Avoid test failure on HP-UX 11.
86330         * tests/test-getlogin_r.c (main): Allow an error code EINVAL instead of
86331         ERANGE when the second argument is zero.
86332         * doc/posix-functions/getlogin_r.texi: Document the HP-UX 11
86333         portability problem.
86335 2011-01-02  Bruce Korb  <bkorb@gnu.org>
86337         * build-aux/update-copyright: doc Simon's changes
86339 2011-01-02  Simon Josefsson  <simon@josefsson.org>
86341         * build-aux/update-copyright: Support UPDATE_COPYRIGHT_HOLDER
86342         environment variable.
86344 2011-01-02  Bruno Haible  <bruno@clisp.org>
86346         unigbrk: Avoid gcc warnings.
86347         * lib/unigbrk/u16-grapheme-breaks.c (u16_grapheme_breaks): Remove
86348         unused variable.
86349         * lib/unigbrk/u16-grapheme-prev.c (u16_grapheme_prev): Likewise.
86350         * lib/unigbrk/u8-grapheme-prev.c (u8_grapheme_prev): Likewise.
86351         * tests/unigbrk/test-u16-grapheme-breaks.c (main): Likewise.
86352         * tests/unigbrk/test-u32-grapheme-breaks.c (main): Likewise.
86353         * tests/unigbrk/test-u8-grapheme-breaks.c (test_u8_grapheme_breaks):
86354         Change type of first argument to 'const char *'.
86355         (main): Remove unused variable.
86356         * tests/unigbrk/test-u8-grapheme-next.c (test_u8_grapheme_next): Change
86357         type of first argument to 'const char *'.
86358         * tests/unigbrk/test-u8-grapheme-prev.c (test_u8_grapheme_prev):
86359         Likewise.
86360         (main): Change type of variable 's'.
86361         * tests/unigbrk/test-uc-is-grapheme-break.c (main): Cast column number
86362         to 'int'.
86364 2011-01-02  Bruno Haible  <bruno@clisp.org>
86366         pwrite: Fix test whether it works and make it work on HP-UX 11.11.
86367         * m4/pwrite.m4 (gl_FUNC_PWRITE): Use AC_LANG_PROGRAM, not
86368         AC_LANG_SOURCE. Extend the test program to catch another HP-UX 11.11
86369         bug.
86370         * lib/pwrite.c: Undo 2010-12-31 patch.
86371         * doc/posix-functions/pwrite.texi: Document another HP-UX 11.11 bug.
86373 2011-01-02  Bruno Haible  <bruno@clisp.org>
86375         pread: Fix test whether it works.
86376         * m4/pread.m4 (gl_FUNC_PREAD): Use AC_LANG_PROGRAM, not AC_LANG_SOURCE.
86378 2011-01-02  Bruno Haible  <bruno@clisp.org>
86380         Fix detection of traditional Arabic locale on HP-UX, Solaris, Cygwin.
86381         * m4/locale-ar.m4 (gt_LOCALE_AR): Require that the locale encoding name
86382         ends in "6". Don't require a specific month name. Try also the locale
86383         names found on HP-UX 11 and Solaris 7.
86385 2011-01-02  Bruno Haible  <bruno@clisp.org>
86387         tcgetsid: Correct linkage in C++ mode on HP-UX 11.00.
86388         * lib/termios.in.h: In C++ mode, on HP-UX, include <sys/termios.h> with
86389         C linkage.
86390         * doc/posix-functions/tcgetsid.texi: Mention the HP-UX 11.00 bug.
86392 2011-01-01  Ben Pfaff  <blp@cs.stanford.edu>
86394         Rename uc_is_grapheme_cluster_break() to uc_is_grapheme_break()
86395         for consistency, since the "cluster" term is not used elsewhere.
86396         * lib/unigbrk.in.h: Update name.
86397         * lib/unigbrk/u16-grapheme-breaks.c: Update name.
86398         * lib/unigbrk/u16-grapheme-next.c: Update name.
86399         * lib/unigbrk/u16-grapheme-prev.c: Update name.
86400         * lib/unigbrk/u32-grapheme-breaks.c: Update name.
86401         * lib/unigbrk/u32-grapheme-next.c: Update name.
86402         * lib/unigbrk/u32-grapheme-prev.c: Update name.
86403         * lib/unigbrk/u8-grapheme-breaks.c: Update name.
86404         * lib/unigbrk/u8-grapheme-next.c: Update name.
86405         * lib/unigbrk/u8-grapheme-prev.c: Update name.
86406         * lib/unigbrk/uc-is-grapheme-break.c: Update name.
86407         * tests/unigbrk/test-uc-is-grapheme-break.c: Update name.
86408         Suggested by Bruno Haible.
86410 2011-01-01  Ben Pfaff  <blp@cs.stanford.edu>
86412         Remove module 'u8-grapheme-len' as too redundant with
86413         'u8-grapheme-next'.
86414         * modules/unigbrk/u8-grapheme-len: Delete file.
86415         * modules/unigbrk/u8-grapheme-len-tests: Delete file.
86416         * lib/unigbrk.in.h: Remove prototype for deleted function.
86417         * lib/unigbrk/u8-grapheme-len.c: Delete file.
86418         * tests/unigbrk/test-u8-grapheme-len.c: Delete file.
86420         Remove module 'u16-grapheme-len' as too redundant with
86421         'u16-grapheme-next'.
86422         * modules/unigbrk/u16-grapheme-len: Delete file.
86423         * modules/unigbrk/u16-grapheme-len-tests: Delete file.
86424         * lib/unigbrk.in.h: Remove prototype for deleted function.
86425         * lib/unigbrk/u16-grapheme-len.c: Delete file.
86426         * tests/unigbrk/test-u16-grapheme-len.c: Delete file.
86428         Remove module 'u32-grapheme-len' as too redundant with
86429         'u32-grapheme-next'.
86430         * modules/unigbrk/u32-grapheme-len: Delete file.
86431         * modules/unigbrk/u32-grapheme-len-tests: Delete file.
86432         * lib/unigbrk.in.h: Remove prototype for deleted function.
86433         * lib/unigbrk/u32-grapheme-len.c: Delete file.
86434         * tests/unigbrk/test-u32-grapheme-len.c: Delete file.
86436         Suggested by Bruno Haible.
86438 2011-01-01  Ben Pfaff  <blp@cs.stanford.edu>
86440         * unigbrk.in.h: Fix typo: "ben" => "been".
86441         Reported by Bruno Haible.
86443 2011-01-01  Jim Meyering  <meyering@redhat.com>
86445         maint: update almost all copyright ranges to include 2011
86446         Run the new "make update-copyright" rule.
86448 2011-01-01  Jim Meyering  <meyering@redhat.com>
86450         maint: update-copyright: exempt doc/INSTALL*
86451         * Makefile (update-copyright): Also exclude doc/INSTALL*,
86452         since they are generated.  Suggested by Bruno Haible.
86454 2011-01-01  Jim Meyering  <meyering@redhat.com>
86456         maint: refine the update-copyright rule
86457         * Makefile (update-copyright): Also exclude any file that includes
86458         the "GENERATED AUTOMATICALLY" comment, being careful not to exclude
86459         code that merely generates the comment.
86461 2010-12-31  Ben Pfaff  <blp@cs.stanford.edu>
86463         New module 'u8-grapheme-len'.
86464         * modules/unigbrk/u8-grapheme-len: New file.
86465         * modules/unigbrk/u8-grapheme-len-tests: New file.
86466         * lib/unigbrk.in.h: Add prototype for new function.
86467         * lib/unigbrk/u8-grapheme-len.c: New file.
86468         * tests/unigbrk/test-u8-grapheme-len.c: New file.
86470         New module 'u16-grapheme-len'.
86471         * modules/unigbrk/u16-grapheme-len: New file.
86472         * modules/unigbrk/u16-grapheme-len-tests: New file.
86473         * lib/unigbrk.in.h: Add prototype for new function.
86474         * lib/unigbrk/u16-grapheme-len.c: New file.
86475         * tests/unigbrk/test-u16-grapheme-len.c: New file.
86477         New module 'u32-grapheme-len'.
86478         * modules/unigbrk/u32-grapheme-len: New file.
86479         * modules/unigbrk/u32-grapheme-len-tests: New file.
86480         * lib/unigbrk.in.h: Add prototype for new function.
86481         * lib/unigbrk/u32-grapheme-len.c: New file.
86482         * tests/unigbrk/test-u32-grapheme-len.c: New file.
86484         New module 'u8-grapheme-next'.
86485         * modules/unigbrk/u8-grapheme-next: New file.
86486         * modules/unigbrk/u8-grapheme-next-tests: New file.
86487         * lib/unigbrk.in.h: Add prototype for new function.
86488         * lib/unigbrk/u8-grapheme-next.c: New file.
86489         * tests/unigbrk/test-u8-grapheme-next.c: New file.
86491         New module 'u16-grapheme-next'.
86492         * modules/unigbrk/u16-grapheme-next: New file.
86493         * modules/unigbrk/u16-grapheme-next-tests: New file.
86494         * lib/unigbrk.in.h: Add prototype for new function.
86495         * lib/unigbrk/u16-grapheme-next.c: New file.
86496         * tests/unigbrk/test-u16-grapheme-next.c: New file.
86498         New module 'u32-grapheme-next'.
86499         * modules/unigbrk/u32-grapheme-next: New file.
86500         * modules/unigbrk/u32-grapheme-next-tests: New file.
86501         * lib/unigbrk.in.h: Add prototype for new function.
86502         * lib/unigbrk/u32-grapheme-next.c: New file.
86503         * tests/unigbrk/test-u32-grapheme-next.c: New file.
86505         New module 'u8-grapheme-prev'.
86506         * modules/unigbrk/u8-grapheme-prev: New file.
86507         * modules/unigbrk/u8-grapheme-prev-tests: New file.
86508         * lib/unigbrk.in.h: Add prototype for new function.
86509         * lib/unigbrk/u8-grapheme-prev.c: New file.
86510         * tests/unigbrk/test-u8-grapheme-prev.c: New file.
86512         New module 'u16-grapheme-prev'.
86513         * modules/unigbrk/u16-grapheme-prev: New file.
86514         * modules/unigbrk/u16-grapheme-prev-tests: New file.
86515         * lib/unigbrk.in.h: Add prototype for new function.
86516         * lib/unigbrk/u16-grapheme-prev.c: New file.
86517         * tests/unigbrk/test-u16-grapheme-prev.c: New file.
86519         New module 'u32-grapheme-prev'.
86520         * modules/unigbrk/u32-grapheme-prev: New file.
86521         * modules/unigbrk/u32-grapheme-prev-tests: New file.
86522         * lib/unigbrk.in.h: Add prototype for new function.
86523         * lib/unigbrk/u32-grapheme-prev.c: New file.
86524         * tests/unigbrk/test-u32-grapheme-prev.c: New file.
86526         New module 'u8-grapheme-breaks'.
86527         * modules/unigbrk/u8-grapheme-breaks: New file.
86528         * modules/unigbrk/u8-grapheme-breaks-tests: New file.
86529         * lib/unigbrk.in.h: Add prototype for new function.
86530         * lib/unigbrk/u8-grapheme-breaks.c: New file.
86531         * tests/unigbrk/test-u8-grapheme-breaks.c: New file.
86533         New module 'u16-grapheme-breaks'.
86534         * modules/unigbrk/u16-grapheme-breaks: New file.
86535         * modules/unigbrk/u16-grapheme-breaks-tests: New file.
86536         * lib/unigbrk.in.h: Add prototype for new function.
86537         * lib/unigbrk/u16-grapheme-breaks.c: New file.
86538         * tests/unigbrk/test-u16-grapheme-breaks.c: New file.
86540         New module 'u32-grapheme-breaks'.
86541         * modules/unigbrk/u32-grapheme-breaks: New file.
86542         * modules/unigbrk/u32-grapheme-breaks-tests: New file.
86543         * lib/unigbrk.in.h: Add prototype for new function.
86544         * lib/unigbrk/u32-grapheme-breaks.c: New file.
86545         * tests/unigbrk/test-u32-grapheme-breaks.c: New file.
86547         New module 'ulc-grapheme-breaks'.
86548         * modules/unigbrk/ulc-grapheme-breaks: New file.
86549         * modules/unigbrk/ulc-grapheme-breaks-tests: New file.
86550         * m4/locale-ar.m4: New file.
86551         * lib/unigbrk/ulc-grapheme-breaks.c: New file.
86552         * tests/unigbrk/test-ulc-grapheme-breaks.c: New file.
86553         * tests/unigbrk/test-ulc-grapheme-breaks.sh: New file.
86555 2010-12-31  Ben Pfaff  <blp@cs.stanford.edu>
86557         gbrkprop: Fix implementation of uc_graphemeclusterbreak_property.
86558         * lib/unigbrk/gbrkprop.h: Regenerate with gen-uni-tables.c.  I had
86559         modified how this file was generated before I initially submitted
86560         the module, but failed to regenerate it.  This meant that several
86561         of the level2 entries were wrong.
86562         * lib/unigbrk/uc-gbrk-prop.h (uc_graphemeclusterbreak_property):
86563         Remove the division-by-2 that is folded into the table now that
86564         gbrkprop.h has been regenerated properly.  Now -1 entries are
86565         handled correctly.
86567         New module 'unigbrk/uc-gbrk-prop-tests'.
86568         * modules/unigbrk/uc-gbrk-prop-tests: New file.
86569         * lib/gen-uni-tables.c: Generate tests/test-uc-gbrk-prop.h.
86570         * tests/unigbrk/test-uc-gbrk-prop.c: New file.
86571         * tests/unigbrk/test-uc-gbrk-prop.h: New file.
86573 2011-01-01  Bruno Haible  <bruno@clisp.org>
86575         Avoid use of hexadecimal escapes.
86576         * tests/unigbrk/test-uc-is-grapheme-break.c (main): Use octal escapes
86577         instead of hexadecimal escapes.
86579 2011-01-01  Jim Meyering  <meyering@redhat.com>
86581         maint: new rule to update copyright year ranges
86582         * Makefile (update-copyright): New rule.
86584         maint: indent with TABs in Makefile
86585         * Makefile: Expand leading sequences of spaces to TABs
86587         version-etc: update the copyright year it reports
86588         * lib/version-etc.c (COPYRIGHT_YEAR): Update to 2011.
86590 2010-12-31  Bruno Haible  <bruno@clisp.org>
86592         isfinite: Avoid compiler bug of "cc -O" on HP-UX 11.11.
86593         * lib/isfinite.c (zerof, zerod, zerol): New variables.
86594         (gl_isfinitef, gl_isfinited, gl_isfinitel): Use them instead of literal
86595         zero.
86597 2010-12-31  Bruno Haible  <bruno@clisp.org>
86599         pwrite: Work around HP-UX 11.11 bug.
86600         * m4/pwrite.m4 (gl_FUNC_PWRITE): When pwrite exists, test whether it
86601         works and set REPLACE_PWRITE if not.
86602         * lib/pwrite.c (pwrite): Add an implementation that uses the system
86603         function.
86604         * doc/posix-functions/pwrite.texi: Document the HP-UX 11 bug.
86606 2010-12-31  Bruno Haible  <bruno@clisp.org>
86608         pread: Work around HP-UX 11 bugs.
86609         * m4/pread.m4 (gl_FUNC_PREAD): When pread exists, test whether it works
86610         and set REPLACE_PREAD if not.
86611         * doc/posix-functions/pread.texi: Document the HP-UX 11 bugs.
86613 2010-12-31  Eric Blake  <eblake@redhat.com>
86615         nl_langinfo: fix YESEXPR on Irix 6.5
86616         * m4/nl_langinfo.m4 (gl_FUNC_NL_LANGINFO): Test for Irix bug.
86617         * lib/nl_langinfo.c (rpl_nl_langinfo): Work around it.
86618         * doc/posix-functions/nl_langinfo.texi (nl_langinfo): Document
86619         it.
86621 2010-12-31  Bruno Haible  <bruno@clisp.org>
86623         iconv: Document HP-UX 11 bug.
86624         * doc/posix-functions/iconv.texi: Document HP-UX 11 return value bug.
86626 2010-12-31  Bruno Haible  <bruno@clisp.org>
86628         ldexpl: Fix link error on HP-UX 11.
86629         * m4/ldexpl.m4 (gl_FUNC_LDEXPL): When replacing ldexpl, set
86630         LDEXPL_LIBM, using $ISNANL_LIBM.
86632 2010-12-31  Eric Blake  <eblake@redhat.com>
86634         ftello: avoid compilation failure with SunStudio c89
86635         * lib/ftello.c (ftello): Use lseek, not llseek.
86637         tests: avoid failing coreutils tests on cygwin
86638         * tests/init.sh (find_exe_basenames_): Exempt [.exe.
86639         (create_exe_shims_): Return 0 when skipping.
86641 2010-12-31  Bruno Haible  <bruno@clisp.org>
86643         sys_select: Avoid warning about missing memset declaration on HP-UX 11.
86644         * lib/sys_select.in.h: On HP-UX, include also <string.h>.
86646 2010-12-31  Bruno Haible  <bruno@clisp.org>
86648         waitpid: Fix link error in C++ mode.
86649         * lib/sys_wait.in.h: Remove extern "C" { ... } group.
86651 2010-12-31  Bruno Haible  <bruno@clisp.org>
86653         isnan: Use GCC built-ins when possible.
86654         * lib/math.in.h (gl_isnan_f): Use __builtin_isnanf instead of
86655         __builtin_isnan.
86656         (gl_isnan_l): Use __builtin_isnanl instead of __builtin_isnan.
86657         (isnan): Define using GCC built-ins for GCC >= 4.0.
86659 2010-12-31  Bruno Haible  <bruno@clisp.org>
86661         isnand: Fix mistake.
86662         * m4/isnand.m4 (gl_HAVE_ISNAND_IN_LIBM): Use __builtin_isnan, not
86663         __builtin_isnand.
86665 2010-12-31  Bruno Haible  <bruno@clisp.org>
86667         open: Avoid C++ error on HP-UX 11.
86668         * lib/fcntl.in.h (open): Disable _GL_CXXALIASWARN invocation on HP-UX.
86670 2010-12-31  Bruno Haible  <bruno@clisp.org>
86672         time_r: Add missing declarations on HP-UX 11.
86673         * lib/time.in.h (localtime_r, gmtime_r): Test HAVE_DECL_LOCALTIME_R
86674         instead of HAVE_LOCALTIME_R.
86675         * m4/time_r.m4 (gl_TIME_R): Test whether localtime_r is declared. Set
86676         HAVE_LOCALTIME_R always.
86677         * m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS): Initialize
86678         HAVE_DECL_LOCALTIME_R, not HAVE_LOCALTIME_R.
86679         * modules/time (Makefile.am): Substitute HAVE_DECL_LOCALTIME_R, not
86680         HAVE_LOCALTIME_R.
86681         * doc/posix-functions/gmtime_r.texi: Document the HP-UX 11 problem.
86682         * doc/posix-functions/localtime_r.texi: Likewise.
86684 2010-12-29  Eric Blake  <eblake@redhat.com>
86686         mountlist: tweak previous commit
86687         * lib/mountlist.c (me_remote): Guarantee trailing backslash.
86688         Reported by Paul Eggert.
86690         mountlist: fix local drive detection on cygwin
86691         * lib/mountlist.c (ME_REMOTE) [__CYGWIN__]: Provide implementation
86692         that works for cygwin.
86694 2010-12-29  Paul Eggert  <eggert@cs.ucla.edu>
86696         ftoastr, snprintf: ftoastr + snprintf module
86697         * lib/ftoastr.c: Use GNULIB_SNPRINTF, not GNULIB_SNPRINTF_POSIX,
86698         since the snprintf module now should be good enough here.
86699         * modules/snprintf (configure.ac): Add gl_MODULE_INDICATOR([snprintf]).
86700         It seems odd to have both gl_STDIO_MODULE_INDICATOR([snprintf])
86701         and gl_MODULE_INDICATOR([snprintf]), but the former enables
86702         GNULIB_SNPRINTF only for the test directory, and the latter
86703         doesn't arrange for gl_STDIO_H_DEFAULTS to be called, so neither
86704         seems to suffice by itself.
86706 2010-12-28  Paul Eggert  <eggert@cs.ucla.edu>
86708         alloca: one step towards thread-safety
86709         * lib/alloca.c (find_stack_direction): New arg PTR, to avoid the
86710         need for a static variable.  All callers changed.  This does not
86711         make the alloca replacement thread-safe, but it's one step.
86713         tests: minor indenting change
86714         * tests/init.sh: Sync from coreutils housekeeping patch
86715         <http://lists.gnu.org/r/coreutils/2010-12/msg00116.html>
86716         to keep lines within 80 columns.
86718 2010-12-28  Jim Meyering  <meyering@redhat.com>
86720         regex: don't infloop on persistent failing calloc
86721         * lib/regexec.c (build_trtable): Return failure indication upon
86722         calloc failure.  Otherwise, re_search_internal could infloop on OOM.
86723         In glibc, this was fixed for version 2.13:
86724         http://sourceware.org/bugzilla/show_bug.cgi?id=12348
86726 2010-12-28  Bruno Haible  <bruno@clisp.org>
86727             Paul Eggert <eggert@cs.ucla.edu>
86729         linkat: Make implementation robust against system behaviour variations.
86730         * m4/link-follow.m4 (gl_FUNC_LINK_FOLLOWS_SYMLINK): Define
86731         LINK_FOLLOWS_SYMLINKS to -1 if it needs a runtime test in the Solaris
86732         way, and to -2 if it needs a generic runtime test.
86733         * lib/linkat.c (solaris_optimized_link_immediate,
86734         solaris_optimized_link_follow): New functions.
86735         * tests/test-linkat.c (EXPECT_LINK_HARDLINKS_SYMLINKS): New macro.
86736         (check_same_link): Use it.
86738 2010-12-26  Ben Pfaff  <blp@cs.stanford.edu>
86740         New module 'unigbrk/base'.
86741         * modules/unigbrk/base: New file.
86742         * lib/unigbrk.in.h: New file.
86744         New module 'unigbrk/uc-gbrk-prop'.
86745         * lib/gen-uni-tables.c: Generate lib/unigbrk/gbrkprop.h.
86746         * modules/unigbrk/uc-gbrk-prop: New file.
86747         * lib/unigbrk/gbrkprop.h: New file.
86748         * lib/unigbrk/uc-gbrk-prop.c: New file.
86750         New module 'unigbrk/uc-is-grapheme-break'.
86751         * modules/unigbrk/uc-is-grapheme-break: New file.
86752         * modules/unigbrk/uc-is-grapheme-break-tests: New file.
86753         * lib/unigbrk/uc-is-grapheme-break.c: New file.
86754         * tests/unigbrk/test-uc-is-grapheme-break.c: New file.
86755         * tests/unigbrk/test-uc-is-grapheme-break.sh: New file.
86756         * tests/unigbrk/GraphemeBreakTest.txt: New file.
86758         With corrections and tweaks by Bruno Haible <bruno@clisp.org>.
86760 2010-12-27  Bruno Haible  <bruno@clisp.org>
86762         linkat test: Avoid failure on Solaris 11 2010-11.
86763         * tests/test-linkat.c (main): Allow ENOTDIR as alternative error code.
86765 2010-12-27  Paul Eggert  <eggert@cs.ucla.edu>
86767         utimens: work around glibc rounding bug on more platforms
86768         * lib/utimens.c (fdutimens): Work around rounding bug even if
86769         HAVE_WORKING_UTIMES.  Reported for Linux 2.4.21 by Bruno Haible in
86770         <http://lists.gnu.org/r/bug-gnulib/2010-12/msg00298.html>.
86772 2010-12-27  Bruno Haible  <bruno@clisp.org>
86774         select tests: Improve comments.
86775         * tests/test-select.c (do_select): Add comments.
86777 2010-12-27  Bruno Haible  <bruno@clisp.org>
86779         select tests: Safer way of handling timeout.
86780         * tests/test-select.c (do_select_nowait): Zero-initialize the timeout
86781         at every invocation.
86783 2010-12-27  Bruno Haible  <bruno@clisp.org>
86785         select tests: Use 'bool' where appropriate.
86786         * tests/test-select.c (connect_to_socket): Change argument type to
86787         'bool'.
86789 2010-12-27  Bruno Haible  <bruno@clisp.org>
86791         select tests: Use existing modules.
86792         * modules/select-tests (Depends-on): Add pipe-posix, unistd.
86793         (configure.ac): Don't test for unistd.h.
86794         * tests/test-select.c: Include <unistd.h> always. Use pipe() as
86795         declared in <unistd.h>.
86797 2010-12-27  Bruno Haible  <bruno@clisp.org>
86799         mbrtowc: Work around a Solaris 7 bug.
86800         * m4/mbrtowc.m4 (gl_MBRTOWC_NULL_ARG1): New macro.
86801         (gl_MBRTOWC_NULL_ARG2): Renamed from gl_MBRTOWC_NULL_ARG.
86802         (gl_FUNC_MBRTOWC): Update. Define MBRTOWC_NULL_ARG2_BUG instead of
86803         MBRTOWC_NULL_ARG_BUG. Invoke gl_MBRTOWC_NULL_ARG1 and define
86804         MBRTOWC_NULL_ARG1_BUG.
86805         * lib/mbrtowc.c (rpl_mbrtowc): Use MBRTOWC_NULL_ARG2_BUG instead of
86806         MBRTOWC_NULL_ARG_BUG. Handle MBRTOWC_NULL_ARG1_BUG.
86807         * tests/test-mbrtowc.c (main): Test support of a NULL first argument.
86808         * doc/posix-functions/mbrtowc.texi: Mention the Solaris 7 bug.
86810 2010-12-27  Jim Meyering  <meyering@redhat.com>
86812         read-file.c: tweak syntax
86813         * lib/read-file.c (fread_file): Remove space after "*" in function
86814         definitions.
86816 2010-12-27  Bruno Haible  <bruno@clisp.org>
86818         times test: Avoid gcc warnings on OSF/1.
86819         * tests/test-times.c (main): Cast printf arguments from clock_t to
86820         'long int'.
86822 2010-12-27  Paul Eggert  <eggert@cs.ucla.edu>
86824         utimens: work around glibc rounding bug on older Linux kernels
86825         * lib/utimens.c (fdutimens): If invoking futimesat or futimes
86826         on Linux with a glibc whose utimes might not work, then work
86827         around a longstanding glibc bug involving rounding rather than
86828         truncated time stamps.  Reported for Linux 2.4.21 by Bruno Haible in
86829         <http://lists.gnu.org/r/bug-gnulib/2010-11/msg00113.html>.
86831 2010-12-26  Bruno Haible  <bruno@clisp.org>
86833         inet_ntop: Hide mismatch of declaration on NonStop Kernel.
86834         * lib/arpa_inet.in.h (inet_ntop): Use _GL_CXXALIAS_SYS_CAST instead of
86835         _GL_CXXALIAS_SYS.
86836         Reported by Joachim Schmitz <jojo@schmitz-digital.de>.
86838 2010-12-26  Bruno Haible  <bruno@clisp.org>
86840         inet_ntop, inet_pton: Ensure declaration on NonStop Kernel.
86841         * lib/arpa_inet.in.h: On NonStop Kernel, include also <netdb.h>.
86842         * m4/arpa_inet_h.m4 (gl_HEADER_ARPA_INET): Likewise.
86843         * m4/inet_ntop.m4 (gl_PREREQ_INET_NTOP): Include also <netdb.h> when
86844         looking for the declaration.
86845         * m4/inet_pton.m4 (gl_PREREQ_INET_PTON): Likewise.
86846         * doc/posix-functions/inet_ntop.texi: Document the NonStop Kernel
86847         problem.
86848         * doc/posix-functions/inet_pton.texi: Likewise.
86850 2010-12-26  Bruno Haible  <bruno@clisp.org>
86852         arpa_inet: Use the common idioms with C++ support.
86853         * lib/arpa_inet.in.h: Include c++defs.h.
86854         (inet_ntop, inet_pton): Declare using the macros with C++ namespace
86855         support.
86856         * modules/arpa_inet (Depends-on): Add c++defs.
86857         (Makefile.am): Substitute the contents of c++defs.h.
86858         * modules/arpa_inet-tests (Depends-on): Add arpa_inet-c++-tests.
86859         * modules/arpa_inet-c++-tests: New file.
86860         * tests/test-arpa_inet-c++.cc: New file.
86862 2010-12-25  Bruno Haible  <bruno@clisp.org>
86864         Fix more C++ link errors on Solaris 8.
86865         * modules/fcntl-h-c++-tests (test_fcntl_h_c___LDADD): Add
86866         $(LIB_EACCESS).
86867         * modules/stdio-c++-tests (test_stdio_c___LDADD): Likewise.
86868         * modules/stdlib-c++-tests (test_stdlib_c___LDADD): Likewise.
86869         * modules/sys_ioctl-c++-tests (test_sys_ioctl_c___LDADD): Likewise.
86870         * modules/wchar-c++-tests (test_wchar_c___LDADD): Likewise.
86871         * modules/wctype-c++-tests (test_wctype_c___LDADD): Likewise.
86873 2010-12-25  Bruno Haible  <bruno@clisp.org>
86875         printf-posix: Fix link error when a non-GCC compiler is used.
86876         * lib/stdio.in.h (printf): When not using GCC, override printf
86877         correctly.
86878         Reported by Joachim Schmitz <jojo@schmitz-digital.de>.
86880 2010-12-25  Bruno Haible  <bruno@clisp.org>
86882         strerror_r-posix: Update doc.
86883         * doc/posix-functions/strerror_r.texi: Update doc about the return
86884         value. See <http://sources.redhat.com/bugzilla/show_bug.cgi?id=12204>.
86886 2010-12-25  Paul Eggert  <eggert@cs.ucla.edu>
86888         utimens: simplify the logic of the previous change
86889         * m4/utimes.m4 (gl_FUNC_UTIMES): Simplify the logic a bit.
86890         This should not affect whether the test succeeds or fails.
86892         utimens: configure better on hosts with NFS clock skew
86893         * m4/utimes.m4 (gl_FUNC_UTIMES): Don't assume that utimes (f, NULL)
86894         uses the clock of the local host.  It might use the clock of the
86895         NFS server.  Reported for Linux 2.4.21 client by Bruno Haible in
86896         <http://lists.gnu.org/r/bug-gnulib/2010-11/msg00113.html>.
86898 2010-12-25  Bruno Haible  <bruno@clisp.org>
86900         ptsname test: Avoid failure on Solaris.
86901         * tests/test-ptsname.c (main): For Solaris, use the recommended way to
86902         open a pseudo-terminal; don't use BSD-style ptys.
86903         * doc/posix-functions/ptsname.texi: Document the limitation on Solaris.
86905 2010-12-25  Bruno Haible  <bruno@clisp.org>
86907         ptsname: Avoid ERANGE failure on some systems.
86908         * lib/ptsname.c (buffer): Increase size.
86910 2010-12-25  Bruno Haible  <bruno@clisp.org>
86912         rename, renameat: Avoid test failures at NFS mounted locations.
86913         * tests/test-rename.h (assert_nonexistent): Remove the old directory,
86914         so that subsequent mkdir calls succeed.
86916 2010-12-25  Bruno Haible  <bruno@clisp.org>
86918         iswblank: Fix C++ link error on Solaris 8.
86919         * lib/wctype.in.h (iswblank): Declare using _GL_FUNCDECL_RPL or
86920         _GL_FUNCDECL_SYS.
86922 2010-12-25  Bruno Haible  <bruno@clisp.org>
86924         unistd: Fix C++ link error on Solaris 8.
86925         * modules/unistd-c++-tests (test_unistd_c___LDADD): Add $(LIB_EACCESS).
86927 2010-12-25  Bruno Haible  <bruno@clisp.org>
86929         readlink doc: Mention an old glibc bug.
86930         * doc/posix-functions/readlink.texi: Mention glibc 2.4 bug (BZ #2450).
86932 2010-12-25  Bruno Haible  <bruno@clisp.org>
86934         fcntl-h: Fix for use of C++ on glibc systems.
86935         * lib/fcntl.in.h: Include <sys/stat.h> before include_next <fcntl.h>
86936         also on glibc systems in C++ mode.
86937         Reported by Gary V. Vaughan <gary@gnu.org>.
86939 2010-12-25  Bruno Haible  <bruno@clisp.org>
86941         roundl-ieee: Make it work on OSF/1 5.1 with cc.
86942         * modules/roundl-ieee (Depends-on): Add floorl-ieee, ceill-ieee.
86944 2010-12-25  Bruno Haible  <bruno@clisp.org>
86946         truncl-ieee: Make it work on OSF/1 5.1 with cc.
86947         * doc/posix-functions/truncl.texi: Mention the OSF/1 5.1 bug.
86948         * m4/truncl.m4 (gl_FUNC_TRUNCL): If gl_FUNC_TRUNCL_IEEE is also used,
86949         test whether truncl works according to ISO C 99 with IEC 60559.
86950         * m4/truncl-ieee.m4: New file.
86951         * modules/truncl-ieee (Files): Add it and m4/minus-zero.m4,
86952         m4/signbit.m4.
86953         (configure.ac): Invoke gl_FUNC_TRUNCL_IEEE.
86955 2010-12-25  Bruno Haible  <bruno@clisp.org>
86957         ceill-ieee: Make it work on OSF/1 5.1 with cc.
86958         * doc/posix-functions/ceill.texi: Mention the OSF/1 5.1 bug.
86959         * m4/ceill.m4 (gl_FUNC_CEILL): If gl_FUNC_CEILL_IEEE is also used,
86960         test whether ceill works according to ISO C 99 with IEC 60559.
86961         * m4/ceill-ieee.m4: New file.
86962         * modules/ceill-ieee (Files): Add it and m4/minus-zero.m4,
86963         m4/signbit.m4.
86964         (configure.ac): Invoke gl_FUNC_CEILL_IEEE.
86966 2010-12-25  Bruno Haible  <bruno@clisp.org>
86968         Ensure all prerequisites of <wchar.h> are included.
86969         * m4/btowc.m4 (gl_FUNC_BTOWC): Include <stddef.h>, <stdio.h>, <time.h>
86970         before <wchar.h>.
86971         * m4/mbrlen.m4 (gl_MBRLEN_INCOMPLETE_STATE, gl_MBRLEN_RETVAL,
86972         gl_MBRLEN_NUL_RETVAL): Likewise.
86973         * m4/mbrtowc.m4 (gl_MBRTOWC_INCOMPLETE_STATE, gl_MBRTOWC_SANITYCHECK,
86974         gl_MBRTOWC_NULL_ARG, gl_MBRTOWC_RETVAL, gl_MBRTOWC_NUL_RETVAL,
86975         AC_FUNC_MBRTOWC): Likewise.
86976         * m4/mbsrtowcs.m4 (gl_MBSRTOWCS_WORKS): Likewise.
86977         * m4/mbstate_t.m4 (AC_TYPE_MBSTATE_T): Likewise.
86978         * m4/wcrtomb.m4 (gl_FUNC_WCRTOMB): Likewise.
86979         * m4/wcsrtombs.m4 (gl_WCSRTOMBS_TERMINATION, gl_WCSRTOMBS_NULL):
86980         Likewise.
86981         * m4/wctob.m4 (gl_FUNC_WCTOB): Likewise.
86982         * m4/wchar_h.m4 (gl_WCHAR_H_INLINE_OK): Likewise.
86983         (gl_WCHAR_H): Improve comments.
86984         * m4/wctype_h.m4 (gl_WCTYPE_H): Likewise.
86986 2010-12-25  Bruno Haible  <bruno@clisp.org>
86988         strtok_r: Fix C syntax error in autoconf macro.
86989         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Don't use UTF-8 encoded U+00A0
86990         characters in test program.
86992 2010-12-24  Bruno Haible  <bruno@clisp.org>
86994         ceil, trunc, round: Fix gcc warnings.
86995         * lib/ceil.c (MIN): Undefine before redefining.
86996         * lib/trunc.c (MIN): Likewise.
86997         * lib/round.c (MIN): Likewise.
86998         Include <math.h> first.
87000 2010-12-24  Bruno Haible  <bruno@clisp.org>
87002         select tests: Avoid failures on OSF/1 5.1.
87003         * tests/test-select.c (test_accept_first, test_socket_pair): Ignore
87004         failure of closing the last socket; it may fail with ECONNRESET.
87006 2010-12-24  Eric Blake  <eblake@redhat.com>
87008         stdint: avoid HP-UX 10.20 preprocessor bug
87009         * lib/stdint.in.h (INT64_MAX, UINT64_MAX): Check via #ifdef rather
87010         than #if.
87011         * tests/test-floor2.c (main): Likewise.
87012         Reported by Peter O'Gorman.
87014         pipe: make obsoletion transition easier
87015         * lib/pipe.h: Restore file as thin shim around "spawn-pipe.h".
87016         * modules/pipe (Files): Include revived file.
87017         (Include): Drop reference, to mirror getdate's behavior.
87019 2010-12-24  Bruno Haible  <bruno@clisp.org>
87021         sys_socket: Hide mismatch of declarations on NonStop Kernel.
87022         * lib/sys_socket.in.h (connect, bind, sendto, setsockopt): Use
87023         _GL_CXXALIAS_SYS_CAST instead of _GL_CXXALIAS_SYS.
87024         Reported by Joachim Schmitz <jojo@schmitz-digital.de>.
87026 2010-12-24  Bruno Haible  <bruno@clisp.org>
87028         gethostname: Ensure declaration on NonStop Kernel.
87029         * lib/unistd.in.h: Include <netdb.h> also on NonStop Kernel systems.
87030         Reported by Joachim Schmitz <jojo@schmitz-digital.de>.
87032 2010-12-24  Bruno Haible  <bruno@clisp.org>
87034         sys_select: Ensure all necessary types on NonStop Kernel.
87035         * lib/sys_select.in.h: If the system does not have <sys/select.h>,
87036         include <sys/time.h>.
87037         * doc/posix-headers/sys_select.texi: Mention that it's missing on
87038         NonStop Kernel.
87039         Reported by Joachim Schmitz <jojo@schmitz-digital.de>.
87041 2010-12-24  Bruno Haible  <bruno@clisp.org>
87043         sys_select: Remove unneeded include.
87044         * lib/sys_select.in.h: Don't include <sys/socket.h> on platforms that
87045         have <sys/select.h>.
87047 2010-12-24  Bruno Haible  <bruno@clisp.org>
87049         gethostname: Provide a fallback for HOST_NAME_MAX.
87050         * m4/gethostname.m4 (gl_FUNC_GETHOSTNAME): When neither HOST_NAME_MAX
87051         nor MAXHOSTNAMELEN is found in the usual system headers, use 256
87052         instead.
87053         Reported by Joachim Schmitz <jojo@schmitz-digital.de>.
87055 2010-12-24  Bruno Haible  <bruno@clisp.org>
87057         sigaction tests: Allow missing SA_RESETHAND and SA_RESTART.
87058         * tests/test-sigaction.c (SA_RESETHAND): Fall back to 0.
87059         (SA_RESTART): Likewise.
87060         Reported by Joachim Schmitz <jojo@schmitz-digital.de>.
87062 2010-12-24  Bruno Haible  <bruno@clisp.org>
87064         signal: Define NSIG.
87065         * lib/signal.in.h (NSIG): Define to 32 on NonStop Kernel.
87066         * tests/test-signal.c (nsig): New variable.
87067         Reported by Joachim Schmitz <jojo@schmitz-digital.de>.
87069 2010-12-24  Bruno Haible  <bruno@clisp.org>
87071         rename, renameat: Avoid test failures on OSF/1 5.1.
87072         * tests/test-rename.h (test_rename): Allow EEXIST and ENOTDIR as
87073         alternative error codes.
87074         * tests/test-renameat.c (main): Likewise.
87076 2010-12-24  Bruno Haible  <bruno@clisp.org>
87078         *printf: Detect large precisions bug on Solaris 10/SPARC.
87079         * m4/printf.m4 (gl_PRINTF_PRECISION): Add one more test code, provided
87080         by Paul Eggert.
87081         * tests/test-snprintf-posix.h (test_function): Add this test code here
87082         too.
87083         * tests/test-sprintf-posix.h (test_function): Likewise.
87084         * tests/test-vasnprintf-posix.c (test_function): Likewise.
87085         * tests/test-vasprintf-posix.c (test_function): Likewise.
87086         * doc/posix-functions/fprintf.texi: Mention Solaris 10 bug as worked
87087         around by gnulib.
87088         * doc/posix-functions/printf.texi: Likewise.
87089         * doc/posix-functions/snprintf.texi: Likewise.
87090         * doc/posix-functions/sprintf.texi: Likewise.
87091         * doc/posix-functions/vfprintf.texi: Likewise.
87092         * doc/posix-functions/vprintf.texi: Likewise.
87093         * doc/posix-functions/vsnprintf.texi: Likewise.
87094         * doc/posix-functions/vsprintf.texi: Likewise.
87095         * doc/posix-functions/dprintf.texi: Undo last commit.
87096         * doc/posix-functions/vdprintf.texi: Likewise.
87098 2010-12-23  Paul Eggert  <eggert@cs.ucla.edu>
87100         tests: port test-fdutimensat.c to Solaris 8
87101         * tests/test-fdutimensat.c (do_fdutimens): Don't assume
87102         fdutimensat works with a nonnegative fd and AT_SYMLINK_NOFOLLOW.
87103         On Solaris 8, it fails with errno == ENOSYS, because there is no
87104         futimens (so it can't use the fd), and there is no lutimens (so it
87105         can't implement AT_SYMLINK_NOFOLLOW on symlinks).
87107         vsnprintf: make more consistent with snprintf; doc fixes
87109         * doc/posix-functions/snprintf.texi (snprintf): The workaround for
87110         the byte count return problem was promoted from the snprintf-posix
87111         to the snprintf module.
87112         * doc/posix-functions/vsnprintf.texi (vsnprintf): Likewise.
87113         * m4/vsnprintf.m4 (gl_FUNC_VSNPRINTF): Also check
87114         gl_SNPRINTF_RETVAL_C99, for consistency with gl_FUNC_SNPRINTF.
87115         * tests/test-snprintf.c (main): Check the byte count returned.
87116         * tests/test-vsnprintf.c (main): Likewise.
87118 2010-12-23  Eric Blake  <eblake@redhat.com>
87120         sigpipe: relax to LGPLv2+, since it did not have any LGPLv3+ parts
87121         * modules/sigpipe (License): Relax license.
87123 2010-12-22  Paul Eggert  <eggert@cs.ucla.edu>
87125         doc: document Solaris printf bug with large float precisions
87126         * doc/posix-functions/dprintf.texi (dprintf):
87127         * doc/posix-functions/fprintf.texi (fprintf):
87128         * doc/posix-functions/printf.texi (printf):
87129         * doc/posix-functions/snprintf.texi (snprintf):
87130         * doc/posix-functions/sprintf.texi (sprintf):
87131         * doc/posix-functions/vdprintf.texi (vdprintf):
87132         * doc/posix-functions/vfprintf.texi (vfprintf):
87133         * doc/posix-functions/vprintf.texi (vprintf):
87134         * doc/posix-functions/vsnprintf.texi (vsnprintf):
87135         * doc/posix-functions/vsprintf.texi (vsprintf):
87136         Mention that these functions mishandle large floating point
87137         precisions on Solaris 10.  The same bug is also present in Solaris
87138         8, and I assume earlier.  This causes "cd gnulib-tests; make
87139         check" to fail on Solaris 8 (and I assume, later) when building
87140         the latest coreutils, in test-vasprintf-posix's call to
87141         my_asprintf (&result, "%.4000f %d", 1.0, 99).  I have not checked
87142         the wide flavors (e.g., wprintf) so this patch just updates the
87143         documentation for the narrow ones.
87145         test-posixtm.c: add two tests
87146         * tests/test-posixtm.c: Add two tests, to highlight the
87147         bug in Solaris 10 (and earlier) localtime.  Gnulib doesn't work
87148         around this bug; this is merely to document it.
87150 2010-12-22  Bruno Haible  <bruno@clisp.org>
87152         getlogin_r: Work around portability problem on OSF/1.
87153         * m4/getlogin_r.m4 (gl_FUNC_GETLOGIN_R): Detect the OSF/1 problem.
87154         * lib/unistd.in.h (getlogin_r): Replace if REPLACE_GETLOGIN_R is set.
87155         * lib/getlogin_r.c (getlogin_r): When getlogin_r exists, invoke it and
87156         test for a truncated result.
87157         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize REPLACE_GETLOGIN_R.
87158         * modules/unistd (Makefile.am): Substitute REPLACE_GETLOGIN_R.
87159         * modules/getlogin_r (Depends-on): Add memchr.
87160         * doc/posix-functions/getlogin_r.texi: Mention the OSF/1 problem.
87162 2010-12-22  Bruno Haible  <bruno@clisp.org>
87164         ptsname: Avoid test failure on OSF/1 5.1.
87165         * modules/ptsname-tests (Depends-on): Add 'same-inode'.
87166         * tests/test-ptsname.c: Include <sys/stat.h>, same-inode.h.
87167         (same_slave): New function.
87168         (main): Use it to compare ptsname's result with the expected file name.
87170 2010-12-22  Bruno Haible  <bruno@clisp.org>
87172         Port extended stdio modules to HP NonStop Kernel.
87173         * lib/stdio-impl.h (_IOERR, _IOREAD, _IOWRT, _IORW) [__TANDEM]: New
87174         macros.
87175         * lib/fbufmode.c: Update comments.
87176         * lib/fflush.c: Likewise.
87177         * lib/fpurge.c: Likewise.
87178         * lib/freadable.c: Likewise.
87179         * lib/freadahead.c: Likewise.
87180         * lib/freading.c: Likewise.
87181         * lib/freadptr.c: Likewise.
87182         * lib/freadseek.c: Likewise.
87183         * lib/fseeko.c: Likewise.
87184         * lib/fseterr.c: Likewise.
87185         * lib/fwritable.c: Likewise.
87186         * lib/fwriting.c: Likewise.
87187         Reported by Joachim Schmitz <jojo@schmitz-digital.de>.
87189 2010-12-22  Bruno Haible  <bruno@clisp.org>
87191         ttyname_r: Work around bug on OSF/1 5.1.
87192         * doc/posix-functions/ttyname_r.texi: Mention the OSF/1 bug.
87193         * m4/ttyname_r.m4 (gl_FUNC_TTYNAME_R): Detect the OSF/1 bug. Say "no"
87194         instead of "guessing no" when the OSF/1 bug or the Solaris bug is
87195         present.
87196         * lib/ttyname_r.c (ttyname_r): Update comments.
87198 2010-12-22  Bruno Haible  <bruno@clisp.org>
87200         round: Implement result sign according to IEEE 754.
87201         * lib/round.c (MIN, MINUS_ZERO): New macros.
87202         (FLOOR_FREE_ROUND): Return -0.0 for -0.5 < x < 0.
87203         * tests/test-roundf-ieee.c (main): Test also values between -1 and 1.
87204         * tests/test-round-ieee.c (main): Likewise.
87205         * tests/test-roundl-ieee.c (main): Likewise.
87207         trunc: Implement result sign according to IEEE 754.
87208         * lib/trunc.c (MIN, MINUS_ZERO): New macros.
87209         (FUNC): Return +0.0 for 0 < x < 1 and -0.0 for -1 < x < 0.
87210         * tests/test-trunc2.c: Include minus-zero.h.
87211         (MINUS_ZERO): New macro.
87212         (trunc_reference): Keep in sync with lib/trunc.c.
87213         * tests/test-truncf2.c: Include minus-zero.h.
87214         (MINUS_ZERO): New macro.
87215         (truncf_reference): Keep in sync with lib/trunc.c.
87216         * tests/test-truncf-ieee.c (main): Test also values between -1 and 1.
87217         * tests/test-trunc-ieee.c (main): Likewise.
87218         * tests/test-truncl-ieee.c (main): Likewise.
87220         ceil: Implement result sign according to IEEE 754.
87221         * lib/ceil.c (MIN, MINUS_ZERO): New macros.
87222         (FUNC): Return -0.0 for -1 < x < 0.
87223         * tests/test-ceil2.c: Include minus-zero.h.
87224         (MINUS_ZERO): New macro.
87225         (ceil_reference): Keep in sync with lib/ceil.c.
87226         * tests/test-ceilf2.c: Include minus-zero.h.
87227         (MINUS_ZERO): New macro.
87228         (ceilf_reference): Keep in sync with lib/ceil.c.
87229         * tests/test-ceilf-ieee.c (main): Test also values between -1 and 1.
87230         * tests/test-ceil-ieee.c (main): Likewise.
87231         * tests/test-ceill-ieee.c (main): Likewise.
87233         floor: Implement result sign according to IEEE 754.
87234         * lib/floor.c (FUNC): Return +0.0 for 0 < x < 1.
87235         * tests/test-floor2.c (floor_reference): Keep in sync with lib/floor.c.
87236         * tests/test-floorf2.c (floorf_reference): Likewise.
87237         * tests/test-floorf-ieee.c (main): Test also values between -1 and 1.
87238         * tests/test-floor-ieee.c (main): Likewise.
87239         * tests/test-floorl-ieee.c (main): Likewise.
87241 2010-12-22  Bruno Haible  <bruno@clisp.org>
87243         getaddrinfo: Update doc.
87244         * doc/posix-functions/gai_strerror.texi: Return type is also different
87245         on AIX and HP-UX.
87247 2010-12-22  Paul Eggert  <eggert@cs.ucla.edu>
87249         getaddrinfo, inet_ntop: Update doc for Solaris.
87250         * doc/posix-functions/gai_strerror.texi: Return type is also an
87251         issue on Solaris 9 and earlier.
87252         * doc/posix-functions/inet_ntop.texi: 4th arg type is also an issue
87253         on Solaris 10 and earlier.
87255 2010-12-21  Bruno Haible  <bruno@clisp.org>
87257         New module 'roundl-ieee'.
87258         * modules/roundl-ieee: New file.
87259         * m4/roundl.m4 (gl_FUNC_ROUNDL): If gl_FUNC_ROUNDL_IEEE is also used,
87260         test whether roundl works according to ISO C 99 with IEC 60559.
87261         * m4/roundl-ieee.m4: New file.
87262         * modules/roundl-ieee-tests: New file.
87263         * tests/test-roundl-ieee.c: New file, based on tests/test-roundl.c.
87264         * tests/test-roundl.c (main): Remove signbit tests.
87265         * modules/roundl-tests (Depends-on): Remove signbit.
87266         * doc/posix-functions/roundl.texi: Mention the new module.
87268 2010-12-21  Bruno Haible  <bruno@clisp.org>
87270         New module 'truncl-ieee'.
87271         * modules/truncl-ieee: New file.
87272         * modules/truncl-ieee-tests: New file.
87273         * tests/test-truncl-ieee.c: New file, based on tests/test-truncl.c.
87274         * tests/test-truncl.c (main): Remove signbit tests.
87275         * modules/truncl-tests (Depends-on): Remove signbit.
87276         * doc/posix-functions/truncl.texi: Mention the new module.
87278 2010-12-21  Bruno Haible  <bruno@clisp.org>
87280         New module 'ceill-ieee'.
87281         * modules/ceill-ieee: New file.
87282         * modules/ceill-ieee-tests: New file.
87283         * tests/test-ceill-ieee.c: New file, based on tests/test-ceill.c.
87284         * tests/test-ceill.c (main): Remove signbit tests.
87285         * modules/ceill-tests (Depends-on): Remove signbit.
87286         * doc/posix-functions/ceill.texi: Mention the new module.
87288 2010-12-21  Bruno Haible  <bruno@clisp.org>
87290         New module 'floorl-ieee'.
87291         * modules/floorl-ieee: New file.
87292         * modules/floorl-ieee-tests: New file.
87293         * tests/test-floorl-ieee.c: New file, based on tests/test-floorl.c.
87294         * tests/test-floorl.c (main): Remove signbit tests.
87295         * modules/floorl-tests (Depends-on): Remove signbit.
87296         * doc/posix-functions/floorl.texi: Mention the new module.
87298 2010-12-21  Bruno Haible  <bruno@clisp.org>
87300         New module 'round-ieee'.
87301         * modules/round-ieee: New file.
87302         * m4/round.m4 (gl_FUNC_ROUND): If gl_FUNC_ROUND_IEEE is also used, test
87303         whether round works according to ISO C 99 with IEC 60559.
87304         * m4/round-ieee.m4: New file.
87305         * modules/round-ieee-tests: New file.
87306         * tests/test-round-ieee.c: New file, based on tests/test-roundf-ieee.c.
87307         * tests/test-round1.c (main): Remove signbit tests.
87308         * modules/round-tests (Depends-on): Remove 'signbit'.
87309         * doc/posix-functions/round.texi: Mention the new module.
87311 2010-12-21  Bruno Haible  <bruno@clisp.org>
87313         New module 'trunc-ieee'.
87314         * modules/trunc-ieee: New file.
87315         * m4/trunc.m4 (gl_FUNC_TRUNC): If gl_FUNC_TRUNC_IEEE is also used, test
87316         whether trunc works according to ISO C 99 with IEC 60559.
87317         * m4/trunc-ieee.m4: New file.
87318         * lib/math.in.h (trunc): Replace if REPLACE_TRUNC is set.
87319         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_TRUNC.
87320         * modules/math (Makefile.am): Substitute REPLACE_TRUNC.
87321         * modules/trunc-ieee-tests: New file.
87322         * tests/test-trunc-ieee.c: New file, based on tests/test-truncf-ieee.c.
87323         * tests/test-trunc1.c (main): Remove signbit tests.
87324         * modules/trunc-tests (Depends-on): Remove 'signbit'.
87325         * doc/posix-functions/trunc.texi: Mention the new module.
87327 2010-12-21  Bruno Haible  <bruno@clisp.org>
87329         New module 'ceil-ieee'.
87330         * modules/ceil-ieee: New file.
87331         * m4/ceil.m4 (gl_FUNC_CEIL): Require gl_MATH_H_DEFAULTS. If
87332         gl_FUNC_CEIL_IEEE is also used, test whether ceil works according to
87333         ISO C 99 with IEC 60559.
87334         * m4/ceil-ieee.m4: New file.
87335         * modules/ceil (Files): Add lib/ceil.c.
87336         (Depends-on): Add 'float'.
87337         (configure.ac): Invoke gl_MATH_MODULE_INDICATOR.
87338         * lib/math.in.h (ceil): New declaration.
87339         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_CEIL,
87340         REPLACE_CEIL.
87341         * modules/math (Makefile.am): Substitute GNULIB_CEIL, REPLACE_CEIL.
87342         * modules/ceil-ieee-tests: New file.
87343         * tests/test-ceil-ieee.c: New file, based on tests/test-ceilf-ieee.c.
87344         * tests/test-math-c++.cc: Check the signature of 'ceil'.
87345         * doc/posix-functions/ceil.texi: Mention the new module.
87347 2010-12-21  Bruno Haible  <bruno@clisp.org>
87349         New module 'floor-ieee'.
87350         * modules/floor-ieee: New file.
87351         * m4/floor.m4 (gl_FUNC_FLOOR): Require gl_MATH_H_DEFAULTS. If
87352         gl_FUNC_FLOOR_IEEE is also used, test whether floor works according to
87353         ISO C 99 with IEC 60559.
87354         * m4/floor-ieee.m4: New file.
87355         * modules/floor (Files): Add lib/floor.c.
87356         (Depends-on): Add 'float'.
87357         (configure.ac): Invoke gl_MATH_MODULE_INDICATOR.
87358         * lib/math.in.h (floor): New declaration.
87359         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_FLOOR,
87360         REPLACE_FLOOR.
87361         * modules/math (Makefile.am): Substitute GNULIB_FLOOR, REPLACE_FLOOR.
87362         * modules/floor-ieee-tests: New file.
87363         * tests/test-floor-ieee.c: New file, based on tests/test-floorf-ieee.c.
87364         * tests/test-math-c++.cc: Check the signature of 'floor'.
87365         * doc/posix-functions/floor.texi: Mention the new module.
87367 2010-12-21  Bruno Haible  <bruno@clisp.org>
87369         New module 'roundf-ieee'.
87370         * modules/roundf-ieee: New file.
87371         * m4/roundf.m4 (gl_FUNC_ROUNDF): If gl_FUNC_ROUNDF_IEEE is also used,
87372         test whether roundf works according to ISO C 99 with IEC 60559.
87373         * m4/roundf-ieee.m4: New file.
87374         * modules/roundf-ieee-tests: New file.
87375         * tests/test-roundf-ieee.c: New file, based on tests/test-roundf1.c.
87376         * tests/test-roundf1.c (main): Remove signbit tests.
87377         * modules/roundf-tests (Depends-on): Remove 'signbit'.
87378         * doc/posix-functions/roundf.texi: Mention the new module.
87380 2010-12-21  Bruno Haible  <bruno@clisp.org>
87382         New module 'truncf-ieee'.
87383         * modules/truncf-ieee: New file.
87384         * m4/truncf.m4 (gl_FUNC_TRUNCF): If gl_FUNC_TRUNCF_IEEE is also used,
87385         test whether truncf works according to ISO C 99 with IEC 60559.
87386         * m4/truncf-ieee.m4: New file.
87387         * lib/math.in.h (truncf): Replace if REPLACE_TRUNCF is set.
87388         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_TRUNCF.
87389         * modules/math (Makefile.am): Substitute REPLACE_TRUNCF.
87390         * modules/truncf-ieee-tests: New file.
87391         * tests/test-truncf-ieee.c: New file, based on tests/test-truncf1.c.
87392         * tests/test-truncf1.c (main): Remove signbit tests.
87393         * modules/truncf-tests (Depends-on): Remove 'signbit'.
87394         * doc/posix-functions/truncf.texi: Mention the new module.
87396 2010-12-21  Bruno Haible  <bruno@clisp.org>
87398         New module 'ceilf-ieee'.
87399         * modules/ceilf-ieee: New file.
87400         * m4/ceilf.m4 (gl_FUNC_FLOORF): If gl_FUNC_CEILF_IEEE is also used,
87401         test whether ceilf works according to ISO C 99 with IEC 60559.
87402         * m4/ceilf-ieee.m4: New file.
87403         * modules/ceilf-ieee-tests: New file.
87404         * tests/test-ceilf-ieee.c: New file, based on tests/test-ceilf1.c.
87405         * tests/test-ceilf1.c (main): Remove signbit tests.
87406         * modules/ceilf-tests (Depends-on): Remove 'signbit'.
87407         * doc/posix-functions/ceilf.texi: Mention the new module.
87409 2010-12-21  Bruno Haible  <bruno@clisp.org>
87411         New module 'floorf-ieee'.
87412         * modules/floorf-ieee: New file.
87413         * m4/floorf.m4 (gl_FUNC_FLOORF): If gl_FUNC_FLOORF_IEEE is also used,
87414         test whether floorf works according to ISO C 99 with IEC 60559.
87415         * m4/floorf-ieee.m4: New file.
87416         * modules/floorf-ieee-tests: New file.
87417         * tests/test-floorf-ieee.c: New file, based on tests/test-floorf1.c.
87418         * tests/test-floorf1.c (main): Remove signbit tests.
87419         * modules/floorf-tests (Depends-on): Remove 'signbit'.
87420         * doc/posix-functions/floorf.texi: Mention the new module.
87422 2010-12-21  Bruno Haible  <bruno@clisp.org>
87424         Support for minus zero in autoconf macros.
87425         * m4/minus-zero.m4: New file, based on tests/minus-zero.h.
87426         * m4/signbit.m4 (gl_FLOAT_SIGNBIT_CODE, gl_DOUBLE_SIGNBIT_CODE,
87427         gl_LONG_DOUBLE_SIGNBIT_CODE, gl_FLOATTYPE_SIGNBIT_CODE): New macros.
87428         * tests/minus-zero.h: Update comments.
87430 2010-12-21  Bruno Haible  <bruno@clisp.org>
87432         Tests for module 'ceil'.
87433         * modules/ceil-tests: New file.
87434         * tests/test-ceil1.c: New file, based on tests/test-ceill.c.
87435         * tests/test-ceil2.c: New file, based on tests/test-ceilf2.c.
87437 2010-12-21  Bruno Haible  <bruno@clisp.org>
87439         Tests for module 'floor'.
87440         * modules/floor-tests: New file.
87441         * tests/test-floor1.c: New file, based on tests/test-floorl.c.
87442         * tests/test-floor2.c: New file, based on tests/test-floorf2.c.
87444 2010-12-21  Bruno Haible  <bruno@clisp.org>
87446         math: Fix indentation.
87447         * lib/math.in.h (floorf): Fix indentation.
87449 2010-12-21  Bruno Haible  <bruno@clisp.org>
87451         Fix cross-compilation guesses on Solaris.
87452         * m4/fopen.m4 (gl_FUNC_FOPEN): Correct shell pattern so that it does
87453         not match "solaris2.10".
87454         * m4/open.m4 (gl_FUNC_OPEN): Likewise.
87455         * m4/printf.m4 (gl_SNPRINTF_TRUNCATION_C99, gl_SNPRINTF_DIRECTIVE_N,
87456         gl_VSNPRINTF_ZEROSIZE_C99): Likewise.
87458 2010-12-21  Paul Eggert  <eggert@cs.ucla.edu>
87460         snprintf: port snprintf (NULL, 0, ...) to Solaris 8 and 9
87461         This fixes a problem observed with the latest coreutils snapshot
87462         that caused a test to fail on Solaris 8.  src/csplit.c's call
87463         snprintf (NULL, 0, format, UINT_MAX) returns -1 on Solaris 9 and
87464         earlier, instead of returning the number of bytes that would have
87465         been generated; this causes csplit to incorrectly report memory
87466         exhaustion.
87467         * m4/printf.m4 (gl_SNPRINTF_RETVAL_C99): Also check for
87468         snprintf (NULL, 0, ...) and (for good measure) snprintf (buf, 0, ...).
87469         Guess that it doesn't work on Solaris 2.6 through 9.  Adjust
87470         comments to match.
87471         (gl_PRINTF_SIZES_C99, gl_PRINTF_DIRECTIVE_F, gl_SNPRINTF_RETVAL_C99):
87472         Fix typo in matching older versions of Solaris: "solaris2.10"
87473         is matched by the shell pattern "solaris2.[0-9]*".  This matters
87474         only for guessing while cross-compiling.
87475         * m4/snprintf.m4 (gl_FUNC_SNPRINTF): Also check gl_SNPRINTF_RETVAL_C99.
87477 2010-12-20  Paul Eggert  <eggert@cs.ucla.edu>
87479         ftoastr: fix comment again
87480         * lib/ftoastr.h: Fix typo in comment.  Noted by Ben Pfaff in
87481         <http://lists.gnu.org/r/bug-gnulib/2010-12/msg00149.html>.
87482         Also, simplify example a bit by using flags = 0.
87484 2010-12-20  Bruno Haible  <bruno@clisp.org>
87486         round*, trunc*: Update documentation regarding glibc.
87487         * doc/posix-functions/roundf.texi: Mention missing declaration problem.
87488         * doc/posix-functions/round.texi: Likewise.
87489         * doc/posix-functions/roundl.texi: Likewise.
87490         * doc/posix-functions/truncf.texi: Likewise.
87491         * doc/posix-functions/trunc.texi: Likewise.
87492         * doc/posix-functions/truncl.texi: Likewise.
87494 2010-12-20  Bruno Haible  <bruno@clisp.org>
87496         roundf, round, roundl: Update documentation regarding OSF/1 5.1.
87497         * doc/posix-functions/roundf.texi: Mention OSF/1 5.1 problem.
87498         * doc/posix-functions/round.texi: Likewise.
87499         * doc/posix-functions/roundl.texi: Likewise.
87501 2010-12-20  Bruno Haible  <bruno@clisp.org>
87503         ttyname_r: Add missing declaration on HP-UX 11.
87504         * lib/unistd.in.h (ttyname_r): Test HAVE_DECL_TTYNAME_R instead of
87505         HAVE_TTYNAME_R.
87506         * m4/ttyname_r.m4 (gl_FUNC_TTYNAME_R): Test whether ttyname_r is
87507         declared. Set HAVE_TTYNAME_R always.
87508         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize
87509         HAVE_DECL_TTYNAME_R, not HAVE_TTYNAME_R.
87510         * modules/unistd (Makefile.am): Substitute HAVE_DECL_TTYNAME_R, not
87511         HAVE_TTYNAME_R.
87512         * doc/posix-functions/ttyname_r.texi: Document the HP-UX 11 problem.
87514 2010-12-20  Bruno Haible  <bruno@clisp.org>
87516         getlogin, getlogin_r: Document HP-UX 11.11 bugs.
87517         * doc/posix-functions/getlogin.texi: Document HP-UX 11.11 bug.
87518         * doc/posix-functions/getlogin_r.texi: Likewise.
87519         * tests/test-getlogin.c: Include <errno.h>.
87520         (main): Avoid test failure on HP-UX 11.11.
87521         * tests/test-getlogin_r.c (main): Likewise.
87523 2010-12-20  Bruno Haible  <bruno@clisp.org>
87525         getlogin_r: Add missing declaration on HP-UX 11.
87526         * m4/getlogin_r.m4 (gl_FUNC_GETLOGIN_R): Test whether getlogin_r is
87527         declared also when it exists as a function.
87528         * doc/posix-functions/getlogin_r.texi: Document this workaround.
87530 2010-12-20  Bruno Haible  <bruno@clisp.org>
87532         wcsrtombs: Don't confuse mbstate_t with rpl_mbstate_t.
87533         * lib/wcsrtombs.c: If gnulib overrides mbstate_t, define wcsrtombs
87534         through wcrtomb.
87536 2010-12-19  Paul Eggert  <eggert@cs.ucla.edu>
87538         ftoastr: fix comment
87539         * lib/ftoastr.h: Fix typo in comment.  Noted by Ben Pfaff in
87540         <http://lists.gnu.org/r/bug-gnulib/2010-12/msg00130.html>.
87542 2010-12-19  Bruno Haible  <bruno@clisp.org>
87544         isnan: Ensure it is a macro.
87545         * lib/math.in.h (isnan): Define as a macro if not already a macro.
87546         * doc/posix-functions/isnan.texi: Mention problem on IRIX, OSF/1,
87547         Solaris.
87549 2010-12-19  Bruno Haible  <bruno@clisp.org>
87551         ldexpl test: Fix link error on OSF/1 5.1.
87552         * modules/ldexpl-tests (Makefile.am): Define test_ldexpl_LDADD.
87554 2010-12-19  Bruno Haible  <bruno@clisp.org>
87556         wctype: Make it work in C++ mode on OSF/1 5.1.
87557         * lib/wctype.in.h (iswblank): Declare but not define here.
87558         * lib/iswblank.c: New file, extracted from lib/wctype.in.h.
87559         * m4/wctype_h.m4 (gl_WCTYPE_H): Arrange to compile it if needed.
87560         * modules/wctype (Files): Add lib/iswblank.c.
87562 2010-12-19  Bruno Haible  <bruno@clisp.org>
87564         signal: Document problem with type of SIGRTMIN, SIGRTMAX on OSF/1 5.1.
87565         * doc/posix-headers/signal.texi: Document OSF/1 5.1 problem.
87566         * lib/strsignal.c (strsignal): Cast SIGRTMIN to 'int'.
87568 2010-12-19  Bruno Haible  <bruno@clisp.org>
87570         sys_socket: Use POSIX compatible declarations on OSF/1 5.1.
87571         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): On OSF/1, define
87572         _POSIX_PII_SOCKET.
87573         * doc/posix-functions/recv.texi: Document the OSF/1 problem.
87574         * doc/posix-functions/recvfrom.texi: Likewise.
87575         * doc/posix-functions/send.texi: Likewise.
87576         * doc/posix-functions/sendto.texi: Likewise.
87578 2010-12-19  Bruno Haible  <bruno@clisp.org>
87580         tcgetsid: Add missing declaration on OSF/1 5.1.
87581         * lib/termios.in.h (tcgetsid): Test HAVE_DECL_TCGETSID instead of
87582         HAVE_TCGETSID.
87583         * m4/tcgetsid.m4 (gl_FUNC_TCGETSID): Test whether tcgetsid is declared.
87584         Don't set HAVE_TCGETSID.
87585         * m4/termios_h.m4 (gl_TERMIOS_H_DEFAULTS): Initialize
87586         HAVE_DECL_TCGETSID, not HAVE_TCGETSID.
87587         * modules/termios (Makefile.am): Substitute HAVE_DECL_TCGETSID, not
87588         HAVE_TCGETSID.
87589         * doc/posix-functions/tcgetsid.texi: Mention the OSF/1 5.1 problem.
87591 2010-12-19  Bruno Haible  <bruno@clisp.org>
87593         stdio: Fix problem with popen() declaration on OSF/1 5.1.
87594         * lib/stdio.in.h: During the include_next statement, let recursive
87595         includes of this file include only the system header file.
87597 2010-12-19  Bruno Haible  <bruno@clisp.org>
87599         iconv_open: Fix regression from 2010-12-04.
87600         * m4/iconv_open.m4 (gl_FUNC_ICONV_OPEN_UTF): Fix typo.
87601         Reported by Noah Lavine <noah.b.lavine@gmail.com>.
87603 2010-12-19  Bruno Haible  <bruno@clisp.org>
87605         stdbool test: Avoid a gcc warning.
87606         * tests/test-stdbool.c (main): Fail if e1 is false.
87607         Reported by Jim Meyering.
87609 2010-12-19  Jim Meyering  <meyering@redhat.com>
87611         setenv: restore to working order
87612         $HAVE_SETENV is used in gl_FUNC_SETENV, yet its definitions were
87613         mistakenly removed.
87614         * m4/setenv.m4 (gl_FUNC_SETENV_SEPARATE): Restore code to set
87615         HAVE_SETENV.
87616         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Restore code to initialize
87617         HAVE_SETENV.
87619 2010-12-19  Bruno Haible  <bruno@clisp.org>
87621         Document some different function declarations on OSF/1 5.1.
87622         * doc/posix-functions/gai_strerror.texi: Mention different declaration.
87623         * doc/posix-functions/inet_ntop.texi: Likewise.
87624         * doc/posix-functions/gethostname.texi: Likewise.
87625         * lib/unistd.in.h (gethostname): Update comment.
87627 2010-12-19  Bruno Haible  <bruno@clisp.org>
87629         doc: Mention vasprintf-posix module.
87630         * doc/glibc-functions/asprintf.texi: Mention the workarounds present in
87631         the 'vasprintf-posix' module.
87632         * doc/glibc-functions/vasprintf.texi: Likewise.
87634 2010-12-19  Bruno Haible  <bruno@clisp.org>
87636         unsetenv: Add missing declaration on OSF/1 5.1.
87637         * lib/stdlib.in.h (setenv): Test HAVE_DECL_UNSETENV, not HAVE_UNSETENV.
87638         * m4/setenv.m4 (gl_FUNC_UNSETENV): Test whether unsetenv is declared.
87639         Don't set HAVE_UNSETENV. In the test program, set _BSD.
87640         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize HAVE_DECL_UNSETENV,
87641         not HAVE_UNSETENV.
87642         * modules/stdlib (Makefile.am): Substitute HAVE_DECL_UNSETENV, not
87643         HAVE_UNSETENV.
87644         * doc/posix-functions/unsetenv.texi: Mention the OSF/1 5.1 problem.
87646 2010-12-19  Bruno Haible  <bruno@clisp.org>
87648         setenv: Add missing declaration on OSF/1 5.1.
87649         * lib/stdlib.in.h (setenv): Test HAVE_DECL_SETENV, not HAVE_SETENV.
87650         * m4/setenv.m4 (gl_FUNC_SETENV_SEPARATE): Test whether setenv is
87651         declared. Don't set HAVE_SETENV.
87652         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize HAVE_DECL_SETENV,
87653         not HAVE_SETENV.
87654         * modules/stdlib (Makefile.am): Substitute HAVE_DECL_SETENV, not
87655         HAVE_SETENV.
87656         * doc/posix-functions/setenv.texi: Mention the OSF/1 5.1 problem.
87658 2010-12-19  Bruno Haible  <bruno@clisp.org>
87660         nl_langinfo tests: Avoid gcc warning.
87661         * tests/test-nl_langinfo.c: Don't enable the GCC pragma for GCC 4.2.
87663 2010-12-19  Bruno Haible  <bruno@clisp.org>
87665         mknod: Avoid error in C++ mode on OSF/1 with GCC.
87666         * lib/sys_stat.in.h (mknod): Use _GL_CXXALIAS_SYS_CAST instead of
87667         _GL_CXXALIAS_SYS.
87669 2010-12-19  Bruno Haible  <bruno@clisp.org>
87671         stdbool: Relax test.
87672         * tests/test-stdbool.c (e): Don't require that casts from a variable's
87673         address to 'bool' work in static initializer, for compilers other than
87674         GCC.
87676 2010-12-19  Bruno Haible  <bruno@clisp.org>
87678         ftello: Add missing declaration on OSF/1 5.1.
87679         * lib/stdio.in.h (ftello): Test HAVE_DECL_FTELLO, not HAVE_FTELLO.
87680         * m4/ftello.m4 (gl_FUNC_FTELLO): Test whether ftello is declared.
87681         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Initialize HAVE_DECL_FTELLO.
87682         * modules/stdio (Makefile.am): Substitute HAVE_DECL_FTELLO.
87683         * doc/posix-functions/ftello.texi: Mention the OSF/1 5.1 problem.
87685 2010-12-19  Bruno Haible  <bruno@clisp.org>
87687         fseeko: Add missing declaration on OSF/1 5.1.
87688         * lib/stdio.in.h (fseeko): Test HAVE_DECL_FSEEKO, not HAVE_FSEEKO.
87689         * m4/fseeko.m4 (gl_FUNC_FSEEKO): Test whether fseeko is declared.
87690         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Initialize HAVE_DECL_FSEEKO.
87691         * modules/stdio (Makefile.am): Substitute HAVE_DECL_FSEEKO.
87692         * doc/posix-functions/fseeko.texi: Mention the OSF/1 5.1 problem.
87694 2010-12-19  Bruno Haible  <bruno@clisp.org>
87696         fchdir: Add missing declaration on OSF/1 5.1.
87697         * lib/unistd.in.h (fchdir): Provide declaration if systems lacks it.
87698         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Check whether fchdir is declared.
87699         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize HAVE_DECL_FCHDIR.
87700         * modules/unistd (Makefile.am): Substitute HAVE_DECL_FCHDIR.
87701         * doc/posix-functions/fchdir.texi: Mention the OSF/1 5.1 problem.
87703 2010-12-19  Bruno Haible  <bruno@clisp.org>
87705         relocatable-prog-wrapper: Separate from relocatable-prog.
87706         * modules/relocatable-prog (Makefile.am): Define uninstall-hook and
87707         uninstall-relocwrapper rule here.
87708         * modules/relocatable-prog-wrapper (Makefile.am): ... not here.
87709         Reported by Ian Beckwith <ianb@erislabs.net>.
87711 2010-12-19  Bruno Haible  <bruno@clisp.org>
87713         unistr/u8-mbsnlen: Add missing dependency.
87714         * modules/unistr/u8-mbsnlen (Depends-on): Add unistr/u8-mbtouc.
87715         Reported by Ian Beckwith <ianb@erislabs.net>.
87717 2010-12-19  Bruno Haible  <bruno@clisp.org>
87719         iconv: Make it possible again to use this module without 'iconv-h'.
87720         * modules/iconv (configure.ac): Don't invoke gl_ICONV_MODULE_INDICATOR
87721         if it is not defined.
87722         Reported by Ian Beckwith <ianb@erislabs.net>.
87724 2010-12-18  Paul Eggert  <eggert@cs.ucla.edu>
87726         acl: port to Solaris 8 when copying from tmpfs to ufs
87727         * lib/copy-acl.c (qcopy_acl): Also allow EINVAL as an ignorable
87728         error number.  Problem observed on Solaris 8 with latest
87729         coreutils, with "mv A B", where A is on a tmpfs file system and B
87730         is on a ufs file system.  This caused coreutils' mv/part-symlink
87731         test to fail.
87733         tests: set fail=0 at start
87734         * tests/init.sh (setup_): Move fail=0 initialization here ...
87735         (mktempd_): ... from here, so that tests can rely on fail being
87736         set to 0 initially.  This fixes a problem in coreutils; see:
87737         http://lists.gnu.org/r/coreutils/2010-12/msg00083.html
87739 2010-12-18  Bruno Haible  <bruno@clisp.org>
87741         memmem-simple: Stylistic changes.
87742         * m4/memmem.m4 (gl_FUNC_MEMMEM_SIMPLE): Avoid possible gcc warning.
87743         Fix preprocessor directive indentation.
87745 2010-12-15  Pádraig Brady  <P@draigBrady.com>
87747         memmem, memmem-simple: reorganize and expand empty needle check
87748         * m4/memmem.m4 (gl_FUNC_MEMMEM_SIMPLE, gl_FUNC_MEMMEM): Move all
87749         functional checks to memmem-simple so that one has a fully functional
87750         memmem by using just this module.
87751         Restrict the performance only check to the memmem module.
87752         Also expand the empty needle check to ensure the correct
87753         pointer is returned, not just a non NULL pointer.
87754         * doc/glibc-functions/memmem.texi: Rearrange the portability
87755         documentation to correlate with the rearranged checks.
87756         Clarify exactly how the memmem and memmem-simple modules
87757         relate to each other.
87759 2010-12-15  Pádraig Brady  <P@draigBrady.com>
87760             Bruno Haible  <bruno@clisp.org>
87762         Improve cross-compilation guesses for uClibc.
87763         * m4/memmem.m4 (gl_FUNC_MEMMEM_SIMPLE): When cross-compiling, assume
87764         that uClibc does not have the glibc bug.
87765         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR_SIMPLE): Likewise.
87766         * m4/strstr.m4 (gl_FUNC_STRSTR_SIMPLE): Likewise.
87768 2010-12-14  Eric Blake  <eblake@redhat.com>
87770         configmake: provide fallbacks for oldest supported autotools
87771         * m4/configmake.m4: New file.
87772         * modules/configmake (Files): Ship it.
87773         (configure.ac): Use it to guarantee fallbacks.
87775 2010-12-13  Pádraig Brady  <P@draigBrady.com>
87777         read-file: Improve handling of large files
87778         * lib/read-file.c (fread_file): Minimize realloc()s
87779         for regular files, and better manage sizes around SIZE_MAX.
87781 2010-12-13  Eric Blake  <eblake@redhat.com>
87783         cloexec, fcntl: relax license
87784         * modules/cloexec (License): Change from LGPLv3+ to LGPLv2+, with
87785         consent from all contributors.
87786         * modules/fcntl (License): Likewise.
87788 2010-12-10  Bruno Haible  <bruno@clisp.org>
87790         Tests for module 'pipe-posix'.
87791         * modules/pipe-posix-tests: New file.
87792         * tests/test-pipe.c: New file, based on tests/test-pipe2.c.
87794 2010-12-10  Bruno Haible  <bruno@clisp.org>
87796         pipe-posix: Make it work in C++ mode.
87797         * lib/unistd.in.h: Don't include <io.h>, <fcntl.h> for pipe.
87798         (pipe): Use common idiom, not a macro definition.
87799         * lib/pipe.c: New file.
87800         * m4/pipe.m4: New file.
87801         * modules/pipe-posix (Description): Enhance.
87802         (Files): Add lib/pipe.c, m4/pipe.m4.
87803         (configure.ac): Invoke gl_FUNC_PIPE.
87804         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize HAVE_PIPE.
87805         * modules/unistd (Makefile.am): Substitute HAVE_PIPE.
87806         * tests/test-unistd-c++.cc: Check the signature of pipe.
87808 2010-12-10  Bruno Haible  <bruno@clisp.org>
87810         Rename module 'pipe' to 'spawn-pipe'.
87811         * modules/spawn-pipe: New file, renamed from modules/pipe.
87812         (Files, configure.ac, Makefile.am): Update.
87813         (Include): Mention "spawn-pipe.h" instead of "pipe.h".
87814         * modules/pipe: Reduce to an obsolete indirection to 'spawn-pipe'.
87815         * lib/spawn-pipe.h: New file, renamed from lib/pipe.h.
87816         * lib/spawn-pipe.c: New file, renamed from lib/pipe.c. Include
87817         "spawn-pipe.h" instead of "pipe.h".
87818         * m4/spawn-pipe.m4: New file, renamed from m4/pipe.m4. Rename gl_PIPE
87819         to gl_SPAWN_PIPE.
87820         * modules/spawn-pipe-tests: New file, renamed from modules/pipe-tests.
87821         (Files, Makefile.am): Update.
87822         * tests/test-spawn-pipe.sh: New file, renamed from tests/test-pipe.sh.
87823         Update.
87824         * tests/test-spawn-pipe.c: New file, renamed from tests/test-pipe.c.
87825         Include "spawn-pipe.h" instead of "pipe.h".
87826         * lib/csharpcomp.c: Include "spawn-pipe.h" instead of "pipe.h".
87827         * lib/javacomp.c: Likewise.
87828         * lib/javaversion.c: Likewise.
87829         * lib/pipe-filter-gi.c: Likewise.
87830         * lib/pipe-filter-ii.c: Likewise.
87831         * modules/csharpcomp (Depends-on): Add 'spawn-pipe', remove 'pipe'.
87832         * modules/javacomp (Depends-on): Likewise.
87833         * modules/javaversion (Depends-on): Likewise.
87834         * modules/pipe-filter-gi (Depends-on): Likewise.
87835         * modules/pipe-filter-ii (Depends-on): Likewise.
87836         * MODULES.html.sh (Executing programs): Update.
87837         * NEWS: Mention the change.
87839 2010-12-10  Eric Blake  <eblake@redhat.com>
87841         pipe-posix: new module
87842         * modules/pipe-posix: New file.
87843         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Set default.
87844         (gl_UNISTD_H): Check for declaration.
87845         * modules/unistd (Makefile.am): Substitute it.
87846         * lib/unistd.in.h (pipe): Provide it for mingw.
87847         * doc/posix-functions/pipe.texi (pipe): Update documentation.
87848         * MODULES.html.sh (File descriptor based Input/Output): Likewise.
87850 2010-12-07  Bruno Haible  <bruno@clisp.org>
87852         unistr/u8-strcmp: Avoid collision with libc function on Solaris 11.
87853         * lib/unistr.in.h (u8_strcmp) [__sun]: Declare with real name
87854         u8_strcmp_gnu.
87855         * modules/unistr/u8-strcmp (configure.ac): Bump version number.
87857 2010-12-06  Bruno Haible  <bruno@clisp.org>
87859         Update internal documentation.
87860         * m4/README: Document new idioms for AC_RUN_IFELSE invocations.
87862 2010-12-04  Bruno Haible  <bruno@clisp.org>
87864         Put more information about failed tests into the test return codes.
87865         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Change test
87866         program so that it returns an enumerated value (0, 1, 2, 3, 4, ...).
87867         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
87868         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
87869         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Likewise.
87870         * m4/getdelim.m4 (gl_FUNC_GETDELIM): Likewise.
87871         * m4/getline.m4 (gl_FUNC_GETLINE): Likewise.
87872         * m4/intdiv0.m4 (gt_INTDIV0): Likewise.
87873         * m4/isapipe.m4 (gl_PREREQ_ISAPIPE): Likewise.
87874         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
87875         * m4/posix_spawn.m4 (gl_POSIX_SPAWN_WORKS): Likewise.
87876         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
87877         * m4/sleep.m4 (gl_FUNC_SLEEP): Likewise.
87878         * m4/stdint.m4 (gl_STDINT_H): Likewise.
87879         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Change test program so that it
87880         returns a bit mask.
87881         * m4/canonicalize.m4 (gl_FUNC_REALPATH_WORKS): Likewise.
87882         * m4/chown.m4 (gl_FUNC_CHOWN_FOLLOWS_SYMLINK): Likewise.
87883         * m4/dup2.m4 (gl_FUNC_DUP2): Likewise.
87884         * m4/fcntl-o.m4 (gl_FCNTL_O_FLAGS): Likewise.
87885         * m4/fnmatch.m4 (gl_FUNC_FNMATCH_POSIX): Likewise.
87886         * m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Likewise.
87887         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Likewise.
87888         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Likewise.
87889         * m4/iconv.m4 (AM_ICONV_LINK): Likewise.
87890         * m4/iconv_open.m4 (gl_FUNC_ICONV_OPEN_UTF): Likewise.
87891         * m4/isfinite.m4 (gl_ISFINITEL_WORKS): Likewise.
87892         * m4/isnanf.m4 (gl_ISNANF_WORKS): Likewise.
87893         * m4/isnanl.m4 (gl_FUNC_ISNANL_WORKS): Likewise.
87894         * m4/ldexpl.m4 (gl_FUNC_LDEXPL_WORKS): Likewise.
87895         * m4/link.m4 (gl_FUNC_LINK): Likewise.
87896         * m4/linkat.m4 (gl_FUNC_LINKAT): Likewise.
87897         * m4/mbrlen.m4 (gl_MBRLEN_RETVAL): Likewise.
87898         * m4/mbrtowc.m4 (gl_MBRTOWC_RETVAL): Likewise.
87899         * m4/mbsrtowcs.m4 (gl_MBSRTOWCS_WORKS): Likewise.
87900         * m4/memchr.m4 (gl_FUNC_MEMCHR): Likewise.
87901         * m4/memmem.m4 (gl_FUNC_MEMMEM): Likewise.
87902         * m4/mkfifo.m4 (gl_FUNC_MKFIFO): Likewise.
87903         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Likewise.
87904         * m4/mktime.m4 (AC_FUNC_MKTIME): Likewise.
87905         * m4/open.m4 (gl_FUNC_OPEN): Likewise.
87906         * m4/poll.m4 (gl_FUNC_POLL): Likewise.
87907         * m4/popen.m4 (gl_FUNC_POPEN): Likewise.
87908         * m4/printf.m4 (gl_PRINTF_SIZES_C99, gl_PRINTF_LONG_DOUBLE,
87909         gl_PRINTF_INFINITE, gl_PRINTF_INFINITE_LONG_DOUBLE,
87910         gl_PRINTF_DIRECTIVE_A, gl_PRINTF_DIRECTIVE_F, gl_PRINTF_DIRECTIVE_LS,
87911         gl_PRINTF_PRECISION): Likewise.
87912         * m4/regex.m4 (gl_REGEX): Likewise.
87913         * m4/rename.m4 (gl_FUNC_RENAME): Likewise.
87914         * m4/rmdir.m4 (gl_FUNC_RMDIR): Likewise.
87915         * m4/setenv.m4 (gl_FUNC_SETENV_SEPARATE): Likewise.
87916         * m4/stat.m4 (gl_FUNC_STAT): Likewise.
87917         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
87918         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Likewise.
87919         * m4/strerror_r.m4 (gl_FUNC_STRERROR_R): Likewise.
87920         * m4/strsignal.m4 (gl_FUNC_STRSIGNAL): Likewise.
87921         * m4/strstr.m4 (gl_FUNC_STRSTR): Likewise.
87922         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
87923         * m4/symlink.m4 (gl_FUNC_SYMLINK): Likewise.
87924         * m4/tsearch.m4 (gl_FUNC_TSEARCH): Likewise.
87925         * m4/ttyname_r.m4 (gl_FUNC_TTYNAME_R): Likewise.
87926         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Likewise.
87927         * m4/unlink.m4 (gl_FUNC_UNLINK): Likewise.
87928         * m4/utimensat.m4 (gl_FUNC_UTIMENSAT): Likewise.
87929         * m4/utimes.m4 (gl_FUNC_UTIMES): Likewise.
87930         * m4/wcrtomb.m4 (gl_FUNC_WCRTOMB): Likewise.
87931         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
87932         * m4/signbit.m4 (gl_SIGNBIT_TEST_PROGRAM): Likewise.
87933         (gl_FLOATTYPE_SIGN_LOCATION): Change test program so that it returns an
87934         enumerated value.
87935         * m4/acl.m4 (gl_ACL_GET_FILE): Use "if ... return 1; return 0;" style.
87937 2010-12-04  Bruno Haible  <bruno@clisp.org>
87939         Update for Solaris 11 2010-11.
87940         * doc/{glibc,posix}-{functions,headers}: Add info about Solaris 11
87941         Express, released in November 2010.
87943 2010-12-04  Bruno Haible  <bruno@clisp.org>
87945         nproc: Relax license.
87946         * modules/nproc (License): Change to LGPL, with consent by Glen Lenker
87947         and Paul Eggert.
87948         Requested by Ludovic Courtès <ludo@gnu.org>.
87950 2010-12-01  Paul Eggert  <eggert@cs.ucla.edu>
87952         utimecmp: fine-grained src to nearby coarse-grained dest
87954         * lib/utimecmp.c (utimecmp): When UTIMECMP_TRUNCATE_SOURCE is set,
87955         and the source is on a file system with higher-resolution time
87956         stamps, than the destination, and _PC_TIMESTAMP_RESOLUTION does
87957         not work, and the time stamps are close together, the algorithm to
87958         determine the exact resolution from the read-back mtime was buggy:
87959         it had a "!=" where it should have had an "==".  This bug has been
87960         in the code ever since it was introduced to gnulib.
87961         Problem reported by Dan Jacobson in
87962         <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7529>.
87964 2010-11-30  Bruno Haible  <bruno@clisp.org>
87966         strerror_r-posix: Fix autoconf test.
87967         * m4/strerror_r.m4 (gl_FUNC_STRERROR_R): Fix typo.
87969 2010-11-28  Bruno Haible  <bruno@clisp.org>
87970             Paul Eggert  <eggert@cs.ucla.edu>
87972         Tests for module 'getdomainname'.
87973         * modules/getdomainname-tests: New file.
87974         * tests/test-getdomainname.c: New file, based on
87975         tests/test-gethostname.c.
87977 2010-11-28  Bruno Haible  <bruno@clisp.org>
87978             Paul Eggert  <eggert@cs.ucla.edu>
87980         getdomainname: Use the system function when possible.
87981         * lib/unistd.in.h: Include <netdb.h>, for getdomainname's declaration.
87982         (getdomainname): Replace if needed. Provide the declaration if it is
87983         missing. Don't use _GL_CXXALIAS_SYS_CAST.
87984         * lib/getdomainname.c: Include <limits.h> and <sys/systeminfo.h>.
87985         (getdomainname): When the system has getdomainname, call the system
87986         function. When sysinfo (SI_SRPC_DOMAIN, ...) is possible, use that.
87987         * m4/getdomainname.m4 (gl_FUNC_GETDOMAINNAME): Require
87988         gl_HEADER_SYS_SOCKET and gl_HEADER_NETDB. Test whether the function is
87989         found in libnsl. Look for the declaration also in <netdb.h>. Replace
87990         the function if its second argument is of type 'int' or if it is found
87991         in libnsl.
87992         (gl_PREREQ_GETDOMAINNAME): Define HAVE_GETDOMAINNAME. Check for
87993         <sys/systeminfo.h> and sysinfo().
87994         * modules/getdomainname (Depends-on): Add netdb, sys_socket.
87995         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize
87996         HAVE_DECL_GETDOMAINNAME and REPLACE_GETDOMAINNAME instead of
87997         HAVE_GETDOMAINNAME.
87998         * modules/unistd (Makefile.am): Substitute HAVE_DECL_GETDOMAINNAME and
87999         REPLACE_GETDOMAINNAME instead of HAVE_GETDOMAINNAME.
88000         * doc/glibc-functions/getdomainname.texi: Document the problems with
88001         the getdomainname declaration.
88003 2010-11-28  Bruno Haible  <bruno@clisp.org>
88005         sys_socket: Ensure ss_family field on AIX.
88006         * lib/sys_socket.in.h (ss_family): New macro definition.
88007         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Set
88008         HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY. Set SYS_SOCKET_H if necessary.
88009         (gl_SYS_SOCKET_H_DEFAULTS): Initialize
88010         HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY.
88011         * modules/sys_socket (Makefile.am): Substitute
88012         HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY.
88013         * doc/posix-headers/sys_socket.texi: Mention the AIX bug.
88015 2010-11-27  Bruno Haible  <bruno@clisp.org>
88017         readline: Improve configure output.
88018         * m4/readline.m4 (gl_FUNC_READLINE): Make the
88019         "checking for readline..." result understandable.
88021 2010-11-27  Bruno Haible  <bruno@clisp.org>
88023         *printf-posix: Detect a bug on Solaris 10/x86.
88024         * m4/printf.m4 (gl_PRINTF_PRECISION): Detect crash with large precision
88025         for floating-point output.
88026         * tests/test-vasnprintf-posix.c (test_function): Test precision with %f
88027         directive.
88028         * tests/test-snprintf-posix.h (test_function): Likewise.
88029         * tests/test-sprintf-posix.h (test_function): Likewise.
88030         * tests/test-vasprintf-posix.c (test_function): Likewise.
88031         * doc/posix-functions/fprintf.texi: Mention Solaris/x86 bug.
88032         * doc/posix-functions/printf.texi: Likewise.
88033         * doc/posix-functions/snprintf.texi: Likewise.
88034         * doc/posix-functions/sprintf.texi: Likewise.
88035         * doc/posix-functions/vfprintf.texi: Likewise.
88036         * doc/posix-functions/vprintf.texi: Likewise.
88037         * doc/posix-functions/vsnprintf.texi: Likewise.
88038         * doc/posix-functions/vsprintf.texi: Likewise.
88039         * doc/glibc-functions/obstack_printf.texi: Likewise.
88040         * doc/glibc-functions/obstack_vprintf.texi: Likewise.
88042 2010-11-27  Bruno Haible  <bruno@clisp.org>
88044         Fix link error when module libunistring-optional is in use.
88045         * modules/striconveh-tests (Makefile.am): Link with $(LIBUNISTRING).
88046         * modules/striconveha-tests (Makefile.am): Likewise.
88048 2010-11-27  Bruno Haible  <bruno@clisp.org>
88050         regex: Mention link dependencies.
88051         * modules/regex (Link): New section.
88052         * modules/rpmatch (Link): Likewise.
88053         * modules/regex-quote-tests (Makefile.am): Link with $(LIBINTL).
88055 2010-11-27  Bruno Haible  <bruno@clisp.org>
88057         ftoastr: Fix compilation error on Solaris.
88058         * lib/ftoastr.c: Include <config.h>.
88060 2010-11-27  Bruno Haible  <bruno@clisp.org>
88062         getloadavg: Update documentation.
88063         * doc/glibc-functions/getloadavg.texi: Mention the Solaris problem.
88065 2010-11-27  Bruno Haible  <bruno@clisp.org>
88067         sys_socket: Fix test whether the functions are declared.
88068         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Include <sys/socket.h>,
88069         not <sys/select.h>.
88071 2010-11-27  Bruno Haible  <bruno@clisp.org>
88073         getpass: Make sure to get system declaration on some platforms.
88074         * m4/getpass.m4 (gl_FUNC_GETPASS, gl_FUNC_GETPASS_GNU): Require
88075         gl_USE_SYSTEM_EXTENSIONS.
88076         * modules/getpass (Depends-on): Add extensions.
88078 2010-11-26  Bruno Haible  <bruno@clisp.org>
88080         iconv-h: Fix test-iconv-h-c++ failure on Solaris 11 2010-11.
88081         * lib/iconv.in.h (iconv_open, iconv, iconv_close): Define only if the
88082         'iconv' module is present.
88083         (ICONV_CONST): New macro.
88084         * m4/iconv_h.m4 (gl_ICONV_H_DEFAULTS): Initialize GNULIB_ICONV and
88085         ICONV_CONST.
88086         * m4/iconv.m4 (AM_ICONV): If the gnulib module 'iconv-h' is present,
88087         set ICONV_CONST.
88088         * m4/iconv_open.m4 (gl_FUNC_ICONV_OPEN_UTF): Don't set ICONV_CONST
88089         here.
88090         * modules/iconv (configure.ac): Invoke gl_ICONV_MODULE_INDICATOR.
88091         * modules/iconv-h (Makefile.am): Substitute GNULIB_ICONV.
88092         * tests/test-iconv-h.c (ICONV_CONST): Don't define here.
88093         * tests/test-iconv-h-c++.cc (ICONV_CONST): Don't define here.
88094         (iconv_open, iconv, iconv_close): Test only if the 'iconv' module is
88095         present.
88097 2010-11-25  Paul Eggert  <eggert@cs.ucla.edu>
88099         ftoastr: comment fix
88100         * lib/ftoastr.c: "little" -> "little or no" in comment
88102 2010-11-24  Paul Eggert  <eggert@cs.ucla.edu>
88104         stdint: port to GCC 4.3 + OSX + Octave
88105         On this platform, stdint.h is buggy and defines int64_t to long
88106         long int.  The replacement defined it to long int, causing
88107         problems with C++ style name mangling.  Instead, trust the system
88108         definition if INT64_MAX is defined, and likewise for the unsigned
88109         variant.   Problem reported by Jarno Rajahalme in
88110         <http://lists.gnu.org/r/bug-gnulib/2010-04/msg00143.html>.
88111         * lib/stdint.in.h (GL_INT64_T): Define if INT64_MAX is defined,
88112         and don't mess with int64_t and INT64_MAX in this case.
88113         (GL_UINT64_T): Likewise for UINT64_MAX and uint64_t.
88115 2010-11-24  Bruno Haible  <bruno@clisp.org>
88117         doc: Corrections regarding MacOS X 10.4 and 10.5.
88118         * doc/{glibc,posix,pastposix}-functions/*.texi: Update info about
88119         MacOS X.
88120         Reported by Simon Josefsson.
88122 2010-11-22  Ben Pfaff  <blp@cs.stanford.edu>
88124         Uninstall ".bin" files installed by relocwrapper.
88125         * modules/relocatable-prog-wrapper (uninstall-relocwrapper):
88126         Recursively run "make uninstall" with ".bin" prefixed to EXEEXT,
88127         unless it is already there.
88129 2010-11-21  Bruno Haible  <bruno@clisp.org>
88131         Update for NetBSD 5.0.
88132         * m4/printf.m4 (gl_PRINTF_INFINITE_LONG_DOUBLE): Don't guess yes on
88133         NetBSD; the test fails on NetBSD 5.0.
88134         * doc/{glibc,posix,pastposix}-{headers,functions}/*.texi: Update info
88135         about NetBSD.
88137 2010-11-21  Bruno Haible  <bruno@clisp.org>
88139         Update for HP-UX 11.23 and HP-UX 11.31.
88140         * doc/{glibc,posix}-{headers,functions}/*.texi: Update info about
88141         HP-UX.
88143 2010-11-21  Bruno Haible  <bruno@clisp.org>
88145         Update for MacOS X 10.5.
88146         * m4/printf.m4 (gl_PRINTF_INFINITE_LONG_DOUBLE): Don't guess yes on
88147         MacOS X; the test fails on MacOS X 10.5.8.
88148         * doc/{glibc,posix,pastposix}-{headers,functions}/*.texi: Update info
88149         about MacOS X.
88151 2010-11-20  Joel E. Denny  <joeldenny@joeldenny.org>
88153         bootstrap: add bootstrap_sync option.
88154         See discussion at
88155         <http://lists.gnu.org/r/bug-gnulib/2010-10/msg00369.html>,
88156         <http://lists.gnu.org/r/bug-gnulib/2010-11/msg00200.html>.
88157         * build-aux/bootstrap: Accept --bootstrap-sync to update
88158         bootstrap if it is not identical to the local gnulib's
88159         bootstrap.  Accept bootstrap_sync=true in bootstrap.conf to
88160         enable this by default.  Accept --no-bootstrap-sync to disable
88161         it.
88163 2010-11-20  Bruno Haible  <bruno@clisp.org>
88165         Ensure that <features.h> is included before __GLIBC__ is tested.
88166         * lib/printf-parse.h: Include <features.h>.
88167         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Require gl_FEATURES_H.
88168         Reported by Mike Frysinger <vapier@gentoo.org>.
88170         Ensure that <features.h> is included before __GLIBC__ is tested.
88171         * lib/wchar.in.h: Include <features.h>.
88172         * m4/wchar_h.m4 (gl_WCHAR_H): Require gl_FEATURES_H.
88173         * modules/wchar (Makefile.am): Substitute HAVE_FEATURES_H.
88174         Reported by Mike Frysinger <vapier@gentoo.org>.
88176         Ensure that <features.h> is included before __GLIBC__ is tested.
88177         * lib/arpa_inet.in.h: Include <features.h>.
88178         * m4/arpa_inet_h.m4 (gl_HEADER_ARPA_INET): Require gl_FEATURES_H.
88179         * modules/arpa_inet (Makefile.am): Substitute HAVE_FEATURES_H.
88180         Reported by Mike Frysinger <vapier@gentoo.org>.
88182         Ensure that <features.h> is included before __GLIBC__ is tested.
88183         * build-aux/link-warning.h: Include <features.h>.
88184         * modules/link-warning (configure.ac): Require gl_FEATURES_H.
88185         (Makefile.am): Substitute HAVE_FEATURES_H into link-warning.h.
88186         Reported by Mike Frysinger <vapier@gentoo.org>.
88188         Ensure that <features.h> is included before __GLIBC__ is tested.
88189         * m4/gnulib-common.m4 (gl_FEATURES_H): New macro.
88190         Reported by Mike Frysinger <vapier@gentoo.org>.
88192 2010-11-20  Bruno Haible  <bruno@clisp.org>
88194         memmem: Fix autoconf test.
88195         * m4/memmem.m4 (gl_FUNC_MEMMEM): Test HAVE_DECL_MEMMEM, not HAVE_MEMMEM.
88197 2010-11-20  Bruno Haible  <bruno@clisp.org>
88199         Port to uClibc.
88200         * build-aux/link-warning.h (GL_LINK_WARNING): Treat uClibc like glibc.
88201         * lib/fcntl.in.h: Likewise.
88202         * lib/hard-locale.c (GLIBC_VERSION): Likewise.
88203         * lib/mbrtowc.c (mbrtowc): Likewise.
88204         * lib/relocatable.c (find_shared_library_fullname): Likewise.
88205         * lib/strerror_r.c: Likewise.
88206         * lib/unistr/u8-strnlen.c: Likewise.
88207         * lib/vasnprintf.c (decimal_point_char): Likewise.
88208         * m4/arpa_inet_h.m4 (gl_HEADER_ARPA_INET): Likewise.
88209         * m4/duplocale.m4 (gl_FUNC_DUPLOCALE): Likewise.
88210         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Likewise.
88211         * m4/glibc21.m4 (gl_GLIBC21): Likewise.
88212         * tests/test-sigaction.c (handler, main): Likewise.
88213         * lib/freading.h: Treat uClibc like a non-glibc platform.
88214         * lib/freading.c: Likewise.
88215         * lib/gettext.h: Likewise.
88216         * lib/localename.c (gl_locale_name_thread_unsafe, HAVE_LOCALE_NULL):
88217         Likewise.
88218         * lib/printf-parse.h (FLAG_LOCALIZED): Likewise.
88219         * lib/printf-parse.c (PRINTF_PARSE): Likewise.
88220         * lib/propername.c (proper_name_utf8): Likewise.
88221         * lib/spawn.in.h: Likewise.
88222         * lib/striconv.c (mem_cd_iconv, str_cd_iconv, str_iconv): Likewise.
88223         * lib/striconveh.c (iconveh_open, iconv_carefully, iconv_carefully_1,
88224         mem_cd_iconveh_internal): Likewise.
88225         * lib/striconveha.c (mem_iconveha, str_iconveha): Likewise.
88226         * lib/string.in.h (memchr, memrchr, rawmemchr, strchrnul, strpbrk,
88227         strstr, strcasestr): Likewise.
88228         * lib/unicodeio.c (unicode_to_mb): Likewise.
88229         * lib/uniconv/u16-conv-from-enc.c (UTF16_NAME): Likewise.
88230         * lib/uniconv/u16-conv-to-enc.c (UTF16_NAME): Likewise.
88231         * lib/uniconv/u16-strconv-to-enc.c (UTF16_NAME): Likewise.
88232         * lib/uniconv/u32-conv-from-enc.c (UTF32_NAME): Likewise.
88233         * lib/uniconv/u32-conv-to-enc.c (UTF32_NAME): Likewise.
88234         * lib/uniconv/u32-strconv-to-enc.c (UTF32_NAME): Likewise.
88235         * lib/unistr/u8-stpncpy.c: Likewise.
88236         * lib/vasnprintf.c (VASNPRINTF): Likewise.
88237         * lib/xmalloc.c (HAVE_GNU_CALLOC): Likewise.
88238         * m4/getdelim.m4 (gl_FUNC_GETDELIM): Likewise.
88239         * m4/getline.m4 (gl_FUNC_GETLINE): Likewise.
88240         * m4/glibc2.m4 (gt_GLIBC2): Likewise.
88241         * m4/iconv_open.m4 (gl_FUNC_ICONV_OPEN): Likewise.
88242         * m4/memmem.m4 (gl_FUNC_MEMMEM_SIMPLE, gl_FUNC_MEMMEM): Likewise.
88243         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Likewise.
88244         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR_SIMPLE, gl_FUNC_STRCASESTR):
88245         Likewise.
88246         * m4/strstr.m4 (gl_FUNC_STRSTR_SIMPLE, gl_FUNC_STRSTR): Likewise.
88247         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
88248         * m4/sys_ioctl_h.m4 (gl_SYS_IOCTL_H): Likewise.
88249         * m4/sys_select_h.m4 (gl_HEADER_SYS_SELECT): Likewise.
88250         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Likewise.
88251         * m4/sys_times_h.m4 (gl_SYS_TIMES_H): Likewise.
88252         * m4/unistd_h.m4 (gl_UNISTD_H): Likewise.
88253         * m4/wchar_h.m4 (gl_WCHAR_H): Likewise.
88254         * tests/test-getopt.h (OPTIND_MIN): Likewise.
88255         * tests/test-striconveha.c (main): Likewise.
88256         * tests/test-vasnprintf-posix.c (test_function): Likewise.
88257         * tests/test-vasnprintf-posix3.c (test_function, main): Likewise.
88258         * doc/posix-functions/getdelim.texi: Mention an uClibc bug.
88259         * doc/posix-functions/getline.texi: Likewise.
88260         Reported by Mike Frysinger <vapier@gentoo.org>.
88262 2010-11-20  Bruno Haible  <bruno@clisp.org>
88264         nproc: Fix condition.
88265         * lib/nproc.c: Test HAVE_PTHREAD_GETAFFINITY_NP, not
88266         HAVE_PTHREAD_AFFINITY_NP.
88268 2010-11-20  Bruno Haible  <bruno@clisp.org>
88270         Fix a comment.
88271         * lib/vasnprintf.c (VASNPRINTF): Fix comment.
88273 2010-11-19  Paul Eggert  <eggert@cs.ucla.edu>
88275         ftoastr: don't assume snprintf
88276         * lib/ftoastr.c (snprintf) [! GNULIB_SNPRINTF_POSIX]:
88277         Implement a subset of snprintf here, by using sprintf safely.
88278         * modules/ftoastr (Depends-on): Remove snprintf.
88280 2010-11-19  Jim Meyering  <meyering@redhat.com>
88282         test-rename.h: fix compilation failure
88283         * tests/test-rename.h (test_rename): Add omitted "}".
88285 2010-11-17  Jim Meyering  <meyering@redhat.com>
88287         maint.mk: add a URL discussing the no-@acronym policy
88288         * top/maint.mk (sc_texinfo_acronym): Add a URL in a comment.
88290 2010-11-18  Paul Eggert  <eggert@cs.ucla.edu>
88292         ftoastr: depend on snprintf, improve comments
88293         * lib/ftoastr.c: Also mention Loitsch's draft.
88294         * lib/ftoastr.h: Require WIDTH to be nonnegative.  This isn't
88295         needed in the current implementation, but it might simplify
88296         speeding up the code later.
88297         * modules/ftoastr: Depend on snprintf; this improves portability.
88298         Suggested by Bruno Haible in the same email.
88300         ftoastr: port to hosts lacking strtof and strtold
88301         Problem reported by Bruno Haible in
88302         <http://lists.gnu.org/r/bug-gnulib/2010-11/msg00242.html>.
88303         * lib/ftoastr.c (STRTOF): Define to strtod if in a pre-C99
88304         environment and strtold (and presumably strtof) are not available.
88305         * modules/ftoastr (Files): Add m4/c-strtod.m4.
88306         (configure.ac): Require gl_C99_STRTOLD.
88308 2010-11-18  Bruno Haible  <bruno@clisp.org>
88310         c-strtold: Avoid link error on AIX 7.
88311         * lib/c-strtod.c: Test also HAVE_STRTOD_L or HAVE_STRTOLD_L.
88312         * m4/c-strtod.m4 (gl_C_STRTOD): Test whether strtod_l exists.
88313         (gl_C_STRTOLD): Test whether strtold_l exists.
88314         Reported by Albert Chin <bug-gnulib@mlists.thewrittenword.com>.
88316 2010-11-17  Paul Eggert  <eggert@cs.ucla.edu>
88318         intprops: new macro INT_BITS_STRLEN_BOUND
88319         * lib/intprops.h (INT_BITS_STRLEN_BOUND): New macro, needed by
88320         ftoastr.h.  This exposes an internal of intprops.h that was formerly
88321         not exposed.  Also, it uses a slightly tighter bound than before;
88322         though this makes no practical difference, we might as well be as
88323         tight as we easily can.
88325         ftoastr: new module, for lossless conversion of floats to short strings
88326         * lib/ftoastr.h, lib/ftoastr.c, lib/dtoastr.c, lib/ldtoastr.c:
88327         * modules/ftoastr: New files.
88329 2010-11-15  Paul Eggert  <eggert@cs.ucla.edu>
88331         bootstrap: port to Solaris sed
88332         * build-aux/bootstrap (get_version): Port to Solaris sed.
88333         See Ralf Wildenhues's note in
88334         <http://lists.gnu.org/r/bug-gnulib/2010-11/msg00156.html>.
88336 2010-11-14  Jim Meyering  <meyering@redhat.com>
88338         maint.mk: rename variable: s/noteworthy/gl_noteworthy_news_/
88339         * top/maint.mk (gl_noteworthy_news_): Rename from "noteworthy"
88340         and move definition closer to sole use.
88342 2010-11-13  Jim Meyering  <meyering@redhat.com>
88344         remove autoconf-2.57 work-around requiring AC_PROG_EGREP and AC_PROG_CPP
88345         Now we require at least autoconf-2.59, which means the work-around
88346         is no longer needed.
88347         * m4/alloca.m4 (gl_FUNC_ALLOCA): Remove work-around.
88348         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
88349         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Likewise.
88350         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Likewise.
88351         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Likewise.
88353 2010-11-13  Bruno Haible  <bruno@clisp.org>
88355         rename, renameat: Avoid test failures at NFS mounted locations.
88356         * tests/test-rename.h (dentry_exists, assert_nonexistent): New
88357         functions.
88358         (test_rename): Use assert_nonexistent.
88359         * tests/test-rename.c: Include <dirent.h>.
88360         * tests/test-renameat.c: Likewise.
88361         Reported by Gary V. Vaughan <gary@gnu.org>.
88363         rename, renameat: Document Linux bug with NFS
88364         <http://lists.gnu.org/r/bug-gnulib/2010-11/msg00154.html>.
88365         * doc/posix-functions/rename.texi: Mention the NFS bug on Linux.
88366         * doc/posix-functions/renameat.texi: Likewise.
88367         Suggested by Eric Blake.
88369 2010-11-13  Bruno Haible  <bruno@clisp.org>
88371         rename test: Add comments.
88372         * tests/test-rename.h (test_rename): Add structure and comments.
88374 2010-11-13  Eric Blake  <eblake@redhat.com>
88376         maintainer-makefile: cover a few more files
88377         * top/maint.mk (sc_prohibit_test_double_equal): Also cover shell
88378         scripts generated within C files, for libvirt.
88380 2010-11-13  Bruno Haible  <bruno@clisp.org>
88382         unistr/u8-mbtouc: Improve handling of ill-formed UTF-8 input.
88383         * lib/unistr/u8-mbtouc.c (u8_mbtouc): For an invalid multibyte
88384         character, return the number of bytes that belong together, not always
88385         1.
88386         * lib/unistr/u8-mbtouc-unsafe.c (u8_mbtouc_unsafe): Likewise.
88387         * lib/unistr/u8-mbtouc-aux.c (u8_mbtouc_aux): Likewise.
88388         * lib/unistr/u8-mbtouc-unsafe-aux.c (u8_mbtouc_unsafe_aux): Likewise.
88389         * lib/unistr/u8-mbsnlen.c (u8_mbsnlen): Use u8_mbtouc to determine the
88390         number of bytes of an invalid character.
88391         * tests/unistr/test-u8-mbtouc.c (test_safe_function): New function.
88392         (main): Invoke it.
88393         * tests/unistr/test-u8-mbtouc.h (test_function): Update two test
88394         results.
88395         * tests/unistr/test-u8-mbsnlen.c (main): Test various kinds of
88396         malformed byte sequences.
88397         * modules/unistr/u8-mbtouc (configure.ac): Bump version number.
88398         * modules/unistr/u8-mbtouc-unsafe (configure.ac): Likewise.
88399         * modules/unistr/u8-mbsnlen (configure.ac): Likewise.
88400         Reported by Ben Pfaff and Paolo Bonzini.
88402 2010-11-13  Bruno Haible  <bruno@clisp.org>
88404         openat: Work around glibc bug with fchownat() and empty file names.
88405         * m4/openat.m4 (gl_FUNC_FCHOWNAT_EMPTY_FILENAME_BUG): New macro.
88406         (gl_FUNC_FCHOWNAT): Invoke it.
88407         * lib/fchownat.c (rpl_fchownat): Handle the empty file name specially.
88408         * doc/posix-functions/fchownat.texi: Document the glibc bug.
88409         Reported by Gary V. Vaughan <gary@gnu.org>.
88411 2010-11-13  Bruno Haible  <bruno@clisp.org>
88413         openat: Ensure autoconf macro ordering.
88414         * m4/openat.m4 (gl_FUNC_FCHOWNAT_DEREF_BUG): Require
88415         gl_USE_SYSTEM_EXTENSIONS.
88416         (gl_FUNC_FCHOWNAT): Require gl_UNISTD_H_DEFAULTS.
88418 2010-11-13  Bruno Haible  <bruno@clisp.org>
88420         Update comments.
88421         * lib/unistr/u8-check.c: Update file name in comments.
88422         * lib/unistr/u8-mblen.c: Likewise.
88423         * lib/unistr/u8-prev.c: Likewise.
88424         * lib/unistr/u8-strmblen.c: Likewise.
88425         * lib/unistr/u8-strmbtouc.c: Likewise.
88427 2010-11-13  Jim Meyering  <meyering@redhat.com>
88429         tests: avoid test failure on Solaris 10 due to lack of PATH export
88430         * tests/test-update-copyright.sh: Don't forget to export PATH.
88432         init.sh: ensure that IFS is defined, just in case...
88433         * tests/init.sh (setup_): Ensure that IFS is defined,
88434         so that saving and restoring it works as expected.  This
88435         appears to be useful at least for an old version of dash
88436         from a long time ago (RH 6).  See here for details:
88437         http://thread.gmane.org/gmane.comp.gnu.coreutils.general/436/focus=455
88439         maint.mk: tighten "test a == b" check
88440         * top/maint.mk (sc_prohibit_test_double_equal): Restrict this
88441         test to files that contain something like #!/bin/sh.
88442         Without this, coreutils would get two false positives in
88443         the comments of C source files.
88445 2010-11-12  Eric Blake  <eblake@redhat.com>
88447         bootstrap: fix typo in previous attempt
88448         * build-aux/bootstrap (buildreq): Correct the grouping.
88449         Reported by Paul Eggert.
88451         maintainer-makefile: prohibit test x == x
88452         * top/maint.mk (sc_prohibit_test_double_equal): New rule.
88453         Based on a report by Matthias Bolte.
88455         bootstrap: allow FreeBSD gzip
88456         * build-aux/bootstrap (get_version): Parse FreeBSD gzip version,
88457         which has no '.' and goes to stderr.
88458         * build-aux/bootstrap.conf (buildreq): Improve the sample file.
88459         Reported by Matthias Bolte.
88461         maintainer-makefile: check for i18n setup
88462         * top/maint.mk (sc_bindtextdomain): Check for evidence that _()
88463         will likely work.
88465 2010-11-12  Bruno Haible  <bruno@clisp.org>
88467         sleep, nanosleep: Work around Linux 2.6.9 nanosleep bug.
88468         * lib/sleep.c (rpl_sleep): Split in chunks no larger than 24 days.
88469         * lib/nanosleep.c (nanosleep): Likewise.
88471 2010-11-11  Bruno Haible  <bruno@clisp.org>
88473         fcntl-h: Fix for use of C++ on glibc systems.
88474         * lib/fcntl.in.h: Include <sys/stat.h> before include_next <fcntl.h>
88475         also on glibc systems in C++ mode.
88476         Reported by Gary V. Vaughan <gary@gnu.org>.
88478 2010-11-11  Christian Weisgerber  <naddy@mips.inka.de>  (tiny change)
88480         mknod: avoid false failure with dash
88481         * m4/mknod.m4 (gl_FUNC_MKNOD): Use portable shell syntax.
88483 2010-11-11  Paul Eggert  <eggert@cs.ucla.edu>
88485         unlink: Fix "is it should" typo in diagnostic.
88486         * m4/unlink.m4 (gl_FUNC_UNLINK): Fix typo, as per Reuben Thomas in
88487         <http://lists.gnu.org/r/bug-gnulib/2010-11/msg00106.html>.
88489 2010-11-11  Bruno Haible  <bruno@clisp.org>
88491         Tests for module 'strerror_r-posix'.
88492         * modules/strerror_r-posix-tests: New file.
88493         * tests/test-strerror_r.c: New file.
88494         * tests/test-string-c++.cc: Check the signature of strerror_r.
88496         New module 'strerror_r-posix'.
88497         * lib/string.in.h (strerror_r): New declaration.
88498         * lib/strerror_r.c: New file.
88499         * m4/strerror_r.m4: New file.
88500         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Check for the declaration
88501         of strerror_r.
88502         (gl_HEADER_STRING_H_DEFAULTS): Initialize GNULIB_STRERROR_R,
88503         HAVE_DECL_STRERROR_R, REPLACE_STRERROR_R.
88504         * modules/strerror_r-posix: New file.
88505         * modules/string (Makefile.am): Substitute GNULIB_STRERROR_R,
88506         HAVE_DECL_STRERROR_R, REPLACE_STRERROR_R.
88507         * doc/posix-functions/strerror_r.texi: Mention the new module and the
88508         portability problems.
88510 2010-11-11  Torsten Scheck  <Torsten.Scheck@Leica-Microsystems.com> (tiny change)
88512         * build-aux/pmccabe2html: Fixed a off-by-one error, so last input
88513         line is also considered for output. Quoted function name in shell
88514         command, so temporary files for functions like MyClass::operator()
88515         are removed correctly without errors.
88517 2010-11-09  Bruno Haible  <bruno@clisp.org>
88519         * doc/posix-functions/strerror.texi: List more failing platforms.
88521         * doc/posix-functions/strerror.texi: Add a comment.
88523 2010-11-07  Paul Eggert  <eggert@cs.ucla.edu>
88525         fdopendir: fix bug on MacOS X when low on file descriptors
88527         * lib/fdopendir.c (REPLACE_FCHDIR): #define to 0 if not defined.
88528         (fdopendir_with_dup, fd_clone_opendir): Now have extra CWD arg.
88529         All callers changed.
88530         (fdopendir): Invoke save_cwd at the top level, not after using
88531         multiple dup() calls to use up file descriptors.  Then retry
88532         fdopendir_with_dup.  This avoids failure with EMFILE if FD is 1
88533         less than the maximum number of open file descriptors, because
88534         save_cwd fails with errno == EMFILE.  Problem reported by tsteven4
88535         on Mac OS X 10.6.4 for tar 1.24
88536         <http://lists.gnu.org/r/bug-tar/2010-10/msg00084.html>
88537         <http://lists.gnu.org/r/bug-tar/2010-11/msg00000.html>
88538         and for tar 1.25
88539         <http://lists.gnu.org/r/bug-tar/2010-11/msg00038.html>.
88541 2010-11-07  Bruno Haible  <bruno@clisp.org>
88543         vasnprintf: Support I flag on glibc systems.
88544         * lib/printf-parse.h (FLAG_LOCALIZED): New macro.
88545         * lib/printf-parse.c (PRINTF_PARSE): Handle the 'I' flag.
88546         * lib/vasnprintf.c (VASNPRINTF): Pass the 'I' flag on to the system's
88547         snprintf function.
88548         * tests/test-vasnprintf-posix.c (test_function): Test the 'I' flag on
88549         glibc systems.
88550         * tests/test-vasnprintf-posix3.c: New file.
88551         * modules/vasnprintf-posix-tests (Files): Add it.
88552         (TESTS, check_PROGRAMS): Add test-vasnprintf-posix3.
88554 2010-11-05  Thien-Thi Nguyen  <ttn@gnuvola.org>  (tiny change)
88556         [html] Fix copy/paste bug: Use unique name for compiler warnings.
88557         * MODULES.html.sh: For compiler warnings, use name
88558         `ansic_ext_compwarn' since `ansic_ext_misc' is already taken.
88560 2010-11-05  Eric Blake  <eblake@redhat.com>
88562         ceil, floor: avoid spurious failure with icc
88563         * tests/test-ceilf2.c (ceilf_reference): Avoid icc's use of DAZ
88564         [denormals-as-zero] when optimizing without -mieee-fp option.
88565         * tests/test-floorf2.c (floorf_reference): Likewise.
88566         * tests/test-ceilf1.c (dummy): New function.
88567         (main): Use it to outsmart icc's optimization.
88568         * tests/test-floorf1.c (dummy, main): Likewise.
88570         tests: require working signbit
88571         * modules/ceilf-tests (Depends-on): Add signbit.
88572         * modules/ceill-tests (Depends-on): Likewise.
88573         * modules/floorf-tests (Depends-on): Likewise.
88574         * modules/floorl-tests (Depends-on): Likewise.
88575         * modules/round-tests (Depends-on): Likewise.
88576         * modules/roundf-tests (Depends-on): Likewise.
88577         * modules/roundl-tests (Depends-on): Likewise.
88578         * modules/trunc-tests (Depends-on): Likewise.
88579         * modules/truncf-tests (Depends-on): Likewise.
88580         * modules/truncl-tests (Depends-on): Likewise.
88582         strtod: work around icc bug
88583         * lib/strtod.c (minus_zero): Define to working value.
88584         (strtod): Use it to avoid icc bug.
88586         copysign: enhance tests
88587         * modules/copysign-tests (Files): Add minus-zero.h.
88588         * tests/test-copysign.c (main): Also test zeros.
88590 2010-11-04  Eric Blake  <eblake@redhat.com>
88592         ceil, floor, round, trunc: enhance tests of -0
88593         * tests/test-ceilf1.c (main): Ensure correct sign of result.
88594         * tests/test-ceill.c (main): Likewise.
88595         * tests/test-floorf1.c (main): Likewise.
88596         * tests/test-floorl.c (main): Likewise.
88597         * tests/test-round1.c (main): Likewise.
88598         * tests/test-roundf1.c (main): Likewise.
88599         * tests/test-roundl.c (main): Likewise.
88600         * tests/test-trunc1.c (main): Likewise.
88601         * tests/test-truncf1.c (main): Likewise.
88602         * tests/test-truncl.c (main): Likewise.
88604 2010-11-04  Eric Blake  <eblake@redhat.com>
88606         frexp, tests: work around ICC bug with -zero
88607         * m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Compute -0.0 in a way that
88608         works with more compilers.
88609         * tests/minus-zero.h: New file.
88610         * modules/ceilf-tests (Files): Include it.
88611         * modules/ceill-tests (Files): Likewise.
88612         * modules/floorf-tests (Files): Likewise.
88613         * modules/floorl-tests (Files): Likewise.
88614         * modules/frexp-nolibm-tests (Files): Likewise.
88615         * modules/frexp-tests (Files): Likewise.
88616         * modules/frexpl-nolibm-tests (Files): Likewise.
88617         * modules/frexpl-tests (Files): Likewise.
88618         * modules/isnan-tests (Files): Likewise.
88619         * modules/isnand-nolibm-tests (Files): Likewise.
88620         * modules/isnand-tests (Files): Likewise.
88621         * modules/isnanf-nolibm-tests (Files): Likewise.
88622         * modules/isnanf-tests (Files): Likewise.
88623         * modules/isnanl-nolibm-tests (Files): Likewise.
88624         * modules/isnanl-tests (Files): Likewise.
88625         * modules/round-tests (Files): Likewise.
88626         * modules/roundf-tests (Files): Likewise.
88627         * modules/roundl-tests (Files): Likewise.
88628         * modules/ldexpl-tests (Files): Likewise.
88629         * modules/signbit-tests (Files): Likewise.
88630         * modules/snprintf-posix-tests (Files): Likewise.
88631         * modules/sprintf-posix-tests (Files): Likewise.
88632         * modules/strtod-tests (Files): Likewise.
88633         * modules/trunc-tests (Files): Likewise.
88634         * modules/truncf-tests (Files): Likewise.
88635         * modules/truncl-tests (Files): Likewise.
88636         * modules/vsnprintf-posix-tests (Files): Likewise.
88637         * modules/vsprintf-posix-tests (Files): Likewise.
88638         * modules/vasnprintf-posix-tests (Files): Likewise.
88639         * modules/vasprintf-posix-tests (Files): Likewise.
88640         * tests/test-ceilf1.c (main): Use it.
88641         * tests/test-ceill.c (main): Likewise.
88642         * tests/test-floorf1.c (main): Likewise.
88643         * tests/test-floorl.c (main): Likewise.
88644         * tests/test-frexp.c (main): Likewise.
88645         * tests/test-frexpl.c (main): Likewise.
88646         * tests/test-isnan.c (main): Likewise.
88647         * tests/test-isnand.h (main): Likewise.
88648         * tests/test-isnanf.h (main): Likewise.
88649         * tests/test-isnanl.h (main): Likewise.
88650         * tests/test-ldexpl.c (main): Likewise.
88651         * tests/test-round.c (main): Likewise.
88652         * tests/test-roundf.c (main): Likewise.
88653         * tests/test-roundl.c (main): Likewise.
88654         * tests/test-signbit.c (test_signbitf, test_signbitd)
88655         (test_signbitl): Likewise.
88656         * tests/test-snprintf-posix.h (test_function): Likewise.
88657         * tests/test-sprintf-posix.h (test_function): Likewise.
88658         * tests/test-strtod.c (main): Likewise.
88659         * tests/test-trunc1.c (main): Likewise.
88660         * tests/test-truncf1.c (main): Likewise.
88661         * tests/test-truncl.c (main): Likewise.
88663         isnanl: work around icc bug
88664         * lib/isnan.c (FUNC): Compute run-time NaN under ICC as well.
88666 2010-11-03  Eric Blake  <eblake@redhat.com>
88668         tests: fix compiler warnings
88669         * tests/test-getopt.h (test_getopt): Fix condition.
88670         * tests/test-getopt_long.h (test_getopt_long): Likewise.
88671         * tests/test-pipe2.c (main): Likewise.
88672         * tests/test-quotearg-simple.c (main): Avoid icc warning.
88674         utimens: fix broken m4 test
88675         * m4/utimens.m4 (gl_UTIMENS): Include correct headers.
88677 2010-10-28  Bruno Haible  <bruno@clisp.org>
88679         posix_spawn*, getdtablesize: Relax license.
88680         * modules/posix_spawn (License): Change to LGPLv2+.
88681         * modules/posix_spawnp (License): Likewise.
88682         * modules/posix_spawn-internal (License): Likewise.
88683         * modules/posix_spawnattr_init (License): Likewise.
88684         * modules/posix_spawnattr_getflags (License): Likewise.
88685         * modules/posix_spawnattr_setflags (License): Likewise.
88686         * modules/posix_spawnattr_getpgroup (License): Likewise.
88687         * modules/posix_spawnattr_setpgroup (License): Likewise.
88688         * modules/posix_spawnattr_getschedparam (License): Likewise.
88689         * modules/posix_spawnattr_setschedparam (License): Likewise.
88690         * modules/posix_spawnattr_getschedpolicy (License): Likewise.
88691         * modules/posix_spawnattr_setschedpolicy (License): Likewise.
88692         * modules/posix_spawnattr_getsigdefault (License): Likewise.
88693         * modules/posix_spawnattr_setsigdefault (License): Likewise.
88694         * modules/posix_spawnattr_getsigmask (License): Likewise.
88695         * modules/posix_spawnattr_setsigmask (License): Likewise.
88696         * modules/posix_spawnattr_destroy (License): Likewise.
88697         * modules/posix_spawn_file_actions_init (License): Likewise.
88698         * modules/posix_spawn_file_actions_addclose (License): Likewise.
88699         * modules/posix_spawn_file_actions_adddup2 (License): Likewise.
88700         * modules/posix_spawn_file_actions_addopen (License): Likewise.
88701         * modules/posix_spawn_file_actions_destroy (License): Likewise.
88702         * modules/getdtablesize (License): Likewise.
88703         Requested by Adam Stokes <ajs@redhat.com> for use in netcf.
88705 2010-10-26  Bruno Haible  <bruno@clisp.org>
88707         unistd: Refine workaround from 2009-12-23 against Cygwin bug.
88708         * lib/unistd.in.h: Don't include <stdio.h> and <fcntl.h>, except on
88709         Cygwin and mingw.
88710         Suggested by Eric Blake.
88712 2010-10-26  Bruno Haible  <bruno@clisp.org>
88714         stdio: Work around compilation error due to renameat() on Solaris 10.
88715         * lib/stdio.in.h: Include <unistd.h> on Solaris.
88716         * lib/renameat.c: Don't include <unistd.h> here.
88717         * doc/posix-functions/renameat.texi: Mention the Solaris problem.
88718         Reported by Paul Eggert and Eric Blake.
88720 2010-10-26  Paul Eggert  <eggert@cs.ucla.edu>
88722         renameat: port to Solaris 10, which declares renameat in unistd.h
88724         * lib/renameat.c: Include unistd.h before stdio.h, because
88725         Solaris 10 declares renameat in unistd.h.  Problem encountered
88726         when building GNU tar 1.24 on Solaris 10.
88728 2010-10-26  Christian Weisgerber  <naddy@mips.inka.de>  (tiny change)
88730         fdopendir: fix C89 compilation
88731         * lib/fdopendir.c (fd_clone_opendir): Move declaration for older
88732         compilers.
88734 2010-10-23  Paul Eggert  <eggert@cs.ucla.edu>
88736         inttostr: simplify by removing unnecessary redundancy
88737         * lib/anytostr.c: Don't include verify.h.
88738         (anytostr): Don't verify that TYPE_SIGNED (inttype) equals
88739         inttype_is_signed.  Instead, disable the bogus GCC warnings, so that
88740         there's no need for inttype_is_signed and for calling TYPE_SIGNED.
88741         * lib/imaxtostr.c (inttype_is_signed): Remove; no longer needed.
88742         * lib/inttostr.c, lib/offtostr.c, lib/uinttostr.c, lib/umaxtostr.c:
88743         Likewise.
88744         * modules/inttostr (Depends-on): Remove 'verify'.
88746 2010-10-23  Bruno Haible  <bruno@clisp.org>
88748         nl_langinfo: Mention problem with CRNCYSTR on NetBSD 5.0.
88749         * doc/posix-functions/nl_langinfo.texi: Mention problem with CRNCYSTR.
88750         Reported by Eric Blake.
88752 2010-10-23  Bruno Haible  <bruno@clisp.org>
88754         Tests: Fix LOCALE_JA on MirBSD 10.
88755         * m4/locale-ja.m4 (gt_LOCALE_JA): Reject a locale identifier that leads
88756         to an UTF-8 locale.
88757         * m4/locale-fr.m4 (gt_LOCALE_FR): Likewise.
88758         * m4/locale-zh.m4 (gt_LOCALE_ZH_CN): Likewise.
88759         Reported by Eric Blake.
88761 2010-10-21  Bruno Haible  <bruno@clisp.org>
88763         nl_langinfo test: Avoid test failure on NetBSD 5.
88764         * tests/test-nl_langinfo.c (main): Relax test of nl_langinfo(CRNCYSTR).
88765         Reported by Eric Blake.
88767 2010-10-21  Eric Blake  <eblake@redhat.com>
88769         c-stack: work around libsigsegv 2.8 bug
88770         * lib/c-stack.c (SIGSTKSZ): Increase size to avoid alternate stack
88771         overflow on at least PowerPC64.
88773 2010-10-17  Bruno Haible  <bruno@clisp.org>
88775         userspec: Drop redundant file.
88776         * modules/userspec (Files): Remove lib/inttostr.h.
88778 2010-10-17  Bruno Haible  <bruno@clisp.org>
88780         nl_langinfo tests: Silence some warnings.
88781         * tests/test-nl_langinfo.c: Silence -Wtype-limits warnings.
88782         Reported by Jim Meyering.
88784 2010-10-17  Bruno Haible  <bruno@clisp.org>
88786         Make use of GCC's attribute __alloc_size__.
88787         * lib/xalloc.h (ATTRIBUTE_ALLOC_SIZE): New macro.
88788         (xmalloc, xzalloc, xcalloc, xrealloc, xmemdup, xnmalloc, xnrealloc,
88789         xcharalloc): Declare with ATTRIBUTE_ALLOC_SIZE.
88790         * lib/eealloc.h (eemalloc, eerealloc): Declare with attribute
88791         __alloc_size__.
88792         * lib/pagealign_alloc.h (pagealign_alloc, pagealign_xalloc): Likewise.
88793         Suggested by Jim Meyering.
88795 2010-10-16  Joel E. Denny  <joeldenny@joeldenny.org>
88797         bootstrap: anchor .gitignore entries.
88798         * build-aux/bootstrap (insert_sorted_if_absent): Replace all uses
88799         with...
88800         (insert_vc_ignore): ... this new function, which prepends `/' to
88801         all .gitignore entries before passing them to
88802         insert_sorted_if_absent.
88804 2010-10-16  Bruno Haible  <bruno@clisp.org>
88806         nextafter: Fix configure check.
88807         * modules/nextafter (configure.ac): Correct expected prototype.
88809 2010-10-16  Bruno Haible  <bruno@clisp.org>
88811         termios: Update documentation.
88812         * doc/posix-headers/termios.texi: Mention remaining mingw problems.
88814 2010-10-16  Bruno Haible  <bruno@clisp.org>
88816         tests: Make them compile with TinyCC.
88817         * tests/test-strstr.c (main): Remove parentheses around array
88818         initializer.
88820 2010-10-15  Eric Blake  <eblake@redhat.com>
88822         ignore-value: make header idempotent
88823         * lib/ignore-value.h: Add double-inclusion guards.
88824         Reported by Stefan Berger.
88826 2010-10-15  Jim Meyering  <meyering@redhat.com>
88828         GNUmakefile: handle "stable" target, not "major"
88829         * top/GNUmakefile (_is-dist-target): s/major/stable/ to match the
88830         lists in maint.mk and announce-gen.  Without this, "make stable"
88831         would fail to ensure that $(VERSION) is up to date.
88833 2010-10-15  Ludovic Courtès  <ludo@gnu.org>
88835         * lib/isnan.c (FUNC): Treat TinyCC (`__TINYC__') like `__SUNPRO_C'
88836         & co.
88838 2010-10-14  Bruno Haible  <bruno@clisp.org>
88840         vasnprintf: Don't set errno to 0.
88841         * lib/vasnprintf.c (VASNPRINTF): Save and restore errno around the
88842         block that sets it to 0.
88843         Reported by Gianluigi Tiesi <sherpya@netfarm.it>.
88845 2010-10-14  Bruno Haible  <bruno@clisp.org>
88847         socketlib: Fix.
88848         * modules/socketlib (Files): Add m4/sys_socket_h.m4. Needed for
88849         gl_PREREQ_SYS_H_WINSOCK2.
88850         Reported by Ian Beckwith <ianb@erislabs.net>.
88852 2010-10-13  Jim Meyering  <meyering@redhat.com>
88854         test-select-stdin.c: avoid warn_unused_result warnings
88855         * tests/test-select-stdin.c: Include "macros.h".
88856         ASSERT that read and fflush succeed.
88858 2010-10-13  Jim Meyering  <meyering@redhat.com>
88860         git-version-gen: do require git-VC'd files in cwd
88861         * build-aux/git-version-gen: Reject a git version string
88862         if there are no commits associated with the current directory.
88863         This avoids an unlikely false-positive (unrelated dir whose parent
88864         repository also contains a tag matching v*), as pointed out
88865         by Giuseppe Scrivano in
88866         http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/21843/focus=23664
88868 2010-10-13  Paul Eggert  <eggert@cs.ucla.edu>
88870         argv-iter: omit nonconforming declaration
88871         * lib/argv-iter.h (enum argv_iter_err): Omit the useless
88872         enum arg_iter_err declaration, which doesn't conform to C99.
88873         Solaris 10 cc warns about this.
88875 2010-10-13  Eric Blake  <eblake@redhat.com>
88877         termios: fix compilation on mingw
88878         * m4/termios_h.m4 (gl_TERMIOS_H_DEFAULTS): Set default.
88879         (gl_TERMIOS_H): Adjust it on mingw.
88880         * modules/termios (Makefile.am): Substitute new key.
88881         * lib/termios.in.h (includes): Make include_next conditional.
88882         * doc/posix-headers/termios.texi (termios.h): Update
88883         documentation.
88884         Reported by Daniel P. Berrange.
88886 2010-10-13  Jim Meyering  <meyering@redhat.com>
88888         git-version-gen: don't require that .git/ be in the current dir
88889         * build-aux/git-version-gen: Adjust this script so that it works
88890         when run from any working directory beneath the top-level .git/-
88891         containing directory.  Inspired by a patch from Giuseppe Scrivano,
88892         http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/21843/focus=21847
88894         test-select: avoid warn_unused_result warnings
88895         * tests/test-select.c: Include "macros.h".
88896         ASSERT that each call to read, write, and pipe succeeds.
88897         While not technically required, also check each "close".
88898         * modules/select-tests (Files): Add tests/macros.h.
88900         test-symlinkat: remove declaration of unused local
88901         * tests/test-symlinkat.c (main): Remove unused local, "buf".
88903         test-inttostr: avoid shadowing warnings
88904         * tests/test-inttostr.c (main): Rename local, "buf" to "b",
88905         and use malloc rather than the stack for the same reason as
88906         mentioned in the comment justifying the other allocation.
88908 2010-10-11  Bruno Haible  <bruno@clisp.org>
88910         stdlib: Allow multiple gnulib generated replacements to coexist.
88911         * lib/stdlib.in.h (struct random_data): Avoid identical redefinition.
88912         Reported by Sam Steingold <sds@gnu.org>.
88914 2010-10-11  Jim Meyering  <meyering@redhat.com>
88916         fix a documentation typo
88917         * doc/posix-functions/futimens.texi (futimens): Fix typo: s/itme/item/
88919 2010-10-11  Eric Blake  <eblake@redhat.com>
88921         futimens: work around Solaris 11 bug
88922         * m4/futimens.m4 (gl_FUNC_FUTIMENS): Detect the bug.
88923         * tests/test-futimens.h (test_futimens): Enhance, rather than
88924         weaken test.
88925         * doc/posix-functions/futimens.texi (futimens): Document the bug.
88927 2010-10-11  Paul Eggert  <eggert@cs.ucla.edu>
88929         Indentation.
88930         * lib/spawn.in.h (verify_POSIX_SPAWN_USEVFORK_no_overlap): Indent
88931         higher-level operators more to the left.
88933 2010-10-11  Jim Meyering  <meyering@redhat.com>
88935         test-futimens: avoid unwarranted test failure on Solaris 5.11
88936         * tests/test-futimens.h (test_futimens): When provoking EBADF, use an
88937         invalid file descriptor, so we don't provoke EFAULT from Solaris 5.11,
88938         because it tries to dereference the NULL name argument.
88940 2010-10-11  Bruno Haible  <bruno@clisp.org>
88942         Indentation.
88943         * lib/spawn.in.h (verify_POSIX_SPAWN_USEVFORK_no_overlap): Improve
88944         indentation.
88946 2010-10-11  Jim Meyering  <meyering@redhat.com>
88948         spawn.in.h: make indentation consistent with parentheses
88949         * lib/spawn.in.h (verify_POSIX_SPAWN_USEVFORK_no_overlap):
88950         Make indentation consistent with parentheses.
88952 2010-10-11  Gary V. Vaughan  <gary@gnu.org>
88954         Fix mismatched parens in previous commit
88955         * lib/spawn.in.h (verify_POSIX_SPAWN_USEVFORK_no_overlap): Fix mismatched
88956         parens.
88958 2010-10-10  Paul Eggert  <eggert@cs.ucla.edu>
88960         rewrite int foo[2*X-1] to verify(X) or to int foo[X?1:-1]
88962         * lib/float+.h (verify_sizeof_flt, verify_sizeof_dbl):
88963         (verify_sizeof_ldbl): Rewrite 2*X-1 to X?1:-1.
88964         * lib/malloca.c: Include "verify.h".
88965         (verify1): Remove, replacing with a verify call.
88966         * lib/relocwrapper.c (verify1): Likewise.
88967         * lib/vasnprintf.c (mp_limb_verify, mp_twolimb_verify, TCHAR_T_verify):
88968         Likewise.
88969         * modules/malloca (Depends-on): Add 'verify'.
88970         * modules/relocatable-prog-wrapper (Depends-on): Add 'verify'.
88971         * modules/vasnprintf (Depends-on): Add 'verify'.
88972         * modules/unistdio/u8-vasnprintf (Depends-on): Likewise.
88973         * modules/unistdio/u8-u8-vasnprintf (Depends-on): Likewise.
88974         * modules/unistdio/u16-vasnprintf (Depends-on): Likewise.
88975         * modules/unistdio/u16-u16-vasnprintf (Depends-on): Likewise.
88976         * modules/unistdio/u32-vasnprintf (Depends-on): Likewise.
88977         * modules/unistdio/u32-u32-vasnprintf (Depends-on): Likewise.
88978         * modules/unistdio/ulc-vasnprintf (Depends-on): Likewise.
88980         prefer (X ? 1 : -1) when converting from boolean (1,0) to int (1,-1)
88982         Formerly the style was sometimes 2*X - 1, because the C standard
88983         was wrongly thought to disallow ?: in integral constant expressions.
88984         * lib/inet_ntop.c (verify_int_size): Rewrite 2*X-7 (!) to 4<=X?1:-1.
88985         * lib/signal.in.h (verify_NSIG_constraint): Rewrite 2*X-1 to X?1:-1.
88986         * lib/spawn.in.h (verify_POSIX_SPAWN_USEVFORK_no_overlap): Likewise.
88987         * lib/stdint.in.h (_verify_intmax_size): Likewise.
88988         * lib/time.in.h (struct __time_t_must_be_integral): Rewrite
88989         2 * ((time_t) 1 / 2 == 0) - 1 to (time_t) 1; this suffices to
88990         verify that time_t cannot be floating.
88992 2010-10-08  Eric Blake  <eblake@redhat.com>
88994         time: enforce recent POSIX ruling that time_t is integral
88995         * lib/time.in.h (__time_t_must_be_integral): Detect any
88996         problematic systems, allowing the rest of gnulib to assume POSIX.
88998 2010-10-08  Jim Meyering  <meyering@redhat.com>
89000         fdopendir: fix a bug on systems lacking openat and /proc support
89001         OpenBSD 4.7 is one such system.  The most noticeable effect was
89002         failure of any application making nontrivial use of fts: rm, du,
89003         chown, chmod etc.  E.g., "mkdir -p a/b; ./rm -rf a" would fail with
89004           ./rm: traversal failed: `a': Bad file descriptor
89005         Debugging that, you see that even though FD 6 was closed just
89006         prior to the opendir call in fd_clone_opendir, its resulting
89007         dir->dd_fd was 8, rather than the expected value of 6:
89009         Breakpoint 3, fdopendir_with_dup (fd=6, older_dupfd=-1) at fdopendir.c:93
89010         93                close (fd);
89011         (gdb) n
89012         94                dir = fd_clone_opendir (dupfd);
89013         (gdb) n
89014         95                saved_errno = errno;
89015         (gdb) p dir->dd_fd
89016         $11 = 8
89018         Notice how it closes FD 6, then gets a DIR* pointer using FD 8.
89019         The problem is that on OpenBSD, fd_clone_opendir has to resort
89020         to using the old-style save/restore CWD mechanism, due to its
89021         lack of openat/proc support, and *that* would steal the FD (6)
89022         that opendir was supposed to use.
89024         The fix is to squirrel away the desired FD so that save_cwd uses a
89025         different one, and then free the dest FD right before calling opendir.
89026         That guarantees opendir will use the required file descriptor.
89028         * lib/fdopendir.c (fd_clone_opendir): Handle the above.
89030 2010-10-08  Bruno Haible  <bruno@clisp.org>
89032         sys_select: Avoid warning due to undeclared memset() on OpenBSD 4.5.
89033         * lib/sys_select.in.h: Include <string.h> also on OpenBSD.
89035 2010-10-08  Bruno Haible  <bruno@clisp.org>
89037         nanosleep: Make replacement POSIX compliant.
89038         * lib/nanosleep.c (nanosleep): Return -1/EINVAL if the delay's tv_nsec
89039         is out of range.
89040         Reported by Jim Meyering.
89042 2010-10-08  Paul Eggert  <eggert@cs.ucla.edu>
89044         bootstrap: add hook for altering gnulib.mk, for Bison
89045         * build-aux/bootstrap (gnulib_mk_hook): New function, so that
89046         the Bison bootstrapping process can rewrite file names and variables
89047         in this file before later parts of 'bootstrap' use the file.
89048         Bison wants to include lib/gnulib.mk from the top-level makefile,
89049         so it needs the file names in this file to be relative to the top
89050         level, not relative to lib; plus it needs variable names to be
89051         rewritten.
89052         (slurp): Use the new function.
89054         bootstrap: reformat for readability
89055         * build-aux/bootstrap: Rewrite to avoid lines longer than 80 columns.
89057 2010-10-08  Eric Blake  <eblake@redhat.com>
89059         docs: update cygwin progress
89060         * doc/posix-functions/cacos.texi (cacos): Added after cygwin
89061         1.7.7.
89062         * doc/posix-functions/cacosf.texi (cacosf): Likewise.
89063         * doc/posix-functions/cacosh.texi (cacosh): Likewise.
89064         * doc/posix-functions/cacoshf.texi (cacoshf): Likewise.
89065         * doc/posix-functions/carg.texi (carg): Likewise.
89066         * doc/posix-functions/cargf.texi (cargf): Likewise.
89067         * doc/posix-functions/casin.texi (casin): Likewise.
89068         * doc/posix-functions/casinf.texi (casinf): Likewise.
89069         * doc/posix-functions/casinh.texi (casinh): Likewise.
89070         * doc/posix-functions/casinhf.texi (casinhf): Likewise.
89071         * doc/posix-functions/catan.texi (catan): Likewise.
89072         * doc/posix-functions/catanf.texi (catanf): Likewise.
89073         * doc/posix-functions/catanh.texi (catanh): Likewise.
89074         * doc/posix-functions/catanhf.texi (catanhf): Likewise.
89075         * doc/posix-functions/ccos.texi (ccos): Likewise.
89076         * doc/posix-functions/ccosf.texi (ccosf): Likewise.
89077         * doc/posix-functions/ccosh.texi (ccosh): Likewise.
89078         * doc/posix-functions/ccoshf.texi (ccoshf): Likewise.
89079         * doc/posix-functions/cexp.texi (cexp): Likewise.
89080         * doc/posix-functions/cexpf.texi (cexpf): Likewise.
89081         * doc/posix-functions/cimag.texi (cimag): Likewise.
89082         * doc/posix-functions/cimagf.texi (cimagf): Likewise.
89083         * doc/posix-functions/clog.texi (clog): Likewise.
89084         * doc/posix-functions/clogf.texi (clogf): Likewise.
89085         * doc/posix-functions/conj.texi (conj): Likewise.
89086         * doc/posix-functions/conjf.texi (conjf): Likewise.
89087         * doc/posix-functions/cpow.texi (cpow): Likewise.
89088         * doc/posix-functions/cpowf.texi (cpowf): Likewise.
89089         * doc/posix-functions/cproj.texi (cproj): Likewise.
89090         * doc/posix-functions/cprojf.texi (cprojf): Likewise.
89091         * doc/posix-functions/creal.texi (creal): Likewise.
89092         * doc/posix-functions/crealf.texi (crealf): Likewise.
89093         * doc/posix-functions/csin.texi (csin): Likewise.
89094         * doc/posix-functions/csinf.texi (csinf): Likewise.
89095         * doc/posix-functions/csinh.texi (csinh): Likewise.
89096         * doc/posix-functions/csinhf.texi (csinhf): Likewise.
89097         * doc/posix-functions/csqrt.texi (csqrt): Likewise.
89098         * doc/posix-functions/csqrtf.texi (csqrtf): Likewise.
89099         * doc/posix-functions/ctan.texi (ctan): Likewise.
89100         * doc/posix-functions/ctanf.texi (ctanf): Likewise.
89101         * doc/posix-functions/ctanh.texi (ctanh): Likewise.
89102         * doc/posix-functions/ctanhf.texi (ctanhf): Likewise.
89103         * doc/posix-headers/complex.texi (complex.h): Likewise.
89105 2010-10-07  Jim Meyering  <meyering@redhat.com>
89107         parse-datetime: avoid compilation failure on OpenBSD 4.7
89108         * lib/parse-datetime.y (_STDLIB_H) [_STDLIB_H_]: Define.
89109         This works around a compilation failure on OpenBSD 4.7:
89110         http://thread.gmane.org/gmane.comp.parsers.bison.bugs/3418
89112 2010-10-07  Eric Blake  <eblake@redhat.com>
89114         docs: update cygwin progress
89115         * doc/glibc-functions/mkostemp.texi (mkostemp): Added in cygwin
89116         1.7.6.
89117         * doc/glibc-functions/mkostemps.texi (mkostemps): Likewise.
89118         * doc/posix-headers/fenv.texi (fenv.h): Added after cygwin 1.7.7.
89119         * doc/posix-functions/feclearexcept.texi (feclearexcept): Likewise.
89120         * doc/posix-functions/fegetenv.texi (fegetenv): Likewise.
89121         * doc/posix-functions/fegetexceptflag.texi (fegetexceptflag):
89122         Likewise.
89123         * doc/posix-functions/fegetround.texi (fegetround): Likewise.
89124         * doc/posix-functions/feholdexcept.texi (feholdexcept): Likewise.
89125         * doc/posix-functions/feraiseexcept.texi (feraiseexcept):
89126         Likewise.
89127         * doc/posix-functions/fesetenv.texi (fesetenv): Likewise.
89128         * doc/posix-functions/fesetexceptflag.texi (fesetexceptflag):
89129         Likewise.
89130         * doc/posix-functions/fesetround.texi (fesetround): Likewise.
89131         * doc/posix-functions/fetestexcept.texi (fetestexcept): Likewise.
89132         * doc/posix-functions/feupdateenv.texi (feupdateenv): Likewise.
89133         * doc/glibc-functions/feenableexcept.texi (feenableexcept):
89134         Likewise.
89135         * doc/glibc-functions/fedisableexcept.texi (fedisableexcept):
89136         Likewise.
89137         * doc/glibc-functions/fegetexcept.texi (fegetexcept): Likewise.
89139         docs: update parse-datetime history
89140         * doc/parse-datetime.texi (Authors of parse_datetime): Better
89141         documentation of this function's history and alternatives.
89143         cygwin: use more robust version check
89144         * m4/memmem.m4 (gl_FUNC_MEMMEM_SIMPLE, gl_FUNC_MEMMEM): Don't
89145         exclude an eventual cygwin 1.9.1.
89146         * m4/strstr.m4 (gl_FUNC_STRSTR_SIMPLE, gl_FUNC_STRSTR): Likewise.
89147         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR_SIMPLE)
89148         (gl_FUNC_STRCASESTR): Likewise.
89149         Reported by Bruno Haible.
89151 2010-10-06  Bruno Haible  <bruno@clisp.org>
89153         string, sys_select: Avoid #including large headers unless necessary.
89154         * lib/string.in.h: Don't include <unistd.h> except on NetBSD.
89155         * lib/sys_select.in.h: Don't include <string.h> except on Solaris,
89156         OSF/1, BeOS, Haiku.
89157         Reported by Jim Meyering.
89159 2010-10-05  Eric Blake  <eblake@redhat.com>
89161         memmem, strstr, strcasestr: fix bug with long periodic needle
89162         * lib/str-two-way.h (two_way_long_needle): Avoid bug with long
89163         periodic needle having false positive.
89164         * m4/memmem.m4 (gl_FUNC_MEMMEM_SIMPLE): Detect bug in glibc 2.12
89165         and cygwin 1.7.7.
89166         (gl_FUNC_MEMMEM): Be more pessimistic when cross-compiling.
89167         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR_SIMPLE)
89168         (gl_FUNC_STRCASESTR): Likewise.
89169         * m4/strstr.m4 (gl_FUNC_STRSTR_SIMPLE, gl_FUNC_STRSTR): Likewise.
89170         * tests/test-memmem.c (main): Expose the bug.
89171         * tests/test-strcasestr.c (main): Likewise.
89172         * tests/test-strstr.c (main): Likewise.
89173         * tests/test-c-strcasestr.c (main): Likewise.
89174         * doc/glibc-functions/memmem.texi (memmem): Document the bug.
89175         * doc/posix-functions/strstr.texi (strstr): Likewise.
89176         * doc/glibc-functions/strcasestr.texi (strcasestr): Likewise.
89177         Reported via http://sourceware.org/bugzilla/show_bug.cgi?id=12092
89179 2010-10-05  Paul Eggert  <eggert@cs.ucla.edu>
89181         parse-datetime: do some more renaming
89182         * doc/parse-datetime.texi (Authors of parse_datetime): Call it
89183         parse_datetime, not get_date.  Mention the renaming.
89184         * lib/parse-datetime.y:  Call it parse_datetime, not getdate,
89185         in comments.
89186         * m4/bison.m4: Likewise.
89188 2010-10-05  Eric Blake  <eblake@redhat.com>
89190         parse-datetime: better name than get_date
89191         * NEWS: Reword the deprecation notice.
89192         * modules/get_date: Rename to modules/parse-datetime.
89193         * modules/get_date-tests: Rename to modules/parse-datetime-tests.
89194         * m4/get_date.m4: Rename to m4/parse-datetime.m4.
89195         * lib/get_date.y: Rename to lib/parse-datetime.y.
89196         * tests/test-get_date.c: Rename to tests/test-parse-datetime.c.
89197         * doc/get_date.texi: Rename to doc/parse-datetime.texi.
89198         * doc/getdate.texi: Provide fallback wrapper.
89199         * lib/getdate.h: Move guts, and wrap...
89200         * lib/parse-datetime.h: ...new file.
89201         * lib/parse-datetime.y (get_date): Rename...
89202         (parse_datetime): ...to this.
89203         * m4/parse-datetime.m4 (gl_GET_DATE): Rename...
89204         (gl_PARSE_DATETIME): ...to this.
89205         * doc/posix-functions/getdate.texi (get_date): Provide fallback
89206         documentation.
89207         * modules/getdate (Files): Provide fallback docs and header.
89208         (Notice, Depends-on): Update references.
89209         * tests/test-parse-datetime.c: Likewise.
89210         * DEPENDENCIES: Likewise.
89211         * MODULES.html.sh (Date and time <time.h>): Likewise.
89212         * doc/parse-datetime.texi (Date input formats)
89213         (Authors of parse_datetime): Likewise.
89214         * modules/parse-datetime (Files, configure.ac, Makefile.am)
89215         (Include): Likewise.
89216         * modules/parse-datetime-tests (Files, Makefile.am): Likewise.
89217         * gnulib-tool: Likewise.
89218         * m4/bison.m4 (gl_BISON): Likewise.
89219         Suggested by Bruno Haible.
89221 2010-10-05  Paul Eggert  <eggert@cs.ucla.edu>
89223         more ports to Solaris tr, which needs [] around ranges
89224         * gnulib-tool: Solaris tr needs [] around ranges.
89225         * m4/fnmatch.m4 (gl_FUNC_FNMATCH_POSIX): Likewise.
89226         * tests/test-pipe-filter-gi1.c (main): Likewise.
89227         * tests/test-pipe-filter-ii1.c (main): Likewise.
89229 2010-10-05  Eric Blake  <eblake@redhat.com>
89231         bootstrap: fix Solaris regression
89232         * build-aux/bootstrap (check_versions): Solaris tr still needs []
89233         around ranges.
89234         Reported by Pádraig Brady.
89236         bootstrap: work with pkg-config
89237         * build-aux/bootstrap (check_versions): Also transliterate - in
89238         prerequisite name.
89239         (print_versions): Be robust to any \ in $buildreq.  Avoid listing
89240         prerequisites that were already found, to avoid confusion.
89241         Reported by Justin Clift.
89243         faccessat: remove unused wrappers
89244         * lib/openat.h (accessat, euidaccesat): Delete, since the mere
89245         presence of these wrappers dragged in -lgen on Solaris.
89246         Reported by Clemens Brogi; fix suggested by Paul Eggert.
89248 2010-10-05  Jim Meyering  <meyering@redhat.com>
89250         tests: require @PRAGMA_COLUMNS@ with each @PRAGMA_SYSTEM_HEADER@
89251         * Makefile (sc_pragma_columns): New syntax-check rule.
89253 2010-10-04  Bruno Haible  <bruno@clisp.org>
89255         gnulib-tool: Synthesize appropriate _LDFLAGS for a libtool library.
89256         * gnulib-tool (func_emit_lib_Makefile_am): When preparing for a libtool
89257         library, put '-no-undefined' and the link dependencies into _LDFLAGS.
89258         Reported by Bruce Korb and Eric Blake.
89260 2010-10-04  Bruno Haible  <bruno@clisp.org>
89262         threadlib: Make option --with-libpth-prefix work.
89263         * m4/threadlib.m4 (gl_THREADLIB_BODY): When testing whether pth works,
89264         use $LIBPTH, not just -lpth.
89266 2010-10-04  Bruno Haible  <bruno@clisp.org>
89268         Avoid line length limitation from HP NonStop system header files.
89269         * m4/include_next.m4 (gl_INCLUDE_NEXT): Define also PRAGMA_COLUMNS.
89270         * lib/arpa_inet.in.h: Use PRAGMA_COLUMNS.
89271         * lib/ctype.in.h: Likewise.
89272         * lib/dirent.in.h: Likewise.
89273         * lib/errno.in.h: Likewise.
89274         * lib/fcntl.in.h: Likewise.
89275         * lib/float.in.h: Likewise.
89276         * lib/getopt.in.h: Likewise.
89277         * lib/iconv.in.h: Likewise.
89278         * lib/inttypes.in.h: Likewise.
89279         * lib/langinfo.in.h: Likewise.
89280         * lib/locale.in.h: Likewise.
89281         * lib/math.in.h: Likewise.
89282         * lib/netdb.in.h: Likewise.
89283         * lib/netinet_in.in.h: Likewise.
89284         * lib/poll.in.h: Likewise.
89285         * lib/pthread.in.h: Likewise.
89286         * lib/pty.in.h: Likewise.
89287         * lib/sched.in.h: Likewise.
89288         * lib/se-selinux.in.h: Likewise.
89289         * lib/search.in.h: Likewise.
89290         * lib/signal.in.h: Likewise.
89291         * lib/spawn.in.h: Likewise.
89292         * lib/stdarg.in.h: Likewise.
89293         * lib/stddef.in.h: Likewise.
89294         * lib/stdint.in.h: Likewise.
89295         * lib/stdio.in.h: Likewise.
89296         * lib/stdlib.in.h: Likewise.
89297         * lib/string.in.h: Likewise.
89298         * lib/strings.in.h: Likewise.
89299         * lib/sys_file.in.h: Likewise.
89300         * lib/sys_ioctl.in.h: Likewise.
89301         * lib/sys_select.in.h: Likewise.
89302         * lib/sys_socket.in.h: Likewise.
89303         * lib/sys_stat.in.h: Likewise.
89304         * lib/sys_time.in.h: Likewise.
89305         * lib/sys_times.in.h: Likewise.
89306         * lib/sys_utsname.in.h: Likewise.
89307         * lib/sys_wait.in.h: Likewise.
89308         * lib/sysexits.in.h: Likewise.
89309         * lib/termios.in.h: Likewise.
89310         * lib/time.in.h: Likewise.
89311         * lib/unistd.in.h: Likewise.
89312         * lib/wchar.in.h: Likewise.
89313         * lib/wctype.in.h: Likewise.
89314         * modules/arpa_inet (Makefile.am): Substitute PRAGMA_COLUMNS.
89315         * modules/ctype (Makefile.am): Likewise.
89316         * modules/dirent (Makefile.am): Likewise.
89317         * modules/errno (Makefile.am): Likewise.
89318         * modules/fcntl-h (Makefile.am): Likewise.
89319         * modules/float (Makefile.am): Likewise.
89320         * modules/getopt-posix (Makefile.am): Likewise.
89321         * modules/iconv-h (Makefile.am): Likewise.
89322         * modules/inttypes (Makefile.am): Likewise.
89323         * modules/langinfo (Makefile.am): Likewise.
89324         * modules/locale (Makefile.am): Likewise.
89325         * modules/math (Makefile.am): Likewise.
89326         * modules/netdb (Makefile.am): Likewise.
89327         * modules/netinet_in (Makefile.am): Likewise.
89328         * modules/poll-h (Makefile.am): Likewise.
89329         * modules/pthread (Makefile.am): Likewise.
89330         * modules/pty (Makefile.am): Likewise.
89331         * modules/sched (Makefile.am): Likewise.
89332         * modules/search (Makefile.am): Likewise.
89333         * modules/selinux-h (Makefile.am): Likewise.
89334         * modules/signal (Makefile.am): Likewise.
89335         * modules/spawn (Makefile.am): Likewise.
89336         * modules/stdarg (Makefile.am): Likewise.
89337         * modules/stddef (Makefile.am): Likewise.
89338         * modules/stdint (Makefile.am): Likewise.
89339         * modules/stdio (Makefile.am): Likewise.
89340         * modules/stdlib (Makefile.am): Likewise.
89341         * modules/string (Makefile.am): Likewise.
89342         * modules/strings (Makefile.am): Likewise.
89343         * modules/sys_file (Makefile.am): Likewise.
89344         * modules/sys_ioctl (Makefile.am): Likewise.
89345         * modules/sys_select (Makefile.am): Likewise.
89346         * modules/sys_socket (Makefile.am): Likewise.
89347         * modules/sys_stat (Makefile.am): Likewise.
89348         * modules/sys_time (Makefile.am): Likewise.
89349         * modules/sys_times (Makefile.am): Likewise.
89350         * modules/sys_utsname (Makefile.am): Likewise.
89351         * modules/sys_wait (Makefile.am): Likewise.
89352         * modules/sysexits (Makefile.am): Likewise.
89353         * modules/termios (Makefile.am): Likewise.
89354         * modules/time (Makefile.am): Likewise.
89355         * modules/unistd (Makefile.am): Likewise.
89356         * modules/wchar (Makefile.am): Likewise.
89357         * modules/wctype (Makefile.am): Likewise.
89359 2010-10-04  Bruno Haible  <bruno@clisp.org>
89361         read-file tests: Avoid a test failure on NonStop Kernel.
89362         * tests/test-read-file.c (main): Don't assume that /etc/resolv.conf is
89363         a regular file.
89364         Reported by Joachim Schmitz <schmitz@hp.com>.
89366 2010-10-03  Bruno Haible  <bruno@clisp.org>
89368         gnulib-tool: Fixes for --create-testdir with --libtool.
89369         * gnulib-tool (func_get_automake_snippet): Don't augment
89370         EXTRA_lib_SOURCES for the pt_chown module, since pt_chown.o goes into
89371         an executable.
89372         (func_create_testdir): Handle module 'alloca' like func_import.
89373         Reported by Bruce Korb <bruce.korb@gmail.com>.
89375 2010-10-03  Paul Eggert  <eggert@cs.ucla.edu>
89377         Avoid some lines longer than 80 characters.
89378         * lib/stdint.in.h: Break long comment lines.
89379         * lib/math.in.h: Likewise.
89380         (_GL_NUM_UINT_WORDS): New macro, for readability.
89381         (gl_signbitf, gl_signbitd, gl_signbitl): Use it.
89382         * lib/stdio.in.h: Break lines in _GL_WARN_ON_USE calls.
89383         * lib/stdlib.in.h: Likewise.
89384         * lib/spawn.in.h: Likewise.
89385         * lib/sys_socket.in.h: Update an URL.
89386         * lib/sys_stat.in.h: Break long line.
89388 2010-10-03  Reuben Thomas  <rrt@sc3d.org>
89390         Improve pmccabe2html.
89391         * build-aux/pmccabe2html: Add CYCLO_SRCS variable, and make
89392         cyclo-$(PACKAGE).html depend on it, so the HTML file is remade
89393         when the sources change. Remove the line in the HTML about "Used
89394         ranges" (which implied that there might be other unused ranges),
89395         rename "Resume" to "Summary" (easier to understand for more users).
89396         * build-aux/pmccabe.css: Removing the dashed dividers, some unused
89397         styles, and some unnecessary blank lines.
89399 2010-10-03  Bruno Haible  <bruno@clisp.org>
89400             Joachim Schmitz  <schmitz@hp.com>  (tiny change)
89402         acl: Add support for ACLs on NonStop Kernel.
89403         * m4/acl.m4 (gl_FUNC_ACL): For Solaris, test for facl(), not for acl().
89404         Check whether the function aclsort() exists.
89405         * lib/acl-internal.h: For Solaris, test HAVE_FACL, not HAVE_ACL.
89406         (acl_nontrivial) [HAVE_ACLSORT]: New declaration.
89407         * lib/file-has-acl.c: For Solaris, test HAVE_FACL, not HAVE_ACL.
89408         (acl_nontrivial [HAVE_ACLSORT]: New function.
89409         (file_has_acl): Implement for NonStop Kernel.
89410         * lib/set-mode-acl.c: For Solaris, test HAVE_FACL, not HAVE_ACL.
89411         (qset_acl): Implement for NonStop Kernel.
89412         * lib/copy-acl.c (qcopy_acl): Implement for NonStop Kernel.
89413         * tests/test-sameacls.c: For Solaris, test HAVE_FACL, not HAVE_ACL.
89414         (main): Implement for NonStop Kernel.
89415         * tests/test-file-has-acl.sh (acl_flavor): Set to 'nsk' on NonStop
89416         Kernel. Handle this flavor.
89417         * tests/test-set-mode-acl.sh: Likewise.
89418         * tests/test-copy-acl.sh: Likewise.
89419         * tests/test-copy-file.sh: Likewise.
89421 2010-10-03  Bruno Haible  <bruno@clisp.org>
89423         Info about ACLs on NonStop Kernel.
89424         * doc/acl-resources.txt: Add info about NonStop Kernel.
89425         References by Joachim Schmitz <schmitz@hp.com>.
89427 2010-10-02  Bruno Haible  <bruno@clisp.org>
89429         Define missing EDQUOT on NonStop Kernel.
89430         * lib/errno.in.h (EDQUOT): Assign a value if missing.
89431         * lib/strerror.c (rpl_strerror): Handle missing EDQUOT.
89432         * m4/errno_h.m4 (gl_HEADER_ERRNO_H): Also test whether EDQUOT is
89433         missing.
89434         * doc/posix-headers/errno.texi: Mention the NSK bug.
89435         * doc/posix-functions/strerror.texi: Mention the workaround on NSK.
89436         Reported by Joachim Schmitz <schmitz@hp.com>.
89438 2010-10-02  Bruno Haible  <bruno@clisp.org>
89440         Update doc for POSIX:2008.
89441         * doc/posix-headers/*.texi [except ucontext.texi, sys_timeb.texi]:
89442         Update URL of POSIX specification.
89444 2010-10-02  Bruno Haible  <bruno@clisp.org>
89446         gnulib-tool: In testdirs, use the newest available config.{guess.sub}.
89447         * gnulib-tool (func_create_testdir): Use config.guess and config.sub
89448         from gnulib, not from Automake.
89450 2010-10-02  Bruno Haible  <bruno@clisp.org>
89452         New module 'system-posix'.
89453         * modules/system-posix: New file.
89454         * lib/stdlib.in.h: Include <sys/wait.h> only when the 'system-posix'
89455         module is present.
89456         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize
89457         GNULIB_SYSTEM_POSIX.
89458         * modules/stdlib (Depends-on): Remove sys_wait.
89459         (Makefile.am): Substitute GNULIB_SYSTEM_POSIX.
89460         * doc/posix-functions/system.texi: Mention the new module.
89461         * doc/posix-headers/stdlib.texi: Likewise.
89462         * tests/test-stdlib.c: If GNULIB_TEST_SYSTEM_POSIX is not defined,
89463         define test_sys_wait_macros to a no-op.
89464         Reported by Sam Steingold <sds@gnu.org>.
89466 2010-09-30  Bruno Haible  <bruno@clisp.org>
89468         More renaming from 'getdate' to 'get_date'.
89469         * doc/get_date.texi: Renamed from doc/getdate.texi.
89470         * modules/get_date (Files): Update.
89471         * MODULES.html.sh (Date and time <time.h>): Update.
89472         * DEPENDENCIES: Update.
89473         * gnulib-tool: Update comment.
89474         * m4/bison.m4 (gl_BISON): Likewise.
89475         * m4/get_date.m4 (gl_GET_DATE): Likewise.
89477 2010-09-30  Justin Clift  <jclift@redhat.com>  (tiny change)
89479         bootstrap: support ACLOCAL_FLAGS during aclocal
89480         * build-aux/bootstrap (aclocal): Honor ACLOCAL_FLAGS, so the user
89481         can add additional -I dir for third-party .m4 files.
89483 2010-09-30  Eric Blake  <eblake@redhat.com>
89485         bootstrap: use glibtoolize on MacOS
89486         * build-aux/bootstrap (check_versions): Convert libtool into
89487         libtoolize.
89488         (tool search): Move libtool check earlier, and look for
89489         glibtoolize for MacOS.
89490         (gnulib_tool_options): Auto-add --libtool when appropriate.
89491         Reported by Justin Clift.
89493         poll: fix typo that broke test on MacOS
89494         * m4/poll.m4 (gl_FUNC_POLL): Add missing test.
89495         Reported by Justin Clift.
89497         getdate: rename to get_date
89498         Note: getdate.h is not renamed, to minimize client impact.
89499         * modules/getdate: Mark obsolete.  Move old contents...
89500         * modules/get_date: ...to new module name.
89501         * modules/getdate-tests: Move...
89502         * modules/get_date-tests: ...here.
89503         * m4/getdate.m4: Move...
89504         * m4/get_date.m4: ...here, and rename gl_GETDATE to gl_GET_DATE.
89505         * lib/getdate.y: Move...
89506         * lib/get_date.y: ...here.
89507         * tests/test-getdate.c: Move...
89508         * tests/test-get_date.c: ...here.
89509         * doc/posix-functions/getdate.texi (getdate): Update name.
89510         * NEWS: Mention the change.
89512 2010-09-29  Bruno Haible  <bruno@clisp.org>
89514         Separate the module 'waitpid' from the module 'sys_wait'.
89515         * lib/sys_wait.in.h (waitpid): Declare only if the 'waitpid' module is
89516         present.
89517         * m4/sys_wait_h.m4 (gl_SYS_WAIT_MODULE_INDICATOR): Invoke
89518         gl_MODULE_INDICATOR_FOR_TESTS.
89519         (gl_SYS_WAIT_H_DEFAULTS): Initialize GNULIB_WAITPID.
89520         * modules/sys_wait (Depends-on): Remove waitpid.
89521         (Makefile.am): Substitute GNULIB_WAITPID.
89522         * modules/waitpid (configure.ac): Invoke gl_SYS_WAIT_MODULE_INDICATOR.
89523         * tests/test-sys_wait-c++.cc (GNULIB_NAMESPACE::waitpid): Check the
89524         signature only if the 'waitpid' module is present.
89525         * doc/posix-functions/waitpid.texi: Mention the 'waitpid' module.
89526         * NEWS: Mention the change.
89527         * modules/grantpt (Depends-on): Add waitpid.
89528         * modules/wait-process (Depends-on): Likewise.
89530 2010-09-29  Bruno Haible  <bruno@clisp.org>
89532         More tests for module 'sys_wait'.
89533         * modules/sys_wait-c++-tests: New file.
89534         * tests/test-sys_wait-c++.cc: New file.
89535         * modules/sys_wait-tests (Depends-on): Add sys_wait-c++-tests.
89536         Reported by Tatsuro MATSUOKA <tmacchant5@yahoo.co.jp>.
89538 2010-09-29  Bruno Haible  <bruno@clisp.org>
89540         New module 'waitpid'.
89541         * lib/waitpid.c: New file, extracted from lib/sys_wait.in.h.
89542         * lib/sys_wait.in.h: Include <sys/types.h>, c++defs.h, warn-on-use.h.
89543         Don't include <process.h>.
89544         (waitpid): Declare only, using modern idiom.
89545         * m4/waitpid.m4: New file.
89546         * m4/sys_wait_h.m4 (gl_SYS_WAIT_H): Check whether waitpid is declared.
89547         * modules/waitpid: New file.
89548         * modules/sys_wait (Depends-on): Add c++defs, warn-on-use, waitpid.
89549         (Makefile.am): Update.
89550         Reported by Tatsuro MATSUOKA <tmacchant5@yahoo.co.jp>.
89552 2010-09-28  Bruno Haible  <bruno@clisp.org>
89554         poll: Assume ANSI C.
89555         * lib/poll.c (poll): Use an ANSI C declaration.
89557 2010-09-28  Bruno Haible  <bruno@clisp.org>
89559         poll-h: Create poll.h on all platforms.
89560         * lib/poll.in.h: Use double-inclusion guard. Don't define POLL*,
89561         struct pollfd, nfds_t, INFTIM when the system has <poll.h>.
89562         * m4/poll_h.m4 (gl_POLL_H): Set HAVE_POLL_H. Invoke
89563         gl_CHECK_NEXT_HEADERS. Don't set POLL_H.
89564         (gl_REPLACE_POLL_H): Don't set POLL_H.
89565         (gl_POLL_H_DEFAULTS): Don't initialize POLL_H.
89566         * modules/poll-h (Depends-on): Add include_next.
89567         (Makefile.am): Create poll.h unconditionally. Substitute also
89568         HAVE_POLL_H, INCLUDE_NEXT, PRAGMA_SYSTEM_HEADER, NEXT_POLL_H.
89570 2010-09-28  Bruno Haible  <bruno@clisp.org>
89572         Tests for module 'poll-h'.
89573         * modules/poll-h-c++-tests: New file.
89574         * tests/test-poll-h-c++.cc: New file.
89576         Tests for module 'poll-h'.
89577         * modules/poll-h-tests: New file.
89578         * tests/test-poll-h.c: New file.
89580 2010-09-28  Bruno Haible  <bruno@clisp.org>
89582         poll-h: Ensure POLL{RD,WR}{NORM,BAND} are defined on glibc platforms.
89583         * modules/poll-h (Depends-on): Add 'extensions'.
89585 2010-09-28  Bruno Haible  <bruno@clisp.org>
89587         New module 'poll-h'.
89588         * lib/poll.in.h: Include c++defs.h and warn-on-use.h.
89589         (poll): Use modern idiom.
89590         * modules/poll-h: New file.
89591         * modules/poll (Files): Remove lib/poll.in.h.
89592         (Depends-on): Add poll-h.
89593         (configure.ac): Invoke gl_POLL_MODULE_INDICATOR.
89594         (Makefile.am): Move code for generation of poll.h to modules/poll-h.
89595         * m4/poll_h.m4: New file.
89596         * m4/poll.m4 (gl_FUNC_POLL): Require gl_POLL_H. Don't check for poll.h
89597         here. Don't set POLL_H here. Instead, set HAVE_POLL and REPLACE_POLL
89598         and invoke gl_REPLACE_POLL_H.
89599         * lib/poll.c: Use common idiom.
89600         * tests/test-poll.c: Likewise.
89601         * doc/posix-headers/poll.texi: Mention the poll-h module.
89602         Suggested by Eric Blake.
89604 2010-09-26  Bruno Haible  <bruno@clisp.org>
89606         sys_wait: Implement WSTOPSIG.
89607         * lib/sys_wait.in.h (WSTOPSIG): New macro.
89608         Reported by Simon Josefsson.
89610 2010-09-26  Simon Josefsson  <simon@josefsson.org>
89612         stdlib, sys_wait: Avoid compilation error on mingw.
89613         * lib/sys_wait.in.h: Include <signal.h>, for SIGTERM.
89615 2010-09-26  Bruno Haible  <bruno@clisp.org>
89617         stdlib tests: Avoid code duplication.
89618         * modules/stdlib-tests (Files): Add tests/test-sys_wait.h.
89619         * modules/sys_wait-tests (Files): Likewise.
89620         * tests/test-sys_wait.h: New file, extracted from tests/test-stdlib.c.
89621         * tests/test-stdlib.c: Include test-sys_wait.h.
89622         (main): Invoke test_sys_wait_macros.
89623         * tests/test-sys_wait.c: Include test-sys_wait.h.
89624         (main): Invoke test_sys_wait_macros.
89626 2010-09-25  Simon Josefsson  <simon@josefsson.org>
89628         * modules/getaddrinfo (Depends-on): Depend on the sockets module.
89629         * lib/getaddrinfo.c (use_win32_p): Call gl_sockets_startup to make
89630         sure Windows sockets are working before calling getaddrinfo.
89631         * tests/test-getaddrinfo.c (main): Don't call WSAStartup here.
89632         * doc/gnulib.texi (Windows sockets): Fix typo.
89634 2010-09-25  Bruno Haible  <bruno@clisp.org>
89636         Tests for module 'regex-quote'.
89637         * modules/regex-quote-tests: New file.
89638         * tests/test-regex-quote.c: New file.
89640         New module 'regex-quote'.
89641         * lib/regex-quote.h: New file.
89642         * lib/regex-quote.c: New file.
89643         * modules/regex-quote: New file.
89644         Suggested by Reuben Thomas <rrt@sc3d.org>.
89646 2010-09-24  Bruno Haible  <bruno@clisp.org>
89648         unistr/u8-strchr: Fix a test failure on i586 glibc systems.
89649         * tests/unistr/test-strchr.h (test_strchr): Disable an invalid check.
89651 2010-09-23  Bruno Haible  <bruno@clisp.org>
89653         setenv: Relax license.
89654         * modules/setenv (License): Change to LGPLv2+, with consent by Eric
89655         Blake.
89656         Requested by Eric Blake.
89658 2010-09-22  Bruno Haible  <bruno@clisp.org>
89660         termios: Relax license.
89661         * modules/termios (License): Change to LGPLv2+.
89662         Requested by Eric Blake.
89664 2010-09-22  Bruno Haible  <bruno@clisp.org>
89666         threadlib: Allow the package to change the default to 'no'.
89667         * m4/threadlib.m4 (gl_THREADLIB_EARLY_BODY): When
89668         gl_THREADLIB_DEFAULT_NO is defined, change the default to 'no'.
89669         Reported by Paul Eggert.
89671 2010-09-22  Pádraig Brady  <P@draigbrady.com>
89672             Bruno Haible  <bruno@clisp.org>
89674         Fix endless loop in mbmemcasecoll.
89675         * lib/mbmemcasecoll.c (apply_towlower): When mbrtowc returns 0, copy 1
89676         byte.
89677         * tests/test-mbmemcasecmp.h (test_ascii): Test embedded NULs.
89679 2010-09-22  Bruno Haible  <bruno@clisp.org>
89681         Tests for module 'memcoll'.
89682         * modules/memcoll-tests: New file.
89683         * tests/test-memcoll.c: New file, based on tests/test-memcmp.c.
89685         memcoll, xmemcoll: Clarify size vs. length.
89686         * modules/memcoll.c (memcoll0): Clarify specification.
89687         * modules/xmemcoll.c (xmemcoll0): Likewise. Reduce by 1 the lengths
89688         passed to collate_error.
89690 2010-09-22  Bruno Haible  <bruno@clisp.org>
89692         Tests for module 'memcasecmp'.
89693         * modules/memcasecmp-tests: New file.
89694         * tests/test-memcasecmp.c: New file, based on tests/test-memcmp.c.
89696 2010-09-22  Paul Eggert  <eggert@cs.ucla.edu>
89698         * lib/pthread.in.h: Add split double-inclusion guard, and include
89699         system <pthread.h> if there is one.  Use @@-style as in other
89700         .in.h files.  Define PTHREAD_COND_INITIALIZER etc. only if system
89701         pthread.h doesn't.
89702         (pthread_mutexattr_destroy, pthread_mutexattr_init):
89703         (pthread_mutexattr_settype, pthread_mutex_trylock):
89704         New static inline functions, if there's no system <pthread.h>.
89705         (pthread_spinlock_t, pthread_spin_init, pthread_spin_destroy):
89706         (pthread_spin_lock, pthread_spin_trylock, pthread_spin_unlock):
89707         Approximate with mutexes if the system lacks spinlocks, as in
89708         MacOS.
89709         * m4/pthread.m4 (gl_PTHREAD_CHECK): Require gl_PTHREAD_DEFAULTS.
89710         Add gl_CHECK_NEXT_HEADERS for pthread.h, and support the usual
89711         @@-style.  Check for spinlocks separately.
89712         (gl_PTHREAD_DEFAULTS): New macro.
89713         * modules/pthread: Redo to use a more typical style for in.h files.
89715 2010-09-21  Eric Blake  <eblake@redhat.com>
89717         net_if: enhance tests
89718         * tests/test-net_if.c (main): Move signature checks earlier.
89719         Print failures to stderr.
89720         * doc/posix-functions/if_freenameindex.texi (if_freenameindex):
89721         Document the bug that we do not yet fix.
89723 2010-09-21  Reuben Thomas  <rrt@sc3d.org>
89725         * doc/gnulib.texi (Out of memory handling): Rewrite section to be
89726         about gnulib, not GSS.
89728 2010-09-21  Reuben Thomas  <rrt@sc3d.org>
89730         * build-aux/pmccabe2html: Look for sources in src/ instead of lib/.
89731         * build-aux/pmccabe2html: Set cut_dir properly, and add mode line
89732         for Emacs.
89733         * build-aux/pmccabe2html: Make Makefile.am example code more
89734         cut-and-paste friendly.
89736 2010-09-21  Simon Josefsson  <simon@josefsson.org>
89738         * tests/test-net_if.c: New file.
89739         * modules/net_if-tests: New file.
89741 2010-09-20  Paul Eggert  <eggert@cs.ucla.edu>
89743         pthread: add pthread_spin_destroy
89744         * lib/pthread.in.h (pthread_spin_destroy): New function.
89746 2010-09-19  Bruno Haible  <bruno@clisp.org>
89748         gnulib-tool: Fix --help output.
89749         * gnulib-tool (func_usage): Fix help message.
89750         Reported by Reuben Thomas <rrt@sc3d.org>.
89752 2010-09-18  Jim Meyering  <meyering@redhat.com>
89754         maint.mk: avoid unexpanded \n in two diagnostics
89755         * top/maint.mk (sc_prohibit_always_true_header_tests):
89756         Don't use a literal \n in a halt=... assignment.  It would not be
89757         expanded, and the two \n bytes would appear in the diagnostic output
89758         rather than the desired newline.  Use halt=$$(printf ... instead.
89759         (sc_vulnerable_makefile_CVE-2009-4029): Likewise.
89761 2010-09-18  Bruno Haible  <bruno@clisp.org>
89763         netinet_in: Doc tweak.
89764         * doc/posix-headers/netinet_in.texi: Mention an affected platform.
89765         Reported by Mats Erik Andersson <mats.andersson@gisladisker.se>.
89767 2010-09-18  Jim Meyering  <meyering@redhat.com>
89769         init.sh: correct an outdated comment
89770         * tests/init.sh (create_exe_shims_):  s/function/alias/
89772         init.sh: don't let an ephemeral "*.exe" make us skip all dir entries
89773         * tests/init.sh (find_exe_basenames_): Don't give up on a directory if
89774         a file named "*.exe" is removed between the glob expansion and the
89775         processing of that oddly named file.
89777 2010-09-17  Eric Blake  <eblake@redhat.com>
89779         mirbsd: add some more support
89780         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): MirBSD is
89781         in BSD family.
89782         * m4/gc-random.m4 (gl_GC_RANDOM): MirBSD supports same random
89783         devices as OpenBSD.
89784         * m4/host-os.m4 (mirbsd): Add MirBSD.
89786         tests: fix unportable assumption on sys/wait.h
89787         * tests/test-sys_wait.c (main): Relax test.
89788         * tests/test-stdlib.c (main): Likewise.
89790         init.sh: accommodate directory with no .exes
89791         * tests/init.sh: Accomodate directory containing only scripts.
89793         tests: avoid compiler warning
89794         * tests/test-stdlib.c (main): Use the variable.
89796         fdutimens, fdutimensat: update signature, again
89797         * lib/utimens.h (gl_futimens): Delete, and move signature...
89798         (fdutimens): ...here.
89799         (fdutimensat): Rearrange signature.
89800         (lutimensat): Rename variable for clarity.
89801         * lib/fdutimensat.c (fdutimensat): Update signature.
89802         * lib/utimens.c (fdutimens): Likewise.
89803         (gl_futimens): Delete.
89804         (utimens, lutimens): Update callers.
89805         * lib/futimens.c (futimens): Likewise.
89806         * tests/test-fdutimensat.c: Likewise.
89807         * tests/test-utimens.c: Likewise.
89808         * tests/test-futimens.h: Update comment.
89809         * NEWS: Mention this.
89810         Suggested by Paul Eggert.
89812 2010-09-17  Bruno Haible  <bruno@clisp.org>
89814         Take over the maintenance of some older macros from Autoconf.
89815         * m4/error.m4 (AC_FUNC_ERROR_AT_LINE): New macro, from GNU Autoconf.
89816         * m4/lstat.m4 (AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): New macro, from
89817         GNU Autoconf.
89818         * m4/memcmp.m4 (AC_FUNC_MEMCMP): New macro, from GNU Autoconf.
89819         * m4/mktime.m4 (AC_FUNC_MKTIME): Change comment.
89821 2010-09-17  Eric Blake  <eblake@redhat.com>
89823         fdutimensat: drop atflag validation
89824         * lib/fdutimensat.c (fdutimensat): Allow AT_SYMLINK_NOFOLLOW even
89825         with valid fd, to close a race scenario where futimens is
89826         unsupported and FILE was replaced by a symlink.
89827         * tests/test-fdutimensat.c (do_fdutimens, main): Adjust test
89828         accordingly.
89829         Suggested by Paul Eggert.
89831 2010-09-16  Bruno Haible  <bruno@clisp.org>
89833         unlockpt: Fix declaration within GNULIB_POSIXCHECK.
89834         * lib/stdlib.in.h (unlockpt): Fix warning declaration.
89836 2010-09-16  Bruno Haible  <bruno@clisp.org>
89838         login_tty: Fix detection of function on FreeBSD, OpenBSD, NetBSD.
89839         * m4/pty.m4 (gl_FUNC_LOGIN_TTY): Augment LIBS while checking whether
89840         login_tty exists.
89841         Reported by Mats Erik Andersson <mats.andersson@gisladisker.se>.
89843 2010-09-16  Bruno Haible  <bruno@clisp.org>
89845         login_tty: Make the replacement code work on BSD systems.
89846         * lib/login_tty.c: Include <sys/ioctl.h>.
89847         (login_tty): Use ioctl TIOCSCTTY when available.
89848         * modules/login_tty (Depends-on): Add sys_ioctl.
89849         Reported by Mats Erik Andersson <mats.andersson@gisladisker.se>.
89851 2010-09-16  Bruno Haible  <bruno@clisp.org>
89853         login_tty: Stricter unit test.
89854         * modules/login_tty-tests (Depends-on): Add tcgetsid.
89855         * tests/test-login_tty.c (main): Also check the results of tcgetpgrp()
89856         and tcgetsid() after login_tty.
89857         Reported by Mats Erik Andersson <mats.andersson@gisladisker.se>.
89859 2010-09-16  Bruno Haible  <bruno@clisp.org>
89861         New module 'tcgetsid'.
89862         * lib/tcgetsid.c: New file.
89863         * m4/tcgetsid.m4: New file.
89864         * modules/tcgetsid: New file.
89865         * modules/termios (Depends-on): Add c++defs, warn-on-use.
89866         (Makefile.am): Ensure c++defs.h, warn-on-use.h get included. Substitute
89867         GNULIB_TCGETSID, HAVE_TCGETSID.
89868         * lib/termios.in.h: Include <sys/types.h>.
89869         (tcgetsid): New declaration.
89870         * m4/termios_h.m4 (gl_TERMIOS_H): Check whether tcgetsid is declared.
89871         (gl_TERMIOS_H_DEFAULTS): Initialize GNULIB_TCGETSID, HAVE_TCGETSID.
89872         * doc/posix-functions/tcgetsid.texi: Mention the new module.
89873         * tests/test-termios-c++.cc: Check GNULIB_NAMESPACE::tcgetsid.
89875 2010-09-16  Bruno Haible  <bruno@clisp.org>
89877         Tests for module 'termios'.
89878         * modules/termios-c++-tests: New file.
89879         * modules/termios-tests: New file.
89880         * tests/test-termios-c++.cc: New file.
89881         * tests/test-termios.c: New file.
89883         New module 'termios'.
89884         * modules/termios: New file.
89885         * lib/termios.in.h: New file.
89886         * m4/termios_h.m4: New file.
89887         * doc/posix-headers/termios.texi: Mention the new module.
89889 2010-09-16  Eric Blake  <eblake@redhat.com>
89891         fdutimensat: add an atflag parameter
89892         * lib/fdutimensat.c (fdutimensat): Add new parameter.
89893         * lib/utimens.h (fdutimensat): Update prototype.
89894         * tests/test-fdutimensat.c: Adjust test to match.
89895         * NEWS: Document the change.
89896         Suggested by Paul Eggert.
89898 2010-09-16  Bruno Haible  <bruno@clisp.org>
89900         Fix typos in comments.
89901         * lib/striconveh.h: Fix typo in comment.
89902         * lib/login_tty.c (login_tty): Likewise.
89904 2010-09-15  Bruno Haible  <bruno@clisp.org>
89906         stdlib: clarify MirBSD WEXITSTATUS bug
89907         * lib/stdlib.in.h: Clarify the MirBSD bug regarding WEXITSTATUS.
89908         * doc/posix-headers/stdlib.texi (stdlib.h): Likewise.
89910 2010-09-15  Eric Blake  <eblake@redhat.com>
89912         stdlib: work around MirBSD WEXITSTATUS bug
89913         * lib/stdlib.in.h (includes): Guarantee WEXITSTATUS.
89914         * modules/stdlib (Depends-on): Add sys_wait.
89915         * tests/test-sys_wait.c (main): Enhance test.
89916         * tests/test-stdlib.c (main): Likewise.
89917         * doc/posix-headers/stdlib.texi (stdlib.h): Document the bug.
89919         docs: mention MacOS issue with WEXITSTATUS(constant)
89920         * doc/posix-headers/sys_wait.texi (sys/wait.h): Document the
89921         issue.
89922         * doc/posix-headers/stdlib.texi (stdlib.h): Likewise.
89924         strnlen: add tests
89925         * modules/strnlen-tests: New file.
89926         * tests/test-strnlen.c: Likewise.
89928 2010-09-14  Bruno Haible  <bruno@clisp.org>
89930         unistr/base: Avoid link errors when module 'libunistring' is also used.
89931         * lib/unistr.in.h (u8_mbtouc_unsafe, u16_mbtouc_unsafe,
89932         u32_mbtouc_unsafe, u8_mbtouc, u16_mbtouc, u32_mbtouc, u8_mbtoucr,
89933         u16_mbtoucr, u32_mbtoucr, u8_uctomb_aux, u16_uctomb_aux, u32_uctomb):
89934         Declare also when HAVE_LIBUNISTRING is set.
89935         Reported by Pádraig Brady <P@draigbrady.com>.
89937 2010-09-14  Eric Blake  <eblake@redhat.com>
89939         test-rawmemchr: make more robust
89940         * modules/rawmemchr-tests (Files): Add zerosize-ptr.h, mmap-anon.m4.
89941         (Depends-on, configure.ac): Add needed prerequisites to use it.
89942         * modules/memchr-tests (Files, Depends-on, configure.ac):
89943         Likewise, to avoid implicit reliance on memchr module prereqs.
89944         * tests/test-memchr.c (main): Ensure proper masking.
89945         * tests/test-rawmemchr.c (main): Likewise.  Detect oversized
89946         reads.
89948         memchr: detect glibc Alpha bug
89949         Avoids http://sourceware.org/bugzilla/show_bug.cgi?id=12019.
89950         * m4/memchr.m4 (gl_FUNC_MEMCHR): Detect glibc 2.11.2 failure on
89951         Alpha.
89952         * doc/posix-functions/memchr.texi (memchr): Tweak wording.
89953         * tests/test-memchr.c (main): Enhance test.
89954         Reported by Nelson H. F. Beebe.
89956 2010-09-13  Paul Eggert  <eggert@cs.ucla.edu>
89958         fts, getcwd, glob: audit for dirfd returning -1
89959         * lib/fts.c (opendir): Remove #define; no longer used.
89960         (opendirat): New arg PDIR_FD.  All callers changed.
89961         (fts_build, _opendir2): Use new opendirat to avoid the need for
89962         dirfd, or for checking whether dirfd returns a negative value.
89963         Don't use opendir; always use openat followed by fdopendir.
89964         * lib/getcwd.c (__getcwd): Don't reset fd; fdopendir no longer clobbers
89965         it.
89966         * lib/glob.c (link_exists_p): Add comment explaining why dirfd never
89967         returns -1 here.
89968         * modules/fts (Depends-on): Remove dirfd.
89969         * modules/getcwd (Depends-on): Likewise.
89971 2010-09-13  Eric Blake  <eblake@redhat.com>
89973         float: fix broken MirBSD header
89974         * m4/float_h.m4 (gl_FLOAT_H): MirBSD copied OpenBSD's bug.
89975         * doc/posix-headers/float.texi (float.h): Document it.
89977 2010-09-13  Paul Eggert  <eggert@cs.ucla.edu>
89979         fts: use O_NOFOLLOW to avoid race condition when opening a directory
89980         * lib/fts.c (opendirat): New arg extra_flags.
89981         (__opendir2): Use it to avoid following symlinks when opening
89982         a directory, if symlinks are not supposed to be followed.  See
89983         <http://lists.gnu.org/r/bug-gnulib/2010-09/msg00213.html>.
89985         fdopendir: preserve argument fd before returning
89986         * lib/fdopendir.c: Adjust comments to say POSIX, not Solaris.
89987         (fdopendir_with_dup, fd_clone_opendir): New static functions.
89988         (fdopendir): Use them, arranging for FD to be open to the same
89989         directory that it was when it started.  (It might be temporarily
89990         closed while fdopendir is running, so this not thread- or
89991         signal-safe.)  Be careful to do the right thing even when file
89992         descriptors are scarce and dup fails with errno == EMFILE.  See
89993         <http://lists.gnu.org/r/bug-gnulib/2010-09/msg00208.html>.
89995 2010-09-10  Paolo Bonzini  <bonzini@gnu.org>
89997         regex: Pass the system regex if its only problem is 32-bit regoff_t.
89998         * NEWS: Document change.
89999         * m4/regex.m4: Disable test for regoff_t size.
90001 2010-09-13  Jim Meyering  <meyering@redhat.com>
90003         fts: don't operate on an invalid file descriptor after failed dup
90004         * lib/fts.c (fts_build): Don't call set_cloexec_flag on a
90005         negative file descriptor.
90007 2010-09-12  Paul Eggert  <eggert@cs.ucla.edu>
90009         savedir: add streamsavedir, deprecate fdsavedir
90010         * NEWS: Mention deprecation of fdsavedir.
90011         * lib/savedir.c (streamsavedir): New extern function, whose name
90012         ends in "savedir" to be consistent with the others.  This differs
90013         from savedirstream in that it doesn't close its argument.  The
90014         next version of GNU tar will use this instead of fdsavedir, to
90015         avoid some race conditions and conserve file descriptors.
90016         (savedirstream): Reimplement as a wrapper around streamsavedir.
90017         (fdsavedir): Add a comment deprecating this function.  As far as
90018         I know, only GNU tar used it, and GNU tar doesn't need it any more.
90019         * lib/savedir.h (streamsavedir): New decl.
90020         (fdsavedir): Add a comment deprecating this.
90022 2010-09-10  Bruno Haible  <bruno@clisp.org>
90024         langinfo: Fix last commit.
90025         * m4/langinfo_h.m4 (gl_LANGINFO_H): Initialize
90026         HAVE_LANGINFO_T_FMT_AMPM, HAVE_LANGINFO_YESEXPR.
90027         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
90029 2010-09-10  Bruno Haible  <bruno@clisp.org>
90031         relocatable-prog-wrapper: Fix compilation failure due to O_EXEC.
90032         * lib/progreloc.c (O_EXEC): Define fallback.
90034 2010-09-10  Paul Eggert  <eggert@cs.ucla.edu>
90036         fcntl-h: define O_CLOEXEC and O_EXEC if not defined; use new defines
90037         * NEWS: Document recent changes to fcntl-h.
90038         * doc/posix-headers/fcntl.texi (fcntl.h): Document that
90039         O_CLOEXEC is now defined to 0 if it is not defined, like other flags.
90040         Also, O_EXEC is now defined to be O_RDONLY if O_EXEC is not defined.
90041         Similarly for O_SEARCH; this last was already true, but not documented.
90042         * lib/fcntl.in.h (O_CLOEXEC): Define to 0 if not defined.
90043         * lib/dup-safer-flag.c (O_CLOEXEC): Remove now-useless #define.
90044         * lib/dup3.c, lib/pipe2.c, tests/test-dup-safer.c, tests/test-fcntl.c:
90045         Likewise.
90046         * lib/popen-safer.c (open_noinherit): Check whether O_CLOEXEC
90047         is zero, not whether it is defined.
90048         * tests/test-dup3.c, tests/test-pipe2.c (main): Likewise.
90049         * lib/progreloc.c (find_executable): Use O_EXEC rather than O_RDONLY.
90050         * lib/open.c (open): Check for O_SEARCH as well as for O_RDONLY.
90052 2010-09-10  Bruno Haible  <bruno@clisp.org>
90054         langinfo, nl_langinfo: Fix for IRIX 5.3.
90055         * m4/langinfo_h.m4 (gl_LANGINFO_H): Test whether langinfo.h defines
90056         T_FMT_AMPM, YESEXPR. Set HAVE_LANGINFO_T_FMT_AMPM,
90057         HAVE_LANGINFO_YESEXPR.
90058         * modules/langinfo (Makefile.am): Substitute HAVE_LANGINFO_T_FMT_AMPM,
90059         HAVE_LANGINFO_YESEXPR.
90060         * lib/langinfo.in.h (T_FMT_AMPM, GNULIB_defined_T_FMT_AMPM): Define if
90061         HAVE_LANGINFO_T_FMT_AMPM is 0.
90062         (YESEXPR, NOEXPR, GNULIB_defined_YESEXPR): Define if
90063         HAVE_LANGINFO_YESEXPR is 0.
90064         * lib/nl_langinfo.c (rpl_nl_langinfo): Handle also T_FMT_AMPM, YESEXPR,
90065         NOEXPR.
90066         * doc/posix-headers/langinfo.texi: Mention the IRIX 5.3 problem.
90067         * doc/posix-functions/nl_langinfo.texi: Likewise.
90068         Reported by Eric Blake.
90070 2010-09-10  Bruno Haible  <bruno@clisp.org>
90072         pty, readutmp: Fix for FreeBSD 8.0 and OpenBSD 4.6.
90073         * doc/glibc-functions/login_tty.texi: Mention the include file problem
90074         on FreeBSD 8.0 and OpenBSD 4.6.
90075         * lib/pty.in.h: Include <sys/types.h> before <libutil.h>.
90076         * m4/pty_h.m4 (gl_PTY_H): Likewise.
90077         * m4/pty.m4 (gl_FUNC_FORKPTY, gl_FUNC_OPENPTY): Likewise.
90078         * m4/readutmp.m4 (gl_READUTMP): Include <sys/types.h> before <utmp.h>.
90079         Invoke AC_INCLUDES_DEFAULT instead of using the undocumented variable
90080         ac_includes_default.
90081         Reported by Mats Erik Andersson <mats.andersson@gisladisker.se>.
90083 2010-09-09  Eric Blake  <eblake@redhat.com>
90085         strsignal: work around NetBSD bug
90086         * m4/strsignal.m4 (gl_FUNC_STRSIGNAL): Also check in <unistd.h>.
90087         * lib/string.in.h (includes): Likewise.
90088         * doc/posix-functions/strsignal.texi (strsignal): Document the
90089         bug.
90090         Reported by Nelson H. F. Beebe.
90092         gnulib-tool: work with NetBSD /bin/sh
90093         * gnulib-tool (func_cache_var, func_cache_lookup_module)
90094         (func_get_description, func_get_comment, func_get_status)
90095         (func_get_notice, func_get_applicability, func_get_filelist)
90096         (func_get_dependencies, func_get_autoconf_early_snippet)
90097         (func_get_autoconf_snippet, func_get_automake_snippet)
90098         (func_get_include_directive, func_get_link_directive)
90099         (func_get_license, func_get_maintainer, func_import): Avoid
90100         shell syntax errors from parsing syntax extensions.
90102 2010-09-09  Bruno Haible  <bruno@clisp.org>
90104         gnulib-tool: Avoid stderr output on IRIX related to 'alias', 'unalias'.
90105         * gnulib-tool: Don't fiddle with file descriptors 0, 1, 2. Instead, use
90106         a reliable way to determine whether the 'alias' command works.
90108 2010-09-08  Jim Meyering  <meyering@redhat.com>
90110         init.sh: penalize a set-x-impaired shell; don't disqualify it
90111         * tests/init.sh: Too many shells corrupt application stderr when
90112         you set -x, so we can't afford to disqualify them, since at least
90113         on Irix-6.5, that would disqualify all bourne shells.
90114         Instead, use a two-pass approach.
90115         On the first pass, try to find a shell that meets the stricter
90116         condition that set -x does not corrupt stderr.
90117         If no shell meets the stricter condition, retest each candidate
90118         shell, but without that extra condition.  Finally, when
90119         VERBOSE=yes is requested and set -x might cause trouble, simply
90120         issue a warning and refrain from enabling debug output.
90122 2010-09-08  Eric Blake  <eblake@redhat.com>
90124         unsetenv: fix OpenBSD bug
90125         * m4/setenv.m4 (gl_FUNC_UNSETENV): Check for OpenBSD bug.
90126         * doc/posix-functions/unsetenv.texi (unsetenv): Update
90127         documentation.
90128         Reported by Jim Meyering.
90130         strtod: work around IRIX 6.5 bug
90131         * lib/strtod.c (strtod): Reparse number on shorter string if
90132         exponent parse was invalid.
90133         * tests/test-strtod.c (main): Add check for "0x1p 2".
90134         Reported by Tom G. Christensen.
90136         getopt: optimize previous patch
90137         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Correctly check for
90138         empty variable.  Speed up awk script.
90139         Reported by Paolo Bonzini.
90141 2010-09-08  Jim Meyering  <meyering@redhat.com>
90143         test.sh: disqualify shells for which set -x corrupts stderr
90144         * tests/init.sh: Add a test to disqualify /bin/sh from SunOS 5.11
90145         and OpenBSD 4.7.  They make it so with "set -x", environment settings
90146         appear in stderr output.  For example, this command:
90147             /bin/sh -c 'set -x; P=1 true 2> err' 2>/dev/null; cat err
90148         prints "P=1" on those two systems:
90150 2010-09-08  Bruno Haible  <bruno@clisp.org>
90152         gnulib-tool: Avoid stderr output on IRIX related to 'alias', 'unalias'.
90153         * gnulib-tool: Use stderr redirection around the 'alias' and 'unalias'
90154         commands, because some shells ignore redirections when there is an
90155         error in the command lookup.
90156         Reported by Eric Blake.
90158 2010-09-07  Reuben Thomas  <rrt@sc3d.org>
90160         * lib/regex.h: Fix a mention of `regex_compile' (should be
90161         `re_compile_pattern').
90162         Correct and clarify documentation for RE_CONTEXT_INVALID_DUP.
90163         (re_set_registers): Correct name of parameter in comment.
90165         * doc/regex.texi: Add documentation for missing syntax flags.
90166         Remove commented-out documentation of defunct syntax option
90167         RE_NO_EMPTY_ALTS.
90168         Correct name of RE_CHAR_CLASSES in one incorrect occurrence.
90169         Add documentation of re_set_registers.
90170         Document trick to re-use a pattern buffer by setting fastmap manually.
90171         Update documentation of struct re_pattern_buffer per public members.
90172         Uncomment documentation of equivalence class operators and
90173         collating symbol operators, since they are now implemented,
90174         Explain leftmost-longest matching in relation to alternatives.
90175         Tidy documentation of substring matching.
90176         Remove POSIX documentation, which is done better in
90177         glibc, and refer the reader there. Keep BSD API documentation, as
90178         that is not readily available elsewhere.
90180 2010-09-07  Eric Blake  <eblake@redhat.com>
90182         getopt: handle POSIXLY_CORRECT set but not exported
90183         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Restore pre-existing
90184         export state of POSIXLY_CORRECT, due to bash set -o posix.
90185         Reported by Dustin J. Mitchell.
90187 2010-09-05  Bruno Haible  <bruno@clisp.org>
90189         gnulib-tool: Highlight the changed options.
90190         * gnulib-tool (func_usage): Display the --import, --add-import,
90191         --remove-import explanations in bold font.
90193 2010-09-06  Karl Berry  <karl@gnu.org>
90195         * doc/gnulib-tool.texi (Modified imports): doc tweaks.
90197 2010-09-05  Bruno Haible  <bruno@clisp.org>
90199         uniwidth/width: Update comment.
90200         * lib/uniwidth/width.c (uc_width): Update comment for Unicode >= 3.1.
90201         Reported by Emanuele Giaquinta <emanuele.giaquinta@gmail.com>.
90203 2010-09-05  Bruno Haible  <bruno@clisp.org>
90205         isinf, isnan: Relax license.
90206         * modules/isinf (License): Change from GPL to LGPL, with consent from
90207         Ben Pfaff.
90208         * modules/isnan (License): Likewise.
90209         Requested by Ludovic Courtès.
90211 2010-09-04  Bruno Haible  <bruno@clisp.org>
90213         gnulib-tool: Help migration from --import to --add-import or --update.
90214         * gnulib-tool: Emit a verbose error message when --import is used
90215         without any module name.
90217 2010-09-04  Bruno Haible  <bruno@clisp.org>
90219         Update doc about gnulib-tool.
90220         * doc/gnulib-tool.texi (VCS Issues): Explain 'gnulib-tool --import' vs.
90221         'gnulib-tool --update' in more detail.
90222         Reported by Eric Blake.
90224 2010-09-04  Bruno Haible  <bruno@clisp.org>
90226         gnulib-tool: Change --import. New options --add/remove-import.
90227         * gnulib-tool: New options --add-import, --remove-import.
90228         (func_usage): Document them.
90229         (have_associative): Define always.
90230         (func_import): In import mode, don't merge the specified settings with
90231         the cached settings. Implement remove-import mode.
90232         * doc/gnulib-tool.texi (Modified imports): Mention the new options.
90233         Explain when to use them versus --import.
90234         (Simple update): Use --add-import instead of --import.
90235         * NEWS: Mention the change.
90237 2010-09-04  Bruno Haible  <bruno@clisp.org>
90239         * doc/gnulib-tool.texi (Initial import): Update paragraph about
90240         separate gnulib.mk.
90242 2010-09-04  Bruno Haible  <bruno@clisp.org>
90244         gnulib-tool: Don't talk about CVS any more.
90245         * gnulib-tool (func_usage, func_import): Write "version control"
90246         instead of CVS.
90248 2010-09-04  Jim Meyering  <meyering@redhat.com>
90250         maint.mk: avoid obscure sc_copyright_check failure in coreutils
90251         * top/maint.mk (v_etc_file): Prepend $(gnulib_dir)/, to avoid
90252         false positives (whose names may be ill-chosen) when searching
90253         non-VC'd files.  Otherwise, a file named "a b/lib/version-etc.c"
90254         would cause a false-positive.
90256         avoid coreutils "make distcheck" failure
90257         Coreutils tests with an absolute build directory name that contains
90258         a space.  Not quoting this directory name caused a failure.
90259         * tests/test-vc-list-files-git.sh: Quote PATH dir name.
90260         * tests/test-vc-list-files-cvs.sh: Likewise.
90262 2010-09-04  Bruno Haible  <bruno@clisp.org>
90264         gnulib-tool: Avoid error when run in a package without Makefile.am.
90265         * gnulib-tool: When collecting the m4dirs in a package that does not
90266         have a Makefile.am, eliminate those directories that contain no
90267         gnulib-cache.m4. Fix expression that counts these directories.
90269 2010-09-04  Bruno Haible  <bruno@clisp.org>
90271         update-copyright test: Improve output when perl is missing or too old.
90272         * tests/test-update-copyright.sh: Move test of Perl version down after
90273         the test whether Perl exists. Provide an explanation relating Perl's
90274         error message to Automake's SKIP: message.
90276 2010-09-04  Bruno Haible  <bruno@clisp.org>
90278         Don't augment PATH in TESTS_ENVIRONMENT.
90279         * modules/update-copyright-tests (Makefile.am): In TESTS_ENVIRONMENT,
90280         set abs_aux_dir instead of augmenting PATH.
90281         * modules/vc-list-files-tests (Makefile.am): Likewise.
90282         * tests/test-update-copyright.sh: Augment PATH here.
90283         * tests/test-vc-list-files-cvs.sh: Augment PATH here, through
90284         path_prepend_.
90285         * tests/test-vc-list-files-git.sh: Likewise.
90287 2010-09-04  Jim Meyering  <meyering@redhat.com>
90289         tests: prohibit augmenting PATH via TESTS_ENVIRONMENT
90290         * Makefile (sc_prohibit_augmenting_PATH_via_TESTS_ENVIRONMENT): New rule.
90292 2010-09-04  Bruno Haible  <bruno@clisp.org>
90294         strdup: Fix compilation error in C++ mode.
90295         * lib/string.in.h (strdup): In C++ mode with GNULIB_NAMESPACE, undefine
90296         the macro.
90298 2010-09-04  Bruno Haible  <bruno@clisp.org>
90300         dirfd: Fix compilation error in C++ mode on MacOS X, *BSD, IRIX.
90301         * lib/dirent.in.h (dirfd): In C++ mode with GNULIB_NAMESPACE, turn the
90302         macro into a function.
90303         Reported by Jarno Rajahalme <jarno.rajahalme@nsn.com>.
90305 2010-09-04  Bruno Haible  <bruno@clisp.org>
90307         Set PATH_SEPARATOR the same way autoconf does.
90308         * build-aux/relocatable.sh.in (func_find_curr_installdir): Determine
90309         the value of PATH_SEPARATOR the same way autoconf-generated configure
90310         scripts do.
90311         * m4/lib-ld.m4 (AC_LIB_PROG_LD): Likewise.
90312         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): Likewise.
90314 2010-09-04  Stefano Lattarini  <stefano.lattarini@gmail.com>  (tiny change)
90316         Set PATH_SEPARATOR the same way autoconf does.
90317         * gnulib-tool (func_gnulib_dir): Determine the value of PATH_SEPARATOR
90318         the same way autoconf-generated configure scripts do.
90319         * posix-modules: Likewise.
90321 2010-09-02  Paul Eggert  <eggert@cs.ucla.edu>
90323         hash: fix safe_hasher const typo
90324         * lib/hash.c (safe_hasher): Result is pointer, not pointer to
90325         const; otherwise, there is a type error later.
90327 2010-09-02  Jim Meyering  <meyering@redhat.com>
90329         test-update-copyright.sh: require perl 5.8.0
90330         * tests/test-update-copyright.sh: Require 5.8.0,
90331         which Tom G. Christensen has confirmed is adequate,
90332         while 5.6.1 is not.
90334 2010-09-02  Eric Blake  <eblake@redhat.com>
90336         tests: init.sh improvements for re-exec'ing with zsh
90337         * tests/init.sh: Borrow autoconf POSIX-mode sanitization.  Pass
90338         -vx through shell re-exec.
90339         Reported by Tom G. Christensen.
90341         wctype: fix typo in previous commit
90342         * m4/wctype_h.m4 (gl_WCTYPE_H): Fix spelling.
90343         Reported by Ludovic Courtès.
90345 2010-09-02  Jim Meyering  <meyering@redhat.com>
90347         test-update-copyright.sh: skip test if Perl is too old
90348         * tests/test-update-copyright.sh: Exit 77 if Perl is too old.
90349         Reported by Tom G. Christensen.
90351 2010-09-02  Bruno Haible  <bruno@clisp.org>
90353         wctype: Avoid compilation error on IRIX 6.5.30.
90354         * lib/wctype.in.h (iswblank): Declare with a replacement if
90355         REPLACE_ISWBLANK is set.
90356         * m4/wctype_h.m4 (gl_WCTYPE_H): Check also whether iswblank is
90357         declared. Set REPLACE_ISWBLANK.
90358         * modules/wctype (Makefile.am): Substitute REPLACE_ISWBLANK.
90359         * doc/posix-functions/iswblank.texi: Mention the IRIX 6.5.30 problem.
90360         * doc/posix-headers/wctype.texi: Likewise.
90361         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
90363 2010-09-01  Bruno Haible  <bruno@clisp.org>
90365         New module 'socketlib'.
90366         * modules/socketlib: New file.
90367         * m4/socketlib.m4: New file, extracted from m4/sockets.m4.
90368         * m4/sockets.m4 (gl_SOCKETS): Require gl_SOCKETLIB.
90369         * modules/sockets (Depends-on): Add socketlib.
90370         Suggested by Sam Steingold <sds@gnu.org>.
90372 2010-09-01  Paul Eggert  <eggert@cs.ucla.edu>
90374         fcntl-h, etc.: prefer O_SEARCH to O_RDONLY when applicable
90376         POSIX 2008 specifies a new 'open' flag O_SEARCH, which can be used
90377         when one needs search access to a directory but not read access.
90378         On systems where it is available, it works in some cases where
90379         O_RDONLY does not, namely on directories that are searchable but
90380         not readable, and which need only to be searchable.  If O_SEARCH
90381         is not available, fall back to the traditional method of using
90382         O_RDONLY.
90384         * lib/fcntl.in.h (O_SEARCH): #define to O_RDONLY if not defined.
90385         * lib/chdir-long.c (cdb_advance_fd): Use O_SEARCH, not O_RDONLY,
90386         when opening a directory that needs only to be searchable.
90387         * lib/chdir-safer.c (chdir_no_follow): Likewise.
90388         * lib/fts.c (diropen, fts_open, fd_ring_check): Likewise.
90389         * lib/openat-proc.c (openat_proc_name): Likewise.
90390         * lib/openat.c (openat_needs_fchdir): Likewise.
90391         * lib/save-cwd.c (save_cwd): Likewise.
90392         * lib/savewd.c (savewd_save, savewd_chdir): Likewise.
90394 2010-08-28  Bruno Haible  <bruno@clisp.org>
90396         New module 'host-cpu-c-abi'.
90397         * modules/host-cpu-c-abi: New file.
90398         * m4/host-cpu-c-abi.m4: New file, based on part of
90399         clisp/src/m4/general.m4.
90400         Requested by Sam Steingold <sds@gnu.org>.
90402 2010-08-31  Eric Blake  <eblake@redhat.com>
90403         and Jim Meyering  <meyering@redhat.com>
90405         hash: factor, and guard against misbehaving hasher function
90406         * lib/hash.c (safe_hasher): New function, to encapsulate the checking
90407         of table->hasher's return value.  Also protect against a hash value
90408         so large that adding it to table->bucket results in a NULL pointer.
90409         (hash_lookup, hash_get_next, hash_find_entry, transfer_entries):
90410         Use it in place of open-coded check-and-abort.
90412 2010-08-30  Bruno Haible  <bruno@clisp.org>
90414         hash: silence spurious clang warning
90415         * lib/hash.c (hash_get_next): Remove unnecessary test against NULL.
90416         Reported by Eric Blake.
90418 2010-08-30  Eric Blake  <eblake@redhat.com>
90420         strstr, memmem, strcasestr: avoid leaked shell message
90421         * m4/strstr.m4 (gl_FUNC_STRSTR): Avoid "Alarm clock" message from
90422         FreeBSD.
90423         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Likewise.
90424         * m4/memmem.m4 (gl_FUNC_MEMMEM): Likewise.
90426         tests: silence clang warning
90427         * tests/test-malloca.c (do_allocation): Avoid dead store.
90429 2010-08-29  Bruno Haible  <bruno@clisp.org>
90431         gettext: Fix recent mistake.
90432         * m4/intl.m4 (gt_CHECK_DECL): Fix typo introduced on 2010-08-26.
90434 2010-08-29  Bruno Haible  <bruno@clisp.org>
90436         selinux-h: Offer a --without-selinux option.
90437         * m4/selinux-selinux-h.m4 (gl_HEADERS_SELINUX_SELINUX_H): If
90438         --without-selinux was specified, skip all tests and define
90439         HAVE_SELINUX_SELINUX_H to 0.
90440         (gl_LIBSELINUX): Offer --without-selinux option. If it is specified,
90441         set LIB_SELINUX to empty.
90442         * m4/selinux-context-h.m4 (gl_HEADERS_SELINUX_CONTEXT_H): Require
90443         gl_LIBSELINUX. If --without-selinux was specified, replace
90444         selinux/context.h.
90445         Reported by Johan Hattne <johan.hattne@utsouthwestern.edu>.
90447 2010-08-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
90448             Bruno Haible  <bruno@clisp.org>
90450         Make the module 'realloc-gnu' work again on AIX and OSF/1.
90451         * m4/realloc.m4 (gl_FUNC_REALLOC_GNU): Define HAVE_REALLOC_GNU instead
90452         of HAVE_REALLOC.
90453         * lib/realloc.c (NEED_REALLOC_GNU): Enable behaviour also when
90454         GNULIB_REALLOC_GNU && !HAVE_REALLOC_GNU.
90455         (SYSTEM_MALLOC_GLIBC_COMPATIBLE): Adjust definition.
90456         * modules/realloc-gnu (configure.ac): Use gl_MODULE_INDICATOR.
90458 2010-08-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
90459             Bruno Haible  <bruno@clisp.org>
90461         Make the module 'calloc-gnu' work again on AIX and OSF/1.
90462         * m4/calloc.m4 (gl_FUNC_CALLOC_GNU): Define HAVE_CALLOC_GNU instead of
90463         HAVE_CALLOC.
90464         * lib/xmalloc.c: Update accordingly.
90465         * lib/calloc.c (NEED_CALLOC_GNU): Enable also when
90466         GNULIB_CALLOC_GNU && !HAVE_CALLOC_GNU.
90467         * modules/calloc-gnu (configure.ac): Invoke gl_MODULE_INDICATOR.
90469 2010-08-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
90470             Bruno Haible  <bruno@clisp.org>
90472         Make the module 'malloc-gnu' work again on AIX and OSF/1.
90473         * m4/malloc.m4 (gl_FUNC_MALLOC_GNU): Define HAVE_MALLOC_GNU instead of
90474         HAVE_MALLOC.
90475         * lib/malloc.c (NEED_MALLOC_GNU): Enable behaviour also when
90476         GNULIB_MALLOC_GNU && !HAVE_MALLOC_GNU.
90477         * modules/malloc-gnu (configure.ac): Use gl_MODULE_INDICATOR.
90479 2010-08-29  Bruno Haible  <bruno@clisp.org>
90481         Update modules list.
90482         * MODULES.html.sh (Memory management functions <stdlib.h>): Add
90483         malloc-gnu, calloc-gnu, realloc-gnu. Remove malloc, calloc, realloc.
90484         (String handling <string.h>): Add astrxfrm.
90485         (File system functions): Add readlinkat.
90487 2010-08-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
90489         Tests for module 'realloc-gnu'.
90490         * modules/realloc-gnu-tests: New file.
90491         * tests/test-realloc-gnu.c: New file.
90493         Tests for module 'calloc-gnu'.
90494         * modules/calloc-gnu-tests: New file.
90495         * tests/test-calloc-gnu.c: New file.
90497         Tests for module 'malloc-gnu'.
90498         * modules/malloc-gnu-tests: New file.
90499         * tests/test-malloc-gnu.c: New file.
90501 2010-08-28  Bruno Haible  <bruno@clisp.org>
90503         Rename module 'realloc' -> 'realloc-gnu'.
90504         * modules/realloc-gnu: New file, copied from modules/realloc.
90505         * modules/realloc: Convert to a redirection to 'realloc-gnu'. Mark as
90506         obsolete.
90507         * modules/mgetgroups (Depends-on): Update.
90508         * doc/posix-functions/realloc.texi: Update.
90509         * NEWS: Mention the change.
90511         Rename module 'calloc' -> 'calloc-gnu'.
90512         * modules/calloc-gnu: New file, copied from modules/calloc.
90513         * modules/calloc: Convert to a redirection to 'calloc-gnu'. Mark as
90514         obsolete.
90515         * doc/posix-functions/calloc.texi: Update.
90516         * NEWS: Mention the change.
90518         Rename module 'malloc' -> 'malloc-gnu'.
90519         * modules/malloc-gnu: New file, copied from modules/malloc.
90520         * modules/malloc: Convert to a redirection to 'malloc-gnu'. Mark as
90521         obsolete.
90522         * modules/argp (Depends-on): Update.
90523         * modules/regex (Depends-on): Update.
90524         * doc/posix-functions/malloc.texi: Update.
90525         * NEWS: Mention the change.
90527 2010-08-28  Eric Blake  <eblake@redhat.com>
90529         pread, pwrite: add missing dependency
90530         * modules/pread (Depends-on): Add extensions.
90531         * modules/pwrite (Depends-on): Likewise.
90533 2010-08-28  Bruno Haible  <bruno@clisp.org>
90535         unistr/u*-strchr: Fix tests dependencies.
90536         * modules/unistr/u8-strchr-tests (Depends-on): Add unistr/u32-to-u8.
90537         * modules/unistr/u16-strchr-tests (Depends-on): Add unistr/u32-to-u16.
90538         Reported by Ian Beckwith <ianb@erislabs.net>.
90540 2010-08-28  Bruno Haible  <bruno@clisp.org>
90542         read-file: Don't occupy too much unused memory.
90543         * lib/read-file.c (fread_file): Shrink the buffer at the end.
90545 2010-08-28  Giuseppe Scrivano  <gscrivano@gnu.org>
90546             Eric Blake  <eblake@redhat.com>
90547             Bruno Haible  <bruno@clisp.org>
90549         read-file: Avoid memory reallocations with regular files.
90550         * lib/read-file.c: Include <sys/stat.h>, <stdio.h>, <stdint.h>.
90551         (fread_file): With regular files, use the remaining length as the
90552         initial buffer size.  Check against overflow.
90553         * modules/read-file (Depends-on): Add ftello, malloc-posix, stdint,
90554         sys_stat.
90556 2010-08-28  Bruno Haible  <bruno@clisp.org>
90558         ftello: Relax license.
90559         * modules/ftello (License): Relax to LGPLv2+.
90560         Reported by Eric Blake.
90562 2010-08-28  Bruno Haible  <bruno@clisp.org>
90564         Avoid relocwrapper link errors due to gnulib replacement functions.
90565         * lib/canonicalize-lgpl.c [IN_RELOCWRAPPER]: Use the system's getcwd
90566         function.
90567         Reported by Ben Pfaff <blp@cs.stanford.edu>.
90569 2010-08-28  Bruno Haible  <bruno@clisp.org>
90571         Prefer using AC_DEFUN_ONCE over AC_DEFUN in projects with gnulib.
90572         * m4/iconv.m4 (gl_iconv_AC_DEFUN): Use AC_DEFUN_ONCE if gl_00GNULIB is
90573         defined.
90574         * m4/libunistring.m4 (gl_libunistring_AC_DEFUN): Likewise.
90575         Suggested by Eric Blake.
90577 2010-08-28  Bruno Haible  <bruno@clisp.org>
90579         sys_socket, netdb: Ensure socklen_t gets defined.
90580         * modules/sys_socket (Depends-on): Add socklen.
90581         * modules/netdb (Depends-on): Likewise.
90582         * modules/getaddrinfo (Depends-on): Remove socklen.
90583         * modules/getsockopt (Depends-on): Likewise.
90584         * modules/setsockopt (Depends-on): Likewise.
90585         * tests/test-sys_socket.c: Check that socklen_t is defined.
90586         * tests/test-netdb.c: Likewise.
90587         * m4/socklen.m4: Update comments.
90588         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
90590 2010-08-27  Eric Blake  <eblake@redhat.com>
90592         login_tty: add missing dependency
90593         * modules/login_tty (Depends-on): Add pty.
90595 2010-08-26  Eric Blake  <eblake@redhat.com>
90597         lib-symbol-versions: fix m4 quoting
90598         * m4/ld-version-script.m4 (gl_LD_VERSION_SCRIPT): Use correct
90599         format for AC_LINK_IFELSE.
90601         glob: fix compile test
90602         * m4/glob.m4 (gl_GLOB): Use correct format for AC_COMPILE_IFELSE.
90604         btowc: fix missing file
90605         * modules/btowc (Files): Also ship locale-fr.m4.
90607         lseek: fix link test
90608         * m4/lseek.m4 (gl_FUNC_LSEEK): Use correct format for
90609         AC_LINK_IFELSE.
90611         include_next: silence autoconf 2.68 warning
90612         * m4/include_next.m4 (gl_INCLUDE_NEXT): Mark this use of
90613         AC_COMPILE_IFELSE as special.
90614         (AC_LANG_DEFINES_PROVIDED): Provide dummy implementation for
90615         autoconf < 2.68.
90617         acl: fix compilation test
90618         * m4/acl.m4 (gl_FUNC_ALL): Use correct format for
90619         AC_COMPILE_IFELSE.
90621 2010-08-26  Bruno Haible  <bruno@clisp.org>
90623         Modernize AC_TRY_RUN invocations.
90624         * m4/btowc.m4 (gl_FUNC_BTOWC): Use AC_RUN_IFELSE instead of AC_TRY_RUN.
90625         * m4/duplocale.m4 (gl_FUNC_DUPLOCALE): Likewise.
90626         * m4/exponentd.m4 (gl_DOUBLE_EXPONENT_LOCATION): Likewise.
90627         * m4/exponentf.m4 (gl_FLOAT_EXPONENT_LOCATION): Likewise.
90628         * m4/exponentl.m4 (gl_LONG_DOUBLE_EXPONENT_LOCATION): Likewise.
90629         * m4/fopen.m4 (gl_FUNC_FOPEN): Likewise.
90630         * m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Likewise.
90631         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Likewise.
90632         * m4/ftello.m4 (gl_FUNC_FTELLO): Likewise.
90633         * m4/iconv.m4 (AM_ICONV_LINK): Likewise.
90634         * m4/iconv_open.m4 (gl_FUNC_ICONV_OPEN_UTF): Likewise.
90635         * m4/intdiv0.m4 (gt_INTDIV0): Likewise.
90636         * m4/isnanf.m4 (gl_ISNANF_WORKS): Likewise.
90637         * m4/isnanl.m4 (gl_FUNC_ISNANL_WORKS): Likewise.
90638         * m4/ldexpl.m4 (gl_FUNC_LDEXPL_WORKS): Likewise.
90639         * m4/mbrlen.m4 (gl_MBRLEN_INCOMPLETE_STATE, gl_MBRLEN_RETVAL,
90640         gl_MBRLEN_NUL_RETVAL): Likewise.
90641         * m4/mbrtowc.m4 (gl_MBRTOWC_INCOMPLETE_STATE, gl_MBRTOWC_SANITYCHECK,
90642         gl_MBRTOWC_NULL_ARG, gl_MBRTOWC_RETVAL, gl_MBRTOWC_NUL_RETVAL):
90643         Likewise.
90644         * m4/mbsrtowcs.m4 (gl_MBSRTOWCS_WORKS): Likewise.
90645         * m4/open.m4 (gl_FUNC_OPEN): Likewise.
90646         * m4/printf.m4 (gl_PRINTF_SIZES_C99, gl_PRINTF_LONG_DOUBLE,
90647         gl_PRINTF_INFINITE, gl_PRINTF_INFINITE_LONG_DOUBLE,
90648         gl_PRINTF_DIRECTIVE_A, gl_PRINTF_DIRECTIVE_F, gl_PRINTF_DIRECTIVE_N,
90649         gl_PRINTF_DIRECTIVE_LS, gl_PRINTF_POSITIONS, gl_PRINTF_FLAG_GROUPING,
90650         gl_PRINTF_FLAG_LEFTADJUST, gl_PRINTF_FLAG_ZERO, gl_PRINTF_PRECISION,
90651         gl_SNPRINTF_TRUNCATION_C99, gl_SNPRINTF_RETVAL_C99,
90652         gl_SNPRINTF_DIRECTIVE_N, gl_SNPRINTF_SIZE1, gl_VSNPRINTF_ZEROSIZE_C99):
90653         Likewise.
90654         * m4/printf-posix.m4 (gt_PRINTF_POSIX): Likewise.
90655         * m4/signbit.m4 (gl_SIGNBIT, gl_FLOATTYPE_SIGN_LOCATION): Likewise.
90656         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
90657         * m4/threadlib.m4 (gl_THREADLIB_BODY): Likewise.
90658         * m4/truncl.m4 (gl_FUNC_TRUNCL): Likewise.
90659         * m4/ttyname_r.m4 (gl_FUNC_TTYNAME_R): Likewise.
90660         * m4/wcrtomb.m4 (gl_FUNC_WCRTOMB): Likewise.
90661         * m4/wcsrtombs.m4 (gl_WCSRTOMBS_TERMINATION): Likewise.
90662         * m4/wctob.m4 (gl_FUNC_WCTOB): Likewise.
90663         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
90665 2010-08-26  Bruno Haible  <bruno@clisp.org>
90667         Modernize AC_TRY_LINK invocations.
90668         * m4/acosl.m4 (gl_FUNC_ACOSL): Use AC_LINK_IFELSE instead of
90669         AC_TRY_LINK.
90670         * m4/argp.m4 (gl_ARGP): Likewise.
90671         * m4/asinl.m4 (gl_FUNC_ASINL): Likewise.
90672         * m4/atanl.m4 (gl_FUNC_ATANL): Likewise.
90673         * m4/ceil.m4 (gl_FUNC_CEIL_LIBS): Likewise.
90674         * m4/ceilf.m4 (gl_FUNC_CEILF_LIBS): Likewise.
90675         * m4/ceill.m4 (gl_FUNC_CEILL_LIBS): Likewise.
90676         * m4/codeset.m4 (AM_LANGINFO_CODESET): Likewise.
90677         * m4/cosl.m4 (gl_FUNC_COSL): Likewise.
90678         * m4/expl.m4 (gl_FUNC_EXPL): Likewise.
90679         * m4/floor.m4 (gl_FUNC_FLOOR_LIBS): Likewise.
90680         * m4/floorf.m4 (gl_FUNC_FLOORF_LIBS): Likewise.
90681         * m4/floorl.m4 (gl_FUNC_FLOORL_LIBS): Likewise.
90682         * m4/frexp.m4 (gl_FUNC_FREXP, gl_CHECK_FREXP_NO_LIBM): Likewise.
90683         * m4/frexpl.m4 (gl_FUNC_FREXPL, gl_CHECK_FREXPL_NO_LIBM): Likewise.
90684         * m4/ftello.m4 (gl_FUNC_FTELLO): Likewise.
90685         * m4/gettext.m4 (AM_GNU_GETTEXT): Likewise.
90686         * m4/hostent.m4 (gl_HOSTENT): Likewise.
90687         * m4/iconv.m4 (AM_ICONV_LINK): Likewise.
90688         * m4/intl.m4 (gt_INTL_SUBDIR_CORE): Likewise.
90689         * m4/intlmacosx.m4 (gt_INTL_MACOSX): Likewise.
90690         * m4/isnand.m4 (gl_HAVE_ISNAND_IN_LIBM, gl_HAVE_ISNAND_NO_LIBM):
90691         Likewise.
90692         * m4/isnanf.m4 (gl_HAVE_ISNANF_NO_LIBM, gl_HAVE_ISNANF_IN_LIBM):
90693         Likewise.
90694         * m4/isnanl.m4 (gl_HAVE_ISNANL_NO_LIBM, gl_HAVE_ISNANL_IN_LIBM):
90695         Likewise.
90696         * m4/lcmessage.m4 (gt_LC_MESSAGES): Likewise.
90697         * m4/ldexpl.m4 (gl_FUNC_LDEXPL, gl_CHECK_LDEXPL_NO_LIBM): Likewise.
90698         * m4/lib-link.m4 (AC_LIB_HAVE_LINKFLAGS): Likewise.
90699         * m4/logb.m4 (gl_FUNC_LOGB): Likewise.
90700         * m4/logl.m4 (gl_FUNC_LOGL): Likewise.
90701         * m4/printf-frexp.m4 (gl_FUNC_PRINTF_FREXP): Likewise.
90702         * m4/servent.m4 (gl_SERVENT): Likewise.
90703         * m4/signbit.m4 (gl_SIGNBIT): Likewise.
90704         * m4/sinl.m4 (gl_FUNC_SINL): Likewise.
90705         * m4/sqrtl.m4 (gl_FUNC_SQRTL): Likewise.
90706         * m4/tanl.m4 (gl_FUNC_TANL): Likewise.
90707         * m4/threadlib.m4 (gl_THREADLIB_BODY): Likewise.
90708         * m4/trunc.m4 (gl_FUNC_TRUNC): Likewise.
90709         * m4/truncf.m4 (gl_FUNC_TRUNCF): Likewise.
90710         * m4/truncl.m4 (gl_FUNC_TRUNCL): Likewise.
90711         * modules/tsearch-tests (configure.ac): Likewise.
90713 2010-08-26  Bruno Haible  <bruno@clisp.org>
90715         Modernize AC_TRY_COMPILE invocations.
90716         * m4/environ.m4 (gt_CHECK_VAR_DECL): Use AC_COMPILE_IFELSE instead of
90717         AC_TRY_COMPILE.
90718         * m4/iconv.m4 (gl_iconv_AC_DEFUN): Likewise.
90719         * m4/intl.m4 (gt_CHECK_DECL): Likewise.
90720         * m4/intmax.m4 (gt_TYPE_INTMAX_T): Likewise.
90721         * m4/intmax_t.m4 (gt_AC_TYPE_INTMAX_T): Likewise.
90722         * m4/inttypes-pri.m4 (gt_INTTYPES_PRI): Likewise.
90723         * m4/inttypes_h.m4 (gl_AC_HEADER_INTTYPES_H): Likewise.
90724         * m4/locale_h.m4 (gl_LOCALE_H): Likewise.
90725         * m4/lock.m4 (gl_LOCK): Likewise.
90726         * m4/malloc.m4 (gl_CHECK_MALLOC_POSIX): Likewise.
90727         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
90728         * m4/minmax.m4 (gl_MINMAX_IN_HEADER): Likewise.
90729         * m4/setenv.m4 (gl_FUNC_UNSETENV): Likewise.
90730         * m4/size_max.m4 (gl_SIZE_MAX): Likewise.
90731         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Likewise.
90732         * m4/stdarg.m4 (gl_STDARG_H): Likewise.
90733         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Likewise.
90734         * m4/stdint_h.m4 (gl_AC_HEADER_STDINT_H): Likewise.
90735         * m4/visibility.m4 (gl_VISIBILITY): Likewise.
90736         * m4/wchar_t.m4 (gt_TYPE_WCHAR_T): Likewise.
90737         * m4/wint_t.m4 (gt_TYPE_WINT_T): Likewise.
90738         * m4/libunistring.m4 (gl_LIBUNISTRING_CORE): Likewise. Remove
90739         extraneous semicolon.
90741 2010-08-26  Jim Meyering  <meyering@redhat.com>
90743         stat-time: relax license LGPL
90744         * modules/stat-time (License): Change from GPL to LGPL,
90745         with consent from all contributors, for use in libguile.
90746         Requested by Ludovic Courtès.
90748 2010-08-26  Erik Faye-Lund  <kusmabite@gmail.com>
90750         poll: return immediately on POLLHUP.
90751         * lib/poll.c (poll): Always set timeout before wait_timeout is
90752         computed.
90754 2010-08-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
90756         Fix test-unlinkat, test-rmdir failure on AIX 5.3.
90757         * tests/test-rmdir.h (test_rmdir_func): Also accept EEXIST for
90758         rmdir ("dir/.//"), unlinkat.
90760 2010-08-24  Paul Eggert  <eggert@cs.ucla.edu>
90762         stdbool: avoid spurious failure with modern xlc
90763         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Resync with autoconf.
90765 2010-08-24  Bruno Haible  <bruno@clisp.org>
90767         getloadavg: simplify code
90768         * m4/getloadavg.m4 (gl_GETLOADAVG): Remove useless test of
90769         gl_have_func. Update comments.
90771 2010-08-24  Eric Blake  <eblake@redhat.com>
90773         getloadavg: don't define SVR4 on cygwin
90774         * m4/getloadavg.m4 (gl_GETLOADAVG): Sync with autoconf fix, to
90775         only define SVR4 when -lkvm is required.
90776         Reported by Yaakov Selkowitz.
90778 2010-08-24  Bruno Haible  <bruno@clisp.org>
90780         priv-set: fix comment
90781         * lib/priv-set.c (priv_set_restore): Fix typo in comment.
90783 2010-08-23  Paul Eggert  <eggert@cs.ucla.edu>
90785         priv-set: fix comments
90786         * lib/priv-set.c (priv_set_remove, priv_set_restore): Fix comments
90787         to match code, as suggested by David Bartley in:
90788         http://lists.gnu.org/r/bug-tar/2010-08/msg00018.html
90790 2010-08-23  Eric Blake  <eblake@redhat.com>
90792         stdbool: avoid rejecting clang
90793         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Resync with autoconf.
90794         * tests/test-stdbool.c: Enable more tests if using the system
90795         <stdbool.h> instead of the gnulib replacement.
90796         (main): Move xlc bug test to a runtime test for all compilers.
90797         Reported by Anders Kaseorg.
90799         argz: fix shell quoting issue
90800         * m4/argz.m4 (gl_FUNC_ARGZ): Allow for spaces in argument.
90801         Reported by Charles Wilson.
90803 2010-08-22  Paolo Bonzini  <bonzini@gnu.org>
90804             Erik Faye-Lund <kusmabite@gmail.com>
90806         poll, select: handle ERROR_BROKEN_PIPE.
90807         * lib/poll.c (win32_compute_revents): Return POLLHUP when
90808         PeekNamedPipe fails with ERROR_BROKEN_PIPE.
90809         * lib/select.c (win32_compute_revents): Do not mark a pipe
90810         as writeable if PeekNamedPipe fails with ERROR_BROKEN_PIPE.
90812 2010-08-22  Giuseppe Scrivano  <gscrivano@gnu.org>
90814         fts: allow compilation with C++
90815         * lib/fts_.h: Specify extern "C" linkage with C++.
90817 2010-08-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
90819         Fix gnulib-tool sed script de-commentation for AIX sed.
90820         * gnulib-tool (sed_comments): Try indented comments, for AIX 5.3
90821         sed.
90823 2010-08-17  Eric Blake  <eblake@redhat.com>
90825         test-stddef: test for (some) offsetof bugs
90826         * tests/test-stddef.c: Enhance test to ensure correct type of
90827         offsetof.
90828         * doc/posix-headers/stddef.texi (stddef.h): Document a Solaris bug
90829         that we are not fixing at this time.
90831 2010-08-15  Bruno Haible  <bruno@clisp.org>
90833         stpncpy: Allow stpncpy to be defined as a macro.
90834         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Don't attempt to redeclare stpncpy
90835         if it's already correctly declared.
90836         * lib/string.in.h (stpncpy): Undefine before redefining.
90837         Reported by Jeremy Huddleston <jeremyhu@macports.org>.
90839 2010-08-14  Bruno Haible  <bruno@clisp.org>
90841         Rename module 'memxfrm' to 'amemxfrm'.
90842         * lib/amemxfrm.h: Renamed from lib/memxfrm.h.
90843         (amemxfrm): Renamed from memxfrm.
90844         * lib/amemxfrm.c: Renamed from lib/memxfrm.h. Include amemxfrm.h.
90845         (amemxfrm): Renamed from memxfrm.
90846         * modules/amemxfrm: Renamed from modules/memxfrm. Update.
90847         * NEWS: Mention the change.
90848         * MODULES.html.sh (String handling <string.h>): Update.
90849         * lib/unicase/u-casexfrm.h: Invoke amemxfrm instead of memxfrm.
90850         * lib/unicase/u8-casexfrm.c: Include amemxfrm.h instead of memxfrm.h.
90851         * lib/unicase/u16-casexfrm.c: Likewise.
90852         * lib/unicase/u32-casexfrm.c: Likewise.
90853         * lib/uninorm/u-normxfrm.h: Invoke amemxfrm instead of memxfrm.
90854         * lib/uninorm/u8-normxfrm.c: Include amemxfrm.h instead of memxfrm.h.
90855         * lib/uninorm/u16-normxfrm.c: Likewise.
90856         * lib/uninorm/u32-normxfrm.c: Likewise.
90857         * modules/unicase/u8-casexfrm (Depends-on): Add amemxfrm, remove
90858         memxfrm.
90859         * modules/unicase/u16-casexfrm (Depends-on): Likewise.
90860         * modules/unicase/u32-casexfrm (Depends-on): Likewise.
90861         * modules/uninorm/u8-normxfrm (Depends-on): Likewise.
90862         * modules/uninorm/u16-normxfrm (Depends-on): Likewise.
90863         * modules/uninorm/u32-normxfrm (Depends-on): Likewise.
90864         Suggested by Paul Eggert.
90866 2010-08-14  Bruno Haible  <bruno@clisp.org>
90868         Tests for module 'astrxfrm'.
90869         * modules/astrxfrm-tests: New file.
90870         * tests/test-astrxfrm.c: New file.
90872         New module 'astrxfrm'.
90873         * lib/astrxfrm.h: New file.
90874         * lib/astrxfrm.c: New file, based on lib/memxfrm.c.
90875         * modules/astrxfrm: New file.
90877 2010-08-14  Reuben Thomas  <rrt@sc3d.org>
90879         regex: Tweak doc.
90880         * doc/regex.texi (Overview): Don't mention regex.c.
90881         (GNU Regular Expression Compiling): Likewise.
90882         (Match-end-of-line Operator): Mention 'not_eol'.
90884 2010-08-14  Brian Gough  <bjg@gnu.org>
90885             Bruno Haible  <bruno@clisp.org>
90887         git-merge-changelog: add doc relating to use with bzr and hg.
90888         * lib/git-merge-changelog.c: Add comments regarding bzr, hg, diff3.
90890 2010-08-14  Matthias Bolte  <matthias.bolte@googlemail.com>
90892         pthread: fix pthread.h creation for srcdir != builddir
90893         * modules/pthread (Makefile.am): Fix the rule to work also in a
90894         non-srcdir build.
90896 2010-08-13  Karl Berry  <karl@gnu.org>
90898         * doc/regex.texi (Predefined Syntaxes): @smallexample.
90899         * doc/posix-*/*: force line break before @url of POSIX
90900         specifications.
90901         Suggested by Werner Lemberg.
90903 2010-08-10  Paul Eggert  <eggert@cs.ucla.edu>
90905         strtod: fix const diagnostic
90906         * lib/strtod.c (strtod): Don't assign const char * to char *,
90907         as this elicits a warning from GCC when warnings are enabled.
90909 2010-08-10  Pádraig Brady  <P@draigbrady.com>
90910         and Eric Blake  <eblake@redhat.com>
90912         copy-acl: ignore ENOTSUP on HP-UX
90913         * lib/acl-internal.h (ACL_NOT_WELL_SUPPORTED): Move definition up,
90914         so that it is available for HP-UX.
90915         * lib/copy-acl.c (qcopy_acl): Use it.
90916         Reported by Patrick M. Callahan.
90918 2010-08-10  Eric Blake  <eblake@redhat.com>
90920         open, chown: relax license
90921         * modules/open (License): Change to LGPLv2+, with consent by all
90922         authors, for use in augeas.
90923         * modules/chown (License): Likewise.
90924         * modules/lchown (Likewise): Likewise.
90925         Requested by Adam Stokes.
90927 2010-08-09  Karl Berry  <karl@gnu.org>
90929         * build-aux/ar-lib: new file, import from Automake.
90930         * config/srclist.txt: autocheck for updates.
90932 2010-08-09  Eric Blake  <eblake@redhat.com>
90934         readlinkat: adjust client modules
90935         * modules/areadlinkat (Depends-on): Use readlinkat, not
90936         symlinkat.
90937         * modules/areadlinkat-with-size (Depends-on): Likewise.
90939         mknod: be more vocal about danger of running tests as root
90940         * m4/mknod.m4 (gl_FUNC_MKNOD): Make it harder to run configure as
90941         root, since that is just asking for problems.
90942         Suggested by Bruno Haible, based on a report by Rainer Tammer.
90944         readlinkat: split into its own module
90945         * modules/symlinkat: Split readlinkat...
90946         * modules/readlinkat: ...into separate module.
90947         * m4/symlinkat.m4 (gl_FUNC_SYMLINKAT): Move readlinkat check...
90948         * m4/readlinkat.m4 (gl_FUNC_READLINAT): ...to new file.
90949         * lib/symlinkat.c (readlinkat): Move...
90950         * lib/readlinkat.c: ...into new file.
90951         * modules/symlinkat-tests: Split readlinkat test...
90952         * modules/readlinkat-tests: ...into separate module.
90953         * tests/test-symlinkat.c: Split...
90954         * tests/test-readlinkat.c: ...into new file.
90955         * NEWS: Document the split.
90956         * doc/posix-functions/readlinkat.texi (readlinkat): Likewise.
90957         * lib/unistd.in.h (readlinkat): Likewise.
90958         Suggested by Bruno Haible.
90960 2010-08-08  Bruno Haible  <bruno@clisp.org>
90962         memxfrm: Speed up.
90963         * lib/memxfrm.c (memxfrm): Allocate enough memory ahead of time, so
90964         that usually only one call to strxfrm is necessary for each string
90965         part.
90966         Reported by Paul Eggert <eggert@cs.ucla.edu>.
90968 2010-08-07  Karl Berry  <karl@gnu.org>
90970         * doc/posix-headers/limits.texi,
90971         * doc/posix-functions/malloc.texi,
90972         * doc/posix-functions/strsignal.texi: missing @item.
90973         * doc/ld-version-script.texi: spurious leading i.
90974         * doc/regex.texi (Interval Operators): no commas inside @var.
90976 2010-08-01  Bruno Haible  <bruno@clisp.org>
90978         Integrate the regex documentation.
90979         * doc/gnulib.texi: Define 'cn' index.
90980         (Regular expressions): New a chapter that includes regex.texi and
90981         regexprops-generic.texi.
90982         * doc/regex.texi: Remove boilerplate stuff. Use simplified @node
90983         syntax.
90985         Whitespace cleanup.
90986         * doc/regex.texi: Remove trailing spaces.
90988         Add regex documentation.
90989         * doc/regex.texi: New file. Taken from regex-0.12/doc/regex.texi in
90990         http://ftp.gnu.org/old-gnu/regex/regex-0.12.tar.gz.
90991         Written by Kathy A. Hargreaves and Karl Berry.
90993 2010-08-01  Bruno Haible  <bruno@clisp.org>
90995         link: Update documentation.
90996         * doc/posix-functions/link.texi: Update regarding Solaris.
90998 2010-07-31  Bruno Haible  <bruno@clisp.org>
91000         Update modules list.
91001         * MODULES.html.sh (Sorting functions <stdlib.h>): Add array-mergesort.
91002         (String handling <string.h>): Add memcmp2, memxfrm.
91003         (Container data structures): Add xlist, xsublist, xoset.
91004         (Core language properties): Add alignof, unused-parameter.
91005         (Process control, Numeric conversion functions <stdlib.h>): Renamed
91006         from Numeric conversion functions <stdlib.h>. Add _Exit, atoll.
91007         (Unibyte characters <ctype.h>): New section.
91008         (String handling <string.h>): New section.
91009         (Mathematics <math.h>): Add acos, acosl, asin, asinl, atan, atan2,
91010         atanl, cbrt, copysign, cos, cosh, cosl, erf, erfc, exp, expl, fabs,
91011         fmod, hypot, j0, j1, jn, ldexp, lgamma, log, log10, log1p, logb, logl,
91012         modf, nextafter, pow, remainder, rint, sin, sinh, sinl, sqrt, sqrtl,
91013         tan, tanh, tanl, y0, y1, yn.
91014         (Support for systems lacking POSIX:2008): Add alphasort, dirent,
91015         dprintf, dprintf-posix, duplocale, fcntl, getlogin, getopt-posix,
91016         grantpt, iconv-h, ioctl, isblank, langinfo, nl_langinfo, pread,
91017         ptsname, pwrite, scandir, servent, sys_utsname, ttyname_r, uname,
91018         unlockpt, vdprintf, vdprintf-posix.
91019         (Enhancements for POSIX:2008 functions): Add getopt-gnu. Remove getopt.
91020         (File system functions): Add concat-filename, sys_file, sys_ioctl,
91021         xconcat-filename.
91022         (File descriptor based Input/Output): Add dup3, fd-safer-flag,
91023         getdtablesize, pipe2, pipe2-safer.
91024         (Security): New section.
91025         (Networking functions): Add accept4.
91026         (Signal handling): Add sigpipe.
91027         (Internationalization functions): Add xstriconveh, mbmemcasecmp,
91028         mbmemcasecoll.
91029         (Unicode string functions): Add libunistring-optional, unistr/u*-cmp2,
91030         unistr/u*-strcoll, uniwbrk/*, uninorm/*, unicase/*.
91031         (Executing programs): Add findprog-lgpl, pipe-filter-gi,
91032         pipe-filter-ii.
91033         (Misc): Add argp-version-etc, login_tty, parse-duration.
91035 2010-07-31  Bruno Haible  <bruno@clisp.org>
91037         Improve doc in MODULES.html.
91038         * modules/linkat (Description): Add the word "function".
91039         * modules/mkfifo (Description): Likewise.
91040         * modules/mknod (Description): Likewise.
91041         * modules/remove (Description): Likewise.
91042         * modules/renameat (Description): Likewise.
91043         * modules/stat (Description): Likewise.
91044         * modules/symlink (Description): Likewise.
91045         * modules/unlink (Description): Likewise.
91047 2010-07-31  Bruno Haible  <bruno@clisp.org>
91049         ansi-c++-opt: Provide option --enable-c++/--disable-c++ when possible.
91050         * m4/ansi-c++.m4 (gl_CXX_CHOICE): In Autoconf 2.66 or newer, provide
91051         option --enable/disable-c++ instead of --enable/disable-cxx.
91052         * NEWS: Mention the change.
91054 2010-07-31  Bruno Haible  <bruno@clisp.org>
91056         readlink, areadlink: Relax test a bit.
91057         * tests/test-readlink.h (test_readlink): Accept EINVAL as an
91058         alternative to ENOTDIR.
91059         * tests/test-areadlink.h (test_areadlink): Likewise.
91060         Reported by Rainer Tammer.
91062 2010-07-31  Bruno Haible  <bruno@clisp.org>
91064         unistr/u8-strstr, unistr/u16-strstr: Optimize the one-character case.
91065         * lib/unistr/u-strstr.h (FUNC): When the needle contains only one
91066         character, perform the search using U_STRCHR.
91067         * lib/unistr/u8-strstr.c (U_STRMBTOUC): New macro.
91068         * lib/unistr/u16-strstr.c (U_STRMBTOUC): Likewise.
91069         * modules/unistr/u8-strstr (Depends-on): Add unistr/u8-strmbtouc.
91070         * modules/unistr/u16-strstr (Depends-on): Add unistr/u16-strmbtouc.
91071         Suggested by Paolo Bonzini.
91073 2010-07-31  Bruno Haible  <bruno@clisp.org>
91075         unistr/u*-strstr: Fix dependencies.
91076         * modules/unistr/u8-strstr (Depends-on): Add unistr/u8-strchr.
91077         * modules/unistr/u16-strstr (Depends-on): Add unistr/u16-strchr.
91078         * modules/unistr/u32-strstr (Depends-on): Add unistr/u32-strchr.
91080 2010-07-31  Bruno Haible  <bruno@clisp.org>
91082         unistr/u8-chr, unistr/u8-strchr: Optimize and add comments.
91083         * lib/unistr/u8-chr.c (u8_chr): Add comments. Remove a useless test at
91084         the beginning of the loop.
91085         * lib/unistr/u8-strchr.c (u8_strchr): Add comments. Don't fall through
91086         cases in 'switch' statement.
91088         unistr/u8-strchr: Fix several bugs.
91089         * lib/unistr/u8-strchr.c (u8_strchr): Don't search beyond the end of
91090         the string. When not found, return NULL, not a pointer near the end.
91092         More tests for unistr/u8-strchr.
91093         * tests/unistr/test-strchr.h (test_strchr): Renamed from main. Check
91094         that the function does not read past the first occurrence of the byte
91095         being searched.
91096         * tests/unistr/test-u8-strchr.c (main): New function, with more tests.
91097         * tests/unistr/test-u16-strchr.c (main): New function.
91098         * tests/unistr/test-u32-strchr.c (main): New function.
91100 2010-07-31  Bruno Haible  <bruno@clisp.org>
91102         posix-modules: Ignore backup files of documentation files.
91103         * posix-modules: grep only through files named *.texi.
91105 2010-07-31  Bruno Haible  <bruno@clisp.org>
91107         symlinkat: Fix documentation.
91108         * doc/posix-functions/readlinkat.texi: Fix module name.
91110 2010-07-31  Bruno Haible  <bruno@clisp.org>
91112         fchownat: Replace also when chown has the trailing slash bug.
91113         * m4/openat.m4 (gl_FUNC_FCHOWNAT): Move the test of REPLACE_CHOWN
91114         outside the gl_FUNC_FCHOWNAT_DEREF_BUG invocation. Fixes regression
91115         introduced on 2010-04-10.
91116         Reported by Rainer Tammer.
91118 2010-07-31  Bruno Haible  <bruno@clisp.org>
91120         linkat: Work around AIX 7.1 bug.
91121         * m4/linkat.m4 (gl_FUNC_LINKAT): Require AC_CANONICAL_HOST. Test
91122         whether linkat handles trailing slash correctly. If not, replace linkat
91123         and define LINKAT_TRAILING_SLASH_BUG.
91124         * lib/linkat.c (rpl_linkat): If LINKAT_TRAILING_SLASH_BUG is defined,
91125         check whether (fd1,file1) points to a directory if file1 or file2 ends
91126         in a slash. Code taken from lib/link.c.
91127         * doc/posix-functions/linkat.texi: Mention trailing slash bug.
91128         Reported by Rainer Tammer.
91130 2010-07-31  Bruno Haible  <bruno@clisp.org>
91132         Correctly determine whether pow is available in libc on AIX 7 with xlc.
91133         * m4/mathfunc.m4 (gl_MATHFUNC): Actually use the 'funcptr' variable.
91134         This disables an xlc optimization that was causing wrong test results.
91135         Reported by Rainer Tammer.
91137 2010-07-31  Bruno Haible  <bruno@clisp.org>
91139         iconv: Work around AIX 6.1..7.1 bug.
91140         * doc/posix-functions/iconv.texi: Mention AIX 6.1, 7.1 bug.
91141         * m4/iconv.m4 (AM_ICONV_LINK): Test against AIX 6.1, 7.1 bug. When
91142         cross-compiling, guess no on all versions of AIX.
91143         Reported by Rainer Tammer.
91145 2010-07-31  Bruno Haible  <bruno@clisp.org>
91147         readlink: Relax test a bit.
91148         * tests/test-readlink.h (test_readlink): Allow different errno value
91149         when readlink is called with a file name that ends in / and refers to
91150         a file.
91151         Suggested by Eric Blake.
91152         Reported by Rainer Tammer.
91154 2010-07-31  Bruno Haible  <bruno@clisp.org>
91156         copysign: Does not require -lm on glibc systems.
91157         * modules/copysign (configure.ac): Use gl_MATHFUNC, not
91158         gl_COMMON_DOUBLE_MATHFUNC.
91159         * m4/mathfunc.m4 (gl_COMMON_DOUBLE_MATHFUNC): Update comments.
91161 2010-07-31  Bruno Haible  <bruno@clisp.org>
91163         duplocale: Work around AIX 7.1 bug.
91164         * m4/duplocale.m4 (gl_FUNC_DUPLOCALE): Let the test fail also when
91165         duplocale(LC_GLOBAL_LOCALE) returns (locale_t)0.
91166         * lib/duplocale.c (rpl_duplocale): Update comment.
91167         * doc/posix-functions/duplocale.texi: Mention the AIX 7.1 bug.
91168         Reported by Rainer Tammer.
91170 2010-07-30  Bruno Haible  <bruno@clisp.org>
91172         dirfd: Avoid link error on AIX 7.1.
91173         * lib/dirent.in.h (dirfd): Use modern idiom with REPLACE_DIRFD.
91174         * m4/dirfd.m4 (gl_FUNC_DIRFD): If the function is declared but does not
91175         exist, set REPLACE_DIRFD.
91176         * m4/dirent_h.m4 (gl_DIRENT_H_DEFAULTS): Initialize REPLACE_DIRFD.
91177         * modules/dirent (Makefile.am): Substitute REPLACE_DIRFD.
91178         * doc/posix-functions/dirfd.texi: Update.
91179         Reported by Rainer Tammer.
91181 2010-07-30  Eric Blake  <eblake@redhat.com>
91183         strtod: next round of AIX fixes
91184         * lib/strtod.c (strtod): Work around AIX bug of parsing p with no
91185         exponent.
91186         * tests/test-strtod.c (main): Enhance tests.
91187         * doc/posix-functions/strtod.texi (strtod): Document next bug.
91188         Reported by Rainer Tammer.
91190         futimens: fix configure check
91191         * m4/futimens.m4 (gl_FUNC_FUTIMENS): Use correct logic.
91192         Reported by Bruno Haible.
91194 2010-07-30  Bruno Haible  <bruno@clisp.org>
91196         getline: Update regarding AIX.
91197         * doc/posix-functions/getline.texi: Mention bug on AIX 7.1.
91198         Reported by Rainer Tammer.
91200 2010-07-30  Bruno Haible  <bruno@clisp.org>
91202         wcwidth: Drop replacement on AIX 7.
91203         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): When cross-compiling, guess yes on
91204         AIX 7.
91205         Reported by Rainer Tammer.
91207 2010-07-30  Bruno Haible  <bruno@clisp.org>
91209         strtok_r: Avoid triggering bug in AIX 7.1 xlc compiler.
91210         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Don't cast an invalid address to
91211         a 'char *'.
91212         Reported by Rainer Tammer.
91214 2010-07-30  Bruno Haible  <bruno@clisp.org>
91216         unlink: Update regarding AIX.
91217         * doc/posix-functions/unlink.texi: Mention bug on AIX 7.1.
91218         * m4/unlink.m4 (gl_FUNC_UNLINK): Update comment.
91219         Reported by Rainer Tammer.
91221 2010-07-30  Bruno Haible  <bruno@clisp.org>
91223         symlink: Update regarding AIX.
91224         * doc/posix-functions/symlink.texi: Mention bug on AIX 7.1.
91225         * m4/symlink.m4 (gl_FUNC_SYMLINK): Update comment.
91226         Reported by Rainer Tammer.
91228 2010-07-30  Bruno Haible  <bruno@clisp.org>
91230         strndup: Update regarding AIX.
91231         * m4/strndup.m4 (gl_FUNC_STRNDUP): When cross-compiling, guess yes on
91232         AIX 7.
91233         Reported by Rainer Tammer.
91235 2010-07-30  Bruno Haible  <bruno@clisp.org>
91237         stat: Update regarding AIX.
91238         * doc/posix-functions/stat.texi: Mention bug on AIX 7.1.
91239         * m4/stat.m4 (gl_FUNC_STAT): Update comment.
91240         Reported by Rainer Tammer.
91242 2010-07-30  Bruno Haible  <bruno@clisp.org>
91244         truncl: Fix autoconf test.
91245         * m4/truncl.m4 (gl_FUNC_TRUNCL): Add TRUNCL_LIBM to LIBS while testing
91246         whether truncl works.
91247         Reported by Rainer Tammer.
91249 2010-07-30  Bruno Haible  <bruno@clisp.org>
91251         round: Update regarding AIX.
91252         * m4/round.m4 (gl_FUNC_ROUND): When cross-compiling, guess no on AIX 7.
91253         * doc/posix-functions/round.texi: Mention bug on AIX 7.1.
91254         Reported by Rainer Tammer.
91256 2010-07-30  Bruno Haible  <bruno@clisp.org>
91258         rename: Update regarding AIX.
91259         * doc/posix-functions/rename.texi: Mention bug on AIX 7.1.
91260         * m4/rename.m4 (gl_FUNC_RENAME): Update comment.
91261         Reported by Rainer Tammer.
91263 2010-07-30  Bruno Haible  <bruno@clisp.org>
91265         printf.m4: Update regarding AIX.
91266         * m4/printf.m4: Update comments regarding AIX.
91267         Reported by Rainer Tammer.
91269 2010-07-30  Bruno Haible  <bruno@clisp.org>
91271         iconv: Update regarding AIX.
91272         * m4/iconv.m4 (AM_ICONV_LINK): When cross-compiling, guess yes on
91273         AIX 7.
91274         Reported by Rainer Tammer.
91276 2010-07-30  Bruno Haible  <bruno@clisp.org>
91278         getopt: Update regarding AIX.
91279         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): When cross-compiling, guess
91280         no on AIX.
91281         * doc/posix-functions/getopt.texi: Mention that AIX has the optind bug.
91282         Reported by Rainer Tammer.
91284 2010-07-30  Bruno Haible  <bruno@clisp.org>
91286         ldexpl; Update regarding AIX.
91287         * m4/ldexpl.m4 (gl_FUNC_LDEXPL_WORKS): When cross-compiling, guess yes
91288         on AIX 7.
91289         Reported by Rainer Tammer.
91291 2010-07-30  Bruno Haible  <bruno@clisp.org>
91293         frexpl: Update regarding AIX.
91294         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): When cross-compiling, guess yes
91295         on AIX 7.
91296         Reported by Rainer Tammer.
91298 2010-07-30  Bruno Haible  <bruno@clisp.org>
91300         open, fopen: Update regarding AIX.
91301         * m4/open.m4 (gl_FUNC_OPEN): Adjust cross-compiling guess for AIX.
91302         * m4/fopen.m4 (gl_FUNC_FOPEN): Likewise.
91303         * doc/posix-functions/open.texi: Mention the trailing-slash bug on AIX.
91304         * doc/posix-functions/fopen.texi: Likewise.
91305         Reported by Rainer Tammer.
91307 2010-07-30  Bruno Haible  <bruno@clisp.org>
91309         chown: Update doc regarding AIX.
91310         * doc/posix-functions/chown.texi: Mention bug on AIX 7.1.
91311         * m4/chown.m4 (gl_FUNC_CHOWN): Update comment.
91312         Reported by Rainer Tammer.
91314 2010-07-30  Eric Blake  <eblake@redhat.com>
91316         strtod: fix bug in replacement function on AIX
91317         * lib/strtod.c (strtod): Special case broken "0x" parse in
91318         underlying strtod.
91319         * tests/test-strtod.c (main): Document AIX 7.1 bugs.
91320         * doc/posix-functions/strtod.texi (strtod): Likewise.
91321         Reported by Rainer Tammer.
91323 2010-07-30  Bruno Haible  <bruno@clisp.org>
91325         mbrlen: Fix cross-compilation guess for AIX.
91326         * m4/mbrlen.m4 (gl_MBRLEN_INCOMPLETE_STATE): Fix cross-compilation
91327         guess. Leftover from 2008-12-22.
91329 2010-07-30  Bruno Haible  <bruno@clisp.org>
91331         mbrtowc: Fix cross-compilation guess for AIX.
91332         * m4/mbrtowc.m4 (gl_MBRTOWC_INCOMPLETE_STATE): Fix cross-compilation
91333         guess. Leftover from 2008-12-21.
91335 2010-07-29  Peter O'Gorman  <pogma@thewrittenword.com>  (tiny change)
91337         init.sh: work around trap limitation of some shells
91338         * tests/init.sh (setup_): Move exit trap outside of shell function.
91340 2010-07-29  Eric Blake  <eblake@redhat.com>
91342         strtod: aid debugging
91343         * m4/strtod.m4(gl_FUNC_STRTOD): Use distinct exit status to aid
91344         understanding why strtod is rejected.
91346 2010-07-28  Bruno Haible  <bruno@clisp.org>
91348         unistr/u*-chr, unistr/u*-strchr: Fix link errors and warnings.
91349         * lib/unistr/u8-chr.c: Include <string.h>.
91350         * tests/unistr/test-u8-chr.c: Likewise.
91351         * tests/unistr/test-u16-chr.c: Likewise.
91352         * tests/unistr/test-u32-chr.c: Likewise.
91353         * tests/unistr/test-u8-strchr.c: Likewise.
91354         * tests/unistr/test-u16-strchr.c: Likewise.
91355         * tests/unistr/test-u32-strchr.c: Likewise.
91356         * modules/unistr/u8-chr-tests (Depends-on): Add unistr/u32-set.
91357         * modules/unistr/u16-chr-tests (Depends-on): Likewise.
91358         * modules/unistr/u8-strchr-tests (Depends-on): Likewise.
91359         * modules/unistr/u16-strchr-tests (Depends-on): Likewise.
91361 2010-07-28  Bruno Haible  <bruno@clisp.org>
91363         Use spaces for indentation, not tabs.
91364         * lib/**/*.[hcy] except lib/reg*.[hc]: Untabify.
91366 2010-07-27  Bruno Haible  <bruno@clisp.org>
91368         mbspcasecmp: Fix function specification.
91369         * lib/string.in.h (mbspcasecmp): Fix specification comment.
91370         * lib/mbspcasecmp.c (mbspcasecmp): Likewise.
91371         Reported by Eric Blake <eblake@redhat.com>.
91373 2010-07-26  Paul R. Eggert  <eggert@cs.ucla.edu>
91375         timespec: use cast and not conditional, as truncation isn't possible
91376         * lib/timespec.h (timespec_cmp): Use cast to pacify gcc -Wconversion
91377         instead of a conditional.  Comment about the situation in more detail.
91378         This undoes most of the 2009-10-29 patch.
91380 2010-07-23  Paolo Bonzini  <pbonzini@redhat.com>
91382         unistr/u8-chr, unistr/u8-strchr: use Boyer-Moore like algorithm.
91383         * lib/unistr/u8-chr.c: Add Boyer-Moore like operation.
91384         * lib/unistr/u8-strchr.c: Likewise.
91385         * modules/unistr/u8-chr: Depend on memchr.
91387         unistr/u*-strchr: add tests
91388         * modules/unistr/u8-strchr-tests: New file.
91389         * modules/unistr/u16-strchr-tests: New file.
91390         * modules/unistr/u32-strchr-tests: New file.
91391         * tests/unistr/test-strchr.h: New file.
91392         * tests/unistr/test-u8-strchr.c: New file.
91393         * tests/unistr/test-u16-strchr.c: New file.
91394         * tests/unistr/test-u32-strchr.c: New file.
91396         unistr/u*-chr: test multibyte sequences more
91397         * tests/unistr/test-chr.h: Do complete testing of the characters in the
91398         test vector.
91399         * tests/unistr/test-u8-chr.c (U_UCTOMB): Define.
91400         * tests/unistr/test-u16-chr.c (U_UCTOMB): Likewise.
91401         * tests/unistr/test-u32-chr.c (U_UCTOMB): Likewise.
91403         unistr/u*-chr: test multibyte sequences
91404         * tests/unistr/test-chr.h: Put characters above 0-127 in the test input.
91406         unistr/u*-chr: prepare for multibyte tests
91407         * modules/unistr/u8-chr-tests: Depend on u32-to-u8.
91408         * modules/unistr/u16-chr-tests: Depend on u32-to-u16.
91409         * tests/unistr/test-chr.h: Build initial version as UCS-4 then convert.
91410         * tests/unistr/test-u8-chr.c (U32_TO_U): Define.
91411         * tests/unistr/test-u16-chr.c (U32_TO_U): Likewise.
91412         * tests/unistr/test-u32-chr.c (U32_TO_U): Likewise.
91414 2010-07-18  Bruno Haible  <bruno@clisp.org>
91416         unistr/u8-strchr: Optimize non-ASCII argument case.
91417         * lib/unistr/u8-strchr.c (u8_strchr): Compare the last byte first,
91418         because the first byte often matches anyway.
91419         Reported by Pádraig Brady <P@draigbrady.com>.
91421 2010-07-15  Karl Berry  <karl@gnu.org>
91423         * config/srclist.txt (fdl.texi): only one copy, from gnustandards.
91425 2010-07-14  Paul R. Eggert  <eggert@cs.ucla.edu>
91427         getcwd: on Solaris, work better if ancestors are inaccessible
91428         * lib/getcwd.c (__getcwd): If getcwd returns EINVAL for zero
91429         buffer and size, try again with a large buffer.  This works better
91430         on Solaris, since its getcwd succeeds even if the path to the root
91431         is inaccessible, and this is helpful in common cases such as .zfs
91432         hidden directories.  Problem reported by J Chapman Flack in
91433         http://lists.gnu.org/r/bug-tar/2010-06/msg00000.html
91434         Use system getcwd if it's declared, not merely if it's partly
91435         working; use the partly-working test only to avoid needless effort
91436         if the system getcwd fails.
91437         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Omit
91438         comment that was already obsolete and is now even more obsolete.
91439         * modules/getcwd (Depends-on): Depend on strdup, since __getcwd
91440         now might call strdup.
91442 2010-07-13  Paul R. Eggert  <eggert@cs.ucla.edu>
91444         pthread: Add enough so that coreutils/src/sort.c compiles.
91445         * lib/pthread.in.h: Add self to author comment.  Conditionalize on
91446         _GL_PTHREAD_H, not PTHREAD_H_, for consistency with the rest of
91447         gnulib. Include <sched.h> and <time.h>, as per POSIX.
91448         Include <sys/types.h>, in case it defines pthread_t.
91449         (pthread_t, pthread_attr_t, pthread_barrier_t, pthread_barrierattr_t):
91450         (pthread_cond_t, pthread_condattr_t, pthread_key_t, pthread_mutex_t):
91451         (pthread_mutexattr_t, pthread_once_t, pthread_rwlock_t):
91452         (pthread_rwlockattr_t, pthread_spinlock_t):
91453         New typedefs, if HAVE_PTHREAD_T is not defined.
91454         (PTHREAD_COND_INITIALIZER, PTHREAD_MUTEX_INITIALIZER):
91455         (PTHREAD_ONCE_INIT, PTHREAD_RWLOCK_INITIALIZER):
91456         (PTHREAD_BARRIER_SERIAL_THREAD, PTHREAD_CANCEL_DEFERRED):
91457         (PTHREAD_CANCEL_ASYNCHRONOUS, PTHREAD_CANCEL_ENABLE):
91458         (PTHREAD_CANCEL_DISABLE, PTHREAD_CANCELED, PTHREAD_CREATE_JOINABLE):
91459         (PTHREAD_CREATE_DETACHED, PTHREAD_INHERIT_SCHED):
91460         (PTHREAD_EXPLICIT_SCHED, PTHREAD_MUTEX_DEFAULT, PTHREAD_MUTEX_NORMAL):
91461         (PTHREAD_MUTEX_ERRORCHECK, PTHREAD_MUTEX_RECURSIVE):
91462         (PTHREAD_MUTEX_STALLED, PTHREAD_MUTEX_ROBUST, PTHREAD_PRIO_NONE):
91463         (PTHREAD_PRIO_INHERIT, PTHREAD_PRIO_PROTECT, PTHREAD_PROCESS_PRIVATE):
91464         (PTHREAD_PROCESS_SHARED, PTHREAD_SCOPE_SYSTEM, PTHREAD_SCOPE_PROCESS):
91465         New macros.
91466         (pthread_cond_destroy, pthread_cond_init, pthread_cond_signal):
91467         (pthread_cond_wait, pthread_exit, pthread_mutex_destroy):
91468         (pthread_mutex_init, pthread_mutex_lock, pthread_mutex_unlock):
91469         (pthread_spin_init, pthread_spin_lock, pthread_spin_trylock);
91470         (pthread_spin_unlock): New dummy functions.
91471         (pthread_create): Return EAGAIN; don't set errno.
91472         * m4/pthread.m4 (gl_PTHREAD_CHECK): Check for pthread_t, and
91473         require AC_C_INLINE.
91474         * modules/pthread (Depends-on): Add sched, time.
91475         (pthread.h): Use AM_V_GEN.
91477 2010-07-13  Bruno Haible  <bruno@clisp.org>
91479         striconveh: Don't malloc memory if the result buffer is sufficient.
91480         * lib/striconveh.c (mem_cd_iconveh_internal): Use the provided result
91481         buffer if its size is sufficient.
91482         Reported by Ludovic Courtès <ludo@gnu.org>.
91484 2010-07-13  Bruno Haible  <bruno@clisp.org>
91486         strtod: Add safety check.
91487         * lib/strtod.c (ldexp): Abort if this dummy replacement gets called.
91489 2010-07-12  Bruno Haible  <bruno@clisp.org>
91491         Unify tests that set gl_cv_func_ldexpl_no_libm.
91492         * m4/ldexpl.m4 (gl_CHECK_LDEXPL_NO_LIBM): New macro, extracted from
91493         gl_FUNC_LDEXPL.
91494         (gl_FUNC_LDEXPL): Invoke it.
91495         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Likewise.
91497 2010-07-12  Bruno Haible  <bruno@clisp.org>
91499         Unify tests that set gl_cv_func_ldexp_no_libm.
91500         * m4/ldexp.m4: New file, based on m4/mathfunc.m4.
91501         * m4/strtod.m4 (gl_PREREQ_STRTOD): Require gl_CHECK_LDEXP_NO_LIBM.
91502         * modules/ldexp (Files): Remove m4/mathfunc.m4. Add m4/ldexp.m4.
91503         (configure.ac): Simply invoke gl_FUNC_LDEXP.
91504         * modules/strtod (Files): Add m4/ldexp.m4.
91506 2010-07-12  Bruno Haible  <bruno@clisp.org>
91508         Unify tests that set gl_cv_func_frexpl_no_libm.
91509         * m4/frexpl.m4 (gl_CHECK_FREXPL_NO_LIBM): New macro, extracted from
91510         gl_FUNC_FREXPL_NO_LIBM.
91511         (gl_FUNC_FREXPL, gl_FUNC_FREXPL_NO_LIBM): Invoke it.
91512         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Likewise.
91514 2010-07-12  Bruno Haible  <bruno@clisp.org>
91516         Unify tests that set gl_cv_func_frexp_no_libm.
91517         * m4/frexp.m4 (gl_CHECK_FREXP_NO_LIBM): New macro, extracted from
91518         gl_FUNC_FREXP_NO_LIBM.
91519         (gl_FUNC_FREXP, gl_FUNC_FREXP_NO_LIBM): Require it.
91520         * m4/printf-frexp.m4 (gl_FUNC_PRINTF_FREXP): Likewise.
91522 2010-07-12  Paul R. Eggert  <eggert@cs.ucla.edu>
91524         memcoll: clarify sizes versus lengths, document better, and tweak perf
91525         * lib/memcoll.c (strcoll_loop, memcoll0):
91526         Improve quality of descriptive comments.  Name variables
91527         consistently as to whether they are lengths (which do not include
91528         terminating null) versus sizes (which do).
91529         * lib/xmemcoll.c (xmemcoll0): Likewise.
91530         * lib/memcoll.c (strcoll_loop): Tweak the way that the diff is
91531         returned when s1size == 0; this is easier to compile and saves
91532         about 17% of memcoll's code space on x86-64 with GCC 4.1.2.
91534 2010-07-12  Bruno Haible  <bruno@clisp.org>
91536         Tests for module '_Exit'.
91537         * modules/_Exit-tests: New file.
91538         * tests/test-_Exit.sh: New file.
91539         * tests/test-_Exit.c: New file.
91541         New module '_Exit'.
91542         * lib/stdlib.in.h (__attribute__): New macro.
91543         (_Exit): New declaration.
91544         * lib/_Exit.c: New file.
91545         * m4/_Exit.m4: New file.
91546         * m4/stdlib_h.m4 (gl_STDLIB_H): Check whether _Exit is declared.
91547         (gl_STDLIB_H_DEFAULTS): Initialize GNULIB__EXIT and HAVE__EXIT.
91548         * modules/stdlib (Makefile.am): Substitute GNULIB__EXIT and HAVE__EXIT.
91549         * modules/_Exit: New file.
91550         * tests/test-stdlib-c++.cc (_Exit): Check signature.
91551         * doc/posix-functions/_Exit_C99.texi: Mention the new module.
91553 2010-07-12  Paul R. Eggert  <eggert@cs.ucla.edu>
91555         strtod: make it more-accurate typically, and don't require libm
91556         * lib/strtod.c (_GL_ARG_NONNULL): Remove; no longer needed.
91557         Include limits.h.  Don't include string.h.
91558         (HAVE_LDEXP_IN_LIBC, HAVE_RAW_DECL_STRTOD): Define to 0 if not defined.
91559         (locale_isspace): New function, so that no casts are needed to
91560         check whether *s is a space.
91561         (ldexp): Provide an unused dummy if not available.
91562         (scale_radix_exp, parse_number, underlying_strtod): New functions.
91563         (strtod): Use them.  This implementation prefers to use the
91564         underlying strtod if available, falling back on our own code
91565         only to fix known bugs.  This is more likely to produce an
91566         accurate result.  Also, it avoids the use of libm functions.
91567         * m4/strtod.m4 (gl_FUNC_STRTOD): Don't invoke _AC_LIBOBJ_STRTOD;
91568         no longer needed.  Invoke AC_LIBOBJ([strtod]); don't know why this
91569         was absent, but it caused a test failure with coreutils.
91570         (gl_PREREQ_STRTOD): Check wither ldexp can be used without linking
91571         with libm.
91572         * modules/strtod (Makefile.am, Link): libm is no longer needed.
91573         * modules/strtod-tests (Makefile.am): Likewise.
91575 2010-07-11  Pádraig Brady  <P@draigBrady.com>
91576             Bruno Haible  <bruno@clisp.org>
91578         unistr/u8-strchr: Optimize ASCII argument case.
91579         * lib/unistr/u8-strchr.c (u8_strchr): For ASCII arguments, use strchr.
91581 2010-07-08  Paul Eggert  <eggert@cs.ucla.edu>
91583         (x)memcoll: minor tweaks
91584         * lib/memcoll.c (strcoll_loop): Prefer the style where 'const'
91585         is after the type that it qualifies.
91586         (memcoll0): Likewise.
91587         * lib/memcoll.h (memcoll0): Likewise.
91588         * lib/xmemcoll.c (collate_error, xmemcoll0): Likewise.
91589         * lib/xmemcoll.h (xmemcoll0): Likewise.
91590         * lib/memcoll.c (memcoll0): Correct the comment.  This function
91591         differs from memcoll in that the NUL byte is part of the argument.
91592         Omit the abort-checks, as performance is a real issue here.  Plus,
91593         the checks were wrong anyway (an off-by-one error).  Omit local
91594         variable 'diff', as it's a bit clearer that way.
91595         * m4/memcoll.m4 (gl_MEMCOLL): Omit AC_FUNC_STRCOLL, as it's
91596         no longer needed.
91598 2010-07-08  Chen Guo  <chenguo4@yahoo.com>
91600         (x)memcoll: speedup when input is known to be NUL delimited
91601         * lib/memcoll.c: Include stdlib.
91602         (memcoll0): New function.
91603         (strcoll_loop): New function, refactored for use in both memcoll
91604         and memcoll0.
91605         * lib/memcoll.h (memcoll0): Add prototype.
91606         * lib/xmemcoll.c (xmemcoll0): New function.
91607         (collate_error): New function, refactored for use in both xmemcoll
91608         and xmemcoll0.
91609         * lib/xmemcoll.h (xmemcoll0): Add prototype.
91610         * m4/memcoll.m4: add inline invocation.
91612 2010-07-06  Pádraig Brady  <P@draigBrady.com>
91614         * build-aux/bootstrap: Remove any local translations
91615         from the translation project synchronization directory,
91616         so that local only translations are not distributed.
91618 2010-07-04  Bruno Haible  <bruno@clisp.org>
91620         fsusage: Clarify which code applies to which platforms.
91621         * m4/fsusage.m4 (gl_FSUSAGE): Clarify which test succeeds on which
91622         platform.
91623         * lib/fsusage.c (get_fs_usage): Likewise.
91625 2010-07-04  Bruno Haible  <bruno@clisp.org>
91627         havelib: Fix bug when AC_LIB_FROMPACKAGE is used more than twice.
91628         * m4/lib-link.m4 (AC_LIB_FROMPACKAGE): Use m4_defn.
91629         Reported by Martin Lambers <marlam@marlam.de>.
91631 2010-07-04  Jim Meyering  <meyering@redhat.com>
91633         hash: once again explicitly disallow insertion of NULL
91634         * lib/hash.c (hash_insert0): Reinstate just-removed test:
91635         inserting a NULL pointer cannot work with these functions.
91636         Add a comment with details.
91637         This reverts part of the 2010-07-01 commit, 5bef1a35
91638         "hash: extend module to deal with non-pointer keys".
91640 2010-07-01  Bruno Haible  <bruno@clisp.org>
91642         stdbool: Update doc.
91643         * doc/posix-headers/stdbool.texi: Mention OpenBSD bug.
91644         Info from Christian Weisgerber <naddy@mips.inka.de>.
91646 2010-07-01  Jim Meyering  <meyering@redhat.com>
91648         hash: extend module to deal with non-pointer keys
91649         * lib/hash.c (hash_insert0): New interface, much like hash_insert
91650         but that allows insertion of non-pointer entries.
91651         Do not disallow an ENTRY value of NULL.
91652         (hash_insert): This is now just a thin wrapper.  Call hash_insert0.
91653         * lib/hash.h (hash_insert0): Declare.
91655 2010-07-01  Christian Weisgerber  <naddy@mips.inka.de>  (tiny change)
91657         gettext: Use AC_GNU_SOURCE as a fallback for AC_USE_SYSTEM_EXTENSIONS.
91658         * m4/fcntl-o.m4 (gl_FCNTL_O_FLAGS): When AC_USE_SYSTEM_EXTENSIONS is
91659         not present (i.e. with autoconf 2.59 and when using gettextize, not
91660         gnulib), require AC_GNU_SOURCE instead.
91662 2010-07-01  Ian Beckwith  <ianb@erislabs.net>
91664         idpriv-drop: Fix tests.
91665         * tests/test-idpriv-drop.su.sh: Refer to the test-idpriv-drop program,
91666         not to the test-idpriv-droptemp program.
91668 2010-06-29  Bruno Haible  <bruno@clisp.org>
91670         string: Fix syntax error with g++ 2.96.
91671         * lib/string.in.h (__pure__): Remove definition.
91672         (_GL_ATTRIBUTE_PURE): New macro.
91673         (memchr, memmem, memrchr, rawmemchr, strchrnul, strnlen, strpbrk,
91674         strstr, strcasestr): Use it instead of __attribute__ ((__pure__)).
91675         Reported by Christian Weisgerber <naddy@mips.inka.de>.
91677 2010-06-28  Ian Beckwith  <ianb@erislabs.net>
91679         unitypes: Fix bug introduced on 2010-05-18.
91680         * modules/unitypes (Files): Really add m4/libunistring-base.m4.
91682 2010-06-22  Eric Blake  <eblake@redhat.com>
91684         memmem: slight optimization
91685         * lib/str-two-way.h (critical_factorization): Update comments.
91686         Reduce work during factorization phase.
91687         Reported by Carlos Bueno <carlos@bueno.org>.
91689 2010-06-21  Bruno Haible  <bruno@clisp.org>
91691         Fix HAVE_CALLOC_POSIX misnomer.
91692         * lib/stdlib.in.h (calloc): Use REPLACE_CALLOC instead of
91693         !HAVE_CALLOC_POSIX.
91694         * m4/calloc.m4 (gl_REPLACE_CALLOC): Set REPLACE_CALLOC instead of
91695         HAVE_CALLOC_POSIX.
91696         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize REPLACE_CALLOC
91697         instead of HAVE_CALLOC_POSIX.
91698         * modules/stdlib (Makefile.am): Substitute REPLACE_CALLOC instead of
91699         HAVE_CALLOC_POSIX.
91701         Use modern idiom for calloc() replacement.
91702         * modules/calloc (configure.ac): Invoke gl_FUNC_CALLOC_GNU instead of
91703         AC_FUNC_CALLOC.
91704         * m4/calloc.m4 (gl_FUNC_CALLOC_GNU): Renamed from AC_FUNC_CALLOC.
91705         Require gl_STDLIB_H_DEFAULTS. Invoke gl_REPLACE_CALLOC.
91706         (gl_FUNC_CALLOC_POSIX): Rely on gl_STDLIB_H_DEFAULTS to initialize
91707         HAVE_CALLOC_POSIX. Invoke gl_REPLACE_CALLOC.
91708         (gl_REPLACE_CALLOC): New macro.
91710 2010-06-21  Bruno Haible  <bruno@clisp.org>
91712         Fix HAVE_REALLOC_POSIX misnomer.
91713         * lib/stdlib.in.h (realloc): Use REPLACE_REALLOC instead of
91714         !HAVE_REALLOC_POSIX.
91715         * m4/realloc.m4 (gl_REPLACE_REALLOC): Set REPLACE_REALLOC instead of
91716         HAVE_REALLOC_POSIX.
91717         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize REPLACE_REALLOC
91718         instead of HAVE_REALLOC_POSIX.
91719         * modules/stdlib (Makefile.am): Substitute REPLACE_REALLOC instead of
91720         HAVE_REALLOC_POSIX.
91722         Use modern idiom for realloc() replacement.
91723         * modules/realloc (configure.ac): Invoke gl_FUNC_REALLOC_GNU instead of
91724         AC_FUNC_REALLOC.
91725         * m4/realloc.m4 (gl_FUNC_REALLOC_GNU): New macro, mostly copied from
91726         Autoconf's AC_FUNC_REALLOC.
91727         (gl_FUNC_REALLOC_POSIX): Rely on gl_STDLIB_H_DEFAULTS to initialize
91728         HAVE_REALLOC_POSIX. Invoke gl_REPLACE_REALLOC.
91729         (gl_REPLACE_REALLOC): New macro.
91730         Reported by Richard Lloyd <richard.lloyd@connectinternetsolutions.com>.
91732 2010-06-21  Bruno Haible  <bruno@clisp.org>
91734         Fix HAVE_MALLOC_POSIX misnomer.
91735         * lib/stdlib.in.h (malloc): Use REPLACE_MALLOC instead of
91736         !HAVE_MALLOC_POSIX.
91737         * m4/malloc.m4 (gl_REPLACE_MALLOC): Set REPLACE_MALLOC instead of
91738         HAVE_MALLOC_POSIX.
91739         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize REPLACE_MALLOC
91740         instead of HAVE_MALLOC_POSIX.
91741         * modules/stdlib (Makefile.am): Substitute REPLACE_MALLOC instead of
91742         HAVE_MALLOC_POSIX.
91744         Use modern idiom for malloc() replacement.
91745         * modules/malloc (configure.ac): Invoke gl_FUNC_MALLOC_GNU instead of
91746         AC_FUNC_MALLOC.
91747         * m4/malloc.m4 (gl_FUNC_MALLOC_GNU): New macro, mostly copied from
91748         Autoconf's AC_FUNC_MALLOC.
91749         (gl_FUNC_MALLOC_POSIX): Rely on gl_STDLIB_H_DEFAULTS to initialize
91750         HAVE_MALLOC_POSIX. Invoke gl_REPLACE_MALLOC.
91751         (gl_REPLACE_MALLOC): New macro.
91752         Reported by Richard Lloyd <richard.lloyd@connectinternetsolutions.com>.
91754 2010-06-20  Richard Lloyd  <richard.lloyd@connectinternetsolutions.com>
91756         stdio.in.h: fix compilation failure when using HP-UX 11's C compiler
91757         * lib/stdio.in.h: Remove excess _GL_CXXALIAS_RPL macro argument.
91758         This macro takes 3 arguments, not 4.
91760 2010-06-15  Giuseppe Scrivano  <gscrivano@gnu.org>
91762         ipv6: fix detection under mingw
91763         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Include <ws2tcpip.h> for struct
91764         in6_addr.
91766 2010-06-14  Ben Pfaff  <blp@cs.stanford.edu>
91768         * m4/strtod.m4 (gl_FUNC_STRTOD): Factor out common code.  Assume
91769         that strtod() works when cross-compiling to a glibc version known
91770         to work.
91772 2010-06-15  Bruno Haible  <bruno@clisp.org>
91774         * m4/strtod.m4 (gl_FUNC_STRTOD): Stop using AC_FUNC_STRTOD.
91776 2010-06-15  René Berber  <r.berber@computer.org>  (tiny change)
91778         select: Correct timeout.
91779         * lib/select.c (rpl_select): Compute wait_timeout correctly.
91781 2010-06-14  Thien-Thi Nguyen  <ttn@gnuvola.org>  (tiny change)
91783         git-version-gen: init shell var to avoid env var influence
91784         * build-aux/git-version-gen (v): Init shell var to empty.
91786 2010-06-14  Paul Eggert  <eggert@cs.ucla.edu>
91788         priv-set: Don't assume that priv.h exists merely because getppriv does.
91789         See Jan Andersen's bug report about AIX 5L in
91790         http://lists.gnu.org/r/bug-tar/2010-06/msg00019.html
91791         * m4/priv-set.m4 (gl_PRIV_SET): Check for priv.h.
91792         * lib/priv-set.c: Do nothing unless HAVE_PRIV_H.
91793         * lib/priv-set.h: Likewise.
91794         * tests/test-priv-set.c: Likewise.
91796 2010-06-13  Bruno Haible  <bruno@clisp.org>
91798         relocatable: Make it easier to test whether to install wrappers.
91799         * m4/relocatable.m4 (gl_RELOCATABLE_BODY): New automake conditional
91800         RELOCATABLE_VIA_WRAPPER.
91802 2010-06-13  Bruno Haible  <bruno@clisp.org>
91804         gnulib-tool: Display specified modules and dependencies differently.
91805         * gnulib-tool (func_show_module_list): New function.
91806         (func_import, func_create_testdir): Invoke it.
91807         Reported by Thien-Thi Nguyen <ttn@gnuvola.org>.
91809 2010-06-13  Bruno Haible  <bruno@clisp.org>
91811         gnulib-tool: Align code of func_import and func_create_testdir.
91812         * gnulib-tool (func_create_testdir): Rename variable saved_modules to
91813         specified_modules.
91815 2010-06-12  Jim Meyering  <meyering@redhat.com>
91817         test-inttostr: avoid spurious failure on Solaris 9
91818         * tests/test-inttostr.c (main): Skip the test when snprintf fails
91819         to accept "%ju".  Reported by Bruno Haible.
91821 2010-06-11  Jim Meyering  <meyering@redhat.com>
91823         test-sys_socket: mark variables as used more readably
91824         * tests/test-sys_socket.c (main): Mark otherwise unused variables
91825         as "used" explicitly via (void) statement casts.  This is more
91826         readable than using them in an artificial return expression.
91827         Suggestion from Bruno Haible.
91829 2010-06-11  Bruno Haible  <bruno@clisp.org>
91831         Avoid some more warnings from "gcc -Wwrite-strings".
91832         * tests/test-argp.c (test_optional): Change 5th and 6th argument type
91833         to 'const char *'.
91834         * tests/test-c-strstr.c (main): Add 'const' to variable declaration.
91835         * tests/test-c-strcasestr.c (main): Likewise.
91836         * tests/test-mbscasestr1.c (main): Likewise.
91837         * tests/test-mbscasestr2.c (main): Likewise.
91838         * tests/test-memmem.c (main): Likewise.
91839         * tests/test-strstr.c (main): Likewise.
91840         * tests/test-strcasestr.c (main): Likewise.
91842 2010-06-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
91844         init.sh: change framework_failure_ to fail with status 99, not 1
91845         * tests/init.sh (framework_failure_): Exit 99, not 1.  This informs
91846         automake's parallel-tests rule that this is an unexpected failure,
91847         even if the test is listed in XFAIL_TESTS.
91849 2010-06-11  Jim Meyering  <meyering@redhat.com>
91851         test-inttostr: avoid warnings about 4-6KB literal strings
91852         * tests/test-inttostr.c: Don't use <assert.h>.  Instead, ...
91853         Include "macros.h", for its definition of ASSERT.
91854         (CK): s/assert/ASSERT/
91855         * modules/inttostr-tests (Files): Add macros.h.
91857         init.sh: don't use $ME_ or skip_ before they are defined
91858         * tests/init.sh: Hoist definitions of $ME_ and skip_ to precede
91859         their first uses.  Also hoist their companions: warn_, fail_,
91860         framework_failure_, $stderr_fileno.  Prompted by a patch from
91861         Stefano Lattarini.
91863         test-sys_socket: avoid set-but-not-used warnings from gcc
91864         * tests/test-sys_socket.c (main): Use "i" and "x", in order to
91865         avoid warning about set-but-not-used variables.
91867         test-xvasprintf: avoid 'const' discard warnings
91868         * tests/test-xvasprintf.c (test_xvasprintf, test_xasprintf): Use
91869         "const" when assigning from literal strings.
91870         (test_xasprintf): Add "void" in function argument list to placate
91871         -Wstrict-prototypes and to be consistent with test_xvasprintf above.
91873         tests: avoid compilation warnings in argmatch and exclude tests...
91874         in packages that define ARGMATCH_DIE_DECL, like coreutils.
91875         * tests/test-exclude.c [ARGMATCH_DIE_DECL]: Also declare the function.
91876         Since it always exits, declare with the "noreturn" attribute.
91877         * tests/test-argmatch.c: Likewise.
91879         tests: avoid 'const' discard warnings in mbsstr tests
91880         * tests/test-mbsstr1.c (main): Add "const" to avoid trivial warning.
91881         * tests/test-mbsstr2.c (main): Likewise.
91883         test-verify: avoid warning from gcc's -Wmissing-declarations
91884         * tests/test-verify.c (function): Declare to be static.
91886         test-inttostr.c: include <string.h> for use of strcmp
91887         * tests/test-inttostr.c: Include <string.h> for strcmp declaration.
91889         test-linkat: avoid failed assertion on "other" architectures
91890         * tests/test-linkat.c: Include <sys/stat.h>, for declarations of stat,
91891         lstat, mkdir.  Patch by John Rigby, to fix FTBFS on armel, powerpc,
91892         sparc: https://bugs.launchpad.net/bugs/591968
91894 2010-06-11  Jim Meyering  <meyering@redhat.com>
91896         printf.m4: avoid autoconf's "Expanded Before Required" warning
91897         * m4/printf.m4 (gl_SNPRINTF_RETVAL_C99): Define using AC_DEFUN_ONCE,
91898         rather than AC_DEFUN, to avoid the classic "Expanded Before Required"
91899         autoconf warning.
91901 2010-06-10  Ben Pfaff  <blp@cs.stanford.edu>
91903         Replacement header templates are now named with ".in", not "_".
91904         * doc/gnulib-intro.texi: Correct.
91906 2010-06-10  Jim Meyering  <meyering@redhat.com>
91908         inttostr-tests: depend on snprintf, not snprintf-posix
91909         * modules/inttostr-tests (Depends-on): Depend on snprintf, not
91910         snprintf-posix, to avoid this aclocal failure:
91911           missing file gnulib-tests/vasnprintf.c
91912           configure.ac:45: error: expected source file, required through \
91913           AC_LIBSOURCES, not found
91915 2010-06-10  Jim Meyering  <meyering@redhat.com>
91917         inttostr: add a new function, inttostr, and tests
91918         The namesake function was not available.  The existence of the
91919         template file, inttostr.c makes its addition nontrivial.
91920         * lib/anytostr.c: Rename from inttostr.c.
91921         (anytostr): Rename from inttostr.
91922         * lib/inttostr.c: New file.
91923         * modules/inttostr (Files): Add anytostr.c.
91924         (Makefile.am): Set lib_SOURCES instead of ...
91925         * m4/inttostr.m4: Remove uses of AC_LIBOBJ.
91926         * lib/imaxtostr.c: Update use.  s/inttostr/anytostr/
91927         * lib/offtostr.c: Likewise.
91928         * lib/uinttostr.c: Likewise.
91929         * lib/umaxtostr.c: Likewise.
91930         * modules/inttostr-tests: New file.
91931         * tests/test-inttostr.c: New file.  Test these functions.
91933 2010-06-09  Ben Pfaff  <blp@cs.stanford.edu>
91934             Bruno Haible  <bruno@clisp.org>
91936         Add "Extending Gnulib" chapter to manual.
91937         * doc/gnulib.texi (Writing Modules): Add cross-reference to new
91938         chapter.
91939         (Extending Gnulib): New chapter.
91940         * doc/gnulib-intro.texi (Openness): Add cross-reference to new
91941         chapter.
91943 2010-06-09  Bruno Haible  <bruno@clisp.org>
91945         Avoid relocwrapper link errors due to gnulib replacement functions.
91946         * lib/areadlink.c: Use the system's malloc, realloc functions.
91947         (areadlink): Set errno to ENOMEM explicitly.
91948         * modules/areadlink (Depends-on): Remove malloc-posix.
91949         Reported by Ben Pfaff <blp@cs.stanford.edu>.
91951 2010-06-09  Bruno Haible  <bruno@clisp.org>
91953         Avoid relocwrapper link errors due to gnulib replacement functions.
91954         * lib/canonicalize-lgpl.c: Use the system's malloc function.
91955         * lib/malloca.c: Likewise.
91956         * lib/relocatable.c: Likewise.
91957         * lib/progreloc.c: Use the system's malloc, sprintf functions.
91958         * lib/relocwrapper.c: Use the system's fprintf, malloc functions.
91959         * lib/setenv.c: Use the system's malloc, realloc functions.
91960         * lib/strerror.c: Use the system's sprintf function.
91961         Reported by Ben Pfaff <blp@cs.stanford.edu>.
91963 2010-06-04  Bruno Haible  <bruno@clisp.org>
91965         Prefer documented low-level autoconf macro names.
91966         * m4/lib-link.m4: Use m4_translit instead of translit.
91967         * m4/environ.m4: Likewise.
91968         * m4/mathfunc.m4: Likewise.
91969         * m4/onceonly.m4: Likewise.
91970         * m4/stdint.m4: Likewise.
91971         Suggested by Eric Blake.
91973 2010-06-04  Martin Lambers  <marlam@marlam.de>
91974             Bruno Haible  <bruno@clisp.org>
91976         havelib: Allow library names with '+' characters.
91977         * m4/lib-link.m4 (AC_LIB_LINKFLAGS, AC_LIB_HAVE_LINKFLAGS,
91978         AC_LIB_FROMPACKAGE, AC_LIB_LINKFLAGS_BODY): Convert '+' in name to '_'.
91980 2010-06-09  Bruno Haible  <bruno@clisp.org>
91982         Module setenv does not depend on 'malloc-posix', 'realloc-posix'.
91983         * lib/setenv.c (__add_to_environ): Set errno to ENOMEM when malloc or
91984         realloc failed.
91986 2010-06-08  Peter Simons  <simons@cryp.to>
91988         maint.mk: make the news-check rule more configurable
91989         * top/maint.mk (news-check-lines-spec): New variable.
91990         (news-check): Use "sed -n 1,10p" in place of "head".
91992 2010-06-07  Jim Meyering  <meyering@redhat.com>
91994         do-release-commit-and-tag: fix typo in --help
91995         * build-aux/do-release-commit-and-tag (Usage): Fix typo in --help.
91997         regex: avoid new dead-code warning with gcc-4.6.0
91998         * lib/regex_internal.c (re_string_reconstruct): #if-0-out a dead
91999         if-block containing a while-loop.  It's been unused for at least
92000         5 years.
92002 2010-06-05  Bruno Haible  <bruno@clisp.org>
92004         * doc/posix-functions/strcoll.texi: Mention Solaris limitation.
92005         Reported by River Tarnell <river.tarnell@wikimedia.de> via Eric Blake.
92007 2010-06-04  Bruno Haible  <bruno@clisp.org>
92009         Update to GNU gettext 0.18.1.
92010         * modules/gettext (configure.ac): Require gettext infrastructure from
92011         version 0.18.1.
92013 2010-06-03  Bruno Haible  <bruno@clisp.org>
92015         Don't use AC_LIBOBJ with file names in subdirectories.
92016         * m4/libunistring-base.m4 (gl_LIBUNISTRING_MODULE): Renamed from
92017         gl_LIBUNISTRING_LIBSOURCE. Take a module name as argument, not a file
92018         name. Define an automake conditional. Don't invoke AC_LIBOBJ.
92019         * m4/libunistring.m4 (gl_LIBUNISTRING): Update AC_BEFORE invocation.
92020         * modules/uni*/* (configure.ac): Use gl_LIBUNISTRING_MODULE instead of
92021         gl_LIBUNISTRING_LIBSOURCE.
92022         (Makefile.am): Augment lib_SOURCES here, conditionally.
92023         * NEWS: Drop requirement for Automake option 'subdir-objects'.
92025 2010-06-03  Bruno Haible  <bruno@clisp.org>
92027         Simplify gl_LIBUNISTRING_VERSION_CMP expansion.
92028         * m4/libunistring-base.m4 (gl_LIBUNISTRING_VERSION_CMP): Ensure
92029         expansion does not end with a newline.
92030         (gl_LIBUNISTRING_LIBSOURCE, gl_LIBUNISTRING_LIBHEADER): Avoid
92031         unnecessary newline.
92033 2010-06-03  Bruno Haible  <bruno@clisp.org>
92035         Reduce dependencies.
92036         * tests/test-quotearg.h: New file, extracted from
92037         tests/test-quotearg.c.
92038         * tests/test-quotearg-simple.c: New file, extracted from
92039         tests/test-quotearg.c.
92040         * tests/test-quotearg.c: Don't include <ctype.h>.
92041         (struct result_strings, struct result_groups, LQ, RQ, LQ_ENC, RQ_ENC,
92042         RQ_ESC, inputs, compare, use_quotearg_buffer, use_quotearg,
92043         use_quote_double_quotes, use_quotearg_colon): Moved to
92044         tests/test-quotearg.h.
92045         (results_g, flag_results, custom_quotes, custom_results): Moved
92046         to tests/test-quotearg-simple.c.
92047         (main): Moved the part that does not depend on gettext to
92048         tests/test-quotearg-simple.c. Return 77 if the test cannot be
92049         performed.
92050         * modules/quotearg-simple: New file.
92051         * modules/quotearg-simple-tests: New file.
92052         * modules/quotearg (Depends-on): Add quotearg-simple.
92053         * modules/quotearg-tests (Status): Mark as gettext-dependent-test.
92054         (Files): Add tests/test-quotearg.h.
92055         Reported by Paolo Bonzini.
92057 2010-06-03  Bruno Haible  <bruno@clisp.org>
92059         Reduce dependencies.
92060         * modules/acl (Depends-on): Add gettext-h. Remove gettext.
92062 2010-06-03  Bruno Haible  <bruno@clisp.org>
92064         time: Undefine more broken macros.
92065         * lib/time.in.h: Undefine broken localtime_r and gmtime_r macros only
92066         for pthread-win32. Undefine also asctime_r, ctime_r, rand_r, strtok_r.
92067         Reported by Eric Blake.
92069 2010-06-03  Bruno Haible  <bruno@clisp.org>
92071         Choose among AC_DEFUN_ONCE, AC_DEFUN in a way that aclocal understands.
92072         * m4/iconv.m4 (gl_iconv_AC_DEFUN): New macro.
92073         (AM_ICONV): Define it through gl_iconv_AC_DEFUN.
92074         * m4/libunistring.m4 (gl_libunistring_AC_DEFUN): New macro.
92075         (gl_LIBUNISTRING): Define it through gl_libunistring_AC_DEFUN.
92076         Reported by Ludovic Courtès <ludo@gnu.org>.
92078 2010-06-02  Eric Blake  <eblake@redhat.com>
92080         time: work with mingw + pthreads-win32 library
92081         * m4/time_h.m4 (gl_CHECK_TYPE_STRUCT_TIMESPEC): Set new variable
92082         if timespec is defined only in pthread.h.
92083         * modules/time (Makefile.am): Substitute it.
92084         * lib/time.in.h (!TIME_H_DEFINES_STRUCT_TIMESPEC): Include
92085         <pthread.h>, when needed.
92086         (GNULIB_TIME_R): Undefine broken localtime_r and gmtime_r macros
92087         from the library.
92089 2010-05-31  Bruno Haible  <bruno@clisp.org>
92091         Avoid expanding two macros in the wrong order.
92092         * m4/libunistring-base.m4 (gl_LIBUNISTRING_LIB_PREPARE): Require
92093         gl_LIBUNISTRING if it is defined.
92094         * m4/libunistring.m4 (gl_LIBUNISTRING): Define using AC_DEFUN_ONCE for
92095         autoconf >= 2.64.
92096         Reported by Ludovic Courtès <ludo@gnu.org>.
92098 2010-05-27  Jim Meyering  <meyering@redhat.com>
92100         maint.mk: also prohibit "#undef" of always-defined symbols
92101         * top/maint.mk (def_sym_regex): Handle #undef as well as #define.
92102         Allow more than one space before the symbol name.
92103         (sc_prohibit_always-defined_macros): Use grep's -E, now that
92104         the regexp uses alternation.
92106 2010-05-26  Eric Blake  <eblake@redhat.com>
92108         maint.mk: avoid echo -e
92109         * top/maint.mk (gzip_rsyncable, _ignore_case, _sc_say_and_exit):
92110         Convert all uses of echo -* to printf.
92111         Reported by Matthias Bolte.
92113 2010-05-25  Bruno Haible  <bruno@clisp.org>
92115         Update to GNU gettext 0.18, part 2.
92116         * build-aux/po/Makefile.in.in: Update to GNU gettext 0.18.
92117         Reported by Martin von Gagern <Martin.vGagern@gmx.net>.
92119 2010-05-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
92121         Add missing include in test-pwrite.c.
92122         * tests/test-pwrite.c: Include string.h, for strcmp.
92124 2010-05-24  Bruno Haible  <bruno@clisp.org>
92126         * NEWS: Mention requirement for Automake option 'subdir-objects'.
92128 2010-05-24  Bruno Haible  <bruno@clisp.org>
92130         Don't use conversion with transliteration in u{8,16,32}_strcoll.
92131         * lib/unistr/u-strcoll.h (FUNC): Use U_STRCONV_TO_ENCODING with
92132         iconveh_error argument.
92133         * lib/unistr/u8-strcoll.c: Define U_STRCONV_TO_ENCODING instead of
92134         U_STRCONV_TO_LOCALE.
92135         * lib/unistr/u16-strcoll.c: Likewise.
92136         * lib/unistr/u32-strcoll.c: Likewise.
92137         * modules/unistr/u8-strcoll (Depends-on): Add
92138         uniconv/u8-strconv-to-enc, localcharset. Remove
92139         uniconv/u8-strconv-to-locale.
92140         (configure.ac): Bump version number.
92141         * modules/unistr/u16-strcoll (Depends-on): Add
92142         uniconv/u16-strconv-to-enc, localcharset. Remove
92143         uniconv/u16-strconv-to-locale.
92144         (configure.ac): Bump version number.
92145         * modules/unistr/u32-strcoll (Depends-on): Add
92146         uniconv/u32-strconv-to-enc, localcharset. Remove
92147         uniconv/u32-strconv-to-locale.
92148         (configure.ac): Bump version number.
92150 2010-05-24  Bruno Haible  <bruno@clisp.org>
92152         Avoid a test failure on NetBSD 5.0.
92153         * tests/test-striconveh.c (main): On NetBSD, skip a test that triggers
92154         an iconv() bug.
92156 2010-05-24  Bruno Haible  <bruno@clisp.org>
92158         Adjust #include directive style.
92159         * modules/regex (Includes): Recommend to write <regex.h>.
92161 2010-05-24  Bruno Haible  <bruno@clisp.org>
92163         regex: Don't require alloca.
92164         * modules/regex (Depends-on): Remove alloca. Add alloca-opt.
92165         * lib/regex_internal.h (alloca): Ensure it's defined even if we call it
92166         only inside if (0).
92168 2010-05-23  Jim Meyering  <meyering@redhat.com>
92170         test-renameat.c: include <sys/stat.h>
92171         * tests/test-renameat.c: Include <sys/stat.h>; required for
92172         definition of S_IS* macros.
92174 2010-05-23  Ben Pfaff  <blp@cs.stanford.edu>
92176         Update maintainer documentation for 'relocatable-prog' module.
92177         * doc/relocatable-maint.texi: Update.
92178         Comments by Bruno Haible.
92180 2010-05-23  Bruno Haible  <bruno@clisp.org>
92182         git-merge-changelog: Enable --split-merged-entry by default.
92183         * lib/git-merge-changelog.c (main): Set split_merged_entry to true.
92184         (usage): Don't mention this option any more.
92185         Reported by Ralf Wildenhues.
92187 2010-05-23  Jim Meyering  <meyering@redhat.com>
92189         test-pwrite: do not leave behind a test file named "out"
92190         Revert commit d8fa18472a54c1cb2674c296b3d82443f234d5f7.
92191         The trivial-looking use of init.sh is really necessary.
92192         It ensures that the temporary file, "out", is created in
92193         a temporary directory, and removed upon termination.
92194         * tests/test-pwrite.sh: Re-add file.
92195         * modules/pwrite-tests: Reference it.
92197 2010-05-23  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
92199         Fix output redirection buglet in init.sh.
92200         * tests/init.sh: Fix redirection of stderr.
92202 2010-05-20  Simon Josefsson  <simon@josefsson.org>
92204         * modules/valgrind-tests (configure.ac): Invoke gl_VALGRIND_TESTS.
92206 2010-05-17  Simon Josefsson  <simon@josefsson.org>
92208         * modules/valgrind-tests: New file.
92209         * m4/valgrind-tests.m4: New file.
92210         * doc/valgrind-tests.texi: New file.
92211         * doc/gnulib.texi (Running self-tests under valgrind): New
92212         section.
92214 2010-05-19  Bruno Haible  <bruno@clisp.org>
92216         Clean up dead code in recent commit.
92217         * m4/libunistring-base.m4 (gl_LIBUNISTRING_VERSION_CMP): Include the
92218         body of gl_LIBUNISTRING_VERSION_CMP_ORIG as fallback.
92219         (gl_LIBUNISTRING_VERSION_CMP_ORIG): Remove macro.
92220         Suggested by Paolo Bonzini.
92222 2010-05-19  Bruno Haible  <bruno@clisp.org>
92224         Avoid valgrind error reports from libunistring.
92225         * lib/libunistring.valgrind: New file, based on lib/malloca.valgrind.
92226         * modules/libunistring (Files): Add it.
92227         * modules/libunistring-optional (Files): Likewise.
92229 2010-05-18  Paolo Bonzini  <bonzini@gnu.org>
92230             Bruno Haible  <bruno@clisp.org>
92232         New module 'libunistring-optional'.
92233         * modules/libunistring-optional: New file.
92234         * m4/libunistring-base.m4: New file.
92235         * m4/libunistring-optional.m4: New file.
92236         * lib/unicase.in.h: Renamed from lib/unicase.h.
92237         * lib/uniconv.in.h: Renamed from lib/uniconv.h.
92238         * lib/unictype.in.h: Renamed from lib/unictype.h.
92239         * lib/unilbrk.in.h: Renamed from lib/unilbrk.h.
92240         * lib/uniname.in.h: Renamed from lib/uniname.h.
92241         * lib/uninorm.in.h: Renamed from lib/uninorm.h.
92242         * lib/unistdio.in.h: Renamed from lib/unistdio.h.
92243         * lib/unistr.in.h: Renamed from lib/unistr.h.
92244         * lib/unitypes.in.h: Renamed from lib/unitypes.h.
92245         * lib/uniwbrk.in.h: Renamed from lib/uniwbrk.h.
92246         * lib/uniwidth.in.h: Renamed from lib/uniwidth.h.
92247         * m4/libunistring.m4 (gl_LIBUNISTRING_CORE): Renamed from
92248         gl_LIBUNISTRING. If the library was found, determine the installed
92249         version and set LIBUNISTRING_VERSION.
92250         (gl_LIBUNISTRING): New macro, as a wrapper arount it. Document that it
92251         sets LIBUNISTRING_VERSION. If the module libunistring-optional is used,
92252         handle a configuration option --with-included-libunistring.
92253         * modules/libunistring (Files): Add m4/absolute-header.m4.
92254         * modules/unicase/base (Files): Use unicase.in.h instead of unicase.h.
92255         Add m4/libunistring-base.m4.
92256         (configure.ac): Invoke gl_LIBUNISTRING_LIBHEADER.
92257         (Makefile.am): Build unicase.h from unicase.in.h.
92258         * modules/uniconv/base (Files): Use uniconv.in.h instead of uniconv.h.
92259         Add m4/libunistring-base.m4.
92260         (configure.ac): Invoke gl_LIBUNISTRING_LIBHEADER.
92261         (Makefile.am): Build uniconv.h from uniconv.in.h.
92262         * modules/unictype/base (Files): Use unictype.in.h instead of
92263         unictype.h. Add m4/libunistring-base.m4.
92264         (configure.ac): Invoke gl_LIBUNISTRING_LIBHEADER.
92265         (Makefile.am): Build unictype.h from unictype.in.h.
92266         * modules/unilbrk/base (Files): Use unilbrk.in.h instead of unilbrk.h.
92267         Add m4/libunistring-base.m4.
92268         (configure.ac): Invoke gl_LIBUNISTRING_LIBHEADER.
92269         (Makefile.am): Build unilbrk.h from unilbrk.in.h.
92270         * modules/uniname/base (Files): Use uniname.in.h instead of uniname.h.
92271         Add m4/libunistring-base.m4.
92272         (configure.ac): Invoke gl_LIBUNISTRING_LIBHEADER.
92273         (Makefile.am): Build uniname.h from uniname.in.h.
92274         * modules/uninorm/base (Files): Use uninorm.in.h instead of uninorm.h.
92275         Add m4/libunistring-base.m4.
92276         (configure.ac): Invoke gl_LIBUNISTRING_LIBHEADER.
92277         (Makefile.am): Build uninorm.h from uninorm.in.h.
92278         * modules/unistdio/base (Files): Use unistdio.in.h instead of
92279         unistdio.h. Add m4/libunistring-base.m4.
92280         (configure.ac): Invoke gl_LIBUNISTRING_LIBHEADER.
92281         (Makefile.am): Build unistdio.h from unistdio.in.h.
92282         * modules/unistr/base (Files): Use unistr.in.h instead of unistr.h.
92283         Add m4/libunistring-base.m4.
92284         (configure.ac): Invoke gl_LIBUNISTRING_LIBHEADER.
92285         (Makefile.am): Build unistr.h from unistr.in.h.
92286         * modules/unitypes (Files): Use unitypes.in.h instead of unitypes.h.
92287         Add m4/libunistring-base.m4.
92288         (configure.ac): Invoke gl_LIBUNISTRING_LIBHEADER.
92289         (Makefile.am): Build unitypes.h from unitypes.in.h.
92290         * modules/uniwbrk/base (Files): Use uniwbrk.in.h instead of uniwbrk.h.
92291         Add m4/libunistring-base.m4.
92292         (configure.ac): Invoke gl_LIBUNISTRING_LIBHEADER.
92293         (Makefile.am): Build uniwbrk.h from uniwbrk.in.h.
92294         * modules/uniwidth/base (Files): Use uniwidth.in.h instead of
92295         uniwidth.h. Add m4/libunistring-base.m4.
92296         (configure.ac): Invoke gl_LIBUNISTRING_LIBHEADER.
92297         (Makefile.am): Build uniwidth.h from uniwidth.in.h.
92298         * modules/unicase/empty-prefix-context: Use gl_LIBUNISTRING_LIBSOURCE
92299         instead of augmenting lib_SOURCES.
92300         * modules/unicase/empty-suffix-context: Likewise.
92301         * modules/unicase/locale-language: Likewise.
92302         * modules/unicase/tolower: Likewise.
92303         * modules/unicase/totitle: Likewise.
92304         * modules/unicase/toupper: Likewise.
92305         * modules/unicase/u8-casecmp: Likewise.
92306         * modules/unicase/u8-casecoll: Likewise.
92307         * modules/unicase/u8-casefold: Likewise.
92308         * modules/unicase/u8-casexfrm: Likewise.
92309         * modules/unicase/u8-ct-casefold: Likewise.
92310         * modules/unicase/u8-ct-tolower: Likewise.
92311         * modules/unicase/u8-ct-totitle: Likewise.
92312         * modules/unicase/u8-ct-toupper: Likewise.
92313         * modules/unicase/u8-is-cased: Likewise.
92314         * modules/unicase/u8-is-casefolded: Likewise.
92315         * modules/unicase/u8-is-lowercase: Likewise.
92316         * modules/unicase/u8-is-titlecase: Likewise.
92317         * modules/unicase/u8-is-uppercase: Likewise.
92318         * modules/unicase/u8-prefix-context: Likewise.
92319         * modules/unicase/u8-suffix-context: Likewise.
92320         * modules/unicase/u8-tolower: Likewise.
92321         * modules/unicase/u8-totitle: Likewise.
92322         * modules/unicase/u8-toupper: Likewise.
92323         * modules/unicase/u16-casecmp: Likewise.
92324         * modules/unicase/u16-casecoll: Likewise.
92325         * modules/unicase/u16-casefold: Likewise.
92326         * modules/unicase/u16-casexfrm: Likewise.
92327         * modules/unicase/u16-ct-casefold: Likewise.
92328         * modules/unicase/u16-ct-tolower: Likewise.
92329         * modules/unicase/u16-ct-totitle: Likewise.
92330         * modules/unicase/u16-ct-toupper: Likewise.
92331         * modules/unicase/u16-is-cased: Likewise.
92332         * modules/unicase/u16-is-casefolded: Likewise.
92333         * modules/unicase/u16-is-lowercase: Likewise.
92334         * modules/unicase/u16-is-titlecase: Likewise.
92335         * modules/unicase/u16-is-uppercase: Likewise.
92336         * modules/unicase/u16-prefix-context: Likewise.
92337         * modules/unicase/u16-suffix-context: Likewise.
92338         * modules/unicase/u16-tolower: Likewise.
92339         * modules/unicase/u16-totitle: Likewise.
92340         * modules/unicase/u16-toupper: Likewise.
92341         * modules/unicase/u32-casecmp: Likewise.
92342         * modules/unicase/u32-casecoll: Likewise.
92343         * modules/unicase/u32-casefold: Likewise.
92344         * modules/unicase/u32-casexfrm: Likewise.
92345         * modules/unicase/u32-ct-casefold: Likewise.
92346         * modules/unicase/u32-ct-tolower: Likewise.
92347         * modules/unicase/u32-ct-totitle: Likewise.
92348         * modules/unicase/u32-ct-toupper: Likewise.
92349         * modules/unicase/u32-is-cased: Likewise.
92350         * modules/unicase/u32-is-casefolded: Likewise.
92351         * modules/unicase/u32-is-lowercase: Likewise.
92352         * modules/unicase/u32-is-titlecase: Likewise.
92353         * modules/unicase/u32-is-uppercase: Likewise.
92354         * modules/unicase/u32-prefix-context: Likewise.
92355         * modules/unicase/u32-suffix-context: Likewise.
92356         * modules/unicase/u32-tolower: Likewise.
92357         * modules/unicase/u32-totitle: Likewise.
92358         * modules/unicase/u32-toupper: Likewise.
92359         * modules/unicase/ulc-casecmp: Likewise.
92360         * modules/unicase/ulc-casecoll: Likewise.
92361         * modules/unicase/ulc-casexfrm: Likewise.
92362         * modules/uniconv/u8-conv-from-enc: Likewise.
92363         * modules/uniconv/u8-conv-to-enc: Likewise.
92364         * modules/uniconv/u8-strconv-from-enc: Likewise.
92365         * modules/uniconv/u8-strconv-from-locale: Likewise.
92366         * modules/uniconv/u8-strconv-to-enc: Likewise.
92367         * modules/uniconv/u8-strconv-to-locale: Likewise.
92368         * modules/uniconv/u16-conv-from-enc: Likewise.
92369         * modules/uniconv/u16-conv-to-enc: Likewise.
92370         * modules/uniconv/u16-strconv-from-enc: Likewise.
92371         * modules/uniconv/u16-strconv-from-locale: Likewise.
92372         * modules/uniconv/u16-strconv-to-enc: Likewise.
92373         * modules/uniconv/u16-strconv-to-locale: Likewise.
92374         * modules/uniconv/u32-conv-from-enc: Likewise.
92375         * modules/uniconv/u32-conv-to-enc: Likewise.
92376         * modules/uniconv/u32-strconv-from-enc: Likewise.
92377         * modules/uniconv/u32-strconv-from-locale: Likewise.
92378         * modules/uniconv/u32-strconv-to-enc: Likewise.
92379         * modules/uniconv/u32-strconv-to-locale: Likewise.
92380         * modules/unictype/bidicategory-byname: Likewise.
92381         * modules/unictype/bidicategory-name: Likewise.
92382         * modules/unictype/bidicategory-of: Likewise.
92383         * modules/unictype/bidicategory-test: Likewise.
92384         * modules/unictype/block-list: Likewise.
92385         * modules/unictype/block-test: Likewise.
92386         * modules/unictype/category-C: Likewise.
92387         * modules/unictype/category-Cc: Likewise.
92388         * modules/unictype/category-Cf: Likewise.
92389         * modules/unictype/category-Cn: Likewise.
92390         * modules/unictype/category-Co: Likewise.
92391         * modules/unictype/category-Cs: Likewise.
92392         * modules/unictype/category-L: Likewise.
92393         * modules/unictype/category-Ll: Likewise.
92394         * modules/unictype/category-Lm: Likewise.
92395         * modules/unictype/category-Lo: Likewise.
92396         * modules/unictype/category-Lt: Likewise.
92397         * modules/unictype/category-Lu: Likewise.
92398         * modules/unictype/category-M: Likewise.
92399         * modules/unictype/category-Mc: Likewise.
92400         * modules/unictype/category-Me: Likewise.
92401         * modules/unictype/category-Mn: Likewise.
92402         * modules/unictype/category-N: Likewise.
92403         * modules/unictype/category-Nd: Likewise.
92404         * modules/unictype/category-Nl: Likewise.
92405         * modules/unictype/category-No: Likewise.
92406         * modules/unictype/category-P: Likewise.
92407         * modules/unictype/category-Pc: Likewise.
92408         * modules/unictype/category-Pd: Likewise.
92409         * modules/unictype/category-Pe: Likewise.
92410         * modules/unictype/category-Pf: Likewise.
92411         * modules/unictype/category-Pi: Likewise.
92412         * modules/unictype/category-Po: Likewise.
92413         * modules/unictype/category-Ps: Likewise.
92414         * modules/unictype/category-S: Likewise.
92415         * modules/unictype/category-Sc: Likewise.
92416         * modules/unictype/category-Sk: Likewise.
92417         * modules/unictype/category-Sm: Likewise.
92418         * modules/unictype/category-So: Likewise.
92419         * modules/unictype/category-Z: Likewise.
92420         * modules/unictype/category-Zl: Likewise.
92421         * modules/unictype/category-Zp: Likewise.
92422         * modules/unictype/category-Zs: Likewise.
92423         * modules/unictype/category-and: Likewise.
92424         * modules/unictype/category-and-not: Likewise.
92425         * modules/unictype/category-byname: Likewise.
92426         * modules/unictype/category-name: Likewise.
92427         * modules/unictype/category-none: Likewise.
92428         * modules/unictype/category-of: Likewise.
92429         * modules/unictype/category-or: Likewise.
92430         * modules/unictype/category-test: Likewise.
92431         * modules/unictype/combining-class: Likewise.
92432         * modules/unictype/ctype-alnum: Likewise.
92433         * modules/unictype/ctype-alpha: Likewise.
92434         * modules/unictype/ctype-blank: Likewise.
92435         * modules/unictype/ctype-cntrl: Likewise.
92436         * modules/unictype/ctype-digit: Likewise.
92437         * modules/unictype/ctype-graph: Likewise.
92438         * modules/unictype/ctype-lower: Likewise.
92439         * modules/unictype/ctype-print: Likewise.
92440         * modules/unictype/ctype-punct: Likewise.
92441         * modules/unictype/ctype-space: Likewise.
92442         * modules/unictype/ctype-upper: Likewise.
92443         * modules/unictype/ctype-xdigit: Likewise.
92444         * modules/unictype/decimal-digit: Likewise.
92445         * modules/unictype/digit: Likewise.
92446         * modules/unictype/mirror: Likewise.
92447         * modules/unictype/numeric: Likewise.
92448         * modules/unictype/property-alphabetic: Likewise.
92449         * modules/unictype/property-ascii-hex-digit: Likewise.
92450         * modules/unictype/property-bidi-arabic-digit: Likewise.
92451         * modules/unictype/property-bidi-arabic-right-to-left: Likewise.
92452         * modules/unictype/property-bidi-block-separator: Likewise.
92453         * modules/unictype/property-bidi-boundary-neutral: Likewise.
92454         * modules/unictype/property-bidi-common-separator: Likewise.
92455         * modules/unictype/property-bidi-control: Likewise.
92456         * modules/unictype/property-bidi-embedding-or-override: Likewise.
92457         * modules/unictype/property-bidi-eur-num-separator: Likewise.
92458         * modules/unictype/property-bidi-eur-num-terminator: Likewise.
92459         * modules/unictype/property-bidi-european-digit: Likewise.
92460         * modules/unictype/property-bidi-hebrew-right-to-left: Likewise.
92461         * modules/unictype/property-bidi-left-to-right: Likewise.
92462         * modules/unictype/property-bidi-non-spacing-mark: Likewise.
92463         * modules/unictype/property-bidi-other-neutral: Likewise.
92464         * modules/unictype/property-bidi-pdf: Likewise.
92465         * modules/unictype/property-bidi-segment-separator: Likewise.
92466         * modules/unictype/property-bidi-whitespace: Likewise.
92467         * modules/unictype/property-byname: Likewise.
92468         * modules/unictype/property-combining: Likewise.
92469         * modules/unictype/property-composite: Likewise.
92470         * modules/unictype/property-currency-symbol: Likewise.
92471         * modules/unictype/property-dash: Likewise.
92472         * modules/unictype/property-decimal-digit: Likewise.
92473         * modules/unictype/property-default-ignorable-code-point: Likewise.
92474         * modules/unictype/property-deprecated: Likewise.
92475         * modules/unictype/property-diacritic: Likewise.
92476         * modules/unictype/property-extender: Likewise.
92477         * modules/unictype/property-format-control: Likewise.
92478         * modules/unictype/property-grapheme-base: Likewise.
92479         * modules/unictype/property-grapheme-extend: Likewise.
92480         * modules/unictype/property-grapheme-link: Likewise.
92481         * modules/unictype/property-hex-digit: Likewise.
92482         * modules/unictype/property-hyphen: Likewise.
92483         * modules/unictype/property-id-continue: Likewise.
92484         * modules/unictype/property-id-start: Likewise.
92485         * modules/unictype/property-ideographic: Likewise.
92486         * modules/unictype/property-ids-binary-operator: Likewise.
92487         * modules/unictype/property-ids-trinary-operator: Likewise.
92488         * modules/unictype/property-ignorable-control: Likewise.
92489         * modules/unictype/property-iso-control: Likewise.
92490         * modules/unictype/property-join-control: Likewise.
92491         * modules/unictype/property-left-of-pair: Likewise.
92492         * modules/unictype/property-line-separator: Likewise.
92493         * modules/unictype/property-logical-order-exception: Likewise.
92494         * modules/unictype/property-lowercase: Likewise.
92495         * modules/unictype/property-math: Likewise.
92496         * modules/unictype/property-non-break: Likewise.
92497         * modules/unictype/property-not-a-character: Likewise.
92498         * modules/unictype/property-numeric: Likewise.
92499         * modules/unictype/property-other-alphabetic: Likewise.
92500         * modules/unictype/property-other-default-ignorable-code-point: Likewise.
92501         * modules/unictype/property-other-grapheme-extend: Likewise.
92502         * modules/unictype/property-other-id-continue: Likewise.
92503         * modules/unictype/property-other-id-start: Likewise.
92504         * modules/unictype/property-other-lowercase: Likewise.
92505         * modules/unictype/property-other-math: Likewise.
92506         * modules/unictype/property-other-uppercase: Likewise.
92507         * modules/unictype/property-paired-punctuation: Likewise.
92508         * modules/unictype/property-paragraph-separator: Likewise.
92509         * modules/unictype/property-pattern-syntax: Likewise.
92510         * modules/unictype/property-pattern-white-space: Likewise.
92511         * modules/unictype/property-private-use: Likewise.
92512         * modules/unictype/property-punctuation: Likewise.
92513         * modules/unictype/property-quotation-mark: Likewise.
92514         * modules/unictype/property-radical: Likewise.
92515         * modules/unictype/property-sentence-terminal: Likewise.
92516         * modules/unictype/property-soft-dotted: Likewise.
92517         * modules/unictype/property-space: Likewise.
92518         * modules/unictype/property-terminal-punctuation: Likewise.
92519         * modules/unictype/property-test: Likewise.
92520         * modules/unictype/property-titlecase: Likewise.
92521         * modules/unictype/property-unassigned-code-value: Likewise.
92522         * modules/unictype/property-unified-ideograph: Likewise.
92523         * modules/unictype/property-uppercase: Likewise.
92524         * modules/unictype/property-variation-selector: Likewise.
92525         * modules/unictype/property-white-space: Likewise.
92526         * modules/unictype/property-xid-continue: Likewise.
92527         * modules/unictype/property-xid-start: Likewise.
92528         * modules/unictype/property-zero-width: Likewise.
92529         * modules/unictype/scripts: Likewise.
92530         * modules/unictype/syntax-c-ident: Likewise.
92531         * modules/unictype/syntax-c-whitespace: Likewise.
92532         * modules/unictype/syntax-java-ident: Likewise.
92533         * modules/unictype/syntax-java-whitespace: Likewise.
92534         * modules/unilbrk/u8-possible-linebreaks: Likewise.
92535         * modules/unilbrk/u8-width-linebreaks: Likewise.
92536         * modules/unilbrk/u16-possible-linebreaks: Likewise.
92537         * modules/unilbrk/u16-width-linebreaks: Likewise.
92538         * modules/unilbrk/u32-possible-linebreaks: Likewise.
92539         * modules/unilbrk/u32-width-linebreaks: Likewise.
92540         * modules/unilbrk/ulc-possible-linebreaks: Likewise.
92541         * modules/unilbrk/ulc-width-linebreaks: Likewise.
92542         * modules/uniname/uniname: Likewise.
92543         * modules/uninorm/canonical-decomposition: Likewise.
92544         * modules/uninorm/composition: Likewise.
92545         * modules/uninorm/decomposing-form: Likewise.
92546         * modules/uninorm/decomposition: Likewise.
92547         * modules/uninorm/filter: Likewise.
92548         * modules/uninorm/nfc: Likewise.
92549         * modules/uninorm/nfd: Likewise.
92550         * modules/uninorm/nfkc: Likewise.
92551         * modules/uninorm/nfkd: Likewise.
92552         * modules/uninorm/u8-normalize: Likewise.
92553         * modules/uninorm/u8-normcmp: Likewise.
92554         * modules/uninorm/u8-normcoll: Likewise.
92555         * modules/uninorm/u8-normxfrm: Likewise.
92556         * modules/uninorm/u16-normalize: Likewise.
92557         * modules/uninorm/u16-normcmp: Likewise.
92558         * modules/uninorm/u16-normcoll: Likewise.
92559         * modules/uninorm/u16-normxfrm: Likewise.
92560         * modules/uninorm/u32-normalize: Likewise.
92561         * modules/uninorm/u32-normcmp: Likewise.
92562         * modules/uninorm/u32-normcoll: Likewise.
92563         * modules/uninorm/u32-normxfrm: Likewise.
92564         * modules/unistdio/u8-asnprintf: Likewise.
92565         * modules/unistdio/u8-asprintf: Likewise.
92566         * modules/unistdio/u8-snprintf: Likewise.
92567         * modules/unistdio/u8-sprintf: Likewise.
92568         * modules/unistdio/u8-u8-asnprintf: Likewise.
92569         * modules/unistdio/u8-u8-asprintf: Likewise.
92570         * modules/unistdio/u8-u8-snprintf: Likewise.
92571         * modules/unistdio/u8-u8-sprintf: Likewise.
92572         * modules/unistdio/u8-u8-vasnprintf: Likewise.
92573         * modules/unistdio/u8-u8-vasprintf: Likewise.
92574         * modules/unistdio/u8-u8-vsnprintf: Likewise.
92575         * modules/unistdio/u8-u8-vsprintf: Likewise.
92576         * modules/unistdio/u8-vasnprintf: Likewise.
92577         * modules/unistdio/u8-vasprintf: Likewise.
92578         * modules/unistdio/u8-vsnprintf: Likewise.
92579         * modules/unistdio/u8-vsprintf: Likewise.
92580         * modules/unistdio/u16-asnprintf: Likewise.
92581         * modules/unistdio/u16-asprintf: Likewise.
92582         * modules/unistdio/u16-snprintf: Likewise.
92583         * modules/unistdio/u16-sprintf: Likewise.
92584         * modules/unistdio/u16-u16-asnprintf: Likewise.
92585         * modules/unistdio/u16-u16-asprintf: Likewise.
92586         * modules/unistdio/u16-u16-snprintf: Likewise.
92587         * modules/unistdio/u16-u16-sprintf: Likewise.
92588         * modules/unistdio/u16-u16-vasnprintf: Likewise.
92589         * modules/unistdio/u16-u16-vasprintf: Likewise.
92590         * modules/unistdio/u16-u16-vsnprintf: Likewise.
92591         * modules/unistdio/u16-u16-vsprintf: Likewise.
92592         * modules/unistdio/u16-vasnprintf: Likewise.
92593         * modules/unistdio/u16-vasprintf: Likewise.
92594         * modules/unistdio/u16-vsnprintf: Likewise.
92595         * modules/unistdio/u16-vsprintf: Likewise.
92596         * modules/unistdio/u32-asnprintf: Likewise.
92597         * modules/unistdio/u32-asprintf: Likewise.
92598         * modules/unistdio/u32-snprintf: Likewise.
92599         * modules/unistdio/u32-sprintf: Likewise.
92600         * modules/unistdio/u32-u32-asnprintf: Likewise.
92601         * modules/unistdio/u32-u32-asprintf: Likewise.
92602         * modules/unistdio/u32-u32-snprintf: Likewise.
92603         * modules/unistdio/u32-u32-sprintf: Likewise.
92604         * modules/unistdio/u32-u32-vasnprintf: Likewise.
92605         * modules/unistdio/u32-u32-vasprintf: Likewise.
92606         * modules/unistdio/u32-u32-vsnprintf: Likewise.
92607         * modules/unistdio/u32-u32-vsprintf: Likewise.
92608         * modules/unistdio/u32-vasnprintf: Likewise.
92609         * modules/unistdio/u32-vasprintf: Likewise.
92610         * modules/unistdio/u32-vsnprintf: Likewise.
92611         * modules/unistdio/u32-vsprintf: Likewise.
92612         * modules/unistdio/ulc-asnprintf: Likewise.
92613         * modules/unistdio/ulc-asprintf: Likewise.
92614         * modules/unistdio/ulc-fprintf: Likewise.
92615         * modules/unistdio/ulc-snprintf: Likewise.
92616         * modules/unistdio/ulc-sprintf: Likewise.
92617         * modules/unistdio/ulc-vasnprintf: Likewise.
92618         * modules/unistdio/ulc-vasprintf: Likewise.
92619         * modules/unistdio/ulc-vfprintf: Likewise.
92620         * modules/unistdio/ulc-vsnprintf: Likewise.
92621         * modules/unistdio/ulc-vsprintf: Likewise.
92622         * modules/unistr/u8-check: Likewise.
92623         * modules/unistr/u8-chr: Likewise.
92624         * modules/unistr/u8-cmp: Likewise.
92625         * modules/unistr/u8-cmp2: Likewise.
92626         * modules/unistr/u8-cpy: Likewise.
92627         * modules/unistr/u8-cpy-alloc: Likewise.
92628         * modules/unistr/u8-endswith: Likewise.
92629         * modules/unistr/u8-mblen: Likewise.
92630         * modules/unistr/u8-mbsnlen: Likewise.
92631         * modules/unistr/u8-mbtouc: Likewise.
92632         * modules/unistr/u8-mbtouc-unsafe: Likewise.
92633         * modules/unistr/u8-mbtoucr: Likewise.
92634         * modules/unistr/u8-move: Likewise.
92635         * modules/unistr/u8-next: Likewise.
92636         * modules/unistr/u8-prev: Likewise.
92637         * modules/unistr/u8-set: Likewise.
92638         * modules/unistr/u8-startswith: Likewise.
92639         * modules/unistr/u8-stpcpy: Likewise.
92640         * modules/unistr/u8-stpncpy: Likewise.
92641         * modules/unistr/u8-strcat: Likewise.
92642         * modules/unistr/u8-strchr: Likewise.
92643         * modules/unistr/u8-strcmp: Likewise.
92644         * modules/unistr/u8-strcoll: Likewise.
92645         * modules/unistr/u8-strcpy: Likewise.
92646         * modules/unistr/u8-strcspn: Likewise.
92647         * modules/unistr/u8-strdup: Likewise.
92648         * modules/unistr/u8-strlen: Likewise.
92649         * modules/unistr/u8-strmblen: Likewise.
92650         * modules/unistr/u8-strmbtouc: Likewise.
92651         * modules/unistr/u8-strncat: Likewise.
92652         * modules/unistr/u8-strncmp: Likewise.
92653         * modules/unistr/u8-strncpy: Likewise.
92654         * modules/unistr/u8-strnlen: Likewise.
92655         * modules/unistr/u8-strpbrk: Likewise.
92656         * modules/unistr/u8-strrchr: Likewise.
92657         * modules/unistr/u8-strspn: Likewise.
92658         * modules/unistr/u8-strstr: Likewise.
92659         * modules/unistr/u8-strtok: Likewise.
92660         * modules/unistr/u8-to-u16: Likewise.
92661         * modules/unistr/u8-to-u32: Likewise.
92662         * modules/unistr/u8-uctomb: Likewise.
92663         * modules/unistr/u16-check: Likewise.
92664         * modules/unistr/u16-chr: Likewise.
92665         * modules/unistr/u16-cmp: Likewise.
92666         * modules/unistr/u16-cmp2: Likewise.
92667         * modules/unistr/u16-cpy: Likewise.
92668         * modules/unistr/u16-cpy-alloc: Likewise.
92669         * modules/unistr/u16-endswith: Likewise.
92670         * modules/unistr/u16-mblen: Likewise.
92671         * modules/unistr/u16-mbsnlen: Likewise.
92672         * modules/unistr/u16-mbtouc: Likewise.
92673         * modules/unistr/u16-mbtouc-unsafe: Likewise.
92674         * modules/unistr/u16-mbtoucr: Likewise.
92675         * modules/unistr/u16-move: Likewise.
92676         * modules/unistr/u16-next: Likewise.
92677         * modules/unistr/u16-prev: Likewise.
92678         * modules/unistr/u16-set: Likewise.
92679         * modules/unistr/u16-startswith: Likewise.
92680         * modules/unistr/u16-stpcpy: Likewise.
92681         * modules/unistr/u16-stpncpy: Likewise.
92682         * modules/unistr/u16-strcat: Likewise.
92683         * modules/unistr/u16-strchr: Likewise.
92684         * modules/unistr/u16-strcmp: Likewise.
92685         * modules/unistr/u16-strcoll: Likewise.
92686         * modules/unistr/u16-strcpy: Likewise.
92687         * modules/unistr/u16-strcspn: Likewise.
92688         * modules/unistr/u16-strdup: Likewise.
92689         * modules/unistr/u16-strlen: Likewise.
92690         * modules/unistr/u16-strmblen: Likewise.
92691         * modules/unistr/u16-strmbtouc: Likewise.
92692         * modules/unistr/u16-strncat: Likewise.
92693         * modules/unistr/u16-strncmp: Likewise.
92694         * modules/unistr/u16-strncpy: Likewise.
92695         * modules/unistr/u16-strnlen: Likewise.
92696         * modules/unistr/u16-strpbrk: Likewise.
92697         * modules/unistr/u16-strrchr: Likewise.
92698         * modules/unistr/u16-strspn: Likewise.
92699         * modules/unistr/u16-strstr: Likewise.
92700         * modules/unistr/u16-strtok: Likewise.
92701         * modules/unistr/u16-to-u32: Likewise.
92702         * modules/unistr/u16-to-u8: Likewise.
92703         * modules/unistr/u16-uctomb: Likewise.
92704         * modules/unistr/u32-check: Likewise.
92705         * modules/unistr/u32-chr: Likewise.
92706         * modules/unistr/u32-cmp: Likewise.
92707         * modules/unistr/u32-cmp2: Likewise.
92708         * modules/unistr/u32-cpy: Likewise.
92709         * modules/unistr/u32-cpy-alloc: Likewise.
92710         * modules/unistr/u32-endswith: Likewise.
92711         * modules/unistr/u32-mblen: Likewise.
92712         * modules/unistr/u32-mbsnlen: Likewise.
92713         * modules/unistr/u32-mbtouc: Likewise.
92714         * modules/unistr/u32-mbtouc-unsafe: Likewise.
92715         * modules/unistr/u32-mbtoucr: Likewise.
92716         * modules/unistr/u32-move: Likewise.
92717         * modules/unistr/u32-next: Likewise.
92718         * modules/unistr/u32-prev: Likewise.
92719         * modules/unistr/u32-set: Likewise.
92720         * modules/unistr/u32-startswith: Likewise.
92721         * modules/unistr/u32-stpcpy: Likewise.
92722         * modules/unistr/u32-stpncpy: Likewise.
92723         * modules/unistr/u32-strcat: Likewise.
92724         * modules/unistr/u32-strchr: Likewise.
92725         * modules/unistr/u32-strcmp: Likewise.
92726         * modules/unistr/u32-strcoll: Likewise.
92727         * modules/unistr/u32-strcpy: Likewise.
92728         * modules/unistr/u32-strcspn: Likewise.
92729         * modules/unistr/u32-strdup: Likewise.
92730         * modules/unistr/u32-strlen: Likewise.
92731         * modules/unistr/u32-strmblen: Likewise.
92732         * modules/unistr/u32-strmbtouc: Likewise.
92733         * modules/unistr/u32-strncat: Likewise.
92734         * modules/unistr/u32-strncmp: Likewise.
92735         * modules/unistr/u32-strncpy: Likewise.
92736         * modules/unistr/u32-strnlen: Likewise.
92737         * modules/unistr/u32-strpbrk: Likewise.
92738         * modules/unistr/u32-strrchr: Likewise.
92739         * modules/unistr/u32-strspn: Likewise.
92740         * modules/unistr/u32-strstr: Likewise.
92741         * modules/unistr/u32-strtok: Likewise.
92742         * modules/unistr/u32-to-u16: Likewise.
92743         * modules/unistr/u32-to-u8: Likewise.
92744         * modules/unistr/u32-uctomb: Likewise.
92745         * modules/uniwbrk/u8-wordbreaks: Likewise.
92746         * modules/uniwbrk/u16-wordbreaks: Likewise.
92747         * modules/uniwbrk/u32-wordbreaks: Likewise.
92748         * modules/uniwbrk/ulc-wordbreaks: Likewise.
92749         * modules/uniwbrk/wordbreak-property: Likewise.
92750         * modules/uniwidth/u8-strwidth: Likewise.
92751         * modules/uniwidth/u8-width: Likewise.
92752         * modules/uniwidth/u16-strwidth: Likewise.
92753         * modules/uniwidth/u16-width: Likewise.
92754         * modules/uniwidth/u32-strwidth: Likewise.
92755         * modules/uniwidth/u32-width: Likewise.
92756         * modules/uniwidth/width: Likewise.
92757         * modules/unicase/cased-tests (Makefile.am): Link all test programs
92758         with $(LIBUNISTRING).
92759         * modules/unicase/ignorable-tests: Likewise.
92760         * modules/unicase/locale-language-tests: Likewise.
92761         * modules/unicase/tolower-tests: Likewise.
92762         * modules/unicase/totitle-tests: Likewise.
92763         * modules/unicase/toupper-tests: Likewise.
92764         * modules/unicase/u8-casecmp-tests: Likewise.
92765         * modules/unicase/u8-casecoll-tests: Likewise.
92766         * modules/unicase/u8-casefold-tests: Likewise.
92767         * modules/unicase/u8-is-cased-tests: Likewise.
92768         * modules/unicase/u8-is-casefolded-tests: Likewise.
92769         * modules/unicase/u8-is-lowercase-tests: Likewise.
92770         * modules/unicase/u8-is-titlecase-tests: Likewise.
92771         * modules/unicase/u8-is-uppercase-tests: Likewise.
92772         * modules/unicase/u8-tolower-tests: Likewise.
92773         * modules/unicase/u8-totitle-tests: Likewise.
92774         * modules/unicase/u8-toupper-tests: Likewise.
92775         * modules/unicase/u16-casecmp-tests: Likewise.
92776         * modules/unicase/u16-casecoll-tests: Likewise.
92777         * modules/unicase/u16-casefold-tests: Likewise.
92778         * modules/unicase/u16-is-cased-tests: Likewise.
92779         * modules/unicase/u16-is-casefolded-tests: Likewise.
92780         * modules/unicase/u16-is-lowercase-tests: Likewise.
92781         * modules/unicase/u16-is-titlecase-tests: Likewise.
92782         * modules/unicase/u16-is-uppercase-tests: Likewise.
92783         * modules/unicase/u16-tolower-tests: Likewise.
92784         * modules/unicase/u16-totitle-tests: Likewise.
92785         * modules/unicase/u16-toupper-tests: Likewise.
92786         * modules/unicase/u32-casecmp-tests: Likewise.
92787         * modules/unicase/u32-casecoll-tests: Likewise.
92788         * modules/unicase/u32-casefold-tests: Likewise.
92789         * modules/unicase/u32-is-cased-tests: Likewise.
92790         * modules/unicase/u32-is-casefolded-tests: Likewise.
92791         * modules/unicase/u32-is-lowercase-tests: Likewise.
92792         * modules/unicase/u32-is-titlecase-tests: Likewise.
92793         * modules/unicase/u32-is-uppercase-tests: Likewise.
92794         * modules/unicase/u32-tolower-tests: Likewise.
92795         * modules/unicase/u32-totitle-tests: Likewise.
92796         * modules/unicase/u32-toupper-tests: Likewise.
92797         * modules/unicase/ulc-casecmp-tests: Likewise.
92798         * modules/unicase/ulc-casecoll-tests: Likewise.
92799         * modules/uniconv/u8-conv-from-enc-tests: Likewise.
92800         * modules/uniconv/u8-conv-to-enc-tests: Likewise.
92801         * modules/uniconv/u8-strconv-from-enc-tests: Likewise.
92802         * modules/uniconv/u8-strconv-to-enc-tests: Likewise.
92803         * modules/uniconv/u16-conv-from-enc-tests: Likewise.
92804         * modules/uniconv/u16-conv-to-enc-tests: Likewise.
92805         * modules/uniconv/u16-strconv-from-enc-tests: Likewise.
92806         * modules/uniconv/u16-strconv-to-enc-tests: Likewise.
92807         * modules/uniconv/u32-conv-from-enc-tests: Likewise.
92808         * modules/uniconv/u32-conv-to-enc-tests: Likewise.
92809         * modules/uniconv/u32-strconv-from-enc-tests: Likewise.
92810         * modules/uniconv/u32-strconv-to-enc-tests: Likewise.
92811         * modules/unictype/bidicategory-byname-tests: Likewise.
92812         * modules/unictype/bidicategory-name-tests: Likewise.
92813         * modules/unictype/bidicategory-of-tests: Likewise.
92814         * modules/unictype/bidicategory-test-tests: Likewise.
92815         * modules/unictype/block-list-tests: Likewise.
92816         * modules/unictype/block-of-tests: Likewise.
92817         * modules/unictype/block-test-tests: Likewise.
92818         * modules/unictype/category-C-tests: Likewise.
92819         * modules/unictype/category-Cc-tests: Likewise.
92820         * modules/unictype/category-Cf-tests: Likewise.
92821         * modules/unictype/category-Cn-tests: Likewise.
92822         * modules/unictype/category-Co-tests: Likewise.
92823         * modules/unictype/category-Cs-tests: Likewise.
92824         * modules/unictype/category-L-tests: Likewise.
92825         * modules/unictype/category-Ll-tests: Likewise.
92826         * modules/unictype/category-Lm-tests: Likewise.
92827         * modules/unictype/category-Lo-tests: Likewise.
92828         * modules/unictype/category-Lt-tests: Likewise.
92829         * modules/unictype/category-Lu-tests: Likewise.
92830         * modules/unictype/category-M-tests: Likewise.
92831         * modules/unictype/category-Mc-tests: Likewise.
92832         * modules/unictype/category-Me-tests: Likewise.
92833         * modules/unictype/category-Mn-tests: Likewise.
92834         * modules/unictype/category-N-tests: Likewise.
92835         * modules/unictype/category-Nd-tests: Likewise.
92836         * modules/unictype/category-Nl-tests: Likewise.
92837         * modules/unictype/category-No-tests: Likewise.
92838         * modules/unictype/category-P-tests: Likewise.
92839         * modules/unictype/category-Pc-tests: Likewise.
92840         * modules/unictype/category-Pd-tests: Likewise.
92841         * modules/unictype/category-Pe-tests: Likewise.
92842         * modules/unictype/category-Pf-tests: Likewise.
92843         * modules/unictype/category-Pi-tests: Likewise.
92844         * modules/unictype/category-Po-tests: Likewise.
92845         * modules/unictype/category-Ps-tests: Likewise.
92846         * modules/unictype/category-S-tests: Likewise.
92847         * modules/unictype/category-Sc-tests: Likewise.
92848         * modules/unictype/category-Sk-tests: Likewise.
92849         * modules/unictype/category-Sm-tests: Likewise.
92850         * modules/unictype/category-So-tests: Likewise.
92851         * modules/unictype/category-Z-tests: Likewise.
92852         * modules/unictype/category-Zl-tests: Likewise.
92853         * modules/unictype/category-Zp-tests: Likewise.
92854         * modules/unictype/category-Zs-tests: Likewise.
92855         * modules/unictype/category-and-not-tests: Likewise.
92856         * modules/unictype/category-and-tests: Likewise.
92857         * modules/unictype/category-byname-tests: Likewise.
92858         * modules/unictype/category-name-tests: Likewise.
92859         * modules/unictype/category-none-tests: Likewise.
92860         * modules/unictype/category-of-tests: Likewise.
92861         * modules/unictype/category-or-tests: Likewise.
92862         * modules/unictype/category-test-withtable-tests: Likewise.
92863         * modules/unictype/combining-class-tests: Likewise.
92864         * modules/unictype/ctype-alnum-tests: Likewise.
92865         * modules/unictype/ctype-alpha-tests: Likewise.
92866         * modules/unictype/ctype-blank-tests: Likewise.
92867         * modules/unictype/ctype-cntrl-tests: Likewise.
92868         * modules/unictype/ctype-digit-tests: Likewise.
92869         * modules/unictype/ctype-graph-tests: Likewise.
92870         * modules/unictype/ctype-lower-tests: Likewise.
92871         * modules/unictype/ctype-print-tests: Likewise.
92872         * modules/unictype/ctype-punct-tests: Likewise.
92873         * modules/unictype/ctype-space-tests: Likewise.
92874         * modules/unictype/ctype-upper-tests: Likewise.
92875         * modules/unictype/ctype-xdigit-tests: Likewise.
92876         * modules/unictype/decimal-digit-tests: Likewise.
92877         * modules/unictype/digit-tests: Likewise.
92878         * modules/unictype/mirror-tests: Likewise.
92879         * modules/unictype/numeric-tests: Likewise.
92880         * modules/unictype/property-alphabetic-tests: Likewise.
92881         * modules/unictype/property-ascii-hex-digit-tests: Likewise.
92882         * modules/unictype/property-bidi-arabic-digit-tests: Likewise.
92883         * modules/unictype/property-bidi-arabic-right-to-left-tests: Likewise.
92884         * modules/unictype/property-bidi-block-separator-tests: Likewise.
92885         * modules/unictype/property-bidi-boundary-neutral-tests: Likewise.
92886         * modules/unictype/property-bidi-common-separator-tests: Likewise.
92887         * modules/unictype/property-bidi-control-tests: Likewise.
92888         * modules/unictype/property-bidi-embedding-or-override-tests: Likewise.
92889         * modules/unictype/property-bidi-eur-num-separator-tests: Likewise.
92890         * modules/unictype/property-bidi-eur-num-terminator-tests: Likewise.
92891         * modules/unictype/property-bidi-european-digit-tests: Likewise.
92892         * modules/unictype/property-bidi-hebrew-right-to-left-tests: Likewise.
92893         * modules/unictype/property-bidi-left-to-right-tests: Likewise.
92894         * modules/unictype/property-bidi-non-spacing-mark-tests: Likewise.
92895         * modules/unictype/property-bidi-other-neutral-tests: Likewise.
92896         * modules/unictype/property-bidi-pdf-tests: Likewise.
92897         * modules/unictype/property-bidi-segment-separator-tests: Likewise.
92898         * modules/unictype/property-bidi-whitespace-tests: Likewise.
92899         * modules/unictype/property-byname-tests: Likewise.
92900         * modules/unictype/property-combining-tests: Likewise.
92901         * modules/unictype/property-composite-tests: Likewise.
92902         * modules/unictype/property-currency-symbol-tests: Likewise.
92903         * modules/unictype/property-dash-tests: Likewise.
92904         * modules/unictype/property-decimal-digit-tests: Likewise.
92905         * modules/unictype/property-default-ignorable-code-point-tests: Likewise.
92906         * modules/unictype/property-deprecated-tests: Likewise.
92907         * modules/unictype/property-diacritic-tests: Likewise.
92908         * modules/unictype/property-extender-tests: Likewise.
92909         * modules/unictype/property-format-control-tests: Likewise.
92910         * modules/unictype/property-grapheme-base-tests: Likewise.
92911         * modules/unictype/property-grapheme-extend-tests: Likewise.
92912         * modules/unictype/property-grapheme-link-tests: Likewise.
92913         * modules/unictype/property-hex-digit-tests: Likewise.
92914         * modules/unictype/property-hyphen-tests: Likewise.
92915         * modules/unictype/property-id-continue-tests: Likewise.
92916         * modules/unictype/property-id-start-tests: Likewise.
92917         * modules/unictype/property-ideographic-tests: Likewise.
92918         * modules/unictype/property-ids-binary-operator-tests: Likewise.
92919         * modules/unictype/property-ids-trinary-operator-tests: Likewise.
92920         * modules/unictype/property-ignorable-control-tests: Likewise.
92921         * modules/unictype/property-iso-control-tests: Likewise.
92922         * modules/unictype/property-join-control-tests: Likewise.
92923         * modules/unictype/property-left-of-pair-tests: Likewise.
92924         * modules/unictype/property-line-separator-tests: Likewise.
92925         * modules/unictype/property-logical-order-exception-tests: Likewise.
92926         * modules/unictype/property-lowercase-tests: Likewise.
92927         * modules/unictype/property-math-tests: Likewise.
92928         * modules/unictype/property-non-break-tests: Likewise.
92929         * modules/unictype/property-not-a-character-tests: Likewise.
92930         * modules/unictype/property-numeric-tests: Likewise.
92931         * modules/unictype/property-other-alphabetic-tests: Likewise.
92932         * modules/unictype/property-other-default-ignorable-code-point-tests:
92933         Likewise.
92934         * modules/unictype/property-other-grapheme-extend-tests: Likewise.
92935         * modules/unictype/property-other-id-continue-tests: Likewise.
92936         * modules/unictype/property-other-id-start-tests: Likewise.
92937         * modules/unictype/property-other-lowercase-tests: Likewise.
92938         * modules/unictype/property-other-math-tests: Likewise.
92939         * modules/unictype/property-other-uppercase-tests: Likewise.
92940         * modules/unictype/property-paired-punctuation-tests: Likewise.
92941         * modules/unictype/property-paragraph-separator-tests: Likewise.
92942         * modules/unictype/property-pattern-syntax-tests: Likewise.
92943         * modules/unictype/property-pattern-white-space-tests: Likewise.
92944         * modules/unictype/property-private-use-tests: Likewise.
92945         * modules/unictype/property-punctuation-tests: Likewise.
92946         * modules/unictype/property-quotation-mark-tests: Likewise.
92947         * modules/unictype/property-radical-tests: Likewise.
92948         * modules/unictype/property-sentence-terminal-tests: Likewise.
92949         * modules/unictype/property-soft-dotted-tests: Likewise.
92950         * modules/unictype/property-space-tests: Likewise.
92951         * modules/unictype/property-terminal-punctuation-tests: Likewise.
92952         * modules/unictype/property-test-tests: Likewise.
92953         * modules/unictype/property-titlecase-tests: Likewise.
92954         * modules/unictype/property-unassigned-code-value-tests: Likewise.
92955         * modules/unictype/property-unified-ideograph-tests: Likewise.
92956         * modules/unictype/property-uppercase-tests: Likewise.
92957         * modules/unictype/property-variation-selector-tests: Likewise.
92958         * modules/unictype/property-white-space-tests: Likewise.
92959         * modules/unictype/property-xid-continue-tests: Likewise.
92960         * modules/unictype/property-xid-start-tests: Likewise.
92961         * modules/unictype/property-zero-width-tests: Likewise.
92962         * modules/unictype/scripts-tests: Likewise.
92963         * modules/unictype/syntax-c-ident-tests: Likewise.
92964         * modules/unictype/syntax-c-whitespace-tests: Likewise.
92965         * modules/unictype/syntax-java-ident-tests: Likewise.
92966         * modules/unictype/syntax-java-whitespace-tests: Likewise.
92967         * modules/unilbrk/u8-possible-linebreaks-tests: Likewise.
92968         * modules/unilbrk/u8-width-linebreaks-tests: Likewise.
92969         * modules/unilbrk/u16-possible-linebreaks-tests: Likewise.
92970         * modules/unilbrk/u16-width-linebreaks-tests: Likewise.
92971         * modules/unilbrk/u32-possible-linebreaks-tests: Likewise.
92972         * modules/unilbrk/u32-width-linebreaks-tests: Likewise.
92973         * modules/unilbrk/ulc-possible-linebreaks-tests: Likewise.
92974         * modules/unilbrk/ulc-width-linebreaks-tests: Likewise.
92975         * modules/uniname/uniname-tests: Likewise.
92976         * modules/uninorm/canonical-decomposition-tests: Likewise.
92977         * modules/uninorm/compat-decomposition-tests: Likewise.
92978         * modules/uninorm/composition-tests: Likewise.
92979         * modules/uninorm/decomposing-form-tests: Likewise.
92980         * modules/uninorm/decomposition-tests: Likewise.
92981         * modules/uninorm/filter-tests: Likewise.
92982         * modules/uninorm/nfc-tests: Likewise.
92983         * modules/uninorm/nfd-tests: Likewise.
92984         * modules/uninorm/nfkc-tests: Likewise.
92985         * modules/uninorm/nfkd-tests: Likewise.
92986         * modules/uninorm/u8-normcmp-tests: Likewise.
92987         * modules/uninorm/u8-normcoll-tests: Likewise.
92988         * modules/uninorm/u16-normcmp-tests: Likewise.
92989         * modules/uninorm/u16-normcoll-tests: Likewise.
92990         * modules/uninorm/u32-normcmp-tests: Likewise.
92991         * modules/uninorm/u32-normcoll-tests: Likewise.
92992         * modules/unistdio/u8-asnprintf-tests: Likewise.
92993         * modules/unistdio/u8-vasnprintf-tests: Likewise.
92994         * modules/unistdio/u8-vasprintf-tests: Likewise.
92995         * modules/unistdio/u8-vsnprintf-tests: Likewise.
92996         * modules/unistdio/u8-vsprintf-tests: Likewise.
92997         * modules/unistdio/u16-asnprintf-tests: Likewise.
92998         * modules/unistdio/u16-vasnprintf-tests: Likewise.
92999         * modules/unistdio/u16-vasprintf-tests: Likewise.
93000         * modules/unistdio/u16-vsnprintf-tests: Likewise.
93001         * modules/unistdio/u16-vsprintf-tests: Likewise.
93002         * modules/unistdio/u32-asnprintf-tests: Likewise.
93003         * modules/unistdio/u32-vasnprintf-tests: Likewise.
93004         * modules/unistdio/u32-vasprintf-tests: Likewise.
93005         * modules/unistdio/u32-vsnprintf-tests: Likewise.
93006         * modules/unistdio/u32-vsprintf-tests: Likewise.
93007         * modules/unistdio/ulc-asnprintf-tests: Likewise.
93008         * modules/unistdio/ulc-vasnprintf-tests: Likewise.
93009         * modules/unistdio/ulc-vasprintf-tests: Likewise.
93010         * modules/unistdio/ulc-vsnprintf-tests: Likewise.
93011         * modules/unistdio/ulc-vsprintf-tests: Likewise.
93012         * modules/unistr/u8-check-tests: Likewise.
93013         * modules/unistr/u8-chr-tests: Likewise.
93014         * modules/unistr/u8-cmp-tests: Likewise.
93015         * modules/unistr/u8-cmp2-tests: Likewise.
93016         * modules/unistr/u8-cpy-alloc-tests: Likewise.
93017         * modules/unistr/u8-cpy-tests: Likewise.
93018         * modules/unistr/u8-mblen-tests: Likewise.
93019         * modules/unistr/u8-mbsnlen-tests: Likewise.
93020         * modules/unistr/u8-mbtouc-tests: Likewise.
93021         * modules/unistr/u8-mbtouc-unsafe-tests: Likewise.
93022         * modules/unistr/u8-mbtoucr-tests: Likewise.
93023         * modules/unistr/u8-move-tests: Likewise.
93024         * modules/unistr/u8-next-tests: Likewise.
93025         * modules/unistr/u8-prev-tests: Likewise.
93026         * modules/unistr/u8-set-tests: Likewise.
93027         * modules/unistr/u8-stpcpy-tests: Likewise.
93028         * modules/unistr/u8-stpncpy-tests: Likewise.
93029         * modules/unistr/u8-strcat-tests: Likewise.
93030         * modules/unistr/u8-strcmp-tests: Likewise.
93031         * modules/unistr/u8-strcoll-tests: Likewise.
93032         * modules/unistr/u8-strcpy-tests: Likewise.
93033         * modules/unistr/u8-strdup-tests: Likewise.
93034         * modules/unistr/u8-strlen-tests: Likewise.
93035         * modules/unistr/u8-strmblen-tests: Likewise.
93036         * modules/unistr/u8-strmbtouc-tests: Likewise.
93037         * modules/unistr/u8-strncat-tests: Likewise.
93038         * modules/unistr/u8-strncmp-tests: Likewise.
93039         * modules/unistr/u8-strncpy-tests: Likewise.
93040         * modules/unistr/u8-strnlen-tests: Likewise.
93041         * modules/unistr/u8-to-u16-tests: Likewise.
93042         * modules/unistr/u8-to-u32-tests: Likewise.
93043         * modules/unistr/u8-uctomb-tests: Likewise.
93044         * modules/unistr/u16-check-tests: Likewise.
93045         * modules/unistr/u16-chr-tests: Likewise.
93046         * modules/unistr/u16-cmp-tests: Likewise.
93047         * modules/unistr/u16-cmp2-tests: Likewise.
93048         * modules/unistr/u16-cpy-alloc-tests: Likewise.
93049         * modules/unistr/u16-cpy-tests: Likewise.
93050         * modules/unistr/u16-mblen-tests: Likewise.
93051         * modules/unistr/u16-mbsnlen-tests: Likewise.
93052         * modules/unistr/u16-mbtouc-tests: Likewise.
93053         * modules/unistr/u16-mbtouc-unsafe-tests: Likewise.
93054         * modules/unistr/u16-mbtoucr-tests: Likewise.
93055         * modules/unistr/u16-move-tests: Likewise.
93056         * modules/unistr/u16-next-tests: Likewise.
93057         * modules/unistr/u16-prev-tests: Likewise.
93058         * modules/unistr/u16-set-tests: Likewise.
93059         * modules/unistr/u16-stpcpy-tests: Likewise.
93060         * modules/unistr/u16-stpncpy-tests: Likewise.
93061         * modules/unistr/u16-strcat-tests: Likewise.
93062         * modules/unistr/u16-strcmp-tests: Likewise.
93063         * modules/unistr/u16-strcoll-tests: Likewise.
93064         * modules/unistr/u16-strcpy-tests: Likewise.
93065         * modules/unistr/u16-strdup-tests: Likewise.
93066         * modules/unistr/u16-strlen-tests: Likewise.
93067         * modules/unistr/u16-strmblen-tests: Likewise.
93068         * modules/unistr/u16-strmbtouc-tests: Likewise.
93069         * modules/unistr/u16-strncat-tests: Likewise.
93070         * modules/unistr/u16-strncmp-tests: Likewise.
93071         * modules/unistr/u16-strncpy-tests: Likewise.
93072         * modules/unistr/u16-strnlen-tests: Likewise.
93073         * modules/unistr/u16-to-u32-tests: Likewise.
93074         * modules/unistr/u16-to-u8-tests: Likewise.
93075         * modules/unistr/u16-uctomb-tests: Likewise.
93076         * modules/unistr/u32-check-tests: Likewise.
93077         * modules/unistr/u32-chr-tests: Likewise.
93078         * modules/unistr/u32-cmp-tests: Likewise.
93079         * modules/unistr/u32-cmp2-tests: Likewise.
93080         * modules/unistr/u32-cpy-alloc-tests: Likewise.
93081         * modules/unistr/u32-cpy-tests: Likewise.
93082         * modules/unistr/u32-mblen-tests: Likewise.
93083         * modules/unistr/u32-mbsnlen-tests: Likewise.
93084         * modules/unistr/u32-mbtouc-tests: Likewise.
93085         * modules/unistr/u32-mbtouc-unsafe-tests: Likewise.
93086         * modules/unistr/u32-mbtoucr-tests: Likewise.
93087         * modules/unistr/u32-move-tests: Likewise.
93088         * modules/unistr/u32-next-tests: Likewise.
93089         * modules/unistr/u32-prev-tests: Likewise.
93090         * modules/unistr/u32-set-tests: Likewise.
93091         * modules/unistr/u32-stpcpy-tests: Likewise.
93092         * modules/unistr/u32-stpncpy-tests: Likewise.
93093         * modules/unistr/u32-strcat-tests: Likewise.
93094         * modules/unistr/u32-strcmp-tests: Likewise.
93095         * modules/unistr/u32-strcoll-tests: Likewise.
93096         * modules/unistr/u32-strcpy-tests: Likewise.
93097         * modules/unistr/u32-strdup-tests: Likewise.
93098         * modules/unistr/u32-strlen-tests: Likewise.
93099         * modules/unistr/u32-strmblen-tests: Likewise.
93100         * modules/unistr/u32-strmbtouc-tests: Likewise.
93101         * modules/unistr/u32-strncat-tests: Likewise.
93102         * modules/unistr/u32-strncmp-tests: Likewise.
93103         * modules/unistr/u32-strncpy-tests: Likewise.
93104         * modules/unistr/u32-strnlen-tests: Likewise.
93105         * modules/unistr/u32-to-u16-tests: Likewise.
93106         * modules/unistr/u32-to-u8-tests: Likewise.
93107         * modules/unistr/u32-uctomb-tests: Likewise.
93108         * modules/uniwbrk/u8-wordbreaks-tests: Likewise.
93109         * modules/uniwbrk/u16-wordbreaks-tests: Likewise.
93110         * modules/uniwbrk/u32-wordbreaks-tests: Likewise.
93111         * modules/uniwbrk/ulc-wordbreaks-tests: Likewise.
93112         * modules/uniwidth/u8-strwidth-tests: Likewise.
93113         * modules/uniwidth/u8-width-tests: Likewise.
93114         * modules/uniwidth/u16-strwidth-tests: Likewise.
93115         * modules/uniwidth/u16-width-tests: Likewise.
93116         * modules/uniwidth/u32-strwidth-tests: Likewise.
93117         * modules/uniwidth/u32-width-tests: Likewise.
93118         * modules/uniwidth/width-tests: Likewise.
93120 2010-05-18  Richard Jones  <rjones@redhat.com>
93122         doc: users.txt: list hivex
93123         * users.txt: Add hivex.
93125 2010-05-18  Richard Jones  <rjones@redhat.com>
93127         doc: users.txt: list febootstrap
93128         * users.txt: Add febootstrap.
93130 2010-05-17  Giuseppe Scrivano  <gscrivano@gnu.org>
93132         bootstrap: fix an error when gnulib is not used as a git submodule
93133         * build-aux/bootstrap (gnulib_path): If its length is zero then
93134         assign "gnulib" to it.
93135         * build-aux/bootstrap: Redirect "git clone -h" stderr to stdout.
93137 2010-05-16  Bruno Haible  <bruno@clisp.org>
93139         Avoid autoconf warnings about AM_ICONV.
93140         * m4/iconv.m4 (AM_ICONV): Define using AC_DEFUN_ONCE for autoconf >=
93141         2.64.
93143 2010-05-16  Bruno Haible  <bruno@clisp.org>
93145         absolute-header: Make the macro usable in more situations.
93146         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER_ONE): New macro, extracted
93147         from gl_ABSOLUTE_HEADER.
93148         (gl_ABSOLUTE_HEADER): Use it. Fix comment.
93150 2010-05-16  James Youngman  <jay@gnu.org>
93152         doc: update users.txt
93153         * users.txt: Add CSSC.
93155 2010-05-16  Jim Meyering  <meyering@redhat.com>
93157         init.sh: fix an error in the previous change; add more comments
93158         * tests/init.sh: Compare exit code in loop against 9, not 2.
93159         Patch by Bruno Haible.
93160         Make the two tests more similar by adding an empty "then" clause.
93161         Add comments.
93163         init.sh: avoid unnecessary shell re-exec
93164         * tests/init.sh: Improve the re-exec-required check to first test the
93165         current shell.  If it passes the test, do not search for a shell that
93166         does pass, and do not re-exec.  This test is particularly contorted to
93167         avoid triggering misbehavior in Solaris 10's /bin/sh whereby any use
93168         of $(...) evokes a syntax error and causes immediate shell exit with
93169         status 2.  Bruno Haible reported that the re-exec made it impossible
93170         to single-step through any init.sh-using script.
93172 2010-05-16  Bruno Haible  <bruno@clisp.org>
93174         Fix collision between gnulib's and libintl's printf replacements.
93175         * lib/stdio.in.h (_GL_STDIO_STRINGIZE,
93176         _GL_STDIO_MACROEXPAND_AND_STRINGIZE): New macros.
93177         (printf): When using GNU C, map the __printf__ function to rpl_printf
93178         via __asm__. When not using GNU C, define rpl_printf instead of
93179         __printf__.
93180         * lib/printf.c: Ignore DEPENDS_ON_LIBINTL. Undoes the 2010-03-25
93181         commit.
93182         * lib/stdio-write.c: Ignore DEPENDS_ON_LIBINTL. Undoes the 2009-08-10
93183         commit.
93184         * m4/asm-underscore.m4: New file.
93185         * m4/stdio_h.m4 (gl_STDIO_H): Require gl_ASM_SYMBOL_PREFIX.
93186         * modules/stdio (Files): Add m4/asm-underscore.m4.
93187         (Makefile.am): Substitute ASM_SYMBOL_PREFIX.
93188         Reported by Ben Pfaff.
93190 2010-05-16  Bruno Haible  <bruno@clisp.org>
93192         verify: Avoid skipping the test on openSUSE 11.0.
93193         * tests/test-verify.sh: Unset MALLOC_PERTURB_.
93195 2010-05-13  Bruno Haible  <bruno@clisp.org>
93197         Avoid useless warnings from G++.
93198         * build-aux/c++defs.h (_GL_CXXALIASWARN_2, _GL_CXXALIASWARN1_2): Don't
93199         use _GL_WARN_ON_USE or _GL_WARN_ON_USE_CXX when optimizing.
93200         Reported by Jarno Rajahalme <jarno.rajahalme@nsn.com>.
93202 2010-05-11  Jim Meyering  <meyering@redhat.com>
93204         maint.mk: tweak preceding change
93205         * top/maint.mk (gl_extract_significant_defines_): Make exclusion
93206         regexps tighter by anchoring at EOL, and make the new group "shy"
93207         for slightly decreased overhead.
93209 2010-05-11  Eric Blake  <eblake@redhat.com>
93211         maint.mk: gnulib doesn't guarantee NSIG
93212         * top/maint.mk (gl_extract_significant_defines_): Exclude NSIG.
93214 2010-05-10  Peter O'Gorman  <pogma@thewrittenword.com>
93216         test-pwrite.c: Remove unused variable declaration.
93217         * tests/test-pwrite.c (main): Remove read_buf declaration.
93219         Remove useless test-pwrite.sh file.
93220         * tests/test-pwrite.sh: Delete file.
93221         * modules/pwrite-tests: Remove references.
93222         Reported by Bruno Haible.
93224 2010-05-10  Peter O'Gorman  <pogma@thewrittenword.com>
93226         init.sh: fix a typo
93227         * tests/init.sh: Correct typo in MALLOC_PERTURB_ initialization.
93229 2010-05-10  Jim Meyering  <meyering@redhat.com>
93231         maint.mk: avoid using a temporary file in the always-defined-macros check
93232         * top/maint.mk (.re-defmac): Remove rule.
93233         (gl_trap_): Remove definition.
93234         (sc_prohibit_always-defined_macros): Rewrite not to create and
93235         depend on a temporary file.  Instead, depend on GNU grep's ability
93236         to read a list of regular expressions from stdin when given "-f -".
93238 2010-05-09  Bruno Haible  <bruno@clisp.org>
93240         Update to GNU gettext 0.18, part 1.
93241         * m4/gettext.m4: Update to GNU gettext 0.18.
93242         * m4/intl.m4: Likewise.
93243         * m4/po.m4: Likewise.
93244         * modules/gettext (Files): Add m4/fcntl-o.m4.
93245         (configure.ac): Require gettext infrastructure from version 0.18.
93247 2010-05-09  Jim Meyering  <meyering@redhat.com>
93249         init.sh: enable MALLOC_PERTURB_
93250         * tests/init.sh: Enable glibc's malloc-perturbing option.
93252         maint.mk: improve sc_cross_check_PATH_usage_in_tests
93253         With my recent change in init.sh from the two-line form:
93254             -#   : ${srcdir=.}
93255             -#   . "$srcdir/init.sh"; path_prepend_ .
93256             +#   . "${srcdir=.}/init.sh"; path_prepend_ .
93257         I noticed that using the one-line form would cause this test
93258         to fail with a false-positive, or to stop working altogether,
93259         depending on whether help-version changed or all the tests did.
93260         * top/maint.mk (_hv_regex): Remove this definition.
93261         (_hv_regex_weak): Use a weak regex to select all init.sh-sourcing files.
93262         (_hv_regex_strong): Use a stronger regex to check for conformance.
93263         (sc_cross_check_PATH_usage_in_tests): Rewrite to use the above.
93264         Give a separate diagnostic for lack of conforming use.
93266         maint.mk: prohibit definition of symbols defined by gnulib
93267         * top/maint.mk (sc_prohibit_always-defined_macros): Reject the
93268         definition of symbols defined by gnulib.
93270 2010-05-09  Bruno Haible  <bruno@clisp.org>
93272         acl: Avoid test failure on Cygwin-hosted mingw.
93273         * tests/test-set-mode-acl.sh: Skip test if USE_ACL is 0.
93275 2010-05-09  Bruno Haible  <bruno@clisp.org>
93277         error: Use system's fcntl function.
93278         * lib/error.c (fcntl): Undefine.
93280 2010-05-09  Jim Meyering  <meyering@redhat.com>
93282         verify: adjust formatting to be more consistent
93283         * lib/verify.h (_GL_GENSYM): Add a space before each of a few
93284         argument-list '('s, and after one comma.
93286 2010-05-09  Bruno Haible  <bruno@clisp.org>
93288         error: More reliable output on mingw.
93289         * lib/error.c: Include <windows.h>.
93290         (is_open): New function.
93291         (flush_stdout): Call it instead of fcntl, also if F_GETFL is not
93292         defined.
93294 2010-05-09  Bruno Haible  <bruno@clisp.org>
93296         vasnprintf: Fix syntax errors in libintl build on mingw.
93297         * lib/vasnprintf.c (VASNPRINTF): Move a closing brace. Undefine
93298         pad_ourselves and prec_ourselves after use.
93300 2010-05-08  Bruno Haible  <bruno@clisp.org>
93302         * lib/config.charset: Update comments for Cygwin 1.7.
93303         * lib/localcharset.c: Likewise.
93305 2010-05-07  Jim Meyering  <meyering@redhat.com>
93307         init.sh: improve comments
93308         * tests/init.sh: Recommend the one-line init.sh-sourcing idiom:
93309         . "${srcdir=.}/init.sh"; path_prepend_ .
93310         Add a note about path_prepend_ and the alternative of using
93311         TESTS_ENVIRONMENT.
93313 2010-05-06  Sergey Poznyakoff  <gray@gnu.org.ua>
93315         exclude: Unescape hashed patterns in wildcard mode.
93316         * lib/exclude.c (add_exclude): Unescape the pattern before adding it
93317         to the hash list.
93318         * tests/test-exclude8.sh: New test case.
93319         * modules/exclude-tests: Add new test.
93321 2010-05-05  Eric Blake  <eblake@redhat.com>
93323         verify: automate tests
93324         * modules/verify-tests: New module.
93325         * tests/test-verify.sh: New file.
93326         * tests/test-verify.c: Guard each negative test with a unique id.
93327         Also avoid warning about unused left hand of comma expressions.
93329 2010-05-05  Paul Eggert  <eggert@cs.ucla.edu>
93331         Further improvements to verify.h, suggested by Eric Blake.
93332         * lib/verify.h (_GL_CONCAT, _GL_CONCAT0, _GL_GENSYM): Renamed from
93333         the GL_* versions, to avoid collision with OpenGL.
93334         (_GL_COUNTER): New macro, so that we can fall back on __LINE__ if
93335         __COUNTER__ doesn't work.  Test that __COUNTER__ increments rather
93336         than testing merely whether it's defined.
93338         Modify verify.h to pacify gcc -Wredundant_decls.
93339         * lib/verify.h (GL_CONCAT, GL_CONCAT0, GL_GENSYM): New macros.
93340         These use the prefix "GL_" since they're likely to be useful elsewhere.
93341         We may need to break them out into a different .h file.
93342         (__COUNTER__): Define to 0 if the compiler doesn't support it.
93343         (verify) [!defined __cplusplus]: Use them to avoid duplicate decls
93344         of verify_function__.
93346 2010-05-05  Peter O'Gorman  <pogma@thewrittenword.com>
93348         Tests for module pwrite.
93349         * modules/pwrite-tests: New file.
93350         * tests/test-pwrite.sh: New file.
93351         * tests/test-pwrite.c: New file.
93353         New module pwrite.
93354         * lib/unistd.in.h (pwrite): New declaration.
93355         * lib/pwrite.c: New file, from glibc with modifications.
93356         * m4/pwrite.m4: New file.
93357         * m4/unistd_h.m4 (gl_UNISTD_H): Test whether pwrite is declared.
93358         (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_PWRITE, HAVE_PWRITE,
93359         REPLACE_PWRITE.
93360         * modules/pwrite: New file.
93361         * modules/unistd (Makefile.am): Substitute GNULIB_PWRITE, HAVE_PWRITE,
93362         REPLACE_PWRITE.
93363         * tests/test-unistd-c++.cc: Check GNULIB_NAMESPACE::pwrite.
93364         * doc/posix-functions/pwrite.texi: Mention the new module.
93366 2010-05-05  Peter O'Gorman  <pogma@thewrittenword.com>
93368         pread: Update documentation.
93369         * doc/posix-functions/pread.texi: Mention the 'pread' module.
93371 2010-05-04  Eric Blake  <eblake@redhat.com>
93373         docs: update cygwin progress
93374         * doc/posix-functions/wctob.texi (wctob): Cygwin 1.7.6 will fix
93375         this bug.
93376         * doc/glibc-functions/get_nprocs_conf.texi (get_nprocs_conf):
93377         Added in cygwin 1.7.2.
93378         * doc/glibc-functions/get_phys_pages.texi (get_phys_pages):
93379         Likewise.
93380         * doc/glibc-functions/get_avphys_pages.texi (get_avphys_pages):
93381         Likewise.
93382         * doc/glibc-functions/dup3.texi (dup3): Likewise.
93383         * doc/glibc-functions/pipe2.texi (pipe2): Likewise.
93384         * doc/glibc-functions/accept4.texi (accept4): Likewise.
93385         * doc/posix-functions/strfmon.texi (strfmon): Likewise.
93386         * doc/glibc-functions/get_nprocs.texi (get_nprocs): Likewise.
93387         Mention nproc module.
93388         * doc/glibc-functions/xdr_uint16_t.texi (xdr_uint16_t): Mention
93389         bug in cygwin 1.7.5 addition.
93390         * doc/glibc-functions/xdr_uint32_t.texi (xdr_uint32_t): Likewise.
93391         * doc/glibc-functions/xdr_uint64_t.texi (xdr_uint64_t): Likewise.
93392         * doc/glibc-functions/xdr_uint8_t.texi (xdr_uint8_t): Likewise.
93393         * doc/glibc-functions/xdr_array.texi (xdr_array): Added in cygwin
93394         1.7.5.
93395         * doc/glibc-functions/xdr_bool.texi (xdr_bool): Likewise.
93396         * doc/glibc-functions/xdr_bytes.texi (xdr_bytes): Likewise.
93397         * doc/glibc-functions/xdr_char.texi (xdr_char): Likewise.
93398         * doc/glibc-functions/xdr_double.texi (xdr_double): Likewise.
93399         * doc/glibc-functions/xdr_enum.texi (xdr_enum): Likewise.
93400         * doc/glibc-functions/xdr_float.texi (xdr_float): Likewise.
93401         * doc/glibc-functions/xdr_free.texi (xdr_free): Likewise.
93402         * doc/glibc-functions/xdr_hyper.texi (xdr_hyper): Likewise.
93403         * doc/glibc-functions/xdr_int.texi (xdr_int): Likewise.
93404         * doc/glibc-functions/xdr_int16_t.texi (xdr_int16_t): Likewise.
93405         * doc/glibc-functions/xdr_int32_t.texi (xdr_int32_t): Likewise.
93406         * doc/glibc-functions/xdr_int64_t.texi (xdr_int64_t): Likewise.
93407         * doc/glibc-functions/xdr_int8_t.texi (xdr_int8_t): Likewise.
93408         * doc/glibc-functions/xdr_long.texi (xdr_long): Likewise.
93409         * doc/glibc-functions/xdr_longlong_t.texi (xdr_longlong_t):
93410         Likewise.
93411         * doc/glibc-functions/xdr_netobj.texi (xdr_netobj): Likewise.
93412         * doc/glibc-functions/xdr_opaque.texi (xdr_opaque): Likewise.
93413         * doc/glibc-functions/xdr_pointer.texi (xdr_pointer): Likewise.
93414         * doc/glibc-functions/xdr_reference.texi (xdr_reference):
93415         Likewise.
93416         * doc/glibc-functions/xdr_short.texi (xdr_short): Likewise.
93417         * doc/glibc-functions/xdr_sizeof.texi (xdr_sizeof): Likewise.
93418         * doc/glibc-functions/xdr_string.texi (xdr_string): Likewise.
93419         * doc/glibc-functions/xdr_u_char.texi (xdr_u_char): Likewise.
93420         * doc/glibc-functions/xdr_u_hyper.texi (xdr_u_hyper): Likewise.
93421         * doc/glibc-functions/xdr_u_int.texi (xdr_u_int): Likewise.
93422         * doc/glibc-functions/xdr_u_long.texi (xdr_u_long): Likewise.
93423         * doc/glibc-functions/xdr_u_longlong_t.texi (xdr_u_longlong_t):
93424         Likewise.
93425         * doc/glibc-functions/xdr_u_short.texi (xdr_u_short): Likewise.
93426         * doc/glibc-functions/xdr_union.texi (xdr_union): Likewise.
93427         * doc/glibc-functions/xdr_vector.texi (xdr_vector): Likewise.
93428         * doc/glibc-functions/xdr_void.texi (xdr_void): Likewise.
93429         * doc/glibc-functions/xdr_wrapstring.texi (xdr_wrapstring):
93430         Likewise.
93431         * doc/glibc-functions/xdrmem_create.texi (xdrmem_create):
93432         Likewise.
93433         * doc/glibc-functions/xdrrec_create.texi (xdrrec_create):
93434         Likewise.
93435         * doc/glibc-functions/xdrrec_endofrecord.texi
93436         (xdrrec_endofrecord): Likewise.
93437         * doc/glibc-functions/xdrrec_eof.texi (xdrrec_eof): Likewise.
93438         * doc/glibc-functions/xdrrec_skiprecord.texi (xdrrec_skiprecord):
93439         Likewise.
93440         * doc/glibc-functions/xdrstdio_create.texi (xdrstdio_create):
93441         Likewise.
93443 2010-05-04  Jim Meyering  <meyering@redhat.com>
93445         gendocs.sh: make its "-s FILE" option more useful
93446         * build-aux/gendocs.sh: When honoring the -s FILE option, update
93447         $PACKAGE to reflect the probably-different basename of "FILE".
93449 2010-05-03  Giuseppe Scrivano  <gscrivano@gnu.org>
93451         bootstrap: don't ignore download_po_files failure
93452         * build-aux/bootstrap (update_po_files): Don't ignore download_po_files
93453         failure.
93455 2010-05-03  Jim Meyering  <meyering@redhat.com>
93457         maint.mk: allow to pass options to gendocs.sh
93458         * top/maint.mk (web-manual): Pass gendocs_options_ to gendocs.sh.
93459         (gendocs_options_): New overridable variable.
93461         gnu-web-doc-update: don't ignore configure or build failure
93462         * build-aux/gnu-web-doc-update: Exit nonzero upon internal failure.
93464         announce-gen: backslash-escape '@'s in --help output
93465         * build-aux/announce-gen: Fix syntax errors.
93467         maint.mk, announce-gen: allow project-specific announcement mail headers
93468         * top/maint.mk (translation_project_): Define default.
93469         (announcement_Cc_, announcement_mail_headers_): Likewise.
93470         (announcement): Invoke announce-gen with new --mail-headers option.
93471         * build-aux/announce-gen: New option: --mail-headers=HEADERS.
93473         test-xalloc-die: avoid unwarranted test failure on OpenSolaris 5.11
93474         * tests/test-xalloc-die.sh: Redirect stdout before stderr, (i.e.,
93475         "> out 2> err", rather than "2> err > out").  Otherwise, with /bin/sh
93476         on OpenSolaris 5.11 snv_134, we would end up with a stray "1> out"
93477         line in the "err2" output file when running "make check" in verbose
93478         mode (i.e., with set -x enabled).
93480 2010-05-03  Bruno Haible  <bruno@clisp.org>
93482         wctob: Fix for weird platforms.
93483         * lib/wctob.c (wctob): When wint_t is larger than wchar_t, check the
93484         argument value.
93486 2010-05-03  Jim Meyering  <meyering@redhat.com>
93488         maint.mk: prohibit unwarranted use of <strings.h>
93489         * top/maint.mk (sc_prohibit_strings_without_use): Reject inclusion of
93490         strings.h in a file that does not also use strcasecmp, strncasecmp,
93491         ffs or ffsll.
93493         maint.mk: remove obsolete comments
93494         * top/maint.mk: Remove stale, commented-out rules.
93496 2010-05-02  Bruno Haible  <bruno@clisp.org>
93498         wcwidth: Declare also when it's aliased.
93499         * lib/wchar.in.h (wcwidth): Don't test whether wcwidth is defined as a
93500         macro.
93502 2010-05-02  Bruno Haible  <bruno@clisp.org>
93504         Fix regression from 2010-04-25.
93505         * gnulib-tool (func_modules_transitive_closure): Check the status of
93506         all modules, not only of the tests that are of the form foo-tests where
93507         foo is a module.
93509 2010-05-02  Bruno Haible  <bruno@clisp.org>
93511         wctob: Work around nasty Cygwin 1.7.2 bug.
93512         * m4/wctob.m4 (gl_FUNC_WCTOB): Detect the Cygwin bug.
93513         * doc/posix-functions/wctob.texi: Mention the Cygwin bug.
93515 2010-05-01  Bruno Haible  <bruno@clisp.org>
93517         fpurge: Sharper test.
93518         * tests/test-fpurge.c (main): Add one more ftell check.
93519         * modules/fpurge-tests (Depends-on): Add ftell.
93520         Suggested by Eric Blake.
93522 2010-05-01  Bruno Haible  <bruno@clisp.org>
93524         ftello: Another test.
93525         * tests/test-ftello3.c: New file.
93526         * modules/ftello-tests (Files): Add it.
93527         (Makefile.am): Add it to TESTS and check_PROGRAMS. Augment
93528         MOSTLYCLEANFILES.
93530         ftell: Another test.
93531         * tests/test-ftell3.c: New file.
93532         * modules/ftell-tests (Files): Add it.
93533         (Makefile.am): Add it to TESTS and check_PROGRAMS. Augment
93534         MOSTLYCLEANFILES.
93536 2010-05-01  Bruno Haible  <bruno@clisp.org>
93538         ftell, ftello: Work around Solaris bug.
93539         * m4/ftello.m4 (gl_FUNC_FTELLO): Detect Solaris bug.
93540         * lib/ftello.c: Include stdio-impl.h.
93541         (ftello): On Solaris, when _IOWRT is set, compute the result without
93542         looking at _IOREAD.
93543         * modules/ftello (Files): Add lib/stdio-impl.h.
93544         * doc/posix-functions/ftell.texi: Mention Solaris bug.
93545         * doc/posix-functions/ftello.texi: Likewise.
93546         Reported by Eric Blake.
93548 2010-05-01  Bruno Haible  <bruno@clisp.org>
93550         freading: Adapt to special meaning of _IOREAD flag on Solaris.
93551         * lib/freading.c (freading): On Solaris, ignore the _IOREAD flag if
93552         the _IOWRT flag is also set.
93554 2010-05-01  Bruno Haible  <bruno@clisp.org>
93556         Fix doc about a HP-UX stdio bug.
93557         * doc/posix-functions/ftell.texi: Mark HP-UX bug as unfixed.
93558         * doc/posix-functions/ftello.texi: Likewise.
93560 2010-05-01  Bruno Haible  <bruno@clisp.org>
93562         lseek test: Fix failure on Solaris.
93563         * tests/test-lseek.sh: Partially revert 2010-04-20 commit. Consume all
93564         output.
93566 2010-04-30  Jim Meyering  <meyering@redhat.com>
93568         bootstrap: don't ignore failure to generate po*/Makevars
93569         * build-aux/bootstrap (with_gettext): Don't ignore failure
93570         to create po/Makevars or runtime-po/Makevars.
93572 2010-04-29  Eric Blake  <eblake@redhat.com>
93574         headers: relax license to LGPLv2+
93575         * modules/fcntl-h (License): Relax license.
93576         * modules/getopt-posix (License): Likewise.
93577         * modules/locale (License): Likewise.
93578         * modules/math (License): Likewise.
93579         * modules/pty (License): Likewise.
93580         * modules/sched (License): Likewise.
93581         * modules/search (License): Likewise.
93582         * modules/spawn (License): Likewise.
93583         * modules/stdarg (License): Likewise.
93584         * modules/sysexits (License): Likewise.
93586 2010-04-29  Jim Meyering  <meyering@redhat.com>
93588         inttypes: relax license to LGPLv2+
93589         * modules/inttypes (License): Relax license.
93591 2010-04-29  Simon Josefsson  <simon@josefsson.org>
93593         * top/maint.mk (indent): Run twice to produce idempotent results.
93595 2010-04-28  Bruno Haible  <bruno@clisp.org>
93597         getdate: Generate getdate.c in the source directory.
93598         * modules/getdate (Makefile.am): Add rule for getdate.c. Augment
93599         MOSTLYCLEANFILES.
93600         Suggested by Daniel Richard G. <skunk@iskunk.org> and Ralf Wildenhues.
93602 2010-04-27  Andreas Gruenbacher  <agruen@suse.de>  (tiny change)
93604         * lib/utimens.c: On Tru64, the timestamp parameter of utimens(2)
93605         is not declared as a const *; avoid warnings in that case.
93607 2010-04-28  Eric Blake  <eblake@redhat.com>
93609         canonicalize-lgpl: avoid compiler warning
93610         * lib/canonicalize-lgpl.c (versioned_symbol): Avoid an 'empty
93611         declaration' / 'extraneous semicolon' warning with some compilers.
93612         Reported by Andreas Gruenbacher.
93614 2010-04-28  Jim Meyering  <meyering@redhat.com>
93616         init.sh: ensure a more reliable exit status when exiting via trap
93617         * tests/init.sh (setup_): Don't rely on $? in signal handler.
93618         Inspired by patches from Dmitry V. Levin.
93619         Also trap on signal 3 (SIGQUIT).
93621 2010-04-27  Bruno Haible  <bruno@clisp.org>
93623         Update doc about utimes().
93624         * doc/posix-functions/utimes.texi: Mention the OSF/1 problem and the
93625         'utimens' module.
93626         Reported by Andreas Gruenbacher <agruen@suse.de>.
93628 2010-04-27  Eric Blake  <eblake@redhat.com>
93630         full-read, full-write: relax license
93631         * modules/full-read (License): Drop to LGPLv2+.
93632         * modules/full-write (License): Likewise.
93633         * modules/safe-read (License): Likewise.
93634         * modules/safe-write (License): Likewise.
93636         pthread: mention library for linking
93637         * modules/pthread (Link): Mention $(LIB_PTHREAD).
93639 2010-04-27  Jim Meyering  <meyering@redhat.com>
93641         maint.mk: fix a bug introduced in last change
93642         * top/maint.mk (gl_assured_headers_): Now that all names are on
93643         one line, use sed's "g" modifier.  Note that while the \.in\.h LHS
93644         is not anchored to end of word, it should be adequate.
93646         maint.mk: avoid side-effect in latest syntax-check
93647         * top/maint.mk (sc_prohibit_always_true_header_tests): Rework not
93648         to run commands via $(shell...), and hence to incur cost only when
93649         the new rule is actually run.
93651         maint.mk: syntax-check: prohibit HAVE_<header>_H that are always true
93652         Derive the list of guaranteed header names from gnulib/lib/*.in.h,
93653         and use that to create a regexp used to detect all #if HAVE_..._H uses.
93654         * top/maint.mk (sc_prohibit_always_true_header_tests): New rule.
93655         (gl_assured_headers_, az_, AZ_): Define.
93656         (gl_header_upper_case_or_, gl_have_header_regex_): Define.
93658 2010-04-26  Jim Meyering  <jim@meyering.net>
93659             Bruno Haible  <bruno@clisp.org>
93661         gnulib-common.m4: make glibc write diagnostics to stderr, not /dev/tty
93662         * m4/gnulib-common.m4 (gl_COMMON_BODY): Set LIBC_FATAL_STDERR_.
93663         Prompted by an exchange with Gilles Espinasse.
93665 2010-04-26  Jim Meyering  <meyering@redhat.com>
93667         git-version-gen: aesthetic tweak
93668         * build-aux/git-version-gen: Use "$nl" rather than a literal,
93669         so that the command remains on a single line.
93671 2010-04-26  Eric Blake  <eblake@redhat.com>
93673         git-version-gen: allow use on EBCDIC hosts
93674         * build-aux/git-version-gen (dirty): Use literal rather than tying
93675         ourselves to ascii.
93676         Reported by Steve Goetze.
93678 2010-04-25  Bruno Haible  <bruno@clisp.org>
93680         netdb: Add support for GNULIB_POSIXCHECK.
93681         * lib/netdb.in.h: Include warn-on-use.h.
93682         (getaddrinfo, freeaddrinfo, gai_strerror, getnameinfo): Warn if these
93683         functions are used when GNULIB_POSIXCHECK is defined and the
93684         getaddrinfo module is not in use.
93685         * m4/netdb_h.m4 (gl_HEADER_NETDB): Test whether getaddrinfo,
93686         freeaddrinfo, gai_strerror, getnameinfo are declared.
93687         * modules/netdb (Depends-on): Add warn-on-use.
93688         (Makefile.am): Include warn-on-use.h in netdb.h.
93690 2010-04-24  Ian Beckwith  <ianb@erislabs.net>
93692         build: avoid "make check" failure without .git/ directory
93693         * Makefile (sc_prefer_ac_check_funcs_once): Skip this test when
93694         there is no .git/ directory.
93696 2010-04-25  Bruno Haible  <bruno@clisp.org>
93698         ptsname: Fix misuse of ttyname_r.
93699         * lib/ptsname.c (__ptsname_r): Use __ttyname_r's return value instead
93700         of errno.
93702 2010-04-25  Bruno Haible  <bruno@clisp.org>
93704         ttyname_r: Make it work on Solaris 10.
93705         * m4/ttyname_r.m4 (gl_FUNC_TTYNAME_R): Define HAVE_POSIXDECL_TTYNAME_R
93706         if the system function has the POSIX declaration. Test whether the
93707         function fails if the buffer is less than 128 bytes large.
93708         * lib/ttyname_r.c (ttyname_r): Handle both possible declarations of the
93709         system's ttyname_r function. Provide a reasonably large buffer.
93710         * modules/ttyname_r (Depends-on): Add extensions.
93711         * doc/posix-functions/ttyname_r.texi: Mention the Solaris problem.
93713 2010-04-25  Bruno Haible  <bruno@clisp.org>
93715         Use the 'extensions' module for some more functions on Solaris.
93716         * doc/posix-functions/asctime_r.texi: Recommend to use the 'extensions'
93717         module.
93718         * doc/posix-functions/ctime_r.texi: Likewise.
93719         * doc/posix-functions/getgrgid_r.texi: Likewise.
93720         * doc/posix-functions/getgrnam_r.texi: Likewise.
93721         * doc/posix-functions/getpwnam_r.texi: Likewise.
93722         * doc/posix-functions/getpwuid_r.texi: Likewise.
93723         * doc/posix-functions/readdir_r.texi: Likewise.
93724         * doc/posix-functions/sigwait.texi: Likewise.
93725         * m4/getlogin_r.m4 (gl_FUNC_GETLOGIN_R): Add comment.
93726         * doc/posix-functions/getlogin_r.texi: Mark Solaris problem as fixed.
93728 2010-04-25  Bruno Haible  <bruno@clisp.org>
93730         ttyname_r: Make it work on MacOS X 10.4 and Solaris 10.
93731         * m4/ttyname_r.m4 (gl_FUNC_TTYNAME_R): Test whether the system function
93732         has the POSIX declaration. Set REPLACE_TTYNAME_R if not.
93733         * lib/ttyname_r.c: Include <limits.h>.
93734         (ttyname_r): Define using the system's ttyname_r function, if it exists
93735         and not on Solaris.
93736         * lib/unistd.in.h (ttyname_r): Replace function if REPLACE_TTYNAME_R is
93737         set.
93738         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize REPLACE_TTYNAME_R.
93739         * modules/unistd (Makefile.am): Substitute REPLACE_TTYNAME_R.
93740         * doc/posix-functions/ttyname_r.texi: Mark the problem as fixed.
93741         Reported by Simon Josefsson.
93743 2010-04-25  Bruno Haible  <bruno@clisp.org>
93745         Mention effects of _POSIX_PTHREAD_SEMANTICS on Solaris.
93746         * doc/posix-functions/asctime_r.texi: Mention the Solaris problem.
93747         * doc/posix-functions/ctime_r.texi: Likewise.
93748         * doc/posix-functions/getgrgid_r.texi: Likewise.
93749         * doc/posix-functions/getgrnam_r.texi: Likewise.
93750         * doc/posix-functions/getlogin_r.texi: Likewise.
93751         * doc/posix-functions/getpwnam_r.texi: Likewise.
93752         * doc/posix-functions/getpwuid_r.texi: Likewise.
93753         * doc/posix-functions/readdir_r.texi: Likewise.
93754         * doc/posix-functions/sigwait.texi: Likewise.
93755         * doc/posix-functions/ttyname_r.texi: Likewise.
93756         Reported by Simon Josefsson.
93758 2010-04-25  Bruno Haible  <bruno@clisp.org>
93760         gnulib-tool: Don't include hairy tests of dependencies in testdirs.
93761         * gnulib-tool (func_usage): Document that --with-*-tests options apply
93762         also to --create-testdir.
93763         (func_acceptable): Don't consider the status of *-tests modules here.
93764         (func_modules_transitive_closure): Consider it here, before including a
93765         test module.
93766         (func_import, func_create_testdir): Set inc_all_direct_tests,
93767         inc_all_indirect_tests.
93768         * doc/gnulib.texi (Extra tests modules): Document new behaviour of
93769         --create-testdir and --create-megatestdir.
93771 2010-04-25  Bruno Haible  <bruno@clisp.org>
93773         gnulib-tool: Add --without-*-tests options.
93774         * gnulib-tool (func_usage): Document the --without-*-tests options.
93775         (excl_cxx_tests, excl_longrunning_tests, excl_privileged_tests,
93776         excl_unportable_tests): New variables.
93777         Fail if they are specified with --import or --update.
93778         (func_acceptable): Respect the excl_*_tests variables.
93779         (func_import): Set the excl_*_tests variables to empty.
93781 2010-04-25  Simon Josefsson  <simon@josefsson.org>
93782             Bruno Haible  <bruno@clisp.org>
93784         Work around a MacOS X 10.4 bug with openpty.
93785         * doc/glibc-functions/openpty.texi: Mention the MacOS X 10.4 bug.
93786         * tests/test-openpty.c (main): Close the master side explicitly.
93788 2010-04-25  Bruno Haible  <bruno@clisp.org>
93790         strnlen: Fix a C++ test error on MacOS X and Solaris.
93791         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Don't set REPLACE_STRNLEN to 1 if
93792         the function is not declared.
93793         Reported by Jarno Rajahalme <jarno.rajahalme@nsn.com> and
93794         Simon Josefsson.
93796 2010-04-24  Bruno Haible  <bruno@clisp.org>
93798         Avoid a gcc warning.
93799         * tests/test-vasprintf.c (test_vasprintf, test_asprintf): Pass argument
93800         of correct type for %08lx directive.
93801         Reported by Eric Blake.
93803 2010-04-24  Bruno Haible  <bruno@clisp.org>
93805         vasnprintf: Correct errno value in case of out-of-memory.
93806         * lib/vasnprintf.c (VASNPRINTF): Set errno to 0 before calling SNPRINTF
93807         or sprintf. Use the errno value from SNPRINTF or sprintf.
93808         Reported by Ian Beckwith <ianb@erislabs.net>.
93810 2010-04-24  Bruno Haible  <bruno@clisp.org>
93812         ansi-c++-opt: Find correct compiler when cross-compiling.
93813         * m4/ansi-c++.m4 (gl_PROG_ANSI_CXX): Use AC_CHECK_TOOLS instead of
93814         AC_CHECK_PROGS.
93815         Reported by Simon Josefsson.
93817 2010-04-24  Giuseppe Scrivano  <gscrivano@gnu.org>
93819         vc-list-files: Add support for subversion
93820         * build-aux/vc-list-files: Use "svn list" to generate the list of
93821         files controlled by subversion.
93823 2010-04-23  Jim Meyering  <meyering@redhat.com>
93825         vc-list-files tests: convert to use init.sh
93826         * tests/test-vc-list-files-cvs.sh: Invoke "$srcdir/init.sh" and
93827         path_prepend_.
93828         Use Exit, not exit.
93829         Use skip_ rather than open coding it.
93830         Remove trap set-up and compare definitions.
93831         * tests/test-vc-list-files-git.sh: Likewise.
93832         * modules/vc-list-files-tests (Files): Add tests/init.sh.
93834 2010-04-22  Simon Josefsson  <simon@josefsson.org>
93836         * top/maint.mk (sc_prohibit_backup_files): Prohibit checked in
93837         backup files.
93839 2010-04-21  Simon Josefsson  <simon@josefsson.org>
93841         * tests/test-vasprintf.c (test_vasprintf, test_asprintf): Test %08lx.
93843 2010-04-20  Eric Blake  <eblake@redhat.com>
93845         tests: be robust to ignored SIGPIPE
93846         * tests/test-select-in.sh: Consume all output.
93847         * tests/test-lseek.sh: Check correct exit status, while avoiding
93848         EPIPE.
93850 2010-04-20  Simon Josefsson  <simon@josefsson.org>
93851             Bruno Haible  <bruno@clisp.org>
93853         visibility: Don't use -fvisibility if it leads to a warning.
93854         * m4/visibility.m4 (gl_VISIBILITY): Check whether -Werror is usable. If
93855         yes, don't pretend that visibility works if it leads to a warning.
93856         Reported by Mike Gran <spk121@yahoo.com>.
93858 2010-04-20  Andreas Gruenbacher  <agruen@suse.de>
93860         * build-aux/bootstrap: Use "git -h" for testing for supported options
93861         instead of "git --help".  The short-form option only shows a summary,
93862         and doesn't layout the full man page.  Grep for the full option name
93863         in the summary, too.
93865 2010-04-19  Bruno Haible  <bruno@clisp.org>
93867         relocatable: Drop the need to define RELOCATABLE_STRIP in Makefile.am.
93868         * m4/relocatable.m4 (gl_RELOCATABLE_BODY): Set RELOCATABLE_STRIP.
93869         * doc/relocatable-maint.texi (Supporting Relocation): Remove the
93870         mention of RELOCATABLE_STRIP.
93871         Reported by Sylvain Beucler <beuc@beuc.net>.
93873 2010-04-19  Bruno Haible  <bruno@clisp.org>
93875         * lib/diffseq.h: Fix typo in comment.
93876         Reported by Eric Blake.
93878 2010-04-19  Bruno Haible  <bruno@clisp.org>
93880         ioctl: Move autoconf macro to a .m4 file.
93881         * m4/ioctl.m4: New file, extracted from modules/ioctl.
93882         * modules/ioctl (Files): Add it.
93883         (configure.ac): Simply invoke gl_FUNC_IOCTL.
93884         Reported by Ian Beckwith <ianb@erislabs.net>.
93886 2010-04-18  Andreas Gruenbacher  <agruen@suse.de>
93887             Bruno Haible  <bruno@clisp.org>
93889         diffseq: Accommodate use-case with abstract arrays.
93890         * lib/diffseq.h (struct context): Remove xvec, yvec fields if ELEMENT
93891         is not defined.
93892         (diag, compareseq): Remove local variables xv, yv if ELEMENT is not
93893         defined. Use local macro XREF_YREF_EQUAL instead of EQUAL.
93895 2010-04-18  Bruno Haible  <bruno@clisp.org>
93897         * doc/posix-headers/stdbool.texi: More precise wording.
93899 2010-04-17  Jim Meyering  <meyering@redhat.com>
93901         maint.mk: use gnu-style indentation in an embedded perl script
93902         * top/maint.mk (detect_empty_lines_at_EOF_): Clean up formatting.
93903         Rename variable: s/two/last_two_bytes/
93905 2010-04-16  Eric Blake  <eblake@redhat.com>
93907         test-stdbool: skip test that fails with Solaris CC
93908         * tests/test-stdbool.c (f): Skip test that causes compilation
93909         error under buggy C++ compiler.
93910         * lib/stdbool.in.h: Document the limitation.
93911         * doc/posix-headers/stdbool.texi (stdbool.h): Likewise.
93913         setenv: allow compilation with C++
93914         * lib/setenv.c (__add_to_environ): Add a cast.  Also, drop use of
93915         register keyword.
93917         stdint: allow test to pass with C++
93918         * tests/test-stdint.c: Define __STDC_CONSTANT_MACROS, for glibc.
93920         getopt: allow compilation with C++
93921         * lib/getopt_int.h (__ordering): Hoist enum declaration outside
93922         struct.
93923         * lib/getopt.c (_getopt_internal_r): Use correct type.
93924         Reported by Dagobert Michelson, via Joel E. Denny.
93926 2010-04-16  Bruno Haible  <bruno@clisp.org>
93928         Override netdb.h always.
93929         * modules/netdb (Makefile.am): Augment BUILT_SOURCES always.
93930         * m4/netdb_h.m4 (gl_HEADER_NETDB): Don't set NETDB_H.
93931         Reported by Ludovic Courtès <ludo@gnu.org>.
93933 2010-04-15  Bruno Haible  <bruno@clisp.org>
93935         openpty: Fix mistake from 2010-03-21.
93936         * m4/pty.m4 (gl_FUNC_OPENPTY): Define HAVE_OPENPTY when openpty exists.
93937         Reported by Simon Josefsson.
93939 2010-04-15  Eric Blake  <eblake@redhat.com>
93941         test-forkpty: fix expected signature
93942         * tests/test-forkpty.c (SIGNATURE_CHECK): Add appropriate const.
93943         Reported by Simon Josefsson.
93945 2010-04-15  Jim Meyering  <meyering@redhat.com>
93947         maint.mk: texinfo_suffix_re_: correct the default regexp
93948         * top/maint.mk (texinfo_suffix_re_): Fix default regexp.
93950         * top/maint.mk (sc_texinfo_acronym): Improve filename regexp, and
93951         make it configurable via texinfo_suffix_re_.
93953 2010-04-14  Eric Blake  <eblake@redhat.com>
93955         strtok_r: relax license to LGPLv2+
93956         * modules/strtok_r (License): Relax license.
93957         Reported by Matthias Bolte.
93959 2010-04-14  Simon Josefsson  <simon@josefsson.org>
93961         * lib/gc-libgcrypt.c (gc_init): Use MIN_GCRYPT_VERSION set to
93962         version 1.4.4 by default instead of requiring the libgcrypt
93963         version used during build.  This makes it possible to use the
93964         application with older but still binary compatible libgcrypt
93965         versions.
93967 2010-04-13  Eric Blake  <eblake@redhat.com>
93969         getopt-gnu: match recent glibc fixes and posix ruling
93970         * tests/test-getopt.h (test_getopt): Strengthen tests of leading
93971         '+' handling, when requesting extensions.
93972         * tests/test-getopt_long.h (test_getopt_long): Strengthen test of
93973         'W;' handling.
93974         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Detect glibc 2.11 bug.
93975         * doc/posix-functions/getopt.texi (getopt): Document this.
93976         * doc/glibc-functions/getopt_long.texi (getopt_long): Likewise.
93977         * doc/glibc-functions/getopt_long_only.texi (getopt_long_only):
93978         Likewise.
93980         getopt: merge bug fixes from glibc
93981         * lib/getopt.c (_getopt_internal_r): Use correct message for 'W;'
93982         diagnostics.  Honor '+:' correctly.  Reject ';'.
93984         getopt-posix: detect MacOS bug
93985         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Reject MacOS botch of
93986         optind when missing a required argument.
93987         * doc/posix-functions/getopt.texi (getopt): Document the bug.
93988         * doc/glibc-functions/getopt_long.texi (getopt_long): Likewise.
93989         * doc/glibc-functions/getopt_long_only.texi (getopt_long_only):
93990         Likewise.
93992         getopt-posix: avoid spurious failure on Solaris
93993         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Check for getopt_clip as
93994         an indicator that setting optind=1 is sufficient for reset.
93996         getopt-posix: avoid spurious failure on FreeBSD
93997         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Check for optreset even
93998         in POSIX mode, since the m4 test uses it.
94000         gnulib-tool: silence warning on BSD sh
94001         * gnulib-tool: Avoid leaking warning about unknown 'declare'.
94003 2010-04-13  Jim Meyering  <meyering@redhat.com>
94005         doc: users.txt: GNU patch now uses gnulib
94006         * users.txt: Add patch.
94008 2010-04-12  Jim Meyering  <meyering@redhat.com>
94010         maint.mk: generate more concise timing data for syntax-check rules
94011         * top/maint.mk ($(sc_z_rules_)): Remove the ":", "sc_" prefix and
94012         " done" from each line that reports a syntax-check test duration.
94014 2010-04-12  Andreas Gruenbacher  <agruen@suse.de>
94016         git-version-gen: use "git update-index..." rather than "git status"
94017         * build-aux/git-version-gen: Use git update-index --refresh, not
94018         "git status".  With some versions of git, "git status" would fail
94019         to update the index and result in an unwarranted "-dirty" suffix.
94021 2010-04-11  Jim Meyering  <meyering@redhat.com>
94023         openat: correct formatting (no semantic change)
94024         * m4/openat.m4 (gl_FUNC_FCHOWNAT): Correct formatting in AC_DEFINE.
94025         Suggested by Bruno Haible.
94027 2010-04-11  Bruno Haible  <bruno@clisp.org>
94029         Stricter declaration checking in testdirs.
94030         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
94031         If for_tests is true, augment AM_CPPFLAGS to define
94032         GNULIB_STRICT_CHECKING.
94033         * build-aux/warn-on-use.h (_GL_WARN_ON_USE, _GL_WARN_ON_USE_CXX): When
94034         GNULIB_STRICT_CHECKING is defined, verify that the function is
94035         declared.
94037 2010-04-11  Paolo Bonzini  <bonzini@gnu.org>
94038             Bruno Haible  <bruno@clisp.org>
94040         libunistring: Improve configure output.
94041         * m4/libunistring.m4 (gl_LIBUNISTRING): Check for libiconv first.
94042         Don't say "consider installing GNU libunistring" when checking again
94043         with libiconv.
94045 2010-04-11  Bruno Haible  <bruno@clisp.org>
94047         libunistring: Correct value of $LTLIBUNISTRING.
94048         * m4/libunistring.m4 (gl_LIBUNISTRING): When it depends on libiconv,
94049         correct the value of $LTLIBUNISTRING.
94051 2010-04-11  Bruno Haible  <bruno@clisp.org>
94053         havelib: Add static libraries to LIBS in the right order.
94054         * m4/lib-link.m4 (AC_LIB_HAVE_LINKFLAGS): When $LIB[]NAME contains no
94055         -l options, prepend it to $LIBS, instead of appending it to $LIBS.
94057 2010-04-11  Bruno Haible  <bruno@clisp.org>
94059         libunistring: Detect libunistring also when it depends on libiconv.
94060         * m4/libunistring.m4 (gl_LIBUNISTRING): Unset the cached result before
94061         the second AC_LIB_HAVE_LINKFLAGS invocation.
94063 2010-04-11  James Youngman  <jay@gnu.org>
94065         close-stream: declare local scalars to be "const"
94066         * lib/close-stream.c (close_stream): Make boolean variables const
94067         to document the fact that we set but do not change them.
94069 2010-04-11  Bruno Haible  <bruno@clisp.org>
94071         * m4/libunistring.m4 (gl_LIBUNISTRING): Fix typo in comment.
94073 2010-04-11  Jim Meyering  <meyering@redhat.com>
94075         maint.mk: don't include dist-check.mk
94076         * top/maint.mk: Remove bogus include directive.
94078         maint.mk: improve empty-line-at-EOF check
94079         * top/maint.mk (sc_prohibit_empty_lines_at_EOF): Use Perl-based
94080         solution, rather than tail+Perl-based one.  The latter would read
94081         a few kilobytes from the end of each file, and did not handle empty
94082         files properly.
94084         maint.mk: print the elapsed time for each syntax-check rule
94085         * top/maint.mk (sc_m_rules_): Save start time in a file.
94086         (sc_z_rules_): New rules: remove temp file and print elapsed time.
94087         (local-check): Interpose the .z rules
94089 2010-04-11  Jim Meyering  <meyering@redhat.com>
94091         maint.mk: detect_empty_lines_at_EOF_: avoid FP for an empty file
94092         * top/maint.mk (detect_empty_lines_at_EOF_): Don't confuse an
94093         empty file with one that ends in an empty line.
94095 2010-04-10  Bruno Haible  <bruno@clisp.org>
94097         mkdir: Make it work on mingw64.
94098         * lib/sys_stat.in.h: Include <direct.h> together with <io.h>.
94099         * lib/mkdir.c: Update comment.
94100         Reported by Roman Donchenko (Роман Донченко) <dxdragon@yandex.ru>.
94102 2010-04-10  Bruno Haible  <bruno@clisp.org>
94104         Don't override improved macro from newer autoconf.
94105         * m4/gnulib-common.m4 (AC_C_RESTRICT): Don't define for
94106         autoconf >= 2.62.
94107         Reported by Joel E. Denny <jdenny@clemson.edu>.
94109 2010-04-10  Jim Meyering  <meyering@redhat.com>
94111         maint.mk: new syntax-check rule: prohibit empty lines at end of file
94112         * top/maint.mk (sc_prohibit_empty_lines_at_EOF): New rule.
94114         maint.mk: correct a diagnostic
94115         * top/maint.mk (sc_prohibit_HAVE_MBRTOWC): Fix obsolete use of $re
94116         in diagnostic; now use $prohibit.
94118 2010-04-10  Bruno Haible  <address@hidden>
94120         fchownat: Fix a C++ test error on Solaris 8.
94121         * m4/openat.m4 (gl_FUNC_FCHOWNAT): Don't set REPLACE_FCHOWNAT to 1 if
94122         the function does not exist.
94124 2010-04-10  Bruno Haible  <bruno@clisp.org>
94126         vasnprintf: Add more tests.
94127         * tests/test-vasnprintf-posix.c: Include <errno.h>.
94128         (test_function): Test converting an invalid wide string.
94130         vasnprintf: Correct handling of unconvertible wide string arguments.
94131         * lib/vasnprintf.c (MAX_ROOM_NEEDED): New function, extracted from
94132         VASNPRINTF.
94133         (VASNPRINTF): Use it. After snprintf failed, allocate more memory only
94134         if HAVE_SNPRINTF_RETVAL_C99 is false and the allocated memory is
94135         smaller than the expected maximum need for the directive. Set errno to
94136         EILSEQ, not EINVAL, when the directive is 'c' or 's'.
94137         (local_strnlen, local_wcslen, local_wcsnlen): Update conditions.
94138         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Require AC_C_INLINE and
94139         gl_SNPRINTF_RETVAL_C99. Define HAVE_SNPRINTF_RETVAL_C99.
94140         * modules/vasnprintf (Files): Add m4/printf.m4.
94141         Reported by Jarno Rajahalme <jarno.rajahalme@nsn.com>.
94143 2010-04-10  Bruno Haible  <bruno@clisp.org>
94145         vasnprintf: Fix crash in %ls directive.
94146         * lib/vasnprintf.c (VASNPRINTF): Don't abort when a unconvertible wide
94147         string is passed as argument to %ls, with no precision and no width.
94148         Reported by Jarno Rajahalme <jarno.rajahalme@nsn.com>.
94150 2010-04-10  Bruno Haible  <bruno@clisp.org>
94152         vasnprintf: Fix multiple test failures on mingw.
94153         * lib/vasnprintf.c (SNPRINTF) [mingw]: Define to snprintf, not
94154         _snprintf, or snwprintf, not _snwprintf.
94156 2010-04-10  Bruno Haible  <bruno@clisp.org>
94158         write: Fix a C++ test error on mingw.
94159         * lib/unistd.in.h (write): Use _GL_CXXALIAS_SYS_CAST.
94161 2010-04-10  Bruno Haible  <bruno@clisp.org>
94163         vasnprintf test: Reduce code duplication.
94164         * tests/test-vasnprintf.c (test_function): New function, extracted from
94165         test_vasnprintf.
94166         (test_vasnprintf, test_asnprintf): Invoke it.
94168 2010-04-10  Bruno Haible  <bruno@clisp.org>
94170         strnlen: Fix warning in C++ mode on MacOS X.
94171         * lib/string.in.h (strnlen): Use the modern idiom.
94172         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Set REPLACE_STRNLEN to 1, instead of
94173         defining strnlen as a macro already in <config.h>.
94174         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
94175         REPLACE_STRNLEN.
94176         * modules/string (Makefile.am): Substitute REPLACE_STRNLEN.
94177         Reported by Jarno Rajahalme <jarno.rajahalme@nsn.com>.
94179 2010-04-08  James Youngman  <jay@gnu.org>
94181         * doc/manywarnings.texi (manywarnings): Add missing parenthesis in
94182         the example.
94184 2010-04-09  Jim Meyering  <meyering@redhat.com>
94186         maint.mk: print better diagnostic when there is no $(_hv_file)
94187         * top/maint.mk (sc_cross_check_PATH_usage_in_tests): Skip test and
94188         announce that when $(_hv_file) (aka help-version) does not exist.
94190         init.sh: run tr in the "C" locale to avoid multibyte interpretation
94191         * tests/init.sh (rand_bytes_): Run tr in the "C" locale so it does
94192         not try to interpret its random input bytes.  Jarno Rajahalme reported
94193         that ./test-xalloc-die.sh would fail with "tr: Illegal byte sequence".
94194         on Darwin 10.3.0 with LC_CTYPE=UTF-8.
94195         (mktempd_): Likewise, just in case.
94197         ftruncate: add two years to projected module removal date: 2012
94198         * m4/ftruncate.m4: Adjust comments.
94200         ftruncate: mark module as obsolete; even MinGW provides it, now
94201         * modules/ftruncate (Status): Obsolete.
94202         (Notice): Say that.
94203         * doc/posix-functions/ftruncate.texi: Don't say MinGW lacks it.
94204         http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/9203
94206 2010-04-08  Bruno Haible  <bruno@clisp.org>
94208         Fix side effects from tests-related modules.
94209         * modules/dprintf-posix (Comment): New section.
94210         * modules/fprintf-posix (Comment): Likewise.
94211         * modules/obstack-printf-posix (Comment): Likewise.
94212         * modules/printf-posix (Comment): Likewise.
94213         * modules/snprintf-posix (Comment): Likewise.
94214         * modules/sprintf-posix (Comment): Likewise.
94215         * modules/vasnprintf-posix (Comment): Likewise.
94216         * modules/vasprintf-posix (Comment): Likewise.
94217         * modules/vdprintf-posix (Comment): Likewise.
94218         * modules/vfprintf-posix (Comment): Likewise.
94219         * modules/vprintf-posix (Comment): Likewise.
94220         * modules/vsnprintf-posix (Comment): Likewise.
94221         * modules/vsprintf-posix (Comment): Likewise.
94222         * modules/xprintf-posix (Comment): Likewise.
94223         * modules/xvasprintf-posix (Comment): Likewise.
94224         * modules/ceilf-tests (Depends-on): Remove fprintf-posix.
94225         * modules/floorf-tests (Depends-on): Likewise.
94226         * modules/round-tests (Depends-on): Likewise.
94227         * modules/roundf-tests (Depends-on): Likewise.
94228         * modules/trunc-tests (Depends-on): Likewise.
94229         * modules/truncf-tests (Depends-on): Likewise.
94230         * tests/test-ceilf2.c (check): Don't invoke fprintf if the
94231         'fprintf-posix' module is not present.
94232         * tests/test-floorf2.c (check): Likewise.
94233         * tests/test-trunc2.c (check): Likewise.
94234         * tests/test-truncf2.c (check): Likewise.
94235         * tests/test-round2.c (equal): Likewise.
94236         Reported by Jarno Rajahalme <jarno.rajahalme@nsn.com>.
94238 2010-04-07  Karl Berry  <karl@gnu.org>
94240         * config/srclist.txt,
94241         * config/srclistvars.sh,
94242         * config/srclist-update: doc fixes.
94244 2010-04-07  Jim Meyering  <meyering@redhat.com>
94246         maint.mk: add a PATH crosschecking syntax-check rule
94247         * top/maint.mk (sc_cross_check_PATH_usage_in_tests): New rule.
94248         Useful if you use a test like the one in help-version (coreutils,
94249         diffutils, grep, gzip) that ensures $(VERSION) matches what is
94250         printed by prog --version.
94252 2010-04-06  Bruno Haible  <bruno@clisp.org>
94254         Fix link error on mingw.
94255         * modules/unistd-c++-tests (test_unistd_c___LDADD): Add LIBSOCKET.
94256         * modules/fcntl-h-c++-tests (test_fcntl_h_c___LDADD): Likewise.
94258 2010-04-06  Bruno Haible  <bruno@clisp.org>
94260         Assume rmdir exists.
94261         * lib/rmdir.c (rpl_rmdir): Remove code that invokes the rmdir program.
94263 2010-04-06  Giuseppe Scrivano  <gscrivano@gnu.org>
94265         doc: update users.txt
94266         * users.txt: Add gcal.
94268 2010-04-06  Jim Meyering  <meyering@redhat.com>
94270         init.sh: simply unset TMPDIR rather than risking env -i
94271         * tests/init.sh (mktempd_): Using env -i is rather harsh, and
94272         although it probably works fine on all Unix-based systems, some
94273         systems (Cygwin?) cannot tolerate a totally cleared environment.
94274         Suggestion from Eric Blake.
94276 2010-04-06  Jim Meyering  <meyering@redhat.com>
94278         init.sh: portability fix: use env's POSIX-specified -i option not -u
94279         * tests/init.sh (mktempd_): Use env -i and set PATH explicitly rather
94280         than unportable env -u.  Solaris 5.11's env lacks support for -u.
94282 2010-04-05  Bruno Haible  <bruno@clisp.org>
94284         btowc: Work around Cygwin 1.7.2 bug.
94285         * m4/btowc.m4 (gl_FUNC_BTOWC): Set REPLACE_BTOWC to 1 if the function
94286         does not map NUL to 0.
94287         * doc/posix-functions/btowc.texi: Mention the Cygwin bug.
94289 2010-04-05  Bruno Haible  <bruno@clisp.org>
94291         Make the multithread modules work on Cygwin 1.7.2.
94292         * m4/threadlib.m4 (gl_THREADLIB_BODY): Improve the test whether
94293         imported symbols can be declared weak, so that it returns "no" on
94294         Cygwin 1.7.2.
94296 2010-04-05  Bruno Haible  <bruno@clisp.org>
94298         Use the module 'strncat'.
94299         * modules/unistr/u8-strncat (Depends-on): Add strncat.
94301         Tests for module 'strncat'.
94302         * modules/strncat-tests: New file.
94303         * tests/test-strncat.c: New file.
94305         New module 'strncat'.
94306         * lib/string.in.h (strncat): New declaration.
94307         * lib/strncat.c: New file, based on lib/unistr/u-strncat.h.
94308         * m4/strncat.m4: New file, based on m4/memchr.m4.
94309         * modules/strncat: New file.
94310         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Also check whether strncat
94311         is declared.
94312         (gl_HEADER_STRING_H_DEFAULTS): Initialize GNULIB_STRNCAT,
94313         REPLACE_STRNCAT.
94314         * modules/string (Makefile.am): Substitute GNULIB_STRNCAT,
94315         REPLACE_STRNCAT.
94316         * doc/posix-functions/strncat.texi: Mention the Solaris bug and the new
94317         module.
94318         * tests/test-string-c++.cc: Check signature of strncat.
94320 2010-04-05  Jim Meyering  <meyering@redhat.com>
94322         xstrtoumax-tests: convert to use init.sh
94323         * modules/xstrtoumax-tests (Files): Add tests/init.sh.
94324         * tests/test-xstrtoumax.sh: Invoke "$srcdir/init.sh" and path_prepend_.
94325         Use Exit, not exit.
94326         Remove uses of $EXEEXT and "./" to run a program in the current dir.
94328         xstrtoimax-tests: convert to use init.sh
94329         * modules/xstrtoimax-tests (Files): Add tests/init.sh.
94330         * tests/test-xstrtoimax.sh: Invoke "$srcdir/init.sh" and path_prepend_.
94331         Use Exit, not exit.
94332         Remove uses of $EXEEXT and "./" to run a program in the current dir.
94334 2010-04-05  Bruno Haible  <bruno@clisp.org>
94336         sys_socket: Avoid #define replacements in C++ mode.
94337         * lib/sys_socket.in.h (close, gethostname, select): In C++, attach a
94338         warning to the function if possible, rather than #defining the symbol
94339         to a dysfunctional alias.
94341 2010-04-05  Bruno Haible  <bruno@clisp.org>
94343         fseeko: Fix C++ test error on mingw.
94344         * m4/fseeko.m4 (gl_HAVE_FSEEKO): New macro, extracted from
94345         gl_FUNC_FSEEKO.
94346         (gl_REPLACE_FSEEKO): Also set REPLACE_FSEEKO if appropriate.
94347         (gl_FUNC_FSEEKO): Require gl_HAVE_FSEEKO. Update.
94348         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Don't fiddle with internals of the
94349         fseeko module. Instead, invoke gl_REPLACE_FSEEKO.
94351 2010-04-05  Bruno Haible  <bruno@clisp.org>
94353         duplocale: Improve test output.
94354         * tests/test-duplocale.c (main): Print reason for skipped test.
94356 2010-04-05  Bruno Haible  <bruno@clisp.org>
94358         Assume rmdir exists.
94359         * m4/rmdir.m4 (gl_FUNC_RMDIR): Remove test whether rmdir exists.
94360         * doc/posix-functions/rmdir.texi: Remove mention of "old platforms".
94362 2010-04-05  Bruno Haible  <bruno@clisp.org>
94364         Fix link error on Solaris 8 with cc.
94365         * modules/pty-c++-tests (test_pty_c___LDADD): Add LIBINTL.
94367 2010-04-05  Bruno Haible  <bruno@clisp.org>
94369         frexpl: Fix a C++ test error on Solaris 8 and Cygwin.
94370         * lib/math.in.h (frexpl): Fix condition on _GL_CXXALIASWARN invocation.
94372 2010-04-05  Bruno Haible  <bruno@clisp.org>
94374         vasprintf: Update documentation.
94375         * doc/glibc-functions/asprintf.texi: Mention the 'vasprintf' module.
94377 2010-04-05  Bruno Haible  <bruno@clisp.org>
94379         ptsname: Improve test.
94380         * tests/test-ptsname.c (main): Also try the various master names of BSD
94381         systems.
94383 2010-04-05  Bruno Haible  <bruno@clisp.org>
94385         memchr: Avoid a possible C++ test error.
94386         * lib/string.in.h (memchr): Provide declaration if function is missing.
94387         * m4/memchr.m4 (gl_FUNC_MEMCHR): If the function is missing, set
94388         HAVE_MEMCHR to 0, not REPLACE_MEMCHR to 1.
94389         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize HAVE_MEMCHR.
94390         * modules/string (Makefile.am): Substitute HAVE_MEMCHR.
94392 2010-04-05  Bruno Haible  <bruno@clisp.org>
94394         strtok_r: Improve idiom.
94395         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Invoke gl_PREREQ_STRDUP only when
94396         AC_LIBOBJ is used.
94398 2010-04-05  Bruno Haible  <bruno@clisp.org>
94400         strdup: Improve idiom.
94401         * m4/strdup.m4 (gl_FUNC_STRDUP): Invoke gl_PREREQ_STRDUP only when
94402         AC_LIBOBJ is used.
94403         (gl_FUNC_STRDUP_POSIX): When strdup is missing and malloc is not POSIX
94404         compliant, don't set REPLACE_STRDUP to 1. Invoke gl_PREREQ_STRDUP only
94405         when AC_LIBOBJ is used.
94407 2010-04-05  Bruno Haible  <bruno@clisp.org>
94409         mbsinit, mbrtowc, wcrtomb: Improve idioms.
94410         * m4/mbsinit.m4 (gl_FUNC_MBSINIT): When the function does not exist,
94411         don't set REPLACE_MBSINIT to 1.
94412         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): When the function does not exist,
94413         don't set REPLACE_MBRTOWC to 1.
94414         * m4/mbsrtowcs.m4 (gl_FUNC_MBSRTOWCS): When the function does not
94415         exist, don't set REPLACE_MBSRTOWCS to 1.
94416         * m4/mbsnrtowcs.m4 (gl_FUNC_MBSNRTOWCS): When the function does not
94417         exist, don't set REPLACE_MBSNRTOWCS to 1.
94418         * m4/wcrtomb.m4 (gl_FUNC_WCRTOMB): When the function does not exist,
94419         don't set REPLACE_WCRTOMB to 1.
94420         * m4/wcsrtombs.m4 (gl_FUNC_WCSRTOMBS): When the function does not
94421         exist, don't set REPLACE_WCSRTOMBS to 1.
94422         * m4/wcsnrtombs.m4 (gl_FUNC_WCSNRTOMBS): When the function does not
94423         exist, don't set REPLACE_WCSNRTOMBS to 1.
94425 2010-04-05  Bruno Haible  <bruno@clisp.org>
94427         ldexpl: Improve idiom.
94428         * m4/ldexpl.m4 (gl_FUNC_LDEXPL): When the function is not declared,
94429         make sure to set HAVE_DECL_LDEXPL to 0.
94431 2010-04-05  Jim Meyering  <meyering@redhat.com>
94433         xstrtol-tests: convert to use init.sh
94434         * modules/xstrtol-tests (Files): Add tests/init.sh.
94435         * tests/test-xstrtol.sh: Invoke "$srcdir/init.sh" and path_prepend_.
94436         Use Exit, not exit.
94437         Remove uses of $EXEEXT and "./" to run a program in the current dir.
94439         atexit-tests: convert to use init.sh
94440         * modules/atexit-tests (Files): Add tests/init.sh.
94441         * tests/test-atexit.sh: Invoke "$srcdir/init.sh" and path_prepend_.
94442         Use Exit, not exit.
94443         Remove uses of $EXEEXT and "./" to run a program in the current dir.
94445         init.sh: fix typo
94446         * tests/init.sh: Restore omitted ":" before stderr_fileno_ initialization.
94448         init.sh: make it easier for a test script to write to the tty, ...
94449         when using automake's parallel-tests mode.
94450         * tests/init.sh (stderr_fileno_): Define overridable variable.
94451         (warn_): New function, to use it.
94452         (fail_, skip_, framework_failure_): Use warn_.
94454 2010-04-04  Bruno Haible  <bruno@clisp.org>
94456         btowc: Avoid warning.
94457         * lib/btowc.c: Include <stdlib.h>.
94458         Reported by Hauke Fath <hauke@espresso.rhein-neckar.de>.
94460 2010-04-04  Hauke Fath  <hauke@espresso.rhein-neckar.de>  (tiny change)
94461             Bruno Haible  <bruno@clisp.org>
94463         wchar: Port to NetBSD 1.5.
94464         * lib/wchar.in.h (WEOF): Provide fallback also when wint_t exists.
94465         * lib/wctype.in.h (WEOF): Likewise.
94467 2010-04-04  Hauke Fath  <hauke@espresso.rhein-neckar.de>  (tiny change)
94468             Bruno Haible  <bruno@clisp.org>
94470         Port extended stdio to NetBSD 1.5.
94471         * lib/stdio-impl.h [NetBSD]: Include <sys/param.h>.
94472         (struct __sfileext, fp_ub): Define the "old way" for NetBSD 1.5Z and
94473         older.
94475 2010-04-04  Bruno Haible  <bruno@clisp.org>
94477         string: Remove unused substitution.
94478         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Don't initialize
94479         HAVE_DECL_STRERROR.
94480         * modules/string (Makefile.am): Don't substitute HAVE_DECL_STRERROR.
94482 2010-04-04  Bruno Haible  <bruno@clisp.org>
94484         strtod: Avoid a possible C++ test error.
94485         * m4/strtod.m4 (gl_FUNC_STRTOD): When setting HAVE_STRTOD to 0, don't
94486         set REPLACE_STRTOD.
94488 2010-04-04  Bruno Haible  <bruno@clisp.org>
94490         strerror: Update documentation.
94491         * doc/posix-functions/strerror.texi: Remove mention of old platforms.
94493 2010-04-04  Bruno Haible  <bruno@clisp.org>
94495         stdio: Fix some C++ test errors on Solaris 8 with GCC.
94496         * lib/stdio.in.h (vdprintf, vfprintf, vprintf, vsprintf): Use
94497         _GL_CXXALIAS_SYS_CAST.
94499 2010-04-04  Bruno Haible  <bruno@clisp.org>
94501         frexpl: Fix a C++ test error on Solaris 8 and Cygwin.
94502         * m4/frexpl.m4 (gl_FUNC_FREXPL, gl_FUNC_FREXPL_NO_LIBM): When the
94503         function is not declared, set HAVE_DECL_FREXPL to 0, instead of setting
94504         REPLACE_FREXPL to 1.
94505         * doc/posix-functions/frexpl.texi: Update documentation.
94507 2010-04-04  Bruno Haible  <bruno@clisp.org>
94509         math: Fix some C++ test errors on Solaris 8 and Cygwin.
94510         * lib/math.in.h (cosl, logl, sinl): Use simpler idiom.
94512 2010-04-04  Bruno Haible  <bruno@clisp.org>
94514         Implement nanosleep for native Windows.
94515         * lib/nanosleep.c (nanosleep): New implementation for native Windows.
94517 2010-04-04  Bruno Haible  <bruno@clisp.org>
94519         math: Fix some C++ test errors on Solaris 8.
94520         * lib/math.in.h (truncf, trunc): Use simpler idiom.
94522 2010-04-04  Bruno Haible  <bruno@clisp.org>
94524         math: Fix some C++ test errors on Cygwin.
94525         * lib/math.in.h (ceilf, ceill, floorf, floorl, roundf, round, roundl,
94526         truncl): Provide declaration if the system does not have it.
94527         * m4/ceilf.m4 (gl_FUNC_CEILF): If the function is not declared, set
94528         HAVE_DECL_CEILF to 0, not REPLACE_CEILF to 1.
94529         * m4/ceill.m4 (gl_FUNC_CEILL): If the function is not declared, set
94530         HAVE_DECL_CEILL to 0, not REPLACE_CEILL to 1.
94531         * m4/floorf.m4 (gl_FUNC_FLOORF): If the function is not declared, set
94532         HAVE_DECL_FLOORF to 0, not REPLACE_FLOORF to 1.
94533         * m4/floorl.m4 (gl_FUNC_FLOORL): If the function is not declared, set
94534         HAVE_DECL_FLOORL to 0, not REPLACE_FLOORL to 1.
94535         * m4/round.m4 (gl_FUNC_ROUND): If the function is not declared, set
94536         HAVE_DECL_ROUND to 0, not REPLACE_ROUND to 1.
94537         * m4/roundf.m4 (gl_FUNC_ROUNDF): If the function is not declared, set
94538         HAVE_DECL_ROUNDF to 0, not REPLACE_ROUNDF to 1.
94539         * m4/roundl.m4 (gl_FUNC_ROUNDL): If the function is not declared, set
94540         HAVE_DECL_ROUNDL to 0, not REPLACE_ROUNDL to 1.
94541         * m4/truncl.m4 (gl_FUNC_TRUNCL): If the function is not declared, set
94542         HAVE_DECL_TRUNCL to 0, not REPLACE_TRUNCL to 1.
94543         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize HAVE_DECL_CEILF,
94544         HAVE_DECL_CEILL, HAVE_DECL_FLOORF, HAVE_DECL_FLOORL, HAVE_DECL_ROUND,
94545         HAVE_DECL_ROUNDF, HAVE_DECL_ROUNDL, HAVE_DECL_TRUNCL.
94546         * modules/math (Makefile.am): Substitute HAVE_DECL_CEILF,
94547         HAVE_DECL_CEILL, HAVE_DECL_FLOORF, HAVE_DECL_FLOORL, HAVE_DECL_ROUND,
94548         HAVE_DECL_ROUNDF, HAVE_DECL_ROUNDL, HAVE_DECL_TRUNCL.
94550 2010-04-04  Bruno Haible  <bruno@clisp.org>
94552         * m4/ceilf.m4 (gl_FUNC_CEILF): Remove redundant AC_SUBST invocation.
94553         * m4/ceill.m4 (gl_FUNC_CEILL): Likewise.
94554         * m4/floorf.m4 (gl_FUNC_FLOORF): Likewise.
94555         * m4/floorl.m4 (gl_FUNC_FLOORL): Likewise.
94556         * m4/isfinite.m4 (gl_ISFINITE): Likewise.
94557         * m4/isinf.m4 (gl_ISINF): Likewise.
94558         * m4/truncl.m4 (gl_FUNC_TRUNCL): Likewise.
94560 2010-04-04  Bruno Haible  <bruno@clisp.org>
94562         * m4/trunc.m4 (gl_FUNC_TRUNC): Remove redundant AC_SUBST invocation.
94563         * m4/truncf.m4 (gl_FUNC_TRUNCF): Likewise.
94565 2010-04-04  Bruno Haible  <bruno@clisp.org>
94567         * m4/tmpfile.m4 (gl_FUNC_TMPFILE): Renamed from gl_TMPFILE.
94568         * modules/tmpfile (configure.ac): Update.
94570         tmpfile: Fix C++ test error on mingw.
94571         * lib/stdio.in.h (tmpfile): New declaration.
94572         * m4/tmpfile.m4 (gl_TMPFILE): Require gl_STDIO_H_DEFAULTS. Set
94573         REPLACE_TMPFILE instead of defining tmpfile as a macro in config.h.
94574         * modules/tmpfile (Depends-on): Add stdio.
94575         (configure.ac): Invoke gl_STDIO_MODULE_INDICATOR.
94576         * m4/stdio_h.m4 (gl_STDIO_H): Also check whether tmpfile is declared.
94577         (gl_STDIO_H_DEFAULTS): Initialize GNULIB_TMPFILE and REPLACE_TMPFILE.
94578         * modules/stdio (Makefile.am): Substitute GNULIB_TMPFILE and
94579         REPLACE_TMPFILE.
94580         * tests/test-stdio-c++.cc (tmpfile): Verify signature.
94582 2010-04-04  Bruno Haible  <bruno@clisp.org>
94584         ioctl: Fix C++ test error on mingw.
94585         * lib/ioctl.c (ioctl): Renamed from rpl_ioctl.
94586         * lib/sys_ioctl.in.h (ioctl): When SYS_IOCTL_H_HAVE_WINSOCK2_H is 1,
94587         use _GL_FUNCDECL_SYS, not _GL_FUNCDECL_RPL.
94589 2010-04-03  Bruno Haible  <bruno@clisp.org>
94591         wcwidth: Fix C++ test error on mingw.
94592         * lib/wcwidth.c (wcwidth): Renamed from rpl_wcwidth.
94593         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): If the wcwidth function does not
94594         exist, don't set REPLACE_WCWIDTH. Instead, rely on HAVE_DECL_WCWIDTH.
94596 2010-04-03  Bruno Haible  <bruno@clisp.org>
94598         nanosleep: Fix C++ test error on mingw.
94599         * lib/nanosleep.c (nanosleep): Renamed from rpl_nanosleep.
94600         * lib/time.in.h (nanosleep): Use modern idiom.
94601         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): When the system does not have a
94602         nanosleep function, set HAVE_NANOSLEEP to 0, instead of setting
94603         REPLACE_NANOSLEEP to 1.
94604         * m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS): Initialize HAVE_NANOSLEEP.
94605         * modules/time (Makefile.am): Substitute HAVE_NANOSLEEP.
94607 2010-04-03  Bruno Haible  <bruno@clisp.org>
94609         strptime: Fix C++ test error on mingw.
94610         * lib/time.in.h (strptime): Use HAVE_STRPTIME, not REPLACE_STRPTIME.
94611         * m4/strptime.m4 (gl_FUNC_STRPTIME): Set HAVE_STRPTIME, not
94612         REPLACE_STRPTIME. Invoke gl_PREREQ_STRPTIME.
94613         (gl_PREREQ_STRPTIME): New macro, extracted from gl_FUNC_STRPTIME.
94614         * m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS): Initialize HAVE_STRPTIME,
94615         not REPLACE_STRPTIME.
94616         * modules/time (Makefile.am): Substitute HAVE_STRPTIME, not
94617         REPLACE_STRPTIME.
94619 2010-04-03  Bruno Haible  <bruno@clisp.org>
94621         timegm: Fix C++ test error on mingw.
94622         * lib/time.in.h (timegm): Use modern idiom.
94623         * m4/timegm.m4 (gl_FUNC_TIMEGM): When timegm does not exist, set
94624         HAVE_TIMEGM to 0, not REPLACE_TIMEGM to 1.
94625         * m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS): Initialize HAVE_TIMEGM.
94626         * modules/time (Makefile.am): Substitute HAVE_TIMEGM.
94628 2010-04-03  Bruno Haible  <bruno@clisp.org>
94630         timegm: Assume declaration if function exists.
94631         * m4/timegm.m4 (gl_FUNC_TIMEGM): Assume timegm is declared if and only
94632         if it exists. Don't clobber ac_cv_func_timegm.
94634 2010-04-03  Bruno Haible  <bruno@clisp.org>
94636         time_r: Fix C++ test error on mingw.
94637         * lib/time.in.h (localtime_r, gmtime_r): Use modern idiom.
94638         * m4/time_r.m4 (gl_TIME_R): When localtime_r does not exist, set
94639         HAVE_LOCALTIME_R to 0, not REPLACE_LOCALTIME_R to 1.
94640         * m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS): Initialize HAVE_LOCALTIME_R.
94641         * modules/time (Makefile.am): Substitute HAVE_LOCALTIME_R.
94643 2010-04-03  Bruno Haible  <bruno@clisp.org>
94645         time_r: Minor updates.
94646         * modules/time_r (Description): Mention the provided functions.
94647         * lib/time_r.c: Don't include <string.h>.
94648         * doc/posix-functions/gmtime_r.texi: Mention the 'time_r' module.
94649         * doc/posix-functions/localtime_r.texi: Likewise.
94651 2010-04-03  Bruno Haible  <bruno@clisp.org>
94653         time: Fix regression introduced on 2010-03-08.
94654         * m4/time_h.m4 (gl_TIME_MODULE_INDICATOR): Require
94655         gl_HEADER_TIME_H_DEFAULTS, not gl_HEADER_STRING_H_DEFAULTS.
94657 2010-04-03  Jim Meyering  <meyering@redhat.com>
94659         maint.mk: don't silently disable project-specific syntax-check rules
94660         * top/maint.mk (_prohibit_regexp): Define, to help people realize
94661         that they need to convert their project-specific syntax-check rules
94662         to use the new _sc_search_regexp.
94664 2010-04-03  Bruno Haible  <bruno@clisp.org>
94666         fchdir: Fix regression introduced on 2010-03-08.
94667         * lib/unistd.in.h (fchdir): Fix declaration.
94668         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Set HAVE_FCHDIR, not REPLACE_FCHDIR.
94669         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize HAVE_FCHDIR, not
94670         REPLACE_FCHDIR.
94671         * modules/unistd (Makefile.am): Substitute HAVE_FCHDIR, not
94672         REPLACE_FCHDIR.
94674 2010-04-03  Bruno Haible  <bruno@clisp.org>
94676         getpagesize: Fix C++ test error on mingw.
94677         * lib/unistd.in.h (getpagesize): Don't use _GL_CXXALIASWARN if the
94678         system does not declare the function.
94679         * m4/getpagesize.m4 (gl_FUNC_GETPAGESIZE): Also check whether it's
94680         declared.
94681         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize
94682         HAVE_DECL_GETPAGESIZE.
94683         * modules/unistd (Makefile.am): Substitute HAVE_DECL_GETPAGESIZE.
94685 2010-04-03  Bruno Haible  <bruno@clisp.org>
94687         stdio: Make C++ tests work on mingw.
94688         * lib/stdio.in.h (getline): Don't use _GL_CXXALIASWARN if the system
94689         does not declare the function.
94691 2010-04-03  Bruno Haible  <bruno@clisp.org>
94693         ftello: Fix C++ test error on mingw.
94694         * lib/stdio.in.h (ftello): Use modern idiom.
94695         * lib/ftello.c (ftello): Renamed from rpl_ftello.
94696         * m4/ftello.m4 (gl_FUNC_FTELLO): Distinguish the case that the function
94697         is missing and that it needs to be replaced.
94698         (gl_REPLACE_FTELLO): Don't set REPLACE_FTELLO here.
94699         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Initialize HAVE_FTELLO.
94700         * modules/stdio (Makefile.am): Substitute HAVE_FTELLO.
94702 2010-04-03  Bruno Haible  <bruno@clisp.org>
94704         fseeko: Fix C++ test error on mingw.
94705         * lib/stdio.in.h (fseeko): Use modern idiom.
94706         * lib/fseeko.c (fseeko): Renamed from rpl_fseeko.
94707         * m4/fseeko.m4 (gl_FUNC_FSEEKO): Distinguish the case that the function
94708         is missing and that it needs to be replaced.
94709         (gl_REPLACE_FSEEKO): Don't set REPLACE_FSEEKO here.
94710         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Initialize HAVE_FSEEKO.
94711         * modules/stdio (Makefile.am): Substitute HAVE_FSEEKO.
94713 2010-04-03  Bruno Haible  <bruno@clisp.org>
94715         mkstemp: Fix C++ test error on mingw.
94716         * lib/stdlib.in.h (mkstemp): Use modern idiom.
94717         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Distinguish the case that the
94718         function is missing and that it needs to be replaced.
94719         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize HAVE_MKSTEMP.
94720         * modules/stdlib (Makefile.am): Substitute HAVE_MKSTEMP.
94722 2010-04-03  Bruno Haible  <bruno@clisp.org>
94724         stpncpy: Fix C++ test error on mingw.
94725         * lib/string.in.h (stpncpy): Use modern idiom.
94726         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Distinguish the case that the
94727         function is missing and that it needs to be replaced.
94728         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
94729         REPLACE_STPNCPY.
94730         * modules/string (Makefile.am): Substitute REPLACE_STPNCPY.
94732 2010-04-03  Bruno Haible  <bruno@clisp.org>
94734         sys_stat: Fix C++ test error on mingw.
94735         * build-aux/c++defs.h (_GL_CXXALIAS_RPL_CAST_1): New macro.
94736         * lib/sys_stat.in.h (lchmod): Use it instead of _GL_CXXALIAS_RPL_1.
94738 2010-04-03  Bruno Haible  <bruno@clisp.org>
94740         pty: Update doc.
94741         * doc/glibc-headers/pty.texi: Mention changes done since 2010-03-18.
94743 2010-04-03  Bruno Haible  <bruno@clisp.org>
94745         unistd: Fix C++ test error on mingw.
94746         * lib/unistd.in.h (getcwd): Use _GL_CXXALIAS_SYS_CAST.
94748 2010-04-03  Bruno Haible  <bruno@clisp.org>
94750         Update doc regarding mingw.
94751         * doc/glibc-functions/openpty.texi: Update regarding mingw.
94752         * doc/glibc-functions/login_tty.texi: Likewise.
94753         * doc/glibc-functions/forkpty.texi: Likewise.
94755 2010-04-03  Bruno Haible  <bruno@clisp.org>
94757         stdlib: Avoid compilation failure of c-strtold on mingw.
94758         * lib/stdlib.in.h: Don't include <unistd.h> on native Windows systems.
94760 2010-04-03  Bruno Haible  <bruno@clisp.org>
94762         locale: Make C++ tests work on Cygwin and mingw.
94763         * lib/locale.in.h (duplocale): Don't use _GL_CXXALIASWARN if gnulib
94764         cannot provide the function.
94765         Reported by Simon Josefsson.
94767 2010-04-03  Bruno Haible  <bruno@clisp.org>
94769         localename: Port to MacOS X 10.6.
94770         * lib/localename.c (gl_locale_name_thread_unsafe): On MacOS X, try the
94771         memory layout of the locales in MacOS X 10.6 as well.
94772         Reported by Panu Kekäläinen <panu@kekalainen.eu>.
94774 2010-04-02  Bruno Haible  <bruno@clisp.org>
94776         gnulib-tool: Ensure that long-running tests are executed last.
94777         * gnulib-tool (func_emit_tests_Makefile_am): Emit the code for long-
94778         running tests after the one for the other tests.
94780 2010-04-02  Bruno Haible  <bruno@clisp.org>
94782         gnulib-tool: Ensure the tests in the main directory are executed first.
94783         * gnulib-tool (func_emit_tests_Makefile_am): Initialize SUBDIRS to
94784         start with the current directory.
94786 2010-04-02  Bruno Haible  <bruno@clisp.org>
94788         Tests for module 'havelib', moved here from GNU gettext.
94789         * modules/havelib-tests: New file, from gettext/autoconf-lib-link with
94790         modifications.
94791         * tests/havelib/README: New file, from gettext/autoconf-lib-link.
94792         * tests/havelib/Makefile.am: New file, from gettext/autoconf-lib-link
94793         with modifications.
94794         * tests/havelib/rpath-1: New file, from gettext/autoconf-lib-link with
94795         modifications.
94796         * tests/havelib/rpath-1a: New file, from gettext/autoconf-lib-link.
94797         * tests/havelib/rpath-1b: New file, from gettext/autoconf-lib-link.
94798         * tests/havelib/rpath-2_a: New file, from gettext/autoconf-lib-link
94799         with modifications.
94800         * tests/havelib/rpath-2_b: New file, from gettext/autoconf-lib-link
94801         with modifications.
94802         * tests/havelib/rpath-2aaa: New file, from gettext/autoconf-lib-link.
94803         * tests/havelib/rpath-2aab: New file, from gettext/autoconf-lib-link.
94804         * tests/havelib/rpath-2aac: New file, from gettext/autoconf-lib-link.
94805         * tests/havelib/rpath-2aad: New file, from gettext/autoconf-lib-link.
94806         * tests/havelib/rpath-2aba: New file, from gettext/autoconf-lib-link.
94807         * tests/havelib/rpath-2abb: New file, from gettext/autoconf-lib-link.
94808         * tests/havelib/rpath-2abc: New file, from gettext/autoconf-lib-link.
94809         * tests/havelib/rpath-2abd: New file, from gettext/autoconf-lib-link.
94810         * tests/havelib/rpath-2baa: New file, from gettext/autoconf-lib-link.
94811         * tests/havelib/rpath-2bab: New file, from gettext/autoconf-lib-link.
94812         * tests/havelib/rpath-2bac: New file, from gettext/autoconf-lib-link.
94813         * tests/havelib/rpath-2bad: New file, from gettext/autoconf-lib-link.
94814         * tests/havelib/rpath-2bba: New file, from gettext/autoconf-lib-link.
94815         * tests/havelib/rpath-2bbb: New file, from gettext/autoconf-lib-link.
94816         * tests/havelib/rpath-2bbc: New file, from gettext/autoconf-lib-link.
94817         * tests/havelib/rpath-2bbd: New file, from gettext/autoconf-lib-link.
94818         * tests/havelib/rpath-3_a: New file, from gettext/autoconf-lib-link
94819         with modifications.
94820         * tests/havelib/rpath-3_b: New file, from gettext/autoconf-lib-link
94821         with modifications.
94822         * tests/havelib/rpath-3aaa: New file, from gettext/autoconf-lib-link.
94823         * tests/havelib/rpath-3aab: New file, from gettext/autoconf-lib-link.
94824         * tests/havelib/rpath-3aac: New file, from gettext/autoconf-lib-link.
94825         * tests/havelib/rpath-3aad: New file, from gettext/autoconf-lib-link.
94826         * tests/havelib/rpath-3aae: New file, from gettext/autoconf-lib-link.
94827         * tests/havelib/rpath-3aaf: New file, from gettext/autoconf-lib-link.
94828         * tests/havelib/rpath-3aag: New file, from gettext/autoconf-lib-link.
94829         * tests/havelib/rpath-3aah: New file, from gettext/autoconf-lib-link.
94830         * tests/havelib/rpath-3aba: New file, from gettext/autoconf-lib-link.
94831         * tests/havelib/rpath-3abb: New file, from gettext/autoconf-lib-link.
94832         * tests/havelib/rpath-3abc: New file, from gettext/autoconf-lib-link.
94833         * tests/havelib/rpath-3abd: New file, from gettext/autoconf-lib-link.
94834         * tests/havelib/rpath-3abe: New file, from gettext/autoconf-lib-link.
94835         * tests/havelib/rpath-3abf: New file, from gettext/autoconf-lib-link.
94836         * tests/havelib/rpath-3abg: New file, from gettext/autoconf-lib-link.
94837         * tests/havelib/rpath-3abh: New file, from gettext/autoconf-lib-link.
94838         * tests/havelib/rpath-3baa: New file, from gettext/autoconf-lib-link.
94839         * tests/havelib/rpath-3bab: New file, from gettext/autoconf-lib-link.
94840         * tests/havelib/rpath-3bac: New file, from gettext/autoconf-lib-link.
94841         * tests/havelib/rpath-3bad: New file, from gettext/autoconf-lib-link.
94842         * tests/havelib/rpath-3bae: New file, from gettext/autoconf-lib-link.
94843         * tests/havelib/rpath-3baf: New file, from gettext/autoconf-lib-link.
94844         * tests/havelib/rpath-3bag: New file, from gettext/autoconf-lib-link.
94845         * tests/havelib/rpath-3bah: New file, from gettext/autoconf-lib-link.
94846         * tests/havelib/rpath-3bba: New file, from gettext/autoconf-lib-link.
94847         * tests/havelib/rpath-3bbb: New file, from gettext/autoconf-lib-link.
94848         * tests/havelib/rpath-3bbc: New file, from gettext/autoconf-lib-link.
94849         * tests/havelib/rpath-3bbd: New file, from gettext/autoconf-lib-link.
94850         * tests/havelib/rpath-3bbe: New file, from gettext/autoconf-lib-link.
94851         * tests/havelib/rpath-3bbf: New file, from gettext/autoconf-lib-link.
94852         * tests/havelib/rpath-3bbg: New file, from gettext/autoconf-lib-link.
94853         * tests/havelib/rpath-3bbh: New file, from gettext/autoconf-lib-link.
94854         * tests/havelib/rpathx/rpathx.c: New file, from
94855         gettext/autoconf-lib-link.
94856         * tests/havelib/rpathx/Makefile.am: New file, from
94857         gettext/autoconf-lib-link.
94858         * tests/havelib/rpathx/configure.ac: New file, from
94859         gettext/autoconf-lib-link with modifications.
94860         * tests/havelib/rpathy/rpathy.c: New file, from
94861         gettext/autoconf-lib-link.
94862         * tests/havelib/rpathy/Makefile.am: New file, from
94863         gettext/autoconf-lib-link.
94864         * tests/havelib/rpathy/configure.ac: New file, from
94865         gettext/autoconf-lib-link with modifications.
94866         * tests/havelib/rpathz/rpathz.c: New file, from
94867         gettext/autoconf-lib-link.
94868         * tests/havelib/rpathz/Makefile.am: New file, from
94869         gettext/autoconf-lib-link.
94870         * tests/havelib/rpathz/configure.ac: New file, from
94871         gettext/autoconf-lib-link with modifications.
94872         * tests/havelib/rpathlx/usex.c: New file, from
94873         gettext/autoconf-lib-link.
94874         * tests/havelib/rpathlx/Makefile.am: New file, from
94875         gettext/autoconf-lib-link.
94876         * tests/havelib/rpathlx/configure.ac: New file, from
94877         gettext/autoconf-lib-link with modifications.
94878         * tests/havelib/rpathly/usey.c: New file, from
94879         gettext/autoconf-lib-link.
94880         * tests/havelib/rpathly/Makefile.am: New file, from
94881         gettext/autoconf-lib-link.
94882         * tests/havelib/rpathly/configure.ac: New file, from
94883         gettext/autoconf-lib-link with modifications.
94884         * tests/havelib/rpathlz/usez.c: New file, from
94885         gettext/autoconf-lib-link.
94886         * tests/havelib/rpathlz/Makefile.am: New file, from
94887         gettext/autoconf-lib-link.
94888         * tests/havelib/rpathlz/configure.ac: New file, from
94889         gettext/autoconf-lib-link with modifications.
94890         * tests/havelib/rpathlyx/usey.c: New file, from
94891         gettext/autoconf-lib-link.
94892         * tests/havelib/rpathlyx/Makefile.am: New file, from
94893         gettext/autoconf-lib-link.
94894         * tests/havelib/rpathlyx/configure.ac: New file, from
94895         gettext/autoconf-lib-link with modifications.
94896         * tests/havelib/rpathlzyx/usez.c: New file, from
94897         gettext/autoconf-lib-link.
94898         * tests/havelib/rpathlzyx/Makefile.am: New file, from
94899         gettext/autoconf-lib-link.
94900         * tests/havelib/rpathlzyx/configure.ac: New file, from
94901         gettext/autoconf-lib-link with modifications.
94902         * tests/havelib/rpathcfg.sh: New file, from gettext/autoconf-lib-link
94903         with modifications.
94905 2010-04-02  Bruno Haible  <bruno@clisp.org>
94907         gnulib-tool: Create distributed built sources also for the tests.
94908         * gnulib-tool (func_create_testdir): Also generate distributed built
94909         sources in the tests directory.
94911 2010-04-02  Bruno Haible  <bruno@clisp.org>
94913         gnulib-tool: Obey user's environment variables.
94914         * gnulib-tool (func_create_testdir): When creating built sources,
94915         respect the environment variables for autoconf, automake, etc. given by
94916         the user.
94918 2010-04-02  Bruno Haible  <bruno@clisp.org>
94920         gnulib-tool: Provide the value of --m4-base to modules.
94921         * gnulib-tool (func_import, func_create_testdir): Emit a definition
94922         of gl_m4_base.
94924 2010-04-02  Eric Blake  <eblake@redhat.com>
94926         maint.mk: fix some fallout
94927         * NEWS: Document the incompatible change, and its effect on cfg.mk.
94928         * top/maint.mk (sc_prohibit_test_minus_ao): Update.
94930 2010-03-28  Jose E. Marchesi  <jemarch@gnu.org>
94932         maint.mk: _sc_search_regexp: generalize and rename from _prohibit_regexp
94933         * top/maint.mk (_sc_search_regexp): Rename from _prohibit_regexp.
94934         (sc_cast_of_argument_to_free): Adapt to use _sc_search_regexp.
94935         (sc_cast_of_x_alloc_return_value): Likewise.
94936         (sc_cast_of_alloca_return_value): Likewise.
94937         (sc_space_tab): Likewise.
94938         (sc_prohibit_atoi_atof): Likewise.
94939         (sc_prohibit_magic_number_exit): Likewise.
94940         (sc_error_exit_success): Likewise.
94941         (sc_file_system): Likewise.
94942         (sc_prohibit_have_config_h): Likewise.
94943         (sc_require_config_h): Likewise.
94944         (sc_prohibit_HAVE_MBRTOWC): Likewise.
94945         (sc_obsolete_symbols): Likewise.
94946         (sc_changelog): Likewise.
94947         (sc_program_name): Likewise.
94948         (sc_the_the): Likewise.
94949         (sc_trailing_blank): Likewise.
94950         (sc_two_space_separator_in_usage): Likewise.
94951         (sc_useless_cpp_parens): Likewise.
94952         (sc_GPL_version): Likewise.
94953         (sc_GFDL_version): Likewise.
94954         (sc_texinfo_acronym): Likewise.
94955         (sc_prohibit_cvs_keyword): Likewise.
94956         (sc_prohibit_stat_st_blocks): Likewise.
94957         (sc_prohibit_S_IS_definition): Likewise.
94958         (sc_redundant_const): Likewise.
94959         (sc_makefile_TAB_only_indentation): Likewise.
94960         (sc_m4_quote_check): Likewise.
94961         (sc_makefile_path_separator_check): Likewise.
94962         (sc_copyright_check): Likewise.
94963         (sc_Wundef_boolean): Likewise.
94964         (sc_vulnerable_makefile_CVE-2009-4029): Likewise.
94966         maint.mk: match 0 or more whitespace-before-function-call '('
94967         * top/maint.mk (sc_error_exit_success): Relax regexp to match uses
94968         that have zero or two-and-more spaces between the function name
94969         and the open parenthesis.
94970         (sc_error_message_warn_fatal): Likewise.
94971         (sc_error_message_uppercase): Likewise.
94972         (sc_error_message_period): Likewise.
94974 2010-03-31  Eric Blake  <eblake@redhat.com>
94976         maint.mk: check for [ as well as test
94977         * top/maint.mk (sc_prohibit_test_minus_ao): Extend test.
94978         Based on a libvirt report by Matthias Bolte.
94980         gnumakefile: don't squelch _version output
94981         * top/GNUmakefile (_version): Create one-shot dependency rather
94982         than using $(shell) when version must be regenerated.
94983         (_autoreconf): Run verbosely, by default.
94985         sys_time: avoid compiler warnings
94986         * lib/sys_time.in.h (includes): Ensure gcc pragma is
94987         unconditional, fixing regression from 2010-03-29.
94988         Reported by Simon Josefsson.
94990 2010-03-28  Jose E. Marchesi  <jemarch@gnu.org>
94992         maint.mk: s/_header_without_use/_sc_header_without_use/
94993         * top/maint.mk (_sc_header_without_use): Rename from _header_without_use.
94994         (sc_prohibit_assert_without_use): Use the new name.
94995         (sc_prohibit_close_stream_without_use): Likewise.
94996         (sc_prohibit_getopt_without_use): Likewise.
94997         (sc_prohibit_quotearg_without_use): Likewise.
94998         (sc_prohibit_quote_without_use): Likewise.
94999         (sc_prohibit_long_options_without_use): Likewise.
95000         (sc_prohibit_inttostr_without_use): Likewise.
95001         (sc_prohibit_ignore_value_without_use): Likewise.
95002         (sc_prohibit_error_without_use): Likewise.
95003         (sc_prohibit_xalloc_without_use): Likewise.
95004         (sc_prohibit_hash_without_use): Likewise.
95005         (sc_prohibit_hash_pjw_without_use): Likewise.
95006         (sc_prohibit_safe_read_without_use): Likewise.
95007         (sc_prohibit_argmatch_without_use): Likewise.
95008         (sc_prohibit_canonicalize_without_use): Likewise.
95009         (sc_prohibit_root_dev_ino_without_use): Likewise.
95010         (sc_prohibit_openat_without_use): Likewise.
95011         (sc_prohibit_c_ctype_without_use): Likewise.
95012         (sc_prohibit_signal_without_use): Likewise.
95013         (sc_prohibit_intprops_without_use): Likewise.
95015 2010-03-30  Eric Blake  <eblake@redhat.com>
95017         maint: improve module indicators
95018         * m4/gnulib-common.m4 (gl_MODULE_INDICATOR_SET_VARIABLE)
95019         (gl_MODULE_INDICATOR, gl_MODULE_INDICATOR_FOR_TESTS): Fit in 80
95020         columns, and avoid extra macro expansion.
95022         fdopendir: work around FreeBSD bug
95023         * m4/dirent_h.m4 (gl_DIRENT_H_DEFAULTS): New witness.
95024         * m4/fdopendir.m4 (gl_FUNC_FDOPENDIR): Set it.
95025         * modules/dirent (Makefile.am): Substitute it.
95026         * lib/dirent.in.h (fdopendir): Supply missing FreeBSD
95027         declaration.
95028         * doc/posix-functions/fdopendir.texi (fdopendir): Document the
95029         fix.
95030         Reported by Christian Weisgerber <naddy@mips.inka.de>.
95032 2010-03-29  Bruno Haible  <bruno@clisp.org>
95034         Emit #pragma system_header after the inclusion guard, not before.
95035         * lib/arpa_inet.in.h: Emit #pragma system_header after the inclusion
95036         guard that spans the entire file, not before. This enables an
95037         optimization in GCC's preprocessor.
95038         * lib/ctype.in.h: Likewise.
95039         * lib/dirent.in.h: Likewise.
95040         * lib/errno.in.h: Likewise.
95041         * lib/float.in.h: Likewise.
95042         * lib/getopt.in.h: Likewise.
95043         * lib/iconv.in.h: Likewise.
95044         * lib/langinfo.in.h: Likewise.
95045         * lib/locale.in.h: Likewise.
95046         * lib/math.in.h: Likewise.
95047         * lib/netdb.in.h: Likewise.
95048         * lib/netinet_in.in.h: Likewise.
95049         * lib/pty.in.h: Likewise.
95050         * lib/sched.in.h: Likewise.
95051         * lib/se-selinux.in.h: Likewise.
95052         * lib/search.in.h: Likewise.
95053         * lib/spawn.in.h: Likewise.
95054         * lib/stdarg.in.h: Likewise.
95055         * lib/stdint.in.h: Likewise.
95056         * lib/string.in.h: Likewise.
95057         * lib/strings.in.h: Likewise.
95058         * lib/sys_file.in.h: Likewise.
95059         * lib/sys_ioctl.in.h: Likewise.
95060         * lib/sys_time.in.h: Likewise.
95061         * lib/sys_times.in.h: Likewise.
95062         * lib/sys_utsname.in.h: Likewise.
95063         * lib/sys_wait.in.h: Likewise.
95064         * lib/sysexits.in.h: Likewise.
95065         * lib/wctype.in.h: Likewise.
95067 2010-03-28  James Youngman  <jay@gnu.org>
95069         save-cwd: don't leak a file descriptor when the caller execs.
95070         * lib/save-cwd.c (save_cwd): set the close-on-exec flag for the
95071         saved file descriptor.
95072         * modules/save-cwd (Depends-on): Depend on cloexec.
95074 2010-03-29  Bruno Haible  <bruno@clisp.org>
95076         Remove vestiges of fts-lgpl module.
95077         * lib/fts_.h: Assume GNULIB_FTS is 1.
95078         * lib/fts.c: Likewise.
95079         * modules/fts (configure.ac): Remove gl_MODULE_INDICATOR invocation.
95081 2010-03-28  Bruno Haible  <bruno@clisp.org>
95083         Fix definition of tests witness macro.
95084         * gnulib-tool (func_import): Fix definition of witness macro.
95086 2010-03-28  Bruno Haible  <bruno@clisp.org>
95088         Fix ioctl's protoype on glibc systems.
95089         * lib/sys_ioctl.in.h (ioctl): If REPLACE_IOCTL is 1, use a wrapper. Use
95090         _GL_CXXALIAS_SYS, not _GL_CXXALIAS_SYS_CAST.
95091         * lib/ioctl.c (rpl_ioctl) [HAVE_IOCTL]: New wrapper.
95092         * modules/ioctl (configure.ac): Test whether ioctl has the POSIX
95093         signature. If not, arrange to replace the ioctl function.
95094         * m4/sys_ioctl_h.m4 (gl_SYS_IOCTL_H_DEFAULTS): Initialize
95095         REPLACE_IOCTL.
95096         * modules/sys_ioctl (Makefile.am): Substitute REPLACE_IOCTL.
95097         * doc/posix-functions/ioctl.texi: Mention the glibc problem.
95098         Reported by Ludovic Courtès <ludo@gnu.org>.
95100 2010-03-28  Javier Villavicencio  <the_paya@gentoo.org>
95102         exclude: fix the case of globs vs. EXCLUDE_INCLUDE
95103         * lib/exclude.c (excluded_file_pattern_p): Fix logic error that
95104         made it so grep -r --include=GLOB* ... did not work.
95106 2010-03-26  Jim Meyering  <meyering@redhat.com>
95107             Eric Blake  <eblake@redhat.com>
95109         maint.mk: prohibit use of test's -o and -a operators
95110         * top/maint.mk (sc_prohibit_test_minus_ao): New rule.
95112 2010-03-28  Bruno Haible  <bruno@clisp.org>
95114         Remove unused GNULIB_XYZ macro definitions.
95115         * modules/crypto/gc-camellia (configure.ac): Remove gl_MODULE_INDICATOR
95116         invocation.
95118 2010-03-28  Bruno Haible  <bruno@clisp.org>
95120         Mark privileged tests modules.
95121         * modules/idpriv-drop-tests (Status): New section.
95122         * modules/idpriv-droptemp-tests (Status): New section.
95124 2010-03-28  Bruno Haible  <bruno@clisp.org>
95126         Split C++ tests into separate tests modules.
95127         * modules/dirent-c++-tests: New file, extracted from
95128         modules/dirent-tests.
95129         * modules/dirent-tests: Depend on it.
95130         * modules/fcntl-h-c++-tests: New file, extracted from
95131         modules/fcntl-h-tests.
95132         * modules/fcntl-h-tests: Depend on it.
95133         * modules/glob-c++-tests: New file, extracted from modules/glob-tests.
95134         * modules/glob-tests: Depend on it.
95135         * modules/iconv-h-c++-tests: New file, extracted from
95136         modules/iconv-h-tests.
95137         * modules/iconv-h-tests: Depend on it.
95138         * modules/langinfo-c++-tests: New file, extracted from
95139         modules/langinfo-tests.
95140         * modules/langinfo-tests: Depend on it.
95141         * modules/locale-c++-tests: New file, extracted from
95142         modules/locale-tests.
95143         * modules/locale-tests: Depend on it.
95144         * modules/math-c++-tests: New file, extracted from modules/math-tests.
95145         * modules/math-tests: Depend on it.
95146         * modules/pty-c++-tests: New file, extracted from modules/pty-tests.
95147         * modules/pty-tests: Depend on it.
95148         * modules/search-c++-tests: New file, extracted from
95149         modules/search-tests.
95150         * modules/search-tests: Depend on it.
95151         * modules/signal-c++-tests: New file, extracted from
95152         modules/signal-tests.
95153         * modules/signal-tests: Depend on it.
95154         * modules/spawn-c++-tests: New file, extracted from
95155         modules/spawn-tests.
95156         * modules/spawn-tests: Depend on it.
95157         * modules/stdio-c++-tests: New file, extracted from
95158         modules/stdio-tests.
95159         * modules/stdio-tests: Depend on it.
95160         * modules/stdlib-c++-tests: New file, extracted from
95161         modules/stdlib-tests.
95162         * modules/stdlib-tests: Depend on it.
95163         * modules/string-c++-tests: New file, extracted from
95164         modules/string-tests.
95165         * modules/string-tests: Depend on it.
95166         * modules/sys_ioctl-c++-tests: New file, extracted from
95167         modules/sys_ioctl-tests.
95168         * modules/sys_ioctl-tests: Depend on it.
95169         * modules/sys_select-c++-tests: New file, extracted from
95170         modules/sys_select-tests.
95171         * modules/sys_select-tests: Depend on it.
95172         * modules/sys_socket-c++-tests: New file, extracted from
95173         modules/sys_socket-tests.
95174         * modules/sys_socket-tests: Depend on it.
95175         * modules/sys_stat-c++-tests: New file, extracted from
95176         modules/sys_stat-tests.
95177         * modules/sys_stat-tests: Depend on it.
95178         * modules/sys_time-c++-tests: New file, extracted from
95179         modules/sys_time-tests.
95180         * modules/sys_time-tests: Depend on it.
95181         * modules/time-c++-tests: New file, extracted from modules/time-tests.
95182         * modules/time-tests: Depend on it.
95183         * modules/unistd-c++-tests: New file, extracted from
95184         modules/unistd-tests.
95185         * modules/unistd-tests: Depend on it.
95186         * modules/wchar-c++-tests: New file, extracted from
95187         modules/wchar-tests.
95188         * modules/wchar-tests: Depend on it.
95189         * modules/wctype-c++-tests: New file, extracted from
95190         modules/wctype-tests.
95191         * modules/wctype-tests: Depend on it.
95192         Reported by Simon Josefsson.
95194 2010-03-28  Bruno Haible  <bruno@clisp.org>
95196         gnulib-tool: Allow 'foo-tests' module even if there is no module 'foo'.
95197         * gnulib-tool (func_exists_module): New function, extracted from
95198         func_verify_module.
95199         (func_verify_module): Use it.
95200         (func_get_dependencies): Synthetize a dependency from 'foo-tests' to
95201         'foo' only if 'foo' exists.
95202         * doc/gnulib.texi (Extra tests modules): Explain how to split a tests
95203         module.
95205 2010-03-28  Bruno Haible  <bruno@clisp.org>
95207         gnulib-tool: Add support for special categories of tests.
95208         * gnulib-tool: New options --with-c++-tests, --with-longrunning-tests,
95209         --with-privileged-tests, --with-unportable-tests, --with-all-tests.
95210         (func_usage): Document them.
95211         (inc_cxx_tests, inc_longrunning_tests, inc_privileged_tests,
95212         inc_unportable_tests, inc_all_tests): New variables.
95213         (func_acceptable): Consider these variables.
95214         (func_modules_transitive_closure): Make it work when the 'Status' field
95215         consists of multiple words.
95216         (func_import): Store and restore the values of inc_cxx_tests,
95217         inc_longrunning_tests, inc_privileged_tests, inc_unportable_tests,
95218         inc_all_tests in gnulib-comp.m4.
95219         (func_create_testdir): Set inc_all_tests to true.
95220         * doc/gnulib.texi (Extra tests modules): New section.
95221         Suggested by Jim Meyering.
95223 2010-03-28  Bruno Haible  <bruno@clisp.org>
95225         ansi-c++-opt: Allow turning off the C++ build by default.
95226         * m4/ansi-c++.m4 (gl_CXX_CHOICE): Let CXX_CHOICE default to 'no' if
95227         gl_CXX_CHOICE_DEFAULT_NO is defined.
95228         Requested by Eric Blake.
95230 2010-03-28  Bruno Haible  <bruno@clisp.org>
95232         unistd: Avoid #define replacements in C++ mode.
95233         * lib/unistd.in.h (socket, connect, accept, bind, getpeername,
95234         getsockname, getsockopt, listen, recv, send, recvfrom, sendto,
95235         setsockopt, shutdown, select): In C++, attach a warning to the function
95236         if possible, rather than #defining the symbol to a dysfunctional alias.
95237         Reported by John W. Eaton <jwe@gnu.org>.
95239 2010-03-28  Bruno Haible  <bruno@clisp.org>
95241         Fix link errors on mingw.
95242         * lib/sys_ioctl.in.h (ioctl): Fix declaration idiom.
95243         * modules/sys_ioctl-tests (Makefile.am): Link test-sys_ioctl-c++ with
95244         $(LIBSOCKET).
95245         * modules/sys_select-tests (Makefile.am): Link test-sys_select-c++ with
95246         $(LIBSOCKET).
95248 2010-03-28  Bruno Haible  <bruno@clisp.org>
95249             Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
95251         lib-ignore: Determine different options for different compilers.
95252         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Set a variable which
95253         depends on the current language (C/C++/Fortran). Don't set LDFLAGS.
95254         Add comments.
95255         (_gl_IGNORE_UNUSED_LIBRARIES_OPTIONS): New macro.
95256         * NEWS: Mention the change.
95258 2010-03-27  Bruno Haible  <bruno@clisp.org>
95260         Remove unused GNULIB_XYZ macro definitions.
95261         * modules/dup3 (configure.ac): Remove gl_MODULE_INDICATOR invocation.
95262         * modules/fseek (configure.ac): Likewise.
95263         * modules/ioctl (configure.ac): Likewise.
95264         * modules/open (configure.ac): Likewise.
95265         * modules/stdlib-safer (configure.ac): Likewise.
95267 2010-03-27  Bruno Haible  <bruno@clisp.org>
95269         Add a remark about certain modules.
95270         * modules/malloc (Comment): New section.
95271         * modules/realloc (Comment): Likewise.
95272         * modules/sigpipe (Comment): Likewise.
95274 2010-03-27  Bruno Haible  <bruno@clisp.org>
95276         Resolve conflict between the two kinds of module indicators.
95277         * m4/gnulib-common.m4 (gl_MODULE_INDICATOR_FOR_TESTS): Define
95278         GNULIB_TEST_XYZ instead of GNULIB_XYZ.
95279         * modules/canonicalize (configure.ac): Invoke
95280         gl_MODULE_INDICATOR_FOR_TESTS.
95281         * tests/test-canonicalize-lgpl.c: Test GNULIB_TEST_XYZ instead of
95282         GNULIB_XYZ.
95283         * tests/test-dirent-c++.cc: Likewise.
95284         * tests/test-dirent-safer.c: Likewise.
95285         * tests/test-dup2.c: Likewise.
95286         * tests/test-fchdir.c: Likewise.
95287         * tests/test-fcntl-h-c++.cc: Likewise.
95288         * tests/test-getopt.c: Likewise.
95289         * tests/test-getopt.h: Likewise.
95290         * tests/test-langinfo-c++.cc: Likewise.
95291         * tests/test-locale-c++.cc: Likewise.
95292         * tests/test-math-c++.cc: Likewise.
95293         * tests/test-pty-c++.cc: Likewise.
95294         * tests/test-search-c++.cc: Likewise.
95295         * tests/test-signal-c++.cc: Likewise.
95296         * tests/test-spawn-c++.cc: Likewise.
95297         * tests/test-stdio-c++.cc: Likewise.
95298         * tests/test-stdlib-c++.cc: Likewise.
95299         * tests/test-string-c++.cc: Likewise.
95300         * tests/test-sys_ioctl-c++.cc: Likewise.
95301         * tests/test-sys_select-c++.cc: Likewise.
95302         * tests/test-sys_socket-c++.cc: Likewise.
95303         * tests/test-sys_stat-c++.cc: Likewise.
95304         * tests/test-sys_time-c++.cc: Likewise.
95305         * tests/test-time-c++.cc: Likewise.
95306         * tests/test-unistd-c++.cc: Likewise.
95307         * tests/test-wchar-c++.cc: Likewise.
95308         * tests/uninorm/test-u8-nfc.c: Likewise.
95309         * tests/uninorm/test-u8-nfd.c: Likewise.
95310         * tests/uninorm/test-u8-nfkc.c: Likewise.
95311         * tests/uninorm/test-u8-nfkd.c: Likewise.
95312         * tests/uninorm/test-u16-nfc.c: Likewise.
95313         * tests/uninorm/test-u16-nfd.c: Likewise.
95314         * tests/uninorm/test-u16-nfkc.c: Likewise.
95315         * tests/uninorm/test-u16-nfkd.c: Likewise.
95316         * tests/uninorm/test-u32-nfc.c: Likewise.
95317         * tests/uninorm/test-u32-nfc-big.c: Likewise.
95318         * tests/uninorm/test-u32-nfd.c: Likewise.
95319         * tests/uninorm/test-u32-nfd-big.c: Likewise.
95320         * tests/uninorm/test-u32-nfkc.c: Likewise.
95321         * tests/uninorm/test-u32-nfkc-big.c: Likewise.
95322         * tests/uninorm/test-u32-nfkd.c: Likewise.
95323         * tests/uninorm/test-u32-nfkd-big.c: Likewise.
95324         * tests/uninorm/test-u32-normalize-big.c: Likewise.
95326 2010-03-27  Bruno Haible  <bruno@clisp.org>
95328         Distinguish two kinds of module indicators.
95329         * m4/gnulib-common.m4 (gl_MODULE_INDICATOR_FOR_TESTS): Renamed from
95330         gl_MODULE_INDICATOR.
95331         (gl_MODULE_INDICATOR): New macro.
95332         * m4/dirent_h.m4 (gl_DIRENT_MODULE_INDICATOR): Invoke
95333         gl_MODULE_INDICATOR_FOR_TESTS instead of gl_MODULE_INDICATOR.
95334         * m4/fcntl_h.m4 (gl_FCNTL_MODULE_INDICATOR): Likewise.
95335         * m4/langinfo_h.m4 (gl_LANGINFO_MODULE_INDICATOR): Likewise.
95336         * m4/locale_h.m4 (gl_LOCALE_MODULE_INDICATOR): Likewise.
95337         * m4/math_h.m4 (gl_MATH_MODULE_INDICATOR): Likewise.
95338         * m4/pty_h.m4 (gl_PTY_MODULE_INDICATOR): Likewise.
95339         * m4/search_h.m4 (gl_SEARCH_MODULE_INDICATOR): Likewise.
95340         * m4/signal_h.m4 (gl_SIGNAL_MODULE_INDICATOR): Likewise.
95341         * m4/spawn_h.m4 (gl_SPAWN_MODULE_INDICATOR): Likewise.
95342         * m4/stdio_h.m4 (gl_STDIO_MODULE_INDICATOR): Likewise.
95343         * m4/stdlib_h.m4 (gl_STDLIB_MODULE_INDICATOR): Likewise.
95344         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): Likewise.
95345         * m4/sys_ioctl_h.m4 (gl_SYS_IOCTL_MODULE_INDICATOR): Likewise.
95346         * m4/sys_select_h.m4 (gl_SYS_SELECT_MODULE_INDICATOR): Likewise.
95347         * m4/sys_socket_h.m4 (gl_SYS_SOCKET_MODULE_INDICATOR): Likewise.
95348         * m4/sys_stat_h.m4 (gl_SYS_STAT_MODULE_INDICATOR): Likewise.
95349         * m4/sys_time_h.m4 (gl_SYS_TIME_MODULE_INDICATOR): Likewise.
95350         * m4/time_h.m4 (gl_TIME_MODULE_INDICATOR): Likewise.
95351         * m4/unistd_h.m4 (gl_UNISTD_MODULE_INDICATOR): Likewise.
95352         * m4/wchar_h.m4 (gl_WCHAR_MODULE_INDICATOR): Likewise.
95353         * modules/cloexec (configure.ac): Likewise.
95354         * modules/getopt-gnu (configure.ac): Likewise.
95355         * modules/uninorm/u8-normalize (configure.ac): Likewise.
95356         * modules/uninorm/u16-normalize (configure.ac): Likewise.
95357         * modules/uninorm/u32-normalize (configure.ac): Likewise.
95358         * modules/fdopendir (configure.ac): Invoke gl_MODULE_INDICATOR.
95360 2010-03-27  Bruno Haible  <bruno@clisp.org>
95362         New module description field 'Comment'.
95363         * gnulib-tool: New option --extract-comment.
95364         (func_usage): Document it.
95365         (sed_extract_prog, sed_extract_field_header): Support 'Comment' field.
95366         (func_get_comment): New function.
95367         * modules/TEMPLATE-EXTENDED: Add a blank Comment field.
95369 2010-03-27  Bruno Haible  <bruno@clisp.org>
95371         Addendum to 2010-02-07 commit.
95372         * gnulib-tool (func_usage): Document --extract-applicability option.
95374 2010-03-27  Bruno Haible  <bruno@clisp.org>
95376         Use GNULIB_POSIXCHECK instead of GNULIB_PORTCHECK.
95377         * lib/time.in.h (asctime, asctime_r, ctime, ctime_r): Test
95378         GNULIB_POSIXCHECK, not GNULIB_PORTCHECK. Provide compile-time warnings
95379         rather than link errors.
95381 2010-03-27  Bruno Haible  <bruno@clisp.org>
95383         Avoid side effects from tests-related modules on the compilation of lib.
95384         * m4/gnulib-common.m4 (gl_MODULE_INDICATOR_CONDITION): New macro.
95385         (gl_MODULE_INDICATOR_SET_VARIABLE): Use its expansion as a value.
95386         * gnulib-tool (func_emit_tests_Makefile_am): Accept a witness_macro
95387         parameter. Emit into AM_CPPFLAGS a definition of the designated C
95388         macro.
95389         (func_import): Define a witness macro. Assign it a value that depends
95390         on the current package. Override gl_MODULE_INDICATOR_CONDITION for the
95391         tests-related modules.
95392         (func_create_testdir): Update func_emit_tests_Makefile_am invocation.
95393         Reported by Jim Meyering.
95395 2010-03-27  Bruno Haible  <bruno@clisp.org>
95397         Factorize common .m4 code.
95398         * m4/gnulib-common.m4 (gl_MODULE_INDICATOR_SET_VARIABLE): New macro.
95399         * m4/arpa_inet_h.m4 (gl_ARPA_INET_MODULE_INDICATOR): Use it.
95400         * m4/ctype.m4 (gl_CTYPE_MODULE_INDICATOR): Likewise.
95401         * m4/dirent_h.m4 (gl_DIRENT_MODULE_INDICATOR): Likewise.
95402         * m4/fcntl_h.m4 (gl_FCNTL_MODULE_INDICATOR): Likewise.
95403         * m4/iconv_h.m4 (gl_ICONV_MODULE_INDICATOR): Likewise.
95404         * m4/inttypes.m4 (gl_INTTYPES_MODULE_INDICATOR): Likewise.
95405         * m4/langinfo_h.m4 (gl_LANGINFO_MODULE_INDICATOR): Likewise.
95406         * m4/locale_h.m4 (gl_LOCALE_MODULE_INDICATOR): Likewise.
95407         * m4/math_h.m4 (gl_MATH_MODULE_INDICATOR): Likewise.
95408         * m4/netdb_h.m4 (gl_NETDB_MODULE_INDICATOR): Likewise.
95409         * m4/pty_h.m4 (gl_PTY_MODULE_INDICATOR): Likewise.
95410         * m4/search_h.m4 (gl_SEARCH_MODULE_INDICATOR): Likewise.
95411         * m4/signal_h.m4 (gl_SIGNAL_MODULE_INDICATOR): Likewise.
95412         * m4/spawn_h.m4 (gl_SPAWN_MODULE_INDICATOR): Likewise.
95413         * m4/stddef_h.m4 (gl_STDDEF_MODULE_INDICATOR): Likewise.
95414         * m4/stdio_h.m4 (gl_STDIO_MODULE_INDICATOR): Likewise.
95415         * m4/stdlib_h.m4 (gl_STDLIB_MODULE_INDICATOR): Likewise.
95416         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): Likewise.
95417         * m4/strings_h.m4 (gl_STRINGS_MODULE_INDICATOR): Likewise.
95418         * m4/sys_file_h.m4 (gl_HEADER_SYS_FILE_MODULE_INDICATOR): Likewise.
95419         * m4/sys_ioctl_h.m4 (gl_SYS_IOCTL_MODULE_INDICATOR): Likewise.
95420         * m4/sys_select_h.m4 (gl_SYS_SELECT_MODULE_INDICATOR): Likewise.
95421         * m4/sys_socket_h.m4 (gl_SYS_SOCKET_MODULE_INDICATOR): Likewise.
95422         * m4/sys_stat_h.m4 (gl_SYS_STAT_MODULE_INDICATOR): Likewise.
95423         * m4/sys_time_h.m4 (gl_SYS_TIME_MODULE_INDICATOR): Likewise.
95424         * m4/sys_times_h.m4 (gl_SYS_TIMES_MODULE_INDICATOR): Likewise.
95425         * m4/sys_utsname_h.m4 (gl_SYS_UTSNAME_MODULE_INDICATOR): Likewise.
95426         * m4/sys_wait_h.m4 (gl_SYS_WAIT_MODULE_INDICATOR): Likewise.
95427         * m4/time_h.m4 (gl_TIME_MODULE_INDICATOR): Likewise.
95428         * m4/unistd_h.m4 (gl_UNISTD_MODULE_INDICATOR): Likewise.
95429         * m4/wchar_h.m4 (gl_WCHAR_MODULE_INDICATOR): Likewise.
95431 2010-03-27  Bruno Haible  <bruno@clisp.org>
95433         Fix a compilation error on Cygwin with g++ >= 4.3.
95434         * lib/sys_stat.in.h (lchmod): Don't warn about the use of this function
95435         if it is undefined or if we alias it to chmod.
95436         (lstat): Don't warn about the use of this function if it is undefined
95437         or if we alias it to stat.
95438         Reported by Simon Josefsson.
95440 2010-03-27  Bruno Haible  <bruno@clisp.org>
95442         * m4/getlogin.m4 (gl_FUNC_GETLOGIN): Renamed from gl_GETLOGIN.
95443         * modules/getlogin (configure.ac): Update.
95445         * m4/getlogin_r.m4 (gl_FUNC_GETLOGIN_R): Renamed from gl_GETLOGIN_R.
95446         * modules/getlogin_r (configure.ac): Update.
95448         * m4/inet_ntop.m4 (gl_FUNC_INET_NTOP): Renamed from gl_INET_NTOP.
95449         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Update.
95450         * modules/inet_ntop (configure.ac): Update.
95452         * m4/inet_pton.m4 (gl_FUNC_INET_PTON): Renamed from gl_INET_PTON.
95453         * modules/inet_pton (configure.ac): Update.
95455         * m4/mbslen.m4 (gl_FUNC_MBSLEN): Renamed from gl_MBSLEN.
95456         * modules/mbslen (configure.ac): Update.
95458         * m4/pty.m4 (gl_FUNC_FORKPTY): Renamed from gl_FORKPTY.
95459         (gl_FUNC_OPENPTY): Renamed from gl_OPENPTY.
95460         * modules/forkpty (configure.ac): Update.
95461         * modules/openpty (configure.ac): Update.
95463 2010-03-26  Simon Josefsson  <simon@josefsson.org>
95465         * top/maint.mk (sc_texinfo_acronym): Don't infloop if there is
95466         no *.texi files.  Reported by Eric Blake <eblake@redhat.com>.
95468 2010-03-25  Eric Blake  <eblake@redhat.com>
95470         maint: use pragma consistently across replacement headers
95471         * lib/ctype.in.h (system_header): Hoist for consistent placement.
95472         * lib/dirent.in.h (system_header): Likewise.
95473         * lib/errno.in.h (system_header): Likewise.
95474         * lib/float.in.h (system_header): Likewise.
95475         * lib/getopt.in.h (system_header): Likewise.
95476         * lib/iconv.in.h (system_header): Likewise.
95477         * lib/inttypes.in.h (system_header): Likewise.
95478         * lib/langinfo.in.h (system_header): Likewise.
95479         * lib/locale.in.h (system_header): Likewise.
95480         * lib/math.in.h (system_header): Likewise.
95481         * lib/netdb.in.h (system_header): Likewise.
95482         * lib/netinet_in.in.h (system_header): Likewise.
95483         * lib/pty.in.h (system_header): Likewise.
95484         * lib/sched.in.h (system_header): Likewise.
95485         * lib/se-selinux.in.h (system_header): Likewise.
95486         * lib/search.in.h (system_header): Likewise.
95487         * lib/spawn.in.h (system_header): Likewise.
95488         * lib/stdarg.in.h (system_header): Likewise.
95489         * lib/stdint.in.h (system_header): Likewise.
95490         * lib/string.in.h (system_header): Likewise.
95491         * lib/strings.in.h (system_header): Likewise.
95492         * lib/sys_file.in.h (system_header): Likewise.
95493         * lib/sys_ioctl.in.h (system_header): Likewise.
95494         * lib/sys_socket.in.h (system_header): Likewise.
95495         * lib/sys_times.in.h (system_header): Likewise.
95496         * lib/sys_utsname.in.h (system_header): Likewise.
95497         * lib/sys_wait.in.h (system_header): Likewise.
95498         * lib/sysexits.in.h (system_header): Likewise.
95499         * lib/unistd.in.h (system_header): Likewise.
95500         * lib/wctype.in.h (system_header): Likewise.
95502         arpa/inet: fix mingw compilation warning
95503         * lib/arpa_inet.in.h (system_header): Hoist to be unconditional.
95504         Reported by Matthew Bolte.
95506 2010-03-25  Bruno Haible  <bruno@clisp.org>
95508         Avoid collision between gnulib wrapper and libintl wrapper.
95509         * lib/printf.c (printf): Don't define if a printf wrapper is already
95510         defined in intl/printf.c.
95511         Reported by Michel Boaventura <michel@michelboaventura.com>.
95513 2010-03-25  Bruno Haible  <bruno@clisp.org>
95515         Use ANSI C.
95516         * lib/readutmp.h (getutent): Provide ANSI C prototype.
95518 2010-03-25  Bruno Haible  <bruno@clisp.org>
95520         Minor formatting changes.
95521         * lib/acosl.c: Insert space before function argument list.
95522         * lib/argz.c: Likewise.
95523         * lib/asinl.c: Likewise.
95524         * lib/expl.c: Likewise.
95525         * lib/gen-uni-tables.c: Likewise.
95526         * lib/gettext.h: Likewise.
95527         * lib/glthread/lock.h: Likewise.
95528         * lib/tanl.c: Likewise.
95529         * lib/uniname/uniname.c: Likewise.
95530         * tests/test-idpriv-drop.c: Likewise.
95531         * tests/test-idpriv-droptemp.c: Likewise.
95532         * tests/test-lock.c: Likewise.
95533         * tests/test-tls.c: Likewise.
95534         * lib/argp-help.c: Insert space before function-like macro argument
95535         list.
95536         * lib/memcmp.c: Likewise.
95537         * tests/test-base64.c: Likewise.
95538         * lib/localename.c: Insert space before sizeof's argument list.
95539         * lib/safe-alloc.h: Likewise.
95540         * lib/file-set.h: Insert space before macro argument list.
95541         * tests/test-argp.c: Likewise.
95542         * lib/argp-namefrob.h: Insert space before function parameter list.
95543         * lib/getaddrinfo.c: Likewise.
95544         * lib/netdb.in.h: Likewise.
95545         * lib/parse-duration.h: Likewise.
95546         * lib/parse-duration.c: Likewise.
95547         * lib/poll.c: Likewise.
95548         * lib/select.c: Likewise.
95549         * lib/trim.h: Likewise.
95550         * tests/test-usleep.c: Likewise.
95551         * lib/ldexpl.c: Insert space before function parameter list and before
95552         function argument list.
95553         * lib/logl.c: Likewise.
95554         * lib/sqrtl.c: Likewise.
95555         * lib/trim.c: Likewise.
95556         * lib/cosl.c: Use GNU style indentation. Insert space before function
95557         argument list.
95558         * lib/sinl.c: Likewise.
95559         * lib/tsearch.c: Insert space after 'for'.
95560         Reported by Jim Meyering.
95562 2010-03-23  Pádraig Brady  <P@draigBrady.com>  (tiny change)
95564         * maint.mk (sc_Wundef_boolean): Check for the presence of the
95565         config header before grepping, as it's not present before
95566         autoreconf/configure are run.  Reported by Simon Josefsson.
95568 2010-03-23  Bruno Haible  <bruno@clisp.org>
95570         pt_chown: Make it work with automake < 1.11.
95571         * modules/pt_chown (Makefile.am): Define pkglibexecdir.
95572         Reported by Simon Josefsson.
95574 2010-03-23  Bruno Haible  <bruno@clisp.org>
95576         pt_chown: Don't depend on GPLed modules.
95577         * lib/pt_chown.c: Don't include idpriv.h.
95578         (main): Don't drop privileges.
95579         * modules/pt_chown (Depends-on): Remove idpriv-drop.
95580         Reported by Simon Josefsson.
95582 2010-03-24  Simon Josefsson  <simon@josefsson.org>
95584         * top/maint.mk (sc_texinfo_acronym): Add rule, based on
95585         suggestions from karl@freefriends.org (Karl Berry).
95587 2010-03-22  Eric Blake  <eblake@redhat.com>
95589         gethostname: further tweaks
95590         * lib/unistd.in.h (includes): Only worry about <winsock2.h> if we
95591         are overriding gethostname.
95592         Suggested by Bruno Haible.
95594 2010-03-21  Bruno Haible  <bruno@clisp.org>
95596         Fix comments.
95597         * lib/forkpty.c (rpl_forkpty): Fix comment.
95598         * lib/openpty.c (rpl_openpty): Likewise.
95599         Reported by Eric Blake.
95601 2010-03-22  Eric Blake  <eblake@redhat.com>
95603         gethostname: fix build on mingw
95604         * lib/unistd.in.h (includes): Work around fact that mingw
95605         <winsock2.h> re-includes <unistd.h>, by avoiding any
95606         redeclarations if we are being included by <winsock2.h>.
95607         Reported by Matthias Bolte.
95609 2010-03-21  Bruno Haible  <bruno@clisp.org>
95611         forkpty: Provide replacement on AIX, HP-UX, IRIX, Solaris.
95612         * lib/forkpty.c (forkpty): New replacement function, from glibc with
95613         modifications.
95614         * lib/pty.in.h (forkpty): Update declaration. Add comments.
95615         * m4/pty.m4 (gl_FORKPTY): If forkpty is not declared, arrange to
95616         provide the replacement.
95617         * modules/forkpty (Depends-on): Add openpty, login_tty.
95618         * m4/pty_h.m4 (gl_PTY_H_DEFAULTS): Initialize HAVE_FORKPTY.
95619         * modules/pty (Makefile.am): Substitute HAVE_FORKPTY.
95620         * doc/glibc-functions/forkpty.texi: More supported platforms.
95621         * config/srclist.txt: Add forkpty.c (commented).
95623 2010-03-21  Bruno Haible  <bruno@clisp.org>
95625         * modules/forkpty-tests: Use the common TEMPLATE-TESTS.
95626         (Makefile.am): Verify that PTY_LIB is defined.
95628         * modules/openpty-tests: Use the common TEMPLATE-TESTS.
95630 2010-03-21  Bruno Haible  <bruno@clisp.org>
95632         Tests for module 'login_tty'.
95633         * modules/login_tty-tests: New file.
95634         * tests/test-login_tty.c: New file.
95636         New module 'login_tty'.
95637         * lib/login_tty.c: New file.
95638         * m4/pty.m4 (gl_FUNC_LOGIN_TTY): New macro.
95639         * modules/login_tty: New file.
95640         * doc/glibc-functions/login_tty.texi: Mention the new module.
95642 2010-03-21  Bruno Haible  <bruno@clisp.org>
95644         login_tty: Documentation.
95645         * doc/glibc-functions/login_tty.texi: New file.
95646         * doc/gnulib.texi (Glibc <utmp.h>): Include it.
95648 2010-03-21  Bruno Haible  <bruno@clisp.org>
95650         pty: Consistent macro naming.
95651         * m4/pty_h.m4 (gl_PTY_H): Renamed from gl_PTY.
95652         * m4/pty.m4 (gl_FORKPTY, gl_OPENPTY): Update.
95653         * modules/pty (configure.ac): Update.
95655 2010-03-21  Bruno Haible  <bruno@clisp.org>
95657         Tests for openpty: Make stricter.
95658         * tests/test-openpty.c (main): Add test of canonical processing and
95659         erase.
95660         * modules/openpty-tests (Makefile.am): Verify that PTY_LIB is defined.
95662         openpty: Provide replacement on AIX, HP-UX, IRIX, Solaris.
95663         * lib/openpty.c (openpty): New replacement function.
95664         * lib/pty.in.h: Include <termios.h>.
95665         (openpty): Update declaration. Add comments.
95666         * m4/pty.m4 (gl_OPENPTY): Require AC_USE_SYSTEM_EXTENSIONS. If openpty
95667         is not declared, arrange to provide the replacement. Check for _getpty
95668         and posix_openpt.
95669         * modules/openpty (Depends-on): Add extensions, fcntl-h, ioctl.
95670         * m4/pty_h.m4 (gl_PTY_H_DEFAULTS): Initialize HAVE_OPENPTY.
95671         * modules/pty (Makefile.am): Substitute HAVE_OPENPTY.
95672         * modules/pty-tests (test_pty_c___LDADD): New variable.
95673         * doc/glibc-functions/openpty.texi: More supported platforms.
95675 2010-03-21  Bruno Haible  <bruno@clisp.org>
95677         setenv: Tweaks.
95678         * m4/setenv.m4 (gl_FUNC_SETENV_SEPARATE): Include necessary headers in
95679         the test program.
95680         * doc/posix-functions/setenv.texi: Update platforms list.
95682 2010-03-21  Bruno Haible  <bruno@clisp.org>
95684         New module 'unlockpt'.
95685         * lib/unlockpt.c: New file, from glibc with modifications.
95686         * m4/unlockpt.m4: New file.
95687         * modules/unlockpt: New file.
95688         * lib/stdlib.in.h (unlockpt): New declaration.
95689         * m4/stdlib_h.m4 (gl_STDLIB_H): Check whether unlockpt is declared.
95690         (gl_STDLIB_H_DEFAULTS): Initialize GNULIB_UNLOCKPT, HAVE_UNLOCKPT.
95691         * modules/stdlib (Makefile.am): Substitute GNULIB_UNLOCKPT,
95692         HAVE_UNLOCKPT.
95693         * doc/posix-functions/unlockpt.texi: Mention the new module.
95694         * tests/test-stdlib-c++.cc: Check GNULIB_NAMESPACE::unlockpt.
95695         * config/srclist.txt: Add unlockpt.c (commented).
95697 2010-03-21  Jim Meyering  <meyering@redhat.com>
95699         maint.mk: prohibit inclusion of "intprops.h" without use
95700         * top/maint.mk (sc_prohibit_intprops_without_use): New rule.
95702 2010-03-21  Bruno Haible  <bruno@clisp.org>
95704         New module 'grantpt'.
95705         * lib/grantpt.c: New file, from glibc with modifications.
95706         * m4/grantpt.m4: New file.
95707         * modules/grantpt: New file.
95708         * lib/stdlib.in.h (grantpt): New declaration.
95709         * m4/stdlib_h.m4 (gl_STDLIB_H): Check whether grantpt is declared.
95710         (gl_STDLIB_H_DEFAULTS): Initialize GNULIB_GRANTPT, HAVE_GRANTPT.
95711         * modules/stdlib (Makefile.am): Substitute GNULIB_GRANTPT,
95712         HAVE_GRANTPT.
95713         * doc/posix-functions/grantpt.texi: Mention the new module.
95714         * tests/test-stdlib-c++.cc: Check GNULIB_NAMESPACE::grantpt.
95715         * config/srclist.txt: Add grantpt.c (commented).
95717 2010-03-21  Bruno Haible  <bruno@clisp.org>
95719         New module 'pt_chown'.
95720         * lib/pt_chown.c: New file, from glibc with modifications.
95721         * lib/pty-private.h: New file, from glibc with modifications.
95722         * modules/pt_chown: New file.
95723         * config/srclist.txt: Add pt_chown.c, pty-private.h (commented).
95725 2010-03-21  Bruno Haible  <bruno@clisp.org>
95727         Tests for module 'ptsname'.
95728         * modules/ptsname-tests: New file.
95729         * tests/test-ptsname.c: New file.
95731         New module 'ptsname'.
95732         * lib/ptsname.c: New file, from glibc with modifications.
95733         * m4/ptsname.m4: New file.
95734         * modules/ptsname: New file.
95735         * lib/stdlib.in.h (ptsname): New declaration.
95736         * m4/stdlib_h.m4 (gl_STDLIB_H): Check whether ptsname is declared.
95737         (gl_STDLIB_H_DEFAULTS): Initialize GNULIB_PTSNAME, HAVE_PTSNAME.
95738         * modules/stdlib (Makefile.am): Substitute GNULIB_PTSNAME,
95739         HAVE_PTSNAME.
95740         * doc/posix-functions/ptsname.texi: Mention the new module.
95741         * tests/test-stdlib-c++.cc: Check GNULIB_NAMESPACE::ptsname.
95742         * config/srclist.txt: Add ptsname.c (commented).
95744 2010-03-21  Bruno Haible  <bruno@clisp.org>
95746         Tests for module 'ttyname_r'.
95747         * modules/ttyname_r-tests: New file.
95748         * tests/test-ttyname_r.c: New file.
95750         New module 'ttyname_r'.
95751         * lib/ttyname_r.c: New file.
95752         * m4/ttyname_r.m4: New file.
95753         * modules/ttyname_r: New file.
95754         * lib/unistd.in.h (ttyname_r): New declaration.
95755         * m4/unistd_h.m4 (gl_UNISTD_H): Check whether ttyname_r is declared.
95756         (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_TTYNAME_R, HAVE_TTYNAME_R.
95757         * modules/unistd (Makefile.am): Substitute GNULIB_TTYNAME_R,
95758         HAVE_TTYNAME_R.
95759         * tests/test-unistd-c++.cc: Check GNULIB_NAMESPACE::ttyname_r.
95760         * doc/posix-functions/ttyname_r.texi: Mention the new module.
95762 2010-03-20  Bruno Haible  <bruno@clisp.org>
95764         signal: Undefine macro definitions in C++ mode.
95765         * lib/signal.in.h (sigismember, sigemptyset, sigaddset, sigdelset,
95766         sigfillset): Undefine macro definitions from the system header in C++
95767         mode.
95768         Reported by John W. Eaton <jwe@gnu.org>.
95770 2010-03-20  Bruno Haible  <bruno@clisp.org>
95772         Ensure no #include statements inside extern "C" { ... }.
95773         * lib/obstack.h: Shrink extern "C" { ... } region so that it does not
95774         contain #include statements.
95775         * lib/time.in.h: Likewise.
95777 2010-03-20  Bruno Haible  <bruno@clisp.org>
95779         Make _GL_WARN_ON_USE usable in C++ and C mode in the same compilation.
95780         * build-aux/warn-on-use.h (_GL_WARN_EXTERN_C): New macro.
95781         (_GL_WARN_ON_USE, _GL_WARN_ON_USE_CXX): Likewise.
95782         Reported by John W. Eaton <jwe@gnu.org>.
95784 2010-03-20  Bruno Haible  <bruno@clisp.org>
95786         * m4/unlink.m4 (gl_FUNC_UNLINK): Fix last commit.
95787         Reported by Jim Meyering.
95789 2010-03-20  Bruno Haible  <bruno@clisp.org>
95791         pipe: Set errno upon failure.
95792         * lib/pipe.h: Specify that when -1 is returned, errno is set.
95793         * lib/pipe.c (create_pipe): Set errno when returning -1. Use the right
95794         errno value in error message.
95796 2010-03-20  Bruno Haible  <bruno@clisp.org>
95797             Jim Meyering  <meyering@redhat.com>
95799         lchown: Avoid "unused variable" warning.
95800         * lib/lchown.c (rpl_lchown): Move variable 'st' into #if block.
95802 2010-03-20  Bruno Haible  <bruno@clisp.org>
95804         Work around unlink() bug on MacOS X 10.5.6.
95805         * lib/unlink.c (rpl_unlink): If UNLINK_PARENT_BUG is defined, fail when
95806         attempting to unlink a parent directory.
95807         * m4/unlink.m4 (gl_FUNC_UNLINK): Require AC_CANONICAL_HOST. Test for
95808         MacOS X 10.5 bug. If the bug is present, define UNLINK_PARENT_BUG and
95809         activate for the replacement function.
95810         * doc/posix-functions/unlink.texi: Mention the MacOS X 10.5 bug.
95812 2010-03-20  Bruno Haible  <bruno@clisp.org>
95814         Fix link errors on Solaris 8.
95815         * modules/dirent-tests (test_dirent_c___LDADD): Add LIB_NANOSLEEP.
95816         * modules/wctype-tests (test_wctype_c___LDADD): Likewise.
95818 2010-03-19  Jim Meyering  <meyering@redhat.com>
95820         regcomp.c: make non-_LIBC implementation of build_range_exp consistent
95821         The _LIBC implementation of build_range_exp correctly honors the
95822         RE_NO_EMPTY_RANGES flag when checking for reversed range endpoints.
95823         However, the non-_LIBC implementation would ignore that syntax-bit
95824         flag and return REG_ERANGE unconditionally.
95825         This change makes it honor that flag.
95826         * lib/regcomp.c (build_range_exp) [!_LIBC]: Add a parameter: "syntax".
95827         Make two pointer parameters "const".
95828         Use "syntax" bits in order to honor RE_NO_EMPTY_RANGES.
95829         (parse_bracket_exp): Update caller.
95831         regex.m4: correct the reversed range endpoint ([b-a]) test
95832         * m4/regex.m4: When requiring that [b-a] evoke failure,
95833         use RE_NO_EMPTY_RANGES.  This makes this entire configure-time
95834         test pass once again for x86-based systems.
95836 2010-03-19  Bruno Haible  <bruno@clisp.org>
95838         scandir: Fix link error on Solaris 8.
95839         * lib/scandir.c (_D_EXACT_NAMLEN, _D_ALLOC_NAMLEN): New fallback
95840         macros.
95842 2010-03-19  Bruno Haible  <bruno@clisp.org>
95844         getusershell: Fix documentation.
95845         * doc/glibc-functions/endusershell.texi: Refer to the getusershell
95846         module.
95847         * doc/glibc-functions/setusershell.texi: Likewise.
95849         getusershell: Provide declaration, missing on Solaris 9.
95850         * lib/unistd.in.h (getusershell, setusershell, endusershell): Declare
95851         also if HAVE_GETUSERSHELL && !HAVE_DECL_GETUSERSHELL.
95852         * m4/getusershell.m4 (gl_FUNC_GETUSERSHELL): When the function exists,
95853         check whether it is declared. Set HAVE_DECL_GETUSERSHELL.
95854         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize
95855         HAVE_DECL_GETUSERSHELL, not HAVE_GETUSERSHELL.
95856         * modules/unistd (Makefile.am): Substitute HAVE_DECL_GETUSERSHELL, not
95857         HAVE_GETUSERSHELL.
95858         * doc/glibc-functions/getusershell.texi: Mention the Solaris problem.
95860 2010-03-19  Bruno Haible  <bruno@clisp.org>
95862         wctype: Provide iswblank function.
95863         * lib/wctype.in.h (iswblank): Provide a replacement also when iswcntrl
95864         exists and is fine.
95865         * m4/wctype_h.m4 (gl_WCTYPE_H): Also check whether iswcntrl exists.
95866         * modules/wctype (Makefile.am): Substitute HAVE_ISWBLANK.
95867         * tests/test-wctype.c (main): Re-enable the iswblank tests.
95868         * doc/posix-functions/iswblank.texi: Update.
95870 2010-03-19  Bruno Haible  <bruno@clisp.org>
95872         Tests of module 'pty' in C++ mode.
95873         * modules/pty-tests: New file.
95874         * tests/test-pty-c++.cc: New file.
95875         * m4/pty_h.m4 (gl_PTY_MODULE_INDICATOR): Invoke gl_MODULE_INDICATOR.
95877 2010-03-19  Eric Blake  <eblake@redhat.com>
95879         logb: fix documentation
95880         * doc/posix-functions/logb.texi (logb): Gnulib fixes the cygwin
95881         1.5 declaration bug.
95883         forkpty, openpty: prefer glibc's const-safe prototype
95884         * lib/forkpty.c (rpl_forkpty): New file.
95885         * lib/openpty.c (rpl_openpty): Likewise.
95886         * modules/forkpty (Files): Distribute it.
95887         * modules/openpty (Files): Likewise.
95888         * m4/pty_h.m4 (gl_PTY_H_DEFAULTS): Add new witnesses.  Move decl
95889         check...
95890         * m4/pty.m4 (gl_FORKPTY, gl_OPENPTY): ...here.  Request
95891         replacement for non-const BSD signature.
95892         * modules/pty (Makefile.am): Substitute witnesses.
95893         * lib/pty.in.h (forkpty, openpty): Declare replacements.
95894         * tests/test-forkpty.c: Update signature check.
95895         * tests/test-openpty.c: Likewise.
95896         * doc/glibc-functions/forkpty.texi (forkpty): Document the fix.
95897         * doc/glibc-functions/openpty.texi (openpty): Likewise.
95899         forkpty, openpty: split functions into new modules
95900         * modules/pty (Makefile.am): Substitute new witnesses.
95901         (Libraries): Move library detection...
95902         * modules/forkpty: ...into new module.
95903         * modules/openpty: Another new module.
95904         * modules/pty-tests: Rename and split...
95905         * modules/forkpty-tests: ...to this...
95906         * modules/openpty-tests: ...and this.
95907         * tests/test-pty.c: Rename and split...
95908         * tests/test-forkpty.c: ...to this...
95909         * tests/test-openpty.c: ...and this.
95910         * m4/pty_h.m4 (gl_PTY_H_DEFAULTS): Add new witnesses.
95911         (gl_PTY): Split library searching...
95912         * m4/pty.m4 (gl_PTY_LIB): ...into new file.
95913         (gl_FORKPTY, gl_OPENPTY): New macros.
95914         * lib/pty.in.h (forkpty, openpty): Honor new witnesses.
95915         * NEWS: Mention the split.
95916         * MODULES.html.sh (Misc): Document the modules.
95917         * doc/glibc-functions/forkpty.texi (forkpty): Likewise.
95918         * doc/glibc-functions/openpty.texi (openpty): Likewise.
95920         pty: improve replacement header
95921         * lib/pty.in.h: New file.
95922         * modules/pty (Files): Ship it.
95923         (Makefile.am): Always build replacement.
95924         * m4/pty.m4: Rename...
95925         * m4/pty_h.m4: ...to this.
95926         (gl_PTY): Modernize setting of witness macros; update check of
95927         forkpty to take proper advantage of cache.
95928         (gl_PTY_MODULE_INDICATOR, gl_PTY_H_DEFAULTS): New macros.
95930         getopt: avoid compiler warning
95931         * lib/getopt.c (attribute_hidden): Remove unused macro.
95933 2010-03-18  Bruno Haible  <bruno@clisp.org>
95935         Fix link errors on Solaris 8.
95936         * modules/iconv-h-tests (test_iconv_h_c___LDADD): Add LIB_NANOSLEEP.
95937         * modules/search-tests (test_search_c___LDADD): Likewise.
95938         * modules/signal-tests (test_signal_c___LDADD): Likewise.
95939         * modules/spawn-tests (test_spawn_c___LDADD): Likewise.
95940         * modules/stdio-tests (test_stdio_c___LDADD): Likewise.
95941         * modules/sys_select-tests (test_sys_select_c___LDADD): Likewise.
95942         * modules/sys_socket-tests (test_sys_socket_c___LDADD): Likewise.
95943         * modules/sys_time-tests (test_sys_time_c___LDADD): Likewise.
95944         * modules/wchar-tests (test_wchar_c___LDADD): Likewise.
95946 2010-03-18  Bruno Haible  <bruno@clisp.org>
95948         Fix bug introduced on 2010-03-14.
95949         * m4/spawn_h.m4 (gl_HAVE_POSIX_SPAWN): New macro.
95950         (gl_SPAWN_H): Require it.
95951         * m4/posix_spawn.m4 (gl_POSIX_SPAWN_BODY): Likewise.
95952         Reported by Simon Josefsson.
95954 2010-03-18  Bruno Haible  <bruno@clisp.org>
95956         Fix typo introduced on 2009-12-31.
95957         * m4/spawn_h.m4 (gl_SPAWN_H): Check for the declaration of
95958         posix_spawn_file_actions_adddup2.
95960 2010-03-17  Bert Wesarg  <bert.wesarg@googlemail.com>  (tiny change)
95961         and Eric Blake  <eblake@redhat.com>
95963         test-vc-list-files-git: make more robust
95964         * tests/test-vc-list-files-git.sh: Unset problematic environment
95965         variables.  Chain commands together.
95967 2010-03-17  Ludovic Courtès  <ludo@gnu.org>  (tiny change)
95969         * m4/pty.m4: Unset $ac_cv_have_decl_forkpty before the second
95970         `AC_CHECK_DECL' invocation.
95972 2010-03-15  Sergey Poznyakoff  <gray@gnu.org.ua>
95974         * lib/inttostr.c (inttostr): Make sure the invocation of verify
95975         appears before executable statements. Suggested by Petr Sumbera
95976         <Petr.Sumbera@Sun.COM>.
95978 2010-03-14  Bruno Haible  <bruno@clisp.org>
95980         * tests/test-flock.c (test_exclusive): Comment out a test that causes
95981         portability problems. Instead use a simpler test.
95982         (main): Check that invalid arguments are rejected only on Linux.
95984 2010-03-14  Bruno Haible  <bruno@clisp.org>
95986         Fix bug introduced on 2009-12-31.
95987         * m4/sys_select_h.m4 (gl_HEADER_SYS_SELECT): Invoke
95988         gl_PREREQ_SYS_H_WINSOCK2 always.
95989         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Likewise. Remove
95990         SYS_SOCKET_H variable.
95991         * m4/sys_file_h.m4 (gl_HEADER_SYS_FILE_H): Remove test for flock.
95992         Update comments.
95993         * m4/ctype.m4 (gl_CTYPE_H): Update comments.
95994         * m4/langinfo_h.m4 (gl_LANGINFO_H): Likewise.
95995         * m4/sys_times_h.m4 (gl_SYS_TIMES_H): Likewise.
95996         * m4/sys_utsname_h.m4 (gl_SYS_UTSNAME_H): Likewise.
95997         * m4/sys_wait_h.m4 (gl_SYS_WAIT_H): Likewise.
95999 2010-03-14  Bruno Haible  <bruno@clisp.org>
96001         Fix values returned by sinl, cosl.
96002         * lib/trigl.h: Add specification comments.
96003         * lib/sincosl.c (kernel_sinl, kernel_cosl): Fix comments and formula
96004         that combines the values from the precomputed table with the values of
96005         the Chebyshev polynomials.
96007 2010-03-14  Bruno Haible  <bruno@clisp.org>
96009         Fix compilation error when modules 'posix_spawn[p]' are not used.
96010         * m4/spawn_h.m4 (gl_SPAWN_H): Set HAVE_POSIX_SPAWN here.
96011         * m4/posix_spawn.m4 (gl_POSIX_SPAWN_BODY): ... not here.
96013 2010-03-14  Bruno Haible  <bruno@clisp.org>
96015         Fix compilation error on mingw when module 'time_r' is not used.
96016         * lib/time.in.h (localtime_r, gmtime_r): Declare only if GNULIB_TIME_R
96017         is 1.
96018         * tests/test-time-c++.cc (localtime_r, gmtime_r): Likewise.
96019         * modules/time_r (configure.ac): Invoke gl_TIME_MODULE_INDICATOR.
96020         * modules/time (Makefile.am): Substitute GNULIB_TIME_R.
96021         * m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS): Initialize GNULIB_TIME_R.
96023 2010-03-14  Bruno Haible  <bruno@clisp.org>
96025         Fix compilation error with Sun C.
96026         * lib/strtol.c: Use LLONG_MIN instead of GCC specific LONG_LONG_MIN.
96027         Use LLONG_MAX instead of GCC specific LONG_LONG_MAX. Use ULLONG_MAX
96028         instead of GCC specific ULONG_LONG_MAX.
96029         * lib/xstrtoll.c: Likewise.
96030         * lib/xstrtoull.c: Likewise.
96032 2010-03-13  Bruno Haible  <bruno@clisp.org>
96034         Allow the user to disable C++ code and tests.
96035         * m4/ansi-c++.m4 (gl_CXX_CHOICE): New macro.
96036         (gl_PROG_ANSI_CXX): Require it.
96038 2010-03-13  Bruno Haible  <bruno@clisp.org>
96040         * DEPENDENCIES (libtool): Mention libtool 2.2.x requirement in special
96041         cases.
96043 2010-03-13  Bruno Haible  <bruno@clisp.org>
96045         Test that gnulib does not break the standard C++ headers.
96046         * tests/test-locale-c++2.cc: New file.
96047         * modules/locale-tests (Files): Add it.
96048         (Makefile.am): Compile it for test-locale-c++.
96049         * tests/test-math-c++2.cc: New file.
96050         * modules/math-tests (Files): Add it.
96051         (Makefile.am): Compile it for test-math-c++.
96052         * tests/test-signal-c++2.cc: New file.
96053         * modules/signal-tests (Files): Add it.
96054         (Makefile.am): Compile it for test-signal-c++.
96055         * tests/test-stdio-c++2.cc: New file.
96056         * modules/stdio-tests (Files): Add it.
96057         (Makefile.am): Compile it for test-stdio-c++.
96058         * tests/test-stdlib-c++2.cc: New file.
96059         * modules/stdlib-tests (Files): Add it.
96060         (Makefile.am): Compile it for test-stdlib-c++.
96061         * tests/test-string-c++2.cc: New file.
96062         * modules/string-tests (Files): Add it.
96063         (Makefile.am): Compile it for test-string-c++.
96064         * tests/test-time-c++2.cc: New file.
96065         * modules/time-tests (Files): Add it.
96066         (Makefile.am): Compile it for test-time-c++.
96067         Reported by John W. Eaton <jwe@gnu.org>.
96069 2010-03-13  Bruno Haible  <bruno@clisp.org>
96071         * gnulib-tool (func_usage): Clarify which options are available for
96072         --create-testdir and --create-megatestdir.
96074 2010-03-13  Bruno Haible  <bruno@clisp.org>
96076         Fix compilation error with glibc >= 2.10 and g++ >= 4.4.
96077         * build-aux/warn-on-use.h (_GL_WARN_ON_USE_CXX): New macro.
96078         * build-aux/c++defs.h (_GL_CXXALIASWARN1): New macro.
96079         * lib/string.in.h (memchr, memrchr, rawmemchr, strchrnul, strpbrk,
96080         strstr, strcasestr): Use _GL_CXXALIASWARN1 instead of _GL_CXXALIASWARN
96081         when appropriate.
96082         Reported by Jim Meyering.
96084 2010-03-12  Simon Josefsson  <simon@josefsson.org>
96086         * gnulib-tool (func_import): Explain origin of code.
96088 2010-03-12  Bruno Haible  <bruno@clisp.org>
96090         Fix problem with automake's definition of CXXLINK.
96091         * gnulib-tool (func_create_testdir): After LT_INIT, also use LT_LANG.
96092         Reported by Simon Josefsson and Ludovic Courtès.
96094 2010-03-12  Bruno Haible  <bruno@clisp.org>
96096         * doc/gnulib-intro.texi (Steady Development): Mention Ian Beckwith's
96097         stable releases.
96099 2010-03-11  Bruno Haible  <bruno@clisp.org>
96101         Fix problems with overloaded C++ definitions of memchr, strpbrk, etc.
96102         * build-aux/c++defs.h (_GL_CXXALIAS_SYS_CAST2): Make it work regardless
96103         whether the system provides one variant or multiple variants of the
96104         function.
96105         * lib/string.in.h (memchr, strpbrk): Use _GL_CXXALIAS_SYS_CAST2 for all
96106         C++ compilers.
96107         (memrchr, rawmemchr, strchrnul, strstr, strcasestr): Use
96108         _GL_CXXALIAS_SYS_CAST2 instead of _GL_CXXALIAS_SYS.
96109         Reported by Jim Meyering.
96111 2010-03-09  Simon Josefsson  <simon@josefsson.org>
96113         * gnulib-tool (LIBTOOLPATH): Fix cut'n'paste bug.
96115 2010-03-08  Bruno Haible  <bruno@clisp.org>
96117         gnulib-tool: Add support for --libtool in --create-testdir.
96118         * gnulib-tool (LIBTOOLPATH, LIBTOOLIZE): New variables.
96119         (func_create_testdir): Emit LT_INIT invocations. Invoke LIBTOOLIZE.
96121 2010-03-08  Eric Blake  <eblake@redhat.com>
96123         gnulib-tool.texi: mention possibility of git submodule
96124         * doc/gnulib-tool.texi (VCS Issues): Add details about using git
96125         submodules.
96126         * doc/.gitignore: Ignore another generated file.
96128 2010-03-08  Karl Berry  <karl@gnu.org>
96130         * doc/gnulib-tool.texi (VCS Issues): Mention third option
96131         of committing gnulib files while skipping others.
96133 2010-03-07  Bruno Haible  <bruno@clisp.org>
96135         Tests of module 'wctype' in C++ mode.
96136         * tests/test-wctype-c++.cc: New file.
96137         * modules/wctype-tests (Files): Add it and tests/signature.h.
96138         (Depends-on): Add ansi-c++-opt.
96139         (Makefile.am): Arrange to compile and run test-wctype-c++.
96141         Tests of module 'wchar' in C++ mode.
96142         * tests/test-wchar-c++.cc: New file.
96143         * modules/wchar-tests (Files): Add it and tests/signature.h.
96144         (Depends-on): Add ansi-c++-opt.
96145         (Makefile.am): Arrange to compile and run test-wchar-c++.
96146         * m4/wchar_h.m4 (gl_WCHAR_MODULE_INDICATOR): Invoke
96147         gl_MODULE_INDICATOR.
96149         Tests of module 'unistd' in C++ mode.
96150         * tests/test-unistd-c++.cc: New file.
96151         * modules/unistd-tests (Files): Add it and tests/signature.h.
96152         (Depends-on): Add ansi-c++-opt.
96153         (Makefile.am): Arrange to compile and run test-unistd-c++.
96154         * m4/unistd_h.m4 (gl_UNISTD_MODULE_INDICATOR): Invoke
96155         gl_MODULE_INDICATOR.
96157         Tests of module 'time' in C++ mode.
96158         * tests/test-time-c++.cc: New file.
96159         * modules/time-tests (Files): Add it and tests/signature.h.
96160         (Depends-on): Add ansi-c++-opt.
96161         (Makefile.am): Arrange to compile and run test-time-c++.
96162         * m4/time_h.m4 (gl_TIME_MODULE_INDICATOR): Invoke gl_MODULE_INDICATOR.
96164         Tests of module 'sys_time' in C++ mode.
96165         * tests/test-sys_time-c++.cc: New file.
96166         * modules/sys_time-tests (Files): Add it and tests/signature.h.
96167         (Depends-on): Add ansi-c++-opt.
96168         (Makefile.am): Arrange to compile and run test-sys_time-c++.
96169         * m4/sys_time_h.m4 (gl_SYS_TIME_MODULE_INDICATOR): Invoke
96170         gl_MODULE_INDICATOR.
96172         Tests of module 'sys_stat' in C++ mode.
96173         * tests/test-sys_stat-c++.cc: New file.
96174         * modules/sys_stat-tests (Files): Add it and tests/signature.h.
96175         (Depends-on): Add ansi-c++-opt.
96176         (Makefile.am): Arrange to compile and run test-sys_stat-c++.
96177         * m4/sys_stat_h.m4 (gl_SYS_STAT_MODULE_INDICATOR): Invoke
96178         gl_MODULE_INDICATOR.
96180         Tests of module 'sys_socket' in C++ mode.
96181         * tests/test-sys_socket-c++.cc: New file.
96182         * modules/sys_socket-tests (Files): Add it and tests/signature.h.
96183         (Depends-on): Add ansi-c++-opt.
96184         (Makefile.am): Arrange to compile and run test-sys_socket-c++.
96185         * m4/sys_socket_h.m4 (gl_SYS_SOCKET_MODULE_INDICATOR): Invoke
96186         gl_MODULE_INDICATOR.
96188         Tests of module 'sys_select' in C++ mode.
96189         * tests/test-sys_select-c++.cc: New file.
96190         * modules/sys_select-tests (Files): Add it and tests/signature.h.
96191         (Depends-on): Add ansi-c++-opt.
96192         (Makefile.am): Arrange to compile and run test-sys_select-c++.
96193         * m4/sys_select_h.m4 (gl_SYS_SELECT_MODULE_INDICATOR): Invoke
96194         gl_MODULE_INDICATOR.
96196         Tests of module 'sys_ioctl' in C++ mode.
96197         * tests/test-sys_ioctl-c++.cc: New file.
96198         * modules/sys_ioctl-tests (Files): Add it and tests/signature.h.
96199         (Depends-on): Add ansi-c++-opt.
96200         (Makefile.am): Arrange to compile and run test-sys_ioctl-c++.
96201         * m4/sys_ioctl_h.m4 (gl_SYS_IOCTL_MODULE_INDICATOR): Invoke
96202         gl_MODULE_INDICATOR.
96204         Tests of module 'string' in C++ mode.
96205         * tests/test-string-c++.cc: New file.
96206         * modules/string-tests (Files): Add it and tests/signature.h.
96207         (Depends-on): Add ansi-c++-opt.
96208         (Makefile.am): Arrange to compile and run test-string-c++.
96209         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): Invoke
96210         gl_MODULE_INDICATOR.
96212         Tests of module 'stdlib' in C++ mode.
96213         * tests/test-stdlib-c++.cc: New file.
96214         * modules/stdlib-tests (Files): Add it and tests/signature.h.
96215         (Depends-on): Add ansi-c++-opt.
96216         (Makefile.am): Arrange to compile and run test-stdlib-c++.
96217         * m4/stdlib_h.m4 (gl_STDLIB_MODULE_INDICATOR): Invoke
96218         gl_MODULE_INDICATOR.
96220         Tests of module 'stdio' in C++ mode.
96221         * tests/test-stdio-c++.cc: New file.
96222         * modules/stdio-tests (Files): Add it and tests/signature.h.
96223         (Depends-on): Add ansi-c++-opt.
96224         (Makefile.am): Arrange to compile and run test-stdio-c++.
96225         * m4/stdio_h.m4 (gl_STDIO_MODULE_INDICATOR): Invoke
96226         gl_MODULE_INDICATOR.
96228         Tests of module 'spawn' in C++ mode.
96229         * tests/test-spawn-c++.cc: New file.
96230         * modules/spawn-tests (Files): Add it and tests/signature.h.
96231         (Depends-on): Add ansi-c++-opt.
96232         (Makefile.am): Arrange to compile and run test-spawn-c++.
96233         * m4/spawn_h.m4 (gl_SPAWN_MODULE_INDICATOR): Invoke
96234         gl_MODULE_INDICATOR.
96236         Tests of module 'signal' in C++ mode.
96237         * tests/test-signal-c++.cc: New file.
96238         * modules/signal-tests (Files): Add it and tests/signature.h.
96239         (Depends-on): Add ansi-c++-opt.
96240         (Makefile.am): Arrange to compile and run test-signal-c++.
96241         * m4/signal_h.m4 (gl_SIGNAL_MODULE_INDICATOR): Invoke
96242         gl_MODULE_INDICATOR.
96244         Tests of module 'search' in C++ mode.
96245         * tests/test-search-c++.cc: New file.
96246         * modules/search-tests (Files): Add it and tests/signature.h.
96247         (Depends-on): Add ansi-c++-opt.
96248         (Makefile.am): Arrange to compile and run test-search-c++.
96249         * m4/search_h.m4 (gl_SEARCH_MODULE_INDICATOR): Invoke
96250         gl_MODULE_INDICATOR.
96252         Tests of module 'math' in C++ mode.
96253         * tests/test-math-c++.cc: New file.
96254         * modules/math-tests (Files): Add it and tests/signature.h.
96255         (Depends-on): Add ansi-c++-opt.
96256         (Makefile.am): Arrange to compile and run test-math-c++.
96257         * m4/math_h.m4 (gl_MATH_MODULE_INDICATOR): Invoke gl_MODULE_INDICATOR.
96259         Tests of module 'locale' in C++ mode.
96260         * tests/test-locale-c++.cc: New file.
96261         * modules/locale-tests (Files): Add it and tests/signature.h.
96262         (Depends-on): Add ansi-c++-opt.
96263         (Makefile.am): Arrange to compile and run test-locale-c++.
96264         * m4/locale_h.m4 (gl_LOCALE_MODULE_INDICATOR): Invoke
96265         gl_MODULE_INDICATOR.
96267         Tests of module 'langinfo' in C++ mode.
96268         * tests/test-langinfo-c++.cc: New file.
96269         * modules/langinfo-tests (Files): Add it and tests/signature.h.
96270         (Depends-on): Add ansi-c++-opt.
96271         (Makefile.am): Arrange to compile and run test-langinfo-c++.
96272         * m4/langinfo_h.m4 (gl_LANGINFO_MODULE_INDICATOR): Invoke
96273         gl_MODULE_INDICATOR.
96275         Tests of module 'iconv-h' in C++ mode.
96276         * tests/test-iconv-h-c++.cc: New file.
96277         * modules/iconv-h-tests (Files): Add it and tests/signature.h.
96278         (Depends-on): Add ansi-c++-opt.
96279         (Makefile.am): Arrange to compile and run test-iconv-h-c++.
96281         Tests of module 'glob' in C++ mode.
96282         * tests/test-glob-c++.cc: New file.
96283         * modules/glob-tests (Files): Add it.
96284         (Depends-on): Add ansi-c++-opt.
96285         (Makefile.am): Arrange to compile and run test-glob-c++.
96287         Tests of module 'fcntl-h' in C++ mode.
96288         * tests/test-fcntl-h-c++.cc: New file.
96289         * modules/fcntl-h-tests (Files): Add it and tests/signature.h.
96290         (Depends-on): Add ansi-c++-opt.
96291         (Makefile.am): Arrange to compile and run test-fcntl-h-c++.
96292         * m4/fcntl_h.m4 (gl_FCNTL_MODULE_INDICATOR): Invoke
96293         gl_MODULE_INDICATOR.
96295         Tests of module 'dirent' in C++ mode.
96296         * tests/test-dirent-c++.cc: New file.
96297         * modules/dirent-tests (Files): Add it and tests/signature.h.
96298         (Depends-on): Add ansi-c++-opt.
96299         (Makefile.am): Arrange to compile and run test-dirent-c++.
96300         * m4/dirent_h.m4 (gl_DIRENT_MODULE_INDICATOR): Invoke
96301         gl_MODULE_INDICATOR.
96303         New module 'ansi-c++-opt'.
96304         * modules/ansi-c++-opt: New file.
96305         * m4/ansi-c++.m4: New file, from GNU gettext with modifications.
96307         Document C++ namespace mode.
96308         * doc/gnulib.texi (A C++ namespace for gnulib): New section.
96310         wctype: Avoid #define replacements in C++ mode.
96311         * lib/wctype.in.h: Include c++defs.h, warn-on-use.h.
96312         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph, iswlower,
96313         iswprint, iswpunct, iswspace, iswupper, iswxdigit, towlower, towupper):
96314         In C++, define a namespaced alias symbol.
96315         * m4/wctype_h.m4 (gl_WCTYPE_H): Don't set WCTYPE_H.
96316         * modules/wctype (Depends-on): Add c++defs, warn-on-use.
96317         (Makefile.am): Provide a wctype.h replacement always. Update wctype.h
96318         rule.
96320         wchar: Avoid #define replacements in C++ mode.
96321         * lib/wchar.in.h: Include c++defs.h.
96322         (btowc, wctob, mbsinit, mbrtowc, mbrlen, mbsrtowcs, mbsnrtowcs,
96323         wcrtomb, wcsrtombs, wcsnrtombs): In C++, define a namespaced alias
96324         symbol.
96325         (wcwidth): Likewise. Fix prototype to be POSIX compliant.
96326         * modules/wchar (Depends-on): Add c++defs.
96327         (Makefile.am): Update wchar.h rule.
96329         unistd: Avoid #define replacements in C++ mode.
96330         * lib/unistd.in.h: Include c++defs.h.
96331         (chown, close, dup, dup2, dup3, euidaccess, faccessat, fchdir,
96332         fchownat, fsync, ftruncate, getcwd, getdomainname, getdtablesize,
96333         getgroups, gethostname, getlogin, getlogin_r, getpagesize,
96334         getusershell, setusershell, endusershell, lchown, link, linkat, lseek,
96335         pipe2, pread, readlink, readlinkat, rmdir, sleep, symlink, symlinkat,
96336         unlink, unlinkat, usleep, write): In C++, define a namespaced alias
96337         symbol.
96338         (environ): Update.
96339         * modules/unistd (Depends-on): Add c++defs.
96340         (Makefile.am): Update unistd.h rule.
96342         time: Avoid #define replacements in C++ mode.
96343         * lib/time.in.h: Include c++defs.h, warn-on-use.h.
96344         (nanosleep, mktime, localtime_r, gmtime_r, strptime, timegm): In C++,
96345         define a namespaced alias symbol.
96346         * m4/time_h.m4 (gl_TIME_MODULE_INDICATOR): New macro.
96347         (gl_HEADER_TIME_H_DEFAULTS): Initialize also GNULIB_MKTIME,
96348         GNULIB_NANOSLEEP, GNULIB_STRPTIME, GNULIB_TIMEGM.
96349         * modules/time (Depends-on): Add c++defs, warn-on-use.
96350         (Makefile.am): Update time.h rule.
96351         * modules/mktime (configure.ac): Invoke gl_TIME_MODULE_INDICATOR.
96352         * modules/nanosleep (configure.ac): Likewise.
96353         * modules/strptime (configure.ac): Likewise.
96354         * modules/timegm (configure.ac): Likewise.
96356         sys_time: Avoid #define replacements in C++ mode.
96357         * lib/sys_time.in.h: Include c++defs.h.
96358         (gettimeofday): In C++, define a namespaced alias symbol.
96359         * modules/sys_time (Depends-on): Add c++defs.
96360         (Makefile.am): Update sys/time.h rule.
96362         sys_stat: Avoid #define replacements in C++ mode.
96363         * lib/sys_stat.in.h: Include c++defs.h.
96364         (fchmodat, fstat, fstatat, futimens, lchmod, lstat, mkdir, mkdirat,
96365         mkfifo, mkfifoat, mknod, mknodat, utimensat): In C++, define a
96366         namespaced alias symbol.
96367         In C++, define a namespaced alias symbol.
96368         * modules/sys_stat (Depends-on): Add c++defs.
96369         (Makefile.am): Update sys/stat.h rule.
96371         sys_socket: Avoid #define replacements in C++ mode.
96372         * lib/sys_socket.in.h: Handle the case of recursive include on Cygwin.
96373         Include c++defs.h. Include warn-on-use.h earlier. Enable the function
96374         definitions also when the system has a <sys/socket.h>.
96375         (socket, connect, accept, bind, getpeername, getsockname, getsockopt,
96376         listen, recv, send, recvfrom, sendto, setsockopt, shutdown, accept4):
96377         In C++, define a namespaced alias symbol.
96378         * modules/sys_socket (Depends-on): Add c++defs.
96379         (Makefile.am): Update sys/socket.h rule.
96381         sys_select: Avoid #define replacements in C++ mode.
96382         * lib/sys_select.in.h: Include c++defs.h. Enable the function
96383         definitions also when the system has a <sys/select.h>.
96384         (select): In C++, define a namespaced alias symbol.
96385         * modules/sys_select (Depends-on): Add c++defs.
96386         (Makefile.am): Update sys/select.h rule.
96388         sys_ioctl: Avoid #define replacements in C++ mode.
96389         * lib/sys_ioctl.in.h: Include c++defs.h.
96390         (ioctl): In C++, define a namespaced alias symbol.
96391         * modules/sys_ioctl (Depends-on): Add c++defs.
96392         (Makefile.am): Update sys/ioctl.h rule.
96394         string: Avoid #define replacements in C++ mode.
96395         * lib/string.in.h: Include c++defs.h.
96396         (stpncpy): Define to rpl_stpncpy, not gnu_stpncpy.
96397         (memchr, memmem, mempcpy, memrchr, rawmemchr, stpcpy, stpncpy,
96398         strchrnul, strdup, strndup, strnlen, strpbrk, strsep, strstr,
96399         strcasestr, strtok_r, mbslen, mbschr, mbsrchr, mbspbrk, strerror,
96400         strsignal, strverscmp): In C++, define a namespaced alias symbol.
96401         * modules/string (Depends-on): Add c++defs.
96402         (Makefile.am): Update string.h rule.
96404         stdlib: Avoid #define replacements in C++ mode.
96405         * lib/stdlib.in.h: Include c++defs.h.
96406         (atoll, calloc, canonicalize_file_name, getloadavg, getsubopt, malloc,
96407         mkdtemp, mkostemp, mkostemps, mkstemp, mkstemps, putenv, random_r,
96408         srandom_r, initstate_r, setstate_r, realloc, realpath, rpmatch, setenv,
96409         strtod, strtoll, strtoull, unsetenv): In C++, define a namespaced alias
96410         symbol.
96411         * modules/stdlib (Depends-on): Add c++defs.
96412         (Makefile.am): Update stdlib.h rule.
96414         stdio: Avoid #define replacements in C++ mode.
96415         * lib/stdio.in.h: Include c++defs.h.
96416         (dprintf, fclose, fflush, fopen, fprintf, fpurge, fputc, fputs,
96417         freopen, fseek, fseeko, ftell, ftello, fwrite, getdelim, getline,
96418         obstack_printf, obstack_vprintf, perror, popen, printf, fputc, putchar,
96419         puts, remove, rename, renameat, snprintf, sprintf, asprintf, vasprintf,
96420         vdprintf, vfprintf, vprintf, vsnprintf, vsprintf): In C++, define a
96421         namespaced alias symbol.
96422         * modules/stdio (Depends-on): Add c++defs.
96423         (Makefile.am): Update stdio.h rule.
96425         spawn: Avoid #define replacements in C++ mode.
96426         * lib/spawn.in.h: Include c++defs.h.
96427         (posix_spawn, posix_spawnp, posix_spawnattr_init,
96428         posix_spawnattr_destroy, posix_spawnattr_getsigdefault,
96429         posix_spawnattr_setsigdefault, posix_spawnattr_getsigmask,
96430         posix_spawnattr_setsigmask, posix_spawnattr_getflags,
96431         posix_spawnattr_setflags, posix_spawnattr_getpgroup,
96432         posix_spawnattr_setpgroup, posix_spawnattr_getschedpolicy,
96433         posix_spawnattr_setschedpolicy, posix_spawnattr_getschedparam,
96434         posix_spawnattr_setschedparam, posix_spawn_file_actions_init,
96435         posix_spawn_file_actions_destroy, posix_spawn_file_actions_addopen,
96436         posix_spawn_file_actions_addclose, posix_spawn_file_actions_adddup2):
96437         In C++, define a namespaced alias symbol.
96438         * modules/spawn (Depends-on): Add c++defs.
96439         (Makefile.am): Update spawn.h rule.
96441         signal: Avoid #define replacements in C++ mode.
96442         * lib/signal.in.h: Include c++defs.h.
96443         (sigismember, sigemptyset, sigaddset, sigdelset, sigfillset,
96444         sigpending, sigprocmask, signal, raise, sigaction): In C++, define a
96445         namespaced alias symbol.
96446         * modules/signal (Depends-on): Add c++defs.
96447         (Makefile.am): Update signal.h rule.
96449         search: Avoid #define replacements in C++ mode.
96450         * lib/search.in.h: Include c++defs.h.
96451         (_gl_search_compar_fn, _gl_search_action_fn): New types.
96452         (tsearch, tfind, tdelete, twalk): In C++, define a namespaced alias
96453         symbol.
96454         * modules/search (Depends-on): Add c++defs.
96455         (Makefile.am): Update search.h rule.
96457         math: Avoid #define replacements in C++ mode.
96458         * lib/math.in.h: Include c++defs.h.
96459         (frexp, acosl, asinl, atanl, ceilf, ceill, cosl, expl, floorf, floorl,
96460         frexpl, ldexpl, logl, roundf, round, roundl, sinl, sqrtl, tanl, truncf,
96461         trunc, truncl): In C++, define a namespaced alias symbol.
96462         * modules/math (Depends-on): Add c++defs.
96463         (Makefile.am): Update math.h rule.
96465         locale: Avoid #define replacements in C++ mode.
96466         * lib/locale.in.h: Include c++defs.h.
96467         (duplocale): In C++, define a namespaced alias symbol.
96468         * m4/locale_h.m4 (gl_LOCALE_H_DEFAULTS): Initialize HAVE_DUPLOCALE.
96469         * m4/duplocale.m4 (gl_FUNC_DUPLOCALE): Set HAVE_DUPLOCALE.
96470         * modules/locale (Depends-on): Add c++defs.
96471         (Makefile.am): Update locale.h rule. Substitute HAVE_DUPLOCALE.
96473         langinfo: Avoid #define replacements in C++ mode.
96474         * lib/langinfo.in.h: Include c++defs.h.
96475         (nl_langinfo): In C++, define a namespaced alias symbol.
96476         * modules/langinfo (Depends-on): Add c++defs.
96477         (Makefile.am): Update langinfo.h rule.
96479         iconv-h: Avoid #define replacements in C++ mode.
96480         * lib/iconv.in.h: Include c++defs.h, warn-on-use.h.
96481         (iconv_open, iconv, iconv_close): In C++, define a namespaced alias
96482         symbol.
96483         * m4/iconv_open.m4 (gl_FUNC_ICONV_OPEN): Invoke gl_REPLACE_ICONV_H
96484         whenever iconv is present.
96485         * modules/iconv-h (Depends-on): Add c++defs, warn-on-use.
96486         (Makefile.am): Update iconv.h rule.
96488         glob: Avoid #define replacements in C++ mode.
96489         * lib/glob.in.h: Include c++defs.h, warn-on-use.h.
96490         (_gl_glob_errfunc_fn): New type.
96491         (glob, globfree, glob_pattern_p): In C++, define a namespaced alias
96492         symbol.
96493         * modules/glob (Depends-on): Add c++defs, warn-on-use.
96494         (Makefile.am): Update glob.h rule.
96496         fcntl-h: Avoid #define replacements in C++ mode.
96497         * lib/fcntl.in.h: Include c++defs.h.
96498         (fcntl, open, openat): In C++, define a namespaced alias symbol.
96499         * modules/fcntl-h (Depends-on): Add c++defs.
96500         (Makefile.am): Update fcntl.h rule.
96502         dirent: Avoid #define replacements in C++ mode.
96503         * lib/dirent.in.h: Include c++defs.h.
96504         (closedir, fdopendir, opendir, scandir, alphasort): In C++, define a
96505         namespaced alias symbol.
96506         (dirfd): Update declaration.
96507         * modules/dirent (Depends-on): Add c++defs.
96508         (Makefile.am): Update dirent.h rule.
96510         ctype: Make it usable in C++ code.
96511         * lib/ctype.in.h: Include c++defs.h.
96512         (isblank): Declare as extern "C".
96513         * modules/ctype (Depends-on): Add c++defs.
96514         (Makefile.am): Update ctype.h rule.
96516         New module 'c++defs'.
96517         * modules/c++defs: New file.
96518         * build-aux/c++defs.h: New file.
96519         Reported by John W. Eaton <jwe@gnu.org>.
96521 2010-03-07  Bruno Haible  <bruno@clisp.org>
96523         logb: Provide missing declaration for Cygwin.
96524         * lib/math.in.h (logb): New declaration.
96525         * m4/logb.m4: New file.
96526         * modules/logb (Files): Add m4/logb.m4.
96527         (Depends-on): Add math.
96528         (configure.ac): Invoke gl_FUNC_LOGB, gl_MATH_MODULE_INDICATOR.
96529         * m4/math_h.m4 (gl_MATH_H): Check also for logb declaration.
96530         (gl_MATH_H_DEFAULTS): Initialize GNULIB_LOGB, HAVE_DECL_LOGB.
96531         * modules/math (Makefile.am): Substitute GNULIB_LOGB, HAVE_DECL_LOGB.
96532         * doc/posix-functions/logb.texi: Mention the Cygwin bug.
96534 2010-03-07  Bruno Haible  <bruno@clisp.org>
96536         Fix test-cond link error.
96537         * tests/test-cond.c: Include <stdio.h>.
96539 2010-03-07  Bruno Haible  <bruno@clisp.org>
96541         Fix test-dirent-safer link error.
96542         * modules/dirent-safer-tests (Makefile.am): Define
96543         test_dirent_safer_LDADD.
96545 2010-03-07  Bruno Haible  <bruno@clisp.org>
96547         * gnulib-tool (func_create_testdir): Don't use 'lib-ignore' module
96548         among default module list.
96550 2010-03-07  Bruno Haible  <bruno@clisp.org>
96552         Fix link error on platforms with GNU libiconv.
96553         * modules/unistr/u8-strcoll-tests (Makefile): Define
96554         test_u8_strcoll_LDADD.
96555         * modules/unistr/u16-strcoll-tests (Makefile): Define
96556         test_u16_strcoll_LDADD.
96557         * modules/unistr/u32-strcoll-tests (Makefile): Define
96558         test_u32_strcoll_LDADD.
96560 2010-03-07  Bruno Haible  <bruno@clisp.org>
96562         Use POSIX declarations for socket functions.
96563         * lib/sys_socket.in.h (rpl_connect, rpl_accept, rpl_bind,
96564         rpl_getpeername, rpl_getsockname, rpl_recv, rpl_send, rpl_recvfrom,
96565         rpl_sendto): Change declaration to match POSIX.
96566         * lib/connect.c (rpl_connect): Likewise.
96567         * lib/accept.c (rpl_accept): Likewise.
96568         * lib/bind.c (rpl_bind): Likewise.
96569         * lib/getpeername.c (rpl_getpeername): Likewise.
96570         * lib/getsockname.c (rpl_getsockname): Likewise.
96571         * lib/recv.c (rpl_recv): Likewise.
96572         * lib/send.c (rpl_send): Likewise.
96573         * lib/recvfrom.c (rpl_recvfrom): Likewise.
96574         * lib/sendto.c (rpl_sendto): Likewise.
96576 2010-03-06  Bruno Haible  <bruno@clisp.org>
96578         Clarify access, euidaccess, faccessat.
96579         * doc/posix-functions/faccessat.texi: Mention security problem under
96580         "Other problems", not "Portability problems".
96581         * doc/posix-functions/access.texi: Likewise. Mention a related security
96582         problem.
96583         * doc/glibc-functions/euidaccess.texi: Mention security problems.
96584         * lib/euidaccess.c: Add comments about platforms.
96585         * lib/unistd.in.h (access, euidaccess): Add warnings.
96587 2010-03-07  Bruno Haible  <bruno@clisp.org>
96589         Ensure posix_spawnattr_{get,set}sched{policy,param} are defined.
96590         * lib/spawn.in.h (POSIX_SPAWN_SETSCHEDPARAM): Define fallback.
96591         (POSIX_SPAWN_SETSCHEDULER): Likewise.
96592         (POSIX_SPAWN_USEVFORK): Define in a way that works when
96593         POSIX_SPAWN_SETSCHEDPARAM and POSIX_SPAWN_SETSCHEDULER are zero.
96594         (posix_spawnattr_getschedpolicy, posix_spawnattr_setschedpolicy): Also
96595         declare when POSIX_SPAWN_SETSCHEDULER is zero.
96596         (posix_spawnattr_getschedparam, posix_spawnattr_setschedparam): Also
96597         declare when POSIX_SPAWN_SETSCHEDPARAM is zero.
96598         * m4/posix_spawn.m4 (gl_POSIX_SPAWN_BODY): Test whether
96599         POSIX_SPAWN_SETSCHEDULER or POSIX_SPAWN_SETSCHEDPARAM are zero.
96600         * modules/posix_spawnattr_getschedparam (configure.ac): Enable the
96601         replacement also when POSIX_SPAWN_SETSCHEDPARAM is zero.
96602         * modules/posix_spawnattr_setschedparam (configure.ac): Likewise.
96603         * modules/posix_spawnattr_getschedpolicy (configure.ac): Enable the
96604         replacement also when POSIX_SPAWN_SETSCHEDULER is zero.
96605         * modules/posix_spawnattr_setschedpolicy (configure.ac): Likewise.
96606         * lib/spawnattr_getschedparam.c (posix_spawnattr_getschedparam): Do
96607         nothing if POSIX_SPAWN_SETSCHEDPARAM is zero.
96608         * lib/spawnattr_setschedparam.c (posix_spawnattr_setschedparam):
96609         Likewise.
96610         * lib/spawnattr_getschedpolicy.c (posix_spawnattr_getschedpolicy): Do
96611         nothing if POSIX_SPAWN_SETSCHEDULER is zero.
96612         * lib/spawnattr_setschedpolicy.c (posix_spawnattr_setschedpolicy):
96613         Likewise.
96614         * tests/test-spawn.c (main): Make it work when
96615         POSIX_SPAWN_SETSCHEDPARAM and POSIX_SPAWN_SETSCHEDULER are zero.
96617 2010-03-07  Bruno Haible  <bruno@clisp.org>
96619         Fix incorrect Makefile.am generation in German locale.
96620         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
96621         Execute sed command with character range in C locale.
96623 2010-03-06  Bruno Haible  <bruno@clisp.org>
96625         Tests for module 'iconv-h'.
96626         * modules/iconv-h-tests: New file.
96627         * tests/test-iconv-h.c: New file.
96629         New module 'iconv-h'.
96630         * modules/iconv-h: New file.
96631         * modules/iconv_open (Files): Remove lib/iconv.in.h, m4/iconv_h.m4.
96632         (Depends-on): Add iconv-h. Remove include_next, arg-nonnull.
96633         (configure.ac): Remove gl_ICONV_H.
96634         (Makefile.am): Remove rule for iconv.h.
96636 2010-03-06  Bruno Haible  <bruno@clisp.org>
96638         More consistent naming of *.m4 files.
96639         * m4/wctype_h.m4: Renamed from m4/wctype.m4.
96640         * modules/wctype (Files): Update.
96642         More consistent naming of *.m4 files.
96643         * m4/wchar_h.m4: Renamed from m4/wchar.m4.
96644         * modules/wchar (Files): Update.
96646 2010-03-06  Jim Meyering  <meyering@redhat.com>
96648         euidaccess: relax license to LGPLv2+
96649         * modules/euidaccess (License): Relax to LGPLv2+.
96651 2010-03-06  Bruno Haible  <bruno@clisp.org>
96653         Prefer lib_SOURCES over unconditional AC_LIBOBJ.
96654         * modules/exitfail (configure.ac): Remove AC_LIBOBJ invocation.
96655         (Makefile.am): Augment lib_SOURCES instead.
96657 2010-03-04  Jim Meyering  <meyering@redhat.com>
96659         utime: remove obsolete module
96660         This module, like autoconf's AC_FUNC_UTIME_NULL macro, has been
96661         unnecessary for years, and has been marked as obsolete for 10 months.
96662         * modules/utime: Remove file.
96663         * lib/utime.c: Remove file.
96664         * m4/utime.m4: Remove file.
96665         * m4/utimes-null.m4: Remove file.
96666         * doc/posix-functions/utime.texi (utime): Remove reference to
96667         the module.  Move the sole "fixed by gnulib" item into the
96668         "problems not fixed by Gnulib" list.
96669         * MODULES.html.sh (func_all_modules): Remove reference to "utime".
96671 2010-03-05  Simon Josefsson  <simon@josefsson.org>
96673         * modules/exit (License): Relax license to LGPLv2+.
96674         (Status): Mark as obsolete.
96675         * NEWS: Mention deprecated 'exit' module.
96676         * doc/posix-functions/exit.texi: Recommend 'stdlib' module instead
96677         of now obsolete 'exit'.
96679 2010-03-02  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
96681         fts-lgpl: remove unused module
96682         * modules/fts-lgpl: Remove.
96683         * MODULES.html.sh (func_all_modules): Adjust.
96684         * check-module (find_included_lib_files): Adjust.
96685         * m4/fts.m4 (gl_FUNC_FTS_LGPL): Remove.
96687 2010-03-02  Ben Walton  <bwalton@artsci.utoronto.ca>  (tiny change)
96689         copy-acl: enhance Solaris ACL error handling
96690         * lib/copy-acl.c (qcopy_acl): Also ignore EOPNOTSUPP.
96691         * lib/set-mode-acl.c (qset_acl): Likewise.
96693 2010-03-02  Bruno Haible  <bruno@clisp.org>
96695         spawn: Don't override the system defined values on FreeBSD 8.
96696         * lib/spawn.in.h (POSIX_SPAWN_RESETIDS, POSIX_SPAWN_SETPGROUP,
96697         POSIX_SPAWN_SETSIGDEF, POSIX_SPAWN_SETSIGMASK,
96698         POSIX_SPAWN_SETSCHEDPARAM, POSIX_SPAWN_SETSCHEDULER): Don't redefine
96699         if HAVE_POSIX_SPAWN is 1.
96700         Reported by Johan van Selst <johans@stack.nl> via Eric Blake.
96702 2010-03-01  Bruno Haible  <bruno@clisp.org>
96704         * doc/gnulib-tool.texi (Initial import): Clarify the requirements
96705         regarding Automake.
96707 2010-02-25  Bruno Haible  <bruno@clisp.org>
96709         Fix breakage of gnulib-tool with ksh, introduced on 2010-02-21.
96710         * gnulib-tool: Define 'echo' as a function only before the ksh alias
96711         setting, not afterwards.
96712         Reported by Ben Walton <bwalton@artsci.utoronto.ca>.
96714 2010-02-24  Eric Blake  <eblake@redhat.com>
96716         bootstrap, git-version-gen: use timestamp
96717         * build-aux/git-version-gen (scriptversion): Force UTC.
96718         * build-aux/bootstrap (scriptversion): New variable.
96720         bootstrap: allow older git
96721         * build-aux/bootstrap (GNULIB_SRCDIR): Add fallback if git is
96722         older than 1.6.4.  Requested by the libvirt project.
96724 2010-02-23  Eric Blake  <eblake@redhat.com>
96726         warn-on-use: work with old autoconf
96727         * m4/warn-on-use.m4 (gl_WARN_ON_USE_PREPARE): Accomodate older
96728         AS_VAR semantics of autoconf 2.60.
96729         Reported by Bruno Haible.
96731         bootstrap: improve some comments
96732         * build-aux/bootstrap: Drop unneeded emacs hint.  Add some
96733         clarification comments.
96735         gettimeofday: provide correct function
96736         * lib/gettimeofday.c (gettimeofday): Provide rpl_gettimeofday only
96737         when replacement is declared, otherwise provide gettimeofday.
96738         Reported by Michael Goffioul.
96740 2010-02-23  Jim Meyering  <meyering@redhat.com>
96742         lib-ignore: relax license to "unlimited", not LGPLv2+
96743         * modules/lib-ignore (License): Relax to "unlimited".
96745 2010-02-23  Jim Meyering  <meyering@redhat.com>
96747         lib-ignore: relax license to LGPLv2+
96748         * modules/lib-ignore (License): Relax to LGPLv2+.
96750 2010-02-22  Eric Blake  <eblake@redhat.com>
96752         lseek: avoid bash 3.2 broken pipe bug
96753         * m4/lseek.m4 (gl_FUNC_LSEEK): Drain pipe, to avoid spurious
96754         warning from bash 3.2.
96755         Reported by Ben Pfaff, with analysis from Bruno Haible.
96757         bootstrap: support non-FSF copyright holder
96758         * build-aux/bootstrap (COPYRIGHT_HOLDER, with_gettext): Allow
96759         bootstrap.conf override of COPYRIGHT_HOLDER.
96760         (MSGID_BUGS_ADDRESS): Allow URL rather than email.
96762         bootstrap: interoperate with gettext 0.14.1
96763         * build-aux/bootstrap (slurp): Fix typo when using older gettext.
96765         bootstrap: allow for alternate submodule location
96766         * build-aux/bootstrap (gnulib_path): New variable; use instead of
96767         hardcoding submodule location.
96768         (gnulib_mk): Allow direct use of Makefile.am.
96770         bootstrap: use GNULIB_SRCDIR to reduce disk usage
96771         * build-aux/bootstrap (GNULIB_SRCDIR): If set, use as a reference,
96772         rather than reconfiguring where the submodule points.
96774         gettimeofday: restore support for platforms that lack function
96775         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): Also compile
96776         replacement if function is missing.
96777         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_DEFAULTS): New witness.
96778         * modules/sys_time (Makefile.am): Substitute it.
96779         * lib/sys_time.in.h (gettimeofday): Check it.
96780         Reported by Michael Goffioul.
96782 2010-02-21  Bruno Haible  <bruno@clisp.org>
96784         * lib/stdio.in.h (obstack_printf): Fix typo.
96786 2010-02-21  Jose E. Marchesi  <jemarch@gnu.org>
96788         vc-list-files: use bzr ls's -R option
96789         * build-aux/vc-list-files: Invoke bazaar to generate a recursive
96790         list of versioned files based on 'dir' (usage of -R in 'bzr ls').
96792 2010-02-21  Jim Meyering  <meyering@redhat.com>
96794         init.sh: fix EXEEXT shims to work also for names like test-prog
96795         * tests/init.sh: Re-exec a better shell, when needed.
96796         If the current shell lacks support for posix $(...), an init.sh-using
96797         test will now try to find a shell that supports that.  If EXEEXT is
96798         nonempty, we also require support for hyphen-in-alias-name and shell
96799         substitutions like ${var#glob}.  Failure to find such a shell results
96800         in a skipped test.
96802 2010-02-21  Bruno Haible  <bruno@clisp.org>
96804         Really work around "broken pipe" error message from bash 3.2.
96805         * gnulib-tool (func_reset_sigpipe): Remove function.
96806         (echo): In bash 3.2, define to a function that uses printf.
96807         Analyzed by Ralf Wildenhues, Chet Ramey, Ben Pfaff.
96809 2010-02-20  Bruno Haible  <bruno@clisp.org>
96811         Restore support for automake 1.9.6 with autoconf 2.61.
96812         * m4/gnulib-common.m4 (AC_PROG_MKDIR_P): Ensure MKDIR_P is AC_SUBSTed.
96813         Reported by James Youngman <jay@gnu.org>.
96815 2010-02-20  Bruno Haible  <bruno@clisp.org>
96817         Improve *printf warning condition.
96818         * lib/stdio.in.h (fprintf, printf, vfprintf, vprintf): Emit warning
96819         also if GNULIB_POSIXCHECK is defined, the *-posix module is not used,
96820         and the function is overridden due to SIGPIPE emulation.
96822 2010-02-20  Bruno Haible  <bruno@clisp.org>
96824         * lib/stdio.in.h: Tweak comments.
96826 2010-02-19  Bruno Haible  <bruno@clisp.org>
96828         Make it easier to find modules. New gnulib-tool option '--find'.
96829         * gnulib-tool: New option --find.
96830         (func_usage): Document it.
96831         (func_sanitize_modulelist): New function, extracted from
96832         func_all_modules.
96833         (func_all_modules): Invoke it.
96834         * doc/gnulib-tool.texi (Which modules?): New node.
96836 2010-02-18  Markus Duft  <mduft@gentoo.org>  (tiny change)
96838         * lib/sys_select.in.h: Provide select replacement even if
96839         sys/select.h exists on a system, for Interix.
96841 2010-02-18  Jim Meyering  <meyering@redhat.com>
96843         init.sh: don't use $(...) just yet
96844         * tests/init.sh (create_exe_shim_functions_): Use `...`, not $(...),
96845         to accommodate e.g., Solaris' /bin/sh.
96847 2010-02-17  Bruno Haible  <bruno@clisp.org>
96849         * doc/posix-headers/netdb.texi: Mention NetBSD 5.0 problem.
96850         Reported by Ludovic Courtès <ludo@gnu.org>.
96852 2010-02-16  Simon Josefsson  <simon@josefsson.org>
96854         * modules/userspec-tests (test_userspec_LDADD): Add variable, for
96855         linking with -lintl.
96857 2010-02-17  Simon Josefsson  <simon@josefsson.org>
96859         * lib/netdb.in.h (AI_V4MAPPED, AI_ALL, AI_ADDRCONFIG): Define to 0
96860         if not provided by the system's netdb.h.  Reported by
96861         ludo@gnu.org (Ludovic Courtès).
96863 2010-02-15  Jim Meyering  <meyering@redhat.com>
96865         init.sh: improve portability and efficiency
96866         * tests/init.sh (find_exe_basenames_): Remove unnecessary use of
96867         "dummy" in a for loop.
96868         Use '!', not '^' to select the complement of a character set used
96869         in a "case" statement.
96870         Use shell variable manipulation, a la ${...%.exe}, rather than sed.
96871         Suggestions from Eric Blake.
96873         init.sh: automatically accommodate programs with the .exe suffix
96874         Automatically arrange for an invocation of "prog" to execute the
96875         program named "prog$EXEEXT" (usually prog.exe).  Thus, all invocations
96876         may use the simpler "prog", yet still work when built on a system
96877         that requires specifying the added suffix.
96878         Do this by constructing a function named "prog" that invokes
96879         "prog.exe" for each .exe file in selected directories.
96880         * tests/init.sh (find_exe_basenames_): New function.
96881         (create_exe_shim_functions_): New function.
96882         (path_prepend_): Use it.
96884         maint.mk: mark syntax-check sc_*.m rules as .PHONY
96885         * top/maint.mk ($(syntax-check-rules)): Add .PHONY, so that
96886         "make -t syntax-check" doesn't create a ton of sc_*.m files.
96888 2010-02-14  Jim Meyering  <meyering@redhat.com>
96890         maint.mk: prohibit inclusion of "hash-pjw.h" without_use
96891         * top/maint.mk (sc_prohibit_hash_without_use): Re-add "@".
96892         (sc_prohibit_hash_pjw_without_use): New rule.
96894         maint.mk: allow the default upload destination dir to be overridden
96895         * top/maint.mk (upload_dest_dir_): Define with a default that
96896         preserves the status quo.
96897         (emit_upload_commands): Use it, rather than hard-coding $(PACKAGE).
96898         Reported by Peter Simons.
96900         maint.mk: prohibit inclusion of "hash.h" without_use
96901         * top/maint.mk (sc_prohibit_hash_without_use): New rule.
96903 2010-02-10  Jim Meyering  <meyering@redhat.com>
96905         maint.mk: prohibit inclusion of "ignore-value.h" without_use
96906         * top/maint.mk (sc_prohibit_ignore_value_without_use): New rule.
96908 2010-02-09  Eric Blake  <ebb9@byu.net>
96909         and Bruno Haible  <bruno@clisp.org>
96911         obstack-printf-posix: ensure declaration
96912         * m4/obstack-printf.m4 (gl_DECL_OBSTACK_PRINTF): New macro,
96913         extracted from gl_FUNC_OBSTACK_PRINTF.
96914         (gl_FUNC_OBSTACK_PRINTF): Invoke it.
96915         * m4/obstack-printf-posix.m4 (gl_FUNC_OBSTACK_PRINTF_POSIX):
96916         Likewise.
96917         * lib/stdio.in.h (obstack_printf, obstack_vprintf): Declare also
96918         if GNULIB_OBSTACK_PRINTF_POSIX is 1 and GNULIB_OBSTACK_PRINTF is
96919         0.
96921 2010-02-08  Bruno Haible  <bruno@clisp.org>
96923         gnulib-tool: Fix typo in 2010-02-07 commit.
96924         * gnulib-tool (func_get_dependencies): Fix typo in last commit.
96925         Reported by Eric Blake.
96927 2010-02-07  Bruno Haible  <bruno@clisp.org>
96929         gnulib-tool: Fix up caching patches.
96930         * gnulib-tool: New options --cache-modules, --no-cache-modules. Remove
96931         option --no-cache. Use associative arrays when supported by the shell.
96932         (sed_comments): New variable.
96933         (modcache): Renamed from do_cache.
96934         (sed_extract_field_header): Renamed from sed_extract_cache_prog. Don't
96935         abbreviate unnecessarily.
96936         (have_associative): New variable.
96937         (func_cache_var): Define correctly for bash 1.x. Define in an optimized
96938         way also for ksh and zsh.
96939         (func_init_sed_convert_to_cache_statements): New function, extracted
96940         from func_cache_lookup_module. Add support for associative arrays.
96941         Don't set the c_MODULE_cached variable here. Ignore all lines before
96942         the first field header. Remove only the final newline, not all trailing
96943         newlines. Support empty fields correctly. Limit the use of 'eval' to
96944         assignments.
96945         (func_get_description, func_get_status, func_get_notice,
96946         func_get_applicability, func_get_filelist, func_get_dependencies,
96947         func_get_autoconf_early_snippet, func_get_autoconf_snippet,
96948         func_get_automake_snippet, func_get_include_directive,
96949         func_get_link_directive, func_get_license, func_get_maintainer):
96950         Update documentation. List the unoptimized code first. Add support for
96951         associative arrays. Limit the use of 'eval' to assignments.
96952         (func_get_applicability): Undo stylistic pessimisations.
96953         (func_get_automake_snippet, func_get_include_directive): Reduce code
96954         duplication.
96955         (func_modules_transitive_closure, func_modules_add_dummy,
96956         func_modules_notice, func_modules_to_filelist, func_add_file,
96957         func_update_file, func_emit_lib_Makefile_am, func_emit_po_Makevars,
96958         func_emit_po_POTFILES_in, func_emit_tests_Makefile_am, func_import,
96959         func_create_testdir, func_create_megatestdir): Update documentation.
96961 2010-01-18  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
96963         * gnulib-tool (func_cache_lookup_module): Store the module name
96964         belonging to the cache variable; error out if two different
96965         module names map to the same cache variable name.
96967 2010-01-18  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
96969         gnulib-tool: Make caching optional.
96970         * gnulib-tool: Accept option --no-cache, turning off $do_cache.
96971         Update matching short versions of --no-changelog.
96972         (func_usage): Update.
96973         (sed_extract_cache_prog): Renamed from ...
96974         (sed_extract_prog): ... this; revert to old extraction script.
96975         (func_get_description, func_get_status)
96976         (func_get_notice, func_get_applicability, func_get_filelist)
96977         (func_get_dependencies, func_get_autoconf_early_snippet)
96978         (func_get_autoconf_snippet, func_get_automake_snippet)
96979         (func_get_include_directive, func_get_link_directive)
96980         (func_get_license, func_get_maintainer): If $do_cache is false,
96981         use old, non-caching extraction scripts.
96982         Suggestion by Bruno Haible.
96984 2010-01-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
96986         gnulib-tool: cache module metainformation.
96987         * gnulib-tool (sed_extract_prog): Match newline before each
96988         header, and rewrite header to a shell variable suffix.
96989         (func_cache_var, func_cache_lookup_module): New functions,
96990         to turn a module name into a cache variable prefix, and to
96991         look up and cache module metainformation.
96992         (func_get_description, func_get_status)
96993         (func_get_notice, func_get_applicability, func_get_filelist)
96994         (func_get_dependencies, func_get_autoconf_early_snippet)
96995         (func_get_autoconf_snippet, func_get_automake_snippet)
96996         (func_get_include_directive, func_get_link_directive)
96997         (func_get_license, func_get_maintainer): Use
96998         func_cache_lookup_module.
97000 2010-02-07  Bruno Haible  <bruno@clisp.org>
97002         fnctl: Fix missing dependency.
97003         * modules/fcntl (Depends-on): Add getdtablesize.
97004         Reported by John W. Eaton <jwe@gnu.org>.
97006 2010-02-05  Sergey Poznyakoff  <gray@gnu.org.ua>
97008         Argp: fix recognition of short alias options.
97010         * lib/argp-parse.c (convert_options): Fix improper use of
97011         `|' between character values.
97012         * tests/test-argp.c (group1_option): New alias option
97013         --read (-r).
97014         (group1_parser): Special handling for 'r'.
97015         (test15): New test case.
97016         (test_fun): Add test15.
97017         * tests/test-argp-2.sh: Update expected --help and --usage
97018         outputs.
97020 2010-02-05  Sergey Poznyakoff  <gray@gnu.org.ua>
97022         * tests/test-argp.c: Fix indentation.
97024 2010-02-04  Eric Blake  <ebb9@byu.net>
97026         gettimeofday: expose type of second argument
97027         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): Do better detection
97028         of glibc extension signature, and define GETTIMEOFDAY_TIMEZONE.
97029         * tests/test-gettimeofday.c: Use it to silence warning.
97030         * doc/posix-functions/gettimeofday.texi (gettimeofday): Document
97031         the issue.
97033 2010-02-03  Jim Meyering  <meyering@redhat.com>
97035         regcomp.c: avoid the sole warning from gcc's -Wtype-limits
97036         * lib/regcomp.c (TYPE_SIGNED): Define.
97037         (parse_dup_op): Use it to avoid the sole warning from -Wtype-limits.
97039         regcomp.c: avoid a new -Wshadow warning
97040         * lib/regcomp.c (create_initial_state): Do not shadow local "err".
97042 2010-02-01  Jim Meyering  <meyering@redhat.com>
97044         removing useless parentheses in cpp #define directives
97045         For motivation, see commit c0221df4, "define STREQ(a,b)
97046         consistently, removing useless parentheses"
97047         * lib/memcmp.c (CMP_LT_OR_GT): Remove useless parentheses.
97048         * lib/mountlist.c (MNT_IGNORE): Likewise.
97049         * lib/trim.h (trim, trim_trailing, trim_leading): Likewise.
97051 2010-02-01  Eric Blake  <ebb9@byu.net>
97053         sys_time: use link-warning
97054         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Split defaults...
97055         (gl_HEADER_SYS_TIME_H_DEFAULTS): ...into new macro.
97056         (gl_SYS_TIME_MODULE_INDICATOR): New macro.
97057         * modules/sys_time (Depends-on): Add warn-on-use.
97058         (Makefile.am): Always build replacement.
97059         (configure.ac): Update substitutions.
97060         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY)
97061         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Include defaults, and no longer
97062         bother with SYS_TIME_H.
97063         * modules/gettimeofday (configure.ac): Declare indicator.
97064         * lib/sys_time.in.h (gettimeofday): Warn if gnulib module is not
97065         in use.
97067         closein-tests: silence compiler warning
97068         * tests/test-closein.c (main): Ignore fread result.
97069         * modules/closein-tests (Depends-on): Add ignore-value.
97071         tests: silence warning about system return
97072         * tests/test-areadlink-with-size.c (main): Ignore system result.
97073         * tests/test-areadlink.c (main): Likewise.
97074         * tests/test-areadlinkat-with-size.c (main): Likewise.
97075         * tests/test-areadlinkat.c (main): Likewise.
97076         * tests/test-canonicalize-lgpl.c (main): Likewise.
97077         * tests/test-canonicalize.c (main): Likewise.
97078         * tests/test-chown.c (main): Likewise.
97079         * tests/test-fchownat.c (main): Likewise.
97080         * tests/test-fdutimensat.c (main): Likewise.
97081         * tests/test-fstatat.c (main): Likewise.
97082         * tests/test-futimens.c (main): Likewise.
97083         * tests/test-lchown.c (main): Likewise.
97084         * tests/test-link.c (main): Likewise.
97085         * tests/test-linkat.c (main): Likewise.
97086         * tests/test-lstat.c (main): Likewise.
97087         * tests/test-mkdir.c (main): Likewise.
97088         * tests/test-mkdirat.c (main): Likewise.
97089         * tests/test-mkfifo.c (main): Likewise.
97090         * tests/test-mkfifoat.c (main): Likewise.
97091         * tests/test-mknod.c (main): Likewise.
97092         * tests/test-readlink.c (main): Likewise.
97093         * tests/test-remove.c (main): Likewise.
97094         * tests/test-rename.c (main): Likewise.
97095         * tests/test-renameat.c (main): Likewise.
97096         * tests/test-rmdir.c (main): Likewise.
97097         * tests/test-symlink.c (main): Likewise.
97098         * tests/test-symlinkat.c (main): Likewise.
97099         * tests/test-unlink.c (main): Likewise.
97100         * tests/test-unlinkat.c (main): Likewise.
97101         * tests/test-utimens.c (main): Likewise.
97102         * tests/test-utimensat.c (main): Likewise.
97103         * modules/areadlink-tests (Depends-on): Add ignore-value.
97104         * modules/areadlink-with-size-tests (Depends-on): Likewise.
97105         * modules/areadlinkat-tests (Depends-on): Likewise.
97106         * modules/areadlinkat-with-size-tests (Depends-on): Likewise.
97107         * modules/canonicalize-lgpl-tests (Depends-on): Likewise.
97108         * modules/canonicalize-tests (Depends-on): Likewise.
97109         * modules/chown-tests (Depends-on): Likewise.
97110         * modules/fdutimensat-tests (Depends-on): Likewise.
97111         * modules/futimens-tests (Depends-on): Likewise.
97112         * modules/lchown-tests (Depends-on): Likewise.
97113         * modules/link-tests (Depends-on): Likewise.
97114         * modules/linkat-tests (Depends-on): Likewise.
97115         * modules/lstat-tests (Depends-on): Likewise.
97116         * modules/mkdir-tests (Depends-on): Likewise.
97117         * modules/mkfifo-tests (Depends-on): Likewise.
97118         * modules/mkfifoat-tests (Depends-on): Likewise.
97119         * modules/mknod-tests (Depends-on): Likewise.
97120         * modules/openat-tests (Depends-on): Likewise.
97121         * modules/readlink-tests (Depends-on): Likewise.
97122         * modules/remove-tests (Depends-on): Likewise.
97123         * modules/rename-tests (Depends-on): Likewise.
97124         * modules/renameat-tests (Depends-on): Likewise.
97125         * modules/rmdir-tests (Depends-on): Likewise.
97126         * modules/symlink-tests (Depends-on): Likewise.
97127         * modules/symlinkat-tests (Depends-on): Likewise.
97128         * modules/unlink-tests (Depends-on): Likewise.
97129         * modules/utimens-tests (Depends-on): Likewise.
97130         * modules/utimensat-tests (Depends-on): Likewise.
97132 2010-01-31  Bruno Haible  <bruno@clisp.org>
97134         Perform the same test for many <math.h> functions.
97135         * m4/mathfunc.m4 (gl_COMMON_DOUBLE_MATHFUNC,
97136         gl_COMMON_DOUBLE_MATHFUNC_TEST): New macros.
97137         * m4/sqrt.m4 (gl_FUNC_SQRT): Invoke gl_COMMON_DOUBLE_MATHFUNC instead
97138         of gl_MATHFUNC.
97139         * modules/acos (configure.ac): Likewise.
97140         * modules/asin (configure.ac): Likewise.
97141         * modules/atan (configure.ac): Likewise.
97142         * modules/atan2 (configure.ac): Likewise.
97143         * modules/cbrt (configure.ac): Likewise.
97144         * modules/copysign (configure.ac): Likewise.
97145         * modules/cos (configure.ac): Likewise.
97146         * modules/cosh (configure.ac): Likewise.
97147         * modules/erf (configure.ac): Likewise.
97148         * modules/erfc (configure.ac): Likewise.
97149         * modules/exp (configure.ac): Likewise.
97150         * modules/fmod (configure.ac): Likewise.
97151         * modules/hypot (configure.ac): Likewise.
97152         * modules/j0 (configure.ac): Likewise.
97153         * modules/j1 (configure.ac): Likewise.
97154         * modules/jn (configure.ac): Likewise.
97155         * modules/lgamma (configure.ac): Likewise.
97156         * modules/log (configure.ac): Likewise.
97157         * modules/log10 (configure.ac): Likewise.
97158         * modules/log1p (configure.ac): Likewise.
97159         * modules/pow (configure.ac): Likewise.
97160         * modules/remainder (configure.ac): Likewise.
97161         * modules/sin (configure.ac): Likewise.
97162         * modules/sinh (configure.ac): Likewise.
97163         * modules/tan (configure.ac): Likewise.
97164         * modules/tanh (configure.ac): Likewise.
97165         * modules/y0 (configure.ac): Likewise.
97166         * modules/y1 (configure.ac): Likewise.
97167         * modules/yn (configure.ac): Likewise.
97168         Suggested by Paolo Bonzini.
97170 2010-01-31  Bruno Haible  <bruno@clisp.org>
97172         * m4/getline.m4 (gl_FUNC_GETLINE): Add comment about REPLACE_GETLINE.
97174 2010-01-31  Bruno Haible  <bruno@clisp.org>
97176         Work around getdelim() bug on FreeBSD 8.0.
97177         * m4/getdelim.m4 (gl_FUNC_GETDELIM): Test whether getdelim supports an
97178         initially NULL line. Set REPLACE_GETDELIM if getdelim exists but does
97179         not work.
97180         * lib/stdio.in.h (getdelim): Define as an alias if REPLACE_GETDELIM
97181         is 1.
97182         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Initialize REPLACE_GETDELIM.
97183         * modules/stdio (Makefile.am): Also substitute REPLACE_GETDELIM.
97184         * tests/test-getdelim.c (main): Also test result for a NULL buffer and
97185         a non-zero size.
97186         * doc/posix-functions/getdelim.texi: Mention the FreeBSD bug.
97188 2010-01-31  Bruno Haible  <bruno@clisp.org>
97190         Work around getline() bug on FreeBSD 8.0.
97191         * m4/getline.m4 (gl_FUNC_GETLINE): Also test result for a NULL buffer
97192         and a non-zero size.
97193         * tests/test-getline.c (main): Likewise.
97194         * doc/posix-functions/getline.texi: Mention the FreeBSD bug.
97195         Reported by Dennis <noordsij@cs.helsinki.fi> via Eric Blake.
97197 2010-01-28  Eric Blake  <ebb9@byu.net>
97199         regex: fix build failure
97200         * lib/regex_internal.h (__GNUC_PREREQ): Define for non-glibc
97201         platforms.
97203 2010-01-28  Jim Meyering  <meyering@redhat.com>
97205         regex: do not ignore memory allocation failure
97206         * lib/regex_internal.c (create_cd_newstate): Detect
97207         re_node_set_init_copy failure.   Extracted from glibc commit
97208         2da42bc06566bc89785e580fa1ac89b4c9f2a63c.
97210         regex: sync more white-space changes from libc
97211         * lib/regex_internal.c: White-space only changes.
97212         * lib/regexec.c: Likewise.
97214         regex: add many uses of __attribute_warn_unused_result__
97215         * lib/regex_internal.c: Use __attribute_warn_unused_result__.
97216         * lib/regexec.c: Likewise.
97217         Extracted from a messy glibc commit.
97219         regcomp.c: spelling and merge-artifact from glibc
97220         * lib/regcomp.c: Merge remainder of glibc's
97221         2da42bc06566bc89785e580fa1ac89b4c9f2a63c.
97223         regcomp.c: sync white-space changes from glibc
97224         * lib/regcomp.c: Merge to accommodate white space
97225         changes from glibc's 2da42bc06566bc89785e580fa1ac89b4c9f2a63c.
97227         regcomp.c: do not ignore internal return values
97228         * lib/regcomp.c: Do not ignore internal return values.
97229         This is from glibc's 2da42bc06566bc89785e580fa1ac89b4c9f2a63c,
97230         but without its white-space changes and spelling fixes.
97232         regex_internal.h: define __attribute_warn_unused_result__
97233         * lib/regex_internal.h (__attribute_warn_unused_result__): Define.
97235         maint: add a syntax-check rule to check for vulnerable Makefile.in
97236         * top/maint.mk (sc_vulnerable_makefile_CVE-2009-4029): New rule.
97238 2010-01-27  Jim Meyering  <meyering@redhat.com>
97240         ncftpput-ftp: clean up spaces
97241         * build-aux/ncftpput-ftp: Make Copyright line consistent.
97242         Remove trailing blanks.
97244 2010-01-27  Simon Josefsson  <simon@josefsson.org>
97246         * build-aux/git-version-gen: Fix copyright statement.
97247         * build-aux/gnupload: Likewise.
97248         * tests/test-arcfour.c: Likewise.
97249         * tests/test-arctwo.c: Likewise.
97250         * tests/test-count-one-bits.c: Likewise.
97251         * tests/test-crc.c: Likewise.
97252         * tests/test-des.c: Likewise.
97253         * tests/test-gc-arcfour.c: Likewise.
97254         * tests/test-gc-arctwo.c: Likewise.
97255         * tests/test-gc-des.c: Likewise.
97256         * tests/test-gc-hmac-md5.c: Likewise.
97257         * tests/test-gc-hmac-sha1.c: Likewise.
97258         * tests/test-gc-md2.c: Likewise.
97259         * tests/test-gc-md4.c: Likewise.
97260         * tests/test-gc-md5.c: Likewise.
97261         * tests/test-gc-pbkdf2-sha1.c: Likewise.
97262         * tests/test-gc-rijndael.c: Likewise.
97263         * tests/test-gc-sha1.c: Likewise.
97264         * tests/test-gc.c: Likewise.
97265         * tests/test-gethostname.c: Likewise.
97266         * tests/test-gettimeofday.c: Likewise.
97267         * tests/test-hash.c: Likewise.
97268         * tests/test-hmac-md5.c: Likewise.
97269         * tests/test-hmac-sha1.c: Likewise.
97270         * tests/test-md2.c: Likewise.
97271         * tests/test-md4.c: Likewise.
97272         * tests/test-md5.c: Likewise.
97273         * tests/test-memchr.c: Likewise.
97274         * tests/test-memchr2.c: Likewise.
97275         * tests/test-memcmp.c: Likewise.
97276         * tests/test-memmem.c: Likewise.
97277         * tests/test-memrchr.c: Likewise.
97278         * tests/test-rawmemchr.c: Likewise.
97279         * tests/test-read-file.c: Likewise.
97280         * tests/test-rijndael.c: Likewise.
97281         * tests/test-sockets.c: Likewise.
97282         * tests/test-strchrnul.c: Likewise.
97283         * tests/test-strstr.c: Likewise.
97284         * tests/test-strtod.c: Likewise.
97285         * build-aux/ncftpput-ftp: Likewise.
97287 2010-01-26  Eric Blake  <ebb9@byu.net>
97289         ignore-value: update recommended header name
97290         * modules/ignore-value (Include): Only use <> for headers that
97291         exist in glibc.
97293 2010-01-26  Jim Meyering  <meyering@redhat.com>
97295         test-userspec.c: avoid compiler warnings
97296         * tests/test-userspec.c (main): Avoid shadowing ("uid"),
97297         and "initialization discards qualifiers..." warnings.
97298         Put the first "uid" in its own scope, and make char* members "const".
97300 2010-01-25  Bruno Haible  <bruno@clisp.org>
97302         gnulib-tool: Make warning diagnostics consistent.
97303         * gnulib-tool (func_warning): New function.
97304         Use it everywhere where gnulib-tool produces output to stderr and it is
97305         not a fatal error.
97307 2010-01-25  Bruno Haible  <bruno@clisp.org>
97309         Fix test dependencies.
97310         * modules/xstrtol-tests (Depends-on): Add inttypes.
97311         * modules/xstrtoll-tests (Depends-on): Likewise. Remove xstrtoll.
97313 2010-01-25  Pádraig Brady  <P@draigBrady.com>
97315         syntax-check: detect incorrect boolean macro values in config.h
97316         * modules/maintainer-makefile (configure.ac): Parameterize the location
97317         of config.h which will be available to makefiles as $(CONFIG_INCLUDE).
97318         The logic is from Eric Blake and the location indicated by Jim Meyering.
97319         Note the more natural CONFIG_HEADER name is prohibited by automake
97320         for backwards compatibility reasons.
97321         * top/maint.mk (sc_Wundef_boolean): New rule.
97323 2010-01-25  Jim Meyering  <meyering@redhat.com>
97325         bootstrap: detect MacOS 10.6's shasum, too
97326         * build-aux/bootstrap: Also recognize MacOS 10.6's shasum.
97327         Suggested by Thomas Treichl <Thomas.Treichl@gmx.net>.
97329 2010-01-23  Jim Meyering  <meyering@redhat.com>
97331         xstrtoll: new module
97332         * modules/xstrtoll: New file.
97333         * MODULES.html.sh (Numeric conversion functions): Add xstrtoll.
97334         * lib/xstrtol.h [HAVE_LONG_LONG_INT]: Declare xstrtoll and xstrtoull.
97335         * lib/xstrtoll.c, lib/xstrtoull.c: New files.
97336         ./configure fails if you use this module and lack "long long".
97337         * modules/xstrtoll-tests: New module.
97338         * tests/test-xstrtoll.c, tests/test-xstrtoull.c: New files.
97339         * tests/test-xstrtoll.sh: Like test-xstrtol.c, but use the
97340         new init.sh-based test framework.
97342 2010-01-24  Bruno Haible  <bruno@clisp.org>
97344         Tests for module 'yn'.
97345         * modules/yn-tests: New file.
97346         * tests/test-yn.c: New file.
97348         Tests for module 'y1'.
97349         * modules/y1-tests: New file.
97350         * tests/test-y1.c: New file.
97352         Tests for module 'y0'.
97353         * modules/y0-tests: New file.
97354         * tests/test-y0.c: New file.
97356         Tests for module 'tanh'.
97357         * modules/tanh-tests: New file.
97358         * tests/test-tanh.c: New file.
97360         Tests for module 'tan'.
97361         * modules/tan-tests: New file.
97362         * tests/test-tan.c: New file.
97364         Tests for module 'sqrt'.
97365         * modules/sqrt-tests: New file.
97366         * tests/test-sqrt.c: New file.
97368         Tests for module 'sinh'.
97369         * modules/sinh-tests: New file.
97370         * tests/test-sinh.c: New file.
97372         Tests for module 'sin'.
97373         * modules/sin-tests: New file.
97374         * tests/test-sin.c: New file.
97376         Tests for module 'rint'.
97377         * modules/rint-tests: New file.
97378         * tests/test-rint.c: New file.
97380         Tests for module 'remainder'.
97381         * modules/remainder-tests: New file.
97382         * tests/test-remainder.c: New file.
97384         Tests for module 'pow'.
97385         * modules/pow-tests: New file.
97386         * tests/test-pow.c: New file.
97388         Tests for module 'nextafter'.
97389         * modules/nextafter-tests: New file.
97390         * tests/test-nextafter.c: New file.
97392         Tests for module 'modf'.
97393         * modules/modf-tests: New file.
97394         * tests/test-modf.c: New file.
97396         Tests for module 'logb'.
97397         * modules/logb-tests: New file.
97398         * tests/test-logb.c: New file.
97400         Tests for module 'log1p'.
97401         * modules/log1p-tests: New file.
97402         * tests/test-log1p.c: New file.
97404         Tests for module 'log10'.
97405         * modules/log10-tests: New file.
97406         * tests/test-log10.c: New file.
97408         Tests for module 'log'.
97409         * modules/log-tests: New file.
97410         * tests/test-log.c: New file.
97412         Tests for module 'lgamma'.
97413         * modules/lgamma-tests: New file.
97414         * tests/test-lgamma.c: New file.
97416         Tests for module 'ldexp'.
97417         * modules/ldexp-tests: New file.
97418         * tests/test-ldexp.c: New file.
97420         Tests for module 'jn'.
97421         * modules/jn-tests: New file.
97422         * tests/test-jn.c: New file.
97424         Tests for module 'j1'.
97425         * modules/j1-tests: New file.
97426         * tests/test-j1.c: New file.
97428         Tests for module 'j0'.
97429         * modules/j0-tests: New file.
97430         * tests/test-j0.c: New file.
97432         Tests for module 'hypot'.
97433         * modules/hypot-tests: New file.
97434         * tests/test-hypot.c: New file.
97436         Tests for module 'fmod'.
97437         * modules/fmod-tests: New file.
97438         * tests/test-fmod.c: New file.
97440         Tests for module 'fabs'.
97441         * modules/fabs-tests: New file.
97442         * tests/test-fabs.c: New file.
97444         Tests for module 'exp'.
97445         * modules/exp-tests: New file.
97446         * tests/test-exp.c: New file.
97448         Tests for module 'erfc'.
97449         * modules/erfc-tests: New file.
97450         * tests/test-erfc.c: New file.
97452         Tests for module 'erf'.
97453         * modules/erf-tests: New file.
97454         * tests/test-erf.c: New file.
97456         Tests for module 'cosh'.
97457         * modules/cosh-tests: New file.
97458         * tests/test-cosh.c: New file.
97460         Tests for module 'cos'.
97461         * modules/cos-tests: New file.
97462         * tests/test-cos.c: New file.
97464         Tests for module 'copysign'.
97465         * modules/copysign-tests: New file.
97466         * tests/test-copysign.c: New file.
97468         Tests for module 'cbrt'.
97469         * modules/cbrt-tests: New file.
97470         * tests/test-cbrt.c: New file.
97472         Tests for module 'atan2'.
97473         * modules/atan2-tests: New file.
97474         * tests/test-atan2.c: New file.
97476         Tests for module 'atan'.
97477         * modules/atan-tests: New file.
97478         * tests/test-atan.c: New file.
97480         Tests for module 'asin'.
97481         * modules/asin-tests: New file.
97482         * tests/test-asin.c: New file.
97484         Tests for module 'acos'.
97485         * modules/acos-tests: New file.
97486         * tests/test-acos.c: New file.
97488 2010-01-24  Bruno Haible  <bruno@clisp.org>
97490         Fix tests for common <math.h> functions.
97491         * m4/mathfunc.m4 (gl_MATHFUNC): Take two additional parameters. Use a
97492         code snippet that references the function pointer, rather than merely
97493         calling the function. Substitute the FUNC_LIBM variable.
97494         * m4/sqrt.m4 (gl_FUNC_SQRT): Update gl_MATHFUNC invocation.
97495         * modules/acos (configure.ac): Likewise.
97496         * modules/asin (configure.ac): Likewise.
97497         * modules/atan (configure.ac): Likewise.
97498         * modules/atan2 (configure.ac): Likewise.
97499         * modules/cbrt (configure.ac): Likewise.
97500         * modules/copysign (configure.ac): Likewise.
97501         * modules/cos (configure.ac): Likewise.
97502         * modules/cosh (configure.ac): Likewise.
97503         * modules/erf (configure.ac): Likewise.
97504         * modules/erfc (configure.ac): Likewise.
97505         * modules/exp (configure.ac): Likewise.
97506         * modules/fabs (configure.ac): Likewise.
97507         * modules/fmod (configure.ac): Likewise.
97508         * modules/hypot (configure.ac): Likewise.
97509         * modules/j0 (configure.ac): Likewise.
97510         * modules/j1 (configure.ac): Likewise.
97511         * modules/jn (configure.ac): Likewise.
97512         * modules/ldexp (configure.ac): Likewise.
97513         * modules/lgamma (configure.ac): Likewise.
97514         * modules/log (configure.ac): Likewise.
97515         * modules/log10 (configure.ac): Likewise.
97516         * modules/log1p (configure.ac): Likewise.
97517         * modules/logb (configure.ac): Likewise.
97518         * modules/modf (configure.ac): Likewise.
97519         * modules/nextafter (configure.ac): Likewise.
97520         * modules/pow (configure.ac): Likewise.
97521         * modules/remainder (configure.ac): Likewise.
97522         * modules/rint (configure.ac): Likewise.
97523         * modules/sin (configure.ac): Likewise.
97524         * modules/sinh (configure.ac): Likewise.
97525         * modules/tan (configure.ac): Likewise.
97526         * modules/tanh (configure.ac): Likewise.
97527         * modules/y0 (configure.ac): Likewise.
97528         * modules/y1 (configure.ac): Likewise.
97529         * modules/yn (configure.ac): Likewise.
97531 2010-01-24  Bruno Haible  <bruno@clisp.org>
97533         Tests: Defeat inlining of math functions by GCC >= 4.3.0.
97534         * tests/test-acosl.c (x): New variable.
97535         (main): Store argument in x and fetch it from x.
97536         * tests/test-asinl.c (x): New variable.
97537         (main): Store argument in x and fetch it from x.
97538         * tests/test-atanl.c (x): New variable.
97539         (main): Store argument in x and fetch it from x.
97540         * tests/test-cosl.c (x): New variable.
97541         (main): Store argument in x and fetch it from x.
97542         * tests/test-expl.c (x): New variable.
97543         (main): Store argument in x and fetch it from x.
97544         * tests/test-logl.c (x): New variable.
97545         (main): Store argument in x and fetch it from x.
97546         * tests/test-sinl.c (x): New variable.
97547         (main): Store argument in x and fetch it from x.
97548         * tests/test-sqrtl.c (x): New variable.
97549         (main): Store argument in x and fetch it from x.
97550         * tests/test-tanl.c (x): New variable.
97551         (main): Store argument in x and fetch it from x.
97553 2010-01-24  Bruno Haible  <bruno@clisp.org>
97555         Provide EXEEXT and srcdir in TESTS_ENVIRONMENT by default.
97556         * gnulib-tool (func_emit_tests_Makefile_am): Add EXEEXT and srcdir
97557         assignments to the initial TESTS_ENVIRONMENT.
97558         * doc/gnulib.texi (Unit test modules): Document it.
97559         * modules/acl-tests (Makefile.am): Drop EXEEXT assignment from
97560         TESTS_ENVIRONMENT.
97561         * modules/btowc-tests (Makefile.am): Likewise.
97562         * modules/c-stack-tests (Makefile.am): Likewise.
97563         * modules/c-strcase-tests (Makefile.am): Likewise.
97564         * modules/copy-file-tests (Makefile.am): Likewise.
97565         * modules/mbmemcasecmp-tests (Makefile.am): Likewise.
97566         * modules/mbmemcasecoll-tests (Makefile.am): Likewise.
97567         * modules/mbrtowc-tests (Makefile.am): Likewise.
97568         * modules/mbscasecmp-tests (Makefile.am): Likewise.
97569         * modules/mbscasestr-tests (Makefile.am): Likewise.
97570         * modules/mbschr-tests (Makefile.am): Likewise.
97571         * modules/mbscspn-tests (Makefile.am): Likewise.
97572         * modules/mbsinit-tests (Makefile.am): Likewise.
97573         * modules/mbsncasecmp-tests (Makefile.am): Likewise.
97574         * modules/mbsnrtowcs-tests (Makefile.am): Likewise.
97575         * modules/mbspbrk-tests (Makefile.am): Likewise.
97576         * modules/mbspcasecmp-tests (Makefile.am): Likewise.
97577         * modules/mbsrchr-tests (Makefile.am): Likewise.
97578         * modules/mbsrtowcs-tests (Makefile.am): Likewise.
97579         * modules/mbsspn-tests (Makefile.am): Likewise.
97580         * modules/mbsstr-tests (Makefile.am): Likewise.
97581         * modules/nl_langinfo-tests (Makefile.am): Likewise.
97582         * modules/unicase/locale-language-tests (Makefile.am): Likewise.
97583         * modules/unistdio/u16-vasnprintf-tests (Makefile.am): Likewise.
97584         * modules/unistdio/u32-vasnprintf-tests (Makefile.am): Likewise.
97585         * modules/unistdio/u8-vasnprintf-tests (Makefile.am): Likewise.
97586         * modules/unistdio/ulc-vasnprintf-tests (Makefile.am): Likewise.
97587         * modules/uniwbrk/ulc-wordbreaks-tests (Makefile.am): Likewise.
97588         * modules/vasnprintf-posix-tests (Makefile.am): Likewise.
97589         * modules/wcrtomb-tests (Makefile.am): Likewise.
97590         * modules/wcsnrtombs-tests (Makefile.am): Likewise.
97591         * modules/wcsrtombs-tests (Makefile.am): Likewise.
97592         * modules/quotearg-tests (Makefile.am): Drop EXEEXT and srcdir
97593         assignments from TESTS_ENVIRONMENT.
97594         * modules/argp-tests (Makefile.am): Drop TESTS_ENVIRONMENT
97595         augmentation.
97596         * modules/argp-version-etc-tests (Makefile.am): Likewise.
97597         * modules/atexit-tests (Makefile.am): Likewise.
97598         * modules/binary-io-tests (Makefile.am): Likewise.
97599         * modules/closein-tests (Makefile.am): Likewise.
97600         * modules/dprintf-posix-tests (Makefile.am): Likewise.
97601         * modules/exclude-tests (Makefile.am): Likewise.
97602         * modules/fflush-tests (Makefile.am): Likewise.
97603         * modules/fpending-tests (Makefile.am): Likewise.
97604         * modules/fprintf-posix-tests (Makefile.am): Likewise.
97605         * modules/freadahead-tests (Makefile.am): Likewise.
97606         * modules/freadptr-tests (Makefile.am): Likewise.
97607         * modules/freadseek-tests (Makefile.am): Likewise.
97608         * modules/fseek-tests (Makefile.am): Likewise.
97609         * modules/fseeko-tests (Makefile.am): Likewise.
97610         * modules/ftell-tests (Makefile.am): Likewise.
97611         * modules/ftello-tests (Makefile.am): Likewise.
97612         * modules/idpriv-drop-tests (Makefile.am): Likewise.
97613         * modules/idpriv-droptemp-tests (Makefile.am): Likewise.
97614         * modules/lseek-tests (Makefile.am): Likewise.
97615         * modules/parse-duration-tests (Makefile.am): Likewise.
97616         * modules/perror-tests (Makefile.am): Likewise.
97617         * modules/pipe-filter-gi-tests (Makefile.am): Likewise.
97618         * modules/pipe-filter-ii-tests (Makefile.am): Likewise.
97619         * modules/pipe-tests (Makefile.am): Likewise.
97620         * modules/pread-tests (Makefile.am): Likewise.
97621         * modules/printf-posix-tests (Makefile.am): Likewise.
97622         * modules/select-tests (Makefile.am): Likewise.
97623         * modules/sigpipe-tests (Makefile.am): Likewise.
97624         * modules/tsearch-tests (Makefile.am): Likewise.
97625         * modules/unicase/ulc-casecmp-tests (Makefile.am): Likewise.
97626         * modules/unicase/ulc-casecoll-tests (Makefile.am): Likewise.
97627         * modules/uniname/uniname-tests (Makefile.am): Likewise.
97628         * modules/uniwidth/width-tests (Makefile.am): Likewise.
97629         * modules/vdprintf-posix-tests (Makefile.am): Likewise.
97630         * modules/version-etc-tests (Makefile.am): Likewise.
97631         * modules/vfprintf-posix-tests (Makefile.am): Likewise.
97632         * modules/vprintf-posix-tests (Makefile.am): Likewise.
97633         * modules/xalloc-die-tests (Makefile.am): Likewise.
97634         * modules/xprintf-posix-tests (Makefile.am): Likewise.
97635         * modules/xstrtoimax-tests (Makefile.am): Likewise.
97636         * modules/xstrtol-tests (Makefile.am): Likewise.
97637         * modules/xstrtoumax-tests (Makefile.am): Likewise.
97638         * modules/yesno-tests (Makefile.am): Likewise.
97639         Suggested by Jim Meyering.
97641 2010-01-24  Bruno Haible  <bruno@clisp.org>
97643         More documentation.
97644         * doc/gnulib.texi (Writing modules): New chapter.
97645         (Miscellaneous Notes): Move sections "Comments" and "Header files" to
97646         the new chapter.
97648 2010-01-24  Jim Meyering  <meyering@redhat.com>
97650         maint.mk: do not prepend "./" after filtering
97651         * top/maint.mk (_prepend_srcdir_prefix): New variable
97652         (VC_LIST_EXCEPT): Use it to avoid prepending (post-filter)
97653         "./" when $(srcdir) is ".".
97655         define STREQ(a,b) consistently, removing useless parentheses
97656         #define STREQ(a, b) (strcmp ((a), (b)) == 0) is over-parenthesized,
97657         since the only risk is that "a" or "b" contains an unparenthesized
97658         comma, but if either did that, STREQ would have 3 or more arguments.
97659         Hence, #define STREQ(a, b) (strcmp (a, b) == 0) is better.
97660         * lib/fts.c (STREQ): Remove unnecessary parentheses.
97661         * lib/hash-triple.c (STREQ): Likewise.
97662         * tests/test-argv-iter.c (STREQ): Use a and b, not s1 and s2.
97663         * lib/getugroups.c (STREQ): Likewise.
97665 2010-01-23  Jim Meyering  <meyering@redhat.com>
97667         maint.mk: fix syntax-check in a non-srcdir build directory
97668         * top/maint.mk (_dot_escaped_srcdir): Remove erroneous backslash,
97669         introduced in my 2010-01-21 commit, a6da6c45.  Reported by Eric Blake.
97671 2010-01-22  Jim Meyering  <meyering@redhat.com>
97673         userspec: add unit tests
97674         * tests/test-userspec.c: New file.
97675         * modules/userspec-tests: Likewise.
97677 2010-01-21  Jim Meyering  <meyering@redhat.com>
97679         maint.mk: handle source file names containing "." robustly
97680         * top/maint.mk (_dot_escaped_srcdir): Define.
97681         (VC_LIST): Use it in LHS of sed substitution.
97683 2010-01-21  Jiri Denemark  <jdenemar@redhat.com>
97685         maint.mk: fix VC_LIST_EXCEPT for srcdir != builddir
97686         * top/maint.mk (VC_LIST_EXCEPT): Preprocess the output of
97687         $(VC_LIST) to remove a prefix of '$(srcdir)/', so that it works
97688         from a non-srcdir build.
97690 2010-01-20  Eric Blake  <ebb9@byu.net>
97692         warn-on-use: use instead of link-warning
97693         * modules/stdio (Depends-on, Makefile.am): Drop link-warning.
97694         * modules/unistd (Depends-on, Makefile.am): Likewise.
97695         * modules/arpa_inet (Depends-on): Replace link-warning with
97696         warn-on-use.
97697         (Makefile.am): Update rules accordingly.
97698         * modules/ctype (Depends-on, Makefile.am): Likewise.
97699         * modules/dirent (Depends-on, Makefile.am): Likewise.
97700         * modules/fcntl-h (Depends-on, Makefile.am): Likewise.
97701         * modules/inttypes (Depends-on, Makefile.am): Likewise.
97702         * modules/langinfo (Depends-on, Makefile.am): Likewise.
97703         * modules/locale (Depends-on, Makefile.am): Likewise.
97704         * modules/math (Depends-on, Makefile.am): Likewise.
97705         * modules/search (Depends-on, Makefile.am): Likewise.
97706         * modules/signal (Depends-on, Makefile.am): Likewise.
97707         * modules/spawn (Depends-on, Makefile.am): Likewise.
97708         * modules/stdlib (Depends-on, Makefile.am): Likewise.
97709         * modules/string (Depends-on, Makefile.am): Likewise.
97710         * modules/strings (Depends-on, Makefile.am): Likewise.
97711         * modules/sys_file (Depends-on, Makefile.am): Likewise.
97712         * modules/sys_ioctl (Depends-on, Makefile.am): Likewise.
97713         * modules/sys_select (Depends-on, Makefile.am): Likewise.
97714         * modules/sys_socket (Depends-on, Makefile.am): Likewise.
97715         * modules/sys_stat (Depends-on, Makefile.am): Likewise.
97716         * modules/sys_times (Depends-on, Makefile.am): Likewise.
97717         * modules/sys_utsname (Depends-on, Makefile.am): Likewise.
97718         * modules/wchar (Depends-on, Makefile.am): Likewise.
97719         * m4/arpa_inet_h.m4 (gl_HEADER_ARPA_INET): Check which functions
97720         should be poisoned.
97721         * m4/ctype.m4 (gl_CTYPE_H): Likewise.
97722         * m4/dirent_h.m4 (gl_DIRENT_H): Likewise.
97723         * m4/fcntl_h.m4 (gl_FCNTL_H): Likewise.
97724         * m4/inttypes.m4 (gl_INTTYPES_H): Likewise.
97725         * m4/langinfo_h.m4 (gl_LANGINFO_H): Likewise.
97726         * m4/locale_h.m4 (gl_LOCALE_H): Likewise.
97727         * m4/math_h.m4 (gl_MATH_H): Likewise.
97728         * m4/search_h.m4 (gl_SEARCH_H): Likewise.
97729         * m4/signal_h.m4 (gl_SIGNAL_H): Likewise.
97730         * m4/spawn_h.m4 (gl_SPAWN_H): Likewise.
97731         * m4/stdio_h.m4 (gl_STDIO_H): Likewise.
97732         * m4/stdlib_h.m4 (gl_STDLIB_H): Likewise.
97733         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Likewise.
97734         * m4/strings_h.m4 (gl_HEADER_STRINGS_H_BODY): Likewise.
97735         * m4/sys_file_h.m4 (gl_HEADER_SYS_FILE_H_DEFAULTS): Likewise.
97736         * m4/sys_ioctl_h.m4 (gl_SYS_IOCTL_H): Likewise.
97737         * m4/sys_select_h.m4 (gl_HEADER_SYS_SELECT): Likewise.
97738         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Likewise.
97739         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Likewise.
97740         * m4/sys_times_h.m4 (gl_SYS_TIMES_H): Likewise.
97741         * m4/sys_utsname_h.m4 (gl_SYS_UTSNAME_H): Likewise.
97742         * m4/unistd_h.m4 (gl_UNISTD_H): Likewise.
97743         * m4/wchar.m4 (gl_WCHAR_H): Likewise.
97744         * lib/arpa_inet.in.h: Use _GL_WARN_ON_USE instead of
97745         GL_LINK_WARNING.
97746         * lib/ctype.in.h: Likewise.
97747         * lib/dirent.in.h: Likewise.
97748         * lib/fcntl.in.h: Likewise.
97749         * lib/inttypes.in.h: Likewise.
97750         * lib/langinfo.in.h: Likewise.
97751         * lib/locale.in.h: Likewise.
97752         * lib/math.in.h: Likewise.
97753         * lib/search.in.h: Likewise.
97754         * lib/signal.in.h: Likewise.
97755         * lib/spawn.in.h: Likewise.
97756         * lib/stdio.in.h: Likewise.
97757         * lib/stdlib.in.h: Likewise.
97758         * lib/string.in.h: Likewise.
97759         * lib/strings.in.h: Likewise.
97760         * lib/sys_file.in.h: Likewise.
97761         * lib/sys_ioctl.in.h: Likewise.
97762         * lib/sys_select.in.h: Likewise.
97763         * lib/sys_socket.in.h: Likewise.
97764         * lib/sys_stat.in.h: Likewise.
97765         * lib/sys_times.in.h: Likewise.
97766         * lib/sys_utsname.in.h: Likewise.
97767         * lib/unistd.in.h: Likewise.
97768         * lib/wchar.in.h: Likewise.
97770 2010-01-20  Bruno Haible  <bruno@clisp.org>
97772         Avoid duplicate -lm.
97773         * m4/isnan.m4 (gl_ISNAN): Avoid duplicate -lm in $ISNAN_LIBM.
97774         * m4/round.m4 (gl_FUNC_ROUND): Avoid duplicate -lm in $ROUND_LIBM.
97775         * m4/roundf.m4 (gl_FUNC_ROUNDF): Avoid duplicate -lm in $ROUNDF_LIBM.
97776         * m4/roundl.m4 (gl_FUNC_ROUNDL): Avoid duplicate -lm in $ROUNDL_LIBM.
97777         * m4/acosl.m4 (gl_FUNC_ACOSL): Avoid duplicate -lm in $ACOSL_LIBM.
97778         * m4/cosl.m4 (gl_FUNC_COSL): Avoid duplicate -lm in $COSL_LIBM.
97779         * m4/logl.m4 (gl_FUNC_LOGL): Avoid duplicate -lm in $LOGL_LIBM.
97780         * m4/sinl.m4 (gl_FUNC_SINL): Avoid duplicate -lm in $SINL_LIBM.
97781         * m4/sqrtl.m4 (gl_FUNC_SQRTL): Avoid duplicate -lm in $SQRTL_LIBM.
97782         * m4/tanl.m4 (gl_FUNC_TANL): Avoid duplicate -lm in $TANL_LIBM.
97783         * m4/asinl.m4 (gl_FUNC_ASINL): Same change, for consistency.
97784         * m4/atanl.m4 (gl_FUNC_ATANL): Likewise.
97785         Reported by Paolo Bonzini.
97787 2010-01-19  Bruno Haible  <bruno@clisp.org>
97789         langinfo, nl_langinfo: Relicense under LGPLv2+.
97790         * modules/langinfo (License): Change to LGPLv2+.
97791         * modules/nl_langinfo (License): Likewise.
97792         Patch by David Lutterkort <lutter@redhat.com>.
97794 2010-01-19  Bruno Haible  <bruno@clisp.org>
97796         Avoid compilation error with cc on OSF/1 5.1.
97797         * lib/fcntl.in.h: Include <unistd.h> after the #include_next <fcntl.h>
97798         statement, not before.
97799         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
97801 2010-01-18  Bruno Haible  <bruno@clisp.org>
97803         Avoid a link error due to the __printf__ symbol.
97804         * lib/stdio.in.h (__attribute__): Define to empty also for gcc 2.5.x
97805         and 2.6.x.
97806         (__format__, __printf__): Remove definitions.
97807         * lib/argp-fmtstream.h: Likewise.
97808         * lib/argp.h: Likewise.
97809         * lib/error.h: Likewise.
97810         * lib/vasnprintf.h: Likewise.
97811         * lib/xprintf.h: Likewise.
97812         * lib/xvasprintf.h: Likewise.
97813         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
97815 2010-01-18  Bruno Haible  <bruno@clisp.org>
97817         Tests for module 'tanl'.
97818         * modules/tanl-tests: New file.
97819         * tests/test-tanl.c: New file.
97821         Tests for module 'sqrtl'.
97822         * modules/sqrtl-tests: New file.
97823         * tests/test-sqrtl.c: New file.
97825         Tests for module 'sinl'.
97826         * modules/sinl-tests: New file.
97827         * tests/test-sinl.c: New file.
97829         Tests for module 'logl'.
97830         * modules/logl-tests: New file.
97831         * tests/test-logl.c: New file.
97833         Tests for module 'expl'.
97834         * modules/expl-tests: New file.
97835         * tests/test-expl.c: New file.
97837         Tests for module 'cosl'.
97838         * modules/cosl-tests: New file.
97839         * tests/test-cosl.c: New file.
97841         Tests for module 'atanl'.
97842         * modules/atanl-tests: New file.
97843         * tests/test-atanl.c: New file.
97845         Tests for module 'asinl'.
97846         * modules/asinl-tests: New file.
97847         * tests/test-asinl.c: New file.
97849         Tests for module 'acosl'.
97850         * modules/acosl-tests: New file.
97851         * tests/test-acosl.c: New file.
97853         New modules acosl, asinl, atanl, cosl, expl, logl, sinl, sqrtl, tanl.
97854         * lib/math.in.h (acosl, asinl, atanl, cosl, expl, logl, sinl, sqrtl,
97855         tanl): Use the standard gnulib idiom.
97856         * lib/cosl.c: Don't include trigl.c and sincosl.c.
97857         * lib/sinl.c: Likewise.
97858         * lib/tanl.c: Don't include trigl.c.
97859         (kernel_tanl): Make static.
97860         * lib/sincosl.c: Include trigl.h first.
97861         * lib/trigl.c: Likewise.
97862         * m4/acosl.m4: New file.
97863         * m4/asinl.m4: New file.
97864         * m4/atanl.m4: New file.
97865         * m4/cosl.m4: New file.
97866         * m4/expl.m4: New file.
97867         * m4/logl.m4: New file.
97868         * m4/sinl.m4: New file.
97869         * m4/sqrtl.m4: New file.
97870         * m4/tanl.m4: New file.
97871         * m4/mathl.m4: Remove file.
97872         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_* and HAVE_*
97873         variables for acosl, asinl, atanl, cosl, expl, logl, sinl, sqrtl, tanl.
97874         Don't initialize GNULIB_MATHL.
97875         * modules/acosl: New file.
97876         * modules/asinl: New file.
97877         * modules/atanl: New file.
97878         * modules/cosl: New file.
97879         * modules/expl: New file.
97880         * modules/logl: New file.
97881         * modules/sinl: New file.
97882         * modules/sqrtl: New file.
97883         * modules/tanl: New file.
97884         * modules/math (Makefile.am): Substitute GNULIB_* and HAVE_* variables
97885         for acosl, asinl, atanl, cosl, expl, logl, sinl, sqrtl, tanl. Don't
97886         substitute GNULIB_MATHL.
97887         * modules/mathl: Rewritten.
97888         * doc/posix-functions/acosl.texi: Mention the 'acosl' module.
97889         * doc/posix-functions/asinl.texi: Mention the 'asinl' module.
97890         * doc/posix-functions/atanl.texi: Mention the 'atanl' module.
97891         * doc/posix-functions/cosl.texi: Mention the 'cosl' module.
97892         * doc/posix-functions/expl.texi: Mention the 'expl' module.
97893         * doc/posix-functions/logl.texi: Mention the 'logl' module.
97894         * doc/posix-functions/sinl.texi: Mention the 'sinl' module.
97895         * doc/posix-functions/sqrtl.texi: Mention the 'sqrtl' module.
97896         * doc/posix-functions/tanl.texi: Mention the 'tanl' module.
97898 2010-01-18  Bruno Haible  <bruno@clisp.org>
97900         sqrt: Make gl_FUNC_SQRT requirable.
97901         * m4/sqrt.m4: New file.
97902         * modules/sqrt (Files): Add it.
97903         (configure.ac): Invoke gl_FUNC_SQRT.
97905 2010-01-18  Bruno Haible  <bruno@clisp.org>
97907         New modules for common <math.h> functions.
97908         * m4/mathfunc.m4: New file.
97909         * modules/acos: New file.
97910         * modules/asin: New file.
97911         * modules/atan: New file.
97912         * modules/atan2: New file.
97913         * modules/cbrt: New file.
97914         * modules/copysign: New file.
97915         * modules/cos: New file.
97916         * modules/cosh: New file.
97917         * modules/erf: New file.
97918         * modules/erfc: New file.
97919         * modules/exp: New file.
97920         * modules/fabs: New file.
97921         * modules/fmod: New file.
97922         * modules/hypot: New file.
97923         * modules/j0: New file.
97924         * modules/j1: New file.
97925         * modules/jn: New file.
97926         * modules/ldexp: New file.
97927         * modules/lgamma: New file.
97928         * modules/log: New file.
97929         * modules/log10: New file.
97930         * modules/log1p: New file.
97931         * modules/logb: New file.
97932         * modules/modf: New file.
97933         * modules/nextafter: New file.
97934         * modules/pow: New file.
97935         * modules/remainder: New file.
97936         * modules/rint: New file.
97937         * modules/sin: New file.
97938         * modules/sinh: New file.
97939         * modules/sqrt: New file.
97940         * modules/tan: New file.
97941         * modules/tanh: New file.
97942         * modules/y0: New file.
97943         * modules/y1: New file.
97944         * modules/yn: New file.
97945         * doc/posix-functions/acos.texi: Mention the 'acos' module.
97946         * doc/posix-functions/asin.texi: Mention the 'asin' module.
97947         * doc/posix-functions/atan.texi: Mention the 'atan' module.
97948         * doc/posix-functions/atan2.texi: Mention the 'atan2' module.
97949         * doc/posix-functions/cbrt.texi: Mention the 'cbrt' module.
97950         * doc/posix-functions/copysign.texi: Mention the 'copysign' module.
97951         * doc/posix-functions/cos.texi: Mention the 'cos' module.
97952         * doc/posix-functions/cosh.texi: Mention the 'cosh' module.
97953         * doc/posix-functions/erf.texi: Mention the 'erf' module.
97954         * doc/posix-functions/erfc.texi: Mention the 'erfc' module.
97955         * doc/posix-functions/exp.texi: Mention the 'exp' module.
97956         * doc/posix-functions/fabs.texi: Mention the 'fabs' module.
97957         * doc/posix-functions/fmod.texi: Mention the 'fmod' module.
97958         * doc/posix-functions/hypot.texi: Mention the 'hypot' module.
97959         * doc/posix-functions/j0.texi: Mention the 'j0' module.
97960         * doc/posix-functions/j1.texi: Mention the 'j1' module.
97961         * doc/posix-functions/jn.texi: Mention the 'jn' module.
97962         * doc/posix-functions/ldexp.texi: Mention the 'ldexp' module.
97963         * doc/posix-functions/lgamma.texi: Mention the 'lgamma' module.
97964         * doc/posix-functions/log.texi: Mention the 'log' module.
97965         * doc/posix-functions/log10.texi: Mention the 'log10' module.
97966         * doc/posix-functions/log1p.texi: Mention the 'log1p' module.
97967         * doc/posix-functions/logb.texi: Mention the 'logb' module.
97968         * doc/posix-functions/modf.texi: Mention the 'modf' module.
97969         * doc/posix-functions/nextafter.texi: Mention the 'nextafter' module.
97970         * doc/posix-functions/pow.texi: Mention the 'pow' module.
97971         * doc/posix-functions/remainder.texi: Mention the 'remainder' module.
97972         * doc/posix-functions/rint.texi: Mention the 'rint' module.
97973         * doc/posix-functions/sin.texi: Mention the 'sin' module.
97974         * doc/posix-functions/sinh.texi: Mention the 'sinh' module.
97975         * doc/posix-functions/sqrt.texi: Mention the 'sqrt' module.
97976         * doc/posix-functions/tan.texi: Mention the 'tan' module.
97977         * doc/posix-functions/tanh.texi: Mention the 'tanh' module.
97978         * doc/posix-functions/y0.texi: Mention the 'y0' module.
97979         * doc/posix-functions/y1.texi: Mention the 'y1' module.
97980         * doc/posix-functions/yn.texi: Mention the 'yn' module.
97982 2010-01-18  Jim Meyering  <meyering@redhat.com>
97984         ignore-value: relax license to LGPLv2+
97985         * modules/ignore-value (License): Relax to LGPLv2+.
97987         getdate: don't leak when TZ contains two or more '"'s
97988         * lib/getdate.y (get_date): Don't leak a copy of TZ for each
97989         double quote in TZ after the first one.
97991         readtokens: do not leak internal token_lengths buffer
97992         * lib/readtokens.c (readtokens): Free the local, lengths,
97993         when the supplied "token_lengths" parameter is NULL.
97995 2010-01-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
97997         Fix a couple of missing LIBTHREAD link failures on AIX.
97998         * modules/git-merge-changelog (git_merge_changelog_LDADD): Add
97999         $(LIBTHREAD).
98000         * modules/strsignal-tests (test_strsignal_LDADD): Likewise.
98002         Link test-poll against INET_PTON_LIB.
98003         * modules/poll-tests (test_poll_LDADD): Add $(INET_PTON_LIB),
98004         for inet_pton on Solaris 10.
98006 2010-01-17  Bruno Haible  <bruno@clisp.org>
98008         unistdio/*-sprintf: Fix typo in module description.
98009         * modules/unistdio/u8-sprintf (Depends-on): Fix typo.
98010         * modules/unistdio/u8-u8-sprintf (Depends-on): Likewise.
98011         * modules/unistdio/u16-sprintf (Depends-on): Likewise.
98012         * modules/unistdio/u16-u16-sprintf (Depends-on): Likewise.
98013         * modules/unistdio/u32-sprintf (Depends-on): Likewise.
98014         * modules/unistdio/u32-u32-sprintf (Depends-on): Likewise.
98015         * modules/unistdio/ulc-sprintf (Depends-on): Likewise.
98016         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
98018 2010-01-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
98020         gnulib-tool: fix filelist for AIX, HP-UX ksh.
98021         * gnulib-tool (func_filter_filelist): Do not quote possibly-empty
98022         variables in shell case patterns, for AIX and HP-UX ksh.
98024         Split large sed scripts, for HP-UX sed.
98025         * modules/stdio: Split sed scripts around 50 sed commands,
98026         to avoid HP-UX limit of 99 commands, in the near future.
98027         * modules/string: Likewise.
98028         * modules/unistd: Likewise.
98030         gnulib-tool: avoid writing in the current directory.
98031         * gnulib-tool (func_emit_lib_Makefile_am)
98032         (func_emit_tests_Makefile_am): Put temporary files in $tmp,
98033         not in the current directory, so concurrent gnulib-tool
98034         instances do not interfere.
98036 2010-01-16  Jim Meyering  <meyering@redhat.com>
98038         doc: update users.txt
98039         * users.txt: Add grep.
98040         (diffutils, gzip): Update URLs.
98042 2010-01-12  Bruno Haible  <bruno@clisp.org>
98044         posix_spawn: Avoid test failure on Cygwin.
98045         * tests/test-posix_spawn3.c (DATA_FILENAME) [CYGWIN]: Use less risky
98046         characters.
98047         Reported by Simon Josefsson.
98049 2010-01-12  Bruno Haible  <bruno@clisp.org>
98051         * tests/test-cond.c (main): When skipping the test, show the reason.
98053 2010-01-12  Simon Josefsson  <simon@josefsson.org>
98055         * lib/striconv.c (str_cd_iconv): Avoid if before free.
98057 2010-01-12  Simon Josefsson  <simon@josefsson.org>
98059         * top/maint.mk (VC_LIST_EXCEPT): Filter list through
98060         VC_LIST_ALWAYS_EXCLUDE_REGEX.
98062 2010-01-12  Eric Blake  <ebb9@byu.net>
98064         build: guarantee AS_VAR_IF
98065         * m4/warnings.m4 (gl_WARN_ADD): Use autoconf name.
98066         (gl_AS_VAR_IF): Move...
98067         * m4/gnulib-common.m4 (AS_VAR_IF): ...here.
98068         Reported by Simon Josefsson.
98070 2010-01-12  Simon Josefsson  <simon@josefsson.org>
98072         * lib/stdio.in.h: Fix typo.
98074 2010-01-12  Simon Josefsson  <simon@josefsson.org>
98076         * m4/gc.m4: Check if linking to libgcrypt also needs linking to
98077         libgpg-error.
98079 2010-01-12  Simon Josefsson  <simon@josefsson.org>
98081         * tests/test-xalloc-die.sh: Use $EXEEXT.
98083 2010-01-12  Simon Josefsson  <simon@josefsson.org>
98084             Bruno Haible  <bruno@clisp.org>
98086         getlogin, getlogin_r: Avoid test failure.
98087         * tests/test-getlogin.c: Include <stdio.h>.
98088         (main): Skip the test when the function fails because stdin is not a
98089         tty.
98090         * tests/test-getlogin_r.c: Include <stdio.h>.
98091         (main): Skip the test when the function fails because stdin is not a
98092         tty.
98094 2010-01-11  Eric Blake  <ebb9@byu.net>
98096         tests: avoid more large file warnings
98097         * tests/test-fflush.c: Avoid warning about ftell use.
98098         * tests/test-fseek.c: Avoid warning about fseek use.
98100 2010-01-10  Bruno Haible  <bruno@clisp.org>
98102         nproc: Work better on Linux when /proc and /sys are not mounted.
98103         * lib/nproc.c (num_processors): Use num_processors_via_affinity_mask ()
98104         as lower bound when, on glibc/Linux systems,
98105         sysconf (_SC_NPROCESSORS_CONF) returns 1.
98106         Suggested by Pádraig Brady <P@draigbrady.com>.
98107         Reported by Dmitry V. Levin <ldv@altlinux.org>.
98109         nproc: Refactor.
98110         * lib/nproc.c (num_processors_via_affinity_mask): New function,
98111         extracted from num_processors.
98112         (num_processors): Call it.
98114 2010-01-11  Jim Meyering  <meyering@redhat.com>
98116         utimecmp: avoid new warning from upcoming gcc-4.5.0
98117         * lib/utimecmp.c (BILLION): Define using #define rather than an
98118         anonymous enum, to placate upcoming gcc-4.5.0's -Wenum-compare.
98120 2010-01-11  Eric Blake  <ebb9@byu.net>
98122         math: add portability warnings for classification macros
98123         * modules/math (Depends-on): Add warn-on-use.
98124         (Makefile.am): Provide new substitutions.
98125         * m4/math_h.m4 (gl_MATH_H): Require inline.
98126         * lib/math.in.h (_GL_WARN_REAL_FLOATING_DECL)
98127         (_GL_WARN_REAL_FLOATING_IMPL): New helper macros.
98128         (isfinite, isinf, isnan, signbit) [GNULIB_POSIXCHECK]: Use them to
98129         implement warnings.
98131         unistd: warn on use of environ without module
98132         * modules/unistd (Depends-on): Add warn-on-use.
98133         (Makefile.am): Provide new substitutions.
98134         * m4/unistd_h.m4 (gl_UNISTD_H): Check for inline and environ.
98135         * lib/unistd.in.h (environ): Wrap with a warning helper function.
98137         stdio: warn on suspicious uses
98138         * modules/stdio (Depends-on): Add warn-on-use.
98139         (Makefile.am): Provide new substitutions.
98140         * m4/stdio_h.m4 (gl_STDIO_H): Check for inline, ftello, and
98141         fseeko.
98142         * lib/stdio.in.h (gets): Always warn on use.
98143         (fseek, ftell): Adjust when warnings are issued, and honor
98144         _GL_NO_LARGE_FILES as a way to silence the warning.
98145         * tests/test-fpurge.c [!GNULIB_FSEEK]: Use new means to squelch
98146         any warning about large file offsets.
98147         * tests/test-freadable.c [!GNULIB_FSEEK]: Likewise.
98148         * tests/test-freading.c [!GNULIB_FSEEK]: Likewise.
98149         * tests/test-fseeko.c [!GNULIB_FSEEK]: Likewise.
98150         * tests/test-ftell.c [!GNULIB_FSEEK]: Likewise.
98151         * tests/test-ftello.c [!GNULIB_FSEEK]: Likewise.
98152         * tests/test-fwritable.c [!GNULIB_FSEEK]: Likewise.
98153         * tests/test-fwriting.c [!GNULIB_FSEEK]: Likewise.
98154         * tests/test-getopt.c [!GNULIB_FTELL]: Likewise.
98156         warn-on-use: new module
98157         * modules/warn-on-use: New file.
98158         * build-aux/warn-on-use.h: Likewise.
98159         * m4/warn-on-use.m4: Likewise.
98160         * MODULES.html.sh (Support for building): Mention it.
98162 2010-01-10  Bruno Haible  <bruno@clisp.org>
98164         Tests for module 'unistr/u32-strdup'.
98165         * modules/unistr/u32-strdup-tests: New file.
98166         * tests/unistr/test-u32-strdup.c: New file.
98168         Tests for module 'unistr/u16-strdup'.
98169         * modules/unistr/u16-strdup-tests: New file.
98170         * tests/unistr/test-u16-strdup.c: New file.
98172         Tests for module 'unistr/u8-strdup'.
98173         * modules/unistr/u8-strdup-tests: New file.
98174         * tests/unistr/test-u8-strdup.c: New file.
98175         * tests/unistr/test-strdup.h: New file.
98177         Tests for module 'unistr/u32-strncmp'.
98178         * modules/unistr/u32-strncmp-tests: New file.
98179         * tests/unistr/test-u32-strncmp.c: New file.
98181         Tests for module 'unistr/u16-strncmp'.
98182         * modules/unistr/u16-strncmp-tests: New file.
98183         * tests/unistr/test-u16-strncmp.c: New file.
98185         Tests for module 'unistr/u8-strncmp'.
98186         * modules/unistr/u8-strncmp-tests: New file.
98187         * tests/unistr/test-u8-strncmp.c: New file.
98188         * tests/unistr/test-strncmp.h: New file.
98190         Tests for module 'unistr/u32-strcoll'.
98191         * modules/unistr/u32-strcoll-tests: New file.
98192         * tests/unistr/test-u32-strcoll.c: New file.
98194         Tests for module 'unistr/u16-strcoll'.
98195         * modules/unistr/u16-strcoll-tests: New file.
98196         * tests/unistr/test-u16-strcoll.c: New file.
98198         Tests for module 'unistr/u8-strcoll'.
98199         * modules/unistr/u8-strcoll-tests: New file.
98200         * tests/unistr/test-u8-strcoll.c: New file.
98202         Tests for module 'unistr/u32-strcmp'.
98203         * modules/unistr/u32-strcmp-tests: New file.
98204         * tests/unistr/test-u32-strcmp.c: New file.
98205         * tests/unistr/test-u32-strcmp.h: New file.
98207         Tests for module 'unistr/u16-strcmp'.
98208         * modules/unistr/u16-strcmp-tests: New file.
98209         * tests/unistr/test-u16-strcmp.c: New file.
98210         * tests/unistr/test-u16-strcmp.h: New file.
98212         Tests for module 'unistr/u8-strcmp'.
98213         * modules/unistr/u8-strcmp-tests: New file.
98214         * tests/unistr/test-u8-strcmp.c: New file.
98215         * tests/unistr/test-u8-strcmp.h: New file.
98216         * tests/unistr/test-strcmp.h: New file.
98218         Tests for module 'unistr/u32-strncat'.
98219         * modules/unistr/u32-strncat-tests: New file.
98220         * tests/unistr/test-u32-strncat.c: New file.
98222         Tests for module 'unistr/u16-strncat'.
98223         * modules/unistr/u16-strncat-tests: New file.
98224         * tests/unistr/test-u16-strncat.c: New file.
98226         Tests for module 'unistr/u8-strncat'.
98227         * modules/unistr/u8-strncat-tests: New file.
98228         * tests/unistr/test-u8-strncat.c: New file.
98229         * tests/unistr/test-strncat.h: New file.
98231         Tests for module 'unistr/u32-strcat'.
98232         * modules/unistr/u32-strcat-tests: New file.
98233         * tests/unistr/test-u32-strcat.c: New file.
98235         Tests for module 'unistr/u16-strcat'.
98236         * modules/unistr/u16-strcat-tests: New file.
98237         * tests/unistr/test-u16-strcat.c: New file.
98239         Tests for module 'unistr/u8-strcat'.
98240         * modules/unistr/u8-strcat-tests: New file.
98241         * tests/unistr/test-u8-strcat.c: New file.
98242         * tests/unistr/test-strcat.h: New file.
98244         Tests for module 'unistr/u32-stpncpy'.
98245         * modules/unistr/u32-stpncpy-tests: New file.
98246         * tests/unistr/test-u32-stpncpy.c: New file.
98248         Tests for module 'unistr/u16-stpncpy'.
98249         * modules/unistr/u16-stpncpy-tests: New file.
98250         * tests/unistr/test-u16-stpncpy.c: New file.
98252         Tests for module 'unistr/u8-stpncpy'.
98253         * modules/unistr/u8-stpncpy-tests: New file.
98254         * tests/unistr/test-u8-stpncpy.c: New file.
98255         * tests/unistr/test-stpncpy.h: New file.
98257         Tests for module 'unistr/u32-strncpy'.
98258         * modules/unistr/u32-strncpy-tests: New file.
98259         * tests/unistr/test-u32-strncpy.c: New file.
98261         Tests for module 'unistr/u16-strncpy'.
98262         * modules/unistr/u16-strncpy-tests: New file.
98263         * tests/unistr/test-u16-strncpy.c: New file.
98265         Tests for module 'unistr/u8-strncpy'.
98266         * modules/unistr/u8-strncpy-tests: New file.
98267         * tests/unistr/test-u8-strncpy.c: New file.
98268         * tests/unistr/test-strncpy.h: New file.
98270         Tests for module 'unistr/u32-stpcpy'.
98271         * modules/unistr/u32-stpcpy-tests: New file.
98272         * tests/unistr/test-u32-stpcpy.c: New file.
98274         Tests for module 'unistr/u16-stpcpy'.
98275         * modules/unistr/u16-stpcpy-tests: New file.
98276         * tests/unistr/test-u16-stpcpy.c: New file.
98278         Tests for module 'unistr/u8-stpcpy'.
98279         * modules/unistr/u8-stpcpy-tests: New file.
98280         * tests/unistr/test-u8-stpcpy.c: New file.
98281         * tests/unistr/test-stpcpy.h: New file.
98283         Tests for module 'unistr/u32-strcpy'.
98284         * modules/unistr/u32-strcpy-tests: New file.
98285         * tests/unistr/test-u32-strcpy.c: New file.
98287         Tests for module 'unistr/u16-strcpy'.
98288         * modules/unistr/u16-strcpy-tests: New file.
98289         * tests/unistr/test-u16-strcpy.c: New file.
98291         Tests for module 'unistr/u8-strcpy'.
98292         * modules/unistr/u8-strcpy-tests: New file.
98293         * tests/unistr/test-u8-strcpy.c: New file.
98294         * tests/unistr/test-strcpy.h: New file.
98296         Tests for module 'unistr/u32-strnlen'.
98297         * modules/unistr/u32-strnlen-tests: New file.
98298         * tests/unistr/test-u32-strnlen.c: New file.
98300         Tests for module 'unistr/u16-strnlen'.
98301         * modules/unistr/u16-strnlen-tests: New file.
98302         * tests/unistr/test-u16-strnlen.c: New file.
98304         Tests for module 'unistr/u8-strnlen'.
98305         * modules/unistr/u8-strnlen-tests: New file.
98306         * tests/unistr/test-u8-strnlen.c: New file.
98307         * tests/unistr/test-strnlen.h: New file.
98309         Tests for module 'unistr/u32-strlen'.
98310         * modules/unistr/u32-strlen-tests: New file.
98311         * tests/unistr/test-u32-strlen.c: New file.
98313         Tests for module 'unistr/u16-strlen'.
98314         * modules/unistr/u16-strlen-tests: New file.
98315         * tests/unistr/test-u16-strlen.c: New file.
98317         Tests for module 'unistr/u8-strlen'.
98318         * modules/unistr/u8-strlen-tests: New file.
98319         * tests/unistr/test-u8-strlen.c: New file.
98321         Tests for module 'unistr/u32-prev'.
98322         * modules/unistr/u32-prev-tests: New file.
98323         * tests/unistr/test-u32-prev.c: New file.
98325         Tests for module 'unistr/u16-prev'.
98326         * modules/unistr/u16-prev-tests: New file.
98327         * tests/unistr/test-u16-prev.c: New file.
98329         Tests for module 'unistr/u8-prev'.
98330         * modules/unistr/u8-prev-tests: New file.
98331         * tests/unistr/test-u8-prev.c: New file.
98333         Tests for module 'unistr/u32-next'.
98334         * modules/unistr/u32-next-tests: New file.
98335         * tests/unistr/test-u32-next.c: New file.
98337         Tests for module 'unistr/u16-next'.
98338         * modules/unistr/u16-next-tests: New file.
98339         * tests/unistr/test-u16-next.c: New file.
98341         Tests for module 'unistr/u8-next'.
98342         * modules/unistr/u8-next-tests: New file.
98343         * tests/unistr/test-u8-next.c: New file.
98345         Tests for module 'unistr/u32-strmbtouc'.
98346         * modules/unistr/u32-strmbtouc-tests: New file.
98347         * tests/unistr/test-u32-strmbtouc.c: New file.
98349         Tests for module 'unistr/u16-strmbtouc'.
98350         * modules/unistr/u16-strmbtouc-tests: New file.
98351         * tests/unistr/test-u16-strmbtouc.c: New file.
98353         Tests for module 'unistr/u8-strmbtouc'.
98354         * modules/unistr/u8-strmbtouc-tests: New file.
98355         * tests/unistr/test-u8-strmbtouc.c: New file.
98357         Tests for module 'unistr/u32-strmblen'.
98358         * modules/unistr/u32-strmblen-tests: New file.
98359         * tests/unistr/test-u32-strmblen.c: New file.
98361         Tests for module 'unistr/u16-strmblen'.
98362         * modules/unistr/u16-strmblen-tests: New file.
98363         * tests/unistr/test-u16-strmblen.c: New file.
98365         Tests for module 'unistr/u8-strmblen'.
98366         * modules/unistr/u8-strmblen-tests: New file.
98367         * tests/unistr/test-u8-strmblen.c: New file.
98369         Tests for module 'unistr/u32-cpy-alloc'.
98370         * modules/unistr/u32-cpy-alloc-tests: New file.
98371         * tests/unistr/test-u32-cpy-alloc.c: New file.
98373         Tests for module 'unistr/u16-cpy-alloc'.
98374         * modules/unistr/u16-cpy-alloc-tests: New file.
98375         * tests/unistr/test-u16-cpy-alloc.c: New file.
98377         Tests for module 'unistr/u8-cpy-alloc'.
98378         * modules/unistr/u8-cpy-alloc-tests: New file.
98379         * tests/unistr/test-u8-cpy-alloc.c: New file.
98380         * tests/unistr/test-cpy-alloc.h: New file.
98382         Tests for module 'unistr/u32-mbsnlen'.
98383         * modules/unistr/u32-mbsnlen-tests: New file.
98384         * tests/unistr/test-u32-mbsnlen.c: New file.
98386         Tests for module 'unistr/u16-mbsnlen'.
98387         * modules/unistr/u16-mbsnlen-tests: New file.
98388         * tests/unistr/test-u16-mbsnlen.c: New file.
98390         Tests for module 'unistr/u8-mbsnlen'.
98391         * modules/unistr/u8-mbsnlen-tests: New file.
98392         * tests/unistr/test-u8-mbsnlen.c: New file.
98394         Tests for module 'unistr/u32-chr'.
98395         * modules/unistr/u32-chr-tests: New file.
98396         * tests/unistr/test-u32-chr.c: New file.
98398         Tests for module 'unistr/u16-chr'.
98399         * modules/unistr/u16-chr-tests: New file.
98400         * tests/unistr/test-u16-chr.c: New file.
98402         Tests for module 'unistr/u8-chr'.
98403         * modules/unistr/u8-chr-tests: New file.
98404         * tests/unistr/test-u8-chr.c: New file.
98405         * tests/unistr/test-chr.h: New file, based on tests/test-memchr.c.
98407         Tests for module 'unistr/u32-cmp2'.
98408         * modules/unistr/u32-cmp2-tests: New file.
98409         * tests/unistr/test-u32-cmp2.c: New file.
98411         Tests for module 'unistr/u16-cmp2'.
98412         * modules/unistr/u16-cmp2-tests: New file.
98413         * tests/unistr/test-u16-cmp2.c: New file.
98415         Tests for module 'unistr/u8-cmp2'.
98416         * modules/unistr/u8-cmp2-tests: New file.
98417         * tests/unistr/test-u8-cmp2.c: New file.
98418         * tests/unistr/test-cmp2.h: New file, based on tests/unistr/test-cmp.h.
98420         Tests for module 'unistr/u32-cmp'.
98421         * modules/unistr/u32-cmp-tests: New file.
98422         * tests/unistr/test-u32-cmp.c: New file.
98424         Tests for module 'unistr/u16-cmp'.
98425         * modules/unistr/u16-cmp-tests: New file.
98426         * tests/unistr/test-u16-cmp.c: New file.
98428         Tests for module 'unistr/u8-cmp'.
98429         * modules/unistr/u8-cmp-tests: New file.
98430         * tests/unistr/test-u8-cmp.c: New file.
98431         * tests/unistr/test-cmp.h: New file, based on tests/test-memcmp.c.
98433         Tests for module 'unistr/u32-set'.
98434         * modules/unistr/u32-set-tests: New file.
98435         * tests/unistr/test-u32-set.c: New file.
98437         Tests for module 'unistr/u16-set'.
98438         * modules/unistr/u16-set-tests: New file.
98439         * tests/unistr/test-u16-set.c: New file.
98441         Tests for module 'unistr/u8-set'.
98442         * modules/unistr/u8-set-tests: New file.
98443         * tests/unistr/test-u8-set.c: New file.
98444         * tests/unistr/test-set.h: New file.
98446         Tests for module 'unistr/u32-move'.
98447         * modules/unistr/u32-move-tests: New file.
98448         * tests/unistr/test-u32-move.c: New file.
98450         Tests for module 'unistr/u16-move'.
98451         * modules/unistr/u16-move-tests: New file.
98452         * tests/unistr/test-u16-move.c: New file.
98454         Tests for module 'unistr/u8-move'.
98455         * modules/unistr/u8-move-tests: New file.
98456         * tests/unistr/test-u8-move.c: New file.
98457         * tests/unistr/test-move.h: New file.
98459         Tests for module 'unistr/u32-cpy'.
98460         * modules/unistr/u32-cpy-tests: New file.
98461         * tests/unistr/test-u32-cpy.c: New file.
98463         Tests for module 'unistr/u16-cpy'.
98464         * modules/unistr/u16-cpy-tests: New file.
98465         * tests/unistr/test-u16-cpy.c: New file.
98467         Tests for module 'unistr/u8-cpy'.
98468         * modules/unistr/u8-cpy-tests: New file.
98469         * tests/unistr/test-u8-cpy.c: New file.
98470         * tests/unistr/test-cpy.h: New file.
98472 2010-01-09  Bruno Haible  <bruno@clisp.org>
98474         Tests for module 'unistr/u32-uctomb'.
98475         * modules/unistr/u32-uctomb-tests: New file.
98476         * tests/unistr/test-u32-uctomb.c: New file.
98478         Tests for module 'unistr/u16-uctomb'.
98479         * modules/unistr/u16-uctomb-tests: New file.
98480         * tests/unistr/test-u16-uctomb.c: New file.
98482         Tests for module 'unistr/u8-uctomb'.
98483         * modules/unistr/u8-uctomb-tests: New file.
98484         * tests/unistr/test-u8-uctomb.c: New file.
98486         Tests for module 'unistr/u32-mbtoucr'.
98487         * modules/unistr/u32-mbtoucr-tests: New file.
98488         * tests/unistr/test-u32-mbtoucr.c: New file.
98490         Tests for module 'unistr/u16-mbtoucr'.
98491         * modules/unistr/u16-mbtoucr-tests: New file.
98492         * tests/unistr/test-u16-mbtoucr.c: New file.
98494         Tests for module 'unistr/u8-mbtoucr'.
98495         * modules/unistr/u8-mbtoucr-tests: New file.
98496         * tests/unistr/test-u8-mbtoucr.c: New file.
98498         Tests for module 'unistr/u32-mbtouc'.
98499         * modules/unistr/u32-mbtouc-tests: New file.
98500         * tests/unistr/test-u32-mbtouc.c: New file.
98502         Tests for module 'unistr/u16-mbtouc'.
98503         * modules/unistr/u16-mbtouc-tests: New file.
98504         * tests/unistr/test-u16-mbtouc.c: New file.
98506         Tests for module 'unistr/u8-mbtouc'.
98507         * modules/unistr/u8-mbtouc-tests: New file.
98508         * tests/unistr/test-u8-mbtouc.c: New file.
98510         Tests for module 'unistr/u32-mbtouc-unsafe'.
98511         * modules/unistr/u32-mbtouc-unsafe-tests: New file.
98512         * tests/unistr/test-u32-mbtouc-unsafe.c: New file.
98513         * tests/unistr/test-u32-mbtouc.h: New file.
98515         Tests for module 'unistr/u16-mbtouc-unsafe'.
98516         * modules/unistr/u16-mbtouc-unsafe-tests: New file.
98517         * tests/unistr/test-u16-mbtouc-unsafe.c: New file.
98518         * tests/unistr/test-u16-mbtouc.h: New file.
98520         Tests for module 'unistr/u8-mbtouc-unsafe'.
98521         * modules/unistr/u8-mbtouc-unsafe-tests: New file.
98522         * tests/unistr/test-u8-mbtouc-unsafe.c: New file.
98523         * tests/unistr/test-u8-mbtouc.h: New file.
98525         Tests for module 'unistr/u32-mblen'.
98526         * modules/unistr/u32-mblen-tests: New file.
98527         * tests/unistr/test-u32-mblen.c: New file.
98529         Tests for module 'unistr/u16-mblen'.
98530         * modules/unistr/u16-mblen-tests: New file.
98531         * tests/unistr/test-u16-mblen.c: New file.
98533         Tests for module 'unistr/u8-mblen'.
98534         * modules/unistr/u8-mblen-tests: New file.
98535         * tests/unistr/test-u8-mblen.c: New file.
98537         Tests for module 'unistr/u32-to-u16'.
98538         * modules/unistr/u32-to-u16-tests: New file.
98539         * tests/unistr/test-u32-to-u16.c: New file.
98541         Tests for module 'unistr/u32-to-u8'.
98542         * modules/unistr/u32-to-u8-tests: New file.
98543         * tests/unistr/test-u32-to-u8.c: New file.
98545         Tests for module 'unistr/u16-to-u32'.
98546         * modules/unistr/u16-to-u32-tests: New file.
98547         * tests/unistr/test-u16-to-u32.c: New file.
98549         Tests for module 'unistr/u16-to-u8'.
98550         * modules/unistr/u16-to-u8-tests: New file.
98551         * tests/unistr/test-u16-to-u8.c: New file.
98553         Tests for module 'unistr/u8-to-u32'.
98554         * modules/unistr/u8-to-u32-tests: New file.
98555         * tests/unistr/test-u8-to-u32.c: New file.
98557         Tests for module 'unistr/u8-to-u16'.
98558         * modules/unistr/u8-to-u16-tests: New file.
98559         * tests/unistr/test-u8-to-u16.c: New file.
98561         Tests for module 'unistr/u32-check'.
98562         * modules/unistr/u32-check-tests: New file.
98563         * tests/unistr/test-u32-check.c: New file.
98565         Tests for module 'unistr/u16-check'.
98566         * modules/unistr/u16-check-tests: New file.
98567         * tests/unistr/test-u16-check.c: New file.
98569         Tests for module 'unistr/u8-check'.
98570         * modules/unistr/u8-check-tests: New file.
98571         * tests/unistr/test-u8-check.c: New file.
98573         * tests/unictype/test-categ_byname.c: Include <stdbool.h>.
98574         (category_equals): New function.
98575         (main): Add more tests.
98576         * modules/unictype/category-byname-tests (Depends-on): Add stdbool.
98578         * tests/unictype/test-bidi_byname.c (main): Add more tests.
98580 2010-01-10  Bruno Haible  <bruno@clisp.org>
98582         unistr/u*-strcoll: Try harder to distinguish different strings.
98583         * lib/unistr/u-strcoll.h (FUNC): When sl1 and sl2 are the same,
98584         compare s1 and s2 to see if they are different.
98586 2010-01-10  Bruno Haible  <bruno@clisp.org>
98588         unistr/u*-stpncpy: Fix the return value.
98589         * lib/unistr.h (u8_stpncpy, u16_stpncpy, u32_stpncpy): Make the
98590         description of the return value consistent with stpncpy in glibc.
98591         * lib/unistr/u-stpncpy.h (FUNC): Return the pointer past the last
98592         written non-NUL unit.
98594 2010-01-10  Bruno Haible  <bruno@clisp.org>
98596         unistr/u*-next: Add missing dependencies.
98597         * modules/unistr/u8-next (Depends-on): Add unistr/u8-strmbtouc.
98598         * modules/unistr/u16-next (Depends-on): Add unistr/u16-strmbtouc.
98599         * modules/unistr/u32-next (Depends-on): Add unistr/u32-strmbtouc.
98601 2010-01-10  Bruno Haible  <bruno@clisp.org>
98603         unistr/u8-mbsnlen: Fix return value for incomplete character.
98604         * lib/unistr/u8-mbsnlen.c (u8_mbsnlen): Use u8_mbtoucr instead of
98605         u8_mblen.
98606         * modules/unistr/u8-mbsnlen (Depends-on): Add unistr/u8-mbtoucr.
98607         Remove unistr/u8-mblen.
98608         * lib/unistr/u16-mbsnlen.c (u16_mbsnlen): Use u16_mbtoucr instead of
98609         u16_mblen.
98610         * modules/unistr/u16-mbsnlen (Depends-on): Add unistr/u16-mbtoucr.
98611         Remove unistr/u16-mblen.
98613 2010-01-10  Bruno Haible  <bruno@clisp.org>
98615         wchar: Fix compilation error when <wchar.h> is used from coreutils.
98616         * lib/wchar.in.h: Treat __need_wint_t like __need_mbstate_t.
98617         Reported by Brian Gough <bjg@gnu.org> and
98618         Chris Clayton <chris2553@googlemail.com> via
98619         Mike Frysinger <vapier@gentoo.org> and Jim Meyering <jim@meyering.net>.
98621 2010-01-09  Bruno Haible  <bruno@clisp.org>
98623         unistr/u16-to-u32: Reject invalid input.
98624         * lib/unistr/u16-to-u32.c (u16_to_u32): Call u16_mbtoucr instead of
98625         u16_mbtouc.
98626         * modules/unistr/u16-to-u32 (Depends-on): Add unistr/u16-mbtoucr.
98627         Remove unistr/u16-mbtouc.
98629         unistr/u16-to-u8: Reject invalid input.
98630         * lib/unistr/u16-to-u8.c (u16_to_u8): Call u16_mbtoucr instead of
98631         u16_mbtouc.
98632         * modules/unistr/u16-to-u8 (Depends-on): Add unistr/u16-mbtoucr.
98633         Remove unistr/u16-mbtouc.
98635         unistr/u8-to-u32: Reject invalid input.
98636         * lib/unistr/u8-to-u32.c (u8_to_u32): Call u8_mbtoucr instead of
98637         u8_mbtouc.
98638         * modules/unistr/u8-to-u32 (Depends-on): Add unistr/u8-mbtoucr.
98639         Remove unistr/u8-mbtouc.
98641         unistr/u8-to-u16: Reject invalid input.
98642         * lib/unistr/u8-to-u16.c (u8_to_u16): Call u8_mbtoucr instead of
98643         u8_mbtouc.
98644         * modules/unistr/u8-to-u16 (Depends-on): Add unistr/u8-mbtoucr.
98645         Remove unistr/u8-mbtouc.
98647 2010-01-09  Bruno Haible  <bruno@clisp.org>
98649         Tests for module 'getlogin'.
98650         * modules/getlogin-tests: New file.
98651         * tests/test-getlogin.c: New file.
98653         New module 'getlogin'.
98654         * lib/unistd.in.h (getlogin): New declaration.
98655         * lib/getlogin.c: New file.
98656         * m4/getlogin.m4: New file.
98657         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_GETLOGIN,
98658         HAVE_GETLOGIN.
98659         * modules/unistd (Makefile.am): Substitute GNULIB_GETLOGIN,
98660         HAVE_GETLOGIN.
98661         * modules/getlogin: New file.
98662         * doc/posix-functions/getlogin.texi: Mention the new module.
98663         Reported by John W. Eaton <jwe@gnu.org>.
98665 2010-01-09  Bruno Haible  <bruno@clisp.org>
98667         getlogin_r: Support for native Windows.
98668         * lib/getlogin_r.c: Include <windows.h>
98669         (getlogin_r): Implement for native Windows.
98670         * tests/test-getlogin_r.c (main): Also test with a huge buffer.
98671         Reported by Tatsuro MATSUOKA <tmacchant5@yahoo.co.jp>
98672         via John W. Eaton <jwe@gnu.org>.
98674 2010-01-09  Bruno Haible  <bruno@clisp.org>
98676         getlogin_r: Small fixes.
98677         * lib/getlogin_r.c (getlogin_r): Don't set errno if the function
98678         succeeds.
98679         * m4/getlogin_r.m4 (gl_GETLOGIN_R): Require gl_USE_SYSTEM_EXTENSIONS
98680         before testing whether getlogin_r is declared. No need to set
98681         HAVE_DECL_GETLOGIN_R to 1.
98682         (gl_PREREQ_GETLOGIN_R): Don't check for the getlogin_r declaration.
98684 2010-01-09  Bruno Haible  <bruno@clisp.org>
98686         * lib/unistd.in.h (getlogin_r): Add comment.
98688 2010-01-09  Bruno Haible  <bruno@clisp.org>
98690         Tests for module 'getlogin_r'.
98691         * modules/getlogin_r-tests: New file.
98692         * tests/test-getlogin_r.c: New file.
98694 2010-01-09  Jim Meyering  <meyering@redhat.com>
98696         maint.mk: extend proper_name_utf8-vs-LIBICONV-checking rule
98697         * top/maint.mk (sc_proper_name_utf8_requires_ICONV): Adapt to work
98698         also when $(LIBICONV) is part of LDADD, rather than ${prog}_LDADD.
98700 2010-01-08  Simon Josefsson  <simon@josefsson.org>
98702         * lib/dup2.c (rpl_dup2): Improve comment.
98704 2010-01-08  Eric Blake  <ebb9@byu.net>
98706         maint.mk: allow packages to add makefile @@ exceptions
98707         * top/maint.mk (_makefile_at_at_check_exceptions): New hook.
98708         (sc_makefile_check): Rename...
98709         (sc_makefile_at_at_check): ...to this, and use hook.
98711         dup2: work around mingw bug
98712         * lib/dup2.c (rpl_dup2): Sanitize return value on mingw.
98713         Reported by Simon Josefsson.
98715 2010-01-07  John W. Eaton  <jwe@octave.org>  (tiny change)
98717         glob: Fix C++ compilation.
98718         * lib/glob.in.h [__cplusplus]: Define __BEGIN_DECLS and __END_DECLS for
98719         C++.
98721 2010-01-07  Bruno Haible  <bruno@clisp.org>
98723         Fix indentation of wctype.in.h, broken since 2007-01-06.
98724         * lib/wctype.in.h: Fix indentation of preprocessor directives.
98726 2010-01-07  Bruno Haible  <bruno@clisp.org>
98728         mbslen: Avoid collision with system function.
98729         * lib/string.in.h [MirBSD]: Include <wchar.h>.
98730         (mbslen): Undefine first. Alias mbslen to rpl_mbslen.
98731         * m4/mbslen.m4: New file.
98732         * modules/mbslen (Files): Add it.
98733         (configure.ac): Invoke gl_MBSLEN.
98734         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize HAVE_MBSLEN.
98735         * modules/string (Makefile.am): Substitute HAVE_MBSLEN.
98736         Reported by Nelson H. F. Beebe <beebe@math.utah.edu>
98737         via Ian Beckwith <ianb@erislabs.net>.
98739 2010-01-07  Bruno Haible  <bruno@clisp.org>
98741         dirent: Document the last fix.
98742         * doc/posix-headers/dirent.texi: Document the bug of missing 'ino_t'.
98744 2010-01-07  Bruno Haible  <bruno@clisp.org>
98746         stdio: Ensure <stdio.h> defines off_t, ssize_t, va_list.
98747         * lib/stdio.in.h: Include <sys/types.h> unconditionally.
98748         * tests/test-stdio.c: Verify that fpos_t, off_t, size_t, ssize_t,
98749         va_list are defined.
98750         * doc/posix-headers/stdio.texi: Document the bug of missing types.
98751         Reported by Eric Blake.
98753 2010-01-07  Bruno Haible  <bruno@clisp.org>
98755         xlist, xoset: Fix missing dependency bug, introduced on 2009-12-13.
98756         * modules/xlist (Depends-on): Add 'list',
98757         * modules/xoset (Depends-on): Add 'oset'.
98758         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
98760 2010-01-07  Bruno Haible  <bruno@clisp.org>
98762         * doc/posix-functions/strcasecmp.texi: Clarify the platforms.
98763         * doc/posix-functions/strncasecmp.texi: Likewise.
98765 2010-01-07  Bruno Haible  <bruno@clisp.org>
98767         * m4/nl_langinfo.m4 (gl_FUNC_NL_LANGINFO): Simplify logic.
98769 2010-01-07  John W. Eaton  <jwe@octave.org>
98771         wctype: allow C++ use
98772         * lib/wctype.in.h: Add extern "C" block for C++.
98774 2010-01-06  Eric Blake  <ebb9@byu.net>
98776         maint.mk: detect incorrect GFDL usage
98777         * top/maint.mk (_GFDL_regexp, sc_GFDL_version): New rule.
98779 2010-01-06  Jim Meyering  <meyering@redhat.com>
98780         and Eric Blake  <ebb9@byu.net>
98782         maint.mk: ignore multi-line copyright in NEWS
98783         * top/maint.mk (NEWS_hash): Add immunity to multi-line copyright.
98785 2010-01-06  Eric Blake  <ebb9@byu.net>
98787         select: add missing dependency
98788         * modules/select-tests (Depends-on): Move sockets dependency...
98789         * modules/select (Depends-on): ...here.
98790         Reported by Ian Beckwith.
98792         doc: regenerate INSTALL
98793         * doc/INSTALL: Reflect recent autoconf update.
98794         * doc/INSTALL.ISO: Likewise.
98795         * doc/INSTALL.UTF-8: Likewise.
98797         pread: fix compilation on glibc
98798         * m4/pread.m4 (gl_FUNC_PREAD): Request all interfaces.
98799         Reported by Ralf Wildenhues.
98801         dirent: fix test failure
98802         * lib/dirent.in.h (includes): Guarantee ino_t.
98803         Reported by Ralf Wildenhues.
98805 2010-01-06  Petr Salinger  <Petr.Salinger@seznam.cz>  (tiny change)
98807         linkat, renameat: avoid bad free
98808         * lib/at-func2.c (at_func2): Fix typo.
98809         Reported via Ian Beckwith, from http://bugs.debian.org/561117.
98811 2010-01-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
98813         cleanup after gl_FUNC_READLINK, for gl_FUNC_SYMLINK test
98814         * m4/readlink.m4 (gl_FUNC_READLINK): Remove conftest.lnk2,
98815         to avoid failure of symlink test later.
98817 2010-01-06  Eric Blake  <ebb9@byu.net>
98819         stdio, unistd: guarantee ssize_t
98820         * lib/unistd.in.h (includes): Ensure that types required by POSIX
98821         2008 are exposed when needed.
98822         * lib/stdio.in.h (includes): Likewise.
98823         Reported by Ralf Wildenhues.
98825 2010-01-06  Paolo Bonzini  <bonzini@gnu.org>
98827         nl_langinfo: do not call AC_CHECK_FUNC_ONCE inside if.
98828         * m4/nl_langinfo.m4 (gl_FUNC_NL_LANGINFO): Do not call
98829         AC_CHECK_FUNC_ONCE inside if, do not adjust ac_cv_func_nl_langinfo.
98831 2010-01-06  Jim Meyering  <meyering@redhat.com>
98833         readtokens: this module *does* require xalloc.h
98834         It uses only functions that were omitted by the old syntax-check rule.
98835         * lib/readtokens.c: Include "xalloc.h" once again.
98836         * modules/readtokens (Depends-on): Add xalloc.
98837         This reverts part of 0e0f8f12ec241c0f1c1f21f960bb5cf908a0fa3c.
98839 2010-01-05  Eric Blake  <ebb9@byu.net>
98841         maint: support 'make announcement' from a VPATH build
98842         * top/maint.mk (announcement): Look for correct NEWS file.
98844 2010-01-05  Aurelien Jarno  <aurelien@aurel32.net>  (tiny change)
98846         utimens (fdutimens): ignore a negative FD, per contract
98847         * lib/utimens.c (fdutimens) [HAVE_FUTIMENS]: Call futimens only
98848         when we have a valid file descriptor.  Otherwise, using a brand
98849         new glibc (with just-patched futimens that now fails with EBADF)
98850         would cause this function to fail with ENOSYS.
98851         Reported by Guillaume Ayoub in http://bugs.debian.org/563726.
98852         See also http://bugzilla.redhat.com/552320.
98854 2010-01-05  Eric Blake  <ebb9@byu.net>
98856         strcase: document what it provides
98857         * doc/posix-functions/strcasecmp.texi (strcasecmp): Mention the
98858         gnulib module.
98859         * doc/posix-functions/strncasecmp.texi (strncasecmp): Likewise.
98860         Reported by Dilyan Palauzov <Dilyan.Palauzov@aegee.org>.
98862 2010-01-05  Jim Meyering  <meyering@redhat.com>
98864         maint: remove useless inclusions of "xalloc.h"
98865         * lib/getloadavg.c: Remove useless inclusion of "xalloc.h".
98866         * lib/readtokens.c: Likewise.
98867         * lib/same.c: Likewise.
98868         * modules/getloadavg (Depends-on): Remove xalloc.
98869         * modules/readtokens: Likewise.
98870         * modules/same: Likewise.
98872         maint.mk: include 4 more function names in alloca.h-checking regexp
98873         * top/maint.mk (sc_prohibit_xalloc_without_use): Use more complete
98874         regexp.  Before, we would give a false-positive (saying alloca.h
98875         is included unnecessarily) when the only uses involved omitted symbols.
98877         xalloc.h: use consistent formatting
98878         * lib/xalloc.h: Move declarations to start in the first column.
98880 2010-01-05  Eric Blake  <ebb9@byu.net>
98882         mkdir: avoid xalloc
98883         * lib/mkdir.c (includes): Drop unused header.
98884         Reported by John W. Eaton.
98886 2010-01-04  Jim Meyering  <meyering@redhat.com>
98888         nl_langinfo: avoid configure-time syntax error
98889         * m4/nl_langinfo.m4 (gl_FUNC_NL_LANGINFO): When we've already tested
98890         for nl_langinfo.h, AC_CHECK_FUNCS_ONCE([nl_langinfo]) expands to
98891         the empty string.  Don't let that provoke a shell syntax error.
98893         regcomp, regexec, fnmatch: avoid array bounds read error
98894         * lib/regcomp.c (build_equiv_class): From glibc:
98895         Use only the low 24 bits of a findidx return value as an index
98896         into the weights array.  Patch by Ulrich Drepper:
98897         http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commit;h=b7d1c5fa30
98898         * lib/regexec.c (check_node_accept_bytes): Likewise.
98899         * lib/fnmatch_loop.c (FCT): Likewise.
98901         regcomp: skip collseq lookup when there are no rules
98902         * lib/regcomp.c (lookup_collation_sequence_value): From glibc:
98903         http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a532a41df58
98905         regcomp: recognize ill-formed { } expressions
98906         * lib/regcomp.c (parse_dup_op): From glibc:
98907         http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a87cd2894cb
98909         regcomp: fix typo in comment
98910         * lib/regcomp.c (duplicate_node_closure): Sync from glibc.
98911         s/satisfy/satisfies/.
98913         regcomp: sync from glibc: remove dead store
98914         * lib/regcomp.c (duplicate_node_closure): Remove useless
98915         search_duplicated_node call and dead store.
98917         regcomp: sync from glibc; always use nl_langinfo
98918         * lib/regcomp.c (init_dfa) [!LIBC]: Always use nl_langinfo (CODESET),
98919         now that gnulib provides it.  Recognize UTF8 as well as UTF-8.
98920         * modules/regex (Depends-on): Add nl_langinfo.
98922 2010-01-04  Eric Blake  <ebb9@byu.net>
98924         fdopendir: fix configure test
98925         * m4/fdopendir.m4 (gl_FUNC_FDOPENDIR): Check for existing file.
98927 2010-01-01  Bruno Haible  <bruno@clisp.org>
98929         wchar: Remove unused configure check.
98930         * m4/wchar.m4 (gl_WCHAR_H): Don't test whether <wchar.h> is standalone.
98932 2010-01-01  Eric Blake  <ebb9@byu.net>
98934         headers: make check of system header explicit
98935         * m4/netdb_h.m4 (gl_HEADER_NETDB): Don't exploit knowledge of
98936         gl_CHECK_NEXT_HEADER internals, but call AC_CHECK_HEADERS_ONCE
98937         ourselves.
98938         * m4/search_h.m4 (gl_SEARCH_H): Likewise.
98939         * m4/sys_select_h.m4 (gl_HEADER_SYS_SELECT): Likewise.
98940         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Likewise.
98941         * m4/inttypes.m4 (gl_INTTYPES_H): Likewise, for gt_INTTYPES_PRI
98942         internals.
98943         * m4/wchar.m4 (gl_WCHAR_H): Skip followup test if header is
98944         missing.
98945         Suggested by Bruno Haible.
98947 2010-01-01  Jim Meyering  <meyering@redhat.com>
98949         ChangeLog: tweak to eliminate unnecessary copyright line
98950         * ChangeLog: Remove a copyright line that was mistakenly updated
98951         by today's update-copyright run.  Reported by Eric Blake.
98953         test-update-copyright: don't let envvar setting cause test failure
98954         * tests/test-update-copyright.sh: Set UPDATE_COPYRIGHT_MAX_LINE_LENGTH.
98956 2010-01-01  Bruno Haible  <bruno@clisp.org>
98958         localename: Avoid gcc warning.
98959         * lib/localename.c (gl_locale_name_thread_unsafe): Don't define this
98960         function if it is not used.
98962 2010-01-01  Jim Meyering  <meyering@redhat.com>
98964         update nearly all FSF copyright year lists to include 2010
98965         Use the same procedure as for 2009, outlined in
98966         http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/20081
98968         version-etc: set COPYRIGHT_YEAR to 2010
98969         * lib/version-etc.c (COPYRIGHT_YEAR): Manually update the enum.
98971 2009-12-31  Eric Blake  <ebb9@byu.net>
98973         doc: correct availability of cygwin 1.5.x getopt
98974         * doc/posix-functions/optarg.texi (optarg): Cygwin supplies getopt
98975         variables.
98976         * doc/posix-functions/opterr.texi (opterr): Likewise.
98977         * doc/posix-functions/optind.texi (optind): Likewise.
98978         * doc/posix-functions/optopt.texi (optopt): Likewise.
98979         * doc/posix-functions/tzname.texi (tzname): Likewise.
98981         openat: update maintainer
98982         * modules/openat (Maintainer): Add myself.
98984         utimens: avoid shadowing warning
98985         * lib/utimens.c (fdutimens, lutimens): Consolidate separate stat
98986         buffers into one, to avoid shadowing, as well as avoiding a
98987         redundant stat.
98988         Reported by Jim Meyering.
98990         test-dup2: avoid compiler warning
98991         * tests/test-dup2.c (is_inheritable): Only define if used.
98993 2010-01-01  Bruno Haible  <bruno@clisp.org>
98995         vasnprintf: Avoid passing an 'rpl_mbstate_t *' to the system's wcrtomb.
98996         * lib/vasnprintf.c (VASNPRINTF): If GNULIB_defined_mbstate_t is
98997         defined, use wctomb instead of wcrtomb.
98999 2010-01-01  Bruno Haible  <bruno@clisp.org>
99001         iconv: Reject native Solaris iconv.
99002         * m4/iconv.m4 (AM_ICONV_LINK): Recognize native Solaris iconv() bug.
99003         * doc/posix-functions/iconv.texi: Document native Solaris iconv() bug.
99005 2009-12-31  Bruno Haible  <bruno@clisp.org>
99007         * tests/test-signal.c (main): Remove test of 'SIG'.
99009 2009-12-31  Bruno Haible  <bruno@clisp.org>
99011         spawn: Fix incomplete fix.
99012         * lib/spawn.in.h (posix_spawnattr_getflags, posix_spawnattr_setflags,
99013         posix_spawnattr_getpgroup, posix_spawnattr_setpgroup): Correct the link
99014         warnings for GNULIB_POSIXCHECK again.
99015         Reported by Eric Blake.
99017 2009-12-31  Bruno Haible  <bruno@clisp.org>
99019         Avoid namespace pollution on glibc systems.
99020         * lib/spawn.in.h: Don't include <sched.h>, <signal.h> on glibc systems.
99021         * lib/sys_times.in.h: Don't include <time.h> on glibc systems.
99022         * lib/wchar.in.h: Don't include <stddef.h>, <stdio.h>, <time.h> on
99023         glibc systems.
99025 2009-12-31  Bruno Haible  <bruno@clisp.org>
99027         * m4/wchar.m4 (gl_WCHAR_H): Remove gl_STDDEF_H invocation.
99028         (gl_REPLACE_WCHAR_H): Turn into a no-op.
99029         * m4/arpa_inet_h.m4 (gl_REPLACE_ARPA_INET_H): Likewise.
99030         * m4/dirent_h.m4 (gl_REPLACE_DIRENT_H): Likewise.
99031         * m4/locale_h.m4 (gl_REPLACE_LOCALE_H): Likewise.
99032         * m4/spawn_h.m4 (gl_REPLACE_SPAWN_H): Likewise.
99033         * m4/sys_ioctl_h.m4 (gl_REPLACE_SYS_IOCTL_H): Likewise.
99035 2009-12-31  Bruno Haible  <bruno@clisp.org>
99037         * m4/sys_select_h.m4 (gl_HEADER_SYS_SELECT): Invoke
99038         gl_CHECK_NEXT_HEADERS before testing ac_cv_header_sys_select_h, not
99039         afterwards.
99041 2009-12-31  Bruno Haible  <bruno@clisp.org>
99043         * m4/sys_utsname_h.m4 (gl_SYS_UTSNAME_H_DEFAULTS): Don't set
99044         SYS_UTSNAME_H.
99046 2009-12-31  Bruno Haible  <bruno@clisp.org>
99048         spawn: Fix misapplied patch.
99049         * lib/spawn.in.h (posix_spawnattr_getflags, posix_spawnattr_setflags,
99050         posix_spawnattr_getpgroup, posix_spawnattr_setpgroup): Correct the link
99051         warnings for GNULIB_POSIXCHECK.
99053 2009-12-31  Bruno Haible  <bruno@clisp.org>
99055         times: Update after sys_times changed.
99056         * m4/times.m4: New file, extracted from modules/times. Set HAVE_TIMES.
99057         * modules/times (Files): Add it.
99058         (configure.ac): Invoke gl_FUNC_TIMES.
99060 2009-12-31  Bruno Haible  <bruno@clisp.org>
99062         Use AC_C_INLINE where necessary.
99063         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Require AC_C_INLINE.
99064         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Likewise.
99065         * m4/fts.m4 (gl_FUNC_FTS_CORE): Likewise.
99066         * m4/mbchar.m4 (gl_MBCHAR): Likewise.
99067         * m4/mbfile.m4 (gl_MBFILE): Likewise.
99068         * m4/mbiter.m4 (gl_MBITER): Likewise.
99069         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
99070         * m4/stat.m4 (gl_FUNC_STAT): Likewise.
99071         * m4/wait-process.m4 (gl_WAIT_PROCESS): Likewise.
99072         * modules/u64 (configure.ac): Likewise.
99074 2009-12-31  Bruno Haible  <bruno@clisp.org>
99076         Use AC_C_INLINE instead of module 'inline' where possible.
99077         * modules/inline (Description): Clarify purpose.
99078         * m4/count-one-bits.m4 (gl_COUNT_ONE_BITS): Require AC_C_INLINE.
99079         * modules/count-one-bits (Depends-on): Remove inline.
99080         * m4/openat.m4 (gl_PREREQ_OPENAT): Require AC_C_INLINE.
99081         * modules/openat (Depends-on): Remove inline.
99082         * modules/fdutimensat (Depends-on, configure.ac): Require AC_C_INLINE
99083         instead of depending on module 'inline'.
99084         * modules/filevercmp (Depends-on, configure.ac): Likewise.
99085         * modules/unicase/cased (Depends-on, configure.ac): Likewise.
99086         * modules/unicase/ignorable (Depends-on, configure.ac): Likewise.
99087         * modules/unictype/category-of (Depends-on, configure.ac): Likewise.
99088         * modules/unictype/category-test (Depends-on, configure.ac): Likewise.
99089         * modules/unictype/ctype-alnum (Depends-on, configure.ac): Likewise.
99090         * modules/unictype/ctype-alpha (Depends-on, configure.ac): Likewise.
99091         * modules/unictype/ctype-blank (Depends-on, configure.ac): Likewise.
99092         * modules/unictype/ctype-cntrl (Depends-on, configure.ac): Likewise.
99093         * modules/unictype/ctype-digit (Depends-on, configure.ac): Likewise.
99094         * modules/unictype/ctype-graph (Depends-on, configure.ac): Likewise.
99095         * modules/unictype/ctype-lower (Depends-on, configure.ac): Likewise.
99096         * modules/unictype/ctype-print (Depends-on, configure.ac): Likewise.
99097         * modules/unictype/ctype-punct (Depends-on, configure.ac): Likewise.
99098         * modules/unictype/ctype-space (Depends-on, configure.ac): Likewise.
99099         * modules/unictype/ctype-upper (Depends-on, configure.ac): Likewise.
99100         * modules/unictype/ctype-xdigit (Depends-on, configure.ac): Likewise.
99101         * modules/unictype/property-alphabetic (Depends-on, configure.ac):
99102         Likewise.
99103         * modules/unictype/property-ascii-hex-digit (Depends-on,
99104         configure.ac): Likewise.
99105         * modules/unictype/property-bidi-arabic-digit (Depends-on,
99106         configure.ac): Likewise.
99107         * modules/unictype/property-bidi-arabic-right-to-left (Depends-on,
99108         configure.ac): Likewise.
99109         * modules/unictype/property-bidi-block-separator (Depends-on,
99110         configure.ac): Likewise.
99111         * modules/unictype/property-bidi-boundary-neutral (Depends-on,
99112         configure.ac): Likewise.
99113         * modules/unictype/property-bidi-common-separator (Depends-on,
99114         configure.ac): Likewise.
99115         * modules/unictype/property-bidi-control (Depends-on, configure.ac):
99116         Likewise.
99117         * modules/unictype/property-bidi-embedding-or-override (Depends-on,
99118         configure.ac): Likewise.
99119         * modules/unictype/property-bidi-eur-num-separator (Depends-on,
99120         configure.ac): Likewise.
99121         * modules/unictype/property-bidi-eur-num-terminator (Depends-on,
99122         configure.ac): Likewise.
99123         * modules/unictype/property-bidi-european-digit (Depends-on,
99124         configure.ac): Likewise.
99125         * modules/unictype/property-bidi-hebrew-right-to-left (Depends-on,
99126         configure.ac): Likewise.
99127         * modules/unictype/property-bidi-left-to-right (Depends-on,
99128         configure.ac): Likewise.
99129         * modules/unictype/property-bidi-non-spacing-mark (Depends-on,
99130         configure.ac): Likewise.
99131         * modules/unictype/property-bidi-other-neutral (Depends-on,
99132         configure.ac): Likewise.
99133         * modules/unictype/property-bidi-pdf (Depends-on, configure.ac):
99134         Likewise.
99135         * modules/unictype/property-bidi-segment-separator (Depends-on,
99136         configure.ac): Likewise.
99137         * modules/unictype/property-bidi-whitespace (Depends-on,
99138         configure.ac): Likewise.
99139         * modules/unictype/property-combining (Depends-on, configure.ac):
99140         Likewise.
99141         * modules/unictype/property-composite (Depends-on, configure.ac):
99142         Likewise.
99143         * modules/unictype/property-currency-symbol (Depends-on,
99144         configure.ac): Likewise.
99145         * modules/unictype/property-dash (Depends-on, configure.ac): Likewise.
99146         * modules/unictype/property-decimal-digit (Depends-on, configure.ac):
99147         Likewise.
99148         * modules/unictype/property-default-ignorable-code-point (Depends-on,
99149         configure.ac): Likewise.
99150         * modules/unictype/property-deprecated (Depends-on, configure.ac):
99151         Likewise.
99152         * modules/unictype/property-diacritic (Depends-on, configure.ac):
99153         Likewise.
99154         * modules/unictype/property-extender (Depends-on, configure.ac):
99155         Likewise.
99156         * modules/unictype/property-format-control (Depends-on, configure.ac):
99157         Likewise.
99158         * modules/unictype/property-grapheme-base (Depends-on, configure.ac):
99159         Likewise.
99160         * modules/unictype/property-grapheme-extend (Depends-on, configure.ac):
99161         Likewise.
99162         * modules/unictype/property-grapheme-link (Depends-on, configure.ac):
99163         Likewise.
99164         * modules/unictype/property-hex-digit (Depends-on, configure.ac):
99165         Likewise.
99166         * modules/unictype/property-hyphen (Depends-on, configure.ac):
99167         Likewise.
99168         * modules/unictype/property-id-continue (Depends-on, configure.ac):
99169         Likewise.
99170         * modules/unictype/property-id-start (Depends-on, configure.ac):
99171         Likewise.
99172         * modules/unictype/property-ideographic (Depends-on, configure.ac):
99173         Likewise.
99174         * modules/unictype/property-ids-binary-operator (Depends-on,
99175         configure.ac): Likewise.
99176         * modules/unictype/property-ids-trinary-operator (Depends-on,
99177         configure.ac): Likewise.
99178         * modules/unictype/property-ignorable-control (Depends-on,
99179         configure.ac): Likewise.
99180         * modules/unictype/property-iso-control (Depends-on, configure.ac):
99181         Likewise.
99182         * modules/unictype/property-join-control (Depends-on, configure.ac):
99183         Likewise.
99184         * modules/unictype/property-left-of-pair (Depends-on, configure.ac):
99185         Likewise.
99186         * modules/unictype/property-line-separator (Depends-on, configure.ac):
99187         Likewise.
99188         * modules/unictype/property-logical-order-exception (Depends-on,
99189         configure.ac): Likewise.
99190         * modules/unictype/property-lowercase (Depends-on, configure.ac):
99191         Likewise.
99192         * modules/unictype/property-math (Depends-on, configure.ac): Likewise.
99193         * modules/unictype/property-non-break (Depends-on, configure.ac):
99194         Likewise.
99195         * modules/unictype/property-not-a-character (Depends-on, configure.ac):
99196         Likewise.
99197         * modules/unictype/property-numeric (Depends-on, configure.ac):
99198         Likewise.
99199         * modules/unictype/property-other-alphabetic (Depends-on,
99200         configure.ac): Likewise.
99201         * modules/unictype/property-other-default-ignorable-code-point
99202         (Depends-on, configure.ac): Likewise.
99203         * modules/unictype/property-other-grapheme-extend (Depends-on,
99204         configure.ac): Likewise.
99205         * modules/unictype/property-other-id-continue (Depends-on,
99206         configure.ac): Likewise.
99207         * modules/unictype/property-other-id-start (Depends-on, configure.ac):
99208         Likewise.
99209         * modules/unictype/property-other-lowercase (Depends-on, configure.ac):
99210         Likewise.
99211         * modules/unictype/property-other-math (Depends-on, configure.ac):
99212         Likewise.
99213         * modules/unictype/property-other-uppercase (Depends-on, configure.ac):
99214         Likewise.
99215         * modules/unictype/property-paired-punctuation (Depends-on,
99216         configure.ac): Likewise.
99217         * modules/unictype/property-paragraph-separator (Depends-on,
99218         configure.ac): Likewise.
99219         * modules/unictype/property-pattern-syntax (Depends-on, configure.ac):
99220         Likewise.
99221         * modules/unictype/property-pattern-white-space (Depends-on,
99222         configure.ac): Likewise.
99223         * modules/unictype/property-private-use (Depends-on, configure.ac):
99224         Likewise.
99225         * modules/unictype/property-punctuation (Depends-on, configure.ac):
99226         Likewise.
99227         * modules/unictype/property-quotation-mark (Depends-on, configure.ac):
99228         Likewise.
99229         * modules/unictype/property-radical (Depends-on, configure.ac):
99230         Likewise.
99231         * modules/unictype/property-sentence-terminal (Depends-on,
99232         configure.ac): Likewise.
99233         * modules/unictype/property-soft-dotted (Depends-on, configure.ac):
99234         Likewise.
99235         * modules/unictype/property-space (Depends-on, configure.ac): Likewise.
99236         * modules/unictype/property-terminal-punctuation (Depends-on,
99237         configure.ac): Likewise.
99238         * modules/unictype/property-titlecase (Depends-on, configure.ac):
99239         Likewise.
99240         * modules/unictype/property-unassigned-code-value (Depends-on,
99241         configure.ac): Likewise.
99242         * modules/unictype/property-unified-ideograph (Depends-on,
99243         configure.ac): Likewise.
99244         * modules/unictype/property-uppercase (Depends-on, configure.ac):
99245         Likewise.
99246         * modules/unictype/property-variation-selector (Depends-on,
99247         configure.ac): Likewise.
99248         * modules/unictype/property-white-space (Depends-on, configure.ac):
99249         Likewise.
99250         * modules/unictype/property-xid-continue (Depends-on, configure.ac):
99251         Likewise.
99252         * modules/unictype/property-xid-start (Depends-on, configure.ac):
99253         Likewise.
99254         * modules/unictype/property-zero-width (Depends-on, configure.ac):
99255         Likewise.
99256         * modules/unictype/syntax-c-ident (Depends-on, configure.ac): Likewise.
99257         * modules/unictype/syntax-java-ident (Depends-on, configure.ac):
99258         Likewise.
99260 2009-12-31  Bruno Haible  <bruno@clisp.org>
99262         Remove unnecessary AC_C_INLINE invocation.
99263         * m4/popen.m4 (gl_PREREQ_POPEN): Don't invoke AC_C_INLINE. Not needed
99264         since 2009-08-21.
99266 2009-12-31  Jim Meyering  <meyering@redhat.com>
99268         maint.mk: don't require explicit gpg_key_ID in cfg.mk
99269         * top/maint.mk (gpg_key_ID): Derive key ID from signed release tag.
99270         With this change, we can all remove the gpg_key_ID = ... definition
99271         from our respective cfg.mk files.
99273         maint.mk: create announcement template in ~/, not in /tmp
99274         * top/maint.mk (emit_upload_commands): Adjust.
99275         (release-prep): Emit into ~/announce-..., not /tmp/announce-...
99276         Remove temporary file, .ci-msg.
99278 2009-12-31  Eric Blake  <ebb9@byu.net>
99280         link-warning: always build headers with link warnings
99281         * modules/arpa_inet (Makefile.am): Always build replacement
99282         header.
99283         * modules/ctype (Makefile.am): Likewise.
99284         * modules/dirent (Makefile.am): Likewise.
99285         * modules/inttypes (Makefile.am): Likewise.
99286         * modules/langinfo (Makefile.am): Likewise.
99287         * modules/locale (Makefile.am): Likewise.
99288         * modules/spawn (Makefile.am): Likewise.
99289         * modules/sys_file (Makefile.am): Likewise.
99290         * modules/sys_ioctl (Makefile.am): Likewise.
99291         * modules/sys_select (Makefile.am): Likewise.
99292         * modules/sys_socket (Makefile.am): Likewise.
99293         * modules/sys_times (Makefile.am): Likewise.
99294         * modules/sys_utsname (Makefile.am): Likewise.
99295         * modules/sys_wait (Makefile.am): Likewise.
99296         * modules/wchar (Makefile.am): Likewise.
99297         * m4/arpa_inet_h.m4 (gl_HEADER_ARPA_INET)
99298         (gl_ARPA_INET_H_DEFAULTS): Drop unneeded variable.
99299         * m4/ctype.m4 (gl_CTYPE_H_DEFAULTS): Likewise.
99300         * m4/isblank.m4 (gl_FUNC_ISBLANK): Likewise.
99301         * m4/dirent_h.m4 (gl_REPLACE_DIRENT_H, gl_DIRENT_H_DEFAULTS):
99302         Likewise.
99303         * m4/inttypes.m4 (gl_INTTYPES_H): Likewise.
99304         * m4/langinfo_h.m4 (gl_LANGINFO_H): Likewise.
99305         * m4/locale_h.m4 (gl_REPLACE_LOCALE_H, gl_LOCALE_H_DEFAULTS):
99306         Likewise.
99307         * m4/spawn_h.m4 (gl_REPLACE_SPAWN_H, gl_SPAWN_H_DEFAULTS):
99308         Likewise.
99309         * m4/sys_file_h.m4 (gl_HEADER_SYS_FILE_H): Likewise.
99310         * m4/sys_ioctl_h.m4 (gl_SYS_IOCTL_H, gl_REPLACE_SYS_IOCTL_H)
99311         (gl_SYS_IOCTL_H_DEFAULTS): Likewise.
99312         * m4/sys_select_h.m4 (gl_HEADER_SYS_SELECT): Likewise.
99313         * m4/sys_times_h.m4 (gl_SYS_TIMES_H): Likewise.
99314         * m4/sys_utsname_h.m4 (gl_SYS_UTSNAME_H)
99315         (gl_SYS_UTSNAME_H_DEFAULTS): Likewise.
99316         * m4/wchar.m4 (gl_WCHAR_H, gl_REPLACE_WCHAR_H)
99317         (gl_WCHAR_H_DEFAULTS): Likewise.
99319 2009-12-31  Eric Blake  <ebb9@byu.net>
99321         signal, spawn: use link warnings
99322         * lib/signal.in.h (sigset_t): Make unconditional.
99323         (sigismember, sigemptyset, sigaddset, sigdelset, sigfillset)
99324         (sigpending, sigprocmask, sigaction): Add link warnings.
99325         * lib/spawn.in.h (posix_spawn, posix_spawnp, posix_spawnattr_init)
99326         (posix_spawnattr_destroy, posix_spawnattr_getsigdefault)
99327         (posix_spawnattr_setsigdefault, posix_spawnattr_getsigmask)
99328         (posix_spawnattr_setsigmask, posix_spawnattr_getflags)
99329         (posix_spawnattr_setflags, posix_spawnattr_getpgroup)
99330         (posix_spawnattr_setpgroup, posix_spawnattr_getschedpolicy)
99331         (posix_spawnattr_setschedpolicy, posix_spawnattr_getschedparam)
99332         (posix_spawnattr_setschedparam, posix_spawn_file_actions_init)
99333         (posix_spawn_file_actions_destroy)
99334         (posix_spawn_file_actions_addopen)
99335         (posix_spawn_file_actions_addclose)
99336         (posix_spawn_file_actions_adddup2): Likewise.
99337         * m4/signal_h.m4 (gl_SIGNAL_H): Guarantee uid_t.
99338         * tests/test-signal.c (main): Enhance test.
99340         spawn: improve wrapper support
99341         * m4/spawn_h.m4 (gl_SPAWN_H): Check for type existence.
99342         (gl_SPAWN_H_DEFAULTS): New defaults.
99343         * modules/spawn (Makefile.am): Substitute them.
99344         * lib/spawn.in.h: (posix_spawnattr_t, posix_spawn_file_actions_t):
99345         Only declare if missing or broken.
99347         sys_times, sys_utsname: use include_next
99348         * m4/sys_times_h.m4 (gl_SYS_TIMES_H): Support wrapping an existing
99349         header.
99350         (gl_SYS_TIMES_H_DEFAULTS): Add another variable.
99351         * m4/sys_utsname_h.m4 (gl_SYS_UTSNAME_H)
99352         (gl_SYS_UTSNAME_H_DEFAULTS): Likewise.
99353         * modules/sys_times (Depends-on): Add include_next.
99354         (Makefile.am): Substitute additional values.
99355         * modules/sys_utsname (Depends-on, Makefile.am): Likewise.
99356         * lib/sys_times.in.h (includes): Include native header, if
99357         available.
99358         * lib/sys_utsname.in.h (includes): Likewise.
99359         * tests/test-sys_times.c (main): Enhance test.
99361         fdutimensat: revert prior patch
99362         * modules/fdutimensat (Depends-on): Re-add inline; it is needed by
99363         utimens.h.
99364         Reported by Bruno Haible.
99366 2009-12-30  Eric Blake  <ebb9@byu.net>
99368         sys_wait: drop link-warning dependency
99369         * modules/sys_wait (Depends-on, Makefile.am): Drop unneeded
99370         link-warning efforts.
99371         * lib/sys_wait.in.h: Likewise.
99373         fdutimensat: remove bogus dependency
99374         * modules/fdutimensat (Depends-on): Drop inline.
99376         unistd: fix typo
99377         * lib/unistd.in.h (linkat) [GNULIB_POSIXCHECK]: Fix typo.
99379 2009-12-30  Bruno Haible  <bruno@clisp.org>
99381         Fix compilation error with Solaris cc.
99382         * lib/unicase/u8-is-invariant.c: Include <stdbool.h>.
99383         * lib/unicase/u16-is-invariant.c: Likewise.
99384         * lib/unicase/u32-is-invariant.c: Likewise.
99385         Reported by Nelson H. F. Beebe <beebe@math.utah.edu>.
99387 2009-12-30  Bruno Haible  <bruno@clisp.org>
99389         Fix test crash.
99390         * tests/test-localename.c (test_locale_name_thread): Skip unavailable
99391         locales.
99392         Reported by Simon Josefsson <simon@josefsson.org>.
99394 2009-12-30  Bruno Haible  <bruno@clisp.org>
99396         Fix compilation error on most platforms.
99397         * tests/test-localename.c (categories): Define only if HAVE_NEWLOCALE.
99398         Reported by Simon Josefsson <simon@josefsson.org>
99399         and Nelson H. F. Beebe <beebe@math.utah.edu>.
99401 2009-12-30  Eric Blake  <ebb9@byu.net>
99403         futimens, utimensat: work around ntfs-3g bug
99404         * lib/utimensat.c (rpl_utimensat): Drop attempts to cache whether
99405         a ctime bug is present, and expand workaround to cover ntfs-3g.
99406         * lib/utimens.c (fdutimens, lutimens): Likewise.
99407         (utimensat_ctime_really, detect_ctime_bug): Drop cache mechanism.
99408         (validate_timespec): Adjust return value.
99409         * m4/futimens.m4 (gl_FUNC_FUTIMENS): Update comment.
99410         * m4/utimensat.m4 (gl_FUNC_UTIMENSAT): Likewise.
99411         Reported by ctrn3e8 <ctrn3e8@gmail.com>.
99413 2009-12-29  Eric Blake  <ebb9@byu.net>
99415         link-warning: make usage consistent
99416         * modules/ctype (Depends-on): Add link-warning.
99417         (Makefile.am): Update rules accordingly.
99418         * modules/langinfo (Depends-on, Makefile.am): Likewise.
99419         * modules/locale (Depends-on, Makefile.am): Likewise.
99420         * modules/sys_file (Makefile.am): Likewise.
99421         * modules/getopt-posix (Makefile.am): Delete unused link warning
99422         efforts.
99423         * lib/ctype.in.h (GL_LINK_WARNING): Ensure definition before use.
99424         * lib/langinfo.in.h (GL_LINK_WARNING): Likewise.
99425         * lib/locale.in.h (GL_LINK_WARNING): Likewise.
99426         * lib/sys_file.in.h (GL_LINK_WARNING): Likewise.
99428         stdio: remove unused variables
99429         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Remove unused variables.
99430         * m4/fseeko.m4 (gl_FUNC_FSEEKO): Likewise.
99431         * m4/ftello.m4 (gl_FUNC_FTELLO): Likewise.
99433         tests: test more substitute headers
99434         * modules/ctype-tests: New file.
99435         * modules/dirent-tests: Likewise.
99436         * modules/spawn-tests: Likewise.
99437         * modules/sys_file-tests: Likewise.
99438         * modules/sys_ioctl-tests: Likewise.
99439         * modules/sys_wait-tests: Likewise.
99440         * tests/test-ctype.c: Likewise.
99441         * tests/test-dirent.c: Likewise.
99442         * tests/test-spawn.c: Likewise.
99443         * tests/test-sys_file.c: Likewise.
99444         * tests/test-sys_ioctl.c: Likewise.
99445         * tests/test-sys_wait.c: Likewise.
99446         * m4/spawn_h.m4 (gl_SPAWN_H): Replace header if it is missing.
99447         * lib/sys_file.in.h (LOCK_SH, LOCK_EX, LOCK_UN, LOCK_NB): Provide
99448         whether or not flock is in use.
99450         tests: remove License section from module
99451         * modules/arpa_inet-tests: Remove unneeded section.
99452         * modules/byteswap-tests: Likewise.
99453         * modules/ceilf-tests: Likewise.
99454         * modules/ceill-tests: Likewise.
99455         * modules/crypto/des-tests: Likewise.
99456         * modules/crypto/gc-arcfour-tests: Likewise.
99457         * modules/crypto/gc-arctwo-tests: Likewise.
99458         * modules/crypto/gc-des-tests: Likewise.
99459         * modules/crypto/gc-hmac-md5-tests: Likewise.
99460         * modules/crypto/gc-hmac-sha1-tests: Likewise.
99461         * modules/crypto/gc-md2-tests: Likewise.
99462         * modules/crypto/gc-md4-tests: Likewise.
99463         * modules/crypto/gc-md5-tests: Likewise.
99464         * modules/crypto/gc-pbkdf2-sha1-tests: Likewise.
99465         * modules/crypto/gc-rijndael-tests: Likewise.
99466         * modules/crypto/gc-sha1-tests: Likewise.
99467         * modules/crypto/gc-tests: Likewise.
99468         * modules/crypto/md2-tests: Likewise.
99469         * modules/crypto/md4-tests: Likewise.
99470         * modules/fcntl-h-tests: Likewise.
99471         * modules/floorf-tests: Likewise.
99472         * modules/floorl-tests: Likewise.
99473         * modules/frexp-nolibm-tests: Likewise.
99474         * modules/frexp-tests: Likewise.
99475         * modules/frexpl-nolibm-tests: Likewise.
99476         * modules/frexpl-tests: Likewise.
99477         * modules/getaddrinfo-tests: Likewise.
99478         * modules/inttypes-tests: Likewise.
99479         * modules/isfinite-tests: Likewise.
99480         * modules/isinf-tests: Likewise.
99481         * modules/ldexpl-tests: Likewise.
99482         * modules/locale-tests: Likewise.
99483         * modules/math-tests: Likewise.
99484         * modules/netdb-tests: Likewise.
99485         * modules/netinet_in-tests: Likewise.
99486         * modules/printf-frexp-tests: Likewise.
99487         * modules/printf-frexpl-tests: Likewise.
99488         * modules/priv-set-tests: Likewise.
99489         * modules/random_r-tests: Likewise.
99490         * modules/round-tests: Likewise.
99491         * modules/roundf-tests: Likewise.
99492         * modules/roundl-tests: Likewise.
99493         * modules/search-tests: Likewise.
99494         * modules/select-tests: Likewise.
99495         * modules/signal-tests: Likewise.
99496         * modules/stdbool-tests: Likewise.
99497         * modules/stddef-tests: Likewise.
99498         * modules/stdint-tests: Likewise.
99499         * modules/stdio-tests: Likewise.
99500         * modules/stdlib-tests: Likewise.
99501         * modules/string-tests: Likewise.
99502         * modules/strings-tests: Likewise.
99503         * modules/sys_select-tests: Likewise.
99504         * modules/sys_socket-tests: Likewise.
99505         * modules/sys_stat-tests: Likewise.
99506         * modules/sys_time-tests: Likewise.
99507         * modules/sys_utsname-tests: Likewise.
99508         * modules/sysexits-tests: Likewise.
99509         * modules/time-tests: Likewise.
99510         * modules/trunc-tests: Likewise.
99511         * modules/truncf-tests: Likewise.
99512         * modules/truncl-tests: Likewise.
99513         * modules/tsearch-tests: Likewise.
99514         * modules/unistd-tests: Likewise.
99515         * modules/wchar-tests: Likewise.
99516         * modules/wctype-tests: Likewise.
99518         tests: fix license on several tests
99519         * tests/test-des.c: Update to GPLv3+.
99520         * tests/test-flock.c: Likewise.
99521         * tests/test-fsync.c: Likewise.
99522         * tests/test-futimens.h: Likewise.
99523         * tests/test-gc-arcfour.c: Likewise.
99524         * tests/test-gc-arctwo.c: Likewise.
99525         * tests/test-gc-des.c: Likewise.
99526         * tests/test-gc-hmac-md5.c: Likewise.
99527         * tests/test-gc-hmac-sha1.c: Likewise.
99528         * tests/test-gc-md2.c: Likewise.
99529         * tests/test-gc-md4.c: Likewise.
99530         * tests/test-gc-md5.c: Likewise.
99531         * tests/test-gc-pbkdf2-sha1.c: Likewise.
99532         * tests/test-gc-rijndael.c: Likewise.
99533         * tests/test-gc-sha1.c: Likewise.
99534         * tests/test-gc.c: Likewise.
99535         * tests/test-getcwd.c: Likewise.
99536         * tests/test-link.c: Likewise.
99537         * tests/test-link.h: Likewise.
99538         * tests/test-lutimens.h: Likewise.
99539         * tests/test-md2.c: Likewise.
99540         * tests/test-md4.c: Likewise.
99541         * tests/test-mkdir.h: Likewise.
99542         * tests/test-rename.c: Likewise.
99543         * tests/test-rename.h: Likewise.
99544         * tests/test-safe-alloc.c: Likewise.
99545         * tests/test-utimens-common.h: Likewise.
99546         * tests/test-utimens.h: Likewise.
99548         maint: sync license texts
99549         * config/srclist.txt: Add gpl-1.3.texi, lgpl-1.3.texi.
99550         * doc/gpl-3.0.texi: Revert copyright year update.
99551         * doc/lgpl-3.0.texi: Likewise.
99553 2009-12-29  Jim Meyering  <meyering@redhat.com>
99555         update nearly all FSF copyright year lists to include 2009
99556         The files named by the following are exempted:
99557             grep -v '^#' config/srclist.txt|grep -v '^$' | while read src dst; do
99558               test -f "$dst" && { echo "$dst"; continue; }
99559               test -d "$dst" || continue
99560               echo "$dst"/$(basename "$src")
99561             done > exempt
99562             git ls-files tests/unictype >> exempt
99563         In the remaining files, convert to all-interval notation if
99564         - there is already at least one year interval like 2000-2003
99565         - the file is maintained by me
99566         - the file is in lib/uni*/, where that style already prevails
99567         Otherwise, use update-copyright's default.
99569 2009-12-29  Simon Josefsson  <simon@josefsson.org>
99570         and Eric Blake  <ebb9@byu.net>
99572         tests: don't require debug system() to pass
99573         * tests/test-lstat.h (test_lstat_func): Move debug cleanup...
99574         * tests/test-rmdir.h (test_rmdir_func): Likewise.
99575         * tests/test-unlink.h (test_unlink_func): Likewise.
99576         * tests/test-fstatat.c (main): ...into callers.
99577         * tests/test-lstat.c (main): Likewise.
99578         * tests/test-rmdir.c (main): Likewise.
99579         * tests/test-unlink.c (main): Likewise.
99580         * tests/test-unlinkat.c (main): Likewise.
99581         * tests/test-areadlink-with-size.c (main): Don't require a
99582         debug-only system call to pass, aiding cross-testing to mingw.
99583         * tests/test-areadlink.c (main): Likewise.
99584         * tests/test-areadlinkat-with-size.c (main): Likewise.
99585         * tests/test-areadlinkat.c (main): Likewise.
99586         * tests/test-canonicalize-lgpl.c (main): Likewise.
99587         * tests/test-canonicalize.c (main): Likewise.
99588         * tests/test-chown.c (main): Likewise.
99589         * tests/test-fchownat.c (main): Likewise.
99590         * tests/test-lchown.c (main): Likewise.
99591         * tests/test-fdutimensat.c (main): Likewise.
99592         * tests/test-futimens.c (main): Likewise.
99593         * tests/test-link.c (main): Likewise.
99594         * tests/test-linkat.c (main): Likewise.
99595         * tests/test-mkdir.c (main): Likewise.
99596         * tests/test-mkdirat.c (main): Likewise.
99597         * tests/test-mkfifo.c (main): Likewise.
99598         * tests/test-mkfifoat.c (main): Likewise.
99599         * tests/test-mknod.c (main): Likewise.
99600         * tests/test-readlink.c (main): Likewise.
99601         * tests/test-remove.c (main): Likewise.
99602         * tests/test-rename.c (main): Likewise.
99603         * tests/test-renameat.c (main): Likewise.
99604         * tests/test-symlink.c (main): Likewise.
99605         * tests/test-symlinkat.c (main): Likewise.
99606         * tests/test-utimens.c (main): Likewise.
99607         * tests/test-utimensat.c (main): Likewise.
99609 2009-12-29  Simon Josefsson  <simon@josefsson.org>
99611         * modules/selinux-h (selinux/selinux.h, selinux/context.h): Depend
99612         on $(UNUSED_PARAMETER_H) to avoid build failure.
99614 2009-12-28  Jim Meyering  <meyering@redhat.com>
99616         update-copyright: you may specify a max. line length other than 72
99617         * build-aux/update-copyright: Honor $UPDATE_COPYRIGHT_MAX_LINE_LENGTH.
99619         maint: use consistent FSF copyright line syntax
99620         * lib/posixtm.c: Add missing comma in FSF copyright line.
99621         * lib/posixtm.h: Likewise.
99622         * lib/getugroups.c: Add missing ", Inc.".
99624         pmccabe2html: emit consistent FSF copyright; remove trailing blanks
99625         * build-aux/pmccabe2html: Insert comma before "Inc." in emitted
99626         FSF copyright line.  Remove trailing blanks.
99628 2009-12-28  Eric Blake  <ebb9@byu.net>
99630         test-dup2: reduce dependencies
99631         * modules/cloexec (Configure.ac): Set witness.
99632         * modules/dup2-tests (Depends-on): Drop cloexec.
99633         * tests/test-dup2.c (main): Skip portion of test if cloexec module
99634         not present.
99635         Suggested by Bruno Haible.
99637 2009-12-26  Bruno Haible  <bruno@clisp.org>
99639         Remove an unneeded dependency.
99640         * modules/fseterr (Depends-on): Remove dup2.
99642 2009-12-26  Eric Blake  <ebb9@byu.net>
99644         tests: use macros.h in more places
99645         * tests/macros.h (ASSERT): Depend on ASSERT_STREAM.
99646         (ASSERT_STREAM): Provide default of stderr.
99647         * tests/test-dirent-safer.c: Include macros.h, using alternate
99648         stream for assertions.
99649         * tests/test-dup-safer.c: Likewise.
99650         * tests/test-freopen-safer.c: Likewise.
99651         * tests/test-getopt.c: Likewise.
99652         * tests/test-openat-safer.c: Likewise.
99653         * tests/test-pipe.c: Likewise.
99654         * tests/test-popen-safer.c: Likewise.
99655         * modules/dirent-safer-tests (Files): Include macros.h.
99656         * modules/unistd-safer-tests (Files): Likewise.
99657         * modules/freopen-safer-tests (Files): Likewise.
99658         * modules/getopt-posix-tests (Files): Likewise.
99659         * modules/openat-safer-tests (Files): Likewise.
99660         * modules/pipe-tests (Files): Likewise.
99662 2009-12-26  Bruno Haible  <bruno@clisp.org>
99664         javacomp-script: Portability fix.
99665         * m4/javacomp.m4 (gt_JAVACOMP): Fix creation of conftestver.class so
99666         that it also works on Solaris.
99668 2009-12-26  Bruno Haible  <bruno@clisp.org>
99670         localename: Fix storage allocation of gl_locale_name_thread's result.
99671         * lib/localename.c (SIZE_BITS, string_hash, struct hash_node,
99672         HASH_TABLE_SIZE, struniq_hash_table, struniq_lock, struniq): Define on
99673         all platforms that have 'uselocale'.
99674         (gl_locale_name_thread_unsafe): New function, extracted from
99675         gl_locale_name_thread.
99676         (gl_locale_name_thread): Call struniq on all platforms that have
99677         'uselocale'.
99678         * tests/test-localename.c (test_locale_name_thread): Check that the
99679         resulting strings are permanently allocated.
99680         * modules/localename-tests (Depends-on): Add strdup.
99682 2009-12-26  Bruno Haible  <bruno@clisp.org>
99684         * tests/test-localename.c (categories): Fill in the strings.
99686 2009-12-26  Jim Meyering  <meyering@redhat.com>
99688         isdir: complete the removal of m4/isdir.m4
99689         * modules/isdir (configure.ac): Remove reference to gl_ISDIR.
99691         isdir: clean up, since at least grep still uses it
99692         * lib/isdir.c: Include "isdir.h".
99693         (S_ISDIR): Remove now-unneeded definition.
99694         * modules/isdir (Files): Add lib/isdir.h.
99695         * lib/isdir.h: New file, with declaration.
99696         * m4/isdir.m4: Remove file -- unneeded.
99698 2009-12-25  Bruno Haible  <bruno@clisp.org>
99700         selinux-h: Make generated .h files standalone.
99701         * lib/se-context.in.h: Arrange to include _GL_UNUSED_PARAMETER
99702         definition. Use _GL_UNUSED_PARAMETER instead of _GL_UNUSED.
99703         * lib/se-selinux.in.h: Likewise.
99704         * modules/selinux-h (Depends-on): Add unused-parameter.
99705         (Makefile.am): Insert definition of _GL_UNUSED_PARAMETER into
99706         selinux/selinux.h and selinux/context.h.
99707         Suggested by Eric Blake.
99709 2009-12-25  Bruno Haible  <bruno@clisp.org>
99711         Move gl_FCNTL_O_FLAGS to a separate .m4 file.
99712         * m4/fcntl-o.m4: New file, extracted from m4/fcntl_h.m4.
99713         * m4/fcntl_h.m4 (gl_FCNTL_O_FLAGS): Remove macro.
99714         * modules/fcntl-h (Files): Add m4/fcntl-o.m4.
99715         * modules/localcharset (Files): Likewise. Remove m4/fcntl_h.m4.
99717 2009-12-24  Bruno Haible  <bruno@clisp.org>
99719         openat: Fix warning.
99720         * lib/openat-proc.c: Include <unistd.h>.
99722 2009-12-24  Bruno Haible  <bruno@clisp.org>
99724         New module 'unused-parameter'.
99725         * build-aux/unused-parameter.h: New file, extracted from earlier
99726         gnulib-common.m4.
99727         * modules/unused-parameter: New file.
99728         * lib/unistr.h: Include unused-parameter.h.
99729         (u32_mbtouc_unsafe, u32_mbtouc): Use _GL_UNUSED_PARAMETER instead of
99730         _GL_UNUSED.
99731         * modules/unistr/base (Depends-on): Add unused-parameter.
99733 2009-12-24  Bruno Haible  <bruno@clisp.org>
99735         Add missing dependencies to 'extensions' module.
99736         * m4/extensions.m4: Add comment.
99737         * modules/accept4 (Depends-on): Add extensions.
99738         * modules/dup3 (Depends-on): Likewise.
99739         * modules/fcntl (Depends-on): Likewise.
99740         * modules/futimens (Depends-on): Likewise.
99741         * modules/mknod (Depends-on): Likewise.
99742         * modules/pipe2 (Depends-on): Likewise.
99743         * modules/stat-time (Depends-on): Likewise.
99744         * modules/strcasestr-simple (Depends-on): Likewise.
99745         * modules/strsignal (Depends-on): Likewise.
99746         * modules/utimensat (Depends-on): Likewise.
99747         * modules/localcharset (Depends-on): Likewise. Needed because of
99748         gl_FCNTL_O_FLAGS.
99749         * modules/wcrtomb (Depends-on): Likewise. Needed because of
99750         AC_TYPE_MBSTATE_T.
99751         * modules/wcsnrtombs (Depends-on): Likewise.
99752         * modules/wcsrtombs (Depends-on): Likewise.
99754 2009-12-24  Bruno Haible  <bruno@clisp.org>
99756         binary-io: Avoid gcc warning due to SET_BINARY.
99757         * lib/binary-io.h (SET_BINARY): Cast the result to void.
99758         Reported by Jim Meyering <jim@meyering.net>. Suggestion by Eric Blake.
99760 2009-12-24  Bruno Haible  <bruno@clisp.org>
99762         Avoid future namespace pollution on glibc systems.
99763         * lib/arpa_inet.in.h: Don't include <sys/socket.h> on glibc systems.
99764         * lib/sys_ioctl.in.h: Don't include <unistd.h> on glibc systems.
99765         * lib/sys_select.in.h: Don't include <sys/time.h> and <string.h> on
99766         glibc systems.
99768 2009-12-24  Bruno Haible  <bruno@clisp.org>
99770         Refactor common macros used in tests.
99771         * tests/macros.h: New file.
99772         * tests/test-areadlink.c: Include macros.h. Don't include <stdio.h>
99773         and/or <stdlib.h>, if appropriate.
99774         (ASSERT, SIZEOF): Remove macros.
99775         * tests/test-areadlink-with-size.c: Likewise.
99776         * tests/test-areadlinkat.c: Likewise.
99777         * tests/test-areadlinkat-with-size.c: Likewise.
99778         * tests/test-argmatch.c: Likewise.
99779         * tests/test-argv-iter.c: Likewise.
99780         * tests/test-array-mergesort.c: Likewise.
99781         * tests/test-array_list.c: Likewise.
99782         * tests/test-array_oset.c: Likewise.
99783         * tests/test-avltree_list.c: Likewise.
99784         * tests/test-avltree_oset.c: Likewise.
99785         * tests/test-avltreehash_list.c: Likewise.
99786         * tests/test-base64.c: Likewise.
99787         * tests/test-binary-io.c: Likewise.
99788         * tests/test-bitrotate.c: Likewise.
99789         * tests/test-btowc.c: Likewise.
99790         * tests/test-byteswap.c: Likewise.
99791         * tests/test-c-ctype.c: Likewise.
99792         * tests/test-c-stack.c: Likewise.
99793         * tests/test-c-strcasecmp.c: Likewise.
99794         * tests/test-c-strcasestr.c: Likewise.
99795         * tests/test-c-strncasecmp.c: Likewise.
99796         * tests/test-c-strstr.c: Likewise.
99797         * tests/test-canonicalize-lgpl.c: Likewise.
99798         * tests/test-canonicalize.c: Likewise.
99799         * tests/test-carray_list.c: Likewise.
99800         * tests/test-ceilf1.c: Likewise.
99801         * tests/test-ceilf2.c: Likewise.
99802         * tests/test-ceill.c: Likewise.
99803         * tests/test-chown.c: Likewise.
99804         * tests/test-cloexec.c: Likewise.
99805         * tests/test-copy-acl.c: Likewise.
99806         * tests/test-copy-file.c: Likewise.
99807         * tests/test-count-one-bits.c: Likewise.
99808         * tests/test-dprintf-posix.c: Likewise.
99809         * tests/test-dup2.c: Likewise.
99810         * tests/test-dup3.c: Likewise.
99811         * tests/test-duplocale.c: Likewise.
99812         * tests/test-fbufmode.c: Likewise.
99813         * tests/test-fchdir.c: Likewise.
99814         * tests/test-fchownat.c: Likewise.
99815         * tests/test-fcntl-safer.c: Likewise.
99816         * tests/test-fcntl.c: Likewise.
99817         * tests/test-fdopendir.c: Likewise.
99818         * tests/test-fdutimensat.c: Likewise.
99819         * tests/test-fflush2.c: Likewise.
99820         * tests/test-file-has-acl.c: Likewise.
99821         * tests/test-filevercmp.c: Likewise.
99822         * tests/test-flock.c: Likewise.
99823         * tests/test-floorf1.c: Likewise.
99824         * tests/test-floorf2.c: Likewise.
99825         * tests/test-floorl.c: Likewise.
99826         * tests/test-fnmatch.c: Likewise.
99827         * tests/test-fopen.h: Likewise.
99828         * tests/test-fpending.c: Likewise.
99829         * tests/test-fprintf-posix.c: Likewise.
99830         * tests/test-fpurge.c: Likewise.
99831         * tests/test-freadable.c: Likewise.
99832         * tests/test-freadahead.c: Likewise.
99833         * tests/test-freading.c: Likewise.
99834         * tests/test-freadptr.c: Likewise.
99835         * tests/test-freadptr2.c: Likewise.
99836         * tests/test-freadseek.c: Likewise.
99837         * tests/test-freopen.c: Likewise.
99838         * tests/test-frexp.c: Likewise.
99839         * tests/test-frexpl.c: Likewise.
99840         * tests/test-fseek.c: Likewise.
99841         * tests/test-fseeko.c: Likewise.
99842         * tests/test-fstatat.c: Likewise.
99843         * tests/test-fstrcmp.c: Likewise.
99844         * tests/test-fsync.c: Likewise.
99845         * tests/test-ftell.c: Likewise.
99846         * tests/test-ftello.c: Likewise.
99847         * tests/test-func.c: Likewise.
99848         * tests/test-futimens.c: Likewise.
99849         * tests/test-fwritable.c: Likewise.
99850         * tests/test-fwriting.c: Likewise.
99851         * tests/test-getcwd.c: Likewise.
99852         * tests/test-getdate.c: Likewise.
99853         * tests/test-getdelim.c: Likewise.
99854         * tests/test-getdtablesize.c: Likewise.
99855         * tests/test-getgroups.c: Likewise.
99856         * tests/test-getline.c: Likewise.
99857         * tests/test-getndelim2.c: Likewise.
99858         * tests/test-glob.c: Likewise.
99859         * tests/test-hash.c: Likewise.
99860         * tests/test-i-ring.c: Likewise.
99861         * tests/test-iconv-utf.c: Likewise.
99862         * tests/test-iconv.c: Likewise.
99863         * tests/test-idpriv-drop.c: Likewise.
99864         * tests/test-idpriv-droptemp.c: Likewise.
99865         * tests/test-inet_ntop.c: Likewise.
99866         * tests/test-inet_pton.c: Likewise.
99867         * tests/test-isblank.c: Likewise.
99868         * tests/test-isfinite.c: Likewise.
99869         * tests/test-isinf.c: Likewise.
99870         * tests/test-isnan.c: Likewise.
99871         * tests/test-isnand.h: Likewise.
99872         * tests/test-isnanf.h: Likewise.
99873         * tests/test-isnanl.h: Likewise.
99874         * tests/test-lchown.c: Likewise.
99875         * tests/test-ldexpl.c: Likewise.
99876         * tests/test-link.c: Likewise.
99877         * tests/test-linkat.c: Likewise.
99878         * tests/test-linked_list.c: Likewise.
99879         * tests/test-linkedhash_list.c: Likewise.
99880         * tests/test-localename.c: Likewise.
99881         * tests/test-lseek.c: Likewise.
99882         * tests/test-lstat.c: Likewise.
99883         * tests/test-mbmemcasecmp.c: Likewise.
99884         * tests/test-mbmemcasecoll.c: Likewise.
99885         * tests/test-mbrtowc.c: Likewise.
99886         * tests/test-mbscasecmp.c: Likewise.
99887         * tests/test-mbscasestr1.c: Likewise.
99888         * tests/test-mbscasestr2.c: Likewise.
99889         * tests/test-mbscasestr3.c: Likewise.
99890         * tests/test-mbscasestr4.c: Likewise.
99891         * tests/test-mbschr.c: Likewise.
99892         * tests/test-mbscspn.c: Likewise.
99893         * tests/test-mbsinit.c: Likewise.
99894         * tests/test-mbsncasecmp.c: Likewise.
99895         * tests/test-mbsnrtowcs.c: Likewise.
99896         * tests/test-mbspbrk.c: Likewise.
99897         * tests/test-mbspcasecmp.c: Likewise.
99898         * tests/test-mbsrchr.c: Likewise.
99899         * tests/test-mbsrtowcs.c: Likewise.
99900         * tests/test-mbsspn.c: Likewise.
99901         * tests/test-mbsstr1.c: Likewise.
99902         * tests/test-mbsstr2.c: Likewise.
99903         * tests/test-mbsstr3.c: Likewise.
99904         * tests/test-memchr.c: Likewise.
99905         * tests/test-memchr2.c: Likewise.
99906         * tests/test-memcmp.c: Likewise.
99907         * tests/test-memmem.c: Likewise.
99908         * tests/test-memrchr.c: Likewise.
99909         * tests/test-mkdir.c: Likewise.
99910         * tests/test-mkdirat.c: Likewise.
99911         * tests/test-mkfifo.c: Likewise.
99912         * tests/test-mkfifoat.c: Likewise.
99913         * tests/test-mknod.c: Likewise.
99914         * tests/test-nanosleep.c: Likewise.
99915         * tests/test-nl_langinfo.c: Likewise.
99916         * tests/test-obstack-printf.c: Likewise.
99917         * tests/test-open.c: Likewise.
99918         * tests/test-openat.c: Likewise.
99919         * tests/test-pipe-filter-gi1.c: Likewise.
99920         * tests/test-pipe-filter-gi2-main.c: Likewise.
99921         * tests/test-pipe-filter-ii1.c: Likewise.
99922         * tests/test-pipe-filter-ii2-main.c: Likewise.
99923         * tests/test-pipe2.c: Likewise.
99924         * tests/test-popen.h: Likewise.
99925         * tests/test-posixtm.c: Likewise.
99926         * tests/test-pread.c: Likewise.
99927         * tests/test-printf-frexp.c: Likewise.
99928         * tests/test-printf-frexpl.c: Likewise.
99929         * tests/test-printf-posix.c: Likewise.
99930         * tests/test-priv-set.c: Likewise.
99931         * tests/test-quotearg.c: Likewise.
99932         * tests/test-random_r.c: Likewise.
99933         * tests/test-rawmemchr.c: Likewise.
99934         * tests/test-rbtree_list.c: Likewise.
99935         * tests/test-rbtree_oset.c: Likewise.
99936         * tests/test-rbtreehash_list.c: Likewise.
99937         * tests/test-readlink.c: Likewise.
99938         * tests/test-remove.c: Likewise.
99939         * tests/test-rename.c: Likewise.
99940         * tests/test-renameat.c: Likewise.
99941         * tests/test-rmdir.c: Likewise.
99942         * tests/test-round1.c: Likewise.
99943         * tests/test-roundf1.c: Likewise.
99944         * tests/test-roundl.c: Likewise.
99945         * tests/test-safe-alloc.c: Likewise.
99946         * tests/test-sameacls.c: Likewise.
99947         * tests/test-set-mode-acl.c: Likewise.
99948         * tests/test-setenv.c: Likewise.
99949         * tests/test-sigaction.c: Likewise.
99950         * tests/test-signbit.c: Likewise.
99951         * tests/test-sleep.c: Likewise.
99952         * tests/test-snprintf-posix.c: Likewise.
99953         * tests/test-snprintf.c: Likewise.
99954         * tests/test-sprintf-posix.c: Likewise.
99955         * tests/test-stat-time.c: Likewise.
99956         * tests/test-stat.c: Likewise.
99957         * tests/test-strcasestr.c: Likewise.
99958         * tests/test-strchrnul.c: Likewise.
99959         * tests/test-strerror.c: Likewise.
99960         * tests/test-striconv.c: Likewise.
99961         * tests/test-striconveh.c: Likewise.
99962         * tests/test-striconveha.c: Likewise.
99963         * tests/test-strsignal.c: Likewise.
99964         * tests/test-strstr.c: Likewise.
99965         * tests/test-strtod.c: Likewise.
99966         * tests/test-strverscmp.c: Likewise.
99967         * tests/test-symlink.c: Likewise.
99968         * tests/test-symlinkat.c: Likewise.
99969         * tests/test-trunc1.c: Likewise.
99970         * tests/test-trunc2.c: Likewise.
99971         * tests/test-truncf1.c: Likewise.
99972         * tests/test-truncf2.c: Likewise.
99973         * tests/test-truncl.c: Likewise.
99974         * tests/test-uname.c: Likewise.
99975         * tests/test-unlink.c: Likewise.
99976         * tests/test-unlinkat.c: Likewise.
99977         * tests/test-unsetenv.c: Likewise.
99978         * tests/test-usleep.c: Likewise.
99979         * tests/test-utimens.c: Likewise.
99980         * tests/test-utimensat.c: Likewise.
99981         * tests/test-vasnprintf-posix.c: Likewise.
99982         * tests/test-vasnprintf-posix2.c: Likewise.
99983         * tests/test-vasnprintf.c: Likewise.
99984         * tests/test-vasprintf-posix.c: Likewise.
99985         * tests/test-vasprintf.c: Likewise.
99986         * tests/test-vdprintf-posix.c: Likewise.
99987         * tests/test-vfprintf-posix.c: Likewise.
99988         * tests/test-vprintf-posix.c: Likewise.
99989         * tests/test-vsnprintf-posix.c: Likewise.
99990         * tests/test-vsnprintf.c: Likewise.
99991         * tests/test-vsprintf-posix.c: Likewise.
99992         * tests/test-wcrtomb.c: Likewise.
99993         * tests/test-wcsnrtombs.c: Likewise.
99994         * tests/test-wcsrtombs.c: Likewise.
99995         * tests/test-wctype.c: Likewise.
99996         * tests/test-wcwidth.c: Likewise.
99997         * tests/test-xfprintf-posix.c: Likewise.
99998         * tests/test-xmemdup0.c: Likewise.
99999         * tests/test-xprintf-posix.c: Likewise.
100000         * tests/test-xvasprintf.c: Likewise.
100001         * tests/unicase/test-locale-language.c: Likewise.
100002         * tests/unicase/test-mapping-part1.h: Likewise.
100003         * tests/unicase/test-predicate-part1.h: Likewise.
100004         * tests/unicase/test-u8-casecmp.c: Likewise.
100005         * tests/unicase/test-u8-casecoll.c: Likewise.
100006         * tests/unicase/test-u8-casefold.c: Likewise.
100007         * tests/unicase/test-u8-is-cased.c: Likewise.
100008         * tests/unicase/test-u8-is-casefolded.c: Likewise.
100009         * tests/unicase/test-u8-is-lowercase.c: Likewise.
100010         * tests/unicase/test-u8-is-titlecase.c: Likewise.
100011         * tests/unicase/test-u8-is-uppercase.c: Likewise.
100012         * tests/unicase/test-u8-tolower.c: Likewise.
100013         * tests/unicase/test-u8-totitle.c: Likewise.
100014         * tests/unicase/test-u8-toupper.c: Likewise.
100015         * tests/unicase/test-u16-casecmp.c: Likewise.
100016         * tests/unicase/test-u16-casecoll.c: Likewise.
100017         * tests/unicase/test-u16-casefold.c: Likewise.
100018         * tests/unicase/test-u16-is-cased.c: Likewise.
100019         * tests/unicase/test-u16-is-casefolded.c: Likewise.
100020         * tests/unicase/test-u16-is-lowercase.c: Likewise.
100021         * tests/unicase/test-u16-is-titlecase.c: Likewise.
100022         * tests/unicase/test-u16-is-uppercase.c: Likewise.
100023         * tests/unicase/test-u16-tolower.c: Likewise.
100024         * tests/unicase/test-u16-totitle.c: Likewise.
100025         * tests/unicase/test-u16-toupper.c: Likewise.
100026         * tests/unicase/test-u32-casecmp.c: Likewise.
100027         * tests/unicase/test-u32-casecoll.c: Likewise.
100028         * tests/unicase/test-u32-casefold.c: Likewise.
100029         * tests/unicase/test-u32-is-cased.c: Likewise.
100030         * tests/unicase/test-u32-is-casefolded.c: Likewise.
100031         * tests/unicase/test-u32-is-lowercase.c: Likewise.
100032         * tests/unicase/test-u32-is-titlecase.c: Likewise.
100033         * tests/unicase/test-u32-is-uppercase.c: Likewise.
100034         * tests/unicase/test-u32-tolower.c: Likewise.
100035         * tests/unicase/test-u32-totitle.c: Likewise.
100036         * tests/unicase/test-u32-toupper.c: Likewise.
100037         * tests/unicase/test-ulc-casecmp.c: Likewise.
100038         * tests/unicase/test-ulc-casecoll.c: Likewise.
100039         * tests/uniconv/test-u8-conv-from-enc.c: Likewise.
100040         * tests/uniconv/test-u8-conv-to-enc.c: Likewise.
100041         * tests/uniconv/test-u8-strconv-from-enc.c: Likewise.
100042         * tests/uniconv/test-u8-strconv-to-enc.c: Likewise.
100043         * tests/uniconv/test-u16-conv-from-enc.c: Likewise.
100044         * tests/uniconv/test-u16-conv-to-enc.c: Likewise.
100045         * tests/uniconv/test-u16-strconv-from-enc.c: Likewise.
100046         * tests/uniconv/test-u16-strconv-to-enc.c: Likewise.
100047         * tests/uniconv/test-u32-conv-from-enc.c: Likewise.
100048         * tests/uniconv/test-u32-conv-to-enc.c: Likewise.
100049         * tests/uniconv/test-u32-strconv-from-enc.c: Likewise.
100050         * tests/uniconv/test-u32-strconv-to-enc.c: Likewise.
100051         * tests/unictype/test-bidi_byname.c: Likewise.
100052         * tests/unictype/test-bidi_name.c: Likewise.
100053         * tests/unictype/test-bidi_of.c: Likewise.
100054         * tests/unictype/test-bidi_test.c: Likewise.
100055         * tests/unictype/test-block_list.c: Likewise.
100056         * tests/unictype/test-block_of.c: Likewise.
100057         * tests/unictype/test-block_test.c: Likewise.
100058         * tests/unictype/test-categ_and.c: Likewise.
100059         * tests/unictype/test-categ_and_not.c: Likewise.
100060         * tests/unictype/test-categ_byname.c: Likewise.
100061         * tests/unictype/test-categ_name.c: Likewise.
100062         * tests/unictype/test-categ_none.c: Likewise.
100063         * tests/unictype/test-categ_of.c: Likewise.
100064         * tests/unictype/test-categ_or.c: Likewise.
100065         * tests/unictype/test-categ_test_withtable.c: Likewise.
100066         * tests/unictype/test-combining.c: Likewise.
100067         * tests/unictype/test-decdigit.c: Likewise.
100068         * tests/unictype/test-digit.c: Likewise.
100069         * tests/unictype/test-mirror.c: Likewise.
100070         * tests/unictype/test-numeric.c: Likewise.
100071         * tests/unictype/test-pr_byname.c: Likewise.
100072         * tests/unictype/test-pr_test.c: Likewise.
100073         * tests/unictype/test-predicate-part1.h: Likewise.
100074         * tests/unictype/test-scripts.c: Likewise.
100075         * tests/unictype/test-sy_c_ident.c: Likewise.
100076         * tests/unictype/test-sy_java_ident.c: Likewise.
100077         * tests/unilbrk/test-u8-possible-linebreaks.c: Likewise.
100078         * tests/unilbrk/test-u8-width-linebreaks.c: Likewise.
100079         * tests/unilbrk/test-u16-possible-linebreaks.c: Likewise.
100080         * tests/unilbrk/test-u16-width-linebreaks.c: Likewise.
100081         * tests/unilbrk/test-u32-possible-linebreaks.c: Likewise.
100082         * tests/unilbrk/test-u32-width-linebreaks.c: Likewise.
100083         * tests/unilbrk/test-ulc-possible-linebreaks.c: Likewise.
100084         * tests/unilbrk/test-ulc-width-linebreaks.c: Likewise.
100085         * tests/uninorm/test-canonical-decomposition.c: Likewise.
100086         * tests/uninorm/test-compat-decomposition.c: Likewise.
100087         * tests/uninorm/test-composition.c: Likewise.
100088         * tests/uninorm/test-decomposing-form.c: Likewise.
100089         * tests/uninorm/test-decomposition.c: Likewise.
100090         * tests/uninorm/test-u8-nfc.c: Likewise.
100091         * tests/uninorm/test-u8-nfd.c: Likewise.
100092         * tests/uninorm/test-u8-nfkc.c: Likewise.
100093         * tests/uninorm/test-u8-nfkd.c: Likewise.
100094         * tests/uninorm/test-u8-normcmp.c: Likewise.
100095         * tests/uninorm/test-u8-normcoll.c: Likewise.
100096         * tests/uninorm/test-u16-nfc.c: Likewise.
100097         * tests/uninorm/test-u16-nfd.c: Likewise.
100098         * tests/uninorm/test-u16-nfkc.c: Likewise.
100099         * tests/uninorm/test-u16-nfkd.c: Likewise.
100100         * tests/uninorm/test-u16-normcmp.c: Likewise.
100101         * tests/uninorm/test-u16-normcoll.c: Likewise.
100102         * tests/uninorm/test-u32-nfc.c: Likewise.
100103         * tests/uninorm/test-u32-nfd.c: Likewise.
100104         * tests/uninorm/test-u32-nfkc.c: Likewise.
100105         * tests/uninorm/test-u32-nfkd.c: Likewise.
100106         * tests/uninorm/test-u32-normalize-big.c: Likewise.
100107         * tests/uninorm/test-u32-normcmp.c: Likewise.
100108         * tests/uninorm/test-u32-normcoll.c: Likewise.
100109         * tests/uninorm/test-uninorm-filter-nfc.c: Likewise.
100110         * tests/unistdio/test-u8-asnprintf1.c: Likewise.
100111         * tests/unistdio/test-u8-vasnprintf1.c: Likewise.
100112         * tests/unistdio/test-u8-vasnprintf2.c: Likewise.
100113         * tests/unistdio/test-u8-vasnprintf3.c: Likewise.
100114         * tests/unistdio/test-u8-vasprintf1.c: Likewise.
100115         * tests/unistdio/test-u8-vsnprintf1.c: Likewise.
100116         * tests/unistdio/test-u8-vsprintf1.c: Likewise.
100117         * tests/unistdio/test-u16-asnprintf1.c: Likewise.
100118         * tests/unistdio/test-u16-vasnprintf1.c: Likewise.
100119         * tests/unistdio/test-u16-vasnprintf2.c: Likewise.
100120         * tests/unistdio/test-u16-vasnprintf3.c: Likewise.
100121         * tests/unistdio/test-u16-vasprintf1.c: Likewise.
100122         * tests/unistdio/test-u16-vsnprintf1.c: Likewise.
100123         * tests/unistdio/test-u16-vsprintf1.c: Likewise.
100124         * tests/unistdio/test-u32-asnprintf1.c: Likewise.
100125         * tests/unistdio/test-u32-vasnprintf1.c: Likewise.
100126         * tests/unistdio/test-u32-vasnprintf2.c: Likewise.
100127         * tests/unistdio/test-u32-vasnprintf3.c: Likewise.
100128         * tests/unistdio/test-u32-vasprintf1.c: Likewise.
100129         * tests/unistdio/test-u32-vsnprintf1.c: Likewise.
100130         * tests/unistdio/test-u32-vsprintf1.c: Likewise.
100131         * tests/unistdio/test-ulc-asnprintf1.c: Likewise.
100132         * tests/unistdio/test-ulc-vasnprintf1.c: Likewise.
100133         * tests/unistdio/test-ulc-vasnprintf2.c: Likewise.
100134         * tests/unistdio/test-ulc-vasnprintf3.c: Likewise.
100135         * tests/unistdio/test-ulc-vasprintf1.c: Likewise.
100136         * tests/unistdio/test-ulc-vsnprintf1.c: Likewise.
100137         * tests/unistdio/test-ulc-vsprintf1.c: Likewise.
100138         * tests/uniwbrk/test-u8-wordbreaks.c: Likewise.
100139         * tests/uniwbrk/test-u16-wordbreaks.c: Likewise.
100140         * tests/uniwbrk/test-u32-wordbreaks.c: Likewise.
100141         * tests/uniwbrk/test-ulc-wordbreaks.c: Likewise.
100142         * tests/uniwidth/test-u8-strwidth.c: Likewise.
100143         * tests/uniwidth/test-u8-width.c: Likewise.
100144         * tests/uniwidth/test-u16-strwidth.c: Likewise.
100145         * tests/uniwidth/test-u16-width.c: Likewise.
100146         * tests/uniwidth/test-u32-strwidth.c: Likewise.
100147         * tests/uniwidth/test-u32-width.c: Likewise.
100148         * tests/uniwidth/test-uc_width.c: Likewise.
100149         * tests/uniwidth/test-uc_width2.c: Likewise.
100150         * modules/acl-tests (Files): Add tests/macros.h.
100151         * modules/areadlink-tests (Files): Likewise.
100152         * modules/areadlink-with-size-tests (Files): Likewise.
100153         * modules/areadlinkat-tests (Files): Likewise.
100154         * modules/areadlinkat-with-size-tests (Files): Likewise.
100155         * modules/argmatch-tests (Files): Likewise.
100156         * modules/argv-iter-tests (Files): Likewise.
100157         * modules/array-list-tests (Files): Likewise.
100158         * modules/array-mergesort-tests (Files): Likewise.
100159         * modules/array-oset-tests (Files): Likewise.
100160         * modules/avltree-list-tests (Files): Likewise.
100161         * modules/avltree-oset-tests (Files): Likewise.
100162         * modules/avltreehash-list-tests (Files): Likewise.
100163         * modules/base64-tests (Files): Likewise.
100164         * modules/binary-io-tests (Files): Likewise.
100165         * modules/bitrotate-tests (Files): Likewise.
100166         * modules/btowc-tests (Files): Likewise.
100167         * modules/byteswap-tests (Files): Likewise.
100168         * modules/c-ctype-tests (Files): Likewise.
100169         * modules/c-stack-tests (Files): Likewise.
100170         * modules/c-strcase-tests (Files): Likewise.
100171         * modules/c-strcasestr-tests (Files): Likewise.
100172         * modules/c-strstr-tests (Files): Likewise.
100173         * modules/canonicalize-lgpl-tests (Files): Likewise.
100174         * modules/canonicalize-tests (Files): Likewise.
100175         * modules/carray-list-tests (Files): Likewise.
100176         * modules/ceilf-tests (Files): Likewise.
100177         * modules/ceill-tests (Files): Likewise.
100178         * modules/chown-tests (Files): Likewise.
100179         * modules/cloexec-tests (Files): Likewise.
100180         * modules/copy-file-tests (Files): Likewise.
100181         * modules/count-one-bits-tests (Files): Likewise.
100182         * modules/dprintf-posix-tests (Files): Likewise.
100183         * modules/dup2-tests (Files): Likewise.
100184         * modules/dup3-tests (Files): Likewise.
100185         * modules/duplocale-tests (Files): Likewise.
100186         * modules/fbufmode-tests (Files): Likewise.
100187         * modules/fchdir-tests (Files): Likewise.
100188         * modules/fcntl-safer-tests (Files): Likewise.
100189         * modules/fcntl-tests (Files): Likewise.
100190         * modules/fdopendir-tests (Files): Likewise.
100191         * modules/fdutimensat-tests (Files): Likewise.
100192         * modules/fflush-tests (Files): Likewise.
100193         * modules/filevercmp-tests (Files): Likewise.
100194         * modules/flock-tests (Files): Likewise.
100195         * modules/floorf-tests (Files): Likewise.
100196         * modules/floorl-tests (Files): Likewise.
100197         * modules/fnmatch-tests (Files): Likewise.
100198         * modules/fopen-safer-tests (Files): Likewise.
100199         * modules/fopen-tests (Files): Likewise.
100200         * modules/fpending-tests (Files): Likewise.
100201         * modules/fprintf-posix-tests (Files): Likewise.
100202         * modules/fpurge-tests (Files): Likewise.
100203         * modules/freadable-tests (Files): Likewise.
100204         * modules/freadahead-tests (Files): Likewise.
100205         * modules/freading-tests (Files): Likewise.
100206         * modules/freadptr-tests (Files): Likewise.
100207         * modules/freadseek-tests (Files): Likewise.
100208         * modules/freopen-tests (Files): Likewise.
100209         * modules/frexp-nolibm-tests (Files): Likewise.
100210         * modules/frexp-tests (Files): Likewise.
100211         * modules/frexpl-nolibm-tests (Files): Likewise.
100212         * modules/frexpl-tests (Files): Likewise.
100213         * modules/fseek-tests (Files): Likewise.
100214         * modules/fseeko-tests (Files): Likewise.
100215         * modules/fstrcmp-tests (Files): Likewise.
100216         * modules/fsync-tests (Files): Likewise.
100217         * modules/ftell-tests (Files): Likewise.
100218         * modules/ftello-tests (Files): Likewise.
100219         * modules/func-tests (Files): Likewise.
100220         * modules/futimens-tests (Files): Likewise.
100221         * modules/fwritable-tests (Files): Likewise.
100222         * modules/fwriting-tests (Files): Likewise.
100223         * modules/getcwd-tests (Files): Likewise.
100224         * modules/getdate-tests (Files): Likewise.
100225         * modules/getdelim-tests (Files): Likewise.
100226         * modules/getdtablesize-tests (Files): Likewise.
100227         * modules/getgroups-tests (Files): Likewise.
100228         * modules/getline-tests (Files): Likewise.
100229         * modules/getndelim2-tests (Files): Likewise.
100230         * modules/glob-tests (Files): Likewise.
100231         * modules/hash-tests (Files): Likewise.
100232         * modules/i-ring-tests (Files): Likewise.
100233         * modules/iconv-tests (Files): Likewise.
100234         * modules/iconv_open-utf-tests (Files): Likewise.
100235         * modules/idpriv-drop-tests (Files): Likewise.
100236         * modules/idpriv-droptemp-tests (Files): Likewise.
100237         * modules/inet_ntop-tests (Files): Likewise.
100238         * modules/inet_pton-tests (Files): Likewise.
100239         * modules/isblank-tests (Files): Likewise.
100240         * modules/isfinite-tests (Files): Likewise.
100241         * modules/isinf-tests (Files): Likewise.
100242         * modules/isnan-tests (Files): Likewise.
100243         * modules/isnand-nolibm-tests (Files): Likewise.
100244         * modules/isnand-tests (Files): Likewise.
100245         * modules/isnanf-nolibm-tests (Files): Likewise.
100246         * modules/isnanf-tests (Files): Likewise.
100247         * modules/isnanl-nolibm-tests (Files): Likewise.
100248         * modules/isnanl-tests (Files): Likewise.
100249         * modules/lchown-tests (Files): Likewise.
100250         * modules/ldexpl-tests (Files): Likewise.
100251         * modules/link-tests (Files): Likewise.
100252         * modules/linkat-tests (Files): Likewise.
100253         * modules/linked-list-tests (Files): Likewise.
100254         * modules/linkedhash-list-tests (Files): Likewise.
100255         * modules/localename-tests (Files): Likewise.
100256         * modules/lseek-tests (Files): Likewise.
100257         * modules/lstat-tests (Files): Likewise.
100258         * modules/mbmemcasecmp-tests (Files): Likewise.
100259         * modules/mbmemcasecoll-tests (Files): Likewise.
100260         * modules/mbrtowc-tests (Files): Likewise.
100261         * modules/mbscasecmp-tests (Files): Likewise.
100262         * modules/mbscasestr-tests (Files): Likewise.
100263         * modules/mbschr-tests (Files): Likewise.
100264         * modules/mbscspn-tests (Files): Likewise.
100265         * modules/mbsinit-tests (Files): Likewise.
100266         * modules/mbsncasecmp-tests (Files): Likewise.
100267         * modules/mbsnrtowcs-tests (Files): Likewise.
100268         * modules/mbspbrk-tests (Files): Likewise.
100269         * modules/mbspcasecmp-tests (Files): Likewise.
100270         * modules/mbsrchr-tests (Files): Likewise.
100271         * modules/mbsrtowcs-tests (Files): Likewise.
100272         * modules/mbsspn-tests (Files): Likewise.
100273         * modules/mbsstr-tests (Files): Likewise.
100274         * modules/memchr-tests (Files): Likewise.
100275         * modules/memchr2-tests (Files): Likewise.
100276         * modules/memcmp-tests (Files): Likewise.
100277         * modules/memmem-tests (Files): Likewise.
100278         * modules/memrchr-tests (Files): Likewise.
100279         * modules/mkdir-tests (Files): Likewise.
100280         * modules/mkfifo-tests (Files): Likewise.
100281         * modules/mkfifoat-tests (Files): Likewise.
100282         * modules/mknod-tests (Files): Likewise.
100283         * modules/nanosleep-tests (Files): Likewise.
100284         * modules/nl_langinfo-tests (Files): Likewise.
100285         * modules/obstack-printf-tests (Files): Likewise.
100286         * modules/open-tests (Files): Likewise.
100287         * modules/openat-tests (Files): Likewise.
100288         * modules/pipe-filter-gi-tests (Files): Likewise.
100289         * modules/pipe-filter-ii-tests (Files): Likewise.
100290         * modules/pipe2-tests (Files): Likewise.
100291         * modules/popen-safer-tests (Files): Likewise.
100292         * modules/popen-tests (Files): Likewise.
100293         * modules/posixtm-tests (Files): Likewise.
100294         * modules/pread-tests (Files): Likewise.
100295         * modules/printf-frexp-tests (Files): Likewise.
100296         * modules/printf-frexpl-tests (Files): Likewise.
100297         * modules/printf-posix-tests (Files): Likewise.
100298         * modules/priv-set-tests (Files): Likewise.
100299         * modules/quotearg-tests (Files): Likewise.
100300         * modules/random_r-tests (Files): Likewise.
100301         * modules/rawmemchr-tests (Files): Likewise.
100302         * modules/rbtree-list-tests (Files): Likewise.
100303         * modules/rbtree-oset-tests (Files): Likewise.
100304         * modules/rbtreehash-list-tests (Files): Likewise.
100305         * modules/readlink-tests (Files): Likewise.
100306         * modules/remove-tests (Files): Likewise.
100307         * modules/rename-tests (Files): Likewise.
100308         * modules/renameat-tests (Files): Likewise.
100309         * modules/rmdir-tests (Files): Likewise.
100310         * modules/round-tests (Files): Likewise.
100311         * modules/roundf-tests (Files): Likewise.
100312         * modules/roundl-tests (Files): Likewise.
100313         * modules/safe-alloc-tests (Files): Likewise.
100314         * modules/setenv-tests (Files): Likewise.
100315         * modules/sigaction-tests (Files): Likewise.
100316         * modules/signbit-tests (Files): Likewise.
100317         * modules/sleep-tests (Files): Likewise.
100318         * modules/snprintf-posix-tests (Files): Likewise.
100319         * modules/snprintf-tests (Files): Likewise.
100320         * modules/sprintf-posix-tests (Files): Likewise.
100321         * modules/stat-tests (Files): Likewise.
100322         * modules/stat-time-tests (Files): Likewise.
100323         * modules/strcasestr-tests (Files): Likewise.
100324         * modules/strchrnul-tests (Files): Likewise.
100325         * modules/strerror-tests (Files): Likewise.
100326         * modules/striconv-tests (Files): Likewise.
100327         * modules/striconveh-tests (Files): Likewise.
100328         * modules/striconveha-tests (Files): Likewise.
100329         * modules/strsignal-tests (Files): Likewise.
100330         * modules/strstr-tests (Files): Likewise.
100331         * modules/strtod-tests (Files): Likewise.
100332         * modules/strverscmp-tests (Files): Likewise.
100333         * modules/symlink-tests (Files): Likewise.
100334         * modules/symlinkat-tests (Files): Likewise.
100335         * modules/trunc-tests (Files): Likewise.
100336         * modules/truncf-tests (Files): Likewise.
100337         * modules/truncl-tests (Files): Likewise.
100338         * modules/uname-tests (Files): Likewise.
100339         * modules/unicase/cased-tests (Files): Likewise.
100340         * modules/unicase/ignorable-tests (Files): Likewise.
100341         * modules/unicase/locale-language-tests (Files): Likewise.
100342         * modules/unicase/tolower-tests (Files): Likewise.
100343         * modules/unicase/totitle-tests (Files): Likewise.
100344         * modules/unicase/toupper-tests (Files): Likewise.
100345         * modules/unicase/u8-casecmp-tests (Files): Likewise.
100346         * modules/unicase/u8-casecoll-tests (Files): Likewise.
100347         * modules/unicase/u8-casefold-tests (Files): Likewise.
100348         * modules/unicase/u8-is-cased-tests (Files): Likewise.
100349         * modules/unicase/u8-is-casefolded-tests (Files): Likewise.
100350         * modules/unicase/u8-is-lowercase-tests (Files): Likewise.
100351         * modules/unicase/u8-is-titlecase-tests (Files): Likewise.
100352         * modules/unicase/u8-is-uppercase-tests (Files): Likewise.
100353         * modules/unicase/u8-tolower-tests (Files): Likewise.
100354         * modules/unicase/u8-totitle-tests (Files): Likewise.
100355         * modules/unicase/u8-toupper-tests (Files): Likewise.
100356         * modules/unicase/u16-casecmp-tests (Files): Likewise.
100357         * modules/unicase/u16-casecoll-tests (Files): Likewise.
100358         * modules/unicase/u16-casefold-tests (Files): Likewise.
100359         * modules/unicase/u16-is-cased-tests (Files): Likewise.
100360         * modules/unicase/u16-is-casefolded-tests (Files): Likewise.
100361         * modules/unicase/u16-is-lowercase-tests (Files): Likewise.
100362         * modules/unicase/u16-is-titlecase-tests (Files): Likewise.
100363         * modules/unicase/u16-is-uppercase-tests (Files): Likewise.
100364         * modules/unicase/u16-tolower-tests (Files): Likewise.
100365         * modules/unicase/u16-totitle-tests (Files): Likewise.
100366         * modules/unicase/u16-toupper-tests (Files): Likewise.
100367         * modules/unicase/u32-casecmp-tests (Files): Likewise.
100368         * modules/unicase/u32-casecoll-tests (Files): Likewise.
100369         * modules/unicase/u32-casefold-tests (Files): Likewise.
100370         * modules/unicase/u32-is-cased-tests (Files): Likewise.
100371         * modules/unicase/u32-is-casefolded-tests (Files): Likewise.
100372         * modules/unicase/u32-is-lowercase-tests (Files): Likewise.
100373         * modules/unicase/u32-is-titlecase-tests (Files): Likewise.
100374         * modules/unicase/u32-is-uppercase-tests (Files): Likewise.
100375         * modules/unicase/u32-tolower-tests (Files): Likewise.
100376         * modules/unicase/u32-totitle-tests (Files): Likewise.
100377         * modules/unicase/u32-toupper-tests (Files): Likewise.
100378         * modules/unicase/ulc-casecmp-tests (Files): Likewise.
100379         * modules/unicase/ulc-casecoll-tests (Files): Likewise.
100380         * modules/uniconv/u8-conv-from-enc-tests (Files): Likewise.
100381         * modules/uniconv/u8-conv-to-enc-tests (Files): Likewise.
100382         * modules/uniconv/u8-strconv-from-enc-tests (Files): Likewise.
100383         * modules/uniconv/u8-strconv-to-enc-tests (Files): Likewise.
100384         * modules/uniconv/u16-conv-from-enc-tests (Files): Likewise.
100385         * modules/uniconv/u16-conv-to-enc-tests (Files): Likewise.
100386         * modules/uniconv/u16-strconv-from-enc-tests (Files): Likewise.
100387         * modules/uniconv/u16-strconv-to-enc-tests (Files): Likewise.
100388         * modules/uniconv/u32-conv-from-enc-tests (Files): Likewise.
100389         * modules/uniconv/u32-conv-to-enc-tests (Files): Likewise.
100390         * modules/uniconv/u32-strconv-from-enc-tests (Files): Likewise.
100391         * modules/uniconv/u32-strconv-to-enc-tests (Files): Likewise.
100392         * modules/unictype/bidicategory-byname-tests (Files): Likewise.
100393         * modules/unictype/bidicategory-name-tests (Files): Likewise.
100394         * modules/unictype/bidicategory-of-tests (Files): Likewise.
100395         * modules/unictype/bidicategory-test-tests (Files): Likewise.
100396         * modules/unictype/block-list-tests (Files): Likewise.
100397         * modules/unictype/block-of-tests (Files): Likewise.
100398         * modules/unictype/block-test-tests (Files): Likewise.
100399         * modules/unictype/category-C-tests (Files): Likewise.
100400         * modules/unictype/category-Cc-tests (Files): Likewise.
100401         * modules/unictype/category-Cf-tests (Files): Likewise.
100402         * modules/unictype/category-Cn-tests (Files): Likewise.
100403         * modules/unictype/category-Co-tests (Files): Likewise.
100404         * modules/unictype/category-Cs-tests (Files): Likewise.
100405         * modules/unictype/category-L-tests (Files): Likewise.
100406         * modules/unictype/category-Ll-tests (Files): Likewise.
100407         * modules/unictype/category-Lm-tests (Files): Likewise.
100408         * modules/unictype/category-Lo-tests (Files): Likewise.
100409         * modules/unictype/category-Lt-tests (Files): Likewise.
100410         * modules/unictype/category-Lu-tests (Files): Likewise.
100411         * modules/unictype/category-M-tests (Files): Likewise.
100412         * modules/unictype/category-Mc-tests (Files): Likewise.
100413         * modules/unictype/category-Me-tests (Files): Likewise.
100414         * modules/unictype/category-Mn-tests (Files): Likewise.
100415         * modules/unictype/category-N-tests (Files): Likewise.
100416         * modules/unictype/category-Nd-tests (Files): Likewise.
100417         * modules/unictype/category-Nl-tests (Files): Likewise.
100418         * modules/unictype/category-No-tests (Files): Likewise.
100419         * modules/unictype/category-P-tests (Files): Likewise.
100420         * modules/unictype/category-Pc-tests (Files): Likewise.
100421         * modules/unictype/category-Pd-tests (Files): Likewise.
100422         * modules/unictype/category-Pe-tests (Files): Likewise.
100423         * modules/unictype/category-Pf-tests (Files): Likewise.
100424         * modules/unictype/category-Pi-tests (Files): Likewise.
100425         * modules/unictype/category-Po-tests (Files): Likewise.
100426         * modules/unictype/category-Ps-tests (Files): Likewise.
100427         * modules/unictype/category-S-tests (Files): Likewise.
100428         * modules/unictype/category-Sc-tests (Files): Likewise.
100429         * modules/unictype/category-Sk-tests (Files): Likewise.
100430         * modules/unictype/category-Sm-tests (Files): Likewise.
100431         * modules/unictype/category-So-tests (Files): Likewise.
100432         * modules/unictype/category-Z-tests (Files): Likewise.
100433         * modules/unictype/category-Zl-tests (Files): Likewise.
100434         * modules/unictype/category-Zp-tests (Files): Likewise.
100435         * modules/unictype/category-Zs-tests (Files): Likewise.
100436         * modules/unictype/category-and-not-tests (Files): Likewise.
100437         * modules/unictype/category-and-tests (Files): Likewise.
100438         * modules/unictype/category-byname-tests (Files): Likewise.
100439         * modules/unictype/category-name-tests (Files): Likewise.
100440         * modules/unictype/category-none-tests (Files): Likewise.
100441         * modules/unictype/category-of-tests (Files): Likewise.
100442         * modules/unictype/category-or-tests (Files): Likewise.
100443         * modules/unictype/category-test-withtable-tests (Files): Likewise.
100444         * modules/unictype/combining-class-tests (Files): Likewise.
100445         * modules/unictype/ctype-alnum-tests (Files): Likewise.
100446         * modules/unictype/ctype-alpha-tests (Files): Likewise.
100447         * modules/unictype/ctype-blank-tests (Files): Likewise.
100448         * modules/unictype/ctype-cntrl-tests (Files): Likewise.
100449         * modules/unictype/ctype-digit-tests (Files): Likewise.
100450         * modules/unictype/ctype-graph-tests (Files): Likewise.
100451         * modules/unictype/ctype-lower-tests (Files): Likewise.
100452         * modules/unictype/ctype-print-tests (Files): Likewise.
100453         * modules/unictype/ctype-punct-tests (Files): Likewise.
100454         * modules/unictype/ctype-space-tests (Files): Likewise.
100455         * modules/unictype/ctype-upper-tests (Files): Likewise.
100456         * modules/unictype/ctype-xdigit-tests (Files): Likewise.
100457         * modules/unictype/decimal-digit-tests (Files): Likewise.
100458         * modules/unictype/digit-tests (Files): Likewise.
100459         * modules/unictype/mirror-tests (Files): Likewise.
100460         * modules/unictype/numeric-tests (Files): Likewise.
100461         * modules/unictype/property-alphabetic-tests (Files): Likewise.
100462         * modules/unictype/property-ascii-hex-digit-tests (Files): Likewise.
100463         * modules/unictype/property-bidi-arabic-digit-tests (Files): Likewise.
100464         * modules/unictype/property-bidi-arabic-right-to-left-tests (Files):
100465         Likewise.
100466         * modules/unictype/property-bidi-block-separator-tests (Files):
100467         Likewise.
100468         * modules/unictype/property-bidi-boundary-neutral-tests (Files):
100469         Likewise.
100470         * modules/unictype/property-bidi-common-separator-tests (Files):
100471         Likewise.
100472         * modules/unictype/property-bidi-control-tests (Files): Likewise.
100473         * modules/unictype/property-bidi-embedding-or-override-tests (Files):
100474         Likewise.
100475         * modules/unictype/property-bidi-eur-num-separator-tests (Files):
100476         Likewise.
100477         * modules/unictype/property-bidi-eur-num-terminator-tests (Files):
100478         Likewise.
100479         * modules/unictype/property-bidi-european-digit-tests (Files): Likewise.
100480         * modules/unictype/property-bidi-hebrew-right-to-left-tests (Files):
100481         Likewise.
100482         * modules/unictype/property-bidi-left-to-right-tests (Files): Likewise.
100483         * modules/unictype/property-bidi-non-spacing-mark-tests (Files):
100484         Likewise.
100485         * modules/unictype/property-bidi-other-neutral-tests (Files): Likewise.
100486         * modules/unictype/property-bidi-pdf-tests (Files): Likewise.
100487         * modules/unictype/property-bidi-segment-separator-tests (Files):
100488         Likewise.
100489         * modules/unictype/property-bidi-whitespace-tests (Files): Likewise.
100490         * modules/unictype/property-byname-tests (Files): Likewise.
100491         * modules/unictype/property-combining-tests (Files): Likewise.
100492         * modules/unictype/property-composite-tests (Files): Likewise.
100493         * modules/unictype/property-currency-symbol-tests (Files): Likewise.
100494         * modules/unictype/property-dash-tests (Files): Likewise.
100495         * modules/unictype/property-decimal-digit-tests (Files): Likewise.
100496         * modules/unictype/property-default-ignorable-code-point-tests (Files):
100497         Likewise.
100498         * modules/unictype/property-deprecated-tests (Files): Likewise.
100499         * modules/unictype/property-diacritic-tests (Files): Likewise.
100500         * modules/unictype/property-extender-tests (Files): Likewise.
100501         * modules/unictype/property-format-control-tests (Files): Likewise.
100502         * modules/unictype/property-grapheme-base-tests (Files): Likewise.
100503         * modules/unictype/property-grapheme-extend-tests (Files): Likewise.
100504         * modules/unictype/property-grapheme-link-tests (Files): Likewise.
100505         * modules/unictype/property-hex-digit-tests (Files): Likewise.
100506         * modules/unictype/property-hyphen-tests (Files): Likewise.
100507         * modules/unictype/property-id-continue-tests (Files): Likewise.
100508         * modules/unictype/property-id-start-tests (Files): Likewise.
100509         * modules/unictype/property-ideographic-tests (Files): Likewise.
100510         * modules/unictype/property-ids-binary-operator-tests (Files): Likewise.
100511         * modules/unictype/property-ids-trinary-operator-tests (Files):
100512         Likewise.
100513         * modules/unictype/property-ignorable-control-tests (Files): Likewise.
100514         * modules/unictype/property-iso-control-tests (Files): Likewise.
100515         * modules/unictype/property-join-control-tests (Files): Likewise.
100516         * modules/unictype/property-left-of-pair-tests (Files): Likewise.
100517         * modules/unictype/property-line-separator-tests (Files): Likewise.
100518         * modules/unictype/property-logical-order-exception-tests (Files):
100519         Likewise.
100520         * modules/unictype/property-lowercase-tests (Files): Likewise.
100521         * modules/unictype/property-math-tests (Files): Likewise.
100522         * modules/unictype/property-non-break-tests (Files): Likewise.
100523         * modules/unictype/property-not-a-character-tests (Files): Likewise.
100524         * modules/unictype/property-numeric-tests (Files): Likewise.
100525         * modules/unictype/property-other-alphabetic-tests (Files): Likewise.
100526         * modules/unictype/property-other-default-ignorable-code-point-tests
100527         (Files): Likewise.
100528         * modules/unictype/property-other-grapheme-extend-tests (Files):
100529         Likewise.
100530         * modules/unictype/property-other-id-continue-tests (Files): Likewise.
100531         * modules/unictype/property-other-id-start-tests (Files): Likewise.
100532         * modules/unictype/property-other-lowercase-tests (Files): Likewise.
100533         * modules/unictype/property-other-math-tests (Files): Likewise.
100534         * modules/unictype/property-other-uppercase-tests (Files): Likewise.
100535         * modules/unictype/property-paired-punctuation-tests (Files): Likewise.
100536         * modules/unictype/property-paragraph-separator-tests (Files): Likewise.
100537         * modules/unictype/property-pattern-syntax-tests (Files): Likewise.
100538         * modules/unictype/property-pattern-white-space-tests (Files): Likewise.
100539         * modules/unictype/property-private-use-tests (Files): Likewise.
100540         * modules/unictype/property-punctuation-tests (Files): Likewise.
100541         * modules/unictype/property-quotation-mark-tests (Files): Likewise.
100542         * modules/unictype/property-radical-tests (Files): Likewise.
100543         * modules/unictype/property-sentence-terminal-tests (Files): Likewise.
100544         * modules/unictype/property-soft-dotted-tests (Files): Likewise.
100545         * modules/unictype/property-space-tests (Files): Likewise.
100546         * modules/unictype/property-terminal-punctuation-tests (Files):
100547         Likewise.
100548         * modules/unictype/property-test-tests (Files): Likewise.
100549         * modules/unictype/property-titlecase-tests (Files): Likewise.
100550         * modules/unictype/property-unassigned-code-value-tests (Files):
100551         Likewise.
100552         * modules/unictype/property-unified-ideograph-tests (Files): Likewise.
100553         * modules/unictype/property-uppercase-tests (Files): Likewise.
100554         * modules/unictype/property-variation-selector-tests (Files): Likewise.
100555         * modules/unictype/property-white-space-tests (Files): Likewise.
100556         * modules/unictype/property-xid-continue-tests (Files): Likewise.
100557         * modules/unictype/property-xid-start-tests (Files): Likewise.
100558         * modules/unictype/property-zero-width-tests (Files): Likewise.
100559         * modules/unictype/scripts-tests (Files): Likewise.
100560         * modules/unictype/syntax-c-ident-tests (Files): Likewise.
100561         * modules/unictype/syntax-c-whitespace-tests (Files): Likewise.
100562         * modules/unictype/syntax-java-ident-tests (Files): Likewise.
100563         * modules/unictype/syntax-java-whitespace-tests (Files): Likewise.
100564         * modules/unilbrk/u8-possible-linebreaks-tests (Files): Likewise.
100565         * modules/unilbrk/u8-width-linebreaks-tests (Files): Likewise.
100566         * modules/unilbrk/u16-possible-linebreaks-tests (Files): Likewise.
100567         * modules/unilbrk/u16-width-linebreaks-tests (Files): Likewise.
100568         * modules/unilbrk/u32-possible-linebreaks-tests (Files): Likewise.
100569         * modules/unilbrk/u32-width-linebreaks-tests (Files): Likewise.
100570         * modules/unilbrk/ulc-possible-linebreaks-tests (Files): Likewise.
100571         * modules/unilbrk/ulc-width-linebreaks-tests (Files): Likewise.
100572         * modules/uninorm/canonical-decomposition-tests (Files): Likewise.
100573         * modules/uninorm/compat-decomposition-tests (Files): Likewise.
100574         * modules/uninorm/composition-tests (Files): Likewise.
100575         * modules/uninorm/decomposing-form-tests (Files): Likewise.
100576         * modules/uninorm/decomposition-tests (Files): Likewise.
100577         * modules/uninorm/filter-tests (Files): Likewise.
100578         * modules/uninorm/nfc-tests (Files): Likewise.
100579         * modules/uninorm/nfd-tests (Files): Likewise.
100580         * modules/uninorm/nfkc-tests (Files): Likewise.
100581         * modules/uninorm/nfkd-tests (Files): Likewise.
100582         * modules/uninorm/u8-normcmp-tests (Files): Likewise.
100583         * modules/uninorm/u8-normcoll-tests (Files): Likewise.
100584         * modules/uninorm/u16-normcmp-tests (Files): Likewise.
100585         * modules/uninorm/u16-normcoll-tests (Files): Likewise.
100586         * modules/uninorm/u32-normcmp-tests (Files): Likewise.
100587         * modules/uninorm/u32-normcoll-tests (Files): Likewise.
100588         * modules/unistdio/u8-asnprintf-tests (Files): Likewise.
100589         * modules/unistdio/u8-vasnprintf-tests (Files): Likewise.
100590         * modules/unistdio/u8-vasprintf-tests (Files): Likewise.
100591         * modules/unistdio/u8-vsnprintf-tests (Files): Likewise.
100592         * modules/unistdio/u8-vsprintf-tests (Files): Likewise.
100593         * modules/unistdio/u16-asnprintf-tests (Files): Likewise.
100594         * modules/unistdio/u16-vasnprintf-tests (Files): Likewise.
100595         * modules/unistdio/u16-vasprintf-tests (Files): Likewise.
100596         * modules/unistdio/u16-vsnprintf-tests (Files): Likewise.
100597         * modules/unistdio/u16-vsprintf-tests (Files): Likewise.
100598         * modules/unistdio/u32-asnprintf-tests (Files): Likewise.
100599         * modules/unistdio/u32-vasnprintf-tests (Files): Likewise.
100600         * modules/unistdio/u32-vasprintf-tests (Files): Likewise.
100601         * modules/unistdio/u32-vsnprintf-tests (Files): Likewise.
100602         * modules/unistdio/u32-vsprintf-tests (Files): Likewise.
100603         * modules/unistdio/ulc-asnprintf-tests (Files): Likewise.
100604         * modules/unistdio/ulc-vasnprintf-tests (Files): Likewise.
100605         * modules/unistdio/ulc-vasprintf-tests (Files): Likewise.
100606         * modules/unistdio/ulc-vsnprintf-tests (Files): Likewise.
100607         * modules/unistdio/ulc-vsprintf-tests (Files): Likewise.
100608         * modules/uniwbrk/u8-wordbreaks-tests (Files): Likewise.
100609         * modules/uniwbrk/u16-wordbreaks-tests (Files): Likewise.
100610         * modules/uniwbrk/u32-wordbreaks-tests (Files): Likewise.
100611         * modules/uniwbrk/ulc-wordbreaks-tests (Files): Likewise.
100612         * modules/uniwidth/u8-strwidth-tests (Files): Likewise.
100613         * modules/uniwidth/u8-width-tests (Files): Likewise.
100614         * modules/uniwidth/u16-strwidth-tests (Files): Likewise.
100615         * modules/uniwidth/u16-width-tests (Files): Likewise.
100616         * modules/uniwidth/u32-strwidth-tests (Files): Likewise.
100617         * modules/uniwidth/u32-width-tests (Files): Likewise.
100618         * modules/uniwidth/width-tests (Files): Likewise.
100619         * modules/unlink-tests (Files): Likewise.
100620         * modules/unsetenv-tests (Files): Likewise.
100621         * modules/usleep-tests (Files): Likewise.
100622         * modules/utimens-tests (Files): Likewise.
100623         * modules/utimensat-tests (Files): Likewise.
100624         * modules/vasnprintf-posix-tests (Files): Likewise.
100625         * modules/vasnprintf-tests (Files): Likewise.
100626         * modules/vasprintf-posix-tests (Files): Likewise.
100627         * modules/vasprintf-tests (Files): Likewise.
100628         * modules/vdprintf-posix-tests (Files): Likewise.
100629         * modules/vfprintf-posix-tests (Files): Likewise.
100630         * modules/vprintf-posix-tests (Files): Likewise.
100631         * modules/vsnprintf-posix-tests (Files): Likewise.
100632         * modules/vsnprintf-tests (Files): Likewise.
100633         * modules/vsprintf-posix-tests (Files): Likewise.
100634         * modules/wcrtomb-tests (Files): Likewise.
100635         * modules/wcsnrtombs-tests (Files): Likewise.
100636         * modules/wcsrtombs-tests (Files): Likewise.
100637         * modules/wctype-tests (Files): Likewise.
100638         * modules/wcwidth-tests (Files): Likewise.
100639         * modules/xmemdup0-tests (Files): Likewise.
100640         * modules/xprintf-posix-tests (Files): Likewise.
100641         * modules/xvasprintf-tests (Files): Likewise.
100643 2009-12-24  Eric Blake  <ebb9@byu.net>
100645         test-nanosleep: fix typo
100646         * tests/test-nanosleep.c (SIGNATURE_CHECK): Fix typo in previous
100647         patch.
100648         Reported by Bruno Haible.
100650 2009-12-24  Bruno Haible  <bruno@clisp.org>
100652         Reduce namespace pollution on glibc systems.
100653         * lib/inttypes.in.h: Don't include <stdint.h> on glibc systems.
100654         * lib/stdlib.in.h: Don't include <stdint.h>, <unistd.h> on glibc
100655         systems.
100656         * lib/unistd.in.h: Don't include <stdio.h>, <fcntl.h>, <stdlib.h>,
100657         <getopt.h> on glibc systems.
100658         * lib/fcntl.in.h: Don't include <sys/stat.h>, <unistd.h> on glibc
100659         systems.
100660         * lib/fcntl.c: Include <unistd.h> here instead.
100662 2009-12-24  Bruno Haible  <bruno@clisp.org>
100664         * lib/stdlib.in.h (includes): Fix typo in today's commit.
100666 2009-12-24  Eric Blake  <ebb9@byu.net>
100668         tests: add signature checks
100669         * tests/signature.h (SIGNATURE_CHECK): New file.
100670         * modules/atexit-tests (Files): Use it.
100671         * modules/btowc-tests (Files): Likewise.
100672         * modules/canonicalize-lgpl-tests (Files): Likewise.
100673         * modules/ceilf-tests (Files): Likewise.
100674         * modules/ceill-tests (Files): Likewise.
100675         * modules/chown-tests (Files): Likewise.
100676         * modules/dprintf-posix-tests (Files): Likewise.
100677         * modules/dup2-tests (Files): Likewise.
100678         * modules/dup3-tests (Files): Likewise.
100679         * modules/duplocale-tests (Files): Likewise.
100680         * modules/fchdir-tests (Files): Likewise.
100681         * modules/fcntl-tests (Files): Likewise.
100682         * modules/fdopendir-tests (Files): Likewise.
100683         * modules/fflush-tests (Files): Likewise.
100684         * modules/flock-tests (Files): Likewise.
100685         * modules/floorf-tests (Files): Likewise.
100686         * modules/floorl-tests (Files): Likewise.
100687         * modules/fnmatch-tests (Files): Likewise.
100688         * modules/fopen-tests (Files): Likewise.
100689         * modules/fprintf-posix-tests (Files): Likewise.
100690         * modules/freopen-tests (Files): Likewise.
100691         * modules/frexp-nolibm-tests (Files): Likewise.
100692         * modules/frexp-tests (Files): Likewise.
100693         * modules/frexpl-nolibm-tests (Files): Likewise.
100694         * modules/frexpl-tests (Files): Likewise.
100695         * modules/fseek-tests (Files): Likewise.
100696         * modules/fseeko-tests (Files): Likewise.
100697         * modules/fsync-tests (Files): Likewise.
100698         * modules/ftell-tests (Files): Likewise.
100699         * modules/ftello-tests (Files): Likewise.
100700         * modules/futimens-tests (Files): Likewise.
100701         * modules/getaddrinfo-tests (Files): Likewise.
100702         * modules/getcwd-tests (Files): Likewise.
100703         * modules/getdelim-tests (Files): Likewise.
100704         * modules/getdtablesize-tests (Files): Likewise.
100705         * modules/getgroups-tests (Files): Likewise.
100706         * modules/gethostname-tests (Files): Likewise.
100707         * modules/getline-tests (Files): Likewise.
100708         * modules/getopt-posix-tests (Files): Likewise.
100709         * modules/gettimeofday-tests (Files): Likewise.
100710         * modules/glob-tests (Files): Likewise.
100711         * modules/iconv-tests (Files): Likewise.
100712         * modules/inet_ntop-tests (Files): Likewise.
100713         * modules/inet_pton-tests (Files): Likewise.
100714         * modules/isblank-tests (Files): Likewise.
100715         * modules/lchown-tests (Files): Likewise.
100716         * modules/ldexpl-tests (Files): Likewise.
100717         * modules/link-tests (Files): Likewise.
100718         * modules/linkat-tests (Files): Likewise.
100719         * modules/lseek-tests (Files): Likewise.
100720         * modules/lstat-tests (Files): Likewise.
100721         * modules/mbrtowc-tests (Files): Likewise.
100722         * modules/mbsinit-tests (Files): Likewise.
100723         * modules/mbsnrtowcs-tests (Files): Likewise.
100724         * modules/mbsrtowcs-tests (Files): Likewise.
100725         * modules/memchr-tests (Files): Likewise.
100726         * modules/memcmp-tests (Files): Likewise.
100727         * modules/memmem-tests (Files): Likewise.
100728         * modules/memrchr-tests (Files): Likewise.
100729         * modules/mkdir-tests (Files): Likewise.
100730         * modules/mkfifo-tests (Files): Likewise.
100731         * modules/mkfifoat-tests (Files): Likewise.
100732         * modules/mknod-tests (Files): Likewise.
100733         * modules/nanosleep-tests (Files): Likewise.
100734         * modules/nl_langinfo-tests (Files): Likewise.
100735         * modules/obstack-printf-tests (Files): Likewise.
100736         * modules/open-tests (Files): Likewise.
100737         * modules/openat-tests (Files): Likewise.
100738         * modules/perror-tests (Files): Likewise.
100739         * modules/pipe2-tests (Files): Likewise.
100740         * modules/poll-tests (Files): Likewise.
100741         * modules/popen-tests (Files): Likewise.
100742         * modules/posix_spawn-tests (Files): Likewise.
100743         * modules/posix_spawnp-tests (Files): Likewise.
100744         * modules/pread-tests (Files): Likewise.
100745         * modules/printf-posix-tests (Files): Likewise.
100746         * modules/pty-tests (Files): Likewise.
100747         * modules/random_r-tests (Files): Likewise.
100748         * modules/rawmemchr-tests (Files): Likewise.
100749         * modules/readlink-tests (Files): Likewise.
100750         * modules/remove-tests (Files): Likewise.
100751         * modules/rename-tests (Files): Likewise.
100752         * modules/renameat-tests (Files): Likewise.
100753         * modules/rmdir-tests (Files): Likewise.
100754         * modules/round-tests (Files): Likewise.
100755         * modules/roundf-tests (Files): Likewise.
100756         * modules/roundl-tests (Files): Likewise.
100757         * modules/select-tests (Files): Likewise.
100758         * modules/setenv-tests (Files): Likewise.
100759         * modules/sigaction-tests (Files): Likewise.
100760         * modules/sleep-tests (Files): Likewise.
100761         * modules/snprintf-posix-tests (Files): Likewise.
100762         * modules/snprintf-tests (Files): Likewise.
100763         * modules/sprintf-posix-tests (Files): Likewise.
100764         * modules/stat-tests (Files): Likewise.
100765         * modules/strcasestr-tests (Files): Likewise.
100766         * modules/strchrnul-tests (Files): Likewise.
100767         * modules/strerror-tests (Files): Likewise.
100768         * modules/strsignal-tests (Files): Likewise.
100769         * modules/strstr-tests (Files): Likewise.
100770         * modules/strtod-tests (Files): Likewise.
100771         * modules/strverscmp-tests (Files): Likewise.
100772         * modules/symlink-tests (Files): Likewise.
100773         * modules/symlinkat-tests (Files): Likewise.
100774         * modules/times-tests (Files): Likewise.
100775         * modules/trunc-tests (Files): Likewise.
100776         * modules/truncf-tests (Files): Likewise.
100777         * modules/truncl-tests (Files): Likewise.
100778         * modules/tsearch-tests (Files): Likewise.
100779         * modules/uname-tests (Files): Likewise.
100780         * modules/unlink-tests (Files): Likewise.
100781         * modules/unsetenv-tests (Files): Likewise.
100782         * modules/usleep-tests (Files): Likewise.
100783         * modules/utimensat-tests (Files): Likewise.
100784         * modules/vasprintf-tests (Files): Likewise.
100785         * modules/vdprintf-posix-tests (Files): Likewise.
100786         * modules/vfprintf-posix-tests (Files): Likewise.
100787         * modules/vprintf-posix-tests (Files): Likewise.
100788         * modules/vsnprintf-posix-tests (Files): Likewise.
100789         * modules/vsnprintf-tests (Files): Likewise.
100790         * modules/vsprintf-posix-tests (Files): Likewise.
100791         * modules/wcrtomb-tests (Files): Likewise.
100792         * modules/wcsnrtombs-tests (Files): Likewise.
100793         * modules/wcsrtombs-tests (Files): Likewise.
100794         * modules/wcwidth-tests (Files): Likewise.
100795         * tests/test-isfinite.c (isfinite): Ensure macro declaration.
100796         * tests/test-isinf.c (isinf): Likewise.
100797         * tests/test-isnan.c (isnan): Likewise.
100798         * tests/test-signbit.c (signbit): Likewise.
100799         * tests/test-select.c (FD_CLR, FD_ISSET, FD_SET, FD_ZERO): Ensure
100800         declaration, either as macro or with correct signature.
100801         (select): Ensure function under test is declared with correct
100802         signature in correct header.
100803         * tests/test-atexit.c (atexit): Likewise.
100804         * tests/test-btowc.c (btowc): Likewise.
100805         * tests/test-canonicalize-lgpl.c (realpath)
100806         (canonicalize_file_name): Likewise.
100807         * tests/test-ceilf1.c (ceilf): Likewise.
100808         * tests/test-ceill.c (ceill): Likewise.
100809         * tests/test-chown.c (chown): Likewise.
100810         * tests/test-dprintf-posix.c (dprintf): Likewise.
100811         * tests/test-dup2.c (dup2): Likewise.
100812         * tests/test-dup3.c (dup3): Likewise.
100813         * tests/test-duplocale.c (duplocale): Likewise.
100814         * tests/test-fchdir.c (fchdir): Likewise.
100815         * tests/test-fchownat.c (fchownat): Likewise.
100816         * tests/test-fcntl.c (fcntl): Likewise.
100817         * tests/test-fdopendir.c (fdopendir): Likewise.
100818         * tests/test-fflush.c (fflush): Likewise.
100819         * tests/test-flock.c (flock): Likewise.
100820         * tests/test-floorf1.c (floorf): Likewise.
100821         * tests/test-floorl.c (floorl): Likewise.
100822         * tests/test-fnmatch.c (fnmatch): Likewise.
100823         * tests/test-fopen.c (fopen): Likewise.
100824         * tests/test-fprintf-posix.c (fprintf): Likewise.
100825         * tests/test-freopen.c (freopen): Likewise.
100826         * tests/test-frexp.c (frexp): Likewise.
100827         * tests/test-frexpl.c (frexpl): Likewise.
100828         * tests/test-fseek.c (fseek): Likewise.
100829         * tests/test-fseeko.c (fseeko): Likewise.
100830         * tests/test-fstatat.c (fstatat): Likewise.
100831         * tests/test-fsync.c (fsync): Likewise.
100832         * tests/test-ftell.c (ftell): Likewise.
100833         * tests/test-ftello.c (ftello): Likewise.
100834         * tests/test-futimens.c (futimens): Likewise.
100835         * tests/test-getaddrinfo.c (getaddrinfo, freeaddrinfo)
100836         (gai_strerror): Likewise.
100837         * tests/test-getcwd.c (getcwd): Likewise.
100838         * tests/test-getdelim.c (getdelim): Likewise.
100839         * tests/test-getdtablesize.c (getdtablesize): Likewise.
100840         * tests/test-getgroups.c (getgroups): Likewise.
100841         * tests/test-gethostname.c (gethostname): Likewise.
100842         * tests/test-getline.c (getline): Likewise.
100843         * tests/test-getopt.c (getopt, getopt_long, getopt_long_only):
100844         Likewise.
100845         * tests/test-gettimeofday.c (gettimeofday): Likewise.
100846         * tests/test-glob.c (glob, globfree): Likewise.
100847         * tests/test-iconv.c (iconv, iconv_open, iconv_close): Likewise.
100848         * tests/test-inet_ntop.c (inet_ntop): Likewise.
100849         * tests/test-inet_pton.c (inet_pton): Likewise.
100850         * tests/test-isblank.c (isblank): Likewise.
100851         * tests/test-lchown.c (lchown): Likewise.
100852         * tests/test-ldexpl.c (ldexpl): Likewise.
100853         * tests/test-link.c (link): Likewise.
100854         * tests/test-linkat.c (linkat): Likewise.
100855         * tests/test-lseek.c (lseek): Likewise.
100856         * tests/test-lstat.c (lstat): Likewise.
100857         * tests/test-mbrtowc.c (mbrtowc): Likewise.
100858         * tests/test-mbsinit.c (mbsinit): Likewise.
100859         * tests/test-mbsnrtowcs.c (mbsnrtowcs): Likewise.
100860         * tests/test-mbsrtowcs.c (mbsrtowcs): Likewise.
100861         * tests/test-memchr.c (memchr): Likewise.
100862         * tests/test-memcmp.c (memcmp): Likewise.
100863         * tests/test-memmem.c (memmem): Likewise.
100864         * tests/test-memrchr.c (memrchr): Likewise.
100865         * tests/test-mkdir.c (mkdir): Likewise.
100866         * tests/test-mkdirat.c (mkdirat): Likewise.
100867         * tests/test-mkfifo.c (mkfifo): Likewise.
100868         * tests/test-mkfifoat.c (mkfifoat, mknodat): Likewise.
100869         * tests/test-mknod.c (mknod): Likewise.
100870         * tests/test-nanosleep.c (nanosleep): Likewise.
100871         * tests/test-nl_langinfo.c (nl_langinfo): Likewise.
100872         * tests/test-obstack-printf.c (obstack_printf, obstack_vprintf):
100873         Likewise.
100874         * tests/test-open.c (open): Likewise.
100875         * tests/test-openat.c (openat): Likewise.
100876         * tests/test-perror.c (perror): Likewise.
100877         * tests/test-pipe2.c (pipe2): Likewise.
100878         * tests/test-poll.c (poll): Likewise.
100879         * tests/test-popen.c (popen, pclose): Likewise.
100880         * tests/test-posix_spawn1.c (posix_spawnp, posix_spawnattr_init)
100881         (posix_spawnattr_destroy, posix_spawnattr_setsigmask)
100882         (posix_spawnattr_setflags, posix_spawn_file_actions_init)
100883         (posix_spawn_file_actions_destroy)
100884         (posix_spawn_file_actions_addclose)
100885         (posix_spawn_file_actions_addopen)
100886         (posix_spawn_file_actions_adddup2): Likewise.
100887         * tests/test-posix_spawn3.c (posix_spawn): Likewise.
100888         * tests/test-pread.c (pread): Likewise.
100889         * tests/test-printf-posix.c (printf): Likewise.
100890         * tests/test-pty.c (openpty, forkpty): Likewise.
100891         * tests/test-random_r.c (srandom_r, initstate_r, setstate_r)
100892         (random_r): Likewise.
100893         * tests/test-rawmemchr.c (rawmemchr): Likewise.
100894         * tests/test-readlink.c (readlink): Likewise.
100895         * tests/test-remove.c (remove): Likewise.
100896         * tests/test-rename.c (rename): Likewise.
100897         * tests/test-renameat.c (renameat): Likewise.
100898         * tests/test-rmdir.c (rmdir): Likewise.
100899         * tests/test-round1.c (round): Likewise.
100900         * tests/test-roundf1.c (roundf): Likewise.
100901         * tests/test-roundl.c (roundl): Likewise.
100902         * tests/test-setenv.c (setenv): Likewise.
100903         * tests/test-sigaction.c (sigaction): Likewise.
100904         * tests/test-sleep.c (sleep): Likewise.
100905         * tests/test-snprintf.c (snprintf): Likewise.
100906         * tests/test-sprintf-posix.c (sprintf): Likewise.
100907         * tests/test-stat.c (stat): Likewise.
100908         * tests/test-stpncpy.c (stpncpy): Likewise.
100909         * tests/test-strcasestr.c (strcasestr): Likewise.
100910         * tests/test-strchrnul.c (strchrnul): Likewise.
100911         * tests/test-strerror.c (strerror): Likewise.
100912         * tests/test-strsignal.c (strsignal): Likewise.
100913         * tests/test-strstr.c (strstr): Likewise.
100914         * tests/test-strtod.c (strtod): Likewise.
100915         * tests/test-strverscmp.c (strverscmp): Likewise.
100916         * tests/test-symlink.c (symlink): Likewise.
100917         * tests/test-symlinkat.c (symlinkat, readlinkat): Likewise.
100918         * tests/test-times.c (times): Likewise.
100919         * tests/test-trunc1.c (trunc): Likewise.
100920         * tests/test-truncf1.c (truncf): Likewise.
100921         * tests/test-truncl.c (truncl): Likewise.
100922         * tests/test-tsearch.c (tdelete, tfind, tsearch, twalk):
100923         Likewise.
100924         * tests/test-uname.c (uname): Likewise.
100925         * tests/test-unlink.c (unlink): Likewise.
100926         * tests/test-unlinkat.c (unlinkat): Likewise.
100927         * tests/test-unsetenv.c (unsetenv): Likewise.
100928         * tests/test-usleep.c (usleep): Likewise.
100929         * tests/test-utimensat.c (utimensat): Likewise.
100930         * tests/test-vasprintf.c (asprintf, vasprintf): Likewise.
100931         * tests/test-vdprintf-posix.c (vdprintf): Likewise.
100932         * tests/test-vfprintf-posix.c (vfprintf): Likewise.
100933         * tests/test-vprintf-posix.c (vprintf): Likewise.
100934         * tests/test-vsnprintf.c (vsnprintf): Likewise.
100935         * tests/test-vsprintf-posix.c (vsprintf): Likewise.
100936         * tests/test-wcrtomb.c (wcrtomb): Likewise.
100937         * tests/test-wcsnrtombs.c (wcsnrtombs): Likewise.
100938         * tests/test-wcsrtombs.c (wcsrtombs): Likewise.
100939         * tests/test-wcwidth.c (wcwidth): Likewise.
100941         build: pull in conditional headers during GNULIB_POSIXCHECK
100942         * lib/stdio.in.h (includes): Using GNULIB_POSIXCHECK also requires
100943         definitions from any conditionally-included headers.
100944         * lib/stdlib.in.h (includes): Likewise.
100945         * lib/unistd.in.h (includes): Likewise.
100947 2009-12-24  Bruno Haible  <bruno@clisp.org>
100949         * tests/test-argv-iter.c: Include header file being tested immediately
100950         after config.h.
100951         * tests/test-base64.c: Likewise.
100952         * tests/test-flock.c: Likewise.
100953         * tests/test-fsync.c: Likewise.
100954         * tests/test-getdate.c: Likewise.
100955         * tests/test-getndelim2.c: Likewise.
100956         * tests/test-isfinite.c: Likewise.
100957         * tests/test-isinf.c: Likewise.
100958         * tests/test-strerror.c: Likewise.
100959         * tests/test-strsignal.c: Likewise.
100961 2009-12-23  Eric Blake  <ebb9@byu.net>
100963         unistd: work around cygwin bug
100964         * lib/unistd.in.h (includes): Pick up headers needed for cygwin.
100965         * doc/posix-functions/unlinkat.texi (unlinkat): Document the bug.
100966         * doc/posix-functions/symlinkat.texi (symlinkat): Likewise.
100968 2009-12-23  Bruno Haible  <bruno@clisp.org>
100970         localename: More tests.
100971         * tests/test-localename.c (SIZEOF): New macro.
100972         (categories): New variable.
100973         (test_locale_name, test_locale_name_posix, test_locale_name_environ,
100974         test_locale_name_default): Add test w.r.t. thread locale.
100975         (test_locale_name_thread): New function.
100976         (main): Invoke it.
100978         localename: Make aware of thread locale.
100979         * lib/localename.h (gl_locale_name_thread): New declaration.
100980         (gl_locale_name, gl_locale_name_posix, gl_locale_name_default): Clarify
100981         behaviour with respect to thread locale.
100982         * lib/localename.c: Include <limits.h>, <stddef.h>, <xlocale.h>,
100983         <langinfo.h>, glthread/lock.h.
100984         (SIZE_BITS): New macro.
100985         (string_hash): New function.
100986         (struct hash_node): New type.
100987         (HASH_TABLE_SIZE): New macro.
100988         (struniq_hash_table, struniq_lock): New variables.
100989         (struniq): New function.
100990         (gl_locale_name_thread): New function.
100991         (gl_locale_name): Invoke it.
100992         * m4/localename.m4 (gl_LOCALENAME): Test for uselocale function.
100993         * modules/localename (Depends-on): Add lock.
100994         Reported by Mike Gran <spk121@yahoo.com>.
100996 2009-12-23  Eric Blake  <ebb9@byu.net>
100998         va-args: new module
100999         * modules/va-args: New file.
101000         * m4/va-args.m4 (gl_VA_ARGS): Likewise.
101001         * MODULES.html.sh (Core language properties): Mention it.
101003         gnulib-common: prefer _GL_UNUSED over _UNUSED_PARAMETER_
101004         * m4/gnulib-common.m4 (gl_COMMON): Create a more-appropriately
101005         named alias for __attribute__((__unused__)).
101006         * lib/chown.c: Update client.
101007         * lib/fchmodat.c: Likewise.
101008         * lib/fts.c: Likewise.
101009         * lib/getdate.y: Likewise.
101010         * lib/getgroups.c: Likewise.
101011         * lib/getopt.c: Likewise.
101012         * lib/getugroups.c: Likewise.
101013         * lib/mkdir.c: Likewise.
101014         * lib/mkfifo.c: Likewise.
101015         * lib/mkfifoat.c: Likewise.
101016         * lib/mknod.c: Likewise.
101017         * lib/mknodat.c: Likewise.
101018         * lib/readlink.c: Likewise.
101019         * lib/se-context.in.h: Likewise.
101020         * lib/se-selinux.in.h: Likewise.
101021         * lib/sockets.c: Likewise.
101022         * lib/symlink.c: Likewise.
101023         * lib/symlinkat.c: Likewise.
101024         * lib/unicodeio.c: Likewise.
101025         * lib/unistr.h: Likewise.
101026         * tests/test-areadlink.c: Likewise.
101027         * tests/test-areadlinkat.c: Likewise.
101028         * tests/test-filenamecat.c: Likewise.
101029         * tests/test-fseeko.c: Likewise.
101030         * tests/test-ftello.c: Likewise.
101031         * tests/test-getdate.c: Likewise.
101032         * tests/test-getgroups.c: Likewise.
101033         * tests/test-gethostname.c: Likewise.
101034         * tests/test-quotearg.c: Likewise.
101035         * tests/test-version-etc.c: Likewise.
101036         * tests/test-xalloc-die.c: Likewise.
101037         * tests/test-xfprintf-posix.c: Likewise.
101038         * tests/test-xprintf-posix.c: Likewise.
101039         * tests/test-xvasprintf.c: Likewise.
101041         tests: avoid compiler warnings
101042         * tests/test-fcntl.c (main): Delete unused parameters.
101043         * tests/test-freopen-safer.c (main): Likewise.
101044         * tests/test-xalloc-die.c (main): Mark unused parameters.
101045         * tests/test-fseeko.c (main): Likewise.
101046         * tests/test-ftello.c (main): Likewise.
101047         * tests/test-nanosleep.c (main): Avoid declaration warning.
101048         * tests/test-sleep.c (main): Likewise.
101049         * tests/test-unsetenv.c (main): Silence warning about string
101050         literal.
101051         * m4/setenv.m4 (gl_FUNC_UNSETENV): Likewise.
101053 2009-12-23  Bruno Haible  <bruno@clisp.org>
101055         * tests/test-localename.c (test_locale_name): New function, extracted
101056         from main. Also test mixed situations.
101057         (test_locale_name_posix, test_locale_name_environ,
101058         test_locale_name_default): New functions.
101059         (main): Invoke them all.
101060         * modules/localename-tests (configure.ac): Test for newlocale.
101062 2009-12-23  Bruno Haible  <bruno@clisp.org>
101064         unistd: Ensure getcwd gets declared before being overridden.
101065         * lib/unistd.in.h: Conditionally include <io.h>.
101067 2009-12-22  Bruno Haible  <bruno@clisp.org>
101069         wchar: Diagnose broken combination of glibc and gcc versions and flags.
101070         * m4/wchar.m4 (gl_WCHAR_H_INLINE_OK): New macro.
101071         (gl_WCHAR_H): Invoke it.
101072         * m4/btowc.m4 (gl_FUNC_BTOWC): Require it.
101073         * doc/posix-headers/wchar.texi: Mention the interoperability problem.
101074         Reported by Karl Berry <karl@freefriends.org>.
101076 2009-12-22  Eric Blake  <ebb9@byu.net>
101078         math, unistd: avoid redundant includes
101079         * lib/math.in.h (isnan): No need to re-include <math.h>.
101080         * lib/unistd.in.h (getcwd): Likewise, for <stdlib.h>.
101082         getsubopt: work around cygwin bug
101083         * lib/stdlib.in.h (includes): Move unistd inclusion sooner, to
101084         avoid conflicting with system getsubopt.
101085         * doc/posix-functions/getsubopt.texi (getsubopt): Document the
101086         bug.
101088         getopt: synchronize from glibc
101089         * lib/getopt.c (_getopt_initialize, _getopt_internal_r): Swap
101090         parameter order.  Adjust all callers.
101091         (_getopt_internal_r, main): Adjust quoting in error messages.
101092         Drop considerations for outdated POSIX 1003.2 error message.
101093         * lib/getopt1.c (_getopt_long_r, _getopt_long_only_r): Adjust
101094         callers.
101095         * lib/getopt_int.h (_getopt_internal_r): Adjust prototype.
101097         test-getopt: test stderr behavior
101098         * modules/getopt-posix-tests (Depends-on): Add dup2.
101099         * tests/test-getopt.c (ASSERT): Avoid stderr.
101100         (main): Move stderr to a temporary file.
101101         * tests/test-getopt.h (getopt_loop): No longer manipulate opterr.
101102         Instead, add parameter to inform caller if output occurred.
101103         (test_getopt): Adjust all existing tests to expect silence, and
101104         add new tests of leading ":".
101105         * doc/glibc-functions/getopt_long.texi (getopt_long): Document
101106         glibc shortcomings with leading "-:" or "+:" in optstring.
101107         * doc/glibc-functions/getopt_long_only.texi (getopt_long_only):
101108         Likewise.
101109         * doc/posix-functions/getopt.texi (getopt): Likewise.
101111         test-getopt: enhance test
101112         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Require that getopt_long
101113         supports optind=0.
101114         * tests/test-getopt.c (OPTIND_MIN): Move...
101115         * tests/test-getopt.h (OPTIND_MIN): ...here.
101116         * tests/test-getopt_long.h (test_getopt_long): Add more coverage.
101117         Require that optind=0 works, since modern BSD supports it in
101118         addition to optreset, and since coreutils expects it.
101119         (test_getopt_long_only): New test.
101120         * doc/glibc-functions/getopt_long.texi (getopt_long): Document
101121         glibc shortcomings with 'W;', and enforcement of optind=0.
101122         * doc/glibc-functions/getopt_long_only.texi (getopt_long_only):
101123         Likewise.
101125 2009-12-21  Bruno Haible  <bruno@clisp.org>
101127         localename: Improvements for MacOS X and Cygwin.
101128         * lib/localename.h (gl_locale_name_environ): New declaration.
101129         * lib/localename.c (gl_locale_name_environ): New function, extracted from
101130         gl_locale_name_posix. Ignore dummy LANG values on MacOS X and Cygwin.
101131         (gl_locale_name_posix): Invoke it.
101132         (gl_locale_name_default): Add comments. Use Windows native API also on
101133         Cygwin.
101135 2009-12-21  Bruno Haible  <bruno@clisp.org>
101137         Update list of Win32 locale ids.
101138         * lib/localename.c (LANG_ROMANSH): Renamed from LANG_RHAETO_ROMANCE.
101139         (LANG_SAMI): Renamed from LANG_SAAMI.
101140         (LANG_BASHKIR, LANG_LUXEMBOURGISH, LANG_GREENLANDIC,
101141         LANG_MAPUDUNGUN, LANG_MOHAWK, LANG_BRETON, LANG_OCCITAN, LANG_CORSICAN,
101142         LANG_ALSATIAN, LANG_YAKUT, LANG_KICHE, LANG_KINYARWANDA, LANG_WOLOF,
101143         LANG_DARI, LANG_SCOTTISH_GAELIC): New macros.
101144         (SUBLANG_AFRIKAANS_SOUTH_AFRICA, SUBLANG_ALBANIAN_ALBANIA,
101145         SUBLANG_ALSATIAN_FRANCE, SUBLANG_AMHARIC_ETHIOPIA,
101146         SUBLANG_ARMENIAN_ARMENIA, SUBLANG_ASSAMESE_INDIA,
101147         SUBLANG_BASHKIR_RUSSIA, SUBLANG_BASQUE_BASQUE,
101148         SUBLANG_BELARUSIAN_BELARUS, SUBLANG_BRETON_FRANCE,
101149         SUBLANG_BULGARIAN_BULGARIA, SUBLANG_CAMBODIAN_CAMBODIA,
101150         SUBLANG_CATALAN_SPAIN, SUBLANG_CORSICAN_FRANCE,
101151         SUBLANG_CZECH_CZECH_REPUBLIC, SUBLANG_DANISH_DENMARK,
101152         SUBLANG_DARI_AFGHANISTAN, SUBLANG_DIVEHI_MALDIVES,
101153         SUBLANG_DUTCH_SURINAM, SUBLANG_ESTONIAN_ESTONIA,
101154         SUBLANG_FAEROESE_FAROE_ISLANDS, SUBLANG_FARSI_IRAN,
101155         SUBLANG_FINNISH_FINLAND, SUBLANG_FRISIAN_NETHERLANDS,
101156         SUBLANG_GALICIAN_SPAIN, SUBLANG_GEORGIAN_GEORGIA,
101157         SUBLANG_GREEK_GREECE, SUBLANG_GREENLANDIC_GREENLAND,
101158         SUBLANG_GUJARATI_INDIA, SUBLANG_HAUSA_NIGERIA_LATIN,
101159         SUBLANG_HEBREW_ISRAEL, SUBLANG_HINDI_INDIA, SUBLANG_HUNGARIAN_HUNGARY,
101160         SUBLANG_ICELANDIC_ICELAND, SUBLANG_IGBO_NIGERIA,
101161         SUBLANG_INDONESIAN_INDONESIA, SUBLANG_INUKTITUT_CANADA,
101162         SUBLANG_INUKTITUT_CANADA_LATIN, SUBLANG_IRISH_IRELAND,
101163         SUBLANG_JAPANESE_JAPAN, SUBLANG_KANNADA_INDIA,
101164         SUBLANG_KAZAK_KAZAKHSTAN, SUBLANG_KICHE_GUATEMALA,
101165         SUBLANG_KINYARWANDA_RWANDA, SUBLANG_KONKANI_INDIA,
101166         SUBLANG_KYRGYZ_KYRGYZSTAN, SUBLANG_LAO_LAOS, SUBLANG_LATVIAN_LATVIA,
101167         SUBLANG_LITHUANIAN_LITHUANIA, SUBLANG_LOWER_SORBIAN_GERMANY,
101168         SUBLANG_LUXEMBOURGISH_LUXEMBOURG, SUBLANG_MACEDONIAN_MACEDONIA,
101169         SUBLANG_MALAYALAM_INDIA, SUBLANG_MALTESE_MALTA,
101170         SUBLANG_MAORI_NEW_ZEALAND, SUBLANG_MAPUDUNGUN_CHILE,
101171         SUBLANG_MARATHI_INDIA, SUBLANG_MOHAWK_CANADA, SUBLANG_NEPALI_NEPAL,
101172         SUBLANG_OCCITAN_FRANCE, SUBLANG_ORIYA_INDIA,
101173         SUBLANG_PASHTO_AFGHANISTAN, SUBLANG_POLISH_POLAND,
101174         SUBLANG_ROMANSH_SWITZERLAND, SUBLANG_SAMI_NORTHERN_NORWAY,
101175         SUBLANG_SAMI_NORTHERN_SWEDEN, SUBLANG_SAMI_NORTHERN_FINLAND,
101176         SUBLANG_SAMI_LULE_NORWAY, SUBLANG_SAMI_LULE_SWEDEN,
101177         SUBLANG_SAMI_SOUTHERN_NORWAY, SUBLANG_SAMI_SOUTHERN_SWEDEN,
101178         SUBLANG_SAMI_SKOLT_FINLAND, SUBLANG_SAMI_INARI_FINLAND,
101179         SUBLANG_SANSKRIT_INDIA, SUBLANG_SINHALESE_SRI_LANKA,
101180         SUBLANG_SLOVAK_SLOVAKIA, SUBLANG_SLOVENIAN_SLOVENIA,
101181         SUBLANG_SOTHO_SOUTH_AFRICA, SUBLANG_SWAHILI_KENYA,
101182         SUBLANG_SWEDISH_SWEDEN, SUBLANG_SYRIAC_SYRIA,
101183         SUBLANG_TAGALOG_PHILIPPINES, SUBLANG_TAJIK_TAJIKISTAN,
101184         SUBLANG_TAMIL_INDIA, SUBLANG_TATAR_RUSSIA, SUBLANG_TELUGU_INDIA,
101185         SUBLANG_THAI_THAILAND, SUBLANG_TSWANA_SOUTH_AFRICA,
101186         SUBLANG_TURKISH_TURKEY, SUBLANG_TURKMEN_TURKMENISTAN,
101187         SUBLANG_UKRAINIAN_UKRAINE, SUBLANG_UPPER_SORBIAN_GERMANY,
101188         SUBLANG_VIETNAMESE_VIETNAM, SUBLANG_WELSH_UNITED_KINGDOM,
101189         SUBLANG_WOLOF_SENEGAL, SUBLANG_XHOSA_SOUTH_AFRICA,
101190         SUBLANG_YAKUT_RUSSIA, SUBLANG_YI_PRC, SUBLANG_YORUBA_NIGERIA,
101191         SUBLANG_ZULU_SOUTH_AFRICA): New macros.
101192         (gl_locale_name_from_win32_LANGID): Handle also the territory neutral
101193         locale ids. Add support for Alsatian, Bashkir, Breton, Corsican, Dari,
101194         Greenlandic, K'iche', Kinyarwanda, Luxembourgish, Mapudungun, Mohawk,
101195         Occitan, Scottish Gaelic, Wolof, Yakut. Change language code for Yi.
101196         Add more languages and countries for Sami, Sorbian. Add more countries
101197         for Serbian, Dutch. Add more scripts for Inuktitut. Be more precise
101198         for Pashto. Change country for Syriac, Tswana.
101200 2009-12-21  Eric Blake  <ebb9@byu.net>
101202         test-utimens: avoid spurious failure
101203         * tests/test-chown.h (nap): Factor...
101204         * tests/nap.h: ...into new file.
101205         * tests/test-lchown.h (nap): Avoid duplication.
101206         * tests/test-utimens-common.h (nap): Use shared implementation,
101207         necessary on file systems with 1-second resolution.
101208         * modules/chown-tests (Files): Include new file.
101209         * modules/fdutimensat-tests (Files): Likewise.
101210         * modules/futimens-tests (Files): Likewise.
101211         * modules/lchown-tests (Files): Likewise.
101212         * modules/openat-tests (Files): Likewise.
101213         * modules/utimens-tests (Files): Likewise.
101214         * modules/utimensat-tests (Files): Likewise.
101216 2009-12-19  Eric Blake  <ebb9@byu.net>
101218         futimens, utimensat: work around Linux bug
101219         * m4/futimens.m4 (gl_FUNC_FUTIMENS): Detect ctime bug.
101220         * m4/utimensat.m4 (gl_FUNC_UTIMENSAT): Likewise.
101221         * lib/utimensat.c (rpl_utimensat): Work around it.
101222         * lib/futimens.c (rpl_futimens): Adjust comment.
101224         utimens: work around Linux ctime bug
101225         * lib/utimens.c (detect_ctime_bug): New helper function.
101226         (update_timespec): Differentiate between workaround needed for
101227         this bug vs. what is needed for systems that lack utimensat.
101228         (fdutimens, lutimens): Work around bug.
101230         utimens: check for ctime update
101231         * tests/test-utimens-common.h (check_ctime): Define.
101232         * tests/test-utimens.h (test_utimens): Expose the Linux bug.
101233         * tests/test-futimens.h (test_futimens): Likewise.
101234         * tests/test-lutimens.h (test_lutimens): Likewise.
101235         * doc/posix-functions/futimens.texi (futimens): Document the bug.
101236         * doc/posix-functions/utimensat.texi (utimensat): Likewise.
101238 2009-12-19  Bruno Haible  <bruno@clisp.org>
101240         dprintf-posix: Check against memory leak fixed on 2009-12-15.
101241         * tests/test-dprintf-posix2.sh: New file.
101242         * tests/test-dprintf-posix2.c: New file.
101243         * modules/dprintf-posix-tests (Files): Add them.
101244         (configure.ac): Check for getrlimit and setrlimit.
101245         (Makefile.am): Augment TESTS and CHECK_PROGRAMS.
101247 2009-12-19  Bruno Haible  <bruno@clisp.org>
101249         fprintf-posix: Check against memory leak fixed on 2009-12-15.
101250         * tests/test-fprintf-posix3.sh: New file.
101251         * tests/test-fprintf-posix3.c: New file.
101252         * modules/fprintf-posix-tests (Files): Add them.
101253         (Makefile.am): Augment TESTS and CHECK_PROGRAMS.
101255 2009-12-19  Eric Blake  <ebb9@byu.net>
101257         dirfd: fix prototype
101258         * lib/dirent.in.h (dirfd): Argument is not const, per POSIX.
101259         * lib/dirfd.c (dirfd): Likewise.
101261         canonicalize: reduce memory usage
101262         * lib/canonicalize.c (canonicalize_filename_mode): Trim the
101263         allocation to size.
101264         Reported by Solar Designer <solar@openwall.com>.
101266 2009-12-19  Bruno Haible  <bruno@clisp.org>
101268         New module attribute 'Applicability'.
101269         * modules/TEMPLATE-EXTENDED: New field 'Applicability'.
101270         * gnulib-tool: New option --extract-applicability.
101271         (func_usage): Document it.
101272         (sed_extract_prog): Recognize it.
101273         (func_get_applicability): New function.
101274         (func_import): Generalize handling of 'link-warning' module.
101275         * modules/link-warning (Applicability): New section.
101276         * modules/arg-nonnull (Applicability): New section.
101277         Repoted by Simon Josefsson <simon@josefsson.org>.
101279 2009-12-19  Bruno Haible  <bruno@clisp.org>
101281         fflush: tweak
101282         * lib/fflush.c (update_fpos_cache): Don't use fpos_t on Cygwin.
101283         * lib/fseeko.c (rpl_fseeko): Likewise.
101285 2009-12-16  José E. Marchesi  <jemarch@gnu.org>  (tiny change)
101287         * lib/gl_list.h: Fix typo in comment.
101289 2009-12-16  Eric Blake  <ebb9@byu.net>
101291         fcntl: use to simplify other modules
101292         * modules/cloexec (Depends-on): Add fcntl.
101293         * modules/fchdir (Depends-on): Likewise.
101294         * modules/fd-safer-flag (Depends-on): Likewise.
101295         * modules/unistd-safer (Depends-on): Likewise.
101296         * modules/dup3 (configure.ac): Set module indicator.
101297         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Replace fcntl if fchdir is
101298         missing.
101299         * lib/fchdir.c (_gl_register_dup): Fix comment.
101300         * lib/cloexec.c (dup_cloexec): Simplify, by relying on fcntl.
101301         * lib/dup-safer.c (dup_safer): Likewise.
101302         * lib/dup-safer-flag.c (dup_safer_flag): Likewise.
101303         * lib/dup3.c (dup3): Likewise.
101304         * tests/test-fchdir.c (main): Enhance test.
101305         Fixes a dup_cloexec bug reported by Ondřej Vašík.
101307         fcntl: port portions of fcntl to mingw
101308         * m4/fcntl.m4 (gl_FUNC_FCNTL): Also build fcntl.c on mingw.
101309         * lib/fcntl.c (fcntl) <F_DUPFD, F_DUPFD_CLOEXEC, F_GETFD>: Provide
101310         replacement for mingw.
101311         * modules/fcntl (Description): Update.
101312         (Depends-on): Add dup2.
101313         * m4/fcntl_h.m4 (gl_FCNTL_H_DEFAULTS): Add witness.
101314         * modules/fcntl-h (Makefile.am): Substitute it.
101315         * lib/fcntl.in.h (fcntl): Update declaration.
101316         (F_DUPFD, F_GETFD): New macros, when needed.
101317         * doc/posix-headers/fcntl.texi (fcntl.h): Update documentation.
101318         * doc/posix-functions/fcntl.texi (fcntl): Likewise.
101319         * tests/test-fcntl.c (check_flags, main): Enhance test for items
101320         we now guarantee.
101322         fcntl: work around cygwin bug in F_DUPFD
101323         * m4/fcntl.m4 (gl_REPLACE_FCNTL): New macro.
101324         (gl_FUNC_FCNTL): Use it.  Test for F_DUPFD bug.
101325         * lib/fcntl.c (rpl_fcntl) <F_DUPFD>: Work around it.
101326         <F_DUPFD_CLOEXEC>: Reduce calls to _gl_register_dup.
101327         * doc/posix-functions/fcntl.texi (fcntl): Document it.
101329         fcntl: support F_DUPFD_CLOEXEC on systems with fcntl
101330         * modules/fcntl (Files): List new files.
101331         (configure.ac): Run a test.
101332         * m4/fcntl.m4 (gl_FUNC_FCNTL): New file.
101333         * lib/fcntl.c (rpl_fcntl): Likewise.
101334         * m4/fcntl_h.m4 (gl_FCNTL_H_DEFAULTS): Add witness defaults.
101335         (gl_FCNTL_H): Always replace fcntl.h.
101336         * modules/fcntl-h (Makefile.am): Substitute witnesses.
101337         * lib/fcntl.in.h (fcntl): Declare replacement.
101338         (F_DUPFD_CLOEXEC, GNULIB_defined_F_DUPFD_CLOEXEC): New macro when
101339         needed, plus a witness.
101340         * doc/posix-functions/fcntl.texi (fcntl): Document this.
101341         * doc/posix-headers/fcntl.texi (fcntl.h): Likewise.
101342         * tests/test-fcntl.c: New file.
101343         * modules/fcntl-tests: Likewise.
101345         binary-io: avoid potential compilation warning
101346         * lib/binary-io.h [__DJGPP__]: Avoid null preprocessor
101347         directives.
101349         fflush: avoid compilation error on NetBSD
101350         * lib/fflush.c (update_fpos_cache): Use a union to safely convert
101351         between off_t and fpos_t, since the latter is sometimes a struct.
101352         * lib/fseeko.c (rpl_fseeko): Likewise.
101353         Reported by Alexander Nasonov <alnsn@yandex.ru>.
101355 2009-12-15  Eric Blake  <ebb9@byu.net>
101357         fcntl-h, stdio, sys_ioctl: fix declarations
101358         * lib/stdio.in.h (dprintf): Use of link warning on a variadic
101359         function must not take arguments.
101360         * lib/sys_ioctl.in.h (ioctl): Likewise.
101361         * lib/fcntl.in.h (openat): Likewise.  Declare extern.
101362         (open): Add a link warning.
101364 2009-12-15  Jim Meyering  <meyering@redhat.com>
101366         areadlink, areadlink-with-size: relax license to LGPLv2+
101367         * modules/areadlink (License): Relax to LGPLv2+.
101368         * modules/areadlink-with-size (License): Likewise.
101370 2009-12-15  Joel E. Denny  <jdenny@clemson.edu>
101371             Bruno Haible  <bruno@clisp.org>
101373         *printf: Fix memory leak.
101374         * lib/fprintf.c (fprintf): Free memory allocated by vasnprintf.
101375         * lib/vfprintf.c (vfprintf): Likewise.
101376         * lib/dprintf.c (dprintf): Likewise.
101377         * lib/vdprintf.c (vdprintf): Likewise.
101379 2009-12-14  Eric Blake  <ebb9@byu.net>
101381         accept4: adjust module dependencies
101382         * modules/accept4 (Depends-on): Use fcntl-h, not fcntl.
101384         utimens: one more try at avoiding compiler warning
101385         * lib/utimens.c (lutimens): Lower scope of result.
101387 2009-12-13  Bruno Haible  <bruno@clisp.org>
101389         Move the malloc checking from module 'list' to new module 'xlist'.
101390         * modules/xlist: New file.
101391         * lib/gl_xlist.h: New file.
101392         * lib/gl_xlist.c: New file.
101393         * lib/gl_list.h (gl_list_create_empty, gl_list_create,
101394         gl_list_node_set_value, gl_list_set_at, gl_list_add_first,
101395         gl_list_add_last, gl_list_add_before, gl_list_add_after,
101396         gl_list_nx_add_at, gl_sortedlist_add): Disable declarations.
101397         (gl_list_nx_create_empty, gl_list_nx_create, gl_list_node_nx_set_value,
101398         gl_list_nx_set_at, gl_list_nx_add_first, gl_list_nx_add_last,
101399         gl_list_nx_add_before, gl_list_nx_add_after, gl_list_nx_add_at,
101400         gl_sortedlist_nx_add): New declarations.
101401         (struct gl_list_implementation): Rename and change methods accordingly.
101402         (gl_list_nx_create_empty): Renamed from gl_list_create_empty.
101403         (gl_list_nx_create): Renamed from gl_list_create.
101404         (gl_list_node_nx_set_value): Renamed from gl_list_node_set_value.
101405         (gl_list_nx_set_at): Renamed from gl_list_set_at.
101406         (gl_list_nx_add_first): Renamed from gl_list_add_first.
101407         (gl_list_nx_add_last): Renamed from gl_list_add_last.
101408         (gl_list_nx_add_before): Renamed from gl_list_add_before.
101409         (gl_list_nx_add_after): Renamed from gl_list_add_after.
101410         (gl_list_nx_add_at): Renamed from gl_list_add_at.
101411         (gl_sortedlist_nx_add): Renamed from gl_sortedlist_add.
101412         * lib/gl_list.c (gl_list_nx_create_empty): Renamed from
101413         gl_list_create_empty.
101414         (gl_list_nx_create): Renamed from gl_list_create.
101415         (gl_list_node_nx_set_value): Renamed from gl_list_node_set_value.
101416         (gl_list_nx_set_at): Renamed from gl_list_set_at.
101417         (gl_list_nx_add_first): Renamed from gl_list_add_first.
101418         (gl_list_nx_add_last): Renamed from gl_list_add_last.
101419         (gl_list_nx_add_before): Renamed from gl_list_add_before.
101420         (gl_list_nx_add_after): Renamed from gl_list_add_after.
101421         (gl_list_nx_add_at): Renamed from gl_list_add_at.
101422         (gl_sortedlist_nx_add): Renamed from gl_sortedlist_add.
101423         * lib/gl_array_list.c: Don't include xalloc.h.
101424         (gl_array_nx_create_empty): Renamed from gl_array_create_empty. Return
101425         NULL upon out-of-memory.
101426         (gl_array_nx_create): Renamed from gl_array_create. Return NULL upon
101427         out-of-memory.
101428         (gl_array_node_nx_set_value): Renamed from gl_array_node_set_value.
101429         Change return type to 'int'.
101430         (gl_array_nx_set_at): Renamed from gl_array_set_at.
101431         (grow): Change return type to 'int'. Return -1 upon out-of-memory.
101432         (gl_array_nx_add_first): Renamed from gl_array_add_first. Return NULL
101433         upon out-of-memory.
101434         (gl_array_nx_add_last): Renamed from gl_array_add_last. Return NULL
101435         upon out-of-memory.
101436         (gl_array_nx_add_before): Renamed from gl_array_add_before. Return NULL
101437         upon out-of-memory.
101438         (gl_array_nx_add_after): Renamed from gl_array_add_after. Return NULL
101439         upon out-of-memory.
101440         (gl_array_nx_add_at): Renamed from gl_array_add_at. Return NULL upon
101441         out-of-memory.
101442         (gl_array_sortedlist_nx_add): Renamed from gl_array_sortedlist_add.
101443         Update.
101444         (gl_array_list_implementation): Update.
101445         * lib/gl_carray_list.c: Don't include xalloc.h.
101446         (gl_carray_nx_create_empty): Renamed from gl_carray_create_empty.
101447         Return NULL upon out-of-memory.
101448         (gl_carray_nx_create): Renamed from gl_carray_create. Return NULL upon
101449         out-of-memory.
101450         (gl_carray_node_nx_set_value): Renamed from gl_carray_node_set_value.
101451         Change return type to 'int'.
101452         (gl_carray_nx_set_at): Renamed from gl_carray_set_at.
101453         (grow): Change return type to 'int'. Return -1 upon out-of-memory.
101454         (gl_carray_nx_add_first): Renamed from gl_carray_add_first. Return NULL
101455         upon out-of-memory.
101456         (gl_carray_nx_add_last): Renamed from gl_carray_add_last. Return NULL
101457         upon out-of-memory.
101458         (gl_carray_nx_add_at): Renamed from gl_carray_add_at. Return NULL upon
101459         out-of-memory.
101460         (gl_carray_nx_add_before): Renamed from gl_carray_add_before. Update.
101461         (gl_carray_nx_add_after): Renamed from gl_carray_add_after. Update.
101462         (gl_carray_sortedlist_nx_add): Renamed from gl_carray_sortedlist_add.
101463         Update.
101464         (gl_carray_list_implementation): Update.
101465         * lib/gl_anyhash_list2.h (hash_resize): Do nothing upon out-of-memory.
101466         * lib/gl_anylinked_list2.h (gl_linked_nx_create_empty): Renamed from
101467         gl_linked_create_empty. Return NULL upon out-of-memory.
101468         (gl_linked_nx_create): Renamed from gl_linked_create. Return NULL upon
101469         out-of-memory.
101470         (gl_linked_node_nx_set_value): Renamed from gl_linked_node_set_value.
101471         Change return type to 'int'. Return -1 upon out-of-memory.
101472         (gl_linked_nx_set_at): Renamed from gl_linked_set_at. Return NULL upon
101473         out-of-memory.
101474         (gl_linked_nx_add_first): Renamed from gl_linked_add_first. Return NULL
101475         upon out-of-memory.
101476         (gl_linked_nx_add_last): Renamed from gl_linked_add_last. Return NULL
101477         upon out-of-memory.
101478         (gl_linked_nx_add_before): Renamed from gl_linked_add_before. Return
101479         NULL upon out-of-memory.
101480         (gl_linked_nx_add_after): Renamed from gl_linked_add_after. Return NULL
101481         upon out-of-memory.
101482         (gl_linked_nx_add_at): Renamed from gl_linked_add_at. Return NULL upon
101483         out-of-memory.
101484         (gl_linked_sortedlist_nx_add): Renamed from gl_linked_sortedlist_add.
101485         Update.
101486         * lib/gl_linked_list.c: Don't include xalloc.h.
101487         (gl_linked_list_implementation): Update.
101488         * lib/gl_linkedhash_list.c: Don't include xalloc.h.
101489         (add_to_bucket): Change return type to 'int'.
101490         (gl_linkedhash_list_implementation): Update.
101491         * lib/gl_anytree_list1.h (free_subtree): New function.
101492         * lib/gl_anytree_list2.h (gl_tree_nx_create_empty): Renamed from
101493         gl_tree_create_empty. Return NULL upon out-of-memory.
101494         (gl_tree_node_nx_set_value): Renamed from gl_tree_node_set_value.
101495         Change return type to 'int'. Return -1 upon out-of-memory.
101496         (gl_tree_nx_set_at): Renamed from gl_tree_set_at. Return NULL upon
101497         out-of-memory.
101498         (gl_tree_nx_add_at): Renamed from gl_tree_add_at. Update.
101499         (gl_tree_remove_node): New function, moved here from
101500         lib/gl_anyavltree_list2.h and lib/gl_anyrbtree_list2.h.
101501         (gl_tree_sortedlist_nx_add): Renamed from gl_tree_sortedlist_add.
101502         Update.
101503         * lib/gl_anyavltree_list2.h (create_subtree_with_contents): Use
101504         malloc, not xmalloc. Return NULL upon out-of-memory.
101505         (gl_tree_nx_create): Renamed from gl_tree_create. Return NULL upon
101506         out-of-memory.
101507         (gl_tree_remove_node_from_tree): New function, extracted from
101508         gl_tree_remove_node.
101509         (gl_tree_nx_add_first): Renamed from gl_tree_add_first. Return NULL
101510         upon out-of-memory.
101511         (gl_tree_nx_add_last): Renamed from gl_tree_add_last. Return NULL upon
101512         out-of-memory.
101513         (gl_tree_nx_add_before): Renamed from gl_tree_add_before. Return NULL
101514         upon out-of-memory.
101515         (gl_tree_nx_add_after): Renamed from gl_tree_add_after. Return NULL
101516         upon out-of-memory.
101517         (gl_tree_remove_node): Remove function. Moved to gl_anytree_list2.h.
101518         * lib/gl_anyrbtree_list2.h (create_subtree_with_contents): Use malloc,
101519         not xmalloc. Return NULL upon out-of-memory.
101520         (gl_tree_nx_create): Renamed from gl_tree_create. Return NULL upon
101521         out-of-memory.
101522         (gl_tree_remove_node_from_tree): New function, extracted from
101523         gl_tree_remove_node.
101524         (gl_tree_nx_add_first): Renamed from gl_tree_add_first. Return NULL
101525         upon out-of-memory.
101526         (gl_tree_nx_add_last): Renamed from gl_tree_add_last. Return NULL upon
101527         out-of-memory.
101528         (gl_tree_nx_add_before): Renamed from gl_tree_add_before. Return NULL
101529         upon out-of-memory.
101530         (gl_tree_nx_add_after): Renamed from gl_tree_add_after. Return NULL
101531         upon out-of-memory.
101532         (gl_tree_remove_node): Remove function. Moved to gl_anytree_list2.h.
101533         * lib/gl_avltree_list.c: Don't include xalloc.h. Include
101534         gl_anytree_list1.h before gl_anyavltree_list2.h.
101535         (gl_avltree_list_implementation): Update.
101536         * lib/gl_rbtree_list.c: Don't include xalloc.h. Include
101537         gl_anytree_list1.h before gl_anyavltree_list2.h.
101538         (gl_rbtree_list_implementation): Update.
101539         * lib/gl_anytreehash_list1.h (add_to_bucket, add_nodes_to_buckets):
101540         Change return type to 'int'. Return -1 upon out-of-memory. Use
101541         __builtin_expect.
101542         * lib/gl_avltreehash_list.c: Don't include xalloc.h.
101543         (gl_avltreehash_list_implementation): Update.
101544         * lib/gl_rbtreehash_list.c: Don't include xalloc.h.
101545         (gl_rbtreehash_list_implementation): Update.
101546         * modules/array-list (Depends-on): Remove xalloc.
101547         * modules/carray-list (Depends-on): Likewise.
101548         * modules/linked-list (Depends-on): Likewise.
101549         * modules/linkedhash-list (Depends-on): Likewise.
101550         * modules/avltree-list (Depends-on): Likewise.
101551         * modules/rbtree-list (Depends-on): Likewise.
101552         * modules/avltreehash-list (Depends-on): Likewise.
101553         * modules/rbtreehash-list (Depends-on): Likewise.
101555         * modules/xsublist: New file.
101556         * lib/gl_xsublist.h: New file.
101557         * lib/gl_xsublist.c: New file.
101558         * lib/gl_sublist.h (gl_sublist_create): Disable declaration.
101559         (gl_sublist_nx_create): New declaration.
101560         * lib/gl_sublist.c: Don't include xalloc.h.
101561         (gl_sublist_nx_create_empty): Renamed from gl_sublist_create_empty.
101562         (gl_sublist_nx_create_fill): Renamed from gl_sublist_create_fill.
101563         (gl_sublist_node_nx_set_value): Renamed from gl_sublist_node_set_value.
101564         Change return type to 'int'. Return -1 upon out-of-memory.
101565         (gl_sublist_nx_set_at): Renamed from gl_sublist_set_at. Return NULL
101566         upon out-of-memory.
101567         (gl_sublist_nx_add_first): Renamed from gl_sublist_add_first. Return
101568         NULL upon out-of-memory.
101569         (gl_sublist_nx_add_last): Renamed from gl_sublist_add_last. Return NULL
101570         upon out-of-memory.
101571         (gl_sublist_nx_add_before): Renamed from gl_sublist_add_before. Return
101572         NULL upon out-of-memory.
101573         (gl_sublist_nx_add_after): Renamed from gl_sublist_add_after. Return
101574         NULL upon out-of-memory.
101575         (gl_sublist_nx_add_at): Renamed from gl_sublist_add_at. Return NULL
101576         upon out-of-memory.
101577         (gl_sublist_sortedlist_nx_add): Renamed from gl_sublist_sortedlist_add.
101578         (gl_sublist_list_implementation): Update.
101579         (gl_sublist_nx_create): Renamed from gl_sublist_create. Return NULL
101580         upon out-of-memory.
101581         * modules/sublist (Depends-on): Remove xalloc.
101583         * tests/test-array_list.c: Use gl_list_nx_* functions where possible.
101584         * tests/test-carray_list.c: Likewise.
101585         * tests/test-linked_list.c: Likewise.
101586         * tests/test-linkedhash_list.c: Likewise.
101587         * tests/test-avltree_list.c: Likewise.
101588         * tests/test-rbtree_list.c: Likewise.
101589         * tests/test-avltreehash_list.c: Likewise.
101590         * tests/test-rbtreehash_list.c: Likewise.
101591         * modules/array-list-tests (Makefile.am): Don't link with @LIBINTL@.
101592         * modules/carray-list-tests (Makefile.am): Likewise.
101593         * modules/linked-list-tests (Makefile.am): Likewise.
101594         * modules/linkedhash-list-tests (Makefile.am): Likewise.
101595         * modules/avltree-list-tests (Makefile.am): Likewise.
101596         * modules/rbtree-list-tests (Makefile.am): Likewise.
101597         * modules/avltreehash-list-tests (Makefile.am): Likewise.
101598         * modules/rbtreehash-list-tests (Makefile.am): Likewise.
101600         * NEWS: Mention the changes.
101602         * lib/clean-temp.c: Include gl_xlist.h.
101603         * modules/clean-temp (Depends-on): Add xlist.
101605         * lib/git-merge-changelog.c: Include gl_xlist.h instead of gl_list.h.
101606         * modules/git-merge-changelog (Depends-on): Add xlist. Remove list.
101608         * tests/test-array_oset.c: Include gl_xlist.h.
101609         * modules/array-oset-tests (Depends-on): Add xlist.
101611         Reported by José E. Marchesi <jemarch@gnu.org>.
101613 2009-12-13  Bruno Haible  <bruno@clisp.org>
101615         Move the malloc checking from module 'oset' to new module 'xoset'.
101616         * modules/xoset: New file.
101617         * lib/gl_xoset.h: New file.
101618         * lib/gl_xoset.c: New file.
101619         * lib/gl_oset.h (gl_oset_create_empty, gl_oset_add): Disable
101620         declarations.
101621         (gl_oset_nx_create_empty, gl_oset_nx_add): New declarations.
101622         (struct gl_oset_implementation): Rename and change methods accordingly.
101623         (gl_oset_nx_create_empty): Renamed from gl_oset_create_empty.
101624         (gl_oset_nx_add): Renamed from gl_oset_add. Change return type to
101625         'int'. Mark as __warn_unused_result__.
101626         * lib/gl_oset.c (gl_oset_nx_create_empty): Renamed from
101627         gl_oset_create_empty.
101628         (gl_oset_nx_add): Renamed from gl_oset_add. Change return type to
101629         'int'.
101630         * lib/gl_array_oset.c: Don't include xalloc.h.
101631         (gl_array_nx_create_empty): Renamed from gl_array_create_empty. Use
101632         malloc, not xmalloc.
101633         (grow): Change return type to 'int'. Don't call xalloc_die.
101634         (gl_array_nx_add_at): Renamed from gl_array_add_at. Change return type
101635         to 'int'.
101636         (gl_array_nx_add): Renamed from gl_array_add. Change return type to
101637         'int'.
101638         (gl_array_oset_implementation): Update.
101639         * lib/gl_anytree_oset.h (gl_tree_nx_create_empty): Renamed from
101640         gl_tree_create_empty.
101641         (gl_tree_nx_add): Renamed from gl_tree_add. Change return type to
101642         'int'.
101643         * lib/gl_avltree_oset.c: Don't include xalloc.h.
101644         (gl_tree_nx_add_first): Renamed from gl_tree_add_first. Use malloc, not
101645         xmalloc.
101646         (gl_tree_nx_add_before): Renamed from gl_tree_add_before. Use malloc,
101647         not xmalloc.
101648         (gl_tree_nx_add_after): Renamed from gl_tree_add_after. Use malloc, not
101649         xmalloc.
101650         (gl_avltree_oset_implementation): Update.
101651         * lib/gl_rbtree_oset.c: Don't include xalloc.h.
101652         (gl_tree_nx_add_first): Renamed from gl_tree_add_first. Use malloc, not
101653         xmalloc.
101654         (gl_tree_nx_add_before): Renamed from gl_tree_add_before. Use malloc,
101655         not xmalloc.
101656         (gl_tree_nx_add_after): Renamed from gl_tree_add_after. Use malloc, not
101657         xmalloc.
101658         (gl_rbtree_oset_implementation): Update.
101659         * modules/array-oset (Depends-on): Remove xalloc.
101660         * modules/avltree-oset (Depends-on): Likewise.
101661         * modules/rbtree-oset (Depends-on): Likewise.
101662         * tests/test-array_oset.c: Use gl_oset_nx_* functions where possible.
101663         * tests/test-avltree_oset.c: Likewise.
101664         * tests/test-rbtree_oset.c: Likewise.
101665         * lib/gl_anytreehash_list1.h (add_to_bucket): Likewise.
101666         * modules/avltree-oset-tests (Makefile.am): Don't link with @LIBINTL@.
101667         * modules/rbtree-oset-tests (Makefile.am): Likewise.
101668         * NEWS: Mention the change.
101670 2009-12-05  Alfred M. Szmidt  <ams@gnu.org>
101672         maint.mk: allow a project to override release-prep commands
101673         * top/maint.mk (alpha, beta, stable): Move release-preparatory
101674         commands into a new rule.
101675         (release-prep): New rule.
101676         (release-prep-hook): New overridable variable.
101678 2009-12-13  Bruno Haible  <bruno@clisp.org>
101680         * lib/localcharset.c (locale_charset): Fix comment about use of GetACP.
101682 2009-12-13  Jim Meyering  <meyering@redhat.com>
101684         maint.mk (null_AM_MAKEFLAGS, built_programs): remove unused definitions
101685         * top/maint.mk (null_AM_MAKEFLAGS, built_programs): Remove definitions.
101687 2009-12-12  Bruno Haible  <bruno@clisp.org>
101689         duplocale: Tweak.
101690         * lib/duplocale.c (rpl_duplocale): Mark categories array as 'const'.
101692 2009-12-12  Karl Berry  <karl@gnu.org>
101694         * config/srclist.txt (strtoll.c): tab changes, no more sync.
101696 2009-12-12  Bruno Haible  <bruno@clisp.org>
101698         * m4/po.m4: Undo incorrect untabification.
101700 2009-12-12  Bruno Haible  <bruno@clisp.org>
101702         c-strtod, c-strtold: Use multithread-safe implementation on MacOS X.
101703         * modules/c-strtod (Depends-on): Add locale.
101704         * modules/c-strtold (Depends-on): Likewise.
101706 2009-12-12  Bruno Haible  <bruno@clisp.org>
101708         * lib/localcharset.c (locale_charset): Add comment about use of GetACP.
101710 2009-12-11  Eric Blake  <ebb9@byu.net>
101712         setenv: relax requirement in light of POSIX ruling
101713         * m4/setenv.m4 (gl_FUNC_SETENV_SEPARATE): Test handling of "" but
101714         not NULL.
101715         * tests/test-setenv.c (main): Relax test.
101716         * tests/test-unsetenv.c (main): Likewise.
101717         * doc/posix-functions/setenv.texi (setenv): Document this.
101718         * doc/posix-functions/unsetenv.texi (unsetenv): Likewise.
101720 2009-12-11  Bruno Haible  <bruno@clisp.org>
101722         New module 'fd-safer-flag'.
101723         * lib/dup-safer-flag.c: New file, extracted from lib/dup-safer.c.
101724         * lib/dup-safer.c (dup_safer_flag): Remove function.
101725         * lib/fd-safer-flag.c: New file, extracted from lib/fd-safer.c.
101726         * lib/fd-safer.c (fd_safer_flag): Remove function.
101727         * lib/unistd-safer.h (dup_safer_flag, fd_safer_flag): Update condition.
101728         * modules/cloexec (configure.ac): Drop indicator macro.
101729         * modules/fd-safer-flag: New file.
101730         * modules/pipe2-safer (Depends-on): Add fd-safer-flag. Remove cloexec.
101731         * modules/stdlib-safer (Depends-on): Add fd-safer-flag.
101732         * modules/unistd-safer-tests (Depends-on): Add fd-safer-flag.
101734 2009-12-11  Bruno Haible  <bruno@clisp.org>
101736         Tests for module 'nl_langinfo'.
101737         * modules/nl_langinfo-tests: New file.
101738         * tests/test-nl_langinfo.sh: New file.
101739         * tests/test-nl_langinfo.c: New file.
101741         New module 'nl_langinfo'.
101742         * lib/nl_langinfo.c: New file.
101743         * m4/nl_langinfo.m4: New file.
101744         * modules/nl_langinfo: New file.
101745         * doc/posix-functions/nl_langinfo.texi: Mention the new module.
101747 2009-12-11  Bruno Haible  <bruno@clisp.org>
101749         Tests for module 'langinfo'.
101750         * modules/langinfo-tests: New file.
101751         * tests/test-langinfo.c: New file.
101753         New module 'langinfo'.
101754         * lib/langinfo.in.h: New file.
101755         * m4/langinfo_h.m4: New file.
101756         * modules/langinfo: New file.
101757         * doc/posix-headers/langinfo.texi: Mention the new module.
101759 2009-12-11  Bruno Haible  <bruno@clisp.org>
101761         * lib/config.charset: Untabify.
101763 2009-12-11  Bruno Haible  <bruno@clisp.org>
101765         * modules/unistd-safer (configure.ac): Drop indicator macro.
101767 2009-12-11  Bruno Haible  <bruno@clisp.org>
101769         Move pipe2-safer code to its own file.
101770         * lib/pipe2-safer.c: New file, extracted from lib/pipe-safer.c.
101771         * lib/pipe-safer.c (pipe2_safer): Remove function.
101772         * modules/pipe2-safer (Files): Add lib/pipe2-safer.c.
101773         (Makefile.am): Add it to lib_SOURCES.
101775 2009-12-10  Bruno Haible  <bruno@clisp.org>
101777         * lib/recvfrom.c (rpl_recvfrom): Allow the from argument to be NULL.
101779 2009-12-10  Bruno Haible  <bruno@clisp.org>
101781         Declare which arguments expect non-NULL values, for GCC and clang.
101782         * build-aux/arg-nonnull.h: New file.
101783         * modules/arg-nonnull: New file.
101784         * lib/arpa_inet.in.h (_GL_ARG_NONNULL): New placeholder.
101785         (inet_ntop, inet_pton): Use it.
101786         * lib/dirent.in.h (_GL_ARG_NONNULL): New placeholder.
101787         (closedir, dirfd, opendir, scandir, alphasort): Use it.
101788         * lib/fcntl.in.h (_GL_ARG_NONNULL): New placeholder.
101789         (open, openat): Use it.
101790         * lib/fnmatch.in.h (_GL_ARG_NONNULL): New placeholder.
101791         (fnmatch): Use it.
101792         * lib/getopt.in.h (_GL_ARG_NONNULL): New placeholder.
101793         (getopt, getopt_long, getopt_long_only): Use it.
101794         * lib/glob.in.h (_GL_ARG_NONNULL): New placeholder.
101795         * lib/glob-libc.h (glob, globfree, glob64, globfree64, glob_pattern_p):
101796         Use it.
101797         * lib/iconv.in.h (_GL_ARG_NONNULL): New placeholder.
101798         (iconv_open): Use it.
101799         * lib/inttypes.in.h (_GL_ARG_NONNULL): New placeholder.
101800         (strtoimax, strtoumax): Use it.
101801         * lib/locale.in.h (_GL_ARG_NONNULL): New placeholder.
101802         (duplocale): Use it.
101803         * lib/math.in.h (_GL_ARG_NONNULL): New placeholder.
101804         (frexp, frexpl): Use it.
101805         * lib/netdb.in.h (_GL_ARG_NONNULL): New placeholder.
101806         (getaddrinfo, freeaddrinfo, getnameinfo): Use it.
101807         * lib/search.in.h (_GL_ARG_NONNULL): New placeholder.
101808         (tsearch, tfind, tdelete, twalk): Use it.
101809         * lib/signal.in.h (_GL_ARG_NONNULL): New placeholder.
101810         (sigismember, sigemptyset, sigaddset, sigdelset, sigfillset,
101811         sigpending): Use it.
101812         * lib/spawn.in.h (_GL_ARG_NONNULL): New placeholder.
101813         (posix_spawn, posix_spawnp, posix_spawnattr_init,
101814         posix_spawnattr_destroy, posix_spawnattr_getsigdefault,
101815         posix_spawnattr_setsigdefault, posix_spawnattr_getsigmask,
101816         posix_spawnattr_setsigmask, posix_spawnattr_getflags,
101817         posix_spawnattr_setflags, posix_spawnattr_getpgroup,
101818         posix_spawnattr_setpgroup, posix_spawnattr_getschedpolicy,
101819         posix_spawnattr_setschedpolicy, posix_spawnattr_getschedparam,
101820         posix_spawnattr_setschedparam, posix_spawn_file_actions_init,
101821         posix_spawn_file_actions_destroy, posix_spawn_file_actions_addopen,
101822         posix_spawn_file_actions_addclose, posix_spawn_file_actions_adddup2):
101823         Use it.
101824         * lib/stdio.in.h (_GL_ARG_NONNULL): New placeholder.
101825         (dprintf, fclose, fopen, fprintf, fpurge, fputc, fputs, freopen,
101826         rpl_fseek, fseeko, rpl_ftell, ftello, fwrite, getdelim, getline,
101827         obstack_printf, obstack_vprintf, popen, printf, putc, puts, remove,
101828         rename, renameat, snprintf, sprintf, asprintf, vasprintf, vdprintf,
101829         vfprintf, vprintf, vsnprintf, vsprintf): Use it.
101830         * lib/stdlib.in.h (_GL_ARG_NONNULL): New placeholder.
101831         (atoll, canonicalize_file_name, getloadavg, getsubopt, mkdtemp,
101832         mkostemp, mkostemps, mkstemp, mkstemps, putenv, srandom_r, initstate_r,
101833         setstate_r, random_r, realpath, rpmatch, setenv, strtod, strtoll,
101834         strtoull, unsetenv): Use it.
101835         * lib/string.in.h (_GL_ARG_NONNULL): New placeholder.
101836         (memchr, memmem, mempcpy, memrchr, rawmemchr, stpcpy, stpncpy,
101837         strchrnul, strdup, strndup, strnlen, strpbrk, strsep, strstr,
101838         strcasestr, strtok_r, mbslen, mbsnlen, mbschr, mbsrchr, mbsstr,
101839         mbscasecmp, mbsncasecmp, mbspcasecmp, mbscasestr, mbscspn, mbspbrk,
101840         mbsspn, mbssep, mbstok_r, strverscmp): Use it.
101841         * lib/strings.in.h (_GL_ARG_NONNULL): New placeholder.
101842         (strcasecmp, strncasecmp): Use it.
101843         * lib/sys_socket.in.h (_GL_ARG_NONNULL): New placeholder.
101844         (rpl_connect, rpl_bind, rpl_getpeername, rpl_getsockname,
101845         rpl_getsockopt, rpl_recv, rpl_send, rpl_recvfrom, rpl_sendto,
101846         rpl_setsockopt): Use it.
101847         * lib/sys_stat.in.h (_GL_ARG_NONNULL): New placeholder.
101848         (fchmodat, fstat, fstatat, lchmod, rpl_lstat, mkdir, mkdirat, mkfifo,
101849         mkfifoat, mknod, mknodat, stat, utimensat): Use it.
101850         * lib/sys_time.in.h (_GL_ARG_NONNULL): New placeholder.
101851         (gettimeofday): Use it.
101852         * lib/sys_times.in.h (_GL_ARG_NONNULL): New placeholder.
101853         (times): Use it.
101854         * lib/sys_utsname.in.h (_GL_ARG_NONNULL): New placeholder.
101855         (uname): Use it.
101856         * lib/time.in.h (_GL_ARG_NONNULL): New placeholder.
101857         (nanosleep, mktime, localtime_r, gmtime_r, strptime, timegm): Use it.
101858         * lib/unistd.in.h (_GL_ARG_NONNULL): New placeholder.
101859         (chown, euidaccess, faccessat, _gl_register_fd, fchownat,
101860         getdomainname, gethostname, getlogin_r, lchown, link, linkat, pipe2,
101861         pread, readlink, readlinkat, rmdir, symlink, symlinkat, unlink,
101862         unlinkat, write): Use it.
101863         * lib/wchar.in.h (_GL_ARG_NONNULL): New placeholder.
101864         (mbsrtowcs, mbsnrtowcs, wcsrtombs, wcsnrtombs): Use it.
101865         * lib/argv-iter.h: Include arg-nonnull.h.
101866         (_ATTRIBUTE_NONNULL_): Remove macro.
101867         (argv_iter_init_argv, argv_iter_init_stream, argv_iter,
101868         argv_iter_n_args, argv_iter_free): Use _GL_ARG_NONNULL.
101869         * lib/canonicalize-lgpl.c (_GL_ARG_NONNULL): Define, to defeat gcc
101870         optimization.
101871         * lib/getaddrinfo.c (_GL_ARG_NONNULL): Likewise.
101872         * lib/getdelim.c (_GL_ARG_NONNULL): Likewise.
101873         * lib/glob.c (_GL_ARG_NONNULL): Likewise.
101874         * lib/random_r.c (_GL_ARG_NONNULL): Likewise.
101875         * lib/setenv.c (_GL_ARG_NONNULL): Likewise.
101876         * lib/strtod.c (_GL_ARG_NONNULL): Likewise.
101877         * lib/tsearch.c (_GL_ARG_NONNULL): Likewise.
101878         * lib/unsetenv.c (_GL_ARG_NONNULL): Likewise.
101879         * modules/arpa_inet (Depends-on): Add arg-nonnull.
101880         (Makefile.am): Insert arg-nonnull.h into arpa/inet.h.
101881         * modules/dirent (Depends-on): Add arg-nonnull.
101882         (Makefile.am): Insert arg-nonnull.h into dirent.h.
101883         * modules/fcntl-h (Depends-on): Add arg-nonnull.
101884         (Makefile.am): Insert arg-nonnull.h into fcntl.h.
101885         * modules/fnmatch (Depends-on): Add arg-nonnull.
101886         (Makefile.am): Insert arg-nonnull.h into fnmatch.h.
101887         * modules/getopt-posix (Depends-on): Add arg-nonnull.
101888         (Makefile.am): Insert arg-nonnull.h into getopt.h.
101889         * modules/glob (Depends-on): Add arg-nonnull.
101890         (Makefile.am): Insert arg-nonnull.h into glob.h.
101891         * modules/iconv_open (Depends-on): Add arg-nonnull.
101892         (Makefile.am): Insert arg-nonnull.h into iconv.h.
101893         * modules/inttypes (Depends-on): Add arg-nonnull.
101894         (Makefile.am): Insert arg-nonnull.h into inttypes.h.
101895         * modules/locale (Depends-on): Add arg-nonnull.
101896         (Makefile.am): Insert arg-nonnull.h into locale.h.
101897         * modules/math (Depends-on): Add arg-nonnull.
101898         (Makefile.am): Insert arg-nonnull.h into math.h.
101899         * modules/netdb (Depends-on): Add arg-nonnull.
101900         (Makefile.am): Insert arg-nonnull.h into netdb.h.
101901         * modules/search (Depends-on): Add arg-nonnull.
101902         (Makefile.am): Insert arg-nonnull.h into search.h.
101903         * modules/signal (Depends-on): Add arg-nonnull.
101904         (Makefile.am): Insert arg-nonnull.h into signal.h.
101905         * modules/spawn (Depends-on): Add arg-nonnull.
101906         (Makefile.am): Insert arg-nonnull.h into spawn.h.
101907         * modules/stdio (Depends-on): Add arg-nonnull.
101908         (Makefile.am): Insert arg-nonnull.h into stdio.h.
101909         * modules/stdlib (Depends-on): Add arg-nonnull.
101910         (Makefile.am): Insert arg-nonnull.h into stdlib.h.
101911         * modules/string (Depends-on): Add arg-nonnull.
101912         (Makefile.am): Insert arg-nonnull.h into string.h.
101913         * modules/strings (Depends-on): Add arg-nonnull.
101914         (Makefile.am): Insert arg-nonnull.h into strings.h.
101915         * modules/sys_socket (Depends-on): Add arg-nonnull.
101916         (Makefile.am): Insert arg-nonnull.h into sys/socket.h.
101917         * modules/sys_stat (Depends-on): Add arg-nonnull.
101918         (Makefile.am): Insert arg-nonnull.h into sys/stat.h.
101919         * modules/sys_time (Depends-on): Add arg-nonnull.
101920         (Makefile.am): Insert arg-nonnull.h into sys/time.h.
101921         * modules/sys_times (Depends-on): Add arg-nonnull.
101922         (Makefile.am): Insert arg-nonnull.h into sys/times.h.
101923         * modules/sys_utsname (Depends-on): Add arg-nonnull.
101924         (Makefile.am): Insert arg-nonnull.h into sys/utsname.h.
101925         * modules/time (Depends-on): Add arg-nonnull.
101926         (Makefile.am): Insert arg-nonnull.h into time.h.
101927         * modules/unistd (Depends-on): Add arg-nonnull.
101928         (Makefile.am): Insert arg-nonnull.h into unistd.h.
101929         * modules/wchar (Depends-on): Add arg-nonnull.
101930         (Makefile.am): Insert arg-nonnull.h into wchar.h.
101931         * modules/argv-iter (Depends-on): Add arg-nonnull.
101932         * tests/test-canonicalize.c (null_ptr): New function.
101933         (main): Use it.
101934         * tests/test-canonicalize-lgpl.c (null_ptr): New function.
101935         (main): Use it.
101936         * tests/test-memmem.c (null_ptr): New function.
101937         (main): Use it.
101938         Reported by Jim Meyering.
101940 2009-12-10  Bruno Haible  <bruno@clisp.org>
101942         Use spaces for indentation, not tabs.
101943         * lib/**/*.[hcy] except lib/reg*.[hc]: Untabify.
101944         * m4/*.m4: Untabify.
101945         * build-aux/*.h: Untabify.
101946         * tests/**/*.[hc]: Untabify.
101947         * README: New section "Indent with spaces, not TABs", based on
101948         coreutils/HACKING and comments by Pádraig Brady and Paolo Bonzini.
101949         * NEWS: Mention the change.
101951 2009-12-10  Bruno Haible  <bruno@clisp.org>
101953         pty test: Fix link error.
101954         * modules/pty-tests (Makefile.am): Add the default LDADD value to
101955         test_pty_LDADD.
101957 2009-12-07  Simon Josefsson  <simon@josefsson.org>
101959         * modules/pty: New file.
101960         * modules/pty-tests: New file.
101961         * m4/pty.m4: New file.
101962         * tests/test-pty.c: New file.
101963         * doc/glibc-headers/pty.texi: Modified.
101964         * doc/glibc-functions/forkpty.texi: Modified.
101965         * doc/glibc-functions/openpty.texi: Modified.
101967 2009-12-10  Bruno Haible  <bruno@clisp.org>
101969         Avoid syntax error in C++ mode.
101970         * lib/stdio.in.h (rename): Don't use parameter name 'new'.
101972 2009-12-10  Bruno Haible  <bruno@clisp.org>
101974         Use sed with option -e.
101975         * gnulib-tool (func_version, func_emit_copyright_notice,
101976         func_emit_initmacro_end, func_import, func_create_testdir): Pass
101977         option -e to sed.
101978         * modules/link-warning (Makefile.am): Likewise.
101980 2009-12-10  Jim Meyering  <meyering@redhat.com>
101982         mgetgroups: do not write bytes beyond end of malloc'd buffer
101983         * lib/mgetgroups.c: Fix an off-by-one error.  When we have no
101984         username, we call getgroups with a one-element-shorter buffer,
101985         but still told it the length was original, max_n_groups.
101987 2009-12-09  Eric Blake  <ebb9@byu.net>
101989         cloexec: relax license
101990         * modules/cloexec (Maintainer): Add myself.
101991         (License): Use LGPL, not GPL.
101993         link-warning: optimize generation
101994         * modules/link-warning (Makefile.am): Reduce process usage.
101996 2009-12-09  Bruno Haible  <bruno@clisp.org>
101998         * doc/posix-functions/unsetenv.texi: Mention Solaris 10 bug for which a
101999         workaround was added on 2009-11-17.
102001 2009-12-09  Jim Meyering  <meyering@redhat.com>
102002             Bruno Haible  <bruno@clisp.org>
102004         link-warning: Allow extra lines at the top of build-aux/link-warning.h.
102005         * modules/link-warning (Makefile.am): Make the comment-removing sed
102006         command more robust in the face of bootstrap-prepended comment lines.
102008 2009-12-09  Bruno Haible  <bruno@clisp.org>
102010         * lib/mgetgroups.c (mgetgroups): Don't remove duplicates if there is at
102011         most one group.
102013 2009-12-09  Simon Josefsson  <simon@josefsson.org>
102014             Bruno Haible  <bruno@clisp.org>
102016         * build-aux/link-warning.h: Add copyright notice.
102017         * modules/link-warning (Makefile.am): Generate link-warning.h from
102018         build-aux/link-warning.h. Update LINK_WARNING_H accordingly.
102019         * NEWS: Mention change in link-warning module.
102020         * modules/arpa_inet (Makefile.am): Add dependency to arpa/inet.h.
102021         * modules/dirent (Makefile.am): Add dependency to dirent.h.
102022         * modules/fcntl-h (Makefile.am): Add dependency to fcntl.h.
102023         * modules/getopt-posix (Makefile.am): Add dependency to getopt.h.
102024         * modules/inttypes (Makefile.am): Add dependency to inttypes.h.
102025         * modules/math (Makefile.am): Add dependency to math.h.
102026         * modules/search (Makefile.am): Add dependency to search.h.
102027         * modules/signal (Makefile.am): Add dependency to signal.h.
102028         * modules/spawn (Makefile.am): Add dependency to spawn.h.
102029         * modules/stdio (Makefile.am): Add dependency to stdio.h.
102030         * modules/stdlib (Makefile.am): Add dependency to stdlib.h.
102031         * modules/string (Makefile.am): Add dependency to string.h.
102032         * modules/strings (Makefile.am): Add dependency to strings.h.
102033         * modules/sys_ioctl (Makefile.am): Add dependency to sys/ioctl.h.
102034         * modules/sys_select (Makefile.am): Add dependency to sys/select.h.
102035         * modules/sys_socket (Makefile.am): Add dependency to sys/socket.h.
102036         * modules/sys_stat (Makefile.am): Add dependency to sys/stat.h.
102037         * modules/sys_times (Makefile.am): Add dependency to sys/times.h.
102038         * modules/sys_utsname (Makefile.am): Add dependency to sys/utsname.h.
102039         * modules/sys_wait (Makefile.am): Add dependency to sys/wait.h.
102040         * modules/unistd (Makefile.am): Add dependency to unistd.h.
102041         * modules/wchar (Makefile.am): Add dependency to wchar.h.
102043 2009-12-09  Bruno Haible  <bruno@clisp.org>
102045         fchdir: Optimize away rpl_fstat when possible.
102046         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Set REPLACE_FSTAT only together with
102047         REPLACE_OPEN_DIRECTORY.
102048         * lib/fchdir.c (rpl_fstat): Define only when REPLACE_OPEN_DIRECTORY.
102050 2009-12-09  Bruno Haible  <bruno@clisp.org>
102052         * lib/fchdir.c: Update comment.
102054 2009-12-09  Bruno Haible  <bruno@clisp.org>
102056         * lib/cloexec.c (set_cloexec_flag): Clarify intent of dup2 call.
102058 2009-12-08  Eric Blake  <ebb9@byu.net>
102060         fchdir: avoid memory leak on re-registration.
102061         * lib/fchdir.c (ensure_dirs_slot): Avoid memory leak.
102063 2009-12-08  Jim Meyering  <meyering@redhat.com>
102065         init.sh: avoid Solaris 10 /bin/sh portability problem
102066         Solaris 10's /bin/sh does not pass '.' arguments 2.. to the
102067         sourced script:
102068           $ printf 'echo "$@"\n' > f; /bin/sh -c '. ./f bar'
102069           $ printf 'echo "$@"\n' > f; /bin/bash -c '. ./f bar'
102070           bar
102071         tests/init.sh relied on that, accepting a --set-path=DIR argument,
102072         and two tests used that idiom.
102073         * tests/init.sh: Update suggested usage comments.
102074         (path_prepend_): New function, to be used in place
102075         of the --src-path=DIR option.
102076         (setup_): Move PATH-prepending code into path_prepend_.
102077         * tests/test-pread.sh: Adapt to new usage.
102078         * tests/test-xalloc-die.sh: Likewise.
102080 2009-12-08  Simon Josefsson  <simon@josefsson.org>
102082         * doc/gnulib.texi (Glibc pty.h): Add.
102083         * doc/glibc-functions/forkpty.texi: Add.
102084         * doc/glibc-functions/openpty.texi: Add.
102085         Suggested by Bruno Haible.
102087 2009-12-08  Eric Blake  <ebb9@byu.net>
102089         fchdir: fix logic bugs
102090         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Fix logic bug.
102091         * tests/test-fchdir.c (main): Enhance test.
102092         * lib/fchdir.c (rpl_fstat): Always provide if fchdir replacement
102093         is in use.
102095         dup2: fix logic bugs
102096         * lib/dup2.c (dup2): Fix logic bugs.  Use HAVE_DUP2 rather than
102097         REPLACE_DUP2 to decide when rpl_dup2 is needed.
102098         * m4/dup2.m4 (gl_REPLACE_DUP2): Only define REPLACE_DUP2 when dup2
102099         exists.
102100         (gl_FUNC_DUP2): Drop unneeded AC_DEFINE.
102102 2009-12-07  Eric Blake  <ebb9@byu.net>
102104         unlink: fix m4 detection
102105         * m4/unlink.m4 (gl_FUNC_UNLINK): Include correct header.
102107         unistd-safer: add unit test
102108         * modules/unistd-safer-tests: New file.
102109         * tests/test-dup-safer.c: Likewise.
102110         * tests/test-cloexec.c (setmode): Avoid compiler warning.
102111         * tests/test-dup2.c (setmode): Likewise.
102112         * lib/cloexec.c (dup_cloexec): Fix mingw compile error.
102114         cloexec: preserve text vs. binary across dup_cloexec
102115         * lib/cloexec.c (dup_cloexec) [W32]: Query and use translation
102116         mode.
102117         * modules/dup2-tests (Depends-on): Add binary-io.
102118         * modules/cloexec-tests (Depends-on): Likewise.
102119         * tests/test-dup2.c (setmode, is_mode): New helpers.
102120         (main): Add tests that translation mode is preserved.
102121         * tests/test-cloexec.c (setmode, is_mode, main): Likewise.
102122         Reported by Bruno Haible.
102124         mgetgroups: reduce duplicate listings
102125         * lib/mgetgroups.c (mgetgroups): Reduce duplicates from the
102126         resulting array.
102127         * tests/test-chown.h (test_chown): Simplify client.
102128         * tests/test-lchown.h (test_lchown): Likewise.
102130 2009-12-06  Bruno Haible  <bruno@clisp.org>
102132         * lib/cloexec.c (dup_cloexec): Fix handling of _gl_register_dup return
102133         value.
102135 2009-12-06  Bruno Haible  <bruno@clisp.org>
102137         * lib/progname.c: Include stdio.h, stdlib.h.
102138         (set_program_name): Reject a NULL argument.
102140 2009-12-05  Eric Blake  <ebb9@byu.net>
102142         pipe2-safer: new module
102143         * modules/pipe2-safer: New file.
102144         * lib/unistd-safer.h (pipe2_safer): New prototype.
102145         * lib/unistd--.h (pipe2): New wrapper.
102146         * lib/pipe-safer.c (pipe2_safer): New function.
102147         * modules/pipe (Depends-on): Add pipe2-safer.
102148         * lib/pipe.c (create_pipe) [WIN32]: Let pipe2_safer do the work.
102150         stdlib-safer: preserve cloexec flag for mkostemp[s]
102151         * lib/mkstemp-safer.c (mkostemp_safer, mkostemps_safer): Use new
102152         fd_safer_flag.
102154         unistd-safer: allow preservation of cloexec status via flag
102155         * lib/unistd-safer.h (dup_safer_flag, fd_safer_flag): New
102156         prototypes.
102157         * lib/dup-safer.c (dup_safer_flag): New function.
102158         * lib/fd-safer.c (fd_safer_flag): Likewise.
102159         * modules/cloexec (configure.ac): Set witness.
102161         test-dup2: enhance test
102162         * modules/dup2-tests (Depends-on): Add cloexec.
102163         * tests/test-dup2.c (main): Enhance test.
102165         cloexec: add dup_cloexec
102166         * lib/cloexec.h (dup_cloexec): New prototype.  Add copyright
102167         header and comments.
102168         * lib/cloexec.c (set_cloexec_flag): Add comments.
102169         (dup_cloexec): New function, with mingw implementation borrowed
102170         from...
102171         * lib/w32spawn.h (dup_noinherit): ...here.
102172         * modules/execute (Depends-on): Add cloexec.
102173         * modules/pipe (Depends-on): Likewise.
102174         * modules/cloexec (Depends-on): Add dup2.
102175         * modules/cloexec-tests (Files): New file.
102176         * tests/test-cloexec.c: Likewise.
102178         test-xalloc-die: fix test for mingw
102179         * modules/xalloc-die-tests (Files): Add tests/init.sh.
102180         * tests/test-xalloc-die.sh: Rewrite to use init.sh.  Strip
102181         directory and .exe suffix off argv[0] output.
102183         test-fseeko: fix test for mingw
102184         * tests/test-fseeko.c (fseek): Redefine GL_LINK_WARNING, rather
102185         than undefining fseek, so test will pass on mingw.
102187 2009-12-05  Bruno Haible  <bruno@clisp.org>
102189         * lib/progname.h (set_program_name): Clarify specification.
102190         * lib/progname.c (set_program_name): Likewise.
102191         Reported by Jim Meyering.
102193 2009-12-05  Jim Meyering  <meyering@redhat.com>
102195         maint.mk: backslash-escape parens in default regexp
102196         * top/maint.mk (news-check-regexp): Now that we're using grep -E,
102197         backslash-escape the literal parentheses.
102199         maint.mk: news-date-check: use grep -E
102200         * top/maint.mk (today): Define a Make variable, not a...
102201         (news-date-check): ...shell variable.
102202         (news-date-regexp): Use the Make variable.
102203         Use grep's -E option.  Change the failing diagnostic to mention
102204         the variable, $(news-date-regexp).
102206 2009-12-04  Alfred M. Szmidt  <ams@gnu.org>
102208         maintainer-makefile: allow customization of NEWS entry format
102209         * top/maint.mk (news-date-regexp): New overridable variable.
102210         (news-date-check): Use it.
102212 2009-12-04  Eric Blake  <ebb9@byu.net>
102214         mgetgroups: add xgetgroups, and avoid ENOSYS failures
102215         * lib/mgetgroups.h (xgetgroups): New prototype.
102216         * lib/mgetgroups.c (xgetgroups): New wrapper.
102217         (mgetgroups): Handle ENOSYS.
102218         * modules/mgetgroups (Depends-on): Add realloc.
102219         Reported by Scott Harrison <scott.gnu.2009@scottrix.co.uk>.
102221         mgetgroups: avoid argument promotion issues with -1
102222         * lib/mgetgroups.c (mgetgroups): A cast is required when checking
102223         for invalid gid_t.
102224         * tests/test-chown.h (getegid, test_chown): Likewise.
102225         * tests/test-lchown.h (getegid, test_lchown): Likewise.
102227 2009-12-03  Paolo Bonzini  <bonzini@gnu.org>
102229         exclude: Fix header file problems.
102230         * lib/exclude.h: Add multiple inclusion guards and include stdbool.h.
102232 2009-12-01  Jim Meyering  <meyering@redhat.com>
102234         fts: fts_open: do not let an empty string cause immediate failure
102235         This is required in support of GNU rm, for which the command
102236         "rm A '' B" must process and remove both A and B, in spite of
102237         the empty string argument.
102238         * lib/fts.c (fts_open): Do not let the presence of an empty string
102239         cause fts_open to fail immediately.  Most fts-using tools must be
102240         able to process all arguments, in order, and can be expected to
102241         diagnose such arguments themselves.
102243 2009-11-30  Eric Blake  <ebb9@byu.net>
102245         utimens: fix compilation error
102246         * lib/utimens.c (lutimens) [!HAVE_UTIMENSAT && HAVE_LUTIMES]:
102247         Declare variable at right scope.
102249 2009-11-29  Jim Meyering  <meyering@redhat.com>
102251         bootstrap: handle perl-5.11's changed --version output
102252         * build-aux/bootstrap (get_version): Handle perl separately,
102253         since perl-5.11's --version output is different.
102255 2009-11-28  Jim Meyering  <meyering@redhat.com>
102257         userspec: depend on the inttostr module, too
102258         * modules/userspec (Depends-on): Add inttostr.
102260         userspec: disallow an ID that maps to (uid_t)-1 or (gid_t)-1
102261         * lib/userspec.c (parse_with_separator): Do not accept a user ID
102262         number of MAXUID when it evaluates to (uid_t) -1.
102263         Likewise for group ID.  Reported by Matt McCutchen in
102264         <http://savannah.gnu.org/bugs/?28113>
102266         userspec: reformat to use spaces, not TABs
102267         * lib/userspec.c: Expand TABs to spaces.
102268         Add Emacs' "indent-tabs-mode: nil" hint.
102270 2009-11-27  Eric Blake  <ebb9@byu.net>
102272         getopt-gnu: flush out another BSD bug
102273         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Test for the bug.
102274         * tests/test-getopt.c (main): Check POSIXLY_CORRECT first, to
102275         flush out BSD bug.
102276         * tests/test-getopt.h (test_getopt): End lists with NULL.
102277         * tests/test-getopt_long.h (test_getopt_long): Likewise.
102278         (test_getopt_long_posix): Enhance test.
102279         * modules/getopt-posix-tests (Depends-on): Add stdbool.
102280         * doc/glibc-functions/getopt_long.texi (getopt_long): Mention
102281         getopt-gnu.
102282         * doc/glibc-functions/getopt_long_only.texi (getopt_long_only):
102283         Likewise.
102285 2009-11-27  Simon Josefsson  <simon@josefsson.org>
102287         * modules/idpriv-droptemp-tests (Notice): Fix text.
102289 2009-11-27  Jim Meyering  <meyering@redhat.com>
102291         test-xalloc-die: avoid spurious failure due to libtool argv difference
102292         In a libtool-enabled project, this test would fail due to a difference
102293         in the emitted program name, e.g.,
102294         -test-xalloc-die: memory exhausted
102295         +/tmp/.../tests/.libs/lt-test-xalloc-die: memory exhausted
102296         Use program to avoid that.
102297         * modules/xalloc-die-tests (Depends-on): Add progname.
102298         * tests/test-xalloc-die.c: Include progname.h".
102299         (program_name): Remove decl.
102300         (main): Call set_program_name.
102301         * tests/test-xalloc-die.sh (compare): Remove unnecessary ${EXE}.
102303 2009-11-26  Richard Jones  <rjones@redhat.com>
102305         w32sock: leave win32 error in place.
102306         * lib/w32sock.h (set_winsock_errno): Do not call WSASetLastError.
102308 2009-11-26  Eric Blake  <ebb9@byu.net>
102310         init.sh: suggest to use skip_ and fail_ functions in comments
102311         * tests/init.sh: Add a sentence.
102313 2009-11-25  Bruno Haible  <bruno@clisp.org>
102315         init.sh: add documentation in comments
102316         * tests/init.sh: Add some developer and user documentation.
102318 2009-11-26  Jim Meyering  <meyering@redhat.com>
102320         init.sh: accommodate even those who specify bogus srcdir manually
102321         * tests/init.sh: Normally, srcdir is guaranteed by automake and
102322         configure-time tests to be sanitized, so that there is no need to
102323         use "$srcdir" in Makefile rules and shell scripts.  Using $srcdir
102324         (with no double quotes) suffices.  However, since tests may be
102325         invoked manually, and since you may explicitly set srcdir to the
102326         name of a directory containing spaces, do quote its uses here.
102327         * tests/test-pread.sh: Likewise.
102328         Suggested by Bruno Haible.
102330         test-pread.sh: avoid diagnostics for those who ignore SIGPIPE
102331         * tests/test-pread.sh: Write no data into the pipe, because
102332         test-pread actually reads none.  This avoids a diagnostic,
102333         "bash: echo: write error: Broken pipe", that arises in the unusual
102334         event something is ignoring SIGPIPE, and might be interpreted
102335         as some sort of failure.  Reported by Bruno Haible.
102337 2009-11-25  Jim Meyering  <meyering@redhat.com>
102339         test-pread: cover failure with ESPIPE and EINVAL
102340         * tests/test-pread.c (main): Test for failure, too.
102341         * tests/test-pread.sh: Invoke with stdin on a pipe.
102342         Suggested by Eric Blake.
102344         pread: improvement and fix
102345         * modules/pread (Depends-on): Depend on lseek, for portability to
102346         e.g., mingw.  Suggested by Eric Blake.
102347         * lib/pread.c (__libc_read): Define.  Reported by Richard W.M. Jones.
102349         unistd.in.h: correct declaration of pread
102350         * lib/unistd.in.h: Correct type of "buf" parameter: void*, not char*
102351         Reported by Richard W.M. Jones.
102353         test-pread.sh: distribute the test script
102354         * modules/pread-tests (Files): Include test-pread.sh.
102356         test-pread.sh: clean up
102357         * tests/test-pread.sh: Don't refer to $builddir. Just use equivalent ".".
102358         * modules/pread-tests (TESTS_ENVIRONMENT): Don't export builddir.
102359         That is unnecessary, since it's always ".".
102360         Suggestion from Eric Blake.
102362         test-pread.sh: make executable
102363         * tests/test-pread.sh: Set executable bit.
102364         Reported by Eric Blake.
102366         correct typo in test-pread.sh
102367         * tests/test-pread.sh: Add #! line.
102369         test pread
102370         * tests/test-pread.c: New file.
102371         * tests/test-pread.sh: Likewise.
102372         * modules/pread-tests: Likewise.
102374         pread: new module
102375         * modules/pread: New file.
102376         * lib/unistd.in.h (pread): Define/declare.
102377         * lib/pread.c (pread): New file.
102378         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Define defaults.
102379         * modules/unistd (Makefile.am): Substitute witnesses.
102380         * doc/posix-functions/pread.texi (pread): Update.
102381         * MODULES.html.sh: Add pread.
102383 2009-11-25  Jim Meyering  <meyering@redhat.com>
102385         tests/init.sh: new file to be used via most *.sh tests
102386         * tests/init.sh: New file.
102388 2009-11-25  Eric Blake  <ebb9@byu.net>
102390         utimens: work around older Linux failure with symlinks
102391         * lib/utimens.c (lutimensat_works_really): New variable.
102392         (fdutimens, lutimens): Use it to manage kernels that support
102393         nanosecond times on files, but not on symlinks.
102394         Reported by Ondřej Vašík.
102396         utimes: fix configure grammar
102397         * m4/utimes.m4 (gl_FUNC_UTIMES): Delete spurious word.
102399 2009-11-25  Paolo Bonzini  <bonzini@gnu.org>
102401         regex: Fix fastmap for multibyte character ranges.
102402         * lib/regcomp.c (re_compute_fastmap_iter): Add all multibyte lead
102403         characters when a multibyte character range is included.
102405 2009-11-22  Andy Wingo  <wingo@pobox.com>
102407         version-etc: work also with AM_INIT_AUTOMAKE's no-define option
102408         * lib/version-etc.c [!defined PACKAGE]: Define to PACKAGE_TARNAME.
102410 2009-11-24  Bruno Haible  <bruno@clisp.org>
102412         doc: Most *_l functions exist in MacOS X 10.5.
102413         * doc/posix-functions/duplocale.texi: Update platforms list.
102414         * doc/posix-functions/freelocale.texi: Likewise.
102415         * doc/posix-functions/newlocale.texi: Likewise.
102416         * doc/posix-functions/uselocale.texi: Likewise.
102417         * doc/posix-functions/isalnum_l.texi: Likewise.
102418         * doc/posix-functions/isalpha_l.texi: Likewise.
102419         * doc/posix-functions/isblank_l.texi: Likewise.
102420         * doc/posix-functions/iscntrl_l.texi: Likewise.
102421         * doc/posix-functions/isdigit_l.texi: Likewise.
102422         * doc/posix-functions/isgraph_l.texi: Likewise.
102423         * doc/posix-functions/islower_l.texi: Likewise.
102424         * doc/posix-functions/isprint_l.texi: Likewise.
102425         * doc/posix-functions/ispunct_l.texi: Likewise.
102426         * doc/posix-functions/isspace_l.texi: Likewise.
102427         * doc/posix-functions/isupper_l.texi: Likewise.
102428         * doc/posix-functions/iswalnum_l.texi: Likewise.
102429         * doc/posix-functions/iswalpha_l.texi: Likewise.
102430         * doc/posix-functions/iswblank_l.texi: Likewise.
102431         * doc/posix-functions/iswcntrl_l.texi: Likewise.
102432         * doc/posix-functions/iswctype_l.texi: Likewise.
102433         * doc/posix-functions/iswdigit_l.texi: Likewise.
102434         * doc/posix-functions/iswgraph_l.texi: Likewise.
102435         * doc/posix-functions/iswlower_l.texi: Likewise.
102436         * doc/posix-functions/iswprint_l.texi: Likewise.
102437         * doc/posix-functions/iswpunct_l.texi: Likewise.
102438         * doc/posix-functions/iswspace_l.texi: Likewise.
102439         * doc/posix-functions/iswupper_l.texi: Likewise.
102440         * doc/posix-functions/iswxdigit_l.texi: Likewise.
102441         * doc/posix-functions/isxdigit_l.texi: Likewise.
102442         * doc/posix-functions/nl_langinfo_l.texi: Likewise.
102443         * doc/posix-functions/strcasecmp_l.texi: Likewise.
102444         * doc/posix-functions/strcoll_l.texi: Likewise.
102445         * doc/posix-functions/strfmon_l.texi: Likewise.
102446         * doc/posix-functions/strftime_l.texi: Likewise.
102447         * doc/posix-functions/strncasecmp_l.texi: Likewise.
102448         * doc/posix-functions/strxfrm_l.texi: Likewise.
102449         * doc/posix-functions/tolower_l.texi: Likewise.
102450         * doc/posix-functions/toupper_l.texi: Likewise.
102451         * doc/posix-functions/towctrans_l.texi: Likewise.
102452         * doc/posix-functions/towlower_l.texi: Likewise.
102453         * doc/posix-functions/towupper_l.texi: Likewise.
102454         * doc/posix-functions/wcscoll_l.texi: Likewise.
102455         * doc/posix-functions/wcsxfrm_l.texi: Likewise.
102456         * doc/posix-functions/wctrans_l.texi: Likewise.
102457         * doc/posix-functions/wctype_l.texi: Likewise.
102458         * doc/glibc-functions/strptime_l.texi: Likewise.
102459         * doc/glibc-functions/strtod_l.texi: Likewise.
102460         * doc/glibc-functions/strtof_l.texi: Likewise.
102461         * doc/glibc-functions/strtol_l.texi: Likewise.
102462         * doc/glibc-functions/strtold_l.texi: Likewise.
102463         * doc/glibc-functions/strtoll_l.texi: Likewise.
102464         * doc/glibc-functions/strtoul_l.texi: Likewise.
102465         * doc/glibc-functions/strtoull_l.texi: Likewise.
102466         * doc/glibc-functions/wcsftime_l.texi: Likewise.
102467         * doc/glibc-functions/wcstod_l.texi: Likewise.
102468         * doc/glibc-functions/wcstof_l.texi: Likewise.
102469         * doc/glibc-functions/wcstol_l.texi: Likewise.
102470         * doc/glibc-functions/wcstold_l.texi: Likewise.
102471         * doc/glibc-functions/wcstoll_l.texi: Likewise.
102472         * doc/glibc-functions/wcstoul_l.texi: Likewise.
102473         * doc/glibc-functions/wcstoull_l.texi: Likewise.
102475 2009-11-24  Bruno Haible  <bruno@clisp.org>
102477         duplocale: Fix logic bug.
102478         * lib/duplocale.c: Don't include <langinfo.h>.
102479         (_NL_LOCALE_NAME): Remove macro.
102480         (rpl_duplocale): Use setlocale instead of nl_langinfo.
102481         * tests/test-duplocale.c (main): Also test duplocale after uselocale.
102483 2009-11-23  Jim Meyering  <meyering@redhat.com>
102485         test-update-copyright: don't hard-code /usr/bin/perl
102486         * tests/test-update-copyright.sh (YEAR): Use date +%Y, rather than
102487         perl to print the current year.  Gilles Espinasse reported that
102488         the replaced use of perl was hard-coded as /usr/bin/perl.
102490 2009-11-23  Bruno Haible  <bruno@clisp.org>
102492         duplocale: Add support for glibc 2.3.x.
102493         * lib/duplocale.c (rpl_duplocale): Add fallback code for glibc 2.3.x.
102495 2009-11-22  Bruno Haible  <bruno@clisp.org>
102497         vasnprintf: Tiny optimization.
102498         * lib/vasnprintf.c (decimal_point_char): Choose the fast path also on
102499         MacOS X.
102501 2009-11-22  Bruno Haible  <bruno@clisp.org>
102503         Tests for module 'duplocale'.
102504         * modules/duplocale-tests: New file.
102505         * tests/test-duplocale.c: New file.
102507         New module 'duplocale'.
102508         * m4/duplocale.m4: New file.
102509         * lib/locale.in.h (duplocale): New declaration.
102510         * lib/duplocale.c: New file.
102511         * m4/locale_h.m4 (gl_REPLACE_LOCALE_H, gl_LOCALE_MODULE_INDICATOR,
102512         gl_LOCALE_H_DEFAULTS): New macros.
102513         (gl_LOCALE_H): Require gl_LOCALE_H_DEFAULTS. Invoke
102514         gl_CHECK_NEXT_HEADERS unconditionally. Invoke gl_REPLACE_LOCALE_H.
102515         * modules/locale (Makefile.am): Substitute also GNULIB_DUPLOCALE,
102516         REPLACE_DUPLOCALE.
102517         * modules/duplocale: New file.
102518         * doc/posix-functions/duplocale.texi: Mention the glibc bug.
102520 2009-11-22  Bruno Haible  <bruno@clisp.org>
102522         * modules/locale-tests (configure.ac): Test for newlocale function.
102523         * tests/test-locale.c: When the system has extended locale functions,
102524         verify that <locale.h> defines locale_t and LC_GLOBAL_LOCALE.
102526         locale: Make locale_t available when possible.
102527         * lib/locale.in.h: Include <xlocale.h> when it exists.
102528         * m4/locale_h.m4 (gl_LOCALE_H): Check for <xlocale.h> and arrange to
102529         replace <locale.h> if it does not define locale_t but <xlocale.h> does.
102530         * modules/locale (Depends-on): Add extensions.
102531         (Makefile.am): Also substitute HAVE_XLOCALE_H.
102532         * doc/posix-headers/locale.texi: Document the problem with locale_t.
102534 2009-11-22  Bruno Haible  <bruno@clisp.org>
102536         Add comments.
102537         * m4/dirent_h.m4 (gl_DIRENT_H): Add comment about gl_CHECK_NEXT_HEADERS
102538         invocation.
102539         * m4/iconv_h.m4 (gl_ICONV_H): Likewise.
102540         * m4/spawn_h.m4 (gl_SPAWN_H): Likewise.
102541         * m4/wchar.m4 (gl_WCHAR_H): Likewise.
102543 2009-11-22  Bruno Haible  <bruno@clisp.org>
102545         error: account for the possibility of freopen (stdout).
102546         * lib/error.c: Include <unistd.h>.
102547         (flush_stdout): New function, extracted from error and error_at_line.
102548         Determine stdout's fd dynamically.
102549         (error, error_at_line): Invoke flush_stdout.
102550         * m4/error.m4 (gl_PREREQ_ERROR): Require AC_C_INLINE.
102551         * modules/error (Depends-on): Add unistd.
102553 2009-11-22  Bruno Haible  <bruno@clisp.org>
102555         diffseq: Add comment.
102556         * lib/diffseq.h (IF_LINT): Add comment about pitfall.
102558 2009-11-22  Jim Meyering  <meyering@redhat.com>
102560         c-stack: avoid defining an unused static function
102561         * lib/c-stack.c (find_stack_direction): Do not define this function
102562         when it will not be used.
102564         diffseq: avoid spurious gcc warnings
102565         * lib/diffseq.h (IF_LINT2): Define.
102566         (compareseq): Use it to initialize two members of "part".
102567         This avoids two used-uninitialized warnings.
102569 2009-11-21  Jim Meyering  <meyering@redhat.com>
102571         c-stack: avoid "ignoring return value of `write'" warning
102572         * lib/c-stack.c: Include "ignore-value.h".
102573         (die): Explicitly ignore each write return value.
102574         * modules/c-stack (Depends-on): Add ignore-value.
102576 2009-11-21  Bruno Haible  <bruno@clisp.org>
102578         diffseq: reduce scope of variable 'best'.
102579         * lib/diffseq.h (diag) [USE_HEURISTIC]: Reduce scope of 'best'
102580         variable, earlier used for two different purposes.
102582 2009-11-21  Jim Meyering  <meyering@redhat.com>
102584         diffseq: remove useless assignment to "best"
102585         * lib/diffseq.h (diag) [USE_HEURISTIC]: Remove useless "best = 0"
102586         assignment.  At that point "best" is already guaranteed to be zero.
102588 2009-11-20  Eric Blake  <ebb9@byu.net>
102590         build: mention ftp redirector in release announcements
102591         * top/maint.mk (gnu_rel_host, url_dir_list): Provide defaults for
102592         values that used to come from cfg.mk; mention FTP redirect URL.
102593         * build-aux/announce-gen: Mention the mirror list.
102594         Suggested by Karl Berry.
102596         nanosleep: improve port to mingw
102597         * lib/nanosleep.c (rpl_nanosleep): Reject invalid arguments.
102598         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Incorporate LIBSOCKET into
102599         LIB_NANOSLEEP, but only when needed.
102600         * modules/select (Link): Document LIBSOCKET.
102601         * m4/select.m4 (gl_FUNC_SELECT): Ensure LIBSOCKET is defined early
102602         enough.
102604         nanosleep: work around cygwin bug
102605         * lib/nanosleep.c (rpl_nanosleep) [HAVE_BUG_BIG_NANOSLEEP]:
102606         Fix logic bug when nanosleep fails.  Work around cygwin 1.5.x
102607         bug.
102608         (getnow): Delete, not needed.
102609         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): No longer require
102610         LIB_CLOCK_GETTIME.
102611         * modules/nanosleep (Depends-on): Add intprops and verify.  Drop
102612         clock-time, gettime.
102613         * doc/posix-functions/nanosleep.texi (nanosleep): Document the
102614         bug.
102615         * modules/nanosleep-tests: New test.
102616         * tests/test-nanosleep.c: New file.
102618         sleep: work around cygwin bug
102619         * lib/sleep.c (rpl_sleep): Work around the bug.
102620         * m4/sleep.m4 (gl_FUNC_SLEEP): Detect the bug.
102621         (gl_PREREQ_SLEEP): Delete unused macro.
102622         * modules/sleep (Depends-on): Add verify.
102623         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add default.
102624         * modules/unistd (Makefile.am): Substitute witness.
102625         * lib/unistd.in.h (sleep): Update prototype.
102626         * doc/posix-functions/sleep.texi (sleep): Document the bug.
102627         * tests/test-sleep.c (main) [HAVE_DECL_ALARM]: Test it.
102628         * modules/sleep-tests (Depends-on): Check for alarm.
102630 2009-11-20  Jim Meyering  <meyering@redhat.com>
102632         maint.mk: improve sc_prohibit_magic_number_exit
102633         * top/maint.mk (sc_prohibit_magic_number_exit): Tighten regexp
102634         so it does not match uses like System.exit(1).
102635         Add comments showing how to correct all offenders.
102637 2009-11-19  Eric Blake  <ebb9@byu.net>
102639         xalloc-die-tests: add missing library
102640         * modules/xalloc-die-tests (Makefile.am): Add LDADD line.
102642         test-xvasprintf: silence compiler warnings
102643         * tests/test-xvasprintf.c (test_xvasprintf, test_xasprintf): Mask
102644         empty string from gcc.
102646 2009-11-19  Jim Meyering  <meyering@redhat.com>
102648         xfreopen: new module, from coreutils
102649         * modules/xfreopen: New module.
102650         * lib/xfreopen.c: New file.
102651         * lib/xfreopen.h: New file.
102652         * MODULES.html.sh (File stream based Input/Output"): Add it.
102654 2009-11-19  Eric Blake  <ebb9@byu.net>
102656         manywarnings: depend on warnings
102657         * modules/manywarnings (Depends-on): Add warnings.
102659         build: avoid compiler warnings
102660         * lib/select.c (rpl_select): Delete unused variable.
102661         * lib/setsockopt.c (rpl_setsockopt): Avoid incompatible pointer.
102663 2009-11-18  Eric Blake  <ebb9@byu.net>
102665         tests: avoid false negative with --with-packager
102666         * tests/test-version-etc.sh: Discard packager information.
102667         * tests/test-argp-version-etc-1.sh: Likewise.
102668         Reported by Mike Frysinger.
102670         utimens: fix regression on Solaris
102671         * m4/utimens.m4 (gl_UTIMENS): Check for BSD bug.
102672         * lib/utimens.c (fdutimens): Revert 2009-11-08 change; Solaris 10
102673         can only change fd timestamps via futimesat.  Instead, use an
102674         additional witness macro to avoid BSD bug.
102675         Reported by Jim Meyering.
102677 2009-11-17  Eric Blake  <ebb9@byu.net>
102679         usleep: use it to simplify tests
102680         * modules/stat-time-tests (Depends-on): Add usleep.
102681         (configure.ac): Drop usleep check.
102682         * modules/chown-tests (Depends-on, configure.ac): Likewise.
102683         * modules/lchown-tests (Depends-on, configure.ac): Likewise.
102684         * modules/fdutimensat-tests (Depends-on, configure.ac): Likewise.
102685         * modules/futimens-tests (Depends-on, configure.ac): Likewise.
102686         * modules/openat-tests (Depends-on, configure.ac): Likewise.
102687         * modules/utimens-tests (Depends-on, configure.ac): Likewise.
102688         * modules/utimensat-tests (Depends-on, configure.ac): Likewise.
102689         * modules/pipe-filter-gi-tests (Depends-on, configure.ac):
102690         Likewise.
102691         * tests/test-chown.h (nap): Rely on nicer usleep semantics.
102692         * tests/test-lchown.h (nap): Likewise.
102693         * tests/test-pipe-filter-gi2-main.c (small_nap): Likewise.
102694         * tests/test-stat-time.c (nap): Likewise.
102695         * tests/test-utimens-common.h (nap): Update comments.
102697         usleep: new module
102698         * modules/usleep: New file.
102699         * m4/usleep.m4 (gl_FUNC_USLEEP): Likewise.
102700         * lib/usleep.c (usleep): Likewise.
102701         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add defaults.
102702         * modules/unistd (Makefile.am): Substitute witnesses.
102703         * lib/unistd.in.h (usleep): Add declaration.
102704         * doc/pastposix-functions/usleep.texi (usleep): Document this.
102705         * MODULES.html.sh (Date and time): Likewise.
102706         * modules/usleep-tests (Depends-on): New test.
102707         * tests/test-usleep.c: New file.
102709         chown: work around OpenBSD bug
102710         * lib/chown.c (rpl_chown): Work around the bug.
102711         * lib/lchown.c (rpl_lchown): Attempt to do likewise.
102712         * m4/chown.m4 (gl_FUNC_CHOWN): Test for ctime bug.
102713         * m4/lchown.m4 (gl_FUNC_LCHOWN): Check for lchmod.
102714         * modules/chown (Depends-on): Add stdbool.
102715         * modules/lchown (Depends-on): Likewise.
102716         * doc/posix-functions/chown.texi (chown): Document the bug.
102717         * doc/posix-functions/lchown.texi (lchown): Likewise.
102718         * tests/test-lchown.h (test_chown): Relax test.
102720         mkstemp: avoid conflict with C++ keyword template
102721         * lib/mkdtemp.c (mkdtemp): Change spelling of template.
102722         * lib/mkostemp.c (mkostemp): Likewise.
102723         * lib/mkostemps.c (mkostemps): Likewise.
102724         * lib/mkstemp.c (mkstemp): Likewise.
102725         * lib/mkstemps.c (mkstemps): Likewise.
102727         xalloc-die-tests: optimize
102728         * tests/test-xalloc-die.sh: Reduce number of processes.
102730 2009-11-17  Simon Josefsson  <simon@josefsson.org>
102732         * gnulib-tool: Support LGPLv3+ licenses in module files.  Tiny
102733         patch from ludo@gnu.org (Ludovic Courtès).
102735 2009-11-17  Jim Meyering  <meyering@redhat.com>
102737         version-etc: use proper license string
102738         * modules/version-etc (License): Use LGPL, not LGPLv3+.
102739         * modules/version-etc-fsf: Likewise.
102741 2009-11-17  Simon Josefsson  <simon@josefsson.org>
102743         * tests/test-xalloc-die.sh: Add license.  Check that nothing is
102744         printed to stdout.  Deal with EOL differences.
102746 2009-11-17  Eric Blake  <ebb9@byu.net>
102748         unsetenv: work around Solaris bug
102749         * m4/setenv.m4 (gl_FUNC_UNSETENV): Check for bug.
102750         * lib/unsetenv.c (rpl_unsetenv): Work around it.
102751         Reported by Jim Meyering.
102753         vasnprintf: avoid compiler warnings
102754         * lib/vasnprintf.c (VASNPRINTF): Avoid shadowing our own local
102755         variables.
102756         * lib/printf-args.c (PRINTF_FETCHARGS): Avoid type mismatch.
102758 2009-11-17  Simon Josefsson  <simon@josefsson.org>
102760         * modules/xalloc-die-tests (Makefile.am): Drop XFAIL_TESTS
102761         settings since xalloc-die is no longer the self test,
102762         xalloc-die.sh is.
102764 2009-11-17  Jim Meyering  <meyering@redhat.com>
102766         test-xalloc-die.sh: make the code agree with the commit log
102767         * tests/test-xalloc-die.sh: Put "." at the front of $PATH, not
102768         at the end, just in case you happen to have a test-xalloc-die
102769         program in some other PATH directory.
102771         test-xalloc-die.sh: fix a portability bug
102772         * tests/test-xalloc-die.sh: Do not invoke via ./test-xalloc-die.
102773         Instead, set PATH to start with "." and invoke via "test-xalloc-die".
102774         Otherwise, argv[0] (as often seen in diagnostics) would be too
102775         system-dependent, sometimes with, and sometimes without the leading "./".
102777         version-etc-fsf: relax license to LGPLv3+
102778         * modules/version-etc-fsf (License): Relax license.
102780 2009-11-16  Eric Blake  <ebb9@byu.net>
102782         xalloc-die-tests: avoid printing null pointer
102783         * modules/xalloc-die-tests (Files, Makefile.am): Wrap execution in
102784         shell script.
102785         * tests/test-xalloc-die.c (program_name): Declare.
102786         * tests/test-xalloc-die.sh (tmpfiles): New file.
102788         setenv, unsetenv: work around various bugs
102789         * lib/setenv.c (setenv) [!HAVE_SETENV]: Resync from glibc.
102790         (setenv) [HAVE_SETENV]: Work around bugs.
102791         * lib/unsetenv.c (unsetenv) [HAVE_UNSETENV]: Work around bugs.
102792         * m4/setenv.m4 (gl_FUNC_SETENV_SEPARATE, gl_FUNC_UNSETENV): Check
102793         for bugs.
102794         (gl_FUNC_SETENV): Write in terms of gl_FUNC_SETENV_SEPARATE.
102795         * m4/environ.m4 (gl_ENVIRON): Avoid expand-before-require.
102796         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Update defaults.
102797         * modules/stdlib (Makefile.am): Update substitutions.
102798         * lib/stdlib.in.h (setenv, unsetenv): Update prototypes.
102799         * doc/posix-functions/setenv.texi (setenv): Document the bugs.
102800         * doc/posix-functions/unsetenv.texi (unsetenv): Likewise.
102801         * modules/setenv-tests: New test.
102802         * modules/unsetenv-tests: Likewise.
102803         * tests/test-setenv.c: New file.
102804         * tests/test-unsetenv.c: Likewise.
102806 2009-11-16  Jim Meyering  <meyering@redhat.com>
102808         version-etc: relax license to LGPLv3+
102809         * modules/version-etc (License): Relax license.
102811         better AC_REQUIRE expanded-before-required-warning avoidance
102812         * m4/chown.m4 (gl_FUNC_CHOWN, gl_FUNC_CHOWN_FOLLOWS_SYMLINK): Define
102813         with AC_DEFUN_ONCE, rather than AC_DEFUN, to avoid AC_REQUIRE warnings.
102814         Suggested by Eric Blake.  This change also reverts commit 1b712ba8,
102815         which is no longer needed.
102817 2009-11-16  Eric Blake  <ebb9@byu.net>
102819         test-freading: clean up temporary file
102820         * tests/test-freading.c (main): Remove file on success, and use
102821         ASSERT more liberally.
102822         Reported by Jim Meyering.
102824 2009-11-16  Jim Meyering  <meyering@redhat.com>
102826         avoid new AC_REQUIRE expanded-before-required warnings
102827         * modules/chown (configure.ac): Require gl_FUNC_CHOWN, rather than
102828         merely using it.
102829         * modules/euidaccess (configure.ac): Likewise for gl_FUNC_EUIDACCESS.
102830         * modules/faccessat (configure.ac): Likewise for gl_FUNC_FACCESSAT.
102832 2009-11-15  Simon Josefsson  <simon@josefsson.org>
102834         * tests/test-xalloc-die.c: New file.
102835         * modules/xalloc-die-tests: New file.
102836         * gnulib-tool (func_emit_tests_Makefile_am): Also initialize
102837         XFAIL_TESTS so it can be appended by modules.
102839 2009-11-15  Simon Josefsson  <simon@josefsson.org>
102841         * lib/gc-pbkdf2-sha1.c: Remove comments from RFC 2898.  Reported
102842         by Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>.
102844 2009-11-14  Eric Blake  <ebb9@byu.net>
102846         fnmatch: avoid compiler warning
102847         * lib/fnmatch_loop.c (NEW_PATTERN): Coerce addition to unsigned,
102848         to silence compiler warning about mismatch signedness in ?:.
102849         Reported by Robert Millan.
102851         intprops: add double-inclusion guard
102852         * lib/intprops.h: Allow idempotent includes.
102853         Suggested by Bruce Korb.
102855         openat: detect Solaris fchownat bug
102856         * lib/fchownat.c (rpl_fchownat): Work around Solaris bug.  Avoid
102857         penalizing glibc chownat when only lchownat is broken.
102858         * m4/openat.m4 (gl_FUNC_FCHOWNAT): Replace fchownat if there are
102859         trailing slash bugs.
102860         * doc/posix-functions/fchownat.texi (fchownat): Document the bug.
102861         * modules/openat-tests (Files): Include more files.
102862         (Depends-on): Add mgetgroups, sleep, stat-time.
102863         (configure.ac): Add additional checks.
102864         (Makefile.am): Build new test.
102865         * tests/test-fchownat.c: New file.
102867         lchown: detect Solaris and FreeBSD bug
102868         * lib/lchown.c (rpl_lchown): Work around bug.
102869         * m4/lchown.m4 (gl_FUNC_LCHOWN): Check for trailing slash bugs.
102870         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add witness.
102871         * modules/unistd (Makefile.am): Populate it.
102872         * lib/unistd.in.h (lchown): Update declaration.
102873         * doc/posix-functions/lchown.texi (lchown): Document the bug.
102874         * modules/lchown-tests: New file.
102875         * tests/test-lchown.h (test_lchown): Likewise.
102876         * tests/test-lchown.c (main): Likewise.
102878         chown: detect Solaris and FreeBSD bug
102879         * lib/chown.c (rpl_chown): Work around bug.
102880         * m4/chown.m4 (gl_FUNC_CHOWN): Check for trailing slash bugs.
102881         (gl_PREREQ_CHOWN): Delete.
102882         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add witness.
102883         * modules/unistd (Makefile.am): Populate it.
102884         * lib/unistd.in.h (chown): Update declaration.
102885         * lib/lchown.c (chown): Update client.
102886         * modules/lchown (Depends-on): Add lstat.
102887         * doc/posix-functions/chown.texi (chown): Document the bug.
102888         * doc/posix-functions/getgroups.texi (getgroups): Document
102889         getgroups pitfall.
102890         * modules/chown-tests: New file.
102891         * tests/test-chown.h (test_chown): Likewise.
102892         * tests/test-chown.c (main): Likewise.
102894 2009-11-14  Robert Millan  <rmh.grub@aybabtu.com>  (tiny change)
102896         gnulib-tool: correctly detect absence of m4 directories
102897         * gnulib-tool: Avoid extra newline on data passed to wc -l.
102899 2009-11-14  Jim Meyering  <meyering@redhat.com>
102901         maint.mk: Prohibit inclusion of "xalloc.h" without use.
102902         * top/maint.mk (sc_prohibit_close_stream_without_use): New rule.
102904 2009-11-14  John W. Eaton  <jwe@gnu.org>
102906         strftime.h: wrap function declaration in extern "C" block
102907         * lib/strftime.h (nstrftime) [__cplusplus]: Wrap declaration.
102909 2009-11-13  Eric Blake  <ebb9@byu.net>
102911         getgroups: avoid compiler warning
102912         * lib/getgroups.c (rpl_getgroups): Delete shadowed variable.
102914         getgroups: work around FreeBSD bug
102915         * lib/getgroups.c (rpl_getgroups): Work around the bug.
102916         * m4/getgroups.m4 (gl_FUNC_GETGROUPS): Detect the bug.
102917         * doc/posix-functions/getgroups.texi (getgroups): Document it.
102918         * tests/test-getgroups.c (main): Fix buffer overrun.
102920         getgroups: avoid compilation failure
102921         * lib/getgroups.c (includes): Include <stdint.h> for SIZE_MAX.
102922         * modules/getgroups (Depends-on): Add stdint.
102924 2009-11-13  Jim Meyering  <meyering@redhat.com>
102926         test-getgroups: avoid compilation failure
102927         * tests/test-getgroups.c: Include <stdint.h> for use of SIZE_MAX.
102929 2009-11-13  Eric Blake  <ebb9@byu.net>
102931         mgetgroups: new module, taken from coreutils
102932         * modules/mgetgroups: New file.
102933         * lib/mgetgroups.h: Likewise.
102934         * lib/mgetgroups.c (mgetgroups): Likewise.
102935         * m4/mgetgroups.m4 (gl_MGETGROUPS): Likewise.
102936         * MODULES.html.sh (Users and groups): Mention it.
102938         getgroups: don't expose GETGROUPS_T to user
102939         * lib/getgroups.c (rpl_getgroups): Change signature.  Copy array
102940         an element at a time if GETGROUPS_T is wrong size.
102941         * lib/getugroups.h (getugroups): Change signature.
102942         * lib/unistd.in.h (getgroups): Likewise.
102943         * m4/getgroups.m4 (gl_FUNC_GETGROUPS): Use replacement if
102944         signature needs fixing.
102945         * m4/getugroups.m4 (gl_GETUGROUPS): No longer need
102946         AC_TYPE_GETGROUPS.
102947         * modules/group-member (Depends-on): Add getgroups.
102948         * lib/group-member.c (group_info, get_group_info): Use gid_t.
102949         (group_member): Rely on getgroups replacement.
102950         * lib/getugroups.c (getugroups): Use gid_t.
102951         * tests/test-getgroups.c (main): Likewise.
102952         * NEWS: Mention the signature change.
102953         * doc/posix-functions/getgroups.texi (getgroups): Mention the
102954         problem with signature.
102955         * doc/glibc-functions/setgroups.texi (setgroups): Mention that
102956         GETGROUPS_T is still useful for setgroups.
102958         getgroups, getugroups: provide stubs for mingw
102959         * lib/getgroups.c (getgroups): Provide ENOSYS stub for mingw.
102960         * lib/getugroups.c (getugroups): Likewise.
102961         * m4/getgroups.m4 (gl_FUNC_GETGROUPS): Check for missing
102962         function.  Modernize replacement scheme.
102963         (gl_PREREQ_GETGROUPS): Delete.
102964         * m4/getugroups.m4 (gl_GETUGROUPS): Check for <grp.h>.
102965         * modules/getgroups (configure.ac): Declare witness.
102966         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add default.
102967         * modules/unistd (Depends-on): Substitute witness.
102968         * lib/unistd.in.h (getgroups): Declare replacement.
102970         getgroups: avoid calling exit
102971         * modules/getgroups (Depends-on): Add malloc-posix and unistd,
102972         drop xalloc.
102973         * modules/getgroups-tests (Depends-on, Makefile.am): Drop unneeded
102974         dependencies.
102975         * lib/getgroups.c (rpl_getgroups): Fail with ENOMEM rather than
102976         exiting, in the rare case of malloc failure.
102978         getgroups: fix logic error
102979         * lib/getgroups.c (rpl_getgroups): Don't fail if current process
102980         has more than 20 groups.
102981         * modules/getgroups-tests: New test.
102982         * tests/test-getgroups.c: New file.
102984 2009-11-13  Simon Josefsson  <simon@josefsson.org>
102986         * tests/test-base64.c: Improve.
102988 2009-11-13  Simon Josefsson  <simon@josefsson.org>
102990         * tests/test-xvasprintf.c: Fix memory leak, suggested by Eric
102991         Blake <ebb9@byu.net>.
102993 2009-11-13  Simon Josefsson  <simon@josefsson.org>
102995         * tests/test-xvasprintf.c: Add %s%s related checks.
102997 2009-11-12  Eric Blake  <ebb9@byu.net>
102999         version-etc: match standards.texi style
103000         * lib/version-etc.c (emit_bug_reporting_address): Drop periods,
103001         and use <> only for URLs.
103003 2009-11-10  Kamil Dudka  <kdudka@redhat.com>
103005         fts: do not fail on a submount during traversal
103006         * lib/fts.c (fts_build): Read the stat info again after opening
103007         a directory if the FTS_TIGHT_CYCLE_CHECK flag is set.
103008         Original report at http://bugzilla.redhat.com/501848.
103010 2009-11-12  Jim Meyering  <meyering@redhat.com>
103012         bootstrap: sync from coreutils
103013         * build-aux/bootstrap (bootstrap_epilogue): New function.
103014         Use git_modules_config in one more place.  This make bootstrap's
103015         --gnulib-srcdir option more useful for testing.
103017         bootstrap: generalize autoheader check
103018         * build-aux/bootstrap: Look for AC_CONFIG_HEADER as well as
103019         AC_CONFIG_HEADERS.
103021 2009-11-11  Eric Blake  <ebb9@byu.net>
103023         mkfifoat: use new modules for Solaris and BSD bugs
103024         * m4/mkfifoat.m4 (gl_FUNC_MKFIFOAT): Simplify.
103025         * lib/mkfifoat.c (mknodat): Split...
103026         * lib/mknodat.c (mknodat): ...into new file.
103027         * modules/mkfifoat (Files): Ship new file.
103028         (Depends-on): Add mkfifo, mknod.
103029         * modules/mkfifoat-tests (Files): Reuse mkfifo tests.
103030         (Depends-on): Add symlink.
103031         * tests/test-mkfifoat.c (main): Enhance test.  Drop portions now
103032         redundant with test_mkfifo.h.
103033         (do_mkfifoat, do_mknodat): New helpers.
103035         mknod: new module
103036         * modules/mknod: New file.
103037         * m4/mknod.m4 (gl_FUNC_MKNOD): Likewise.
103038         * lib/mknod.c (mknod): Likewise.
103039         * m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Set witness
103040         defaults.
103041         * modules/sys_stat (Makefile.am): Substitute them.
103042         * lib/sys_stat.in.h (mknod): Declare replacement.
103043         * MODULES.html.sh (Support for systems lacking POSIX:2008):
103044         Document it.
103045         * doc/posix-functions/mknod.texi (mknod): Likewise.
103046         * modules/mknod-tests: New test.
103047         * tests/test-mknod.c: Likewise.
103049         mkfifo: new module
103050         * modules/mkfifo: New file.
103051         * m4/mkfifo.m4 (gl_FUNC_MKFIFO): Likewise.
103052         * lib/mkfifo.c (mkfifo): Likewise.
103053         * m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Set witness
103054         defaults.
103055         * modules/sys_stat (Makefile.am): Substitute them.
103056         * lib/sys_stat.in.h (mkfifo): Declare replacement.
103057         * MODULES.html.sh (Support for systems lacking POSIX:2008):
103058         Document it.
103059         * doc/posix-functions/mkfifo.texi (mkfifo): Likewise.
103060         * modules/mkfifo-tests: New test.
103061         * tests/test-mkfifo.h (test_mkfifo): New file, borrowed in part
103062         from test-mkfifoat.c.
103063         * tests/test-mkfifo.c: New file.
103065         readlink: detect FreeBSD bug
103066         * m4/readlink.m4 (gl_FUNC_READLINK): Also detect FreeBSD bug with
103067         slash on symlink.
103068         * doc/posix-functions/readlink.texi (readlink): Document the bug.
103069         * tests/test-readlink.h (test_readlink): Enhance test.
103071         symlink: detect FreeBSD bug
103072         * m4/symlink.m4 (gl_FUNC_SYMLINK): Also detect FreeBSD bug with
103073         slash on symlink.
103074         * doc/posix-functions/symlink.texi (symlink): Document the bug.
103075         * tests/test-symlink.h (test_symlink): Enhance test.
103077 2009-11-10  Eric Blake  <ebb9@byu.net>
103079         link: detect FreeBSD bug
103080         * m4/link.m4 (gl_FUNC_LINK): Also detect FreeBSD bug with slash on
103081         symlink.
103082         * doc/posix-functions/link.texi (link): Document the bug.
103083         * tests/test-link.h (test_link): Enhance test.
103084         * tests/test-linkat.c (main): Update caller.
103086         unlink, remove: detect FreeBSD bug
103087         * m4/unlink.m4 (gl_FUNC_UNLINK): Also detect FreeBSD bug with
103088         slash on symlink.
103089         * doc/posix-functions/unlink.texi (unlink): Document the bug.
103090         * doc/posix-functions/remove.texi (remove): Likewise.
103091         * tests/test-unlink.h (test_unlink): Enhance test.
103092         * tests/test-remove.c (main): Likewise.
103094 2009-11-09  Eric Blake  <ebb9@byu.net>
103096         rename: detect FreeBSD bug
103097         * m4/rename.m4 (gl_FUNC_RENAME): Also detect FreeBSD bug with
103098         slash on symlink.
103099         * modules/renameat-tests (Depends-on): Add filenamecat.
103100         * tests/test-rename.h (test_rename): Allow one more errno.
103101         * tests/test-renameat.c (main): Likewise.
103102         * doc/posix-functions/rename.texi (rename): Document the bug.
103104         open: detect FreeBSD bug
103105         * m4/open.m4 (gl_FUNC_OPEN): Also detect FreeBSD bug with slash on
103106         symlink.
103107         * doc/posix-functions/open.texi (open): Document the bug.
103108         * doc/posix-functions/utimes.texi (utimes): Likewise.
103109         * tests/test-open.h (test_open): Add parameters, and test symlink
103110         handling.
103111         * tests/test-open.c (main): Adjust caller.
103112         * tests/test-fcntl-safer.c (main): Likewise.
103113         * modules/open-tests (Depends-on): Add stdbool, symlink.
103114         * modules/fcntl-safer-tests (Depends-on): Likewise.
103115         * tests/test-openat.c (main): Add test-open tests.
103117         stat: detect FreeBSD bug
103118         * m4/stat.m4 (gl_FUNC_STAT): Also detect FreeBSD bug with slash on
103119         symlink.
103120         * doc/posix-functions/stat.texi (stat): Document the bug.
103121         * tests/test-stat.h (test_stat_func): Add argument.
103122         * tests/test-stat.c (main): Adjust caller.
103123         * tests/test-fstatat.c (main): Likewise.
103124         * modules/stat-tests (Depends-on): Add stdbool, symlink.
103125         Reported by Jim Meyering.
103127 2009-11-09  James Youngman  <jay@gnu.org>
103129         strftime.c: include ignore-value.h only when FPRINTFTIME is defined
103130         * lib/strftime.c: Correct placement of #include "ignore-value.h".
103132 2009-11-08  Jim Meyering  <meyering@redhat.com>
103134         utimens: remove invalid futimesat call
103135         * lib/utimens.c (fdutimens): Remove invalid futimesat call.
103136         It used the file descriptor of the target file as the DIR_FD
103137         parameter and NULL as the file name.  That caused failure with
103138         errno == EFAULT on FreeBSD-8.0-rc2
103140 2009-11-07  Eric Blake  <ebb9@byu.net>
103142         fflush, freadseek: use fseeko, not fseek
103143         * lib/fflush.c (clear_ungetc_buffer_preserving_position)
103144         (clear_ungetc_buffer): Avoid potential problems on large files.
103145         * lib/freadseek.c (freadseek): Likewise.
103146         * modules/freadseek (Depends-on): Add fseeko.
103147         * modules/fseek (configure.ac): Set a witness.
103148         * tests/test-fflush.c (main): Use fseeko.
103149         * tests/test-fpurge.c (fseek): Disable link warning.
103150         * tests/test-freadable.c (fseek): Likewise.
103151         * tests/test-freading.c (fseek): Likewise.
103152         * tests/test-fseeko.c (fseek): Likewise.
103153         * tests/test-ftell.c (fseek): Likewise.
103154         * tests/test-ftello.c (fseek): Likewise.
103155         * tests/test-fwritable.c (fseek): Likewise.
103156         * tests/test-fwriting.c (fseek): Likewise.
103158 2009-11-06  Simon Josefsson  <simon@josefsson.org>
103160         * modules/memchr (Depends-on): Drop getpagesize dependency.
103162 2009-11-06  Simon Josefsson  <simon@josefsson.org>
103164         * build-aux/pmccabe2html: Disable execute bit.  Suggested by
103165         Reported by Ludovic Courtès.
103166         * build-aux/pmccabe2html: Improve example usage.
103167         * build-aux/pmccabe2html: Drop #! header.  Doc fix.
103169 2009-11-06  Jim Meyering  <meyering@redhat.com>
103171         do-release-commit-and-tag: New module.
103172         Automate the release-commit and tag process.
103173         * build-aux/do-release-commit-and-tag: New script, from coreutils.
103174         * modules/do-release-commit-and-tag: New file.
103175         * MODULES.html.sh (Support for maintaining and releasing): Add it.
103177 2009-11-06  Simon Josefsson  <simon@josefsson.org>
103179         * modules/select-tests (test_select_LDADD): Add $(INET_PTON_LIB)
103180         because test-select.c uses inet_pton.
103182 2009-11-06  Simon Josefsson  <simon@josefsson.org>
103184         * m4/getaddrinfo.m4: Add content of INET_NTOP_LIB to
103185         GETADDRINFO_LIB.  Bump serial number.
103186         * modules/getaddrinfo (Link): Only mention GETADDRINFO_LIB again.
103187         Suggested by Eric Blake <ebb9@byu.net>.
103189 2009-11-05  Eric Blake  <ebb9@byu.net>
103191         strtod: detect darwin bug
103192         * m4/strtod.m4 (gl_FUNC_STRTOD): Filter out darwin bug on "nan(".
103193         Reported by Leo Davis.
103195         freopen-safer: new module
103196         * modules/freopen-safer: New module.
103197         * m4/stdio-safer.m4 (gl_FREOPEN_SAFER): New macro.
103198         * lib/freopen-safer.c (freopen_safer): New file.
103199         * lib/stdio-safer.h (freopen_safer): New declaration.
103200         * lib/stdio--.h (freopen): New override.
103201         * MODULES.html.sh (File stream based Input/Output): Mention it.
103202         * doc/posix-functions/freopen.texi (freopen): Mention pitfalls and
103203         freopen-safer module.
103204         * doc/posix-functions/stderr.texi (stderr): Likewise.
103205         * doc/posix-functions/stdin.texi (stdin): Likewise.
103206         * doc/posix-functions/stdout.texi (stdout): Likewise.
103207         * modules/freopen-safer-tests: New test.
103208         * tests/test-reopen-safer.c: New file.
103210 2009-11-05  Jim Meyering  <meyering@redhat.com>
103212         maint.mk: Prohibit inclusion of "close-stream.h" without use.
103213         * top/maint.mk (sc_prohibit_close_stream_without_use): New rule.
103215 2009-11-05  Simon Josefsson  <simon@josefsson.org>
103217         * modules/pmccabe2html (configure.ac): Check for pmccabe tool.
103219 2009-11-05  Simon Josefsson  <simon@josefsson.org>
103221         * modules/getaddrinfo (Link): Add $(INET_NTOP_LIB).
103223 2009-11-05  Simon Josefsson  <simon@josefsson.org>
103225         Fix link error.
103226         * m4/inet_ntop.m4 (gl_INET_NTOP): Fix test of AC_SEARCH_LIBS result.
103227         * m4/inet_pton.m4 (gl_INET_PTON): Likewise.
103229 2009-11-05  Simon Josefsson  <simon@josefsson.org>
103231         * tests/test-func.c: Also test value of __func__.
103233 2009-11-05  Simon Josefsson  <simon@josefsson.org>
103235         * tests/test-sys_socket.c: Use smaller constant value, sa_family_t
103236         may be an 8-bit type.  Reported by Bruno Haible <bruno@clisp.org>.
103238 2009-11-05  Bruno Haible  <bruno@clisp.org>
103240         Fix link error.
103241         * m4/inet_ntop.m4 (gl_INET_NTOP): Fix test of AC_SEARCH_LIBS result.
103242         * m4/inet_pton.m4 (gl_INET_PTON): Likewise.
103243         Reported by Brad Hards <bradh@frogmouth.net> via Simon Josefsson.
103245 2009-11-05  Bruno Haible  <bruno@clisp.org>
103247         Tests for module 'inet_pton'.
103248         * modules/inet_pton-tests: New file.
103249         * tests/test-inet_pton.c: New file.
103251 2009-11-05  Bruno Haible  <bruno@clisp.org>
103253         Tests for module 'inet_ntop'.
103254         * modules/inet_ntop-tests: New file.
103255         * tests/test-inet_ntop.c: New file.
103257 2009-11-04  Eric Blake  <ebb9@byu.net>
103259         stdlib-safer: wrap all mkstemp variants
103260         * modules/mkostemp (configure.ac): Set witness.
103261         * modules/mkostemps (configure.ac): Likewise.
103262         * modules/mkstemps (configure.ac): Likewise.
103263         * lib/stdlib-safer.h (mkostemp_safer, mkostemps_safer)
103264         (mkstemps_safer): Wrap more functions.
103265         * lib/stdlib--.h (mkostemp, mkostemps, mkstemps): Default the
103266         wrapping.
103267         * lib/mkstemp-safer.c (mkostemp_safer, mkostemps_safer)
103268         (mkstemps_safer): Implement the wrappers.
103270         mkstemps, mkostemps: new modules
103271         * modules/mkostemps: New module.
103272         * modules/mkstemps: Likewise.
103273         * lib/mkostemps.c (mkostemps): New file.
103274         * lib/mkstemps.c (mkstemps): Likewise.
103275         * m4/mkostemps.m4 (gl_FUNC_MKOSTEMPS): Likewise.
103276         * m4/mkstemps.m4 (gl_FUNC_MKSTEMPS): Likewise.
103277         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Add witnesses.
103278         * modules/stdlib (Makefile.am): Substitute them.
103279         * lib/stdlib.in.h (mkostemps, mkstemps): Declare them.
103280         * doc/glibc-functions/mkstemps.texi (mkstemps): New file.
103281         * doc/glibc-functions/mkostemps.texi (mkostemps): Likewise.
103282         * doc/gnulib.texi (Glibc stdlib.h): Include them.
103283         * MODULES.html.sh (File system functions): Mention them.
103285         tempname: resync from glibc
103286         * lib/tempname.c (__gen_tempname): Add suffixlen argument.  Use
103287         same values for __GT_FILE as glibc.  Abort even when assertions
103288         are disabled.
103289         * lib/tempname.h (GT_FILE): Use glibc __GT_FILE, if available, and
103290         match its value otherwise.  Allow idempotent inclusion.
103291         * lib/mkdtemp.c (mkdtemp): Adjust caller.
103292         * lib/mkostemp.c (mkostemp): Likewise.
103293         * lib/mkstemp.c (mkstemp): Likewise.
103294         * lib/tmpfile.c (tmpfile): Likewise.
103295         * NEWS: Document this.
103297         utimens: fix use of futimens on older Linux
103298         * lib/utimens.c (fdutimens): Use updated, rather than original,
103299         timespec to avoid bug in older Linux kernel.
103300         Reported by Simon Josefsson.
103302 2009-11-04  Bruno Haible  <bruno@clisp.org>
103304         Make num_processors more flexible and consistent.
103305         * lib/nproc.h (enum nproc_query): New type.
103306         (num_processors): Add a 'query' argument.
103307         * lib/nproc.c: Include <stdlib.h>, <sched.h>, c-ctype.h.
103308         (num_processors): Add a 'query' argument. Test the value of the
103309         OMP_NUM_THREADS environment variable if requested. On Linux, NetBSD,
103310         mingw, count the number of CPUs available for the current process.
103311         * m4/nproc.m4 (gl_PREREQ_NPROC): Require AC_USE_SYSTEM_EXTENSIONS.
103312         Check for sched_getaffinity and sched_getaffinity_np.
103313         * modules/nproc (Depends-on): Add c-ctype, extensions.
103314         * NEWS: Mention the change.
103316 2009-11-03  Bruno Haible  <bruno@clisp.org>
103318         * NEWS: Document the new library dependencies of inet_ntop, inet_pton.
103320 2009-11-03  Jim Meyering  <meyering@redhat.com>
103322         test-getaddrinfo: avoid compilation failure on FreeBSD 7.2
103323         * tests/test-getaddrinfo.c (simple): Test for EAI_NODATA only
103324         if it is defined.
103326 2009-11-02  Eric Blake  <ebb9@byu.net>
103328         mktime, timegm: share common declaration
103329         * lib/mktime-internal.h: New file.
103330         * lib/mktime.c: Use it rather than open-coding a declaration.
103331         * lib/timegm.c: Likewise.
103332         * modules/mktime (Files): Ship it.
103333         * modules/timegm (Files): Likewise.
103334         Suggested by Bruno Haible.
103336         test-update-copyright: update test to match script changes
103337         * tests/test-update-copyright.sh: Avoid hard-coding perl
103338         location.  Don't update *.bak created by earlier runs.
103340 2009-11-02  Paul Eggert  <eggert@cs.ucla.edu>
103341             Simon Josefsson  <simon@josefsson.org>
103342             Bruno Haible  <bruno@clisp.org>
103344         Fix link error on Solaris 8.
103345         * m4/inet_pton.m4 (gl_INET_PTON): Search for the function inet_pton
103346         also in libnsl. Define also INET_PTON_LIB.
103347         * modules/inet_pton (Link): New section.
103349 2009-11-02  Simon Josefsson  <simon@josefsson.org>
103350             Bruno Haible  <bruno@clisp.org>
103352         * m4/inet_ntop.m4 (gl_INET_NTOP): Define also INET_NTOP_LIB.
103353         * modules/inet_ntop (Link): New section.
103354         Reported by Boyan Kasarov <bkasarov@gmail.com>.
103356 2009-11-02  Eric Blake  <ebb9@byu.net>
103358         maint: avoid compiler warnings in m4 macros
103359         * m4/ungetc.m4 (gl_FUNC_UNGETC_WORKS): Avoid unused variable.
103360         * m4/rmdir.m4 (gl_FUNC_RMDIR): Include correct header.
103362 2009-11-02  Simon Josefsson  <simon@josefsson.org>
103364         * m4/pmccabe2html.m4: Remove file.
103365         * modules/pmccabe2html: Drop pmccabe2html.m4.  Don't call m4
103366         function.  Change maintainer.
103367         * build-aux/pmccabe2html: Use /bin/sh with magic instead of
103368         hard-coding path to awk.  Tiny patch from ludo@gnu.org (Ludovic
103369         Courtès).
103371 2009-10-31  Eric Blake  <ebb9@byu.net>
103373         fseeko: fix m4 regression
103374         * m4/fseeko.m4 (gl_FUNC_FSEEKO): Use modern macro.  Fixes
103375         regression from 2009-10-27.
103376         Reported by Ralf Wildenhues.
103378 2009-10-31  Jim Meyering  <meyering@redhat.com>
103380         inttostr: aesthetics and improved (compile-time) safety
103381         Define inttype_is_signed rather than inttype_is_unsigned,
103382         since the sole use is via "#if inttype_is_signed".
103383         * lib/imaxtostr.c (inttype_is_signed): Define this, rather than
103384         inttype_is_unsigned.
103385         * lib/offtostr.c (inttype_is_signed): Likewise.
103386         * lib/uinttostr.c (inttype_is_signed): Likewise.
103387         * lib/umaxtostr.c (inttype_is_signed): Likewise.
103388         * lib/inttostr.c (inttostr): Use verify to cross-check the
103389         inttype_is_signed value and the signedness of the actual type.
103390         * modules/inttostr (Depends-on): Add verify.
103392 2009-10-30  Eric Blake  <ebb9@byu.net>
103394         build: avoid compiler warnings
103395         * lib/fchmodat.c (lchmod): Mark unused variables.
103396         * lib/getopt.c (_getopt_initialize): Likewise.
103397         * lib/mktime.c (__mktime_internal): Provide prototype.
103398         * lib/inttostr.c (inttostr): Avoid compiler warning even with
103399         older gcc that do not understand #pragma GCC diagnostic.
103400         * lib/uinttostr.c (inttype_is_unsigned): Define.
103401         * lib/umaxtostr.c (inttype_is_unsigned): Likewise.
103403 2009-10-30  Michael Haubenwallner  <michael.haubenwallner@salomon.at>
103405         stat: fix compilation on AIX
103406         * lib/sys_stat.in.h (stat): Work with fact that large files on AIX
103407         only see struct stat64.
103409 2009-10-30  Eric Blake  <ebb9@byu.net>
103411         exclude: make more robust
103412         * lib/exclude.c (excluded_file_name): Abort on unexpected value,
103413         rather than masking a coding bug.
103414         Suggested by Bruno Haible.
103416 2009-10-30  Jim Meyering  <meyering@redhat.com>
103418         perl scripts: remove #!/usr/bin/perl in favor of more portable...
103419         Rather than putting #!/usr/bin/perl on the first line,
103420         start with a variant of what's recommended by "man perlrun" that
103421         invokes the first "perl" program from your shell's search path.
103422         * build-aux/gitlog-to-changelog: Replace #!... as above.
103423         Add a "Local Variables" perl mode setting.
103424         Prompted by a patch from Ludovic Courtès.
103425         Improved by Eric Blake.
103426         * build-aux/useless-if-before-free: Likewise.
103427         * build-aux/announce-gen: Likewise.
103428         * build-aux/update-copyright: Likewise.
103430 2009-10-29  Eric Blake  <ebb9@byu.net>
103432         filenamecat-lgpl: adjust clients
103433         * modules/linkat (Depends-on): Use filenamecat-lgpl, not
103434         filenamecat.
103435         * modules/renameat (Depends-on): Likewise.
103437         filenamecat: split into filenamecat-lgpl
103438         * modules/filenamecat-lgpl: New module.
103439         * modules/filenamecat (Files): Move library-safe files into
103440         filenamecat-lgpl.
103441         (Depends-on): Add filenamecat-lgpl.
103442         (configure.ac): Declare witness.
103443         * lib/filenamecat.h (file_name_concat): Only declare when using
103444         GPL module.
103445         * lib/filenamecat.c (longest_relative_suffix, mfile_name_concat):
103446         Move...
103447         * lib/filenamecat-lgpl.c: ...into new file.
103448         * m4/filenamecat.m4 (gl_FILE_NAME_CONCAT_LGPL): New macro.
103449         (gl_FILE_NAME_CONCAT): Use it.
103450         * MODULES.html.sh (File system functions): Mention new module.
103452         argp: avoid memory leak
103453         * modules/argp (Depends-on): Use dirname-lgpl, not dirname.
103454         * lib/argp-namefrob.h (__argp_base_name): Use last_component, not
103455         base_name, since the latter malloc()s and can call exit().
103456         Leak introduced 2006-07-03.
103458         dirname-lgpl: adjust clients that don't need full dirname
103459         * modules/backupfile (Depends-on): Use dirname-lgpl, not dirname.
103460         * modules/filenamecat (Depends-on): Likewise.
103461         * modules/linkat (Depends-on): Likewise.
103462         * modules/mkancesdirs (Depends-on): Likewise.
103463         * modules/mkdir (Depends-on): Likewise.
103464         * modules/openat (Depends-on): Likewise.
103465         * modules/savewd (Depends-on): Likewise.
103466         * modules/rename (Depends-on): Likewise.
103467         (License): Relax license.
103468         * modules/mkdir-tests (Depends-on): Drop progname.
103469         (Makefile.am): Delete unneeded LDADD.
103470         * modules/rename-tests (Depends-on, Makefile.am): Likewise.
103472         dirname: split into dirname-lgpl
103473         * modules/dirname-lgpl: New module.
103474         * modules/dirname (Files): Move library-safe files into
103475         dirname-lgpl.
103476         (Depends-on): Add dirname-lgpl.
103477         (configure.ac): Declare witness.
103478         * modules/double-slash-root (License): Relax license.
103479         * lib/dirname.h (base_name, dir_name): Only declare when using GPL
103480         module.
103481         * lib/dirname.c (dir_len, mdir_name): Move...
103482         * lib/dirname-lgpl.c: ...into new file.
103483         * lib/basename.c (last_component, base_len): Move...
103484         * lib/basename-lgpl.c: ...into new file.
103485         * m4/dirname.m4 (gl_DIRNAME_LGPL): New macro.
103486         (gl_DIRNAME): Use it.
103487         * MODULES.html.sh (Enhancements for POSIX:2008 functions):
103488         Mention new module.
103489         * modules/dirname-tests (Depends-on): Add progname.
103490         * tests/test-dirname.c (program_name): Delete.
103492         mkdir: make safe for libraries
103493         * modules/mkdir (Depends-on): Drop xalloc.
103494         * lib/mkdir.c (rpl_mkdir): Fail with ENOMEM rather than calling
103495         exit.
103497         tests: avoid some compiler warnings
103498         * tests/test-getaddrinfo.c (simple): Mark static, and allow string
103499         literals.
103500         * tests/test-memchr.c (main): Avoid type mismatch.
103501         * tests/test-arpa_inet.c (main): Avoid unused parameters.
103502         * tests/test-base64.c (main): Likewise.
103503         * tests/test-getdelim.c (main): Likewise.
103504         * tests/test-gethostname.c (main): Likewise.
103505         * tests/test-getline.c (main): Likewise.
103506         * tests/test-netinet_in.c (main): Likewise.
103507         * tests/test-select.c (open_server_socket, main): Likewise.
103508         * tests/test-select-stdin.c (main): Likewise.
103509         * tests/test-sockets.c (main): Likewise.
103510         * tests/test-strsignal.c (main): Likewise.
103511         * tests/test-sys_select.c (main): Likewise.
103512         * tests/test-sys_socket.c (main): Likewise.
103513         * tests/test-u64.c (main): Likewise.
103514         * tests/test-xfprintf-posix.c (main): Likewise.
103515         * tests/test-xvasprintf.c (test_xvasprintf, main): Likewise.
103517         sockets: avoid compiler warning
103518         * lib/sockets.c (gl_sockets_startup): Mark unused parameter.
103520         maint: detect usage(1) and other suspicious exits
103521         * top/maint.mk (sc_prohibit_magic_number_exit): New rule.
103523 2009-10-29  Jim Meyering  <meyering@redhat.com>
103525         timespec: long-to-int truncation could make timespec_cmp malfunction
103526         * lib/timespec.h (timespec_cmp): Do not interpret a difference of
103527         a multiple of 2^32 nanoseconds as no difference.
103529 2009-10-28  Jim Meyering  <meyering@redhat.com>
103531         fprintftime: wrap macro code argument in "do {...} while(0)"
103532         * lib/strftime.c (cpy) [FPRINTFTIME]: The second argument to the
103533         cpy macro must be a statement that can be followed by a semicolon.
103534         Now that the else clause contains a comment and is hence longer
103535         than one line, I require curly braces.  That in turn requires
103536         that we wrap this code block in the standard do...while(0).
103538         fprintftime: remove stray semicolon from previous change
103539         * lib/strftime.c (cpy) [FPRINTFTIME]: Remove trailing semicolon.
103541         fprintftime: avoid a warning about ignored fwrite return value
103542         * lib/strftime.c [FPRINTFTIME]: Include "ignore-value.h".
103543         (cpy) [FPRINTFTIME]: Ignore fwrite failure, even though technically,
103544         that is unsafe.
103545         * modules/fprintftime (Depends-on): Add ignore-value.
103547         exclude: avoid an unwarranted warning
103548         * lib/exclude.c (excluded_file_name): Initialize "rc" before switch.
103550 2009-10-27  Eric Blake  <ebb9@byu.net>
103552         fseek: avoid compilation failure when fflush is replaced
103553         * m4/fseek.m4 (gl_REPLACE_FSEEK): New macro.
103554         * m4/fseeko.m4 (gl_REPLACE_FSEEKO): Also replace fseek, if fseek
103555         module is in use.
103556         * lib/stdio.in.h (GNULIB_FSEEKO): Only poison fseek if fseek
103557         module is not in use; since REPLACE_FSEEK worked otherwise.
103558         (GNULIB_FTELLO): Likewise for ftell.
103559         Reported by Ian Beckwith and others.
103561 2009-10-27  Bruno Haible  <bruno@clisp.org>
103563         * lib/isnan.c (rpl_isnan[fdl]): Repeat the specification declaration.
103564         Reported by Jim Meyering.
103566 2009-10-27  Jim Meyering  <jim@meyering.net>
103567             Bruno Haible  <bruno@clisp.org>
103569         Avoid warning despite dropping the return value of fwrite.
103570         * lib/unicodeio.c: Include ignore-value.h.
103571         (fwrite_success_callback): Explicitly ignore fwrite's return value.
103572         * modules/unicodeio (Depends-on): Add ignore-value.
103574 2009-10-26  Eric Blake  <ebb9@byu.net>
103576         areadlinkat: fix fallback path
103577         * lib/at-func.c (AT_FUNC_NAME): Avoid signed comparison between
103578         pointer and zero.
103580 2009-10-22  Pádraig Brady  <P@draigBrady.com>
103582         Use a better IO block size for modern systems
103583         * lib/copy-file.c (copy_file_preserving): Used a 32KiB malloced buffer.
103584         * lib/md2.c: Likewise.
103585         * lib/md4.c: Likewise.
103586         * lib/md5.c: Likewise.
103587         * lib/sha1.c: Likewise.
103588         * lib/sha256.c: Likewise.
103589         * lib/sha512.c: Likewise.
103591 2009-10-22  Eric Blake  <ebb9@byu.net>
103593         tests: avoid several compiler warnings
103594         * tests/test-getcwd.c (main): Avoid buffer underflow.
103595         * tests/test-getdate.c (main): String literals are not safe with
103596         putenv, so use setenv.  Declare unused argument.
103597         * modules/getdate-tests (Depends-on): Add setenv.
103598         * tests/test-argv-iter.c (main): Declare unused argument.  Avoid
103599         problems with string literals in char *.
103600         * tests/test-hash.c (main): Avoid shadowing declaration.
103601         (insert_new): Treat string literals as char const *.
103602         * tests/test-getopt.h (test_getopt): Likewise.
103603         (getopt_loop): Alter types to minimize casting elsewhere.
103604         * tests/test-getopt_long.h (test_getopt_long, getopt_long_loop)
103605         (test_getopt_long_posix): Likewise.
103606         (do_getopt_long): Add wrapper to minimize casting.
103607         * tests/test-atexit.c (clear_temp_file): Use void.
103608         * tests/test-areadlink-with-size.c (main): Declare unused
103609         arguments.
103610         * tests/test-areadlink.c (main): Likewise.
103611         * tests/test-areadlinkat-with-size.c (main): Likewise.
103612         * tests/test-areadlinkat.c (main): Likewise.
103613         * tests/test-canonicalize-lgpl.c (main): Likewise.
103614         * tests/test-canonicalize.c (main): Likewise.
103615         * tests/test-dirent-safer.c (main): Likewise.
103616         * tests/test-dirname.c (main): Likewise.
103617         * tests/test-dup2.c (main): Likewise.
103618         * tests/test-fchdir.c (main): Likewise.
103619         * tests/test-fcntl-h.c (main): Likewise.
103620         * tests/test-fcntl-safer.c (main): Likewise.
103621         * tests/test-fdopendir.c (main): Likewise.
103622         * tests/test-fdutimensat.c (main): Likewise.
103623         * tests/test-fflush.c (main): Likewise.
103624         * tests/test-filenamecat.c (main): Likewise.
103625         * tests/test-filevercmp.c (main): Likewise.
103626         * tests/test-fopen-safer.c (main): Likewise.
103627         * tests/test-fopen.c (main): Likewise.
103628         * tests/test-fpending.c (main): Likewise.
103629         * tests/test-fpurge.c (main): Likewise.
103630         * tests/test-freading.c (main): Likewise.
103631         * tests/test-fstatat.c (main): Likewise.
103632         * tests/test-fsync.c (main): Likewise.
103633         * tests/test-futimens.c (main): Likewise.
103634         * tests/test-getndelim2.c (main): Likewise.
103635         * tests/test-gettimeofday.c (main): Likewise.
103636         * tests/test-getopt.c (main): Likewise.
103637         * tests/test-i-ring.c (main): Likewise.
103638         * tests/test-inttypes.c (main): Likewise.
103639         * tests/test-link.c (main): Likewise.
103640         * tests/test-lstat.c (main): Likewise.
103641         * tests/test-math.c (main): Likewise.
103642         * tests/test-md5.c (main): Likewise.
103643         * tests/test-memchr2.c (main): Likewise.
103644         * tests/test-memrchr.c (main): Likewise.
103645         * tests/test-mkdir.c (main): Likewise.
103646         * tests/test-mkdirat.c (main): Likewise.
103647         * tests/test-mkfifoat.c (main): Likewise.
103648         * tests/test-open.c (main): Likewise.
103649         * tests/test-openat-safer.c (main): Likewise.
103650         * tests/test-openat.c (main): Likewise.
103651         * tests/test-quotearg.c (main): Likewise.
103652         * tests/test-rawmemchr.c (main): Likewise.
103653         * tests/test-readlink.c (main): Likewise.
103654         * tests/test-remove.c (main): Likewise.
103655         * tests/test-rename.c (main): Likewise.
103656         * tests/test-renameat.c (main): Likewise.
103657         * tests/test-rmdir.c (main): Likewise.
103658         * tests/test-sha1.c (main): Likewise.
103659         * tests/test-signal.c (main): Likewise.
103660         * tests/test-sigaction.c (main): Likewise.
103661         * tests/test-stat.c (main): Likewise.
103662         * tests/test-stat-time.c (main): Likewise.
103663         * tests/test-stddef.c (main): Likewise.
103664         * tests/test-stdint.c (main): Likewise.
103665         * tests/test-stdio.c (main): Likewise.
103666         * tests/test-stdlib.c (main): Likewise.
103667         * tests/test-strchrnul.c (main): Likewise.
103668         * tests/test-strerror.c (main): Likewise.
103669         * tests/test-string.c (main): Likewise.
103670         * tests/test-strtod.c (main): Likewise.
103671         * tests/test-strverscmp.c (main): Likewise.
103672         * tests/test-symlink.c (main): Likewise.
103673         * tests/test-symlinkat.c (main): Likewise.
103674         * tests/test-sys_stat.c (main): Likewise.
103675         * tests/test-sys_time.c (main): Likewise.
103676         * tests/test-time.c (main): Likewise.
103677         * tests/test-unistd.c (main): Likewise.
103678         * tests/test-unlink.c (main): Likewise.
103679         * tests/test-unlinkat.c (main): Likewise.
103680         * tests/test-utimens.c (main): Likewise.
103681         * tests/test-utimensat.c (main): Likewise.
103682         * tests/test-version-etc.c (main): Likewise.
103683         * tests/test-wchar.c (main): Likewise.
103684         * tests/test-wctype.c (main): Likewise.
103685         * tests/test-xprintf-posix.c (main): Likewise.
103686         * tests/test-posixtm.c (main): Likewise.
103687         (STREQ): Delete unused macro.
103688         * tests/test-linkat.c (main): Declare unused arguments.  Avoid
103689         shadowed variables.
103690         * tests/test-memchr.c (main): Likewise.
103692 2009-10-21  Eric Blake  <ebb9@byu.net>
103694         areadlinkat: avoid failure on older glibc
103695         * lib/at-func.c (AT_FUNC_NAME): Check for explicit FUNC_FAIL,
103696         rather than mis-comparing 0 against FUNC_RESULT of char*.
103698 2009-10-21  Bruno Haible  <bruno@clisp.org>
103700         * modules/stpncpy (License): Relicense under LGPLv2+.
103701         Reported by David Lutterkort <lutter@redhat.com>.
103703 2009-10-20  Eric Blake  <ebb9@byu.net>
103705         utimensat: work around Solaris 9 bug
103706         * lib/utimens.c (fdutimens, lutimens): Force a stat if platform
103707         has trailing slash bugs.
103708         * tests/test-lutimens.h (test_lutimens): Enhance test.
103709         * tests/test-utimens.h (test_utimens): Likewise.
103710         * doc/posix-functions/utime.texi (utime): Enhance documentation.
103711         * doc/posix-functions/utimes.texi (utimes): Likewise.
103712         * doc/posix-functions/utimensat.texi (utimensat): Likewise.
103713         * doc/glibc-functions/futimesat.texi (futimesat): Likewise.
103714         * doc/glibc-functions/lutimes.texi (lutimes): Likewise.
103715         * doc/posix-functions/futimens.texi (futimens): Likewise.
103717         fdutimensat: new module
103718         * modules/fdutimensat: New file.
103719         * lib/fdutimensat.c (fdutimensat): Likewise.
103720         * lib/utimens.h (fdutimensat, lutimensat): Declare new functions.
103721         * MODULES.html.sh (File system functions): Mention module.
103722         * modules/fdutimensat-tests: New test.
103723         * tests/test-fdutimensat.c: Likewise.
103725         doc: regenerate INSTALL
103726         * doc/INSTALL: Reflect recent autoconf update.
103727         * doc/INSTALL.ISO: Likewise.
103728         * doc/INSTALL.UTF-8: Likewise.
103730 2009-10-20  Pádraig Brady  <P@draigBrady.com>
103732         acl: warn if ACL support is not detected
103733         * m4/acl.m4 (gl_FUNC_ACL): Output a warning if ACL support is not found.
103735 2009-10-19  Giuseppe Scrivano  <gscrivano@gnu.org>
103737         * lib/nproc.h: Add extern "C" block for C++.
103739 2009-10-18  Reuben Thomas  <rrt@sc3d.org>
103740             Bruno Haible  <bruno@clisp.org>
103742         * doc/posix-functions/isascii.texi: Document the 2 alternative APIs.
103743         * doc/posix-functions/isalnum.texi: Document the 4 alternative APIs.
103744         * doc/posix-functions/isalpha.texi: Likewise.
103745         * doc/posix-functions/isblank.texi: Likewise.
103746         * doc/posix-functions/iscntrl.texi: Likewise.
103747         * doc/posix-functions/isdigit.texi: Likewise.
103748         * doc/posix-functions/isgraph.texi: Likewise.
103749         * doc/posix-functions/islower.texi: Likewise.
103750         * doc/posix-functions/isprint.texi: Likewise.
103751         * doc/posix-functions/ispunct.texi: Likewise.
103752         * doc/posix-functions/isspace.texi: Likewise.
103753         * doc/posix-functions/isupper.texi: Likewise.
103754         * doc/posix-functions/isxdigit.texi: Likewise.
103756 2009-10-18  Bruno Haible  <bruno@clisp.org>
103758         Tests for module 'isblank'.
103759         * modules/isblank-tests: New file.
103760         * tests/test-isblank.c: New file.
103762         New module 'isblank'.
103763         * lib/isblank.c: New file.
103764         * m4/isblank.m4: New file.
103765         * modules/isblank: New file.
103766         * doc/posix-functions/isblank.texi: Mention the new module.
103768 2009-10-18  Bruno Haible  <bruno@clisp.org>
103770         New module 'ctype'.
103771         * lib/ctype.in.h: New file.
103772         * m4/ctype.m4: New file.
103773         * modules/ctype: New file.
103774         * doc/posix-headers/ctype.texi: Mention the new module.
103776 2009-10-18  Jim Meyering  <meyering@redhat.com>
103778         m4: stylistic-only: hoist AC_SUBST to be adjacent to initialization
103779         Declare a variable like LIB_CLOCK_GETTIME to be AC_SUBSTituted
103780         right after its initialization, rather than farther down.
103781         Keeping these in close proximity makes it easier to ensure
103782         that each such variable is initialized.  E.g.,
103784             LIB_CLOCK_GETTIME=
103785             AC_SUBST([LIB_CLOCK_GETTIME])
103787         This change also increments these serial numbers.
103788         * m4/clock_time.m4 (gl_CLOCK_TIME): Hoist AC_SUBST use.
103789         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Likewise.
103790         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
103792 2009-10-18  Bruno Haible  <bruno@clisp.org>
103794         Don't let environment variables perturb build.
103795         * m4/gethrxtime.m4 (gl_GETHRXTIME): Initialize LIB_GETHRXTIME here...
103796         (gl_PREREQ_GETHRXTIME): ... not here.
103798 2009-10-18  Bruno Haible  <bruno@clisp.org>
103800         Avoid symlink attack in localcharset module.
103801         * lib/localcharset.c: Include <fcntl.h>, <unistd.h>.
103802         (O_NOFOLLOW): Define fallback.
103803         (get_charset_aliases): Don't open the file if it is a symbolic link.
103804         * m4/fcntl_h.m4 (gl_FCNTL_O_FLAGS): New macro, extracted from
103805         gl_FCNTL_H.
103806         (gl_FCNTL_H): Require it.
103807         * m4/localcharset.m4 (gl_LOCALCHARSET): Likewise.
103808         * modules/localcharset (Files): Add m4/fcntl_h.m4.
103809         Reported by Fergal Glynn <fglynn@veracode.com>.
103811 2009-10-18  Bruno Haible  <bruno@clisp.org>
103813         Implement nproc for mingw.
103814         * lib/nproc.c: Include <windows.h>
103815         (num_processors): On native Windows platforms, try GetSystemInfo.
103817 2009-10-18  Bruno Haible  <bruno@clisp.org>
103819         Implement nproc for IRIX.
103820         * lib/nproc.c: Include <sys/sysmp.h>.
103821         (num_processors): On IRIX systems, try sysmp.
103822         * m4/nproc.m4 (gl_PREREQ_NPROC): Check for sys/sysmp.h and sysmp.
103824 2009-10-18  Bruno Haible  <bruno@clisp.org>
103826         Implement nproc for HP-UX.
103827         * lib/nproc.c: Include <sys/pstat.h>
103828         (num_processors): On HP-UX systems, try pstat_getdynamic.
103829         * m4/nproc.m4 (gl_PREREQ_NPROC): Check for sys/pstat.h and
103830         pstat_getdynamic.
103832 2009-10-18  Giuseppe Scrivano  <gscrivano@gnu.org>
103833             Bruno Haible  <bruno@clisp.org>
103835         Implement nproc for NetBSD, OpenBSD.
103836         * lib/nproc.c: Include <sys/types.h>, <sys/param.h>, <sys/sysctl.h>.
103837         (ARRAY_SIZE): New macro.
103838         (num_processors): On BSD systems, try sysctl of HW_NCPU.
103839         * m4/nproc.m4: New file.
103840         * modules/nproc (Files): Add m4/nproc.m4.
103841         (configure.ac): Invoke gl_NPROC. Remove AC_LIBOBJ invocation.
103842         (Makefile.am): Instead, augment lib_SOURCES.
103844 2009-10-18  Bruno Haible  <bruno@clisp.org>
103846         Fix recognition of sys/sysctl.h on OpenBSD 4.0.
103847         * m4/physmem.m4 (gl_PHYSMEM): Before including sys/sysctl.h, include
103848         sys/param.h.
103850 2009-10-16  Eric Blake  <ebb9@byu.net>
103852         utimensat: new module
103853         * modules/utimensat: New file.
103854         * lib/utimensat.c (utimensat): Likewise.
103855         * m4/utimensat.m4 (gl_FUNC_UTIMENSAT): Likewise.
103856         * lib/utimens.c (utimensat): Avoid recursion into rpl_utimensat,
103857         so we can work around Linux bugs.
103858         * m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Add witnesses.
103859         * modules/sys_stat (Makefile.am): Substitute them.
103860         * lib/sys_stat.in.h (utimensat): Declare it.
103861         * MODULES.html.sh (systems lacking POSIX:2008): Mention module.
103862         * doc/posix-functions/utimensat.texi (utimensat): Likewise.
103863         * modules/utimensat-tests: New test.
103864         * tests/test-utimensat.c: Likewise.
103866         utimens: let lutimens work on non-symlinks
103867         * lib/utimens.c (lutimens): Fall back to utimens rather than
103868         failing with ENOSYS, when file is not a symlink.
103869         (utimens): Reduce redirection.
103870         * tests/test-lutimens.h (test_lutimens): Update test to cover
103871         non-symlinks.
103872         * tests/test-utimens.h (test_utimens): Update test to cover
103873         symlinks.
103874         * tests/test-utimens.c (main): Update caller.
103876         utimens: cache whether utimensat syscall works
103877         * lib/utimens.c (utimensat_works_really): New cache variable.
103878         (fdutimens, lutimens): Use it to avoid failing syscall.
103880         test-stat-time, test-utimens: improve portability
103881         * tests/test-stat-time.c (nap): Lengthen delay to 20ms, for
103882         ext4 on alpha, and for cygwin.
103883         * tests/test-utimens-common.h: New file.
103884         (nap): Factor delays into single function.
103885         * tests/test-lutimens.h (test_lutimens): Use new header.
103886         * tests/test-futimens.h (test_futimens): Likewise.
103887         * tests/test-utimens.h (test_utimens): Likewise.  Also, force NFS
103888         timestamps to occur from same machine, as was done previously for
103889         test_utimens.
103890         * modules/utimens-tests (Files): Ship new file.
103891         * modules/futimens-tests (Files): Likewise.
103892         Reported in part by Jim Meyering.
103894         sys_stat: sort replacement declarations
103895         * lib/sys_stat.in.h: Sort declarations.
103896         * lib/futimens.c (futimens): Fix typo.
103898 2009-10-15  Jim Meyering  <meyering@redhat.com>
103900         don't let environment settings perturb build
103901         Setting the envvars, LIB_CLOCK_GETTIME, LIB_EACCESS or LIB_NANOSLEEP
103902         could cause a configure-time and/or build-time malfunction.
103903         Typically, a configure-time function-in-library test is performed
103904         via code like this:
103906           LIB_VAR=
103907           AC_SUBST([LIB_VAR])
103908           prefix_saved_LIBS=$LIBS
103909             AC_SEARCH_LIBS([FUNC], [LIB_NAME],
103910                        [test "$ac_cv_search_FUNC" = "none required" ||
103911                         LIB_VAR=$ac_cv_search_FUNC])
103912           LIBS=$prefix_saved_LIBS
103914         However, in each of the files affected by this change, the LIB_VAR=
103915         initialization was omitted.  Thus, when set in the environment, its
103916         value would propagate into generated Makefiles when FUNC is not found
103917         in LIB_NAME.
103918         * m4/clock_time.m4 (gl_CLOCK_TIME): Initialize AC_SUBST'd var.
103919         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Likewise.
103920         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
103922 2009-10-14  Eric Blake  <ebb9@byu.net>
103924         fchdir: avoid infinite recursion in mingw
103925         * lib/fchdir.c (rpl_fstat): Call system fstat, rather than
103926         recursing.
103928         test-stat-time: port to mingw
103929         * tests/test-stat-time.c (force_unlink): Return a value.
103930         (test_ctime) [W32]: Fix compilation error.
103931         (nap): Don't call usleep with too large an argument.  Use
103932         force_unlink.
103933         * doc/pastposix-functions/usleep.texi (usleep): Document the
103934         portability issue.
103936 2009-10-13  Jim Meyering  <meyering@redhat.com>
103938         use AC_CHECK_FUNCS_ONCE, not AC_CHECK_FUNCS in modules/*
103939         * modules/pipe-filter-gi: Use AC_CHECK_FUNCS_ONCE, not AC_CHECK_FUNCS.
103940         * modules/pipe-filter-ii: Likewise.
103941         * modules/sys_socket-tests: Likewise.
103942         * modules/tsearch-tests: Likewise.
103943         * Makefile (sc_prefer_ac_check_funcs_once): New rule.
103944         (check): Depend on it.
103946 2009-10-12  Eric Blake  <ebb9@byu.net>
103948         utimens-tests: port to NFS file systems
103949         * tests/test-utimens.h (test_utimens): Refactor utimecmp
103950         comparisons to avoid spurious failures from timestamp drift
103951         between NFS machines.
103953 2009-10-12  Eric Blake  <ebb9@byu.net>
103955         stat-time-tests: minor cleanups
103956         * modules/stat-time-tests (configure.ac): Use AC_CHECK_FUNCS_ONCE.
103957         * tests/test-stat-time.c (nap): Separate assignment from call.
103958         Suggested by Paolo Bonzini and Bruno Haible.
103960         sys_stat: guarantee struct timespec
103961         * lib/sys_stat.in.h (includes): Always include <time.h>
103962         * modules/sys_stat (Depends-on): Add time.
103963         * tests/test-sys_stat.c: Guarantee struct timespec, as well as
103964         mode_t permission values.
103965         * doc/posix-headers/sys_stat.texi (sys/stat.h): Document how to
103966         get at subsecond timestamps.
103968 2009-10-10  Eric Blake  <ebb9@byu.net>
103970         futimens: new module
103971         * modules/futimens: New file.
103972         * lib/futimens.c (futimens): Likewise.
103973         * m4/futimens.m4 (gl_FUNC_FUTIMENS): Likewise.
103974         * lib/utimens.c (futimens): Avoid recursion into rpl_futimens, so
103975         we can work around Linux bugs.
103976         * m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Add witnesses.
103977         * modules/sys_stat (Makefile.am): Substitute them.
103978         * lib/sys_stat.in.h (futimens): Declare it.
103979         * MODULES.html.sh (systems lacking POSIX:2008): Mention module.
103980         * doc/posix-functions/futimens.texi (futimens): Likewise.
103981         * modules/futimens-tests: New test.
103982         * tests/test-futimens.c: Likewise.
103984         utimens: introduce fdutimens
103985         * lib/utimens.h (fdutimens): New prototype.
103986         * lib/utimens.c (gl_futimens): Move guts...
103987         (fdutimens): ...to new interface.
103988         * tests/test-utimens.c (do_fdutimens): Use it.
103990         utimens: add UTIME_NOW and UTIME_OMIT support
103991         * lib/utimens.c (validate_timespec, update_timespec): New helper
103992         functions.
103993         (gl_futimens, lutimens): Use them.
103994         * modules/utimens (Depends-on): Add gettime, lstat, stat-time,
103995         stdbool, sys_stat.
103996         (Link): Mention resulting library dependency.
103997         * modules/utimecmp (Link): Likewise.
103998         * modules/utimens-tests (Depends-on): Drop stat-time, stdbool.
103999         (Makefile.am): Pick up library dependency.
104000         * lib/sys_stat.in.h (UTIME_NOW, UTIME_OMIT): Guarantee a
104001         definition.
104002         * tests/test-sys_stat.c: Test the definitions.
104003         * doc/posix-headers/sys_stat.texi (sys/stat.h): Document this.
104004         * NEWS: Document library dependency.
104006         utimecmp: support symlink timestamps
104007         * lib/utimecmp.c (utimecmp): Use new interface.  Skip effort of
104008         hashing when possible.  Use pathconf when available.
104009         (SYSCALL_RESOLUTION): Recognize tighter resolution.
104010         * modules/utimecmp (Depends-on): Add lstat.
104012         utimens: add lutimens interface
104013         * lib/utimens.c (lutimens): New function.
104014         * m4/utimens.m4 (gl_UTIMENS): Check for lutimes.
104015         * lib/utimens.h (lutimens): Declare new interface.
104016         * tests/test-utimens.c (main): Enhance test.
104017         * tests/test-lutimens.h (test_lutimens): New file.
104018         * modules/utimens-tests (Files): Distribute it.
104019         (Depends-on): Add symlink.
104020         (configure.ac): Check for usleep.
104022         utimens: validate futimens usage
104023         * lib/utimens.c (gl_futimens): Require valid fd up front, using
104024         fewer syscalls on failure later on.  Avoid compiler warning on
104025         mingw.
104026         * modules/utimens (Depends-on): Add dup2.
104028         utimens: add test
104029         * modules/utimens-tests: New test.
104030         * tests/test-utimens.h: New file.
104031         * tests/test-futimens.h: Likewise.
104032         * tests/test-utimens.c: Likewise.
104034         doc: mention timestamp portability issues
104035         * doc/glibc-functions/lutimes.texi (lutimes): Refer to utimensat
104036         instead.
104037         * doc/posix-functions/utime.texi (utime): Likewise.
104038         * doc/posix-functions/utimes.texi (utimes): Likewise.
104039         * doc/glibc-functions/futimes.texi (futimes): Refer to futimens
104040         instead.
104041         * doc/posix-functions/futimens.texi (futimens): Mention utimens
104042         module.
104043         * doc/posix-functions/utimensat.texi (utimensat): Likewise.
104044         Mention weakness with symlink timestamps.
104045         * doc/glibc-functions/futimesat.texi (futimesat): New file; refer
104046         to utimensat/futimens instead.
104047         * doc/gnulib.texi (Glibc sys/time.h): Include new file.
104049         test-dup2: enhance test
104050         * tests/test-dup2.c (main): Also check AT_FDCWD.
104052         test-stat-time: avoid more spurious failures
104053         * tests/test-stat-time.c (nap): Wait for 15ms rather than 2ms, for
104054         xfs; and avoid race if the two timestamps cross quantization edge.
104056         relocatable: prefer 'file system' over 'filesystem'
104057         * m4/relocatable-lib.m4 (gl_RELOCATABLE_NOP): Use AS_HELP_STRING.
104058         (gl_RELOCATABLE_LIBRARY_BODY): Fix spelling.
104059         * doc/relocatable-maint.texi (Supporting Relocation): Likewise.
104060         * doc/relocatable.texi (Enabling Relocatability): Likewise.
104061         * lib/relocatable.c (compute_curr_prefix): Likewise.
104063 2009-10-10  Jim Meyering  <meyering@redhat.com>
104065         stat-time-tests: check for the usleep function
104066         * modules/stat-time-tests (configure.ac): Now that we test HAVE_USLEEP.
104068 2009-10-10  Bruno Haible  <bruno@clisp.org>
104070         * modules/xnanosleep: Put the Link section after the Include section.
104072 2009-10-09  Eric Blake  <ebb9@byu.net>
104074         dup2: work around FreeBSD 6.1 bug
104075         * m4/dup2.m4 (gl_FUNC_DUP2): Detect bug.
104076         * doc/posix-functions/dup2.texi (dup2): Document it.
104077         Reported by Nelson H. F. Beebe and Jim Meyering.
104079         test-stat-time: port to buggy NFS clients
104080         * tests/test-stat-time.c (main) [W32]: Reduce ifdefs.
104081         (test_ctime): Also skip test if mtime and ctime are skewed.
104083         maint: prefer 'file system' over 'filesystem'
104084         * doc/posix-functions/fstatat.texi (fstatat): Likewise.
104085         * doc/posix-functions/lstat.texi (lstat): Likewise.
104086         * lib/file-has-acl.c (file_has_acl): Likewise.
104087         * lib/fwriteerror.c [TEST]: Likewise.
104088         * tests/test-areadlink.h (test_areadlink): Likewise.
104089         * tests/test-areadlinkat-with-size.c (main): Likewise.
104090         * tests/test-areadlinkat.c (main): Likewise.
104091         * tests/test-canonicalize-lgpl.c (main): Likewise.
104092         * tests/test-canonicalize.c (main): Likewise.
104093         * tests/test-fstatat.c (main): Likewise.
104094         * tests/test-linkat.c (main): Likewise.
104095         * tests/test-lstat.h (test_lstat_func): Likewise.
104096         * tests/test-mkdir.h (test_mkdir): Likewise.
104097         * tests/test-readlink.h (test_readlink): Likewise.
104098         * tests/test-remove.c (main): Likewise.
104099         * tests/test-rename.h (test_rename): Likewise.
104100         * tests/test-renameat.c (main): Likewise.
104101         * tests/test-rmdir.h (test_rmdir_func): Likewise.
104102         * tests/test-symlink.h (test_symlink): Likewise.
104103         * tests/test-symlinkat.c (main): Likewise.
104104         * tests/test-unlink.h (test_unlink_func): Likewise.
104105         * tests/test-unlinkat.c (main): Likewise.
104107         maint: make realtime library usage explicit
104108         * modules/gethrxtime (Link): Mention LIB_GETHRXTIME.
104109         * modules/gettime (Link): Mention LIB_CLOCK_GETTIME.
104110         * modules/settime (Link): Likewise.
104111         * modules/xnanosleep (Link): Mention LIB_NANOSLEEP.
104113         test-stat-time: speed up execution
104114         * tests/test-stat-time.c (test_ctime) [!W32]: Avoid compiler
104115         warning on mingw.
104116         (nap): New helper function.
104117         (prepare_test): Use it to reduce sleep time.
104118         (test_mtime, test_ctime, test_birthtime): Allow for subsecond
104119         execution.
104120         * modules/stat-time-tests (configure.ac): Check for usleep.
104122 2009-10-09  Jim Meyering  <meyering@redhat.com>
104124         selinux-h: always use getfilecon wrappers
104125         * lib/getfilecon.c: New file.
104126         * lib/se-selinux.in.h: Use a better inclusion guard symbol name.
104127         [HAVE_SELINUX_SELINUX_H]: Include-next <selinux/selinux.h>.
104128         [!HAVE_SELINUX_SELINUX_H]: Use better parameter names.
104129         (fgetfilecon): Provide a stub.
104130         * m4/selinux-selinux-h.m4 (gl_HEADERS_SELINUX_SELINUX_H): Don't
104131         AC_SUBST SELINUX_SELINUX_H, since now we're generating that
104132         file unconditionally.
104133         When <selinux/selinux.h> is found, arrange to use wrappers.
104134         * modules/selinux-h (Files): Add getfilecon.c.
104135         (Makefile.am): Substitute include-next-related bits
104136         into the now-always-generated selinux/selinux.h file.
104137         * doc/glibc-functions/lgetfilecon.texi: New file.
104138         * doc/glibc-functions/fgetfilecon.texi: New file.
104139         * doc/glibc-functions/getfilecon.texi: New file.
104140         * doc/glibc-functions/getfilecon-desc.texi: New file.
104141         * doc/gnulib.texi (Glibc selinux/selinux.h): New section, by
104142         which to pull in the new files.
104143         * MODULES.html.sh (Misc): Add selinux-h.
104145 2009-10-08  Jim Meyering  <meyering@redhat.com>
104147         unistd: fix comment typo
104148         * lib/unistd.in.h (euidaccess): Fix a comment typo.
104150 2009-10-08  Eric Blake  <ebb9@byu.net>
104152         areadlink: use SIZE_MAX consistently
104153         * modules/areadlink (Depends-on): Add stdint.
104154         * modules/areadlink-with-size (Depends-on): Likewise.
104155         * lib/areadlink-with-size.c (includes): Drop stdio, since stdlib
104156         gives NULL; drop sys/types, since unistd gives size_t; and add
104157         stdint for SIZE_MAX.
104158         (SIZE_MAX): Rely on headers.
104159         * lib/areadlinkat-with-size.c (includes): Drop stdio, sys/types,
104160         and add stdint.
104161         * lib/areadlink.c (includes): Drop sys/types, and add stdint.
104162         (SIZE_MAX): Likewise.
104163         (INITIAL_BUF_SIZE): Turn into enum.
104164         * lib/areadlinkat.c (INITIAL_BUF_SIZE): Likewise.
104166 2009-10-08  Jim Meyering  <meyering@redhat.com>
104168         areadlinkat: avoid compilation failure
104169         * lib/areadlinkat.c: Include <stdint.h> for use of SIZE_MAX.
104170         Fix typo in comment.
104172 2009-10-07  Eric Blake  <ebb9@byu.net>
104174         areadlinkat-with-size: new module
104175         * modules/areadlinkat-with-size: New module.
104176         * lib/areadlinkat-with-size.c (areadlinkat_with_size): New file.
104177         * lib/areadlink.h (areadlinkat): Declare it.
104178         * MODULES.html.sh (File system functions): Mention it.
104179         * modules/areadlinkat-with-size-tests: New test.
104180         * tests/test-areadlinkat-with-size.c: New file.
104182         xreadlinkat: new module
104183         * modules/xreadlinkat: New module.
104184         * lib/xreadlinkat.c (xreadlinkat): New file.
104185         * lib/xreadlink.h (xreadlinkat): Declare it.
104186         * MODULES.html.sh (File system functions): Mention it.
104188         areadlinkat: new module
104189         * lib/at-func.c (FUNC_FAIL): New define.
104190         (AT_FUNC_NAME, VALIDATE_FLAG): Use it rather than raw -1.
104191         * modules/areadlinkat: New module.
104192         * lib/linkat.c (areadlinkat): Move...
104193         * lib/areadlinkat.c (areadlinkat): ...to new file.
104194         * lib/areadlink.h (areadlinkat): Declare it.
104195         * modules/linkat (Depends-on): Add areadlinkat.
104196         * MODULES.html.sh (File system functions): Mention it.
104197         * modules/areadlinkat-tests: New test.
104198         * tests/test-areadlinkat.c: New file.
104200         areadlink, areadlink-with-size: add tests
104201         * modules/areadlink-tests: New test.
104202         * modules/areadlink-with-size-tests: Likewise.
104203         * tests/test-areadlink.h: New file.
104204         * tests/test-areadlink.c: Likewise.
104205         * tests/test-areadlink-with-size.c: Likewise.
104207         maint: minor cleanups
104208         * lib/fts.c (ATTRIBUTE_UNUSED): Delete; use gnulib-guaranteed
104209         _UNUSED_PARAMETER_ instead.
104210         * lib/getdate.y (ATTRIBUTE_UNUSED): Likewise.
104211         * lib/utimens.c (ATTRIBUTE_UNUSED): Likewise.
104212         * modules/linkat-tests (Files): Distribute test-link.h.
104214         openat, utimens: whitespace cleanup
104215         * lib/openat.c: Prefer space throughout, rather than mix of 8
104216         spaces vs. tabs.
104217         * lib/at-func.c: Likewise.
104218         * lib/utimens.c: Likewise.
104220         openat: avoid using wrong fd
104221         * lib/openat.c (openat_permissive): Reject user's fd if saving the
104222         working directory chooses same fd.
104223         * lib/at-func.c (AT_FUNC_NAME): Likewise.
104225         mkdir, mkdirat: fix cygwin 1.5.x bug
104226         * lib/mkdir.c (rpl_mkdir) [FUNC_MKDIR_DOT_BUG]: Work around bug.
104227         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Move...
104228         * m4/mkdir.m4 (gl_FUNC_MKDIR): ...here, and add check for cygwin
104229         bug.
104230         (gl_PREREQ_MKDIR): Delete unused macro.
104231         * modules/mkdir (Files): Track file rename.
104232         (configure.ac): Update macro name.
104233         * modules/openat (Depends-on): Add mkdir.
104234         * doc/posix-functions/mkdir.texi (mkdir): Document the bug.
104236         mkdir, mkdirat: add tests
104237         * modules/mkdir-tests: New test.
104238         * tests/test-mkdir.h: New file.
104239         * tests/test-mkdir.c: Likewise.
104240         * tests/test-mkdirat.c: Likewise.
104241         * modules/openat-tests (Files): Add new files.
104242         (Makefile.am): Run new test.
104244 2009-10-06  Eric Blake  <ebb9@byu.net>
104246         doc: tweak *at function documentation
104247         * doc/posix-functions/faccessat.texi (faccessat): Mention
104248         known issue with replacement.
104249         * doc/posix-functions/fchdir.texi (fchdir): Likewise.
104250         * doc/posix-functions/linkat.texi (linkat): Likewise.
104251         * doc/posix-functions/mkfifoat.texi (mkfifoat): Likewise.
104252         * doc/posix-functions/mknodat.texi (mknodat): Likewise.
104253         * doc/posix-functions/readlinkat.texi (readlinkat): Likewise.
104254         * doc/posix-functions/renameat.texi (renameat): Likewise.
104255         * doc/posix-functions/symlinkat.texi (symlinkat): Likewise.
104257         openat: fix GNU/Hurd bug in unlinkat
104258         * m4/openat.m4 (gl_FUNC_OPENAT): Replace unlinkat if unlink is
104259         broken.
104260         * doc/posix-functions/unlink.texi (unlink): Document this.
104261         * doc/posix-functions/unlinkat.texi (unlinkat): Likewise.
104263         fdopendir: fix GNU/Hurd bug
104264         * m4/fdopendir.m4 (gl_FUNC_FDOPENDIR): Check for Hurd bug in
104265         allowing non-directory fds.
104266         * lib/fdopendir.c (rpl_fdopendir): Work around it.
104267         * m4/dirent_h.m4 (gl_DIRENT_H_DEFAULTS): New witness.
104268         * modules/dirent (Makefile.am): Substitute it.
104269         * lib/dirent.in.h (fdopendir): Declare replacement.
104270         * doc/posix-functions/fdopendir.texi (fdopendir): Document this.
104271         * tests/test-fdopendir.c (main): Test something other than
104272         /dev/null, since on Hurd that behaves like a directory.
104274         test-symlink: port to GNU/Hurd
104275         * tests/test-symlink.h (test_symlink): Relax expected errno.
104277         doc: tweak more cygwin information
104278         * doc/glibc-headers/getopt.texi (getopt.h): Cygwin 1.7 getopt is
104279         now compatible with glibc.
104280         * doc/posix-functions/getopt.texi (getopt): Likewise.
104282         getopt-gnu: add another test
104283         * tests/test-getopt_long.h (test_getopt_long_posix): New test, to
104284         guarantee behavior relied on by m4.
104285         * tests/test-getopt.c (main): Use it.
104286         * modules/getopt-posix-tests (Depends-on): Add setenv.
104287         See http://lists.gnu.org/r/bug-m4/2006-09/msg00028.html.
104289         getopt: fix compilation on darwin
104290         * lib/getopt.in.h (includes): Leave breadcrumbs during system
104291         include.
104292         * lib/unistd.in.h (getopt): Use them to avoid recursive include.
104293         Reported by Ludovic Courtès.
104295 2009-10-06  Bruno Haible  <bruno@clisp.org>
104297         * modules/size_max (Description): Discourage its use.
104298         Reported by Simon Josefsson.
104300 2009-10-06  Jim Meyering  <meyering@redhat.com>
104302         linkat: avoid compilation failure
104303         * lib/linkat.c: Include <stdint.h> for use of SIZE_MAX.
104305 2009-10-05  Eric Blake  <ebb9@byu.net>
104307         linkat: support Linux 2.6.17
104308         * m4/linkat.m4 (gl_FUNC_LINKAT): Default to always replacing
104309         linkat on Linux, but allow cache variable override.
104310         * lib/linkat.c (rpl_linkat): Define override.
104311         * modules/linkat (Depends-on): Add symlinkat.
104312         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add new default.
104313         * modules/unistd (Makefile.am): Substitute it.
104314         * lib/unistd.in.h (linkat): Declare replacement.
104315         Reported by Pádraig Brady.
104317         quotearg: port test to systems with C.UTF-8 locale
104318         * tests/test-quotearg.c (struct result_strings): Add another
104319         member, differentiating between C.ASCII and C.UTF-8 handling.
104320         (compare_strings): Add parameter.
104321         (main): Adjust all callers.
104323         getopt: avoid clash with FreeBSD _getopt_internal
104324         * lib/getopt.in.h (_getopt_internal): Override the name.
104325         * lib/getopt_int.h (includes): Pick up any overrides.
104326         Reported by Reuben Thomas.
104328         hash: allow C89 compilation
104329         * lib/hash.c (check_tuning): Move declaration before statement.
104330         Reported by Reuben Thomas.
104332 2009-10-05  Karl Berry  <karl@gnu.org>
104334         * doc/gnulib.texi: @include execvpe.texi, missing for several days.
104336 2009-10-04  Paolo Bonzini  <bonzini@gnu.org>
104337             Bruno Haible  <bruno@clisp.org>
104339         * lib/uname.c (uname): Use a table-driven algorithm to compute
104340         Windows NT versions.
104342 2009-10-04  Bruno Haible  <bruno@clisp.org>
104344         * lib/progname.c (set_program_name): Also remove the "lt-" prefix from
104345         program_invocation_short_name.
104346         * modules/progname (configure.ac): Test for presence of
104347         program_invocation_short_name.
104348         Reported by Sergey Poznyakoff <gray@gnu.org.ua>.
104350 2009-10-04  Bruno Haible  <bruno@clisp.org>
104352         * lib/progname.c (set_program_name): Fix comment.
104353         Reported by Jim Meyering.
104355 2009-10-03  Paolo Bonzini  <bonzini@gnu.org>
104356             Bruno Haible  <bruno@clisp.org>
104358         * lib/uname.c: Include <string.h>.
104359         (uname): Do only one call to GetVersionEx in the common case.
104361 2009-10-03  Paolo Bonzini  <bonzini@gnu.org>
104362             Bruno Haible  <bruno@clisp.org>
104364         * lib/uname.c (VER_PLATFORM_WIN32_CE, PROCESSOR_ARCHITECTURE_AMD64,
104365         PROCESSOR_ARCHITECTURE_IA32_ON_WIN64): Define fallbacks.
104366         (uname): Add support for Windows CE and various non-x86 CPU types.
104368 2009-10-03  Bruno Haible  <bruno@clisp.org>
104370         * gnulib-tool (func_create_testdir): Conditionally emit AM_PROG_CC_C_O
104371         invocation to tests/configure.ac.
104372         Reported by Ian Beckwith <ianb@erislabs.net>.
104374 2009-10-02  Eric Blake  <ebb9@byu.net>
104376         fchdir: avoid compiler warning
104377         * lib/fchdir.c (canonicalize_file_name)
104378         [!HAVE_CANONICALIZE_FILE_NAME]: Avoid compiler warning on mingw.
104380         test-open: support mingw errno values
104381         * tests/test-open.h (test_open): Relax test.
104382         * tests/test-fopen.h (test_fopen): Likewise.
104383         * tests/test-openat-safer.c (main): Likewise.
104385         open: fix opening directory on mingw
104386         * lib/open.c (open) [REPLACE_OPEN_DIRECTORY]: Correct typo.
104388         test-open: on GNU/Hurd, /dev/null is a directory
104389         * tests/test-fopen.h (main): Rename...
104390         (test_fopen): ...to this.  Use a guaranteed non-directory when
104391         confirming open behavior on trailing slash.
104392         * tests/test-openat-safer.c (main): Likewise.
104393         * tests/test-open.h (main): Likewise....
104394         (test_open): ...to this.
104395         * tests/test-fopen.c (main): Adjust caller.
104396         * tests/test-fopen-safer.c (main): Likewise.
104397         * tests/test-open.c (main): Likewise.
104398         * tests/test-fcntl-safer.c (main): Likewise.
104399         Reported by Samuel Thibault.
104401         rename, fchdir: don't ignore chdir failure
104402         * lib/fchdir.c (get_name): Abort on unexpected chdir failure.
104403         * lib/rename.c (rpl_rename) [W32]: Likewise.
104404         (rpl_rename) [RENAME_DEST_EXISTS_BUG]: Avoid one case of losing
104405         an empty destination directory if source cannot be renamed,
104406         although there is still possibility for failure.
104407         * doc/posix-functions/rename.texi (rename): Document the race.
104408         Reported by Jim Meyering.
104410         maint: cleanup whitespace in recent commits
104411         * lib/rename.c (rpl_rename): Remove tabs.
104412         * tests/test-link.h (test_link): Likewise.
104413         * lib/fchdir.c (get_name): Likewise.
104414         Reported by Jim Meyering.
104416 2009-10-02  Ben Pfaff  <blp@gnu.org>
104418         relocatable-prog-wrapper: Add missing dependency on
104419         double-slash-root.
104420         * modules/relocatable-prog-wrapper: Add dependency.
104421         Reported by Ian Beckwith <ianb@erislabs.net>.
104423 2009-10-02  Eric Blake  <ebb9@byu.net>
104425         renameat: fix Solaris bugs
104426         * m4/renameat.m4 (gl_FUNC_RENAMEAT): Replace renameat if rename
104427         needed fixing.
104428         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): New witness.
104429         * modules/stdio (Makefile.am): Substitute it.
104430         * lib/stdio.in.h (renameat): Declare replacement.
104431         * lib/renameat.c (rpl_renameat): Implement fix.
104433         renameat: new module
104434         * modules/renameat: New file.
104435         * lib/renameat.c (renameat): Likewise.
104436         * m4/renameat.m4 (gl_FUNC_RENAMEAT): Likewise.
104437         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Add witnesses.
104438         * modules/stdio (Makefile.am): Substitute them.
104439         * lib/stdio.in.h (renameat): Declare it.
104440         * MODULES.html.sh (systems lacking POSIX:2008): Mention module.
104441         * doc/posix-functions/renameat.texi (renameat): Likewise.
104442         * modules/renameat-tests: New test.
104443         * tests/test-renameat.c: Likewise.
104445         rename: fix mingw bugs
104446         * lib/rename.c (rpl_rename) [W32]: Fix trailing slash and
104447         directory overwrite bugs.
104449         rename: fix another cygwin 1.5 bug
104450         * m4/rename.m4 (gl_FUNC_RENAME): Split cygwin bugs into two
104451         checks.
104452         * lib/rename.c (rpl_rename): Don't penalize NetBSD with
104453         unnecessary cygwin workarounds.  Also work around bug with moving
104454         full directory onto an empty one.
104455         * modules/rename (Depends-on): Add canonicalize-lgpl, rmdir.
104457         rename-dest-slash: merge into rename module
104458         * modules/rename-dest-slash (Status): Mark obsolete.
104459         (Depends-on): Add rename.
104460         (Files): Let rename do it all.
104461         * m4/rename.m4 (gl_FUNC_RENAME): Also test for NetBSD bugs,
104462         subsuming the test from gl_FUNC_RENAME_TRAILING_DEST_SLASH...
104463         * m4/rename-dest-slash.m4: ...so this file can be deleted.
104464         * lib/rename-dest-slash.c (rpl_rename_dest_slash): Delete.
104465         * lib/rename.c (rpl_rename): Update comments.
104467         rename: fix cygwin 1.5.x bugs
104468         * m4/rename.m4 (gl_FUNC_RENAME): Detect cygwin bugs.
104469         * lib/rename.c (rpl_rename): Work around them.
104470         * modules/rename (Depends-on): Add same-inode.
104472         rename: fix Solaris 10 bug
104473         * m4/rename.m4 (gl_FUNC_RENAME): Detect Solaris bug.
104474         * lib/rename.c (rpl_rename): Don't cripple POSIX behavior if this
104475         was the only bug.
104477         rename: fix Solaris 9 bug
104478         * lib/rename.c (rpl_rename): Rewrite to recognize trailing slash
104479         on non-directory.  Avoid calling exit.
104480         * modules/rename (Depends-on): Drop xalloc; add lstat, stdbool,
104481         strdup.
104482         * modules/rename-tests (Depends-on): Drop lstat.
104483         * m4/rename.m4 (gl_FUNC_RENAME): Detect Solaris bug.
104484         (gl_PREREQ_RENAME): Delete unused macro.
104486         rename-dest-slash: fix NetBSD bug
104487         * lib/rename-dest-slash.c (rpl_rename_dest_slash): Detect hard
104488         links.
104489         * modules/rename-dest-slash (Depends-on): Add same-inode.
104491         rename-tests: new test, exposes several platform bugs
104492         * modules/rename-tests: New file.
104493         * tests/test-rename.h: Likewise.
104494         * tests/test-rename.c: Likewise.
104495         * doc/posix-functions/rename.texi (rename): Improve documentation,
104496         including bugs that will eventually be fixed in gnulib.
104498 2009-10-02  Paolo Bonzini  <bonzini@gnu.org>
104500         * lib/uname.c: Include <stdlib.h>
104501         (uname): Assume version info is available.
104503 2009-10-02  Jim Meyering  <meyering@redhat.com>
104505         gnu-web-doc-update: correct --help output
104506         * build-aux/gnu-web-doc-update: Make --help output relevant.
104508         gnu-web-doc-update: add standard options
104509         * build-aux/gnu-web-doc-update: Add --help, --version, etc.
104511         gnu-web-doc-update: New module.
104512         Use this script to automatically update the on-line web documentation
104513         for your GNU project at http://www.gnu.org/software/$pkg/manual/
104514         * modules/gnu-web-doc-update: New file, from coreutils.
104515         * build-aux/gnu-web-doc-update: New script.
104517 2009-10-01  Paolo Bonzini  <bonzini@gnu.org>
104519         link: LoadLibrary is not needed.
104520         * lib/link.c: Use GetModuleHandle.
104522 2009-10-01  Eric Blake  <ebb9@byu.net>
104524         getopt: bump serial number
104525         * m4/getopt.m4: Increment serial number, to account for 2009-09-24
104526         change.
104528         tests: tighten link, rmdir, and remove tests
104529         * tests/test-link.h (includes): No need to use <config.h> here.
104530         Clean up if directory hard link was created, otherwise test for
104531         trailing '.'.
104532         * tests/test-linkat.c (main): Simplify.
104533         * tests/test-remove.c (main): Enhance test for trailing '.'.
104534         * tests/test-rmdir.h (test_rmdir_func): Likewise.
104536 2009-10-01  Jim Meyering  <meyering@redhat.com>
104538         maint.mk: requiring "make major" was annoying, for a "minor" release.
104539         What is intended is "stable", to contrast with alpha and beta,
104540         so require "make stable", not "make major".
104541         * build-aux/announce-gen (%valid_release_types): s/major/stable/.
104542         (get_tool_versions): Likewise.
104543         * top/maint.mk (ALL_RECURSIVE_TARGETS): s/major/stable/
104545 2009-09-30  Ben Pfaff  <blp@gnu.org>
104547         Fix broken build of replacement for Windows tmpfile().
104548         * lib/tmpfile.c (tmpfile): Fix call to gen_tempname() to provide
104549         flags argument added along with the 'mkostemp' module.
104551 2009-09-28  Bruno Haible  <bruno@clisp.org>
104553         Avoid identifier clash with POSIX function 'remove' defined as a macro.
104554         * lib/gl_list.h (struct gl_list_implementation): Rename field 'remove'
104555         to 'remove_elt'.
104556         (gl_list_remove): Update.
104557         * lib/gl_list.c (gl_list_remove): Update.
104558         * lib/gl_oset.h (struct gl_oset_implementation): Rename field 'remove'
104559         to 'remove_elt'.
104560         (gl_oset_remove): Update.
104561         * lib/gl_list.c (gl_oset_remove): Update.
104562         Reported by Eric Blake.
104564 2009-09-28  Eric Blake  <ebb9@byu.net>
104566         doc: mention yet more cygwin 1.7 status
104567         * doc/posix-functions/fexecve.texi (fexecve): Now implemented in
104568         cygwin.
104569         * doc/glibc-functions/execvpe.texi (execvpe): New file.
104570         * doc/gnulib.texi (Glibc unistd.h): Mention it.
104572         argp: fix test failure
104573         * lib/argp-help.c (hol_entry_cmp): Don't use _tolower on values
104574         that are not upper-case.  Pass correct range to tolower.
104576 2009-09-27  Jim Meyering  <meyering@redhat.com>
104578         test-yesno: work around sparc-dash here-document infelicity
104579         Without this change, the literal \177 byte in a here document
104580         would make dash 0.5.5.1-3 access uninitialized memory.
104581         * tests/test-yesno.sh: Don't put the \177 byte in the here document.
104582         Instead, use a marker, "@", and filter through tr to create the desired
104583         contents.  Reported as <http://bugs.debian.org/548493> by Kurt Roeckx.
104585 2009-09-27  Bruno Haible  <bruno@clisp.org>
104587         Disable untested support for new flavours of ACLs on AIX.
104588         * lib/file-has-acl.c (file_has_acl): Mark newer AIX code as work in
104589         progress.
104590         * lib/set-mode-acl.c (qset_acl): Likewise.
104592 2008-12-07  Bruno Haible  <bruno@clisp.org>
104594         Add support for new flavours of ACLs on AIX. (Untested.)
104595         * lib/file-has-acl.c [AIX] (acl_nfs4_nontrivial): New function.
104596         (file_has_acl): Add support for newer AIX.
104597         * lib/set-mode-acl.c (qset_acl): Likewise.
104598         * tests/test-sameacls.c (main): Fix use of aclx_get function. Hint by
104599         Rainer Tammer <tammer@tammer.net>.
104601 2009-09-26  Eric Blake  <ebb9@byu.net>
104603         argp: fix compilation of getopt
104604         * lib/getopt.in.h (includes): Use different guard than glibc.
104605         Reported by Sergey Poznyakoff.
104607         doc: mention more cygwin 1.7 status
104608         * doc/posix-functions/access.texi (access): Mention cygwin 1.5
104609         bug.
104610         * doc/posix-functions/execl.texi (execl): Likewise.
104611         * doc/posix-functions/execle.texi (execle): Likewise.
104612         * doc/posix-functions/execlp.texi (execlp): Likewise.
104613         * doc/posix-functions/execv.texi (execv): Likewise.
104614         * doc/posix-functions/execve.texi (execve): Likewise.
104615         * doc/posix-functions/execvp.texi (execvp): Likewise.
104616         * doc/glibc-functions/canonicalize_file_name.texi
104617         (canonicalize_file_name): Cygwin 1.7 now provides this.
104618         * doc/glibc-functions/euidaccess.texi (euidaccess): Likewise.
104619         * doc/posix-functions/fchmodat.texi (fchmodat): Mention limitation
104620         on AT_SYMLINK_NOFOLLOW.
104622 2009-09-24  Eric Blake  <ebb9@byu.net>
104624         test-linkat: make test more robust
104625         * tests/test-linkat.c (main): Avoid collision with EEXIST.
104627         getopt: fix inclusion guards for cygwin
104628         * modules/getopt-posix (Depends-on): Add include-next.
104629         (Makefile.am): Substitute more items in replacement header.
104630         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Also check for native
104631         <getopt.h>.
104632         * lib/getopt.in.h (includes): Use split inclusion guard, and
104633         prefer <getopt.h> over include <unistd.h> when one is present.
104634         (option): Also override name of 'struct option'.
104636         same-inode: revert prior change; it is not yet ready
104637         * NEWS: Undo mention of this change.
104638         * lib/same-inode.h (same-inode.h): Undo tri-state change.
104639         * lib/cycle-check.h (CYCLE_CHECK_REFLECT_CHDIR_UP): Update caller.
104640         * lib/cycle-check.c (cycle_check): Likewise.
104641         * lib/same.c (same_name): Likewise.
104642         * lib/at-func2.c (at_func2): Likewise.
104644 2009-09-23  Eric Blake  <ebb9@byu.net>
104646         linkat: new module
104647         * modules/linkat: New file.
104648         * lib/at-func2.c (at_func2): Likewise.
104649         * lib/linkat.c (linkat): Likewise.
104650         * m4/linkat.m4 (gl_FUNC_LINKAT): Likewise.
104651         * lib/openat-priv.h (at_func2): Add declaration.
104652         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add witnesses.
104653         * modules/unistd (Makefile.am): Substitute them.
104654         * lib/unistd.in.h (linkat): Declare it.
104655         * MODULES.html.sh (systems lacking POSIX:2008): Mention module.
104656         * doc/posix-functions/linkat.texi (linkat): Likewise.
104657         * doc/posix-functions/link.texi (link): Tweak wording.
104658         * tests/test-link.c (main): Move guts...
104659         * tests/test-link.h (test_link): ...into new file.
104660         * modules/linkat-tests: New test.
104661         * tests/test-linkat.c: Likewise.
104662         * modules/link-tests (Files): Ship new file.
104663         (Depends-on): Add stdbool.
104665         dirname: add library-safe mdir_name
104666         * lib/dirname.h (mdir_name): New prototype.
104667         * lib/dirname.c (dir_name): Move guts...
104668         (mdir_name): ...to new function that avoids xalloc_die.
104670         fchdir: another mingw fix
104671         * modules/fchdir (Depends-on): Drop canonicalize-lgpl.
104672         * lib/fchdir.c (get_name): New helper method; skips canonicalize
104673         on mingw (where it has not yet been ported), and make it optional
104674         elsewhere.
104675         (_gl_register_fd): Use it.
104677         same-inode: make SAME_INODE tri-state, to port to mingw
104678         * NEWS: Mention this change.
104679         * lib/same-inode.h (same-inode.h): Recognize mingw limitation of
104680         st_ino always being 0.
104681         * lib/cycle-check.h (CYCLE_CHECK_REFLECT_CHDIR_UP): Update caller.
104682         * lib/cycle-check.c (cycle_check): Likewise.
104683         * lib/same.c (same_name): Likewise.
104685         lstat: avoid mingw compilation error
104686         * m4/lstat.m4 (gl_FUNC_LSTAT): Avoid duplicate calls to
104687         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK, and deal with missing
104688         lstat ourselves.
104689         * lib/lstat.c [!HAVE_LSTAT]: Do nothing if <sys/stat.h> override
104690         was adequate.
104691         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Let lstat module handle
104692         the checks for lstat.
104693         (gl_SYS_STAT_H_DEFAULTS): Set default for HAVE_LSTAT.
104695         link: fix test failure on Solaris 9
104696         * lib/link.c (rpl_link): Don't assume link will catch bogus
104697         trailing slash on source.
104699         test-symlinkat: enhance test
104700         * tests/test-readlink.c (main): Move guts...
104701         * tests/test-readlink.h (test_readlink): ...into new file.
104702         * tests/test-symlink.c (main): Move guts...
104703         * tests/test-symlink.h (test_symlink): ...into new file.
104704         * tests/test-symlinkat.c (main): Use new files for further
104705         coverage.
104706         (do_symlink, do_readlink): New helper functions.
104707         * modules/symlink-tests (Files): Ship new file.
104708         (Depends-on): Add stdbool.
104709         * modules/readlink-tests (Files): Ship new file.
104710         (Depends-on): Add stdbool.
104711         * modules/symlinkat-tests (Files): Use new files.
104713 2009-09-23  Eric Blake  <ebb9@byu.net>
104715         readlink: document portability issue with symlink length
104716         * doc/posix-functions/lstat.texi (lstat): Mention that some file
104717         systems have bogus st_size on symlinks, and mention the
104718         areadlink-with-size module.
104719         * doc/posix-functions/fstatat.texi (fstatat): Likewise.
104720         * doc/posix-functions/readlink.texi (readlink): Mention the
104721         areadlink module, and ERANGE failure.
104722         * doc/posix-functions/readlinkat.texi (readlinkat): Likewise.
104723         * tests/test-readlink.c (main): Relax test for AIX, HP-UX.
104725         readlink: fix Solaris 9 bug with trailing slash
104726         * lib/readlink.c (rpl_readlink): Work around trailing slash bug.
104727         * m4/readlink.m4 (gl_FUNC_READLINK): Detect the bug.
104728         * doc/posix-functions/readlink.texi (readlink): Document this.
104729         * modules/readlink-tests: New test.
104730         * tests/test-readlink.c: Likewise.
104732         readlink: fix cygwin 1.5.x bug with return type
104733         * m4/readlink.m4 (gl_FUNC_READLINK): Require correct signature.
104734         * lib/unistd.in.h (readlink): Use ssize_t.
104735         * lib/readlink.c (readlink): Likewise.
104736         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add witness.
104737         * modules/unistd (Makefile.am): Substitute it.
104738         * lib/unistd.in.h (readlink): Declare replacement.
104739         * doc/posix-functions/readlink.texi (readlink): Document this.
104741         symlink: use throughout gnulib
104742         * m4/symlinkat.m4 (gl_FUNC_SYMLINKAT): Omit symlink check.
104743         * lib/symlinkat.c (symlinkat) [!HAVE_SYMLINK]: Document why
104744         symlink is not used.
104745         * modules/symlinkat (Depends-on): Add symlink.
104746         * modules/canonicalize-lgpl-tests (Depends-on): Likewise.
104747         * modules/canonicalize-tests (Depends-on): Likewise.
104748         * modules/lstat-tests (Depends-on): Likewise.
104749         * modules/openat-tests (Depends-on): Likewise.
104750         * modules/remove-tests (Depends-on): Likewise.
104751         * modules/rmdir-tests (Depends-on): Likewise.
104752         * modules/unlink-tests (Depends-on): Likewise.
104753         * tests/test-canonicalize-lgpl.c (symlink): Delete stub.
104754         * tests/test-canonicalize.c (symlink): Likewise.
104755         * tests/test-fstatat.c (symlink): Likewise.
104756         * tests/test-lstat.c (symlink): Likewise.
104757         * tests/test-remove.c (symlink): Likewise.
104758         * tests/test-rmdir.c (symlink): Likewise.
104759         * tests/test-unlink.c (symlink): Likewise.
104760         * tests/test-unlinkat.c (symlink): Likewise.
104762         symlink: new module, for Solaris 9 bug
104763         * modules/symlink: New file.
104764         * m4/symlink.m4 (gl_FUNC_SYMLINK): Likewise.
104765         * lib/symlink.c: Likewise.
104766         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add defaults.
104767         * modules/unistd (Makefile.am): Substitute them.
104768         * lib/unistd.in.h (symlink): Declare replacement.
104769         * MODULES.html.sh (File system functions): Mention it.
104770         * doc/posix-functions/symlink.texi (symlink): Likewise.
104771         * modules/symlink-tests: New test.
104772         * tests/test-symlink.c: Likewise.
104774 2009-09-23  Bruno Haible  <bruno@clisp.org>
104776         * gnulib-tool (func_import): Add 'link-warning' to testsrelated_modules
104777         when needed.
104778         Test case: gnulib-tool --import --with-tests atexit inttypes.
104779         Reported by Pauli Miettinen <pauli.miettinen@cs.helsinki.fi>.
104781 2009-09-23  Bruno Haible  <bruno@clisp.org>
104783         * gnulib-tool (func_emit_tests_Makefile_am): Set uses_subdirs in a
104784         subcommand, not in a subshell.
104786 2009-09-22  Eric Blake  <ebb9@byu.net>
104788         unistd: sort replacement declarations
104789         * lib/unistd.in.h: Sort declarations.
104791         open, openat: minor optimization
104792         * lib/open.c (open): If open succeeded, len is non-zero.
104793         * lib/openat.c (rpl_openat): Likewise.
104795         link-follow: ensure correct result
104796         * m4/fcntl_h.m4 (gl_FCNTL_H): Clean up temporary file.
104797         * m4/link-follow.m4 (gl_FUNC_LINK_FOLLOWS_SYMLINK): Likewise, and
104798         distinguish between possible failures.
104800 2009-09-21  Eric Blake  <ebb9@byu.net>
104802         fts: avoid compiler warning
104803         * lib/fts.c (dirent_inode_sort_may_be_useful)
104804         (leaf_optimization_applies) [!__linux__]: Mark unused parameters.
104806 2009-09-19  Bruno Haible  <bruno@clisp.org>
104808         * lib/progreloc.c (canonicalize_file_name): New declaration.
104810 2009-09-19  Eric Blake  <ebb9@byu.net>
104812         link: fix quoting
104813         * m4/link.m4 (gl_FUNC_LINK): Fix shell quoting.
104815         openat: fix openat bugs on Solaris 9
104816         * lib/openat.c (rpl_openat): Work around Solaris 9 bug.
104817         * m4/openat.m4 (gl_FUNC_OPENAT): Also replace openat on Solaris.
104818         * modules/openat (Depends-on): Add open.
104819         * m4/fcntl_h.m4 (gl_FCNTL_H_DEFAULTS): Provide new default.
104820         * modules/fcntl-h (Makefile.am): Substitute it.
104821         * lib/fcntl.in.h (openat): Declare replacement.
104822         * doc/posix-functions/openat.texi (openat): Document this.
104824         openat: move fstatat and unlinkat into correct files
104825         * m4/openat.m4 (gl_FUNC_OPENAT): Adjust which files will be
104826         compiled.
104827         * lib/openat.c (fstatat, unlinkat): Move...
104828         * lib/fstatat.c (fstatat): ...into correct files.
104829         * lib/unlinkat.c (unlinkat): Likewise.
104831         openat: fix unlinkat bugs on Solaris 9
104832         * lib/unlinkat.c (unlinkat): New file.
104833         * modules/openat (Depends-on): Add unlink.
104834         (Files): Distribute it.
104835         * m4/openat.m4 (gl_FUNC_OPENAT): Mark unlinkat for replacement if
104836         trailing slash behavior is broken.
104837         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add witness.
104838         * modules/unistd (Makefile.am): Substitute it.
104839         * lib/unistd.in.h (unlinkat): Declare replacement.
104840         * doc/posix-functions/unlinkat.texi (unlinkat): Document this.
104842         openat: fix fstatat bugs on Solaris 9
104843         * lib/fstatat.c (rpl_fstatat): Copy recent fixes from lstat and
104844         stat.
104845         * doc/posix-functions/fstatat.texi (fstatat): Document this.
104847         test-unlinkat: enhance test, to expose Solaris 9 bug
104848         * tests/test-unlink.c (main): Factor guts...
104849         * tests/test-unlink.h (test_rmdir_func): ...into new file.
104850         * tests/test-rmdir.h (test_rmdir_func): Add parameter.
104851         * tests/test-rmdir.c (main): Adjust caller.
104852         * tests/test-unlinkat.c (main): Likewise.  Add unlink tests.
104853         (unlinker): New helper function.
104854         (rmdirat): Enhance check.
104855         * modules/rmdir-tests (Depends-on): Add stdbool.
104856         * modules/unlink-tests (Depends-on): Likewise.
104857         (Files): Add test-unlink.h.
104858         * modules/openat-tests (Files): Likewise.
104859         (Depends-on): Add unlinkdir.
104861         test-fstatat: new test, to expose Solaris 9 bugs
104862         * tests/test-stat.c (main): Factor guts...
104863         * tests/test-stat.h (test_stat_func): ...into new file.
104864         * tests/test-lstat.c (main): Factor guts...
104865         * tests/test-lstat.h (test_lstat_func): ...into new file.
104866         * tests/test-fstatat.c: New file.
104867         * modules/stat-tests (Files): Add test-stat.h.
104868         * modules/lstat-tests (Files): Add test-lstat.h.
104869         (Depends-on): Add stdbool.
104870         * modules/openat-tests (Depends-on): Add pathmax.
104871         (Files): Add test-lstat.h, test-stat.h, test-fstatat.c.
104872         (Makefile.am): Run new test.
104874         remove: new module, for mingw and Solaris 9 bugs
104875         * modules/remove: New file.
104876         * lib/remove.c: Likewise.
104877         * m4/remove.m4 (gl_FUNC_REMOVE): Likewise.
104878         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Add witnesses.
104879         * modules/stdio (Makefile.am): Use them.
104880         * lib/stdio.in.h (remove): Declare replacement.
104881         * MODULES.html.sh (systems lacking POSIX:2008): Mention module.
104882         * doc/posix-functions/remove.texi (remove): Likewise.
104883         * modules/remove-tests: New test.
104884         * tests/test-remove.c: Likewise.
104886         unlink: new module, for Solaris 9 bug
104887         * modules/unlink: New file.
104888         * lib/unlink.c: Likewise.
104889         * m4/unlink.m4 (gl_FUNC_UNLINK): Likewise.
104890         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add witnesses.
104891         * modules/unistd (Makefile.am): Use them.
104892         * lib/unistd.in.h (stat): Declare replacement.
104893         * MODULES.html.sh (systems lacking POSIX:2008): Mention module.
104894         * doc/posix-functions/unlink.texi (unlink): Likewise.
104895         * modules/unlink-tests: New test.
104896         * tests/test-unlink.c: Likewise.
104898         lstat: fix Solaris 9 bug
104899         * lib/lstat.c (lstat): Also check for trailing slash on
104900         non-symlink, non-directories.  Use stat module to simplify logic.
104901         * doc/posix-functions/lstat.texi (lstat): Document it.
104902         * modules/lstat-tests (Depends-on): Add errno, same-inode.
104903         (configure.ac): Check for symlink.
104904         * tests/test-lstat.c (main): Add more tests.
104906         stat: add as dependency to other modules
104907         * modules/chown (Depends-on): Add stat.
104908         * modules/euidaccess (Depends-on): Likewise.
104909         * modules/fchdir (Depends-on): Likewise.
104910         * modules/isdir (Depends-on): Likewise.
104911         * modules/link (Depends-on): Likewise.
104912         * modules/lstat (Depends-on): Likewise.
104913         * modules/mkdir-p (Depends-on): Likewise.
104914         * modules/modechange (Depends-on): Likewise.
104915         * modules/open (Depends-on): Likewise.
104916         * modules/readlink (Depends-on): Likewise.
104917         * modules/same (Depends-on): Likewise.
104919         stat: fix Solaris 9 bug
104920         * m4/stat.m4 (gl_FUNC_STAT): Detect Solaris 9 bug with trailing
104921         slash.
104922         * lib/stat.c (rpl_stat): Work around it.
104923         * doc/posix-functions/stat.texi (stat): Update documentation.
104925         stat: new module, for mingw bug
104926         * modules/stat: New file.
104927         * lib/stat.c: Likewise.
104928         * m4/stat.m4 (gl_FUNC_STAT): Likewise.
104929         * m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Add witnesses.
104930         * modules/sys_stat (Makefile.am): Use them.
104931         * lib/sys_stat.in.h (stat): Declare replacement.
104932         * lib/openat.c (fstatat): Deal with lstat and stat being function
104933         macros.
104934         * modules/openat (Depends-on): Add inline.
104935         * MODULES.html.sh (systems lacking POSIX:2008): Mention module.
104936         * doc/posix-functions/stat.texi (stat): Likewise.
104937         * modules/stat-tests: New test.
104938         * tests/test-stat.c: Likewise.
104940 2009-09-19  Jim Meyering  <meyering@redhat.com>
104942         syntax-check: detect unnecessary inclusion of canonicalize.h
104943         * top/maint.mk (sc_prohibit_canonicalize_without_use): New rule.
104945 2009-09-19  Eric Blake  <ebb9@byu.net>
104947         canonicalize-lgpl: adjust clients to use correct header
104948         * m4/canonicalize.m4 (gl_FUNC_CANONICALIZE_FILENAME_MODE)
104949         (gl_CANONICALIZE_LGPL): Use correct shell quoting.
104950         * modules/relocatable-prog-wrapper (Files): Drop canonicalize.h.
104951         * lib/fchdir.c (includes): Use <stdlib.h>, not "canonicalize.h".
104952         * lib/progreloc.c (includes): Likewise.
104954 2009-09-19  Jim Meyering  <meyering@redhat.com>
104956         test-posixtm.c: correct a comment
104957         * tests/test-posixtm.c: Correct first-line comment.
104958         Spotted by Eric Blake.
104960 2009-09-16  Jim Meyering  <meyering@redhat.com>
104962         posixtm-tests: make T const-correct; add a test case
104963         * tests/test-posixtm.c (T): Declare const.
104964         Add a test for -(2^31+1).
104965         Remove useless can-succeed-only-in-2002 test.
104967         posixtm-tests: adjust the sole failing test
104968         * tests/test-posixtm.c: Correct 0000-01-01 00:00:00 test so that
104969         expected output matches what mktime now produces.  Cross-checked via
104970         erlang's calendar:datetime_to_gregorian_seconds({{1970,1,1},{0,0,0}})
104972         posixtm: move #ifdef'd tests into a new module
104973         * lib/posixtm.c (posixtime): Remove #ifdef'd tests.  Move to...
104974         * tests/test-posixtm.c: ... this new file.
104975         * modules/posixtm-tests: New module.
104977 2009-09-19  Eric Blake  <ebb9@byu.net>
104979         openat: simplify use of at-func.c
104980         * lib/at-func.c (includes): Include prerequisites here, to
104981         simplify requirements on client files.
104982         * lib/openat-priv.h: Add double-inclusion guard.
104983         * lib/faccessat.c (includes): Simplify.
104984         * lib/fchmodat.c (includes): Likewise.
104985         * lib/fchownat.c (includes): Likewise.
104986         * lib/mkdirat.c (includes): Likewise.
104987         * lib/mkfifoat.c (includes): Likewise.
104988         * lib/symlinkat.c (includes): Likewise.
104990         openat: allow return of fd 0
104991         * modules/chdir-long (Depends-on): Relax openat-safer to openat.
104992         * modules/save-cwd (Depends-on): Replace fcntl-safer with
104993         unistd-safer.
104994         * lib/chdir-long.c (includes): Replace "fcntl--.h" with
104995         <fcntl.h>; this module does not leak fds.
104996         * lib/openat.c (includes): Do not use "fcntl_safer"; plain openat
104997         must be allowed to return 0, leaving openat_safer to add the
104998         safety.
104999         (openat_permissive): Avoid writing to just-opened fd 2 if
105000         restoring the current directory fails.
105001         * lib/openat-die.c (openat_restore_fail): Add comment.
105002         * lib/save-cwd.c (includes): Make "fcntl--.h" conditional.
105003         (save_cwd): Guarantee safe fd, but without use of open_safer.
105004         * tests/test-openat.c: New test.
105005         * modules/openat-tests (Files, Makefile.am): Distribute and build
105006         new file.
105008         relocatable-prog-wrapper: fix build
105009         * modules/relocatable-prog-wrapper (Files): Update name of
105010         canonicalize m4 file, broken on 2009-09-17.
105011         Reported by emad hajjar <aleppos@hotmail.com>.
105013 2009-09-19  Bruno Haible  <bruno@clisp.org>
105015         * lib/safe-alloc.h: Use the standard header with GPL copyright.
105016         * lib/safe-alloc.c: Likewise.
105017         Reported by Ian Beckwith <ianb@erislabs.net>.
105019 2009-09-18  Bruno Haible  <bruno@clisp.org>
105021         * gnulib-tool: Add advice to "cannot find configure.ac" error message.
105022         Reported by <erobles@sensacd.com.mx>.
105024 2009-09-17  Eric Blake  <ebb9@byu.net>
105026         canonicalize: in CAN_ALL_BUT_LAST, allow trailing slash
105027         * lib/canonicalize.c (canonicalize_filename_mode): Skip trailing
105028         slashes when checking if last component is missing.
105029         * tests/test-canonicalize.c (main): Test this.
105031         canonicalize, canonicalize-lgpl: honor // if distinct from /
105032         * modules/canonicalize (Files): Add double-slash-root.m4.
105033         * modules/canonicalize-lgpl (Files): Likewise.
105034         * m4/canonicalize.m4 (gl_FUNC_CANONICALIZE_FILENAME_MODE)
105035         (gl_CANONICALIZE_LGPL_SEPARATE): Add dependency.
105036         * lib/canonicalize.c (DOUBLE_SLASH_IS_DISTINCT_ROOT): Provide
105037         fallback definition.
105038         (canonicalize_filename_mode): Use it to protect //.
105039         * lib/canonicalize-lgpl.c (DOUBLE_SLASH_IS_DISTINCT_ROOT)
105040         (__realpath): Likewise.
105041         * tests/test-canonicalize.c (main): Test this.
105042         * tests/test-canonicalize-lgpl.c (main): Likewise.
105043         * modules/canonicalize-tests (Depends-on): Add same-inode.
105044         * modules/canonicalize-lgpl-tests (Depends-on): Likewise.
105046         canonicalize-lgpl: fix glibc bug with trailing slash
105047         * m4/canonicalize-lgpl.m4: Move contents...
105048         * m4/canonicalize.m4: ...here.
105049         (gl_CANONICALIZE_LGPL): Factor realpath check...
105050         (gl_FUNC_REALPATH_WORKS): ...into new macro.  Enhance to catch
105051         glibc 2.3.5 bug, fixed 2005-04-27.
105052         (gl_FUNC_CANONICALIZE_FILENAME_MODE): Use it.
105053         (gl_PREREQ_CANONICALIZE_LGPL): Inline...
105054         (gl_CANONICALIZE_LGPL_SEPARATE): ...into this macro.
105055         * modules/canonicalize-lgpl (Files): Manage file rename.
105056         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Provide default.
105057         * modules/stdlib (Makefile.am): Substitute witness.
105058         * lib/stdlib.in.h (canonicalize_file_name): Declare if replacement
105059         is needed.
105060         * lib/canonicalize-lgpl.c: Also compile if canonicalize_file_name
105061         replacement is required.
105062         * lib/canonicalize.c (canonicalize_file_name): Likewise.
105063         * doc/glibc-functions/canonicalize_file_name.texi
105064         (canonicalize_file_name): Document this.
105065         * doc/posix-functions/realpath.texi (realpath): Likewise.
105067         canonicalize-lgpl: reject non-directory with trailing slash
105068         * lib/canonicalize-lgpl.c (__realpath): Synchronize with glibc.
105069         * tests/test-canonicalize-lgpl.c (main): Enhance test.  This
105070         catches failures in glibc 2.3.5.
105071         * tests/test-canonicalize.c (main): Likewise.
105073         canonicalize-lgpl: use native realpath if it works
105074         * lib/canonicalize-lgpl.c (realpath): Guard with
105075         FUNC_REALPATH_WORKS.
105076         * lib/stdlib.in.h (realpath): Make declaration optional based on
105077         HAVE_REALPATH.
105078         * m4/canonicalize-lgpl.m4 (gl_CANONICALIZE_LGPL): Check whether
105079         native realpath works.
105080         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Provide default.
105081         * modules/stdlib (Makefile.am): Substitute witness.
105083         canonicalize, canonicalize-lgpl: use <stdlib.h>
105084         * modules/canonicalize-lgpl (Files): Drop canonicalize.h.
105085         (Include): Mention <stdlib.h>.
105086         (configure.ac): Mention functions we provide.
105087         * modules/canonicalize (configure.ac): Likewise.
105088         * m4/canonicalize-lgpl.m4 (gl_CANONICALIZE_LGPL): Always replace
105089         realpath if canonicalize_file_name is missing.
105090         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Provide defaults.
105091         * modules/stdlib (Makefile.am): Substitute witnesses.
105092         * lib/stdlib.in.h (canonicalize_file_name, realpath): Declare.
105093         * lib/canonicalize-lgpl.c (includes): Adjust accordingly.
105094         * lib/canonicalize.h (canonicalize_file_name): Drop declaration.
105095         * NEWS: Document this.
105096         * doc/glibc-functions/canonicalize_file_name.texi
105097         (canonicalize_file_name): Likewise.
105098         * doc/posix-functions/realpath.texi (realpath): Likewise.
105099         * tests/test-canonicalize-lgpl.c (includes): Use <stdlib.h>.
105101         test-canonicalize: consolidate into single C program
105102         * tests/test-canonicalize.sh: Delete; move setup into...
105103         * tests/test-canonicalize.c (main): ...the program, making it
105104         easier to run in debugger.  Add some tests.
105105         * modules/canonicalize-tests (Files): Remove unused file.
105106         (Depends-on): Add progname.
105107         (configure.ac, Makefile.am): Simplify.
105109         test-canonicalize-lgpl: consolidate into single C program
105110         * tests/test-canonicalize-lgpl.sh: Delete; move setup into...
105111         * tests/test-canonicalize-lgpl.c (main): ...the program, making it
105112         easier to run in debugger.  Add some tests.
105113         * modules/canonicalize-lgpl-tests (Files): Remove unused file.
105114         (configure.ac, Makefile.am): Simplify.
105116         canonicalize: avoid resolvepath
105117         * m4/canonicalize.m4 (gl_FUNC_CANONICALIZE_FILENAME_MODE): Delete
105118         unnecessary checks.
105119         * lib/canonicalize.c (includes): Simplify.
105120         (canonicalize_file_name): Drop resolvepath implementation.
105121         * modules/canonicalize (Depends-on): Drop filenamecat.
105123         canonicalize: don't lose errno
105124         * lib/canonicalize.c (canonicalize_filename_mode): Protect errno
105125         over calls to free.
105127         canonicalize: simplify errno handling
105128         * lib/canonicalize.c (__set_errno): Delete macro, and use direct
105129         assignment.
105131         canonicalize, canonicalize-lgpl: update module dependencies
105132         * modules/canonicalize (Depends-on): Add extensions, lstat,
105133         pathmax, stdlib.
105134         (Files): Drop pathmax.h.
105135         (configure.ac): Adjust macro name.
105136         * modules/canonicalize-lgpl (Depends-on): Add errno, extensions,
105137         lstat, stdlib, sys_stat.
105138         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Rename...
105139         (gl_FUNC_CANONICALIZE_FILENAME_MODE): ...to this, and require
105140         extensions.
105141         * m4/canonicalize-lgpl.m4 (gl_CANONICALIZE_LGPL)
105142         (gl_CANONICALIZE_LGPL_SEPARATE): Require extensions.
105143         (gl_PREREQ_CANONICALIZE_LGPL): Assume unistd.h.
105144         * lib/canonicalize.h (canonicalize_file_name): Use <stdlib.h>
105145         declaration, if available.
105146         * lib/canonicalize-lgpl.c [HAVE_READLINK]: Delete this condition;
105147         we can rely on the readlink module.
105148         (MAXSYMLINKS): Also consult SYMLOOP_MAX.
105149         (includes): Use <unistd.h> unconditionally.
105151 2009-09-17  Eric Blake  <ebb9@byu.net>
105153         maint: make Include sections of modules consistent
105154         * modules/alloca: Use only header name; no need to list #include.
105155         * modules/alloca-opt: Likewise.
105156         * modules/arpa_inet: Likewise.
105157         * modules/canon-host: Likewise.
105158         * modules/configmake: Likewise.
105159         * modules/dirent: Likewise.
105160         * modules/eealloc: Likewise.
105161         * modules/environ: Likewise.
105162         * modules/fchdir: Likewise.
105163         * modules/fcntl: Likewise.
105164         * modules/fcntl-h: Likewise.
105165         * modules/gethrxtime: Likewise.
105166         * modules/gettime: Likewise.
105167         * modules/ignore-value: Likewise.
105168         * modules/inet_ntop: Likewise.
105169         * modules/inet_pton: Likewise.
105170         * modules/inttypes: Likewise.
105171         * modules/isnand-nolibm: Likewise.
105172         * modules/isnanf-nolibm: Likewise.
105173         * modules/mbchar: Likewise.
105174         * modules/mbfile: Likewise.
105175         * modules/mbiter: Likewise.
105176         * modules/mbuiter: Likewise.
105177         * modules/netdb: Likewise.
105178         * modules/netinet_in: Likewise.
105179         * modules/nproc: Likewise.
105180         * modules/pagealign_alloc: Likewise.
105181         * modules/poll: Likewise.
105182         * modules/printf-frexp: Likewise.
105183         * modules/pthread: Likewise.
105184         * modules/putenv: Likewise.
105185         * modules/random_r: Likewise.
105186         * modules/relocatable-prog: Likewise.
105187         * modules/search: Likewise.
105188         * modules/select: Likewise.
105189         * modules/selinux-h: Likewise.
105190         * modules/settime: Likewise.
105191         * modules/signal: Likewise.
105192         * modules/size_max: Likewise.
105193         * modules/socklen: Likewise.
105194         * modules/ssize_t: Likewise.
105195         * modules/stdarg: Likewise.
105196         * modules/stdbool: Likewise.
105197         * modules/stddef: Likewise.
105198         * modules/stdint: Likewise.
105199         * modules/stdio: Likewise.
105200         * modules/stdlib: Likewise.
105201         * modules/string: Likewise.
105202         * modules/strings: Likewise.
105203         * modules/sys_file: Likewise.
105204         * modules/sys_ioctl: Likewise.
105205         * modules/sys_select: Likewise.
105206         * modules/sys_socket: Likewise.
105207         * modules/sys_stat: Likewise.
105208         * modules/sys_time: Likewise.
105209         * modules/sys_times: Likewise.
105210         * modules/sys_utsname: Likewise.
105211         * modules/sys_wait: Likewise.
105212         * modules/sysexits: Likewise.
105213         * modules/time: Likewise.
105214         * modules/times: Likewise.
105215         * modules/tmpfile: Likewise.
105216         * modules/trim: Likewise.
105217         * modules/unistd: Likewise.
105218         * modules/wchar: Likewise.
105219         * modules/wctype: Likewise.
105221 2009-09-17  Bruno Haible  <bruno@clisp.org>
105223         Make getdate.y compile on QNX and NetBSD 5 / i386.
105224         * m4/getdate.m4 (gl_GETDATE): Conditionally define
105225         TIME_T_FITS_IN_LONG_INT.
105226         * lib/getdate.y (long_time_t): New type.
105227         (relative_time): Change type of 'seconds' field to long_time_t.
105228         (get_date): Update types of local variables. Check against overflow
105229         during conversion from long_time_t to time_t.
105230         Reported by Matt Kraai <kraai@ftbfs.org>
105231         and Hasso Tepper <hasso@netbsd.org>.
105233 2009-09-17  Bruno Haible  <bruno@clisp.org>
105235         * modules/COPYING: Update copyright years.
105236         * modules/README: Likeiwse.
105237         * doc/gnulib-intro.texi (Copyright): Use a wildcard year.
105238         Reported by Ian Beckwith <ianb@erislabs.net>.
105240 2009-09-17  Ian Beckwith  <ianb@erislabs.net>  (tiny change)
105242         * users.txt: Update references for gnuit package.
105244 2009-09-17  Ian Beckwith  <ianb@erislabs.net>  (tiny change)
105246         * m4/getdelim.m4: Fix typo in copyright line.
105248 2009-09-17  Bruno Haible  <bruno@clisp.org>
105250         * lib/atoll.c: Use the standard header with GPL copyright.
105251         * lib/argz.in.h: Likewise.
105252         * lib/glob.c: Likewise.
105253         * lib/glob-libc.h: Likewise.
105254         * lib/random_r.c: Likewise.
105255         * lib/siglist.h: Likewise.
105256         * lib/strsignal.c: Likewise.
105257         Reported by Ian Beckwith <ianb@erislabs.net>.
105259 2009-09-17  Eric Blake  <ebb9@byu.net>
105261         rmdir: ensure correct dependency order
105262         * m4/rmdir.m4 (gl_FUNC_RMDIR): Require unistd defaults.
105264 2009-09-17  Bruno Haible  <bruno@clisp.org>
105266         Disable assertion that fails on NetBSD 5 / i386.
105267         * lib/mktime.c (ydhms_diff): Disable assertion about time_t size.
105268         Reported by Sam Steingold <sds@gnu.org>
105269         and Hasso Tepper <hasso@netbsd.org>.
105271 2009-09-16  Eric Blake  <ebb9@byu.net>
105273         unlinkdir: port to mingw
105274         * m4/unlinkdir.m4 (gl_UNLINKDIR): Add mingw to list of platforms
105275         on which no one can unlink a directory.
105277         stdlib: sort witness names
105278         * modules/stdlib (Makefile.am): Sort replacements.
105279         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Likewise.
105280         * lib/stdlib.in.h: Likewise.
105282         parse-duration-tests: avoid link failure
105283         * modules/parse-duration-tests (test_parse_duration_LDADD): Add
105284         LIBINTL.
105285         Reported by Tom G. Christensen.
105287         openat-tests: ensure unlinkat behaves like rmdir
105288         * tests/test-rmdir.c (main): Factor guts...
105289         * tests/test-rmdir.h (test_rmdir_func): ...into new file.
105290         * modules/rmdir-tests (Files): Ship new file.
105291         * modules/openat-tests: New test.
105292         * tests/test-unlinkat.c: Likewise.
105294         rmdir-errno: mark obsolete, it is unsafe for cross-compilation
105295         * modules/rmdir-errno (Status, Notice): Now obsolete.
105297         rmdir: work around cygwin 1.5.x and mingw bugs
105298         * m4/rmdir.m4 (gl_FUNC_RMDIR): Detect the bugs.
105299         * lib/rmdir.c (rmdir): Work around it.
105300         * modules/rmdir (Status, Notice): No longer obsolete.
105301         (Files): Add dos.m4.
105302         (Depends-on): Add unistd.
105303         (configure.ac): Set witnesses.
105304         (License): Relax to LGPLv2+.
105305         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Set defaults.
105306         * modules/unistd (Makefile.am): Substitute witnesses.
105307         * lib/unistd.in.h (rmdir): Declare replacement.
105308         * doc/posix-functions/rmdir.texi (rmdir): Document this.
105309         * modules/rmdir-tests: New tests.
105310         * tests/test-rmdir.c: Likewise.
105312 2009-09-15  Eric Blake  <ebb9@byu.net>
105314         fchdir: improve use of replacement functions
105315         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Set appropriate witnesses.
105316         * m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Add REPLACE_FSTAT.
105317         * m4/dirent_h.m4 (gl_DIRENT_H_DEFAULTS): Add REPLACE_OPENDIR,
105318         REPLACE_CLOSEDIR.
105319         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add REPLACE_DUP.
105320         * modules/sys_stat (Makefile.am): Substitute correct witness.
105321         * modules/dirent (Makefile.am): Likewise.
105322         * modules/unistd (Makefile.am): Likewise.
105323         * lib/dirent.in.h (opendir, closedir): Use better witnesses.
105324         * lib/unistd.in.h (dup): Likewise.
105325         * lib/sys_stat.in.h (fstat): Likewise.
105327         maint: ignore gnulib-tool temp files
105328         * .gitignore: Ignore files created during gnulib-tool --test.
105330 2009-09-13  Jim Meyering  <meyering@redhat.com>
105332         posixtm: don't reject a time that specify "60" as the number of seconds
105333         * lib/posixtm.c (posixtime): The code to reject invalid dates
105334         would also reject a time specified with the .60 suffix.
105335         But POSIX allows that, in order to accommodate leap seconds.
105336         So don't reject it.
105337         (main): Adjust tests accordingly.
105338         * modules/posixtm (Depends-on): Add stpcpy.
105340 2009-09-11  Jim Meyering  <meyering@redhat.com>
105342         announce-gen: include [$release_type] in emitted Subject:
105343         * build-aux/announce-gen (get_tool_versions): Include [$release_type],
105344         e.g., [stable] in the emitted Subject: line.
105346 2009-09-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
105348         Remove obsolete macros from several modules.
105349         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Replace
105350         obsolete Autoconf macros with their modern counterparts.
105351         * m4/check-math-lib.m4 (gl_CHECK_MATH_LIB): Likewise.
105352         * m4/gc-camellia.m4 (gl_GC_CAMELLIA): Likewise.
105353         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Likewise.
105354         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): Likewise.
105355         * m4/gethostname.m4 (gl_FUNC_GETHOSTNAME): Likewise.
105356         * m4/getline.m4 (gl_FUNC_GETLINE): Likewise.
105357         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Likewise.
105358         * m4/isfinite.m4 (gl_ISFINITEL_WORKS): Likewise.
105359         * m4/poll.m4 (gl_FUNC_POLL): Likewise.
105360         * m4/readline.m4 (gl_FUNC_READLINE): Likewise.
105361         * m4/round.m4 (gl_FUNC_ROUND): Likewise.
105362         * m4/roundf.m4 (gl_FUNC_ROUNDF): Likewise.
105363         * m4/select.m4 (gl_FUNC_SELECT): Likewise.
105364         * m4/sockets.m4 (gl_SOCKETS): Likewise.
105365         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Likewise.
105366         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Likewise.
105367         * m4/sysexits.m4 (gl_SYSEXITS): Likewise.
105368         * m4/time_r.m4 (gl_TIME_R): Likewise.
105369         * m4/tsearch.m4 (gl_FUNC_TSEARCH): Likewise.
105370         * m4/vararrays.m4 (AC_C_VARARRAYS): Likewise.
105371         * m4/wctype.m4 (gl_WCTYPE_H): Likewise.
105373         Fix copyright header in build-aux scripts.
105374         * build-aux/git-version-gen: Fix copyright header to match GPLv3
105375         recommendation.
105376         * build-aux/ncftpput-ftp: Likewise.
105377         * build-aux/update-copyright: Likewise.
105379 2009-09-09  Eric Blake  <ebb9@byu.net>
105381         test-link: allow Linux choice of errno
105382         * tests/test-link.c (main): Relax test for alternate error.
105384         strndup: fix improper m4 caching
105385         * m4/strndup.m4 (gl_FUNC_STRNDUP): Rework to avoid side effects
105386         inside AC_CACHE_CHECK.  Use REPLACE_STRNDUP, not HAVE_STRNDUP.
105387         (gl_PREREQ_STRNDUP): Delete.
105388         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Update default.
105389         * modules/string (Makefile.am): Substitute it.
105390         * lib/string.in.h (strndup): Modernize prototype.
105392         getcwd: port to mingw
105393         * m4/getcwd.m4 (gl_FUNC_GETCWD): Mingw directories are very
105394         different from the POSIX assumptions made throughout the getcwd
105395         module; fortunately, the mingw getcwd does not need replacement.
105396         (gl_FUNC_GETCWD_NULL): Skip test on mingw.
105397         * modules/getcwd-tests: New test.
105398         * tests/test-getcwd.c: Likewise.
105400         link: fix platform bugs
105401         * m4/link.m4 (gl_FUNC_LINK): Detect Solaris and Cygwin bugs.
105402         * lib/link.c (link): Work around them.  Fix related mingw bug.
105403         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add REPLACE_LINK.
105404         * modules/unistd (Makefile.am): Substitute it.
105405         * lib/unistd.in.h (link): Declare replacement.
105406         * doc/posix-functions/link.texi (link): Document this.
105407         * modules/link (Depends-on): Add strdup-posix, sys_stat.
105409         test-link: consolidate into single C program, test more cases
105410         * tests/test-link.sh: Delete.
105411         * tests/test-link.c: Test more error conditions.  Exposes bugs on
105412         at least Cygwin and Solaris.
105413         * modules/link-tests (Files): Remove unused file.
105414         (Depends-on): Add errno, sys_stat.
105415         (Makefile.am): Simplify.
105417 2009-09-08  Bruno Haible  <bruno@clisp.org>
105419         Work around towlower, towupper bug on mingw.
105420         * lib/wctype.in.h (towlower, towupper) [__MINGW32__]: New replacements.
105421         * m4/wctype.m4 (gl_WCTYPE_H): Replace <wctype.h> also on mingw.
105422         * doc/posix-functions/towlower.texi: Mention the mingw bug.
105423         * doc/posix-functions/towupper.texi: Likewise.
105424         Reported by Eric Blake.
105426 2009-09-08  Jim Meyering  <meyering@redhat.com>
105428         build: don't try to run autoheader if we don't use it
105429         * build-aux/bootstrap: Define AUTOHEADER=true when AC_CONFIG_HEADERS
105430         is not used in configure.ac.
105432 2009-09-08  Eric Blake  <ebb9@byu.net>
105434         euidaccess: fix compilation error
105435         * lib/euidaccess.c (includes): Add <fcntl.h>, for AT_EACCESS.
105437         rawmemchr: relax license
105438         * modules/rawmemchr (License): Derived from glibc, so LGPLv2+ is
105439         okay.
105440         Reported by Jim Meyering.
105442         mkfifoat: new module
105443         * modules/mkfifoat: New file.
105444         * lib/mkfifoat.c: Likewise.
105445         * m4/mkfifoat.m4 (gl_FUNC_MKFIFOAT): Likewise.
105446         * m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Add witnesses.
105447         * modules/sys_stat (Makefile.am): Use them.
105448         * lib/sys_stat.in.h (mkfifoat, mknodat): Declare them.
105449         * MODULES.html.sh (File system functions): Mention module.
105450         * doc/posix-functions/mkfifoat.texi (mkfifoat): Likewise.
105451         * doc/posix-functions/mknodat.texi (mknodat): Likewise.
105452         * modules/mkfifoat-tests: New test.
105453         * tests/test-mkfifoat.c: Likewise.
105455         strchrnul: relax license
105456         * modules/strchrnul (License): Derived from glibc, so LGPLv2+ is
105457         okay.
105458         Reported by Jim Meyering.
105460 2009-09-08  Eric Blake  <ebb9@byu.net>
105462         fstatat: fix compilation on Solaris
105463         * lib/fstatat.c (includes): Add fcntl.h.
105464         Reported by Pádraig Brady.
105466 2009-09-07  Eric Blake  <ebb9@byu.net>
105468         rename: modernize replacement
105469         * modules/rename (Depends-on): Add stdio.
105470         (configure.ac): Declare witness.
105471         * m4/rename.m4 (gl_FUNC_RENAME): Ensure dependency order, and let
105472         stdio take care of replacement.
105473         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Add new defaults.
105474         * modules/stdio (Makefile.am): Substitute them.
105475         * lib/stdio.in.h (rename): Declare replacement.
105476         * lib/rename.c (includes): Allow cross-compilation to non-windows
105477         machines.
105478         * doc/posix-functions/rename.texi (rename): Improve
105479         documentation.
105481         stdio: sort witness names
105482         * modules/stdio (Makefile.am): Sort replacements.
105483         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Likewise.
105484         * lib/stdio.in.h: Likewise.
105486         getcwd: minor cleanups
105487         * lib/getcwd.c (AT_FDCWD): Delete; rely on <fcntl.h> instead.
105488         (is_ENAMETOOLONG): Delete; ENAMETOOLONG is portable.
105490         openat: provide more convenience names
105491         * modules/faccessat (configure.ac): Add C witness.
105492         * lib/unistd.in.h (readlinkat): Fix typo.
105493         * lib/openat.h (statat, lstatat, accessat, euidaccessat): New
105494         convenience wrappers.
105495         * top/maint.mk (sc_prohibit_openat_without_use): Allow these
105496         wrappers in syntax checks.
105498 2009-09-06  Eric Blake  <ebb9@byu.net>
105500         doc: fix comments in recent patches
105501         * lib/faccessat.c: Mention correct function.
105502         * lib/fchmodat.c: Likewise.
105503         * lib/fchownat.c: Likewise.
105504         * lib/symlinkat.c: Likewise.
105505         * doc/posix-headers/fcntl.texi (fcntl.h): Cygwin 1.7 has AT_*
105506         constants.
105508         faccessat, symlinkat: continue cleanup of previous patch
105509         * m4/symlinkat.m4 (gl_FUNC_SYMLINKAT): Ensure dependency order.
105510         * m4/faccessat.m4 (gl_FUNC_FACCESSAT): Likewise.
105511         * modules/unistd (Makefile.am): Substitute GNULIB_READLINKAT.
105512         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Offer GNULIB_READLINKAT.
105513         * modules/symlinkat (configure.ac): Set GNULIB_READLINKAT.
105514         * lib/unistd.in.h (readlinkat): Declare if GNULIB_READLINKAT is
105515         set.
105517 2009-09-06  Bruno Haible  <bruno@clisp.org>
105519         * lib/sys_stat.in.h (fchmodat): Declare if GNULIB_FCHMODAT is set.
105520         (fstatat): Declare if GNULIB_FSTATAT is set.
105521         (mkdirat): Declare if GNULIB_MKDIRAT is set.
105522         * lib/unistd.in.h (fchownat): Declare if GNULIB_FCHOWNAT is set.
105523         (unlinkat): Declare if GNULIB_UNLINKAT is set.
105524         * modules/fcntl-h (Files): Remove m4/openat.m4.
105525         * modules/sys_stat (Files): Remove m4/openat.m4.
105526         (Makefile.am): Substitute GNULIB_FCHMODAT, GNULIB_FSTATAT,
105527         GNULIB_MKDIRAT instead of GNULIB_OPENAT.
105528         * modules/unistd (Files): Remove m4/openat.m4.
105529         (Makefile.am): Substitute GNULIB_FCHOWNAT, GNULIB_UNLINKAT instead of
105530         GNULIB_OPENAT.
105531         * m4/fcntl_h.m4 (gl_FCNTL_H_DEFAULTS): Initialize GNULIB_OPENAT,
105532         HAVE_OPENAT here. Don't require gl_OPENAT_DEFAULTS.
105533         * m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Initialize
105534         GNULIB_FCHMODAT, GNULIB_FSTATAT, GNULIB_MKDIRAT, HAVE_FCHMODAT,
105535         HAVE_FSTATAT, HAVE_MKDIRAT, REPLACE_FSTATAT here. Don't require
105536         gl_OPENAT_DEFAULTS.
105537         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_FCHOWNAT,
105538         GNULIB_UNLINKAT, HAVE_FCHOWNAT, HAVE_UNLINKAT, REPLACE_FCHOWNAT here.
105539         Don't require gl_OPENAT_DEFAULTS.
105540         * m4/openat.m4 (gl_FUNC_OPENAT): Require gl_FCNTL_H_DEFAULTS,
105541         gl_SYS_STAT_H_DEFAULTS, gl_UNISTD_H_DEFAULTS. Set GNULIB_FCHMODAT,
105542         GNULIB_FSTATAT, GNULIB_MKDIRAT, GNULIB_FCHOWNAT, GNULIB_UNLINKAT.
105543         (gl_OPENAT_DEFAULTS): Remove macro.
105545 2009-09-06  Bruno Haible  <bruno@clisp.org>
105547         * modules/openat (configure.ac): Remove unneeded witness.
105549 2009-09-06  Bruno Haible  <bruno@clisp.org>
105551         Set errno to ENOSYS when a function is entirely unsupported.
105552         * lib/chown.c (rpl_chown) [!HAVE_CHOWN]: Set errno to ENOSYS instead of
105553         EOPNOTSUPP.
105554         * lib/lchown.c (lchown) [!HAVE_CHOWN]: Likewise.
105555         * modules/chown (Depends-on): Remove errno.
105557 2009-09-06  Bruno Haible  <bruno@clisp.org>
105559         * doc/posix-headers/fcntl.texi (AT_*): Mention affected platforms.
105561 2009-09-06  Bruno Haible  <bruno@clisp.org>
105563         * lib/sys_stat.in.h: Fix preprocessor command indentation.
105565 2009-09-06  Ben Pfaff  <blp@gnu.org>
105566             Bruno Haible  <bruno@clisp.org>
105568         Work around a glibc bug in strtok_r.
105569         * lib/string.in.h (strtok_r): Replace if REPLACE_STRTOK_R is set.
105570         Undefine if UNDEFINE_STRTOK_R is set.
105571         * lib/strtok_r.c (strtok_r, __strtok_r) [!_LIBC]: Don't undefine.
105572         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
105573         REPLACE_STRTOK_R and UNDEFINE_STRTOK_R.
105574         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Check against the glibc bug.
105575         * modules/string (Makefile.am): Substitute REPLACE_STRTOK_R,
105576         UNDEFINE_STRTOK_R.
105577         * doc/posix-functions/strtok_r.texi: Mention the glibc 2.7 bug.
105579 2009-09-06  Sergey Poznyakoff  <gray@gnu.org.ua>
105581         exclude: minor fix
105582         * lib/exclude.c: Include wctype.h
105584 2009-09-06  Akim Demaille  <demaille@gostai.com>
105586         bootstrap: improve error message
105587         * build-aux/bootstrap (find_tool): Upon failure, report the list
105588         of candidates.
105589         Honor the initial value of the envvar.
105591 2009-09-05  Eric Blake  <ebb9@byu.net>
105593         symlinkat: new module
105594         * modules/symlinkat: New file.
105595         * lib/symlinkat.c: Likewise.
105596         * m4/symlinkat.m4 (gl_FUNC_SYMLINKAT): Likewise.
105597         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add witnesses.
105598         * modules/unistd (Makefile.am): Use them.
105599         * lib/unistd.in.h (symlinkat, readlinkat): Declare them.
105600         (faccessat) [GNULIB_POSIXCHECK]: Fix typo.
105601         * lib/at-func.c (FUNC_RESULT): New macro, defaulting to int.
105602         * MODULES.html.sh (File system functions): Mention module.
105603         * doc/posix-functions/symlinkat.texi (symlinkat): Likewise.
105604         * doc/posix-functions/readlinkat.texi (readlinkat): Likewise.
105605         * modules/symlinkat-tests: New test.
105606         * tests/test-symlinkat.c: Likewise.
105608         test-openat-safer: add more checks
105609         * tests/test-openat-safer.c (main): Check more code paths.
105611 2009-09-05  Jim Meyering  <meyering@redhat.com>
105613         syntax-check: detect unnecessary inclusion of openat.h
105614         * top/maint.mk (sc_prohibit_openat_without_use): New rule.
105616 2009-09-05  Bruno Haible  <bruno@clisp.org>
105618         Support towlower, towupper.
105619         * doc/posix-functions/towlower.texi: Mention module wctype.
105620         * doc/posix-functions/towupper.texi: Likewise.
105621         * lib/wctype.in.h (towlower, towupper): New functions.
105622         * tests/test-wctype.c: Include stdio.h, stdlib.h.
105623         (ASSERT): New macro.
105624         (e): New variable.
105625         (main): Test also towlower, towupper. Test WEOF argument.
105626         Reported by Alan Hourihane <alanh@fairlite.co.uk>.
105628 2009-09-05  Bruno Haible  <bruno@clisp.org>
105630         Fix conversion behaviour when the input is invalid.
105631         * lib/striconveh.c (mem_cd_iconveh_internal): Fix storing of question
105632         mark occurring in first pass of indirect conversion.
105633         * tests/test-striconveh.c (main): Test conversion of invalid ASCII
105634         input.
105635         Found by clang's static analyzer.
105637 2009-09-05  Bruno Haible  <bruno@clisp.org>
105639         * tests/test-striconveh.c (main): Test indirect conversion on platforms
105640         where direct conversion is possible.
105642 2009-09-04  Eric Blake  <ebb9@byu.net>
105644         openat: fail with ENOENT on empty name
105645         * lib/openat-proc.c (openat_proc_name): Special-case the empty
105646         buffer.
105648         link-follow: fix logic bug in prior patch
105649         * m4/link-follow.m4 (gl_FUNC_LINK_FOLLOWS_SYMLINK): Fix bug that
105650         reversed sense of yes and no in prior patch.  Avoid confusing
105651         compilation failure with desired semantics.
105653         link-follow: accommodate mingw and cross-compilation
105654         * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Rename...
105655         (gl_FUNC_LINK_FOLLOWS_SYMLINK): ...to this.  Change
105656         cross-compilation results to -1, to make linkat easier to
105657         implement when cross-compiling.  Trivially support mingw.
105658         * modules/link-follow (configure.ac): Call new name.
105659         * NEWS: Mention this.
105661 2009-09-03  Eric Blake  <ebb9@byu.net>
105663         faccessat: compile replacement
105664         * m4/faccessat.m4 (gl_FUNC_FACCESSAT): Build replacement when
105665         needed.
105667         fts: fix compilation error
105668         * lib/fts.c (includes): Re-add "openat.h", for
105669         openat_needs_fchdir.
105671         faccessat: new module
105672         * modules/faccessat: New file.
105673         * lib/faccessat.c: Likewise.
105674         * m4/faccessat.m4 (gl_FUNC_FACCESSAT): Likewise.
105675         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add witness.
105676         * modules/unistd (Makefile.am): Use it.
105677         * lib/unistd.in.h (faccessat): Declare it.
105678         (F_OK, X_OK, W_OK, R_OK): Provide definitions.
105679         * lib/fcntl.in.h (AT_SYMLINK_FOLLOW, AT_EACCESS): Likewise.
105680         * MODULES.html.sh (File system functions): Mention it.
105681         * doc/posix-functions/faccessat.texi (faccessat): Likewise.
105682         * doc/posix-headers/fcntl.texi (fcntl.h): Likewise.
105684         euidaccess: prefer POSIX over non-standard implementation
105685         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Check for faccessat.
105686         * lib/euidaccess.c (euidaccess): Use it if available.
105688         openat: make template easier to use
105689         * lib/at-func.c (CALL_FUNC): Allow AT_FUNC_USE_F1_COND and
105690         AT_FUNC_F2 to be undefined.
105691         (VALIDATE_FLAG): New macro; use it to reject bad flags.
105692         (AT_FUNC_USE_F1_COND): Change sense to just flag bit.
105693         * lib/fchmodat.c (AT_FUNC_USE_F1_COND): Adjust.
105694         * lib/fchownat.c (AT_FUNC_USE_F1_COND): Likewise.
105695         * lib/openat.c (AT_FUNC_USE_F1_COND) [fstatat, unlinkat]:
105696         Likewise.
105697         * lib/mkdirat.c (AT_FUNC_F2, AT_FUNC_USE_F1_COND): Delete.
105698         * lib/selinux-at.c (AT_FUNC_F2, AT_FUNC_USE_F1_COND)
105699         [getfileconat, lgetfileconat, setfileconat, lsetfileconat]:
105700         Likewise.
105702         openat: declare in POSIX headers
105703         * NEWS: Mention this.
105704         * modules/openat (configure.ac): Declare witnesses.
105705         (Depends-on): Add fcntl-h, sys_stat, unistd.
105706         (Include): Mention correct headers.
105707         * modules/fcntl-h (Depends-on): Add link-warning.
105708         (Files): Add openat.m4.
105709         (Makefile.am): Substitute witnesses.
105710         * modules/sys_stat (Files, Makefile.am): Likewise.
105711         * modules/unistd (Files, Makefile.am): Likewise.
105712         * m4/openat.m4 (gl_FUNC_OPENAT, gl_FUNC_FCHOWNAT): Set witnesses.
105713         (gl_OPENAT_DEFAULTS): New macro.
105714         * m4/fcntl_h.m4 (gl_FCNTL_H_DEFAULTS): Use it.
105715         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Likewise.
105716         * m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Likewise.
105717         (SYS_STAT_H): Remove unused variable.
105718         * doc/posix-headers/fcntl.texi (fcntl.h): Update content.
105719         * lib/fcntl--.h (includes): Remove unneeded header.
105720         * lib/openat-safer.c (includes): Likewise.
105721         * lib/openat.h (AT_FDCWD, AT_SYMLINK_NOFOLLOW, AT_REMOVEDIR)
105722         (openat, fstatat, unlinkat, mkdirat, fchmodat, fchownat): Move to
105723         appropriate headers.
105724         (__OPENAT_PREFIX): Delete.
105725         * lib/fcntl.in.h (openat): Provide declaration.
105726         (AT_FDCWD): Fix Solaris bug.
105727         (AT_SYMLINK_NOFOLLOW, AT_REMOVEDIR): Provide macros.
105728         * lib/sys_stat.in.h (fstatat, mkdirat): Provide declaration.
105729         * lib/fchmodat.c (includes):  Adjust to find declaration.
105730         * lib/fchownat.c (includes): Likewise.
105731         * lib/mkdirat.c (includes): Likewise.
105732         * lib/fstatat.c (includes): Likewise.  Ensure original fstatat is
105733         still visible.
105735 2009-09-02  Eric Blake  <ebb9@byu.net>
105737         errno: use consistently
105738         * lib/c-stack.c (ENOTSUP): <errno.h> guarantees a definition.
105739         * lib/canonicalize-lgpl.c (ENAMETOOLONG): Likewise.
105740         * lib/canonicalize.c (ELOOP): Likewise.
105741         * lib/inet_ntop.c (EAFNOSUPPORT): Likewise.
105742         * lib/inet_pton.c (EAFNOSUPPORT): Likewise.
105743         * lib/lchown.c (EOPNOTSUPP): Likewise.
105744         * lib/openat-priv.h (ENOSYS, EOPNOTSUPP): Likewise.
105745         * lib/savewd.c (ESTALE): Likewise.
105746         * lib/settime.c (ENOSYS): Likewise.
105747         * lib/utimens.c (ENOSYS): Likewise.
105748         * lib/xgethostname.c (ENAMETOOLONG): Likewise.
105749         * lib/chdir-safer.c (ELOOP): Likewise.
105750         (chdir_no_follow): Use HAVE_READLINK, not ELOOP, as witness.
105751         * modules/c-stack (Depends-on): Add errno.
105752         * modules/canonicalize (Depends-on): Likewise.
105753         * modules/chdir-safer (Depends-on): Likewise.
105754         * modules/fdopendir (Depends-on): Likewise.
105755         * modules/inet_ntop (Depends-on): Likewise.
105756         * modules/inet_pton (Depends-on): Likewise.
105757         * modules/lchown (Depends-on): Likewise.
105758         * modules/openat (Depends-on): Likewise.
105759         * modules/savewd (Depends-on): Likewise.
105760         * modules/settime (Depends-on): Likewise.
105761         * m4/chdir-safer.m4 (gl_CHDIR_SAFER): Check for readlink.
105763         fts: avoid leaking fds
105764         * modules/fts (Depends-on): Add cloexec.
105765         * lib/fts.c (opendirat, diropen, fts_build): Set close-on-exec
105766         flag.
105768         fts: make directory fds more robust
105769         * lib/fts.c (O_DIRECTORY): Let <fcntl.h> take care of this.
105770         (opendirat): Specify O_DIRECTORY, and add fallbacks for safety.
105772         backupfile, chdir-long, fts, savedir: make safer
105773         * lib/backupfile.c (includes): Use "dirent--.h", since
105774         numbered_backup can write to stderr during readdir.
105775         * lib/savedir.c (includes): Likewise.
105776         * lib/chdir-long.c (includes): Use "fcntl--.h", since openat
105777         emulation can write to stderr on failure.
105778         * lib/fts.c (includes) [!_LIBC]: Likewise for opendir and openat.
105779         * lib/getcwd.c: Document why opendir_safer is unused.
105780         * lib/glob.c: Likewise.
105781         * lib/scandir.c: Likewise.
105782         * lib/openat-proc.c: Likewise, for open_safer.
105783         * modules/backupfile (Depends-on): Add dirent-safer.
105784         * modules/savedir (Depends-on): Likewise.
105785         * modules/fts (Depends-on): Add dirent-safer and openat-safer.
105786         * modules/chdir-long (Depends-on): Add openat-safer.
105788         openat-safer: new module
105789         * modules/openat-safer: New file.
105790         * lib/openat-safer.c: Likewise.
105791         * m4/fcntl-safer.m4 (gl_OPENAT_SAFER): New macro.
105792         * lib/fcntl-safer.h (openat_safer): Declare.
105793         * lib/fcntl--.h (openat): Override.
105794         * MODULES.html.sh (File descriptor based I/O): Mention it.
105795         * lib/openat.h: Add double-inclusion guards.
105796         * lib/openat.c (includes): Only include "fcntl-safer.h", not
105797         "fcntl--.h", so we can implement openat.
105798         * modules/openat-safer-tests: New test.
105799         * tests/test-openat-safer.c: New file.
105801         dirent-safer: new module
105802         * modules/dirent-safer: New file.
105803         * lib/dirent--.h: Likewise.
105804         * lib/dirent-safer.h: Likewise.
105805         * lib/opendir-safer.c: Likewise.
105806         * m4/dirent-safer.m4: Likewise.
105807         * MODULES.html.sh (Enhancements for POSIX:2008): Mention it.
105808         * modules/dirent-safer-tests: New test.
105809         * tests/test-dirent-safer.c: New file.
105810         * lib/fdopendir.c (includes): Ensure fdopendir is also safe.
105812         fdopendir: optimize on mingw
105813         * lib/unistd.in.h (_gl_directory_name): New prototype.
105814         * lib/fchdir.c (_gl_directory_name): Implement it.
105815         (fchdir): Use it to simplify implementation.
105816         * lib/fdopendir.c (fdopendir) [REPLACE_FCHDIR]: Use metadata from
105817         fchdir, when available, to avoid calling [f]chdir().
105819         fdopendir: split into its own module
105820         * lib/openat.c (fdopendir): Move...
105821         * lib/fdopendir.c: ...into new file.
105822         * modules/fdopendir: New module.
105823         * m4/fdopendir.m4 (gl_FUNC_FDOPENDIR): New file.
105824         * modules/openat (Depends-on): Add fdopendir.
105825         * m4/openat.m4 (gl_FUNC_OPENAT): No longer need to check for
105826         fdopendir here.
105827         * modules/savedir (Depends-on): Only need fdopendir, not full
105828         openat.
105829         * lib/savedir.c (include): Use <dirent.h>, not "openat.h".
105830         * lib/openat.h (fdopendir): Drop prototype.
105831         * lib/dirent.in.h (fdopendir): Provide prototype.
105832         * m4/dirent_h.m4 (gl_DIRENT_H_DEFAULTS): Add replacements.
105833         * modules/dirent (Makefile.am): Substitute them.
105834         * MODULES.html.sh (File system functions): Mention it.
105835         * doc/posix-functions/fdopendir.texi (fdopendir): Likewise.
105836         * modules/fdopendir-tests: New file.
105837         * tests/test-fdopendir.c: Likewise.
105839         fchdir: use more consistent macro convention
105840         * lib/fcntl.in.h (_gl_register_fd): Move declaration to unistd.
105841         * lib/sys_stat.in.h (rpl_fstat): Declare via make-time
105842         REPLACE_FCHDIR, rather than relying on config.h macros.
105843         * lib/unistd.in.h (fchdir): Move all fchdir internal declarations
105844         inside a single make-time REPLACE_FCHDIR block, rather than using
105845         the config.h FCHDIR_REPLACEMENT.
105846         * m4/fchdir.m4 (gl_FUNC_FCHDIR): REPLACE_FCHDIR was already
105847         AC_SUBST'd, also AC_DEFINE it.  Don't define FCHDIR_REPLACEMENT.
105848         Manage fstat replacement.
105849         * m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Pick up
105850         REPLACE_FCHDIR.
105851         * modules/sys_stat (Files): Add m4/unistd_h.m4.
105852         (Makefile.am): Substitute REPLACE_FCHDIR.
105853         * lib/close.c (rpl_close): Use REPLACE_FCHDIR, not
105854         FCHDIR_REPLACEMENT.
105855         * lib/dup-safer.c (dup_safer): Likewise.
105856         * lib/dup2.c (rpl_dup2): Likewise.
105857         * lib/dup3.c (rpl_dup3): Likewise.
105858         * lib/open.c (rpl_open): Likewise.
105860         fchdir: simplify error handling, and support dup3
105861         * modules/fchdir (Depends-on): Use strdup-posix, not strdup.  Add
105862         stdbool, malloc-posix, realloc-posix.
105863         * lib/fchdir.c (struct dir_info_t): Delete saved_errno.
105864         (ensure_dirs_slot): Return false on allocation failure.
105865         (rpl_dup2): Delete.
105866         (_gl_register_dup): New function.
105867         (_gl_unregister_fd, rpl_opendir, rpl_dup): Update callers.
105868         (_gl_register_fd): Close fd on allocation failure.
105869         * lib/fcntl.in.h (_gl_register_fd): Update signature.
105870         * lib/unistd.in.h (_gl_register_dup) [FCHDIR_REPLACEMENT]: New
105871         prototype.
105872         (rpl_dup2_fchdir): Delete prototype.
105873         * lib/open.c (open): Update caller.
105874         * lib/dup2.c (dup2): Track fchdir metadata.
105875         * lib/dup3.c (dup3): Likewise.
105876         * m4/dup2.m4 (gl_REPLACE_DUP2): New macro.
105877         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Use it.
105879 2009-09-02  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
105881         * gnulib-tool (func_create_testdir, func_create_megatestdir): Use
105882         AC_CONFIG_HEADERS instead of AM_CONFIG_HEADER. Use AC_CONFIG_FILES and
105883         don't pass arguments to AC_OUTPUT.
105885 2009-09-02  Bruno Haible  <bruno@clisp.org>
105887         * modules/mkdtemp (License): Relicense under LGPLv2+.
105888         Reported by Paolo Bonzini.
105890 2009-09-02  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
105892         Replace uses of obsolete autoconf macros in Jim's modules.
105893         The Autoconf macros AC_TRY_CPP, AC_TRY_COMPILE, AC_TRY_LINK and
105894         AC_TRY_RUN have been obsolete since Autoconf 2.55, and each use
105895         can evoke a warning from autoconf when run with -Wobsolete
105896         enabled.  They were declared obsolete for good reasons (see
105897         the `AC_FOO_IFELSE vs AC_TRY_FOO' node in the Autoconf manual,
105898         recently renamed to `AC_ACT_IFELSE vs AC_TRY_ACT'), and we
105899         should not continue using the deprecated macros.
105900         * m4/d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Replace
105901         obsolete Autoconf macros with modern counterparts.
105902         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
105903         * m4/dos.m4 (gl_AC_DOS): Likewise.
105904         * m4/fpending.m4 (gl_FUNC_FPENDING): Likewise.
105905         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Likewise.
105906         * m4/getloadavg.m4 (gl_PREREQ_GETLOADAVG): Likewise.
105907         * m4/jm-winsz1.m4 (gl_WINSIZE_IN_PTEM): Likewise.
105908         * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Likewise.
105909         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Likewise.
105910         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Likewise.
105911         * m4/mode_t.m4 (gl_PROMOTED_TYPE_MODE_T): Likewise.
105912         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH):
105913         Likewise.
105914         * m4/rename.m4 (gl_FUNC_RENAME): Likewise.
105915         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
105916         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Likewise.
105917         * m4/st_dm_mode.m4 (AC_STRUCT_ST_DM_MODE): Likewise.
105918         * m4/stat-time.m4 (gl_STAT_TIME): Likewise.
105919         * m4/utimes-null.m4 (gl_FUNC_UTIMES_NULL): Likewise.
105921 2009-09-01  Eric Blake  <ebb9@byu.net>
105923         fchdir: fix off-by-one bug in previous patch
105924         * lib/fchdir.c (rpl_fstat): Use correct bounds.
105925         (_gl_unregister_fd): Delete useless if.
105927 2009-09-01  Daniel P. Berrange  <berrange@redhat.com>
105929         maint.mk: sort the list of syntax-check rules
105930         * top/maint.mk (syntax-check-rules): Sort syntax-check rules, so it's
105931         easier to get a sense of progress when the rules are run sequentially
105932         and take a long time.
105934 2009-09-01  Simon Josefsson  <simon@josefsson.org>
105936         * modules/arpa_inet: Use $(MKDIR_P) instead of @MKDIR_P@.
105937         * modules/netinet_in: Likewise.
105938         * modules/sys_file: Likewise.
105939         * modules/sys_ioctl: Likewise.
105940         * modules/sys_select: Likewise.
105941         * modules/sys_socket: Likewise.
105942         * modules/sys_stat: Likewise.
105943         * modules/sys_time: Likewise.
105944         * modules/sys_times: Likewise.
105945         * modules/sys_utsname: Likewise.
105946         * modules/sys_wait: Likewise.
105948 2009-09-01  Jim Meyering  <meyering@redhat.com>
105950         fts: help ensure that return values are not ignored
105951         * lib/fts_.h (__GNUC_PREREQ): Define.
105952         (__attribute_warn_unused_result__): Define.
105953         (fts_children, fts_close, fts_open, fts_read): Declare with
105954         __attribute_warn_unused_result__.
105956         fts: fts_close now fails also when closing a dir file descriptor fails
105957         * lib/fts.c (fts_close): Detect close failure, not just fchdir failure,
105958         and propagate to caller, along with errno.
105960         announce-gen: correct formatting in --help output
105961         * build-aux/announce-gen (usage): Move the one-line description in
105962         --help output "up", to where it belongs, just after Usage:.
105964 2009-08-31  Eric Blake  <ebb9@byu.net>
105966         fchdir: port to mingw
105967         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Check for mingw bug.
105968         * lib/open.c (open) [FCHDIR_REPLACEMENT]: If directories can't be
105969         opened, then use a substitute.
105970         * lib/sys_stat.in.h (fstat) [REPLACE_OPEN_DIRECTORY]: Declare
105971         replacement.
105972         * lib/fchdir.c (fstat) [REPLACE_OPEN_DIRECTORY]: Implement it.
105973         (_gl_register_fd): No need to check stat if open already filters
105974         all directories.
105975         (fchdir): Fix error condition to match POSIX.
105976         * modules/fchdir (Depends-on): Add sys_stat.
105977         * doc/posix-functions/open.texi (open): Document the limitation.
105978         * modules/fchdir-tests: New file.
105979         * tests/test-fchdir.c: Likewise.
105981         canonicalize: allow cross-testing from cygwin to mingw
105982         * modules/canonicalize-tests (configure.ac): Define HAVE_SYMLINK.
105983         (Makefile.am): Pass it through TESTS_ENVIRONMENT.
105984         * modules/canonicalize-lgpl-tests (configure.ac, Makefile.am):
105985         Likewise.
105986         * tests/test-canonicalize.sh: Also skip test if 'ln -s' works, but
105987         target does not support symlinks.
105988         * tests/test-canonicalize-lgpl.sh: Likewise.
105990         chown: avoid compilation warning on mingw
105991         * m4/chown.m4 (gl_FUNC_CHOWN): Recognize missing chown.
105992         * lib/chown.c (rpl_chown) [!HAVE_CHOWN]: Always return failure on
105993         mingw.
105994         * lib/lchown.c (lchown) [!HAVE_CHOWN]: Likewise.
105995         * modules/chown (Depends-on): Add errno.
105997 2009-08-31  Stefano Lattarini  <stefano.lattarini@gmail.com>  (tiny change)
105999         * gnulib-tool: Fix test whether $CONFIG_SHELL has a working 'echo'
106000         command.
106002 2009-08-31  Jim Meyering  <meyering@redhat.com>
106004         canonicalize: remove useless initialization
106005         * lib/canonicalize.c (canonicalize_filename_mode): Remove useless
106006         initialization of local, "end".
106008 2009-08-30  Bruno Haible  <bruno@clisp.org>
106010         Fix an unnecessary error on Solaris 10 on NFSv3 file systems.
106011         * lib/set-mode-acl.c (qset_acl) [Solaris 10 new]: Treat EOPNOTSUPP like
106012         ENOSYS.
106014 2009-08-30  Bruno Haible  <bruno@clisp.org>
106016         * tests/test-pipe-filter-ii1.sh: Prefer /usr/xpg6/bin/tr over
106017         /usr/xpg4/bin/tr when it exists.
106018         * tests/test-pipe-filter-gi1.sh: Likewise.
106020 2009-08-30  Bruno Haible  <bruno@clisp.org>
106022         Work around deficient /usr/bin/id program on Solaris.
106023         * tests/test-file-has-acl.sh (ID): New variable.
106024         * tests/test-set-mode-acl.sh (ID): Likewise.
106025         * tests/test-copy-acl.sh (ID): Likewise.
106026         * tests/test-copy-file.sh (ID): Likewise.
106028 2009-08-30  Bruno Haible  <bruno@clisp.org>
106030         New module 'xstriconveh'.
106031         * lib/xstriconveh.h: New file.
106032         * lib/xstriconveh.c: New file.
106033         * modules/xstriconveh: New file.
106035 2009-08-30  Bruno Haible  <bruno@clisp.org>
106037         Make it easier to use mem_cd_iconveh.
106038         * lib/striconveh.h (iconveh_t): New type.
106039         (iconveh_open, iconveh_close): New declarations.
106040         (mem_cd_iconveh, str_cd_iconveh): Replace the three iconv_t arguments
106041         with a single 'const iconveh_t *' argument.
106042         * lib/striconveh.c (iconveh_open, iconveh_close): New functions.
106043         (mem_cd_iconveh, str_cd_iconveh): Replace the three iconv_t arguments
106044         with a single 'const iconveh_t *' argument.
106045         (mem_iconveh, str_iconveh): Use iconveh_open, iconveh_close.
106046         * tests/test-striconveh.c (main): Update.
106047         * NEWS: Mention the change.
106049 2009-08-30  Bruno Haible  <bruno@clisp.org>
106051         * doc/posix-functions/iconv_open.texi: Mention indirect conversion
106052         problem.
106054 2009-08-30  Bruno Haible  <bruno@clisp.org>
106056         Work around iconv_open problem on Solaris.
106057         * lib/iconv_open-solaris.gperf: New file.
106058         * lib/iconv_open.c (ICONV_FLAVOR_SOLARIS): New macro.
106059         * m4/iconv_open.m4 (gl_FUNC_ICONV_OPEN): Also handle Solaris.
106060         * modules/iconv_open (Files): Add lib/iconv_open-solaris.gperf.
106061         (Makefile.am): Add rule for iconv_open-solaris.h. Augment
106062         BUILT_SOURCES, MOSTLYCLEANFILES, MAINTAINERCLEANFILES, EXTRA_DIST.
106063         * doc/posix-functions/iconv_open.texi: Mention the Solaris problem.
106065 2009-08-29  Jim Meyering  <meyering@redhat.com>
106067         maint.mk: remove more coreutils-specific targets; XZ_OPT=-9ev
106068         * top/maint.mk (cvs-check): Remove target; it was just an alias
106069         to the better-named vc-diff-check.
106070         (maintainer-distcheck): Remove rule.  It was used only from
106071         the (alpha/beta/major) target, and all of its commands but one
106072         were coreutils-specific.
106073         (vc-dist): Remove rule.
106074         (alpha beta major): Run "$(MAKE) distcheck" explicitly.
106075         Run vc-diff-check, not vc-dist.
106076         Run $(MAKE) dist with XZ_OPT=-9ev.  Note spelling, with "-".
106078 2009-08-27  Bruno Haible  <bruno@clisp.org>
106080         * tests/test-bitrotate.c (main): Remove test that uses a shift count
106081         of 0.
106083 2009-08-27  Bruno Haible  <bruno@clisp.org>
106085         * tests/test-func.c (main): Don't verify sizeof __func__ on SunPRO C
106086         compilers.
106087         * doc/func.texi: Document the SunPRO C bug.
106089 2009-08-27  Bruno Haible  <bruno@clisp.org>
106091         Fix link error on Solaris.
106092         * tests/test-parse-duration.c (xstrdup): Remove function.
106094 2009-08-26  Pádraig Brady  <P@draigbrady.com>
106096         ignore-value: handle pointer types, too
106097         * lib/ignore-value.h (__attribute__): Remove definition.
106098         (ignore_value): Remove use of "__attribute__ ((unused))" in favor
106099         of a more concise and more-often effective "(void) i" statement.
106100         (ignore_ptr): New function to suppress warnings from functions that
106101         return pointers, and to make it explicit that one function doesn't
106102         handle all cases.
106104 2009-08-25  Bruno Haible  <bruno@clisp.org>
106106         dup2: work around a Linux bug.
106107         * m4/dup2.m4 (gl_FUNC_DUP2): Test for the Linux bug.
106108         * lib/dup2.c (rpl_dup2): Correct the return value if it is -EBADF.
106109         * doc/posix-functions/dup2.texi: Mention the Linux bug.
106110         Reported by Simon Josefsson.
106112 2009-08-25  Jim Meyering  <meyering@redhat.com>
106114         libguestfs uses gnulib
106115         * users.txt: Add libguestfs.
106117 2009-08-24  Eric Blake  <ebb9@byu.net>
106119         dup2, pipe2: fix some recent test failures on cygwin 1.5.x
106120         * lib/pipe2.c (includes): Add binary-io.h.
106121         * lib/dup2.c (rpl_dup2): Correct buggy errno value.
106123 2009-08-24  Bruno Haible  <bruno@clisp.org>
106125         Tolerate declared but missing accept4 syscall.
106126         * lib/accept4.c (accept4): Invoke original accept4 function first, if
106127         available.
106128         * lib/sys_socket.in.h (accept4): If the function is already present,
106129         override it.
106130         * m4/accept4.m4 (gl_FUNC_ACCEPT4): Remove AC_LIBOBJ invocation.
106131         * modules/accept4 (Makefile.am): Compile accept4.c always.
106132         Reported by Paolo Bonzini and Eric Blake.
106134 2009-08-23  Bruno Haible  <bruno@clisp.org>
106136         New module 'accept4'.
106137         * lib/sys_socket.in.h (accept4): New declaration.
106138         * lib/accept4.c: New file.
106139         * m4/accept4.m4: New file.
106140         * m4/sys_socket_h.m4 (gl_SYS_SOCKET_H_DEFAULTS): Initialize
106141         GNULIB_ACCEPT4, HAVE_ACCEPT4.
106142         * modules/sys_socket (Makefile.am): Substitute GNULIB_ACCEPT4,
106143         HAVE_ACCEPT4.
106144         * modules/accept4: New file.
106145         * doc/glibc-functions/accept4.texi: Mention the new module.
106147 2009-08-24  Jim Meyering  <meyering@redhat.com>
106149         progname: also set global program_invocation_name, when possible
106150         Before this change, a libtool-enabled program that calls glibc's
106151         error function would report the program name as
106152         "/abs/dir/.libs/lt-program_name" rather than the desired program_name.
106153         * modules/progname (configure.ac): Check for a declaration of
106154         program_invocation_name.
106155         * lib/progname.c:  Include <errno.h>.
106156         (set_program_name) [HAVE_DECL_PROGRAM_INVOCATION_NAME]:
106157         Set program_invocation_name.
106159 2009-08-23  Bruno Haible  <bruno@clisp.org>
106161         * lib/dup3.c: Include <string.h>.
106163 2009-08-23  Bruno Haible  <bruno@clisp.org>
106165         * lib/dup3.c (dup3): Test only once whether the system actually exists.
106166         * lib/pipe2.c (pipe2): Likewise.
106167         Suggested by Eric Blake.
106169 2009-08-23  Bruno Haible  <bruno@clisp.org>
106171         Tolerate declared but missing dup3 syscall.
106172         * lib/dup3.c (dup3): Invoke original dup3 function first, if available.
106173         * lib/unistd.in.h (dup3): If the function is already present,
106174         override it.
106175         * m4/dup3.m4 (gl_FUNC_DUP3): Remove AC_LIBOBJ invocation.
106176         * modules/dup3 (Makefile.am): Compile dup3.c always.
106177         Reported by Paolo Bonzini.
106179 2009-08-23  Bruno Haible  <bruno@clisp.org>
106181         Tolerate declared but missing pipe2 syscall.
106182         * lib/pipe2.c (pipe2): Invoke original pipe2 function first, if
106183         available.
106184         * lib/unistd.in.h (pipe2): If the function is already present,
106185         override it.
106186         * m4/pipe2.m4 (gl_FUNC_PIPE2): Remove AC_LIBOBJ invocation.
106187         * modules/pipe2 (Makefile.am): Compile pipe2.c always.
106188         Reported by Paolo Bonzini.
106190 2009-08-23  Bruno Haible  <bruno@clisp.org>
106192         * lib/pipe2.c (pipe2): Move #ifs inside function.
106194 2009-08-22  Joel E. Denny  <jdenny@clemson.edu>
106196         quotearg: document limitations of quote_these_too
106197         * lib/quotearg.c (quotearg_buffer_restyled): Add comments where
106198         those limitations are created.
106199         * lib/quotearg.h (set_char_quoting): Document that digits and
106200         letters that are special after backslash are not permitted.
106201         (quotearg_char): Cross-reference set_char_quoting documentation.
106203 2009-08-23  Joel E. Denny  <jdenny@clemson.edu>
106205         quotearg: implement custom_quoting_style
106206         * lib/quotearg.c: (struct quoting_options): Add left_quote and
106207         right_quote fields.
106208         (set_custom_quoting): New public function.
106209         (quotearg_buffer_restyled): Add left_quote and right_quote
106210         arguments, handle them very much like locale quoting, and update
106211         all uses.
106212         (quotearg_n_custom): New public function.
106213         (quotearg_n_custom_mem): New public function.
106214         (quotearg_custom): New public function.
106215         (quotearg_custom_mem): New public function.
106216         * lib/quotearg.h: Prototype and document new public functions.
106217         (enum quoting_style): For escape_quoting_style and
106218         clocale_quoting_style, comment that QA_SPLIT_TRIGRAPHS is
106219         ignored even though they're otherwise like c_quoting_style.
106220         Add custom_quoting_style member and document with comparison to
106221         clocale_quoting_style.
106222         * tests/test-quotearg.c (custom_quotes): New array.
106223         (custom_results): New array.
106224         (main): Extend to test custom quoting.
106226 2009-08-22  Joel E. Denny  <jdenny@clemson.edu>
106228         quotearg: fix right quote escaping when it's in quote_these_too
106229         * lib/quotearg.c (quotearg_buffer_restyled): Upon seeing a right
106230         quote, be sure to prepend only one backslash.
106231         * tests/test-quotearg.c (use_quote_double_quotes): New function.
106232         (main): Test it.
106234 2009-08-22  Joel E. Denny  <jdenny@clemson.edu>
106236         quotearg-tests: test escaping of embedded locale quotes
106237         * tests/test-quotearg.c (struct result_strings): Add member for
106238         new input.
106239         (LQ_ENC, RQ_ENC, RQ_ESC): New macros.
106240         (inputs): Add new input.
106241         (results_g): Add expected results.
106242         (flag_results): Likewise.
106243         (locale_results): Likewise.
106244         (compare_strings): Check those.
106246 2009-08-23  Bruno Haible  <bruno@clisp.org>
106248         Tests for module 'dup3'.
106249         * modules/dup3-tests: New file.
106250         * tests/test-dup3.c: New file.
106252         New module 'dup3'.
106253         * lib/unistd.in.h (dup3): New declaration.
106254         * lib/dup3.c: New file.
106255         * m4/dup3.m4: New file.
106256         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_DUP3 and
106257         HAVE_DUP3.
106258         * modules/unistd (Makefile.am): Substitute GNULIB_DUP3 and HAVE_DUP3.
106259         * modules/dup3: New file.
106260         * doc/glibc-functions/dup3.texi: Mention the new module.
106262 2009-08-23  Bruno Haible  <bruno@clisp.org>
106264         Tweak the dup2 test.
106265         * tests/test-dup2.c (main): Create the test file empty. Verify that an
106266         out-of-range fd yields EBADF. Verify that after writing to /dev/null,
106267         the test file is still empty. Fix argument order of lseek.
106269 2009-08-23  Bruno Haible  <bruno@clisp.org>
106271         Avoid test link errors when the modules getopt-gnu, gettext are used.
106272         * modules/getopt-posix-tests (Makefile.am): Define test_getopt_LDADD.
106273         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
106275 2009-08-23  Bruno Haible  <bruno@clisp.org>
106277         Fix getdtablesize() on mingw.
106278         * lib/getdtablesize.c (getdtablesize): Implement differently.
106279         * lib/unistd.in.h (getdtablesize): Improve comment.
106281 2009-08-23  Bruno Haible  <bruno@clisp.org>
106283         New module 'mkostemp'.
106284         Based on Ulrich Drepper's 2007-08-10 change in glibc.
106285         * lib/stdlib.in.h (mksotemp): New declaration.
106286         * lib/mkostemp.c: New file, from glibc with modifications.
106287         * lib/tempname.h (GT_FILE): Remove outdated comment.
106288         (gen_tempname): Add flags argument.
106289         * lib/tempname.c (__GT_BIGFILE): Remove macro.
106290         (__GT_FILE): Map to 1.
106291         (small_open, large_open): Remove macros.
106292         (__gen_tempname): Add flags argument. Remove code for __GT_BIGFILE.
106293         * lib/mkstemp.c (mkstemp): Update.
106294         * lib/mkdtemp.c (mkdtemp): Likewise.
106295         * m4/mkostemp.m4: New file.
106296         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize GNULIB_MKOSTEMP,
106297         HAVE_MKOSTEMP.
106298         * modules/stdlib (Makefile.am): Substitute GNULIB_MKOSTEMP,
106299         HAVE_MKOSTEMP.
106300         * modules/mkostemp: New file, based on modules/mkstemp.
106301         * doc/glibc-functions/mkostemp.texi: Mention the new module.
106302         * NEWS: Mention the change.
106304 2009-08-23  Bruno Haible  <bruno@clisp.org>
106306         * lib/pipe2.c (pipe2): Support O_TEXT, O_BINARY on all platforms.
106307         Reported by Eric Blake.
106309 2009-08-23  Bruno Haible  <bruno@clisp.org>
106311         * lib/pipe2.c (pipe2): Fix test of fcntl's return value.
106312         Reported by Eric Blake.
106314 2009-08-23  Bruno Haible  <bruno@clisp.org>
106316         * modules/fchdir (Depends-on): Use fcntl-h instead of fcntl.
106317         * modules/pipe2 (Depends-on): Likewise.
106319 2009-08-23  Eric Blake  <ebb9@byu.net>
106321         fcntl-h: add O_TTY_INIT support
106322         * lib/fcntl.in.h (O_TTY_INIT): Support another POSIX macro.
106323         * tests/test-fcntl-h.c (o): Test it.
106324         * doc/posix-headers/fcntl.texi (fcntl.h): Update documentation.
106326         fcntl-h: rename from fcntl, in preparation for fcntl(2)
106327         * modules/fcntl: Move <fcntl.h> header replacement...
106328         * modules/fcntl-h: ...to new name, so as not to collide with
106329         like-named function.
106330         * tests/test-fcntl.c: Rename...
106331         * tests/test-fcntl-h.c: ...to this.  Test FD_CLOEXEC.
106332         * modules/fcntl-tests: Rename...
106333         * modules/fcntl-h-tests: ...to this.  Update test file name.
106334         * modules/chdir-long (Depends-on): Update clients.
106335         * modules/chdir-safer (Depends-on): Likewise.
106336         * modules/fcntl-safer (Depends-on): Likewise.
106337         * modules/fts (Depends-on): Likewise.
106338         * modules/mkancesdirs (Depends-on): Likewise.
106339         * modules/mkdir-p (Depends-on): Likewise.
106340         * modules/open (Depends-on): Likewise.
106341         * modules/savewd (Depends-on): Likewise.
106342         * MODULES.html.sh (systems lacking POSIX:2008): Update name.
106343         * doc/posix-headers/fcntl.texi (fcntl.h): Update documentation.
106345 2009-08-22  Bruno Haible  <bruno@clisp.org>
106347         * modules/binary-io (License): Relicense under LGPL.
106348         * modules/pipe2 (License): Likewise.
106350 2009-08-22  Bruno Haible  <bruno@clisp.org>
106352         * lib/pipe-filter-ii.c (pipe_filter_ii_execute): Fix test of fcntl's
106353         return value.
106354         * lib/pipe-filter-gi.c (filter_init): Likewise.
106355         Reported by Eric Blake.
106357 2009-08-22  Bruno Haible  <bruno@clisp.org>
106359         * lib/pipe.c (create_pipe): Use pipe2 instead of _pipe.
106360         * modules/pipe (Depends-on): Add pipe2.
106362 2009-08-22  Bruno Haible  <bruno@clisp.org>
106364         Tests for module 'pipe2'.
106365         * modules/pipe2-tests: New file.
106366         * tests/test-pipe2.c: New file.
106368         New module 'pipe2'.
106369         * lib/unistd.in.h (pipe2): New declaration.
106370         * lib/pipe2.c: New file.
106371         * m4/pipe2.m4: New file.
106372         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_PIPE2 and
106373         HAVE_PIPE2.
106374         * modules/unistd (Makefile.am): Substitute GNULIB_PIPE2 and HAVE_PIPE2.
106375         * modules/pipe2: New file.
106376         * doc/glibc-functions/pipe2.texi: Mention the new module.
106378 2009-08-22  Bruno Haible  <bruno@clisp.org>
106380         Reference some new glibc functions.
106381         * doc/glibc-functions/accept4.texi: New file.
106382         * doc/glibc-functions/dup3.texi: New file.
106383         * doc/glibc-functions/mkostemp.texi: New file.
106384         * doc/glibc-functions/pipe2.texi: New file.
106385         * doc/gnulib.texi (Glibc stdlib.h): Refer to mkostemp.
106386         (Glibc sys/socket.h): Refer to accept4.
106387         (Glibc unistd.h): Refer to dup3, pipe2.
106388         Reported by Eric Blake.
106390 2009-08-22  Jim Meyering  <meyering@redhat.com>
106391             Bruno Haible  <bruno@clisp.org>
106393         annotate automake snippets with $(AM_V_GEN) and $(AM_V_at)
106394         This makes it so packages using automake-1.11's silent-rules option
106395         can print e.g., a single "GEN    configmake.h" line, rather than
106396         the 30+ statements that perform the job.  If you want to see the
106397         actual commands, you can still run "make V=1".
106398         * modules/alloca-opt: Add $(AM_V_GEN) and $(AM_V_at) prefixes
106399         so that make output is abbreviated when those variables are defined
106400         appropriately.
106401         * modules/argz: Likewise.
106402         * modules/arpa_inet: Likewise.
106403         * modules/byteswap: Likewise.
106404         * modules/configmake: Likewise.
106405         * modules/dirent: Likewise.
106406         * modules/errno: Likewise.
106407         * modules/fcntl: Likewise.
106408         * modules/float: Likewise.
106409         * modules/fnmatch: Likewise.
106410         * modules/getopt-posix: Likewise.
106411         * modules/glob: Likewise.
106412         * modules/iconv_open: Likewise.
106413         * modules/inttypes: Likewise.
106414         * modules/localcharset: Likewise.
106415         * modules/locale: Likewise.
106416         * modules/math: Likewise.
106417         * modules/netdb: Likewise.
106418         * modules/netinet_in: Likewise.
106419         * modules/poll: Likewise.
106420         * modules/posix_spawnp-tests: Likewise.
106421         * modules/sched: Likewise.
106422         * modules/search: Likewise.
106423         * modules/selinux-h: Likewise.
106424         * modules/signal: Likewise.
106425         * modules/spawn: Likewise.
106426         * modules/stdarg: Likewise.
106427         * modules/stdbool: Likewise.
106428         * modules/stddef: Likewise.
106429         * modules/stdint: Likewise.
106430         * modules/stdio: Likewise.
106431         * modules/stdlib: Likewise.
106432         * modules/string: Likewise.
106433         * modules/strings: Likewise.
106434         * modules/sys_file: Likewise.
106435         * modules/sys_ioctl: Likewise.
106436         * modules/sys_select: Likewise.
106437         * modules/sys_socket: Likewise.
106438         * modules/sys_stat: Likewise.
106439         * modules/sys_time: Likewise.
106440         * modules/sys_times: Likewise.
106441         * modules/sys_utsname: Likewise.
106442         * modules/sys_wait: Likewise.
106443         * modules/sysexits: Likewise.
106444         * modules/time: Likewise.
106445         * modules/unistd: Likewise.
106446         * modules/wchar: Likewise.
106447         * modules/wctype: Likewise.
106449 2009-08-22  Jim Meyering  <meyering@redhat.com>
106451         announce-gen: detect write failure
106452         * build-aux/announce-gen: Add Coda at end.
106453         Remove equivalent-but-more-verbose block at top.
106455 2009-08-19  Akim Demaille  <demaille@gostai.com>
106457         bootstrap: --help to stdout.
106458         * bootstrap (usage): Don't send --help to stderr.
106459         Use a here doc instead of a long string.
106461 2009-08-21  Eric Blake  <ebb9@byu.net>
106463         test-popen-safer: split from test-popen
106464         * tests/test-popen.c (main): Move...
106465         * tests/test-popen.h: ...into new file.
106466         * tests/test-popen-safer2.c: New file.
106467         * modules/popen-tests (Files): Add test-popen.h.
106468         * modules/popen-safer-tests (Files): Add test-popen-safer2.c.
106469         Suggested by Bruno Haible.
106471         test-fcntl-safer: split from test-open
106472         * tests/test-open.c (main): Move...
106473         * tests/test-open.h: ...into new file.
106474         * tests/test-fcntl-safer.c: New file.
106475         * modules/open-tests (Files): Add test-open.h.
106476         * modules/fcntl-safer-tests: New file.
106477         Suggested by Bruno Haible.
106479         test-fopen-safer: split from test-fopen
106480         * tests/test-fopen.c (main): Move...
106481         * tests/test-fopen.h: ...into new file.
106482         * tests/test-fopen-safer.c: New file.
106483         * modules/fopen-tests (Files): Add test-fopen.h.
106484         * modules/fopen-safer-tests: New file.
106485         Suggested by Bruno Haible.
106487 2009-08-21  Paolo Bonzini  <bonzini@gnu.org>
106489         popen-safer: test O_CLOEXEC at run-time.
106490         * lib/popen-safer.c: Test O_CLOEXEC at run-time.
106492 2009-08-21  Paolo Bonzini  <bonzini@gnu.org>
106494         fcntl: move more flags to the header
106495         * lib/cloexec.c: Do not define FD_CLOEXEC here.
106496         * lib/popen-safer.c: Do not alias O_NOINHERIT to O_CLOEXEC here.
106497         * lib/fcntl.in.h: Do both things here.
106499 2009-08-21  Jim Meyering  <meyering@redhat.com>
106501         consistently remove $@-t before redirecting to it
106502         * modules/argz: Remove $@-t and $@ before redirecting to the former.
106503         * modules/alloca-opt: Likewise.
106504         * modules/byteswap: Likewise.
106505         * modules/fnmatch: Likewise.
106506         * modules/getopt-posix: Likewise.
106507         * modules/glob: Likewise.
106508         * modules/poll: Likewise.
106509         * modules/posix_spawnp-tests: Likewise.
106510         * modules/sys_socket: Likewise.
106511         * modules/sysexits: Likewise.
106513 2009-08-21  Eric Blake  <ebb9@byu.net>
106515         popen: simplify access to original popen
106516         * lib/popen.c (rpl_popen): No need to worry about popen being a
106517         macro.
106518         Reported by Bruno Haible.
106520 2009-08-20  Eric Blake  <ebb9@byu.net>
106522         build: avoid some compiler warnings
106523         * lib/selinux-at.h: Use dir_fd, not dirfd, to avoid shadowing.
106524         * lib/exclude.c (fnmatch_pattern_has_wildcards): Use correct
106525         type.
106526         (new_exclude_segment, excluded_file_pattern_p)
106527         (excluded_file_name_p): Reduce scope.
106528         * lib/vasnprintf.c (decimal_point_char): Avoid warning on
106529         old-style declaration.
106531 2009-08-20  Simon Josefsson  <simon@josefsson.org>
106533         * tests/test-exclude1.sh: Handle Windows EOL.
106534         * tests/test-exclude2.sh: Likewise.
106535         * tests/test-exclude3.sh: Likewise.
106536         * tests/test-exclude4.sh: Likewise.
106537         * tests/test-exclude5.sh: Likewise.
106538         * tests/test-exclude6.sh: Likewise.
106539         * tests/test-exclude7.sh: Likewise.
106541 2009-08-19  Akim Demaille  <demaille@gostai.com>
106543         bootstrap: find sha1sum when named gsha1sum.
106544         * bootstrap (find_tool): New.
106545         ($SHA1SUM): New.
106546         Use it.
106548 2009-08-20  Jim Meyering  <meyering@redhat.com>
106550         maint.mk: _header_without_use: fix a quoting bug and remove a bash'ism
106551         * top/maint.mk (_header_without_use): Use "\\\\", not "\\" in the sed
106552         expression that converts "." in a file name to "\." in the resulting
106553         regexp.  Start with a dummy statement, so that prior shell variable
106554         definitions are expanded portably.  Reported by Simon Josefsson.
106556 2009-08-20  Paolo Bonzini  <bonzini@gnu.org>
106558         Fix polling for writeability of a screen buffer.
106559         * lib/poll.c: Distinguish input and screen buffers for the
106560         Win32 implementation.
106561         * lib/select.c: Likewise.
106563 2009-08-19  Eric Blake  <ebb9@byu.net>
106565         popen-safer: prevent popen from clobbering std descriptors
106566         * modules/popen-safer: New file.
106567         * lib/popen-safer.c: Likewise.
106568         * m4/stdio-safer.m4 (gl_POPEN_SAFER): New macro.
106569         * lib/stdio--.h (popen): Provide override.
106570         * lib/stdio-safer.h (popen_safer): Provide declaration.
106571         * tests/test-popen.c (includes): Partially test this.
106572         * modules/popen-safer-tests: New file, for more tests.
106573         * tests/test-popen-safer.c: Likewise.
106574         * MODULES.html.sh (file stream based Input/Output): Mention it.
106576         tests: test some of the *-safer modules
106577         * modules/fopen-safer (Depends-on): Add fopen.
106578         * modules/fcntl-safer (Depends-on): Add fcntl.
106579         * modules/stdlib-safer (Depends-on): Add stdlib.
106580         (configure.ac): Set indicator.
106581         * modules/unistd-safer (configure.ac): Likewise.
106582         * modules/tmpfile-safer (configure.ac): Likewise.
106583         (Depends-on): Add tmpfile.
106584         * lib/stdio--.h (fopen, tmpfile): Don't override unless module is
106585         active.
106586         * tests/test-fopen.c (includes): Test safer versions when they are
106587         in use.
106588         * tests/test-open.c (includes): Likewise.
106590         popen: fix cygwin 1.5 bug when stdin closed
106591         * doc/posix-functions/popen.texi (popen): Document cygwin bugs.
106592         * modules/popen: New file.
106593         * modules/popen-tests: Likewise.
106594         * tests/test-popen.c: Likewise.
106595         * m4/popen.m4: Likewise.
106596         * lib/popen.c: Likewise.
106597         * lib/stdio.in.h (popen): New declaration.
106598         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Add popen.
106599         * modules/stdio (Makefile.am): Likewise.
106600         * MODULES.html.sh (systems lacking POSIX:2008): Mention it.
106602 2009-08-17  Joel E. Denny  <jdenny@clemson.edu>
106604         maint.mk: give full control over update-copyright exclusions
106605         * top/maint.mk (VC_LIST_EXCEPT): Instead of ChangeLog, use
106606         ${VC_LIST_EXCEPT_DEFAULT-ChangeLog} as the default exclusion.
106607         (update-copyright): Don't force inclusion of top-level
106608         ChangeLog.  Don't force exclusion of all COPYING files, but make
106609         them the default exclusion instead.
106611 2009-08-16  Bruno Haible  <bruno@clisp.org>
106613         Fix test failures on Solaris 10.
106614         * tests/uniconv/test-u8-conv-from-enc.c (main): Disable autodetect_jp
106615         tests when Solaris iconv() is used.
106616         * tests/uniconv/test-u16-conv-from-enc.c (main): Likewise.
106617         * tests/uniconv/test-u32-conv-from-enc.c (main): Likewise.
106618         * tests/uniconv/test-u8-strconv-from-enc.c (main): Likewise.
106619         * tests/uniconv/test-u16-strconv-from-enc.c (main): Likewise.
106620         * tests/uniconv/test-u32-strconv-from-enc.c (main): Likewise.
106622 2009-08-16  Bruno Haible  <bruno@clisp.org>
106624         Fix test failures on Solaris 10.
106625         * tests/test-pipe-filter-ii1.sh: Determine the filename of a working
106626         'tr' program and pass it as first argument.
106627         * tests/test-pipe-filter-gi1.sh: Likewise.
106628         * tests/test-pipe-filter-ii1.c (main): Except the filename of a 'tr'
106629         program as first argument.
106630         * tests/test-pipe-filter-gi1.c (main): Likewise.
106632 2009-08-16  Eric Blake  <ebb9@byu.net>
106634         fpurge: fix previous commits
106635         * modules/fpurge (Makefile.am): Make replacement conditional,
106636         partially reverting 2007-04-29 change; missed in previous
106637         attempt.
106638         * m4/fpurge.m4 (gl_FUNC_FPURGE): Also compile fpurge.c when fpurge
106639         is missing.
106641 2009-08-16  Bruno Haible  <bruno@clisp.org>
106643         Clarify fpurge's effect on the file position.
106644         * lib/stdio.in.h (fpurge): Specify the file position after fpurge.
106645         * tests/test-fpurge.c (main): Make a second pass for checking the file
106646         position.
106648 2009-08-16  Bruno Haible  <bruno@clisp.org>
106650         * m4/fpurge.m4 (gl_FUNC_FPURGE): Don't compile fpurge.c if only the
106651         declaration of fpurge is missing.
106652         * tests/test-fpurge.c (main): Check that the file has not more contents
106653         than expected. Close the file before removing it.
106655 2009-08-15  Eric Blake  <ebb9@byu.net>
106657         fpurge: don't wrap working cygwin implementation
106658         * lib/fpurge.c (fpurge): Fix comment typo.
106659         * m4/fpurge.m4 (gl_FUNC_FPURGE): Detect BSD bug, allowing cygwin
106660         1.7 to avoid replacement.
106661         * tests/test-fpurge.c (main): Enhance test.
106663 2009-08-15  Eric Blake  <ebb9@byu.net>
106664         and Jim Meyering  <meyering@redhat.com>
106666         test-update-copyright: skip if perl is insufficient
106667         * tests/test-update-copyright.sh: Failure to run maintainer tool
106668         should not cause testsuite failure on cygwin 1.5.
106670 2009-08-14  Eric Blake  <ebb9@byu.net>
106672         doc: mention more functions added in cygwin 1.7.0
106673         * doc/posix-headers/limits.texi (limits.h): Update for recent
106674         cygwin additions.
106675         * doc/posix-headers/wordexp.texi (wordexp.h): Likewise.
106676         * doc/posix-functions/wordexp.texi (wordexp): Likewise.
106677         * doc/posix-functions/wordfree.texi (wordfree): Likewise.
106678         * doc/posix-functions/setlocale.texi (setlocale): Likewise.
106679         * doc/posix-functions/nl_langinfo.texi (nl_langinfo): Likewise.
106681 2009-08-14  Eric Blake  <ebb9@byu.net>
106683         maint.mk: simplify update-copyright rule
106684         * top/maint.mk (update-copyright-local): Delete, and document how
106685         to do it in cfg.mk instead.
106686         (update-copyright-exclude-regexp): Delete, and document how to do
106687         it in .x-update-copyright instead.
106688         (update-copyright): Simplify, thanks to VC_LIST_EXCEPT.  Don't
106689         exclude ChangeLog.
106691 2009-08-14  Bruno Haible  <bruno@clisp.org>
106693         * m4/wchar.m4 (gl_WCHAR_H): Undo invalid optimization in last commit.
106695 2009-08-14  Joel E. Denny  <jdenny@clemson.edu>
106697         maint.mk: support update-copyright-env
106698         * top/maint.mk (update-copyright-env): Define place-holder.
106699         (update-copyright): Expand $(update-copyright-env) before
106700         invoking update-copyright.
106702 2009-08-14  Joel E. Denny  <jdenny@clemson.edu>
106704         update-copyright: implement forced reformatting
106705         * build-aux/update-copyright: Implement and document
106706         UPDATE_COPYRIGHT_FORCE.
106707         * tests/test-update-copyright.sh: Test it.
106709 2009-08-14  Eric Blake  <ebb9@byu.net>
106710         and Bruno Haible  <bruno@clisp.org>
106712         stddef: fix NetBSD 5.0 NULL bug, rather than working around it
106713         * tests/test-locale.c: Revert previous patch related to NULL.
106714         * tests/test-stdio.c: Likewise.
106715         * tests/test-stdlib.c: Likewise.
106716         * tests/test-string.c: Likewise.
106717         * tests/test-unistd.c: Likewise.
106718         * modules/time-tests (Depends-on): Add verify.
106719         * modules/wchar-tests (Depends-on): Likewise.
106720         * tests/test-time.c: Test for NULL compliance.
106721         * tests/test-wchar.c: Likewise.
106722         * modules/locale (Depends-on): Add stddef.
106723         * modules/stdio (Depends-on): Likewise.
106724         * modules/stdlib (Depends-on): Likewise.
106725         * modules/string (Depends-on): Likewise.
106726         * modules/time (Depends-on): Likewise.
106727         * modules/unistd (Depends-on): Likewise.
106728         * modules/wchar (Depends-on): Likewise.
106729         * lib/locale.in.h (includes): Use <stddef.h> to fix NULL.
106730         * lib/stdlib.in.h (includes): Likewise.
106731         * lib/string.in.h (includes): Likewise.
106732         * lib/time.in.h (includes): Likewise.
106733         * lib/unistd.in.h (includes): Likewise.
106734         * m4/locale_h.m4 (gl_LOCALE_H): Replace locale.h if stddef.h was
106735         replaced.
106736         * m4/wchar.m4 (gl_WCHAR_H): Likewise.
106737         * m4/stddef_h.m4: New file.
106738         * modules/stddef: Likewise.
106739         * lib/stddef.in.h: Likewise.
106740         * modules/stddef-tests: Likewise.
106741         * tests/test-stddef.c: Likewise.
106742         * MODULES.html.sh (Basic types <stddef.h>): Mention new module.
106743         * doc/posix-headers/stddef.texi (stddef.h): Document the bug.
106744         * doc/posix-headers/locale.texi (locale.h): Likewise.
106745         * doc/posix-headers/stdio.texi (stdio.h): Likewise.
106746         * doc/posix-headers/stdlib.texi (stdlib.h): Likewise.
106747         * doc/posix-headers/string.texi (string.h): Likewise.
106748         * doc/posix-headers/time.texi (time.h): Likewise.
106749         * doc/posix-headers/unistd.texi (unistd.h): Likewise.
106750         * doc/posix-headers/wchar.texi (wchar.h): Likewise.
106752 2009-08-14  Eric Blake  <ebb9@byu.net>
106754         doc: improve git diff of texinfo files
106755         * .gitattributes: Add rule for *.texi files, with hint on how to
106756         use it.
106757         Copied from m4, and based on a report by Bruno Haible.
106759 2009-08-14  Bruno Haible  <bruno@clisp.org>
106761         Disable multithread support by default on Cygwin 1.5.x for real.
106762         * m4/threadlib.m4 (gl_THREADLIB_EARLY_BODY): Fix last commit.
106764 2009-08-14  Joel E. Denny  <jdenny@clemson.edu>
106766         update-copyright: much ado about intervals
106767         * build-aux/update-copyright: Implement and document
106768         UPDATE_COPYRIGHT_USE_INTERVALS to control expansion and collapse
106769         of copyright year intervals.
106770         Also, document UPDATE_COPYRIGHT_YEAR.
106771         * tests/test-update-copyright.sh: Test it.
106773         update-copyright: convert 2-digit to 4-digit years
106774         * build-aux/update-copyright: Implement and document.
106775         * tests/test-update-copyright.sh: Update.
106777 2009-08-14  Jim Meyering  <meyering@redhat.com>
106779         test-exclude: avoid coreutils "make check" failure
106780         * tests/test-exclude.c (ARGMATCH_DIE_DECL) [ARGMATCH_DIE_DECL]: Define,
106781         just as in test-argmatch.c.
106783 2009-08-13  Eric Blake  <ebb9@byu.net>
106785         test-dup2: fix bad assumption
106786         * tests/test-dup2.c (main): Tolerate leaked fds from environment.
106787         Reported by Peter Breitenlohner <peb@mppmu.mpg.de>.
106789         test-version-etc: fix CRLF portability issue
106790         * tests/test-version-etc.sh: Use tr, not sed, as not all sed
106791         recognize \r.
106792         * tests/test-argp-version-etc-1.sh: Likewise.
106794         getopt: update client modules
106795         * modules/argp (Depends-on): Use getopt-gnu.
106796         * modules/git-merge-changelog (Depends-on): Likewise.
106797         * modules/long-options (Depends-on): Likewise.
106798         * modules/xstrtol (Depends-on): Likewise.
106800 2009-08-13  Simon Josefsson  <simon@josefsson.org>
106802         * tests/test-version-etc.sh: Don't fail on different
106803         project/version.  Don't fail on CRLF differences.  Rewrite to use
106804         multiple -e instead of multiple sed forks, suggested by Eric Blake
106805         <ebb9@byu.net>.
106806         * tests/test-argp-version-etc-1.sh: Likewise.
106808 2009-08-13  Simon Josefsson  <simon@josefsson.org>
106810         * tests/test-version-etc.sh: Don't fail on different
106811         project/version.
106813 2009-08-12  Bruno Haible  <bruno@clisp.org>
106815         Tests for modules 'getopt-posix', 'getopt-gnu'.
106816         * modules/getopt-posix-tests: New file.
106817         * tests/test-getopt.c: New file.
106818         * tests/test-getopt.h: New file.
106819         * tests/test-getopt_long.h: New file.
106821         New modules 'getopt-posix', 'getopt-gnu'.
106822         * modules/getopt-gnu: New file, renamed from modules/getopt.
106823         * modules/getopt-posix: New file.
106824         * modules/getopt: Turn into an obsolete alias for getopt-gnu.
106825         * m4/getopt.m4 (gl_FUNC_GETOPT_POSIX, gl_FUNC_GETOPT_GNU): New macros.
106826         (gl_GETOPT): Remove macro.
106827         (gl_GETOPT_CHECK_HEADERS): Do some checks only for gl_FUNC_GETOPT_GNU.
106828         Disable the test against BSD systems that declare optreset. Test
106829         against mingw bug. Test against lack of support of optional arguments
106830         on many platforms.
106831         * doc/glibc-headers/getopt.texi: Update module name and list of
106832         relevant platforms.
106833         * doc/posix-functions/getopt.texi: Mention modules 'getopt-posix' and
106834         'getopt-gnu' and more portability problems.
106835         * NEWS: Mention the changes.
106837 2009-08-12  Bruno Haible  <bruno@clisp.org>
106839         Ensure that optarg etc. get declared by <unistd.h>.
106840         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Require
106841         AC_USE_SYSTEM_EXTENSIONS.
106842         * modules/getopt (Depends-on): Add 'extensions'.
106844 2009-08-12  Bruno Haible  <bruno@clisp.org>
106846         Avoid test link errors.
106847         * modules/pipe-filter-ii-tests (Makefile.am): Define
106848         test_pipe_filter_ii1_LDADD and test_pipe_filter_ii2_main_LDADD.
106849         * modules/pipe-filter-gi-tests (Makefile.am): Define
106850         test_pipe_filter_gi1_LDADD and test_pipe_filter_gi2_main_LDADD.
106851         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
106853 2009-08-12  Bruno Haible  <bruno@clisp.org>
106855         * m4/getopt.m4 (gl_REPLACE_GETOPT): New macro, was called
106856         gl_GETOPT_SUBSTITUTE before.
106857         (gl_GETOPT): Use it.
106858         * m4/argp.m4 (gl_ARGP): Update.
106859         Reported by Sergey Poznyakoff.
106861         * m4/getopt.m4: Reorder macros.
106862         (gl_GETOPT): Inline gl_GETOPT_SUBSTITUTE.
106863         (gl_GETOPT_SUBSTITUTE): Remove macro.
106865 2009-08-12  Sergey Poznyakoff  <gray@gnu.org.ua>
106867         Minor improvement in gitlog-to-changelog
106869         * build-aux/gitlog-to-changelog: New option `--format' makes
106870         output format string configurable.
106872 2009-08-12  Sergey Poznyakoff  <gray@gnu.org.ua>
106874         Optimize exclude: use hash tables for non-wildcard patterns.
106876         * lib/exclude.c: Include hash.h and mbuiter.h
106877         (struct exclude_pattern, exclude_segment): New data types.
106878         (struct exclude): Rewrite.
106879         (fnmatch_pattern_has_wildcards): New function.
106880         (new_exclude_segment, free_exclude_segment): New functions.
106881         (excluded_file_pattern_p, excluded_file_name_p): New functions.
106882         (excluded_file_name, add_exclude): Rewrite using new struct exclude.
106883         * lib/exclude.h (is_fnmatch_pattern): New prototype.
106884         * modules/exclude: Depend on hash and mbuiter.
106886         * modules/exclude-tests: New file.
106887         * tests/test-exclude.c: New file.
106888         * tests/test-exclude1.sh: New file.
106889         * tests/test-exclude2.sh: New file.
106890         * tests/test-exclude3.sh: New file.
106891         * tests/test-exclude4.sh: New file.
106892         * tests/test-exclude5.sh: New file.
106893         * tests/test-exclude6.sh: New file.
106894         * tests/test-exclude7.sh: New file.
106896 2009-08-12  Bruno Haible  <bruno@clisp.org>
106898         Ensure that getopt() gets declared by <unistd.h>.
106899         * lib/unistd.in.h: Conditionally include getopt.h.
106900         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): Require gl_UNISTD_H_DEFAULTS.
106901         Set GNULIB_UNISTD_H_GETOPT.
106902         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize
106903         GNULIB_UNISTD_H_GETOPT.
106904         * modules/unistd (Makefile.am): Substitute GNULIB_UNISTD_H_GETOPT.
106906 2009-08-12  Bruno Haible  <bruno@clisp.org>
106908         Clarify logic.
106909         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS, gl_GETOPT_IFELSE): Use
106910         gl_replace_getopt instead of GETOPT_H.
106912 2009-08-12  Bruno Haible  <bruno@clisp.org>
106914         * m4/getopt.m4: Add comments.
106916 2009-08-12  Bruno Haible  <bruno@clisp.org>
106918         Disable multithread support by default on Cygwin 1.5.x.
106919         * m4/threadlib.m4 (gl_THREADLIB_EARLY_BODY): On Cygwin 1.5.x and older,
106920         set gl_use_threads=no if not specified otherwise.
106922 2009-08-11  Bruno Haible  <bruno@clisp.org>
106924         Avoid compilation error on NetBSD 5.0.
106925         * tests/test-locale.c: Write sizeof (NULL) instead of sizeof NULL.
106926         * tests/test-stdio.c: Likewise.
106927         * tests/test-stdlib.c: Likewise.
106928         * tests/test-string.c: Likewise.
106929         * tests/test-unistd.c: Likewise.
106930         Reported by Greg Troxel <gdt@ir.bbn.com>
106931         at <https://savannah.gnu.org/support/?106973>.
106933 2009-08-11  Bruno Haible  <bruno@clisp.org>
106935         * modules/dup2-tests (Depends-on): Remove close.
106937         Undo 2009-07-19 commit.
106938         * modules/acl-tests (Depends-on): Remove close.
106939         * modules/binary-io-tests (Depends-on): Likewise.
106940         * modules/closein-tests (Depends-on): Likewise.
106941         * modules/flock-tests (Depends-on): Likewise.
106942         * modules/fsync-tests (Depends-on): Likewise.
106943         * modules/lseek-tests (Depends-on): Likewise.
106944         * modules/pipe-tests (Depends-on): Likewise.
106945         * modules/posix_spawn-tests (Depends-on): Likewise.
106946         * modules/posix_spawnp-tests (Depends-on): Likewise.
106947         * modules/stat-time-tests (Depends-on): Likewise.
106948         * modules/yesno-tests (Depends-on): Likewise.
106950 2009-08-10  Bruno Haible  <bruno@clisp.org>
106952         * lib/vasnprintf.c (DCHAR_SET): Undefine at the end.
106954 2009-08-10  Bruno Haible  <bruno@clisp.org>
106956         Fix a gcc warning.
106957         * lib/write.c (rpl_write): Cast result of _get_osfhandle.
106959 2009-08-10  Bruno Haible  <bruno@clisp.org>
106961         Don't optimize AC_LIBOBJs, as they may appear in different contexts.
106962         * m4/close.m4 (gl_REPLACE_CLOSE): Execute AC_LIBOBJ unconditionally,
106963         not only the first time.
106964         * m4/fclose.m4 (gl_REPLACE_FCLOSE): Likewise.
106965         * m4/open.m4 (gl_REPLACE_OPEN): Likewise.
106966         * m4/strstr.m4 (gl_FUNC_STRSTR): Execute AC_LIBOBJ when REPLACE_STRSTR
106967         is 1, not only the first time.
106969 2009-08-10  Bruno Haible  <bruno@clisp.org>
106971         Make it possible to use module 'gethostname' without module 'close'.
106972         * lib/unistd.in.h (close): Evoke a link error only if
106973         UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS is set.
106974         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize
106975         UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS.
106976         * modules/unistd (Makefile.am): Substitute
106977         UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS.
106978         * lib/sys_ioctl.in.h (ioctl): Evoke a link error only if
106979         SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS is set.
106980         * m4/sys_ioctl_h.m4 (gl_SYS_IOCTL_H_DEFAULTS): Initialize
106981         SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS.
106982         * modules/sys_ioctl (Makefile.am): Substitute
106983         SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS.
106984         * modules/socket (configure.ac): On native Windows, set
106985         UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS and
106986         SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS.
106987         Reported by Sam Steingold <sds@gnu.org>.
106989 2009-08-10  Bruno Haible  <bruno@clisp.org>
106991         * m4/close.m4 (gl_FUNC_CLOSE): Add comment.
106992         * modules/ioctl (configure.ac): Likewise.
106994 2009-08-10  Bruno Haible  <bruno@clisp.org>
106996         Avoid collision between gnulib wrapper and libintl wrapper.
106997         * lib/stdio-write.c (printf): Don't define if a printf wrapper is
106998         already defined in intl/printf.c.
106999         (vprintf): Test REPLACE_VPRINTF_POSIX, not REPLACE_VFPRINTF_POSIX.
107000         (vfprintf): Test REPLACE_VFPRINTF_POSIX, not REPLACE_VPRINTF_POSIX.
107002 2009-08-09  Bruno Haible  <bruno@clisp.org>
107004         Make <sys/select.h> really self-contained, also on Solaris 10.
107005         * lib/sys_select.in.h: Include <string.h>.
107006         * m4/sys_select_h.m4 (gl_HEADER_SYS_SELECT): Test also against
107007         Solaris 10 problem.
107008         * tests/test-sys_select.c (main): Add check that FD_ZERO can be used.
107009         * doc/posix-headers/sys_select.texi: Mention the Solaris 10 problem.
107010         Reported by Jim Meyering.
107012 2009-08-09  Bruno Haible  <bruno@clisp.org>
107014         Avoid warnings from 'aclocal' that are due to a use of macro name
107015         AM_XGETTEXT_OPTION that is not defined in automake.
107016         * modules/argp (configure.ac): Hide use of AM_XGETTEXT_OPTION from
107017         automake.
107018         * modules/error (configure.ac): Likewise.
107019         * modules/propername (configure.ac): Likewise.
107020         * modules/vasprintf (configure.ac): Likewise.
107021         * modules/verror (configure.ac): Likewise.
107022         * modules/xprintf (configure.ac): Likewise.
107023         * modules/xvasprintf (configure.ac): Likewise.
107025 2009-08-08  Bruno Haible  <bruno@clisp.org>
107027         Avoid compilation error in C++ mode.
107028         * lib/gettimeofday.c (rpl_gettimeofday): Cast timezone argument.
107029         Reported by Sam Steingold <sds@gnu.org>.
107031 2009-08-08  Bruno Haible  <bruno@clisp.org>
107033         * m4/gethostname.m4 (gl_FUNC_GETHOSTNAME): Define HOST_NAME_MAX also
107034         for the various Unix platforms.
107035         * doc/posix-headers/limits.texi: Update platforms list regarding
107036         HOST_NAME_MAX.
107037         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
107039 2009-08-07  Jim Meyering  <meyering@redhat.com>
107041         selinux-at: fix typo in a comment
107042         * lib/selinux-at.h: s/getfileconat/getfilecon/ in a comment.
107043         Spotted by Paolo Bonzini.
107045         selinux-at: remove redundant m4 code, add documentation
107046         * modules/selinux-at (configure.ac): Remove redundant code.
107047         LIB_SELINUX is already set via the dependent module, selinux-h.
107048         (Include): Add quotes around selinux-at.h.
107049         * lib/selinux-at.h: Add documentation.
107050         Reported by Bruno Haible in
107051         http://marc.info/?l=gnulib-bug&m=124958988300749
107053 2009-08-07  Bruno Haible  <bruno@clisp.org>
107055         Avoid link error on MacOS X 10.3 and 10.4.
107056         * lib/argp-ba.c (argp_program_bug_address): Explicitly zero-initialize
107057         on non-ELF systems.
107058         * lib/argp-pv.c (argp_program_version): Likewise.
107059         Reported by Simon Josefsson.
107061 2009-08-07  Simon Josefsson  <simon@josefsson.org>
107063         * tests/test-version-etc.sh: Use $EXEEXT.
107065 2009-08-06  Joel E. Denny  <jdenny@clemson.edu>
107067         update-copyright: update documentation to point to maint.mk
107068         * build-aux/update-copyright: Here.
107070 2009-08-06  Jim Meyering  <meyering@redhat.com>
107072         maint.mk: support update-copyright-local
107073         * top/maint.mk (update-copyright-local): Define place-holder.
107074         (update-copyright): Depend on $(update-copyright-local).
107076 2009-08-06  Jim Meyering  <meyering@redhat.com>
107078         selinux-at: new module
107079         Initially written for coreutils, this module will soon be
107080         used by findutils, too.
107081         * MODULES.html.sh [Misc]: Add selinux-at.
107082         * lib/selinux-at.h: New file, from coreutils.
107083         * lib/selinux-at.c: Likewise.
107084         * modules/selinux-at: Likewise.
107085         (License): Change from LGPL to GPL, since it depends
107086         on the GPL'd openat module.
107088         doc: update README
107089         * README: Remove references to cogito.
107090         Remove cvs-repo-updating instructions from 2007.
107091         Don't imply that CVS is better if you have limited disk space.
107093 2009-08-05  Joel E. Denny  <jdenny@clemson.edu>
107095         update-copyright: support C-style comments
107096         * build-aux/update-copyright: Implement and document.
107097         * tests/test-update-copyright.sh: Test.
107099 2009-08-05  Joel E. Denny  <jdenny@clemson.edu>
107101         update-copyright: support omitted "(C)"
107102         * build-aux/update-copyright: Implement and document.  Also,
107103         allow variable whitespace before "(C)".
107104         * tests/test-update-copyright.sh: Test.
107106 2009-08-05  Joel E. Denny  <jdenny@clemson.edu>
107108         update-copyright: don't trip on non-FSF copyright statements
107109         * build-aux/update-copyright: Fix so that the first correctly
107110         formatted FSF copyright statement is recognized no matter what
107111         appears before it.  Update documentation.
107112         * tests/test-update-copyright.sh: Test that.
107114 2009-08-05  Joel E. Denny  <jdenny@clemson.edu>
107116         update-copyright: clean up code a little
107117         * build-aux/update-copyright: Append "_re" to the name of any
107118         variable holding a regular expression.
107119         Replace "old" and "new" with "stmt" in variable names.
107120         Do not accept 2-digit UPDATE_COPYRIGHT_YEAR, which was not
107121         handled correctly.
107122         Format code more consistently.
107124 2009-08-05  Joel E. Denny  <jdenny@clemson.edu>
107126         update-copyright-tests: improve portability
107127         * tests/test-update-copyright.sh: Use cmp if diff cannot handle
107128         -u or /dev/null.  Suggested by Jim Meyering and Eric Blake.
107130 2009-08-03  Joel E. Denny  <jdenny@clemson.edu>
107132         update-copyright: support @copyright{} and &copy;
107133         * build-aux/update-copyright: Implement and document.
107134         * tests/test-update-copyright.sh: Test.
107136 2009-08-04  Jim Meyering  <meyering@redhat.com>
107138         update-copyright-tests: correctly test EOL=\r\n handling
107139         * tests/test-update-copyright.sh: Put \r at the end of some lines
107140         for the dos-eol tests.  Based on a patch by Joel E. Denny.
107142         maint.mk: make update-copyright exclusion list more configurable
107143         * top/maint.mk (update-copyright): Default to excluding COPYING,
107144         but allow an override, in case someone does want to update that file.
107146         maint.mk: don't update copyright date in COPYING
107147         * top/maint.mk (update-copyright): Exclude COPYING.
107149         maint.mk: add a copyright-updating rule
107150         * top/maint.mk (update-copyright): New rule.
107151         Derived from coreutils/Makefile.am.
107153         update-copyright: rename some variables
107154         * build-aux/update-copyright: Rename a few variables for clarity.
107155         Tweak syntax.  List Joel E. Denny as coauthor.
107157 2009-08-03  Joel E. Denny  <jdenny@clemson.edu>
107159         update-copyright: fix bug for 2-digit last year and add tests
107160         * build-aux/update-copyright: Fix bug.
107161         Use UPDATE_COPYRIGHT_YEAR from environment as current year if
107162         specified.
107163         * modules/update-copyright-tests: New
107164         * tests/test-update-copyright.sh: New.
107166 2009-07-31  Joel E. Denny  <jdenny@clemson.edu>
107168         update-copyright: handle leading tabs in line prefix
107169         * build-aux/update-copyright: Count leading tabs as 8 spaces
107170         when computing margin.  This helps with the formatting of
107171         ChangeLogs, for example.
107172         Fix documentation a little.
107174 2009-07-31  Joel E. Denny  <jdenny@clemson.edu>
107176         update-copyright: support EOL=\r\n
107177         * build-aux/update-copyright: Implement that.
107179 2009-07-31  Joel E. Denny  <jdenny@clemson.edu>
107181         update-copyright: automatically format copyright statements
107182         * build-aux/update-copyright: Implement that.
107183         Also, be a little more predictable and safer by always failing
107184         when the full copyright format is not perfectly recognized as an
107185         unbroken whole.  Discussed at
107186         <http://lists.gnu.org/r/bug-gnulib/2009-07/msg00131.html>.
107187         Rewrite documentation.
107189 2009-08-03  Bruno Haible  <bruno@clisp.org>
107191         * m4/iconv.m4 (AM_ICONV): Fix displayed message with autoconf-2.64.
107193 2009-08-02  Bruno Haible  <bruno@clisp.org>
107195         Tests for module 'uname'.
107196         * modules/uname-tests: New file.
107197         * tests/test-uname.c: New file.
107199         New module 'uname'.
107200         * lib/uname.c: New file.
107201         * m4/uname.m4: New file.
107202         * modules/uname: New file.
107203         * doc/posix-functions/uname.texi: Mention the new module.
107205 2009-08-02  Bruno Haible  <bruno@clisp.org>
107207         Tests for module 'sys_utsname'.
107208         * modules/sys_utsname-tests: New file.
107209         * tests/test-sys_utsname.c: New file.
107211         New module 'sys_utsname'.
107212         * lib/sys_utsname.in.h: New file, based on glibc's <sys/utsname.h>.
107213         * m4/sys_utsname_h.m4: New file.
107214         * modules/sys_utsname: New file.
107215         * doc/posix-headers/sys_utsname.texi: Mention the new module.
107217 2009-08-02  Bruno Haible  <bruno@clisp.org>
107219         Implicitly initialize the sockets library.
107220         * lib/gethostname.c: Include sockets.h.
107221         (rpl_gethostname): Invoke gl_sockets_startup.
107222         * lib/socket.c: Include sockets.h.
107223         (rpl_socket): Invoke gl_sockets_startup.
107224         * modules/gethostname (Depends-on): Add sockets.
107225         * modules/socket (Depends-on): Likewise.
107226         * tests/test-poll.c: Don't include sockets.h.
107227         (main): Don't invoke gl_sockets_startup.
107228         * tests/test-select.c: Don't include sockets.h.
107229         (main): Don't invoke gl_sockets_startup.
107231 2009-08-02  Bruno Haible  <bruno@clisp.org>
107233         Allow multiple calls to gl_sockets_startup.
107234         * lib/sockets.c (initialized_sockets_version): New variable.
107235         (gl_sockets_startup): Do nothing if already called for this or a higher
107236         version.
107237         (gl_sockets_cleanup): Reset initialized_sockets_version.
107239 2009-08-03  Simon Josefsson  <simon@josefsson.org>
107241         * tests/test-argp-version-etc-1.sh: Use EXEEXT.  Don't fail on
107242         different project/version.
107244 2009-08-02  Paolo Bonzini  <bonzini@gnu.org>
107245             Bruno Haible  <bruno@clisp.org>
107247         Tests for module 'pipe-filter-gi'.
107248         * modules/pipe-filter-gi-tests: New file.
107249         * tests/test-pipe-filter-gi1.sh: New file.
107250         * tests/test-pipe-filter-gi1.c: New file.
107251         * tests/test-pipe-filter-gi2.sh: New file.
107252         * tests/test-pipe-filter-gi2-main.c: New file.
107253         * tests/test-pipe-filter-gi2-child.c: New file.
107255         New module 'pipe-filter-gi'.
107256         * lib/pipe-filter-gi.c: New file.
107257         * modules/pipe-filter-gi: New file.
107259 2009-08-02  Bruno Haible  <bruno@clisp.org>
107260             Paolo Bonzini  <bonzini@gnu.org>
107262         Tests for module 'pipe-filter-ii'.
107263         * modules/pipe-filter-ii-tests: New file.
107264         * tests/test-pipe-filter-ii1.sh: New file.
107265         * tests/test-pipe-filter-ii1.c: New file.
107266         * tests/test-pipe-filter-ii2.sh: New file.
107267         * tests/test-pipe-filter-ii2-main.c: New file.
107268         * tests/test-pipe-filter-ii2-child.c: New file.
107270         New module 'pipe-filter-ii'.
107271         * lib/pipe-filter.h: New file.
107272         * lib/pipe-filter-ii.c: New file.
107273         * lib/pipe-filter-aux.h: New file.
107274         * modules/pipe-filter-ii: New file.
107276 2009-08-02  Simon Josefsson  <simon@josefsson.org>
107278         * lib/gc-libgcrypt.c: Change copyright to FSF.
107279         * lib/gc-gnulib.c: Likewise.
107281 2009-08-02  Martin Lambers  <marlam@marlam.de>  (tiny change)
107283         * lib/gethostname.c: Include limits.h.
107285 2009-08-02  Simon Josefsson  <simon@josefsson.org>
107286             Bruno Haible  <bruno@clisp.org>
107288         Ensure HOST_NAME_MAX as part of the gethostname module.
107289         * m4/gethostname.m4 (gl_FUNC_GETHOSTNAME): On native Windows platforms,
107290         define also HOST_NAME_MAX.
107291         * tests/test-gethostname.c: Include <limits.h>.
107292         (main): Check also HOST_NAME_MAX.
107293         * doc/posix-headers/limits.texi: Document the mingw problem.
107295 2009-08-02  Bruno Haible  <bruno@clisp.org>
107297         * lib/gethostname.c (gethostname): Fix handling of large len argument.
107298         Add comments.
107300 2009-03-31  Simon Josefsson  <simon@josefsson.org>
107302         * lib/gethostname.c: Add Windows wrapper.
107303         * m4/gethostname.m4: Look for gethostname in -lws2_32.
107304         * modules/gethostname: Depend on sys_socket & errno, for also
107305         added lib/w32sock.h.  Add GETHOSTNAME_LIB link directive.
107306         * modules/gethostname-tests: Link to @GETHOSTNAME_LIB@.
107308 2009-07-31  Jim Meyering  <meyering@redhat.com>
107310         getloadavg: fix symbol name in comment
107311         * lib/getloadavg.c: Correct a typo I introduced when adding
107312         comments to Matt's change: s/NLIST_POINTER/N_NAME_POINTER/.
107313         Matt Kraai spotted the problem.
107315 2009-07-29  Matt Kraai  <mkraai@beckman.com>
107317         getloadavg: check whether n_name is a pointer, for QNX 6.4.1
107318         * lib/getloadavg.c (getloadavg): Use the strcpy-into-nlist.n_name
107319         code also if ! defined N_NAME_POINTER.
107320         * m4/getloadavg.m4 (gl_GETLOADAVG): Add a link-test for N_NAME_POINTER.
107321         This is required on QNX 6.4.1, where /usr/include/nlist.h exists,
107322         but the n_name member is a 12-byte array.
107324 2009-07-29  Joel E. Denny  <jdenny@clemson.edu>
107326         update-copyright: generalize comment handling
107327         * build-aux/update-copyright: Handle copyright statements
107328         within more comment styles.
107329         Document usage.
107330         Report any file with an external copyright holder or parse failure.
107332 2009-07-29  Jim Meyering  <meyering@redhat.com>
107334         mktime: correct setting of REPLACE_MKTIME
107335         * m4/mktime.m4 (gl_FUNC_MKTIME): Set REPLACE_MKTIME=0, when required.
107337         update-copyright: new module
107338         * modules/update-copyright: New file.
107339         * build-aux/update-copyright: New file.
107340         * MODULES.html.sh (maint+release support): Add update-copyright.
107342 2009-07-27  Bruno Haible  <bruno@clisp.org>
107344         Fix compilation error when <ctime> is used and mktime is replaced.
107345         * lib/time.in.h (mktime): New declaration.
107346         * m4/mktime.m4 (gl_FUNC_MKTIME): Require gl_HEADER_TIME_H_DEFAULTS. Set
107347         REPLACE_MKTIME instead of defining mktime in config.h.
107348         * m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS): Initialize REPLACE_MKTIME.
107349         * modules/time (Makefile.am): Substitute REPLACE_MKTIME.
107350         Reported by Ross McFarland <rwmcfa1@neces.com>.
107352 2009-07-27  Bruno Haible  <bruno@clisp.org>
107354         * lib/math.in.h (cosl, logl, sinl): Undefine before declaring it.
107355         Reported by Matt Kraai <mkraai@beckman.com>.
107357 2009-07-25  Jim Meyering  <meyering@redhat.com>
107359         maint.mk: avoid warnings about missing files
107360         * top/maint.mk (PREV_VERSION): Suppress stderr, to hide a
107361         diagnostic when .prev-version does not exist.
107362         (_cfg_mk): Define, so it can be empty when cfg.mk does not exist.
107363         (syntax-check-rules): Use $(_cfg_mk) to avoid a diagnostic about
107364         nonexistent cfg.mk.
107365         Suggestions from Simon Josefsson.
107367 2009-07-25  Bruno Haible  <bruno@clisp.org>
107369         * lib/math.in.h (cosl, logl, sinl): Don't declare if they are already
107370         defined as macros. Needed on QNX 6.4.1.
107371         Reported by Matt Kraai <mkraai@beckman.com>.
107373 2009-07-23  Jim Meyering  <meyering@redhat.com>
107375         maint.mk: invoke "make dist" with a working value of XZ_OPT
107376         * top/maint.mk (vc-dist): Use no "-" in the value of XZ_OPT.
107378 2009-07-22  Matt Kraai  <mkraai@beckman.com>  (tiny change)
107380         Make fseeko.c compile on QNX.
107381         * lib/fseeko.c (rpl_fseeko): Use the numerical value of _MWRITE.
107383 2009-07-22  Peter Simons  <simons@cryp.to>
107385         C++: wrap md2,md5,sha1,etc. function declarations in extern "C" scope
107386         * lib/md2.h [__cplusplus]: Wrap declarations in extern "C" scope.
107387         * lib/md4.h: Likewise.
107388         * lib/md5.h: Likewise.
107389         * lib/sha1.h: Likewise.
107390         * lib/sha256.h: Likewise.
107391         * lib/sha512.h: Likewise.
107393         tests-sha1: don't assign literal string to 'char *' variable
107394         * tests/test-sha1.c (main): Declare locals with "const" to match
107395         attributes of the right hand side.
107397 2009-07-21  Eric Blake  <ebb9@byu.net>
107399         dup2: fix more mingw problems
107400         * lib/dup2.c (rpl_dup2) [_WIN32]: Avoid hanging when duplicating
107401         fd to itself.
107402         * doc/posix-functions/dup2.texi (dup2): Document the bug.
107403         * lib/unistd.in.h (dup2) [REPLACE_FCHDIR]: Avoid name collision.
107404         * lib/fchdir.c (dup2): Manage preprocessor macros correctly.
107405         (rpl_dup2_fchdir): Rename from rpl_dup2, and let dup2 module take
107406         care of mingw bugs.
107408 2009-07-21  Jim Meyering  <meyering@redhat.com>
107410         vc-list-files: avoid failure when /bin/sh is dash
107411         * build-aux/vc-list-files: Avoid a shell portability problem with dash.
107412         On some Debian based systems, /bin/sh is a symlink to dash, and running
107413         this command would omit the "/" following each 'tests' prefix:
107414           dash -x build-aux/vc-list-files -C . tests
107415         That is because bash and dash work differently:
107416           $ for i in bash dash; do $i -c 'a=odd; a=ok b=$a; echo '$i' $b'; done
107417           bash ok
107418           dash odd
107420 2009-07-21  Eric Blake  <ebb9@byu.net>
107422         dup2-tests: test previous patch
107423         * modules/dup2-tests: New file.
107424         * tests/test-dup2.c: Likewise.
107425         * tests/test-open.c (main): Avoid unspecified behavior.
107426         * tests/test-pipe.c (child_main): Use dup2 semantics to simplify
107427         test.
107429         dup2: work around mingw and cygwin 1.5 bug
107430         * m4/dup2.m4 (gl_FUNC_DUP2): Detect mingw bug.
107431         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add witness.
107432         * modules/unistd (Makefile.am): Substitute it.
107433         * lib/unistd.in.h (dup2): Declare the replacement.
107434         * lib/dup2.c (dup2) [REPLACE_DUP2]: Implement it.
107435         * doc/posix-functions/dup2.texi (dup2): Document the bugs.
107436         * lib/fchdir.c (rpl_dup2): Don't collide with mingw replacement.
107437         * modules/execute (Depends-on): Add dup2.
107438         * modules/fseterr (Depends-on): Likewise.
107439         * modules/pipe (Depends-on): Likewise.
107440         * modules/posix_spawn-internal (Depends-on): Likewise.
107442 2009-07-21  Bruno Haible  <bruno@clisp.org>
107444         * modules/.gitattributes: New file.
107446 2009-07-20  Bruno Haible  <bruno@clisp.org>
107448         * tests/test-pipe.c (BACKUP_STDERR_FILENO): New macro.
107449         (main): Use it.
107451 2009-07-20  Eric Blake  <ebb9@byu.net>
107453         test-pipe: make a bit more robust.
107454         * tests/test-pipe.c (myerr): Allow error messages regardless of
107455         what we do to stderr.
107456         (test_pipe): Rearrange to avoid deadlock.
107457         (child_main): Try a larger read, to ensure we avoided deadlock.
107458         * lib/pipe.c (create_pipe) [_WIN32]: Fix comment.
107459         * lib/pipe.h (create_pipe_bidi): Document potential for deadlock
107460         if misused.
107462 2009-07-19  Jim Meyering  <meyering@redhat.com>
107464         fts: avoid false-positive cycle-detection
107465         * lib/fts.c (fts_read): Reinitialize cycle-detection data structures
107466         for each new command line argument.
107468 2009-07-19  Bruno Haible  <bruno@clisp.org>
107470         Fix build error on mingw with the modules sys_select and unistd.
107471         * modules/acl-tests (Depends-on): Add close.
107472         * modules/binary-io-tests (Depends-on): Likewise.
107473         * modules/closein-tests (Depends-on): Likewise.
107474         * modules/flock-tests (Depends-on): Likewise.
107475         * modules/fsync-tests (Depends-on): Likewise.
107476         * modules/lseek-tests (Depends-on): Likewise.
107477         * modules/pipe-tests (Depends-on): Likewise.
107478         * modules/posix_spawn-tests (Depends-on): Likewise.
107479         * modules/posix_spawnp-tests (Depends-on): Likewise.
107480         * modules/stat-time-tests (Depends-on): Likewise.
107481         * modules/yesno-tests (Depends-on): Likewise.
107483 2009-07-19  Bruno Haible  <bruno@clisp.org>
107485         Unify conditionals.
107486         * lib/pipe.h: Detect native Win32 by looking at _WIN32 and __WIN32__
107487         macros, not at the compiler macros.
107488         * lib/pipe.c: Likewise.
107489         * lib/execute.c: Likewise.
107490         * lib/spawni.c: Likewise.
107492 2009-07-19  Bruno Haible  <bruno@clisp.org>
107494         Fix handling of closed stdin/stdout/stderr on mingw.
107495         * lib/w32spawn.h: Include unistd.h.
107496         (dup_noinherit): Return -1 if the old handle is invalid. Allocate new
107497         file descriptor with O_NOINHERIT flag.
107498         (fd_safer_noinherit): New function, based on fd-safer.c.
107499         (dup_safer_noinherit): New function, based on dup-safer.c.
107500         (undup_safer_noinherit): New function.
107501         * lib/execute.c (execute) [WIN32]: Use dup_safer_noinherit instead of
107502         dup_noinherit. Use undup_safer_noinherit instead of dup2 and close.
107503         * lib/pipe.c (create_pipe) [WIN32]: Likewise. Use fd_safer_noinherit
107504         instead of fd_safer.
107505         * tests/test-pipe.c: Include <windows.h>.
107506         (child_main) [WIN32]: Test the handle of STDERR_FILENO, not its close()
107507         result.
107509         * tests/test-pipe.c (child_main, parent_main): New functions, extracted
107510         from main.
107511         (test_pipe): Pass an extra argument for disambiguation.
107512         (main): Invoke parent_main or child_main.
107514         * tests/test-pipe.c (test_pipe): Pass slave_process = true argument
107515         consistently.
107517 2009-07-18  Eric Blake  <ebb9@byu.net>
107519         test-pipe: fix mingw build
107520         * tests/test-pipe.c (main): Avoid fcntl on mingw.
107522 2009-07-18  Bruno Haible  <bruno@clisp.org>
107524         * modules/pipe-tests (Makefile.am): Fix typo.
107526 2009-07-18  Eric Blake  <ebb9@byu.net>
107528         error: fix mingw build
107529         * lib/error.c (error, error_at_line): Avoid fcntl on mingw.
107530         Reported by Bruno Haible.
107532         error: avoid undefined use of stdout
107533         * lib/error.c (error, error_at_line): Check that fd 1 is open
107534         before flushing stdout.  Avoids a crash on cygwin when libsigsegv
107535         is handling faults and the close_stdout module wants to report the
107536         detection of closed stdout as an error.
107538 2009-07-17  Eric Blake  <ebb9@byu.net>
107540         pipe: be robust in face of closed fds
107541         * lib/pipe.c (create_pipe): Closed standard descriptors in parent
107542         should cause child to misbehave.
107543         * modules/pipe-tests: New module.
107544         * tests/test-pipe.c: New file.
107545         * tests/test-pipe.sh: New file.
107546         Reported by Akim Demaille.
107548 2009-07-14  Bruno Haible  <bruno@clisp.org>
107550         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Guess it works on glibc systems.
107551         Reported by anonymous kc.
107553 2009-07-07  Jim Meyering  <meyering@redhat.com>
107555         maint.mk: don't look for translatable strings in *.m4 or *.mk
107556         * top/maint.mk (sc_po_check): Skip *.m4 and *.mk files,
107557         when searching for translatable strings.
107559 2009-07-05  Jim Meyering  <meyering@redhat.com>
107561         remove superfluous parentheses in STREQ definition
107562         * tests/test-argv-iter.c (STREQ): Remove redundant parentheses.
107563         * lib/getugroups.c (STREQ): Likewise.
107564         * lib/fnmatch.c (STREQ): Likewise.
107565         Spotted by Bruno Haible.
107567 2009-07-04  Jim Meyering  <meyering@redhat.com>
107569         argv-iter: new module
107570         * MODULES.html.sh: Add argv-iter.
107571         * lib/argv-iter.c, lib/argv-iter.h: New files.
107572         * modules/argv-iter: New file.
107573         * modules/argv-iter-tests: New file.
107574         * tests/test-argv-iter.c: Test it.
107576 2009-07-04  Bruno Haible  <bruno@clisp.org>
107578         Fix assertion.
107579         * lib/git-merge-changelog.c (compute_mapping): In the case where file1
107580         contains more exact copies of a given entry than file2, leave the extra
107581         copies unpaired rather than aborting.
107582         Reported by Eric Blake.
107584 2009-07-02  Bruno Haible  <bruno@clisp.org>
107586         Speedup git-merge-changelog for git cherry-pick.
107587         * lib/git-merge-changelog.c (struct entries_mapping): New type.
107588         (entries_mapping_get): New function, extracted from compute_mapping.
107589         (entries_mapping_reverse_get): New function.
107590         (compute_mapping): Add a 'full' argument. Return the result in a
107591         'struct entries_mapping'.
107592         (main): Update. Access the mappings through entries_mapping_get.
107593         Reported by Eric Blake.
107595 2009-07-02  Bruno Haible  <bruno@clisp.org>
107597         * lib/git-merge-changelog.c (compute_mapping): Fix determination of
107598         best_i.
107600 2009-07-02  Bruno Haible  <bruno@clisp.org>
107602         Speed up approximate search for matching ChangeLog entries.
107603         * lib/git-merge-changelog.c (entry_fstrcmp): Add a lower_bound
107604         argument. Call fstrcmp_bounded instead of fstrcmp.
107605         (compute_mapping, try_split_merged_entry, main): Update callers.
107607 2009-07-02  Bruno Haible  <bruno@clisp.org>
107609         * lib/git-merge-changelog.c (main): Add comment about git cherry-pick.
107611 2009-06-30  Bruno Haible  <bruno@clisp.org>
107613         Reduce the number of uc_is_cased calls.
107614         * lib/unicase.h (casing_suffix_context_t): Add
107615         'first_char_except_ignorable' field.
107616         * lib/unicase/context.h (SCC_FINAL_SIGMA_MASK): Remove macro.
107617         (SCC_MORE_ABOVE_MASK, SCC_BEFORE_DOT_MASK): Update.
107618         * lib/unicase/empty-suffix-context.c (unicase_empty_suffix_context):
107619         Update initializer.
107620         * lib/unicase/u-casemap.h (FUNC): Don't invoke uc_is_cased on
107621         case-ignorable characters.
107622         * lib/unicase/u-ct-totitle.h (FUNC): Likewise.
107623         * lib/unicase/u-suffix-context.h (FUNC2): Don't call uc_is_cased here.
107624         * modules/unicase/u8-suffix-context (Depends-on): Remove unicase/cased.
107625         * modules/unicase/u16-suffix-context (Depends-on): Likewise.
107626         * modules/unicase/u32-suffix-context (Depends-on): Likewise.
107628 2009-06-30  Bruno Haible  <bruno@clisp.org>
107630         Tests for module 'unicase/ignorable'.
107631         * modules/unicase/ignorable-tests: New file.
107632         * tests/unicase/test-ignorable.c: New file, generated by
107633         gen-uni-tables.
107635         Tests for module 'unicase/cased'.
107636         * modules/unicase/cased-tests: New file.
107637         * tests/unicase/test-cased.c: New file, generated by gen-uni-tables.
107638         * tests/unicase/test-predicate-part1.h: New file, derived from
107639         tests/unictype/test-predicate-part1.h.
107640         * tests/unicase/test-predicate-part2.h: New file, same as
107641         tests/unictype/test-predicate-part2.h.
107643         Fix evaluation of "Before C" condition of FINAL_SIGMA.
107644         * lib/gen-uni-tables.c (is_cased, is_case_ignorable): New functions.
107645         (output_casing_properties): New function.
107646         (main): Call it.
107647         * lib/unicase/cased.h: New file, generated by gen-uni-tables.
107648         * lib/unicase/cased.c: Include unictype/bitmap.h.
107649         (uc_is_cased): Define through a bitmap lookup.
107650         * lib/unicase/ignorable.h: New file, generated by gen-uni-tables.
107651         * lib/unicase/ignorable.c: Include unictype/bitmap.h.
107652         (uc_is_case_ignorable): Define through a bitmap lookup.
107653         * modules/unicase/cased (Files): Add lib/unicase/cased.h,
107654         lib/unictype/bitmap.h.
107655         (Depends-on): Add inline. Clean up.
107656         * modules/unicase/ignorable (Files): Add lib/unicase/ignorable.h,
107657         lib/unictype/bitmap.h.
107658         (Depends-on): Add inline. Clean up.
107659         * tests/unicase/test-u8-tolower.c (main): Add more tests of FINAL_SIGMA
107660         recognition.
107661         * tests/unicase/test-u16-tolower.c (main): Likewise.
107662         * tests/unicase/test-u32-tolower.c (main): Likewise.
107664 2009-06-30  Bruno Haible  <bruno@clisp.org>
107666         * lib/unicase/u8-casemap.c: Don't include uniwbrk.h.
107667         * lib/unicase/u16-casemap.c: Likewise.
107668         * lib/unicase/u32-casemap.c: Likewise.
107670 2009-06-29  Bruno Haible  <bruno@clisp.org>
107672         Define u32_casefold as a wrapper around u32_ct_casefold.
107673         * lib/unicase/u32-casefold.c: Update.
107674         * modules/unicase/u32-casefold (Depends-on): Add
107675         unicase/u32-ct-casefold, unicase/empty-prefix-context,
107676         unicase/empty-suffix-context. Clean up.
107678         Define u16_casefold as a wrapper around u16_ct_casefold.
107679         * lib/unicase/u16-casefold.c: Update.
107680         * modules/unicase/u16-casefold (Depends-on): Add
107681         unicase/u16-ct-casefold, unicase/empty-prefix-context,
107682         unicase/empty-suffix-context. Clean up.
107684         Define u8_casefold as a wrapper around u8_ct_casefold.
107685         * lib/unicase/u-casefold.h (FUNC): Delegate to U_CT_CASEFOLD.
107686         * lib/unicase/u8-casefold.c: Update.
107687         * modules/unicase/u8-casefold (Depends-on): Add unicase/u8-ct-casefold,
107688         unicase/empty-prefix-context, unicase/empty-suffix-context. Clean up.
107690         Define u32_totitle as a wrapper around u32_ct_totitle.
107691         * lib/unicase/u32-totitle.c: Update.
107692         * modules/unicase/u32-totitle (Depends-on): Add unicase/u32-ct-totitle,
107693         unicase/empty-prefix-context, unicase/empty-suffix-context. Clean up.
107695         Define u16_totitle as a wrapper around u16_ct_totitle.
107696         * lib/unicase/u16-totitle.c: Update.
107697         * modules/unicase/u16-totitle (Depends-on): Add unicase/u16-ct-totitle,
107698         unicase/empty-prefix-context, unicase/empty-suffix-context. Clean up.
107700         Define u8_totitle as a wrapper around u8_ct_totitle.
107701         * lib/unicase/u-totitle.h (is_cased, is_case_ignorable): Remove
107702         functions.
107703         (FUNC): Delegate to U_CT_TOTITLE.
107704         * lib/unicase/u8-totitle.c: Update.
107705         * modules/unicase/u8-totitle (Depends-on): Add unicase/u8-ct-totitle,
107706         unicase/empty-prefix-context, unicase/empty-suffix-context. Clean up.
107708         * lib/unicase/u32-tolower.c (u32_tolower): Update u32_casemap
107709         invocation.
107710         * modules/unicase/u32-tolower (Depends-on): Add
107711         unicase/empty-prefix-context, unicase/empty-suffix-context.
107713         * lib/unicase/u16-tolower.c (u16_tolower): Update u16_casemap
107714         invocation.
107715         * modules/unicase/u16-tolower (Depends-on): Add
107716         unicase/empty-prefix-context, unicase/empty-suffix-context.
107718         * lib/unicase/u8-tolower.c (u8_tolower): Update u8_casemap invocation.
107719         * modules/unicase/u8-tolower (Depends-on): Add
107720         unicase/empty-prefix-context, unicase/empty-suffix-context.
107722         * lib/unicase/u32-toupper.c (u32_toupper): Update u32_casemap
107723         invocation.
107724         * modules/unicase/u32-toupper (Depends-on): Add
107725         unicase/empty-prefix-context, unicase/empty-suffix-context.
107727         * lib/unicase/u16-toupper.c (u16_toupper): Update u16_casemap
107728         invocation.
107729         * modules/unicase/u16-toupper (Depends-on): Add
107730         unicase/empty-prefix-context, unicase/empty-suffix-context.
107732         * lib/unicase/u8-toupper.c (u8_toupper): Update u8_casemap invocation.
107733         * modules/unicase/u8-toupper (Depends-on): Add
107734         unicase/empty-prefix-context, unicase/empty-suffix-context.
107736         New module 'unicase/u32-ct-casefold'.
107737         * lib/unicase/u32-ct-casefold.c: New file.
107738         * modules/unicase/u32-ct-casefold: New file.
107740         New module 'unicase/u16-ct-casefold'.
107741         * lib/unicase/u16-ct-casefold.c: New file.
107742         * modules/unicase/u16-ct-casefold: New file.
107744         New module 'unicase/u8-ct-casefold'.
107745         * lib/unicase/u8-ct-casefold.c: New file.
107746         * lib/unicase/u-ct-casefold.h: New file, derived from
107747         lib/unicase/u-casefold.h.
107748         * modules/unicase/u8-ct-casefold: New file.
107750         New module 'unicase/u32-ct-totitle'.
107751         * lib/unicase/u32-ct-totitle.c: New file.
107752         * modules/unicase/u32-ct-totitle: New file.
107754         New module 'unicase/u16-ct-totitle'.
107755         * lib/unicase/u16-ct-totitle.c: New file.
107756         * modules/unicase/u16-ct-totitle: New file.
107758         New module 'unicase/u8-ct-totitle'.
107759         * lib/unicase/u8-ct-totitle.c: New file.
107760         * lib/unicase/u-ct-totitle.h: New file, derived from
107761         lib/unicase/u-totitle.h.
107762         * modules/unicase/u8-ct-totitle: New file.
107764         New module 'unicase/u32-ct-tolower'.
107765         * lib/unicase/u32-ct-tolower.c: New file.
107766         * modules/unicase/u32-ct-tolower: New file.
107768         New module 'unicase/u16-ct-tolower'.
107769         * lib/unicase/u16-ct-tolower.c: New file.
107770         * modules/unicase/u16-ct-tolower: New file.
107772         New module 'unicase/u8-ct-tolower'.
107773         * lib/unicase/u8-ct-tolower.c: New file.
107774         * modules/unicase/u8-ct-tolower: New file.
107776         New module 'unicase/u32-ct-toupper'.
107777         * lib/unicase/u32-ct-toupper.c: New file.
107778         * modules/unicase/u32-ct-toupper: New file.
107780         New module 'unicase/u16-ct-toupper'.
107781         * lib/unicase/u16-ct-toupper.c: New file.
107782         * modules/unicase/u16-ct-toupper: New file.
107784         New module 'unicase/u8-ct-toupper'.
107785         * lib/unicase/u8-ct-toupper.c: New file.
107786         * modules/unicase/u8-ct-toupper: New file.
107788         Add context arguments to u*_casemap functions.
107789         * lib/unicase/unicasemap.h: Include unicase.h.
107790         (u8_casemap, u16_casemap, u32_casemap): Add prefix_context and
107791         suffix_context arguments.
107792         * lib/unicase/u-casemap.h (is_cased, is_case_ignorable): Remove
107793         functions.
107794         (FUNC): Add prefix_context and suffix_context arguments. Use
107795         uc_is_cased and uc_is_case_ignorable.
107796         * lib/unicase/u8-casemap.c: Include caseprop.h and context.h.
107797         * lib/unicase/u16-casemap.c: Likewise.
107798         * lib/unicase/u32-casemap.c: Likewise.
107799         * modules/unicase/u8-casemap (Files): Add lib/unicase/context.h.
107800         (Depends-on): Add unicase/cased, unicase/ignorable. Clean up.
107801         * modules/unicase/u16-casemap (Files): Add lib/unicase/context.h.
107802         (Depends-on): Add unicase/cased, unicase/ignorable. Clean up.
107803         * modules/unicase/u32-casemap (Files): Add lib/unicase/context.h.
107804         (Depends-on): Add unicase/cased, unicase/ignorable. Clean up.
107806         New module 'unicase/u32-suffix-context'.
107807         * lib/unicase/u32-suffix-context.c: New file.
107808         * modules/unicase/u32-suffix-context: New file.
107810         New module 'unicase/u16-suffix-context'.
107811         * lib/unicase/u16-suffix-context.c: New file.
107812         * modules/unicase/u16-suffix-context: New file.
107814         New module 'unicase/u8-suffix-context'.
107815         * lib/unicase/u8-suffix-context.c: New file.
107816         * lib/unicase/u-suffix-context.h: New file.
107817         * modules/unicase/u8-suffix-context: New file.
107819         New module 'unicase/empty-suffix-context'.
107820         * lib/unicase/empty-suffix-context.c: New file.
107821         * modules/unicase/empty-suffix-context: New file.
107823         New module 'unicase/u32-prefix-context'.
107824         * lib/unicase/u32-prefix-context.c: New file.
107825         * modules/unicase/u32-prefix-context: New file.
107827         New module 'unicase/u16-prefix-context'.
107828         * lib/unicase/u16-prefix-context.c: New file.
107829         * modules/unicase/u16-prefix-context: New file.
107831         New module 'unicase/u8-prefix-context'.
107832         * lib/unicase/u8-prefix-context.c: New file.
107833         * lib/unicase/u-prefix-context.h: New file.
107834         * lib/unicase/context.h: New file.
107835         * modules/unicase/u8-prefix-context: New file.
107837         New module 'unicase/empty-prefix-context'.
107838         * lib/unicase/empty-prefix-context.c: New file.
107839         * modules/unicase/empty-prefix-context: New file.
107841         New module 'unicase/ignorable'.
107842         * lib/unicase/ignorable.c: New file.
107843         * modules/unicase/ignorable: New file.
107845         New module 'unicase/cased'.
107846         * lib/unicase/caseprop.h: New file.
107847         * lib/unicase/cased.c: New file.
107848         * modules/unicase/cased: New file.
107850         New functions for case mapping of substrings.
107851         * lib/unicase.h (casing_prefix_context_t): New type.
107852         (unicase_empty_prefix_context): New variable.
107853         (u8_casing_prefix_context, u16_casing_prefix_context,
107854         u32_casing_prefix_context, u8_casing_prefixes_context,
107855         u16_casing_prefixes_context, u32_casing_prefixes_context): New
107856         declarations.
107857         (casing_suffix_context_t): New type.
107858         (unicase_empty_suffix_context): New variable.
107859         (u8_casing_suffix_context, u16_casing_suffix_context,
107860         u32_casing_suffix_context, u8_casing_suffixes_context,
107861         u16_casing_suffixes_context, u32_casing_suffixes_context,
107862         u8_ct_toupper, u16_ct_toupper, u32_ct_toupper, u8_ct_tolower,
107863         u16_ct_tolower, u32_ct_tolower, u8_ct_totitle, u16_ct_totitle,
107864         u32_ct_totitle, u8_ct_casefold, u16_ct_casefold, u32_ct_casefold): New
107865         declarations.
107867 2009-06-28  Jim Meyering  <meyering@redhat.com>
107869         boostrap: indent only with spaces
107870         * build-aux/bootstrap: Indent only with spaces, never TABs.
107872         bootstrap: split long lines
107873         * build-aux/bootstrap: Keep line length < 80.
107875         bootstrap: sync from coreutils
107876         * build-aux/bootstrap: Honor variables like $ACLOCAL, etc.,
107877         just as autoreconf does.  Verify a list of prerequisite
107878         package-name,version-number pairs if defined in bootstrap.conf.
107879         Refer to README-prereq, if prerequisites are not satisfied.
107881 2009-06-27  Eric Blake  <ebb9@byu.net>
107883         tests: add test for bogus NULL definition
107884         * tests/test-stdio.c: Ensure POSIX 2008 requirement on NULL.
107885         * tests/test-stdlib.c: Likewise.
107886         * tests/test-string.c: Likewise.
107887         * tests/test-locale.c: Likewise.
107888         * tests/test-unistd.c: Likewise.
107889         * modules/stdio-tests (Depends-on): Add verify.
107890         * modules/stdlib-tests (Depends-on): Likewise.
107891         * modules/string-tests (Depends-on): Likewise.
107892         * modules/locale-tests (Depends-on): Likewise.
107893         * modules/unistd-tests (Depends-on): Likewise.
107895 2009-06-27  Paolo Bonzini  <bonzini@gnu.org>
107897         * m4/selinux-context-h (gl_HEADERS_SELINUX_CONTEXT_H): Remove
107898         self-explaining comment.
107899         * m4/selinux-selinux-h: Update serial.
107900         (gl_LIBSELINUX): New macro, adding a warning for missing development
107901         packages to code extracted from...
107902         (gl_HEADERS_SELINUX_SELINUX_H): ... this one.  Require gl_LIBSELINUX.
107903         Add warning for missing development packages here, too.
107905 2009-06-26  Paolo Bonzini  <bonzini@gnu.org>
107907         * build-aux/bootstrap: Do not use GIT_CONFIG_LOCAL.
107909 2009-06-25  Eric Blake  <ebb9@byu.net>
107911         version-etc: fix regression
107912         * lib/version-etc.h (ATTRIBUTE_SENTINEL): Define for new enough
107913         gcc.
107914         (version_etc): Use it, to catch bugs with trailing NULL.
107915         * lib/version-etc.c (version_etc_arn): Delete unused argument.
107916         (version_etc_va): Fix logic bug.
107917         * modules/version-etc-tests: Add test.
107918         * tests/test-version-etc.c: New file.
107919         * tests/test-version-etc.sh: Likewise.
107921 2009-06-25  Sam Steingold  <sds@gnu.org>
107923         * mbrtowc.m4 (gl_MBRTOWC_SANITYCHECK): Include <stdlib.h>, for the
107924         mbtowc declaration.
107926 2009-06-25  Eric Blake  <ebb9@byu.net>
107928         fpurge: migrate into <stdio.h>
107929         * lib/fpurge.h: Delete...
107930         * lib/stdio.in.h (fpurge): ...and declare here, instead.
107931         * lib/fpurge.c (fpurge): Change declaring header.
107932         * modules/fpurge (Files): Drop deleted file.
107933         (Depends-on): Add stdio.
107934         (configure.ac): Set witness.
107935         * modules/stdio (Makefile.am): Support fpurge macros.
107936         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Likewise.
107937         * m4/fpurge.m4 (gl_FUNC_FPURGE): Set appropriate variables.
107938         * lib/fflush.c: Update client.
107939         * tests/test-fpurge.c: Likewise.
107940         * NEWS: Mention the change.
107942 2009-06-25  Sergey Poznyakoff  <gray@gnu.org.ua>
107944         * lib/argp-version-etc.c (program_authors): Add const
107945         qualifier.
107946         * lib/version-etc.c: Fix typos in the comments.
107947         * modules/argp-version-etc: Depends on version-etc.
107949 2009-06-25  Sergey Poznyakoff  <gray@gnu.org.ua>
107951         argp-version-etc: new module.
107953         * lib/argp-version-etc.c: New file.
107954         * lib/argp-version-etc.h: New file.
107955         * modules/argp-version-etc: New file.
107956         * modules/argp-version-etc-tests: New file.
107957         * tests/test-argp-version-etc.c: New test.
107958         * tests/test-argp-version-etc-1.sh: New test.
107960 2009-06-25  Sergey Poznyakoff  <gray@gnu.org.ua>
107962         Provide additional interfaces and documentation for version-etc
107963         module.
107965         * lib/version-etc.c (version_etc_arn, version_etc_ar): New
107966         interfaces.
107967         * lib/version-etc.h (version_etc_arn, version_etc_ar): New
107968         prototypes.
107970 2009-06-24  Bruno Haible  <bruno@clisp.org>
107972         * m4/lib-link.m4 (AC_LIB_HAVE_LINKFLAGS): Fix description of
107973         HAVE_LIB${NAME} macro.
107974         Reported by Sam Steingold <sds@gnu.org>.
107976 2009-06-23  Simon Josefsson  <simon@josefsson.org>
107978         * modules/hash-tests (test_hash_LDADD): Link to libintl when
107979         needed.
107981 2009-06-21  Bruno Haible  <bruno@clisp.org>
107983         Make two consecutive identical invocations of AC_LIB_HAVE_LINKFLAGS
107984         work.
107985         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Reset HAVE_LIB${NAME}
107986         together with LIB${NAME}, LTLIB${NAME}.
107987         Reported by Sam Steingold <sds@gnu.org>.
107989 2009-06-20  Jim Meyering  <meyering@redhat.com>
107991         tests: make sc_require_test_exit_idiom more generic
107992         * top/maint.mk (Exit_witness_file): New overridable variable.
107993         (sc_require_test_exit_idiom): Don't hard-code tests/test-lib.sh.
107994         Relax test for /^Exit \$fail$$/ to just /^Exit ./.
107996 2009-06-19  Jim Meyering  <meyering@redhat.com>
107998         hash: reverse order of src/dst parameters in an internal interface
107999         * lib/hash.c (transfer_entries): Reverse order of parameters to
108000         put DST before SRC.  Adjust callers.
108002         tests: test-hash: avoid wholesale duplication
108003         * tests/test-hash.c (main): Don't copy/paste a 60-line loop.
108004         Instead, use a loop and add a single conditional.
108006         tests: test-hash: allow seed selection via a command line argument
108007         * tests/test-hash.c (get_seed): New function.
108008         (main): Use it.
108010 2009-06-19  Eric Blake  <ebb9@byu.net>
108012         hash: avoid memory leak on allocation failure
108013         * lib/hash.c: (hash_rehash): Avoid memory leak on allocation
108014         failure.  Factor repeated algorithm...
108015         (transfer_entries): ...into new helper routine.
108016         (hash_delete): React to hash_rehash return value.
108018         hash: reduce memory pressure in hash_rehash no-op case
108019         * lib/hash.c (next_prime): Avoid overflow.
108020         (hash_initialize): Factor bucket size computation...
108021         (compute_bucket_size): ...into new helper function.
108022         (hash_rehash): Use new function and open coding to reduce memory
108023         pressure, and avoid a memory leak in USE_OBSTACK code.
108024         Reported by Jim Meyering.
108026 2009-06-18  Eric Blake  <ebb9@byu.net>
108028         hash: make rotation more obvious
108029         * modules/hash (Depends-on): Add bitrotate and stdint.
108030         * lib/bitrotate.h (rotl_sz, rotr_sz): New functions.
108031         * lib/hash.c (headers): Drop limits.h.  Add stdint.h.
108032         (SIZE_MAX): Rely on headers for definition.
108033         (hash_string) [USE_DIFF_HASH]: Use rotl_sz.
108034         (raw_hasher): Use rotr_sz.
108035         Suggested by Jim Meyering.
108037         hash: fix memory leak in last patch
108038         * lib/hash.c (hash_rehash): Avoid memory leak.
108040         hash: avoid no-op rehashing
108041         * lib/hash.c (hash_rehash): Recognize useless rehash attempts.
108043         hash: provide default callback functions
108044         * lib/hash.c (raw_hasher, raw_comparator): New functions.
108045         (hash_initialize): Use them as defaults.
108046         * tests/test-hash.c (main): Test this.
108048         hash: minor optimization
108049         * lib/hash.c (hash_lookup, hash_find_entry): Avoid function call
108050         when possible.
108051         (hash_initialize): Document this promise.
108052         (hash_do_for_each, hash_clear, hash_free): Use C89 syntax.
108053         * tests/test-hash.c (hash_compare_strings): Test this.
108055 2009-06-18  Bruno Haible  <bruno@clisp.org>
108057         * m4/strstr.m4 (gl_FUNC_STRSTR): Skip linear time test if strstr is
108058         going to be replaced anyway.
108060 2009-06-18  Bruno Haible  <bruno@clisp.org>
108062         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR_SIMPLE): Invoke AC_LIBOBJ only
108063         in one place.
108064         (gl_FUNC_STRCASESTR): Skip linear time test if strcasestr is going to
108065         be replaced anyway.
108067 2009-06-18  Eric Blake  <ebb9@byu.net>
108069         hash: check for resize before insertion
108070         * lib/hash.c (hash_insert): Check whether bucket usage exceeds
108071         threshold before insertion, so that a pathological hash_rehash
108072         that fills every bucket can still trigger another rehash.
108074 2009-06-18  Jim Meyering  <meyering@redhat.com>
108076         hash-tests: add a loop around the small tests
108077         * tests/test-hash.c (main): Repeat small tests with selected
108078         small initial table sizes.
108080 2009-06-17  Eric Blake  <ebb9@byu.net>
108082         hash: minor cleanups
108083         * lib/hash.h (hash_entry): Make opaque, by moving...
108084         * lib/hash.c (hash_entry): ...here.
108085         (hash_insert): Clarify restrictions on what can be inserted.
108086         (hash_get_next): Clarify when it is safe to remove an element
108087         during traversal.
108088         (check_tuning): Skip verification when tuning is known safe.
108089         (hash_initialize): Clarify restrictions on tuning.
108091 2009-06-17  Jim Meyering  <jim@meyering.net>
108092         and Eric Blake  <ebb9@byu.net>
108094         hash-tests: new module
108095         * modules/hash-tests: New file.
108096         * tests/test-hash.c: New file.
108098 2009-06-17  Eric Blake  <ebb9@byu.net>
108100         strstr-simple: document new module
108101         * MODULES.html.sh: Document new module.
108103         strstr, strcasestr: replace on platforms with broken memchr
108104         * modules/strstr: Split into...
108105         * modules/strstr-simple: ...new module that does not care about
108106         performance, but does care about glibc bug.
108107         * m4/strstr.m4 (gl_FUNC_STRSTR): Split...
108108         (gl_FUNC_STRSTR_SIMPLE): ...into new macro, which replaces strstr
108109         if platform memchr is broken, per Debian bug 521737.
108110         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR_SIMPLE): React to broken
108111         memchr.
108112         * m4/memchr.m4 (gl_FUNC_MEMCHR): Only expand once.
108113         * doc/posix-functions/strstr.texi (strstr): Document the fix.
108114         * doc/glibc-functions/strcasestr.texi (strcasestr): Likewise.
108115         * modules/mountlist (Depends-on): Add strstr-simple.
108116         * modules/gen-uni-tables (Depends-on): Likewise.
108117         * modules/argz (Depends-on): Add strstr.
108119 2009-06-17  Bruno Haible  <bruno@clisp.org>
108121         * modules/posix_spawn-internal (Depends-on): Add errno.
108123 2009-06-17  Bruno Haible  <bruno@clisp.org>
108125         Define missing ESTALE on Interix 3.5.
108126         * lib/errno.in.h (ESTALE): Assign a value if missing.
108127         * lib/strerror.c (rpl_strerror): Handle missing ESTALE and ECANCELED.
108128         * m4/errno_h.m4 (gl_HEADER_ERRNO_H): Also test whether ESTALE is
108129         missing.
108130         * doc/posix-headers/errno.texi: Mention the Interix bug.
108131         Reported by Jay Krell <jay.krell@cornell.edu> via Eric Blake.
108133 2009-06-15  Eric Blake  <ebb9@byu.net>
108135         memchr, memchr2: add valgrind exception
108136         * lib/memchr.valgrind: New file.
108137         * lib/memchr2.valgrind: New file.
108138         * modules/memchr (Files): Distribute valgrind file.
108139         * modules/memchr2 (Files): Likewise.
108141         docs: memchr is no longer obsolete
108142         * MODULES.html.sh: Move memchr from obsolete to string.h section.
108143         * lib/string.in.h (memchr): Simplify logic.
108145 2009-06-14  Jim Meyering  <meyering@redhat.com>
108147         link-follow: fix the "checking..." message to not mention trailing slash
108148         * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): This test has
108149         never considered trailing slashes.
108151 2009-06-14  Bruno Haible  <bruno@clisp.org>
108153         * m4/memchr.m4: Mention also the bug on IA-64.
108154         * doc/posix-functions/memchr.texi: Likewise.
108156 2009-06-12  Eric Blake  <ebb9@byu.net>
108158         memchr: detect broken x86_64 and alpha implementations
108159         * modules/memchr-tests (Depends-on): Move mmap detection...
108160         * modules/memchr (Depends-on): ...here.
108161         (configure.ac): Set indicator.
108162         * lib/string.in.h (memchr): Declare replacement.
108163         * modules/string (Makefile.am): Trigger replacement.
108164         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Likewise.
108165         * m4/memchr.m4 (gl_FUNC_MEMCHR): Use mmap to detect platform
108166         bugs.
108167         * doc/posix-functions/memchr.texi (memchr): Document the bug.
108168         * modules/getpagesize (License): Relax license.
108170 2009-06-11  Bruno Haible  <bruno@clisp.org>
108172         * lib/idpriv.h: Add more references.
108174 2009-06-08  Bruno Haible  <bruno@clisp.org>
108176         Tests for module 'idpriv-droptemp'.
108177         * modules/idpriv-droptemp-tests: New file.
108178         * tests/test-idpriv-droptemp.sh: New file.
108179         * tests/test-idpriv-droptemp.su.sh: New file.
108180         * tests/test-idpriv-droptemp.c: New file.
108182         New module 'idpriv-droptemp'.
108183         * lib/idpriv-droptemp.c: New file.
108184         * modules/idpriv-droptemp: New file.
108186 2009-06-08  Bruno Haible  <bruno@clisp.org>
108188         Tests for module 'idpriv-drop'.
108189         * modules/idpriv-drop-tests: New file.
108190         * tests/test-idpriv-drop.sh: New file.
108191         * tests/test-idpriv-drop.su.sh: New file.
108192         * tests/test-idpriv-drop.c: New file.
108194         New module 'idpriv-drop'.
108195         * lib/idpriv.h: New file.
108196         * lib-idpriv-drop.c: New file.
108197         * m4/idpriv.m4: New file.
108198         * modules/idpriv-drop: New file.
108200 2009-06-08  Bruno Haible  <bruno@clisp.org>
108202         * modules/unistdio/u8-vasnprintf (Depends-on): Add memchr.
108203         * modules/unistdio/u8-u8-vasnprintf (Depends-on): Likewise.
108204         * modules/unistdio/u16-vasnprintf (Depends-on): Likewise.
108205         * modules/unistdio/u16-u16-vasnprintf (Depends-on): Likewise.
108206         * modules/unistdio/u32-vasnprintf (Depends-on): Likewise.
108207         * modules/unistdio/u32-u32-vasnprintf (Depends-on): Likewise.
108208         * modules/unistdio/ulc-vasnprintf (Depends-on): Likewise.
108210 2009-06-08  Eric Blake  <ebb9@byu.net>
108212         test-strstr: use memory fence, when possible
108213         * tests/test-strstr.c (main): Use memory fence, in order to be
108214         more likely to trigger Debian bug 521737.
108215         * modules/strstr-tests (Files): Pull in additional files.
108217         memchr: no longer obsolete, for wider field testing
108218         * modules/memchr (Status, Notice): Delete, this module is no
108219         longer obsolete.
108220         * modules/vasnprintf (Depends-on): Add memchr.
108222 2009-06-07  Jim Meyering  <meyering@redhat.com>
108224         hash: declare some functions with the warn_unused_result attribute
108225         * lib/hash.h (__attribute__, ATTRIBUTE_WUR): Define.
108227 2009-06-07  Bruno Haible  <bruno@clisp.org>
108229         * tests/test-alignof.c: Don't test int64_t if it does not exist.
108230         Reported by Eric Blake.
108232 2009-06-06  Eric Blake  <ebb9@byu.net>
108234         test-alignof: fix typo with long double
108235         * tests/test-alignof.c (CHECK): Use longdouble typedef to avoid
108236         compiler error.
108238 2009-06-06  Neil Jerram  <neil@ossau.uklinux.net>  (tiny change)
108240         Escape non-texinfo { and }s.
108241         * doc/ld-output-def.texi (Visual Studio Compatibility): Fix
108242         markup error.
108244 2009-06-04  Jim Meyering  <meyering@redhat.com>
108246         gitlog-to-changelog: don't infloop on an empty commit log
108247         * build-aux/gitlog-to-changelog: Warn about an empty log message.
108248         Reported by Boris Petersen <transacid@centerim.org>.
108250 2009-06-03  Mike Frysinger  <vapier@gentoo.org>
108252         version-etc: extend for packagers
108253         Add three new configure options, intended for packagers:
108254           --with-packager="packager name"
108255           --with-packager-version="packager-specific version"
108256           --with-packager-bug-reports="packager bug reporting"
108257         An example with coreutils:
108258           $ ./configure \
108259             --with-packager=Gentoo \
108260             --with-packager-bug-report=http://bugs.gentoo.org/ \
108261             --with-packager-version="patchset 1.6"
108262           $ ./src/ls --version | head -n2
108263           ls (GNU coreutils) 7.1-dirty
108264           Packaged by Gentoo (patchset 1.6)
108265         Note that the bug reporting info via --help doesn't show up because
108266         coreutils uses its own custom emit_bug_reporting_address() implementation
108267         in src/system.h.  If it didn't, it'd look like:
108268           $ ./src/ls --help | tail -n4
108269           Report bugs to <bug-coreutils@gnu.org>.
108270           Report Gentoo bugs to <http://bugs.gentoo.org/>.
108271           GNU coreutils home page: <http://www.gnu.org/software/coreutils/>.
108272           General help using GNU software: <http://www.gnu.org/gethelp/>.
108273         * lib/version-etc.c: Print new information, if provided.
108274         * m4/version-etc.m4: New file.
108275         * modules/version-etc (Files): Add m4/version-etc.m4.
108276         (configure.ac): Add gl_VERSION_ETC.
108278 2009-05-31  Bruno Haible  <bruno@clisp.org>
108280         * tests/test-alignof.c: Include <stdint.h>. Check also 'long double'
108281         and 'int64_t'.
108282         * modules/alignof-tests (Dependencies): Add stdint.
108283         Reported by Eric Blake.
108285 2009-05-31  Bruno Haible  <bruno@clisp.org>
108287         * lib/alignof.h (alignof_slot, alignof_type, alignof): Document
108288         restriction due to compiler bugs.
108289         Reported by Eric Blake.
108291 2009-05-31  Simon Josefsson  <simon@josefsson.org>
108292             Bruno Haible  <bruno@clisp.org>
108294         Fix test-alignof failure.
108295         * lib/alignof.h (alignof_slot): New macro.
108296         (alignof_type): New macro, with the same semantics as the previous
108297         'alignof'.
108298         (alignof): Alias to alignof_slot.
108299         * tests/test-alignof.c (CHECK): Check alignof_slot, not alignof. Also
108300         check that the results are usable as constant expressions.
108302 2009-05-31  Bruno Haible  <bruno@clisp.org>
108304         * tests/zerosize-ptr.h (zerosize_ptr): Specify more details.
108305         * tests/test-memchr.c (main): Check that memchr does not read past the
108306         first occurrence of the byte.
108307         * tests/test-strstr.c (main): Update comment.
108308         Suggested by Eric Blake.
108310 2009-05-30  Bruno Haible  <bruno@clisp.org>
108312         * doc/ld-output-def.texi (Visual Studio Compatibility): Explain in more
108313         detail how to use dumpbin.
108314         Reported by David Byron <dbyron@dbyron.com>.
108316 2009-06-02  Simon Josefsson  <simon@josefsson.org>
108318         * tests/test-parse-duration.sh: Don't use non-portable 'read -u3'.
108320 2009-06-02  Simon Josefsson  <simon@josefsson.org>
108322         * m4/manywarnings.m4: Add GCC 4.4 warnings.
108324 2009-05-28  Bruno Haible  <bruno@clisp.org>
108326         * gnulib-tool (func_import): Don't do HAVE_CONFIG_H replacements on
108327         build-aux/ files.
108329 2009-05-28  Simon Josefsson  <simon@josefsson.org>
108331         * gnulib-tool (func_import): Transform license on build-aux/ files too.
108333 2009-05-27  Simon Josefsson  <simon@josefsson.org>
108335         * gnulib-tool (sed_transform_main_lib_file)
108336         (sed_transform_testsrelated_lib_file): : Don't use non-POSIX
108337         regexps.
108339 2009-05-26  Simon Josefsson  <simon@josefsson.org>
108341         * tests/test-strstr.c: Add another self-test.
108342         * tests/test-strstr.c: Rewrite to use malloc/strcpy instead of
108343         strdup.  Suggested by Eric Blake  <ebb9@byu.net>.
108345 2009-05-23  Bruno Haible  <bruno@clisp.org>
108347         * doc/havelib.texi (AC_LIB_HAVE_LINKFLAGS): Update for 2009-04-26
108348         change.
108350 2009-05-21  Bruno Haible  <bruno@clisp.org>
108352         Simplify use of mode_t varargs.
108353         * lib/open.c (open): Use PROMOTED_MODE_T instead of a conditional that
108354         uses 'mode_t' or 'int'.
108355         * lib/openat.c (openat): Likewise.
108356         * lib/open-safer.c (open_safer): Likewise.
108357         * m4/mode_t.m4: New file.
108358         * m4/open.m4 (gl_PREREQ_OPEN): Require gl_PROMOTED_TYPE_MODE_T.
108359         * m4/openat.m4 (gl_PREREQ_OPENAT): Likewise.
108360         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Likewise.
108361         * modules/open (Files): Add m4/mode_t.m4.
108362         * modules/openat (Files): Likewise.
108363         * modules/fcntl-safer (Files): Likewise.
108364         Suggested by Eric Blake.
108366 2009-05-21  Pádraig Brady  <P@draigbrady.com>
108368         * doc/glibc-functions/fallocate.texi: New file.
108369         * doc/gnulib.texi: Include it.
108371 2009-05-21  Eric Blake  <ebb9@byu.net>
108372             Bruno Haible  <bruno@clisp.org>
108374         * m4/include_next.m4 (gl_CHECK_NEXT_HEADERS): Remove redundant m4_quote
108375         invocations.
108376         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Likewise.
108378 2009-05-21  Eric Blake  <ebb9@byu.net>
108379             Bruno Haible  <bruno@clisp.org>
108381         Second attempt to work around an AIX 5.3, 6.1 compiler bug with
108382         include_next. Fix of 2008-11-20 commit.
108383         * m4/include_next.m4 (gl_CHECK_NEXT_HEADERS): Also set
108384         NEXT_AS_FIRST_DIRECTIVE_FOO_H.
108385         * lib/math.in.h: Use NEXT_AS_FIRST_DIRECTIVE_MATH_H instead of
108386         NEXT_MATH_H.
108387         * modules/math (Makefile.am): Substitute NEXT_AS_FIRST_DIRECTIVE_MATH_H
108388         instead of NEXT_MATH_H.
108390 2009-05-21  Bruno Haible  <bruno@clisp.org>
108392         Avoid redefinition warnings for SIZE_MAX.
108393         * m4/size_max.m4 (gl_SIZE_MAX): Avoid redefining SIZE_MAX in config.h.
108394         Reported by Simon Josefsson.
108396 2009-05-21  Bruno Haible  <bruno@clisp.org>
108398         * m4/size_max.m4 (gl_SIZE_MAX): Use AC_CACHE_CHECK instead of
108399         AC_CACHE_VAL.
108401 2009-05-20  Bruno Haible  <bruno@clisp.org>
108403         Make zeroptr.h work on mingw.
108404         * tests/zerosize-ptr.h: Test for the presence of <sys/mman.h> and
108405         mprotect.
108406         * modules/memchr-tests (configure.ac): Also test for sys/mman.h.
108407         * modules/memchr2-tests (configure.ac): Likewise.
108408         * modules/memcmp-tests (configure.ac): Likewise.
108409         * modules/memmem-tests (configure.ac): Likewise.
108410         * modules/memrchr-tests (configure.ac): Likewise.
108411         Reported by Simon Josefsson.
108413 2009-05-20  Simon Josefsson  <simon@josefsson.org>
108415         * tests/test-glob.c: Include string.h for strcmp prototype.
108417 2009-05-20  Simon Josefsson  <simon@josefsson.org>
108419         * modules/getdelim (Depends-on): Add explicit stdint, although it
108420         was implicitly already pulled in via realloc-posix.
108421         * lib/getdelim.c: Get SIZE_MAX from stdint.h.
108423 2009-05-20  Simon Josefsson  <simon@josefsson.org>
108425         MinGW and IRIX does not have sa_family_t type.  Reported by "Tom
108426         G. Christensen" <tgc@jupiterrise.com>.
108427         * m4/sys_socket_h.m4: Check for sa_family_t.
108428         * lib/sys_socket.in.h: Typedef sa_family_t when needed.
108429         * modules/sys_socket: Substitute HAVE_SA_FAMILY_T.
108430         * tests/test-sys_socket.c: Check that sa_family_t works.
108432 2009-05-18  Eric Blake  <ebb9@byu.net>
108434         maint.mk: allow gnulib_dir in VPATH build
108435         * top/maint.mk (gnulib_dir): Make relative to $(srcdir).
108437 2009-05-15  Jim Meyering  <meyering@redhat.com>
108439         maint.mk: Give gnulib_dir a default definition.
108440         * top/maint.mk (gnulib_dir): Define to 'gnulib', by default.
108441         Thus, most packages no longer need to specify this variable in cfg.mk
108443 2009-05-14  Tom Prince  <tom.prince@ualberta.net>  (tiny change)
108445         rename.m4: fix typos that would make non-mingw cross-configure fail
108446         * m4/rename.m4 (gl_FUNC_RENAME): Fix typos.
108448 2009-05-13  Eric Blake  <ebb9@byu.net>
108450         mmap-anon: avoid out-of-order autoconf expansion
108451         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Use correct
108452         SYSTEM_EXTENSIONS macro to silence warnings from autoconf 2.63b.
108453         * modules/memchr-tests (Depends-on): Add extensions.
108454         * modules/memchr2-tests (Depends-on): Add extensions.
108455         * modules/memcmp-tests (Depends-on): Add extensions.
108456         * modules/memmem-tests (Depends-on): Add extensions.
108457         * modules/memrchr-tests (Depends-on): Add extensions.
108459 2009-05-13  Bruno Haible  <bruno@clisp.org>
108461         Make some tests ISO C 99 compliant.
108462         * tests/zerosize-ptr.h: New file.
108463         * tests/test-memchr.c: Include zerosize-ptr.h.
108464         (main): Use a zero-size object pointer instead of NULL.
108465         * tests/test-memchr2.c: Include zerosize-ptr.h.
108466         (main): Use a zero-size object pointer instead of NULL.
108467         * tests/test-memcmp.c: Include zerosize-ptr.h.
108468         (main): Use a zero-size object pointer instead of NULL.
108469         * tests/test-memmem.c: Include zerosize-ptr.h.
108470         (main): Use a zero-size object pointer instead of NULL.
108471         * tests/test-memrchr.c: Include zerosize-ptr.h.
108472         (main): Use a zero-size object pointer instead of NULL.
108473         * modules/memchr-tests (Files): Add tests/zerosize-ptr.h,
108474         m4/mmap-anon.m4.
108475         (Depends-on): Add getpagesize.
108476         (configure.ac): Invoke gl_FUNC_MMAP_ANON. Check for mprotect.
108477         * modules/memchr2-tests (Files): Add tests/zerosize-ptr.h,
108478         m4/mmap-anon.m4.
108479         (Depends-on): Add getpagesize.
108480         (configure.ac): Invoke gl_FUNC_MMAP_ANON. Check for mprotect.
108481         * modules/memcmp-tests (Files): Add tests/zerosize-ptr.h,
108482         m4/mmap-anon.m4.
108483         (Depends-on): Add getpagesize.
108484         (configure.ac): Invoke gl_FUNC_MMAP_ANON. Check for mprotect.
108485         * modules/memmem-tests (Files): Add tests/zerosize-ptr.h,
108486         m4/mmap-anon.m4.
108487         (Depends-on): Add getpagesize.
108488         (configure.ac): Invoke gl_FUNC_MMAP_ANON. Check for mprotect.
108489         * modules/memrchr-tests (Files): Add tests/zerosize-ptr.h,
108490         m4/mmap-anon.m4.
108491         (Depends-on): Add getpagesize.
108492         (configure.ac): Invoke gl_FUNC_MMAP_ANON. Check for mprotect.
108494 2009-05-12  Bruno Haible  <bruno@clisp.org>
108496         Tests for module 'alignof'.
108497         * modules/alignof-tests: New file.
108498         * tests/test-alignof.c: New file.
108500 2009-05-12  Bruno Haible  <bruno@clisp.org>
108502         Fix alignof macro.
108503         * lib/alignof.h (alignof): Remove special cases for AIX and HP-UX
108504         vendor compilers that are always correct.
108506 2009-05-12  Bruno Haible  <bruno@clisp.org>
108508         Make the MAP_ANONYMOUS detection work on HP-UX 11.
108509         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Check whether mmap exists, but
108510         not whether its fully works.
108512 2009-05-12  Bruno Haible  <bruno@clisp.org>
108514         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Add comments.
108516 2009-05-12  Jim Meyering  <meyering@redhat.com>
108518         * top/maint.mk: Adjust backslash alignment.
108520 2009-05-11  Simon Josefsson  <simon@josefsson.org>
108522         * top/maint.mk: Make $(srcdir)/build-aux configurable.
108524 2009-05-11  Eric Blake  <ebb9@byu.net>
108526         argp: avoid undefined behavior
108527         * lib/argp-fmtstream.c (weak_alias): Pass correct types to ctype
108528         macros.
108530 2009-05-08  Simon Josefsson  <simon@josefsson.org>
108532         * tests/test-vc-list-files-git.sh: Do git config of user.email and
108533         user.name to prevent git commit from complaining.
108535 2009-05-10  Bruno Haible  <bruno@clisp.org>
108537         * gnulib-tool (func_import, func_create_testdir, copy-file): Change
108538         sed_rewrite_old_files, sed_rewrite_new_files, sed_rewrite_files so that
108539         it rewrites every file name only once.
108540         Reported by Simon Josefsson. Helped by Ralf Wildenhues.
108542 2009-05-08  Bruno Haible  <bruno@clisp.org>
108544         * lib/sys_socket.in.h (_SS_PADSIZE): Use a conditional expression
108545         instead of 'max'.
108547 2009-05-08  Simon Josefsson  <simon@josefsson.org>
108549         * m4/sys_socket_h.m4: Test for ws2tcpip.h earlier, needed for
108550         sockaddr_storage test.
108552 2009-05-07  Simon Josefsson  <simon@josefsson.org>
108554         * modules/sys_socket (Makefile.am): Substitute
108555         HAVE_STRUCT_SOCKADDR_STORAGE.  Depend on alignof.
108556         * m4/sys_socket_h.m4: Check for sockaddr_storage.
108557         * lib/sys_socket.in.h (sockaddr_storage): Define when needed.
108558         * tests/test-sys_socket.c: Check sockaddr_storage.
108560 2009-05-08  Bruno Haible  <bruno@clisp.org>
108562         New module 'alignof'.
108563         * lib/alignof.h: New file.
108564         * modules/alignof: New file.
108566 2009-05-04  David Bartley  <dtbartle@csclub.uwaterloo.ca>
108567             Bruno Haible  <bruno@clisp.org>
108569         Fix test-file-has-acl on FreeBSD.
108570         * tests/test-file-has-acl.sh: Also test a directory. On FreeBSD, the
108571         mask is implicitly added.
108572         * tests/test-file-has-acl.c: Include <signal.h>.
108573         (main): Terminate the test after 5 seconds.
108574         * modules/acl-tests (configure.ac): Check for alarm function.
108576 2009-05-04  Bruno Haible  <bruno@clisp.org>
108578         Exploit new semantics of AC_DEFUN_ONCE available since 2009-01-26.
108579         * m4/errno_h.m4 (gl_HEADER_ERRNO_H): Remove outdated comment.
108580         * modules/errno (configure.ac): Drop AC_REQUIRE.
108581         * m4/multiarch.m4 (gl_MULTIARCH): Remove outdated comment.
108582         * modules/multiarch (configure.ac): Drop AC_REQUIRE.
108584 2009-05-04  Simon Josefsson  <simon@josefsson.org>
108586         * modules/glob-tests: New module.
108587         * tests/test-glob.c: Add.
108589 2009-05-04  Simon Josefsson  <simon@josefsson.org>
108591         * modules/fnmatch-tests: New module.
108592         * tests/test-fnmatch.c: Add.
108594 2009-05-04  Eric Blake  <ebb9@byu.net>
108596         maint: make the new no-submodule-changes rule VPATH-safe
108597         * top/maint.mk (no-submodule-changes): Don't assume a srcdir build.
108599 2009-05-04  David Bartley  <dtbartle@csclub.uwaterloo.ca>
108600             Bruno Haible  <bruno@clisp.org>
108602         acl: Fix infinite loop on FreeBSD.
108603         * lib/acl_entries.c (acl_entries) [Linux, FreeBSD]: Fix interpretation
108604         of return value from acl_get_entry.
108605         * lib/file-has-acl.c (acl_access_nontrivial) [Linux, FreeBSD]:
108606         Likewise.
108608 2009-05-03  Bruno Haible  <bruno@clisp.org>
108610         * lib/acl-internal.h (acl_entries): Clarify return value.
108611         * lib/acl_entries.c (acl_entries): Likewise.
108613 2009-05-04  David Bartley  <dtbartle@csclub.uwaterloo.ca>
108615         Bug fix in acl module.
108616         * lib/set-mode-acl.c: Use correct struct with ACL_SETACL.
108618 2009-05-03  Bruno Haible  <bruno@clisp.org>
108620         Create gperf-generated file in the source dir, not in the build dir.
108621         * modules/iconv_open (iconv_open-aix.h, iconv_open-hpux.h,
108622         iconv_open-irix.h, iconv_open-osf.h): Create file in the source tree.
108623         * modules/unicase/locale-language (unicase/locale-languages.h):
108624         Likewise.
108625         * modules/unicase/special-casing (unicase/special-casing-table.h):
108626         Likewise.
108627         * modules/unictype/property-byname (unictype/pr_byname.h): Likewise.
108628         * modules/unictype/scripts (unictype/scripts_byname.h): Likewise.
108629         * modules/uninorm/composition (uninorm/composition-table.h): Likewise.
108630         Reported by Ralf Wildenhues.
108632 2009-05-03  Bruno Haible  <bruno@clisp.org>
108634         * modules/fnmatch (Description, configure.ac): Taken from
108635         fnmatch-posix.
108636         * modules/fnmatch-posix: Turn into a symbolic reference to the
108637         'fnmatch' module, and deprecate.
108638         * doc/posix-functions/fnmatch.texi: Mention the fnmatch module.
108640 2009-05-03  Bruno Haible  <bruno@clisp.org>
108642         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF,
108643         gl_PREREQ_VASNPRINTF_LONG_DOUBLE): Define through AC_DEFUN_ONCE.
108644         Reported by Ralf Wildenhues.
108646 2009-05-04  Simon Josefsson  <simon@josefsson.org>
108648         * m4/fnmatch.m4: Fix fnmatch re-define.
108650 2009-04-27  David Bartley  <dtbartle@csclub.uwaterloo.ca>
108652         priv-set: new module and tests; adapt write-any-file
108653         * lib/priv-set.c: New file.
108654         * lib/priv-set.h: New file.
108655         * lib/unlinkdir.c: Make cannot_unlink_dir thread-safe.
108656         * lib/write-any-file.c: Simplify by using priv-set module.
108657         * m4/priv-set.m4: New file.
108658         * modules/priv-set: New file.
108659         * modules/unlinkdir: Add dependency on priv-set module.
108660         * modules/write-any-file: Likewise.
108662         Tests for module 'priv-set'.
108663         * modules/priv-set-tests: New file.
108664         * tests/test-priv-set.c: New file.
108666 2009-05-03  Jim Meyering  <meyering@redhat.com>
108667             Bruno Haible  <bruno@clisp.org>
108669         * lib/propername.c (proper_name_utf8): Ignore no-op translations;
108670         use the converted UTF-8 variant of the name instead.
108672 2009-05-03  Jim Meyering  <meyering@redhat.com>
108674         tests: tighten some getdate tests
108675         * tests/test-getdate.c (main): Tighten tests: require equality,
108676         not just greater than.  Set TZ envvar to UTC0.
108678 2009-05-03  Giuseppe Scrivano  <gscrivano@gnu.org>
108680         getdate: correctly interpret "next monday" when run on a Monday
108681         * lib/getdate.y (get_date): Correct the calculation of tm_mday so
108682         that e.g., "next tues" (when run on a tuesday) results in a date
108683         that is one week in the future, and not today's date.
108684         I.e., add a week when the wday is the same as the current one.
108685         Reported by Tom Broadhurst in http://savannah.gnu.org/bugs/?25406,
108686         and earlier by Martin Bernreuther and Jan Minář.
108687         * tests/test-getdate.c (main): Check that "next DAY" is always in
108688         the future and that "last DAY" is always in the past.
108690 2009-05-02  Jim Meyering  <meyering@redhat.com>
108692         build: ensure that a release build fails when a submodule is unclean
108693         * top/maint.mk (no-submodule-changes): New rule.
108694         (alpha beta major): Depend on it.
108696 2009-05-02  Bruno Haible  <bruno@clisp.org>
108698         Remove incompatibility between modules fnmatch-posix and fnmatch-gnu.
108699         * m4/fnmatch.m4 (gl_FUNC_FNMATCH_POSIX, gl_FUNC_FNMATCH_GNU): Use a
108700         shell variable gl_fnmatch_required to detect which variant is
108701         requested.
108702         (_AC_FUNC_FNMATCH_IF, _AC_LIBOBJ_FNMATCH): Remove macros. Inlined into
108703         gl_FUNC_FNMATCH_POSIX.
108704         * gnulib-tool (func_create_testdir, func_create_megatestdir): Don't
108705         exclude fnmatch-posix.
108707 2009-05-02  Bruno Haible  <bruno@clisp.org>
108709         Relicense mbsrtowcs and strnlen1 under LGPLv2+.
108710         * modules/mbsrtowcs (License): Change to LGPLv2+.
108711         * modules/strnlen1 (License): Likewise.
108712         Reported by Simon Josefsson.
108714 2009-05-02  Bruno Haible  <bruno@clisp.org>
108716         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Say "guessing no" instead of
108717         "cross".
108718         (gl_FUNC_FNMATCH_POSIX, gl_FUNC_FNMATCH_GNU): Update. Don't assume that
108719         gnulib-tool was called with option --source-base=lib.
108721 2009-05-02  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
108723         Use automake *-local hooks without commands, for extensibility.
108724         * modules/localcharset (Makefile.am): Rename install-exec-local
108725         rule to install-exec-localcharset, and make it a prerequisite of
108726         install-exec-local.  Likewise, rename the uninstall-local rule to
108727         uninstall-localcharset, and make it a prerequisite of the former.
108729 2009-05-01  Bruno Haible  <bruno@clisp.org>
108731         * lib/wchar.in.h (wcsnrtombs): Define if REPLACE_WCSNRTOMBS is 1.
108732         * m4/wcsnrtombs.m4 (gl_FUNC_WCSRTOMBS): Invoke gl_MBSTATE_T_BROKEN, and
108733         set REPLACE_WCSNRTOMBS if mbstate_t must be replaced.
108734         * m4/wchar.m4 (gl_WCHAR_H_DEFAULTS): Initialize REPLACE_WCSNRTOMBS.
108735         * modules/wchar (Makefile.am): Substitute REPLACE_WCSNRTOMBS.
108736         * modules/wcsnrtombs (Files): Add m4/mbrtowc.m4, m4/locale-ja.m4,
108737         m4/locale-zh.m4, m4/codeset.m4.
108739         * m4/wcsrtombs.m4 (gl_FUNC_WCSNRTOMBS): Invoke gl_MBSTATE_T_BROKEN, and
108740         set REPLACE_WCSRTOMBS if mbstate_t must be replaced.
108741         * modules/wcsrtombs (Files): Add m4/mbrtowc.m4, m4/locale-ja.m4,
108742         m4/locale-zh.m4.
108744         * m4/wcrtomb.m4 (gl_FUNC_WCRTOMB): Invoke gl_MBSTATE_T_BROKEN, and set
108745         REPLACE_WCRTOMB if mbstate_t must be replaced.
108746         * modules/wcrtomb (Files): Add m4/mbrtowc.m4.
108747         Reported by Jens Rehsack <rehsack@googlemail.com> via Eric Blake.
108749 2009-05-01  Bruno Haible  <bruno@clisp.org>
108751         Avoid compiler warnings when redefining macros defined by <libintl.h>.
108752         * lib/gettext.h [!ENABLE_NLS] (gettext, dgettext, dcgettext, ngettext,
108753         dngettext, dcngettext, textdomain, bindtextdomain,
108754         bind_textdomain_codeset): Undefine before redefining.
108756 2009-04-30  Bruno Haible  <bruno@clisp.org>
108758         Fix bug introduced on 2009-04-25.
108759         * lib/math.in.h (gl_signbitf_OPTIMIZED_MACRO,
108760         gl_signbitd_OPTIMIZED_MACRO, gl_signbitl_OPTIMIZED_MACRO): New macros.
108761         * lib/signbitf.c (gl_signbitd): Undefine if gl_signbitf_OPTIMIZED_MACRO
108762         is defined.
108763         * lib/signbitd.c (gl_signbitd): Undefine if gl_signbitd_OPTIMIZED_MACRO
108764         is defined.
108765         * lib/signbitl.c (gl_signbitd): Undefine if gl_signbitl_OPTIMIZED_MACRO
108766         is defined.
108767         Reported by Elbert_Pol <elbert.pol@gmail.com>.
108769 2009-04-28  Bruno Haible  <bruno@clisp.org>
108771         Comment tweaks.
108772         * lib/unistr.h (u*_cmp2): Clarify what memcmp2 is.
108773         * lib/uninorm.h (u*_normxfrm): Fix description of return value.
108774         * lib/unicase.h (u*_casexfrm): Likewise.
108775         Reported by Paolo Bonzini.
108777 2009-04-28  Bruno Haible  <bruno@clisp.org>
108779         Fix a compilation error.
108780         * lib/mbsrtowcs-state.c (_gl_mbsrtowcs_state): Fix initializer.
108781         * lib/wcsrtombs-state.c (_gl_wcsrtombs_state): Likewise.
108782         Reported by Jim Meyering.
108784 2009-04-27  Bruno Haible  <bruno@clisp.org>
108786         New module 'libunistring'.
108787         * modules/libunistring: New file.
108788         * m4/libunistring.m4: New file.
108789         * MODULES.html.sh (Unicode string functions): Add it.
108791 2009-04-27  Eric Blake  <ebb9@byu.net>
108793         maint.mk: allow package-specific header to provide <config.h>
108794         * top/maint.mk (sc_require_config_h): New variable.
108795         (sc_require_config_h, sc_require_config_h_first): Use it.
108797 2009-04-27  Simon Josefsson  <simon@josefsson.org>
108799         * top/maint.mk (sc_avoid_if_before_free): Except
108800         useless-if-before-free script.
108802 2009-04-27  Eric Blake  <ebb9@byu.net>
108804         maintainer-makefile: depend on all required helper scripts
108805         * modules/maintainer-makefile (Depends-on): Add vc-list-files and
108806         useless-if-before-free.
108807         * top/maint.mk (VC_LIST, sc_avoid_if_before_free): Use local
108808         version, rather than assuming gnulib checkout is available.
108809         Reported by Simen Josefsson.
108811 2009-04-26  Bruno Haible  <bruno@clisp.org>
108813         Make the lib vs. lib64 recognition work on openSUSE 11 with "gcc -m32".
108814         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): Ignore paths that end in
108815         "../" or "..".
108817 2009-04-26  Bruno Haible  <bruno@clisp.org>
108819         * m4/lib-link.m4 (AC_LIB_HAVE_LINKFLAGS): Accept a fifth argument.
108820         * m4/libsigsegv.m4 (gl_LIBSIGSEGV): Simplify by using
108821         AC_LIB_HAVE_LINKFLAGS.
108823 2009-04-26  Bruno Haible  <bruno@clisp.org>
108825         Simplify calling convention of u*_conv_from_encoding.
108826         * lib/uniconv.h (u8_conv_from_encoding, u16_conv_from_encoding,
108827         u32_conv_from_encoding): Expect a resultbuf argument and return the
108828         result directly as a pointer.
108829         * lib/uniconv/u8-conv-from-enc.c (u8_conv_from_encoding): Likewise.
108830         * lib/uniconv/u-conv-from-enc.h (FUNC): Likewise.
108831         * lib/uniconv/u-strconv-from-enc.h (FUNC): Update.
108832         * lib/unicase/ulc-casecmp.c (ulc_u8_casefold): Update.
108833         * lib/unicase/ulc-casexfrm.c (ulc_casexfrm): Update.
108834         * lib/unilbrk/ulc-possible-linebreaks.c (ulc_possible_linebreaks):
108835         Update.
108836         * lib/unilbrk/ulc-width-linebreaks.c (ulc_width_linebreaks): Update.
108837         * lib/uniwbrk/ulc-wordbreaks.c (ulc_wordbreaks): Update.
108838         * lib/vasnprintf.c (VASNPRINTF): Update.
108839         * tests/uniconv/test-u8-conv-from-enc.c (main): Update.
108840         * tests/uniconv/test-u16-conv-from-enc.c (main): Update.
108841         * tests/uniconv/test-u32-conv-from-enc.c (main): Update.
108842         * NEWS: Mention the change.
108844 2009-04-26  Bruno Haible  <bruno@clisp.org>
108846         Simplify calling convention of u*_conv_to_encoding.
108847         * lib/uniconv.h (u8_conv_to_encoding, u16_conv_to_encoding,
108848         u32_conv_to_encoding): Expect a resultbuf argument and return the
108849         result directly as a pointer.
108850         * lib/uniconv/u8-conv-to-enc.c (u8_conv_to_encoding): Likewise.
108851         * lib/uniconv/u-conv-to-enc.h (FUNC): Likewise. Preserve errno while
108852         freeing scaled_offsets if mem_iconveha failed.
108853         * lib/unicase/u-casexfrm.h (FUNC): Update.
108854         * lib/uninorm/u-normxfrm.h (FUNC): Update.
108855         * lib/vasnprintf.c (VASNPRINTF): Update.
108856         * tests/uniconv/test-u8-conv-to-enc.c (main): Update.
108857         * tests/uniconv/test-u16-conv-to-enc.c (main): Update.
108858         * tests/uniconv/test-u32-conv-to-enc.c (main): Update.
108859         * NEWS: Mention the change.
108861 2009-04-26  Bruno Haible  <bruno@clisp.org>
108863         Avoid test failures on AIX and OSF/1.
108864         * lib/uniconv/u8-conv-from-enc.c (u8_conv_from_encoding): Avoid calling
108865         malloc(0).
108866         * lib/uniconv/u8-conv-to-enc.c (u8_conv_to_encoding): Likewise.
108867         * lib/unilbrk/ulc-possible-linebreaks.c (ulc_possible_linebreaks):
108868         Likewise.
108869         * lib/unilbrk/ulc-width-linebreaks.c (ulc_width_linebreaks): Likewise.
108870         * lib/uniwbrk/ulc-wordbreaks.c (ulc_wordbreaks): Likewise.
108871         * lib/uniconv/u-conv-to-enc.h (FUNC): Likewise. Fix memory leak.
108872         * lib/unistr/u-cpy-alloc.h (FUNC): Call malloc(1) instead of malloc(0).
108873         * doc/posix-functions/malloc.texi: Document the portability problem
108874         related to malloc(0).
108876 2009-04-26  Bruno Haible  <bruno@clisp.org>
108878         * modules/unistr/u8-cpy-alloc (Depends-on): Add malloc-posix.
108879         * modules/unistr/u16-cpy-alloc (Depends-on): Likewise.
108880         * modules/unistr/u32-cpy-alloc (Depends-on): Likewise.
108882 2009-04-25  Bruno Haible  <bruno@clisp.org>
108884         Avoid link error when creating a namespace clean library.
108885         * lib/math.in.h (gl_signbitf, gl_signbitd, gl_signbitl): Don't define
108886         as macro with arguments if already defined as an alias.
108887         * lib/signbitf.c (gl_signbitf): Don't undefine.
108888         * lib/signbitd.c (gl_signbitd): Don't undefine.
108889         * lib/signbitl.c (gl_signbitl): Don't undefine.
108891 2009-04-25  Jim Meyering  <meyering@redhat.com>
108893         vc-list-files: fix another quoting bug
108894         * build-aux/vc-list-files: Avoid sed backslash expansion
108895         of pathological directory names.
108897 2009-04-25  Eric Blake  <ebb9@byu.net>
108899         vc-list-files: fix shell quoting error
108900         * build-aux/vc-list-files: Protect against $ in $dir.  Normalize
108901         timestamp.
108903 2009-04-25  Jim Meyering  <meyering@redhat.com>
108905         vc-list-files: restore lost functionality with subdir argument
108906         * build-aux/vc-list-files: When given a non-"." sub-directory
108907         argument, substitute the $dir/ prefix back onto each resulting name.
108908         Otherwise, coreutils' root_tests check would fail.
108910 2009-04-24  Eric Blake  <ebb9@byu.net>
108912         vc-list-files: ignore git symlinks
108913         * build-aux/vc-list-files (.git): Use ls-tree and a filter, rather
108914         than ls-files, to ignore git symlinks.
108916         maint.mk: import improvements from m4
108917         * top/maint.mk (VC-tag): Use signing key from cfg.mk.
108918         (move_if_change): Delete unused macro.
108919         (news-date-check, vc-diff-check): Support VPATH builds.
108920         (announcement): Likewise.  Split --bootstrap-tools list...
108921         (boostrap-tools): ...into separate list, which can be overridden
108922         in cfg.mk.
108923         (sc_avoid_if_before_free): Point to $(gnulib_dir), rather than
108924         requiring dependency on useless-if-before-free module.
108925         (VC_LIST, VC_LIST_EXCEPT): Likewise for vc-list-files module.
108926         Support VPATH builds.
108928 2009-04-24  Jim Meyering  <meyering@redhat.com>
108930         maint.mk: remove coreutils-specific rules and variables
108931         * top/maint.mk (bin, taint-distcheck, coreutils-path-check, t): Remove.
108932         (fake_home, install-transform-check, my-instcheck, pfx, TMPDIR): Remove.
108933         (t_prefix, t_taint, tp, warn_cflags, write_loser, my-distcheck): Remove.
108935         maint.mk: remove obsolete rule
108936         * top/maint.mk (rel-check): Remove rule.
108937         (WGET, WGETFLAGS): Remove now-unused variables.
108939 2009-04-24  Simon Josefsson  <simon@josefsson.org>
108941         * top/maint.mk (makefile-check): Renamed to sc_makefile_check for
108942         consistency.
108944         * modules/vc-list-files-tests (TESTS_ENVIRONMENT): Use
108945         '$(PATH_SEPARATOR)' instead of ':'.
108947 2009-04-24  Simon Josefsson  <simon@josefsson.org>
108949         * lib/getopt1.c (main): Use 'const' for static array.
108951 2009-04-24  Simon Josefsson  <simon@josefsson.org>
108953         * top/maint.mk: Sync with coreutils.
108954         * NEWS: Explain incompatibilities.
108956 2009-04-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
108957             Bruno Haible  <bruno@clisp.org>
108959         Fix cross-compilation results.
108960         * m4/btowc.m4 (gl_FUNC_BTOWC): Use no-op statement, rather than empty
108961         statement, as third argument of AC_TRY_RUN.
108962         * m4/mbrtowc.m4 (gl_MBRTOWC_INCOMPLETE_STATE, gl_MBRTOWC_SANITYCHECK,
108963         gl_MBRTOWC_NULL_ARG, gl_MBRTOWC_RETVAL, gl_MBRTOWC_NUL_RETVAL):
108964         Likewise.
108965         * m4/mbsrtowcs.m4 (gl_MBSRTOWCS_WORKS): Likewise.
108966         * m4/wcsrtombs.m4 (gl_WCSRTOMBS_TERMINATION, gl_WCSRTOMBS_NULL):
108967         Likewise.
108968         * m4/wctob.m4 (gl_FUNC_WCTOB): Likewise.
108969         * m4/wcrtomb.m4 (gl_FUNC_WCRTOMB): Likewise. Update for AIX 4.3.
108970         * doc/posix-functions/wcrtomb.texi: Mention the bug on AIX 4.3.
108972 2009-04-20  Bruno Haible  <bruno@clisp.org>
108974         Avoid test failure on mingw.
108975         * tests/uniwidth/test-uc_width2.sh: Convert newlines in output.
108977 2009-04-20  Bruno Haible  <bruno@clisp.org>
108979         Avoid compilation error on mingw.
108980         * modules/localename-tests (Depends-on): Add locale.
108982 2009-04-19  Bruno Haible  <bruno@clisp.org>
108984         Support for building a shared library on Windows platforms.
108985         * tests/uninorm/test-nfc.c (n): Don't define if WOE32DLL.
108986         (main): Test the presence of UNINORM_NFC here.
108987         * tests/uninorm/test-nfd.c (n): Don't define if WOE32DLL.
108988         (main): Test the presence of UNINORM_NFD here.
108989         * tests/uninorm/test-nfkc.c (n): Don't define if WOE32DLL.
108990         (main): Test the presence of UNINORM_NFKC here.
108991         * tests/uninorm/test-nfkd.c (n): Don't define if WOE32DLL.
108992         (main): Test the presence of UNINORM_NFKD here.
108994 2009-04-19  Bruno Haible  <bruno@clisp.org>
108996         Avoid a compiler warning.
108997         * tests/uninorm/test-u32-normalize-big.c (read_normalization_test_file):
108998         Change type of variable 'sequence'.
109000 2009-04-19  Bruno Haible  <bruno@clisp.org>
109002         * modules/configmake (Makefile.am): When the contents of configmake.h
109003         does not change, arrange to preserve its modification time.
109005 2009-04-17  Simon Josefsson  <simon@josefsson.org>
109007         * top/maint.mk (PO_DOMAIN): New variable, allows overriding of
109008         gettext domain.
109010 2009-04-16  Jim Meyering  <meyering@redhat.com>
109012         useless-if-before-free: improve conversion code
109013         * build-aux/useless-if-before-free: Adjust code-in-comment to match
109014         "...!= 0" as well as "...!= NULL".  emacs has one of the former.
109016 2009-04-14  Bruno Haible  <bruno@clisp.org>
109018         * modules/fcntl (Depends-on): Add extensions.
109019         * m4/fcntl_h.m4 (gl_FCNTL_H): Add a comment.
109021 2009-04-12  Ben Pfaff  <blp@gnu.org>
109023         Make fcntl module detect O_NOATIME, O_NOFOLLOW on GNU/Linux.
109024         * m4/fcntl_h.m4 (gl_FCNTL_H): Require AC_USE_SYSTEM_EXTENSIONS.
109026 2009-03-20  Ben Pfaff  <blp@gnu.org>
109028         Make rename replace existing destinations on Windows.
109029         * m4/rename.m4: Add test for Mingw.
109030         * lib/rename.c: Add rename replacement that uses MoveFileEx with
109031         MOVEFILE_REPLACE_EXISTING to replace existing destination files.
109032         * doc/posix-functions/rename.texi: Document.
109034 2009-04-10  Bruno Haible  <bruno@clisp.org>
109036         New include file "iconveh.h".
109037         * lib/iconveh.h: New file, extracted from lib/striconveh.h.
109038         * lib/striconveh.h: Include it.
109039         (enum iconv_ilseq_handler): Remove definition.
109040         * lib/striconveha.h: Include <stddef.h> and iconveh.h instead of
109041         striconveh.h.
109042         * lib/striconveha.c: Include striconveh.h.
109043         * lib/uniconv.h: Include iconveh.h instead of striconveh.h.
109044         * modules/striconveh (Files): Add lib/iconveh.h.
109045         * modules/uniconv/base (Files): Add lib/iconveh.h. Remove
109046         lib/striconveh.h.
109048 2009-04-10  Bruno Haible  <bruno@clisp.org>
109050         * lib/uniconv.h: Update comment.
109052 2009-04-10  Bruno Haible  <bruno@clisp.org>
109054         * lib/unistr/u8-mbtouc-aux.c: Inside libunistring, define the function
109055         always.
109056         * lib/unistr/u8-mbtouc-unsafe-aux.c: Likewise.
109057         * lib/unistr/u16-mbtouc-aux.c: Likewise.
109058         * lib/unistr/u16-mbtouc-unsafe-aux.c: Likewise.
109059         * lib/unistr/u8-mbtouc.c: Inside libunistring, include
109060         "unistring-notinline.h", so that the function gets defined always.
109061         * lib/unistr/u8-mbtouc-unsafe.c: Likewise.
109062         * lib/unistr/u8-uctomb.c: Likewise.
109063         * lib/unistr/u16-mbtouc.c: Likewise.
109064         * lib/unistr/u16-mbtouc-unsafe.c: Likewise.
109065         * lib/unistr/u16-uctomb.c: Likewise.
109066         * lib/unistr/u32-mbtouc.c: Likewise.
109067         * lib/unistr/u32-mbtouc-unsafe.c: Likewise.
109068         * lib/unistr/u32-uctomb.c: Likewise.
109070 2009-04-10  Bruno Haible  <bruno@clisp.org>
109072         Mark 'utime' obsolete.
109073         * modules/utime (Status, Notice): New sections.
109074         Suggested by Jim Meyering.
109076         Fix cross-compile guess for utime test.
109077         * m4/utime.m4 (AC_FUNC_UTIME_NULL): Add definition from newest unstable
109078         autoconf.
109079         * doc/posix-functions/utime.texi: Give more precisions.
109080         Reported by Jan <ipif@ymail.com>.
109082 2009-04-09  Kamil Dudka  <kdudka@redhat.com>
109084         filevercmp: correct today's change
109085         * lib/filevercmp.c: Also handle coreutils' test inputs.
109086         * tests/test-filevercmp.c: Add inputs from one of coreutils' test scripts.
109088         Fix regression in 'filevercmp' module. Thanks Sven Joachim
109089         for reporting it.
109090         * lib/filevercmp.c: Special handle for "", "." and "..".
109091         * tests/test-filevercmp.c: Enlarge the set suite.
109093 2009-04-07  Jim Meyering  <meyering@redhat.com>
109095         useless-if-before-free: show how to remove braced useless free, too
109096         * build-aux/useless-if-before-free: still only in a comment, though.
109098 2009-04-07  Reuben Thomas  <rrt@sc3d.org>
109100         maint.mk: import changes to syntax-check macros from coreutils
109101         * top/maint.mk (_prohibit_regexp, _header_without_use): Define.
109102         Use them in the relevant macros.
109104 2009-04-06  Bruno Haible  <bruno@clisp.org>
109106         Fix unportable use of bit-fields.
109107         * lib/unicase/special-casing.h (struct special_casing_rule): Change the
109108         bit-field type from 'int' to 'signed int'. Otherwise Solaris cc,
109109         AIX xlc, and OSF/1 cc interpret it as 'unsigned int'.
109111 2009-04-06  Bruno Haible  <bruno@clisp.org>
109113         Avoid test failures on AIX and OSF/1.
109114         * tests/unicase/test-u8-casefold.c (check): Account for the possibility
109115         that malloc(0) = NULL.
109116         * tests/unicase/test-u8-tolower.c (check): Likewise.
109117         * tests/unicase/test-u8-totitle.c (check): Likewise.
109118         * tests/unicase/test-u8-toupper.c (check): Likewise.
109119         * tests/unicase/test-u16-casefold.c (check): Likewise.
109120         * tests/unicase/test-u16-tolower.c (check): Likewise.
109121         * tests/unicase/test-u16-totitle.c (check): Likewise.
109122         * tests/unicase/test-u16-toupper.c (check): Likewise.
109123         * tests/unicase/test-u32-casefold.c (check): Likewise.
109124         * tests/unicase/test-u32-tolower.c (check): Likewise.
109125         * tests/unicase/test-u32-totitle.c (check): Likewise.
109126         * tests/unicase/test-u32-toupper.c (check): Likewise.
109127         * tests/uninorm/test-u8-nfc.c (check): Likewise.
109128         * tests/uninorm/test-u8-nfd.c (check): Likewise.
109129         * tests/uninorm/test-u8-nfkc.c (check): Likewise.
109130         * tests/uninorm/test-u8-nfkd.c (check): Likewise.
109131         * tests/uninorm/test-u16-nfc.c (check): Likewise.
109132         * tests/uninorm/test-u16-nfd.c (check): Likewise.
109133         * tests/uninorm/test-u16-nfkc.c (check): Likewise.
109134         * tests/uninorm/test-u16-nfkd.c (check): Likewise.
109135         * tests/uninorm/test-u32-nfc.c (check): Likewise.
109136         * tests/uninorm/test-u32-nfd.c (check): Likewise.
109137         * tests/uninorm/test-u32-nfkc.c (check): Likewise.
109138         * tests/uninorm/test-u32-nfkd.c (check): Likewise.
109140 2009-04-05  Bruno Haible  <bruno@clisp.org>
109142         Work around an autoconf limitation.
109143         * gnulib-tool (func_emit_lib_Makefile_am): Omit the "Reproduce by"
109144         comment line if it would be longer than 3 KB.
109146 2009-04-05  Bruno Haible  <bruno@clisp.org>
109148         Avoid test failure with libiconv-1.13.
109149         * tests/test-striconveh.c (main): Allow result of libiconv 1.13 as one
109150         of the expected test results.
109152 2009-04-05  Bruno Haible  <bruno@clisp.org>
109154         * gnulib-tool (func_emit_lib_Makefile_am): Don't add the library to
109155         noinst_LTLIBRARIES if the Makefile.am in the same directory specifies
109156         that it should be installed.
109158 2009-04-05  Bruno Haible  <bruno@clisp.org>
109160         * gnulib-tool: New option --copy-file.
109161         (func_usage): Document it.
109162         (func_dest_tmpfilename): Moved out of func_import.
109163         (func_add_file, func_update_file): New functions, extracted from
109164         func_import.
109165         (func_import): Update.
109167 2009-04-05  Karl Berry  <karl@gnu.org>
109169         * README: prominently mention gnulib-tool.
109170         Rearrange sections so getting the code is near the top.
109172 2009-04-05  Bruno Haible  <bruno@clisp.org>
109174         * lib/unicase.h: Mention u*_cmp2.
109175         * lib/unicase/u-casecmp.h (FUNC): Invoke U_CMP2 instead of U_CMP.
109176         * lib/unicase/u8-casecmp.c: Use u8_cmp2 instead of u8_cmp.
109177         * lib/unicase/ulc-casecmp.c: Likewise.
109178         * lib/unicase/u16-casecmp.c: Use u16_cmp2 instead of u16_cmp.
109179         * lib/unicase/u32-casecmp.c: Use u32_cmp2 instead of u32_cmp.
109180         * modules/unicase/u8-casecmp (Depends-on): Add unistr/u8-cmp2, remove
109181         unistr/u8-cmp.
109182         * modules/unicase/ulc-casecmp (Depends-on): Likewise.
109183         * modules/unicase/u16-casecmp (Depends-on): Add unistr/u16-cmp2, remove
109184         unistr/u16-cmp.
109185         * modules/unicase/u32-casecmp (Depends-on): Add unistr/u32-cmp2, remove
109186         unistr/u32-cmp.
109188         * lib/uninorm.h: Mention u*_cmp2.
109189         * lib/uninorm/u-normcmp.h (FUNC): Invoke U_CMP2 instead of U_CMP.
109190         * lib/uninorm/u8-normcmp.c: Use u8_cmp2 instead of u8_cmp.
109191         * lib/uninorm/u16-normcmp.c: Use u16_cmp2 instead of u16_cmp.
109192         * lib/uninorm/u32-normcmp.c: Use u32_cmp2 instead of u32_cmp.
109193         * modules/uninorm/u8-normcmp (Depends-on): Add unistr/u8-cmp2, remove
109194         unistr/u8-cmp.
109195         * modules/uninorm/u16-normcmp (Depends-on): Add unistr/u16-cmp2, remove
109196         unistr/u16-cmp.
109197         * modules/uninorm/u32-normcmp (Depends-on): Add unistr/u32-cmp2, remove
109198         unistr/u32-cmp.
109200         New module 'unistr/u32-cmp2'.
109201         * lib/unistr/u32-cmp2.c: New file.
109202         * modules/unistr/u32-cmp2: New file.
109204         New module 'unistr/u16-cmp2'.
109205         * lib/unistr/u16-cmp2.c: New file.
109206         * modules/unistr/u16-cmp2: New file.
109208         New module 'unistr/u8-cmp2'.
109209         * lib/unistr.h (u8_cmp2, u16_cmp2, u32_cmp2): New declarations.
109210         * lib/unistr/u8-cmp2.c: New file.
109211         * lib/unistr/u-cmp2.h: New file.
109212         * modules/unistr/u8-cmp2: New file.
109214 2009-04-05  Bruno Haible  <bruno@clisp.org>
109216         * lib/unictype.h (uc_property_is_valid): New macro.
109217         * tests/unictype/test-pr_byname.c (main): Use it.
109219         * lib/unistr.h: Doc fixes.
109220         * lib/uniconv.h: Doc fixes.
109221         * lib/unictype.h: Doc fixes.
109223 2009-04-03  Paul Eggert  <eggert@cs.ucla.edu>
109225         Port coreutils 7.2 to Solaris 8.
109227         * modules/arpa_inet (arpa/inet.h): Depend on arpa_inet.in.h.
109228         * m4/inet_ntop.m4 (gl_INET_NTOP): Search for inet_ntop in -lnsl,
109229         for Solaris 8.  This is a bit of a hack, as it means it's the
109230         caller's responsibility to add -lnsl if needed, but most likely it
109231         won't be needed since only getaddrinfo uses this and getaddrinfo
109232         isn't needed on Solaris 8.
109234         * modules/fnmatch (Depends-on): Add mbsrtowcs, to fix a porting
109235         problem to Solaris 8 encountered with coreutils 7.2, which
109236         resulted in a message "fnmatch.c:292: warning: passing argument 4
109237         of 'mbsrtowcs' from incompatible pointer type".  Also, add mbsinit
109238         at the suggestion of Bruno Haible, since fnmatch uses mbsinit.
109240 2009-04-03  Simon Josefsson  <simon@josefsson.org>
109242         * m4/ld-version-script.m4: Add FIXME comment.
109244 2009-04-02  Simon Josefsson  <simon@josefsson.org>
109246         * doc/ld-output-def.texi: Use DLL_VERSION instead of confusing
109247         SOVERSION variable.
109249 2009-04-02  Bruno Haible  <bruno@clisp.org>
109251         * Makefile (info, html, dvi, pdf): Combine the rules.
109252         Suggested by Jim Meyering.
109254 2009-04-01  Bruno Haible  <bruno@clisp.org>
109256         * Makefile (info, html, dvi, pdf): New targets.
109257         Reported by Reuben Thomas <rrt@sc3d.org>.
109259 2009-04-01  Bruno Haible  <bruno@clisp.org>
109261         * doc/gnulib-tool.texi (Invoking gnulib-tool): Document how gnulib-tool
109262         can be put into PATH.
109263         Reported by Reuben Thomas <rrt@sc3d.org>. Suggested by Karl Berry.
109265 2009-04-01  Bruno Haible  <bruno@clisp.org>
109267         * doc/lib-symbol-visibility.texi: Follow texinfo style conventions.
109269 2009-04-01  Bruno Haible  <bruno@clisp.org>
109271         Rename module 'visibility'.
109272         * modules/lib-symbol-visibility: Renamed from modules/visibility.
109273         * doc/lib-symbol-visibility.texi: Renamed from visibility.texi.
109274         * doc/gnulib.texi: Update.
109275         * MODULES.html.sh (Misc): Update.
109276         * NEWS: Mention the change.
109278 2009-04-01  Simon Josefsson  <simon@josefsson.org>
109280         * modules/lib-msvc-compat: New module.  Thanks to Bruno Haible
109281         <bruno@clisp.org>, Ralf Wildenhues <Ralf.Wildenhues@gmx.de>, and
109282         Eric Blake <ebb9@byu.net> for review.
109283         * MODULES.html.sh: Add lib-msvc-compat.
109284         * doc/gnulib.texi: Link to new section.
109285         * m4/ld-output-def.m4: New file.
109286         * doc/ld-output-def.texi: New file.
109288 2009-04-01  Simon Josefsson  <simon@josefsson.org>
109290         Rename ld-version-script to lib-symbol-versions.  Suggested by
109291         Bruno Haible <bruno@clisp.org>.
109292         * modules/ld-version-script: Renamed to lib-symbol-versions.
109293         * doc/ld-version-script.texi: Fix module name.
109294         * MODULES.html.sh: Add lib-symbol-versions.
109296 2009-03-31  Simon Josefsson  <simon@josefsson.org>
109298         * modules/u64-tests: New file.
109299         * tests/test-u64.c: New file.
109301 2009-03-04  Simon Josefsson  <simon@josefsson.org>
109303         * MODULES.html.sh: Mention u64.
109304         * modules/u64: New module.
109305         * modules/crypto/sha512: Depend on u64 module instead of providing
109306         u64.h.
109308 2009-03-27  Eric Blake  <ebb9@byu.net>
109310         test-strerror: make debugging EAI_SYSTEM easier
109311         * modules/getaddrinfo-tests (Depends-on): Add strerror.
109312         * test-getaddrinfo.c (simple) [ENABLE_DEBUGGING]: Report errno if
109313         failure was EAI_SYSTEM.
109315 2009-03-25  Bruno Haible  <bruno@clisp.org>
109317         Fix a problem with --enable-relocatable on Solaris 7.
109318         * modules/relocatable-prog-wrapper (Depends-on): Add environ. Needed
109319         since 2008-02-24.
109321 2009-03-25  Eric Blake  <ebb9@byu.net>
109323         test-sockets: avoid gcc warning
109324         * tests/test-sockets.c (main): Silence compiler warning.
109326 2009-03-25  Paul Eggert  <eggert@cs.ucla.edu>
109328         New modules nproc, pthread, contributed by Glen Lenker.
109330         * MODULES.html.sh: Add pthread, nproc.
109331         * lib/nproc.c: New file.
109332         * lib/nproc.h: New file.
109333         * lib/pthread.in.h: New file.
109334         * m4/pthread.m4: New file.
109335         * modules/nproc: New file.
109336         * modules/pthread: New file.
109338 2009-03-24  Simon Josefsson  <simon@josefsson.org>
109340         * modules/unicase/locale-language-tests (test_locale_language_LDADD):
109341         New variable.
109343 2009-03-24  Kamil Dudka  <kdudka@redhat.com>
109345         filevercmp: handle simple~ and numbered.~3~ backup suffixes
109346         * lib/filevercmp.c: Handle simple~ and numbered.~3~ backup suffixes.
109347         * tests/test-filevercmp.c: Add tests for backup suffixes.
109349 2009-03-24  Simon Josefsson  <simon@josefsson.org>
109351         * modules/stdlib (Depends-on): Add stdint, needed when defining
109352         struct random_data on, for example, HP-UX 10.20.  Reported by
109353         Albert Chin <bug-gnulib@mlists.thewrittenword.com>.
109355 2009-03-24  Simon Josefsson  <simon@josefsson.org>
109357         * lib/readline.c (readline): Call fflush on stdout after printing
109358         prompt.
109360 2009-03-20  Bruno Haible  <bruno@clisp.org>
109362         Remove dependency from 'close' module to -lws2_32 on native Windows.
109363         * lib/close-hook.h: New file.
109364         * lib/close-hook.c: New file.
109365         * lib/close.c: Include close-hook.h. Don't include <sys/socket.h>,
109366         w32sock.h.
109367         (_gl_close_fd_maybe_socket): Remove function.
109368         (rpl_close): Invoke execute_all_close_hooks instead of
109369         _gl_close_fd_maybe_socket.
109370         * lib/sockets.c: Include close-hook.h, w32sock.h.
109371         (close_fd_maybe_socket): New function, essentially from lib/close.c.
109372         (close_sockets_hook): New variable.
109373         (gl_sockets_startup): Register close_fd_maybe_socket as a hook.
109374         (gl_sockets_cleanup): Unregister it.
109375         * lib/unistd.in.h (HAVE__GL_CLOSE_FD_MAYBE_SOCKET): Remove macro.
109376         * m4/close.m4 (gl_REPLACE_CLOSE): Undo 2009-02-05 change.
109377         * modules/close-hook: New file.
109378         * modules/close (Files): Remove lib/w32sock.h.
109379         (Depends-on): Add close-hook.
109380         (Link): Remove section.
109381         * modules/sockets (Files): Add lib/w32sock.h.
109382         (Depends-on): Add close-hook.
109383         * modules/sys_socket (configure.ac): Remove gl_MODULE_INDICATOR
109384         invocation.
109385         * NEWS: Mention that LIB_CLOSE is gone.
109387 2009-03-23  Eric Blake  <ebb9@byu.net>
109389         signal-tests: test previous patch
109390         * tests/test-signal.c: New file.
109391         * modules/signal-tests: Likewise.
109393         signal.h: always support 'volatile sig_atomic_t'
109394         * m4/signal_h.m4 (gl_SIGNAL_H): Check for AIX limitation.
109395         (gl_SIGNAL_H_DEFAULTS): Add a default.
109396         * modules/signal (Makefile.am): Substitute if needed.
109397         * lib/signal.in.h (sig_atomic_t): Redefine if needed, so that
109398         users can blindly add volatile.
109399         * doc/posix-headers/signal.texi (signal.h): Document it.
109400         Reported by Matthew Woehlke.
109402 2009-03-23  Jim Meyering  <meyering@redhat.com>
109404         pathmax: PATH_MAX: use pathconf only when available
109405         * lib/pathmax.h (PATH_MAX): Select the pathconf-using definition
109406         only if HAVE_PATHCONF is defined.  Patch by Sylvain Beucler.
109407         * m4/pathmax.m4 (gl_PATHMAX): Check for pathconf.
109408         This avoids a link failure in a PSP cross-compilation environment
109409         described in http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/17048
109411         * lib/vasnprintf.c (divide): Fix typo in comment.
109413 2009-03-23  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
109415         * gnulib-tool (func_filter_filelist): Fix comment.
109417 2009-03-20  Bruno Haible  <bruno@clisp.org>
109419         Make sockets.h self-contained.
109420         * lib/sockets.c: Include sockets.h first.
109421         * lib/sockets.h: Include <sys/socket.h> before using the SOCKET type.
109423 2009-03-19  Eric Blake  <ebb9@byu.net>
109425         doc: mention more functions added in cygwin 1.7.0
109426         * doc/posix-functions/log2.texi: Mention recent cygwin 1.7.0
109427         addition.
109428         * doc/posix-functions/log2f.texi: Likewise.
109430 2009-03-19  Jim Meyering  <meyering@redhat.com>
109432         fsusage: avoid syntax error due to statement-before-declaration
109433         * lib/fsusage.c (get_fs_usage): Put warning-avoidance statement
109434         after all declarations.  Reported by Matthew Woehlke in
109435         http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/16231
109437 2009-03-18  Eric Blake  <ebb9@byu.net>
109439         build-aux/compile: sync from automake
109440         * build-aux/compile: New file, from automake.
109441         * config/srclist.txt: Mention build-aux/compile.
109443 2009-03-17  Bruno Haible  <bruno@clisp.org>
109445         * lib/git-merge-changelog.c: Fix typo in comment.
109446         Reported by Reuben Thomas <rrt@sc3d.org>.
109448 2009-03-17  Reuben Thomas  <rrt@sc3d.org>
109450         * m4/regex.m4: update and improve help for
109451         --without-included-regex.
109453 2009-03-17  Simon Josefsson  <simon@josefsson.org>
109455         * modules/isnanl-nolibm-tests (Files): Add tests/nan.h to avoid
109456         failure on missing include files.
109458 2009-03-17  Eric Blake  <ebb9@byu.net>
109460         doc: mention more functions added in cygwin 1.7.0
109461         * doc/posix-functions/fwprintf.texi: Mention recent cygwin 1.7.0
109462         addition.
109463         * doc/posix-functions/fwscanf.texi: Likewise.
109464         * doc/posix-functions/swprintf.texi: Likewise.
109465         * doc/posix-functions/swscanf.texi: Likewise.
109466         * doc/posix-functions/vfwprintf.texi: Likewise.
109467         * doc/posix-functions/vfwscanf.texi: Likewise.
109468         * doc/posix-functions/vswprintf.texi: Likewise.
109469         * doc/posix-functions/vswscanf.texi: Likewise.
109470         * doc/posix-functions/vwprintf.texi: Likewise.
109471         * doc/posix-functions/vwscanf.texi: Likewise.
109472         * doc/posix-functions/wcscasecmp.texi: Likewise.
109473         * doc/posix-functions/wcsdup.texi: Likewise.
109474         * doc/posix-functions/wcsftime.texi: Likewise.
109475         * doc/posix-functions/wcsncasecmp.texi: Likewise.
109476         * doc/posix-functions/wprintf.texi: Likewise.
109477         * doc/posix-functions/wscanf.texi: Likewise.
109478         * doc/glibc-functions/gethostbyname2.texi: Likewise.
109480 2009-03-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
109482         maint.mk: really add $(AM_MAKEFLAGS)
109483         * top/maint.mk (init-coverage, build-coverage): `$(AM_MAKEFLAGS)'
109484         was inadvertently omitted in the last commit.
109485         Spotted by Bruno Haible.
109487         maint.mk: use $(MAKE) $(AM_MAKEFLAGS) not make
109488         * top/maint.mk (init-coverage, build-coverage): Use `$(MAKE)
109489         $(AM_MAKEFLAGS)' rather than plain `make'.
109491         gnulib-tool: execute $MAKE not make
109492         * gnulib-tool: Default $MAKE to 'make'.
109493         (func_create_testdir, func_create_megatestdir): Use $MAKE rather
109494         than make.  Initialize $MAKE in the do-autobuild script.
109496         gnulib-tool: use $MAKE not make in generated files
109497         * gnulib-tool (func_create_megatestdir): Use $MAKE rather than
109498         make, in generated files.  Initialize $MAKE in the do-autobuild
109499         script.
109501         * top/GNUmakefile (_have-git-version-gen): Fix typo.
109503         GNUmakefile: disable parallelism only for multiple, recursive targets
109504         * top/GNUmakefile (ALL_RECURSIVE_TARGETS): New macro; allow user
109505         additions in the Makefile.
109506         (AM_RECURSIVE_TARGETS): New macro, override only if not provided
109507         by Automake.
109508         (.NOTPARALLEL): Only disable parallel builds if multiple targets
109509         are listed on the command line and at least one of them is
109510         listed in $(ALL_RECURSIVE_TARGETS).
109512 2009-03-14  Bruno Haible  <bruno@clisp.org>
109514         * modules/unilbrk/u8-possible-linebreaks (Depends-on): Replace
109515         utf8-ucs4-unsafe with unistr/u8-mbtouc-unsafe.
109516         * modules/unilbrk/u8-width-linebreaks (Depends-on): Likewise.
109517         * modules/unilbrk/u16-possible-linebreaks (Depends-on): Replace
109518         utf16-ucs4-unsafe with unistr/u16-mbtouc-unsafe.
109519         * modules/unilbrk/u16-width-linebreaks (Depends-on): Likewise.
109520         * modules/unistr/u8-chr (Depends-on): Replace ucs4-utf8 with
109521         unistr/u8-uctomb.
109522         * modules/unistr/u8-strchr (Depends-on): Likewise.
109523         * modules/unistr/u8-strrchr (Depends-on): Likewise.
109524         * modules/unistr/u16-chr (Depends-on): Replace ucs4-utf16 with
109525         unistr/u16-uctomb.
109526         * modules/unistr/u16-strchr (Depends-on): Likewise.
109527         * modules/unistr/u16-strrchr (Depends-on): Likewise.
109529 2009-03-12  Bruno Haible  <bruno@clisp.org>
109531         Work around select() bug on Interix 3.5.
109532         * lib/sys_select.in.h (select): Also replace if REPLACE_SELECT is 1.
109533         * lib/select.c (rpl_select): Add an implementation for Unix platforms.
109534         * m4/select.m4: New file.
109535         * m4/sys_select_h.m4 (gl_SYS_SELECT_H_DEFAULTS): Initialize REPLACE_SELECT.
109536         * modules/sys_select (Makefile.am): Substitute REPLACE_SELECT.
109537         * modules/select (Files): Add m4/select.m4.
109538         (configure.ac): Move conditional to m4/select.m4. Invoke gl_FUNC_SELECT.
109539         * modules/nanosleep (Depends-on): Add select.
109540         * modules/poll (Depends-on): Likewise.
109541         * doc/posix-functions/select.texi: Mention the Interix bug.
109542         Reported by Markus Duft <mduft@gentoo.org>.
109544         * lib/select.c: Renamed from lib/winsock-select.c.
109545         * modules/select (Files): Add lib/select.c, remove
109546         lib/winsock-select.c.
109547         (configure.ac): Update.
109549 2009-03-12  Jim Meyering  <meyering@redhat.com>
109551         avoid gcc warnings about unused macro definitions
109552         * lib/readtokens.c (STREQ): Remove unused definition.
109553         * lib/xmalloc.c (SIZE_MAX): Likewise.
109554         * lib/openat-die.c (N_): Likewise.
109555         * lib/mountlist.c (SIZE_MAX): Remove definition.
109556         Instead, include <stdint.h>.
109557         * lib/readutmp.c: Likewise.
109558         * modules/readutmp (Depends-on): Add stdint.
109559         * modules/mountlist (Depends-on): Add stdint.
109560         * lib/userspec.c (ISDIGIT): Move definition into #if block where used.
109562 2009-03-10  Bruno Haible  <bruno@clisp.org>
109564         Tests for module 'mbmemcasecoll'.
109565         * modules/mbmemcasecoll-tests: New file.
109566         * tests/test-mbmemcasecoll1.sh: New file.
109567         * tests/test-mbmemcasecoll2.sh: New file.
109568         * tests/test-mbmemcasecoll3.sh: New file.
109569         * tests/test-mbmemcasecoll.c: New file.
109571         New module 'mbmemcasecoll'.
109572         * lib/mbmemcasecoll.h: New file.
109573         * lib/mbmemcasecoll.c: New file.
109574         * modules/mbmemcasecoll: New file.
109576         * tests/test-mbmemcasecmp.h: New file, extracted from
109577         tests/test-mbmemcasecmp.c.
109578         * tests/test-mbmemcasecmp.c: Include test-mbmemcasecmp.h.
109579         (test_ascii, test_iso_8859_1, test_utf_8): Remove functions.
109580         (main): Update.
109581         * modules/mbmemcasecmp-tests (Files): Add tests/test-mbmemcasecmp.h.
109583 2009-03-09  Bruno Haible  <bruno@clisp.org>
109585         Tests for module 'mbmemcasecmp'.
109586         * modules/mbmemcasecmp-tests: New file.
109587         * tests/test-mbmemcasecmp1.sh: New file.
109588         * tests/test-mbmemcasecmp2.sh: New file.
109589         * tests/test-mbmemcasecmp3.sh: New file.
109590         * tests/test-mbmemcasecmp.c: New file.
109592         New module 'mbmemcasecmp'.
109593         * lib/mbmemcasecmp.h: New file.
109594         * lib/mbmemcasecmp.c: New file.
109595         * modules/mbmemcasecmp: New file.
109597 2009-03-09  Bruno Haible  <bruno@clisp.org>
109599         Tests for module 'unicase/ulc-casecoll'.
109600         * modules/unicase/ulc-casecoll-tests: New file.
109601         * tests/unicase/test-ulc-casecoll1.sh: New file.
109602         * tests/unicase/test-ulc-casecoll2.sh: New file.
109603         * tests/unicase/test-ulc-casecoll.c: New file.
109605         New module 'unicase/ulc-casecoll'.
109606         * lib/unicase.h (ulc_casecoll): New declaration.
109607         * lib/unicase/ulc-casecoll.c: New file.
109608         * modules/unicase/ulc-casecoll: New file.
109610         New module 'unicase/ulc-casexfrm'.
109611         * lib/unicase.h (ulc_casexfrm): New declaration.
109612         * lib/unicase/ulc-casexfrm.c: New file.
109613         * modules/unicase/ulc-casexfrm: New file.
109615 2009-03-09  Bruno Haible  <bruno@clisp.org>
109617         Followup to 2008-12-22 commit: Remove unnecessary AC_FUNC_MBRTOWC
109618         invocations.
109620         * m4/mbscasecmp.m4: Remove file.
109621         * modules/mbscasecmp (Files): Remove it and m4/mbrtowc.m4
109622         (configure.ac): Remove gl_FUNC_MBSCASECMP invocation.
109624         * m4/mbscasestr.m4: Remove file.
109625         * modules/mbscasestr (Files): Remove it and m4/mbrtowc.m4
109626         (configure.ac): Remove gl_FUNC_MBSCASESTR invocation.
109628         * m4/mbschr.m4: Remove file.
109629         * modules/mbschr (Files): Remove it and m4/mbrtowc.m4
109630         (configure.ac): Remove gl_FUNC_MBSCHR invocation.
109632         * m4/mbscspn.m4: Remove file.
109633         * modules/mbscspn (Files): Remove it and m4/mbrtowc.m4
109634         (configure.ac): Remove gl_FUNC_MBSCSPN invocation.
109636         * m4/mbslen.m4: Remove file.
109637         * modules/mbslen (Files): Remove it and m4/mbrtowc.m4
109638         (configure.ac): Remove gl_FUNC_MBSLEN invocation.
109640         * m4/mbsncasecmp.m4: Remove file.
109641         * modules/mbsncasecmp (Files): Remove it and m4/mbrtowc.m4
109642         (configure.ac): Remove gl_FUNC_MBSNCASECMP invocation.
109644         * m4/mbsnlen.m4: Remove file.
109645         * modules/mbsnlen (Files): Remove it and m4/mbrtowc.m4
109646         (configure.ac): Remove gl_FUNC_MBSNLEN invocation.
109648         * m4/mbspbrk.m4: Remove file.
109649         * modules/mbspbrk (Files): Remove it and m4/mbrtowc.m4
109650         (configure.ac): Remove gl_FUNC_MBSPBRK invocation.
109652         * m4/mbspcasecmp.m4: Remove file.
109653         * modules/mbspcasecmp (Files): Remove it and m4/mbrtowc.m4
109654         (configure.ac): Remove gl_FUNC_MBSPCASECMP invocation.
109656         * m4/mbsrchr.m4: Remove file.
109657         * modules/mbsrchr (Files): Remove it and m4/mbrtowc.m4
109658         (configure.ac): Remove gl_FUNC_MBSRCHR invocation.
109660         * m4/mbssep.m4: Remove file.
109661         * modules/mbssep (Files): Remove it and m4/mbrtowc.m4
109662         (configure.ac): Remove gl_FUNC_MBSSEP invocation.
109664         * m4/mbsspn.m4: Remove file.
109665         * modules/mbsspn (Files): Remove it and m4/mbrtowc.m4
109666         (configure.ac): Remove gl_FUNC_MBSSPN invocation.
109668         * m4/mbsstr.m4: Remove file.
109669         * modules/mbsstr (Files): Remove it and m4/mbrtowc.m4
109670         (configure.ac): Remove gl_FUNC_MBSSTR invocation.
109672         * m4/mbstok_r.m4: Remove file.
109673         * modules/mbstok_r (Files): Remove it and m4/mbrtowc.m4
109674         (configure.ac): Remove gl_FUNC_MBSTOK_R invocation.
109676         * m4/mbswidth.m4 (gl_MBSWIDTH): Remove AC_FUNC_MBRTOWC invocation.
109678         * m4/quotearg.m4 (gl_QUOTEARG): Remove mbsinit test and
109679         AC_TYPE_MBSTATE_T, AC_FUNC_MBRTOWC invocations.
109681         * modules/trim (configure.ac): Remove AC_FUNC_MBRTOWC invocation.
109683 2009-03-08  Bruno Haible  <bruno@clisp.org>
109685         Tests for module 'unicase/ulc-casecmp'.
109686         * modules/unicase/ulc-casecmp-tests: New file.
109687         * tests/unicase/test-ulc-casecmp1.sh: New file.
109688         * tests/unicase/test-ulc-casecmp2.sh: New file.
109689         * tests/unicase/test-ulc-casecmp.c: New file.
109691         New module 'unicase/ulc-casecmp'.
109692         * lib/unicase.h (ulc_casecmp): New declaration.
109693         * lib/unicase/ulc-casecmp.c: New file.
109694         * lib/unicase/u-casecmp.h (FUNC): Change argument types to
109695         'const SRC_UNIT *'.
109696         * lib/unicase/u8-casecmp.c (SRC_UNIT): Define like UNIT.
109697         * lib/unicase/u16-casecmp.c (SRC_UNIT): Likewise.
109698         * lib/unicase/u32-casecmp.c (SRC_UNIT): Likewise.
109699         * modules/unicase/ulc-casecmp: New file.
109701         Tests for module 'unicase/u32-is-cased'.
109702         * modules/unicase/u32-is-cased-tests: New file.
109703         * tests/unicase/test-u32-is-cased.c: New file.
109705         Tests for module 'unicase/u16-is-cased'.
109706         * modules/unicase/u16-is-cased-tests: New file.
109707         * tests/unicase/test-u16-is-cased.c: New file.
109709         Tests for module 'unicase/u8-is-cased'.
109710         * modules/unicase/u8-is-cased-tests: New file.
109711         * tests/unicase/test-u8-is-cased.c: New file.
109712         * tests/unicase/test-is-cased.h: New file.
109714         New module 'unicase/u32-is-cased'.
109715         * lib/unicase/u32-is-cased.c: New file.
109716         * modules/unicase/u32-is-cased: New file.
109718         New module 'unicase/u16-is-cased'.
109719         * lib/unicase/u16-is-cased.c: New file.
109720         * modules/unicase/u16-is-cased: New file.
109722         New module 'unicase/u8-is-cased'.
109723         * lib/unicase/u8-is-cased.c: New file.
109724         * lib/unicase/u-is-cased.h: New file.
109725         * modules/unicase/u8-is-cased: New file.
109727         Tests for module 'unicase/u32-is-casefolded'.
109728         * modules/unicase/u32-is-casefolded-tests: New file.
109729         * tests/unicase/test-u32-is-casefolded.c: New file.
109731         Tests for module 'unicase/u16-is-casefolded'.
109732         * modules/unicase/u16-is-casefolded-tests: New file.
109733         * tests/unicase/test-u16-is-casefolded.c: New file.
109735         Tests for module 'unicase/u8-is-casefolded'.
109736         * modules/unicase/u8-is-casefolded-tests: New file.
109737         * tests/unicase/test-u8-is-casefolded.c: New file.
109738         * tests/unicase/test-is-casefolded.h: New file.
109740         New module 'unicase/u32-is-casefolded'.
109741         * lib/unicase/u32-is-casefolded.c: New file.
109742         * modules/unicase/u32-is-casefolded: New file.
109744         New module 'unicase/u16-is-casefolded'.
109745         * lib/unicase/u16-is-casefolded.c: New file.
109746         * modules/unicase/u16-is-casefolded: New file.
109748         New module 'unicase/u8-is-casefolded'.
109749         * lib/unicase/u8-is-casefolded.c: New file.
109750         * modules/unicase/u8-is-casefolded: New file.
109752         Tests for module 'unicase/u32-is-titlecase'.
109753         * modules/unicase/u32-is-titlecase-tests: New file.
109754         * tests/unicase/test-u32-is-titlecase.c: New file.
109756         Tests for module 'unicase/u16-is-titlecase'.
109757         * modules/unicase/u16-is-titlecase-tests: New file.
109758         * tests/unicase/test-u16-is-titlecase.c: New file.
109760         Tests for module 'unicase/u8-is-titlecase'.
109761         * modules/unicase/u8-is-titlecase-tests: New file.
109762         * tests/unicase/test-u8-is-titlecase.c: New file.
109763         * tests/unicase/test-is-titlecase.h: New file.
109765         New module 'unicase/u32-is-titlecase'.
109766         * lib/unicase/u32-is-titlecase.c: New file.
109767         * modules/unicase/u32-is-titlecase: New file.
109769         New module 'unicase/u16-is-titlecase'.
109770         * lib/unicase/u16-is-titlecase.c: New file.
109771         * modules/unicase/u16-is-titlecase: New file.
109773         New module 'unicase/u8-is-titlecase'.
109774         * lib/unicase/u8-is-titlecase.c: New file.
109775         * modules/unicase/u8-is-titlecase: New file.
109777         Tests for module 'unicase/u32-is-lowercase'.
109778         * modules/unicase/u32-is-lowercase-tests: New file.
109779         * tests/unicase/test-u32-is-lowercase.c: New file.
109781         Tests for module 'unicase/u16-is-lowercase'.
109782         * modules/unicase/u16-is-lowercase-tests: New file.
109783         * tests/unicase/test-u16-is-lowercase.c: New file.
109785         Tests for module 'unicase/u8-is-lowercase'.
109786         * modules/unicase/u8-is-lowercase-tests: New file.
109787         * tests/unicase/test-u8-is-lowercase.c: New file.
109788         * tests/unicase/test-is-lowercase.h: New file.
109790         New module 'unicase/u32-is-lowercase'.
109791         * lib/unicase/u32-is-lowercase.c: New file.
109792         * modules/unicase/u32-is-lowercase: New file.
109794         New module 'unicase/u16-is-lowercase'.
109795         * lib/unicase/u16-is-lowercase.c: New file.
109796         * modules/unicase/u16-is-lowercase: New file.
109798         New module 'unicase/u8-is-lowercase'.
109799         * lib/unicase/u8-is-lowercase.c: New file.
109800         * modules/unicase/u8-is-lowercase: New file.
109802         Tests for module 'unicase/u32-is-uppercase'.
109803         * modules/unicase/u32-is-uppercase-tests: New file.
109804         * tests/unicase/test-u32-is-uppercase.c: New file.
109806         Tests for module 'unicase/u16-is-uppercase'.
109807         * modules/unicase/u16-is-uppercase-tests: New file.
109808         * tests/unicase/test-u16-is-uppercase.c: New file.
109810         Tests for module 'unicase/u8-is-uppercase'.
109811         * modules/unicase/u8-is-uppercase-tests: New file.
109812         * tests/unicase/test-u8-is-uppercase.c: New file.
109813         * tests/unicase/test-is-uppercase.h: New file.
109815         New module 'unicase/u32-is-uppercase'.
109816         * lib/unicase/u32-is-uppercase.c: New file.
109817         * modules/unicase/u32-is-uppercase: New file.
109819         New module 'unicase/u16-is-uppercase'.
109820         * lib/unicase/u16-is-uppercase.c: New file.
109821         * modules/unicase/u16-is-uppercase: New file.
109823         New module 'unicase/u8-is-uppercase'.
109824         * lib/unicase/u8-is-uppercase.c: New file.
109825         * modules/unicase/u8-is-uppercase: New file.
109827         New module 'unicase/u32-is-invariant'.
109828         * lib/unicase/u32-is-invariant.c: New file.
109829         * modules/unicase/u32-is-invariant: New file.
109831         New module 'unicase/u16-is-invariant'.
109832         * lib/unicase/u16-is-invariant.c: New file.
109833         * modules/unicase/u16-is-invariant: New file.
109835         New module 'unicase/u8-is-invariant'.
109836         * lib/unicase/u8-is-invariant.c: New file.
109837         * lib/unicase/invariant.h: New file.
109838         * lib/unicase/u-is-invariant.h: New file.
109839         * modules/unicase/u8-is-invariant: New file.
109841         Tests for module 'unicase/u32-casecoll'.
109842         * modules/unicase/u32-casecoll-tests: New file.
109843         * tests/unicase/test-u32-casecoll.c: New file.
109845         Tests for module 'unicase/u16-casecoll'.
109846         * modules/unicase/u16-casecoll-tests: New file.
109847         * tests/unicase/test-u16-casecoll.c: New file.
109849         Tests for module 'unicase/u8-casecoll'.
109850         * modules/unicase/u8-casecoll-tests: New file.
109851         * tests/unicase/test-u8-casecoll.c: New file.
109853         New module 'unicase/u32-casecoll'.
109854         * lib/unicase/u32-casecoll.c: New file.
109855         * modules/unicase/u32-casecoll: New file.
109857         New module 'unicase/u16-casecoll'.
109858         * lib/unicase/u16-casecoll.c: New file.
109859         * modules/unicase/u16-casecoll: New file.
109861         New module 'unicase/u8-casecoll'.
109862         * lib/unicase/u8-casecoll.c: New file.
109863         * lib/unicase/u-casecoll.h: New file.
109864         * modules/unicase/u8-casecoll: New file.
109866         New module 'unicase/u32-casexfrm'.
109867         * lib/unicase/u32-casexfrm.c: New file.
109868         * modules/unicase/u32-casexfrm: New file.
109870         New module 'unicase/u16-casexfrm'.
109871         * lib/unicase/u16-casexfrm.c: New file.
109872         * modules/unicase/u16-casexfrm: New file.
109874         New module 'unicase/u8-casexfrm'.
109875         * lib/unicase/u8-casexfrm.c: New file.
109876         * lib/unicase/u-casexfrm.h: New file.
109877         * modules/unicase/u8-casexfrm: New file.
109879         Tests for module 'unicase/u32-casecmp'.
109880         * modules/unicase/u32-casecmp-tests: New file.
109881         * tests/unicase/test-u32-casecmp.c: New file.
109883         Tests for module 'unicase/u16-casecmp'.
109884         * modules/unicase/u16-casecmp-tests: New file.
109885         * tests/unicase/test-u16-casecmp.c: New file.
109887         Tests for module 'unicase/u8-casecmp'.
109888         * modules/unicase/u8-casecmp-tests: New file.
109889         * tests/unicase/test-u8-casecmp.c: New file.
109890         * tests/unicase/test-casecmp.h: New file.
109892         New module 'unicase/u32-casecmp'.
109893         * lib/unicase/u32-casecmp.c: New file.
109894         * modules/unicase/u32-casecmp: New file.
109896         New module 'unicase/u16-casecmp'.
109897         * lib/unicase/u16-casecmp.c: New file.
109898         * modules/unicase/u16-casecmp: New file.
109900         New module 'unicase/u8-casecmp'.
109901         * lib/unicase/u8-casecmp.c: New file.
109902         * lib/unicase/u-casecmp.h: New file.
109903         * modules/unicase/u8-casecmp: New file.
109905         Tests for module 'unicase/u32-casefold'.
109906         * modules/unicase/u32-casefold-tests: New file.
109907         * tests/unicase/test-u32-casefold.c: New file.
109909         Tests for module 'unicase/u16-casefold'.
109910         * modules/unicase/u16-casefold-tests: New file.
109911         * tests/unicase/test-u16-casefold.c: New file.
109913         Tests for module 'unicase/u8-casefold'.
109914         * modules/unicase/u8-casefold-tests: New file.
109915         * tests/unicase/test-u8-casefold.c: New file.
109917         New module 'unicase/u32-casefold'.
109918         * lib/unicase/u32-casefold.c: New file.
109919         * modules/unicase/u32-casefold: New file.
109921         New module 'unicase/u16-casefold'.
109922         * lib/unicase/u16-casefold.c: New file.
109923         * modules/unicase/u16-casefold: New file.
109925         New module 'unicase/u8-casefold'.
109926         * lib/unicase/u8-casefold.c: New file.
109927         * lib/unicase/u-casefold.h: New file.
109928         * modules/unicase/u8-casefold: New file.
109930         New module 'unicase/tocasefold'.
109931         * lib/unicase/casefold.h: New file.
109932         * lib/unicase/tocasefold.c: New file.
109933         * lib/unicase/tocasefold.h: New file, generated by gen-uni-tables.c.
109934         * modules/unicase/tocasefold: New file.
109936         Tests for module 'unicase/u32-totitle'.
109937         * modules/unicase/u32-totitle-tests: New file.
109938         * tests/unicase/test-u32-totitle.c: New file.
109940         Tests for module 'unicase/u16-totitle'.
109941         * modules/unicase/u16-totitle-tests: New file.
109942         * tests/unicase/test-u16-totitle.c: New file.
109944         Tests for module 'unicase/u8-totitle'.
109945         * modules/unicase/u8-totitle-tests: New file.
109946         * tests/unicase/test-u8-totitle.c: New file.
109948         New module 'unicase/u32-totitle'.
109949         * lib/unicase/u32-totitle.c: New file.
109950         * modules/unicase/u32-totitle: New file.
109952         New module 'unicase/u16-totitle'.
109953         * lib/unicase/u16-totitle.c: New file.
109954         * modules/unicase/u16-totitle: New file.
109956         New module 'unicase/u8-totitle'.
109957         * lib/unicase/u8-totitle.c: New file.
109958         * lib/unicase/u-totitle.h: New file.
109959         * modules/unicase/u8-totitle: New file.
109961         Tests for module 'unicase/u32-tolower'.
109962         * modules/unicase/u32-tolower-tests: New file.
109963         * tests/unicase/test-u32-tolower.c: New file.
109965         Tests for module 'unicase/u16-tolower'.
109966         * modules/unicase/u16-tolower-tests: New file.
109967         * tests/unicase/test-u16-tolower.c: New file.
109969         Tests for module 'unicase/u8-tolower'.
109970         * modules/unicase/u8-tolower-tests: New file.
109971         * tests/unicase/test-u8-tolower.c: New file.
109973         New module 'unicase/u32-tolower'.
109974         * lib/unicase/u32-tolower.c: New file.
109975         * modules/unicase/u32-tolower: New file.
109977         New module 'unicase/u16-tolower'.
109978         * lib/unicase/u16-tolower.c: New file.
109979         * modules/unicase/u16-tolower: New file.
109981         New module 'unicase/u8-tolower'.
109982         * lib/unicase/u8-tolower.c: New file.
109983         * modules/unicase/u8-tolower: New file.
109985         Tests for module 'unicase/u32-toupper'.
109986         * modules/unicase/u32-toupper-tests: New file.
109987         * tests/unicase/test-u32-toupper.c: New file.
109989         Tests for module 'unicase/u16-toupper'.
109990         * modules/unicase/u16-toupper-tests: New file.
109991         * tests/unicase/test-u16-toupper.c: New file.
109993         Tests for module 'unicase/u8-toupper'.
109994         * modules/unicase/u8-toupper-tests: New file.
109995         * tests/unicase/test-u8-toupper.c: New file.
109997         New module 'unicase/u32-toupper'.
109998         * lib/unicase/u32-toupper.c: New file.
109999         * modules/unicase/u32-toupper: New file.
110001         New module 'unicase/u16-toupper'.
110002         * lib/unicase/u16-toupper.c: New file.
110003         * modules/unicase/u16-toupper: New file.
110005         New module 'unicase/u8-toupper'.
110006         * lib/unicase/u8-toupper.c: New file.
110007         * modules/unicase/u8-toupper: New file.
110009         New module 'unicase/u32-casemap'.
110010         * lib/unicase/u32-casemap.c: New file.
110011         * modules/unicase/u32-casemap: New file.
110013         New module 'unicase/u16-casemap'.
110014         * lib/unicase/u16-casemap.c: New file.
110015         * modules/unicase/u16-casemap: New file.
110017         New module 'unicase/u8-casemap'.
110018         * lib/unicase/unicasemap.h: New file.
110019         * lib/unicase/u8-casemap.c: New file.
110020         * lib/unicase/u-casemap.h: New file.
110021         * modules/unicase/u8-casemap: New file.
110023         New module 'unicase/special-casing'.
110024         * lib/unicase/special-casing.h: New file.
110025         * lib/unicase/special-casing.c: New file.
110026         * lib/unicase/special-casing-table.gperf: New file, generated by
110027         gen-uni-tables.c.
110028         * modules/unicase/special-casing: New file.
110030         Tests for module 'unicase/locale-language'.
110031         * modules/unicase/locale-language-tests: New file.
110032         * tests/unicase/test-locale-language.sh: New file.
110033         * tests/unicase/test-locale-language.c: New file.
110035         New module 'unicase/locale-language'.
110036         * lib/unicase/locale-language.c: New file.
110037         * lib/unicase/locale-languages.gperf: New file.
110038         * modules/unicase/locale-language: New file.
110040         Generate more tables for case conversion and case folding.
110041         * lib/gen-uni-tables.c (SCC_*): New enum items.
110042         (struct special_casing_rule): New type.
110043         (casing_rules, num_casing_rules, allocated_casing_rules): New
110044         variables.
110045         (add_casing_rule, fill_casing_rules): New functions.
110046         (struct casefold_rule): New type.
110047         (casefolding_rules, num_casefolding_rules,
110048         allocated_casefolding_rules): New variables.
110049         (fill_casefolding_rules): New function.
110050         (unicode_casefold): New variable.
110051         (to_casefold, redistribute_casefolding_rules, compare_casing_rules,
110052         sort_casing_rules, output_casing_rules): New functions.
110053         (main): Accept to more arguments: SpecialCasing.txt and
110054         CaseFolding.txt. Invoke fill_casing_rules, fill_casefolding_rules,
110055         redistribute_casefolding_rules, sort_casing_rules, output_casing_rules.
110056         Output mapping for casefolding.
110058         * lib/unicase.h: Include stdbool.h, uninorm.h.
110059         (u8_toupper, u16_toupper, u32_toupper, u8_tolower, u16_tolower,
110060         u32_tolower, u8_totitle, u16_totitle, u32_totitle): Add nf argument.
110061         (u8_casefold, u16_casefold, u32_casefold): Add iso639_language and nf
110062         arguments.
110063         (u8_casecmp, u16_casecmp, u32_casecmp): Add iso639_language, nf,
110064         resultp arguments.
110065         (u8_casexfrm, u16_casexfrm, u32_casexfrm): New declarations.
110066         (u8_casecoll, u16_casecoll, u32_casecoll): Add iso639_language, nf,
110067         resultp arguments.
110068         (u8_is_uppercase, u16_is_uppercase, u32_is_uppercase, u8_is_lowercase,
110069         u16_is_lowercase, u32_is_lowercase, u8_is_titlecase, u16_is_titlecase,
110070         u32_is_titlecase, u8_is_casefolded, u16_is_casefolded,
110071         u32_is_casefolded, u8_is_cased, u16_is_cased, u32_is_cased): New
110072         declarations.
110073         * modules/unicase/base (Depends-on): Add uninorm/base, stdbool.
110075 2009-03-08  Bruno Haible  <bruno@clisp.org>
110077         * lib/uninorm.h (u8_normcmp, u16_normcmp, u32_normcmp, u8_normcoll,
110078         u16_normcoll, u32_normcoll): Rename argument 'result' to 'resultp'.
110079         * lib/uninorm/u-normcmp.h (FUNC): Likewise.
110080         * lib/uninorm/u-normcoll.h (FUNC): Likewise.
110082 2009-03-07  Bruno Haible  <bruno@clisp.org>
110084         Adjust u*_normcmp, u*_normcoll API.
110085         * lib/uninorm.h (u8_normcmp, u16_normcmp, u32_normcmp, u8_normcoll,
110086         u16_normcoll, u32_normcoll): Change failure conventions.
110087         * lib/uninorm/u-normcmp.h (FUNC): Upon failure, store the error code in
110088         errno and return -1.
110089         * lib/uninorm/u-normcoll.h (FUNC): Likewise.
110091 2009-03-07  Bruno Haible  <bruno@clisp.org>
110093         Tests for module 'uninorm/u32-normcoll'.
110094         * modules/uninorm/u32-normcoll-tests: New file.
110095         * tests/uninorm/test-u32-normcoll.c: New file.
110097         Tests for module 'uninorm/u16-normcoll'.
110098         * modules/uninorm/u16-normcoll-tests: New file.
110099         * tests/uninorm/test-u16-normcoll.c: New file.
110101         Tests for module 'uninorm/u8-normcoll'.
110102         * modules/uninorm/u8-normcoll-tests: New file.
110103         * tests/uninorm/test-u8-normcoll.c: New file.
110105 2009-03-07  Bruno Haible  <bruno@clisp.org>
110107         * tests/uninorm/test-u32-normcmp.h: New file, extracted from
110108         tests/uninorm/test-u32-normcmp.c.
110109         * tests/uninorm/test-u32-normcmp.c: Include it.
110110         (test_nonascii): New function, extracted from main. Add some more
110111         tests.
110112         (main): Invoke test_ascii and test_nonascii.
110113         * modules/uninorm/u32-normcmp-tests (Files): Add
110114         tests/uninorm/test-u32-normcmp.h.
110115         (Depends-on): Remove uninorm/u32-normcmp.
110117         * tests/uninorm/test-u16-normcmp.h: New file, extracted from
110118         tests/uninorm/test-u16-normcmp.c.
110119         * tests/uninorm/test-u16-normcmp.c: Include it.
110120         (test_nonascii): New function, extracted from main. Add some more
110121         tests.
110122         (main): Invoke test_ascii and test_nonascii.
110123         * modules/uninorm/u16-normcmp-tests (Files): Add
110124         tests/uninorm/test-u16-normcmp.h.
110125         (Depends-on): Remove uninorm/u16-normcmp.
110127         * tests/uninorm/test-u8-normcmp.h: New file, extracted from
110128         tests/uninorm/test-u8-normcmp.c.
110129         * tests/uninorm/test-u8-normcmp.c: Include it.
110130         (test_nonascii): New function, extracted from main. Add some more
110131         tests.
110132         (main): Invoke test_ascii and test_nonascii.
110133         * modules/uninorm/u8-normcmp-tests (Files): Add
110134         tests/uninorm/test-u8-normcmp.h.
110135         (Depends-on): Remove uninorm/u8-normcmp.
110137 2009-03-07  Bruno Haible  <bruno@clisp.org>
110139         New module 'uninorm/u32-normcoll'.
110140         * lib/uninorm/u32-normcoll.c: New file.
110141         * modules/uninorm/u32-normcoll: New file.
110143         New module 'uninorm/u16-normcoll'.
110144         * lib/uninorm/u16-normcoll.c: New file.
110145         * modules/uninorm/u16-normcoll: New file.
110147         New module 'uninorm/u8-normcoll'.
110148         * lib/uninorm.h (u8_normcoll, u16_normcoll, u32_normcoll): New
110149         declarations.
110150         * lib/uninorm/u8-normcoll.c: New file.
110151         * lib/uninorm/u-normcoll.h: New file.
110152         * modules/uninorm/u8-normcoll: New file.
110154         New module 'uninorm/u32-normxfrm'.
110155         * lib/uninorm/u32-normxfrm.c: New file.
110156         * modules/uninorm/u32-normxfrm: New file.
110158         New module 'uninorm/u16-normxfrm'.
110159         * lib/uninorm/u16-normxfrm.c: New file.
110160         * modules/uninorm/u16-normxfrm: New file.
110162         New module 'uninorm/u8-normxfrm'.
110163         * lib/uninorm.h (u8_normxfrm, u16_normxfrm, u32_normxfrm): New
110164         declarations.
110165         * lib/uninorm/u8-normxfrm.c: New file.
110166         * lib/uninorm/u-normxfrm.h: New file.
110167         * modules/uninorm/u8-normxfrm: New file.
110169 2009-03-07  Bruno Haible  <bruno@clisp.org>
110171         * modules/uninorm/u8-normcmp (Depends-on): Add uninorm/base.
110172         * modules/uninorm/u16-normcmp (Depends-on): Likewise.
110173         * modules/uninorm/u32-normcmp (Depends-on): Likewise.
110175 2009-03-07  Bruno Haible  <bruno@clisp.org>
110177         New module 'memxfrm'.
110178         * lib/memxfrm.h: New file.
110179         * lib/memxfrm.c: New file.
110180         * modules/memxfrm: New file.
110182 2009-03-07  Bruno Haible  <bruno@clisp.org>
110184         New module 'memcmp2'.
110185         * lib/memcmp2.h: New file.
110186         * lib/memcmp2.c: New file.
110187         * modules/memcmp2: New file.
110189 2009-03-07  Bruno Haible  <bruno@clisp.org>
110191         Tests for module 'uninorm/decomposing-form'.
110192         * modules/uninorm/decomposing-form-tests: New file.
110193         * tests/uninorm/test-decomposing-form.c: New file.
110195         New module 'uninorm/decomposing-form'.
110196         * lib/uninorm.h (uninorm_decomposing_form): New declaration.
110197         * lib/uninorm/normalize-internal.h (struct unicode_normalization_form):
110198         Add 'decomposing_variant' field.
110199         * lib/uninorm/decomposing-form.c: New file.
110200         * lib/uninorm/nfc.c (uninorm_nfc): Update.
110201         * lib/uninorm/nfd.c (uninorm_nfd): Update.
110202         * lib/uninorm/nfkc.c (uninorm_nfkc): Update.
110203         * lib/uninorm/nfkd.c (uninorm_nfkd): Update.
110204         * modules/uninorm/decomposing-form: New file.
110205         * modules/uninorm/nfc (Depends-on): Add uninorm/nfd.
110206         * modules/uninorm/nfkc (Depends-on): Add uninorm/nfkd.
110208 2009-03-07  Bruno Haible  <bruno@clisp.org>
110210         * lib/uninorm/u-normcmp.h (FUNC): Use stack=allocated buffers for small
110211         strings.
110213 2009-03-06  Bruno Haible  <bruno@clisp.org>
110215         Tests for module 'uninorm/u32-normcmp'.
110216         * tests/uninorm/test-u32-normcmp.c: New file.
110217         * modules/uninorm/u32-normcmp-tests: New file.
110219         Tests for module 'uninorm/u16-normcmp'.
110220         * tests/uninorm/test-u16-normcmp.c: New file.
110221         * modules/uninorm/u16-normcmp-tests: New file.
110223         Tests for module 'uninorm/u8-normcmp'.
110224         * tests/uninorm/test-u8-normcmp.c: New file.
110225         * modules/uninorm/u8-normcmp-tests: New file.
110227         New module 'uninorm/u32-normcmp'.
110228         * lib/uninorm/u32-normcmp.c: New file.
110229         * modules/uninorm/u32-normcmp: New file.
110231         New module 'uninorm/u16-normcmp'.
110232         * lib/uninorm/u16-normcmp.c: New file.
110233         * modules/uninorm/u16-normcmp: New file.
110235         New module 'uninorm/u8-normcmp'.
110236         * lib/uninorm.h (u8_normcmp, u16_normcmp, u32_normcmp): New
110237         declarations.
110238         * lib/uninorm/u8-normcmp.c: New file.
110239         * lib/uninorm/u-normcmp.h: New file.
110240         * modules/uninorm/u8-normcmp: New file.
110242 2009-03-06  Bruno Haible  <bruno@clisp.org>
110244         * lib/w32spawn.h (dup_noinherit): Add cast, to avoid gcc warning.
110245         Reported by Eric Blake.
110247 2009-03-06  Eric Blake  <ebb9@byu.net>
110248             Bruno Haible  <bruno@clisp.org>
110250         * lib/spawni.c (__spawni) [WIN32_NATIVE]: Define as a stub.
110251         * modules/posix_spawn-tests (configure.ac): Define POSIX_SPAWN_PORTED
110252         condition.
110253         (Makefile.am): Do nothing if POSIX_SPAWN_PORTED is false.
110254         * modules/posix_spawnp-tests (configure.ac): Define POSIX_SPAWN_PORTED
110255         condition.
110256         (Makefile.am): Do nothing if POSIX_SPAWN_PORTED is false.
110258 2009-03-06  Eric Blake  <ebb9@byu.net>
110260         * lib/execute.c (execute) [WIN32_NATIVE]: Cast arguments of spawnvpe,
110261         to avoid compiler warnings.
110262         * lib/pipe.c (create_pipe) [WIN32_NATIVE]: Likewise.
110264 2009-03-05  Bruno Haible  <bruno@clisp.org>
110266         * tests/test-ftell.c (main): Disable test beyond end of file on
110267         FreeMiNT.
110268         Patch by Alan Hourihane <alanh@fairlite.co.uk>.
110270 2009-03-05  Kamil Dudka  <kdudka@redhat.com>
110272         * lib/filevercmp.c: Move hidden files up in ordering.
110273         * tests/test-filevercmp.c: Add tests for hidden files.
110275 2009-03-04  Bruno Haible  <bruno@clisp.org>
110277         * modules/visibility (Makefile.am): Augment AM_CFLAGS.
110278         * gnulib-tool (func_emit_lib_Makefile_am): Emit initialization of
110279         AM_CFLAGS.
110280         Reported by Simon Josefsson.
110282 2009-03-03  Bruno Haible  <bruno@clisp.org>
110284         * doc/visibility.texi: Recommend to use HAVE_VISIBILITY as a C macro.
110285         Reported by Simon Josefsson.
110287         * doc/ld-version-script.texi: Update node reference.
110289 2009-03-03  Bruno Haible  <bruno@clisp.org>
110291         * modules/visibility (License): Change to 'unlimited'.
110292         Suggested by Simon Josefsson.
110294 2009-03-03  Jim Meyering  <meyering@redhat.com>
110296         unlinkdir: cannot_unlink_dir may modify process state
110297         * lib/unlinkdir.c (cannot_unlink_dir): Add a comment warning that
110298         it's neither thread-safe nor appropriate for use in a library.
110300 2009-03-03  Eric Blake  <ebb9@byu.net>
110302         test-closein: silence test under Darwin
110303         * tests/test-closein.sh: Ignore stderr from cat, since we don't
110304         care if it dies from EPIPE or EBADF.
110306 2009-03-03  Bruno Haible  <bruno@clisp.org>
110308         * doc/gnulib.texi: Include visibility.texi and ld-version-script.texi
110309         earlier.
110310         * doc/visibility.texi: Fix @node and @section.
110312 2009-03-03  Simon Josefsson  <simon@josefsson.org>
110314         * doc/gnulib.texi: Link to sections for ld version script and
110315         visibility.
110316         * doc/visibility.texi: Add @node and @section.
110317         * modules/ld-version-script: New module.
110318         * m4/ld-version-script.m4: New file.
110319         * doc/ld-version-script.texi: New file.
110321 2009-03-02  David Lutterkort  <lutter@redhat.com>
110323         * lib/safe-alloc.h (__GNUC_PREREQ): New macro.
110324         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
110326 2009-03-02  Bruno Haible  <bruno@clisp.org>
110328         * doc/visibility.texi: Mention libtool's -export-symbols option.
110330 2009-03-02  Jim Meyering  <meyering@redhat.com>
110332         announce-gen: new option: --no-print-checksums
110333         * build-aux/announce-gen (usage): Describe it.
110334         (print_checksums): Print a newline here, not in the [*] footnote.
110335         (main): Honor it.
110337 2009-03-01  Bruno Haible  <bruno@clisp.org>
110339         Use socklen_t in the native Windows replacements prototypes.
110340         * lib/sys_socket.in.h (rpl_getsockopt, rpl_setsockopt): Use socklen_t
110341         instead of 'int'.
110342         * lib/getsockopt.c (rpl_getsockopt): Likewise.
110343         * lib/setsockopt.c (rpl_setsockopt): Likewise.
110344         * modules/getsockopt (Depends-on): Add socklen.
110345         * modules/setsockopt (Depends-on): Add socklen.
110347 2009-03-01  Bruno Haible  <bruno@clisp.org>
110349         * gnulib-tool (sed): Do alias as "sed --posix" if sed's version is at
110350         least 4.2.
110352 2009-03-01  Eric Blake  <ebb9@byu.net>
110353             Bruno Haible  <bruno@clisp.org>
110355         * lib/wait-process.h (wait_subprocess): Describe effect of termsigp on
110356         error messages.
110357         * lib/wait-process.c (wait_subprocess): Omit error message about
110358         deadly signal sent to the child of termsigp != NULL.
110360 2009-03-01  Eric Blake  <ebb9@byu.net>
110362         * lib/wait-process.c (wait_subprocess): Remove unnecessary cast.
110364 2009-03-01  Bruno Haible  <bruno@clisp.org>
110366         Avoid a gcc warning.
110367         * tests/test-sched.c (b): Make global.
110368         Reported by Eric Blake.
110370 2009-01-19  Martin Lambers  <marlam@marlam.de>
110372         Provide POSIX semantics for socket timeout options on W32.
110373         * lib/setsockopt.c: Convert struct timeval to milliseconds on W32.
110374         * lib/getsockopt.c: Convert milliseconds to struct timeval on W32.
110375         * modules/setsockopt: Depend on sys_time module for struct timeval.
110376         * modules/getsockopt: Depend on sys_time module for struct timeval.
110378 2009-03-01  Simon Josefsson  <simon@josefsson.org>
110380         * lib/gai_strerror.c (values): Use EAI_INPROGRESS instead of
110381         __USE_GNU, for consistency with netdb.in.h.
110382         Reported by Alan Hourihane <alanh@fairlite.co.uk>.
110384 2009-03-01  Bruno Haible  <bruno@clisp.org>
110386         More support for FreeMiNT.
110387         * lib/fseeko.c (rpl_fseeko): Complete last commit.
110388         Reported by Alan Hourihane <alanh@fairlite.co.uk>.
110390 2009-03-01  Bruno Haible  <bruno@clisp.org>
110392         More support for FreeMiNT.
110393         * lib/fpurge.c (fpurge): Correct last commit.
110394         Reported by Alan Hourihane <alanh@fairlite.co.uk>.
110396 2009-03-01  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
110398         Fix unportable awk script in vc-list-files.
110399         * build-aux/vc-list-files: In the replacement awk script, use
110400         substr with a second argument of 1, not zero.
110401         Report by Simon Josefsson.
110403 2009-02-28  Bruno Haible  <bruno@clisp.org>
110405         More support for FreeMiNT.
110406         * lib/freading.c (freading) [__MINT__]: Use new macros that were added
110407         to FreeMiNT today.
110408         * lib/fwriting.c (fwriting): Likewise.
110409         Based on patch by Alan Hourihane <alanh@fairlite.co.uk>.
110411 2009-02-28  Bruno Haible  <bruno@clisp.org>
110413         * tests/test-freadseek.c (main): Disable test beyond end of file on
110414         FreeMiNT.
110415         * tests/test-ftello.c (main): Likewise.
110416         Patch by Alan Hourihane <alanh@fairlite.co.uk>.
110418 2009-02-28  Bruno Haible  <bruno@clisp.org>
110420         Add tentative support for FreeMiNT.
110421         * lib/fbufmode.c (fbufmode) [__MINT__]: Add conditional code.
110422         * lib/fpurge.c (fpurge): Likewise.
110423         * lib/freadable.c (freadable): Likewise.
110424         * lib/freading.c (freading): Likewise.
110425         * lib/freadptr.c (freadptr): Likewise.
110426         * lib/freadseek.c (freadptrinc): Likewise.
110427         * lib/fseeko.c (rpl_fseeko): Likewise.
110428         * lib/fseterr.c (fseterr): Likewise.
110429         * lib/fwritable.c (fwritable): Likewise.
110430         * lib/fwriting.c (fwriting): Likewise.
110431         * lib/freadahead.c (freadahead): Likewise, based on code by Alan
110432         Hourihane.
110433         Reported by Alan Hourihane <alanh@fairlite.co.uk>.
110435 2009-02-28  Bruno Haible  <bruno@clisp.org>
110437         * lib/wait-process.h (wait_subprocess): Clarify restriction regarding
110438         SIGCHLD.
110439         Reported by Jim Meyering.
110441 2009-02-28  Bruno Haible  <bruno@clisp.org>
110443         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_LS): Separate the two first tests.
110444         Mention the results of these tests on various platforms.
110445         * doc/posix-functions/fprintf.texi: Mention platforms in canonical
110446         order.
110447         * doc/posix-functions/printf.texi: Likewise.
110448         * doc/posix-functions/snprintf.texi: Likewise.
110449         * doc/posix-functions/sprintf.texi: Likewise.
110450         * doc/posix-functions/vfprintf.texi: Likewise.
110451         * doc/posix-functions/vprintf.texi: Likewise.
110452         * doc/posix-functions/vsnprintf.texi: Likewise.
110453         * doc/posix-functions/vsprintf.texi: Likewise.
110454         * doc/glibc-functions/obstack_printf.texi: Likewise.
110455         * doc/glibc-functions/obstack_vprintf.texi: Likewise.
110457 2009-02-28  Bruno Haible  <bruno@clisp.org>
110459         * build-aux/po/Makefile.in.in: Update from GNU gettext 0.17.
110460         Reported by Loïc Minier <lool@dooz.org>.
110462 2009-02-27  Bruno Haible  <bruno@clisp.org>
110464         * gnulib-tool (func_import): Make the sed expression used to create the
110465         sed script for updating the .gitignore file POSIX compliant.
110466         Reported by Eric Blake.
110468 2009-02-27  Bruno Haible  <bruno@clisp.org>
110470         * gnulib-tool (sed): Don't alias as "sed --posix".
110471         Reported by Eric Blake.
110473 2009-02-27  Bruno Haible  <bruno@clisp.org>
110475         Avoid test link errors.
110476         * modules/uninorm/nfc-tests (test_u32_nfc_big_LDADD): New variable.
110477         * modules/uninorm/nfd-tests (test_u32_nfd_big_LDADD): New variable.
110478         * modules/uninorm/nfkc-tests (test_u32_nfkc_big_LDADD): New variable.
110479         * modules/uninorm/nfkd-tests (test_u32_nfkd_big_LDADD): New variable.
110480         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
110482 2009-02-27  Bruno Haible  <bruno@clisp.org>
110484         Avoid spurious "(cached)" in configure output.
110485         * m4/gnulib-common.m4 (gl_CACHE_VAL_SILENT): New macro.
110486         * m4/ceil.m4 (gl_FUNC_CEIL_LIBS): Use it instead of AC_CACHE_VAL.
110487         * m4/ceilf.m4 (gl_FUNC_CEILF_LIBS): Likewise.
110488         * m4/ceill.m4 (gl_FUNC_CEILL_LIBS): Likewise.
110489         * m4/floor.m4 (gl_FUNC_FLOOR_LIBS): Likewise.
110490         * m4/floorf.m4 (gl_FUNC_FLOORF_LIBS): Likewise.
110491         * m4/floorl.m4 (gl_FUNC_FLOORL_LIBS): Likewise.
110492         * m4/stdarg.m4 (gl_STDARG_H): Likewise.
110493         Reported by Eric Blake.
110495 2009-02-27  Eric Blake  <ebb9@byu.net>
110497         printf: fix regression in previous patch
110498         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_LS): Fix compilation error.
110500 2009-02-27  Bruno Haible  <bruno@clisp.org>
110502         * lib/inttypes.in.h: Test merely whether _LP64 is defined, not its
110503         value.
110504         * lib/stdint.in.h: Likewise.
110505         Suggested by Eric Blake. Reported by Peter Bray <pdb_ml@yahoo.com.au>.
110507 2009-02-27  Eric Blake  <ebb9@byu.net>
110509         doc: mention more functions added in cygwin 1.7.0
110510         * doc/posix-functions/mbsnrtowcs.texi: Mention recent cygwin 1.7.0
110511         addition.
110512         * doc/posix-functions/open_wmemstream.texi: Likewise.
110513         * doc/posix-functions/wcsnlen.texi: Likewise.
110514         * doc/posix-functions/wcsnrtombs.texi: Likewise.
110515         * doc/posix-functions/wcstod.texi: Likewise.
110516         * doc/posix-functions/wcstof.texi: Likewise.
110517         * doc/posix-functions/wcstoimax.texi: Likewise.
110518         * doc/posix-functions/wcstok.texi: Likewise.
110519         * doc/posix-functions/wcstoumax.texi: Likewise.
110521         Detect bug in cygwin 1.5.x *printf on 1-character %ls.
110522         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_LS): Enhance filter.
110523         * doc/posix-functions/fprintf.texi: Update.
110524         * doc/posix-functions/printf.texi: Update.
110525         * doc/posix-functions/snprintf.texi: Update.
110526         * doc/posix-functions/sprintf.texi: Update.
110527         * doc/posix-functions/vfprintf.texi: Update.
110528         * doc/posix-functions/vprintf.texi: Update.
110529         * doc/posix-functions/vsnprintf.texi: Update.
110530         * doc/posix-functions/vsprintf.texi: Update.
110531         * doc/glibc-functions/obstack_printf.texi: Update.
110532         * doc/glibc-functions/obstack_vprintf.texi: Update.
110534 2009-02-26  Eric Blake  <ebb9@byu.net>
110536         avoid gcc 3.4.3 bug on long double NaN on Irix 6.5
110537         * tests/nan.h (NaNl): Rewrite as function on Irix, to avoid
110538         compilation bug by using runtime conversion.
110539         * m4/isfinite.m4 (gl_ISFINITE): Likewise.
110540         * m4/isnanl.m4 (gl_FUNC_ISNANL): Likewise.
110541         * modules/ceill-tests (Files): Use nan.h.
110542         * modules/floorl-tests (Files): Likewise.
110543         * modules/frexpl-tests (Files): Likewise.
110544         * modules/isnanl-tests (Files): Likewise.
110545         * modules/ldexpl-tests (Files): Likewise.
110546         * modules/roundl-tests (Files): Likewise.
110547         * modules/truncl-tests (Files): Likewise.
110548         * tests/test-ceill.c (main): Use a working NaN.
110549         * tests/test-floorl.c (main): Likewise.
110550         * tests/test-frexpl.c (main): Likewise.
110551         * tests/test-isnan.c (test_long_double): Likewise.
110552         * tests/test-isnanl.h (main): Likewise.
110553         * tests/test-ldexpl.h (main): Likewise.
110554         * tests/test-roundl.h (main): Likewise.
110555         * tests/test-truncl.h (main): Likewise.
110556         See http://lists.gnu.org/r/bug-gnulib/2009-02/msg00190.html.
110558 2009-02-26  Eric Blake  <ebb9@byu.net>
110559             Bruno Haible  <bruno@clisp.org>
110561         Work around a *printf bug with %ls on Solaris.
110562         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_LS): Also test whether, when a
110563         precision is specified, sprintf stops converting the wide string
110564         argument when the number of bytes that have been produced by this
110565         conversion equals or exceeds the precision.
110566         * doc/posix-functions/fprintf.texi: Update.
110567         * doc/posix-functions/printf.texi: Update.
110568         * doc/posix-functions/snprintf.texi: Update.
110569         * doc/posix-functions/sprintf.texi: Update.
110570         * doc/posix-functions/vfprintf.texi: Update.
110571         * doc/posix-functions/vprintf.texi: Update.
110572         * doc/posix-functions/vsnprintf.texi: Update.
110573         * doc/posix-functions/vsprintf.texi: Update.
110574         * doc/glibc-functions/obstack_printf.texi: Update.
110575         * doc/glibc-functions/obstack_vprintf.texi: Update.
110577 2009-02-26  Eric Blake  <ebb9@byu.net>
110579         stdlib: favor compiler check of random.h
110580         * m4/stdlib_h.m4 (gl_STDLIB_H): Skip preprocessor check.  Needed
110581         to avoid an ObjC random.h installed by Swarm.
110583 2009-02-26  Bruno Haible  <bruno@clisp.org>
110585         Work around *printf bug with %g directive and 0.0 on HP-UX 10.20.
110586         * m4/printf.m4 (gl_PRINTF_INFINITE): Also test for %g output of -0.0.
110587         Reported by Gary V. Vaughan <gary@gnu.org>.
110589 2009-02-26  Bruno Haible  <bruno@clisp.org>
110591         Fix *printf behaviour regarding the %ls directive.
110592         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_LS): New macro.
110593         * lib/vasnprintf.c (local_wcslen, VASNPRINTF): Handle
110594         NEED_PRINTF_DIRECTIVE_LS.
110595         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_LS): New macro.
110596         (gl_PREREQ_VASNPRINTF_WITH_EXTRAS): Invoke it.
110597         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
110598         gl_PREREQ_VASNPRINTF_DIRECTIVE_LS and test its result. Invoke
110599         gl_PREREQ_VASNPRINTF_DIRECTIVE_LS.
110600         * m4/dprintf-posix.m4 (gl_FUNC_DPRINTF_POSIX): Likewise.
110601         * m4/obstack-printf-posix.m4 (gl_FUNC_OBSTACK_PRINTF_POSIX): Likewise.
110602         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
110603         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
110604         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
110605         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
110606         * m4/vdprintf-posix.m4 (gl_FUNC_VDPRINTF_POSIX): Likewise.
110607         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
110608         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
110609         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
110610         * doc/posix-functions/fprintf.texi: Update.
110611         * doc/posix-functions/printf.texi: Update.
110612         * doc/posix-functions/snprintf.texi: Update.
110613         * doc/posix-functions/sprintf.texi: Update.
110614         * doc/posix-functions/vfprintf.texi: Update.
110615         * doc/posix-functions/vprintf.texi: Update.
110616         * doc/posix-functions/vsnprintf.texi: Update.
110617         * doc/posix-functions/vsprintf.texi: Update.
110618         * doc/glibc-functions/obstack_printf.texi: Update.
110619         * doc/glibc-functions/obstack_vprintf.texi: Update.
110620         Reported by Eric Blake.
110622 2009-02-25  Bruno Haible  <bruno@clisp.org>
110624         * m4/mbrtowc.m4 (gl_MBRTOWC_NUL_RETVAL): Update guess for Solaris 8
110625         with known value.
110626         Reported by Gary V. Vaughan <gary@gnu.org>.
110628 2009-02-25  Bruno Haible  <bruno@clisp.org>
110630         Work around mbrtowc bug in zh_CN.GB18030 locale on Solaris 8.
110631         * m4/mbrtowc.m4 (gl_MBRTOWC_SANITYCHECK): New macro.
110632         (gl_MBSTATE_T_BROKEN): Invoke it. Replace mbstate_t when it says "no".
110633         * doc/posix-functions/mbrtowc.texi: Document the Solaris 8 bug.
110634         Reported by Gary V. Vaughan <gary@gnu.org>.
110636 2009-02-25  Bruno Haible  <bruno@clisp.org>
110638         Work around broken INT8_MAX, UINT8_MAX etc. values on HP-UX 11.23.
110639         * m4/stdint.m4 (gl_STDINT_H): Also check whether the expansions of
110640         INT8_MAX, UINT8_MAX etc. contain casts to elementary types.
110641         * doc/posix-headers/stdint.texi: Mention the HP-UX bug.
110642         Reported by Gary V. Vaughan <gary@gnu.org>.
110644 2009-02-25  Eric Blake  <ebb9@byu.net>
110646         tests: skip fseek/ftell tests if ungetc is broken
110647         * m4/ungetc.m4: New file.
110648         * modules/fseek-tests: Split test, so ungetc dependency is
110649         separate from rest of test.
110650         * modules/fseeko-tests: Likewise.
110651         * modules/ftell-tests: Likewise.
110652         * modules/ftello-tests: Likewise.
110653         * tests/test-fseek.c (main): Isolate ungetc dependency.
110654         * tests/test-fseeko.c (main): Likewise.
110655         * tests/test-ftell.c (main): Likewise.
110656         * tests/test-ftello.c (main): Likewise.
110657         * tests/test-fseek2.sh: New file.
110658         * tests/test-fseeko2.sh: Likewise.
110659         * tests/test-ftell2.sh: Likewise.
110660         * tests/test-ftello2.sh: Likewise.
110662 2009-02-25  Ondřej Vašík  <ovasik@redhat.com>
110664         test-getaddrinfo: fix usage of skip return code 77
110665         * tests/test-gettaddrinfo.c: Return skip code 77 only
110666         for first occurrence of skip (4x77 is not 77)
110668 2009-02-25  Gary V. Vaughan  <gary@gnu.org>
110670         strtod: avoid C99 decl-after-statement
110671         * m4/strtod.m4 (gl_FUNC_STRTOD): Rearrange declaration.
110673 2009-02-24  Eric Blake  <ebb9@byu.net>
110675         strtod: detect HP-UX 11.31 bug
110676         * m4/strtod.m4 (gl_FUNC_STRTOD): Detect errno handling bug.
110677         Reported by Gary V. Vaughan.
110679 2009-02-23  Bruno Haible  <bruno@clisp.org>
110681         Fix invalid read past end of memory block.
110682         * lib/vasnprintf.c (DCHAR_SET): Define.
110683         (local_wcslen): Define only when needed.
110684         (local_strnlen, local_wcsnlen): New functions.
110685         (VASNPRINTF) [!USE_SNPRINTF && HAVE_WCHAR_T]: Implement the %s and %ls
110686         directives that involve a conversion ourselves.
110687         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Also check for strnlen,
110688         wcsnlen, mbrtowc, wcrtomb.
110689         * tests/test-vasnprintf-posix.c (test_function): Add tests for %.*s.
110690         * tests/test-vasprintf-posix.c (test_function): Likewise.
110691         * tests/test-snprintf-posix.h (test_function): Likewise.
110692         * tests/test-sprintf-posix.h (test_function): Likewise.
110693         Reported by Ben Pfaff <blp@cs.stanford.edu>.
110695 2009-02-22  Bruno Haible  <bruno@clisp.org>
110697         Implement new clarified decomposition of Hangul syllables.
110698         * lib/uninorm/decomposition.c (uc_decomposition): For Hangul syllables
110699         of type LTV, return only a pairwise decomposition.
110700         * lib/uninorm/canonical-decomposition.c (uc_canonical_decomposition):
110701         Likewise.
110702         * tests/uninorm/test-decomposition.c (main): Updated expected result.
110703         * tests/uninorm/test-canonical-decomposition.c (main): Likewise.
110704         * tests/uninorm/test-compat-decomposition.c (main): Likewise.
110706 2009-02-22  Bruno Haible  <bruno@clisp.org>
110708         * lib/uninorm/u-normalize-internal.h (FUNC): At the end, handle
110709         zero-length results and shrink excess allocated memory.
110710         * tests/uninorm/test-u8-nfc.c (test_u8_nfc): Check empty string result.
110711         * tests/uninorm/test-u8-nfd.c (test_u8_nfd): Likewise.
110712         * tests/uninorm/test-u8-nfkc.c (test_u8_nfkc): Likewise.
110713         * tests/uninorm/test-u8-nfkd.c (test_u8_nfkd): Likewise.
110714         * tests/uninorm/test-u16-nfc.c (test_u16_nfc): Likewise.
110715         * tests/uninorm/test-u16-nfd.c (test_u16_nfd): Likewise.
110716         * tests/uninorm/test-u16-nfkc.c (test_u16_nfkc): Likewise.
110717         * tests/uninorm/test-u16-nfkd.c (test_u16_nfkd): Likewise.
110718         * tests/uninorm/test-u32-nfc.c (test_u32_nfc): Likewise.
110719         * tests/uninorm/test-u32-nfd.c (test_u32_nfd): Likewise.
110720         * tests/uninorm/test-u32-nfkc.c (test_u32_nfkc): Likewise.
110721         * tests/uninorm/test-u32-nfkd.c (test_u32_nfkd): Likewise.
110723 2009-02-21  Bruno Haible  <bruno@clisp.org>
110725         * doc/gnulib.texi: Include safe-alloc.texi earlier.
110726         * doc/safe-alloc.texi: Terminate sentences with a period. Use two
110727         spaces after a period. Put a space between a macro name and its
110728         argument list. Trivial rewordings.
110729         * lib/safe-alloc.c: Include safe-alloc.h right after config.h.
110730         * tests/test-safe-alloc.c: Likewise. Include stdlib.h.
110731         (main): Return 0 explicitly.
110733 2009-02-21  Bruno Haible  <bruno@clisp.org>
110735         Tests for module 'uninorm/filter'.
110736         * tests/uninorm/test-uninorm-filter-nfc.c: New file.
110737         * modules/uninorm/filter-tests: New file.
110739         New module 'uninorm/filter'.
110740         * lib/uninorm.h (uninorm_filter_create, uninorm_filter_write,
110741         uninorm_filter_flush, uninorm_filter_free): New declarations.
110742         * lib/uninorm/uninorm-filter.c: New file.
110743         * modules/uninorm/filter: New file.
110745 2009-02-21  Bruno Haible  <bruno@clisp.org>
110747         Tests for module 'uninorm/nfkc'.
110748         * tests/uninorm/test-nfkc.c: New file.
110749         * tests/uninorm/test-u8-nfkc.c: New file.
110750         * tests/uninorm/test-u16-nfkc.c: New file.
110751         * tests/uninorm/test-u32-nfkc.c: New file.
110752         * tests/uninorm/test-u32-nfkc-big.sh: New file.
110753         * tests/uninorm/test-u32-nfkc-big.c: New file.
110754         * modules/uninorm/nfkc-tests: New file.
110756         New module 'uninorm/nfkc'.
110757         * lib/uninorm/nfkc.c: New file.
110758         * modules/uninorm/nfkc: New file.
110760         Tests for module 'uninorm/nfkd'.
110761         * tests/uninorm/test-nfkd.c: New file.
110762         * tests/uninorm/test-u8-nfkd.c: New file.
110763         * tests/uninorm/test-u16-nfkd.c: New file.
110764         * tests/uninorm/test-u32-nfkd.c: New file.
110765         * tests/uninorm/test-u32-nfkd-big.sh: New file.
110766         * tests/uninorm/test-u32-nfkd-big.c: New file.
110767         * modules/uninorm/nfkd-tests: New file.
110769         New module 'uninorm/nfkd'.
110770         * lib/uninorm/nfkd.c: New file.
110771         * modules/uninorm/nfkd: New file.
110773         Tests for module 'uninorm/nfc'.
110774         * tests/uninorm/test-nfc.c: New file.
110775         * tests/uninorm/test-u8-nfc.c: New file.
110776         * tests/uninorm/test-u16-nfc.c: New file.
110777         * tests/uninorm/test-u32-nfc.c: New file.
110778         * tests/uninorm/test-u32-nfc-big.sh: New file.
110779         * tests/uninorm/test-u32-nfc-big.c: New file.
110780         * modules/uninorm/nfc-tests: New file.
110782         New module 'uninorm/nfc'.
110783         * lib/uninorm/nfc.c: New file.
110784         * modules/uninorm/nfc: New file.
110786         Tests for module 'uninorm/nfd'.
110787         * tests/uninorm/test-nfd.c: New file.
110788         * tests/uninorm/test-u8-nfd.c: New file.
110789         * tests/uninorm/test-u16-nfd.c: New file.
110790         * tests/uninorm/test-u32-nfd.c: New file.
110791         * tests/uninorm/test-u32-nfd-big.sh: New file.
110792         * tests/uninorm/test-u32-nfd-big.c: New file.
110793         * tests/uninorm/test-u32-normalize-big.h: New file.
110794         * tests/uninorm/test-u32-normalize-big.c: New file.
110795         * tests/uninorm/NormalizationTest.txt: New file, created from
110796         Unicode 5.1.0 NormalizationTest.txt.
110797         * modules/uninorm/nfd-tests: New file.
110799         New module 'uninorm/nfd'.
110800         * lib/uninorm/nfd.c: New file.
110801         * modules/uninorm/nfd: New file.
110803         New module 'uninorm/u32-normalize'.
110804         * lib/uninorm/u32-normalize.c: New file.
110805         * modules/uninorm/u32-normalize: New file.
110807         New module 'uninorm/u16-normalize'.
110808         * lib/uninorm/u16-normalize.c: New file.
110809         * modules/uninorm/u16-normalize: New file.
110811         New module 'uninorm/u8-normalize'.
110812         * lib/uninorm/u8-normalize.c: New file.
110813         * lib/uninorm/normalize-internal.h: New file.
110814         * lib/uninorm/u-normalize-internal.h: New file.
110815         * modules/uninorm/u8-normalize: New file.
110817         New module 'uninorm/decompose-internal'.
110818         * lib/uninorm/decompose-internal.c: New file.
110819         * modules/uninorm/decompose-internal: New file.
110821         Tests for module 'uninorm/composition'.
110822         * tests/uninorm/test-composition.c: New file.
110823         * modules/uninorm/composition-tests: New file.
110825         New module 'uninorm/composition'.
110826         * lib/uninorm/composition.c: New file.
110827         * lib/uninorm/composition-table.gperf: New file, generated by
110828         gen-uni-tables.
110829         * modules/uninorm/composition: New file.
110831         Tests for module 'uninorm/compat-decomposition'.
110832         * tests/uninorm/test-compat-decomposition.c: New file.
110833         * modules/uninorm/compat-decomposition-tests: New file.
110835         New module 'uninorm/compat-decomposition'.
110836         * lib/uninorm/decompose-internal.h: New file.
110837         * lib/uninorm/compat-decomposition.c: New file.
110838         * modules/uninorm/compat-decomposition: New file.
110840         Tests for module 'uninorm/canonical-decomposition'.
110841         * tests/uninorm/test-canonical-decomposition.c: New file.
110842         * modules/uninorm/canonical-decomposition-tests: New file.
110844         New module 'uninorm/canonical-decomposition'.
110845         * lib/uninorm/canonical-decomposition.c: New file.
110846         * modules/uninorm/canonical-decomposition: New file.
110848         Tests for module 'uninorm/decomposition'.
110849         * tests/uninorm/test-decomposition.c: New file.
110850         * modules/uninorm/decomposition-tests: New file.
110852         New module 'uninorm/decomposition'.
110853         * lib/uninorm/decomposition.c: New file.
110854         * modules/uninorm/decomposition: New file.
110856         New module 'uninorm/decomposition-table'.
110857         * lib/uninorm/decomposition-table.h: New file.
110858         * lib/uninorm/decomposition-table.c: New file.
110859         * lib/uninorm/decomposition-table1.h: New file, generated by
110860         gen-uni-tables.
110861         * lib/uninorm/decomposition-table2.h: New file, generated by
110862         gen-uni-tables.
110863         * modules/uninorm/decomposition-table: New file.
110865         * lib/gen-uni-tables.c (MAX_DECOMP_LENGTH): New macro.
110866         (UC_DECOMP_*): New enumeration items.
110867         (get_decomposition): New function.
110868         (struct decomp_table): New type.
110869         (output_decomposition, output_decomposition_tables): New functions.
110870         (unicode_composition_exclusions): New variable.
110871         (fill_composition_exclusions, debug_output_composition_tables): New
110872         functions.
110873         (main): Accept one more argument. Invoke fill_composition_exclusions.
110874         Output decomposition and composition tables.
110876         New module 'uninorm/base'.
110877         * lib/uninorm.h: New file.
110878         * lib/unictype.h: Update comment.
110879         * modules/uninorm/base: New file.
110881 2009-02-21  David Lutterkort  <lutter@redhat.com>
110883         Tests for module 'safe-alloc'.
110884         * tests/test-safe-alloc.c: New file.
110885         * modules/safe-alloc-tests: New file.
110887         New module 'safe-alloc'.
110888         * lib/safe-alloc.h: New file.
110889         * lib/safe-alloc.c: New file.
110890         * m4/safe-alloc.m4: New file.
110891         * modules/safe-alloc: New file.
110892         * doc/safe-alloc.texi: New file.
110893         * doc/gnulib.texi: Include it.
110894         * MODULES.html.sh (Memory management functions <stdlib.h>): Add
110895         safe-alloc.
110897 2009-02-18  Bruno Haible  <bruno@clisp.org>
110899         Fix link error on non-glibc systems.
110900         * modules/uniwbrk/ulc-wordbreaks-tests (test_ulc_wordbreaks_LDADD): New
110901         variable.
110902         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
110904 2009-02-18  Jim Meyering  <meyering@redhat.com>
110906         fts: avoid used-uninitialized error due to recent change
110907         * lib/fts.c (fts_read): Guard uses of the new member,
110908         parent->fts_n_dirs_remaining, since it's not relevant for
110909         the parent of a directory specified on the command-line.
110911 2009-02-17  James Youngman  <jay@gnu.org>
110912             Bruno Haible  <bruno@clisp.org>
110914         * m4/include_next.m4: Reformulate comment.
110916 2009-02-16  Jim Meyering  <meyering@redhat.com>
110918         fts: add #if guards so that the fts_lgpl module still builds
110919         * lib/fts.c: Guard just-added hash-table-using parts with
110920         #if GNULIB_FTS, so as not to break builds of the fts_lgpl module.
110921         Reported by Simon Josefsson.
110923 2009-02-15  Bruno Haible  <bruno@clisp.org>
110925         * modules/array-mergesort-tests: New file.
110926         * tests/test-array-mergesort.c: New file.
110928         New module 'array-mergesort'.
110929         * modules/array-mergesort: New file.
110930         * lib/array-mergesort.h: New file.
110932 2009-02-15  Bruno Haible  <bruno@clisp.org>
110934         Fix 2009-02-07 commit.
110935         * lib/gen-uni-tables.c (output_predicate, output_category,
110936         output_combclass, output_bidi_category, output_decimal_digit,
110937         output_digit, output_numeric, output_mirror, output_scripts,
110938         output_ident_category, output_simple_mapping): Fix format directives.
110939         (output_lbp, output_wbp): Don't convert -1 to a size_t implicitly.
110941 2009-02-15  Albert Chin-A-Young  <china@thewrittenword.com>
110943         * m4/include_next.m4: Update comment about IBM C 9.0/10.1 bug, now that
110944         fixes are available from IBM.
110946 2009-02-13  Jim Meyering  <meyering@redhat.com>
110948         fts: arrange not to stat non-directories in more cases
110949         This makes GNU find (when it doesn't need to stat each file)
110950         *much* more efficient at traversing reiserfs file systems.
110951         * lib/fts_.h (struct ftsent) [fts_n_dirs_remaining]: New member.
110952         (struct FTS) [fts_leaf_optimization_works_ht]: Add member.
110953         * lib/fts.c (fts_close): Free ->fts_leaf_optimization_works_ht.
110954         (S_MAGIC_REISERFS, S_MAGIC_PROC): Define.
110955         (leaf_optimization_applies): New function.
110956         (LCO_hash, LCO_compare): New helper functions.
110957         (link_count_optimize_ok): New function.
110958         (fts_stat): Initialize new member (if dir).
110959         (fts_read): Decrement parent's fts_n_dirs_remaining count if
110960         we've just stat'ed a directory.  Skip the stat call when possible.
110961         ---
110962         Note this AFS-related exchange:
110963         http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=143111
110964         and note find's pioctl call in find/fstype.c.
110965         But that is necessary only if you want to enable the
110966         optimization for AFS, and for now, I don't.
110968         fts: move a function definition "up" (no semantic change)
110969         * lib/fts.c (dirent_inode_sort_may_be_useful): Move definition
110970         "up" to precede upcoming use of a related function.
110972 2009-02-11  Jim Meyering  <meyering@redhat.com>
110974         fts: correct internal computation of nlinks (optimization-related)
110975         * lib/fts.c (fts_build): ISSET(FTS_NOSTAT) has no bearing on
110976         whether the current entry is a directory, so don't test it.
110978 2009-02-10  Bruno Haible  <bruno@clisp.org>
110980         Tests for module 'uniwbrk/ulc-wordbreaks'.
110981         * modules/uniwbrk/ulc-wordbreaks-tests: New file.
110982         * tests/uniwbrk/test-ulc-wordbreaks.sh: New file.
110983         * tests/uniwbrk/test-ulc-wordbreaks.c: New file.
110985         Tests for module 'uniwbrk/u32-wordbreaks'.
110986         * modules/uniwbrk/u32-wordbreaks-tests: New file.
110987         * tests/uniwbrk/test-u32-wordbreaks.c: New file.
110989         Tests for module 'uniwbrk/u16-wordbreaks'.
110990         * modules/uniwbrk/u16-wordbreaks-tests: New file.
110991         * tests/uniwbrk/test-u16-wordbreaks.c: New file.
110993         Tests for module 'uniwbrk/u8-wordbreaks'.
110994         * modules/uniwbrk/u8-wordbreaks-tests: New file.
110995         * tests/uniwbrk/test-u8-wordbreaks.c: New file.
110997 2009-02-10  Bruno Haible  <bruno@clisp.org>
110999         * modules/uniwbrk/u8-wordbreaks (Depends-on): Add uniwbrk/wordbreak
111000         property.
111001         * modules/uniwbrk/u16-wordbreaks (Depends-on): Likewise.
111002         * modules/uniwbrk/u32-wordbreaks (Depends-on): Likewise.
111003         * modules/uniwbrk/ulc-wordbreaks (Depends-on): Add localcharset.
111005 2009-02-10  Simon Josefsson  <simon@josefsson.org>
111007         * m4/sockets.m4: Call AC_C_INLINE since sockets.h now can use
111008         inline keywords.  Reported by Bruno Haible <bruno@clisp.org>.
111010 2009-02-10  Bruno Haible  <bruno@clisp.org>
111012         * lib/unilbrk/lbrktables.h: Renamed from lib/unilbrk/tables.h.
111013         * lib/unilbrk/lbrktables.c: Renamed from lib/unilbrk/tables.c.
111014         * modules/unilbrk/tables (Files, Makefile.am, Include): Update.
111015         * lib/unilbrk/u8-possible-linebreaks.c: Update.
111016         * lib/unilbrk/u16-possible-linebreaks.c: Likewise.
111017         * lib/unilbrk/u32-possible-linebreaks.c: Likewise.
111019 2009-02-09  Simon Josefsson  <simon@josefsson.org>
111021         * lib/sockets.h (gl_fd_to_handle): New function.
111023         * tests/test-sockets.c: Call gl_fd_to_handle.
111025 2009-02-09  Bruno Haible  <bruno@clisp.org>
111027         * doc/havelib.texi: Document the conventions on bi-arch systems.
111029 2009-02-08  Bruno Haible  <bruno@clisp.org>
111031         Document the AC_LIB_LINKFLAGS macro.
111032         * doc/havelib.texi: New file, mostly written on 2005-05-24.
111033         * doc/gnulib.texi: Include it.
111035 2009-02-08  Bruno Haible  <bruno@clisp.org>
111037         Fix wrong order of sections, compared to TOC.
111038         * doc/gnulib.texi: Include relocatable-maint.texi after the
111039         "Regular expressions" node, not before.
111041 2009-02-08  Bruno Haible  <bruno@clisp.org>
111043         Tests for module 'unicase/totitle'.
111044         * modules/unicase/totitle-tests: New file.
111046         Tests for module 'unicase/tolower'.
111047         * modules/unicase/tolower-tests: New file.
111049         Tests for module 'unicase/toupper'.
111050         * modules/unicase/toupper-tests: New file.
111051         * tests/unicase/test-mapping-part1.h: New file.
111052         * tests/unicase/test-mapping-part2.h: New file.
111054         New module 'unicase/totitle'.
111055         * modules/unicase/totitle: New file.
111056         * lib/unicase/totitle.c: New file.
111058         New module 'unicase/tolower'.
111059         * modules/unicase/tolower: New file.
111060         * lib/unicase/tolower.c: New file.
111062         New module 'unicase/toupper'.
111063         * modules/unicase/toupper: New file.
111064         * lib/unicase/toupper.c: New file.
111065         * lib/unicase/simple-mapping.h: New file.
111067         * lib/gen-uni-tables.c (output_simple_mapping_test): New function.
111068         (mapping_table): New structure.
111069         (output_simple_mapping): New function.
111070         (main): Invoke output_simple_mapping_test and output_simple_mapping.
111071         * modules/gen-uni-tables (Description): Update.
111072         * lib/unicase/toupper.h: New file, automatically generated by
111073         gen-uni-tables.
111074         * lib/unicase/tolower.h: New file, automatically generated by
111075         gen-uni-tables.
111076         * lib/unicase/totitle.h: New file, automatically generated by
111077         gen-uni-tables.
111078         * tests/unicase/test-uc_toupper.c: New file, automatically generated by
111079         gen-uni-tables.
111080         * tests/unicase/test-uc_tolower.c: New file, automatically generated by
111081         gen-uni-tables.
111082         * tests/unicase/test-uc_totitle.c: New file, automatically generated by
111083         gen-uni-tables.
111085         New module 'unicase/base'.
111086         * modules/unicase/base: New file.
111087         * lib/unicase.h: New file.
111089 2009-02-08  Bruno Haible  <bruno@clisp.org>
111091         New module 'uniwbrk/ulc-wordbreaks'.
111092         * modules/uniwbrk/ulc-wordbreaks: New file.
111093         * lib/uniwbrk/ulc-wordbreaks.c: New file.
111095         New module 'uniwbrk/u32-wordbreaks'.
111096         * modules/uniwbrk/u32-wordbreaks: New file.
111097         * lib/uniwbrk/u32-wordbreaks.c: New file.
111099         New module 'uniwbrk/u16-wordbreaks'.
111100         * modules/uniwbrk/u16-wordbreaks: New file.
111101         * lib/uniwbrk/u16-wordbreaks.c: New file.
111103         New module 'uniwbrk/u8-wordbreaks'.
111104         * modules/uniwbrk/u8-wordbreaks: New file.
111105         * lib/uniwbrk/u8-wordbreaks.c: New file.
111106         * lib/uniwbrk/u-wordbreaks.h: New file.
111108         New module 'uniwbrk/table'.
111109         * modules/uniwbrk/table: New file.
111110         * lib/uniwbrk/wbrktable.h: New file.
111111         * lib/uniwbrk/wbrktable.c: New file.
111113         New module 'uniwbrk/wordbreak-property'.
111114         * modules/uniwbrk/wordbreak-property: New file.
111115         * lib/uniwbrk/wordbreak-property.c: New file.
111117         * lib/gen-uni-tables.c (WBP_*): New enum items.
111118         (get_wbp, debug_output_wbp, debug_output_wbrk_tables): New functions.
111119         (unicode_org_wbp): New variable.
111120         (fill_org_wbp, debug_output_org_wbp, debug_output_org_wbrk_tables):
111121         New functions.
111122         (wbp_table): New structure.
111123         (output_wbp, output_wbrk_tables): New functions.
111124         (main): Accept additional argument. Invoke fill_org_wbp,
111125         debug_output_wbrk_tables, debug_output_org_wbrk_tables,
111126         output_wbrk_tables.
111127         * modules/gen-uni-tables (Description): Update.
111128         * lib/uniwbrk/wbrkprop.h: New file, automatically generated by
111129         gen-uni-tables.
111131         New module 'uniwbrk/base'.
111132         * modules/uniwbrk/base: New file.
111133         * lib/uniwbrk.h: New file.
111135 2009-02-08  Bruno Haible  <bruno@clisp.org>
111137         Update to Unicode 5.1.0.
111138         * lib/gen-uni-tables.c (is_property_alphabetic): Include
111139         U+2185..U+2188.
111140         (is_property_default_ignorable_code_point): Don't include characters
111141         of category Cc or Cs and not-a-characters.
111142         (get_lbp): Assume REVISION_22. Special handling of U+0609, U+060A,
111143         U+0D79, U+109E, U+109F, U+A60C.
111144         * lib/unictype/bidi_of.h: Regenerated.
111145         * lib/unictype/blocks.h: Regenerated.
111146         * lib/unictype/categ_C.h: Regenerated.
111147         * lib/unictype/categ_Cf.h: Regenerated.
111148         * lib/unictype/categ_Cn.h: Regenerated.
111149         * lib/unictype/categ_L.h: Regenerated.
111150         * lib/unictype/categ_Ll.h: Regenerated.
111151         * lib/unictype/categ_Lm.h: Regenerated.
111152         * lib/unictype/categ_Lo.h: Regenerated.
111153         * lib/unictype/categ_Lu.h: Regenerated.
111154         * lib/unictype/categ_M.h: Regenerated.
111155         * lib/unictype/categ_Mc.h: Regenerated.
111156         * lib/unictype/categ_Me.h: Regenerated.
111157         * lib/unictype/categ_Mn.h: Regenerated.
111158         * lib/unictype/categ_N.h: Regenerated.
111159         * lib/unictype/categ_Nd.h: Regenerated.
111160         * lib/unictype/categ_Nl.h: Regenerated.
111161         * lib/unictype/categ_No.h: Regenerated.
111162         * lib/unictype/categ_P.h: Regenerated.
111163         * lib/unictype/categ_Pd.h: Regenerated.
111164         * lib/unictype/categ_Pe.h: Regenerated.
111165         * lib/unictype/categ_Pf.h: Regenerated.
111166         * lib/unictype/categ_Pi.h: Regenerated.
111167         * lib/unictype/categ_Po.h: Regenerated.
111168         * lib/unictype/categ_Ps.h: Regenerated.
111169         * lib/unictype/categ_S.h: Regenerated.
111170         * lib/unictype/categ_Sk.h: Regenerated.
111171         * lib/unictype/categ_Sm.h: Regenerated.
111172         * lib/unictype/categ_So.h: Regenerated.
111173         * lib/unictype/categ_of.h: Regenerated.
111174         * lib/unictype/combining.h: Regenerated.
111175         * lib/unictype/ctype_alnum.h: Regenerated.
111176         * lib/unictype/ctype_alpha.h: Regenerated.
111177         * lib/unictype/ctype_graph.h: Regenerated.
111178         * lib/unictype/ctype_lower.h: Regenerated.
111179         * lib/unictype/ctype_print.h: Regenerated.
111180         * lib/unictype/ctype_punct.h: Regenerated.
111181         * lib/unictype/ctype_upper.h: Regenerated.
111182         * lib/unictype/decdigit.h: Regenerated.
111183         * lib/unictype/digit.h: Regenerated.
111184         * lib/unictype/mirror.h: Regenerated.
111185         * lib/unictype/numeric.h: Regenerated.
111186         * lib/unictype/pr_alphabetic.h: Regenerated.
111187         * lib/unictype/pr_bidi_arabic_digit.h: Regenerated.
111188         * lib/unictype/pr_bidi_arabic_right_to_left.h: Regenerated.
111189         * lib/unictype/pr_bidi_boundary_neutral.h: Regenerated.
111190         * lib/unictype/pr_bidi_eur_num_terminator.h: Regenerated.
111191         * lib/unictype/pr_bidi_left_to_right.h: Regenerated.
111192         * lib/unictype/pr_bidi_non_spacing_mark.h: Regenerated.
111193         * lib/unictype/pr_bidi_other_neutral.h: Regenerated.
111194         * lib/unictype/pr_combining.h: Regenerated.
111195         * lib/unictype/pr_dash.h: Regenerated.
111196         * lib/unictype/pr_decimal_digit.h: Regenerated.
111197         * lib/unictype/pr_default_ignorable_code_point.h: Regenerated.
111198         * lib/unictype/pr_deprecated.h: Regenerated.
111199         * lib/unictype/pr_diacritic.h: Regenerated.
111200         * lib/unictype/pr_extender.h: Regenerated.
111201         * lib/unictype/pr_format_control.h: Regenerated.
111202         * lib/unictype/pr_grapheme_base.h: Regenerated.
111203         * lib/unictype/pr_grapheme_extend.h: Regenerated.
111204         * lib/unictype/pr_grapheme_link.h: Regenerated.
111205         * lib/unictype/pr_id_continue.h: Regenerated.
111206         * lib/unictype/pr_id_start.h: Regenerated.
111207         * lib/unictype/pr_ideographic.h: Regenerated.
111208         * lib/unictype/pr_ignorable_control.h: Regenerated.
111209         * lib/unictype/pr_lowercase.h: Regenerated.
111210         * lib/unictype/pr_math.h: Regenerated.
111211         * lib/unictype/pr_numeric.h: Regenerated.
111212         * lib/unictype/pr_other_alphabetic.h: Regenerated.
111213         * lib/unictype/pr_other_default_ignorable_code_point.h: Regenerated.
111214         * lib/unictype/pr_other_grapheme_extend.h: Regenerated.
111215         * lib/unictype/pr_other_id_continue.h: Regenerated.
111216         * lib/unictype/pr_other_lowercase.h: Regenerated.
111217         * lib/unictype/pr_other_math.h: Regenerated.
111218         * lib/unictype/pr_punctuation.h: Regenerated.
111219         * lib/unictype/pr_sentence_terminal.h: Regenerated.
111220         * lib/unictype/pr_soft_dotted.h: Regenerated.
111221         * lib/unictype/pr_terminal_punctuation.h: Regenerated.
111222         * lib/unictype/pr_unassigned_code_value.h: Regenerated.
111223         * lib/unictype/pr_unified_ideograph.h: Regenerated.
111224         * lib/unictype/pr_uppercase.h: Regenerated.
111225         * lib/unictype/pr_xid_continue.h: Regenerated.
111226         * lib/unictype/pr_xid_start.h: Regenerated.
111227         * lib/unictype/pr_zero_width.h: Regenerated.
111228         * lib/unictype/scripts.h: Regenerated.
111229         * lib/unictype/scripts_byname.gperf: Regenerated.
111230         * lib/unictype/sy_java_ident.h: Regenerated.
111231         * lib/unilbrk/lbrkprop1.h: Regenerated.
111232         * lib/unilbrk/lbrkprop2.h: Regenerated.
111233         * tests/unictype/test-categ_C.c: Regenerated.
111234         * tests/unictype/test-categ_Cf.c: Regenerated.
111235         * tests/unictype/test-categ_Cn.c: Regenerated.
111236         * tests/unictype/test-categ_L.c: Regenerated.
111237         * tests/unictype/test-categ_Ll.c: Regenerated.
111238         * tests/unictype/test-categ_Lm.c: Regenerated.
111239         * tests/unictype/test-categ_Lo.c: Regenerated.
111240         * tests/unictype/test-categ_Lu.c: Regenerated.
111241         * tests/unictype/test-categ_M.c: Regenerated.
111242         * tests/unictype/test-categ_Mc.c: Regenerated.
111243         * tests/unictype/test-categ_Me.c: Regenerated.
111244         * tests/unictype/test-categ_Mn.c: Regenerated.
111245         * tests/unictype/test-categ_N.c: Regenerated.
111246         * tests/unictype/test-categ_Nd.c: Regenerated.
111247         * tests/unictype/test-categ_Nl.c: Regenerated.
111248         * tests/unictype/test-categ_No.c: Regenerated.
111249         * tests/unictype/test-categ_P.c: Regenerated.
111250         * tests/unictype/test-categ_Pd.c: Regenerated.
111251         * tests/unictype/test-categ_Pe.c: Regenerated.
111252         * tests/unictype/test-categ_Pf.c: Regenerated.
111253         * tests/unictype/test-categ_Pi.c: Regenerated.
111254         * tests/unictype/test-categ_Po.c: Regenerated.
111255         * tests/unictype/test-categ_Ps.c: Regenerated.
111256         * tests/unictype/test-categ_S.c: Regenerated.
111257         * tests/unictype/test-categ_Sk.c: Regenerated.
111258         * tests/unictype/test-categ_Sm.c: Regenerated.
111259         * tests/unictype/test-categ_So.c: Regenerated.
111260         * tests/unictype/test-ctype_alnum.c: Regenerated.
111261         * tests/unictype/test-ctype_alpha.c: Regenerated.
111262         * tests/unictype/test-ctype_graph.c: Regenerated.
111263         * tests/unictype/test-ctype_lower.c: Regenerated.
111264         * tests/unictype/test-ctype_print.c: Regenerated.
111265         * tests/unictype/test-ctype_punct.c: Regenerated.
111266         * tests/unictype/test-ctype_upper.c: Regenerated.
111267         * tests/unictype/test-decdigit.h: Regenerated.
111268         * tests/unictype/test-digit.h: Regenerated.
111269         * tests/unictype/test-numeric.h: Regenerated.
111270         * tests/unictype/test-pr_alphabetic.c: Regenerated.
111271         * tests/unictype/test-pr_bidi_arabic_digit.c: Regenerated.
111272         * tests/unictype/test-pr_bidi_arabic_right_to_left.c: Regenerated.
111273         * tests/unictype/test-pr_bidi_boundary_neutral.c: Regenerated.
111274         * tests/unictype/test-pr_bidi_eur_num_terminator.c: Regenerated.
111275         * tests/unictype/test-pr_bidi_left_to_right.c: Regenerated.
111276         * tests/unictype/test-pr_bidi_non_spacing_mark.c: Regenerated.
111277         * tests/unictype/test-pr_bidi_other_neutral.c: Regenerated.
111278         * tests/unictype/test-pr_combining.c: Regenerated.
111279         * tests/unictype/test-pr_dash.c: Regenerated.
111280         * tests/unictype/test-pr_decimal_digit.c: Regenerated.
111281         * tests/unictype/test-pr_default_ignorable_code_point.c: Regenerated.
111282         * tests/unictype/test-pr_deprecated.c: Regenerated.
111283         * tests/unictype/test-pr_diacritic.c: Regenerated.
111284         * tests/unictype/test-pr_extender.c: Regenerated.
111285         * tests/unictype/test-pr_format_control.c: Regenerated.
111286         * tests/unictype/test-pr_grapheme_base.c: Regenerated.
111287         * tests/unictype/test-pr_grapheme_extend.c: Regenerated.
111288         * tests/unictype/test-pr_grapheme_link.c: Regenerated.
111289         * tests/unictype/test-pr_id_continue.c: Regenerated.
111290         * tests/unictype/test-pr_id_start.c: Regenerated.
111291         * tests/unictype/test-pr_ideographic.c: Regenerated.
111292         * tests/unictype/test-pr_ignorable_control.c: Regenerated.
111293         * tests/unictype/test-pr_lowercase.c: Regenerated.
111294         * tests/unictype/test-pr_math.c: Regenerated.
111295         * tests/unictype/test-pr_numeric.c: Regenerated.
111296         * tests/unictype/test-pr_other_alphabetic.c: Regenerated.
111297         * tests/unictype/test-pr_other_default_ignorable_code_point.c:
111298         Regenerated.
111299         * tests/unictype/test-pr_other_grapheme_extend.c: Regenerated.
111300         * tests/unictype/test-pr_other_id_continue.c: Regenerated.
111301         * tests/unictype/test-pr_other_lowercase.c: Regenerated.
111302         * tests/unictype/test-pr_other_math.c: Regenerated.
111303         * tests/unictype/test-pr_punctuation.c: Regenerated.
111304         * tests/unictype/test-pr_sentence_terminal.c: Regenerated.
111305         * tests/unictype/test-pr_soft_dotted.c: Regenerated.
111306         * tests/unictype/test-pr_terminal_punctuation.c: Regenerated.
111307         * tests/unictype/test-pr_unassigned_code_value.c: Regenerated.
111308         * tests/unictype/test-pr_unified_ideograph.c: Regenerated.
111309         * tests/unictype/test-pr_uppercase.c: Regenerated.
111310         * tests/unictype/test-pr_xid_continue.c: Regenerated.
111311         * tests/unictype/test-pr_xid_start.c: Regenerated.
111312         * tests/unictype/test-pr_zero_width.c: Regenerated.
111314         Update to Unicode 5.1.0.
111315         * lib/uniwidth/width.c (nonspacing_table_data): Add U+0487,
111316         U+0616..U+061A, U+0A51, U+0A75, U+0B44, U+0B62..U+0B63, U+0C62..U+0C63,
111317         U+0D44, U+0D62..U+0D63, U+1033..U+1035, U+103A, U+103D..U+103E,
111318         U+105E..U+1060, U+1071..U+1074, U+1082, U+1085..U+1086, U+108D,
111319         U+1B80..U+1B81, U+1BA2..U+1BA5, U+1BA8..U+1BA9, U+1C2C..U+1C33,
111320         U+1C36..U+1C37, U+1DCB..U+1DE6, U+2064, U+20F0, U+2DE0..U+2DFF,
111321         U+A66F..U+A672, U+A67C..U+A67D, U+A8C4, U+A926..U+A92D, U+A947..U+A951,
111322         U+AA29..U+AA2E, U+AA31..U+AA32, U+AA35..U+AA36, U+AA43, U+AA4C,
111323         U+FE24..U+FE26, U+101FD. Remove U+1929..U+192B.
111324         (nonspacing_table_ind): Update.
111325         * tests/uniwidth/test-uc_width2.sh: Update expected result.
111327         Update to Unicode 5.1.0.
111328         * lib/uniname/gen-uninames.lisp (main): Add the range 0x1Fxxx to the
111329         code transform.
111330         * lib/uniname/uniname.c (unicode_character_name,
111331         unicode_name_character): Add the range 0x1Fxxx to the code transform.
111332         * lib/uniname/uninames.h: Regenerated.
111333         * tests/uniname/UnicodeDataNames.txt: Update to Unicode 5.1.0.
111335 2009-02-07  Bruno Haible  <bruno@clisp.org>
111337         Merge gen-ctype and gen-lbrk into a single program.
111338         * lib/gen-uni-tables.c: New file, incorporating
111339         lib/unictype/gen-ctype.c and lib/unilbrk/gen-lbrk.c.
111340         Add directory prefixes to the names of the generated files.
111341         * lib/unictype/gen-ctype.c: Remove file.
111342         * lib/unilbrk/gen-lbrk.c: Remove file.
111343         * modules/gen-uni-tables: New file.
111344         * modules/unictype/gen-ctype: Remove file.
111345         * modules/unilbrk/gen-lbrk: Remove file.
111347 2009-02-07  Bruno Haible  <bruno@clisp.org>
111349         * lib/unistr.h (u8_strcoll, u16_strcoll, u32_strcoll): New declations.
111351         New module 'unistr/u32-strcoll'.
111352         * modules/unistr/u32-strcoll: New file.
111353         * lib/unistr/u32-strcoll.c: New file.
111355         New module 'unistr/u16-strcoll'.
111356         * modules/unistr/u16-strcoll: New file.
111357         * lib/unistr/u16-strcoll.c: New file.
111359         New module 'unistr/u8-strcoll'.
111360         * modules/unistr/u8-strcoll: New file.
111361         * lib/unistr/u8-strcoll.c: New file.
111362         * lib/unistr/u-strcoll.h: New file.
111364 2009-02-07  Bruno Haible  <bruno@clisp.org>
111366         * test-mbrtowc4.sh (LOCALE_ZH_CN): Fix default value.
111367         * test-mbsnrtowcs4.sh (LOCALE_ZH_CN): Likewise.
111368         * test-mbsrtowcs4.sh (LOCALE_ZH_CN): Likewise.
111369         * test-wcrtomb.sh (LOCALE_ZH_CN): Likewise.
111370         * test-wcsnrtombs4.sh (LOCALE_ZH_CN): Likewise.
111371         * test-wcsrtombs4.sh (LOCALE_ZH_CN): Likewise.
111373 2009-02-07  Bruno Haible  <bruno@clisp.org>
111375         Make 64-bit clean.
111376         * lib/unictype/gen-ctype.c (output_predicate, output_category,
111377         output_combclass, output_bidi_category, output_decimal_digit,
111378         output_digit, output_numeric, output_mirror, output_scripts,
111379         output_ident_category): Use proper width specifier in format strings.
111381 2009-02-07  Bruno Haible  <bruno@clisp.org>
111383         * doc/posix-functions/dirfd.texi: Clarify situation on mingw. Document
111384         failure behaviour.
111386 2009-02-07  Jim Meyering  <meyering@redhat.com>
111388         regex: avoid compilation failure with upcoming gcc-4.4
111389         * lib/regex_internal.h: Revert e48d8b47fb3eee81d341b71c3e006efe9e3433a7
111390         [workaround for PGC prior to 6.1-2].  Otherwise, we'd get this:
111391         "... error: integer overflow in preprocessor expression".
111393 2009-02-05  Ben Pfaff  <blp@gnu.org>
111395         Fix link errors on Windows when close module is used.
111396         * modules/close: Add $(LIB_CLOSE) to Link section.
111397         * m4/close.m4 (gl_REPLACE_CLOSE): Substitute -lws2_32 into
111398         $(LIB_CLOSE) on Windows.
111400 2009-02-05  Jim Meyering  <meyering@redhat.com>
111402         still avoid unused-parameter warnings, but do it cleanly
111403         * lib/fsusage.c (UNUSED_PARAM): Remove definition.
111404         (get_fs_usage): Cast to void instead.
111405         * lib/mountlist.c (UNUSED_PARAM): Remove definition.
111406         (dev_from_mount_options, read_file_system_list): Cast to void.
111407         Prompted by Bruno Haible.
111409 2009-02-04  Jim Meyering  <meyering@redhat.com>
111411         fsusage.c: correct copyright year
111412         * lib/fsusage.c: Reflect year in which the change is pushed into
111414         avoid misc. warnings
111415         * lib/fsusage.c (UNUSED_PARAM): Define.
111416         (get_fs_usage): Mark parameter "disk" as unused.
111417         * lib/getugroups.c (getgrent): Use "void" in prototype.
111418         * lib/mountlist.c: Mark unused parameters.
111419         (read_file_system_list): Declare a local with "const".
111420         * lib/nanosleep.c (getnow): Declare static.
111421         * lib/strftime.c: Include strftime.h, for declaration of nstrftime.
111423         dirfd: set errno upon failure
111424         * lib/dirfd.c: Include <errno.h>.
111425         Set errno to ENOTSUP when returning -1.
111426         * modules/dirfd (Depends-on): Add errno.
111427         Suggested by John Kodis <kodis@comcast.net>.
111429 2009-02-01  Bruno Haible  <bruno@clisp.org>
111431         Don't assume sizeof (long) >= sizeof (void *).
111432         * lib/memcmp.c: Include stdint.h.
111433         (memcmp_bytes): Change argument types to op_t. Change type of srcp1,
111434         srcp2 to 'const byte *'.
111435         (memcmp_common_alignment, memcmp_not_common_alignment): Change argument
111436         types to uintptr_t.
111437         (rpl_memcmp): Change type of srcp1, srcp2 to 'uintptr_t'.
111438         * modules/memcmp (Depends-on): Add stdint.
111439         Reported by Ozkan Sezer <sezeroz@gmail.com>.
111441 2009-01-30  Eric Blake  <ebb9@byu.net>
111443         fix more require-before-expand issues
111444         * m4/pmccabe2html.m4 (gl_PMCCABE2HTML): Require, rather than
111445         expand, AC_PROG_AWK.
111446         * m4/gnulib-common.m4 (AC_PROG_MKDIR_P): Use AC_DEFUN_ONCE.
111448 2009-01-28  Eric Blake  <ebb9@byu.net>
111450         version-etc: use consistent URL formatting
111451         * lib/version-etc.c (emit_bug_reporting_address, version_etc_va):
111452         Improve formatting.  Use fputs for string without %.
111454 2009-01-28  Jim Meyering  <meyering@redhat.com>
111456         00gnulib.m4: add m4 quotes in shell comment to avoid autoconf warning
111457         * m4/00gnulib.m4 (AC_DEFUN_ONCE): Add quotes to avoid an
111458         "underquoted definition of NAME" from autoconf-2.59.
111460 2009-01-28  Bruno Haible  <bruno@clisp.org>
111462         * doc/gnulib.texi: Add "Obsolete modules" to index.
111464 2009-01-28  Jim Meyering  <meyering@redhat.com>
111466         useless-if-before-free: recognize more variants
111467         * build-aux/useless-if-before-free: Also recognize e.g.,
111468         if (NULL != p) free (p);
111470 2009-01-27  Mark McLoughlin  <markmc@redhat.com>
111472         test-getaddrinfo: skip (don't fail) this test when there's no network
111473         * tests/test-getaddrinfo.c: Skip test upon failure with EAI_AGAIN,
111474         on the presumption that it means you lack network access.
111476 2009-01-26  Jim Meyering  <meyering@redhat.com>
111478         fflush: avoid warnings on modern systems
111479         * lib/fflush.c (rpl_fflush): Move declarations of locals,
111480         pos and result, into scopes where they're used.
111482 2009-01-26  Eric Blake  <ebb9@byu.net>
111484         Silence warning reintroduced by recent extensions patch.
111485         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS)
111486         (gl_USE_SYSTEM_EXTENSIONS): Use AC_DEFUN_ONCE to silence newer
111487         autoconf.
111489         Backport improved autoconf semantics of AC_DEFUN_ONCE.
111490         * m4/00gnulib.m4: New file.
111491         * gnulib-tool (func_get_filelist): Always use it.
111492         * m4/gnulib-common.m4 (gl_COMMON): Force the file to be used.
111493         Reported by Bruno Haible, with suggestions from Paolo Bonzini.
111495 2009-01-25  Bruno Haible  <bruno@clisp.org>
111497         Make test-quotearg work on MacOS X and AIX.
111498         * tests/test-quotearg.sh: New file.
111499         * tests/locale/fr/LC_MESSAGES/test-quotearg.po: New file.
111500         * tests/locale/fr/LC_MESSAGES/test-quotearg.mo: New file.
111501         * tests/test-quotearg.c: Include <locale.h> and gettext.h. Don't
111502         include <libintl.h>.
111503         (fake_locale): Remove variable.
111504         (gettext, dgettext, dcgettext): Remove functions.
111505         (main): Instead of setting a fake locale, set a real locale. Call
111506         textdomain and bindtextdomain.
111507         * modules/quotearg-tests (Files): Add the new files.
111508         (Depends-on): Add gettext, setenv, unsetenv.
111509         (configure.ac): Invoke gt_LOCALE_FR and gt_LOCALE_FR_UTF8.
111510         (Makefile.am): Add test-quotearg.sh to TESTS, remove test-quotearg.
111511         Augment TESTS_ENVIRONMENT.
111513 2009-01-25  Bruno Haible  <bruno@clisp.org>
111515         * m4/locale-fr.m4 (gt_LOCALE_FR): Remove special code that hid the
111516         fr_FR.ISO8859-1 locale on MacOS X.
111517         * m4/locale-ja.m4 (gt_LOCALE_JA): Remove special code that hid the
111518         ja_JP.eucJP locale on MacOS X.
111519         * m4/locale-zh.m4 (gt_LOCALE_ZH_CN): Remove special code that hid the
111520         zh_CN.GB18030 locale on MacOS X.
111522 2009-01-25  Bruno Haible  <bruno@clisp.org>
111524         Avoid link errors on MacOS X 10.3.
111525         * lib/mbsrtowcs-state.c (_gl_mbsrtowcs_state): Add initializer.
111526         * lib/wcsrtombs-state.c (_gl_wcsrtombs_state): Likewise.
111528 2009-01-25  Bruno Haible  <bruno@clisp.org>
111530         * lib/pipe.c: On Unix, assume HAVE_POSIX_SPAWN and use posix_spawnp.
111531         * m4/pipe.m4 (gl_PIPE): Remove tests for vfork() based code.
111532         * modules/pipe (Files): Remove m4/posix_spawn.m4.
111533         (Depends-on): Add spawn, posix_spawnp, posix_spawn_file_actions_init,
111534         posix_spawn_file_actions_addclose, posix_spawn_file_actions_adddup2,
111535         posix_spawn_file_actions_addopen, posix_spawn_file_actions_destroy,
111536         posix_spawnattr_init, posix_spawnattr_setsigmask,
111537         posix_spawnattr_setflags, posix_spawnattr_destroy.
111539         * lib/execute.c: On Unix, assume HAVE_POSIX_SPAWN and use posix_spawnp.
111540         * m4/execute.m4 (gl_EXECUTE): Remove tests for vfork() based code.
111541         * modules/execute (Files): Remove m4/posix_spawn.m4.
111542         (Depends-on): Add spawn, posix_spawnp, posix_spawn_file_actions_init,
111543         posix_spawn_file_actions_addopen, posix_spawn_file_actions_destroy,
111544         posix_spawnattr_init, posix_spawnattr_setsigmask,
111545         posix_spawnattr_setflags, posix_spawnattr_destroy.
111547 2009-01-25  Bruno Haible  <bruno@clisp.org>
111549         * lib/glthread/threadlib.c: Include <stdlib.h>.
111551 2009-01-25  Bruno Haible  <bruno@clisp.org>
111553         * lib/glthread/threadlib.c (dummy): New declaration.
111555 2009-01-25  Bruno Haible  <bruno@clisp.org>
111557         * lib/mbrtowc.c (mbrtowc): Distinguish invalid and incomplete
111558         multibyte characters also for the GB18030 encoding. Don't crash when
111559         the encoding is unknown and nstate = 0. Needed on OSF/1 5.1.
111561 2009-01-25  Bruno Haible  <bruno@clisp.org>
111563         Avoid redefining 'struct random_data' on OSF/1 5.1.
111564         * lib/stdlib.in.h: Include <random.h> if it exists.
111565         * m4/stdlib_h.m4 (gl_STDLIB_H): Test whether <random.h> exists. Set
111566         HAVE_RANDOM_H. Include <random.h> when testing whether
111567         'struct random_data' exists.
111568         * modules/stdlib (Makefile.am): Substitute HAVE_RANDOM_H.
111570 2009-01-25  Bruno Haible  <bruno@clisp.org>
111572         Don't install charset.alias on MacOS X >= 10.3.
111573         * lib/localcharset.c (DARWIN7): New macro.
111574         (get_charset_aliases): Hardcode the result for Darwin7.
111575         * modules/localcharset (install-exec-local): Don't install
111576         charset.alias on MacOS X >= 10.3, if the file does not yet exist.
111578 2009-01-25  Bruno Haible  <bruno@clisp.org>
111580         Don't install charset.alias on mingw and Cygwin.
111581         * modules/localcharset (install-exec-local): Don't install
111582         charset.alias on mingw and Cygwin, if the file does not yet exist.
111583         The result for these platforms is hardcoded in localcharset.c.
111585 2009-01-25  Bruno Haible  <bruno@clisp.org>
111587         Make it possible again to use AC_GNU_SOURCE together with gnulib.
111588         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Require AC_GNU_SOURCE
111589         before requiring AC_USE_SYSTEM_EXTENSIONS.
111591 2009-01-25  Jim Meyering  <meyering@redhat.com>
111593         c-strtod: avoid warnings
111594         * lib/c-strtod.c (C_STRTOD): Cast nptr to (char *) to avoid
111595         "assignment discards qualifiers from pointer target type" warnings.
111597 2009-01-24  Bruno Haible  <bruno@clisp.org>
111599         Add support for non-UTF-8 locales on MacOS X.
111600         * lib/config.charset: Add CP1131, ARMSCII-8, PT154 to the list of
111601         canonical encodings. For Darwin 7 and newer, don't map traditional
111602         encodings to UTF-8.
111603         Reported by Vincent Lefevre <vincent@vinc17.org>
111604         at <http://savannah.gnu.org/bugs/?25235>.
111606 2009-01-24  Bruno Haible  <bruno@clisp.org>
111608         * doc/gnulib.texi (Obsolete modules): New section.
111609         Reported by Mike Frysinger <vapier@gentoo.org>.
111611 2009-01-24  Bruno Haible  <bruno@clisp.org>
111613         * doc/Makefile (%.pdf): Clarify where to find texmf.cnf.
111614         (%.dvi): New rule.
111616 2009-01-24  Bruno Haible  <bruno@clisp.org>
111618         * lib/c-strtod.h (c_strtod, c_strtold): Adjust specification.
111619         Reported by Eric Blake.
111621 2009-01-24  Bruno Haible  <bruno@clisp.org>
111623         * lib/c-stack.c (segv_handler): If !HAVE_XSI_STACK_OVERFLOW_HEURISTIC,
111624         set signo = 0 also if info->si_code <= 0. Needed on HP-UX 11.11.
111625         Reported by Gary V. Vaughan <gary@gnu.org>.
111627 2009-01-24  Bruno Haible  <bruno@clisp.org>
111629         * lib/c-strtod.h (c_strtod, c_strtold): Add specification.
111631 2009-01-23  Bruno Haible  <bruno@clisp.org>
111633         Make c-strtod, c-strtold usable in libraries.
111634         * lib/c-strtod.c: Include string.h instead of xalloc.h.
111635         (C_STRTOD): Call strdup instead of xstrdup.
111636         * modules/c-strtod (Depends-on): Add strdup-posix, remove xalloc.
111637         * modules/c-strtold (Depends-on): Likewise.
111638         * doc/c-strtod.texi: Remove the sentence mentioning xalloc_die.
111639         * NEWS: Mention the change.
111640         Reported by Michael Gold <mgold@ncf.ca>.
111642 2009-01-23  Jim Meyering  <meyering@redhat.com>
111644         c-strtod: when ENDPTR is non-NULL, set *ENDPTR in new failure path
111645         * lib/c-strtod.c (C_STRTOD) [LC_ALL_MASKC]: Ensure that when
111646         ENDPTR is non-NULL, *ENDPTR is set to NPTR upon failure.
111648 2009-01-23  Simon Josefsson  <simon@josefsson.org>
111650         * lib/version-etc.c: Add emit_bug_reporting_address, inspired by
111651         GNU CoreUtils.
111652         * lib/version-etc.h: Add prototype for emit_bug_reporting_address.
111653         * modules/version-etc (Description): Update.
111655 2009-01-22  Bruno Haible  <bruno@clisp.org>
111657         Cache the C locale object.
111658         * lib/c-strtod.c (c_locale_cache): New variable.
111659         (c_locale): New function.
111660         (C_STRTOD): Use it, and don't call freelocale.
111661         * m4/c-strtod.m4 (gl_C_STRTOD, gl_C_STRTOLD): Require AC_C_INLINE.
111662         Suggested by Paolo Bonzini.
111664 2009-01-21  Bruno Haible  <bruno@clisp.org>
111666         * lib/getloadavg.c (getloadavg): Check c_strtod result against error
111667         conditions other than overflow.
111669 2009-01-21  Bruno Haible  <bruno@clisp.org>
111671         * lib/c-strtod.c: Include errno.h.
111672         (C_STRTOD): Check against NULL return from newlocale. Preserve errno
111673         value from STRTOD_L and STRTOD.
111675 2009-01-21  Bruno Haible  <bruno@clisp.org>
111676         and Jim Meyering  <meyering@redhat.com>
111678         nanosleep: skip configure test (fail it) for apple universal builds
111679         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Require gl_MULTIARCH. In Apple
111680         universal builds, assume that nanosleep does not work.
111681         * modules/nanosleep (Depends-on): Add multiarch.
111683         mktime: skip configure test (fail it) for apple universal builds
111684         * m4/mktime.m4 (AC_FUNC_MKTIME): Require gl_MULTIARCH. In Apple
111685         universal builds, assume that mktime does not work.
111686         * modules/mktime (Depends-on): Add multiarch.
111688 2009-01-21  Eric Blake  <ebb9@byu.net>
111690         multiarch: avoid expand-before-require warning
111691         * modules/multiarch (configure.ac): Require, rather than expand,
111692         gl_MULTIARCH.
111693         * m4/multiarch.m4 (gl_MULTIARCH_BODY): Merge...
111694         (gl_MULTIARCH): ...into this macro, and use AC_DEFUN_ONCE to
111695         enforce that all clients require it.  Partial reversion of
111696         2008-12-29 patch.
111698         error: avoid expand-before-require warning
111699         * modules/errno (configure.ac): Require, rather than expand,
111700         gl_HEADER_ERRNO_H.
111701         * m4/errno_h.m4 (gl_HEADER_ERRNO_H_BODY): Merge...
111702         (gl_HEADER_ERRNO_H): ...into this macro, and use AC_DEFUN_ONCE to
111703         enforce that all clients require it.
111705         gnulib-tool: avoid warnings from using obsolete AC_GNU_SOURCE
111706         * gnulib-tool (func_dest_tmpfilename, func_create_testdir): Using
111707         obsolete AC_GNU_SOURCE causes out-of-order expansion; avoid it,
111708         and rely solely on gl_USE_SYSTEM_EXTENSIONS.
111710 2009-01-21  Paolo Bonzini  <bonzini@gnu.org>
111712         Revert:
111713         2009-01-20  Paolo Bonzini  <bonzini@gnu.org>
111715         regex: do not depend on obsolete modules.
111716         * modules/regex: Remove memcmp and memmove.
111718 2009-01-20  Bruno Haible  <bruno@clisp.org>
111720         Make the 'link' module link on Windows NT 4.
111721         * lib/link.c (_WIN32_WINNT): Don't define.
111722         (CreateHardLinkFuncType): New type.
111723         (CreateHardLinkFunc, initialized): New variables.
111724         (initialize): New function.
111725         (link): Invoke CreateHardLink indirectly through the function pointer.
111727 2009-01-20  Bruno Haible  <bruno@clisp.org>
111729         Fix compilation failure on mingw.
111730         * tests/test-link.c (main): Don't assume that EOPNOTSUPP exists.
111732 2009-01-20  Michael Gold  <mgold@ncf.ca>  (tiny change)
111734         * doc/c-strtod.texi: Mention a couple of restrictions.
111736 2009-01-20  Jim Meyering  <meyering@redhat.com>
111738         gettimeofday: move more declarations out of functions
111739         * lib/gettimeofday.c: Move extern declarations of tzset and
111740         gmtime out of containing functions.  Prompted by Bruno Haible.
111742 2009-01-20  Paolo Bonzini  <bonzini@gnu.org>
111744         regex: do not depend on obsolete modules.
111745         * modules/regex: Remove memcmp and memmove.
111747 2009-01-19  Bruno Haible  <bruno@clisp.org>
111749         Don't use AC_REQUIRE([AC_C_BIGENDIAN]).
111750         * modules/uniconv/u16-conv-from-enc (configure.ac): Require
111751         gl_BIGENDIAN, not AC_C_BIGENDIAN.
111752         * modules/uniconv/u16-conv-to-enc (configure.ac): Likewise.
111753         * modules/uniconv/u16-strconv-to-enc (configure.ac): Likewise.
111755 2009-01-19  Bruno Haible  <bruno@clisp.org>
111757         * tests/test-link.c: Include <errno.h>.
111758         (main): Exit with code 77 when a hard link cannot be created due to
111759         the file system.
111760         * tests/test-link.sh: Skip test when a hard link cannot be created due
111761         to the file system.
111762         Suggested by Eric Blake.
111764 2009-01-19  Martin Lambers  <marlam@marlam.de>
111766         * modules/link-tests: New file.
111767         * tests/test-link.sh: New file.
111768         * tests/test-link.c: New file.
111770 2009-01-19  Eric Blake  <ebb9@byu.net>
111772         doc: mention another function added in cygwin 1.7.0
111773         * doc/glibc-functions/glob_pattern_p.texi (glob_pattern_p):
111774         Another new function in cygwin 1.7.
111776 2009-01-19  Bruno Haible  <bruno@clisp.org>
111778         Don't use AC_REQUIRE([AC_C_BIGENDIAN]).
111779         * m4/gnulib-common.m4 (gl_BIGENDIAN): New macro.
111780         * m4/exponentl.m4 (gl_LONG_DOUBLE_EXPONENT_LOCATION): Require
111781         gl_BIGENDIAN, not AC_C_BIGENDIAN.
111782         * m4/isfinite.m4 (gl_ISFINITEL_WORKS): Likewise.
111783         * m4/isinf.m4 (gl_ISINFL_WORKS): Likewise.
111784         * m4/isnanl.m4 (gl_FUNC_ISNANL_WORKS): Likewise.
111785         * m4/md4.m4 (gl_MD4): Likewise.
111786         * m4/md5.m4 (gl_MD5): Likewise.
111787         * m4/printf.m4 (gl_PRINTF_INFINITE_LONG_DOUBLE): Likewise.
111788         * m4/sha1.m4 (gl_SHA1): Likewise.
111789         * m4/sha256.m4 (gl_SHA256): Likewise.
111790         * m4/sha512.m4 (gl_SHA512): Likewise.
111792 2009-01-19  Bruno Haible  <bruno@clisp.org>
111794         * modules/uniname/uniname-tests (Depends-on): Add progname.
111795         * tests/uniname/test-uninames.c: Include progname.h.
111796         (main): Call set_program_name.
111798         * modules/unistdio/u8-vsprintf-tests (Depends-on): Add progname.
111799         * tests/unistdio/test-u8-vsprintf1.c: Include progname.h.
111800         (main): Call set_program_name.
111802         * modules/unistdio/u8-vsnprintf-tests (Depends-on): Add progname.
111803         * tests/unistdio/test-u8-vsnprintf1.c: Include progname.h.
111804         (main): Call set_program_name.
111806         * modules/unistdio/u16-vsprintf-tests (Depends-on): Add progname.
111807         * tests/unistdio/test-u16-vsprintf1.c: Include progname.h.
111808         (main): Call set_program_name.
111810         * modules/unistdio/u16-vsnprintf-tests (Depends-on): Add progname.
111811         * tests/unistdio/test-u16-vsnprintf1.c: Include progname.h.
111812         (main): Call set_program_name.
111814         * modules/unistdio/u32-vsprintf-tests (Depends-on): Add progname.
111815         * tests/unistdio/test-u32-vsprintf1.c: Include progname.h.
111816         (main): Call set_program_name.
111818         * modules/unistdio/u32-vsnprintf-tests (Depends-on): Add progname.
111819         * tests/unistdio/test-u32-vsnprintf1.c: Include progname.h.
111820         (main): Call set_program_name.
111822         * modules/unistdio/ulc-vsprintf-tests (Depends-on): Add progname.
111823         * tests/unistdio/test-ulc-vsprintf1.c: Include progname.h.
111824         (main): Call set_program_name.
111826         * modules/unistdio/ulc-vsnprintf-tests (Depends-on): Add progname.
111827         * tests/unistdio/test-ulc-vsnprintf1.c: Include progname.h.
111828         (main): Call set_program_name.
111830 2009-01-19  Eric Blake  <ebb9@byu.net>
111832         test-unistd: test previous patch
111833         * tests/test-unistd.c: Test *_FILENO macros.
111835         unistd: guarantee STDIN_FILENO here, for OS/2 EMX
111836         * lib/unistd.in.h (STDIN_FILENO, STDOUT_FILENO, STDERR_FILENO):
111837         Guarantee a definition.
111838         * doc/posix-headers/unistd.texi (unistd.h): Document the bug.
111839         * modules/unistd-safer (Depends-on): Add dependency on unistd.
111840         * lib/c-stack.c (STDERR_FILENO): Rely on <unistd.h>.
111841         * lib/dup-safer.c (STDERR_FILENO): Likewise.
111842         * lib/execute.c (STDIN_FILENO, STDOUT_FILENO, STDERR_FILENO):
111843         Likewise.
111844         * lib/fd-safer.c (STDIN_FILENO, STDERR_FILENO): Likewise.
111845         * lib/fopen-safer.c (STDERR_FILENO): Likewise.
111846         * lib/pipe.c (STDIN_FILENO, STDOUT_FILENO, STDERR_FILENO):
111847         Likewise.
111848         * lib/tmpfile-safer.c (STDERR_FILENO): Likewise.
111849         * tests/test-posix_spawn1.c (STDIN_FILENO, STDOUT_FILENO)
111850         (STDERR_FILENO): Likewise.
111851         * tests/test-posix_spawn2.c (STDIN_FILENO, STDOUT_FILENO)
111852         (STDERR_FILENO): Likewise.
111853         * tests/test-posix_spawn3.c (STDIN_FILENO, STDOUT_FILENO)
111854         (STDERR_FILENO): Likewise.
111855         Reported by Elbert Pol.
111857 2009-01-19  Eric Blake  <ebb9@byu.net>
111859         doc: mention more functions added in cygwin 1.7.0
111860         * doc/posix-functions/abort.texi (abort): Update wording related
111861         to cygwin.
111862         * doc/posix-functions/daylight.texi (daylight): Likewise.
111863         * doc/posix-functions/optarg.texi (optarg): Likewise.
111864         * doc/posix-functions/optarg.texi (opterr): Likewise.
111865         * doc/posix-functions/optarg.texi (optind): Likewise.
111866         * doc/posix-functions/optarg.texi (optopt): Likewise.
111867         * doc/posix-functions/wprintf.texi (wprintf): Cygwin wprintf never
111868         worked in 1.5.x, and was withdrawn in 1.7.
111869         * doc/posix-functions/vwprintf.texi (vwprintf): Likewise.
111870         * doc/posix-functions/fprintf.texi (fprintf): Tighten mention of
111871         cygwin versions.
111872         * doc/posix-functions/perror.texi (perror): Likewise.
111873         * doc/posix-functions/printf.texi (printf): Likewise.
111874         * doc/posix-functions/snprintf.texi (snprintf): Likewise.
111875         * doc/posix-functions/sprintf.texi (sprintf): Likewise.
111876         * doc/posix-functions/vfprintf.texi (vfprintf): Likewise.
111877         * doc/posix-functions/vprintf.texi (vprintf): Likewise.
111878         * doc/posix-functions/vsnprintf.texi (vsnprintf): Likewise.
111879         * doc/posix-functions/vsprintf.texi (vsprintf): Likewise.
111880         * doc/glibc-functions/obstack_printf.texi (obstack_printf):
111881         Likewise.
111882         * doc/glibc-functions/obstack_vprintf.texi (obstack_vprintf):
111883         Likewise.
111884         * doc/glibc-functions/cfmakeraw.texi (cfmakeraw): Cygwin 1.7 adds
111885         this function.
111886         * doc/glibc-functions/in6addr_any.texi (in6addr_any): Likewise.
111887         * doc/glibc-functions/in6addr_loopback.texi (in6addr_loopback):
111888         Likewise.
111889         * doc/glibc-functions/updwtmpx.texi (updwtmpx): Likewise.
111890         * doc/posix-functions/_Exit_C99.texi (_Exit): Likewise.
111891         * doc/posix-functions/confstr.texi (confstr): Likewise.
111892         * doc/posix-functions/dprintf.texi (dprintf): Likewise.
111893         * doc/posix-functions/fgetwc.texi (fgetwc): Likewise.
111894         * doc/posix-functions/fgetws.texi (fgetws): Likewise.
111895         * doc/posix-functions/fputwc.texi (fputwc): Likewise.
111896         * doc/posix-functions/fputws.texi (fputws): Likewise.
111897         * doc/posix-functions/fwide.texi (fwide): Likewise.
111898         * doc/posix-functions/getwc.texi (getwc): Likewise.
111899         * doc/posix-functions/getwchar.texi (getwchar): Likewise.
111900         * doc/posix-functions/putwc.texi (putwc): Likewise.
111901         * doc/posix-functions/putwchar.texi (putwchar): Likewise.
111902         * doc/posix-functions/sigignore.texi (sigignore): Likewise.
111903         * doc/posix-functions/ungetwc.texi (ungetwc): Likewise.
111904         * doc/posix-functions/vdprintf.texi (vdprintf): Likewise.
111905         * doc/posix-functions/wcpcpy.texi (wcpcpy): Likewise.
111906         * doc/posix-functions/wcpncpy.texi (wcpncpy): Likewise.
111907         * doc/posix-functions/wcstol.texi (wcstol): Likewise.
111908         * doc/posix-functions/wcstoll.texi (wcstoll): Likewise.
111909         * doc/posix-functions/wcstoul.texi (wcstoul): Likewise.
111910         * doc/posix-functions/wcstoull.texi (wcstoull): Likewise.
111911         * doc/posix-functions/wcsxfrm.texi (wcsxfrm): Likewise.
111913 2009-01-19  Daniel P. Berrange  <berrange@redhat.com>
111915         ioctl: avoid warning: no previous prototype for 'rpl_ioctl'
111916         * lib/ioctl.c: Include <sys/ioctl.h>.
111918 2009-01-19  Simon Josefsson  <simon@josefsson.org>
111920         * modules/getdate-tests (Depends-on): Add progname.
111921         * tests/test-getdate.c: Use progname module, to avoid link errors
111922         on non-glibc systems.
111924 2009-01-18  Simon Josefsson  <simon@josefsson.org>
111926         * modules/filenamecat-tests (Depends-on): Add progname.
111927         * modules/fstrcmp-tests (Depends-on): Likewise.
111929         * tests/test-filenamecat.c: Use progname module, to avoid link
111930         errors on non-glibc systems.
111931         * tests/test-fstrcmp.c: Likewise.
111933 2009-01-19  Daniel P. Berrange  <berrange@redhat.com>
111935         gettimeofday: avoid warning: nested extern declaration of 'localtime'
111936         * lib/gettimeofday.c: Move extern declaration out of function.
111938 2009-01-18  Bruno Haible  <bruno@clisp.org>
111940         * m4/strftime.m4 (gl_FUNC_STRFTIME): Don't test for mblen and mbrlen.
111941         * lib/strftime.c (HAVE_MBLEN, HAVE_MBRLEN): Remove macros.
111942         (MULTIBYTE_IS_FORMAT_SAFE): Define to 1 on all platforms except OSF/1.
111944 2009-01-18  Bruno Haible  <bruno@clisp.org>
111946         * lib/strftime.c (MEMPCPY): Remove unused macro.
111947         * m4/strftime.m4 (gl_FUNC_STRFTIME): Don't test for mempcpy.
111949 2009-01-18  Martin Lambers  <marlam@marlam.de>
111951         New module 'link'.
111952         * lib/unistd.in.h (link): New declaration.
111953         * lib/link.c: New file.
111954         * m4/link.m4: New file.
111955         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_LINK,
111956         HAVE_LINK.
111957         * modules/unistd (Makefile.am): Substitute GNULIB_LINK, HAVE_LINK.
111958         * modules/link: New file.
111959         * doc/posix-functions/link.texi: Mention the new module.
111961 2009-01-18  Bruno Haible  <bruno@clisp.org>
111963         * tests/test-avltree_list.c (main): Call set_program_name.
111964         * tests/test-avltree_oset.c (main): Likewise.
111965         * tests/test-obstack-printf.c: Include progname.h.
111966         (main): Call set_program_name.
111967         * tests/test-quotearg.c: Include progname.h.
111968         (main): Call set_program_name.
111969         * tests/test-xmemdup0.c: Include progname.h.
111970         (main): Call set_program_name.
111972 2009-01-18  Bruno Haible  <bruno@clisp.org>
111974         New module 'alphasort'.
111975         * lib/dirent.in.h (alphasort): New declaration.
111976         * lib/alphasort.c: New file, from glibc with modifications.
111977         * m4/alphasort.m4: New file.
111978         * modules/alphasort: New file.
111979         * m4/dirent_h.m4 (gl_DIRENT_H_DEFAULTS): Initialize GNULIB_ALPHASORT,
111980         HAVE_ALPHASORT.
111981         * modules/dirent (Makefile.am): Substitute GNULIB_ALPHASORT,
111982         HAVE_ALPHASORT.
111983         * doc/posix-functions/alphasort.texi: Mention the new module and the
111984         portability problems.
111986 2009-01-18  Bruno Haible  <bruno@clisp.org>
111988         New module 'scandir'.
111989         * lib/dirent.in.h (scandir): New declaration.
111990         * lib/scandir.c: New file, from glibc with modifications.
111991         * m4/scandir.m4: New file.
111992         * modules/scandir: New file.
111993         * m4/dirent_h.m4 (gl_DIRENT_H_DEFAULTS): Initialize GNULIB_SCANDIR,
111994         HAVE_SCANDIR.
111995         * modules/dirent (Makefile.am): Substitute GNULIB_SCANDIR,
111996         HAVE_SCANDIR.
111997         * doc/posix-functions/scandir.texi: Mention the new module and the
111998         portability problems.
112000 2009-01-17  Bruno Haible  <bruno@clisp.org>
112002         * gnulib-tool (func_remove_prefix): Escape all dots in the prefix.
112003         Update documentation.
112004         (func_remove_suffix): Escape all dots in the suffix. Update
112005         documentation.
112006         (func_filter_filelist): Update documentation.
112007         Reported by Ralf Wildenhues.
112009 2009-01-17  Bruno Haible  <bruno@clisp.org>
112011         * modules/dprintf-posix-tests: New file.
112012         * tests/test-dprintf-posix.sh: New file.
112013         * tests/test-dprintf-posix.c: New file.
112015         New modules 'dprintf', 'dprintf-posix'.
112016         * lib/stdio.in.h (dprintf): New declaration.
112017         * lib/dprintf.c: New file.
112018         * m4/dprintf.m4: New file.
112019         * m4/dprintf-posix.m4: New file.
112020         * modules/dprintf: New file.
112021         * modules/dprintf-posix: New file.
112022         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Initialize GNULIB_DPRINTF,
112023         HAVE_DPRINTF, REPLACE_DPRINTF.
112024         * modules/stdio (Makefile.am): Substitute also GNULIB_DPRINTF,
112025         HAVE_DPRINTF, REPLACE_DPRINTF.
112026         * doc/posix-functions/dprintf.texi: Mention the new modules.
112028 2009-01-17  Bruno Haible  <bruno@clisp.org>
112030         * modules/vdprintf-posix-tests: New file.
112031         * tests/test-vdprintf-posix.sh: New file.
112032         * tests/test-vdprintf-posix.c: New file.
112034         New modules 'vdprintf', 'vdprintf-posix'.
112035         * lib/stdio.in.h (vdprintf): New declaration.
112036         * lib/vdprintf.c: New file.
112037         * m4/vdprintf.m4: New file.
112038         * m4/vdprintf-posix.m4: New file.
112039         * modules/vdprintf: New file.
112040         * modules/vdprintf-posix: New file.
112041         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Initialize GNULIB_VDPRINTF,
112042         HAVE_VDPRINTF, REPLACE_VDPRINTF.
112043         * modules/stdio (Makefile.am): Substitute also GNULIB_VDPRINTF,
112044         HAVE_VDPRINTF, REPLACE_VDPRINTF.
112045         * doc/posix-functions/vdprintf.texi: Mention the new modules.
112047 2009-01-17  Bruno Haible  <bruno@clisp.org>
112049         Fix replacement of fopen on mingw.
112050         * m4/fopen.m4 (gl_FUNC_FOPEN): Define FOPEN_TRAILING_SLASH_BUG also on
112051         mingw.
112053 2009-01-17  Bruno Haible  <bruno@clisp.org>
112055         Fix compilation error on HP-UX 11.00, present since 2008-09-24.
112056         * lib/fopen.c: Include <sys/types.h> and <sys/types.h>.
112058 2009-01-17  Bruno Haible  <bruno@clisp.org>
112060         Avoid test-fflush2.sh failure on mingw.
112061         * tests/test-fflush2.c: Include binary-io.h.
112062         (main): Put standard input into binary mode.
112063         * modules/fflush-tests (Depends-on): Add binary-io.
112065 2009-01-17  Bruno Haible  <bruno@clisp.org>
112067         * lib/wchar.in.h: In another particular situation, include only the
112068         system's <wchar.h> file.
112069         (_GL_ALREADY_INCLUDING_WCHAR_H): New macro.
112070         Reported by Albert Chin-A-Young <china@thewrittenword.com>
112071         and Thomas Guyot-Sionnest <dermoth@aei.ca>.
112073 2009-01-17  Bruno Haible  <bruno@clisp.org>
112075         Support for stripping executables in --enable-relocatable.
112076         * build-aux/install-reloc: Expect one more argument, or an environment
112077         variable RELOC_STRIP_PROG. If set, strip the destination program and
112078         its wrapper.
112079         * m4/relocatable.m4 (gl_RELOCATABLE_BODY): In INSTALL_PROGRAM_ENV, set
112080         RELOC_STRIP_PROG.
112081         * doc/relocatable-maint.texi (Supporting Relocation): Mention the need
112082         to set RELOCATABLE_STRIP.
112083         * NEWS: Mention the new Makefile requirement.
112085 2009-01-17  Bruno Haible  <bruno@clisp.org>
112087         * build-aux/install-reloc: Remove debugging information left over by
112088         C compiler on MacOS X.
112090 2009-01-17  Bruno Haible  <bruno@clisp.org>
112092         Update use of _NSGetExecutablePath after API change in MacOS X 10.4.
112093         * lib/progreloc.c (find_executable): Fix type of pointer passed to
112094         _NSGetExecutablePath.
112096 2009-01-16  Jim Meyering  <meyering@redhat.com>
112098         strerror: avoid warnings about discarding "const"
112099         * lib/strerror.c (rpl_strerror): Instead of returning a const
112100         string from each and every "case", use a variable, and add a single
112101         cast after the switch.
112103 2009-01-16  Albert Chin-A-Young  <china@thewrittenword.com>
112105         * lib/arpa_inet.in.h: Add extern "C" block for C++.
112107 2009-01-16  Bruno Haible  <bruno@clisp.org>
112109         * m4/printf.m4 (gl_SNPRINTF_SIZE1, gl_VSNPRINTF_ZEROSIZE_C99): Use an
112110         array initializer syntax that also works in C++ mode.
112111         Reported by Albert Chin <bug-gnulib@mlists.thewrittenword.com>.
112113 2009-01-16  Jim Meyering  <meyering@redhat.com>
112115         poll: suppress a warning
112116         * lib/poll.c: Use #pragma GCC diagnostic ignored "-Wtype-limits"
112117         to ignore "...unsigned expression < 0 is always false" warnings.
112119 2009-01-16  Daniel P. Berrange  <berrange@redhat.com>
112121         poll: remove declarations of unused variables
112122         * lib/poll.c (poll) [WIN32_NATIVE]: Remove declarations of unused
112123         sockbuf and optlen.
112125 2009-01-15  Bruno Haible  <bruno@clisp.org>
112127         Make fflush-after-ungetc POSIX compliant on BSD systems.
112128         * lib/fflush.c (clear_ungetc_buffer_preserving_position): New function.
112129         (clear_ungetc_buffer): Implement also for other systems.
112130         (rpl_fflush): On glibc systems, invoke
112131         clear_ungetc_buffer_preserving_position. Otherwise, invoke
112132         clear_ungetc_buffer after fetching the stream's position, not before.
112134 2009-01-15  Bruno Haible  <bruno@clisp.org>
112136         Make fflush-after-ungetc POSIX compliant on glibc systems.
112137         * m4/fflush.m4 (gl_FUNC_FFLUSH): Test also the behaviour of fflush
112138         after ungetc.
112139         * lib/fflush.c (clear_ungetc_buffer): Implement for glibc systems.
112140         (rpl_fflush): On glibc systems, simply call the system's fflush
112141         function after clearing the ungetc buffer.
112142         * lib/fseeko.c (rpl_fseeko): Don't try to lseek past the end of file.
112143         Instead, lseek only to the end of file, then use the system's fseeko
112144         for the rest. On glibc systems, reset the EOF indicator bit.
112146 2009-01-15  Jim Meyering  <meyering@redhat.com>
112148         openmp.m4: revert quote-adding change, for portability to older autoconf
112149         * m4/openmp.m4: Remove the quotes added on 2009-01-14.
112150         This reverts part of 42d1eda5dcce2d68deab7a642e7f29bcd7144a0d.
112151         Simon Josefsson noticed the problem when using autoconf-2.61.
112153 2009-01-15  Bruno Haible  <bruno@clisp.org>
112155         * tests/test-fflush2.sh: Invoke test-fflush2 twice.
112156         * tests/test-fflush2.c (ASSERT): Always fail.
112157         (main): Add two tests for fflush() after ungetc(), taking into account
112158         the Austin Group's clarification.
112159         Suggested by Eric Blake.
112161 2009-01-15  Albert Chin-A-Young  <china@thewrittenword.com>
112163         mktime.m4: remove K&R-style function prototypes
112164         * m4/mktime.m4 (AC_FUNC_MKTIME): Remove K&R-style function prototypes
112165         for the Sun C++ compiler.
112167 2009-01-14  Bruno Haible  <bruno@clisp.org>
112169         * lib/stdint.in.h (_GL_JUST_INCLUDE_SYSTEM_WCHAR_H): New macro, defined
112170         while including <wchar.h>.
112171         * lib/wchar.in.h: In two particular situations on HP-UX, include only
112172         the system's <wchar.h> file.
112173         Reported by Albert Chin <bug-gnulib@mlists.thewrittenword.com>.
112175 2009-01-14  Bruno Haible  <bruno@clisp.org>
112177         * m4/csharp.m4: Don't mention gettext on the serial number line.
112178         * m4/csharpexec.m4: Likewise.
112179         * m4/eaccess.m4: Likewise.
112180         * m4/javaexec.m4: Likewise.
112181         * m4/sig_atomic_t.m4: Likewise.
112182         * m4/tmpdir.m4: Likewise.
112183         * m4/intldir.m4: Bump gettext version.
112184         * m4/lib-ld.m4: Likewise.
112186 2009-01-14  Bruno Haible  <bruno@clisp.org>
112188         * lib/progname.c (set_program_name): Add more comments.
112189         Reported by Sergey Poznyakoff <gray@gnu.org.ua>.
112191 2009-01-14  Simon Josefsson  <simon@josefsson.org>
112193         * lib/sys_stat.in.h: Include sys/types.h for nlink_t on systems
112194         were sys/stat.h does not define it.
112196 2009-01-14  Jim Meyering  <meyering@redhat.com>
112198         many *.m4 files: improve m4 quoting
112199         99% of this change was performed by running the following commands:
112200         git ls-files | grep '\.m4$' | xargs perl -pi \
112201           -e 's/(AC_\w+\()([^[()]+?)([,)])/$1\[$2]$3/g;' \
112202           -e 's/(AC_\w+\((?:\[[^,]+?\], ){1})([^,[()]+?)([,)])/$1\[$2]$3/g;' \
112203           -e 's/(AC_\w+\((?:\[[^,]+?\], ){2})([^,[()]+?)([,)])/$1\[$2]$3/g;' \
112204           -e 's/(AC_\w+\((?:\[[^,]+?\], ){3})([^,[()]+?)([,)])/$1\[$2]$3/g'
112205         perl -pi -e 's/\[\.\.\.\]/.../' m4/onceonly.m4
112206         The remainder were to add Copyright dates, increment serial numbers,
112207         undo some changes in comments, exclude m4/intl.m4, and add quotes
112208         around the "1" in ",1" where the unusual spacing prohibited the
112209         above regexps from doing the job.  For more details, see
112210         <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/16175>.
112211         * m4/acl.m4: Modified.
112212         * m4/afs.m4: Likewise.
112213         * m4/alloca.m4: Likewise.
112214         * m4/argp.m4: Likewise.
112215         * m4/argz.m4: Likewise.
112216         * m4/atexit.m4: Likewise.
112217         * m4/bison-i18n.m4: Likewise.
112218         * m4/bison.m4: Likewise.
112219         * m4/byteswap.m4: Likewise.
112220         * m4/c-stack.m4: Likewise.
112221         * m4/c-strtod.m4: Likewise.
112222         * m4/calloc.m4: Likewise.
112223         * m4/canonicalize-lgpl.m4: Likewise.
112224         * m4/chown.m4: Likewise.
112225         * m4/clock_time.m4: Likewise.
112226         * m4/codeset.m4: Likewise.
112227         * m4/copy-file.m4: Likewise.
112228         * m4/csharp.m4: Likewise.
112229         * m4/csharpcomp.m4: Likewise.
112230         * m4/csharpexec.m4: Likewise.
112231         * m4/d-ino.m4: Likewise.
112232         * m4/d-type.m4: Likewise.
112233         * m4/dirfd.m4: Likewise.
112234         * m4/double-slash-root.m4: Likewise.
112235         * m4/eaccess.m4: Likewise.
112236         * m4/eealloc.m4: Likewise.
112237         * m4/environ.m4: Likewise.
112238         * m4/errno_h.m4: Likewise.
112239         * m4/euidaccess.m4: Likewise.
112240         * m4/execute.m4: Likewise.
112241         * m4/fatal-signal.m4: Likewise.
112242         * m4/fchdir.m4: Likewise.
112243         * m4/fcntl_h.m4: Likewise.
112244         * m4/fileblocks.m4: Likewise.
112245         * m4/filenamecat.m4: Likewise.
112246         * m4/findprog.m4: Likewise.
112247         * m4/flexmember.m4: Likewise.
112248         * m4/fnmatch.m4: Likewise.
112249         * m4/fopen.m4: Likewise.
112250         * m4/fpending.m4: Likewise.
112251         * m4/fprintf-posix.m4: Likewise.
112252         * m4/free.m4: Likewise.
112253         * m4/frexp.m4: Likewise.
112254         * m4/frexpl.m4: Likewise.
112255         * m4/fsusage.m4: Likewise.
112256         * m4/ftruncate.m4: Likewise.
112257         * m4/gc-camellia.m4: Likewise.
112258         * m4/gc-random.m4: Likewise.
112259         * m4/gc.m4: Likewise.
112260         * m4/getaddrinfo.m4: Likewise.
112261         * m4/getcwd-abort-bug.m4: Likewise.
112262         * m4/getcwd-path-max.m4: Likewise.
112263         * m4/getdate.m4: Likewise.
112264         * m4/getdomainname.m4: Likewise.
112265         * m4/getgroups.m4: Likewise.
112266         * m4/gethostname.m4: Likewise.
112267         * m4/gethrxtime.m4: Likewise.
112268         * m4/getline.m4: Likewise.
112269         * m4/getloadavg.m4: Likewise.
112270         * m4/getndelim2.m4: Likewise.
112271         * m4/getpass.m4: Likewise.
112272         * m4/gettext.m4: Likewise.
112273         * m4/gettime.m4: Likewise.
112274         * m4/gettimeofday.m4: Likewise.
112275         * m4/gnulib-common.m4: Likewise.
112276         * m4/group-member.m4: Likewise.
112277         * m4/host-os.m4: Likewise.
112278         * m4/iconv.m4: Likewise.
112279         * m4/iconv_open.m4: Likewise.
112280         * m4/inet_ntop.m4: Likewise.
112281         * m4/inet_pton.m4: Likewise.
112282         * m4/inline.m4: Likewise.
112283         * m4/intldir.m4: Likewise.
112284         * m4/intlmacosx.m4: Likewise.
112285         * m4/intmax.m4: Likewise.
112286         * m4/intmax_t.m4: Likewise.
112287         * m4/inttypes.m4: Likewise.
112288         * m4/inttypes_h.m4: Likewise.
112289         * m4/inttypes-pri.m4: Likewise.
112290         * m4/isapipe.m4: Likewise.
112291         * m4/isnand.m4: Likewise.
112292         * m4/isnanf.m4: Likewise.
112293         * m4/isnanl.m4: Likewise.
112294         * m4/javacomp.m4: Likewise.
112295         * m4/javaexec.m4: Likewise.
112296         * m4/jm-winsz1.m4: Likewise.
112297         * m4/jm-winsz2.m4: Likewise.
112298         * m4/lchown.m4: Likewise.
112299         * m4/lcmessage.m4: Likewise.
112300         * m4/ldexpl.m4: Likewise.
112301         * m4/lib-ld.m4: Likewise.
112302         * m4/lib-link.m4: Likewise.
112303         * m4/libsigsegv.m4: Likewise.
112304         * m4/link-follow.m4: Likewise.
112305         * m4/localcharset.m4: Likewise.
112306         * m4/locale-fr.m4: Likewise.
112307         * m4/locale-ja.m4: Likewise.
112308         * m4/locale-tr.m4: Likewise.
112309         * m4/locale-zh.m4: Likewise.
112310         * m4/lock.m4: Likewise.
112311         * m4/longlong.m4: Likewise.
112312         * m4/ls-mntd-fs.m4: Likewise.
112313         * m4/lstat.m4: Likewise.
112314         * m4/malloc.m4: Likewise.
112315         * m4/mathl.m4: Likewise.
112316         * m4/mbrtowc.m4: Likewise.
112317         * m4/mbstate_t.m4: Likewise.
112318         * m4/mbswidth.m4: Likewise.
112319         * m4/memchr.m4: Likewise.
112320         * m4/memcmp.m4: Likewise.
112321         * m4/memcpy.m4: Likewise.
112322         * m4/memmem.m4: Likewise.
112323         * m4/memmove.m4: Likewise.
112324         * m4/mempcpy.m4: Likewise.
112325         * m4/memrchr.m4: Likewise.
112326         * m4/memset.m4: Likewise.
112327         * m4/minmax.m4: Likewise.
112328         * m4/mkdir-slash.m4: Likewise.
112329         * m4/mkdtemp.m4: Likewise.
112330         * m4/mktime.m4: Likewise.
112331         * m4/mmap-anon.m4: Likewise.
112332         * m4/mountlist.m4: Likewise.
112333         * m4/nanosleep.m4: Likewise.
112334         * m4/nls.m4: Likewise.
112335         * m4/nocrash.m4: Likewise.
112336         * m4/open.m4: Likewise.
112337         * m4/openat.m4: Likewise.
112338         * m4/openmp.m4: Likewise.
112339         * m4/pathmax.m4: Likewise.
112340         * m4/perl.m4: Likewise.
112341         * m4/physmem.m4: Likewise.
112342         * m4/pipe.m4: Likewise.
112343         * m4/po.m4: Likewise.
112344         * m4/poll.m4: Likewise.
112345         * m4/posixtm.m4: Likewise.
112346         * m4/posixver.m4: Likewise.
112347         * m4/printf-frexp.m4: Likewise.
112348         * m4/printf-frexpl.m4: Likewise.
112349         * m4/printf-posix.m4: Likewise.
112350         * m4/printf-posix-rpl.m4: Likewise.
112351         * m4/printf.m4: Likewise.
112352         * m4/progtest.m4: Likewise.
112353         * m4/putenv.m4: Likewise.
112354         * m4/readline.m4: Likewise.
112355         * m4/readlink.m4: Likewise.
112356         * m4/readutmp.m4: Likewise.
112357         * m4/realloc.m4: Likewise.
112358         * m4/regex.m4: Likewise.
112359         * m4/relocatable.m4: Likewise.
112360         * m4/relocatable-lib.m4: Likewise.
112361         * m4/rename-dest-slash.m4: Likewise.
112362         * m4/rename.m4: Likewise.
112363         * m4/rmdir-errno.m4: Likewise.
112364         * m4/rmdir.m4: Likewise.
112365         * m4/roundf.m4: Likewise.
112366         * m4/roundl.m4: Likewise.
112367         * m4/rpmatch.m4: Likewise.
112368         * m4/save-cwd.m4: Likewise.
112369         * m4/selinux-selinux-h.m4: Likewise.
112370         * m4/setenv.m4: Likewise.
112371         * m4/settime.m4: Likewise.
112372         * m4/sig2str.m4: Likewise.
112373         * m4/sig_atomic_t.m4: Likewise.
112374         * m4/signalblocking.m4: Likewise.
112375         * m4/signbit.m4: Likewise.
112376         * m4/sigpipe.m4: Likewise.
112377         * m4/sockets.m4: Likewise.
112378         * m4/sockpfaf.m4: Likewise.
112379         * m4/st_dm_mode.m4: Likewise.
112380         * m4/stat-time.m4: Likewise.
112381         * m4/stdbool.m4: Likewise.
112382         * m4/stdint.m4: Likewise.
112383         * m4/stdint_h.m4: Likewise.
112384         * m4/stpcpy.m4: Likewise.
112385         * m4/stpncpy.m4: Likewise.
112386         * m4/strcase.m4: Likewise.
112387         * m4/strchrnul.m4: Likewise.
112388         * m4/strcspn.m4: Likewise.
112389         * m4/strdup.m4: Likewise.
112390         * m4/strftime.m4: Likewise.
112391         * m4/strndup.m4: Likewise.
112392         * m4/strnlen.m4: Likewise.
112393         * m4/strpbrk.m4: Likewise.
112394         * m4/strptime.m4: Likewise.
112395         * m4/strsep.m4: Likewise.
112396         * m4/strtod.m4: Likewise.
112397         * m4/strtoimax.m4: Likewise.
112398         * m4/strtok_r.m4: Likewise.
112399         * m4/strtol.m4: Likewise.
112400         * m4/strtoll.m4: Likewise.
112401         * m4/strtoul.m4: Likewise.
112402         * m4/strtoull.m4: Likewise.
112403         * m4/strtoumax.m4: Likewise.
112404         * m4/strverscmp.m4: Likewise.
112405         * m4/threadlib.m4: Likewise.
112406         * m4/timegm.m4: Likewise.
112407         * m4/tm_gmtoff.m4: Likewise.
112408         * m4/tmpdir.m4: Likewise.
112409         * m4/tmpfile.m4: Likewise.
112410         * m4/tzset.m4: Likewise.
112411         * m4/uintmax_t.m4: Likewise.
112412         * m4/unlinkdir.m4: Likewise.
112413         * m4/unlocked-io.m4: Likewise.
112414         * m4/uptime.m4: Likewise.
112415         * m4/userspec.m4: Likewise.
112416         * m4/utimbuf.m4: Likewise.
112417         * m4/utime.m4: Likewise.
112418         * m4/utimes-null.m4: Likewise.
112419         * m4/utimes.m4: Likewise.
112420         * m4/vararrays.m4: Likewise.
112421         * m4/vasnprintf.m4: Likewise.
112422         * m4/vfprintf-posix.m4: Likewise.
112423         * m4/vprintf-posix.m4: Likewise.
112424         * m4/wait-process.m4: Likewise.
112425         * m4/wchar_t.m4: Likewise.
112426         * m4/wint_t.m4: Likewise.
112427         * m4/write-any-file.m4: Likewise.
112428         * m4/yield.m4: Likewise.
112430 2009-01-13  Bruno Haible  <bruno@clisp.org>
112432         Avoid test-copy-file.sh failures when ACL support insufficient.
112433         * modules/copy-file-tests (Makefile.am): Pass USE_ACL in
112434         TESTS_ENVIRONMENT.
112435         * tests/test-copy-file.sh: Skip the ACL comparisons if USE_ACL is 0.
112436         Reported by Jim Meyering.
112438 2009-01-13  Bruno Haible  <bruno@clisp.org>
112440         * modules/unistdio/u-printf-args (Files): Add m4/stdint_h.m4 and
112441         m4/inttypes_h.m4, needed by m4/intmax_t.m4.
112442         * modules/unistdio/u8-printf-parse (Files): Likewise.
112443         * modules/unistdio/u32-printf-parse (Files): Likewise.
112444         * modules/unistdio/ulc-printf-parse (Files): Likewise.
112446 2009-01-13  Simon Josefsson  <simon@josefsson.org>
112448         * modules/unistdio/u16-printf-parse (Files): Add m4/stdint_h.m4
112449         and m4/inttypes_h.m4 too.
112451 2009-01-12  Eric Blake  <ebb9@byu.net>
112453         tests: IRIX 6.2 cc can't compile -0.0 into .data
112454         * tests/test-ceill.c (minus_zero): Compute -0.0L at runtime,
112455         rather than at compile-time.
112456         * tests/test-floorl.c (minus_zero): Likewise.
112457         * tests/test-frexpl.c (minus_zero): Likewise.
112458         * tests/test-isnan.c (minus_zerol): Likewise.
112459         * tests/test-isnanl.h (minus_zero): Likewise.
112460         * tests/test-ldexpl.c (minus_zero): Likewise.
112461         * tests/test-roundl.c (minus_zero): Likewise.
112462         * tests/test-signbit.c (minus_zerol): Likewise.
112463         * tests/test-snprintf-posix.h (minus_zerol): Likewise.
112464         * tests/test-sprintf-posix.h (minus_zerol): Likewise.
112465         * tests/test-truncl.c (minus_zero): Likewise.
112466         * tests/test-vasnprintf-posix.c (minus_zerol): Likewise.
112467         * tests/test-vasprintf-posix.c (minus_zerol): Likewise.
112468         Reported by Tom G. Christensen and Nelson H. F. Beebe.
112470 2009-01-09  Paolo Bonzini  <bonzini@gnu.org>
112472         regex: fix glibc bug 9697
112473         * lib/regcomp.c (re_compile_fastmap_iter): Rewrite COMPLEX_BRACKET
112474         handling.
112476 2009-01-09  Paolo Bonzini  <bonzini@gnu.org>
112478         regex: fix glibc bug 697
112479         * lib/regexec.c (prune_impossible_nodes): Handle sifted_states[0]
112480         being NULL also if there are no backreferences.
112482 2009-01-09  Paolo Bonzini  <bonzini@gnu.org>
112484         regex: merge glibc changes
112485         * lib/regcomp.c (re_compile_fastmap_iter): Use __mbrtowc.
112486         * lib/regex_internal.c (build_wcs_buffer, build_wcs_upper_buffer,
112487         re_string_skip_chars, re_string_reconstruct): Likewise.
112488         * lib/regex_internal.h [!_LIBC] (__mbrtowc): New #define.
112490 2009-01-07  Jim Meyering  <meyering@redhat.com>
112492         poll: filter through cppi
112493         * lib/poll.c: Indent cpp directives to reflect nesting.
112495 2009-01-07  Daniel P. Berrange  <berrange@redhat.com>
112497         poll: don't return uninitialized
112498         * lib/poll.c (poll) [WIN32_NATIVE]: Initialize "rc".
112500 2009-01-06  Jeremy Olexa  <darkside@gentoo.org>  (tiny change)
112502         avoid compile failure on AIX 6.1
112503         * lib/getloadavg.c [HAVE_LIBPERFSTAT]: Include <sys/protosw.h>.
112504         Details in http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/15465
112506 2009-01-04  Jim Meyering  <meyering@redhat.com>
112508         remove duplicate inclusion of <stdio.h>
112509         * tests/test-fprintf-posix.c: Likewise.
112510         * tests/test-printf-posix.c: Likewise.
112511         * tests/test-snprintf-posix.c: Likewise.
112512         * tests/test-sprintf-posix.c: Likewise.
112513         * tests/test-vasprintf-posix.c: Likewise.
112514         * tests/test-vfprintf-posix.c: Likewise.
112515         * tests/test-vprintf-posix.c: Likewise.
112516         * tests/test-vsnprintf-posix.c: Likewise.
112517         * tests/test-vsprintf-posix.c: Likewise.
112519 2009-01-03  Jim Meyering  <meyering@redhat.com>
112521         gnulib-tool: fix sed-based filtering
112522         * gnulib-tool (func_filter_filelist): Remove extra backslash
112523         in sed_fff_filter definition.
112525 2009-01-02  Jim Meyering  <meyering@redhat.com>
112527         strftime: avoid compilation failure on Solaris 2.6
112528         * modules/strftime (Depends-on): Add mbrlen and mbsinit.
112529         * lib/strftime.c [DO_MULTIBYTE]: Include <wchar.h> unconditionally.
112530         Don't #define mbrlen or mbsinit, since now they're guaranteed to
112531         be available.  Reported by Tom G. Christensen.  Details in
112532         <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/16180>.
112534 2009-01-01  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
112535             Bruno Haible  <bruno@clisp.org>
112537         Speed up gnulib-tool by doing more string processing through shell
112538         built-ins.
112539         * gnulib-tool (fast_func_append): New variable.
112540         (func_remove_prefix, func_remove_suffix): New functions.
112541         (fast_func_remove_prefix, fast_func_remove_suffix): New variables.
112542         (func_filter_filelist): New function.
112543         (func_get_dependencies): Use func_remove_suffix instead of sed.
112544         (func_get_automake_snippet): Use func_filter_filelist instead of a
112545         subshell and sed invocation.
112547 2009-01-01  Bruno Haible  <bruno@clisp.org>
112549         Fix a security bug.
112550         * gnulib-tool (func_import, import, update): Don't allow the characters
112551         '"', '$', '`', '\' in macro arguments that become part of commands that
112552         are evaluated.
112554 2009-01-01  Bruno Haible  <bruno@clisp.org>
112556         * gnulib-tool (func_reset_sigpipe): Add more comments.
112558 2009-01-01  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
112560         * gnulib-tool (func_modules_add_dummy, func_emit_lib_Makefile_am,
112561         func_emit_tests_Makefile_am, func_import): Abort loops early if we
112562         already know the answer.
112564 2009-01-01  Jim Meyering  <meyering@redhat.com>
112566         * lib/version-etc.c (version_etc_va): Update copyright year.
112568 2008-12-30  Bruno Haible  <bruno@clisp.org>
112570         * m4/lib-prefix.m4 (AC_LIB_LINKFLAGS_BODY): Don't overwrite
112571         LIB${NAME}_PREFIX when considering the dependencies of lib${name}.
112572         Reported by Charles Wilson <cygwin@cwilson.fastmail.fm>.
112574 2008-12-29  Eric Blake  <ebb9@byu.net>
112576         multiarch: avoid autoconf AC_REQUIRE bug
112577         * m4/multiarch.m4 (gl_MULTIARCH): Split body...
112578         (gl_MULTIARCH_BODY): ...into new macro, to work around bug in Autoconf
112579         2.63 and older.
112580         Reported by Bruno Haible, and analyzed in
112581         http://lists.gnu.org/r/bug-autoconf/2008-12/msg00039.html
112583 2008-12-29  Bruno Haible  <bruno@clisp.org>
112585         * gnulib-tool (func_import): When generating sed-ignore-removed, handle
112586         files in subdirectories correctly.
112587         Reported by Ralf Wildenhues.
112589 2008-12-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
112591         * gnulib-tool (func_update_ignorelist): Use 'join - FILE'
112592         rather than 'join FILE -', for Solaris join.
112594 2008-12-29  Bruno Haible  <bruno@clisp.org>
112596         * m4/codeset.m4 (AM_LANGINFO_CODESET): More systematic m4 argument
112597         quoting.
112598         * m4/gettext.m4 (AM_GNU_GETTEXT): Likewise.
112599         * m4/glibc2.m4 (gt_GLIBC2): Likewise.
112600         * m4/glibc21.m4 (gl_GLIBC21): Likewise.
112601         * m4/iconv.m4 (AM_ICONV_LINK, AM_ICONV): Likewise.
112602         * m4/intdiv0.m4 (gt_INTDIV0): Likewise.
112603         * m4/intlmacosx.m4 (gt_INTL_MACOSX): Likewise.
112604         * m4/intmax.m4 (gt_TYPE_INTMAX_T): Likewise.
112605         * m4/inttypes-pri.m4 (gt_INTTYPES_PRI): Likewise.
112606         * m4/inttypes_h.m4 (gl_AC_HEADER_INTTYPES_H): Likewise.
112607         * m4/lcmessage.m4 (gt_LC_MESSAGES): Likewise.
112608         * m4/nls.m4 (AM_NLS): Likewise.
112609         * m4/po.m4 (AM_PO_SUBDIRS): Likewise.
112610         * m4/printf-posix.m4 (gt_PRINTF_POSIX): Likewise.
112611         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): Likewise.
112612         * m4/size_max.m4 (gl_SIZE_MAX): Likewise.
112613         * m4/stdint_h.m4 (gl_AC_HEADER_STDINT_H): Likewise.
112614         * m4/threadlib.m4 (gl_THREADLIB_BODY): Likewise.
112615         * m4/uintmax_t.m4 (gl_AC_TYPE_UINTMAX_T): Likewise.
112616         * m4/visibility.m4 (gl_VISIBILITY): Likewise.
112617         * m4/wchar_t.m4 (gt_TYPE_WCHAR_T): Likewise.
112618         * m4/wint_t.m4 (gt_TYPE_WINT_T): Likewise.
112619         * m4/xsize.m4 (gl_XSIZE): Likewise.
112620         Suggested by Jim Meyering.
112622 2008-11-17  Bruce Korb  <bkorb@gnu.org>
112624         * lib/parse-duration.h: non-iso form accepts years, months weeks, too
112625         * lib/parse-duration.c: use a switch instead of cascading if's.
112627 2008-12-29  Eric Blake  <ebb9@byu.net>
112629         wchar.h: supply WEOF on Irix 5.3
112630         * lib/wchar.in.h (wint_t): Also supply WEOF.
112631         * lib/wctype.in.h (wint_t): Likewise.
112632         * doc/posix-headers/wchar.texi (wchar.h): Document the bug.
112633         * doc/posix-headers/wctype.texi (wctype.h): Likewise.
112634         Reported by Tom G. Christensen.
112636 2008-12-26  Bruno Haible  <bruno@clisp.org>
112638         * m4/multiarch.m4 (gl_MULTIARCH): Recognize also the architecture names
112639         i486, i586, i686.
112641 2008-12-26  Bruno Haible  <bruno@clisp.org>
112643         * lib/stdlib.in.h (struct random_data): Fix indentation of comments.
112645 2008-12-26  Bruno Haible  <bruno@clisp.org>
112647         * lib/stdint.in.h: Move the include of <wchar.h> down until after all
112648         the types are defined. Also conditionalize it on __STDC_LIMIT_MACROS,
112649         not __STDC_CONSTANT_MACROS.
112650         Reported by Nelson H. F. Beebe <beebe@math.utah.edu> via Eric Blake.
112652 2008-12-25  Bruno Haible  <bruno@clisp.org>
112654         Add support for universal builds to vasnprintf.
112655         * m4/printf.m4 (gl_PRINTF_ENOMEM): Require gl_MULTIARCH. In Apple
112656         universal builds, guess no.
112657         * modules/vasnprintf-posix (Depends-on): Add multiarch.
112658         * modules/vasprintf-posix (Depends-on): Likewise.
112659         * modules/fprintf-posix (Depends-on): Likewise.
112660         * modules/vfprintf-posix (Depends-on): Likewise.
112661         * modules/snprintf-posix (Depends-on): Likewise.
112662         * modules/vsnprintf-posix (Depends-on): Likewise.
112663         * modules/sprintf-posix (Depends-on): Likewise.
112664         * modules/vsprintf-posix (Depends-on): Likewise.
112665         * modules/unistdio/u8-vasnprintf (Depends-on): Likewise.
112666         * modules/unistdio/u8-u8-vasnprintf (Depends-on): Likewise.
112667         * modules/unistdio/u16-vasnprintf (Depends-on): Likewise.
112668         * modules/unistdio/u16-u16-vasnprintf (Depends-on): Likewise.
112669         * modules/unistdio/u32-vasnprintf (Depends-on): Likewise.
112670         * modules/unistdio/u32-u32-vasnprintf (Depends-on): Likewise.
112671         * modules/unistdio/ulc-vasnprintf (Depends-on): Likewise.
112673         Add support for universal builds to <inttypes.h>.
112674         * lib/inttypes.in.h (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX,
112675         _SCNu64_PREFIX): In Apple
112676         universal builds, define directly, using _LP64.
112677         * m4/inttypes.m4 (gl_INTTYPES_H): In Apple universal builds, set
112678         INT64_MAX_EQ_LONG_MAX and UINT64_MAX_EQ_ULONG_MAX to -1.
112679         * modules/inttypes (Depends-on): Add multiarch.
112680         (Makefile.am): Substitute APPLE_UNIVERSAL_BUILD.
112682         Add support for universal builds to <stdint.h>.
112683         * lib/stdint.in.h (PDFDIFF_MIN, PTRDIFF_MAX, SIZE_MAX): In Apple
112684         universal builds, define directly, using _LP64.
112685         * m4/stdint.m4 (gl_STDINT_TYPE_PROPERTIES): Require gl_MULTIARCH. In
112686         Apple universal builds, don't test for the size and suffix of ptrdiff_t
112687         and size_t.
112688         * modules/stdint (Depends-on): Add multiarch.
112689         (Makefile.am): Substitute APPLE_UNIVERSAL_BUILD.
112691         New module 'multiarch'.
112692         * modules/multiarch: New file.
112693         * m4/multiarch.m4: New file.
112695 2008-12-25  Bruno Haible  <bruno@clisp.org>
112697         * gnulib-tool (func_create_testdir): Avoid failure of mv command.
112699 2008-12-25  Bruno Haible  <bruno@clisp.org>
112701         * modules/btowc (License): Relicense under LGPLv2+.
112702         * modules/mbsinit (License): Likewise.
112703         * modules/mbrtowc (License): Likewise.
112704         * modules/wcrtomb (License): Likewise.
112705         * modules/streq (License): Likewise.
112706         Reported by David Lutterkort <lutter@redhat.com>.
112708 2008-12-23  Bruno Haible  <bruno@clisp.org>
112710         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Fix conditional and comment.
112712 2008-12-23  Bruno Haible  <bruno@clisp.org>
112714         Module getaddrinfo requires linking with $(GETADDRINFO_LIB).
112715         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Put link options into
112716         GETADDRINFO_LIB, not in LIBS.
112717         * modules/getaddrinfo (Link): Set to $(GETADDRINFO_LIB).
112718         * modules/canon-host (Link): Likewise.
112719         * NEWS: Mention the change.
112720         * modules/getaddrinfo-tests (test_getaddrinfo_LDADD): Add the
112721         GETADDRINFO_LIB.
112723 2008-12-22  Bruno Haible  <bruno@clisp.org>
112725         * doc/posix-functions/iswalnum_l.texi: Mention limitation of wchar_t.
112726         * doc/posix-functions/iswalpha_l.texi: Likewise.
112727         * doc/posix-functions/iswblank_l.texi: Likewise.
112728         * doc/posix-functions/iswcntrl_l.texi: Likewise.
112729         * doc/posix-functions/iswctype_l.texi: Likewise.
112730         * doc/posix-functions/iswdigit_l.texi: Likewise.
112731         * doc/posix-functions/iswgraph_l.texi: Likewise.
112732         * doc/posix-functions/iswlower_l.texi: Likewise.
112733         * doc/posix-functions/iswprint_l.texi: Likewise.
112734         * doc/posix-functions/iswpunct_l.texi: Likewise.
112735         * doc/posix-functions/iswspace_l.texi: Likewise.
112736         * doc/posix-functions/iswupper_l.texi: Likewise.
112737         * doc/posix-functions/iswxdigit_l.texi: Likewise.
112738         * doc/posix-functions/mbsnrtowcs.texi: Likewise.
112739         * doc/posix-functions/open_wmemstream.texi: Likewise.
112740         * doc/posix-functions/swscanf.texi: Likewise.
112741         * doc/posix-functions/towctrans_l.texi: Likewise.
112742         * doc/posix-functions/towlower.texi: Likewise.
112743         * doc/posix-functions/towlower_l.texi: Likewise.
112744         * doc/posix-functions/towupper.texi: Likewise.
112745         * doc/posix-functions/towupper_l.texi: Likewise.
112746         * doc/posix-functions/vfwprintf.texi: Likewise.
112747         * doc/posix-functions/vfwscanf.texi: Likewise.
112748         * doc/posix-functions/vswscanf.texi: Likewise.
112749         * doc/posix-functions/vwprintf.texi: Likewise.
112750         * doc/posix-functions/vwscanf.texi: Likewise.
112751         * doc/posix-functions/wcpcpy.texi: Likewise.
112752         * doc/posix-functions/wcpncpy.texi: Likewise.
112753         * doc/posix-functions/wcscasecmp.texi: Likewise.
112754         * doc/posix-functions/wcscasecmp_l.texi: Likewise.
112755         * doc/posix-functions/wcscoll_l.texi: Likewise.
112756         * doc/posix-functions/wcsdup.texi: Likewise.
112757         * doc/posix-functions/wcsncasecmp.texi: Likewise.
112758         * doc/posix-functions/wcsncasecmp_l.texi: Likewise.
112759         * doc/posix-functions/wcsnlen.texi: Likewise.
112760         * doc/posix-functions/wcsnrtombs.texi: Likewise.
112761         * doc/posix-functions/wcsxfrm_l.texi: Likewise.
112762         * doc/posix-functions/wctrans_l.texi: Likewise.
112763         * doc/posix-functions/wctype_l.texi: Likewise.
112764         * doc/glibc-functions/fgetwc_unlocked.texi: Likewise.
112765         * doc/glibc-functions/fgetws_unlocked.texi: Likewise.
112766         * doc/glibc-functions/fputwc_unlocked.texi: Likewise.
112767         * doc/glibc-functions/fputws_unlocked.texi: Likewise.
112768         * doc/glibc-functions/getwc_unlocked.texi: Likewise.
112769         * doc/glibc-functions/getwchar_unlocked.texi: Likewise.
112770         * doc/glibc-functions/putwc_unlocked.texi: Likewise.
112771         * doc/glibc-functions/putwchar_unlocked.texi: Likewise.
112772         * doc/glibc-functions/wcschrnul.texi: Likewise.
112773         * doc/glibc-functions/wcsftime_l.texi: Likewise.
112774         * doc/glibc-functions/wcstod_l.texi: Likewise.
112775         * doc/glibc-functions/wcstof_l.texi: Likewise.
112776         * doc/glibc-functions/wcstol_l.texi: Likewise.
112777         * doc/glibc-functions/wcstold_l.texi: Likewise.
112778         * doc/glibc-functions/wcstoll_l.texi: Likewise.
112779         * doc/glibc-functions/wcstoq.texi: Likewise.
112780         * doc/glibc-functions/wcstoul_l.texi: Likewise.
112781         * doc/glibc-functions/wcstoull_l.texi: Likewise.
112782         * doc/glibc-functions/wcstouq.texi: Likewise.
112783         * doc/glibc-functions/wmempcpy.texi: Likewise.
112785 2008-12-22  Ingo Weinhold  <ingo_weinhold@gmx.de>  (tiny change)
112786             Eric Blake  <ebb9@byu.net>
112787             Paolo Bonzini  <bonzini@gnu.org>
112788             Bruno Haible  <bruno@clisp.org>
112790         Make c-stack work on Haiku.
112791         * lib/c-stack.c (SA_ONSTACK): Define fallback.
112792         (c_stack_action): Use SA_ONSTACK flag.
112794 2008-12-22  Bruno Haible  <bruno@clisp.org>
112796         * m4/locale-fr.m4 (gt_LOCALE_FR_UTF8): Treat Haiku like BeOS.
112798 2008-12-22  Bruno Haible  <bruno@clisp.org>
112800         Work around mbrlen() bugs on AIX, HP-UX, OSF/1, Solaris.
112801         * m4/mbrlen.m4 (gl_FUNC_MBRLEN): Set REPLACE_MBRLEN if mbrtowc is
112802         being overridden.
112803         (gl_MBRLEN_INCOMPLETE_STATE, gl_MBRLEN_RETVAL, gl_MBRLEN_NUL_RETVAL):
112804         New macros.
112805         * lib/wchar.in.h (mbrlen): Override if REPLACE_MBRLEN is set.
112806         * m4/wchar.m4 (gl_WCHAR_H_DEFAULTS): Initialize REPLACE_MBRLEN.
112807         * modules/wchar (Makefile.am): Substitute REPLACE_MBRLEN.
112808         * doc/posix-functions/mbrlen.texi: Mention the various platform bugs.
112810 2008-12-22  Bruno Haible  <bruno@clisp.org>
112812         * m4/mbrtowc.m4 (gl_MBRTOWC_INCOMPLETE_STATE): Remove unused variable
112813         from test code.
112815 2008-12-22  Eric Blake  <ebb9@byu.net>
112817         Avoid gcc warnings on cygwin.
112818         * lib/regex_internal.c (re_string_reconstruct) [!RE_ENABLE_I18N]:
112819         Avoid unused variable.
112820         * lib/regexec.c (check_arrival_add_next_nodes) [!RE_ENABLE_I18N]:
112821         Likewise.
112823 2008-12-22  Bruno Haible  <bruno@clisp.org>
112825         Remove HAVE_MBRTOWC conditionals.
112826         * lib/mbscasecmp.c: Include mbuiter.h unconditionally.
112827         (mbscasecmp): Assume mbrtowc function.
112828         * lib/mbscasestr.c: Include mbuiter.h unconditionally.
112829         (knuth_morris_pratt_multibyte, mbscasestr): Assume mbrtowc function.
112830         * lib/mbschr.c: Include mbuiter.h unconditionally.
112831         (mbschr): Assume mbrtowc function.
112832         * lib/mbscspn.c: Include mbuiter.h unconditionally.
112833         (mbscspn): Assume mbrtowc function.
112834         * lib/mbslen.c: Include mbuiter.h unconditionally.
112835         (mbslen): Assume mbrtowc function.
112836         * lib/mbsncasecmp.c: Include mbuiter.h unconditionally.
112837         (mbsncasecmp): Assume mbrtowc function.
112838         * lib/mbsnlen.c: Include mbiter.h unconditionally.
112839         (mbsnlen): Assume mbrtowc function.
112840         * lib/mbspbrk.c: Include mbuiter.h unconditionally.
112841         (mbspbrk): Assume mbrtowc function.
112842         * lib/mbspcasecmp.c: Include mbuiter.h unconditionally.
112843         (mbspcasecmp): Assume mbrtowc function.
112844         * lib/mbsrchr.c: Include mbuiter.h unconditionally.
112845         (mbsrchr): Assume mbrtowc function.
112846         * lib/mbssep.c: Include mbuiter.h unconditionally.
112847         (mbssep): Assume mbrtowc function.
112848         * lib/mbsspn.c: Include mbuiter.h unconditionally.
112849         (mbsspn): Assume mbrtowc function.
112850         * lib/mbsstr.c: Include mbuiter.h unconditionally.
112851         (knuth_morris_pratt_multibyte, mbsstr): Assume mbrtowc function.
112852         * lib/mbstok_r.c: Include mbuiter.h unconditionally.
112853         (mbstok_r): Assume mbrtowc function.
112854         * lib/propername.c: Include mbuiter.h unconditionally.
112855         (mbsstr_trimmed_wordbounded): Assume mbrtowc function.
112856         * lib/trim.c: Include mbchar.h, mbiter.h unconditionally.
112857         (trim2): Assume mbrtowc function.
112858         * lib/mbswidth.c (mbsinit): Remove fallback definition.
112859         (mbsnwidth): Assume mbrtowc function.
112860         * modules/mbswidth (Depends-on): Add mbrtowc, mbsinit.
112861         * lib/quotearg.c (MB_CUR_MAX, mbstate_t, mbrtowc, iswprint): Remove
112862         fallback definitions.
112863         * modules/quotearg (Depends-on): Add mbrtowc, mbsinit.
112865 2008-12-22  Bruno Haible  <bruno@clisp.org>
112867         * doc/posix-functions/mbtowc.texi: Mention a glibc bug.
112869 2008-12-22  Paolo Bonzini  <bonzini@gnu.org>
112871         * modules/regex: Request emulations for the mb*/wc* functions we need.
112872         * m4/regex.m4: Don't look for those functions here.
112873         * lib/regex_internal.h: Do not check HAVE_WCRTOMB and HAVE_MBRTOWC.
112875 2008-12-22  Bruno Haible  <bruno@clisp.org>
112877         * modules/fnmatch (Depends-on): Remove duplicated dependency.
112879 2008-12-21  Bruno Haible  <bruno@clisp.org>
112881         Make mbiter.h, mbuiter.h, mbfile.h usable unconditionally.
112882         * modules/mbiter (Depends-on): Add mbrtowc, mbsinit.
112883         (Include): Remove conditionalization.
112884         * modules/mbuiter (Depends-on): Add mbrtowc, mbsinit.
112885         (Include): Remove conditionalization.
112886         * modules/mbfile (Depends-on): Add mbrtowc, mbsinit.
112887         (Include): Remove conditionalization.
112888         * m4/mbiter.m4 (gl_MBITER): Deprecate the use of AC_FUNC_MBRTOWC.
112889         * m4/mbfile.m4 (gl_MBFILE): Likewise.
112890         * NEWS: Mention the change.
112891         Reported by Alan Hourihane <alanh@fairlite.co.uk>
112892         via Sergey Poznyakoff <gray@gnu.org.ua>.
112894 2008-12-21  Bruno Haible  <bruno@clisp.org>
112896         * MODULES.html.sh (Extended multibyte and wide character utilities
112897         <wchar.h>): Add btowc, wctob, mbsinit, mbrlen, mbrtowc, mbsrtowcs,
112898         wcrtomb, wcsrtombs.
112899         (Support for systems lacking POSIX:2008): Add accept, bind, close,
112900         connect, fclose, getpeername, getsockname, getsockopt, hostent, listen,
112901         mbsnrtowcs, posix_spawn*, recv, recvfrom, sched, select, send, sendto,
112902         setsockopt, shutdown, socket, spawn, sys_wait, wcsnrtombs, write.
112904 2008-12-21  Bruno Haible  <bruno@clisp.org>
112906         * MODULES.html.sh: Change section titles to refer to POSIX:2008.
112908 2008-12-21  Bruno Haible  <bruno@clisp.org>
112910         * modules/wcsnrtombs-tests: New file.
112911         * tests/test-wcsnrtombs1.sh: New file.
112912         * tests/test-wcsnrtombs2.sh: New file.
112913         * tests/test-wcsnrtombs3.sh: New file.
112914         * tests/test-wcsnrtombs4.sh: New file.
112915         * tests/test-wcsnrtombs.c: New file.
112917         New module 'wcsnrtombs'.
112918         * lib/wchar.in.h (wcsnrtombs): New declaration.
112919         * lib/wcsnrtombs.c: New file.
112920         * lib/wcsrtombs-state.c: New file.
112921         * lib/wcsrtombs.c: Refer to _gl_wcsrtombs_state.
112922         (internal_state): Remove variable.
112923         * m4/wcsnrtombs.m4: New file.
112924         * m4/wcsrtombs.m4 (gl_FUNC_WCSRTOMBS): Add wcsrtombs-state.c to the
112925         compilation units.
112926         * m4/wchar.m4 (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSNRTOMBS,
112927         HAVE_WCSNRTOMBS.
112928         * modules/wchar (Makefile.am): Substitute GNULIB_WCSNRTOMBS,
112929         HAVE_WCSNRTOMBS.
112930         * modules/wcsnrtombs: New file.
112931         * modules/wcsrtombs (Files): Add lib/wcsrtombs-state.c.
112932         * doc/posix-functions/wcsnrtombs.texi: Mention the new module.
112934 2008-12-21  Bruno Haible  <bruno@clisp.org>
112936         * modules/wcsrtombs-tests: New file.
112937         * tests/test-wcsrtombs1.sh: New file.
112938         * tests/test-wcsrtombs2.sh: New file.
112939         * tests/test-wcsrtombs3.sh: New file.
112940         * tests/test-wcsrtombs4.sh: New file.
112941         * tests/test-wcsrtombs.c: New file.
112943         New module 'wcsrtombs'.
112944         * lib/wchar.in.h (wcsrtombs): New declaration.
112945         * lib/wcsrtombs.c: New file.
112946         * m4/wcsrtombs.m4: New file.
112947         * m4/wchar.m4 (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSRTOMBS,
112948         HAVE_WCSRTOMBS, REPLACE_WCSRTOMBS.
112949         * modules/wchar (Makefile.am): Substitute GNULIB_WCSRTOMBS,
112950         HAVE_WCSRTOMBS, REPLACE_WCSRTOMBS.
112951         * modules/wcsrtombs: New file.
112952         * doc/posix-functions/wcsrtombs.texi: Mention the new module and the
112953         bugs.
112955 2008-12-21  Bruno Haible  <bruno@clisp.org>
112957         Work around a wcrtomb() bug on Solaris 10 and OSF/1 5.1.
112958         * lib/wchar.in.h (wcrtomb): Override if REPLACE_WCRTOMB is set.
112959         * m4/wcrtomb.m4 (gl_FUNC_WCRTOMB): Test the return value of wcrtomb
112960         with NULL destination argument in various locales. Set REPLACE_WCRTOMB
112961         if not correct.
112962         * m4/wchar.m4 (gl_WCHAR_H_DEFAULTS): Initialize REPLACE_WCRTOMB.
112963         * modules/wchar (Makefile.am): Substitute REPLACE_WCRTOMB.
112964         * modules/wcrtomb (Files): Add m4/locale-fr.m4, m4/locale-ja.m4,
112965         m4/locale-zh.m4, m4/codeset.m4.
112966         * doc/posix-functions/wcrtomb.texi: Document the bug.
112968 2008-12-21  Bruno Haible  <bruno@clisp.org>
112970         Work around a btowc() bug on IRIX 6.5.
112971         * lib/wchar.in.h (btowc): Override if REPLACE_BTOWC is set.
112972         * m4/btowc.m4 (gl_FUNC_BTOWC): Test whether btowc(EOF) is correct. Set
112973         REPLACE_WTOBC if not.
112974         * m4/wchar.m4 (gl_WCHAR_H_DEFAULTS): Initialize REPLACE_BTOWC.
112975         * modules/wchar (Makefile.am): Substitute REPLACE_BTOWC.
112976         * doc/posix-functions/btowc.texi: Mention the IRIX bug.
112978 2008-12-21  Bruno Haible  <bruno@clisp.org>
112980         * modules/wcrtomb-tests: New file.
112981         * tests/test-wcrtomb.sh: New file.
112982         * tests/test-wcrtomb.c: New file.
112984         New module 'wcrtomb'.
112985         * lib/wchar.in.h (wcrtomb): New declaration.
112986         * lib/wcrtomb.c: New file.
112987         * m4/wcrtomb.m4: New file.
112988         * m4/wchar.m4 (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCRTOMB,
112989         HAVE_WCRTOMB.
112990         * modules/wchar (Makefile.am): Substitute GNULIB_WCRTOMB,
112991         HAVE_WCRTOMB.
112992         * modules/wcrtomb: New file.
112993         * doc/posix-functions/wcrtomb.texi: Mention the new module.
112995 2008-12-21  Bruno Haible  <bruno@clisp.org>
112997         * modules/mbrtowc (Files): Add m4/codeset.m4, needed by m4/locale-fr.m4.
112998         * modules/mbsrtowcs (Files): Likewise.
112999         * modules/wctob (Files): Likewise.
113000         * modules/c-strcase-tests (Files): Likewise.
113001         * modules/unistdio/u8-vasnprintf-tests (Files): Likewise.
113002         * modules/unistdio/u16-vasnprintf-tests (Files): Likewise.
113003         * modules/unistdio/u32-vasnprintf-tests (Files): Likewise.
113004         * modules/unistdio/ulc-vasnprintf-tests (Files): Likewise.
113005         * modules/vasnprintf-posix-tests (Files): Likewise.
113007 2008-12-21  William Pursell  <bill.pursell@gmail.com>
113009         gitlog-to-changelog: pass all command-line arguments to git-log
113010         * build-aux/gitlog-to-changelog: When producing a ChangeLog,
113011         it is sometimes convenient to filter the commits in various ways.
113012         gitlog-to-changelog only allows --since to specify a start date,
113013         but git-log itself supports many other filtering mechanisms.
113014         At the moment, I want to filter by branch name.  Rather than
113015         adding a --branch option to gitlog-to-changelog, it seems more
113016         flexible to simply pass all options directly to git-log and let
113017         git do the work.  Notice that this effectively makes --since a
113018         redundant option for gitlog-to-changelog, but removing it would
113019         require current usage to change since calls would then require
113020         an additional '--'.
113022 2008-12-21  Bruno Haible  <bruno@clisp.org>
113024         * modules/mbsnrtowcs-tests: New file.
113025         * tests/test-mbsnrtowcs1.sh: New file.
113026         * tests/test-mbsnrtowcs2.sh: New file.
113027         * tests/test-mbsnrtowcs3.sh: New file.
113028         * tests/test-mbsnrtowcs4.sh: New file.
113029         * tests/test-mbsnrtowcs.c: New file.
113031         New module 'mbsnrtowcs'.
113032         * lib/wchar.in.h (mbsnrtowcs): New declaration.
113033         * lib/mbsnrtowcs.c: New file.
113034         * lib/mbsrtowcs-state.c: New file.
113035         * lib/mbsrtowcs.c: Refer to _gl_mbsrtowcs_state.
113036         (internal_state): Remove variable.
113037         * m4/mbsnrtowcs.m4: New file.
113038         * m4/mbsrtowcs.m4 (gl_FUNC_MBSRTOWCS): Add mbsrtowcs-state.c to the
113039         compilation units.
113040         * m4/wchar.m4 (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_MBSNRTOWCS,
113041         HAVE_MBSNRTOWCS, REPLACE_MBSNRTOWCS.
113042         * modules/wchar (Makefile.am): Substitute GNULIB_MBSNRTOWCS,
113043         HAVE_MBSNRTOWCS, REPLACE_MBSNRTOWCS.
113044         * modules/mbsnrtowcs: New file.
113045         * modules/mbsrtowcs (Files): Add lib/mbsrtowcs-state.c.
113046         * doc/posix-functions/mbsnrtowcs.texi: Mention the new module and a
113047         portability problem.
113049 2008-12-21  Bruno Haible  <bruno@clisp.org>
113051         Work around mbsrtowcs bug.
113052         * m4/mbsrtowcs.m4 (gl_MBSRTOWCS_WORKS): New macro.
113053         (gl_FUNC_MBSRTOWCS): Invoke it.
113054         * modules/mbsrtowcs (Files): Add m4/locale-fr.m4, m4/locale-ja.m4,
113055         m4/locale-zh.m4.
113056         * doc/posix-functions/mbsrtowcs.texi: Document the bug.
113058 2008-12-21  Bruno Haible  <bruno@clisp.org>
113060         * tests/test-mbsrtowcs.c (main): Execute the loop also for unlimited=1.
113062 2008-12-21  Bruno Haible  <bruno@clisp.org>
113064         Update doc for AIX.
113065         * doc/pastposix-functions/wcswcs.texi: Mention that AIX has only a
113066         16-bit wchar_t type.
113067         * doc/posix-functions/btowc.texi: Likewise.
113068         * doc/posix-functions/fgetwc.texi: Likewise.
113069         * doc/posix-functions/fgetws.texi: Likewise.
113070         * doc/posix-functions/fputwc.texi: Likewise.
113071         * doc/posix-functions/fputws.texi: Likewise.
113072         * doc/posix-functions/fwide.texi: Likewise.
113073         * doc/posix-functions/fwprintf.texi: Likewise.
113074         * doc/posix-functions/fwscanf.texi: Likewise.
113075         * doc/posix-functions/getwchar.texi: Likewise.
113076         * doc/posix-functions/getwc.texi: Likewise.
113077         * doc/posix-functions/iswalnum.texi: Likewise.
113078         * doc/posix-functions/iswalpha.texi: Likewise.
113079         * doc/posix-functions/iswblank.texi: Likewise.
113080         * doc/posix-functions/iswcntrl.texi: Likewise.
113081         * doc/posix-functions/iswctype.texi: Likewise.
113082         * doc/posix-functions/iswdigit.texi: Likewise.
113083         * doc/posix-functions/iswgraph.texi: Likewise.
113084         * doc/posix-functions/iswlower.texi: Likewise.
113085         * doc/posix-functions/iswprint.texi: Likewise.
113086         * doc/posix-functions/iswpunct.texi: Likewise.
113087         * doc/posix-functions/iswspace.texi: Likewise.
113088         * doc/posix-functions/iswupper.texi: Likewise.
113089         * doc/posix-functions/iswxdigit.texi: Likewise.
113090         * doc/posix-functions/mbrtowc.texi: Likewise.
113091         * doc/posix-functions/mbsrtowcs.texi: Likewise.
113092         * doc/posix-functions/mbstowcs.texi: Likewise.
113093         * doc/posix-functions/mbtowc.texi: Likewise.
113094         * doc/posix-functions/putwchar.texi: Likewise.
113095         * doc/posix-functions/putwc.texi: Likewise.
113096         * doc/posix-functions/swprintf.texi: Likewise.
113097         * doc/posix-functions/tolower.texi: Likewise.
113098         * doc/posix-functions/toupper.texi: Likewise.
113099         * doc/posix-functions/towctrans.texi: Likewise.
113100         * doc/posix-functions/ungetwc.texi: Likewise.
113101         * doc/posix-functions/vswprintf.texi: Likewise.
113102         * doc/posix-functions/wcrtomb.texi: Likewise.
113103         * doc/posix-functions/wcscat.texi: Likewise.
113104         * doc/posix-functions/wcschr.texi: Likewise.
113105         * doc/posix-functions/wcscmp.texi: Likewise.
113106         * doc/posix-functions/wcscoll.texi: Likewise.
113107         * doc/posix-functions/wcscpy.texi: Likewise.
113108         * doc/posix-functions/wcscspn.texi: Likewise.
113109         * doc/posix-functions/wcsftime.texi: Likewise.
113110         * doc/posix-functions/wcslen.texi: Likewise.
113111         * doc/posix-functions/wcsncat.texi: Likewise.
113112         * doc/posix-functions/wcsncmp.texi: Likewise.
113113         * doc/posix-functions/wcsncpy.texi: Likewise.
113114         * doc/posix-functions/wcspbrk.texi: Likewise.
113115         * doc/posix-functions/wcsrchr.texi: Likewise.
113116         * doc/posix-functions/wcsrtombs.texi: Likewise.
113117         * doc/posix-functions/wcsspn.texi: Likewise.
113118         * doc/posix-functions/wcsstr.texi: Likewise.
113119         * doc/posix-functions/wcstod.texi: Likewise.
113120         * doc/posix-functions/wcstof.texi: Likewise.
113121         * doc/posix-functions/wcstoimax.texi: Likewise.
113122         * doc/posix-functions/wcstok.texi: Likewise.
113123         * doc/posix-functions/wcstold.texi: Likewise.
113124         * doc/posix-functions/wcstoll.texi: Likewise.
113125         * doc/posix-functions/wcstol.texi: Likewise.
113126         * doc/posix-functions/wcstombs.texi: Likewise.
113127         * doc/posix-functions/wcstoull.texi: Likewise.
113128         * doc/posix-functions/wcstoul.texi: Likewise.
113129         * doc/posix-functions/wcstoumax.texi: Likewise.
113130         * doc/posix-functions/wcswidth.texi: Likewise.
113131         * doc/posix-functions/wcsxfrm.texi: Likewise.
113132         * doc/posix-functions/wctob.texi: Likewise.
113133         * doc/posix-functions/wctomb.texi: Likewise.
113134         * doc/posix-functions/wctrans.texi: Likewise.
113135         * doc/posix-functions/wctype.texi: Likewise.
113136         * doc/posix-functions/wcwidth.texi: Likewise.
113137         * doc/posix-functions/wmemchr.texi: Likewise.
113138         * doc/posix-functions/wmemcmp.texi: Likewise.
113139         * doc/posix-functions/wmemcpy.texi: Likewise.
113140         * doc/posix-functions/wmemmove.texi: Likewise.
113141         * doc/posix-functions/wmemset.texi: Likewise.
113142         * doc/posix-functions/wprintf.texi: Likewise.
113143         * doc/posix-functions/wscanf.texi: Likewise.
113145 2008-12-21  Bruno Haible  <bruno@clisp.org>
113147         Update doc for HP-UX 11.11.
113148         * doc/posix-functions/btowc.texi: Clarify that the function is missing
113149         in HP-UX version 11.00, not in all versions of HP-UX 11.
113150         * doc/posix-functions/fwide.texi: Likewise.
113151         * doc/posix-functions/fwprintf.texi: Likewise.
113152         * doc/posix-functions/fwscanf.texi: Likewise.
113153         * doc/posix-functions/inet_ntop.texi: Likewise.
113154         * doc/posix-functions/inet_pton.texi: Likewise.
113155         * doc/posix-functions/mbrlen.texi: Likewise.
113156         * doc/posix-functions/mbrtowc.texi: Likewise.
113157         * doc/posix-functions/mbsinit.texi: Likewise.
113158         * doc/posix-functions/mbsrtowcs.texi: Likewise.
113159         * doc/posix-functions/swprintf.texi: Likewise.
113160         * doc/posix-functions/swscanf.texi: Likewise.
113161         * doc/posix-functions/towctrans.texi: Likewise.
113162         * doc/posix-functions/vfwprintf.texi: Likewise.
113163         * doc/posix-functions/vswprintf.texi: Likewise.
113164         * doc/posix-functions/vwprintf.texi: Likewise.
113165         * doc/posix-functions/wcrtomb.texi: Likewise.
113166         * doc/posix-functions/wcsrtombs.texi: Likewise.
113167         * doc/posix-functions/wcsstr.texi: Likewise.
113168         * doc/posix-functions/wctob.texi: Likewise.
113169         * doc/posix-functions/wctrans.texi: Likewise.
113170         * doc/posix-functions/wmemchr.texi: Likewise.
113171         * doc/posix-functions/wmemcmp.texi: Likewise.
113172         * doc/posix-functions/wmemcpy.texi: Likewise.
113173         * doc/posix-functions/wmemmove.texi: Likewise.
113174         * doc/posix-functions/wmemset.texi: Likewise.
113175         * doc/posix-functions/wprintf.texi: Likewise.
113176         * doc/posix-functions/wscanf.texi: Likewise.
113178 2008-12-21  Bruno Haible  <bruno@clisp.org>
113180         Work around a portability problem.
113181         * tests/test-mbsrtowcs.c (main): Use a temporary conversion state.
113182         * doc/posix-functions/mbsrtowcs.texi: Document the portability problem.
113184 2008-12-20  Bruno Haible  <bruno@clisp.org>
113186         * lib/wchar.in.h (mbsrtowcs): Redefine if REPLACE_MBSRTOWCS is set.
113187         * m4/mbsrtowcs.m4 (gl_FUNC_MBSRTOWCS): Invoke gl_MBSTATE_T_BROKEN. Set
113188         REPLACE_MBSRTOWCS if mbsrtowcs needs to be overridden.
113189         * m4/wchar.m4 (gl_WCHAR_H_DEFAULTS): Initialize REPLACE_MBSRTOWCS.
113190         * modules/wchar (Makefile.am): Substitute REPLACE_MBSRTOWCS.
113192         Work around mbrtowc bugs on AIX, HP-UX, OSF/1, Solaris.
113193         * lib/wchar.in.h (mbstate_t): Redefine also if REPLACE_MBSTATE_T is
113194         set.
113195         (GNULIB_defined_mbstate_t): New macro.
113196         (mbsinit): Redefine if REPLACE_MBSINIT is set.
113197         (mbrtowc): Redefine if REPLACE_MBRTOWC is set.
113198         * lib/mbrtowc.c (rpl_mbrtowc): Add an alternative implementation that
113199         reuses the system's mbrtowc function but works around the bugs.
113200         * m4/mbrtowc.m4 (gl_MBSTATE_T_BROKEN, gl_MBRTOWC_INCOMPLETE_STATE,
113201         gl_MBRTOWC_NULL_ARG, gl_MBRTOWC_RETVAL, gl_MBRTOWC_NUL_RETVAL): New
113202         macros.
113203         (gl_FUNC_MBRTOWC): Invoke them. Set REPLACE_MBRTOWC if mbrtowc needs to
113204         be overridden. Optionally define MBRTOWC_NULL_ARG_BUG,
113205         MBRTOWC_RETVAL_BUG, MBRTOWC_NUL_RETVAL_BUG.
113206         * m4/mbsinit.m4 (gl_FUNC_MBSINIT): Invoke gl_MBSTATE_T_BROKEN. Set
113207         REPLACE_MBSINIT if mbsinit needs to be overridden.
113208         * m4/wchar.m4 (gl_WCHAR_H_DEFAULTS): Initialize REPLACE_MBSTATE_T,
113209         REPLACE_MBSINIT, REPLACE_MBRTOWC.
113210         * modules/wchar (Makefile.am): Substitute REPLACE_MBSTATE_T,
113211         REPLACE_MBSINIT, REPLACE_MBRTOWC.
113212         * modules/mbrtowc (Files): Add m4/locale-fr.m4, m4/locale-ja.m4,
113213         m4/locale-zh.m4.
113214         (Depends): Add mbsinit.
113215         * modules/mbsinit (Depends): Add mbrtowc.
113216         * doc/posix-functions/mbrtowc.texi: Mention the various bugs.
113218 2008-12-20  Bruno Haible  <bruno@clisp.org>
113220         * tests/test-mbrtowc.c (main): Change sample string in EUC-JP encoding
113221         so that there are no conversion errors on AIX.
113222         * tests/test-mbsrtowcs.c (main): LIkewise.
113224 2008-12-20  Bruno Haible  <bruno@clisp.org>
113226         Work around wctob bug on Solaris <= 9.
113227         * lib/wchar.in.h (wctob): Redefine if REPLACE_WCTOB is set.
113228         * m4/wctob.m4 (gl_FUNC_WCTOB): Test whether wctob works.
113229         * m4/wchar.m4 (gl_WCHAR_H_DEFAULTS): Initialize REPLACE_WCTOB.
113230         * modules/wchar (Makefile.am): Substitute REPLACE_WCTOB.
113231         * modules/wctob (Files): Add m4/locale-fr.m4.
113232         * doc/posix-functions/wctob.texi: Mention the Solaris bug.
113234 2008-12-20  Bruno Haible  <bruno@clisp.org>
113236         * doc/posix-functions/select.texi: Mention Solaris 2.6 bug with
113237         /dev/null.
113238         * tests/test-select-in.sh: Likewise.
113239         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
113241 2008-12-20  Bruno Haible  <bruno@clisp.org>
113243         Don't pretend that Cygwin has a ja_JP.EUC-JP locale.
113244         * m4/locale-ja.m4 (gt_LOCALE_JA): Add test for MB_CUR_MAX. Needed on
113245         Cygwin 1.5.x.
113247 2008-12-20  Bruno Haible  <bruno@clisp.org>
113249         Ensure mbstate_t is defined on HP-UX 11.11.
113250         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Require
113251         AC_CANONICAL_HOST. On HP-UX, define _XOPEN_SOURCE to 500.
113252         * m4/mbstate_t.m4 (AC_TYPE_MBSTATE_T): Require
113253         AC_USE_SYSTEM_EXTENSIONS.
113254         * modules/fnmatch (Depends-on): Add extensions.
113255         * modules/mbrlen (Depends-on): Likewise.
113256         * modules/mbrtowc (Depends-on): Likewise.
113257         * modules/mbsinit (Depends-on): Likewise.
113258         * modules/mbsrtowcs (Depends-on): Likewise.
113259         * modules/mbswidth (Depends-on): Likewise.
113260         * modules/quotearg (Depends-on): Likewise.
113261         * modules/strftime (Depends-on): Likewise.
113263 2008-12-20  Bruno Haible  <bruno@clisp.org>
113265         Ensure wctob is declared on IRIX 6.5.
113266         * lib/wchar.in.h (wctob): Declare also when HAVE_DECL_WCTOB is 0.
113267         * m4/wctob.m4 (gl_FUNC_WCTOB): Set HAVE_DECL_WCTOB instead of
113268         HAVE_WCTOB. Also test whether <wchar.h> declares wctob.
113269         * m4/wchar.m4 (gl_WCHAR_H_DEFAULTS): Initialize HAVE_DECL_WCTOB instead
113270         of HAVE_WCTOB.
113271         * modules/wchar (Makefile.am): Substitute HAVE_DECL_WCTOB instead of
113272         HAVE_WCTOB.
113273         * doc/posix-functions/wctob.texi: Mention missing declaration on IRIX.
113275 2008-12-19  Bruno Haible  <bruno@clisp.org>
113277         * modules/mbsrtowcs-tests: New file.
113278         * tests/test-mbsrtowcs1.sh: New file.
113279         * tests/test-mbsrtowcs2.sh: New file.
113280         * tests/test-mbsrtowcs3.sh: New file.
113281         * tests/test-mbsrtowcs4.sh: New file.
113282         * tests/test-mbsrtowcs.c: New file.
113284         New module 'mbsrtowcs'.
113285         * lib/wchar.in.h (mbsrtowcs): New declaration.
113286         * lib/mbsrtowcs.c: New file.
113287         * m4/mbsrtowcs.m4: New file.
113288         * modules/mbsrtowcs: New file.
113289         * m4/wchar.m4 (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_MBSRTOWCS and
113290         HAVE_MBSRTOWCS.
113291         * modules/wchar (Makefile.am): Substitute GNULIB_MBSRTOWCS and
113292         HAVE_MBSRTOWCS.
113293         * doc/posix-functions/mbsrtowcs.texi: Document the new module.
113295 2008-12-19  Bruno Haible  <bruno@clisp.org>
113297         New module 'mbrlen'.
113298         * lib/wchar.in.h (mbrlen): New declaration.
113299         * lib/mbrlen.c: New file.
113300         * m4/mbrlen.m4: New file.
113301         * modules/mbrlen: New file.
113302         * m4/wchar.m4 (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_MBRLEN and
113303         HAVE_MBRLEN.
113304         * modules/wchar (Makefile.am): Substitute GNULIB_MBRLEN and
113305         HAVE_MBRLEN.
113306         * doc/posix-functions/mbrlen.texi: Document the new module.
113308 2008-12-19  Bruno Haible  <bruno@clisp.org>
113310         * lib/mbrtowc.c: Include verify.h. Verify an assumption.
113311         * modules/mbrtowc (Depends-on): Add verify.
113312         Suggested by Paul Eggert.
113314 2008-12-18  Bruno Haible  <bruno@clisp.org>
113316         * modules/mbsinit-tests: New file.
113317         * tests/test-mbsinit.sh: New file.
113318         * tests/test-mbsinit.c: New file.
113320 2008-12-18  Bruno Haible  <bruno@clisp.org>
113322         * modules/mbrtowc-tests: New file.
113323         * tests/test-mbrtowc1.sh: New file.
113324         * tests/test-mbrtowc2.sh: New file.
113325         * tests/test-mbrtowc3.sh: New file.
113326         * tests/test-mbrtowc4.sh: New file.
113327         * tests/test-mbrtowc.c: New file.
113329         New module 'mbrtowc'.
113330         * lib/wchar.in.h (mbstate_t): Override when the system does not have
113331         mbsinit and mbrtowc.
113332         (mbrtowc): New declaration.
113333         * lib/mbrtowc.c: New file.
113334         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC, gl_PREREQ_MBRTOWC): New macros.
113335         * modules/mbrtowc: New file.
113336         * m4/wchar.m4 (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_MBRTOWC and
113337         HAVE_MBRTOWC.
113338         * modules/wchar (Makefile.am): Substitute GNULIB_MBRTOWC and
113339         HAVE_MBRTOWC.
113340         * doc/posix-functions/mbrtowc.texi: Document the new module.
113342 2008-12-18  Bruno Haible  <bruno@clisp.org>
113344         New module 'wctob'.
113345         * lib/wchar.in.h (wctob): New declaration.
113346         * lib/wctob.c: New file.
113347         * m4/wctob.m4: New file.
113348         * modules/wctob: New file.
113349         * m4/wchar.m4 (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCTOB and
113350         HAVE_WCTOB.
113351         * modules/wchar (Makefile.am): Substitute GNULIB_WCTOB and HAVE_WCTOB.
113352         * doc/posix-functions/wctob.texi: Document the new module.
113354 2008-12-18  Bruno Haible  <bruno@clisp.org>
113356         * m4/mbsinit.m4 (gl_FUNC_MBSINIT): Invoke gl_REPLACE_WCHAR_H.
113357         * m4/btowc.m4 (gl_FUNC_BTOWC): Likewise.
113359 2008-12-18  Simon Josefsson  <simon@josefsson.org>
113361         * lib/flock.c: Use proper #if symbol in check.  Reported by "Tom
113362         G. Christensen" <tgc@jupiterrise.com>.
113364         * lib/flock.c: Need to include errno.h.  Reported by "Tom
113365         G. Christensen" <tgc@jupiterrise.com>.
113367         * lib/flock.c: Need to include string.h.  Reported by "Tom
113368         G. Christensen" <tgc@jupiterrise.com> and Eric Blake
113369         <ebb9@byu.net>.
113371 2008-12-18  Bruno Haible  <bruno@clisp.org>
113373         * m4/locale-ja.m4: New file, from GNU gettext.
113375 2008-12-17  Bruno Haible  <bruno@clisp.org>
113377         * m4/mbrtowc.m4 (AC_FUNC_MBRTOWC): Don't override in autoconf >= 2.60.
113378         Suggested by Eric Blake.
113380 2008-12-17  Bruno Haible  <bruno@clisp.org>
113382         * m4/errno_h.m4 (AC_COMPUTE_INT): Provide fallback definition.
113384 2008-12-17  Bruno Haible  <bruno@clisp.org>
113386         * lib/mbsinit.c: Include verify.h. Verify an assumption.
113387         * modules/mbsinit (Depends-on): Add verify.
113388         Suggested by Paul Eggert.
113390 2008-12-17  Bruno Haible  <bruno@clisp.org>
113392         * m4/mbrtowc.m4 (AC_FUNC_MBRTOWC): Renamed from gl_FUNC_MBRTOWC.
113393         * m4/mbfile.m4 (gl_MBFILE): Use AC_FUNC_MBRTOWC instead of
113394         gl_FUNC_MBRTOWC.
113395         * m4/mbiter.m4 (gl_MBITER): LIkewise.
113396         * m4/mbscasecmp.m4 (gl_PREREQ_MBSCASECMP): Likewise.
113397         * m4/mbscasestr.m4 (gl_PREREQ_MBSCASESTR): Likewise.
113398         * m4/mbschr.m4 (gl_PREREQ_MBSCHR): Likewise.
113399         * m4/mbscspn.m4 (gl_PREREQ_MBSCSPN): Likewise.
113400         * m4/mbslen.m4 (gl_PREREQ_MBSLEN): Likewise.
113401         * m4/mbsncasecmp.m4 (gl_PREREQ_MBSNCASECMP): Likewise.
113402         * m4/mbsnlen.m4 (gl_PREREQ_MBSNLEN): Likewise.
113403         * m4/mbspbrk.m4 (gl_PREREQ_MBSPBRK): Likewise.
113404         * m4/mbspcasecmp.m4 (gl_PREREQ_MBSPCASECMP): Likewise.
113405         * m4/mbsrchr.m4 (gl_PREREQ_MBSRCHR): Likewise.
113406         * m4/mbssep.m4 (gl_PREREQ_MBSSEP): Likewise.
113407         * m4/mbsspn.m4 (gl_PREREQ_MBSSPN): Likewise.
113408         * m4/mbsstr.m4 (gl_PREREQ_MBSSTR): Likewise.
113409         * m4/mbstok_r.m4 (gl_PREREQ_MBSTOK_R): Likewise.
113410         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
113411         * m4/quotearg.m4 (gl_QUOTEARG): Likewise.
113412         * modules/trim (configure.ac): Likewise.
113414 2008-12-17  Bruno Haible  <bruno@clisp.org>
113416         * modules/btowc-tests: New file.
113417         * tests/test-btowc1.sh: New file.
113418         * tests/test-btowc2.sh: New file.
113419         * tests/test-btowc.c: New file.
113421         New module 'btowc'.
113422         * lib/wchar.in.h (btowc): New declaration.
113423         * lib/btowc.c: New file.
113424         * m4/btowc.m4: New file.
113425         * modules/btowc: New file.
113426         * m4/wchar.m4 (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_BTOWC and
113427         HAVE_BTOWC.
113428         * modules/wchar (Makefile.am): Substitute GNULIB_BTOWC and HAVE_BTOWC.
113429         * doc/posix-functions/btowc.texi: Document the new module.
113431 2008-12-17  Bruno Haible  <bruno@clisp.org>
113433         New module 'mbsinit'.
113434         * lib/wchar.in.h (mbsinit): New declaration.
113435         * lib/mbsinit.c: New file.
113436         * m4/mbsinit.m4: New file.
113437         * modules/mbsinit: New file.
113438         * m4/wchar.m4 (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_MBSINIT and
113439         HAVE_MBSINIT.
113440         * modules/wchar (Makefile.am): Substitute GNULIB_MBSINIT and
113441         HAVE_MBSINIT.
113442         * doc/posix-functions/mbsinit.texi: Document the new module.
113444 2008-12-16  Bruno Haible  <bruno@clisp.org>
113446         * lib/unistd.in.h: Add comment.
113447         * tests/test-environ.c: Don't include <stdlib.h>.
113449 2008-12-16  Bruno Haible  <bruno@clisp.org>
113451         * lib/parse-duration.h (parse_duration): Document return value
113452         convention.
113453         * lib/parse-duration.c: Include specification header first. Add
113454         comments.
113455         (_): Remove macro.
113456         (parse_year_month_day, parse_hour_minute_second): Move side effects
113457         outside of strchr call.
113458         (parse_non_iso8601): Move side effects outside of isspace call.
113459         (parse_duration): Don't test errno is res != BAD_TIME. Remove fprintf
113460         call.
113462 2008-12-16  Bruno Haible  <bruno@clisp.org>
113464         * tests/test-parse-duration.sh: Produce no output when the test
113465         succeeds.
113467 2008-12-16  Bruno Haible  <bruno@clisp.org>
113469         * tests/test-parse-duration.sh: Fix quoting of $tmp and $tmpf
113470         expressions.
113472 2008-12-15  Bruno Haible  <bruno@clisp.org>
113474         * doc/glibc-functions/fgetxattr.texi: Tweak wording.
113475         * doc/glibc-functions/flistxattr.texi: Likewise.
113476         * doc/glibc-functions/fopencookie.texi: Likewise.
113477         * doc/glibc-functions/fremovexattr.texi: Likewise.
113478         * doc/glibc-functions/fsetxattr.texi: Likewise.
113479         * doc/glibc-functions/getxattr.texi: Likewise.
113480         * doc/glibc-functions/lgetxattr.texi: Likewise.
113481         * doc/glibc-functions/listxattr.texi: Likewise.
113482         * doc/glibc-functions/llistxattr.texi: Likewise.
113483         * doc/glibc-functions/lremovexattr.texi: Likewise.
113484         * doc/glibc-functions/lsetxattr.texi: Likewise.
113485         * doc/glibc-functions/removexattr.texi: Likewise.
113486         * doc/glibc-functions/setxattr.texi: Likewise.
113487         * doc/posix-functions/open_memstream.texi: Likewise.
113489 2008-12-15  Eric Blake  <ebb9@byu.net>
113491         Update doc for cygwin 1.7.
113492         * doc/posix-functions/faccessat.texi: Cygwin 1.7 added several new
113493         functions.
113494         * doc/posix-functions/fchmodat.texi: Likewise.
113495         * doc/posix-functions/fchownat.texi: Likewise.
113496         * doc/posix-functions/fdopendir.texi: Likewise.
113497         * doc/posix-functions/fmemopen.texi: Likewise.
113498         * doc/posix-functions/freeaddrinfo.texi: Likewise.
113499         * doc/posix-functions/fstatat.texi: Likewise.
113500         * doc/posix-functions/futimens.texi: Likewise.
113501         * doc/posix-functions/gai_strerror.texi: Likewise.
113502         * doc/posix-functions/getaddrinfo.texi: Likewise.
113503         * doc/posix-functions/getnameinfo.texi: Likewise.
113504         * doc/posix-functions/if_freenameindex.texi: Likewise.
113505         * doc/posix-functions/if_indextoname.texi: Likewise.
113506         * doc/posix-functions/if_nameindex.texi: Likewise.
113507         * doc/posix-functions/if_nametoindex.texi: Likewise.
113508         * doc/posix-functions/insque.texi: Likewise.
113509         * doc/posix-functions/linkat.texi: Likewise.
113510         * doc/posix-functions/llrint.texi: Likewise.
113511         * doc/posix-functions/llrintf.texi: Likewise.
113512         * doc/posix-functions/llrintl.texi: Likewise.
113513         * doc/posix-functions/lockf.texi: Likewise.
113514         * doc/posix-functions/lrintl.texi: Likewise.
113515         * doc/posix-functions/mkdirat.texi: Likewise.
113516         * doc/posix-functions/mkfifoat.texi: Likewise.
113517         * doc/posix-functions/mknodat.texi: Likewise.
113518         * doc/posix-functions/mq_close.texi: Likewise.
113519         * doc/posix-functions/mq_getattr.texi: Likewise.
113520         * doc/posix-functions/mq_notify.texi: Likewise.
113521         * doc/posix-functions/mq_open.texi: Likewise.
113522         * doc/posix-functions/mq_receive.texi: Likewise.
113523         * doc/posix-functions/mq_send.texi: Likewise.
113524         * doc/posix-functions/mq_setattr.texi: Likewise.
113525         * doc/posix-functions/mq_timedreceive.texi: Likewise.
113526         * doc/posix-functions/mq_timedsend.texi: Likewise.
113527         * doc/posix-functions/mq_unlink.texi: Likewise.
113528         * doc/posix-functions/open_memstream.texi: Likewise.
113529         * doc/posix-functions/openat.texi: Likewise.
113530         * doc/posix-functions/posix_fadvise.texi: Likewise.
113531         * doc/posix-functions/posix_fallocate.texi: Likewise.
113532         * doc/posix-functions/posix_madvise.texi: Likewise.
113533         * doc/posix-functions/posix_memalign.texi: Likewise.
113534         * doc/posix-functions/posix_openpt.texi: Likewise.
113535         * doc/posix-functions/readlinkat.texi: Likewise.
113536         * doc/posix-functions/remque.texi: Likewise.
113537         * doc/posix-functions/renameat.texi: Likewise.
113538         * doc/posix-functions/rintl.texi: Likewise.
113539         * doc/posix-functions/sem_unlink.texi: Likewise.
113540         * doc/posix-functions/shm_open.texi: Likewise.
113541         * doc/posix-functions/shm_unlink.texi: Likewise.
113542         * doc/posix-functions/signgam.texi: Likewise.
113543         * doc/posix-functions/sigset.texi: Likewise.
113544         * doc/posix-functions/stpcpy.texi: Likewise.
113545         * doc/posix-functions/stpncpy.texi: Likewise.
113546         * doc/posix-functions/strerror.texi: Likewise.
113547         * doc/posix-functions/strtod.texi: Likewise.
113548         * doc/posix-functions/symlinkat.texi: Likewise.
113549         * doc/posix-functions/unlinkat.texi: Likewise.
113550         * doc/posix-functions/utimensat.texi: Likewise.
113551         * doc/glibc-functions/bindresvport.texi: Likewise.
113552         * doc/glibc-functions/dn_expand.texi: Likewise.
113553         * doc/glibc-functions/exp10.texi: Likewise.
113554         * doc/glibc-functions/exp10f.texi: Likewise.
113555         * doc/glibc-functions/fgetxattr.texi: Likewise.
113556         * doc/glibc-functions/flistxattr.texi: Likewise.
113557         * doc/glibc-functions/fopencookie.texi: Likewise.
113558         * doc/glibc-functions/freeifaddrs.texi: Likewise.
113559         * doc/glibc-functions/fremovexattr.texi: Likewise.
113560         * doc/glibc-functions/fsetxattr.texi: Likewise.
113561         * doc/glibc-functions/getifaddrs.texi: Likewise.
113562         * doc/glibc-functions/getxattr.texi: Likewise.
113563         * doc/glibc-functions/lgetxattr.texi: Likewise.
113564         * doc/glibc-functions/listxattr.texi: Likewise.
113565         * doc/glibc-functions/llistxattr.texi: Likewise.
113566         * doc/glibc-functions/lremovexattr.texi: Likewise.
113567         * doc/glibc-functions/lsetxattr.texi: Likewise.
113568         * doc/glibc-functions/pow10.texi: Likewise.
113569         * doc/glibc-functions/pow10f.texi: Likewise.
113570         * doc/glibc-functions/rcmd_af.texi: Likewise.
113571         * doc/glibc-functions/removexattr.texi: Likewise.
113572         * doc/glibc-functions/res_init.texi: Likewise.
113573         * doc/glibc-functions/res_mkquery.texi: Likewise.
113574         * doc/glibc-functions/res_query.texi: Likewise.
113575         * doc/glibc-functions/res_querydomain.texi: Likewise.
113576         * doc/glibc-functions/res_send.texi: Likewise.
113577         * doc/glibc-functions/rresvport_af.texi: Likewise.
113578         * doc/glibc-functions/setxattr.texi: Likewise.
113579         * doc/glibc-functions/strcasestr.texi: Likewise.
113581 2008-12-15  Bruno Haible  <bruno@clisp.org>
113583         Fix compilation error on OSF/1 4.0.
113584         * lib/sys_select.in.h: When invoked from OSF/1 <sys/types.h> or
113585         <sys/time.h>, simply delegate to the system header.
113586         Reported by Daniel Richard G. <oss@teragram.com>.
113588 2008-12-15  Bruno Haible  <bruno@clisp.org>
113590         * doc/posix-functions/openat.texi: Mention the 'openat' module.
113591         * doc/posix-functions/fchmodat.texi: Likewise.
113592         * doc/posix-functions/fchownat.texi: Likewise.
113593         * doc/posix-functions/fdopendir.texi: Likewise.
113594         * doc/posix-functions/fstatat.texi: Likewise.
113595         * doc/posix-functions/mkdirat.texi: Likewise.
113596         * doc/posix-functions/unlinkat.texi: Likewise.
113598 2008-12-14  Bruno Haible  <bruno@clisp.org>
113600         Update doc for POSIX:2008.
113601         * doc/posix-functions/faccessat.texi: New file.
113602         * doc/posix-functions/fchmodat.texi: New file.
113603         * doc/posix-functions/fchownat.texi: New file.
113604         * doc/posix-functions/fdopendir.texi: New file.
113605         * doc/posix-functions/fstatat.texi: New file.
113606         * doc/posix-functions/futimens.texi: New file.
113607         * doc/posix-functions/linkat.texi: New file.
113608         * doc/posix-functions/mkdirat.texi: New file.
113609         * doc/posix-functions/mkfifoat.texi: New file.
113610         * doc/posix-functions/mknodat.texi: New file.
113611         * doc/posix-functions/open_wmemstream.texi: New file.
113612         * doc/posix-functions/openat.texi: New file.
113613         * doc/posix-functions/psiginfo.texi: New file.
113614         * doc/posix-functions/pthread_mutex_consistent.texi: New file.
113615         * doc/posix-functions/pthread_mutexattr_getrobust.texi: New file.
113616         * doc/posix-functions/pthread_mutexattr_setrobust.texi: New file.
113617         * doc/posix-functions/readlinkat.texi: New file.
113618         * doc/posix-functions/renameat.texi: New file.
113619         * doc/posix-functions/strerror_l.texi: New file.
113620         * doc/posix-functions/symlinkat.texi: New file.
113621         * doc/posix-functions/unlinkat.texi: New file.
113622         * doc/posix-functions/utimensat.texi: New file.
113623         * doc/gnulib.texi (Function Substitutes): Add these subsections.
113625 2008-12-14  Bruno Haible  <bruno@clisp.org>
113627         Update doc for POSIX:2008.
113628         * doc/posix-functions/alphasort.texi: Renamed from
113629         doc/glibc-functions/alphasort.texi.
113630         * doc/posix-functions/dirfd.texi: Renamed from
113631         doc/glibc-functions/dirfd.texi.
113632         * doc/posix-functions/dprintf.texi: Renamed from
113633         doc/glibc-functions/dprintf.texi.
113634         * doc/posix-functions/duplocale.texi: Renamed from
113635         doc/glibc-functions/duplocale.texi.
113636         * doc/posix-functions/fexecve.texi: Renamed from
113637         doc/glibc-functions/fexecve.texi.
113638         * doc/posix-functions/fmemopen.texi: Renamed from
113639         doc/glibc-functions/fmemopen.texi.
113640         * doc/posix-functions/freelocale.texi: Renamed from
113641         doc/glibc-functions/freelocale.texi.
113642         * doc/posix-functions/getdate_err.texi: Renamed from
113643         doc/glibc-functions/getdate_err.texi.
113644         * doc/posix-functions/isalnum_l.texi: Renamed from
113645         doc/glibc-functions/isalnum_l.texi.
113646         * doc/posix-functions/isalpha_l.texi: Renamed from
113647         doc/glibc-functions/isalpha_l.texi.
113648         * doc/posix-functions/isblank_l.texi: Renamed from
113649         doc/glibc-functions/isblank_l.texi.
113650         * doc/posix-functions/iscntrl_l.texi: Renamed from
113651         doc/glibc-functions/iscntrl_l.texi.
113652         * doc/posix-functions/isdigit_l.texi: Renamed from
113653         doc/glibc-functions/isdigit_l.texi.
113654         * doc/posix-functions/isgraph_l.texi: Renamed from
113655         doc/glibc-functions/isgraph_l.texi.
113656         * doc/posix-functions/islower_l.texi: Renamed from
113657         doc/glibc-functions/islower_l.texi.
113658         * doc/posix-functions/isprint_l.texi: Renamed from
113659         doc/glibc-functions/isprint_l.texi.
113660         * doc/posix-functions/ispunct_l.texi: Renamed from
113661         doc/glibc-functions/ispunct_l.texi.
113662         * doc/posix-functions/isspace_l.texi: Renamed from
113663         doc/glibc-functions/isspace_l.texi.
113664         * doc/posix-functions/isupper_l.texi: Renamed from
113665         doc/glibc-functions/isupper_l.texi.
113666         * doc/posix-functions/iswalnum_l.texi: Renamed from
113667         doc/glibc-functions/iswalnum_l.texi.
113668         * doc/posix-functions/iswalpha_l.texi: Renamed from
113669         doc/glibc-functions/iswalpha_l.texi.
113670         * doc/posix-functions/iswblank_l.texi: Renamed from
113671         doc/glibc-functions/iswblank_l.texi.
113672         * doc/posix-functions/iswcntrl_l.texi: Renamed from
113673         doc/glibc-functions/iswcntrl_l.texi.
113674         * doc/posix-functions/iswctype_l.texi: Renamed from
113675         doc/glibc-functions/iswctype_l.texi.
113676         * doc/posix-functions/iswdigit_l.texi: Renamed from
113677         doc/glibc-functions/iswdigit_l.texi.
113678         * doc/posix-functions/iswgraph_l.texi: Renamed from
113679         doc/glibc-functions/iswgraph_l.texi.
113680         * doc/posix-functions/iswlower_l.texi: Renamed from
113681         doc/glibc-functions/iswlower_l.texi.
113682         * doc/posix-functions/iswprint_l.texi: Renamed from
113683         doc/glibc-functions/iswprint_l.texi.
113684         * doc/posix-functions/iswpunct_l.texi: Renamed from
113685         doc/glibc-functions/iswpunct_l.texi.
113686         * doc/posix-functions/iswspace_l.texi: Renamed from
113687         doc/glibc-functions/iswspace_l.texi.
113688         * doc/posix-functions/iswupper_l.texi: Renamed from
113689         doc/glibc-functions/iswupper_l.texi.
113690         * doc/posix-functions/iswxdigit_l.texi: Renamed from
113691         doc/glibc-functions/iswxdigit_l.texi.
113692         * doc/posix-functions/isxdigit_l.texi: Renamed from
113693         doc/glibc-functions/isxdigit_l.texi.
113694         * doc/posix-functions/mbsnrtowcs.texi: Renamed from
113695         doc/glibc-functions/mbsnrtowcs.texi.
113696         * doc/posix-functions/mkdtemp.texi: Renamed from
113697         doc/glibc-functions/mkdtemp.texi.
113698         * doc/posix-functions/newlocale.texi: Renamed from
113699         doc/glibc-functions/newlocale.texi.
113700         * doc/posix-functions/nl_langinfo_l.texi: Renamed from
113701         doc/glibc-functions/nl_langinfo_l.texi.
113702         * doc/posix-functions/open_memstream.texi: Renamed from
113703         doc/glibc-functions/open_memstream.texi.
113704         * doc/posix-functions/opterr.texi: Renamed from
113705         doc/glibc-functions/opterr.texi.
113706         * doc/posix-functions/optind.texi: Renamed from
113707         doc/glibc-functions/optind.texi.
113708         * doc/posix-functions/optopt.texi: Renamed from
113709         doc/glibc-functions/optopt.texi.
113710         * doc/posix-functions/psignal.texi: Renamed from
113711         doc/glibc-functions/psignal.texi.
113712         * doc/posix-functions/scandir.texi: Renamed from
113713         doc/glibc-functions/scandir.texi.
113714         * doc/posix-functions/sched_get_priority_min.texi: Renamed from
113715         doc/glibc-functions/sched_get_priority_min.texi.
113716         * doc/posix-functions/signgam.texi: Renamed from
113717         doc/glibc-functions/signgam.texi.
113718         * doc/posix-functions/stpcpy.texi: Renamed from
113719         doc/glibc-functions/stpcpy.texi.
113720         * doc/posix-functions/stpncpy.texi: Renamed from
113721         doc/glibc-functions/stpncpy.texi.
113722         * doc/posix-functions/strcasecmp_l.texi: Renamed from
113723         doc/glibc-functions/strcasecmp_l.texi.
113724         * doc/posix-functions/strcoll_l.texi: Renamed from
113725         doc/glibc-functions/strcoll_l.texi.
113726         * doc/posix-functions/strfmon_l.texi: Renamed from
113727         doc/glibc-functions/strfmon_l.texi.
113728         * doc/posix-functions/strftime_l.texi: Renamed from
113729         doc/glibc-functions/strftime_l.texi.
113730         * doc/posix-functions/strncasecmp_l.texi: Renamed from
113731         doc/glibc-functions/strncasecmp_l.texi.
113732         * doc/posix-functions/strndup.texi: Renamed from
113733         doc/glibc-functions/strndup.texi.
113734         * doc/posix-functions/strnlen.texi: Renamed from
113735         doc/glibc-functions/strnlen.texi.
113736         * doc/posix-functions/strsignal.texi: Renamed from
113737         doc/glibc-functions/strsignal.texi.
113738         * doc/posix-functions/strxfrm_l.texi: Renamed from
113739         doc/glibc-functions/strxfrm_l.texi.
113740         * doc/posix-functions/timer_gettime.texi: Renamed from
113741         doc/glibc-functions/timer_gettime.texi.
113742         * doc/posix-functions/tolower_l.texi: Renamed from
113743         doc/glibc-functions/tolower_l.texi.
113744         * doc/posix-functions/toupper_l.texi: Renamed from
113745         doc/glibc-functions/toupper_l.texi.
113746         * doc/posix-functions/towctrans_l.texi: Renamed from
113747         doc/glibc-functions/towctrans_l.texi.
113748         * doc/posix-functions/towlower_l.texi: Renamed from
113749         doc/glibc-functions/towlower_l.texi.
113750         * doc/posix-functions/towupper_l.texi: Renamed from
113751         doc/glibc-functions/towupper_l.texi.
113752         * doc/posix-functions/uselocale.texi: Renamed from
113753         doc/glibc-functions/uselocale.texi.
113754         * doc/posix-functions/vdprintf.texi: Renamed from
113755         doc/glibc-functions/vdprintf.texi.
113756         * doc/posix-functions/wcpcpy.texi:
113757         Renamed from doc/glibc-functions/wcpcpy.texi.
113758         * doc/posix-functions/wcpncpy.texi: Renamed from
113759         doc/glibc-functions/wcpncpy.texi.
113760         * doc/posix-functions/wcscasecmp.texi: Renamed from
113761         doc/glibc-functions/wcscasecmp.texi.
113762         * doc/posix-functions/wcscasecmp_l.texi: Renamed from
113763         doc/glibc-functions/wcscasecmp_l.texi.
113764         * doc/posix-functions/wcscoll_l.texi: Renamed from
113765         doc/glibc-functions/wcscoll_l.texi.
113766         * doc/posix-functions/wcsdup.texi: Renamed from
113767         doc/glibc-functions/wcsdup.texi.
113768         * doc/posix-functions/wcsncasecmp.texi: Renamed from
113769         doc/glibc-functions/wcsncasecmp.texi.
113770         * doc/posix-functions/wcsncasecmp_l.texi: Renamed from
113771         doc/glibc-functions/wcsncasecmp_l.texi.
113772         * doc/posix-functions/wcsnlen.texi: Renamed from
113773         doc/glibc-functions/wcsnlen.texi.
113774         * doc/posix-functions/wcsnrtombs.texi: Renamed from
113775         doc/glibc-functions/wcsnrtombs.texi.
113776         * doc/posix-functions/wcsxfrm_l.texi: Renamed from
113777         doc/glibc-functions/wcsxfrm_l.texi.
113778         * doc/posix-functions/wctrans_l.texi: Renamed from
113779         doc/glibc-functions/wctrans_l.texi.
113780         * doc/posix-functions/wctype_l.texi: Renamed from
113781         doc/glibc-functions/wctype_l.texi.
113782         * doc/gnulib.texi (Function Substitutes): Add these subsections.
113783         (Glibc ctype.h, Glibc dirent.h, Glibc getopt.h, Glibc math.h,
113784         Glibc sched.h, Glibc signal.h, Glibc stdio.h, Glibc stdlib.h,
113785         Glibc string.h, Glibc time.h, Glibc unistd.h, Glibc wchar.h): Remove
113786         these subsections.
113787         (Glibc langinfo.h, Glibc locale.h, Glibc monetary.h, Glibc wctype.h):
113788         Remove sections.
113790 2008-12-14  Bruno Haible  <bruno@clisp.org>
113792         Update doc for POSIX:2008.
113793         * doc/posix-functions/*.texi: Update URL of POSIX specification.
113795 2008-12-14  Bruno Haible  <bruno@clisp.org>
113797         Update doc for POSIX:2008.
113798         * doc/pastposix-functions/bcmp.texi: Renamed from
113799         doc/posix-functions/bcmp.texi.
113800         * doc/pastposix-functions/bcopy.texi: Renamed from
113801         doc/posix-functions/bcopy.texi.
113802         * doc/pastposix-functions/bsd_signal.texi: Renamed from
113803         doc/posix-functions/bsd_signal.texi.
113804         * doc/pastposix-functions/bzero.texi: Renamed from
113805         doc/posix-functions/bzero.texi.
113806         * doc/pastposix-functions/ecvt.texi: Renamed from
113807         doc/posix-functions/ecvt.texi.
113808         * doc/pastposix-functions/fcvt.texi: Renamed from
113809         doc/posix-functions/fcvt.texi.
113810         * doc/pastposix-functions/ftime.texi: Renamed from
113811         doc/posix-functions/ftime.texi.
113812         * doc/pastposix-functions/gcvt.texi: Renamed from
113813         doc/posix-functions/gcvt.texi.
113814         * doc/pastposix-functions/getcontext.texi: Renamed from
113815         doc/posix-functions/getcontext.texi.
113816         * doc/pastposix-functions/gethostbyaddr.texi: Renamed from
113817         doc/posix-functions/gethostbyaddr.texi.
113818         * doc/pastposix-functions/gethostbyname.texi: Renamed from
113819         doc/posix-functions/gethostbyname.texi.
113820         * doc/pastposix-functions/getwd.texi: Renamed from
113821         doc/posix-functions/getwd.texi.
113822         * doc/pastposix-functions/h_errno.texi: Renamed from
113823         doc/posix-functions/h_errno.texi.
113824         * doc/pastposix-functions/index.texi: Renamed from
113825         doc/posix-functions/index.texi.
113826         * doc/pastposix-functions/makecontext.texi: Renamed from
113827         doc/posix-functions/makecontext.texi.
113828         * doc/pastposix-functions/mktemp.texi: Renamed from
113829         doc/posix-functions/mktemp.texi.
113830         * doc/pastposix-functions/pthread_attr_getstackaddr.texi: Renamed from
113831         doc/posix-functions/pthread_attr_getstackaddr.texi.
113832         * doc/pastposix-functions/pthread_attr_setstackaddr.texi: Renamed from
113833         doc/posix-functions/pthread_attr_setstackaddr.texi.
113834         * doc/pastposix-functions/rindex.texi: Renamed from
113835         doc/posix-functions/rindex.texi.
113836         * doc/pastposix-functions/scalb.texi: Renamed from
113837         doc/posix-functions/scalb.texi.
113838         * doc/pastposix-functions/setcontext.texi: Renamed from
113839         doc/posix-functions/setcontext.texi.
113840         * doc/pastposix-functions/swapcontext.texi: Renamed from
113841         doc/posix-functions/swapcontext.texi.
113842         * doc/pastposix-functions/ualarm.texi: Renamed from
113843         doc/posix-functions/ualarm.texi.
113844         * doc/pastposix-functions/usleep.texi: Renamed from
113845         doc/posix-functions/usleep.texi.
113846         * doc/pastposix-functions/vfork.texi: Renamed from
113847         doc/posix-functions/vfork.texi.
113848         * doc/pastposix-functions/wcswcs.texi: Renamed from
113849         doc/posix-functions/wcswcs.texi.
113850         * doc/gnulib.texi (Legacy Function Substitutes): New chapter.
113851         (Function Substitutes): Update.
113853 2008-12-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
113855         * modules/relocatable-prog-wrapper (Depends-on): Add errno, needed by
113856         m4/strerror.m4.
113858 2008-12-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
113859             Bruno Haible  <bruno@clisp.org>
113861         * modules/unilbrk/tables (Depends-on): Add unilbrk/base.
113863 2008-12-13  Bruno Haible  <bruno@clisp.org>
113865         * modules/strtoull (Depends-on): Remove unistd.
113867 2008-12-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
113869         * modules/strtoull (Depends-on): Add stdlib.
113871 2008-12-11  Simon Josefsson  <simon@josefsson.org>
113873         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Add more warnings.
113875 2008-12-10  Jim Meyering  <meyering@redhat.com>
113877         gl_ASSERT: don't say assertions are disabled when they're not
113878         * m4/assert.m4 (gl_ASSERT): Do not make configure report
113879         "checking whether to enable assertions... no", when they are in
113880         fact enabled.  This is solely a bug in the output of configure.
113881         In spite of saying "no", NDEBUG was not defined in that case.
113882         Also, as noted by Eric Blake, leave assertions enabled upon
113883         --enable-assert=INVALID.
113885 2008-12-10  Bruno Haible  <bruno@clisp.org>
113887         Change MODULES.html to refer to POSIX:2008 where possible.
113888         * MODULES.html.sh (POSIX2008_URL): New variable.
113889         (posix_headers): Remove sys/timeb, ucontext.
113890         (posix2001_headers): New variable.
113891         (posix_functions): Remove bcmp, bcopy, bsd_signal, bzero, ecvt, fcvt,
113892         ftime, gcvt, getcontext, gethostbyaddr, gethostbyname, getwd, h_errno,
113893         index, makecontext, mktemp, pthread_attr_getstackaddr,
113894         pthread_attr_setstackaddr, rindex, scalb, setcontext, swapcontext,
113895         ualarm, usleep, vfork, wcswcs. Add the new POSIX:2008 functions.
113896         (posix2001_functions): New variable.
113897         (func_module): Use URLs to POSIX:2008 where possible and to POSIX:2001
113898         otherwise.
113900 2008-12-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
113902         add missing include to parse-duration.c
113903         * lib/parse-duration.c: #include "xalloc.h", for xstrdup.
113904         * modules/parse-duration (Depends-on): Add xalloc.
113906         fix sed script reading maint.mk
113907         * top/maint.mk (MYSELF): New macro, define as $(srcdir)/$(ME).
113908         (syntax-check-rules): Use it.
113910 2008-12-09  Bruno Haible  <bruno@clisp.org>
113912         * m4/ldexpl.m4 (gl_FUNC_LDEXPL_WORKS): Add another check, that fails on
113913         MacOS X 10.4/PowerPC.
113914         Reported by Simon Josefsson.
113916 2008-12-08  Jim Meyering  <meyering@redhat.com>
113918         work around mingw's lack of some S_IF definitions
113919         * lib/fts.c (S_IFLNK, S_IFSOCK): Define if not already defined.
113920         Reported by Simon Josefsson.
113922 2008-12-08  Bruno Haible  <bruno@clisp.org>
113924         * m4/signbitl.m4 (gl_SIGNBIT_TEST_PROGRAM): Add a link check of signbit
113925         applied to variables. Needed on MacOS X 10.4/PowerPC.
113926         Reported by Simon Josefsson.
113928 2008-12-08  William Pursell  <bill.pursell@gmail.com>  (tiny change)
113929         and Eric Blake  <ebb9@byu.net>
113931         assert: honor --enable-assert
113932         * m4/assert.m4 (gl_ASSERT): Synchronize with autoconf 2.64, in
113933         order to honor --enable-assert, rather than treating it as a
113934         synonym for --disable-assert.
113936 2008-12-08  Jim Meyering  <meyering@redhat.com>
113938         * lib/posixtm.c: Remove now-useless declaration of mktime.
113940         * build-aux/announce-gen (get_tool_versions): Accept .xz tarballs.
113942 2008-12-07  Bruno Haible  <bruno@clisp.org>
113944         * tests/test-lock.c (test_lock, test_rwlock, test_recursive_lock,
113945         test_once): Mark functions as static.
113946         * tests/test-tls.c (test_tls): Likewise.
113948 2008-12-07  Bruno Haible  <bruno@clisp.org>
113950         * lib/striconveha.h (uniconv_register_autodetect): Renamed from
113951         iconv_register_autodetect.
113953 2008-12-07  Jim Meyering  <meyering@redhat.com>
113955         posixtm.c: avoid a warning
113956         * lib/posixtm.c (posixtime): Don't initialize tm0.
113957         It's no longer needed to placate gcc4's -Wuninitialized,
113958         and the attempt to placate would elicit a new warning.
113960         unicodeio.c: mark unused parameters
113961         * lib/unicodeio.c (exit_failure_callback): Mark unused parameter.
113962         (fallback_failure_callback): Likewise.
113964 2008-12-07  Bruno Haible  <bruno@clisp.org>
113966         * gnulib-tool (func_create_testdir): When building the tests
113967         subdirectory, ignore the modules gnumakefile and maintainer-makefile.
113968         Reported by Simon Josefsson.
113970 2008-12-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
113972         * doc/manywarnings.texi, doc/gnulib-intro.texi: Fix typos.
113974 2008-12-06  Bruno Haible  <bruno@clisp.org>
113976         * lib/c-stack.h (c_stack_action): Clarify possible side effects.
113977         Suggested by Eric Blake.
113979 2008-12-06  Bruno Haible  <bruno@clisp.org>
113981         Fix a c-stack test failure on MacOS X.
113982         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Require
113983         AC_CANONICAL_HOST. Define FAULT_YIELDS_SIGBUS. If set, install a signal
113984         handler for SIGBUS as well.
113985         * lib/c-stack.c (c_stack_action): If FAULT_YIELDS_SIGBUS is set,
113986         install a signal handler for SIGBUS as well.
113987         Reported by Bruce Dugan <bld0401@gmail.com> via Eric Blake.
113989 2008-12-06  Bruno Haible  <bruno@clisp.org>
113991         Advocacy documentation.
113992         * doc/gnulib-intro.texi (Benefits): New section.
113993         * doc/gnulib.texi: Update.
113995 2008-12-06  Bruno Haible  <bruno@clisp.org>
113997         Document the 'manywarnings' module.
113998         * doc/manywarnings.texi: New file.
113999         * doc/gnulib.texi: Include it.
114001 2008-12-05  Eric Blake  <ebb9@byu.net>
114003         tests: silence some gcc warnings
114004         * tests/test-getdate.c (LOG) [!DEBUG]: Mark no-op void.
114005         * tests/uniwidth/test-uc_width2.c (finish_interval): Avoid printf
114006         type mismatches.
114008 2008-12-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
114009             Bruno Haible  <bruno@clisp.org>
114011         * m4/openmp.m4 (AC_OPENMP): Do not define with Autoconf 2.62 or newer.
114013 2008-11-29  Jim Meyering  <meyering@redhat.com>
114015         unicodeio.c: mark unused parameters
114016         * lib/unicodeio.c (exit_failure_callback): Mark unused parameter.
114017         (fallback_failure_callback): Likewise.
114019         fts: fix a thinko
114020         * lib/fts.c (s_ifmt_shift_bits): Remove function.  Not needed after all.
114021         (set_stat_type): Return S_IF*-valued "type" directly.
114022         Prompted by James Youngman's spotting a related bug.
114023         Confirmed by further testing through find.
114025         fts: provide dirent.d_type via FTSENT.fts_statp, when possible
114026         * lib/fts.c (D_TYPE): Define.
114027         (DT_UNKNOWN, DT_BLK, DT_CHR) [HAVE_STRUCT_DIRENT_D_TYPE]: Define.
114028         (DT_DIR, DT_FIFO, DT_LNK, DT_REG, DT_SOCK): Likewise.
114029         (s_ifmt_shift_bits): New function.
114030         (set_stat_type): New function.
114031         (fts_build): When not calling fts_stat, call set_stat_type
114032         to propagate dirent.d_type info to fts_read caller.
114033         * lib/fts_.h (FTSENT) [FTS_DEFER_STAT]: Mention that
114034         fts_statp->st_mode type information may be valid.
114036 2008-11-28  Simon Josefsson  <simon@josefsson.org>
114038         * lib/sys_time.in.h: Add extern "C" block for C++.  Suggested by
114039         Brian Dessent <brian@dessent.net>.  Reported by Sam Steingold
114040         <sds@gnu.org>.
114042 2008-11-20  Bruno Haible  <bruno@clisp.org>
114044         Attempt to work around an AIX 5.3, 6.1 compiler bug with include_next.
114045         * lib/math.in.h: Use INCLUDE_NEXT_AS_FIRST_DIRECTIVE instead of
114046         INCLUDE_NEXT.
114047         * m4/include_next.m4 (gl_INCLUDE_NEXT): Set also
114048         INCLUDE_NEXT_AS_FIRST_DIRECTIVE.
114049         * modules/math (Makefile.am): Substitute
114050         INCLUDE_NEXT_AS_FIRST_DIRECTIVE instead of INCLUDE_NEXT.
114051         Reported by Albert Chin <bug-gnulib@mlists.thewrittenword.com>.
114053 2008-11-18  Alexandre Duret-Lutz  <adl@lrde.epita.fr>
114054             Bruno Haible  <bruno@clisp.org>
114056         * lib/stdint.in.h: Define all type macros so that their expansion is
114057         a single typedef'ed token. Fixes a compilation failure in Boost which
114058         does "using ::int8_t;".
114060 2008-11-18  Simon Josefsson  <simon@josefsson.org>
114062         * m4/manywarnings.m4: New file with gl_MANYWARN_COMPLEMENT and
114063         gl_MANYWARN_ALL_GCC.
114064         * m4/warnings.m4: Removed gl_WARN_SUPPORTED and
114065         gl_WARN_COMPLEMENT.  Suggested by Bruno Haible <bruno@clisp.org>.
114066         * modules/manywarnings: New file.
114067         * MODULES.html.sh: Mention manywarnings module.
114069 2008-11-18  Bruno Haible  <bruno@clisp.org>
114071         * doc/gnulib-tool.texi (Unit tests): New section.
114073 2008-11-18  Simon Josefsson  <simon@josefsson.org>
114075         * top/maint.mk (refresh-po): Fix sed regexp to avoid problems with
114076         paths like 'lib/po/foo.po'.
114078 2008-11-17  Simon Josefsson  <simon@josefsson.org>
114080         * m4/warnings.m4: Improve code.  Reported by Ralf Wildenhues
114081         <Ralf.Wildenhues@gmx.de> and Paolo Bonzini <bonzini@gnu.org>.
114083 2008-11-17  Simon Josefsson  <simon@josefsson.org>
114085         * m4/warnings.m4: Use CPPFLAGS to really check whether the
114086         parameter works.
114088 2008-11-17  Simon Josefsson  <simon@josefsson.org>
114090         * m4/warnings.m4: Add gl_WARN_COMPLEMENT and gl_WARN_SUPPORTED.
114092 2008-11-17  Bruce Korb  <bkorb@gnu.org>
114094         * modules/parse-duration-tests: New file.
114095         * tests/test-parse-duration.sh: New file.
114096         * tests/test-parse-duration.c: New file.
114098         New module 'parse-duration'.
114099         * lib/parse-duration.h: New file.
114100         * lib/parse-duration.c: New file.
114101         * modules/parse-duration: New file.
114103 2008-11-17  Bruno Haible  <bruno@clisp.org>
114105         * tests/test-select-out.sh: Comment out the first pipe test.
114106         Reported by Simon Josefsson.
114108 2008-11-17  Bruno Haible  <bruno@clisp.org>
114110         * modules/getaddrinfo (Depends-on): Add servent, hostent.
114111         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Use gl_SERVENT and
114112         gl_HOSTENT.
114114 2008-11-17  Bruno Haible  <bruno@clisp.org>
114116         * m4/sockets.m4 (gl_SOCKETS): After trying -lsocket, try also
114117         -lnetwork and -lnet. Needed for Haiku and BeOS.
114119 2008-11-16  Bruno Haible  <bruno@clisp.org>
114121         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Fix indentation.
114123 2008-11-16  Bruno Haible  <bruno@clisp.org>
114125         Avoid test failure on Haiku.
114126         * tests/test-fsync.c: Include <errno.h>.
114127         (main): Don't require that fsync (0) fails.
114129 2008-11-15  Bruno Haible  <bruno@clisp.org>
114131         New module 'hostent'.
114132         * modules/hostent: New file.
114133         * m4/hostent.m4: New file, based on code in m4/getaddrinfo.m4.
114135 2008-11-15  Bruno Haible  <bruno@clisp.org>
114137         New module 'servent'.
114138         * modules/servent: New file.
114139         * m4/servent.m4: New file, based on code in m4/getaddrinfo.m4.
114141 2008-11-15  Bruno Haible  <bruno@clisp.org>
114143         Avoid generating same test program with two different rules.
114144         * modules/frexp-nolibm-tests (Makefile.am): Rename test program from
114145         test-frexp to test-frexp-nolibm.
114146         * modules/frexpl-nolibm-tests (Makefile.am): Rename test program from
114147         test-frexpl to test-frexpl-nolibm.
114149 2008-11-15  Bruno Haible  <bruno@clisp.org>
114151         * modules/frexpl-tests (Makefile.am): Link test-frexpl with
114152         $(FREXPL_LIBM).
114154 2008-11-15  Bruno Haible  <bruno@clisp.org>
114156         * lib/netdb.in.h: Activate the definitions also when the system's
114157         <netdb.h> has 'struct addrinfo'.
114158         * m4/netdb_h.m4 (gl_HEADER_NETDB): Replace netdb.h also when it lacks
114159         EAI_OVERFLOW or AI_NUMERICSERV.
114160         * doc/posix-headers/netdb.texi: Document the problem.
114162 2008-11-15  Bruno Haible  <bruno@clisp.org>
114164         * tests/test-sched.c: Test also the existence of the SCHED_* macros.
114166         Make the 'sched' module work on platforms where <sched.h> exists but
114167         is incomplete (such as Haiku).
114168         * lib/sched.in.h; Include the system's <sched.h> if it exists.
114169         (SCHED_FIFO, SCHED_RR, SCHED_OTHER): New macros.
114170         * m4/sched_h.m4 (gl_SCHED_H): Test whether <sched.h> exists and also
114171         defines SCHED_FIFO, SCHED_RR, SCHED_OTHER. Set HAVE_SCHED_H,
114172         HAVE_STRUCT_SCHED_PARAM.
114173         * modules/sched (Depends-on): Add include_next.
114174         (Makefile.am): Substitute HAVE_SCHED_H, INCLUDE_NEXT,
114175         PRAGMA_SYSTEM_HEADER, NEXT_SCHED_H, HAVE_STRUCT_SCHED_PARAM.
114176         * doc/posix-headers/sched.texi: Document the issue.
114178 2008-11-13  Jim Meyering  <meyering@redhat.com>
114180         test-argp-2: avoid test failure when PACKAGE_BUGREPORT is defined
114181         * tests/test-argp-2.sh: When PACKAGE_BUGREPORT was defined, this
114182         test would fail due to the difference in the Report bugs to ...
114183         line.  The expected address is empty, "<>", while the actual
114184         would contain e.g., "<bug-tar@gnu.org>".  Filter out any address.
114186 2008-11-12  Bruno Haible  <bruno@clisp.org>
114188         lstat: don't compile lstat.c on systems lacking lstat
114189         * m4/lstat.m4 (gl_FUNC_LSTAT): Don't compile lstat.c on systems
114190         which don't have lstat; this is handled by lib/sys_stat.in.h already.
114191         Reported by Daniel P. Berrange via Jim Meyering.
114193 2008-11-12  Jim Meyering  <meyering@redhat.com>
114195         * lib/unicodeio.c (unicode_to_mb): Correct spelling of u8_uctomb.
114197 2008-11-12  Simon Josefsson  <simon@josefsson.org>
114199         * modules/warnings (configure.ac): Do AC_SUBST([WARN_CFLAGS]) here
114200         instead.
114202 2008-11-12  Bruno Haible  <bruno@clisp.org>
114204         * lib/unicodeio.c: Include unistr.h.
114205         (utf8_wctomb): Remove function.
114206         (unicode_to_mb): Use utf8_uctomb instead of utf8_wctomb.
114208 2008-11-12  Simon Josefsson  <simon@josefsson.org>
114210         * m4/warnings.m4 (gl_WARN_INIT): Remove, suggested by Ralf
114211         Wildenhues <Ralf.Wildenhues@gmx.de> and Bruno Haible
114212         <bruno@clisp.org>.
114213         * modules/warnings (configure.ac): Don't call gl_WARN_INIT.
114215 2008-11-12  Simon Josefsson  <simon@josefsson.org>
114217         * doc/warnings.texi: New file, from Bruno Haible <bruno@clisp.org>.
114218         * doc/gnulib.texi: Add section for warnings.
114220 2008-11-11  Bruno Haible  <bruno@clisp.org>
114222         * lib/sockets.h: Add a comment.
114224 2008-11-11  Karl Berry  <karl@gnu.org>
114226         * config/srclist.txt (fdl.texi): add, syncing from gnustandards.
114228 2008-11-11  Eric Blake  <ebb9@byu.net>
114230         fdl.texi: avoid git symlinks
114231         * doc/fdl.texi: Copy, rather than link, fdl-1.3.texi.
114233 2008-11-11  Paolo Bonzini  <bonzini@gnu.org>
114235         * m4/warnings.m4 (gl_WARN_ADD): Don't AC_SUBST the empty string.
114237 2008-11-11  Paolo Bonzini  <bonzini@gnu.org>
114239         * m4/warnings.m4 (gl_WARN_INIT): Substitute WARN_CFLAGS.
114240         (gl_WARN_ADD): Substitute $2 if literal.
114242 2008-11-11  Paolo Bonzini  <bonzini@gnu.org>
114244         * m4/warning.m4: Remove.
114246 2008-11-11  Paolo Bonzini  <bonzini@gnu.org>
114248         * m4/warnings.m4: Almost complete rewrite. :-)
114250 2008-11-10  Simon Josefsson  <simon@josefsson.org>
114252         * modules/warnings: New module.
114253         * m4/warnings.m4: New file.
114254         * MODULES.html.sh: Mention warnings module.
114255         With review improvements from Paolo Bonzini <bonzini@gnu.org> and
114256         Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
114258 2008-11-10  Eric Blake  <ebb9@byu.net>
114260         fdl.texi: make a symlink to the latest version
114261         * doc/standards.texi: Revert today's earlier change.
114262         * doc/fdl-1.2.texi: Rename from old fdl.texi...
114263         * doc/fdl.texi: ...and replace this with a symlink to the newer
114264         fdl-1.3.texi.
114266 2008-11-10  Bruno Haible  <bruno@clisp.org>
114268         * tests/test-select-fd.c (main): Accept the result file name as fourth
114269         argument.
114270         * tests/test-select-in.sh: Pass t-select-in.tmp as fourth argument.
114271         * tests/test-select-out.sh: Pass t-select-out.tmp as fourth argument.
114273 2008-11-10  Bruno Haible  <bruno@clisp.org>
114275         * lib/netdb.in.h: Use HAVE_STRUCT_ADDRINFO, HAVE_DECL_GETADDRINFO,
114276         HAVE_DECL_FREEADDRINFO, HAVE_DECL_GAI_STRERROR, HAVE_DECL_GETNAMEINFO
114277         as autoconf-substituted macros.
114278         * m4/netdb_h.m4 (gl_NETDB_H_DEFAULTS): Initialize these variables to 1.
114279         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Require
114280         gl_NETDB_H_DEFAULTS. Set these variables.
114281         * modules/netdb (Makefile.am): Substitute these variables.
114283 2008-11-10  Eric Blake  <ebb9@byu.net>
114285         standards.texi: include correct file for FDL 1.3
114286         * doc/standards.texi (GNU Free Documentation License): Change
114287         include file to pull in FDL 1.3, not 1.2.
114289         fdl.texi: revert accidental change to license
114290         * doc/fdl.texi: This is FDL 1.2, not 1.3.
114292 2008-11-10  Bruno Haible  <bruno@clisp.org>
114294         * m4/printf.m4 (gl_PRINTF_ENOMEM): Guess yes on Haiku. Use the
114295         cross-compiling guesses also when the native compile gives no result.
114297 2008-11-10  Bruno Haible  <bruno@clisp.org>
114299         * lib/spawni.c (__spawni): Force variable into the stack.
114301 2008-11-10  Bruno Haible  <bruno@clisp.org>
114303         Add support for Haiku.
114304         * lib/fbufmode.c (fbufmode): Test a symbol that is not only defined on
114305         glibc and BeOS, but also on Haiku.
114306         * lib/fpurge.c (fpurge): Likewise.
114307         * lib/freadable.c (freadable): Likewise.
114308         * lib/freadahead.c (freadahead): Likewise.
114309         * lib/freading.c (freading): Likewise.
114310         * lib/freadptr.c (freadptr): Likewise.
114311         * lib/freadseek.c (freadptrinc): Likewise.
114312         * lib/fseeko.c (rpl_fseeko): Likewise.
114313         * lib/fseterr.c (fseterr): Likewise.
114314         * lib/fwritable.c (fwritable): Likewise.
114315         * lib/fwriting.c (fwriting): Likewise.
114316         Reported by Ingo Weinhold <ingo_weinhold@gmx.de>.
114318 2008-11-10  Ingo Weinhold  <ingo_weinhold@gmx.de>
114320         * lib/config.charset: Treat Haiku like BeOS.
114322 2008-11-10  Ingo Weinhold  <ingo_weinhold@gmx.de>
114324         * lib/binary-io.h (O_BINARY, O_TEXT): Treat Haiku like BeOS.
114325         * lib/fcntl.in.h (O_BINARY, O_TEXT): Likewise.
114327 2008-11-08  Bruno Haible  <bruno@clisp.org>
114329         * m4/sys_ioctl_h.m4 (gl_SYS_IOCTL_H): Avoid using AC_CHECK_DECL inside
114330         AC_CACHE_CHECK.
114332 2008-11-08  Bruno Haible  <bruno@clisp.org>
114334         * modules/select-tests (configure.ac): Check for unistd.h, sys/wait.h.
114336 2008-11-08  Bruno Haible  <bruno@clisp.org>
114338         * tests/test-select-fd.c: New file.
114339         * tests/test-select-in.sh: New file.
114340         * tests/test-select-out.sh: New file.
114341         * tests/test-select-stdin.c: New file.
114342         * modules/select-tests (Files): Add the new files.
114343         (Depends-on): Add gettimeofday.
114344         (Makefile.am): Add test-select-in.sh, test-select-out.sh to TESTS.
114345         Set TESTS_ENVIRONMENT. Add test-select-fd, test-select-stdin to
114346         check_PROGRAMS. Define test_select_fd_LDADD, test_select_stdin_LDADD.
114348 2008-11-06  Alexander V. Lukyanov  <lav@netis.ru>
114349             Bruno Haible  <bruno@clisp.org>
114351         * lib/sys_stat.in.h: Enclose function definitions in extern "C".
114353 2008-10-12  Giuseppe Scrivano  <gscrivano@gnu.org>
114355         * build-aux/pmccabe2html: Added support for C++ source files.
114357 2008-11-05  Ben Pfaff  <blp@gnu.org>
114359         Fix lib/close.c build on Windows.
114360         * modules/close (Files): Add lib/w32sock.h.
114362 2008-11-05  Joel E. Denny  <jdenny@ces.clemson.edu>
114364         Accept Bison's NEWS format.
114365         * build-aux/announce-gen (print_news_deltas): Tweak
114366         $re_prefix.
114368 2008-11-04  Bruno Haible  <bruno@clisp.org>
114370         * modules/random_r (Maintainer): Add glibc.
114372 2008-11-04  Simon Josefsson  <simon@josefsson.org>
114374         * doc/alloca-opt.texi: Change license to GFDLv1.3+, as suggested
114375         by karl@freefriends.org (Karl Berry).
114376         * doc/alloca.texi: Likewise.
114377         * doc/c-ctype.texi: Likewise.
114378         * doc/c-strcase.texi: Likewise.
114379         * doc/c-strcaseeq.texi: Likewise.
114380         * doc/c-strcasestr.texi: Likewise.
114381         * doc/c-strstr.texi: Likewise.
114382         * doc/c-strtod.texi: Likewise.
114383         * doc/c-strtold.texi: Likewise.
114384         * doc/ctime.texi: Likewise.
114385         * doc/error.texi: Likewise.
114386         * doc/fdl.texi: Likewise.
114387         * doc/gcd.texi: Likewise.
114388         * doc/getdate.texi: Likewise.
114389         * doc/gnulib-intro.texi: Likewise.
114390         * doc/gnulib-tool.texi: Likewise.
114391         * doc/gnulib.texi: Likewise.
114392         * doc/inet_ntoa.texi: Likewise.
114393         * doc/maintain.texi: Likewise.
114394         * doc/make-stds.texi: Likewise.
114395         * doc/quote.texi: Likewise.
114396         * doc/regexprops-generic.texi: Likewise.
114397         * doc/standards.texi: Likewise.
114398         * doc/verify.texi: Likewise.
114399         * doc/visibility.texi: Likewise.
114400         * doc/gnulib.texi (GNU Free Documentation License): Include
114401         fdl-1.3.texi instead of fdl.texi.
114403 2008-11-04  Simon Josefsson  <simon@josefsson.org>
114405         * doc/fdl-1.3.texi: New file, from
114406         <http://www.gnu.org/licenses/fdl-1.3.texi>.
114407         * modules/fdl-1.3: Add.
114408         * MODULES.html.sh: Add fdl-1.3.
114410 2008-11-03  Bruno Haible  <bruno@clisp.org>
114412         Make determination of absolute name of header file work with AIX xlc.
114413         * m4/include_next.m4 (gl_CHECK_NEXT_HEADERS): Require
114414         AC_CANONICAL_HOST. On AIX, use "$CPP -C" rather than "$CPP" for
114415         preprocessing.
114416         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Likewise.
114417         Reported by Gary V. Vaughan <gary@thewrittenword.com>.
114419 2008-11-03  Simon Josefsson  <simon@josefsson.org>
114421         * top/maint.mk (COVERAGE_CCOPTS): Use --coverage instead of
114422         -fprofile-arcs -ftest-coverage.  Suggested by Ludovic Courtès
114423         <ludo@gnu.org>.
114425 2008-11-02  Bruno Haible  <bruno@clisp.org>
114427         Mark 'strpbrk' obsolete.
114428         * modules/strpbrk (Status, Notice): New sections.
114429         * modules/strtok_r (Depends-on): Add strpbrk.
114431 2008-11-02  Bruno Haible  <bruno@clisp.org>
114433         Mark 'strdup' obsolete.
114434         * modules/strdup (Status, Notice): New sections.
114435         * modules/findprog (Depends-on): Add strdup.
114436         * modules/getaddrinfo (Depends-on): Likewise.
114437         * modules/localename (Depends-on): Likewise.
114438         * modules/relocatable-lib (Depends-on): Likewise.
114439         * modules/relocatable-lib-lgpl (Depends-on): Likewise.
114440         * modules/relocatable-prog (Depends-on): Likewise.
114441         * modules/trim (Depends-on): Likewise.
114442         * modules/unictype/gen-ctype (Depends-on): Likewise.
114443         * modules/unilbrk/gen-lbrk (Depends-on): Likewise.
114445 2008-11-02  Bruno Haible  <bruno@clisp.org>
114447         Mark 'strcspn' obsolete.
114448         * modules/strcspn (Status, Notice): New sections.
114450 2008-11-02  Bruno Haible  <bruno@clisp.org>
114452         Mark 'rmdir' obsolete.
114453         * modules/rmdir (Status, Notice): New sections.
114454         * modules/clean-temp (Depends-on): Add rmdir.
114455         * modules/openat (Depends-on): Likewise.
114457 2008-11-02  Bruno Haible  <bruno@clisp.org>
114459         Mark 'raise' obsolete.
114460         * modules/raise (Status, Notice): New sections.
114461         (Include): Specify <signal.h>.
114462         * modules/stdio (Depends-on): Add raise.
114463         * modules/write (Depends-on): Likewise.
114465 2008-11-02  Bruno Haible  <bruno@clisp.org>
114467         Mark 'memset' obsolete.
114468         * modules/memset (Status, Notice): New sections.
114470 2008-11-02  Bruno Haible  <bruno@clisp.org>
114472         Mark 'memmove' obsolete.
114473         * modules/memmove (Status, Notice): New sections.
114474         * modules/argp (Depends-on): Add memmove.
114475         * modules/argz (Depends-on): Likewise.
114476         * modules/canonicalize (Depends-on): Likewise.
114477         * modules/canonicalize-lgpl (Depends-on): Likewise.
114478         * modules/fts (Depends-on): Likewise.
114479         * modules/getcwd (Depends-on): Likewise.
114480         * modules/human (Depends-on): Likewise.
114481         * modules/regex (Depends-on): Likewise.
114482         * modules/striconveh (Depends-on): Likewise.
114483         * modules/trim (Depends-on): Likewise.
114484         * modules/unistr/u8-move (Depends-on): Likewise.
114485         * modules/unistr/u16-move (Depends-on): Likewise.
114486         * modules/unistr/u32-move (Depends-on): Likewise.
114488 2008-11-02  Bruno Haible  <bruno@clisp.org>
114490         Mark 'memcpy' obsolete.
114491         * modules/memcpy (Status, Notice): New sections.
114493 2008-11-02  Bruno Haible  <bruno@clisp.org>
114495         Mark 'memcmp' obsolete.
114496         * modules/memcmp (Status, Notice): New sections.
114497         * modules/argmatch (Depends-on): Add memchr.
114498         * modules/backupfile (Depends-on): Likewise.
114499         * modules/c-strcasestr (Depends-on): Likewise.
114500         * modules/crypto/des (Depends-on): Likewise.
114501         * modules/csharpcomp (Depends-on): Likewise.
114502         * modules/fnmatch (Depends-on): Likewise.
114503         * modules/git-merge-changelog (Depends-on): Likewise.
114504         * modules/isnand (Depends-on): Likewise.
114505         * modules/isnand-nolibm (Depends-on): Likewise.
114506         * modules/isnanf (Depends-on): Likewise.
114507         * modules/isnanf-nolibm (Depends-on): Likewise.
114508         * modules/isnanl (Depends-on): Likewise.
114509         * modules/isnanl-nolibm (Depends-on): Likewise.
114510         * modules/mbchar (Depends-on): Likewise.
114511         * modules/memcoll (Depends-on): Likewise.
114512         * modules/quotearg (Depends-on): Likewise.
114513         * modules/regex (Depends-on): Likewise.
114514         * modules/relocatable-prog (Depends-on): Likewise.
114515         * modules/same (Depends-on): Likewise.
114516         * modules/signbit (Depends-on): Likewise.
114517         * modules/strcasestr-simple (Depends-on): Likewise.
114518         * modules/unictype/gen-ctype (Depends-on): Likewise.
114519         * modules/unilbrk/gen-lbrk (Depends-on): Likewise.
114520         * modules/uniname/uniname (Depends-on): Likewise.
114521         * modules/unistr/u8-cmp (Depends-on): Likewise.
114523 2008-11-02  Bruno Haible  <bruno@clisp.org>
114525         Mark 'memchr' obsolete.
114526         * modules/memchr (Status, Notice): New sections.
114527         * modules/argp (Depends-on): Add memchr.
114528         * modules/base64 (Depends-on): Likewise.
114529         * modules/c-strcasestr (Depends-on): Likewise.
114530         * modules/chdir-long (Depends-on): Likewise.
114531         * modules/fnmatch (Depends-on): Likewise.
114532         * modules/getsubopt (Depends-on): Likewise.
114533         * modules/git-merge-changelog (Depends-on): Likewise.
114534         * modules/glob (Depends-on): Likewise.
114535         * modules/strcasestr-simple (Depends-on): Likewise.
114536         * modules/strnlen (Depends-on): Likewise.
114538 2008-11-02  Bruno Haible  <bruno@clisp.org>
114540         Mark 'atexit' obsolete.
114541         * modules/atexit (Status, Notice): New sections.
114542         * modules/chdir-long (Depends-on): Add atexit.
114543         * modules/wait-process (Depends-on): Likewise.
114545 2008-11-02  Bruno Haible  <bruno@clisp.org>
114547         * gnulib-tool: New option --with-obsolete.
114548         (func_usage): Document it.
114549         (func_modules_transitive_closure): Drop obsolete dependencies if
114550         incobsolete is not true.
114551         (func_import): Read and save the incobsolete variable to the cache.
114553 2008-11-02  Bruno Haible  <bruno@clisp.org>
114555         * modules/TEMPLATE-EXTENDED: New field 'Status'.
114556         * gnulib-tool: New option --extract-status.
114557         (func_usage): Document it.
114558         (sed_extract_prog): Recognize it.
114559         (func_get_status): New function.
114561 2008-10-30  Simon Josefsson  <simon@josefsson.org>
114563         * modules/sockets (License): Change from LGPL to LGPLv2+.
114565 2008-10-28  Simon Josefsson  <simon@josefsson.org>
114567         * top/maint.mk: Add coverage rules, inspired by scripts in gnupdf.
114569 2008-10-28  Simon Josefsson  <simon@josefsson.org>
114571         * MODULES.html.sh (Support for systems lacking POSIX:2001):
114572         Mention times and sys_times.
114573         * modules/sys_times, modules/sys_times-tests: New modules.
114574         * modules/times, modules/times-tests: Likewise
114575         * m4/sys_times_h.m4: New file.
114576         * lib/sys_times.in.h: Likewise
114577         * lib/times.c: Likewise.
114578         * tests/test-sys_times.c: Likewise.
114579         * tests/test-times.c: Likewise.
114580         * doc/posix-headers/sys_times.texi: Update.
114581         * doc/posix-functions/times.texi: Update.
114583 2008-10-28  Jim Meyering  <meyering@redhat.com>
114585         * modules/tempname (Depends-on): Add lstat.
114587         * modules/lstat (License): Relicense: LGPL -> LGPLv2+.
114589 2008-10-28  Simon Josefsson  <simon@josefsson.org>
114591         * gnulib-tool (func_emit_tests_Makefile_am): Revert last commit.
114592         * modules/argp-tests (test_argp_LDADD): Set EXEEXT here instead,
114593         using idiom used elsewhere in gnulib.
114595 2008-10-27  Jim Meyering  <meyering@redhat.com>
114597         * modules/gethostname (License): Relicense: LGPL -> LGPLv2+.
114599 2008-10-27  Simon Josefsson  <simon@josefsson.org>
114601         * gnulib-tool (func_emit_tests_Makefile_am): Set EXEEXT in
114602         TESTS_ENVIRONMENT, for shell scripts that needs to call built
114603         programs.
114604         * tests/test-argp-2.sh: Use $EXEEXT when needed.
114606 2008-10-27  Simon Josefsson  <simon@josefsson.org>
114608         * lib/sys_stat.in.h (lstat): Fix declaration for mingw.
114610 2008-10-27  Bruno Haible  <bruno@clisp.org>
114612         * tests/test-lstat.c: Include <stdio.h>.
114614 2008-10-27  Simon Josefsson  <simon@josefsson.org>
114616         * modules/lstat-tests: New module.
114617         * tests/test-lstat.c: New file.
114619 2008-10-26  Jim Meyering  <meyering@redhat.com>
114621         * lib/mkdir.c (rpl_mkdir) [_WIN32...]: Mark mode as an unused parameter.
114623 2008-10-26  Simon Josefsson  <simon@josefsson.org>
114624             Bruno Haible  <bruno@clisp.org>
114626         Fix a clash between the type DATADIR on Windows and the macro DATADIR.
114627         * modules/configmake (Include): Add a note that the include must come
114628         after all system headers.
114629         * lib/javaversion.c: Include configmake.h after all other includes.
114631 2008-10-26  Bruno Haible  <bruno@clisp.org>
114633         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Set default of
114634         HAVE_STRUCT_RANDOM_DATA to 1.
114635         (gl_STDLIB_H): Simplify.
114637 2008-10-26  Simon Josefsson  <simon@josefsson.org>
114639         * m4/stdlib_h.m4: Check for struct random_data.  Initialize and
114640         substitute HAVE_STRUCT_RANDOM_DATA.
114641         * lib/stdlib.in.h [!HAVE_STRUCT_RANDOM_DATA]: Provide struct
114642         random_data.
114643         * modules/stdlib (Makefile.am): Substitute
114644         HAVE_STRUCT_RANDOM_DATA.
114646 2008-10-26  Simon Josefsson  <simon@josefsson.org>
114648         * doc/gnulib.texi (@copying): Use GFDLv1.2+.
114649         * doc/gnulib-intro.texi (Copyright): Likewise.
114651 2008-10-26  Simon Josefsson  <simon@josefsson.org>
114653         * doc/gnulib.texi (Header files): C++ fixes, based on Bruno's
114654         findings.
114656 2008-10-25  Ben Pfaff  <blp@cs.stanford.edu>
114657             Bruno Haible  <bruno@clisp.org>
114659         * lib/unistd.in.h: Include <winsock2.h>.
114660         (socket, connect,accept, bind, getpeername, getsockname, getsockopt,
114661         listen, recv, send, recvfrom, sendto, setsockopt, shutdown, select):
114662         Provide dummy declarations.
114663         (gethostname): Override.
114664         * lib/sys_socket.in.h (gethostname): Provide dummy declaration.
114665         * m4/gethostname.m4 (gl_FUNC_GETHOSTNAME): Invoke
114666         gl_PREREQ_SYS_H_WINSOCK2.
114667         * modules/gethostname (Files): Add m4/sys_socket_h.m4.
114668         * doc/posix-functions/gethostname.texi: More details.
114670 2008-10-25  Bruno Haible  <bruno@clisp.org>
114672         * m4/sys_socket_h.m4 (gl_PREREQ_SYS_H_WINSOCK2): Require
114673         gl_UNISTD_H_DEFAULTS, gl_SYS_IOCTL_H_DEFAULTS only if they exist.
114674         * modules/sys_socket (Files): Remove m4/unistd_h.m4, m4/sys_ioctl_h.m4.
114676         * lib/sys_socket.in.h (HAVE__GL_CLOSE_FD_MAYBE_SOCKET); Move macro from
114677         here ...
114678         * lib/unistd.in.h (HAVE__GL_CLOSE_FD_MAYBE_SOCKET); ... to here.
114679         * m4/sys_socket_h.m4 (gl_SYS_SOCKET_H_DEFAULTS): Remove invocation of
114680         gl_UNISTD_H_DEFAULTS.
114682 2008-10-25  Eric Blake  <ebb9@byu.net>
114684         signbit: avoid spurious compiler failure
114685         * m4/signbit.m4 (gl_SIGNBIT_TEST_PROGRAM): Move non-constant
114686         declarations inside function.
114688 2008-10-24  Simon Josefsson  <simon@josefsson.org>
114689             Bruno Haible  <bruno@clisp.org>
114691         * lib/stdlib.in.h (@GNULIB_RANDOM_R@): Include stdint.h.
114692         * modules/random_r (Depends-on): Add stdint.
114694 2008-10-24  Bruno Haible  <bruno@clisp.org>
114696         * modules/intprops (License): Change to LGPLv2+, with approval by Paul
114697         Eggert.
114698         * modules/strerror (License): Likewise.
114700 2008-10-24  Jim Meyering  <meyering@redhat.com>
114702         sys_socket: fix typo that inhibited expansion of @GNULIB_SEND@
114703         * modules/sys_socket (Depends-on) [Depends-on]: Fix typo.
114705 2008-10-24  Eric Blake  <ebb9@byu.net>
114707         getgroups: fix compilation when getgroups is available
114708         * lib/getgroups.c (includes): Include <unistd.h> for getgroups,
114709         but with <config.h> override of getgroups disabled.
114711 2008-10-24  Simon Josefsson  <simon@josefsson.org>
114713         * doc/gnulib.texi (Header files): Add note about C++ problems.
114714         Explained by Bruno Haible <bruno@clisp.org>.
114716 2008-10-23  Bruno Haible  <bruno@clisp.org>
114718         Define a dummy SA_NODEFER macro on Interix.
114719         * lib/signal.in.h (SA_NODEFER): Define fallback.
114720         Reported by Aleksey Cheusov <cheusov@tut.by> via
114721         Thomas Klausner <wiz@netbsd.org> and Eric Blake.
114723 2008-10-23  Bruno Haible  <bruno@clisp.org>
114725         * modules/freadahead (License): Change to LGPLv2+.
114726         Suggested by Simon Josefsson.
114728 2008-10-23  Jim Meyering  <meyering@redhat.com>
114730         random_r: new module
114731         * modules/random_r: New file.
114732         * m4/random_r.m4: New file.
114733         * lib/random_r.c: New file, from glibc.
114734         * modules/random_r-tests: New file.
114735         * tests/test-random_r.c: New file.
114736         * lib/stdlib.in.h (srandom_r, initstate_r, setstate_r, random_r):
114737          Declare.
114738         (RAND_MAX): Define.
114739         * m4/stdlib_h.m4: Define and AC_SUBST GNULIB_RANDOM_R and HAVE_RANDOM_R.
114740         * modules/stdlib: Substitute them, too.
114741         * MODULES.html.sh (Extra functions based on POSIX:2001) [Misc]: Add it.
114742         * doc/glibc-functions/initstate_r.texi: Mention the new module.
114743         * doc/glibc-functions/random_r.texi: Likewise.
114744         * doc/glibc-functions/setstate_r.texi: Likewise.
114745         * doc/glibc-functions/srandom_r.texi: Likewise.
114746         * config/srclist.txt: Mention it.
114748 2008-10-23  David Lutterkort  <lutter@redhat.com>
114750         * modules/selinux-h: Search for LIB_SELINUX and mark it as a
114751         link requirement
114753 2008-10-23  Jim Meyering  <meyering@redhat.com>
114755         selinux-h: mark parameters of stub functions as intentionally unused
114756         * lib/se-selinux.in.h: Mark parameters as _UNUSED_PARAMETER_.
114757         * lib/se-context.in.h: Likewise.
114759 2008-10-22  Simon Josefsson  <simon@josefsson.org>
114761         * lib/sys_socket.in.h (FD_ISSET): Fix warnings under mingw.
114763 2008-10-22  Simon Josefsson  <simon@josefsson.org>
114765         * m4/getgroups.m4: Avoid invoking test with wrong parameters.
114767 2008-10-22  Eric Blake  <ebb9@byu.net>
114769         glthread/thread: avoid compiler warning
114770         * lib/glthread/thread.c (gl_thread_exit_func) [USE_WIN32_THREADS]:
114771         Add unreachable abort to silence compiler.
114773 2008-10-22  Eric Blake  <ebb9@byu.net>
114775         netdb: also supply struct addrinfo for cygwin 1.5.x
114776         * m4/netdb_h.m4 (gl_HEADER_NETDB): Check for incomplete header on
114777         older cygwin.
114778         * lib/netdb.in.h [!HAVE_STRUCT_ADDRINFO]: Also supply contents for
114779         cygwin.
114780         * doc/posix-headers/netdb.texi (netdb.h): Document this.
114782 2008-10-22  Bruno Haible  <bruno@clisp.org>
114784         * users.txt: Update entry about pspp.
114786 2008-10-21  Bruno Haible  <bruno@clisp.org>
114788         Simplification.
114789         * lib/sys_socket.in.h (_gl_close_fd_maybe_socket): Remove declaration.
114790         * lib/close.c (_gl_close_fd_maybe_socket): Make static.
114792         Simplification.
114793         * lib/ioctl.c (ioctl): Don't undefine.
114794         * lib/socket.c (socket): Don't undefine.
114796         Remove unused module indicator macros.
114797         * m4/sys_socket_h.m4 (gl_SYS_SOCKET_MODULE_INDICATOR): Don't define
114798         GNULIB_$1 as a C macro.
114800         * doc/posix-functions/close.texi: Undo last change.
114801         * doc/posix-functions/ioctl.texi: Merge the two paragraphs about
114802         Windows platforms.
114804 2008-10-21  Bruno Haible  <bruno@clisp.org>
114806         Add gethostname() declaration to <unistd.h>.
114807         * lib/unistd.in.h (gethostname): New declaration.
114808         * lib/gethostname.c: Include <unistd.h>.
114809         * m4/gethostname.m4 (gl_FUNC_GETHOSTNAME): Require
114810         gl_UNISTD_H_DEFAULTS. Set HAVE_GETHOSTNAME.
114811         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_GETHOSTNAME
114812         and HAVE_GETHOSTNAME.
114813         * modules/gethostname (Depends-on): Add unistd.
114814         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
114815         (Include): Specify <unistd.h>.
114816         * modules/unistd (Makefile.am): Substitute GNULIB_GETHOSTNAME and
114817         HAVE_GETHOSTNAME.
114818         * tests/test-gethostname.c: Include <unistd.h> first.
114820 2008-10-21  Bruno Haible  <bruno@clisp.org>
114822         * modules/poll-tests (Depends-on): Add sys_ioctl, ioctl.
114823         * modules/select-tests (Depends-on): Likewise.
114824         Reported by Simon Josefsson.
114826 2008-10-21  Simon Josefsson  <simon@josefsson.org>
114828         * lib/close.c: Add _gl_close_fd_maybe_socket from winsock.c.
114829         * lib/accept.c: New file, based on winsock.c.
114830         * lib/bind.c: New file, based on winsock.c.
114831         * lib/connect.c: New file, based on winsock.c.
114832         * lib/getpeername.c: New file, based on winsock.c.
114833         * lib/getsockname.c: New file, based on winsock.c.
114834         * lib/getsockopt.c: New file, based on winsock.c.
114835         * lib/ioctl.c: New file, based on winsock.c.
114836         * lib/listen.c: New file, based on winsock.c.
114837         * lib/recv.c: New file, based on winsock.c.
114838         * lib/recvfrom.c: New file, based on winsock.c.
114839         * lib/send.c: New file, based on winsock.c.
114840         * lib/sendto.c: New file, based on winsock.c.
114841         * lib/setsockopt.c: New file, based on winsock.c.
114842         * lib/shutdown.c: New file, based on winsock.c.
114843         * lib/socket.c: New file, based on winsock.c.
114844         * lib/w32sock.h: New file, based on winsock.c.
114845         * lib/winsock.c: Remove file.
114846         * modules/accept: Likewise.
114847         * modules/bind: Likewise.
114848         * modules/connect: Likewise.
114849         * modules/getpeername: Likewise.
114850         * modules/getsockname: Likewise.
114851         * modules/getsockopt: Likewise.
114852         * modules/ioctl: Likewise.
114853         * modules/listen: Likewise.
114854         * modules/recv: Likewise.
114855         * modules/recvfrom: Likewise.
114856         * modules/send: Likewise.
114857         * modules/sendto: Likewise.
114858         * modules/setsockopt: Likewise.
114859         * modules/shutdown: Likewise.
114860         * modules/socket: Use socket.c instead of winsock.c.
114861         * modules/sys_socket: Remove (unneeded?) dependency on winsock.c.
114862         * doc/posix-functions/accept.texi: Doc fix.
114863         * doc/posix-functions/bind.texi: Doc fix.
114864         * doc/posix-functions/close.texi: Doc fix.
114865         * doc/posix-functions/connect.texi: Doc fix.
114866         * doc/posix-functions/getpeername.texi: Doc fix.
114867         * doc/posix-functions/getsockname.texi: Doc fix.
114868         * doc/posix-functions/getsockopt.texi: Doc fix.
114869         * doc/posix-functions/ioctl.texi: Doc fix.
114870         * doc/posix-functions/listen.texi: Doc fix.
114871         * doc/posix-functions/recv.texi: Doc fix.
114872         * doc/posix-functions/recvfrom.texi: Doc fix.
114873         * doc/posix-functions/send.texi: Doc fix.
114874         * doc/posix-functions/sendto.texi: Doc fix.
114875         * doc/posix-functions/setsockopt.texi: Doc fix.
114876         * doc/posix-functions/shutdown.texi: Doc fix.
114877         * doc/posix-functions/socket.texi: Doc fix.
114879 2008-10-20  Bruno Haible  <bruno@clisp.org>
114881         Take into account the role of SIGABRT_COMPAT on Windows 2008.
114882         * lib/sigprocmask.c (SIGABRT_COMPAT, SIGABRT_COMPAT_MASK): New macros.
114883         (sigismember, sigaddset, sigdelset, sigfillset, rpl_signal): Handle it
114884         as an alias for SIGABRT.
114885         * lib/sigaction.c (SIGABRT_COMPAT): New macro.
114886         (sigaction): Map it to SIGABRT.
114887         Reported by Ramiro Polla <ramiro.polla@gmail.com> via Eric Blake.
114889 2008-10-20  Bruno Haible  <bruno@clisp.org>
114891         * lib/fts.c: Don't include lstat.h.
114892         * lib/openat.c: Include <sys/stat.h> instead of lstat.h.
114894         Move the lstat() declaration to <sys/stat.h>.
114895         * lib/lstat.h: Remove file.
114896         * lib/sys_stat.in.h: Add special invocation convention.
114897         (lstat): New declaration.
114898         * lib/lstat.c (orig_lstat): New function.
114899         (rpl_lstat): Use orig_lstat instead of lstat.
114900         * m4/lstat.m4 (gl_FUNC_LSTAT): Require gl_SYS_STAT_H_DEFAULTS and
114901         AC_C_INLINE. Set REPLACE_LSTAT.
114902         * m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Initialize GNULIB_LSTAT
114903         and REPLACE_LSTAT.
114904         * modules/lstat (Files): Remove lib/lstat.h.
114905         (configure.ac): Invoke gl_SYS_STAT_MODULE_INDICATOR.
114906         (Include): Specify <sys/stat.h> instead of lstat.h.
114907         * modules/sys_stat (Makefile.am): Substitute GNULIB_LSTAT and
114908         REPLACE_LSTAT.
114909         * NEWS: Mention the change.
114911 2008-10-20  Bruno Haible  <bruno@clisp.org>
114913         * modules/posix_spawn-tests: New file.
114914         * tests/test-posix_spawn3.c: New file.
114916 2008-10-20  Bruno Haible  <bruno@clisp.org>
114918         * modules/posix_spawnp-tests (Depends-on): Add sys_wait.
114919         * tests/test-posix_spawn1.c (WTERMSIG, WCOREDUMP, WEXITSTATUS,
114920         WIFSIGNALED, WIFEXITED, WIFSTOPPED): Remove fallback definitions.
114921         * tests/test-posix_spawn2.c (WTERMSIG, WCOREDUMP, WEXITSTATUS,
114922         WIFSIGNALED, WIFEXITED, WIFSTOPPED): Likewise.
114924 2008-10-20  Bruno Haible  <bruno@clisp.org>
114926         * m4/posix_spawn.m4 (gl_POSIX_SPAWN_WORKS): Test against another bug
114927         of posix_spawn on AIX 5.3.
114929 2008-10-20  Bruno Haible  <bruno@clisp.org>
114931         * m4/posix_spawn.m4 (gl_POSIX_SPAWN_WORKS): Make the check on MacOS X.
114933 2008-10-20  Bruno Haible  <bruno@clisp.org>
114935         * m4/posix_spawn.m4 (gl_POSIX_SPAWN_WORKS): Use AC_LANG_SOURCE instead
114936         of AC_LANG_PROGRAM.
114938 2008-10-20  Simon Josefsson  <simon@josefsson.org>
114940         * lib/netdb.in.h: Don't define GNU specific constants until they
114941         are supported or needed.  Reported by Bruno Haible
114942         <bruno@clisp.org>.
114944 2008-10-20  Simon Josefsson  <simon@josefsson.org>
114946         * lib/canon-host.c: Include netdb.h instead of getaddrinfo.h.
114948 2008-10-20  Simon Josefsson  <simon@josefsson.org>
114950         * lib/getaddrinfo.h: Remove file.
114951         * modules/getaddrinfo: Reflect move from getaddrinfo.h to netdb.h.
114952         * m4/getaddrinfo.m4: Call gl_HEADER_NETDB.  Don't check for netdb.h.
114953         * lib/netdb.in.h: Add declarations from getaddrinfo.h.
114954         * m4/netdb_h.m4: Initialize GNULIB_GETADDRINFO to 0.
114955         * modules/netdb: Substitute GNULIB_GETADDRINFO.
114956         * lib/getaddrinfo.c: Include netdb.h instead of getaddrinfo.h.
114957         * tests/test-getaddrinfo.c: Likewise.
114958         * lib/gai_strerror.c: Likewise.  Also drop HAVE_NETDB_H check.
114959         * NEWS: Mention change.
114961 2008-10-19  Bruno Haible  <bruno@clisp.org>
114963         * m4/posix_spawn.m4 (gl_POSIX_SPAWN_WORKS): Remove unneeded code.
114965 2008-10-19  Bruno Haible  <bruno@clisp.org>
114967         * lib/wait-process.c: Include simply <sys/wait.h>.
114968         (waitpid, WTERMSIG, WCOREDUMP, WEXITSTATUS, WIFSIGNALED, WIFEXITED,
114969         WIFSTOPPED): Remove fallback definitions.
114970         * modules/wait-process (Depends-on): Add sys_wait.
114972         New module 'sys_wait'.
114973         * modules/sys_wait: New file.
114974         * lib/sys_wait.in.h: New file, partially copied from
114975         lib/wait-process.c.
114976         * m4/sys_wait_h.m4: New file.
114977         * doc/posix-headers/sys_wait.texi: Mention the new module.
114979 2008-10-19  Bruno Haible  <bruno@clisp.org>
114981         * m4/wait-process.m4 (gl_WAIT_PROCESS): Remove test for unistd.h.
114983 2008-10-19  Bruno Haible  <bruno@clisp.org>
114985         Assume that waitpid() fills an 'int' status, not a 'union wait'.
114986         * lib/wait-process.c (WAIT_T): Remove type.
114987         (WTERMSIG, WCOREDUMP, WEXITSTATUS): Define fallbacks using bit masks.
114988         (wait_subprocess): Update.
114990 2008-10-19  Bruno Haible  <bruno@clisp.org>
114992         New module 'atoll'.
114993         * modules/atoll: New file.
114994         * lib/stdlib.in.h (atoll): New declaration.
114995         * lib/atoll.c: New file, from glibc with modifications.
114996         * m4/atoll.m4: New file.
114997         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize GNULIB_ATOLL,
114998         HAVE_ATOLL.
114999         * modules/stdlib (Makefile.am): Substitute GNULIB_ATOLL, HAVE_ATOLL.
115000         * doc/posix-functions/atoll.texi: Mention the new module.
115002 2008-10-19  Bruno Haible  <bruno@clisp.org>
115004         Add strtoull() declaration to <stdlib.h>.
115005         * lib/stdlib.in.h (strtoull): New declaration.
115006         * m4/strtoull.m4 (gl_FUNC_STRTOLL): Require gl_STDLIB_H_DEFAULTS.
115007         Set HAVE_STRTOULL.
115008         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize GNULIB_STRTOULL,
115009         HAVE_STRTOULL.
115010         * modules/strtoull (Depends-on): Add stdlib.
115011         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
115012         * modules/stdlib (Makefile.am): Substitute GNULIB_STRTOULL,
115013         HAVE_STRTOULL.
115015 2008-10-19  Bruno Haible  <bruno@clisp.org>
115017         Add strtoll() declaration to <stdlib.h>.
115018         * lib/stdlib.in.h (strtoll): New declaration.
115019         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Require gl_STDLIB_H_DEFAULTS.
115020         Set HAVE_STRTOLL.
115021         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize GNULIB_STRTOLL,
115022         HAVE_STRTOLL.
115023         * modules/strtoll (Depends-on): Add stdlib.
115024         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
115025         * modules/stdlib (Makefile.am): Substitute GNULIB_STRTOLL, HAVE_STRTOLL.
115027 2008-10-19  Bruno Haible  <bruno@clisp.org>
115029         * modules/bcopy (Depends-on): Add strings.
115030         (Include): Specify <strings.h>.
115032 2008-10-19  Bruno Haible  <bruno@clisp.org>
115034         * doc/posix-functions/atexit.texi: Update doc regarding mingw.
115036 2008-10-19  Bruno Haible  <bruno@clisp.org>
115038         * lib/openat-die.c (openat_save_fail, openat_restore_fail): Rename
115039         the parameter from 'errno' to 'errnum'. Fixes a compilation error on
115040         mingw.
115042 2008-10-19  Bruno Haible  <bruno@clisp.org>
115044         * lib/atanl.c: Don't include isnanl.h.
115045         * lib/cosl.c: Likewise.
115046         * lib/ldexpl.c: Likewise.
115047         * lib/logl.c: Likewise.
115048         * lib/sinl.c: Likewise.
115049         * lib/sqrtl.c: Likewise.
115050         * lib/tanl.c: Likewise.
115052         Move the isnanf(), isnand(), isnanl() declarations to <math.h>.
115053         * lib/isnanf.h: Remove file.
115054         * lib/isnand.h: Remove file.
115055         * lib/isnanl.h: Remove file.
115056         * lib/math.in.h: Include the contents of lib/isnanf.h, lib/isnand.h,
115057         lib/isnanl.h. Use HAVE_ISNANF, HAVE_ISNAND, HAVE_ISNANL as substituted
115058         macros.
115059         * m4/isnanf.m4 (gl_FUNC_ISNANF): Require gl_MATH_H_DEFAULTS. Set
115060         HAVE_ISNANF, don't define it as a C macro.
115061         * m4/isnand.m4 (gl_FUNC_ISNAND): Require gl_MATH_H_DEFAULTS. Set
115062         HAVE_ISNAND, don't define it as a C macro.
115063         * m4/isnanl.m4 (gl_FUNC_ISNANL): Require gl_MATH_H_DEFAULTS. Set
115064         HAVE_ISNANL, don't define it as a C macro.
115065         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_ISNAN[FDL] and
115066         HAVE_ISNAN[FDL].
115067         * modules/isnanf (Files): Remove lib/isnanf.h.
115068         (Depends-on): Add math.
115069         (configure.ac): Invoke gl_MATH_MODULE_INDICATOR.
115070         (Include): Specify <math.h> instead of isnanf.h.
115071         * modules/isnand (Files): Remove lib/isnand.h.
115072         (Depends-on): Add math.
115073         (configure.ac): Invoke gl_MATH_MODULE_INDICATOR.
115074         (Include): Specify <math.h> instead of isnand.h.
115075         * modules/isnanl (Files): Remove lib/isnanl.h.
115076         (Depends-on): Add math.
115077         (configure.ac): Invoke gl_MATH_MODULE_INDICATOR.
115078         (Include): Specify <math.h> instead of isnanl.h.
115079         * modules/math (Makefile.am): Substitute GNULIB_ISNAN[FDL] and
115080         HAVE_ISNAN[FDL].
115081         * tests/test-isnanf.c: Include <math.h> instead of isnanf.h.
115082         * tests/test-isnand.c: Include <math.h> instead of isnand.h.
115083         * tests/test-isnanl.c: Include <math.h> instead of isnanl.h.
115084         * NEWS: Mention the change.
115086 2008-10-18  Bruno Haible  <bruno@clisp.org>
115088         Add getusershell(), setusershell(), endusershell() declarations to
115089         <unistd.h>.
115090         * lib/unistd.in.h (getusershell, setusershell, endusershell): New
115091         declarations.
115092         * lib/getusershell.c: Include unistd.h.
115093         * m4/getusershell.m4 (gl_FUNC_GETUSERSHELL): Require
115094         gl_UNISTD_H_DEFAULTS and AC_USE_SYSTEM_EXTENSIONS. Set
115095         HAVE_GETUSERSHELL.
115096         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_GETUSERSHELL
115097         and HAVE_GETUSERSHELL.
115098         * modules/getusershell (Depends-on): Add unistd, extensions.
115099         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
115100         (Include): Specify <unistd.h>.
115101         * modules/unistd (Makefile.am): Substitute GNULIB_GETUSERSHELL and
115102         HAVE_GETUSERSHELL.
115104 2008-10-18  Bruno Haible  <bruno@clisp.org>
115106         Add a getloadavg() declaration to <stdlib.h>.
115107         * lib/stdlib.in.h; Include <sys/loadavg.h> when needed for the
115108         getloadavg declaration.
115109         (getloadavg): New declaration.
115110         * lib/getloadavg.c: Include <stdlib.h> first.
115111         * m4/getloadavg.m4 (gl_GETLOADAVG): Require gl_STDLIB_H_DEFAULTS and
115112         AC_USE_SYSTEM_EXTENSIONS. Test whether sys/loadavg.h exists. Set
115113         HAVE_SYS_LOADAVG_H and HAVE_DECL_GETLOADAVG.
115114         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize GNULIB_GETLOADAVG,
115115         HAVE_SYS_LOADAVG_H, HAVE_DECL_GETLOADAVG.
115116         * modules/getloadavg (Depends-on): Add stdlib, extensions.
115117         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
115118         (Include): Specify <stdlib.h>.
115119         * modules/stdlib (Makefile.am): Substitute GNULIB_GETLOADAVG,
115120         HAVE_SYS_LOADAVG_H, HAVE_DECL_GETLOADAVG.
115122 2008-10-18  Bruno Haible  <bruno@clisp.org>
115124         * lib/dirchownmod.c: Don't include lchmod.h.
115126         Move the lchmod() declaration to <sys/stat.h>.
115127         * lib/lchmod.h: Remove file.
115128         * lib/sys_stat.in.h: Add placeholder for GL_LINK_WARNING.
115129         (lchmod): New declaration, moved here from lib/lchown.h.
115130         * m4/lchmod.m4 (gl_FUNC_LCHMOD): Require gl_SYS_STAT_H_DEFAULTS and
115131         AC_USE_SYSTEM_EXTENSIONS. Set HAVE_LCHMOD.
115132         * m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Initialize GNULIB_LCHMOD
115133         and HAVE_LCHMOD.
115134         * modules/lchmod (Files): Remove lib/lchmod.h.
115135         (Depends-on): Add sys_stat, extensions.
115136         (configure.ac): Invoke gl_SYS_STAT_MODULE_INDICATOR.
115137         (Include): Specify <sys/stat.h> instead of lchmod.h.
115138         * modules/sys_stat (Depends-on): Add link-warning.
115139         (Makefile.am): Substitute GNULIB_LCHMOD, HAVE_LCHMOD, and the
115140         definition of GL_LINK_WARNING.
115141         * NEWS: Mention the change.
115143 2008-10-18  Bruno Haible  <bruno@clisp.org>
115145         * lib/fchdir.c: Don't include dirfd.h.
115146         * lib/fts.c: Likewise.
115147         * lib/getcwd.c: Likewise.
115148         * lib/glob.c: Likewise.
115150         Move the dirfd() declaration to <dirent.h>.
115151         * lib/dirfd.h: Remove file.
115152         * lib/dirent.in.h: Add placeholder for GL_LINK_WARNING.
115153         (dirfd): New declaration.
115154         * lib/dirfd.c: Include <dirent.h> instead of dirfd.h.
115155         * m4/dirfd.m4 (gl_FUNC_DIRFD): Require gl_DIRENT_H_DEFAULTS and
115156         AC_USE_SYSTEM_EXTENSIONS. Invoke gl_REPLACE_DIRENT_H. Set
115157         HAVE_DECL_DIRFD.
115158         * m4/dirent_h.m4 (gl_DIRENT_H_DEFAULTS): Initialize GNULIB_DIRFD and
115159         HAVE_DECL_DIRFD.
115160         * modules/dirfd (Files): Remove lib/dirfd.h.
115161         (Depends-on): Add dirent, extensions.
115162         (configure.ac): Invoke gl_DIRENT_MODULE_INDICATOR.
115163         (Include): Specify <dirent.h> instead of dirfd.h.
115164         * modules/dirent (Depends-on): Add link-warning.
115165         (Makefile.am): Substitute GNULIB_DIRFD, HAVE_DECL_DIRFD, and
115166         definition of GL_LINK_WARNING.
115167         * NEWS: Mention the change.
115169 2008-10-18  Bruno Haible  <bruno@clisp.org>
115171         Move the euidaccess() declaration to <unistd.h>.
115172         * lib/euidaccess.h: Remove file.
115173         * lib/unistd.in.h (euidaccess): New declaration.
115174         * lib/euidaccess.c: Don't include euidaccess.h.
115175         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): Require gl_UNISTD_H_DEFAULTS.
115176         Don't check whether euidaccess is declared. Set HAVE_EUIDACCESS.
115177         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_EUIDACCESS
115178         and HAVE_EUIDACCESS.
115179         * modules/euidaccess (Files): Remove lib/euidaccess.h.
115180         (Depends-on): Add unistd.
115181         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
115182         (Include): Specify <unistd.h> instead of euidaccess.h.
115183         * modules/unistd (Makefile.am): Substitute GNULIB_EUIDACCESS and
115184         HAVE_EUIDACCESS.
115185         * NEWS: Mention the change.
115187 2008-10-18  Bruno Haible  <bruno@clisp.org>
115189         * lib/xgetdomainname.c: Include <unistd.h> instead of getdomainname.h.
115191         Move the getdomainname() declaration to <unistd.h>.
115192         * lib/getdomainname.h: Remove file.
115193         * lib/unistd.in.h (getdomainname): New declaration.
115194         * lib/getdomainname.c: Include <unistd.h> instead of getdomainname.h.
115195         * m4/getdomainname.m4 (gl_FUNC_GETDOMAINNAME): Require
115196         gl_UNISTD_H_DEFAULTS and AC_USE_SYSTEM_EXTENSIONS. Set
115197         HAVE_GETDOMAINNAME.
115198         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize
115199         GNULIB_GETDOMAINNAME and HAVE_GETDOMAINNAME.
115200         * modules/getdomainname (Files): Remove lib/getdomainname.h.
115201         (Depends-on): Add unistd, extensions.
115202         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
115203         (Includes): Specify <unistd.h> instead of getdomainname.h.
115204         * modules/unistd (Makefile.am): Substitute GNULIB_GETDOMAINNAME and
115205         HAVE_GETDOMAINNAME.
115206         * NEWS: Mention the change.
115208 2008-10-18  Bruno Haible  <bruno@clisp.org>
115210         * modules/dirent: New file.
115211         * m4/dirent_h.m4: New file.
115212         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_DIRENT_H_DEFAULTS.
115213         Invoke gl_REPLACE_DIRENT_H. Don't assign DIRENT_H directly.
115214         * modules/fchdir (Files): Remove lib/dirent.in.h.
115215         (Depends-on): Add dirent.
115216         (Makefile.am): Move rules to modules/dirent.
115217         * doc/posix-headers/dirent.texi: Mention the new module.
115219 2008-10-18  Bruno Haible  <bruno@clisp.org>
115221         Avoid -Wunused-parameter warnings in public gnulib header files.
115222         * m4/gnulib-common.m4 (gl_COMMON_BODY): Define _UNUSED_PARAMETER_ as a
115223         macro.
115224         * lib/unistr.h (u32_mbtouc_unsafe, u32_mbtouc): Use it.
115226 2008-10-18  Bruno Haible  <bruno@clisp.org>
115228         * doc/glibc-functions/dirfd.texi: Mention the module 'dirfd'.
115229         * doc/glibc-functions/error.texi: Mention the module 'error'.
115230         * doc/glibc-functions/euidaccess.texi: Mention the module 'euidaccess'.
115231         * doc/glibc-functions/getdomainname.texi: Mention the module
115232         'getdomainname'.
115233         * doc/glibc-functions/getloadavg.texi: Mention the module 'getloadavg'.
115234         * doc/glibc-functions/getpagesize.texi: Mention the module
115235         'getpagesize'.
115236         * doc/glibc-functions/getusershell.texi: Mention the module
115237         'getusershell'.
115238         * doc/glibc-functions/isnanl.texi: Mention the module 'isnanl'.
115239         * doc/glibc-functions/lchmod.texi: Mention the module 'lchmod'.
115240         * doc/glibc-functions/mempcpy.texi: Mention the module 'mempcpy'.
115241         * doc/glibc-functions/memrchr.texi: Mention the module 'memrchr'.
115242         * doc/glibc-functions/mkdtemp.texi: Mention the module 'mkdtemp'.
115243         * doc/glibc-functions/rpmatch.texi: Mention the module 'rpmatch'.
115244         * doc/glibc-functions/stpcpy.texi: Mention the module 'stpcpy'.
115245         * doc/glibc-functions/stpncpy.texi: Mention the module 'stpncpy'.
115246         * doc/glibc-functions/strchrnul.texi: Mention the module 'strchrnul'.
115247         * doc/glibc-functions/strndup.texi: Mention the module 'strndup'.
115248         * doc/glibc-functions/strnlen.texi: Mention the module 'strnlen'.
115249         * doc/glibc-functions/strsep.texi: Mention the module 'strsep'.
115250         * doc/glibc-functions/timegm.texi: Mention the module 'timegm'.
115251         * doc/glibc-functions/vasprintf.texi: Mention the module 'vasprintf'.
115253 2008-10-17  Bruno Haible  <bruno@clisp.org>
115255         * m4/signbit.m4 (gl_SIGNBIT_TEST_PROGRAM): On platforms other than
115256         HP-UX and IRIX, use -0.0L.
115257         * tests/test-ceill.c (minus_zero): Likewise.
115258         * tests/test-floorl.c (minus_zero): Likewise.
115259         * tests/test-frexpl.c (minus_zero): Likewise.
115260         * tests/test-isnan.c (minus_zerol): Likewise.
115261         * tests/test-isnanl.h (minus_zero): Likewise.
115262         * tests/test-ldexpl.c (minus_zero): Likewise.
115263         * tests/test-roundl.c (minus_zero): Likewise.
115264         * tests/test-signbit.c (minus_zerol): Likewise.
115265         * tests/test-snprintf-posix.h (minus_zerol): Likewise.
115266         * tests/test-sprintf-posix.h (minus_zerol): Likewise.
115267         * tests/test-truncl.c (minus_zero): Likewise.
115268         * tests/test-vasnprintf-posix.c (minus_zerol): Likewise.
115269         * tests/test-vasprintf-posix.c (minus_zerol): Likewise.
115270         Reported by Markus Armbruster <armbru@redhat.com> via Jim Meyering
115271         and by Nelson H. F. Beebe <beebe@math.utah.edu> via Eric Blake.
115273 2008-10-17  Bruno Haible  <bruno@clisp.org>
115275         Avoid gcc warnings because of #pragma GCC system_header on older gcc.
115276         * lib/arpa_inet.in.h: Encloses reference to PRAGMA_SYSTEM_HEADER so
115277         that it gets activated only for gcc >= 3.0.
115278         * lib/dirent.in.h: Likewise.
115279         * lib/errno.in.h: Likewise.
115280         * lib/fcntl.in.h: Likewise.
115281         * lib/float.in.h: Likewise.
115282         * lib/iconv.in.h: Likewise.
115283         * lib/inttypes.in.h: Likewise.
115284         * lib/locale.in.h: Likewise.
115285         * lib/math.in.h: Likewise.
115286         * lib/netdb.in.h: Likewise.
115287         * lib/netinet_in.in.h: Likewise.
115288         * lib/search.in.h: Likewise.
115289         * lib/signal.in.h: Likewise.
115290         * lib/spawn.in.h: Likewise.
115291         * lib/stdarg.in.h: Likewise.
115292         * lib/stdint.in.h: Likewise.
115293         * lib/stdio.in.h: Likewise.
115294         * lib/stdlib.in.h: Likewise.
115295         * lib/string.in.h: Likewise.
115296         * lib/strings.in.h: Likewise.
115297         * lib/sys_file.in.h: Likewise.
115298         * lib/sys_ioctl.in.h: Likewise.
115299         * lib/sys_select.in.h: Likewise.
115300         * lib/sys_socket.in.h: Likewise.
115301         * lib/sys_stat.in.h: Likewise.
115302         * lib/sys_time.in.h: Likewise.
115303         * lib/sysexits.in.h: Likewise.
115304         * lib/time.in.h: Likewise.
115305         * lib/unistd.in.h: Likewise.
115306         * lib/wchar.in.h: Likewise.
115307         * lib/wctype.in.h: Likewise.
115308         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
115310 2008-10-17  Jim Meyering  <meyering@redhat.com>
115312         ignore-value: don't depend on inline module
115313         * modules/ignore-value (Depends-on): Remove 'inline'.
115314         (configure.ac): Instead, add AC_REQUIRE([AC_C_INLINE]) here.
115315         Suggestion from Bruno Haible.
115317 2008-10-17  Bruno Haible  <bruno@clisp.org>
115319         New implementation of condition variables for Win32.
115320         * lib/glthread/cond.h (struct gl_waitqueue_link): New type.
115321         (gl_linked_waitqueue_t): New type.
115322         (gl_cond_t): Use it.
115323         * lib/glthread/cond.c (struct gl_waitqueue_element): New type.
115324         (gl_waitqueue_init, gl_waitqueue_add, gl_waitqueue_remove,
115325         gl_waitqueue_notify_first, gl_waitqueue_notify_all): New functions.
115326         (glthread_cond_init_func, glthread_cond_wait_func,
115327         glthread_cond_timedwait_func, glthread_cond_signal_func,
115328         glthread_cond_broadcast_func, glthread_cond_destroy_func):
115329         Reimplemented on the basis of gl_linked_waitqueue_t.
115330         * lib/glthread/lock.h (gl_carray_waitqueue_t): Renamed from
115331         gl_waitqueue_t.
115332         (gl_rwlock_t): Update.
115333         * lib/glthread/lock.c (gl_waitqueue_t): Alias to gl_carray_waitqueue_t.
115335 2008-10-17  Simon Josefsson  <simon@josefsson.org>
115337         * modules/recvfrom (Depends-on): Add dependency on getpeername.
115338         Reported by Yoann Vandoorselaere <yoann@prelude-ids.org>.
115340 2008-10-17  Jim Meyering  <meyering@redhat.com>
115342         ignore-value: new module
115343         * modules/ignore-value: New file.
115344         * lib/ignore-value.h: New file.
115345         * MODULES.html.sh (Compiler warning management): New section,
115346         just for this module.  More to come.
115348 2008-10-16  Paul Eggert  <eggert@cs.ucla.edu>
115350         open-safer.c: avoid 'signed and unsigned in conditional...' warning
115351         * lib/open-safer.c (open_safer): Use an "if/else" statement in place
115352         of the ternary operator.  Reported by Reuben Thomas <rrt@sc3d.org>.
115354 2008-10-16  Jim Meyering  <meyering@redhat.com>
115356         openat-die.c: avoid 'no previous prototype' warning
115357         * lib/openat-die.c: Include "openat.h".
115358         Reported by Reuben Thomas <rrt@sc3d.org>.
115360 2008-10-16  Simon Josefsson  <simon@josefsson.org>
115362         * m4/netdb_h.m4: Assume that if netdb.h exists, it works.
115363         * lib/netdb.in.h: Fix typo.
115364         Reported by Bruno Haible  <bruno@clisp.org>
115366         * lib/netdb.in.h: Include sys/socket.h for platforms without
115367         netdb.h, to get structures like hostent on MinGW.
115368         * modules/netdb (Depends-on): Add sys_socket.
115370 2008-10-15  Simon Josefsson  <simon@josefsson.org>
115372         * modules/netdb, modules/netdb-tests: New file.
115373         * m4/netdb_h.m4: New file.
115374         * lib/netdb.in.h: Add, currently just an empty file pending
115375         definitions.
115376         * tests/test-netdb.c: New file.
115377         * doc/posix-headers/netdb.texi: Mention that we replace it if
115378         needed.
115379         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
115380         netdb.
115382 2008-10-15  Simon Josefsson  <simon@josefsson.org>
115384         * doc/gnulib.texi (Getaddrinfo and WINVER): Sync documentation
115385         with code.
115387 2008-10-13  Bruno Haible  <bruno@clisp.org>
115389         * lib/glthread/cond.c (glthread_cond_wait_func,
115390         glthread_cond_timedwait_func): Add a comment.
115392 2008-10-13  Yoann Vandoorselaere  <yoann@prelude-ids.org>
115394         * tests/test-poll.c: Include <sys/ioctl.h>, for ioctl().
115395         * tests/test-select.c: Likewise,
115397 2008-10-13  Bruno Haible  <bruno@clisp.org>
115399         * lib/glthread/cond.c (glthread_cond_wait_func,
115400         glthread_cond_timedwait_func): Fix variable name.
115401         Reported by Yoann Vandoorselaere <yoann@prelude-ids.org>.
115403 2008-10-13  Paolo Bonzini  <bonzini@gnu.org>
115405         fix getaddrinfo emulation for systems with struct sockaddr.sa_len
115406         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Detect
115407         struct sockaddr.sa_len.
115408         * lib/getaddrinfo.c (getaddrinfo): Set it if appropriate.
115410 2008-10-13  Simon Josefsson  <simon@josefsson.org>
115412         * build-aux/pmccabe2html: Add css and css_url parameters.
115414 2008-10-12  Bruno Haible  <bruno@clisp.org>
115416         * tests/test-sameacls.c (main) [AIX]: Clear type argument before
115417         calling aclx_get.
115418         Reported by Rainer Tammer <tammer@tammer.net>.
115420 2008-10-12  Bruno Haible  <bruno@clisp.org>
115422         Use msvcrt aware primitives for creation/termination of Win32 threads.
115423         * lib/glthread/thread.c: Include <process.h>.
115424         (glthread_create_func): Use _beginthreadex instead of CreateThread.
115425         (wrapper_func): Update signature.
115426         (gl_thread_exit_func): Use _endthreadex instead of EndThread.
115428 2008-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
115429             Bruno Haible  <bruno@clisp.org>
115431         Provide a Win32 implementation of the 'cond' module.
115432         * lib/glthread/cond.h [USE_WIN32]: New implementation.
115433         * lib/glthread/cond.c (glthread_cond_init_func,
115434         glthread_cond_wait_func, glthread_cond_timedwait_func,
115435         glthread_cond_signal_func, glthread_cond_broadcast_func,
115436         glthread_cond_destroy_func) [USE_WIN32]: New functions.
115437         * modules/cond (Dependencies): Add gettimeofday.
115439 2008-10-11  Bruno Haible  <bruno@clisp.org>
115441         Make sleep work on older versions of mingw.
115442         * m4/sleep.m4 (gl_FUNC_SLEEP): Test whether 'sleep' is declared, not
115443         only whether it exists.
115444         * doc/posix-functions/sleep.texi: Mention the problem with older
115445         versions of mingw.
115447 2008-10-11  Bruno Haible  <bruno@clisp.org>
115449         New module 'shutdown'.
115450         * modules/shutdown: New file.
115451         * lib/sys_socket.in.h (shutdown): New declaration.
115452         * lib/winsock.c (shutdown): New function.
115453         * m4/sys_socket_h.m4 (gl_SYS_SOCKET_H_DEFAULTS): Initialize
115454         GNULIB_SHUTDOWN.
115455         * modules/sys_socket (Makefile.am): Substitute GNULIB_SHUTDOWN.
115456         * doc/posix-functions/shutdown.texi: Document the new module.
115458 2008-10-11  Jim Meyering  <meyering@redhat.com>
115460         * lib/fclose.c: Fix typo in comment: s/close/fclose/.
115462 2008-10-11  Bruno Haible  <bruno@clisp.org>
115464         New module 'fclose'.
115465         * modules/fclose: New file.
115466         * lib/stdio.in.h (fclose): New declaration.
115467         * lib/fclose.c: New file.
115468         * m4/fclose.m4: New file.
115469         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Initialize GNULIB_FCLOSE,
115470         REPLACE_FCLOSE.
115471         * m4/close.m4 (gl_REPLACE_CLOSE): Invoke gl_REPLACE_FCLOSE.
115472         * modules/stdio (Makefile.am): Substitute GNULIB_FCLOSE,
115473         REPLACE_FCLOSE.
115474         * modules/close (Depends-on): fclose.
115475         * doc/posix-functions/fclose.texi: Mention the problem on Windows.
115477 2008-10-11  Bruno Haible  <bruno@clisp.org>
115479         * lib/winsock.c (_gl_close_fd_maybe_socket): If closesocket fails,
115480         set errno and don't call _close.
115482 2008-10-10  Bruno Haible  <bruno@clisp.org>
115484         * lib/copy-acl.c (qcopy_acl) [CYGWIN]: Call chmod before setting the
115485         ACL, not afterwards. Fixes test failure on Cygwin.
115487 2008-10-09  Ben Pfaff  <blp@gnu.org>
115489         * build-aux/announce-gen: Fix gnulib version related part of usage
115490         message.  Die with a useful error message if no tarballs are
115491         found.
115493 2008-10-10  Jim Meyering  <meyering@redhat.com>
115495         bootstrap: use git's --depth=N option only if it's supported
115496         * build-aux/bootstrap: Work with git-1.4.4.4, which does not
115497         recognize the --depth option.  Reported by Pádraig Brady.
115499 2008-10-09  Bruno Haible  <bruno@clisp.org>
115501         New module 'ioctl'.
115502         * modules/ioctl: New file.
115503         * lib/sys_socket.in.h (ioctl): Remove declaration.
115504         * lib/winsock.c: Include <sys/ioctl.h>.
115505         (rpl_ioctl): Define only of the gnulib module 'ioctl' is present.
115506         * m4/sys_socket_h.m4 (gl_PREREQ_SYS_H_WINSOCK2): Require
115507         gl_SYS_IOCTL_H_DEFAULTS. Set also SYS_IOCTL_H_HAVE_WINSOCK2_H.
115508         * modules/sys_socket (Files): Add m4/sys_ioctl_h.m4.
115509         * doc/posix-functions/ioctl.texi: Mention the new module.
115511 2008-10-09  Bruno Haible  <bruno@clisp.org>
115513         New module 'sys_ioctl'.
115514         * lib/sys_ioctl.in.h: New file.
115515         * m4/sys_ioctl_h.m4: New file.
115516         * modules/sys_ioctl: New file.
115517         * doc/glibc-headers/sys_ioctl.texi: Mention the new module.
115519 2008-10-09  Bruno Haible  <bruno@clisp.org>
115521         * lib/sys_socket.in.h (ioctl): Make signature POSIX compliant.
115522         * lib/winsock.c: Include <stdarg.h>.
115523         (rpl_ioctl): Change to second argument 'int' and then varargs.
115525 2008-10-09  Bruno Haible  <bruno@clisp.org>
115527         * m4/close.m4 (gl_FUNC_CLOSE): Arrange to replace the close() function
115528         when the sys_socket module is present and the system has <winsock2.h>.
115530 2008-10-09  Bruno Haible  <bruno@clisp.org>
115532         * doc/posix-functions/close.texi: Mention module 'close' instead of
115533         module 'sys_socket'.
115535 2008-10-09  Bruno Haible  <bruno@clisp.org>
115537         * doc/glibc-headers/sys_ioctl.texi: New file.
115538         * doc/gnulib.texi: Include it.
115540 2008-10-09  Paolo Bonzini  <bonzini@gnu.org>
115541             Bruno Haible  <bruno@clisp.org>
115543         Combine the two replacements of 'close'.
115544         * lib/sys_socket.in.h (close): Define to a reminder to include
115545         <unistd.h>.
115546         (_gl_close_fd_maybe_socket): New declaration.
115547         (HAVE__GL_CLOSE_FD_MAYBE_SOCKET): New macro.
115548         * lib/winsock.c (close): Remove undefinition.
115549         (_gl_close_fd_maybe_socket): Renamed from rpl_close. Define only when
115550         needed for the gnulib module 'close'.
115551         * lib/unistd.in.h (close): If the gnulib module 'close' is not used,
115552         define to an error symbol or to a warning, if suitable.
115553         * lib/close.c: Include <sys/socket.h>.
115554         (rpl_close): Invoke _gl_close_fd_maybe_socket when gnulib defines it.
115555         * m4/sys_socket_h.m4 (gl_PREREQ_SYS_H_WINSOCK2): Set also
115556         UNISTD_H_HAVE_WINSOCK2_H.
115557         (gl_SYS_SOCKET_H_DEFAULTS): Require gl_UNISTD_H_DEFAULTS.
115558         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize
115559         UNISTD_H_HAVE_WINSOCK2_H.
115560         * modules/sys_socket (Files): Add m4/unistd_h.m4.
115561         (configure.ac): Set a module indicator.
115562         (Makefile.am): Substitute GNULIB_CLOSE.
115563         * modules/unistd (Makefile.am): Substitute UNISTD_H_HAVE_WINSOCK2_H.
115564         * modules/poll-tests (Depends-on): Add close.
115565         * modules/select-tests (Depends-on): Likewise.
115567 2008-10-09  Paolo Bonzini  <bonzini@gnu.org>
115568             Bruno Haible  <bruno@clisp.org>
115570         New module 'close'.
115571         * modules/close: New file.
115572         * lib/unistd.in.h (close): Move declaration out of the
115573         FCHDIR_REPLACEMENT scope.
115574         (_gl_unregister_fd): New declaration.
115575         * lib/close.c: New file.
115576         * lib/fchdir.c (rpl_close): Remove function.
115577         * m4/close.m4: New file.
115578         * m4/fchdir.m4 (gl_FUNC_FCHDIR): When replacing fchdir, also replace
115579         close.
115580         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_CLOSE and
115581         REPLACE_CLOSE.
115582         * modules/unistd (Makefile.am): Substitute GNULIB_CLOSE and
115583         REPLACE_CLOSE.
115584         * modules/fchdir (Depends-on): Add close.
115586 2008-10-09  Paolo Bonzini  <bonzini@gnu.org>
115587             Bruno Haible  <bruno@clisp.org>
115589         * lib/fcntl.in.h (open): Simplify conditionals.
115590         (_gl_register_fd): New declaration.
115591         * lib/fchdir.c (rpl_open): Remove function.
115592         * lib/open.c: When FCHDIR_REPLACEMENT is defined, compile the file
115593         also.
115594         (open): When FCHDIR_REPLACEMENT is defined, invoke _gl_register_fd.
115595         * m4/fchdir.m4 (gl_FUNC_FCHDIR): When replacing fchdir, also replace
115596         open.
115598 2008-10-09  Jim Meyering  <meyering@redhat.com>
115600         GNUmakefile: use the more name-space-friendly "_version"
115601         * top/GNUmakefile (_dummy): Update.
115602         (_version): Rename from "version".
115604 2008-10-09  Paolo Bonzini  <bonzini@gnu.org>
115605             Bruno Haible  <bruno@clisp.org>
115607         * lib/fchdir.c (_gl_unregister_fd): New functions, extracted from
115608         rpl_close.
115609         (_gl_register_fd): New function, extracted from rpl_open.
115610         (rpl_close, rpl_closedir): Use _gl_unregister_fd.
115611         (rpl_open, rpl_opendir): Use _gl_register_fd.
115613 2008-10-09  Paolo Bonzini  <bonzini@gnu.org>
115615         Fix organization of 'open' replacement.
115616         * m4/open.m4 (gl_REPLACE_OPEN): New macro.
115617         (gl_FUNC_OPEN): Use it.
115618         (gl_PREREQ_OPEN): Add a : to make the body non-empty.
115620 2008-10-08  Bruno Haible  <bruno@clisp.org>
115622         * modules/getdate-tests (test_getdata_LDADD): Add LIBINTL.
115624 2008-10-08  Simon Josefsson  <simon@josefsson.org>
115626         * m4/sys_socket_h.m4: Don't AC_LIBOBJ(winsock).  The file is
115627         AC_LIBOBJ'ed by each gnulib module that needs it (e.g., socket,
115628         listen).
115630 2008-10-08  Eric Blake  <ebb9@byu.net>
115632         GNUmakefile: add 'make version' target
115633         * top/GNUmakefile (_curr-ver): Split version update rules...
115634         (version): ...into a target.
115636 2008-10-07  Bruno Haible  <bruno@clisp.org>
115638         Use a more portable replacement expression for -0.0L.
115639         * m4/signbit.m4 (gl_SIGNBIT_TEST_PROGRAM): Use -LDBL_MIN * LDBL_MIN
115640         instead of -0.0L. Fix m4 quotation.
115642         * tests/test-signbit.c: Include <float.h>.
115643         (minus_zero): New variable.
115644         (test_signbitl): Use minus_zero instead of -zero.
115645         * modules/signbit-tests (Depends-on): Add float.
115647         * tests/test-ceill.c: Include <float.h>.
115648         (zero): Remove variable.
115649         (minus_zero): New variable.
115650         (main): Use minus_zero instead of -zero.
115651         * modules/ceill-tests (Depends-on): Add float.
115653         * tests/test-floorl.c: Include <float.h>.
115654         (zero): Remove variable.
115655         (minus_zero): New variable.
115656         (main): Use minus_zero instead of -zero.
115657         * modules/floorl-tests (Depends-on): Add float.
115659         * tests/test-roundl.c: Include <float.h>.
115660         (zero): Remove variable.
115661         (minus_zero): New variable.
115662         (main): Use minus_zero instead of -zero.
115663         * modules/roundl-tests (Depends-on): Add float.
115665         * tests/test-truncl.c: Include <float.h>.
115666         (zero): Remove variable.
115667         (minus_zero): New variable.
115668         (main): Use minus_zero instead of -zero.
115669         * modules/truncl-tests (Depends-on): Add float.
115671         * tests/test-frexpl.c (zero): Remove variable.
115672         (minus_zero): New variable.
115673         (main): Use minus_zero instead of -zero.
115674         * modules/frexpl-tests (Depends-on): Add float.
115676         * tests/test-isnan.c (zerol): Remove variable.
115677         (minus_zerol): New variable.
115678         (test_long_double): Use minus_zerol instead of -zerol.
115679         * modules/isnan-tests (Depends-on): Add float.
115681         * tests/test-isnanl.h (zero): Remove variable.
115682         (minus_zero): New variable.
115683         (main): Use minus_zero instead of -zero.
115684         * modules/isnanl-nolibm-tests (Depends-on): Add float.
115685         * modules/isnanl-tests (Depends-on): Add float.
115687         * tests/test-ldexpl.c (zero): Remove variable.
115688         (minus_zero): New variable.
115689         (main): Use minus_zero instead of -zero.
115690         * modules/ldexpl-tests (Depends-on): Add float.
115692         * tests/test-snprintf-posix.h (zerol): Remove variable.
115693         (minus_zerol): New variable.
115694         (test_function): Use minus_zerol instead of -zerol.
115695         * modules/snprintf-posix-tests (Depends-on): Add float.
115696         * modules/vsnprintf-posix-tests (Depends-on): Add float.
115698         * tests/test-sprintf-posix.h (zerol): Remove variable.
115699         (minus_zerol): New variable.
115700         (test_function): Use minus_zerol instead of -zerol.
115701         * modules/sprintf-posix-tests (Depends-on): Add float.
115702         * modules/vsprintf-posix-tests (Depends-on): Add float.
115704         * tests/test-vasnprintf-posix.c (zerol): Remove variable.
115705         (minus_zerol): New variable.
115706         (test_function): Use minus_zerol instead of -zerol.
115707         * modules/vasnprintf-posix-tests (Depends-on): Add float.
115709         * tests/test-vasprintf-posix.c (zerol): Remove variable.
115710         (minus_zerol): New variable.
115711         (test_function): Use minus_zerol instead of -zerol.
115712         * modules/vasprintf-posix-tests (Depends-on): Add float.
115714 2008-10-07  Simon Josefsson  <simon@josefsson.org>
115716         * MODULES.html.sh (Support for building documentation): Mention
115717         pmccabe2html.  Sort entries.
115719         Add pmccabe2html module, from gnupdf.
115720         * build-aux/pmccabe.css: New file.
115721         * build-aux/pmccabe2html: New file.
115722         * m4/pmccabe2html.m4: New file.
115723         * modules/pmccabe2html: New file.
115725 2008-10-07  Richard W.M. Jones  <rjones@redhat.com>
115727         flock: new module
115728         * MODULES.html.sh: Add to list of modules.
115729         * lib/flock.c: flock implementation for Windows and Unix systems
115730         which have fcntl.
115731         * doc/glibc-functions/flock.texi: Update documentation.
115732         * lib/sys_file.in.h: <sys/file.h> header file.
115733         * m4/flock.m4: M4 macros.
115734         * m4/sys_file_h.m4: M4 macros for replacement sys/file.h.
115735         * modules/flock: flock module.
115736         * modules/flock-tests: flock tests module.
115737         * modules/sys_file: sys/file.h module.
115738         * tests/test-flock.c: test suite for flock.
115740 2008-10-06  Jim Meyering  <meyering@redhat.com>
115742         bootstrap: check for LT_INIT more portably still ;-)
115743         * build-aux/bootstrap: Don't rely on \>, since it's not portable.
115744         Spotted by Bruno Haible.
115746 2008-10-06  Eric Blake  <ebb9@byu.net>
115748         test-signbit: avoid tripping Irix cc bug on -0.0L
115749         * tests/test-signbit.c (minus_zerol): Delete, and replace with
115750         '-zerol'.  This may break on HP-UX/hppa, but at least makes the
115751         entire testsuite consistent and avoids an Irix 6.2 bug.
115753 2008-10-05  Bruno Haible  <bruno@clisp.org>
115754             Jim Meyering  <jim@meyering.net>
115756         Add an option for ignoring EPIPE during close_stdout.
115757         * lib/closeout.h: Include <stdbool.h>.
115758         (close_stdout_set_ignore_EPIPE): New declaration.
115759         * lib/closeout.c: Include <stdbool.h>.
115760         (ignore_EPIPE): New variable.
115761         (close_stdout_set_ignore_EPIPE): New function.
115762         (close_stdout): Ignore EPIPE error if ignore_EPIPE is set.
115763         * lib/close-stream.c (close_stream): Mention the possible EPIPE
115764         failure.
115765         * modules/closeout (Depends-on): Add stdbool.
115767 2008-10-05  Bruno Haible  <bruno@clisp.org>
115769         * modules/accept: New file.
115770         * modules/bind: New file.
115771         * modules/connect: New file.
115772         * modules/getpeername: New file.
115773         * modules/getsockname: New file.
115774         * modules/getsockopt: New file.
115775         * modules/listen: New file.
115776         * modules/recv: New file.
115777         * modules/recvfrom: New file.
115778         * modules/send: New file.
115779         * modules/sendto: New file.
115780         * modules/setsockopt: New file.
115781         * modules/socket: New file.
115782         * lib/sys_socket.in.h: Include the GL_LINK_WARNING definition.
115783         (socket, connect, accept, bind, getpeername, getsockname, getsockopt,
115784         listen, recv, send, recvfrom, sendto, setsockopt): Declare only when
115785         the particular module is requested. Add a link warning when the
115786         particular module is not requested.
115787         * lib/winsock.c (rpl_socket, rpl_connect, rpl_accept, rpl_bind,
115788         rpl_getpeername, rpl_getsockname, rpl_getsockopt, rpl_listen, rpl_recv,
115789         rpl_send, rpl_recvfrom, rpl_sendto, rpl_setsockopt): Define only when
115790         the particular module is requested.
115791         * m4/sys_socket_h.m4 (gl_SYS_SOCKET_MODULE_INDICATOR,
115792         gl_SYS_SOCKET_H_DEFAULTS): New macros.
115793         (gl_HEADER_SYS_SOCKET): Require gl_SYS_SOCKET_H_DEFAULTS.
115794         * modules/sys_socket (Depends-on): Add link-warning.
115795         (Makeifle.am): Substitute GNULIB_SOCKET, GNULIB_CONNECT, GNULIB_ACCEPT,
115796         GNULIB_BIND, GNULIB_GETPEERNAME, GNULIB_GETSOCKNAME, GNULIB_GETSOCKOPT,
115797         GNULIB_LISTEN, GNULIB_RECV, GNULIB_SEND, GNULIB_RECVFROM,
115798         GNULIB_SENDTO, GNULIB_SETSOCKOPT, and the definition of
115799         GL_LINK_WARNING.
115800         * doc/posix-functions/accept.texi: Mention the new module 'accept'.
115801         * doc/posix-functions/bind.texi: Mention the new module 'bind'.
115802         * doc/posix-functions/connect.texi: Mention the new module 'connect'.
115803         * doc/posix-functions/getpeername.texi: Mention the new module
115804         'getpeername'.
115805         * doc/posix-functions/getsockname.texi: Mention the new module
115806         'getsockname'.
115807         * doc/posix-functions/getsockopt.texi: Mention the new module
115808         'getsockopt'.
115809         * doc/posix-functions/listen.texi: Mention the new module 'listen'.
115810         * doc/posix-functions/recv.texi: Mention the new module 'recv'.
115811         * doc/posix-functions/recvfrom.texi: Mention the new module 'recvfrom'.
115812         * doc/posix-functions/send.texi: Mention the new module 'send'.
115813         * doc/posix-functions/sendto.texi: Mention the new module 'sendto'.
115814         * doc/posix-functions/setsockopt.texi: Mention the new module
115815         'setsockopt'.
115816         * doc/posix-functions/socket.texi: Mention the new module 'socket'.
115817         * modules/poll-tests (Depends-on): Add socket, bind, getsockopt,
115818         listen, connect, accept.
115819         * modules/select-tests (Depends-on): Likewise.
115821 2008-10-05  Bruno Haible  <bruno@clisp.org>
115823         * lib/winsock.c (strerror): Remove unused #undef.
115824         (rpl_close): Remove unused local variable.
115826         * modules/sys_socket (Depends-on); Add errno.
115828 2008-10-05  Bruno Haible  <bruno@clisp.org>
115830         * lib/sys_select.in.h: Include the GL_LINK_WARNING definition.
115831         (select): Add a link warning when the 'select' module is not used.
115832         * modules/sys_select (Depends-on): Add link-warning.
115833         (Makefile.am): Substitute the definition of GL_LINK_WARNING.
115834         Suggested by Paolo Bonzini.
115836 2008-10-05  Jim Meyering  <meyering@redhat.com>
115838         bootstrap: check for LT_INIT more portably
115839         * build-aux/bootstrap: Avoid using grep -E, since it's not
115840         portable enough.  Suggestion from Bruno Haible.
115842 2008-10-05  Bruno Haible  <bruno@clisp.org>
115844         * doc/posix-headers/sys_select.texi: Mention 'struct timeval' problem
115845         as being fixed by gnulib.
115847 2008-10-05  Bruno Haible  <bruno@clisp.org>
115849         * modules/select-tests: New file, mostly copied from
115850         modules/sys_select-tests.
115851         * tests/test-select.c: New file, mostly copied from
115852         tests/test-sys_select.c.
115853         * tests/test-sys_select.c: Move most of the code to tests/test-select.c.
115854         * modules/sys_select-tests (Depends-on): Remove all dependencies.
115855         (Makefile.am): Remove test_sys_select_LDADD.
115857         * lib/sys_select.in.h (select): If GNULIB_SELECT is not set, define it
115858         to an undefined symbol, for an error message.
115859         * m4/sys_select_h.m4 (gl_SYS_SELECT_MODULE_INDICATOR): New macro.
115860         (gl_SYS_SELECT_H_DEFAULTS): New macro.
115861         (gl_HEADER_SYS_SELECT): Require it. Don't require compilation of
115862         winsock-select.c here.
115863         * modules/sys_select (Files): Remove lib/winsock-select.c.
115864         (Depends-on): Remove alloca.
115865         (Makefile.am): Substitute GNULIB_SELECT.
115866         * modules/select: New file.
115867         * doc/posix-functions/select.texi: Update.
115869 2008-10-05  Bruno Haible  <bruno@clisp.org>
115871         * lib/spawn_faction_addclose.c (__sysconf): Use getdtablesize always.
115872         * lib/spawn_faction_adddup2.c (__sysconf): Likewise.
115873         * lib/spawn_faction_addopen.c (__sysconf): Likewise.
115874         * modules/posix_spawn_file_actions_addclose (Depends-on): Add
115875         getdtablesize.
115876         * modules/posix_spawn_file_actions_adddup2 (Depends-on): Likewise.
115877         * modules/posix_spawn_file_actions_addopen (Depends-on): Likewise.
115879 2008-10-05  Bruno Haible  <bruno@clisp.org>
115881         * modules/getdtablesize-tests: New file.
115882         * tests/test-getdtablesize.c: New file.
115884         New module 'getdtablesize'.
115885         * lib/unistd.in.h (getdtablesize): New declaration.
115886         * lib/getdtablesize.c: New file.
115887         * m4/getdtablesize.m4: New file.
115888         * modules/getdtablesize: New file.
115889         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize
115890         GNULIB_GETDTABLESIZE, HAVE_GETDTABLESIZE.
115891         * modules/unistd (Makefile.am): Substitute GNULIB_GETDTABLESIZE,
115892         HAVE_GETDTABLESIZE.
115893         * doc/glibc-functions/getdtablesize.texi: Mention the new module.
115895 2008-10-05  Bruno Haible  <bruno@clisp.org>
115897         * modules/sched (Makefile.am): Fix typo.
115898         Reported by Simon Josefsson.
115900 2008-10-05  Jim Meyering  <meyering@redhat.com>
115902         bootstrap: check for LT_INIT, too
115903         * build-aux/bootstrap: Both AC_PROG_LIBTOOL and AM_PROG_LIBTOOL
115904         are deprecated.  Suggestion from Ralf Wildenhues.
115906 2008-10-05  Bruno Haible  <bruno@clisp.org>
115908         * lib/spawn.in.h (POSIX_SPAWN_*): Use the system's values, rather than
115909         overriding them by ours.
115910         (POSIX_SPAWN_USEVFORK): Use the next free bit position.
115912 2008-10-05  Jim Meyering  <meyering@redhat.com>
115914         bootstrap: check for AC_PROG_LIBTOOL as well as AM_PROG_LIBTOOL
115915         * build-aux/bootstrap: Check for AC_PROG_LIBTOOL, as well as the
115916         obsolete AM_PROG_LIBTOOL.  Spotted by Debarshi Ray <rishi@gnu.org>.
115918 2008-10-04  Bruno Haible  <bruno@clisp.org>
115920         * modules/dup2 (License): Change to LGPLv2+.
115921         * modules/sleep (License): Likewise.
115922         * modules/perror (License): Likewise.
115923         * modules/fopen (License): Change to LGPLv2+, with approval by Eric
115924         Blake.
115925         * modules/signal (License): Likewise.
115926         * modules/sigprocmask (License): Likewise.
115927         * modules/raise (License): Change to LGPLv2+, with approval by Jim
115928         Meyering.
115930 2008-10-04  Bruno Haible  <bruno@clisp.org>
115932         * lib/spawn.in.h (POSIX_SPAWN_*): Undefine before redefining.
115933         Reported by Rainer Tammer <tammer@tammer.net>.
115935 2008-10-03  Paolo Bonzini  <bonzini@gnu.org>
115936             Bruno Haible  <bruno@clisp.org>
115938         * lib/errno.in.h (EWOULDBLOCK) [win32]: Define to EAGAIN.
115939         * lib/winsock.c (set_winsock_errno): Map WSAEWOULDBLOCK to EWOULDBLOCK.
115940         * lib/strerror.c (rpl_strerror): Remove error string for EWOULDBLOCK.
115942 2008-10-03  Kamil Dudka  <kdudka@redhat.com>
115944         filevercmp: new module
115945         * lib/filevercmp.h: New function filevercmp comparing version strings.
115946         * lib/filevercmp.c: Implementation of filevercmp function.
115947         * modules/filevercmp: Module metadata.
115948         * tests/test-filevercmp.c: Unit test for new module.
115949         * modules/filevercmp-tests: Unit test metadata.
115950         * MODULES.html.sh: Add filevercmp module.
115952 2008-10-03  Bruno Haible  <bruno@clisp.org>
115954         * lib/c-ctype.h: Add comment.
115955         Reported by Jim Meyering.
115957 2008-10-02  Bruno Haible  <bruno@clisp.org>
115959         * modules/posix_spawn-internal (Depends-on): Add 'open'.
115961 2008-10-02  Paolo Bonzini  <bonzini@gnu.org>
115963         * build-aux/bootstrap: Allow renaming bootstrap, and change the
115964         name of bootstrap.conf accordingly.
115966 2008-10-02  Paolo Bonzini  <bonzini@gnu.org>
115968         * build-aux/bootstrap: Install git-merge-changelog configuration
115969         items into .gitconfig if needed.
115971 2008-10-02  Paolo Bonzini  <bonzini@gnu.org>
115973         * build-aux/bootstrap: Recognize `gnulib' being a submodule in a
115974         git repository, and initialize/update it accordingly.
115976 2008-10-02  Richard W.M. Jones  <rjones@redhat.com>
115978         * modules/fsync-tests: New file.
115979         * tests/test-fsync.c: New file.
115981         New module 'fsync'.
115982         * lib/fsync.c: New file.
115983         * m4/fsync.m4: New file.
115984         * modules/fsync: New file.
115985         * lib/unistd.in.h (fsync): New declaration.
115986         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Define and AC_SUBST both
115987         GNULIB_FSYNC and HAVE_FSYNC.
115988         * modules/unistd: Substitute GNULIB_FSYNC and HAVE_FSYNC.
115989         * MODULES.html.sh (posix_functions): Add fsync.
115990         * doc/posix-functions/fsync.texi: Mention the new module.
115992 2008-10-02  Jim Meyering  <meyering@redhat.com>
115994         fts.c: sync with similar code from coreutils' remove.c
115995         * lib/fts.c (dirent_inode_sort_may_be_useful): Merge from coreutils.
115996         Guard also with "#if defined __linux__", since for now at least,
115997         this code is Linux-kernel-specific.
115999 2008-10-02  Jim Meyering  <meyering@redhat.com>
116001         fts: bug fixes
116002         * lib/fts.c: Remove unnecessary "defined" in cpp directive.
116003         Include <sys/vfs.h>, not <sys/statfs.h>.
116005         * m4/fts.m4 (gl_FUNC_FTS_CORE): Fix typo s/vfs/vfs.h/.
116006         Include <sys/vfs.h>, not <sys/statfs.h>.
116008 2008-10-01  Bruno Haible  <bruno@clisp.org>
116010         Avoid the broken posix_spawn function on AIX 5.3 and 6.1.
116011         * m4/posix_spawn.m4 (gl_POSIX_SPAWN_WORKS): New macro.
116012         (gl_POSIX_SPAWN_BODY): Invoke it. Set REPLACE_POSIX_SPAWN if needed.
116013         * doc/posix-functions/posix_spawn.texi: Mention the AIX bugs.
116014         * doc/posix-functions/posix_spawnp.texi: Likewise.
116015         * m4/execute.m4 (gl_EXECUTE): Invoke gl_POSIX_SPAWN_WORKS, to check
116016         whether posix_spawn actually works.
116017         * m4/pipe.m4 (gl_PIPE): Likewise.
116018         * modules/execute (Files): Add m4/posix_spawn.m4.
116019         * modules/pipe (Files): Add m4/posix_spawn.m4.
116020         Reported and analyzed by Rainer Tammer <tammer@tammer.net>.
116022 2008-10-01  Jim Meyering  <meyering@redhat.com>
116024         remove trailing spaces
116025         * NEWS: Likewise.
116026         * lib/poll.c (poll): Likewise.
116027         * lib/sys_socket.in.h (SHUT_RDWR): Likewise.
116028         * lib/winsock.c (rpl_close): Likewise.
116029         * m4/memcmp.m4 (gl_FUNC_MEMCMP): Likewise.
116030         * modules/yield: Likewise.
116031         * tests/test-poll.c (connect_to_socket, poll1): Likewise.
116032         * tests/test-sys_select.c (connect_to_socket): Likewise.
116034         fts.c: adjust a new interface to be more generally useful
116035         * lib/fts.c (dirent_inode_sort_may_be_useful): Take an FD parameter.
116036         (fts_build): Adjust caller.
116038 2008-09-30  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
116040         * modules/cond-tests: New file.
116041         * tests/test-cond.c: New file.
116043 2008-09-30  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
116044             Bruno Haible  <bruno@clisp.org>
116046         * modules/cond (Dependencies): Add errno, time.
116047         * lib/glthread/cond.h: Include <time.h>.
116048         (gl_cond_define, gl_cond_define_initialized): Use the same definition
116049         across platforms.
116051 2008-09-30  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
116052             Bruno Haible  <bruno@clisp.org>
116054         * m4/thread.m4 (gl_THREAD): Fix detection of pthread_atfork function.
116056 2008-09-30  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
116057             Bruno Haible  <bruno@clisp.org>
116059         * modules/tls-tests (Depends-on): Add thread, yield.
116060         (configure.ac): Remove all checks.
116061         (test_tls_LDADD): Use YIELD_LIB instead of LIBSCHED.
116062         * tests/test-tls.c (gl_thread_t, gl_thread_join, gl_thread_yield,
116063         gl_thread_self): Remove definitions. Include glthread/thread.h and
116064         glthread/yield.h instead.
116065         (test_tls): Pass an additional NULL argument to gl_thread_join.
116067 2008-09-30  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
116068             Bruno Haible  <bruno@clisp.org>
116070         * modules/lock-tests (Depends-on): Add thread, yield.
116071         (configure.ac): Remove all checks.
116072         (test_lock_LDADD): Use YIELD_LIB instead of LIBSCHED.
116073         * tests/test-lock.c (gl_thread_t, gl_thread_join, gl_thread_yield,
116074         gl_thread_self): Remove definitions. Include glthread/thread.h and
116075         glthread/yield.h instead.
116076         (test_lock, test_rwlock, test_recursive_lock, test_once): Pass an
116077         additional NULL argument to gl_thread_join.
116079 2008-09-30  Bruno Haible  <bruno@clisp.org>
116081         Fix the Win32 implementation of the 'thread' module.
116082         * lib/glthread/thread.h [USE_WIN32_THREADS] (gl_thread_t): Change to a
116083         pointer type.
116084         (gl_thread_self): Invoke gl_thread_self_func.
116085         (gl_thread_self_func): New declaration.
116086         * lib/glthread/thread.c [USE_WIN32_THREADS] (self_key): New variable.
116087         (do_init_self_key, init_self_key): New functions.
116088         (struct gl_thread_struct): Renamed from 'struct thread_extra'.
116089         Remove some fields.
116090         (running_threads, running_lock): Remove variables.
116091         (get_current_thread_handle): New function.
116092         (gl_thread_self_func, wrapper_func, glthread_create_func,
116093         glthread_join_func, gl_thread_exit_func): Largely rewritten and
116094         simplified.
116096 2008-09-30  Bruno Haible  <bruno@clisp.org>
116098         * lib/winsock-select.c (win32_poll_handle): Add shortcut for regular
116099         files.
116101 2008-09-30  Jim Meyering  <meyering@redhat.com>
116103         fts.m4: correct the test for statfs.f_type
116104         * m4/fts.m4 (gl_FUNC_FTS_CORE): Include <sys/statfs.h>
116105         when checking for statfs.f_type.
116107 2008-09-15  Simon Josefsson  <simon@josefsson.org>
116109         tests: avoid some compiler warnings
116110         * tests/test-memchr.c (main): Pass NULL indirectly.
116111         * tests/test-getdate.c (main): Remove unused variable 'ret'.
116113 2008-09-29  Ondřej Vašík  <ovasik@redhat.com>
116115         getdate.y: disallow countable dayshifts like "4 yesterday ago"
116116         * lib/getdate.y (relative_time_table) [tDAY_SHIFT]: New type for
116117         exactly specified dayshifts.
116118         (dayshift): New rule.
116119         (rel): Add dayshift.
116120         (relative_time_table) [tomorrow, yesterday, today, now]:
116121         Use tDAY_SHIFT in place of tDAY_UNIT.
116122         * tests/test-getdate.c: Add tests for now-disallowed countable
116123         dayshifts, e.g., "4 yesterday ago".
116125 2008-09-29  Bruno Haible  <bruno@clisp.org>
116127         * tests/test-posix_spawn1.c: Renamed from tests/test-posix_spawn.c.
116128         * tests/test-posix_spawn1.in.sh: Renamed from
116129         tests/test-posix_spawn.in.sh.
116130         * tests/test-posix_spawn2.c: New file.
116131         * tests/test-posix_spawn2.in.sh: New file.
116132         * modules/posix_spawnp-tests (Files): Update.
116133         (Makefile.am): Update. Add test-posix_spawn2 to the tests.
116135 2008-09-29  Bruno Haible  <bruno@clisp.org>
116137         Propagate effects of putenv/setenv/unsetenv to child processes.
116138         * lib/execute.c (execute): Use spawnvpe instead of spawnvp.
116139         * lib/pipe.c (create_pipe): Likewise.
116141 2008-09-29  Bruno Haible  <bruno@clisp.org>
116143         Enable use of shell scripts as executables in mingw.
116144         * lib/execute.c (execute): When spawnv fails with error ENOEXEC,
116145         run the program as a shell script.
116146         * lib/pipe.c (create_pipe): Likewise.
116147         * lib/w32spawn.h (prepare_spawn): Add a hidden element in front of the
116148         resulting array.
116150 2008-09-29  Eric Blake  <ebb9@byu.net>
116152         * m4/arpa_inet_h.m4 (gl_REPLACE_ARPA_INET_H): Fix typo.
116154 2008-08-24  Paolo Bonzini  <bonzini@gnu.org>
116156         * doc/posix-functions/accept.texi: Update mingw problems.
116157         * doc/posix-functions/bind.texi: Update mingw problems.
116158         * doc/posix-functions/close.texi: Update mingw problems.
116159         * doc/posix-functions/connect.texi: Update mingw problems.
116160         * doc/posix-functions/getpeername.texi: Update mingw problems.
116161         * doc/posix-functions/getsockname.texi: Update mingw problems.
116162         * doc/posix-functions/getsockopt.texi: Update mingw problems.
116163         * doc/posix-functions/ioctl.texi: Update mingw problems.
116164         * doc/posix-functions/listen.texi: Update mingw problems.
116165         * doc/posix-functions/recv.texi: Update mingw problems.
116166         * doc/posix-functions/recvfrom.texi: Update mingw problems.
116167         * doc/posix-functions/select.texi: Update mingw problems.
116168         * doc/posix-functions/send.texi: Update mingw problems.
116169         * doc/posix-functions/sendto.texi: Update mingw problems.
116170         * doc/posix-functions/setsockopt.texi: Update mingw problems.
116171         * doc/posix-functions/socket.texi: Update mingw problems.
116173 2008-09-29  Paolo Bonzini  <bonzini@gnu.org>
116174             Bruno Haible  <bruno@clisp.org>
116176         * lib/sys_select.in.h: Include sys/time.h.
116177         * m4/sys_select.h.m4: Test that struct timeval is fully defined.
116178         * modules/sys_select: Depend on sys_time.
116179         * tests/test-sys_select.c: Test that sys/select.h defines struct
116180         timeval fully.
116182 2008-09-29  Bruno Haible  <bruno@clisp.org>
116184         * lib/sys_socket.in.h: Wrap the definitions in 'extern "C"'.
116185         * lib/sys_select.in.h: Likewise.
116187 2008-09-29  Bruno Haible  <bruno@clisp.org>
116189         * lib/winsock.c (rpl_close, rpl_socket): Remove unused variables.
116191 2008-09-29  Bruno Haible  <bruno@clisp.org>
116193         * m4/sockets.m4 (gl_SOCKETS): Check also for the need to use -lsocket.
116194         Set LIBSOCKET instead of augmenting LIBS.
116195         * modules/sockets (Link): New section.
116196         * modules/sockets-tests (test_sockets_LDADD): New variable.
116197         * modules/sys_select-tests (test_sys_select_LDADD): New variable.
116198         * modules/poll-tests (test_poll_LDADD): New variable.
116199         * NEWS: Document the change.
116201 2008-09-29  Bruno Haible  <bruno@clisp.org>
116203         * m4/arpa_inet_h.m4 (gl_REPLACE_ARPA_INET_H): New macro.
116204         * m4/inet_ntop.m4 (gl_INET_NTOP): Invoke it instead of assigning
116205         ARPA_INET_H directly.
116206         * m4/inet_pton.m4 (gl_INET_PTON): Likewise.
116208 2008-09-28  Bruno Haible  <bruno@clisp.org>
116210         * m4/sys_socket_h.m4 (gl_PREREQ_SYS_H_WINSOCK2): New macro, extracted
116211         from gl_HEADER_SYS_SOCKET.
116212         (gl_HEADER_SYS_SOCKET): Invoke it.
116213         * m4/sys_select_h.m4 (gl_HEADER_SYS_SELECT): Likewise.
116215 2008-09-28  Bruno Haible  <bruno@clisp.org>
116217         * doc/posix-headers/sys_select.texi: Mention 'struct timeval' problem.
116218         * tests/test-sys_select.c: Include <sys/time.h>, for struct timeval.
116219         Needed on OSF/1 4.0.
116221 2008-09-28  Bruno Haible  <bruno@clisp.org>
116223         Override open more carefully.
116224         * lib/open.c (orig_open): New function.
116225         (rpl_open): Use orig_open instead of open.
116226         * lib/fcntl.in.h: Add special invocation convention.
116227         * m4/open.m4 (gl_PREREQ_OPEN): New macro.
116228         (gl_FUNC_OPEN): Invoke it.
116230         Override freopen more carefully.
116231         * lib/freopen.c (orig_freopen): New function.
116232         (rpl_freopen): Use orig_freopen instead of freopen.
116233         * m4/freopen.m4 (gl_PREREQ_FREOPEN): New macro.
116234         (gl_FUNC_FREOPEN): Invoke it.
116236         Override fopen more carefully.
116237         * lib/fopen.c (orig_fopen): New function.
116238         (rpl_fopen): Use orig_fopen instead of fopen.
116239         * m4/fopen.m4 (gl_PREREQ_FOPEN): New macro.
116240         (gl_FUNC_FOPEN): Invoke it.
116241         Needed on AIX. Reported by Rainer Tammer <tammer@tammer.net>.
116243 2008-09-28  Bruno Haible  <bruno@clisp.org>
116245         * lib/pipe.h (create_pipe_out, create_pipe_bidi): Add comment about
116246         SIGPIPE.
116248 2008-09-28  Bruno Haible  <bruno@clisp.org>
116250         * tests/test-sigaction.c (handler, main): Disable the check whether
116251         SA_RESETHAND has reverted the installed handler to SIG_DFL. Needed on
116252         glibc systems with LinuxThreads.
116254 2008-09-28  Bruno Haible  <bruno@clisp.org>
116256         * doc/posix-functions/freopen.texi: Mention the trailing slash problem.
116258         * lib/stdio.in.h (fopen, freopen): Undefine before redefining. Needed
116259         with AIX xlc.
116260         * lib/fcntl.in.h (open): Likewise.
116261         Reported by Rainer Tammer <tammer@tammer.net>.
116263 2008-09-28  Bruno Haible  <bruno@clisp.org>
116265         * modules/posix_spawnp-tests: New file.
116266         * tests/test-posix_spawn.c: New file.
116267         * tests/test-posix_spawn.in.sh: New file.
116269         New module 'posix_spawnp'.
116270         * modules/posix_spawnp: New file.
116271         * lib/spawnp.c: New file, from GNU libc with modifications.
116272         * doc/posix-functions/posix_spawnp.texi: Mention the new module.
116274         New module 'posix_spawn'.
116275         * modules/posix_spawn: New file.
116276         * lib/spawn.c: New file, from GNU libc with modifications.
116277         * doc/posix-functions/posix_spawn.texi: Mention the new module.
116279         New module 'posix_spawnattr_destroy'.
116280         * modules/posix_spawnattr_destroy: New file.
116281         * lib/spawnattr_destroy.c: New file, from GNU libc with modifications.
116282         * doc/posix-functions/posix_spawnattr_destroy.texi: Mention the new
116283         module.
116285         New module 'posix_spawnattr_setsigmask'.
116286         * modules/posix_spawnattr_setsigmask: New file.
116287         * lib/spawnattr_setsigmask.c: New file, from GNU libc with
116288         modifications.
116289         * doc/posix-functions/posix_spawnattr_setsigmask.texi: Mention the
116290         new module.
116292         New module 'posix_spawnattr_getsigmask'.
116293         * modules/posix_spawnattr_getsigmask: New file.
116294         * lib/spawnattr_getsigmask.c: New file, from GNU libc with
116295         modifications.
116296         * doc/posix-functions/posix_spawnattr_getsigmask.texi: Mention the
116297         new module.
116299         New module 'posix_spawnattr_setsigdefault'.
116300         * modules/posix_spawnattr_setsigdefault: New file.
116301         * lib/spawnattr_setdefault.c: New file, from GNU libc with
116302         modifications.
116303         * doc/posix-functions/posix_spawnattr_setsigdefault.texi: Mention the
116304         new module.
116306         New module 'posix_spawnattr_getsigdefault'.
116307         * modules/posix_spawnattr_getsigdefault: New file.
116308         * lib/spawnattr_getdefault.c: New file, from GNU libc with
116309         modifications.
116310         * doc/posix-functions/posix_spawnattr_getsigdefault.texi: Mention the
116311         new module.
116313         New module 'posix_spawnattr_setschedpolicy'.
116314         * modules/posix_spawnattr_setschedpolicy: New file.
116315         * lib/spawnattr_setschedpolicy.c: New file, from GNU libc with
116316         modifications.
116317         * doc/posix-functions/posix_spawnattr_setschedpolicy.texi: Mention the
116318         new module.
116320         New module 'posix_spawnattr_getschedpolicy'.
116321         * modules/posix_spawnattr_getschedpolicy: New file.
116322         * lib/spawnattr_getschedpolicy.c: New file, from GNU libc with
116323         modifications.
116324         * doc/posix-functions/posix_spawnattr_getschedpolicy.texi: Mention the
116325         new module.
116327         New module 'posix_spawnattr_setschedparam'.
116328         * modules/posix_spawnattr_setschedparam: New file.
116329         * lib/spawnattr_setschedparam.c: New file, from GNU libc with
116330         modifications.
116331         * doc/posix-functions/posix_spawnattr_setschedparam.texi: Mention the
116332         new module.
116334         New module 'posix_spawnattr_getschedparam'.
116335         * modules/posix_spawnattr_getschedparam: New file.
116336         * lib/spawnattr_getschedparam.c: New file, from GNU libc with
116337         modifications.
116338         * doc/posix-functions/posix_spawnattr_getschedparam.texi: Mention the
116339         new module.
116341         New module 'posix_spawnattr_setpgroup'.
116342         * modules/posix_spawnattr_setpgroup: New file.
116343         * lib/spawnattr_setpgroup.c: New file, from GNU libc with
116344         modifications.
116345         * doc/posix-functions/posix_spawnattr_setpgroup.texi: Mention the new
116346         module.
116348         New module 'posix_spawnattr_getpgroup'.
116349         * modules/posix_spawnattr_getpgroup: New file.
116350         * lib/spawnattr_getpgroup.c: New file, from GNU libc with
116351         modifications.
116352         * doc/posix-functions/posix_spawnattr_getpgroup.texi: Mention the new
116353         module.
116355         New module 'posix_spawnattr_setflags'.
116356         * modules/posix_spawnattr_setflags: New file.
116357         * lib/spawnattr_setflags.c: New file, from GNU libc with modifications.
116358         * doc/posix-functions/posix_spawnattr_setflags.texi: Mention the new
116359         module.
116361         New module 'posix_spawnattr_getflags'.
116362         * modules/posix_spawnattr_getflags: New file.
116363         * lib/spawnattr_getflags.c: New file, from GNU libc with modifications.
116364         * doc/posix-functions/posix_spawnattr_getflags.texi: Mention the new
116365         module.
116367         New module 'posix_spawnattr_init'.
116368         * modules/posix_spawnattr_init: New file.
116369         * lib/spawnattr_init.c: New file, from GNU libc with modifications.
116370         * doc/posix-functions/posix_spawnattr_init.texi: Mention the new
116371         module.
116373         New module 'posix_spawn_file_actions_destroy'.
116374         * modules/posix_spawn_file_actions_destroy: New file.
116375         * lib/spawn_faction_destroy.c: New file, from GNU libc with
116376         modifications.
116377         * doc/posix-functions/posix_spawn_file_actions_destroy.texi: Mention
116378         the new module.
116380         New module 'posix_spawn_file_actions_addopen'.
116381         * modules/posix_spawn_file_actions_addopen: New file.
116382         * lib/spawn_faction_addopen.c: New file, from GNU libc with
116383         modifications.
116384         * doc/posix-functions/posix_spawn_file_actions_addopen.texi: Mention
116385         the new module.
116387         New module 'posix_spawn_file_actions_adddup2'.
116388         * modules/posix_spawn_file_actions_adddup2: New file.
116389         * lib/spawn_faction_adddup2.c: New file, from GNU libc with
116390         modifications.
116391         * doc/posix-functions/posix_spawn_file_actions_adddup2.texi: Mention
116392         the new module.
116394         New module 'posix_spawn_file_actions_addclose'.
116395         * modules/posix_spawn_file_actions_addclose: New file.
116396         * lib/spawn_faction_addclose.c: New file, from GNU libc with
116397         modifications.
116398         * doc/posix-functions/posix_spawn_file_actions_addclose.texi: Mention
116399         the new module.
116401         New module 'posix_spawn_file_actions_init'.
116402         * modules/posix_spawn_file_actions_init: New file.
116403         * lib/spawn_faction_init.c: New file, from GNU libc with modifications.
116404         * doc/posix-functions/posix_spawn_file_actions_init.texi: Mention the
116405         new module.
116407         New module 'posix_spawn-internal'.
116408         * modules/posix_spawn-internal: New file.
116409         * lib/spawn_int.h: New file, from GNU libc with modifications.
116410         * lib/spawni.c: New file, from GNU libc with modifications.
116411         * m4/posix_spawn.m4: New file.
116413         New module 'spawn'.
116414         * modules/spawn: New file.
116415         * lib/spawn.in.h: New file, from GNU libc with modifications.
116416         * m4/spawn_h.m4: New file.
116417         * doc/posix-headers/spawn.texi: Mention the new module.
116419 2008-09-28  Bruno Haible  <bruno@clisp.org>
116421         * modules/sched-tests: New file.
116422         * tests/test-sched.c: New file.
116424         New module 'sched'.
116425         * modules/sched: New file.
116426         * lib/sched.in.h: New file.
116427         * m4/sched_h.m4: New file.
116428         * doc/posix-headers/sched.texi: Mention the new module.
116430 2008-09-27  Eric Blake  <ebb9@byu.net>
116432         Fix previous patch, and tweak references to $0.
116433         * posix-modules: Call func_gnulib_dir before using $gnulib_dir.
116434         (func_version, func_gnulib_dir): Don't call this program
116435         gnulib-tool.
116436         (func_gnulib_dir, func_tmpdir, func_fatal_error): Avoid shell bugs
116437         with using $0 in function.
116438         * gnulib-tool (func_gnulib_dir, func_tmpdir): Likewise.
116439         (func_fatal_error): Reuse the name the user invoked us with.
116441 2008-09-27  Bruno Haible  <bruno@clisp.org>
116443         * m4/iconv_h.m4 (gl_REPLACE_ICONV_H): New macro.
116444         (gl_ICONV_H_DEFAULTS): Initialize ICONV_H here...
116445         (gl_ICONV_H): Not here.
116446         * m4/iconv_open.m4 (gl_REPLACE_ICONV_OPEN): Invoke gl_REPLACE_ICONV_H
116447         instead of assigning ICONV_H directly.
116449         * m4/wchar.m4 (gl_REPLACE_WCHAR_H): New macro.
116450         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Invoke it instead of assigning
116451         WCHAR_H directly.
116453 2008-09-27  Bruno Haible  <bruno@clisp.org>
116455         * lib/arpa_inet.in.h: Include the GL_LINK_WARNING anchor.
116456         * modules/arpa_inet (Depends-on): Add link-warning.
116457         (Makefile.am): Insert the definition of GL_LINK-WARNING.
116458         * modules/unistd (Makefile.am): Likewise.
116460 2008-09-26  Bruno Haible  <bruno@clisp.org>
116462         * posix-modules (cvsdatestamp, last_checkin_date, version): Remove
116463         variables.
116464         (func_version): Essentially copied from gnulib-tool.
116465         (func_exit, func_gnulib_dir, func_tmpdir, func_fatal_error,
116466         func_readlink): Copied from gnulib-tool.
116468 2008-09-26  Bruno Haible  <bruno@clisp.org>
116470         * gnulib-tool (func_version): Change directory to $gnulib_dir before
116471         invoking git-version-gen.
116473 2008-09-26  Bruno Haible  <bruno@clisp.org>
116475         * posix-modules: Update to directory names changed on 2008-01-19.
116476         Remove commas in output before splitting into words. No more need to
116477         avoid 'ftruncate' since 2007-02-19.
116479 2008-09-26  Bruno Haible  <bruno@clisp.org>
116481         * doc/posix-headers/errno.texi: Remove mention of module 'EOVERFLOW'.
116483 2008-09-26  Bruno Haible  <bruno@clisp.org>
116485         * lib/fwriteerror.c (do_fwriteerror): Ignore error EPIPE.
116486         * modules/fwriteerror (Depends-on): Add errno.
116488 2008-09-26  Bruno Haible  <bruno@clisp.org>
116490         * tests/test-vc-list-files-git.sh: Explain reason for skipping test.
116491         * tests/test-vc-list-files-cvs.sh: Likewise.
116493 2008-09-26  Bruno Haible  <bruno@clisp.org>
116495         * doc/posix-headers/sys_resource.texi: Reorder items.
116497 2008-09-26  Jim Meyering  <meyering@redhat.com>
116499         fts: tweak inode comparison function
116500         * lib/fts.c (fts_compare_ino): Sort on increasing, not decreasing
116501         inode numbers, as documented.
116503         fts: sort dirent entries on inode number before traversing
116504         This avoids a quadratic, seek-related performance penalty when
116505         operating on a directory containing many entries (measurable at 10k;
116506         3.5 hours at 2 million entries with a cold cache) on certain types
116507         of file systems, including ext3 and ext4, but not tmpfs.
116508         * lib/fts.c (DT_MUST_BE, NOT_AN_INODE_NUMBER, D_INO): Define.
116509         (FTS_INODE_SORT_DIR_ENTRIES_THRESHOLD): Define if not defined.
116510         (S_MAGIC_TMPFS, S_MAGIC_NFS): Define.
116511         (fs_handles_readdir_ordered_dirents_efficiently): New function.
116512         (dirent_inode_sort_may_be_useful, fts_compare_ino): Likewise.
116513         (fts_build): Set the stat.st_ino member from D_INO.
116514         If it is likely to be useful, sort dirent entries on inode number.
116516         * m4/fts.m4 (gl_FUNC_FTS_CORE): Check for fstatfs, sys/vfs.h,
116517         and the struct statfs.f_type member.
116518         * modules/fts (Depends-on): Add d-ino.
116520 2008-09-26  Bruno Haible  <bruno@clisp.org>
116522         * modules/sigpipe-die (Depends-on): Add sigpipe.
116524         * lib/stdio.in.h (fprintf, vfprintf, printf, vprintf, fputc, putc,
116525         putchar, fputs, puts, fwrite): Replace when REPLACE_STDIO_WRITE_FUNCS
116526         and GNULIB_STDIO_H_SIGPIPE are set.
116527         * lib/stdio-write.c: New file.
116528         * m4/stdio_h.m4 (gl_STDIO_H): Set GNULIB_FPRINTF, GNULIB_PRINTF,
116529         GNULIB_VFPRINTF, GNULIB_VPRINTF, GNULIB_FPUTC, GNULIB_PUTC,
116530         GNULIB_PUTCHAR, GNULIB_FPUTS, GNULIB_PUTS, GNULIB_FWRITE,
116531         REPLACE_STDIO_WRITE_FUNCS.
116532         (gl_STDIO_H_DEFAULTS): Initialize GNULIB_FPRINTF, GNULIB_PRINTF,
116533         GNULIB_VFPRINTF, GNULIB_VPRINTF, GNULIB_FPUTC, GNULIB_PUTC,
116534         GNULIB_PUTCHAR, GNULIB_FPUTS, GNULIB_PUTS, GNULIB_FWRITE,
116535         GNULIB_STDIO_H_SIGPIPE, REPLACE_STDIO_WRITE_FUNCS.
116536         * modules/stdio (Files): Add lib/stdio-write.c.
116537         (Makefile.am): Substitute GNULIB_FPRINTF, GNULIB_PRINTF,
116538         GNULIB_VFPRINTF, GNULIB_VPRINTF, GNULIB_FPUTC, GNULIB_PUTC,
116539         GNULIB_PUTCHAR, GNULIB_FPUTS, GNULIB_PUTS, GNULIB_FWRITE,
116540         GNULIB_STDIO_H_SIGPIPE, REPLACE_STDIO_WRITE_FUNCS.
116541         * m4/fprintf-posix.m4 (gl_REPLACE_FPRINTF): Define
116542         REPLACE_FPRINTF_POSIX.
116543         * m4/printf-posix-rpl.m4 (gl_REPLACE_PRINTF): Define
116544         REPLACE_PRINTF_POSIX.
116545         * m4/vfprintf-posix.m4 (gl_REPLACE_VFPRINTF): Define
116546         REPLACE_VFPRINTF_POSIX.
116547         * m4/vprintf-posix.m4 (gl_REPLACE_VPRINTF): Define
116548         REPLACE_VPRINTF_POSIX.
116549         * doc/posix-functions/fprintf.texi: Mention the sigpipe module and the
116550         SIGPIPE issue.
116551         * doc/posix-functions/fputc.texi: Likewise.
116552         * doc/posix-functions/fputs.texi: Likewise.
116553         * doc/posix-functions/fwrite.texi: Likewise.
116554         * doc/posix-functions/printf.texi: Likewise.
116555         * doc/posix-functions/putc.texi: Likewise.
116556         * doc/posix-functions/putchar.texi: Likewise.
116557         * doc/posix-functions/puts.texi: Likewise.
116558         * doc/posix-functions/vfprintf.texi: Likewise.
116559         * doc/posix-functions/vprintf.texi: Likewise.
116561         * modules/safe-write (Depends-on): Add write.
116563         * modules/sigpipe-tests: New file.
116564         * tests/test-sigpipe.c: New file.
116565         * tests/test-sigpipe.sh: New file.
116567         * modules/write: New file.
116568         * lib/unistd.in.h: Include <sys/types.h>.
116569         (write): New declaration.
116570         * lib/write.c: New file.
116571         * m4/write.m4: New file.
116572         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize
116573         GNULIB_UNISTD_H_SIGPIPE, GNULIB_WRITE, REPLACE_WRITE.
116574         * modules/unistd (Makefile.am): Substitute GNULIB_UNISTD_H_SIGPIPE,
116575         GNULIB_WRITE, REPLACE_WRITE.
116576         * doc/posix-functions/write.texi: Mention the write, sigpipe modules
116577         and the SIGPIPE issue.
116579         * lib/signal.in.h (SIGPIPE): Define to a replacement value.
116580         (raise): New declaration.
116581         * lib/sigprocmask.c (SIGPIPE_handler): New variable.
116582         (ext_signal): New function.
116583         (rpl_raise): New function.
116584         * m4/signal_h.m4 (gl_SIGNAL_H_DEFAULTS): Initialize
116585         GNULIB_SIGNAL_H_SIGPIPE.
116586         * modules/signal (Makefile.am): Substitute GNULIB_SIGNAL_H_SIGPIPE.
116587         * doc/posix-headers/signal.texi: Mention the SIGPIPE issue.
116589         * modules/sigpipe: New file.
116590         * m4/sigpipe.m4: New file.
116592 2008-09-25  Derek Price  <derek@ximbiot.com>
116593             Bruno Haible  <bruno@clisp.org>
116595         * gnulib-tool (func_import): Report all license incompatibilities, not
116596         just the first one.
116598 2008-09-25  Bruno Haible  <bruno@clisp.org>
116600         * gnulib-tool (func_import): When computing the edits, consider not
116601         only the Makefile.ams that exist but also those that will be generated.
116603 2008-09-25  Simon Josefsson  <simon@josefsson.org>
116605         * modules/sys_select-tests (Depends-on): Remove sys_select itself,
116606         fixes gnulib-tool --test warning about duplicate dependency.
116608 2008-09-25  Bruno Haible  <bruno@clisp.org>
116610         * gnulib-tool: Don't ask the user to perform edits in the generated
116611         Makefile.ams.
116612         (func_emit_lib_Makefile_am): Emit empty SUBDIRS. Execute edits that
116613         apply to the Makefile.am being generated.
116614         (func_emit_tests_Makefile_am): Execute edits that apply to the
116615         Makefile.am being generated.
116616         (func_import): Setup list of Makefile.am edits before emitting the
116617         Makefile.ams, not at the end.
116618         (func_create_testdir): Update.
116619         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
116621 2008-09-25  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
116623         * gnulib-tool (func_import): Store the --tests-base option in the
116624         comment in gnulib-cache.m4.
116626 2008-09-24  Paolo Bonzini  <bonzini@gnu.org>
116628         * NEWS: Document increased portability that sys_select now provides.
116630         * lib/sys_select.in.h: Install select wrapper.
116631         * lib/sys_socket.in.h: Use more descriptive name when there is no
116632         select wrapper.
116633         * lib/winsock-select.c: New.
116634         * m4/sys_select_h.m4: Compile lib/winsock-select.c if WinSock is used.
116635         Require gl_HEADER_SYS_SOCKET.
116636         * modules/sys_select: Depend on alloca, add lib/winsock-select.c.
116637         * modules/sys_select-tests: Copy dependencies from modules/poll-tests.
116638         * tests/test-sys_select.c: Add functional tests.
116640 2008-09-24  Eric Blake  <ebb9@byu.net>
116642         open, fopen: close fd leak in last patch
116643         * lib/open.c (rpl_open): Close fd before returning error.
116644         * lib/fopen.c (rpl_fopen): Close fd before returning error.
116645         * doc/posix-functions/open.texi (open): Document that Irix also
116646         has the bug.
116647         * doc/posix-functions/fopen.texi (fopen): Likewise.
116648         Reported by Paolo Bonzini.
116650 2008-09-24  Bruno Haible  <bruno@clisp.org>
116652         Ensure that a filename ending in a slash cannot be used to access a
116653         non-directory.
116654         * lib/open.c (rpl_open): When the filename ends in a slash, use fstat()
116655         to check whether it's really a directory.
116656         * lib/fopen.c: Include fcntl.h, unistd.h.
116657         (rpl_fopen): When the filename ends in a slash, use open(), fstat(),
116658         and fdopen().
116659         * modules/fopen (Depends-on): Add unistd.
116660         * tests/test-open.c (main): Try to open "/dev/null/" as a directory.
116661         * tests/test-fopen.c (main): Likewise.
116662         * doc/posix-functions/open.texi: Mention the HP-UX, Solaris bug.
116663         * doc/posix-functions/fopen.texi: Likewise.
116664         Reported by Eric Blake.
116666 2008-09-23  Eric Blake  <ebb9@byu.net>
116668         c-stack: avoid compiler optimizations when provoking overflow
116669         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Make
116670         recursion harder to optimize, to ensure a stack overflow occurs.
116671         * tests/test-c-stack.c (recurse): Likewise.
116672         Borrowed from libsigsegv.
116674         c-stack: work around Irix sigaltstack bug
116675         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Check
116676         whether sigaltstack uses wrong end of stack_t (copied in part from
116677         libsigsegv).
116678         * lib/c-stack.c (c_stack_action) [!HAVE_LIBSIGSEGV]: Work around
116679         Irix bug, without requiring an over-allocation.
116680         * doc/posix-functions/sigaltstack.texi (sigaltstack): Document the
116681         bug.
116683         fopen: document mingw bug on directories
116684         * doc/posix-functions/fopen.texi (fopen): Mention mingw bug for
116685         not allowing a stream visiting a directory, even though reading
116686         from such a stream is not portable.
116688 2008-09-23  Paolo Bonzini  <bonzini@gnu.org>
116690         * lib/poll.c: Rewrite.
116691         * modules/poll: Depend on alloca.
116693 2008-09-23  Paolo Bonzini  <bonzini@gnu.org>
116695         * lib/sys_socket.in.h: Do not implement rpl_setsockopt here,
116696         instead define prototypes for a full set of wrappers.  Ensure
116697         that Cygwin does not use the compatibility code, which is only
116698         for MinGW.
116699         * lib/winsock.c: New.
116700         * m4/sys_socket_h.m4: Compile lib/winsock.c if WinSock is being used.
116701         * modules/sys_socket: Add lib/winsock.c.
116703         * modules/poll-tests: Add errno and perror.
116704         * tests/test-poll.c: Use ioctl, not ioctlsocket.
116706 2008-09-23  Paolo Bonzini  <bonzini@gnu.org>
116708         * tests/test-poll.c: Downgrade minimum needed Winsock version.
116710 2008-09-23  Bruno Haible  <bruno@clisp.org>
116712         * doc/posix-functions/*: Add info about functions missing on IRIX 5.3.
116713         * doc/glibc-functions/*: Likewise.
116715 2008-09-23  Simon Josefsson  <simon@josefsson.org>
116717         * tests/test-perror.sh (tmpfiles): Cleanup temporary files on
116718         success.
116720 2008-09-22  Eric Blake  <ebb9@byu.net>
116721             Bruno Haible  <bruno@clisp.org>
116723         vasnprintf: fix x86/glibc regression on printf("%La", 0.0L)
116724         * lib/vasnprintf.c (VASNPRINTF): Support 0.0 on platforms that
116725         supply %A but mishandle pseudo-NaN.
116726         Reported by Simon Josefsson.
116728 2008-09-21  Bruno Haible  <bruno@clisp.org>
116730         * tests/test-lock.c (main): Tweak skip message.
116731         * tests/test-tls.c (main): Likewise.
116733 2008-09-21  Bruno Haible  <bruno@clisp.org>
116735         * m4/sigaction.m4 (gl_SIGACTION): Remove unnecessary AC_SUBST. Check
116736         whether 'struct sigaction' has sa_sigaction here...
116737         (gl_PREREQ_SIG_HANDLER_H): ... not here.
116738         (gl_PREREQ_SIGACTION): Remove unnecessary AC_SUBST.
116740 2008-09-21  Bruno Haible  <bruno@clisp.org>
116742         * MODULES.html.sh (Support for obsolete systems lacking ANSI C 89): New
116743         section.
116744         (Support for systems lacking ANSI C 89): Move stdlib, exit, strtol,
116745         strtoul, memchr, memcmp, memcpy, memmove, memset, strcspn, strpbrk to
116746         the new section.
116747         (Support for obsolete systems lacking POSIX:2001): New section.
116748         (String handling <string.h>): Move strdup to the new section.
116749         Suggested by Simon Josefsson and Paolo Bonzini.
116751 2008-09-21  Bruno Haible  <bruno@clisp.org>
116753         * tests/test-vasnprintf-posix.c (test_function): Allow 3-digit
116754         exponents in %e and %g results on 'long double'. Needed for mingw's
116755         improved *printf functions.
116756         * tests/test-vasprintf-posix.c (test_function): Likewise.
116757         * tests/test-snprintf-posix.h (test_function): Likewise.
116758         * tests/test-sprintf-posix.h (test_function): Likewise.
116759         Reported by Eric Blake.
116761 2008-09-21  Bruno Haible  <bruno@clisp.org>
116763         * tests/test-snprintf-posix.h (test_function): Remove useless ASSERTs.
116764         * tests/test-sprintf-posix.h (test_function): Likewise.
116766 2008-09-21  Bruno Haible  <bruno@clisp.org>
116768         * modules/getpass (Depends-on): Add strdup-posix.
116770         New module 'strdup-posix'.
116771         * modules/strdup-posix: New file.
116772         * m4/strdup.m4 (gl_FUNC_STRDUP_POSIX): New macro.
116773         * lib/string.in.h (strdup): Replace if REPLACE_STRDUP is 1.
116774         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
116775         REPLACE_STRDUP.
116776         * modules/string (Makefile.am): Substitute REPLACE_STRDUP.
116777         * doc/posix-functions/strdup.texi: Mention module strdup-posix.
116778         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
116779         strdup-posix.
116781         * modules/strdup (Depends-on): Remove malloc-posix.
116783 2008-09-20  Bruno Haible  <bruno@clisp.org>
116785         * lib/fstrcmp.c: Add data about branch probabilities, from Ralf
116786         Wildenhues.
116788 2008-09-20  Bruno Haible  <bruno@clisp.org>
116790         Ensure that wint_t gets defined on IRIX 5.3.
116791         * lib/wchar.in.h (wint_t): Define if not defined by the system.
116792         * lib/wctype.in.h (wint_t): Likewise.
116793         (__wctype_wint_t): Remove type.
116794         (isw*): Use wint_t instead of __wctype_wint_t.
116795         * m4/wchar.m4 (gl_WCHAR_H): Invoke gt_TYPE_WINT_T and set HAVE_WINT_T.
116796         * modules/wchar (Files): Add m4/wint_t.m4.
116797         (Makefile.am): Substitute HAVE_WINT_T.
116798         * tests/test-wchar.c: Check that wchar_t and wint_t are defined.
116799         * tests/test-wctype.c: Check that wint_t is defined.
116800         * doc/posix-headers/wchar.texi: Mention the IRIX 5 problem.
116801         * doc/posix-headers/wctype.texi: Likewise.
116802         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
116804 2008-09-18  Bruno Haible  <bruno@clisp.org>
116806         * gnulib-tool (func_exit): Update comment.
116808 2008-09-18  Simon Josefsson  <simon@josefsson.org>
116810         * modules/getaddrinfo (Depends-on): Remove strdup, this module
116811         assumes strdup exists and does not depend on strdup to return
116812         ENOMEM on out of memory conditions.
116814 2008-09-18  Bruno Haible  <bruno@clisp.org>
116816         * lib/vasnprintf.c (VASNPRINTF): When printing ±0.0L in
116817         NEED_PRINTF_INFINITE_LONG_DOUBLE case with 'e' format, always use two
116818         digits for the exponent.
116820 2008-09-18  Jim Meyering  <meyering@redhat.com>
116821             Bruno Haible  <bruno@clisp.org>
116823         * lib/vasnprintf.c (decimal_point_char): Define also if
116824         NEED_PRINTF_INFINITE_LONG_DOUBLE.
116826 2008-09-16  Bruno Haible  <bruno@clisp.org>
116827         and Eric Blake  <ebb9@byu.net>
116829         vasnprintf: support Irix 5.3
116830         * lib/vasnprintf.c (VASNPRINTF): Also handle -0.0L on platforms
116831         that mishandle long double infinity.
116832         Reported by Tom G. Christensen.
116834 2008-09-16  Bruno Haible  <bruno@clisp.org>
116836         * doc/glibc-functions/scandir.texi: Mention the function is missing on
116837         Solaris 9.
116838         * doc/glibc-functions/alphasort.texi: Likewise.
116839         Reported by Michael Haubenwallner <michael.haubenwallner@salomon.at>.
116841 2008-09-16  Jim Meyering  <meyering@redhat.com>
116843         posix-shell.m4: reject opensolaris's "sh (AT&T Research) 1993-12-28 s+"
116844         * m4/posix-shell.m4 (gl_POSIX_SHELL): Reject a shell that lets
116845         a umask modification leak out of a subshell.  Otherwise, the
116846         opensolaris /bin/sh would be accepted and thus cause unwarranted
116847         failures in the coreutils test suite.
116849 2008-09-16  Paolo Bonzini  <bonzini@gnu.org>
116851         * tests/test-poll.c (connect_to_socket): Allow non-blocking connect
116852         to succeed.
116854 2008-09-16  Jim Meyering  <meyering@redhat.com>
116856         avoid spurious test failure when library is built without ACL support
116857         * m4/acl.m4 (USE_ACL): Define as a shell variable, too, for...
116858         * modules/acl-tests (Makefile.am) [TESTS_ENVIRONMENT]: Add USE_ACL.
116859         * tests/test-file-has-acl.sh: Skip if USE_ACL == 0.
116860         * tests/test-copy-acl.sh: Likewise.
116862 2008-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
116864         * lib/fstrcmp.c (fstrcmp_bounded): Use a second, less quick upper bound
116865         based on character occurrence counts.
116867 2008-09-15  Eric Blake  <ebb9@byu.net>
116869         tests: avoid some compiler warnings
116870         * tests/test-memchr.c (main): Pass NULL indirectly.
116871         * tests/test-closein.c (main): Avoid unused variable.
116873 2008-09-15  Bruno Haible  <bruno@clisp.org>
116875         * m4/errno_h.m4 (gl_HEADER_ERRNO_H_BODY): Test for all the macros that
116876         are missing on OpenBSD 4.0 individually.
116877         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
116879 2008-09-15  Bruno Haible  <bruno@clisp.org>
116881         * doc/posix-headers/errno.texi: Mention the Cygwin problem.
116882         * doc/posix-functions/strerror.texi: Mention also Cygwin.
116883         * doc/posix-functions/perror.texi: Likewise.
116884         * m4/errno_h.m4 (gl_HEADER_ERRNO_H_BODY): Test also whether ECANCELED
116885         is missing.
116886         Reported by Eric Blake.
116888         * lib/errno.in.h: Use replacement values >= 2000.
116889         Reported by Eric Blake.
116891 2008-09-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
116893         * lib/fstrcmp.c (EXTRA_CONTEXT_FIELDS): Add field 'edit_count_limit'.
116894         (EARLY_ABORT): Return true when the edit_count has grown too beyond the
116895         limit.
116896         (fstrcmp_bounded): Initialize the edit_count_limit. Return 0 when
116897         compareseq was aborted.
116899 2008-09-14  Bruno Haible  <bruno@clisp.org>
116901         * lib/fstrcmp.c (EXTRA_CONTEXT_FIELDS): Combine xvec_edit_count and
116902         yvec_edit_count.
116903         (NOTE_DELETE, NOTE_INSERT): Increment the combined edit count.
116904         (fstrcmp_bounded): Simplify result computation accordingly.
116906 2008-09-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
116908         * lib/fstrcmp.h (fstrcmp_bounded): New declaration.
116909         (fstrcmp): Define in terms of fstrcmp_bounded.
116910         * lib/fstrcmp.c (fstrcmp_bounded): Renamed from fstrcmp. Add
116911         lower_bound argument.
116912         Return quickly if the result is certainly < lower_bound.
116913         * tests/test-fstrcmp.c (check_fstrcmp): Test also fstrcmp_bounded.
116915 2008-09-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
116917         * lib/diffseq.h (EARLY_ABORT): New macro.
116918         (compareseq): Change return type to bool. Return true when EARLY_ABORT
116919         evaluates to true.
116921 2008-09-14  Bruno Haible  <bruno@clisp.org>
116923         * modules/perror-tests: New file.
116924         * tests/test-perror.sh: New file.
116925         * tests/test-perror.c: New file.
116927         New module 'perror'.
116928         * lib/stdio.in.h (perror): New declaration.
116929         * lib/perror.c: New file.
116930         * m4/perror.m4: New file.
116931         * modules/perror: New file.
116932         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add perror.
116933         * doc/posix-functions/perror.texi: Mention the perror module.
116934         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Initialize GNULIB_PERROR,
116935         REPLACE_PERROR.
116936         * modules/stdio (Makefile.am): Substitute GNULIB_PERROR,
116937         REPLACE_PERROR.
116939 2008-09-14  Bruno Haible  <bruno@clisp.org>
116941         * modules/stdio (Makefile.am): Reorder to match the order in
116942         lib/stdio.in.h.
116943         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Likewise.
116945 2008-09-13  Bruno Haible  <bruno@clisp.org>
116947         * lib/sys_socket.in.h (EINPROGRESS, ...): Remove definitions.
116949 2008-09-13  Bruno Haible  <bruno@clisp.org>
116951         Extend strerror to cover the added errno values.
116952         * lib/strerror.c: Include errno.h and winsock2.h if it exists.
116953         (rpl_strerror): Provide error messages for the added errno values and
116954         for the WSA* values.
116955         * m4/strerror.m4 (gl_FUNC_STRERROR): Test REPLACE_STRERROR.
116956         (gl_FUNC_STRERROR_SEPARATE): If errno.h is replaced, always replace
116957         strerror.
116958         (gl_PREREQ_STRERROR): Test whether winsock2.h exists.
116959         * modules/strerror (Depends-on): Add errno.
116960         * doc/posix-functions/strerror.texi: Document the change.
116961         * tests/test-strerror.c (main): Check also the string for ETIMEDOUT
116962         and EOVERFLOW.
116964 2008-09-13  Bruno Haible  <bruno@clisp.org>
116966         * modules/EOVERFLOW: Remove file.
116967         * m4/eoverflow.m4: Remove file.
116968         * modules/EOVERFLOW-tests: Remove file.
116969         * tests/test-EOVERFLOW.c: Remove file.
116970         * modules/fprintf-posix (Depends-on): Replace EOVERFLOW with errno.
116971         * modules/ftell (Depends-on): Likewise.
116972         * modules/getdelim (Depends-on): Likewise.
116973         * modules/getugroups (Depends-on): Likewise.
116974         * modules/poll (Depends-on): Likewise.
116975         * modules/snprintf (Depends-on): Likewise.
116976         * modules/sprintf-posix (Depends-on): Likewise.
116977         * modules/vasnprintf (Depends-on): Likewise.
116978         * modules/vasprintf (Depends-on): Likewise.
116979         * modules/vfprintf-posix (Depends-on): Likewise.
116980         * modules/vsnprintf (Depends-on): Likewise.
116981         * modules/vsprintf-posix (Depends-on): Likewise.
116982         * modules/xvasprintf (Depends-on): Likewise.
116983         * modules/unistdio/u8-vasnprintf (Depends-on): Likewise.
116984         * modules/unistdio/u8-vasprintf (Depends-on): Likewise.
116985         * modules/unistdio/u8-vsnprintf (Depends-on): Likewise.
116986         * modules/unistdio/u8-vsprintf (Depends-on): Likewise.
116987         * modules/unistdio/u8-u8-vasnprintf (Depends-on): Likewise.
116988         * modules/unistdio/u8-u8-vasprintf (Depends-on): Likewise.
116989         * modules/unistdio/u8-u8-vsnprintf (Depends-on): Likewise.
116990         * modules/unistdio/u8-u8-vsprintf (Depends-on): Likewise.
116991         * modules/unistdio/u16-u16-vasnprintf (Depends-on): Likewise.
116992         * modules/unistdio/u16-u16-vasprintf (Depends-on): Likewise.
116993         * modules/unistdio/u16-u16-vsnprintf (Depends-on): Likewise.
116994         * modules/unistdio/u16-u16-vsprintf (Depends-on): Likewise.
116995         * modules/unistdio/u16-vasnprintf (Depends-on): Likewise.
116996         * modules/unistdio/u16-vasprintf (Depends-on): Likewise.
116997         * modules/unistdio/u16-vsnprintf (Depends-on): Likewise.
116998         * modules/unistdio/u16-vsprintf (Depends-on): Likewise.
116999         * modules/unistdio/u32-vasnprintf (Depends-on): Likewise.
117000         * modules/unistdio/u32-vasprintf (Depends-on): Likewise.
117001         * modules/unistdio/u32-vsnprintf (Depends-on): Likewise.
117002         * modules/unistdio/u32-vsprintf (Depends-on): Likewise.
117003         * modules/unistdio/u32-u32-vasnprintf (Depends-on): Likewise.
117004         * modules/unistdio/u32-u32-vasprintf (Depends-on): Likewise.
117005         * modules/unistdio/u32-u32-vsnprintf (Depends-on): Likewise.
117006         * modules/unistdio/u32-u32-vsprintf (Depends-on): Likewise.
117007         * modules/unistdio/ulc-fprintf (Depends-on): Likewise.
117008         * modules/unistdio/ulc-vasnprintf (Depends-on): Likewise.
117009         * modules/unistdio/ulc-vasprintf (Depends-on): Likewise.
117010         * modules/unistdio/ulc-vfprintf (Depends-on): Likewise.
117011         * modules/unistdio/ulc-vsnprintf (Depends-on): Likewise.
117012         * modules/unistdio/ulc-vsprintf (Depends-on): Likewise.
117013         * MODULES.html.sh: Remove EOVERFLOW.
117014         * NEWS: Mention the change.
117016 2008-09-13  Bruno Haible  <bruno@clisp.org>
117018         * modules/errno-tests: New file.
117019         * tests/test-errno.c: New file, incorporating tests/test-EOVERFLOW.c.
117021         * lib/errno.in.h: New file.
117022         * m4/errno_h.m4: New file, borrowing from m4/eoverflow.m4.
117023         * modules/errno: New file.
117024         * doc/posix-headers/errno.texi: Update documentation.
117025         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add errno.
117027 2008-09-13  Bruno Haible  <bruno@clisp.org>
117029         * tests/test-poll.c: Use #if for native Windows, rather than testing
117030         __MSVCRT__.
117032 2008-09-13  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
117033             Bruno Haible  <bruno@clisp.org>
117035         * lib/glob.c: Don't include <pwd.h> on native Windows.
117036         (WINDOWS32): New macro.
117037         (glob) [WINDOW32]: Provide a reasonable replacement for getenv("HOME").
117039 2008-09-13  Bruno Haible  <bruno@clisp.org>
117041         * lib/glthread/cond.h [USE_SOLARIS_THREADS]
117042         (ETIMEDOUT): Remove macro.
117043         (glthread_cond_timedwait_multithreaded): New declaration.
117044         (glthread_cond_timedwait): Use it.
117045         * lib/glthread/cond.c [USE_SOLARIS_THREADS]
117046         (glthread_cond_timedwait_multithreaded): New function.
117048 2008-09-12  Paolo Bonzini  <bonzini@gnu.org>
117050         * modules/poll-tests: Do not check for io.h.
117051         * tests/test-poll.c: Check for __MSVCRT__ instead.
117053 2008-09-12  Paolo Bonzini  <bonzini@gnu.org>
117055         * lib/sys_socket.in.h (EINPROGRESS): Define for Winsock case.
117056         * modules/poll-tests: Add inet_pton, stdbool, sockets.
117057         * tests/test-poll.c: Use them.  Use _pipe on Windows.
117059 2008-09-12  Paolo Bonzini  <bonzini@gnu.org>
117061         * modules/poll-tests: New.
117062         * tests/test-poll.c: New.
117064 2008-09-12  Eric Blake  <ebb9@byu.net>
117066         frexp: test for NetBSD failure on -0.0
117067         * m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Enhance test, since some, but
117068         not all, bugs from NetBSD 3.0 have been fixed.
117069         * doc/posix-functions/frexp.texi (frexp): Document bug.
117070         Reported by Thomas Klausner.
117072         signbit: work around bug of HP-UX 10.20 cc with -0.0 literal
117073         * m4/signbit.m4 (gl_SIGNBIT_TEST_PROGRAM): Rewrite test to avoid
117074         literal -0.0.
117075         Reported by Jonathan C. Patschke <jp@centtech.com>.
117077 2008-09-11  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
117079         * lib/glthread/cond.h: Use dummy implementation also if
117080         USE_WIN32_THREADS.
117082 2008-09-11  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
117084         * modules/fnmatch-posix (License): Change to LGPLv2+.
117085         * modules/fnmatch-gnu (License): Likewise.
117087 2008-09-11  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
117089         * lib/poll.c (poll): Fix polling unconnected server sockets on WIN32.
117091 2008-09-11  Jim Meyering  <meyering@redhat.com>
117093         * users.txt: Add gtk-vnc.
117095 2008-09-08  Simon Josefsson  <simon@josefsson.org>
117097         * tests/test-bitrotate.c: Test 8/16-bit rotates with 0 and maximum
117098         rotate amounts.
117100         * lib/bitrotate.h: Doc fix, mention that N can be wider than minimally
117101         required for 16-bit and 8-bit rotates.
117102         * lib/bitrotate.h (rotl64, rotr64, rotl32, rotl32, rotl16, rotr16,
117103         rotl8, rotr8): Use UINT64_MAX, UINT32_MAX, UINT16_MAX, and
117104         UINT8_MAX instead of hard-coded constants.
117105         Suggested by Paul Eggert.
117107 2008-09-07  Bruno Haible  <bruno@clisp.org>
117109         * tests/test-striconveh.c (main): Check behaviour when converting from
117110         UTF-7.
117112         Make striconveh work better with stateful encodings.
117113         * lib/striconveh.c (iconv_carefully, iconv_carefully_1): Don't assume
117114         that iconv does not increment the inptr when returning -1/EINVAL.
117116 2008-09-07  Bruno Haible  <bruno@clisp.org>
117118         * build-aux/config.rpath: Update according to libtool-2.2.6.
117119         * build-aux/config.libpath: Likewise.
117121 2008-09-06  Bruno Haible  <bruno@clisp.org>
117123         * lib/freadahead.c (freadahead): Add conditional for SLOW_BUT_NO_HACKS.
117124         * lib/freadptr.c (freadptr): Likewise.
117125         * lib/freadseek.c (freadptrinc): Likewise.
117126         Reported by Simon Josefsson.
117128 2008-09-06  Bruno Haible  <bruno@clisp.org>
117130         * modules/freadptr (License): Change to LGPLv2+.
117131         * modules/freadseek (License): Likewise.
117132         Suggested by Eric Blake.
117134         * modules/memchr2 (License): Change to LGPLv2+.
117135         Approved by Eric Blake.
117137 2008-09-04  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
117138             Bruno Haible  <bruno@clisp.org>
117140         Make gnulib-tool work with native 'sed' on AIX.
117141         * gnulib-tool (sed_noop): New variable.
117142         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am, func_import,
117143         func_add_or_update, func_create_testdir): Use it to initialize sed
117144         script variables.
117145         Reported by Albert Chin <bug-gnulib@mlists.thewrittenword.com>.
117147 2008-09-04  Albert Chin  <bug-gnulib@mlists.thewrittenword.com>
117148             Bruno Haible  <bruno@clisp.org>
117150         * m4/include_next.m4 (gl_INCLUDE_NEXT): Add check whether #include_next
117151         also works after #include directives.
117153 2008-09-04  Ondřej Vašík  <ovasik@redhat.com>
117155         getdate.y: reject an out-of-range timezone value
117156         * lib/getdate.y (time_zone_hhmm): Reject any TZ offset that is outside
117157         the range [-24...+24].  When specified with only one or two digits,
117158         * tests/test-getdate.c: Tests for the fix.
117159         * doc/getdate.texi: Document this change.
117161 2008-09-03  Bruno Haible  <bruno@clisp.org>
117163         * doc/glibc-functions/strverscmp.texi: Mention the strverscmp module.
117165 2008-09-02  Simon Josefsson  <simon@josefsson.org>
117167         * lib/bitrotate.h (rotl64, rotr64): Add.  Suggested by Bruce Korb
117168         <bruce.korb@gmail.com> with ideas from Ben Pfaff
117169         <blp@cs.stanford.edu>, Bruno Haible <bruno@clisp.org> and Eric
117170         Blake <ebb9@byu.net>.
117172         * tests/test-bitrotate.c: Add more test vectors.
117174 2008-09-02  Eric Blake  <ebb9@byu.net>
117176         vasnprintf-posix: handle large precision via %.*d
117177         * lib/vasnprintf.c (VASNPRINTF): Don't pass precision to snprintf
117178         when handling it ourselves.
117179         * tests/test-vasnprintf-posix.c (test_function): Add test.
117180         * tests/test-snprintf-posix.h (test_function): Likewise.
117181         * tests/test-sprintf-posix.h (test_function): Likewise.
117182         * tests/test-vasprintf-posix.c (test_function): Likewise.
117183         Reported by Alain Guibert.
117185 2008-09-01  Eric Blake  <ebb9@byu.net>
117187         c-stack: make configure-time check more robust
117188         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Check for
117189         successful sigaction call.
117190         Reported by Tom G. Christensen.
117192 2008-09-01  Bruno Haible  <bruno@clisp.org>
117194         New module 'findprog-lgpl'.
117195         * modules/findprog-lgpl: New file.
117196         * lib/findprog-lgpl.c: New file.
117197         * lib/findprog.c: Compile nothing in findprog.c if findprog-lgpl.c is
117198         also compiled. Consider the possibly defined symbol IN_FINDPROG_LGPL
117199         to decide whether to use strdup or xstrdup, concatenated_filename or
117200         xconcatenated_filename.
117202 2008-09-01  Bruno Haible  <bruno@clisp.org>
117204         Split module 'concat-filename' into 'concat-filename' (LGPL) and
117205         'xconcat-filename' (GPL).
117206         * modules/concat-filename (Depends-on): Add malloc-posix, remove xalloc.
117207         (License): Change to LGPLv2+.
117208         * modules/xconcat-filename: New file.
117209         * lib/concat-filename.h (concatenated_filename): Change specification.
117210         (xconcatenated_filename): New declaration.
117211         * lib/concat-filename.c: Include errno.h, stdlib.h, not xalloc.h.
117212         (concatenated_filename): Use malloc instead of xalloc. Handle out-of-
117213         memory situations.
117214         * lib/xconcat-filename.c: New file.
117215         * NEWS: Mention the change.
117216         * lib/findprog.c: Include concat-filename.h, not filename.h.
117217         (find_in_path): Use xconcatenated_filename instead of
117218         concatenated_filename.
117219         * lib/javacomp.c: Include concat-filename.h, not filename.h.
117220         (is_envjavac_gcj43_usable, is_envjavac_oldgcj_14_14_usable,
117221         is_envjavac_oldgcj_14_13_usable, is_envjavac_nongcj_usable,
117222         is_gcj_present, is_gcj43_usable, is_oldgcj_14_14_usable,
117223         is_oldgcj_14_13_usable, is_javac_usable): Use xconcatenated_filename
117224         instead of concatenated_filename.
117225         * lib/javaexec.c: Include concat-filename.h, not filename.h.
117226         (execute_java_class): Use xconcatenated_filename instead of
117227         concatenated_filename.
117228         * modules/findprog (Depends-on): Add xconcat-filename, remove filename.
117229         * modules/javacomp (Depends-on): Likewise.
117230         * modules/javaexec (Depends-on): Likewise.
117232 2008-09-01  Bruno Haible  <bruno@clisp.org>
117234         Split module 'filename' into 'filename' and 'concat-filename'.
117235         * modules/filename: Keep only lib/filename.h.
117236         (License): Change to LGPLv2+.
117237         * modules/concat-filename: New file, extracted from modules/filename.
117238         * lib/filename.h (concatenated_filename): Remove declaration.
117239         * lib/concat-filename.h: New file, extracted from lib/filename.h.
117240         * lib/concat-filename.c: Include concat-filename.h.
117241         * NEWS: Mention the change.
117243 2008-09-01  Simon Josefsson  <simon@josefsson.org>
117245         * lib/bitrotate.h (rotl8, rotr8): Add.
117247         * modules/bitrotate (configure.ac): Need
117248         AC_REQUIRE([AC_C_INLINE]).
117249         (Description): Mention stdint.h.  Reported by Bruno Haible
117250         <bruno@clisp.org>.
117252         * lib/bitrotate.h (rotr16, rotl16): Fix mask value.  Reported by
117253         Paolo Bonzini <bonzini@gnu.org>.
117255 2008-08-31  Bruno Haible  <bruno@clisp.org>
117257         Assume Solaris specific bi-arch conventions on Solaris systems.
117258         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): On Solaris in 64-bit
117259         mode, set acl_libdirstem to lib/64. Also set acl_libdirstem2.
117260         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): If acl_libdirstem does not
117261         work, try acl_libdirstem2 as fallback. Otherwise treat acl_libdirstem2
117262         like acl_libdirstem.
117263         (AC_LIB_LINKFLAGS_FROM_LIBS): Treat acl_libdirstem2 like
117264         acl_libdirstem.
117265         * NEWS: Mention the change.
117266         Reported by Ben Taylor <bentaylor.solx86@gmail.com>.
117268 2008-08-31  Jim Meyering  <meyering@redhat.com>
117270         * lib/strftime.h: Add comments describing the two added arguments.
117272         remove duplicate #include directives
117273         * lib/chdir-long.c [TEST_CHDIR]: Remove duplicate #include <stdio.h>.
117274         * lib/putenv.c: Remove duplicate #include <stdlib.h>.
117276 2008-08-31  Bruno Haible  <bruno@clisp.org>
117278         New module 'sigpipe-die'.
117279         * modules/sigpipe-die: New file.
117280         * lib/sigpipe-die.h: New file.
117281         * lib/sigpipe-die.c: New file.
117282         * MODULES.html.sh (Signal handling): Add sigpipe-die.
117284 2008-08-31  Bruno Haible  <bruno@clisp.org>
117286         Don't override previously installed signal handlers.
117287         * lib/fatal-signal.c (saved_sigactions): New variable.
117288         (uninstall_handlers): Reset the signal to the saved handler, not
117289         to SIG_DFL (except when ignored).
117290         (install_handlers): Save the previous handlers.
117292 2008-08-30  Bruno Haible  <bruno@clisp.org>
117294         * gnulib-tool (func_reset_sigpipe): New function.
117295         (func_get_automake_snippet, func_modules_transitive_closure,
117296         func_import): Invoke it before a join command that reads from stdin,
117297         to avoid "echo: write error: Broken pipe" error messages on stderr.
117298         Reported by Sam Steingold <sds@gnu.org>.
117300 2008-08-30  Bruno Haible  <bruno@clisp.org>
117302         * m4/fopen.m4 (gl_FUNC_FOPEN): Test against bug with trailing slash.
117303         Code copied from m4/open.m4.
117304         * lib/fopen.c (rpl_fopen): Return NULL if the mode specifies write
117305         access and the filename ends in a slash. Code copied from lib/open.c.
117306         * doc/posix-functions/fopen.texi: Document bug with trailing slash.
117307         * tests/test-fopen.c (main): Check against bug with trailing slash.
117309 2008-08-29  Bruno Haible  <bruno@clisp.org>
117311         Avoid some "gcc -pedantic" warnings.
117312         * m4/include_next.m4 (gl_INCLUDE_NEXT): Set also PRAGMA_SYSTEM_HEADER.
117313         * lib/arpa_inet.in.h: Use PRAGMA_SYSTEM_HEADER.
117314         * lib/dirent.in.h: Likewise.
117315         * lib/fcntl.in.h: Likewise.
117316         * lib/float.in.h: Likewise.
117317         * lib/iconv.in.h: Likewise.
117318         * lib/inttypes.in.h: Likewise.
117319         * lib/locale.in.h: Likewise.
117320         * lib/math.in.h: Likewise.
117321         * lib/netinet_in.in.h: Likewise.
117322         * lib/search.in.h: Likewise.
117323         * lib/signal.in.h: Likewise.
117324         * lib/stdarg.in.h: Likewise.
117325         * lib/stdint.in.h: Likewise.
117326         * lib/stdio.in.h: Likewise.
117327         * lib/stdlib.in.h: Likewise.
117328         * lib/string.in.h: Likewise.
117329         * lib/strings.in.h: Likewise.
117330         * lib/sys_select.in.h: Likewise.
117331         * lib/sys_socket.in.h: Likewise.
117332         * lib/sys_stat.in.h: Likewise.
117333         * lib/sys_time.in.h: Likewise.
117334         * lib/sysexits.in.h: Likewise.
117335         * lib/time.in.h: Likewise.
117336         * lib/unistd.in.h: Likewise.
117337         * lib/wchar.in.h: Likewise.
117338         * lib/wctype.in.h: Likewise.
117339         * modules/arpa_inet (Makefile.am): Also substitute PRAGMA_SYSTEM_HEADER.
117340         * modules/fchdir (Makefile.am): Likewise.
117341         * modules/fcntl (Makefile.am): Likewise.
117342         * modules/float (Makefile.am): Likewise.
117343         * modules/iconv_open (Makefile.am): Likewise.
117344         * modules/inttypes (Makefile.am): Likewise.
117345         * modules/locale (Makefile.am): Likewise.
117346         * modules/math (Makefile.am): Likewise.
117347         * modules/netinet_in (Makefile.am): Likewise.
117348         * modules/search (Makefile.am): Likewise.
117349         * modules/signal (Makefile.am): Likewise.
117350         * modules/stdarg (Makefile.am): Likewise.
117351         * modules/stdint (Makefile.am): Likewise.
117352         * modules/stdio (Makefile.am): Likewise.
117353         * modules/stdlib (Makefile.am): Likewise.
117354         * modules/string (Makefile.am): Likewise.
117355         * modules/strings (Makefile.am): Likewise.
117356         * modules/sys_select (Makefile.am): Likewise.
117357         * modules/sys_socket (Makefile.am): Likewise.
117358         * modules/sys_stat (Makefile.am): Likewise.
117359         * modules/sys_time (Makefile.am): Likewise.
117360         * modules/sysexits (Makefile.am): Likewise.
117361         * modules/time (Makefile.am): Likewise.
117362         * modules/unistd (Makefile.am): Likewise.
117363         * modules/wchar (Makefile.am): Likewise.
117364         * modules/wctype (Makefile.am): Likewise.
117365         Reported by Reuben Thomas <rrt@sc3d.org>.
117367 2008-08-29  Bruno Haible  <bruno@clisp.org>
117369         * m4/include_next.m4 (gl_INCLUDE_NEXT): Don't define HAVE_INCLUDE_NEXT
117370         any more.
117372 2008-08-29  Simon Josefsson  <simon@josefsson.org>
117374         * MODULES.html.sh (Misc): Add bitrotate.
117376         * modules/bitrotate: New file.
117378         * lib/bitrotate.h: New file.
117380         * modules/bitrotate-tests: New file.
117382         * tests/test-bitrotate.c: New file.
117384         * modules/crypto/gc-arctwo, modules/crypto/arctwo: Add dependency
117385         on the bitrotate module.
117387         * lib/arctwo.c: Use new bitrotate module.
117389 2008-08-29  Jim Meyering  <meyering@redhat.com>
117391         bootstrap: merge changes from coreutils
117392         * build-aux/bootstrap (cp_mark_as_generated): Preserve perms
117393         of copied files.  Remove a kludge, now that this is fixed.
117394         * build-aux/bootstrap: Fix unportable expr usage. (by Ralf Wildenhues)
117395         * build-aux/bootstrap: Remove $bt and $bt2 also when not using gettext.
117396         * build-aux/bootstrap: Remove coreutils-specific SUBDIRS-related code.
117398 2008-08-29  Bruno Haible  <bruno@clisp.org>
117400         * MODULES.html.sh: Remove --cvs-urls option.
117402 2008-08-28  Jose E. Marchesi  <jemarch@gnu.org>  (tiny change)
117404         maint.mk: adjust to file name change
117405         * top/maint.mk: s/Makefile.cfg/cfg.mk/.
117407 2008-08-28  Jim Meyering  <meyering@redhat.com>
117409         * modules/getndelim2 (License): Relicense to LGPLv2+.
117410         Approved by Richard Stallman for the version of 1995, and by
117411         Paul Eggert, Bruno Haible, Eric Blake for their contributions.
117413 2008-08-27  Paolo Bonzini  <bonzini@gnu.org>
117415         * lib/getdelim.c (flockfile, funlockfile): Make all of them
117416         dummy if one is not available.  Do not touch them if
117417         USE_UNLOCKED_IO, instead letting unlocked-io.h do that.
117418         (getc_maybe_unlocked): New.
117419         * m4/getdelim.m4 (gl_PREREQ_GETDELIM): Check for getc_unlocked.
117421 2008-08-26  Eric Blake  <ebb9@byu.net>
117423         doc/INSTALL: resync from autoconf
117424         * doc/Makefile (INSTALL, INSTALL.ISO, INSTALL.UTF-8): Simplify.
117425         (INSTALL_PRELUDE): Delete; this is done more efficiently by
117426         moving...
117427         * install.texi [!autoconf]: ...here.  Resync from autoconf.
117428         * INSTALL: Regenerate.
117429         * INSTALL.ISO: New file.
117430         * INSTALL.UTF-8: Likewise.
117432 2008-08-26  Jim Meyering  <meyering@redhat.com>
117434         GNUmakefile: cfg.mk definitions override default autoreconf-rerun policy
117435         * top/GNUmakefile (_is-dist-target, _is-install-target): Make
117436         these definitions conditional, so that they may be overridden, too.
117438 2008-08-26  Bruno Haible  <bruno@clisp.org>
117440         Generate INSTALL file variants with prettier quotes.
117441         * doc/Makefile (INSTALL_PRELUDE): New macro.
117442         (INSTALL): Use it.
117443         (INSTALL.ISO, INSTALL.UTF-8): New rules.
117445 2008-08-26  Bruno Haible  <bruno@clisp.org>
117447         Run makeinfo in an English locale.
117448         * doc/Makefile (MAKEINFO): New variable.
117450 2008-08-26  Bruno Haible  <bruno@clisp.org>
117452         * doc/Makefile (INSTALL): Use --no-validate instead of --no-warn.
117453         Suggested by Eric Blake.
117455 2008-08-25  Bruno Haible  <bruno@clisp.org>
117457         * doc/Makefile (INSTALL): Generate with @firstparagraphindent set.
117459 2008-08-25  Eric Blake  <ebb9@byu.net>
117461         c-stack: test that stack overflow can be caught
117462         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Also check
117463         that platform allows handling stack overflow; at least OS/2 EMX
117464         has sigaltstack, but crashes before transferring control to
117465         handler on stack overflow.
117466         * lib/c-stack.c [HAVE_SIGALTSTACK]: Adjust conditions to also
117467         check for HAVE_STACK_OVERFLOW_HANDLING.
117468         Reported by Elbert Pol.
117470 2008-08-25  Bruno Haible  <bruno@clisp.org>
117472         * doc/posix-functions/strftime.texi: Fix description of strftime
117473         module.
117475 2008-08-24  Bruno Haible  <bruno@clisp.org>
117477         * tests/uniwidth/test-uc_width2.c: New file.
117478         * tests/uniwidth/test-uc_width2.sh: New file.
117479         * modules/uniwidth/width-tests (Files): Add the new files.
117480         (TESTS): Add uniwidth/test-uc_width2.sh.
117481         (TESTS_ENVIRONMENT): New variable.
117482         (check_PROGRAMS): Add test-uc_width2.
117483         (test_uc_width2_SOURCES): New variable.
117485         Fix uc_width(0x00AB) bug, introduced on 2007-07-08.
117486         * lib/uniwidth/width.c (nonspacing_table_data): Set bit for 0x00AD,
117487         not 0x00AB.
117488         Reported by Alexander V. Lukyanov <lav@netis.ru>.
117490 2008-08-22  Eric Blake  <ebb9@byu.net>
117492         test-lock, test-tls: mention why a test is skipped
117493         * tests/test-lock.c (main) [!USE_*_THREADS]: Print why test is
117494         skipped.
117495         * tests/test-tls.c (main) [!USE_*_THREADS]: Likewise.
117497         count-one-bits: relax license
117498         * modules/count-one-bits (License): Relicense to LGPLv2+.
117499         Suggested by Ludovic Courtès, approved by Ben Pfaff.
117501 2008-08-22  Andreas Schwab  <schwab@suse.de>
117503         * m4/obstack-printf-posix.m4 (gl_FUNC_OBSTACK_PRINTF_POSIX):
117504         Remove spurious space in assignment.
117506 2008-08-21  Simon Josefsson  <simon@josefsson.org>
117508         * m4/autobuild.m4: Use TZ=UTC0 instead of TZ=UTC.  Reported by
117509         Paul Eggert <eggert@CS.UCLA.EDU>.
117511 2008-08-20  Paolo Bonzini  <bonzini@gnu.org>
117513         * modules/gettext: Add m4/threadlib.m4.
117515 2008-08-19  Eric Blake  <ebb9@byu.net>
117517         test-c-stack: fix compilation failure on FreeBSD 5.0
117518         * tests/test-c-stack.c [HAVE_SETRLIMIT]: Include prerequisite
117519         headers before <sys/resource.h>.
117520         * doc/posix-headers/sys_resource.texi (sys/resource.h): Document
117521         the bug.
117522         Reported by Nelson H. F. Beebe.
117524         strverscmp: migrate from "strverscmp.h" to <string.h>
117525         * modules/string (Makefile.am): Add new hooks.
117526         * modules/strverscmp (Files): Remove strverscmp.h.
117527         (Depends-on): Add string.
117528         (configure.ac): Add indicator.
117529         (Include): Mention new header.
117530         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Provide new
117531         defaults.
117532         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP): Inform string module of
117533         results.
117534         * lib/strverscmp.h: Delete.
117535         * lib/string.in.h (strverscmp): Provide declaration, when needed.
117536         * tests/test-strverscmp.c (includes): Adjust client.
117537         * lib/check-version.c (includes): Likewise.
117538         * NEWS: Document the change.
117540         strverscmp: add unit test
117541         * modules/strverscmp-tests: New file.
117542         * tests/test-strverscmp.c: Likewise.
117544 2008-08-19  Simon Josefsson  <simon@josefsson.org>
117546         * lib/gc-gnulib.c: Indentation cleanup.  Add some comments
117547         regarding Windows crypto stuff, from Mono.
117549 2008-08-19  Adam Strzelecki  <ono@java.pl>  (tiny change)
117551         * lib/gc-gnulib.c: Use CRYPT_VERIFY_CONTEXT.  Try to use Intel CSP
117552         if present, for intel RND.  Return error on failures.
117554 2008-08-18  Ben Pfaff  <blp@gnu.org>
117556         gitlog-to-changelog: give better diagnostic for failed pipe-open
117557         * build-aux/gitlog-to-changelog: Improve error message: suggest
117558         that the version of Git may be too old.
117560 2008-08-18  Simon Josefsson  <simon@josefsson.org>
117562         * m4/autobuild.m4: Use TZ=UTC to avoid time zone complexity.  Use
117563         ISO 8601 format.  Suggested by Greg Troxel <gdt@ir.bbn.com>.
117565 2008-08-18  Bruno Haible  <bruno@clisp.org>
117567         * lib/glthread/thread.h [USE_SOLARIS_THREADS]: Use thread_in_use(), not
117568         pthread_in_use().
117570 2008-08-18  Bruno Haible  <bruno@clisp.org>
117572         * lib/glthread/threadlib.c: Include <pthread.h>.
117574 2008-08-18  Bruno Haible  <bruno@clisp.org>
117576         * lib/glthread/lock.h [USE_SOLARIS_THREADS]: Fix
117577         glthread_recursive_lock_* macros.
117578         * lib/glthread/lock.c (glthread_recursive_lock_destroy_multithreaded):
117579         Fix syntax error.
117581 2008-08-18  Bruno Haible  <bruno@clisp.org>
117583         * lib/glthread/thread.c: Avoid forcing a context switch right after
117584         thread creation.
117586 2008-08-17  Bruno Haible  <bruno@clisp.org>
117588         * lib/glthread/thread.c: New file, based on code from tests/test-lock.c.
117589         * lib/glthread/thread.h: Provide Win32 specific implementation.
117590         * modules/thread (Files): Add lib/glthread/thread.c.
117591         (Depends-on): Add lock.
117592         (Makefile.am): Add glthread/thread.c to lib_SOURCES.
117594 2008-08-17  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
117596         New module 'yield'.
117597         * modules/yield: New file.
117598         * lib/glthread/yield.h: New file.
117599         * m4/yield.m4: New file.
117600         * MODULES.html.sh (Multithreading): Add yield.
117602 2008-08-17  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
117604         New module 'thread'.
117605         * modules/thread: New file.
117606         * lib/glthread/thread.h: New file.
117607         * m4/thread.m4: New file.
117608         * MODULES.html.sh (Multithreading): Add thread.
117610 2008-08-17  Bruno Haible  <bruno@clisp.org>
117612         * lib/glthread/lock.h: Include <stdlib.h> always.
117613         * lib/glthread/tls.h: Likewise.
117614         * lib/glthread/cond.h: Likewise.
117616 2008-08-17  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
117618         New module 'cond'.
117619         * modules/cond: New file.
117620         * lib/glthread/cond.h: New file.
117621         * lib/glthread/cond.c: New file.
117622         * m4/cond.m4: New file.
117623         * MODULES.html.sh (Multithreading): Add cond.
117625 2008-08-16  Eric Blake  <ebb9@byu.net>
117627         c-stack: fix regression on Irix 5.3 from 2008-06-21
117628         * m4/c-stack.m4 (gl_PREREQ_C_STACK): Move check for
117629         sa_sigaction...
117630         * m4/sigaction.m4 (gl_PREREQ_SIG_HANDLER_H): ...here.
117631         (gl_PREREQ_SIGACTION): Depend on sig-handler.h prereq's.
117632         * m4/signal_h.m4 (gl_SIGNAL_H_DEFAULTS): Set the default.
117633         * modules/signal (Makefile.am): Use the value.
117634         * lib/signal.in.h (sa_sigaction) [HAVE_SIGACTION
117635         && !HAVE_STRUCT_SIGACTION_SA_SIGACTION]: Define.
117636         * doc/posix-headers/signal.texi (signal.h): Document this
117637         portability issue.
117638         * doc/posix-functions/sigaction.texi (sigaction): Likewise.
117639         Reported by Tom G. Christensen.
117641 2008-08-17  Bruno Haible  <bruno@clisp.org>
117643         New module 'threadlib'.
117644         * modules/threadlib: New file.
117645         * lib/glthread/threadlib.c: New file, extracted from
117646         lib/glthread/lock.c.
117647         * lib/glthread/lock.c (dummy_thread_func, glthread_in_use): Remove
117648         functions.
117649         * m4/threadlib.m4: New file, from m4/lock.m4, renaming gl_LOCK to
117650         gl_THREADLIB and gl_LOCK_EARLY to gl_THREADLIB_EARLY.
117651         * m4/lock.m4 (gl_LOCK_EARLY, gl_LOCK_EARLY_BODY, gl_LOCK_BODY): Remove
117652         macros.
117653         (gl_LOCK): Just require gl_THREADLIB and perform checks for lock.h.
117654         (gl_DISABLE_THREADS): Remove macro.
117655         * modules/lock (Files): Remove build-aux/config.rpath.
117656         (Depends-on): Remove havelib. Add threadlib.
117657         (configure.ac-early): Remove section.
117658         * m4/tls.m4 (gl_TLS): Require gl_THREADLIB instead of gl_LOCK.
117659         * modules/tls (Depends-on): Remove lock. Add threadlib.
117660         (Link): New section, copied from threadlib.
117661         * MODULES.html.sh (Multithreading): Add threadlib.
117663 2008-08-14  Bruno Haible  <bruno@clisp.org>
117665         * lib/glthread/lock.h (glthread_lock_lock, glthread_lock_unlock,
117666         glthread_lock_destroy, glthread_rwlock_rdlock, glthread_rwlock_wrlock,
117667         glthread_rwlock_unlock, glthread_rwlock_destroy,
117668         glthread_recursive_lock_lock, glthread_recursive_lock_unlock,
117669         glthread_recursive_lock_destroy): Define as macros always.
117670         * lib/glthread/lock.c (glthread_lock_lock_func): Renamed from
117671         glthread_lock_lock.
117672         (glthread_lock_unlock_func): Renamed from glthread_lock_unlock.
117673         (glthread_lock_destroy_func): Renamed from glthread_lock_destroy.
117674         (glthread_rwlock_rdlock_func): Renamed from glthread_rwlock_rdlock.
117675         (glthread_rwlock_wrlock_func): Renamed from glthread_rwlock_wrlock.
117676         (glthread_rwlock_unlock_func): Renamed from glthread_rwlock_unlock.
117677         (glthread_rwlock_destroy_func): Renamed from glthread_rwlock_destroy.
117678         (glthread_recursive_lock_lock_func): Renamed from
117679         glthread_recursive_lock_lock.
117680         (glthread_recursive_lock_unlock_func): Renamed from
117681         glthread_recursive_lock_unlock.
117682         (glthread_recursive_lock_destroy_func): Renamed from
117683         glthread_recursive_lock_destroy.
117685 2008-08-14  Bruno Haible  <bruno@clisp.org>
117687         * lib/glthread/lock.h: Renamed from lib/lock.h.
117688         * lib/glthread/lock.c: Renamed from lib/lock.c. Update includes.
117689         * lib/glthread/tls.h: Renamed from lib/tls.h.
117690         * lib/glthread/tls.c: Renamed from lib/tls.c. Update includes.
117691         * lib/fstrcmp.c: Update includes.
117692         * lib/strsignal.c: Update includes.
117693         * modules/lock (Files, Makefile.am): Update.
117694         (Include): Change to "glthread/lock.h".
117695         * modules/tls (Files, Makefile.am): Update.
117696         (Include): Change to "glthread/tls.h".
117697         * tests/test-lock.c: Update includes.
117698         * tests/test-tls.c: Update includes.
117699         * NEWS: Mention the renamed header files.
117701 2008-08-11  Jim Meyering  <meyering@redhat.com>
117703         * lib/fts_.h: Fix grammar (insert a missing "is") in a comment.
117705 2008-08-11  Eric Blake  <ebb9@byu.net>
117707         test-c-stack: avoid C99-ism
117708         * tests/test-c-stack.c (main): Fix whitespace, move declaration
117709         before statement.
117710         Reported by Alain Guibert.
117712 2008-08-10  Jim Meyering  <meyering@redhat.com>
117714         ensure that return value of uinttostr et al are not ignored
117715         * lib/inttostr.h (__GNUC_PREREQ): Define.
117716         (__attribute_warn_unused_result__): Define.
117717         (offtostr, imaxtostr, umaxtostr, uinttostr): Apply the attribute.
117719 2008-08-07  Paolo Bonzini  <bonzini@gnu.org>
117721         * lib/lock.c (glthread_recursive_lock_init_multithreaded)
117722         [!PTHREAD_RECURSIVE_MUTEX_INITIALIZER]: Fix typo.
117724 2008-08-07  Jim Meyering  <meyering@redhat.com>
117726         * m4/inet_pton.m4: Fix typo in comment: s/inet_ntop/inet_pton/.
117728         * modules/mkstemp (License): Relicense under LGPLv2+.
117729         * modules/tempname (License): Likewise.
117731 2008-08-06  Bruno Haible  <bruno@clisp.org>
117733         * lib/poll.c (poll): Further micro-optimization.
117735 2008-08-06  Jim Meyering  <meyering@redhat.com>
117737         inet_pton.c: use locale-independent tolower
117738         * lib/inet_pton.c: Include <c-ctype.h> rather than <ctype.h>.
117739         (inet_pton6): Use c_tolower rather than tolower.
117740         * modules/inet_pton (Depends-on): Add c-ctype.
117742 2008-08-06  Paolo Bonzini  <bonzini@gnu.org>
117744         * lib/poll.c (poll): Avoid division when timeout is 0, cache
117745         _SC_OPEN_MAX, avoid repeated access to errno.  Check for nfd < 0.
117747 2008-08-06  Jim Meyering  <meyering@redhat.com>
117749         * modules/inet_pton (License): Relicense under LGPLv2+.
117751 2008-08-03  Bruno Haible  <bruno@clisp.org>
117753         Additional non-aborting API for lock and tls.
117754         * lib/lock.h: Include <errno.h>.
117755         (glthread_lock_init): New macro/function.
117756         (gl_lock_init): Define as wrapper around glthread_lock_init.
117757         (glthread_lock_lock): New macro/function.
117758         (gl_lock_lock): Define as wrapper around glthread_lock_lock.
117759         (glthread_lock_unlock): New macro/function.
117760         (gl_lock_unlock): Define as wrapper around glthread_lock_unlock.
117761         (glthread_lock_destroy): New macro/function.
117762         (gl_lock_destroy): Define as wrapper around glthread_lock_destroy.
117763         (glthread_rwlock_init): New macro/function.
117764         (gl_rwlock_init): Define as wrapper around glthread_rwlock_init.
117765         (glthread_rwlock_rdlock): New macro/function.
117766         (gl_rwlock_rdlock): Define as wrapper around glthread_rwlock_rdlock.
117767         (glthread_rwlock_wrlock): New macro/function.
117768         (gl_rwlock_wrlock): Define as wrapper around glthread_rwlock_wrlock.
117769         (glthread_rwlock_unlock): New macro/function.
117770         (gl_rwlock_unlock): Define as wrapper around glthread_rwlock_unlock.
117771         (glthread_rwlock_destroy): New macro/function.
117772         (gl_rwlock_destroy): Define as wrapper around glthread_rwlock_destroy.
117773         (glthread_recursive_lock_init): New macro/function.
117774         (gl_recursive_lock_init): Define as wrapper around
117775         glthread_recursive_lock_init.
117776         (glthread_recursive_lock_lock): New macro/function.
117777         (gl_recursive_lock_lock): Define as wrapper around
117778         glthread_recursive_lock_lock.
117779         (glthread_recursive_lock_unlock): New macro/function.
117780         (gl_recursive_lock_unlock): Define as wrapper around
117781         glthread_recursive_lock_unlock.
117782         (glthread_recursive_lock_destroy): New macro/function.
117783         (gl_recursive_lock_destroy): Define as wrapper around
117784         glthread_recursive_lock_destroy.
117785         (glthread_once): New macro/function.
117786         (gl_once): Define as wrapper around glthread_once.
117787         Update function declarations.
117788         * lib/lock.c (glthread_rwlock_init_multithreaded): Renamed from
117789         glthread_rwlock_init. Return error code.
117790         (glthread_rwlock_rdlock_multithreaded): Renamed from
117791         glthread_rwlock_rdlock. Return error code.
117792         (glthread_rwlock_wrlock_multithreaded): Renamed from
117793         glthread_rwlock_wrlock. Return error code.
117794         (glthread_rwlock_unlock_multithreaded): Renamed from
117795         glthread_rwlock_unlock. Return error code.
117796         (glthread_rwlock_destroy_multithreaded): Renamed from
117797         glthread_rwlock_destroy. Return error code.
117798         (glthread_recursive_lock_init_multithreaded): Renamed from
117799         glthread_recursive_lock_init. Return error code.
117800         (glthread_recursive_lock_lock_multithreaded): Renamed from
117801         glthread_recursive_lock_lock. Return error code.
117802         (glthread_recursive_lock_unlock_multithreaded): Renamed from
117803         glthread_recursive_lock_unlock. Return error code.
117804         (glthread_recursive_lock_destroy_multithreaded): Renamed from
117805         glthread_recursive_lock_destroy. Return error code.
117806         (glthread_once_call): Make static.
117807         (glthread_once_multithreaded): Renamed from glthread_once.
117808         * lib/tls.h: Include <errno.h>.
117809         (glthread_tls_key_init): New macro/function.
117810         (gl_tls_key_init): Define as wrapper around glthread_tls_key_init.
117811         (glthread_tls_set): New macro/function.
117812         (gl_tls_set): Define as wrapper around glthread_tls_set.
117813         (glthread_tls_key_destroy): New macro/function.
117814         (gl_tls_key_destroy): Define as wrapper around glthread_tls_key_destroy.
117815         Update function declarations.
117816         * lib/tls.c (glthread_tls_get_multithreaded): Renamed from
117817         glthread_tls_get.
117818         Suggested by Yoann Vandoorselaere <yoann@prelude-ids.org>.
117820 2008-08-04  Eric Blake  <ebb9@byu.net>
117822         gnumakefile: use space, not TAB, outside of targets
117823         * top/GNUmakefile (_dummy): Fix whitespace error in prior edit.
117825 2008-08-02  Jim Meyering  <meyering@redhat.com>
117827         getdate.y: avoid locale-dependent date parsing failure
117828         In Turkish locales, getdate would fail to recognize keywords
117829         containing a lowercase "i".  The solution is not to rely on
117830         locale-sensitive case-conversion.
117831         * lib/getdate.y: Include <c-ctype.h> rather than <ctype.h>.
117832         (lookup_word): Use c_toupper in place of toupper.
117833         (yylex, get_date): Use c_ prefixed variants of isspace and isalpha, too.
117834         Reported by Vefa Bicakci <bicave@superonline.com> in
117835         <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/14184>.
117836         * modules/getdate (Depends-on): Add c-ctype.
117838 2008-08-02  Bruno Haible  <bruno@clisp.org>
117840         * gnulib-tool (func_import): When updating or creating a .gitignore
117841         file, prepend each added line with a slash, and ignore leading slashes
117842         from the existing lines.
117843         Reported by Joel E. Denny <jdenny@ces.clemson.edu>.
117845 2008-08-02  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
117847         Portability fix for GNU make 3.79.1.
117848         * top/GNUmakefile: Avoid 'else COND', which older GNU make
117849         versions do not understand.
117851 2008-08-01  Bruno Haible  <bruno@clisp.org>
117853         Work around bug of HP-UX 10.20 cc with -0.0 literal.
117854         * tests/test-isnanf.h (zero): New variable.
117855         (main): Avoid literal -0.0f.
117856         * tests/test-isnand.h (zero): New variable.
117857         (main): Avoid literal -0.0.
117858         * tests/test-isnanl.h (zero): New variable.
117859         (main): Avoid literal -0.0L.
117860         * tests/test-isnan.c (zerof, zerod, zerol): New variables.
117861         (test_float, test_double, test_long_double): Avoid literals -0.0f,
117862         -0.0, -0.0L.
117863         * tests/test-signbit.c (test_signbitf): Avoid literal -0.0f.
117864         (test_signbitd): Avoid literal -0.0.
117865         (test_signbitl): Avoid literal -0.0L.
117866         * tests/test-ceilf1.c (zero): New variable.
117867         (main): Avoid literal -0.0f.
117868         * tests/test-ceill.c (zero): New variable.
117869         (main): Avoid literal -0.0L.
117870         * tests/test-floorf1.c (zero): New variable.
117871         (main): Avoid literal -0.0f.
117872         * tests/test-floorl.c (zero): New variable.
117873         (main): Avoid literal -0.0L.
117874         * tests/test-roundf1.c (zero): New variable.
117875         (main): Avoid literal -0.0f.
117876         * tests/test-round1.c (zero): New variable.
117877         (main): Avoid literal -0.0.
117878         * tests/test-roundl.c (zero): New variable.
117879         (main): Avoid literal -0.0L.
117880         * tests/test-truncf1.c (zero): New variable.
117881         (main): Avoid literal -0.0f.
117882         * tests/test-trunc1.c (zero): New variable.
117883         (main): Avoid literal -0.0.
117884         * tests/test-truncl.c (zero): New variable.
117885         (main): Avoid literal -0.0L.
117886         * tests/test-frexp.c (zero): New variable.
117887         (main): Avoid literal -0.0.
117888         * tests/test-frexpl.c (zero): New variable.
117889         (main): Avoid literal -0.0L.
117890         * tests/test-ldexpl.c (zero): New variable.
117891         (main): Avoid literal -0.0L.
117892         * tests/test-snprintf-posix.h (have_minus_zero): Avoid literal -0.0.
117893         (zerod, zerol): New variables.
117894         (test_function): Avoid literals -0.0, -0.0L.
117895         * tests/test-sprintf-posix.h (have_minus_zero): Avoid literal -0.0.
117896         (zerod, zerol): New variables.
117897         (test_function): Avoid literals -0.0, -0.0L.
117898         * tests/test-vasnprintf-posix.c (have_minus_zero): Avoid literal -0.0.
117899         (zerod, zerol): New variables.
117900         (test_function): Avoid literals -0.0, -0.0L.
117901         * tests/test-vasprintf-posix.c (have_minus_zero): Avoid literal -0.0.
117902         (zerod, zerol): New variables.
117903         (test_function): Avoid literals -0.0, -0.0L.
117904         * tests/test-strtod.c (zero): New variable.
117905         (main): Avoid literal -0.0.
117906         Reported by Jonathan C. Patschke <jp@centtech.com>.
117908 2008-07-31  Jim Meyering  <meyering@redhat.com>
117910         sha256.h: correct definition of SHA224_DIGEST_SIZE
117911         * lib/sha256.h (SHA224_DIGEST_SIZE): Define to 28, not 24.
117912         Reported by Paulie Pena IV <paulie4@gmail.com>.
117913         Define as 224 / 8, rather than as a literal.
117914         (SHA256_DIGEST_SIZE): Define as 256/8 rather than equivalent literal.
117915         * lib/sha512.h (SHA384_DIGEST_SIZE): Likewise, define as equiv: 384/8.
117916         (SHA512_DIGEST_SIZE): Likewise, define as equivalent quotient: 512/8.
117918 2008-07-31  Bruno Haible  <bruno@clisp.org>
117920         * lib/regex_internal.h (BITSET_WORD_BITS): Make first conditional work
117921         on HP-UX 10.20 with "cc -Ae". Fix second conditional.
117922         Reported by Jonathan Patschke <jp@centtech.com>.
117924 2008-07-31  Bruno Haible  <bruno@clisp.org>
117926         * gnulib-tool (func_import): Make change from 2008-06-23 more robust.
117927         Reported by Paolo Bonzini <bonzini@gnu.org>.
117929 2008-07-30  Eric Blake  <ebb9@byu.net>
117931         test-strtod: allow compilation without -lm
117932         * tests/test-strtod.c (main): Avoid link dependence on fabs.
117933         Reported by Dennis Clarke <blastwave@gmail.com>.
117935 2008-07-28  Jim Meyering  <meyering@redhat.com>
117937         bootstrap: work also when there are no .po files in po/
117938         * build-aux/bootstrap (update_po_files): Complete the change
117939         that I began in bc960df8c789c878f1c1c54a28a3c2648dead8d9.
117941 2008-07-27  Jim Meyering  <meyering@redhat.com>
117943         * users.txt: Add zile.
117945 2008-07-26  Ben Pfaff  <blp@gnu.org>
117947         Add missing dependencies on new m4/exponent[fdl].m4 files.
117948         * modules/isnanf-nolibm: Add m4/exponentf.m4.
117949         * modules/isnand-nolibm: Add m4/exponentd.m4.
117950         * modules/isnanl-nolibm: Add m4/exponentl.m4.
117951         * modules/signbit-tests: Use m4/exponent[fdl].m4 instead of
117952         m4/isnan[fdl].m4, because the macros actually used moved.
117953         Reported by Jim Meyering.
117955 2008-07-14  Ben Pfaff  <blp@gnu.org>
117957         Add isinf module.
117958         * lib/isinf.c: New file.
117959         * lib/math.in.h: Define isinf macro if we have decided to replace
117960         it.
117961         * m4/isinf.m4: New file.
117962         * m4/math_h.m4: Initialize and substitute variables for isinf
117963         module.
117964         * modules/isinf: New file.
117965         * modules/isinf-tests: New file.
117966         * modules/math: Add substitutions for new module.
117967         * tests/test-isinf.c: New file.
117968         * doc/posix-functions/isinf.texi: Mention new module.
117969         * MODULES.html.sh: Mention new module.
117971 2008-07-14  Ben Pfaff  <blp@gnu.org>
117973         Factor out some macros for use by additional modules.
117974         * m4/isnanf.m4 (gl_FLOAT_EXPONENT_LOCATION): Move into new file
117975         exponentf.m4.
117976         * m4/isnand.m4 (gl_DOUBLE_EXPONENT_LOCATION): Move into new file
117977         exponentd.m4.
117978         * m4/isnanl.m4 (gl_LONG_DOUBLE_EXPONENT_LOCATION): Move into new
117979         file exponentl.m4.
117980         * m4/exponentf.m4: New file.
117981         * m4/exponentd.m4: New file.
117982         * m4/exponentl.m4: New file.
117983         * modules/isnanf: Use new file m4/exponentf.m4.
117984         * modules/isnand: Use new file m4/exponentd.m4.
117985         * modules/isnanl: Use new file m4/exponentl.m4.
117987 2008-07-23  Ulrich Drepper  <drepper@redhat.com>
117989         mktime.c: normalize tp->tm_isdst value to -1/0/1.
117990         * lib/mktime.c (__mktime_internal): Normalize tp->tm_isdst value.
117991         Reported by Michael Ringe <Michael.Ringe@gmx.de> in
117992         <http://sourceware.org/bugzilla/show_bug.cgi?id=6723>.
117994         * lib/canonicalize-lgpl.c (__realpath): Avoid buffer overflow after
117995         readlink on platforms without PATH_MAX.
117997 2008-07-21  Eric Blake  <ebb9@byu.net>
117999         Warn, not fail, on stale version.
118000         * top/GNUmakefile (_curr-ver): Tone down previous patch.
118002         Don't allow installation with stale devel version number.
118003         * top/GNUmakefile (_is-install-target): New macro.
118004         (_curr-ver): Forbid installation with stale version number.
118006 2008-07-20  Bruno Haible  <bruno@clisp.org>
118008         * modules/c-stack-tests (Makefile.am): Add LIBSIGSEGV to
118009         TESTS_ENVIRONMENT.
118010         * tests/test-c-stack2.sh: React differently if LIBSIGSEGV is in use.
118012 2008-07-20  Bruno Haible  <bruno@clisp.org>
118014         * lib/c-stack.h (c_stack_action): Add documentation.
118015         * lib/c-stack.c (c_stack_action): Remove incomplete documentation.
118017 2008-07-20  Bruno Haible  <bruno@clisp.org>
118019         * modules/canonicalize-lgpl (License): Relicense under LGPLv2+.
118020         * modules/readlink (License): Likewise.
118022 2008-07-17  Eric Blake  <ebb9@byu.net>
118024         * modules/c-stack (Link): Fix typo.
118026         Make c-stack use libsigsegv, when available.
118027         * modules/c-stack (Depends-on): Add libsigsegv.
118028         * modules/c-stack-tests (Makefile.am): Link with libsigsegv, if
118029         needed.
118030         * lib/c-stack.c (SIGSTKSZ): Define fallback.
118031         (segv_handler, overflow_handler, c_stack_action)
118032         [HAVE_LIBSIGSEGV && !HAVE_XSI_STACK_OVERFLOW_HEURISTIC]: Add new
118033         implementation when libsigsegv is available, but only when using
118034         the library is necessary.
118035         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Add
118036         comment, explaining why XSI check fails on Linux.
118037         (gl_PREREQ_C_STACK): Supply LIBCSTACK, LTLIBCSTACK.
118038         * tests/test-c-stack2.sh: Tweak skip message.
118039         * NEWS: Document new link-time requirements.
118041 2008-07-16  Eric Blake  <ebb9@byu.net>
118043         c-stack: Expose false positives when not using libsigsegv.
118044         * modules/c-stack-tests (Files): Expand test.
118045         * tests/test-c-stack.c (main): Add means to conditionally trigger
118046         non-overflow SIGSEGV.
118047         * tests/test-c-stack2.sh: New file.
118049 2008-07-14  Bruno Haible  <bruno@clisp.org>
118051         * m4/libsigsegv.m4: Remove unneeded AC_PREREQ.
118052         Reported by Eric Blake.
118054 2008-07-14  Sam Steingold  <sds@gnu.org>
118055             Bruno Haible  <bruno@clisp.org>
118057         New module libsigsegv.
118058         * modules/libsigsegv: New file.
118059         * m4/libsigsegv.m4: New file, from GNU clisp sigsegv.m4 with
118060         modifications.
118061         * MODULES.html.sh (Signal handling): New section.
118063 2008-07-14  Bruno Haible  <bruno@clisp.org>
118065         * modules/unictype/ctype-* (Description): Add the word "function".
118066         Improves the resulting doc in MODULES.html.
118068 2008-07-12  Ben Pfaff  <blp@gnu.org>
118070         Add longlong module.
118071         * modules/longlong: New file.
118073 2008-07-12  Bruno Haible  <bruno@clisp.org>
118075         * m4/isnan.m4 (gl_ISNAN): When the replacement is used, set ISNAN_LIBM
118076         to empty.
118078 2008-07-10  Ben Pfaff  <blp@gnu.org>
118080         Add isnan module.
118081         * doc/posix-functions/isnan.texi: Mention new module.
118082         * lib/math.in.h: Define isnan macro if we have decided to replace
118083         it.
118084         * m4/isnan.m4: New file.
118085         * m4/isnanl.m4 (gl_FUNC_ISNANL): Factor out some code into new
118086         macro gl_BUILD_ISNANL so that isnan.m4 can use that functionality
118087         also.
118088         (gl_FUNC_ISNANL_NO_LIBM): Factor out same code, to reduce
118089         redundancy.
118090         * m4/math_h.m4: Initialize and substitute variables for isnan
118091         module.
118092         * modules/isnan: New file.
118093         * modules/isnan-tests: New file.
118094         * modules/math: Add substitutions for new module.
118095         * tests/test-isnan.c: New file.
118096         * MODULES.html.sh: Mention new module.
118098 2008-07-10  Ben Pfaff  <blp@gnu.org>
118100         Add isnanf module.
118101         * lib/isnanf.m4: New file.
118102         * m4/isnanf.m4 (gl_FUNC_ISNANF): New macro.
118103         (gl_HAVE_ISNANF_IN_LIBM): New macro.
118104         (gl_BUILD_ISNANF): New macro used by gl_FUNC_ISNANF,
118105         gl_FUNC_ISNANF_NO_LIBM, and gl_FUNC_ISNAN.
118106         * modules/isnanf: New file.
118107         * modules/isnanf-tests: New file.
118108         * modules/isnanf-nolibm-tests: Add tests/test-isnanf.h to list of
118109         files.
118110         * tests/test-isnanf-nolibm.c: factored most of its contents into
118111         new file tests/test-isnanf.h.
118112         * tests/test-isnanf.h: New file.
118113         * tests/test-isnanf.c: New file.
118114         * MODULES.html.sh: Mention new module.
118115         * doc/glibc-functions/isnanf.texi: Mention new module.
118117 2008-07-10  Ben Pfaff  <blp@gnu.org>
118119         Add isnand module.
118120         * lib/isnand.h: New file.
118121         * m4/isnand.m4 (gl_FUNC_ISNAND): New macro.
118122         (gl_FUNC_ISNAND_NO_LIBM): Split partially into new macro
118123         gl_HAVE_ISNAND_NO_LIBM so that gl_FUNC_ISNAND can use that
118124         functionality also.
118125         (gl_BUILD_ISNAND): New macro used by gl_FUNC_ISNAND,
118126         gl_FUNC_ISNAND_NO_LIBM, and gl_FUNC_ISNAN.
118127         (gl_HAVE_ISNAND_IN_LIBM): New macro.
118128         * modules/isnand: New file.
118129         * modules/isnand-tests: New file.
118130         * modules/isnand-nolibm-tests: Add tests/test-isnand.h to list of
118131         files.
118132         * tests/test-isnand-nolibm.c: factored most of its contents into
118133         new file tests/test-isnand.h.
118134         * tests/test-isnand.h: New file.
118135         * tests/test-isnand.c: New file.
118136         * MODULES.html.sh: Mention new module.
118138 2008-07-10  Ben Pfaff  <blp@gnu.org>
118140         * lib/isnanf.h: Rename lib/isnanf-nolibm.h.
118141         * lib/isnand.h: Rename lib/isnand-nolibm.h.
118142         * tests/test-isnanf.c: Rename tests/test-isnanf-nolibm.c.
118143         * tests/test-isnand.c: Rename tests/test-isnand-nolibm.c.
118144         * modules/isnanf-nolibm: Update references to renamed files.
118145         * modules/isnand-nolibm: Likewise.
118146         * modules/isnanf-nolibm-tests: Likewise.
118147         * modules/isnand-nolibm-tests: Likewise.
118148         * lib/frexp.c: Likewise.
118149         * lib/isfinite.c: Likewise.
118150         * lib/signbitd.c: Likewise.
118151         * lib/signbitf.c: Likewise.
118152         * lib/vasnprintf.c: Likewise.
118153         * tests/test-ceilf1.c: Likewise.
118154         * tests/test-ceilf2.c: Likewise.
118155         * tests/test-floorf1.c: Likewise.
118156         * tests/test-floorf2.c: Likewise.
118157         * tests/test-frexp.c: Likewise.
118158         * tests/test-round1.c: Likewise.
118159         * tests/test-round2.c: Likewise.
118160         * tests/test-roundf1.c: Likewise.
118161         * tests/test-strtod.c: Likewise.
118162         * tests/test-trunc1.c: Likewise.
118163         * tests/test-trunc2.c: Likewise.
118164         * tests/test-truncf1.c: Likewise.
118165         * tests/test-truncf2.c: Likewise.
118166         * NEWS: Mention the renamed header files.
118168 2008-07-11  Jim Meyering  <meyering@redhat.com>
118170         vc-list-files: make the last-resort awk code more portable
118171         * build-aux/vc-list-files: Don't rely on awk's "sub" command.
118172         /bin/awk from OpenSolaris 11's SUNWesu version 2008.03.22.10.56
118173         does not support it.
118175 2008-07-10  Eric Blake  <ebb9@byu.net>
118177         Work with tar's bootstrap.
118178         * gnulib-tool (func_emit_initmacro_end): Use m4_defn in the case
118179         where LIBSOURCES_DIR contains .#bootmp but must not be treated as
118180         an m4 comment.
118182 2008-07-09  Jim Meyering  <meyering@redhat.com>
118184         posix-shell.m4: fix typo that made this test malfunction
118185         * m4/posix-shell.m4: Remove capitalization in variable name.
118187 2008-07-08  Bruno Haible  <bruno@clisp.org>
118189         * m4/onceonly.m4: Update comments.
118190         Reported by Ben Pfaff <blp@cs.stanford.edu>.
118192 2008-07-04  Jim Meyering  <meyering@redhat.com>
118194         * users.txt: Add vc-dwim.
118195         (bison, coreutils): Use the gitweb URL.
118197 2008-07-03  Jim Meyering  <meyering@redhat.com>
118199         * users.txt: Add libffcall.  From Sam Steingold.
118201 2008-07-03  Ondřej Vašík  <ovasik@redhat.com>
118203         getdate.y: do not ignore TZ with relative day, month or year offset
118204         * lib/getdate.y (get_date): Move the tz-handling block to follow the
118205         relative-date-handling, since otherwise, the latter would clobber the
118206         sole output (an updated Start value) of the tz-handling block.
118207         * tests/test-getdate.c: Tests for the fix
118209 2008-07-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
118211         Recognize 'foo_LIBRARIES += libgnu.a'.
118212         * gnulib-tool (func_emit_lib_Makefile_am): Recognize if a
118213         makefile snippet has already specified an installation location,
118214         also using '+='.
118216 2008-07-02  Ondřej Vašík  <ovasik@redhat.com>
118218         getdate.y: factor out common actions
118219         * lib/getdate.y (apply_relative_time, set_hhmmss): New functions.
118220         Use them in place of open-coded actions.
118222 2008-07-01  Simon Josefsson  <simon@josefsson.org>
118224         Add self-test for getdate module.
118225         * modules/getdate-tests: New file.
118226         * tests/test-getdate.c: New file.
118228 2008-06-29  Bruno Haible  <bruno@clisp.org>
118230         * gnulib-tool (func_import): Put gnulib-comp.m4 into .cvsignore or
118231         .gitignore.
118232         Reported by Sylvain Beucler <beuc@beuc.net>.
118234 2008-06-29  Bruno Haible  <bruno@clisp.org>
118236         * doc/gnulib-tool.texi (VCS Issues): Mention --no-vc-files option.
118237         * m4/gnulib-tool.m4: Update to match current gnulib-tool.
118239 2008-06-29  Bruno Haible  <bruno@clisp.org>
118241         * gnulib-tool (func_import): Recommend to put gnulib-cache.m4 into
118242         EXTRA_DIST.
118243         Reported by Sylvain Beucler <beuc@beuc.net>.
118245 2008-06-26  Jim Meyering  <meyering@redhat.com>
118247         make several modules depend on the "open" module
118248         This provides slightly increased consistency when opening-for-write
118249         the name of a non-directory spelled with a trailing slash.
118250         * modules/chdir-safer: Likewise.
118251         * modules/chown: Likewise.
118252         * modules/clean-temp: Likewise.
118253         * modules/copy-file: Likewise.
118254         * modules/fchdir: Likewise.
118255         * modules/fcntl-safer: Likewise.
118256         * modules/pipe: Likewise.
118257         * modules/utime: Likewise.
118258         Prompted by Eric Blake and Bruno Haible.
118260 2008-06-24  Andreas Schwab  <schwab@suse.de>
118262         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): Don't test whether compound
118263         literals can be used as initializers for global variables.
118265 2008-06-23  Eric Blake  <ebb9@byu.net>
118267         Make gnulib-cache.m4 easier to diff.
118268         * gnulib-tool (func_import): Allow newlines when reading cached
118269         gl_MODULES, and generate newlines when creating gnulib-cache.m4.
118271 2008-06-23  Bruno Haible  <bruno@clisp.org>
118273         * m4/signalblocking.m4 (gl_PREREQ_SIG_HANDLER_H): Remove macro.
118274         (gl_PREREQ_SIGPROCMASK): Don't invoke it.
118275         * m4/sigaction.m4 (gl_PREREQ_SIG_HANDLER_H): New macro, moved here from
118276         m4/signalblocking.m4.
118277         (gl_PREREQ_SIGACTION): Don't invoke it.
118278         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): Invoke
118279         gl_PREREQ_SIG_HANDLER_H.
118280         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Likewise.
118281         Don't check for sigaction here.
118283 2008-06-23  Bruno Haible  <bruno@clisp.org>
118285         * lib/fatal-signal.c (fatal_signal_handler): Update comment.
118286         (install_handlers): Don't set the SA_RESETHAND flag.
118288 2008-06-23  Bruno Haible  <bruno@clisp.org>
118290         * m4/sigaction.m4: Comment fixes.
118291         * lib/signal.in.h: Likewise.
118293 2008-06-23  Eric Blake  <ebb9@byu.net>
118295         Fix typo.
118296         * tests/test-sigaction.c (MASK_SA_FLAGS): Add missing operator.
118298         Avoid SA_ namespace.
118299         * tests/test-sigaction.c (MASK_SA_FLAGS): Rename from SA_MASK.
118300         Reported by Ralf Wildenhues.
118302         Avoid test failure due to SA_RESTORER.
118303         * tests/test-sigaction.c (SA_MASK): New macro.
118304         (main): Avoid failing due to extension flags being set.
118305         Reported by Jim Meyering.
118307         Revert use of sig-handler.h in sigprocmask.c.
118308         * modules/sigprocmask (Files): Don't rely on sig-handler.h, since
118309         it requires the existence of struct sigaction.
118310         * lib/sigprocmask.c (handler_t): Restore typedef.
118311         (rpl_signal, old_handlers): Use local type.
118313 2008-06-22  Bruno Haible  <bruno@clisp.org>
118315         * tests/test-stdint.c: Disable the INTMAX_MAX preprocessor test
118316         conditionally.
118317         Reported by Albert Chin <bug-gnulib@mlists.thewrittenword.com>.
118319 2008-06-22  Bruno Haible  <bruno@clisp.org>
118321         * doc/posix-functions/siginterrupt.texi: Move note.
118323         * lib/signal.in.h (SA_RESTART): New macro.
118324         * lib/sigaction.c: Update comment.
118326         * m4/sigaction.m4 (gl_SIGACTION): Require gl_SIGNAL_H_DEFAULTS.
118328         * m4/signalblocking.m4 (gl_PREREQ_SIG_HANDLER_H): New macro.
118329         (gl_PREREQ_SIGPROCMASK): Invoke it.
118330         * m4/sigaction.m4 (gl_PREREQ_SIGACTION): Likewise.
118332         * lib/nanosleep.c (rpl_nanosleep): Setup newact only when it is needed.
118334         * lib/sigprocmask.c: Update a comment.
118336 2008-06-21  Eric Blake  <ebb9@byu.net>
118338         Use sigaction module rather than signal().
118339         * modules/c-stack (Depends-on): Add sigaction.
118340         * modules/fatal-signal (Depends-on): Likewise.
118341         * modules/nanosleep (Depends-on): Likewise.
118342         * modules/sigprocmask (Files): Add sig-handler.h.
118343         * modules/sigaction (Files): Likewise.
118344         * lib/sig-handler.h (get_handler): New file, suggested by Paul
118345         Eggert.
118346         * lib/c-stack.c (SIGACTION_WORKS): Simplify conditions.
118347         (c_stack_action) [!SIGACTION_WORKS]: Use sigaction, not signal.
118348         * lib/fatal-signal.c (uninstall_handlers, install_handlers)
118349         (init_fatal_signals): Likewise.
118350         * lib/nanosleep.c (rpl_nanosleep): Likewise.
118351         (siginterrupt): Delete fallback.
118352         * lib/sigprocmask.c (handler_t, old_handlers): Use sa_handler_t
118353         instead.
118354         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): Drop check for
118355         siginterrupt.
118357         New module sigaction, for mingw.
118358         * modules/sigaction: New module...
118359         * modules/sigaction-tests: ...and its test.
118360         * m4/sigaction.m4: New file.
118361         * lib/sigaction.c: Likewise.
118362         * tests/test-sigaction.c: Likewise.
118363         * m4/signal_h.m4 (gl_SIGNAL_H_DEFAULTS): Add sigaction variables.
118364         * modules/signal (Makefile.am): Likewise.
118365         * lib/signal.in.h (!@HAVE_SIGACTION@): Define replacements when
118366         needed.
118367         * doc/posix-headers/signal.texi (signal.h): Mention provided
118368         types.
118369         * doc/posix-functions/siginterrupt.texi (siginterrupt): Mention
118370         that sigaction is preferable.
118371         * doc/posix-functions/sigaction.texi (sigaction): Mention new
118372         module.
118373         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
118374         sigaction.
118376         Improve robustness of sigprocmask by overriding signal.
118377         * lib/signal.in.h (rpl_signal): Override signal when sigprocmask
118378         is in use.
118379         * lib/sigprocmask.c (blocked_handler): Reinstall block handler.
118380         (SIGKILL, SIGSTOP): Provide fallbacks.
118381         (rpl_signal): Implement.
118382         (old_handlers, blocked_set): Mark volatile, since sigprocmask and
118383         signal can be called inside handlers.
118385         Fix nanosleep module on mingw.
118386         * modules/nanosleep (Depends-on): Add sys_select.
118387         * lib/nanosleep.c (HAVE_SYS_SELECT_H): Rely on gnulib module.
118389         Fix licensing of sigprocmask.
118390         * modules/raise (License): Relicense as LGPL.
118392 2008-06-21  Bruno Haible  <bruno@clisp.org>
118394         * lib/propername.c (proper_name_utf8): Don't use the transliterated
118395         result if it contains question marks.
118396         Reported by Michael Geng <linux@michaelgeng.de>.
118398 2008-06-19  Bruno Haible  <bruno@clisp.org>
118400         Fix CVS-ism.
118401         * doc/gnulib.texi: Include updated-stamp.texi.
118402         * doc/Makefile (GNULIB_TEXI_FILES): New variable.
118403         (updated-stamp.texi): New rule.
118404         (gnulib.info): Depend on it.
118405         * doc/.gitignore: Add updated-stamp.texi.
118406         Based on a patch by Thien-Thi Nguyen <ttn@gnuvola.org>.
118408 2008-06-19  Bruno Haible  <bruno@clisp.org>
118410         * doc/Makefile (gnulib.info): Update and simplify dependencies.
118411         Reported by Thien-Thi Nguyen <ttn@gnuvola.org>.
118413 2008-06-19  Eric Blake  <ebb9@byu.net>
118415         Fix VPATH 'make dist' with GNU make and non-VCS tarball.
118416         * top/GNUmakefile (_curr-ver): Don't use $(srcdir) unnecessarily.
118417         Reported by Stepan Kasal.
118419 2008-06-18  Bruno Haible  <bruno@clisp.org>
118421         * lib/fatal-signal.c (init_fatal_signals): Add comment.
118422         Reported by Eric Blake.
118424 2008-06-18  Eric Blake  <ebb9@byu.net>
118426         Work around cygwin 1.5.25 strsignal bug.
118427         * tests/test-strsignal.c: Allow for const char *.
118428         * doc/glibc-functions/strsignal.texi (strsignal): Document the bug.
118430 2008-06-18  Simon Josefsson  <simon@josefsson.org>
118432         * users.txt: Update URL to article and add author/date
118433         information.
118435 2008-06-17  Bruno Haible  <bruno@clisp.org>
118437         New macro gl_DISABLE_THREADS.
118438         * m4/lock.m4 (gl_LOCK_EARLY_BODY): Use value gl_use_threads_default
118439         if the user did not pass --enable-threads or --disable-threads option.
118440         (gl_DISABLE_THREADS): New macro.
118441         Reported by Eric Blake <ebb9@byu.net>.
118443 2008-06-17  Bruno Haible  <bruno@clisp.org>
118445         * lib/tls.h (gl_tls_key_init): Evaluate the destructor argument also
118446         when the macro ignores it.
118447         Based on a patch by Eric Blake <ebb9@byu.net>.
118449 2008-06-17  Bruno Haible  <bruno@clisp.org>
118451         * modules/tls (License): Change to LGPLv2+.
118452         Reported by Eric Blake.
118454 2008-06-17  Eric Blake  <ebb9@byu.net>
118456         Simplify c-stack prerequisites.
118457         * lib/c-stack.c (includes): Remove unused <sys/resource.h>.
118458         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Posix 200x
118459         no longer requires <ucontext.h> to exist.  Optimize setrlimit
118460         check.
118461         (gl_PREREQ_C_STACK): Remove check for unused getcontext and
118462         <sys/resource.h>.
118464         Move c-stack test into testsuite.
118465         * modules/c-stack-tests: New file.
118466         * lib/c-stack.c [DEBUG]: Move test program...
118467         * tests/test-c-stack.c: ...into this new file.  Skip rather than
118468         fail test if sigaltstack is lacking.
118469         * tests/test-c-stack.sh: New driver file.
118471 2008-06-16  Eric Blake  <ebb9@byu.net>
118473         Use raise module consistently.
118474         * modules/fatal-signal (Depends-on): Add raise.
118475         * modules/sigprocmask (Depends-on): Likewise.
118476         * lib/fatal-signal.c (fatal_signal_handler): Rely on raise.
118477         * lib/sigprocmask.c (sigprocmask): Likewise.
118478         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Likewise.
118479         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Likewise.
118481         Fix compliance bug in sigpending.
118482         * lib/sigprocmask.c (sigpending): Return pending array via
118483         parameter, not return value.
118485 2008-06-14  Eric Blake  <ebb9@byu.net>
118487         Improve obstack-printf test code.
118488         * tests/test-obstack-printf.c (test_function): Fix comment, and
118489         simplify usage of obstack_* in macros.  Add a test for coverage.
118490         Reported by Bruno Haible.
118492 2008-06-14  Bruno Haible  <bruno@clisp.org>
118494         * lib/obstack_printf.c (obstack_vprintf): Define the stack-allocated
118495         array size as a constant, not as a const variable.
118496         * m4/obstack-printf.m4 (gl_FUNC_OBSTACK_PRINTF): Require
118497         AC_USE_SYSTEM_EXTENSIONS.
118498         * m4/obstack-printf-posix.m4 (gl_FUNC_OBSTACK_PRINTF_POSIX): Likewise.
118499         Test whether the obstack_printf function actually exists.
118500         * modules/obstack-printf (Depends-on): Add extensions.
118501         (Include): Remove obstack.h.
118502         * modules/obstack-printf-posix (Depends-on): Add extensions.
118503         (Include): Remove obstack.h.
118505 2008-06-13  Eric Blake  <ebb9@byu.net>
118507         Add obstack-printf and obstack-printf-posix modules.
118508         * modules/obstack-printf: New file.
118509         * modules/obstack-printf-posix: Likewise.
118510         * MODULES.html.sh (Misc): Mention them.
118511         * doc/glibc-functions/obstack_printf.texi (obstack_printf):
118512         Likewise.
118513         * doc/glibc-functions/obstack_vprintf.texi (obstack_vprintf):
118514         Likewise.
118515         * modules/stdio (Makefile.am): Accomodate new modules.
118516         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Likewise.
118517         * lib/stdio.in.h (rpl_obstack_printf, rpl_obstack_vprintf):
118518         Declare.
118519         * lib/obstack_printf.c (obstack_printf, obstack_vprintf): New
118520         functions.
118521         * m4/obstack-printf.m4 (gl_OBSTACK_PRINTF)
118522         (gl_REPLACE_OBSTACK_PRINTF): New macros
118523         * m4/obstack-printf-posix.m4 (gl_OBSTACK_PRINTF_POSIX): Likewise.
118524         * tests/test-obstack-printf.c: New file.
118525         * modules/obstack-printf-tests: Likewise.
118526         * modules/obstack-printf-posix-tests: Likewise.
118528 2008-06-11  Bruno Haible  <bruno@clisp.org>
118530         * m4/open.m4 (gl_FUNC_OPEN): Add test against trailing slash bug.
118531         * lib/open.c: Include errno.h.
118532         (open): Fail when attempting to write to a file that has a trailing
118533         slash.
118534         * tests/test-open.c (main): Test against trailing slash bug.
118535         * doc/posix-functions/open.texi: Mention the trailing slash bug.
118537 2008-06-10  Bruno Haible  <bruno@clisp.org>
118539         * tests/test-vc-list-files-git.sh: Make double use of 'exit'. Needed
118540         for $? to work inside the trap command, with various /bin/sh-s.
118541         * tests/test-vc-list-files-cvs.sh: Likewise.
118543 2008-06-10  Bruno Haible  <bruno@clisp.org>
118545         * lib/acl-internal.h: Don't include gettext.h here.
118546         * lib/set-mode-acl.c: Include gettext.h here.
118547         * lib/copy-acl.c: Likewise.
118549 2008-06-10  Bruno Haible  <bruno@clisp.org>
118551         * lib/wait-process.h (wait_subprocess): Add termsigp argument.
118552         * lib/wait-process.c (wait_subprocess): Likewise.
118553         * lib/execute.h (execute): Add termsigp argument.
118554         * lib/execute.c (execute): Likewise.
118555         * lib/csharpcomp.c (compile_csharp_using_pnet,
118556         compile_csharp_using_mono, compile_csharp_using_sscli): Update.
118557         * lib/csharpexec.c (execute_csharp_using_pnet,
118558         execute_csharp_using_mono, execute_csharp_using_sscli): Update.
118559         * lib/javacomp.c (compile_using_envjavac, compile_using_gcj,
118560         compile_using_javac, compile_using_jikes, is_envjavac_gcj,
118561         is_envjavac_gcj43, is_gcj_present, is_gcj_43, is_javac_present,
118562         is_jikes_present): Update.
118563         * lib/javaexec.c (execute_java_class): Update.
118564         * lib/javaversion.c (execute_and_read_line): Update.
118565         * NEWS: Document the changes.
118566         Reported by Eric Blake.
118568 2008-06-10  Eric Blake  <ebb9@byu.net>
118570         Add missing include.
118571         * tests/test-strstr.c (includes): Add <signal.h>.
118572         * tests/test-strcasestr.c (includes): Likewise.
118573         * tests/test-memmem.c (includes): Likewise.
118575 2008-06-10  Bruno Haible  <bruno@clisp.org>
118577         * lib/wait-process.c (wait_subprocess): Add an assertion.
118579 2008-06-10  Bruno Haible  <bruno@clisp.org>
118581         * lib/wait-process.c (wait_subprocess): Try to fix waitid() based code.
118583 2008-06-10  Bruno Haible  <bruno@clisp.org>
118585         * tests/test-memmem.c (main): Reset SIGALRM to default handling before
118586         using alarm().
118587         * tests/test-strcasestr.c (main): Likewise.
118588         * tests/test-strstr.c (main): Likewise.
118590 2008-06-09  Bruno Haible  <bruno@clisp.org>
118592         Work around the Solaris 10 ACE ACLs ABI change.
118593         * lib/acl-internal.h (acl_nontrivial, acl_ace_nontrivial): Don't
118594         declare if ACL_NO_TRIVIAL is present.
118595         (ACE_ACCESS_ALLOWED_ACE_TYPE, ACE_ACCESS_DENIED_ACE_TYPE,
118596         NEW_ACE_OWNER, NEW_ACE_GROUP, NEW_ACE_IDENTIFIER_GROUP, ACE_EVERYONE,
118597         NEW_ACE_READ_DATA, NEW_ACE_WRITE_DATA, NEW_ACE_EXECUTE): New macros.
118598         * lib/file-has-acl.c (acl_nontrivial, acl_ace_nontrivial): Don't
118599         define if ACL_NO_TRIVIAL is present.
118600         (acl_ace_nontrivial): Detect whether the old or new ABI is in use,
118601         and use the current ABI.
118602         (file_has_acl): Use same #if condition as elsewhere.
118603         * lib/set-mode-acl.c (qset_acl): Detect whether the old or new ABI is
118604         in use, and use the current ABI.
118605         * doc/acl-resources.txt: More doc about newer Solaris 10 versions.
118606         Reported by Jim Meyering.
118608 2008-06-09  Eric Blake  <ebb9@byu.net>
118610         Work around environments that (stupidly) ignore SIGALRM.
118611         * m4/strstr.m4 (gl_FUNC_STRSTR): Reset SIGALRM to default handling
118612         before using alarm().
118613         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Likewise.
118614         * m4/memmem.m4 (gl_FUNC_MEMMEM): Likewise.
118615         Reported by Ian Beckwith <ianb@erislabs.net>.
118617         Produce autobuild blurb earlier in log.
118618         * modules/autobuild (configure.ac-early): Move AB_INIT here.
118620 2008-06-09  Jim Meyering  <meyering@redhat.com>
118621         and Ondřej Vašík  <ovasik@redhat.com>
118623         utimens.c: correct kernel bug work-around
118624         Ondřej Vašík found that the invalid return value of 280 indicates
118625         failure, not success, and the kernel bug we're trying to work
118626         around affects not just the utimensat call, but also the fallback
118627         futimens call.
118628         * lib/utimens.c (gl_futimens) [HAVE_UTIMENSAT]: Simulate failure,
118629         not success.
118630         [HAVE_FUTIMENS]: Use the same work-around, here.
118632 2008-06-09  Jim Meyering  <meyering@redhat.com>
118634         add more guards around definition of ACE_-related code
118635         * lib/file-has-acl.c (acl_ace_nontrivial): Define only if
118636         ALLOW and ACE_OWNER are also defined.
118638 2008-06-08  Bruno Haible  <bruno@clisp.org>
118640         * lib/acl-internal.h: Add me as co-author.
118641         * lib/file-has-acl.c: Likewise.
118642         * lib/set-mode-acl.c: Likewise.
118643         * lib/copy-acl.c: Likewise.
118645 2008-06-08  Bruno Haible  <bruno@clisp.org>
118647         Add support for AIX ACLs.
118648         * lib/acl-internal.h (acl_nontrivial): New declaration.
118649         * lib/file-has-acl.c (acl_nontrivial): New function.
118650         (file_has_acl): Add implementation using AIX 4 ACL API.
118651         * lib/set-mode-acl.c (qset_acl): Likewise.
118652         * lib/copy-acl.c (qcopy_acl): Likewise.
118654 2008-06-08  Bruno Haible  <bruno@clisp.org>
118656         Add support for HP-UX ACLs.
118657         * lib/acl-internal.h (acl_nontrivial): New declaration.
118658         * lib/file-has-acl.c (acl_nontrivial): New function.
118659         (file_has_acl): Add implementation using HP-UX 11 ACL API.
118660         * lib/set-mode-acl.c (qset_acl): Likewise.
118661         * lib/copy-acl.c (qcopy_acl): Likewise.
118663 2008-06-08  Bruno Haible  <bruno@clisp.org>
118665         Add support for Cygwin ACLs.
118666         * lib/acl-internal.h (MODE_INSIDE_ACL): New macro for Solaris-like API.
118667         * lib/set-mode-acl.c (qset_acl) [!MODE_INSIDE_ACL]: Don't optimize away
118668         the chmod_or_fchmod call.
118669         * lib/copy-acl.c (qcopy_acl) [!MODE_INSIDE_ACL]: Likewise.
118671 2008-06-08  Bruno Haible  <bruno@clisp.org>
118673         Fix bug with setuid modes in Solaris 10+ code.
118674         * lib/set-mode-acl.c (qset_acl): Call chmod_or_fchmod when acl_set
118675         succeeded, when the mode contains some special bits.
118677 2008-06-08  Bruno Haible  <bruno@clisp.org>
118679         Add support for Solaris 7..10 ACLs.
118680         * lib/acl-internal.h (acl_nontrivial, acl_ace_nontrivial): New
118681         declarations.
118682         * lib/file-has-acl.c (acl_nontrivial, acl_ace_nontrivial): New
118683         functions.
118684         (file_has_acl): Add implementation using Solaris 7..10 ACL API.
118685         * lib/set-mode-acl.c (qset_acl): Likewise.
118686         * lib/copy-acl.c (qcopy_acl): Likewise.
118688 2008-06-08  Bruno Haible  <bruno@clisp.org>
118690         * lib/acl-internal.h (acl_extended_nontrivial) [MacOS X]: New
118691         declaration.
118692         * lib/file-has-acl.c (acl_extended_nontrivial) [MacOS X]: New function.
118693         (acl_access_nontrivial): Remove MacOS X case.
118694         (file_has_acl): Use acl_extended_nontrivial.
118695         * lib/copy-acl.c (qcopy_acl): Likewise.
118697 2008-06-08  Bruno Haible  <bruno@clisp.org>
118699         * lib/set-mode-acl.c (qset_acl): Trivial code simplifications.
118701 2008-06-08  Jim Meyering  <meyering@redhat.com>
118703         * modules/acl (Maintainer): Add Bruno Haible.
118705 2008-06-07  Bruno Haible  <bruno@clisp.org>
118707         Improve support for Tru64 ACLs.
118708         * lib/file-has-acl.c (file_has_acl): Don't test the ACL_TYPE_DEFAULT
118709         ACL on OSF/1.
118711 2008-06-07  Bruno Haible  <bruno@clisp.org>
118713         Add support for MacOS X ACLs.
118714         * lib/file-has-acl.c (file_has_acl): Use ACL_TYPE_EXTENDED instead of
118715         ACL_TYPE_ACCESS and ACL_TYPE_DEFAULT.
118716         * lib/set-mode-acl.c (qset_acl): Likewise.
118717         * lib/copy-acl.c (qcopy_acl): Likewise.
118719 2008-06-07  Bruno Haible  <bruno@clisp.org>
118721         Fix memory leak introduced on 2008-05-22.
118722         * lib/set-mode-acl.c (qset_acl) [!MODE_INSIDE_ACL]: Free ACLs after
118723         use.
118725 2008-06-07  Bruno Haible  <bruno@clisp.org>
118727         * lib/set-mode-acl.c (qset_acl): Use acl_init(), not acl_from_text(),
118728         to construct an empty ACL.
118730 2008-06-07  Bruno Haible  <bruno@clisp.org>
118732         * lib/set-mode-acl.c (chmod_or_fchmod): Document return value
118733         precisely.
118734         * lib/copy-acl.c (qcopy_acl): Trivial code simplifications.
118736 2008-06-07  Bruno Haible  <bruno@clisp.org>
118738         * lib/copy-acl.c (qcopy_acl): Make the #if branches independent.
118739         * lib/set-mode-acl.c (qset_acl): Choose better local variable names.
118741 2008-06-07  Bruno Haible  <bruno@clisp.org>
118743         * doc/posix-functions/_setjmp.texi: Explain the use of this function
118744         regardless of POSIX.
118745         * doc/posix-functions/_longjmp.texi: Likewise.
118746         * doc/posix-functions/setjmp.texi: Mention HP-UX as not counting as a
118747         SystemV platform in this case.
118749 2008-06-06  Eric Blake  <ebb9@byu.net>
118751         Document abort() bugs.
118752         * doc/posix-functions/abort.texi (abort): Mention anomalies.
118754         * doc/posix-functions/setjmp.texi (setjmp): Mingw has setjmp.
118755         * doc/posix-functions/sigsetjmp.texi (sigsetjmp): Cygwin has
118756         sigsetjmp.
118757         * doc/posix-functions/siglongjmp.texi (siglongjmp): Cygwin has
118758         siglongjmp, but only as a macro.
118759         * doc/posix-functions/_longjmp.texi (_longjmp): Mention that this
118760         is obsolete.
118761         * doc/posix-functions/_setjmp.texi (_setjmp): Likewise.
118763         Tweak documentation to cover cygwin argz bugs.
118764         * m4/argz.m4 (gl_FUNC_ARGZ): Mention date of last known cygwin
118765         argz bug fix; no code change needed since no cygwin releases
118766         occurred between the last fix and the bug being tested.
118767         * doc/glibc-functions/argz_add.texi (argz_add): Document the argz
118768         module and recently fixed cygwin bugs.
118769         * doc/glibc-functions/argz_add_sep.texi (argz_add_sep): Likewise.
118770         * doc/glibc-functions/argz_append.texi (argz_append): Likewise.
118771         * doc/glibc-functions/argz_count.texi (argz_count): Likewise.
118772         * doc/glibc-functions/argz_create.texi (argz_create): Likewise.
118773         * doc/glibc-functions/argz_create_sep.texi (argz_create_sep):
118774         Likewise.
118775         * doc/glibc-functions/argz_delete.texi (argz_delete): Likewise.
118776         * doc/glibc-functions/argz_extract.texi (argz_extract): Likewise.
118777         * doc/glibc-functions/argz_insert.texi (argz_insert): Likewise.
118778         * doc/glibc-functions/argz_next.texi (argz_next): Likewise.
118779         * doc/glibc-functions/argz_replace.texi (argz_replace): Likewise.
118780         * doc/glibc-functions/argz_stringify.texi (argz_stringify):
118781         Likewise.
118783         Avoid gcc warning on cygwin.
118784         * lib/copy-acl.c (qcopy_acl) [!HAVE_ACL_GET_FILE &&
118785         !ACL_NO_TRIVIAL]: Avoid unused variable.
118787 2008-06-05  Eric Blake  <ebb9@byu.net>
118789         Be tolerant of UNKNOWN version in gnulib-tool test dir.
118790         * top/GNUmakefile (_dummy): Warn rather than reconfigure if
118791         git-version-gen fails to come up with a version.
118792         Reported by Simon Josefsson.
118794 2008-06-05  Jim Meyering  <meyering@redhat.com>
118795             Paul Eggert  <eggert@cs.ucla.edu>
118797         utimens.c: work around a probable Linux kernel bug
118798         * lib/utimens.c (gl_futimens) [HAVE_UTIMENSAT]: Work around what
118799         appears to be a kernel bug that causes utimensat to return 280
118800         instead of 0, indicating success.
118802 2008-06-04  Bruno Haible  <bruno@clisp.org>
118804         * lib/copy-acl.c (qcopy_acl): Call qset_acl, not set_acl. Fixes
118805         2008-06-01 commit.
118807 2008-06-04  Bruno Haible  <bruno@clisp.org>
118809         * lib/acl-internal.h (acl_access_nontrivial): New declaration.
118810         * lib/file-has-acl.c (acl_access_nontrivial): New function.
118811         (file_has_acl): Use it. Save errno afterwards.
118812         * lib/copy-acl.c (qcopy_acl): Use acl_access_nontrivial.
118814 2008-06-03  Bruno Haible  <bruno@clisp.org>
118816         * lib/file-has-acl.c (file_has_acl): Put Solaris 10 code after POSIX-
118817         draft code. Simplify #ifs.
118818         * lib/set-mode-acl.c (qset_acl): Don't test for symlink if !USE_ACL.
118819         Put Solaris code after POSIX-draft code. Fix comments regarding
118820         Solaris 10, HP-UX. Mention Cygwin.
118821         * lib/copy-acl.c (qcopy_acl): Simplify #ifs.
118823 2008-06-03  Eric Blake  <ebb9@byu.net>
118825         Provide fallback for older kernels.
118826         * lib/utimens.c (gl_futimens) [HAVE_UTIMENSAT, HAVE_FUTIMENS]:
118827         Provide runtime fallback if kernel lacks support.
118828         Reported by Mike Frysinger.
118830 2008-06-02  Bruno Haible  <bruno@clisp.org>
118832         * lib/acl-internal.h (ACL_NOT_WELL_SUPPORTED): Include EOPNOTSUPP if
118833         it exists.
118835 2008-06-02  Bruno Haible  <bruno@clisp.org>
118837         * lib/acl_entries.c (acl_entries): Rewrite to use acl_get_entry.
118838         * lib/copy-acl.c (qcopy_acl): Update comment.
118840 2008-06-02  Bruno Haible  <bruno@clisp.org>
118842         * lib/acl-entries.h: Enclose most definitions in #ifs for POSIX-draft
118843         like ACL APIs.
118845 2008-06-02  Bruno Haible  <bruno@clisp.org>
118847         * tests/test-file-has-acl.sh: Use different code for Cygwin.
118848         * tests/test-set-mode-acl.sh: Likewise.
118849         * tests/test-copy-acl.sh: Likewise.
118850         * tests/test-copy-file.sh: Likewise.
118852 2008-06-02  Bruno Haible  <bruno@clisp.org>
118854         * tests/test-file-has-acl.sh: Remove unused code.
118856 2008-06-01  Bruno Haible  <bruno@clisp.org>
118858         * lib/copy-acl.c (qcopy_acl): New function, extracted from copy_acl.
118859         (copy_acl): Just a wrapper around qcopy_acl that emits the error
118860         messages.
118861         * lib/set-mode-acl.c (qset_acl): Document return value precisely.
118863 2008-06-01  Bruno Haible  <bruno@clisp.org>
118865         * m4/acl.m4 (gl_FUNC_ACL): Separate the POSIX-like and the Solaris
118866         tests. Test for libpacl, needed for OSF/1. Test for extended ACLs,
118867         needed for MacOS X. Test for HP-UX API. Test for newer and older AIX
118868         APIs.
118869         * modules/acl-tests (configure.ac): Remove tests now contained in
118870         m4/acl.m4.
118872 2008-06-02  Jim Meyering  <meyering@redhat.com>
118874         announce-gen: use a better key-server host name
118875         * build-aux/announce-gen (main): Recommend keys.gnupg.net, since
118876         it may be more consistently reliable.  Suggested by Werner Koch
118877         in <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/13717>.
118879 2008-06-01  Bruno Haible  <bruno@clisp.org>
118881         * lib/stdio-impl.h (fp_ub): Use fp_. Needed for DragonFly BSD.
118882         Reported by Voroskoi Andras <voroskoi@gmail.com>.
118884 2008-06-01  Voroskoi Andras  <voroskoi@gmail.com>  (tiny change)
118886         * lib/stdio-impl.h [__DragonFly__]: Fix typo.
118888 2008-06-01  Bruno Haible  <bruno@clisp.org>
118890         New ACL tests.
118891         * tests/test-file-has-acl.sh: New file.
118892         * tests/test-file-has-acl.c: New file.
118893         * tests/test-set-mode-acl.sh: New file.
118894         * tests/test-set-mode-acl.c: New file.
118895         * tests/test-copy-acl.sh: New file, based on tests/test-copy-file.sh.
118896         * tests/test-copy-acl.c: New file.
118897         * modules/acl-tests: New file, based on modules/copy-file-tests.
118898         * modules/copy-file-tests (Files): Remove tests/test-sameacls.c.
118899         (Depends-on): Add acl-tests.
118900         (configure.ac): Remove checks.
118901         (Makefile.am): Don't create test-sameacls program here any more.
118903 2008-06-01  Bruno Haible  <bruno@clisp.org>
118905         * tests/test-copy-file.sh: Portability fixes for Solaris, HP-UX, IRIX.
118906         * tests/test-sameacls.c: Include progname.h.
118907         (main): Invoke set_program_name. Portability fixes for MacOS X,
118908         Solaris, HP-UX.
118910 2008-06-01  Bruno Haible  <bruno@clisp.org>
118912         * lib/freadahead.c (freadahead) [__DragonFly__]: Use the __sreadahead
118913         function.
118914         Reported by VOROSKOI Andras <voroskoi@gmail.com>.
118916 2008-06-01  Bruno Haible  <bruno@clisp.org>
118918         * modules/rpmatch (Depends-on): Add strdup.
118920 2008-06-01  Bruno Haible  <bruno@clisp.org>
118922         * lib/pipe.c: Include unistd-safer.h.
118923         (create_pipe): Ensure the returned file descriptors are not in {0,1,2}.
118924         * modules/pipe (Depends-on): Add unistd-safer.
118926 2008-05-30  Simon Josefsson  <simon@josefsson.org>
118928         * modules/autobuild (configure.ac): Call AB_INIT.
118930 2008-05-30  Simon Josefsson  <simon@josefsson.org>
118932         * tests/test-getaddrinfo.c: Don't print debug messages by default.
118933         Suggested by Bruno Haible <bruno@clisp.org>.
118935 2008-05-30  Simon Josefsson  <simon@josefsson.org>
118937         * tests/test-base64.c: Cast size_t to unsigned long when invoking
118938         printf.  Use %lu instead of %d.  Reported by Bruno Haible
118939         <bruno@clisp.org>.
118941 2008-05-29  Eric Blake  <ebb9@byu.net>
118943         Prefer new POSIX 200x interfaces over futimesat.
118944         * m4/utimens.m4 (gl_UTIMENS): Check for futimens, utimensat.
118945         * lib/utimens.c (gl_futimens): Use them for nanosecond resolution
118946         when available.
118947         [HAVE_BUGGY_NFS_TIME_STAMPS]: Allow C89 compilation.
118949 2008-05-28  Bruno Haible  <bruno@clisp.org>
118951         * modules/stpcpy (License): Change to LGPLv2+.
118952         Requested by David Lutterkort <dlutter@redhat.com>.
118954 2008-05-27  Bruno Haible  <bruno@clisp.org>
118956         * lib/localename.c (SUBLANG_TIBETAN_BHUTAN): Force value 2. Needed for
118957         current mingw.
118958         Reported by Jose E. Marchesi <jemarch@gnu.org>.
118960 2008-05-27  Bruno Haible  <bruno@clisp.org>
118962         * modules/iconv_open (Link): New section, from module 'iconv'.
118963         * modules/striconv (Link): Likewise.
118964         * modules/striconveh (Link): Likewise.
118965         * modules/xstriconv (Link): Likewise.
118966         * modules/unicodeio (Link): Likewise.
118967         * modules/propername (Link): Likewise.
118968         Reported by Jim Meyering.
118970 2008-05-26  Jim Meyering  <meyering@redhat.com>
118972         sha256: do not artificially restrict buffer length to be < 2^32
118973         * lib/sha256.h (struct sha256_ctx) [buflen]: Change type from
118974         uint32_t to size_t.
118975         * lib/sha256.c (sha256_conclude_ctx): Change type of a local
118976         to match.
118978         avoid unaligned access errors, e.g., on sparc
118979         * lib/sha512.c (sha512_conclude_ctx): Use set_uint64 rather than
118980         direct access through a possibly-unaligned uint64* pointer.
118981         * lib/sha256.c (sha256_conclude_ctx): Use set_uint32 rather than
118982         direct access through a possibly-unaligned uint32* pointer.
118983         Prompted by this patch from Tom "spot" Callaway:
118984         http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/13638
118986         sha512.c: fix typo in comment
118987         * lib/sha512.c (sha512_conclude_ctx): Length is 128-bit, not 64-bit.
118989 2008-05-25  Bruno Haible  <bruno@clisp.org>
118991         * lib/set-mode-acl.c: Renamed from lib/acl.c.
118992         * modules/acl (Files): Add lib/set-mode-acl.c, remove lib/acl.c.
118993         (Makefile.am): Update lib_SOURCES.
118995 2008-05-25  Bruno Haible  <bruno@clisp.org>
118997         * m4/acl.m4 (gl_FUNC_ACL): Don't set LIB_ACL_TRIVIAL.
118999 2008-05-25  Jim Meyering  <meyering@redhat.com>
119001         useless-if-before-free: freed expr may have white-space differences
119002         * build-aux/useless-if-before-free: Recognize cases in which the
119003         freed expression differs from the tested one in embedded white
119004         space, e.g., if (p[i + 1]) free(p[i+1]).  Correct thinko in prev:
119005         $1 was used, so we can't make any regexp shy.  Improved tests now
119006         detect this.
119008         useless-if-before-free: accept white space in the expression.
119009         * build-aux/useless-if-before-free: For now, any white space
119010         in the expression must be identical in the free argument.
119012         useless-if-before-free: efficiency tweak
119013         * build-aux/useless-if-before-free: Make the expression-matching
119014         regexp "shy".
119015         Make the *outer* regexp shy, not the expr-matching one.
119017         update code-in-comment to accept cast of free arg
119018         * build-aux/useless-if-before-free: Update regexp.
119020 2008-05-25  Bruno Haible  <bruno@clisp.org>
119022         * tests/test-sameacls.c: Renamed from tests/test-copy-file-sameacls.c.
119023         * modules/copy-file-tests (Files, Makefile.am): Update.
119024         * tests/test-copy-file.c (func_test_copy): Update.
119026 2008-05-24  Andreas Färber  <andreas.faerber@web.de>  (tiny change)
119028         * lib/stdbool.in.h [__HAIKU__]: Disable __BEOS__ workarounds.
119030 2008-05-23  Bruno Haible  <bruno@clisp.org>
119032         Improve support for ACLs on OSF/1.
119033         * lib/acl.c (qset_acl): For OSF/1, use a string that ends in a comma.
119034         Remove fallback for unknown flavors of ACLs.
119036 2008-05-22  Bruno Haible  <bruno@clisp.org>
119038         Add support for ACLs on OSF/1.
119039         * lib/acl-internal.h (acl_get_fd, acl_set_fd): New inline function
119040         replacements.
119041         (acl_free_text): New macro fallback.
119042         * lib/acl_entries.c (acl_entries): Use acl_free_text instead of
119043         acl_free.
119044         * m4/acl.m4 (gl_FUNC_ACL): Look also in libpacl library. Test for
119045         acl_free_text function. Require AC_C_INLINE.
119047 2008-05-22  Bruno Haible  <bruno@clisp.org>
119049         Make copy_acl work on MacOS X 10.5.
119050         * lib/acl-internal.h (MODE_INSIDE_ACL): New macro.
119051         (ACL_NOT_WELL_SUPPORTED): On MacOS X, also handle ENOENT.
119052         * lib/acl.c (qset_acl): Add different code branch for !MODE_INSIDE_ACL.
119053         If MODE_INSIDE_ACL, don't assume that every system has the same text
119054         representation for ACLs as FreeBSD.
119055         * lib/copy-acl.c (copy_acl): Add support for platforms with
119056         !MODE_INSIDE_ACL.
119057         * lib/file-has-acl.c (file_has_acl): Likewise.
119058         * m4/acl.m4 (gl_FUNC_ACL): Test for some functions that are witness of
119059         FreeBSD, MacOS X, or IRIX, respectively.
119061 2008-05-22  Bruno Haible  <bruno@clisp.org>
119063         * lib/acl.h: Don't include <sys/acl.h>.
119064         (GETACLCNT): Move fallback to lib/acl-internal.h.
119065         * lib/acl-internal.h: Include <sys/acl.h> here.
119066         (GETACLCNT): New macro fallback, moved here from lib/acl.h.
119068 2008-05-22  Bruno Haible  <bruno@clisp.org>
119070         Split off copy_acl function to separate file.
119071         * lib/copy-acl.c: New file, extracted from lib/acl.c.
119072         * lib/acl.c (copy_acl): Moved function to separate file.
119073         * m4/acl.m4 (gl_FUNC_ACL): Remove unconditional AC_LIBOBJs.
119074         * modules/acl (Files): Add lib/copy-acl.c.
119075         (Makefiles.am): Augment lib_SOURCES.
119077 2008-05-22  Bruno Haible  <bruno@clisp.org>
119079         * modules/copy-file-tests: New file.
119080         * tests/test-copy-file.sh: New file.
119081         * tests/test-copy-file.c: New file.
119082         * tests/test-copy-file-sameacls.c: New file.
119084 2008-05-22  Eric Blake  <ebb9@byu.net>
119086         Avoid gcc warning.
119087         * tests/test-memcmp.c (main): Pass NULL indirectly.
119089 2008-05-21  Bruno Haible  <bruno@clisp.org>
119091         Add reference doc about ACLs.
119092         * doc/acl-resources.txt: New file.
119093         * doc/acl-cygwin.txt: New file.
119095 2008-05-21  Bruno Haible  <bruno@clisp.org>
119097         Avoid one more warning from gcc.
119098         * lib/vasnprintf.c (IF_LINT): Update comments.
119099         (VASNPRINTF): Use it also for the 'prefix' array initializer.
119101 2008-05-21  Jim Meyering  <meyering@redhat.com>
119103         avoid a warning from gcc
119104         * lib/vasnprintf.c (IF_LINT): Define.
119105         (scale10_round_decimal_long_double):
119106         Use it to avoid a "may be used uninitialized" warning.
119107         (scale10_round_decimal_double): Likewise.
119109 2008-05-21  Simon Josefsson  <simon@josefsson.org>
119111         * m4/memcmp.m4: When cross-compiling, assume memcmp works if it is
119112         declared.
119114 2008-05-20  Bruno Haible  <bruno@clisp.org>
119116         * tests/test-memcmp.c (main): Test also the sign of the result. Test
119117         against two known bugs; code taken from autoconf's AC_FUNC_MEMCMP.
119119 2008-05-20  Simon Josefsson  <simon@josefsson.org>
119121         * modules/memcmp-tests: New file.
119122         * tests/test-memcmp.c: New file.
119124 2008-05-19  Bruno Haible  <bruno@clisp.org>
119126         * modules/propername (Notice, configure.ac): Put quoted "..." into
119127         --keyword option.
119128         * lib/propername.h: Update comments accordingly.
119129         Reported by Eric Blake.
119131 2008-05-19  Martin Lambers  <marlam@marlam.de>  (tiny change)
119133         * modules/getpass-gnu (Depends-on): Add fseeko.
119135 2008-05-19  Simon Josefsson  <simon@josefsson.org>
119137         * modules/base64-tests: New file.
119139 2008-05-19  Bo Borgerson  <gigabo@gmail.com>
119141         * lib/base64.c (base64_decode_ctx): If a decode context structure
119142         was passed in use it to ignore newlines.  If a context structure
119143         was _not_ passed in, continue to treat newlines as garbage (this
119144         is the historical behavior).  Formerly base64_decode.
119145         (base64_decode_alloc_ctx): Formerly base64_decode_alloc.  Now
119146         takes a decode context structure.
119147         * lib/base64.h (base64_decode): Macro for four-argument calls.
119148         (base64_decode_alloc): Likewise.
119149         * lib/base64.c (base64_decode_ctx): If a decode context structure
119150         was passed in use it to ignore newlines.  If a context structure
119151         was _not_ passed in, continue to treat newlines as garbage (this
119152         is the historical behavior).  Formerly base64_decode.
119153         (base64_decode_alloc_ctx): Formerly base64_decode_alloc.  Now
119154         takes a decode context structure.
119155         * lib/base64.h (base64_decode): Macro for four-argument calls.
119156         (base64_decode_alloc): Likewise.
119158 2008-05-19  Jim Meyering  <meyering@redhat.com>
119160         avoid a warning from gcc
119161         * lib/trim.c (IF_LINT): Define.
119162         (trim2): Use it to avoid a "may be used uninitialized" warning.
119164         Fix doc typo.
119165         * doc/glibc-functions/getpass.texi (getpass): s/PATH_MAX/PASS_MAX/.
119167 2008-05-19  Bruno Haible  <bruno@clisp.org>
119169         * doc/glibc-functions/getpass.texi: Document limits of other
119170         implementations.
119172 2008-05-19  Simon Josefsson  <simon@josefsson.org>
119173             Bruno Haible <bruno@clisp.org>
119175         * doc/glibc-functions/getpass.texi: Document gnulib implementation.
119177 2008-05-18  Bruno Haible  <bruno@clisp.org>
119179         * modules/propername: New file, from GNU gettext.
119180         * lib/propername.h: New file, from GNU gettext.
119181         * lib/propername.c: New file, from GNU gettext.
119182         * MODULES.html.sh (Internationalization functions): Add propername.
119184 2008-05-16  Jim Meyering  <meyering@redhat.com>
119185             Bruno Haible  <bruno@clisp.org>
119187         Avoid some warnings from "gcc -Wshadow".
119188         * lib/vasnprintf.c (exp, remainder): Define to different identifiers.
119190 2008-05-15  Eric Blake  <ebb9@byu.net>
119192         Extend previous patch to cygwin 1.7.0.
119193         * m4/memmem.m4 (gl_FUNC_MEMMEM): When cross-compiling, assume a
119194         fast implementation in cygwin >= 1.7.0.
119195         * m4/strstr.m4 (gl_FUNC_STRSTR): Likewise.
119196         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Likewise.
119198 2008-05-15  Bruno Haible  <bruno@clisp.org>
119200         * m4/memmem.m4 (gl_FUNC_MEMMEM): When cross-compiling, assume a fast
119201         implementation in glibc >= 2.9.
119202         * m4/strstr.m4 (gl_FUNC_STRSTR): Likewise.
119203         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Likewise.
119205 2008-05-15  Bruno Haible  <bruno@clisp.org>
119207         * MODULES.html.sh (Internationalization functions): Remove linebreak.
119208         (Unicode string functions): Add unilbrk/*.
119209         Reported by Karl Berry.
119211 2008-05-15  Eric Blake  <ebb9@byu.net>
119213         Fix violation of <stdbool.h> replacement in regex.
119214         * lib/regcomp.c (re_compile_internal): Avoid implicit cast to bool.
119215         * lib/regexec.c (re_search_internal): Likewise.
119216         Reported by Heinrich Mislik <Heinrich.Mislik@univie.ac.at>.
119218 2008-05-15  Jim Meyering  <meyering@redhat.com>
119220         avoid distracting test output when git or cvs is not found
119221         * tests/test-vc-list-files-cvs.sh: Suppress 'init' error output.
119222         * tests/test-vc-list-files-git.sh: Likewise.
119224 2008-05-15  Eric Blake  <ebb9@byu.net>
119226         Glibc finally accepted the memmem speedup code, bugzilla #5514.
119227         * doc/glibc-functions/memmem.texi (memmem): Mention last broken
119228         glibc version.
119229         * doc/glibc-functions/strcasestr.texi (strcasestr): Likewise.
119230         * doc/posix-functions/strstr.texi (strstr): Likewise.
119231         * lib/str-two-way.h (MAX): Sychronize with glibc.
119233 2008-05-15  Paolo Bonzini  <bonzini@gnu.org>
119235         * lib/regcomp.c (optimize_utf8): Add a note on why we test
119236         opr.ctx_type.
119237         (calc_first): Initialize constraint field.
119238         (duplicate_node_closure): Use it instead of special casing ANCHORS.
119239         Fix grammar.
119240         (duplicate_node): Merge constraint field for all node types.
119241         (calc_eclosure_iter): Look at constraint field for all node types.
119242         * lib/regex_internal.c (create_cd_newstate): Don't look at
119243         opr.ctx_type.
119245 2008-05-14  Bruno Haible  <bruno@clisp.org>
119247         Help GCC to do better code generation.
119248         * lib/eealloc.h (eemalloc) [GCC >= 3]: Declare with attribute 'malloc'.
119249         * lib/pagealign_alloc.h (pagealign_alloc, pagealign_xalloc): Likewise.
119250         * lib/xalloc.h (ATTRIBUTE_MALLOC): New macro.
119251         (xmalloc, xzalloc, xcalloc, xmemdup, xstrdup, xnmalloc, xcharalloc):
119252         Declare with attribute 'malloc' if supported.
119254 2008-05-14  Lasse Collin  <lasse.collin@tukaani.org>
119256         use "echo STR|wc -c" rather than unportable "expr length STR"
119257         * build-aux/mktempd (mktempd): Vendor-supplied expr from at least
119258         OpenBSD 4.3 and Solaris 10 do not honor expr's "length" function.
119260 2008-05-14  Jim Meyering  <meyering@redhat.com>
119262         use dd ibs=$n count=1 ... rather than less-portable head -c$n
119263         * build-aux/mktempd (rand_bytes): head's -cN option is not accepted
119264         by Solaris 10's /bin/head or by the one from HP-UX 11.x.
119265         Reported in http://sourceforge.net/forum/message.php?msg_id=4960334
119266         via Collin Lasse.
119268 2008-05-14  Eric Blake  <ebb9@byu.net>
119270         Avoid quadratic growth in gl_LIBSOURCES.
119271         * gnulib-tool (func_emit_initmacro_done): s/\(m4_append\)_uniq/\1/.
119272         Suggested by Bruno Haible.
119274         Test xmemdup0.
119275         * modules/xmemdup0-tests: New file.
119276         * tests/test-xmemdup0.c: Likewise.
119278 2008-05-13  Eric Blake  <ebb9@byu.net>
119280         Split xmemdup0 into its own module.
119281         * modules/xmemdup0: New file.
119282         * lib/xmemdup0.h: Likewise.
119283         * lib/xmemdup0.c: Likewise.
119284         * MODULES.html.sh (Memory management functions): Add xmemdup0.
119285         * lib/xalloc.h (xmemdup0): Remove.
119286         * lib/xmalloc.c (xmemdup0): Likewise.
119288 2008-05-13  Eric Blake  <ebb9@byu.net>
119289             Bruno Haible  <bruno@clisp.org>
119291         Reduce number of forks required during autoconf.
119292         * gnulib-tool (func_emit_initmacro_start): Prepare gl_LIBSOURCES_LIST
119293         and gl_LIBSOURCES_DIR.
119294         (func_emit_initmacro_end): Use them here in a single m4_syscmd...
119295         (func_emit_initmacro_done) <gl_LIBSOURCES>: ...rather than in one
119296         m4_syscmd per file.
119297         <m4_foreach_w>: Move...
119298         * m4/gnulib-common.m4 (m4_foreach_w): ...here.
119300 2008-05-13  Eric Blake  <ebb9@byu.net>
119302         * gnulib-tool: Fix various comment typos.
119304 2008-05-12  Bruno Haible  <bruno@clisp.org>
119306         Tailor the linebreaking algorithm.
119307         * lib/unilbrk/tables.c (unilbrk_table): Change (IS,AL) entry.
119309 2008-05-12  Bruno Haible  <bruno@clisp.org>
119311         Update to Unicode 5.0.0.
119312         * lib/unilbrk/tables.h (LBP_*): Add LBP_WJ, LBP_H2, LBP_H3, LBP_JL,
119313         LBP_JV, LBP_JT. Redistribute values.
119314         (unilbrk_table): Change size.
119315         * lib/unilbrk/tables.c (unilbrk_table): Change size. Update to match
119316         Unicode TR#14 rev. 22.
119317         * lib/unilbrk/gen-lbrk.c (LBP_*): Add LBP_WJ, LBP_H2, LBP_H3, LBP_JL,
119318         LBP_JV, LBP_JT. Redistribute values.
119319         (get_lbp): Update to match Unicode TR#14 rev. 21/22 and Unicode 5.0.0.
119320         (debug_output_lbp, fill_org_lbp, debug_output_org_lbp, output_lbp):
119321         Update.
119322         * lib/unilbrk/lbrkprop1.h: Regenerated.
119323         * lib/unilbrk/lbrkprop2.h: Regenerated.
119324         * lib/unilbrk/u8-possible-linebreaks.c (u8_possible_linebreaks):
119325         Change handling of LBP_CM after LBP_ZW. Update for new value of LBP_BK.
119326         * lib/unilbrk/u16-possible-linebreaks.c (u16_possible_linebreaks):
119327         Likewise.
119328         * lib/unilbrk/u32-possible-linebreaks.c (u32_possible_linebreaks):
119329         Likewise.
119330         * tests/unilbrk/test-u8-possible-linebreaks.c (main): Update expected
119331         result.
119332         * tests/unilbrk/test-u16-possible-linebreaks.c (main): Likewise.
119333         * tests/unilbrk/test-u32-possible-linebreaks.c (main): Likewise.
119334         * tests/unilbrk/test-ulc-possible-linebreaks.c (main): Likewise.
119335         * tests/unilbrk/test-u8-width-linebreaks.c (main): Likewise.
119336         * tests/unilbrk/test-u16-width-linebreaks.c (main): Likewise.
119337         * tests/unilbrk/test-u32-width-linebreaks.c (main): Likewise.
119339 2008-05-11  Bruno Haible  <bruno@clisp.org>
119341         * lib/unilbrk/gen-lbrk.c (output_lbp): Fix whitespace.
119343 2008-05-11  Bruno Haible  <bruno@clisp.org>
119345         * lib/unilbrk/gen-lbrk.c: New file, from GNU gettext (gen-lbrkprop.c).
119346         * modules/unilbrk/gen-lbrk: New file.
119348 2008-05-11  Bruno Haible  <bruno@clisp.org>
119350         * m4/sha256.m4 (gl_SHA256): Require AC_C_INLINE.
119351         * m4/sha512.m4 (gl_SHA512): Likewise.
119353 2008-05-11  Jim Meyering  <meyering@redhat.com>
119355         New modules: crypto/sha256, crypto/sha512 (from coreutils)
119356         * modules/crypto/sha256: New file.
119357         * modules/crypto/sha512: Likewise.
119358         * lib/sha256.c: Likewise.
119359         * lib/sha256.h: Likewise.
119360         * lib/sha512.c: Likewise.
119361         * lib/sha512.h: Likewise.
119362         * lib/u64.h: Likewise.
119363         * m4/sha256.m4: Likewise.
119364         * m4/sha512.m4: Likewise.
119365         * MODULES.html.sh (Cryptographic computations (low-level)): List them.
119367 2008-05-10  Bruno Haible  <bruno@clisp.org>
119369         * MODULES.html.sh (Environment variables <stdlib.h>): Add unsetenv.
119370         (Input/Output <stdio.h>): Add xprintf.
119371         (Signal handling <signal.h>): Add strsignal.
119372         (Cryptographic computations (high-level)): Add crypto/gc-camellia.
119373         (Core language properties): Add func.
119374         (Mathematics <math.h>): Add ceil, floor, frexp-nolibm.
119375         (Support for systems lacking POSIX:2001): Add environ, EOVERFLOW,
119376         strings.
119377         (Enhancements for POSIX:2001 functions): Add iconv_open-utf.
119378         (Input/output): New section.
119379         (File system functions): Add openat-die, stat-macros.
119380         (Networking functions): Add sockets.
119381         (Unicode string functions): Add unictype/*.
119382         (Support for building libraries and executables): Add gperf.
119383         (Support for building documentation): Add agpl-3.0.
119384         (Misc): Add nocrash.
119386 2008-05-10  Bruno Haible  <bruno@clisp.org>
119388         * modules/unictype/gen-ctype: New file.
119390 2008-05-10  Jim Meyering  <meyering@redhat.com>
119392         Make chdir-safer.c more efficient on a system with no symlinks.
119393         * lib/chdir-safer.c (chdir_no_follow): Skip lstat and fstat calls
119394         also if ELOOP is zero.  Suggested by Bruno Haible.
119396         Make chdir-safer.c slightly safer.
119397         * lib/chdir-safer.c (chdir_no_follow): Test HAVE_WORKING_O_NOFOLLOW,
119398         not O_NOFOLLOW, in case the latter is nonzero and open ignores it.
119400         Avoid compile failure on systems without ELOOP (like mingw).
119401         * lib/chdir-safer.c (ELOOP): Define if not already defined.
119402         Reported by Bruno Haible.
119404 2008-05-10  Bruno Haible  <bruno@clisp.org>
119406         * lib/unilbrk/ulc-common.c: Include c-strcaseeq.h instead of streq.h.
119407         (is_utf8_encoding): Use a case-insensitive comparison.
119408         * modules/unilbrk/ulc-common (Depends-on): Add c-strcaseeq. Remove
119409         streq.
119411 2008-05-10  Bruno Haible  <bruno@clisp.org>
119413         * lib/unilbrk/ulc-common.c: Don't include <stdlib.h>.
119414         (iconv_string_length, iconv_string_keeping_offsets): Remove functions.
119415         * lib/unilbrk/ulc-common.h (iconv_string_length,
119416         iconv_string_keeping_offsets): Remove declarations.
119417         * lib/unilbrk/ulc-possible-linebreaks.c: Include <string.h>, uniconv.h.
119418         Don't include <iconv.h>, streq.h, xsize.h.
119419         (ulc_possible_linebreaks): Use u8_conv_from_encoding for doing the
119420         conversion.
119421         * lib/unilbrk/ulc-width-linebreaks.c: Include uniconv.h. Don't include
119422         <iconv.h>, streq.h, xsize.h.
119423         (ulc_width_linebreaks): Use u8_conv_from_encoding for doing the
119424         conversion.
119425         * modules/unilbrk/ulc-common (Depends-on): Remove iconv.
119426         * modules/unilbrk/ulc-possible-linebreaks (Depends-on): Add
119427         uniconv/u8-conv-from-enc. Remove iconv_open, streq, xsize.
119428         * modules/unilbrk/ulc-width-linebreaks (Depends-on): Likewise.
119430 2008-05-10  Bruno Haible  <bruno@clisp.org>
119432         * modules/unilbrk/ulc-width-linebreaks-tests: New file.
119433         * tests/unilbrk/test-ulc-width-linebreaks.c: New file.
119435         * modules/unilbrk/u32-width-linebreaks-tests: New file.
119436         * tests/unilbrk/test-u32-width-linebreaks.c: New file.
119438         * modules/unilbrk/u16-width-linebreaks-tests: New file.
119439         * tests/unilbrk/test-u16-width-linebreaks.c: New file.
119441         * modules/unilbrk/u8-width-linebreaks-tests: New file.
119442         * tests/unilbrk/test-u8-width-linebreaks.c: New file.
119444         * modules/unilbrk/ulc-possible-linebreaks-tests: New file.
119445         * tests/unilbrk/test-ulc-possible-linebreaks.c: New file.
119447         * modules/unilbrk/u32-possible-linebreaks-tests: New file.
119448         * tests/unilbrk/test-u32-possible-linebreaks.c: New file.
119450         * modules/unilbrk/u16-possible-linebreaks-tests: New file.
119451         * tests/unilbrk/test-u16-possible-linebreaks.c: New file.
119453         * modules/unilbrk/u8-possible-linebreaks-tests: New file.
119454         * tests/unilbrk/test-u8-possible-linebreaks.c: New file.
119456 2008-05-10  Bruno Haible  <bruno@clisp.org>
119458         Split up 'linebreak' module.
119459         * lib/unilbrk.h: New file, based on lib/linebreak.h.
119460         * lib/unilbrk/lbrkprop1.h: New file, extracted from lib/lbrkprop.h.
119461         * lib/unilbrk/lbrkprop2.h: New file, renamed from lib/lbrkprop.h with
119462         modifications.
119463         * lib/unilbrk/tables.h: New file, extracted from lib/linebreak.c.
119464         * lib/unilbrk/tables.c: New file, extracted from lib/linebreak.c.
119465         * lib/unilbrk/u8-possible-linebreaks.c: New file, extracted from
119466         lib/linebreak.c.
119467         * lib/unilbrk/u16-possible-linebreaks.c: New file, extracted from
119468         lib/linebreak.c.
119469         * lib/unilbrk/u32-possible-linebreaks.c: New file, extracted from
119470         lib/linebreak.c.
119471         * lib/unilbrk/ulc-common.h: New file, extracted from lib/linebreak.c.
119472         * lib/unilbrk/ulc-common.c: New file, extracted from lib/linebreak.c.
119473         * lib/unilbrk/ulc-possible-linebreaks.c: New file, extracted from
119474         lib/linebreak.c.
119475         * lib/unilbrk/u8-width-linebreaks.c: New file, extracted from
119476         lib/linebreak.c.
119477         * lib/unilbrk/u16-width-linebreaks.c: New file, extracted from
119478         lib/linebreak.c.
119479         * lib/unilbrk/u32-width-linebreaks.c: New file, extracted from
119480         lib/linebreak.c.
119481         * lib/unilbrk/ulc-width-linebreaks.c: New file, extracted from
119482         lib/linebreak.c.
119483         * modules/unilbrk/base: New file.
119484         * modules/unilbrk/tables: New file.
119485         * modules/unilbrk/u8-possible-linebreaks: New file.
119486         * modules/unilbrk/u16-possible-linebreaks: New file.
119487         * modules/unilbrk/u32-possible-linebreaks: New file.
119488         * modules/unilbrk/ulc-common: New file.
119489         * modules/unilbrk/ulc-possible-linebreaks: New file.
119490         * modules/unilbrk/u8-width-linebreaks: New file.
119491         * modules/unilbrk/u16-width-linebreaks: New file.
119492         * modules/unilbrk/u32-width-linebreaks: New file.
119493         * modules/unilbrk/ulc-width-linebreaks: New file.
119494         * lib/linebreak.h: Remove file.
119495         * lib/linebreak.c: Remove file.
119496         * m4/linebreak.m4: Remove file.
119497         * modules/linebreak: Remove file.
119498         * NEWS: Mention the changes.
119500 2008-05-09  Eric Blake  <ebb9@byu.net>
119502         Add xmemdup0.
119503         * lib/xalloc.h (xmemdup0): New prototype and C++ typesafe
119504         implementation.
119505         * lib/xmalloc.c (xmemdup0): New C implementation.
119507 2008-05-08  Bruno Haible  <bruno@clisp.org>
119509         * m4/wctype.m4 (gl_WCTYPE_H): Correct indentation.
119511 2008-05-07  Eric Blake  <ebb9@byu.net>
119513         Support cross-compilation of <wctype.h>.
119514         * m4/wctype.m4 (gl_WCTYPE_H): Fix improper nesting in
119515         AC_CACHE_CHECK.
119517 2008-05-06  Soren Hansen  <soren@ubuntu.com>  (tiny change)
119519         * build-aux/vc-list-files: Add support for bzr.
119521 2008-05-03  Jim Meyering  <meyering@redhat.com>
119523         avoid failed assertion with tight malloc
119524         * tests/test-getndelim2.c: Correct an off-by-one assertion.
119526 2008-05-03  Simon Josefsson  <simon@josefsson.org>
119528         * m4/inet_pton.m4: Set HAVE_DECL_INET_PTON to 0 when declarations
119529         are needed from arpa/inet.h.
119530         * m4/inet_ntop.m4: Likewise, for HAVE_DECL_INET_NTOP.
119531         Reported by Bruno Haible.
119533 2008-05-02  Jim Meyering  <meyering@redhat.com>
119535         avoid compilation error on FreeBSD 6
119536         * tests/test-getaddrinfo.c [!defined EAI_NODATA] (EAI_NODATA): Define.
119538 2008-05-01  Jim Meyering  <meyering@redhat.com>
119540         useless-if-before-free: correct --help's exit status description
119541         * build-aux/useless-if-before-free (usage): Like grep, exit 0
119542         for one or more matches, etc.  Reported by Bruno Haible.
119544         vc-list-files: make the stand-alone gnulib test work
119545         * modules/vc-list-files-tests (configure.ac):
119546         Define and AC_SUBST abs_aux_dir.
119547         (Makefile.am) [TESTS_ENVIRONMENT]: Rather than passing
119548         $(abs_top_srcdir) to each script and having each of them
119549         duplicate the work of setting PATH, set PATH here, using
119550         the new variable, abs_aux_dir instead.
119551         * tests/test-vc-list-files-cvs.sh: Don't set PATH here.
119552         * tests/test-vc-list-files-git.sh: Likewise.
119553         Reported by Bruno Haible.
119555 2008-05-01  Bruno Haible  <bruno@clisp.org>
119557         * lib/getndelim2.c (getndelim2): Fix newsize computation during
119558         reallocation. Rename 'done' to 'found_delimiter'.
119560 2008-05-01  Jim Meyering  <meyering@redhat.com>
119562         vc-list-files: accommodate /bin/sh like the one from Solaris 10
119563         * build-aux/vc-list-files: Use `...`, not $(...).
119565 2008-04-30  Jim Meyering  <meyering@redhat.com>
119567         add tests for vc-list-files
119568         * modules/vc-list-files-tests: New module.
119569         * tests/test-vc-list-files-cvs.sh: New file.
119570         * tests/test-vc-list-files-git.sh: New file.
119572         avoid a warning from gcc
119573         * lib/getndelim2.c (IF_LINT): Define.
119574         (getndelim2): Use it to avoid a "may be used uninitialized" warning.
119576         vc-list-files: work properly with build-aux/cvsu, too
119577         * build-aux/vc-list-files: Hoist the "./"-removing code to apply
119578         to all cvs-based clauses.
119580         vc-list-files: work properly in the CVS+awk case, too
119581         * build-aux/vc-list-files: In the CVS+awk case, remove "./" prefix.
119583         vc-list-files: avoid use of ${*-*} that fails when /bin/sh is dash
119584         * build-aux/vc-list-files: Simplify ${*-*} to $dir, since we no longer
119585         take more than one file argument, so .  Add quotes, just in case $dir
119586         ever contains a shell meta-character.  Prompted by Soren Hansen in
119587         <http://thread.gmane.org/gmane.comp.emulators.libvirt/6221/focus=6240>.
119589 2008-04-29  Eric Blake  <ebb9@byu.net>
119591         Optimize getndelim2 to use block operations when possible.
119592         * modules/getndelim2 (Depends-on): Add stdbool, freadptr,
119593         freadseek, and memchr2.
119594         * lib/getndelim2.c (getndelim2): Use them for block reads.
119596 2008-04-29  Bruno Haible  <bruno@clisp.org>
119598         * m4/inet_ntop.m4 (gl_INET_NTOP): Require gl_USE_SYSTEM_EXTENSIONS.
119599         * m4/inet_pton.m4 (gl_INET_PTON): Likewise.
119600         * modules/inet_ntop (Depends-on): Add extensions.
119601         * modules/inet_pton (Depends-on): Likewise.
119602         Reported by Simon Josefsson.
119604 2008-04-29  Jim Meyering  <meyering@redhat.com>
119606         When the is more than one match in a block, match all of them.
119607         * build-aux/useless-if-before-free: Iterate through each block
119608         until there are no more matches.
119610         Fix broken useless-if-before-free script.
119611         * build-aux/useless-if-before-free: Fix typo: missing "?" after
119612         the expression to match cast of argument to free-like function.
119614 2008-04-29  Eric Blake  <ebb9@byu.net>
119616         Use new header.
119617         * lib/getaddrinfo.c (includes): s/"inet_ntop.h"/<arpa/inet.h>/.
119619 2008-04-29  Jim Meyering  <meyering@redhat.com>
119621         Avoid test segfault on x86_64 due to lack of inet_ntop declaration.
119622         * tests/test-getaddrinfo.c: Include <arpa/inet.h>, now guaranteed
119623         by gnulib to exist and to declare e.g., inet_ntop.
119624         Don't include "inet_ntop.h", now removed.
119626         * m4/arpa_inet_h.m4: Remove trailing blanks.
119628 2008-04-29  Eric Blake  <ebb9@byu.net>
119630         Silence valgrind on safe reads beyond potential array bounds.
119631         * lib/rawmemchr.valgrind: New file.
119632         * lib/strchrnul.valgrind: Likewise.
119633         * modules/rawmemchr (Files): Distribute new file.
119634         * modules/strchrnul (Files): Likewise.
119635         Suggested by Bruno Haible.
119637 2008-04-29  Bruno Haible  <bruno@clisp.org>
119639         * lib/arpa_inet.in.h: Include system's <arpa/inet.h> if it exists.
119640         (inet_ntop, inet_pton): Change portability warning's wording.
119641         * m4/arpa_inet_h.m4 (gl_HEADER_ARPA_INET): Set HAVE_ARPA_INET_H.
119642         Invoke gl_CHECK_NEXT_HEADERS.
119643         (gl_ARPA_INET_H_DEFAULTS): Initialize ARPA_INET_H.
119644         * m4/inet_ntop.m4 (gl_INET_NTOP): Require gl_ARPA_INET_H_DEFAULTS and
119645         set ARPA_INET_H.
119646         * m4/inet_pton.m4 (gl_INET_PTON): Likewise.
119647         * modules/arpa_inet (Description): No longer only for systems that
119648         lack it.
119649         (Depends-on): Add include_next.
119650         (Makeile.am): Substitute INCLUDE_NEXT, NEXT_ARPA_INET_H,
119651         HAVE_ARPA_INET_H.
119653 2008-04-29  Jim Meyering  <meyering@redhat.com>
119655         * modules/mkdir (License): Re-license as LGPLv2+.
119657 2008-04-29  Bruno Haible  <bruno@clisp.org>
119659         * modules/rawmemchr (Maintainer): Set to Eric.
119660         * modules/strchrnul (Maintainer): Likewise.
119662 2008-04-29  Simon Josefsson  <simon@josefsson.org>
119664         * m4/arpa_inet_h.m4 (gl_ARPA_INET_H_DEFAULTS): Set
119665         HAVE_DECL_INET_NTOP and HAVE_DECL_INET_PTON.
119667         * modules/arpa_inet (arpa/inet.h): Use them.
119669 2008-04-28  Eric Blake  <ebb9@byu.net>
119671         Test getndelim2.
119672         * modules/getndelim2-tests: New file.
119673         * tests/test-getndelim2.c: Likewise.
119674         * lib/getndelim2.c (getndelim2): Never return 0.  Lock the
119675         stream.
119676         * m4/getndelim2.m4 (gl_GETNDELIM2): Check for lock functions.
119678         * MODULES.html.sh: Document new module.
119680 2008-04-20  Bruno Haible  <bruno@clisp.org>
119682         * lib/c-stack.c (die): Use raise.
119683         * modules/c-stack (Depends-on): Add raise.
119685 2008-04-28  Bruno Haible  <bruno@clisp.org>
119687         Expect rpmatch to be declared.
119688         * lib/yesno.c (rpmatch): Remove declaration.
119690         Declare rpmatch.
119691         * lib/stdlib.in.h (rpmatch): New declaration.
119692         * lib/rpmatch.c: Include <stdlib.h> first.
119693         * m4/rpmatch.m4 (gl_FUNC_RPMATCH): Require AC_USE_SYSTEM_EXTENSIONS and
119694         gl_STDLIB_H_DEFAULTS. Set HAVE_RPMATCH.
119695         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize GNULIB_RPMATCH,
119696         HAVE_RPMATCH.
119697         * modules/rpmatch (Depends-on): Add stdlib, extensions.
119698         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
119699         (Include): Set to <stdlib.h>.
119700         * modules/stdlib (Makefile.am): Substitute GNULIB_RPMATCH and
119701         HAVE_RPMATCH.
119702         * NEWS: Document the change.
119704 2008-04-28  Bruno Haible  <bruno@clisp.org>
119706         Change rpmatch to use nl_langinfo when appropriate.
119707         * lib/rpmatch.c: Include stdbool.h, string.h, langinfo.h.
119708         (N_): New macro.
119709         (localized_pattern): New function/macro.
119710         (try): Remove match, nomatch arguments. Copy the pattern into safe
119711         memory before caching it.
119712         (rpmatch): Use localized_pattern. Add translator comments.
119713         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Test for nl_langinfo and YESEXPR.
119714         Suggested by Eric Blake.
119715         * modules/rpmatch (Depends-on): Add stdbool.
119717 2008-04-28  Eric Blake  <ebb9@byu.net>
119719         Add rawmemchr module, matching glibc.
119720         * modules/string (Makefile.am): New indicator.
119721         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Set it.
119722         * lib/string.in.h (rawmemchr): Declare when appropriate.
119723         * modules/rawmemchr: New file.
119724         * m4/rawmemchr.m4: Likewise.
119725         * lib/rawmemchr.c: Likewise.
119726         * modules/rawmemchr-tests: Likewise.
119727         * tests/test-rawmemchr.c: Likewise.
119728         * doc/glibc-functions/rawmemchr.texi (rawmemchr): Document
119729         module.
119730         * modules/strchrnul (Depends-on): Add rawmemchr.
119731         * lib/strchrnul.c (strchrnul): Optimize a corner case.
119733         Whitespace cleanup.
119734         * tests/test-strchrnul.c: Reindent.
119735         * lib/strchrnul.c: Likewise.
119737         Optimize and test strchrnul.
119738         * lib/strchrnul.c (strchrnul): Rewrite to do parallel search.
119739         * modules/strchrnul-tests: New file.
119740         * tests/test-strchrnul.c: Likewise.
119742         Remove intprops dependency.
119743         * modules/memchr (Depends-on): Remove intprops.
119744         * modules/memrchr (Depends-on): Likewise.
119745         * modules/memchr2 (Depends-on): Likewise.
119746         * lib/memchr.c (__memchr): Hand-inline the TYPE_MAXIMUM check.
119747         * lib/memrchr.c (__memrchr): Likewise.
119748         * lib/memrchr2.c (memchr2): Likewise.
119749         Reported by Simon Josefsson.
119751 2008-04-28  Simon Josefsson  <simon@josefsson.org>
119753         * m4/sys_socket_h.m4: Move AC_REQUIRE([AC_C_INLINE]) to top.
119754         Suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
119756 2008-04-28  Simon Josefsson  <simon@josefsson.org>
119758         * lib/inet_ntop.h, lib/inet_pton.h: Remove files.
119760         * lib/inet_ntop.c: Include arpa/inet.h instead of inet_ntop.h.
119762         * lib/inet_pton.c: Include arpa/inet.h instead of inet_pton.h.
119764         * lib/arpa_inet.in.h [@GNULIB_INET_NTOP@]: Inline inet_ntop.h
119765         declarations.
119766         [@GNULIB_INET_PTON@]: Inline inet_pton.h declarations.
119768         * m4/inet_pton.m4: Don't check for header files.
119770         * m4/inet_ntop.m4: Don't check for header files.
119772 2008-04-28  Simon Josefsson  <simon@josefsson.org>
119774         * m4/sys_socket_h.m4: Require AC_C_INLINE when necessary.
119775         * lib/sys_socket.in.h (setsockopt): Use proper win32 tests (don't
119776         trigger for cygwin).
119777         Reported by Bruno Haible  <bruno@clisp.org>.
119779 2008-04-28  Bruno Haible  <bruno@clisp.org>
119781         * doc/posix-functions/strdup.texi: Mention mingw problem.
119783 2008-04-27  Bruno Haible  <bruno@clisp.org>
119785         * modules/stat-time-tests (Depends-on): Add sleep.
119786         * tests/test-stat-time.c (force_unlink): New function.
119787         (cleanup): Use it.
119788         (test_mtime): Remove the ctime related tests.
119789         (test_ctime): New function, containing the ctime related tests.
119790         (main): Call test_ctime, except on native Windows platforms.
119792 2008-04-27  Bruno Haible  <bruno@clisp.org>
119794         * lib/rpmatch.c (rpmatch): Add some comments.
119795         Reported by James Youngman <jay@gnu.org>.
119797 2008-04-27  Bruno Haible  <bruno@clisp.org>
119799         * m4/isnanl.m4 (gl_FUNC_ISNANL_WORKS): Also test the behaviour on
119800         quiet NaNs.
119802 2008-04-27  Bruno Haible  <bruno@clisp.org>
119804         Make test-yesno.sh work on mingw.
119805         * tests/test-yesno.sh: Postprocess the output to convert CR/LF to LF.
119806         * tests/test-yesno.c: Include yesno.h first. Include binary-io.h.
119807         (main): Set stdin to binary mode.
119808         * modules/yesno-tests (Depends-on): Add binary-io.
119810 2008-04-27  Bruno Haible  <bruno@clisp.org>
119812         Fix 'isfinite' on x86, x86_64, ia64 platforms.
119813         * tests/test-isfinite.c (test_isfinitel): Also test the behavior on
119814         argument that lie outside the IEEE 854 domain.
119815         * m4/isfinite.m4 (gl_ISFINITEL_WORKS): New macro.
119816         (gl_ISFINITE): Use it.
119817         * doc/posix-functions/isfinite.texi: Document the fixed bugs.
119819 2008-04-27  Bruno Haible  <bruno@clisp.org>
119821         Allow local renaming in config.h.
119822         * lib/memrchr.c (memrchr): Don't undefine outside libc.
119824 2008-04-27  Bruno Haible  <bruno@clisp.org>
119826         * lib/memchr.c (__memchr): Change type of 'i'.
119827         * lib/memchr2.c (memchr2): Likewise.
119829 2008-04-26  Eric Blake  <ebb9@byu.net>
119830         and Bruno Haible  <bruno@clisp.org>
119832         Optimize and test memrchr.
119833         * modules/memrchr (Depends-on): Add intprops.
119834         * lib/memrchr.c (__memrchr): Avoid false positives in loop.
119835         * modules/memrchr-tests: New file.
119836         * tests/test-memrchr.c: New file.
119838 2008-04-26  Bruno Haible  <bruno@clisp.org>
119840         Add tentative support for DragonFly BSD.
119841         * lib/stdio-impl.h: Add macros for DragonFly BSD.
119842         * lib/fbufmode.c (fbufmode): Update conditionals. Use fp_ instead of
119843         fp.
119844         * lib/fflush.c (clear_ungetc_buffer, disable_seek_optimization,
119845         restore_seek_optimization, update_fpos_cache, rpl_fflush: Likewise.
119846         * lib/fpurge.c (fpurge): Likewise.
119847         * lib/freadable.c (freaadable): Likewise.
119848         * lib/freadahead.c (freadahead): Likewise.
119849         * lib/freading.c (freading): Likewise.
119850         * lib/freadptr.c (freadptr): Likewise.
119851         * lib/freadseek.c (freadptrinc): Likewise.
119852         * lib/fseeko.c (fseeko): Likewise.
119853         * lib/fseterr.c (fseterr): Likewise.
119854         * lib/fwritable.c (fwritable): Likewise.
119855         * lib/fwriting.c (fwriting): Likewise.
119857 2008-04-26  Bruno Haible  <bruno@clisp.org>
119859         * lib/stdio-impl.h: New file.
119860         * lib/fbufmode.c: Include stdio-impl.h.
119861         (fbufmode): Use fp_, remove redundant #defines.
119862         * lib/fflush.c: Include stdio-impl.h.
119863         (clear_ungetc_buffer): Remove redundant #defines.
119864         * lib/fpurge.c: Include stdio-impl.h.
119865         (fpurge): Remove redundant #defines.
119866         * lib/freadable.c: Include stdio-impl.h.
119867         (freadable): Remove redundant #defines.
119868         * lib/freadahead.c: Include stdio-impl.h.
119869         (freadahead): Remove redundant #defines.
119870         * lib/freading.c: Include stdio-impl.h.
119871         (freading): Remove redundant #defines.
119872         * lib/freadptr.c: Include stdio-impl.h.
119873         (freadptr): Remove redundant #defines.
119874         * lib/freadseek.c: Include stdio-impl.h.
119875         (freadptrinc): Remove redundant #defines.
119876         * lib/fseeko.c: Include stdio-impl.h.
119877         (rpl_fseeko): Remove redundant #defines.
119878         * lib/fseterr.c: Include stdio-impl.h.
119879         (fseterr): Remove redundant #defines.
119880         * lib/fwritable.c: Include stdio-impl.h.
119881         (fwritable: Remove redundant #defines.
119882         * lib/fwriting.c: Include stdio-impl.h.
119883         (fwriting): Remove redundant #defines.
119884         * modules/fbufmode (Files): Add lib/stdio-impl.h.
119885         * modules/fflush (Files): Likewise.
119886         * modules/fpurge (Files): Likewise.
119887         * modules/freadable (Files): Likewise.
119888         * modules/freadahead (Files): Likewise.
119889         * modules/freading (Files): Likewise.
119890         * modules/freadptr (Files): Likewise.
119891         * modules/freadseek (Files): Likewise.
119892         * modules/fseeko (Files): Likewise.
119893         * modules/fseterr (Files): Likewise.
119894         * modules/fwritable (Files): Likewise.
119895         * modules/fwriting (Files): Likewise.
119897 2008-04-26  Bruno Haible  <bruno@clisp.org>
119899         * lib/fflush.c (clear_ungetc_buffer, disable_seek_optimization,
119900         restore_seek_optimization, update_fpos_cache): New functions, extracted
119901         from rpl_fflush.
119902         (rpl_fflush): Use them.
119903         * m4/fflush.m4 (gl_PREREQ_FFLUSH): New macro.
119904         (gl_REPLACE_FFLUSH): Use it.
119906 2008-04-26  Bruno Haible  <bruno@clisp.org>
119908         * tests/test-xstrtol.sh: Work around limitation of an old 'tr' program
119909         on Solaris.
119910         * tests/test-xstrtoimax.sh: Likewise.
119911         * tests/test-xstrtoumax.sh: Likewise.
119912         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
119914 2008-04-26  Bruno Haible  <bruno@clisp.org>
119916         * modules/memchr-tests: New file.
119917         * tests/test-memchr.c; New file, based on tests/test-memchr2.c.
119919 2008-04-26  Eric Blake  <ebb9@byu.net>
119920             Bruno Haible  <bruno@clisp.org>
119922         * lib/memchr.c: Include intprops.h.
119923         (__memchr): Optimize parallel detection of matching bytes. Rename local
119924         variables. Add explanatory comments.
119926 2008-04-26  Bruno Haible  <bruno@clisp.org>
119928         Fix module 'memchr', broken since 2000-10-28.
119929         * lib/memchr.c: Outside glibc, define memchr, not __memchr.
119931 2008-04-26  Bruno Haible  <bruno@clisp.org>
119933         * lib/memchr2.c (memchr2): Rename local variables. Add explanatory
119934         comments.
119936 2008-04-25  Eric Blake  <ebb9@byu.net>
119938         Use native fstatat on cygwin 1.7.0.
119939         * m4/openat.m4 (gl_FUNC_OPENAT): Make sure lstat check is made
119940         first.
119942 2008-04-23  Eric Blake  <ebb9@byu.net>
119944         Improve memchr2 performance.
119945         * lib/memchr2.c (memchr2): Further optimize parallel detection of
119946         NUL bytes.
119947         * modules/memchr2 (Depends-on): Use intprops.h.
119949 2008-04-23  Simon Josefsson  <simon@josefsson.org>
119951         * lib/sys_socket.in.h (setsockopt): Be more type safe by declaring
119952         an inline function instead of a CPP macro.  Patch by Ben Pfaff
119953         <blp@cs.stanford.edu>.
119955 2008-04-23  Simon Josefsson  <simon@josefsson.org>
119957         * lib/arpa_inet.in.h: New file.
119959         * modules/arpa_inet (Files): Add lib/arpa_inet.in.h.
119960         (Makefile.am): Sed in substitute header file.
119962         * m4/arpa_inet_h.m4: Add gl_ARPA_INET_H_DEFAULTS and
119963         gl_ARPA_INET_MODULE_INDICATOR.  Use them.
119965         * modules/inet_ntop (configure.ac): Use
119966         gl_ARPA_INET_MODULE_INDICATOR.
119968         * modules/inet_pton (configure.ac): Use
119969         gl_ARPA_INET_MODULE_INDICATOR.
119971 2008-04-22  Jim Meyering  <meyering@redhat.com>
119973         * modules/verify (License): Re-license as LGPLv2+.
119975 2008-04-22  Simon Josefsson  <simon@josefsson.org>
119977         * lib/sys_socket.in.h: Define setsockopt macro to cast fourth
119978         parameter to void* as per POSIX standard (MinGW uses char*).
119980 2008-04-21  Bruno Haible  <bruno@clisp.org>
119982         * lib/wctype.in.h (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit,
119983         iswgraph, iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit):
119984         Define to replacements if REPLACE_ISWCNTRL is 1.
119985         * m4/wctype.m4 (gl_WCTYPE_H): Test whether the isw* functions work.
119986         If not, set WCTYPE_H to nonempty and REPLACE_ISWCNTRL to 1.
119987         * modules/wctype (Makefile.am): Substitute REPLACE_ISWCNTRL.
119988         * doc/posix-functions/iswalnum.texi: Mention the 'wctype' module and
119989         what it fixes.
119990         * doc/posix-functions/iswalpha.texi: Likewise.
119991         * doc/posix-functions/iswblank.texi: Likewise.
119992         * doc/posix-functions/iswcntrl.texi: Likewise.
119993         * doc/posix-functions/iswdigit.texi: Likewise.
119994         * doc/posix-functions/iswgraph.texi: Likewise.
119995         * doc/posix-functions/iswlower.texi: Likewise.
119996         * doc/posix-functions/iswprint.texi: Likewise.
119997         * doc/posix-functions/iswpunct.texi: Likewise.
119998         * doc/posix-functions/iswspace.texi: Likewise.
119999         * doc/posix-functions/iswupper.texi: Likewise.
120000         * doc/posix-functions/iswxdigit.texi: Likewise.
120001         Reported by Alain Guibert.
120003 2008-04-21  Bruno Haible  <bruno@clisp.org>
120005         * m4/vsnprintf.m4 (gl_FUNC_VSNPRINTF): Fix typo in last commit.
120006         Patch by Alain Guibert.
120008 2008-04-21  Bruno Haible  <bruno@clisp.org>
120010         Fix test failures on mingw.
120011         * tests/test-xstrtol.c (print_no_progname): New function.
120012         (main): Install it in error_print_progname hook.
120013         * tests/test-xstrtol.sh: Convert CR/LF to NL in output.
120014         * tests/test-xstrtoimax.sh: Likewise.
120015         * tests/test-xstrtoumax.sh: Likewise.
120017 2008-04-21  Bruno Haible  <bruno@clisp.org>
120019         Fix test failure on mingw.
120020         * tests/test-argp-2.sh (func_compare): Remove CRs from sed's output.
120022 2008-04-21  Bruno Haible  <bruno@clisp.org>
120024         * lib/localename.c (SUBLANG_TIBETAN_PRC, SUBLANG_TIBETAN_BHUTAN):
120025         Actually assign a value.
120027 2008-04-20  Bruno Haible  <bruno@clisp.org>
120029         Fix conflict between modules 'canonicalize' and 'canonicalize-lgpl',
120030         take 2.
120031         * lib/canonicalize.c (canonicalize_file_name): Elide if the
120032         'canonicalize-lgpl' module is also used.
120033         * lib/canonicalize-lgpl.c: Undo last change.
120034         * modules/canonicalize-lgpl (configure.ac): Invoke gl_MODULE_INDICATOR.
120036 2008-04-20  Bruno Haible  <bruno@clisp.org>
120038         * lib/mkdir.c (mkdir): Undefine after the includes, not right after
120039         config.h. Provide _mkdir based fallback for mingw.
120040         * lib/sys_stat.in.h (mkdir): Define through an 'extern' declaration
120041         if REPLACE_MKDIR is 1. Otherwise, test for mingw directly.
120042         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Require
120043         gl_SYS_STAT_H_DEFAULTS. When doing the replacement, set REPLACE_MKDIR
120044         rather than defining mkdir in config.h.
120045         * m4/sys_stat_h.m4 (gl_SYS_STAT_MODULE_INDICATOR): New macro.
120046         (gl_SYS_STAT_H_DEFAULTS): New macro.
120047         (gl_HEADER_SYS_STAT_H): Require it. Don't set HAVE_DECL_MKDIR and
120048         HAVE_IO_H any more.
120049         * modules/sys_stat (Makefile.am): Substitute REPLACE_MKDIR instead of
120050         HAVE_DECL_MKDIR and HAVE_IO_H.
120052 2008-04-20  Bruno Haible  <bruno@clisp.org>
120054         * lib/isapipe.c: Port to native Windows platforms.
120056 2008-04-20  Bruno Haible  <bruno@clisp.org>
120058         * lib/gc-gnulib.c: Include <windows.h> before <wincrypt.h>.
120060 2008-04-21  Eric Blake  <ebb9@byu.net>
120062         Work around preprocessors that don't handle UINTMAX_MAX.
120063         * lib/memchr2.c (memchr2): Avoid embedded #if.
120064         Reported by Alain Guibert, fix suggested by Bruno Haible.
120066 2008-04-21  Simon Josefsson  <simon@josefsson.org>
120068         * doc/posix-functions/strftime.texi (strftime): Explain better
120069         Windows incompatibility.  Suggested by Micah Cowan
120070         <micah@cowan.name>.
120072 2008-04-20  Bruno Haible  <bruno@clisp.org>
120074         * modules/uniconv/u32-conv-to-enc (Depends-on): Add unistr/u32-mblen,
120075         unistr/u8-mblen.
120077 2008-04-20  Bruno Haible  <bruno@clisp.org>
120079         Fix test failure on platforms with non-GNU iconv.
120080         * lib/uniconv/u16-conv-to-enc.c (u16_to_u8_lenient): New function.
120081         (U_TO_U8): Use it, rather than u16_to_u8.
120082         * lib/uniconv/u-conv-to-enc.h (FUNC): Allow an incomplete sequence of
120083         units at the end of the input string.
120084         * modules/uniconv/u16-conv-to-enc (Depends-on): Update.
120086 2008-04-20  Bruno Haible  <bruno@clisp.org>
120088         * tests/uniconv/test-u8-conv-to-enc.c (main): Accept result == NULL
120089         when the resulting length is 0.
120090         * tests/uniconv/test-u16-conv-to-enc.c (main): Likewise.
120092 2008-04-20  Bruno Haible  <bruno@clisp.org>
120094         * m4/roundf.m4 (gl_FUNC_ROUNDF): Add test whether roundf actually
120095         works.
120096         * doc/posix-functions/roundf.texi: Mention roundf bug on mingw.
120098 2008-04-20  Bruno Haible  <bruno@clisp.org>
120100         * tests/test-tsearch.c (main): Don't use initstate if it is missing.
120101         * modules/tsearch-tests (configure.ac): Test for initstate function.
120103 2008-04-20  Bruno Haible  <bruno@clisp.org>
120105         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Also provided a substitute
120106         for nlink_t if missing.
120107         * tests/test-sys_stat.c: Check the existence of the nlink_t type.
120109 2008-04-19  Bruno Haible  <bruno@clisp.org>
120111         Work around snprintf bug on Linux libc5.
120112         * m4/printf.m4 (gl_SNPRINTF_SIZE1): New macro.
120113         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Invoke
120114         gl_SNPRINTF_SIZE1.
120115         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
120116         * m4/snprintf.m4 (gl_FUNC_SNPRINTF): Likewise. Replace snprintf if
120117         that test failed.
120118         * m4/vsnprintf.m4 (gl_FUNC_VSNPRINTF): Likewise.
120119         * lib/vasnprintf.c (USE_SNPRINTF): Set to 0 on Linux libc5 systems.
120120         * modules/snprintf (Files): Add m4/printf.m4.
120121         * modules/vsnprintf (Files): Likewise.
120122         * doc/posix-functions/snprintf.texi: Document Linux libc5 problem.
120123         * doc/posix-functions/vsnprintf.texi: Likewise.
120125 2008-04-19  Bruno Haible  <bruno@clisp.org>
120127         * lib/vasnprintf.c (floorlog10l, floorlog10): Reduce maximum error
120128         from 0.0058 to less than 10^-7.
120130 2008-04-19  Bruno Haible  <bruno@clisp.org>
120132         Fix rounding when a precision is given.
120133         * lib/vasnprintf.c (is_borderline): New function.
120134         (VASNPRINTF): For %e and %g, consider replacing the digits 10....0 with
120135         9...9x.
120136         * tests/test-vasnprintf-posix.c (test_function): Test rounding with %f,
120137         %e, %g.
120138         * tests/test-vasprintf-posix.c (test_function): Likewise.
120139         * tests/test-snprintf-posix.h (test_function): Likewise.
120140         * tests/test-sprintf-posix.h (test_function): Likewise.
120141         * tests/test-fprintf-posix.h (test_function): Test rounding with %f.
120142         * tests/test-printf-posix.h (test_function): Likewise.
120143         * tests/test-printf-posix.output: Update.
120144         Reported by John Darrington <john@darrington.wattle.id.au> via
120145         Ben Pfaff <blp@cs.stanford.edu>.
120147 2008-04-18  Simon Josefsson  <simon@josefsson.org>
120149         * doc/posix-functions/strftime.texi (strftime): Clarify platform.
120150         Suggested by Bruno Haible <bruno@clisp.org>.
120152 2008-04-17  Bruno Haible  <bruno@clisp.org>
120154         * lib/lock.h (gl_lock_destroy, gl_rwlock_destroy,
120155         gl_recursive_lock_destroy): Provide no-op definitions for the dummy
120156         implementation.
120157         Patch by Bruce Merry <bmerry@gmail.com>.
120159 2008-04-17  Simon Josefsson  <simon@josefsson.org>
120161         * doc/posix-functions/strftime.texi (strftime): Mention that %e
120162         doesn't work under Windows.
120164 2008-04-16  Bruno Haible  <bruno@clisp.org>
120166         * lib/localename.c (LANG_MAORI, LANG_QUECHUA, LANG_SOTHO, LANG_UIGHUR):
120167         New macros.
120168         (SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_LATIN,
120169         SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_CYRILLIC,
120170         SUBLANG_CROATIAN_CROATIA, SUBLANG_CROATIAN_BOSNIA_HERZEGOVINA_LATIN,
120171         SUBLANG_MONGOLIAN_CYRILLIC_MONGOLIA, SUBLANG_MONGOLIAN_PRC,
120172         SUBLANG_QUECHUA_BOLIVIA, SUBLANG_QUECHUA_ECUADOR, SUBLANG_QUECHUA_PERU,
120173         SUBLANG_RUSSIAN_RUSSIA, SUBLANG_RUSSIAN_MOLDAVIA, SUBLANG_SPANISH_US,
120174         SUBLANG_TIBETAN_PRC, SUBLANG_TIBETAN_BHUTAN, SUBLANG_UIGHUR_PRC): New
120175         macros.
120176         (gl_locale_name_from_win32_LANGID): Refine code for Croatian/Bosnian,
120177         Mongolian, Russian, Spanish, Tibetan. Add code for Maori, Quechua,
120178         Northern Sotho, Uighur.
120180 2008-04-16  Bruno Haible  <bruno@clisp.org>
120182         * lib/localename.c (SUBLANG_SINDHI_INDIA): New macro.
120183         (SUBLANG_SINDHI_PAKISTAN): Change value from 1 to 2.
120184         (gl_locale_name_from_win32_LANGID): Fix code for Sindhi.
120185         Reported by Daniel Bergström <daniel@octocode.com>.
120187 2007-12-25  KJK::Hyperion  <hackbunny@reactos.com>
120188             Bruno Haible  <bruno@clisp.org>
120190         * lib/localename.c (gl_locale_name_canonicalize) [WIN32_NATIVE]: New
120191         function.
120192         (gl_locale_name_from_win32_LANGID, gl_locale_name_from_win32_LCID):
120193         New functions, mostly extracted from gl_locale_name_default.
120194         (gl_locale_name_default): Use gl_locale_name_from_win32_LCID.
120196 2008-04-16  Eric Blake  <ebb9@byu.net>
120198         Adjust strtod detection to catch glibc 2.7 bug.
120199         * m4/strtod.m4 (gl_FUNC_STRTOD): Test "nan()" behavior.
120200         Reported by John Gatewood Ham.
120202 2008-04-16  Bruno Haible  <bruno@clisp.org>
120204         Add tentative support for Linux libc5.
120205         * lib/fbufmode.c (fbufmode) [__GNU_LIBRARY__==1]: Reuse glibc2 code.
120206         * lib/fpurge.c (fpurge): Likewise.
120207         * lib/freadable.c (freadable): Likewise.
120208         * lib/freadahead.c (freadahead): Likewise.
120209         * lib/freading.c (freading): Likewise.
120210         * lib/freadptr.c (freadptr): Likewise.
120211         * lib/freadseek.c (freadptrinc): Likewise.
120212         * lib/fseeko.c (rpl_fseeko): Likewise.
120213         * lib/fseterr.c (fseterr): Likewise.
120214         * lib/fwritable.c (fwritable): Likewise.
120215         * lib/fwriting.c (fwriting): Likewise.
120216         Reported by Alain Guibert <alguibert+bts@free.fr>.
120218 2008-04-15  Bruno Haible  <bruno@clisp.org>
120220         * modules/mathl (configure.ac): Define module indicator.
120222 2008-04-15  Bruno Haible  <bruno@clisp.org>
120224         * lib/logl.c (logl): Remove unused variables.
120226 2008-04-15  Bruno Haible  <bruno@clisp.org>
120228         * lib/uniconv/u-conv-to-enc.h (FUNC): Fix return value when U_TO_U8
120229         fails.
120231 2008-04-15  Bruno Haible  <bruno@clisp.org>
120233         * lib/trim.c (trim2): Fix argument of isspace() macro.
120235 2008-04-15  Paolo Bonzini  <bonzini@gnu.org>
120237         * lib/tanl.c (kernel_tanl): Rename flag to invert, initialize it
120238         to 0.
120239         * lib/trigl.c (ieee754_rem_pio2l): Fix range checks.
120241 2008-04-14  Bruno Haible  <bruno@clisp.org>
120243         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Fix underquoting of
120244         AC_LANG_PROGRAM argument.
120245         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Likewise.
120246         * m4/gethrxtime.m4 (gl_ARITHMETIC_HRTIME_T): Likewise.
120247         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Likewise.
120248         * m4/inttypes.m4 (gl_INTTYPES_H): Likewise.
120249         * m4/math_h.m4 (gl_MATH_H): Likewise.
120250         * m4/mbstate_t.m4 (AC_TYPE_MBSTATE_T): Likewise.
120251         * m4/memmem.m4 (gl_FUNC_MEMMEM): Likewise.
120252         * m4/netinet_in_h.m4 (gl_HEADER_NETINET_IN): Likewise.
120253         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): Likewise.
120254         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
120255         * m4/regex.m4 (gl_REGEX): Likewise.
120256         * m4/stdint.m4 (gl_INTEGER_TYPE_SUFFIX): Likewise.
120257         * m4/stdio_h.m4 (gl_STDIN_LARGE_OFFSET): Likewise.
120258         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Likewise.
120259         * m4/strerror.m4 (gl_FUNC_STRERROR_SEPARATE): Likewise.
120260         * m4/strndup.m4 (gl_FUNC_STRNDUP): Likewise.
120261         * m4/strstr.m4 (gl_FUNC_STRSTR): Likewise.
120262         * m4/sys_select_h.m4 (gl_HEADER_SYS_SELECT): Likewise.
120263         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Likewise.
120265 2008-04-14  Jim Meyering  <meyering@redhat.com>
120267         test-strtod: fix typos: s/abs/fabs/
120268         * tests/test-strtod.c (main): Use fabs, not narrowing-to-int "abs".
120270 2008-04-13  Bruno Haible  <bruno@clisp.org>
120272         Fix conflict between modules 'canonicalize' and 'canonicalize-lgpl'.
120273         * lib/canonicalize-lgpl.c: Elide the contents if the 'canonicalize'
120274         module is also used and while not building the reloc-wrapper.
120276 2008-04-13  Bruno Haible  <bruno@clisp.org>
120278         * tests/test-getaddrinfo.c (simple): Ignore EAI_NODATA error.
120280 2008-04-13  Bruno Haible  <bruno@clisp.org>
120282         Fix AIX compilation failure introduced on 2008-04-02.
120283         * tests/test-frexp.c (exp): Undefine before redefining.
120284         * tests/test-frexpl.c (exp): Likewise.
120286 2008-04-13  Bruno Haible  <bruno@clisp.org>
120288         Work around a HP-UX stdio bug.
120289         * tests/test-ftell.c (main): Disable the fseek/ftell test on HP-UX.
120290         * tests/test-ftello.c (main): Likewise.
120291         * doc/posix-functions/ftell.texi: Mention HP-UX bug.
120292         * doc/posix-functions/ftello.texi: Likewise.
120294 2008-04-13  Bruno Haible  <bruno@clisp.org>
120296         Make test-signbit pass on HP-UX/hppa.
120297         * tests/test-signbit.c (minus_zerol): New variable.
120298         (test_signbitl): Use it.
120300 2008-04-13  Bruno Haible  <bruno@clisp.org>
120302         Make truncl work on OSF/1 4.0.
120303         * m4/truncl.m4 (gl_FUNC_TRUNCL): Test whether truncl actually works.
120304         Set REPLACE_TRUNCL, not HAVE_DECL_TRUNCL.
120305         * lib/math.in.h (truncl): Test REPLACE_TRUNCL, not HAVE_DECL_TRUNCL.
120306         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_TRUNCL, not
120307         HAVE_DECL_TRUNCL.
120308         * modules/math (Makefile.am): Substitute REPLACE_TRUNCL, not
120309         HAVE_DECL_TRUNCL.
120310         * doc/posix-functions/truncl.texi: Document the OSF/1 4.0 problem.
120312 2008-04-13  Bruno Haible  <bruno@clisp.org>
120314         * lib/unictype.h: Remove trailing comma from enumeration definitions.
120316 2008-04-13  Bruno Haible  <bruno@clisp.org>
120318         * lib/count-one-bits.h (COUNT_ONE_BITS): Rewrite verification
120319         expression, so as to avoid HP-UX 11 cc compiler bug.
120321 2008-04-13  Bruno Haible  <bruno@clisp.org>
120323         * m4/regex.m4 (gl_PREREQ_REGEX): Also check for <libintl.h>.
120325 2008-04-13  Bruno Haible  <bruno@clisp.org>
120327         * lib/git-merge-changelog.c: Remove empty declaration outside of
120328         functions.
120330 2008-04-13  Bruno Haible  <bruno@clisp.org>
120332         * modules/quotearg-tests (Makefile.am): Define test_quotearg_LDADD.
120334 2008-04-13  Bruno Haible  <bruno@clisp.org>
120336         * doc/posix-headers/sys_socket.texi: Document the problem on EMX.
120337         * lib/sys_socket.in.h (SHUT_RD, SHUT_WR, SHUT_RDWR): Define if missing.
120338         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Replace <sys/socket.h>
120339         also if it exists but lacks definitions of the SHUT_* macros.
120340         * modules/sys_socket (Description): Update.
120341         Reported by Elbert Pol <e.pol@chello.nl>.
120343 2008-04-13  Bruno Haible  <bruno@clisp.org>
120345         * lib/localcharset.c (OS2): Don't redefine if already defined.
120346         Reported by Elbert Pol <e.pol@chello.nl>.
120348 2008-04-13  Bruno Haible  <bruno@clisp.org>
120350         * lib/binary-io.h [__EMX__]: Include <io.h>.
120351         Reported by Elbert Pol <e.pol@chello.nl>.
120353 2008-04-12  Bruno Haible  <bruno@clisp.org>
120355         * lib/fpucw.h: Enable the definitions also for x86_64.
120356         Needed for NetBSD/x86_64.
120357         Reported by Thomas Klausner <tk@giga.or.at>.
120359 2008-04-12  Bruno Haible  <bruno@clisp.org>
120361         * tests/test-strtod.c: Include isnand.h.
120362         (main): Use isnand instead of isnan.
120363         Reported by Jim Meyering.
120365 2008-04-12  Bruno Haible  <bruno@clisp.org>
120367         * m4/isnanf.m4 (gl_ISNANF_WORKS): Add a test for a special NaN.
120368         Reported by Nelson H. F. Beebe <beebe@math.utah.edu>.
120370 2008-04-12  Jim Meyering  <meyering@redhat.com>
120372         * m4/math_h.m4 (gl_MATH_H): Fix typos.
120374 2008-04-12  Bruno Haible  <bruno@clisp.org>
120376         * lib/freadptr.c (freadptr) [__EMX__]: Fix wrong assertion.
120377         Reported by Elbert Pol <e.pol@chello.nl>.
120379 2008-04-12  Eric Blake  <ebb9@byu.net>
120381         Work around Solaris 10 math.h bug.
120382         * m4/math_h.m4 (gl_MATH_H): Check for bug.
120383         (gl_MATH_H_DEFAULTS): Set up default.
120384         * modules/math (Makefile.am): Replace new indicators.
120385         * lib/math.in.h (NAN, HUGE_VAL): Provide replacements.
120386         * tests/test-math.c (main): Test this.
120387         * m4/strtod.m4 (gl_FUNC_STRTOD): Don't rely on HUGE_VAL.
120388         * doc/posix-headers/math.texi (math.h): Mention bug.
120389         Reported by Nelson H. F. Beebe and Jim Meyering.
120391 2008-04-11  Bruno Haible  <bruno@clisp.org>
120393         Adapt to future versions of Apple GCC.
120394         * lib/argp-fmtstream.h (ARGP_FS_EI): Don't test __GNUC_GNU_INLINE__.
120395         Reported by Peter O'Gorman <peter@pogma.com>.
120397 2008-04-11  Bruno Haible  <bruno@clisp.org>
120399         * tests/test-getaddrinfo.c (simple): Ignore EAI_NONAME error.
120401 2008-04-11  Bruno Haible  <bruno@clisp.org>
120403         * modules/strsignal-tests (Makefile.am): Define test_strsignal_LDADD.
120405         * modules/getaddrinfo-tests (Makefile.am): Define
120406         test_getaddrinfo_LDADD.
120408 2008-04-11  Bruno Haible  <bruno@clisp.org>
120410         * lib/strsignal.c (_sys_siglist): Don't declare if already declared.
120411         (init): Fix syntax error.
120412         * m4/strsignal.m4 (gl_PREREQ_STRSIGNAL): Check whether _sys_siglist
120413         is declared.
120415 2008-04-11  Bruno Haible  <bruno@clisp.org>
120417         * lib/glob.c: Include <stdbool.h>. Needed at least with IRIX cc.
120418         * modules/glob (Depends-on): Add stdbool.
120420 2008-04-11  Bruno Haible  <bruno@clisp.org>
120422         * lib/trim.c: Include <string.h>.
120424 2008-04-11  Eric Blake  <ebb9@byu.net>
120426         Avoid compile failure on OS/2.
120427         * lib/regex_internal.h (internal_function): Disable optimization
120428         on OS/2 (__EMX__), where it caused compiler error.
120429         Reported by Elbert Pol.
120431 2008-04-11  Bruno Haible  <bruno@clisp.org>
120433         Flush the standard error stream before aborting. Needed on mingw.
120434         * tests/test-argmatch.c (ASSERT): Call fflush(stderr) before abort().
120435         * tests/test-array_list.c (ASSERT): Likewise.
120436         * tests/test-array_oset.c (ASSERT): Likewise.
120437         * tests/test-avltree_list.c (ASSERT): Likewise.
120438         * tests/test-avltree_oset.c (ASSERT): Likewise.
120439         * tests/test-avltreehash_list.c (ASSERT): Likewise.
120440         * tests/test-binary-io.c (ASSERT): Likewise.
120441         * tests/test-byteswap.c (ASSERT): Likewise.
120442         * tests/test-c-ctype.c (ASSERT): Likewise.
120443         * tests/test-c-strcasecmp.c (ASSERT): Likewise.
120444         * tests/test-c-strcasestr.c (ASSERT): Likewise.
120445         * tests/test-c-strncasecmp.c (ASSERT): Likewise.
120446         * tests/test-c-strstr.c (ASSERT): Likewise.
120447         * tests/test-canonicalize-lgpl.c (ASSERT): Likewise.
120448         * tests/test-canonicalize.c (ASSERT): Likewise.
120449         * tests/test-carray_list.c (ASSERT): Likewise.
120450         * tests/test-ceilf1.c (ASSERT): Likewise.
120451         * tests/test-ceilf2.c (ASSERT): Likewise.
120452         * tests/test-ceill.c (ASSERT): Likewise.
120453         * tests/test-count-one-bits.c (ASSERT): Likewise.
120454         * tests/test-fbufmode.c (ASSERT): Likewise.
120455         * tests/test-fflush2.c (ASSERT): Likewise.
120456         * tests/test-floorf1.c (ASSERT): Likewise.
120457         * tests/test-floorf2.c (ASSERT): Likewise.
120458         * tests/test-floorl.c (ASSERT): Likewise.
120459         * tests/test-fopen.c (ASSERT): Likewise.
120460         * tests/test-fpending.c (ASSERT): Likewise.
120461         * tests/test-fprintf-posix.c (ASSERT): Likewise.
120462         * tests/test-fpurge.c (ASSERT): Likewise.
120463         * tests/test-freadable.c (ASSERT): Likewise.
120464         * tests/test-freadahead.c (ASSERT): Likewise.
120465         * tests/test-freading.c (ASSERT): Likewise.
120466         * tests/test-freadptr.c (ASSERT): Likewise.
120467         * tests/test-freadptr2.c (ASSERT): Likewise.
120468         * tests/test-freadseek.c (ASSERT): Likewise.
120469         * tests/test-freopen.c (ASSERT): Likewise.
120470         * tests/test-frexp.c (ASSERT): Likewise.
120471         * tests/test-frexpl.c (ASSERT): Likewise.
120472         * tests/test-fseek.c (ASSERT): Likewise.
120473         * tests/test-fseeko.c (ASSERT): Likewise.
120474         * tests/test-fstrcmp.c (ASSERT): Likewise.
120475         * tests/test-ftell.c (ASSERT): Likewise.
120476         * tests/test-ftello.c (ASSERT): Likewise.
120477         * tests/test-func.c (ASSERT): Likewise.
120478         * tests/test-fwritable.c (ASSERT): Likewise.
120479         * tests/test-fwriting.c (ASSERT): Likewise.
120480         * tests/test-getdelim.c (ASSERT): Likewise.
120481         * tests/test-getline.c (ASSERT): Likewise.
120482         * tests/test-i-ring.c (ASSERT): Likewise.
120483         * tests/test-iconv-utf.c (ASSERT): Likewise.
120484         * tests/test-iconv.c (ASSERT): Likewise.
120485         * tests/test-isfinite.c (ASSERT): Likewise.
120486         * tests/test-isnand.c (ASSERT): Likewise.
120487         * tests/test-isnanf.c (ASSERT): Likewise.
120488         * tests/test-isnanl.h (ASSERT): Likewise.
120489         * tests/test-ldexpl.c (ASSERT): Likewise.
120490         * tests/test-linked_list.c (ASSERT): Likewise.
120491         * tests/test-linkedhash_list.c (ASSERT): Likewise.
120492         * tests/test-localename.c (ASSERT): Likewise.
120493         * tests/test-lseek.c (ASSERT): Likewise.
120494         * tests/test-mbscasecmp.c (ASSERT): Likewise.
120495         * tests/test-mbscasestr1.c (ASSERT): Likewise.
120496         * tests/test-mbscasestr2.c (ASSERT): Likewise.
120497         * tests/test-mbscasestr3.c (ASSERT): Likewise.
120498         * tests/test-mbscasestr4.c (ASSERT): Likewise.
120499         * tests/test-mbschr.c (ASSERT): Likewise.
120500         * tests/test-mbscspn.c (ASSERT): Likewise.
120501         * tests/test-mbsncasecmp.c (ASSERT): Likewise.
120502         * tests/test-mbspbrk.c (ASSERT): Likewise.
120503         * tests/test-mbspcasecmp.c (ASSERT): Likewise.
120504         * tests/test-mbsrchr.c (ASSERT): Likewise.
120505         * tests/test-mbsspn.c (ASSERT): Likewise.
120506         * tests/test-mbsstr1.c (ASSERT): Likewise.
120507         * tests/test-mbsstr2.c (ASSERT): Likewise.
120508         * tests/test-mbsstr3.c (ASSERT): Likewise.
120509         * tests/test-memchr2.c (ASSERT): Likewise.
120510         * tests/test-memmem.c (ASSERT): Likewise.
120511         * tests/test-open.c (ASSERT): Likewise.
120512         * tests/test-printf-frexp.c (ASSERT): Likewise.
120513         * tests/test-printf-frexpl.c (ASSERT): Likewise.
120514         * tests/test-printf-posix.c (ASSERT): Likewise.
120515         * tests/test-quotearg.c (ASSERT): Likewise.
120516         * tests/test-rbtree_list.c (ASSERT): Likewise.
120517         * tests/test-rbtree_oset.c (ASSERT): Likewise.
120518         * tests/test-rbtreehash_list.c (ASSERT): Likewise.
120519         * tests/test-round1.c (ASSERT): Likewise.
120520         * tests/test-roundf1.c (ASSERT): Likewise.
120521         * tests/test-roundl.c (ASSERT): Likewise.
120522         * tests/test-signbit.c (ASSERT): Likewise.
120523         * tests/test-sleep.c (ASSERT): Likewise.
120524         * tests/test-snprintf-posix.c (ASSERT): Likewise.
120525         * tests/test-snprintf.c (ASSERT): Likewise.
120526         * tests/test-sprintf-posix.c (ASSERT): Likewise.
120527         * tests/test-stat-time.c (ASSERT): Likewise.
120528         * tests/test-strcasestr.c (ASSERT): Likewise.
120529         * tests/test-strerror.c (ASSERT): Likewise.
120530         * tests/test-striconv.c (ASSERT): Likewise.
120531         * tests/test-striconveh.c (ASSERT): Likewise.
120532         * tests/test-striconveha.c (ASSERT): Likewise.
120533         * tests/test-strsignal.c (ASSERT): Likewise.
120534         * tests/test-strstr.c (ASSERT): Likewise.
120535         * tests/test-strtod.c (ASSERT): Likewise.
120536         * tests/test-trunc1.c (ASSERT): Likewise.
120537         * tests/test-trunc2.c (ASSERT): Likewise.
120538         * tests/test-truncf1.c (ASSERT): Likewise.
120539         * tests/test-truncf2.c (ASSERT): Likewise.
120540         * tests/test-truncl.c (ASSERT): Likewise.
120541         * tests/test-vasnprintf-posix.c (ASSERT): Likewise.
120542         * tests/test-vasnprintf-posix2.c (ASSERT): Likewise.
120543         * tests/test-vasnprintf.c (ASSERT): Likewise.
120544         * tests/test-vasprintf-posix.c (ASSERT): Likewise.
120545         * tests/test-vasprintf.c (ASSERT): Likewise.
120546         * tests/test-vfprintf-posix.c (ASSERT): Likewise.
120547         * tests/test-vprintf-posix.c (ASSERT): Likewise.
120548         * tests/test-vsnprintf-posix.c (ASSERT): Likewise.
120549         * tests/test-vsnprintf.c (ASSERT): Likewise.
120550         * tests/test-vsprintf-posix.c (ASSERT): Likewise.
120551         * tests/test-wcwidth.c (ASSERT): Likewise.
120552         * tests/test-xfprintf-posix.c (ASSERT): Likewise.
120553         * tests/test-xprintf-posix.c (ASSERT): Likewise.
120554         * tests/test-xvasprintf.c (ASSERT): Likewise.
120555         * tests/uniconv/test-u16-conv-from-enc.c (ASSERT): Likewise.
120556         * tests/uniconv/test-u16-conv-to-enc.c (ASSERT): Likewise.
120557         * tests/uniconv/test-u16-strconv-from-enc.c (ASSERT): Likewise.
120558         * tests/uniconv/test-u16-strconv-to-enc.c (ASSERT): Likewise.
120559         * tests/uniconv/test-u32-conv-from-enc.c (ASSERT): Likewise.
120560         * tests/uniconv/test-u32-conv-to-enc.c (ASSERT): Likewise.
120561         * tests/uniconv/test-u32-strconv-from-enc.c (ASSERT): Likewise.
120562         * tests/uniconv/test-u32-strconv-to-enc.c (ASSERT): Likewise.
120563         * tests/uniconv/test-u8-conv-from-enc.c (ASSERT): Likewise.
120564         * tests/uniconv/test-u8-conv-to-enc.c (ASSERT): Likewise.
120565         * tests/uniconv/test-u8-strconv-from-enc.c (ASSERT): Likewise.
120566         * tests/uniconv/test-u8-strconv-to-enc.c (ASSERT): Likewise.
120567         * tests/unictype/test-bidi_byname.c (ASSERT): Likewise.
120568         * tests/unictype/test-bidi_name.c (ASSERT): Likewise.
120569         * tests/unictype/test-bidi_of.c (ASSERT): Likewise.
120570         * tests/unictype/test-bidi_test.c (ASSERT): Likewise.
120571         * tests/unictype/test-block_list.c (ASSERT): Likewise.
120572         * tests/unictype/test-block_of.c (ASSERT): Likewise.
120573         * tests/unictype/test-block_test.c (ASSERT): Likewise.
120574         * tests/unictype/test-categ_and.c (ASSERT): Likewise.
120575         * tests/unictype/test-categ_and_not.c (ASSERT): Likewise.
120576         * tests/unictype/test-categ_byname.c (ASSERT): Likewise.
120577         * tests/unictype/test-categ_name.c (ASSERT): Likewise.
120578         * tests/unictype/test-categ_none.c (ASSERT): Likewise.
120579         * tests/unictype/test-categ_of.c (ASSERT): Likewise.
120580         * tests/unictype/test-categ_or.c (ASSERT): Likewise.
120581         * tests/unictype/test-categ_test_withtable.c (ASSERT): Likewise.
120582         * tests/unictype/test-combining.c (ASSERT): Likewise.
120583         * tests/unictype/test-decdigit.c (ASSERT): Likewise.
120584         * tests/unictype/test-digit.c (ASSERT): Likewise.
120585         * tests/unictype/test-mirror.c (ASSERT): Likewise.
120586         * tests/unictype/test-numeric.c (ASSERT): Likewise.
120587         * tests/unictype/test-pr_byname.c (ASSERT): Likewise.
120588         * tests/unictype/test-pr_test.c (ASSERT): Likewise.
120589         * tests/unictype/test-predicate-part1.h (ASSERT): Likewise.
120590         * tests/unictype/test-scripts.c (ASSERT): Likewise.
120591         * tests/unictype/test-sy_c_ident.c (ASSERT): Likewise.
120592         * tests/unictype/test-sy_java_ident.c (ASSERT): Likewise.
120593         * tests/unistdio/test-u16-asnprintf1.c (ASSERT): Likewise.
120594         * tests/unistdio/test-u16-vasnprintf1.c (ASSERT): Likewise.
120595         * tests/unistdio/test-u16-vasnprintf2.c (ASSERT): Likewise.
120596         * tests/unistdio/test-u16-vasnprintf3.c (ASSERT): Likewise.
120597         * tests/unistdio/test-u16-vasprintf1.c (ASSERT): Likewise.
120598         * tests/unistdio/test-u16-vsnprintf1.c (ASSERT): Likewise.
120599         * tests/unistdio/test-u16-vsprintf1.c (ASSERT): Likewise.
120600         * tests/unistdio/test-u32-asnprintf1.c (ASSERT): Likewise.
120601         * tests/unistdio/test-u32-vasnprintf1.c (ASSERT): Likewise.
120602         * tests/unistdio/test-u32-vasnprintf2.c (ASSERT): Likewise.
120603         * tests/unistdio/test-u32-vasnprintf3.c (ASSERT): Likewise.
120604         * tests/unistdio/test-u32-vasprintf1.c (ASSERT): Likewise.
120605         * tests/unistdio/test-u32-vsnprintf1.c (ASSERT): Likewise.
120606         * tests/unistdio/test-u32-vsprintf1.c (ASSERT): Likewise.
120607         * tests/unistdio/test-u8-asnprintf1.c (ASSERT): Likewise.
120608         * tests/unistdio/test-u8-vasnprintf1.c (ASSERT): Likewise.
120609         * tests/unistdio/test-u8-vasnprintf2.c (ASSERT): Likewise.
120610         * tests/unistdio/test-u8-vasnprintf3.c (ASSERT): Likewise.
120611         * tests/unistdio/test-u8-vasprintf1.c (ASSERT): Likewise.
120612         * tests/unistdio/test-u8-vsnprintf1.c (ASSERT): Likewise.
120613         * tests/unistdio/test-u8-vsprintf1.c (ASSERT): Likewise.
120614         * tests/unistdio/test-ulc-asnprintf1.c (ASSERT): Likewise.
120615         * tests/unistdio/test-ulc-vasnprintf1.c (ASSERT): Likewise.
120616         * tests/unistdio/test-ulc-vasnprintf2.c (ASSERT): Likewise.
120617         * tests/unistdio/test-ulc-vasnprintf3.c (ASSERT): Likewise.
120618         * tests/unistdio/test-ulc-vasprintf1.c (ASSERT): Likewise.
120619         * tests/unistdio/test-ulc-vsnprintf1.c (ASSERT): Likewise.
120620         * tests/unistdio/test-ulc-vsprintf1.c (ASSERT): Likewise.
120621         * tests/uniwidth/test-u16-strwidth.c (ASSERT): Likewise.
120622         * tests/uniwidth/test-u16-width.c (ASSERT): Likewise.
120623         * tests/uniwidth/test-u32-strwidth.c (ASSERT): Likewise.
120624         * tests/uniwidth/test-u32-width.c (ASSERT): Likewise.
120625         * tests/uniwidth/test-u8-strwidth.c (ASSERT): Likewise.
120626         * tests/uniwidth/test-u8-width.c (ASSERT): Likewise.
120627         * tests/uniwidth/test-uc_width.c (ASSERT): Likewise.
120628         Reported by Eric Blake.
120630 2008-04-11  Bruno Haible  <bruno@clisp.org>
120632         * lib/wchar.in.h: Tweak comment.
120634 2008-04-11  Bruno Haible  <bruno@clisp.org>
120636         Fix __GNUC_STDC_INLINE__ predefine with Apple GCC on MacOS X 10.5.
120637         * gnulib-tool (func_emit_initmacro_start): Emit an invocation of
120638         gl_COMMON.
120639         * m4/gnulib-common.m4 (gl_COMMON, gl_COMMON_BODY): New macros.
120641 2008-04-11  Bruno Haible  <bruno@clisp.org>
120643         * modules/git-merge-changelog (git_merge_changelog_LDADD): Add LIBINTL.
120645 2008-04-11  Simon Josefsson  <simon@josefsson.org>
120647         * lib/gc-gnulib.c: On Windows, use CryptGenRandom from CSP instead
120648         of attempting to use nonexistent /dev/*random.  Based on patch
120649         from Adam Strzelecki <ono@java.pl> in
120650         <http://lists.gnu.org/r/help-gsasl/2008-02/msg00000.html>.
120652 2008-04-08  Bruno Haible  <bruno@clisp.org>
120654         Add tentative support for emx+gcc.
120655         * lib/fbufmode.c (fbufmode) [__EMX__]: Add conditional code.
120656         * lib/fpurge.c (fpurge): Likewise.
120657         * lib/freadable.c (freadable): Likewise.
120658         * lib/freadahead.c (freadahead): Likewise.
120659         * lib/freading.c (freading): Likewise.
120660         * lib/freadptr.c (freadptr): Likewise.
120661         * lib/freadseek.c (freadptrinc): Likewise.
120662         * lib/fseeko.c (rpl_fseeko): Likewise.
120663         * lib/fseterr.c (fseterr): Likewise.
120664         * lib/fwritable.c (fwritable): Likewise.
120665         * lib/fwriting.c (fwriting): Likewise.
120666         * m4/fpending.m4 (gl_FUNC_FPENDING): Add a variant for emx+gcc.
120668 2008-04-09  Eric Blake  <ebb9@byu.net>
120670         Avoid some autoconf warnings.
120671         * m4/regex.m4 (gl_REGEX): s/AC_HELP_STRING/AS_HELP_STRING/.
120672         * m4/acl.m4 (gl_FUNC_ACL): Likewise.
120673         * m4/afs.m4 (gl_AFS): Likewise.
120674         * m4/gc-random.m4 (gl_GC_RANDOM): Likewise.
120675         * m4/include_next.m4 (gl_INCLUDE_NEXT): s/AC_FOREACH/m4_foreach_w/.
120676         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Likewise.
120677         * m4/stdint.m4 (gl_STDINT_BITSIZEOF, gl_CHECK_TYPES_SIGNED)
120678         (gl_INTEGER_TYPE_SUFFIX): Likewise.
120679         * m4/onceonly_2_57.m4 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE)
120680         (AC_CHECK_DECLS_ONCE): Likewise.
120681         Rename file...
120682         * m4/onceonly.m4: ...to this, and delete 2.54 variant, now that
120683         gnulib-tool requires autoconf 2.59 or better.
120684         * gnulib-tool (func_get_filelist): s/\(onceonly\)_2_57.m4/\1.m4/.
120686 2008-04-08  Eric Blake  <ebb9@byu.net>
120688         Use 'git describe --match' if present (added in git 1.5.5).
120689         * build-aux/git-version-gen: Limit result to tags that match 'v*'
120690         if possible.
120692 2008-04-08  Bruno Haible  <bruno@clisp.org>
120694         Add tentative support for OpenServer.
120695         * lib/fbufmode.c (fbufmode): Add conditional define for _flag, _base,
120696         _ptr, _cnt.
120697         * lib/fpurge.c (fpurge): Likewise.
120698         * lib/freadable.c (freadable): Likewise.
120699         * lib/freadahead.c (freadahead): Likewise.
120700         * lib/freading.c (freading): Likewise.
120701         * lib/freadptr.c (freadptr): Likewise.
120702         * lib/freadseek.c (freadptrinc): Likewise.
120703         * lib/fseeko.c (rpl_fseeko): Likewise.
120704         * lib/fseterr.c (fseterr): Likewise.
120705         * lib/fwritable.c (fwritable): Likewise.
120706         * lib/fwriting.c (fwriting): Likewise.
120707         Reported by Roger Cornelius <rac@tenzing.org> and
120708         Brian K. White <brian@aljex.com>.
120710 2008-04-06  Jim Meyering  <meyering@redhat.com>
120712         * gnulib-tool (func_add_or_update): s/backuped/backed up/ in diagnostic
120714 2008-04-06  Bruno Haible  <bruno@clisp.org>
120716         Avoid possible error with non-ASCII bytes in UTF-8 locales.
120717         * tests/test-fprintf-posix.sh: Use "LC_ALL=C tr" instead of "tr".
120718         * tests/test-printf-posix.sh: Likewise.
120719         * tests/test-vfprintf-posix.sh: Likewise.
120720         * tests/test-vprintf-posix.sh: Likewise.
120721         * tests/test-xprintf-posix.sh: Likewise.
120723 2008-04-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
120725         * m4/double-slash-root.m4 (gl_DOUBLE_SLASH_ROOT): Fix quoting,
120726         hide error from 'ls', needed on OS/2.
120727         Report by Elbert Pol <elbert.pol@gmail.com>.
120729 2008-04-04  Eric Blake  <ebb9@byu.net>
120731         Make test-fseeko.c failures meaningful.
120732         * tests/test-fseeko.c: Print line number on failure.
120733         * tests/test-fseek.c: Likewise.
120734         Reported by Nelson H. F. Beebe.
120736         Improve strtod bug detection check.
120737         * m4/strtod.m4 (gl_FUNC_STRTOD): Also check for hex-float parsing,
120738         required for Solaris 10.
120739         Reported by Bob Friesenhahn and Nelson H. F. Beebe.
120741 2008-04-04  Bruno Haible  <bruno@clisp.org>
120743         * modules/relocatable-prog-wrapper (Files): Add m4/environ.m4. Needed
120744         by m4/setenv.m4.
120746 2008-04-03  Eric Blake  <ebb9@byu.net>
120748         Ensure sane .version contents.
120749         * top/GNUmakefile (_dummy): Also delete .version when rebuilding
120750         version string.
120751         * build-aux/git-version-gen: Improve documentation.
120753         Make GNU make output nicer.
120754         * top/GNUmakefile [!_have-Makefile]: Add dependency on
120755         MAKECMDGOALS to enforce message for all command line targets.  Set
120756         srcdir for use in maint.mk.
120758         Another maintainer tweak.
120759         * top/GNUmakefile (_is-dist-target): Allow maintainer-distcheck as
120760         a target that regenerates version.
120762 2008-04-03  Jim Meyering  <meyering@redhat.com>
120764         vc-list-files: don't cause coreutils "make po-check" failure
120765         * build-aux/vc-list-files: Skip postprocessing when $2 is '.'
120767 2008-04-03  Eric Blake  <ebb9@byu.net>
120769         Allow VPATH usage of vc-list-files.
120770         * build-aux/vc-list-files (scriptversion): Add timestamp.
120771         (options): Add --help, --version, -C.
120772         (CVS): Support installed cvsu.
120774 2008-04-02  Bruno Haible  <bruno@clisp.org>
120776         Avoid some "statement with no effect" warnings from gcc.
120777         * tests/test-wctype.c (main): Explicitly ignore unused values.
120778         Reported by Jim Meyering.
120780 2008-04-02  Jim Meyering  <meyering@redhat.com>
120782         Avoid some warnings from "gcc -Wshadow".
120783         * tests/test-frexp.c (exp): Define to a different identifier.
120784         * tests/test-frexpl.c (exp): Likewise.
120786 2008-04-03  Jim Meyering  <meyering@redhat.com>
120788         bootstrap: remove dangling *.[ch] symlinks from lib
120789         * build-aux/bootstrap [dangling symlink removal]: Move find's
120790         -depth option to precede all others, to avoid a warning.
120791         Remove *.[ch] files too, and from "$source_base" (usually lib/).
120793 2008-04-02  Bruno Haible  <bruno@clisp.org>
120795         Avoid some warnings from "gcc -Wshadow".
120796         * tests/tests-vfprintf-posix.c (my_fprintf): Move after test_function.
120797         * tests/tests-vprintf-posix.c (my_printf): Move after test_function.
120798         * tests/tests-vsnprintf-posix.c (my_snprintf): Move after test_function.
120799         * tests/tests-vsprintf-posix.c (my_sprintf): Move after test_function.
120800         Reported by Jim Meyering.
120802 2008-04-01  Bruno Haible  <bruno@clisp.org>
120804         Fix test to work on IRIX 6.5 with cc.
120805         * tests/test-math.c (numeric_equal): New function.
120806         (main): Use it.
120808 2008-04-01  Bruno Haible  <bruno@clisp.org>
120810         * doc/posix-headers/math.texi: Refine documentation of NAN problem.
120812 2008-04-01  Bruno Haible  <bruno@clisp.org>
120814         * tests/test-vasnprintf-posix.c: Include nan.h instead of <math.h>.
120815         (test_function): Use NaNd, NaNl instead of NAN or 0.0L/0.0L.
120816         * modules/vasnprintf-posix-tests (Files): Add tests/nan.h.
120817         (Depends-on): Remove math.
120819         * tests/test-vasprintf-posix.c: Include nan.h instead of <math.h>.
120820         (test_function): Use NaNd, NaNl instead of NAN or 0.0L/0.0L.
120821         * modules/vasprintf-posix-tests (Files): Add tests/nan.h.
120822         (Depends-on): Remove math.
120824         * tests/test-snprintf-posix.h: Include nan.h instead of <math.h>.
120825         (test_function): Use NaNd, NaNl instead of NAN or 0.0L/0.0L.
120826         * modules/snprintf-posix-tests (Files): Add tests/nan.h.
120827         (Depends-on): Remove math.
120828         * modules/vsnprintf-posix-tests (Files): Add tests/nan.h.
120829         (Depends-on): Remove math.
120831         * tests/test-sprintf-posix.h: Include nan.h instead of <math.h>.
120832         (test_function): Use NaNd, NaNl instead of NAN or 0.0L/0.0L.
120833         * modules/sprintf-posix-tests (Files): Add tests/nan.h.
120834         (Depends-on): Remove math.
120835         * modules/vsprintf-posix-tests (Files): Add tests/nan.h.
120836         (Depends-on): Remove math.
120838         * tests/test-round1.c: Include nan.h.
120839         (main): Use NaNd instead of NAN.
120840         * modules/round-tests (Files): Add tests/nan.h.
120842         * tests/test-trunc1.c: Include nan.h.
120843         (main): Use NaNd instead of NAN.
120844         * modules/trunc-tests (Files): Add tests/nan.h.
120846         * tests/test-roundf1.c: Include nan.h.
120847         (main): Use NaNf instead of NAN.
120848         * modules/roundf-tests (Files): Add tests/nan.h.
120850         * tests/test-truncf1.c: Include nan.h.
120851         (main): Use NaNf instead of NAN.
120852         * modules/truncf-tests (Files): Add tests/nan.h.
120854         * tests/test-ceilf1.c: Include nan.h.
120855         (main): Use NaNf instead of NAN.
120856         * modules/ceilf-tests (Files): Add tests/nan.h.
120858         * tests/test-floorf1.c: Include nan.h.
120859         (main): Use NaNf instead of NAN.
120860         * modules/floorf-tests (Files): Add tests/nan.h.
120862         * tests/test-isnanf.c: Include nan.h instead of <math.h>.
120863         (main): Use NaNf instead of NAN.
120864         * modules/isnanf-nolibm-tests (Files): Add tests/nan.h.
120866         * tests/test-isnand.c: Include nan.h instead of <math.h>.
120867         (main): Use NaNd instead of NAN.
120868         * modules/isnand-nolibm-tests (Files): Add tests/nan.h.
120870         * tests/test-frexp.c: Include nan.h.
120871         (main): Use NaNd instead of NAN.
120872         * modules/frexp-tests (Files): Add tests/nan.h.
120874         * lib/isnan.c: Don't include <math.h>.
120875         (FUNC): Don't use NAN macro.
120876         * modules/isnand-nolibm (Depends-on): Remove math.
120877         * modules/isnanf-nolibm (Depends-on): Remove math.
120878         * modules/isnanl (Depends-on): Remove math.
120879         * modules/isnanl-nolibm (Depends-on): Remove math.
120881         * tests/nan.h: New file.
120883 2008-04-01  Eric Blake  <ebb9@byu.net>
120885         Fix typos.
120886         * tests/test-strtod.c (main): s/FLT_/DBL_/ for minimum and epsilon
120887         values to be the right type.
120889         For now, cater to gnulib strtod inaccuracies.
120890         * tests/test-strtod.c (main): Allow 1-ulp error on expected
120891         fractional results.  While not as nice from a QoI perspective, it
120892         is a quicker patch than correctly implementing decimal to binary
120893         rounding.
120895 2008-03-31  Eric Blake  <ebb9@byu.net>
120897         Guarantee a definition of NAN.
120898         * lib/math.in.h (NAN): Define if missing.
120899         * tests/test-math.c (main): Test it.
120900         * doc/posix-headers/math.texi (math.h): Document this.
120901         * lib/isnan.c (rpl_isnand): Use it.
120902         * tests/test-ceilf1.c (NaN): Delete, and use NAN instead.
120903         * tests/test-floorf1.c (NaN): Likewise.
120904         * tests/test-frexp.c (NaN): Likewise.
120905         * tests/test-isnand.c (NaN): Likewise.
120906         * tests/test-isnanf.c (NaN): Likewise.
120907         * tests/test-round1.c (NaN): Likewise.
120908         * tests/test-roundf1.c (NaN): Likewise.
120909         * tests/test-snprintf-posix.h (NaN): Likewise.
120910         * tests/test-sprintf-posix.h (NaN): Likewise.
120911         * tests/test-trunc1.c (NaN): Likewise.
120912         * tests/test-truncf1.c (NaN): Likewise.
120913         * tests/test-vasnprintf-posix.c (NaN): Likewise.
120914         * tests/test-vasprintf-posix.c (NaN): Likewise.
120915         * modules/isnand-nolibm (Depends-on): Add math.
120916         * modules/isnanf-nolibm (Depends-on): Likewise.
120917         * modules/isnanl (Depends-on): Likewise.
120918         * modules/isnanl-nolibm (Depends-on): Likewise.
120919         * modules/snprintf-posix-tests (Depends-on): Likewise.
120920         * modules/sprintf-posix-tests (Depends-on): Likewise.
120921         * modules/vsnprintf-posix-tests (Depends-on): Likewise.
120922         * modules/vsprintf-posix-tests (Depends-on): Likewise.
120923         * modules/vasnprintf-posix-tests (Depends-on): Likewise.
120924         * modules/vasprintf-posix-tests (Depends-on): Likewise.
120926 2008-03-31  Bruno Haible  <bruno@clisp.org>
120928         * tests/test-strtod.c (main): Update results for OSF/1 platforms.
120929         * doc/posix-functions/strtod.texi: Likewise.
120931 2008-03-31  Bruno Haible  <bruno@clisp.org>
120933         * tests/test-strtod.c (main): Don't use C99 syntax.
120935 2008-03-31  Bruno Haible  <bruno@clisp.org>
120937         * tests/test-strtod.c (main): Don't test NAN macro. Needed for Solaris.
120938         Reported by Eric Blake.
120940 2008-03-31  Jim Meyering  <meyering@redhat.com>
120942         Don't compare actual signbit return values.
120943         * tests/test-strtod.c (main): Rather, compare only their
120944         zero/non-zero nature.
120946 2008-03-31  Eric Blake  <ebb9@byu.net>
120948         More strtod documentation.
120949         * doc/posix-functions/strtod.texi (strtod): Interpret more test
120950         failures as distinct bugs.
120952 2008-03-30  Paul Eggert  <eggert@cs.ucla.edu>
120954         * lib/wchar.in.h [defined __need_mbstate_t]: Just include <wchar.h>.
120955         Problem reported by Erik Benada in
120956         <http://lists.gnu.org/r/bug-gnulib/2008-03/msg00249.html>.
120958 2008-03-30  Bruno Haible  <bruno@clisp.org>
120960         * tests/test-strtod.c: Add comments about which assertion fails on which
120961         platform.
120962         * doc/posix-functions/strtod.texi: Add info about many more platforms.
120964 2008-03-30  Eric Blake  <ebb9@byu.net>
120966         Test signbit behavior on zeros.
120967         * tests/test-signbit.c (test_signbitf): Add tests for zero.
120968         (test_signbitd, test_signbitl): Likewise.
120970         More strtod touchups.
120971         * tests/test-strtod.c (main): Ignore tests for signbit on NaN, and
120972         sign of negative underflow, for now.  Use .5, not .1.
120973         * doc/posix-functions/strtod.texi (strtod): Mention these
120974         limitations.
120975         Reported by Jim Meyering.
120977 2008-03-30  Bruno Haible  <bruno@clisp.org>
120979         * lib/striconveh.h (mem_iconveh, str_iconveh): Optimize the conversion
120980         from UTF-8 to UTF-8//TRANSLIT in the same way as from UTF-8 to UTF-8.
120982 2008-03-30  Bruno Haible  <bruno@clisp.org>
120984         Avoid failure when attempting to return empty iconv results on some
120985         platforms.
120986         * lib/striconveh.c (mem_cd_iconveh_internal): In the final memory
120987         allocation, don't report ENOMEM when the resulting string is empty.
120989 2008-03-30  Bruno Haible  <bruno@clisp.org>
120991         Fix buffer overrun.
120992         * lib/vasnprintf.c (VASNPRINTF): If !USE_SNPRINTF && pad_ourselves:
120993         Don't consider the width for tmp_length. Check count against tmp_length
120994         before doing the padding. Ensure enough allocation during padding.
120996 2008-03-30  Eric Blake  <ebb9@byu.net>
120998         strtod touchups.
120999         * lib/strtod.c (strtod): Avoid compiler warnings.
121000         Reported by Jim Meyering.
121002 2008-03-30  Bruno Haible  <bruno@clisp.org>
121004         * lib/unistdio/u-vsprintf.h (EOVERFLOW): Remove fallback.
121005         * modules/unistdio/ulc-vsprintf (Depends-on): Add EOVERFLOW.
121006         * modules/unistdio/u8-vsprintf (Depends-on): Add EOVERFLOW.
121007         * modules/unistdio/u8-u8-vsprintf (Depends-on): Add EOVERFLOW.
121008         * modules/unistdio/u16-vsprintf (Depends-on): Add EOVERFLOW.
121009         * modules/unistdio/u16-u16-vsprintf (Depends-on): Add EOVERFLOW.
121010         * modules/unistdio/u32-vsprintf (Depends-on): Add EOVERFLOW.
121011         * modules/unistdio/u32-u32-vsprintf (Depends-on): Add EOVERFLOW.
121013         * lib/unistdio/u-vsnprintf.h (EOVERFLOW): Remove fallback.
121014         * modules/unistdio/ulc-vsnprintf (Depends-on): Add EOVERFLOW.
121015         * modules/unistdio/u8-vsnprintf (Depends-on): Add EOVERFLOW.
121016         * modules/unistdio/u8-u8-vsnprintf (Depends-on): Add EOVERFLOW.
121017         * modules/unistdio/u16-vsnprintf (Depends-on): Add EOVERFLOW.
121018         * modules/unistdio/u16-u16-vsnprintf (Depends-on): Add EOVERFLOW.
121019         * modules/unistdio/u32-vsnprintf (Depends-on): Add EOVERFLOW.
121020         * modules/unistdio/u32-u32-vsnprintf (Depends-on): Add EOVERFLOW.
121022         * lib/unistdio/u-vasprintf.h (EOVERFLOW): Remove fallback.
121023         * modules/unistdio/ulc-vasprintf (Depends-on): Add EOVERFLOW.
121024         * modules/unistdio/u8-vasprintf (Depends-on): Add EOVERFLOW.
121025         * modules/unistdio/u8-u8-vasprintf (Depends-on): Add EOVERFLOW.
121026         * modules/unistdio/u16-vasprintf (Depends-on): Add EOVERFLOW.
121027         * modules/unistdio/u16-u16-vasprintf (Depends-on): Add EOVERFLOW.
121028         * modules/unistdio/u32-vasprintf (Depends-on): Add EOVERFLOW.
121029         * modules/unistdio/u32-u32-vasprintf (Depends-on): Add EOVERFLOW.
121031         * lib/unistdio/ulc-vfprintf.c (EOVERFLOW): Remove fallback.
121032         * modules/unistdio/ulc-vfprintf (Depends-on): Add EOVERFLOW.
121034         * lib/unistdio/ulc-fprintf.c (EOVERFLOW): Remove fallback.
121035         * modules/unistdio/ulc-fprintf (Depends-on): Add EOVERFLOW.
121037         * lib/xvasprintf.c (EOVERFLOW): Remove fallback.
121038         * modules/xvasprintf (Depends-on): Add EOVERFLOW.
121040         * lib/vsprintf.c (EOVERFLOW): Remove fallback.
121041         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Drop gl_EOVERFLOW.
121042         * modules/vsprintf-posix (Depends-on): Add EOVERFLOW.
121044         * lib/vsnprintf.c (EOVERFLOW): Remove fallback.
121045         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Drop gl_EOVERFLOW.
121046         * modules/vsnprintf (Depends-on): Add EOVERFLOW.
121048         * lib/vfprintf.c (EOVERFLOW): Remove fallback.
121049         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Drop gl_EOVERFLOW.
121050         * modules/vfprintf-posix (Depends-on): Add EOVERFLOW.
121052         * lib/vasprintf.c (EOVERFLOW): Remove fallback.
121053         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Drop gl_EOVERFLOW.
121054         * modules/vasprintf (Depends-on): Add EOVERFLOW.
121056         * lib/vasnprintf.c (EOVERFLOW): Remove fallback.
121057         * m4/vasnprintf.m4 (gl_FUNC_VASNPRINTF): Drop gl_EOVERFLOW.
121058         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Drop gl_EOVERFLOW.
121059         * modules/vasnprintf (Files): Remove m4/eoverflow.m4.
121060         (Depends-on): Add EOVERFLOW.
121061         * modules/unistdio/ulc-vasnprintf (Files): Remove m4/eoverflow.m4.
121062         (Depends-on): Add EOVERFLOW.
121063         * modules/unistdio/u8-vasnprintf (Files): Remove m4/eoverflow.m4.
121064         (Depends-on): Add EOVERFLOW.
121065         * modules/unistdio/u8-u8-vasnprintf (Files): Remove m4/eoverflow.m4.
121066         (Depends-on): Add EOVERFLOW.
121067         * modules/unistdio/u16-vasnprintf (Files): Remove m4/eoverflow.m4.
121068         (Depends-on): Add EOVERFLOW.
121069         * modules/unistdio/u16-u16-vasnprintf (Files): Remove m4/eoverflow.m4.
121070         (Depends-on): Add EOVERFLOW.
121071         * modules/unistdio/u32-vasnprintf (Files): Remove m4/eoverflow.m4.
121072         (Depends-on): Add EOVERFLOW.
121073         * modules/unistdio/u32-u32-vasnprintf (Files): Remove m4/eoverflow.m4.
121074         (Depends-on): Add EOVERFLOW.
121076         * lib/sprintf.c (EOVERFLOW): Remove fallback.
121077         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Drop gl_EOVERFLOW.
121078         * modules/sprintf-posix (Depends-on): Add EOVERFLOW.
121080         * lib/snprintf.c (EOVERFLOW): Remove fallback.
121081         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Drop gl_EOVERFLOW.
121082         * modules/snprintf (Depends-on): Add EOVERFLOW.
121084         * lib/poll.c (EOVERFLOW): Remove fallback.
121085         * modules/poll (Depends-on): Add EOVERFLOW.
121087         * lib/getugroups.c (EOVERFLOW): Remove fallback.
121088         * modules/getugroups (Depends-on): Add EOVERFLOW.
121090         * lib/getdelim.c (EOVERFLOW): Remove fallback.
121091         * modules/getdelim (Depends-on): Add EOVERFLOW.
121093         * lib/ftell.c (EOVERFLOW): Remove fallback.
121094         * modules/ftell (Depends-on): Add EOVERFLOW.
121096         * lib/fprintf.c (EOVERFLOW): Remove fallback.
121097         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Drop gl_EOVERFLOW.
121098         * modules/fprintf-posix (Depends-on): Add EOVERFLOW.
121100         * lib/c-stack.c (EOVERFLOW): Remove unused fallback.
121102         * modules/EOVERFLOW-tests: New file.
121103         * tests/test-EOVERFLOW.c: New file.
121105         * modules/EOVERFLOW: New file.
121106         * doc/posix-headers/errno.texi: Mention EOVERFLOW portability problem.
121108 2008-03-30  Bruno Haible  <bruno@clisp.org>
121110         Fix bug introduced on 2007-06-10.
121111         * lib/vasnprintf.c (VASNPRINTF): When performing zero-padding, use
121112         spaces instead of 0 digits for 's' also when ENABLE_UNISTDIO.
121114 2008-03-30  Bruno Haible  <bruno@clisp.org>
121116         Improve freadseek's efficiency after ungetc.
121117         * lib/freadseek.c: Include freadahead.h.
121118         (freadptrinc): New function, extracted from freadseek.
121119         (freadseek): Use it in a loop. Use freadahead to determine the number
121120         of loop iterations.
121121         * modules/freadseek (Depends-on): Add freadahead.
121122         (configure.ac): Require AC_C_INLINE.
121124 2008-03-30  Bruno Haible  <bruno@clisp.org>
121126         * lib/freadseek.c (freadseek): Don't ignore the return value of
121127         freadptr.
121129 2008-03-29  Eric Blake  <ebb9@byu.net>
121131         Add hex float support.
121132         * modules/strtod (Depends-on): Add c-ctype.
121133         (Link): Mention POW_LIB.
121134         * lib/strtod.c (strtod): Recognize hex floats.  Don't allow
121135         whitespace between 'e' and exponent.
121136         * tests/test-strtod.c (main): Enable hex float tests.
121137         * doc/posix-functions/strtod.texi (strtod): Document what gnulib
121138         now provides.
121140         Document various strtod bugs, with some fixes.
121141         * doc/posix-functions/strtod.texi (strtod): Document bugs with
121142         "-0x", "inf", "nan", and hex constants.
121143         * doc/posix-functions/atof.texi (atof): Likewise.
121144         * modules/stdlib (Makefile.am): Support strtod.
121145         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Likewise.
121146         * m4/strtod.m4 (gl_FUNC_STRTOD): Fit in stdlib framework, and
121147         detect additional strtod bugs.
121148         * lib/stdlib.in.h (rpl_strtod): Add declarations.
121149         * lib/strtod.c (strtod): Return -0.0 on negative underflow.  Use
121150         bool where appropriate.  Parse 'inf' and 'nan'.
121151         * tests/test-strtod.c: New file.
121152         * modules/strtod (Depends-on): Add stdbool, stdlib.
121153         (configure.ac): Turn on module indicator.
121154         * modules/strtod-tests: New module.
121156 2008-03-29  Eric Blake  <ebb9@byu.net>
121158         Fix ftell on mingw.
121159         * lib/ftell.c (EOVERFLOW): Define if the system lacks it.
121160         * modules/ftell-tests (Depends-on): Add binary-io.
121161         * modules/ftello-tests (Depends-on): Likewise.
121162         * tests/test-ftell.c (main): Enhance test to cover behavior after
121163         ungetc.  Enforce binary mode.
121164         * tests/test-ftello.c (main): Likewise.
121166         Pass test-freadseek on cygwin.
121167         * modules/freadseek (Depends-on): Use freadptr, not freadahead.
121168         * lib/freadseek.c (freadseek): Don't increment beyond bounds of
121169         ungetc buffer.
121171         * tests/test-fflush2.c (main): Fix typo.
121173 2008-03-29  Bruno Haible  <bruno@clisp.org>
121175         * tests/test-fflush2.c (main): Temporarily disable the contents of
121176         this test.
121177         * m4/fflush.m4 (gl_FUNC_FFLUSH): Add a TODO.
121178         Reported by Eric Blake.
121180 2008-03-28  Simon Josefsson  <simon@josefsson.org>
121182         * lib/gc.h (enum Gc_hash): Add GC_SHA224.
121183         (GC_SHA224_DIGEST_SIZE): Add.
121185         * lib/gc-libgcrypt.c (gc_hash_open): Handle SHA-224.
121186         (gc_hash_digest_length): Likewise.
121187         (gc_hash_buffer): Likewise.
121189 2008-03-25  Bruno Haible  <bruno@clisp.org>
121191         * doc/gnulib-tool.texi (gettextize and autopoint): Explain in more
121192         detail which gettext release to use.
121193         Reported by Simon Josefsson.
121195 2008-03-26  Jim Meyering  <meyering@redhat.com>
121197         gnumakefile: remove file from $(top_builddir), not from $(top_srcdir)
121198         * modules/gnumakefile (clean-GNUmakefile): Also, use
121199         test ... && ... || : syntax rather than if-then ... fi.
121201         gnumakefile: Don't double-quote-expand $(VPATH) value.
121202         * modules/gnumakefile (clean-GNUmakefile): Use single quotes.
121204 2008-03-24  Eric Blake  <ebb9@byu.net>
121206         Alter GNUmakefile to install into top directory.
121207         * modules/maintainer-makefile: Split, and add dependency...
121208         * modules/gnumakefile: to this new module.
121209         * build-aux/GNUmakefile: Move...
121210         * top/GNUmakefile: ...here.
121211         * build-aux/maint.mk: Move...
121212         * top/maint.mk: ...here.
121213         * MODULES.html.sh (Support for maintaining...): Document new
121214         module.
121216 2008-03-23  Bruno Haible  <bruno@clisp.org>
121218         * gnulib-tool: New options --vc-files, --no-vc-files.
121219         (func_usage): Document them.
121220         (vc_files): New variable.
121221         (func_import): Consider vc_files.
121222         (func_create_testdir): Set vc_files to empty.
121223         Suggested by Jim Meyering and Karl Berry.
121225 2008-03-23  Bruno Haible  <bruno@clisp.org>
121227         Fix regex compilation error on HP-UX 11.
121228         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_TYPE_MBSTATE_T.
121229         * modules/regex (Files): Add m4/mbstate_t.m4.
121230         Reported by Ton Voon <ton.voon@altinity.com>.
121232 2008-03-23  Bruno Haible  <bruno@clisp.org>
121234         * doc/gnulib-tool.texi (gettextize and autopoint): New section.
121236 2008-03-23  Eric Blake  <ebb9@byu.net>
121237             Bruno Haible  <bruno@clisp.org>
121239         Install files from top/ in the destination directory.
121240         * gnulib-tool (func_get_automake_snippet): Synthesize an EXTRA_DIST
121241         augmentation also for the files from top/.
121242         (func_import, func_create_testdir): Rewrite file names:
121243         top/filename -> filename.
121245 2008-03-23  Bruno Haible  <bruno@clisp.org>
121247         Tweak "gnulib --version" output.
121248         * gnulib-tool (func_version): Replace "-dirty" suffix with "-modified".
121250 2008-03-23  Bruno Haible  <bruno@clisp.org>
121252         Tweak "gnulib --version" output.
121253         * gnulib-tool (func_version): Use date of last commit to ChangeLog,
121254         rather than contents of ChangeLog, when possible.
121256 2008-03-21  Eric Blake  <ebb9@byu.net>
121258         More --version tweaks.
121259         * gnulib-tool (func_version): Obey GNU Coding Standards.  Output
121260         date of last ChangeLog entry.
121262 2008-03-21  Jim Meyering  <meyering@redhat.com>
121264         * build-aux/GNUmakefile (_have-git-version-gen): Split long line.
121266 2008-03-20  Eric Blake  <ebb9@byu.net>
121268         VPATH fix.
121269         * build-aux/GNUmakefile (_have_git-version-gen): Look in correct dir.
121271 2008-03-20  Simon Josefsson  <simon@josefsson.org>
121273         * build-aux/GNUmakefile: Make git-version-gen optional.  Add
121274         _build-aux variable.  Suggested by Eric Blake <ebb9@byu.net>.
121276 2008-03-20  Eric Blake  <ebb9@byu.net>
121278         Sync GNUmakefile with coreutils.
121279         * build-aux/GNUmakefile (have-Makefile): Rename...
121280         (_have-Makefile): ...to this, for namespace consideration.
121281         (GNUmakefile.cfg): Include, if present.
121282         (_autoreconf): Define a default.
121283         (_is-dist-target): New rule for rebuilds to pick up intra-release
121284         version.
121285         (maint-cfg.mk): Rename...
121286         (cfg.mk): ...to this.
121288 2008-03-18  Jim Meyering  <meyering@redhat.com>
121290         New script and module: mktempd
121291         * MODULES.html.sh (maint+release support): Add mktempd.
121292         * build-aux/mktempd: New file.
121293         * modules/mktempd: New file.
121295 2008-03-15  Jim Meyering  <meyering@redhat.com>
121297         Undo last change.
121298         * lib/sha1.c, lib/md5.c: 63 != ~63.
121299         Reported by Andreas Schwab.
121301         sha1.c, md5.c: Hoist a redundant expression.
121302         * lib/sha1.c (sha1_process_bytes): AND-off the low bits in
121303         "ctx->buflen" only once, before calling *_process_block.
121304         * lib/md5.c (md5_process_bytes): Likewise.
121306 2008-03-14  Eric Blake  <ebb9@byu.net>
121308         Bump copyright year in files generated by gnulib-tool.
121309         * gnulib-tool (func_emit_copyright_notice): Extract copyright from
121310         gnulib-tool, rather than hard-coding it.
121312         Fix 'gnulib-tool --version' output to work with git.
121313         * gnulib-tool (func_gnulib_dir): New function, extracted from...
121314         (startup): ...here.
121315         (func_version): Use it to invoke git-version-gen, rather than
121316         relying on CVS keyword expansion.  Modernize wording.
121317         (cvsdatestamp, last_checkin_date, version): Kill unused
121318         variables.
121320 2008-03-12  Jim Meyering  <meyering@redhat.com>
121322         Recognize optional cast of the argument to free.
121323         * build-aux/useless-if-before-free: Update regexps.
121325         * build-aux/bootstrap (gnulib_tool): Remove trailing blanks.
121327 2008-03-11  Bruno Haible  <bruno@clisp.org>
121329         Extend AC_LIB_LINKFLAGS to the situation of several libraries provided
121330         by a single package.
121331         * m4/lib-link.m4 (AC_LIB_FROMPACKAGE): New macro.
121332         (AC_LIB_LINKFLAGS_BODY): Use the information stored by
121333         AC_LIB_FROMPACKAGE. Use AC_ARG_WITH instead of AC_LIB_ARG_WITH.
121334         Reported by Sam Steingold <sds@gnu.org>.
121336 2008-03-12  Sergey Poznyakoff  <gray@gnu.org.ua>
121338         * build-aux/bootstrap (version_controlled_file): Adapt for SVN
121339         repositories.
121341 2008-03-11  Bruno Haible  <bruno@clisp.org>
121343         Avoid conflicts between local macro definitions.
121344         * m4/lib-link.m4 (AC_LIB_LINKFLAGS, AC_LIB_HAVE_LINKFLAGS,
121345         AC_LIB_LINKFLAGS_BODY): Use pushdef/popdef instead of define/undefine.
121347 2008-03-10  Peter O'Gorman  <bug-gnulib@mlists.thewrittenword.com>
121348             Bruno Haible  <bruno@clisp.org>
121350         Make va_copy work with some version of xlc on AIX 5.1.
121351         * lib/stdarg.in.h: New file.
121352         * m4/stdarg.m4 (gl_STDARG_H): Initialize STDARG_H and NEXT_STDARG_H.
121353         On AIX, use a <stdarg.h> file substitute.
121354         * modules/stdarg (Files): Add lib/stdarg.in.h.
121355         (Depends-on): Add include_next.
121356         (Makefile.am): Build a stdarg.h substitute if requested.
121357         * doc/posix-functions/va_copy.texi: Document the platforms lacking it.
121359 2008-03-10  Bruno Haible  <bruno@clisp.org>
121361         * m4/include_next.m4 (gl_CHECK_NEXT_HEADERS): Document a restriction.
121362         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Likewise.
121363         Reported by Peter O'Gorman <bug-gnulib@mlists.thewrittenword.com>.
121365 2008-03-10  Bruno Haible  <bruno@clisp.org>
121367         * modules/stdlib (Depends-on): Add include_next, remove
121368         absolute-header.
121370 2008-03-09  Bruno Haible  <bruno@clisp.org>
121372         * lib/freadahead.h (freadahead): Document more precisely.
121373         * lib/freadahead.c (freadahead): When an ungetc is in effect, return
121374         the sum of both buffer sizes.
121375         * tests/test-freadahead.c (main): Also test behaviour after ungetc.
121376         * NEWS: Document the change.
121378 2008-03-09  Bruno Haible  <bruno@clisp.org>
121380         Extend freadptr to return also the buffer size.
121381         * lib/freadptr.h (freadptr): Add sizep argument.
121382         * lib/freadptr.c: Include freadptr.h, not freadahead.h.
121383         (freadptr): Add sizep argument. Determine buffer size like freadahead
121384         does.
121385         * tests/test-freadptr.c: Don't include freadahead.h.
121386         (main): Adapt for new calling convention of freadptr.
121387         * tests/test-freadptr2.c: New file, based on tests/test-freadahead.c.
121388         * tests/test-freadptr2.sh: New file, based on tests/test-freadahead.sh.
121389         * modules/freadptr-tests (Files): Add tests/test-freadptr2.c,
121390         tests/test-freadptr2.sh.
121391         (Depends): Remove freadahead.
121392         (TESTS): Add test-freadptr2.sh.
121393         (check_PROGRAMS): Add test-freadptr2.
121395 2008-03-09  Bruno Haible  <bruno@clisp.org>
121397         * doc/Makefile (%.pdf): Explain how to remedy the save_size error.
121398         Report and solution by Simon Josefsson.
121400 2008-03-06  Bruno Haible  <bruno@clisp.org>
121402         Make fflush after ungetc work on BSD platforms.
121403         * lib/fflush.c (rpl_fflush): Discard ungetc buffer if possible.
121404         * tests/test-fflush2.c: New file.
121405         * tests/test-fflush2.sh: New file.
121406         * modules/fflush-tests (Files): Add tests/test-fflush2.sh,
121407         tests/test-fflush2.c.
121408         (Makefile.am): Build test-fflush2 and run test-fflush2.sh.
121409         * doc/posix-functions/fflush.texi: Document fflush after ungetc bug.
121411 2008-03-06  Eric Blake  <ebb9@byu.net>
121413         Likewise for ftello.
121414         * modules/ftello (Dependencies): Add extensions.
121415         * m4/ftello.m4 (gl_FUNC_FTELLO): Require AC_USE_SYSTEM_EXTENSIONS.
121417 2008-03-06  Bruno Haible  <bruno@clisp.org>
121419         * modules/fseeko (Dependencies): Add extensions.
121420         * m4/fseeko.m4 (gl_FUNC_FSEEKO): Require AC_USE_SYSTEM_EXTENSIONS.
121421         Needed on glibc systems.
121423 2008-03-06  Bruno Haible  <bruno@clisp.org>
121425         * doc/gnulib-tool.texi (@nosuchmodulenote): Avoid line break inside
121426         email address.
121427         Reported by Thien-Thi Nguyen <ttn@gnuvola.org>.
121429 2008-03-06  Bruno Haible  <bruno@clisp.org>
121431         * users.txt: Add libgnupdf.
121433 2008-03-06  Thien-Thi Nguyen  <ttn@gnuvola.org>  (tiny change)
121435         * doc/gnulib-tool.texi (@nosuchmodulenote): New macro.
121436         (Header File Substitutes, Function Substitutes,
121437         Glibc Header File Substitutes, Glibc Function Substitutes): Use it.
121438         (Build robot for gnulib): Fix typo.
121440 2008-03-06  Bruno Haible  <bruno@clisp.org>
121442         * doc/gnulib-tool.texi (VCS Issues): Small updates.
121443         Reported by Thien-Thi Nguyen <ttn@gnuvola.org>.
121445 2008-03-06  Bruno Haible  <bruno@clisp.org>
121447         * doc/func.texi: New file, extracted from doc/gnulib.texi.
121448         * doc/gnulib.texi: Include it.
121450 2008-03-06  Simon Josefsson  <simon@josefsson.org>
121452         * modules/func (License): Change license to unlimited; there was
121453         no LGPL parts in the module anyway.
121455 2008-03-06  Simon Josefsson  <simon@josefsson.org>
121457         * modules/__func__: Renamed to modules/func.
121458         * modules/__func__-tests: Renamed to modules/func-tests.
121459         * tests/test-__func__.c: Renamed to tests/test-func.c.
121460         * m4/__func__.m4: Renamed to m4/func.m4.
121461         * doc/gnulib.texi (__func__): Section renamed to func.
121462         Suggested by Eric Blake <ebb9@byu.net>.
121464 2008-03-06  Simon Josefsson  <simon@josefsson.org>
121466         * doc/gnulib.texi (__func__): Use C99 terminology when talking
121467         about __func__.  Make example self-contained.  Suggested by Eric
121468         Blake <ebb9@byu.net>.
121470         * tests/test-__func__.c (main): Avoid extraneous () around __func.
121471         Suggested by Eric Blake <ebb9@byu.net>.
121473 2008-03-06  Simon Josefsson  <simon@josefsson.org>
121475         * modules/__func__: New file.
121476         * modules/__func__-tests: New file.
121477         * tests/test-__func__.c: New file.
121478         * m4/__func__.m4: New file.
121479         * doc/gnulib.texi (__func__): Document __func__ module.
121481 2008-03-05  Simon Josefsson  <simon@josefsson.org>
121483         * modules/byteswap (License): Re-license as LGPLv2+.
121485 2008-03-05  Simon Josefsson  <simon@josefsson.org>
121487         * doc/Makefile: Add pdf target.
121489 2008-03-05  Simon Josefsson  <simon@josefsson.org>
121491         * modules/inline (License): Use 'unlimited', since there are only
121492         *.m4 files in this module.
121494 2008-03-03  John E. Malmberg  <wb8tyw@qsl.net>  (tiny change)
121495             Bruno Haible  <bruno@clisp.org>
121497         Add support for HP C 7.1 on OpenVMS 8.3.
121498         * lib/alloca.in.h (alloca): Define as alias for DEC C on VMS.
121500 2008-03-03  John E. Malmberg  <wb8tyw@qsl.net>  (tiny change)
121502         Update VMS specifics.
121503         * lib/getopt.c [VMS]: Remove include of unixlib.h.
121505 2008-03-02  Jim Meyering  <meyering@redhat.com>
121507         Remove the last dependency on the "free" module.
121508         * m4/readutmp.m4 (gl_READUTMP): Don't require gl_FUNC_FREE.
121509         Reported by Bob Proulx.
121511         * lib/getdelim.c (getdelim): Don't leak memory upon failed realloc.
121513         Remove useless "if" tests before free.  Deprecate "free" module.
121514         * doc/posix-functions/free.texi: Mention that this
121515         module is no longer useful.
121516         * modules/free (Notice): Say this module is obsolete.
121517         * modules/readutmp (Depends-on): Remove free.
121518         * lib/save-cwd.c (free_cwd): Remove useless "if" before free.
121519         * lib/putenv.c (putenv): Likewise.
121520         * lib/gc-gnulib.c (gc_cipher_close): Likewise.
121521         * lib/getaddrinfo.c (freeaddrinfo): Likewise.
121522         * tests/test-c-strcasestr.c (main): Likewise.
121523         * tests/test-c-strstr.c (main): Likewise.
121524         * tests/test-mbscasestr1.c (main): Likewise.
121525         * tests/test-mbscasestr2.c (main): Likewise.
121526         * tests/test-mbsstr1.c (main): Likewise.
121527         * tests/test-mbsstr2.c (main): Likewise.
121528         * tests/test-memmem.c (main): Likewise.
121529         * tests/test-strcasestr.c (main): Likewise.
121530         * tests/test-striconv.c (main): Likewise.
121531         * tests/test-striconveh.c (main): Likewise.
121532         * tests/test-striconveha.c (main): Likewise.
121533         * tests/test-strstr.c (main): Likewise.
121535         * build-aux/git-version-gen: Adjust a comment and the Usage string.
121537         bootstrap: sync from coreutils again
121538         * build-aux/bootstrap: Remove dangling m4/*.m4 symlinks.
121540 2008-03-01  Jim Meyering  <meyering@redhat.com>
121542         bootstrap: sync from coreutils
121543         * build-aux/bootstrap (update_po_files): Copy a .po file into place
121544         also when the target doesn't exist.
121546 2008-03-01  Eric Blake  <ebb9@byu.net>
121548         Fix bugs in last patch.
121549         * lib/memchr2.c (memchr2): Fix typo.
121550         * tests/test-memchr2.c: Test previous bug, and don't use GNU
121551         extension.
121552         Reported by Bruce Korb.
121554         New module 'memchr2'.
121555         * modules/memchr2: New file.
121556         * modules/memchr2-tests: Likewise.
121557         * lib/memchr2.h: Likewise.
121558         * lib/memchr2.c: Likewise, based on memchr.c.
121559         * tests/test-memchr2.c: New test.
121560         * MODULES.html.sh (String handling): Add memchr2.
121562 2008-02-29  Bruno Haible  <bruno@clisp.org>
121564         * modules/freadseek-tests: New file.
121565         * tests/test-freadseek.sh: New file.
121566         * tests/test-freadseek.c: New file.
121568         New module 'freadseek'.
121569         * modules/freadseek: New file.
121570         * lib/freadseek.h: New file.
121571         * lib/freadseek.c: New file.
121572         * MODULES.html.sh (File stream based Input/Output): Add freadseek.
121574 2008-02-29  Sergey Poznyakoff  <gray@gnu.org.ua>
121576         * users.txt: Add anubis, cpio, mailfromd, mailutils, radius,
121577         wydawca.
121579         * m4/argp.m4 (gl_ARGP): Use AC_TRY_LINK to test if
121580         program_invocation_name and program_invocation_short_name are
121581         present.
121583 2008-02-28  Bruno Haible  <bruno@clisp.org>
121585         * tests/test-freadptr.c: Add a test for behaviour after ungetc.
121586         * tests/test-freadptr.sh: Also test non-seekable stdin.
121588 2008-02-28  Sergey Poznyakoff  <gray@gnu.org.ua>
121590         * build-aux/bootstrap (source_base, m4_base)
121591         (doc_base, tests_base): New variables.
121592         (gnulib_tool_options): Do not hardcode base directories, use
121593         the above variables instead.
121595 2008-02-28  Atsushi SAKAI  <sakaia@jp.fujitsu.com>
121597         * lib/xsize.h: Fix typo in comment: s/tupe/type/.
121599 2008-02-28  Bruno Haible  <bruno@clisp.org>
121601         * modules/freadptr-tests: New file.
121602         * tests/test-freadptr.sh: New file.
121603         * tests/test-freadptr.c: New file.
121605         New module 'freadptr'.
121606         * modules/freadptr: New file.
121607         * lib/freadptr.h: New file.
121608         * lib/freadptr.c: New file.
121609         * MODULES.html.sh (File stream based Input/Output): Add freadptr.
121611 2008-02-26  Karl Berry  <karl@freefriends.org>
121613         Sync from Libtool:
121614         * libltdl/argz.c (argz_add, argz_count): New functions.
121615         * libltdl/argz.in.h: Declare them.
121616         Report by Juan Manuel Guerrero <juan.guerrero@gmx.de>.
121618 2008-02-22  Bruno Haible  <bruno@clisp.org>
121620         * m4/time_r.m4 (gl_TIME_R): Also check that localtime_r's return type
121621         is a pointer type.  Needed for HP-UX 10.
121622         * doc/posix-functions/localtime_r.texi: Mention HP-UX 10.
121623         * doc/posix-functions/gmtime_r.texi: Likewise.
121624         Reported by Peter O'Gorman <bug-gnulib@mlists.thewrittenword.com>.
121626 2008-02-24  Bruno Haible  <bruno@clisp.org>
121628         * modules/environ-tests: New file.
121629         * tests/test-environ.c: New file.
121631         New module 'environ'.
121632         * modules/environ: New file.
121633         * lib/unistd.in.h (environ): New declaration.
121634         * m4/environ.m4: New file.
121635         (gt_CHECK_VAR_DECL): Moved here from m4/setenv.m4. Undefine gt_cv_var
121636         after use.
121637         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_ENVIRON and
121638         HAVE_DECL_ENVIRON.
121639         * modules/unistd (Makefile.am): Substitute also GNULIB_ENVIRON and
121640         HAVE_DECL_ENVIRON.
121641         * doc/posix-functions/environ.texi: Mention module 'environ'. Remove
121642         wrong claim that 'environ' is missing on some systems.
121643         * modules/execute (Depends-on): Add environ.
121644         * lib/execute.c (environ): Remove fallback declaration.
121645         * modules/pipe (Depends-on): Add environ.
121646         * lib/pipe.c (environ): Remove fallback declaration.
121647         * modules/setenv (Depends-on): Add environ.
121648         * lib/setenv.c (environ): Remove fallback declaration.
121649         * modules/unsetenv (Depends-on): Add environ.
121650         * lib/unsetenv.c (environ): Remove fallback declaration.
121651         * m4/setenv.m4 (gt_CHECK_VAR_DECL): Remove macro. Moved to
121652         m4/environ.m4.
121653         (gl_PREREQ_SETENV): Require gl_ENVIRON instead of testing for environ.
121654         (gl_PREREQ_UNSETENV): Likewise.
121656 2008-02-24  Bruno Haible  <bruno@clisp.org>
121658         * doc/posix-functions/environ.texi: Document the MacOS X problem.
121660 2008-02-20  Bob Proulx  <bob@proulx.com>
121662         Enable use of older two part flavor 'git describe'.
121663         * build-aux/git-version-gen: If using the older two part flavor of
121664         git version then recreate the third part now present in the
121665         newer three part flavor of git describe.
121667 2008-02-20  Martin Buchholz  <martin@xemacs.org>  (tiny change)
121669         * lib/fts.c (fts_build): Typo correction to comment.
121671 2008-02-17  Bruno Haible  <bruno@clisp.org>
121673         * lib/git-merge-changelog.c (main) [split_merged_entry]: Avoid
121674         generating no-op conflicts.
121676 2008-02-17  Bruno Haible  <bruno@clisp.org>
121678         Speed up by 10%.
121679         * lib/git-merge-changelog.c (main): Use the iterator to iterate through
121680         result_entries, rather than an index-based loop.
121682 2008-02-17  Bruno Haible  <bruno@clisp.org>
121684         Speed up by 25%.
121685         * lib/git-merge-changelog.c (struct entry): New fields 'hashcode',
121686         'hashcode_cached'.
121687         (entry_create): New function.
121688         (entry_hashcode): Use the cached hashcode if possible.
121689         (read_changelog_file, try_split_merged_entry): Use entry_create.
121691 2008-02-17  Bruno Haible  <bruno@clisp.org>
121693         Speed up from O(n^2) to O(n) for long ChangeLog files.
121694         * lib/git-merge-changelog.c: Include gl_rbtreehash_list.h.
121695         (read_changelog_file): Change implementation of entries_reversed list
121696         to rbtreehash.
121697         * modules/git-merge-changelog (Depends-on): Add rbtreehash-list.
121699 2008-02-17  Bruno Haible  <bruno@clisp.org>
121701         New option --split-merged-entry.
121702         * lib/git-merge-changelog.c (FSTRCMP_STRICTER_THRESHOLD): New macro.
121703         (find_paragraph_end, try_split_merged_entry): New functions.
121704         (long_options): Add option --split-merged-entry.
121705         (usage): Document option --split-merged-entry.
121706         (main): Implement option --split-merged-entry.
121707         Reported by Eric Blake.
121709 2008-02-17  Bruno Haible  <bruno@clisp.org>
121711         * lib/git-merge-changelog.c: Include c-strstr.h.
121712         (main): Support the "git pull --rebase" situation.
121713         * modules/git-merge-changelog (Depends-on): Add c-strstr.
121714         Reported by Eric Blake.
121716 2008-02-16  Eric Blake  <ebb9@byu.net>
121718         Avoid doubling \ in common case of "c-maybe" quoting style.
121719         * lib/quotearg.c (quotearg_buffer_restyled): Don't escape \ when
121720         eliding outer quotes.
121721         * lib/quotearg.h: Document this.
121722         * tests/test-quotearg.c (result_strings, inputs, results_g)
121723         (flag_results, locale_results): Test it by adding a new string to
121724         each test group.
121725         (compare_strings): Test new string.
121727 2008-02-13  Eric Blake  <ebb9@byu.net>
121729         Avoid trigraph quoting in default output.
121730         * lib/quotearg.h (enum quoting_flags): Add QA_SPLIT_TRIGRAPHS.
121731         * lib/quotearg.c (quotearg_buffer_restyled): Don't quote trigraphs
121732         unless explicitly requested.
121733         * tests/test-quotearg.c (flag_results, main): Add additional tests.
121735 2008-02-13  Lasse Collin  <lasse.collin@tukaani.org>
121737         Don't rely on signed integer overflowing to negative value.
121738         * lib/getugroups.c (getugroups): Include <limits.h>.
121739         Instead, compare against INT_MAX, and increment only if the test passes.
121741 2008-02-13  Jim Meyering  <meyering@redhat.com>
121742         and Eric Blake  <ebb9@byu.net>
121744         Avoid shadowing warning and compile errors on Linux.
121745         * tests/test-quotearg.c [ENABLE_NLS]: Disable <libintl.h>
121746         forwarding macros on Linux.
121747         (dcgettext): Define a stub, for Linux.
121748         (results_g, main): Avoid warnings.
121750 2008-02-12  Eric Blake  <ebb9@byu.net>
121752         Silence warning in last patch.
121753         * lib/quotearg.c (quotearg_buffer_restyled): Add missing const.
121755         Quotearg part 4: add tests, fix c-maybe colon quoting.
121756         * lib/quotearg.h: Improve documentation.
121757         * lib/quotearg.c (quotearg_buffer_restyled): Don't add extra
121758         escapes when adding outer quotes.  When quoting trigraphs, use
121759         valid C notation.  When quoting NUL, omit extra characters if next
121760         character is not digit.  Alter prototype.
121761         (quotearg_buffer, quotearg_alloc_mem, quotearg_n_options): Adjust
121762         callers.
121763         * modules/quotearg-tests: New module.
121764         * tests/test-quotearg.c: New test.
121766 2008-02-07  Eric Blake  <ebb9@byu.net>
121768         Quotearg part 3: add flag to control outer quote elision.
121769         * lib/quotearg.h (c_maybe_quoting_style): New style.
121770         (enum quoting_flags): Better documentation of flags.
121771         * lib/quotearg.c (quoting_style_args, quoting_style_vals): Add
121772         c-maybe style.
121773         (quotearg_buffer_restyled): Handle new flag to elide outer
121774         quotes.
121776         Quotearg part 2: add flag that can control NUL elision.
121777         * lib/quotearg.h (set_quoting_flags): New prototype.
121778         * lib/quotearg.c (struct quoting_options): Add flag field.
121779         (set_quoting_flags): New function.
121780         (quotearg_buffer_restyled): Add flags parameter.
121781         (quotearg_alloc_mem): Set the flag if length cannot be returned.
121782         (quotearg_n_options): Set the flag, since length cannot be
121783         returned.
121784         (quoting_options_from_style): Default flags correctly.
121786         Quotearg part 1: more wrappers, restore quotearg_char state.
121787         * lib/quotearg.h (quotearg_alloc_mem, quotearg_n_mem)
121788         (quotearg_mem, quotearg_style_mem, quotearg_char_mem)
121789         (quotearg_colon_mem): New wrappers.
121790         * lib/quotearg.c (quotearg_alloc, quotearg_char): Rewrite...
121791         (quotearg_alloc_mem, quotearg_char_mem): ...in terms of these new
121792         functions.
121793         (quotearg_n_mem, quotearg_mem, quotearg_style_mem)
121794         (quotearg_colon_mem): New functions.
121796 2008-02-11  Bruno Haible  <bruno@clisp.org>
121798         * modules/git-merge-changelog (Makefile.am): Don't use -L and -l for a
121799         library in the current directory: it does not work with parallel make.
121800         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
121802 2008-02-11  Bruno Haible  <bruno@clisp.org>
121804         * .gitattributes: New file.
121806 2008-02-11  Jim Meyering  <meyering@redhat.com>
121808         useless-if-before-free: Fix reversed exit values.
121809         * build-aux/useless-if-before-free: Use correct values
121810         for EXIT_MATCH and EXIT_NO_MATCH.
121812         * build-aux/useless-if-before-free: Close stdout carefully.
121814 2008-02-10  Bruno Haible  <bruno@clisp.org>
121816         New module 'git-merge-changelog'.
121817         * modules/git-merge-changelog: New file.
121818         * lib/git-merge-changelog.c: New file.
121820 2008-02-10  Jim Meyering  <meyering@redhat.com>
121822         useless-if-before-free: New option: --list (-l).
121824         useless-if-before-free: Don't exit immediately upon open failure.
121825         * build-aux/useless-if-before-free: Exit 2 for errors.
121826         Upon failure to open a file, don't exit immediately.
121827         Rather, just warn and continue with any remaining files.
121829 2008-02-10  Bruno Haible  <bruno@clisp.org>
121831         New abstract list operation 'node_set_value'.
121832         * lib/gl_list.h (gl_list_node_set_value): New function.
121833         (struct gl_list_implementation): New field node_set_value.
121834         * lib/gl_list.c (gl_list_node_set_value): New function.
121835         * lib/gl_array_list.c (gl_array_node_set_value): New function.
121836         (gl_array_list_implementation): Update.
121837         * lib/gl_carray_list.c (gl_carray_node_set_value): New function.
121838         (gl_carray_list_implementation): Update.
121839         * lib/gl_anylinked_list2.h (gl_linked_node_set_value): New function.
121840         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
121841         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
121842         * lib/gl_anytree_list2.h (gl_tree_node_set_value): New function.
121843         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
121844         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
121845         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
121846         Update.
121847         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Update.
121848         * lib/gl_sublist.c (gl_sublist_node_set_value): New function.
121849         (gl_sublist_list_implementation): Update.
121851 2008-02-10  Bruno Haible  <bruno@clisp.org>
121853         * lib/diffseq.h: Write "ELEMENT const" instead of "const ELEMENT".
121854         Needed when ELEMENT is #defined to 'some_type *'.
121856 2008-02-10  Jim Meyering  <meyering@redhat.com>
121858         New script and module: useless-if-before-free
121859         * MODULES.html.sh (maint+release support): Add useless-if-before-free.
121860         * build-aux/useless-if-before-free: New file.
121861         * modules/useless-if-before-free: New file.
121863         * build-aux/gitlog-to-changelog: Use committer date, not author date.
121865         xstrtol_error: Fix typo.
121866         * lib/xstrtol-error.c (xstrtol_error): The parameter was unused:
121867         s/exit_failure/exit_status/.
121869 2008-02-09  Jim Meyering  <meyering@redhat.com>
121871         New script and module: gitlog-to-changelog
121872         * MODULES.html.sh (maint+release support): Add gitlog-to-changelog.
121873         * modules/gitlog-to-changelog: New file.
121874         * build-aux/gitlog-to-changelog: New file.
121876 2008-02-08  Jim Meyering  <meyering@redhat.com>
121878         Avoid two "parameter unused" warnings.
121879         * lib/stat-time.h (get_stat_birthtime_ns, get_stat_birthtime):
121880         Mark "st" as used.
121882         Use "git COMMAND", not "git-COMMAND".
121883         * build-aux/bootstrap (version_controlled_file): s/git-rm/git-rm/.
121884         * build-aux/announce-gen (get_tool_versions): Correct a diagnostic.
121885         * build-aux/git-version-gen: Use "git status", not "git-status".
121887 2008-02-07  Bruno Haible  <bruno@clisp.org>
121889         * lib/vasnprintf.c (VASNPRINTF): Don't use %n on native Woe32 systems.
121890         Avoids a crash on Windows Vista.
121891         Reported by Adam Strzelecki <ono@java.pl> via
121892         Simon Josefsson <simon@josefsson.org>.
121894 2008-02-06  Bruno Haible  <bruno@clisp.org>
121896         Fix *printf behaviour regarding the left-adjust flag on HP-UX 10.20.
121897         * m4/printf.m4 (gl_PRINTF_FLAG_LEFTADJUST): New macro.
121898         * lib/vasnprintf.c (VASNPRINTF): Handle NEED_PRINTF_FLAG_LEFTADJUST.
121899         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_FLAG_LEFTADJUST): New macro.
121900         (gl_PREREQ_VASNPRINTF_WITH_EXTRAS): Invoke it.
121901         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
121902         gl_PRINTF_FLAG_LEFTADJUST and test its result. Invoke
121903         gl_PREREQ_VASNPRINTF_FLAG_LEFTADJUST.
121904         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
121905         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
121906         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
121907         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
121908         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
121909         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
121910         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
121911         * tests/test-vasnprintf-posix.c (test_function): Add testcases for the
121912         left-adjust flag.
121913         * tests/test-snprintf-posix.h (test_function): Likewise.
121914         * tests/test-sprintf-posix.h (test_function): Likewise.
121915         * tests/test-vasprintf-posix.c (test_function): Likewise.
121916         * doc/posix-functions/fprintf.texi: Update.
121917         * doc/posix-functions/printf.texi: Update.
121918         * doc/posix-functions/snprintf.texi: Update.
121919         * doc/posix-functions/sprintf.texi: Update.
121920         * doc/posix-functions/vfprintf.texi: Update.
121921         * doc/posix-functions/vprintf.texi: Update.
121922         * doc/posix-functions/vsnprintf.texi: Update.
121923         * doc/posix-functions/vsprintf.texi: Update.
121924         Reported by Peter Fales <psfales@alcatel-lucent.com>.
121926 2008-02-06  Bruno Haible  <bruno@clisp.org>
121928         Fix bug introduced on 2008-01-26.
121929         * lib/isnan.c (FUNC): Set to rpl_isnand, not rpl_isnan.
121931 2008-02-06  Bruno Haible  <bruno@clisp.org>
121933         Fix bug introduced on 2007-06-10.
121934         * lib/vasnprintf.c (VASNPRINTF): Perform zero-padding also if
121935         !NEED_PRINTF_FLAG_ZERO.
121937 2008-02-05  Peter O'Gorman  <pogma@thewrittenword.com>
121939         getloadavg: use libperfstat on AIX5
121940         * lib/getloadavg.c, m4/getloadavg.m4 [aix]: Use libperfstat
121942 2008-02-03  Bruno Haible  <bruno@clisp.org>
121944         * lib/diffseq.h: Add comments about required #includes.
121945         Reported by Michael Biggs <gnulib@doubleplum.net>.
121947 2008-02-01  Bruno Haible  <bruno@clisp.org>
121949         * users.txt: Add gnuit.
121951 2008-01-31  Bruno Haible  <bruno@clisp.org>
121953         * lib/md4.c (set_uint32): Mark as inline.
121954         * lib/md5.c (set_uint32): Likewise.
121955         * lib/sha1.c (set_uint32): Likewise.
121956         * m4/md4.m4 (gl_MD4): Require AC_C_INLINE.
121957         * m4/md5.m4 (gl_MD5): Likewise.
121958         * m4/sha1.m4 (gl_SHA1): Likewise.
121960 2008-01-31  Jim Meyering  <meyering@redhat.com>
121962         Use "sizeof VAR", rather than a literal "4".
121963         * lib/md5.c (md5_read_ctx): Use sizeof ctx->A, not 4.
121964         * lib/md4.c (md4_read_ctx): Likewise.
121965         * lib/sha1.c (sha1_read_ctx): Likewise.
121967 2008-01-31  Simon Josefsson  <simon@josefsson.org>
121969         * tests/test-sha1.c: New file, based on test-md5.c.
121971         * modules/crypto/sha1-tests: New file.
121973 2008-01-31  Simon Josefsson  <simon@josefsson.org>
121975         * lib/sha1.h (SHA1_DIGEST_SIZE): Define.
121977 2008-01-31  Jim Meyering  <meyering@redhat.com>
121979         Prefer "sizeof v" over the equivalent "4".
121980         * lib/md4.c (set_uint32): Use "sizeof v" as memcpy length, not 4.
121981         * lib/md5.c (set_uint32): Likewise.
121982         * lib/sha1.c (set_uint32): Likewise.
121984 2008-01-31  Simon Josefsson  <simon@josefsson.org>
121986         * lib/sha1.c (set_uint32): Mark function as static.
121988 2008-01-31  Simon Josefsson  <simon@josefsson.org>
121990         md2: clarify comments to say that alignment is not required.
121991         * lib/md2.h: Remove warning about alignment in comment.
121992         * lib/md2.c (md2_read_ctx, md2_finish_ctx): Doc fix, alignment has
121993         never been required.
121995 2008-01-31  Simon Josefsson  <simon@josefsson.org>
121997         md4: adapt alignment constraint fix from sha1.
121998         * lib/md4.c (set_uint32): New function, from sha1.c
121999         (md4_read_ctx): Use it.
122000         (md4_finish_ctx): Doc fix.
122001         * lib/md4.h: Doc fix.
122003 2008-01-31  Simon Josefsson  <simon@josefsson.org>
122005         md5: adapt alignment constraint fix from sha1.
122006         * lib/md5.c (set_uint32): New function, from sha1.c
122007         (md5_read_ctx): Use it.
122008         (md5_finish_ctx): Doc fix.
122009         * lib/md5.h: Doc fix.
122011 2008-01-30  Peter Palfrader  <weasel@debian.org>
122013         sha1: remove the result buffer alignment constraint
122014         * lib/sha1.c (set_uint32): New function.
122015         (sha1_read_ctx): Rewrite to remove the result buffer alignment
122016         constraint.
122017         (sha1_finish_ctx): Remove comment warning about alignment constraint.
122018         * lib/sha1.h: Likewise.
122020 2008-01-30  Andreas Schwab  <schwab@suse.de>
122021             Bruno Haible  <bruno@clisp.org>
122023         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Include <float.h> and ensure a
122024         correct definition of LDBL_MIN_EXP.
122026 2008-01-30  Karl Berry  <karl@gnu.org>
122028         * config/srclist-update: try to preserve x bit on updates.
122029         * config/srclistvars.sh: update for karl.
122031 2008-01-29  Jim Meyering  <meyering@redhat.com>
122033         vasnprintf.c: Avoid warning about unused label
122034         * lib/vasnprintf.c (VASNPRINTF) [!USE_SNPRINTF]: Guard the
122035         "overflow" label definition and associated code with the
122036         same cpp condition that guards the sole use of that label.
122038 2008-01-26  Bruno Haible  <bruno@clisp.org>
122040         * m4/isnanl.m4 (gl_HAVE_ISNANL_NO_LIBM, gl_HAVE_ISNANL_IN_LIBM,
122041         gl_FUNC_ISNANL_WORKS): Test the GCC >= 4.0 built-in.
122042         * lib/isnanl.h (isnanl): Use the GCC >= 4.0 built-in.
122043         * lib/isnanl-nolibm.h (isnanl): Likewise.
122044         Reported by Paul Eggert <eggert@cs.ucla.edu>.
122046 2008-01-26  Bruno Haible  <bruno@clisp.org>
122048         * m4/isnand.m4 (gl_FUNC_ISNAND_NO_LIBM): Test the GCC >= 4.0 built-in.
122049         * lib/isnand.h (isnand): Use the GCC >= 4.0 built-in.
122051 2008-01-26  Bruno Haible  <bruno@clisp.org>
122053         * m4/isnanf.m4 (gl_HAVE_ISNANF_NO_LIBM, gl_ISNANF_WORKS): Test the
122054         GCC >= 4.0 built-in.
122055         * lib/isnanf.h (isnanf): Use the GCC >= 4.0 built-in.
122057 2008-01-26  Bruno Haible  <bruno@clisp.org>
122059         Rename isnan, applicable to 'double' only, to isnand.
122060         * modules/isnand-nolibm: Renamed from modules/isnan-nolibm.
122061         (Files): Add lib/isnand.h, lib/isnand.c. Remove lib/isnan.h.
122062         (configure.ac): Update.
122063         (Include): Replace "isnan.h" with "isnand.h".
122064         * m4/isnand.m4: Renamed from m4/isnan.m4.
122065         (gl_FUNC_ISNAND_NO_LIBM): Renamed from gl_FUNC_ISNAN_NO_LIBM. Set
122066         HAVE_ISNAND_IN_LIBC instead of HAVE_ISNAN_IN_LIBC. Build isnand.c
122067         instead of isnan.c.
122068         * lib/isnand.h: Renamed from lib/isnan.h. Test HAVE_ISNAND_IN_LIBC
122069         instead of HAVE_ISNAN_IN_LIBC.
122070         (isnand): Renamed from isnan.
122071         * lib/isnand.c: New file.
122072         * modules/isnand-nolibm-tests: Renamed from modules/isnan-nolibm-tests.
122073         (Files): Add tests/test-isnand.c. Remove tests/test-isnan.c.
122074         (Makefile.am): Update.
122075         * tests/test-isnand.c: Renamed from tests/test-isnan.c.
122076         Include isnand.h instead of isnan.h.
122077         (main): Test isnand instead of isnan.
122078         * modules/fprintf-posix (Depends-on): Add isnand-nolibm, remove
122079         isnan-nolibm.
122080         * modules/frexp (Depends-on): Likewise.
122081         * modules/frexp-tests (Depends-on): Likewise.
122082         * modules/frexp-nolibm (Depends-on): Likewise.
122083         * modules/frexp-nolibm-tests (Depends-on): Likewise.
122084         * modules/isfinite (Depends-on): Likewise.
122085         * modules/round-tests (Depends-on): Likewise.
122086         * modules/signbit (Depends-on): Likewise.
122087         * modules/signbit-tests (Depends-on): Likewise.
122088         * modules/snprintf-posix (Depends-on): Likewise.
122089         * modules/sprintf-posix (Depends-on): Likewise.
122090         * modules/trunc-tests (Depends-on): Likewise.
122091         * modules/unistdio/u8-vasnprintf (Depends-on): Likewise.
122092         * modules/unistdio/u8-u8-vasnprintf (Depends-on): Likewise.
122093         * modules/unistdio/u16-vasnprintf (Depends-on): Likewise.
122094         * modules/unistdio/u16-u16-vasnprintf (Depends-on): Likewise.
122095         * modules/unistdio/u32-vasnprintf (Depends-on): Likewise.
122096         * modules/unistdio/u32-u32-vasnprintf (Depends-on): Likewise.
122097         * modules/unistdio/ulc-vasnprintf (Depends-on): Likewise.
122098         * modules/vasnprintf-posix (Depends-on): Likewise.
122099         * modules/vasprintf-posix (Depends-on): Likewise.
122100         * modules/vfprintf-posix (Depends-on): Likewise.
122101         * modules/vsnprintf-posix (Depends-on): Likewise.
122102         * modules/vsprintf-posix (Depends-on): Likewise.
122103         * lib/frexp.c: Include isnand.h instead of isnan.h.
122104         (ISNAN): Set to isnand instead of isnan.
122105         * lib/isfinite.c: Include isnand.h instead of isnan.h.
122106         (gl_isfinited): Use isnand instead of isnan.
122107         * lib/signbitd.c: Include isnand.h instead of isnan.h.
122108         (gl_signbitd): Use isnand instead of isnan.
122109         * lib/vasnprintf.c: Include isnand.h instead of isnan.h.
122110         (is_infinite_or_zero, VASNPRINTF): Use isnand instead of isnan.
122111         * tests/test-frexp.c: Include isnand.h instead of isnan.h.
122112         (main): Use isnand instead of isnan.
122113         * tests/test-round1.c: Include isnand.h.
122114         (main): Use isnand instead of isnan.
122115         * tests/test-round2.c: Include isnand.h instead of isnan.h.
122116         (ISNAN): Set to isnand instead of isnan.
122117         * tests/test-trunc1.c: Include isnand.h.
122118         (main): Use isnand instead of isnan.
122119         * tests/test-trunc2.c: Include isnand.h instead of isnan.h.
122120         (equal): Use isnand instead of isnan.
122121         * MODULES.html.sh (Mathematics <math.h>): Replace isnan-nolibm with
122122         isnand-nolibm.
122123         * NEWS: Mention the change.
122125 2008-01-25  Paul Eggert  <eggert@cs.ucla.edu>
122126             Bruno Haible  <bruno@clisp.org>
122128         * m4/signbit.m4 (gl_SIGNBIT): Require a macro definition. Test whether
122129         the GCC builtins for signbits are present and set
122130         REPLACE_SIGNBIT_USING_GCC if so.
122131         * lib/math.in.h (signbit): Define using GCC builtins if
122132         REPLACE_SIGNBIT_USING_GCC is set.
122133         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize
122134         REPLACE_SIGNBIT_USING_GCC.
122135         * modules/math (Makefile.am): Substitute REPLACE_SIGNBIT_USING_GCC.
122137 2008-01-25  Jim Meyering  <meyering@redhat.com>
122139         Prefer <config.h> over "config.h".  See autoconf doc for explanation.
122140         * lib/poll.c: Include <config.h>, not "config.h".
122141         * tests/test-getaddrinfo.c: Likewise.
122143 2008-01-25  Simon Josefsson  <simon@josefsson.org>
122145         * modules/sockets-tests: New file.
122147 2008-01-24  Simon Josefsson  <simon@josefsson.org>
122149         * modules/sockets: New module, can be used to call WSA_Startup and
122150         WSA_Cleanup when needed.
122152         * lib/sockets.h, lib/sockets.c: New files.
122154         * m4/sockets.m4: New file.
122156         * tests/test-sockets.c: New file.
122158 2008-01-19  Bruno Haible  <bruno@clisp.org>
122160         * doc/posix-headers: Renamed from doc/headers.
122161         * doc/posix-functions: Renamed from doc/functions.
122162         * doc/gnulib.texi: Update.
122164 2008-01-19  Bruno Haible  <bruno@clisp.org>
122166         * doc/glibc-functions/strcasestr.texi: Include contents of
122167         doc/functions/strcasestr.texi, fixing the list of platforms.
122168         * doc/functions/strcasestr.texi: Remove file.
122170 2008-01-19  Bruno Haible  <bruno@clisp.org>
122172         * doc/glibc-functions/memmem.texi: Include contents of
122173         doc/functions/memmem.texi.
122174         * doc/functions/memmem.texi: Remove file.
122176 2008-01-18  Bruno Haible  <bruno@clisp.org>
122178         * doc/glibc-functions/*.texi: New files.
122179         * doc/gnulib.texi (Glibc Function Substitutes): Completely rewritten
122180         to use the new files.
122182 2008-01-17  Bruno Haible  <bruno@clisp.org>
122184         * tests/test-gethostname.c (main): Fix printf statement.
122186 2008-01-17  Simon Josefsson  <simon@josefsson.org>
122188         * modules/gethostname-tests: New file.
122190         * tests/test-gethostname.c: New file.
122192 2008-01-17  Simon Josefsson  <simon@josefsson.org>
122194         * lib/gethostname.c: Include string.h unconditionally, strncpy is
122195         used by the UNAME case.  Reported by Bruno Haible
122196         <bruno@clisp.org>.
122198 2008-01-17  Eric Blake  <ebb9@byu.net>
122200         Convert c-strcasestr to be more efficient.
122201         * modules/c-strcasestr (Files): Use Two-Way, not KMP.
122202         (Depends-on): Add c-strcase, remove malloca, strnlen.
122203         * tests/test-c-strcasestr.c (main): Enhance test.
122204         * lib/c-strcasestr.c (c_strcasestr): Rewrite to new algorithm.
122206 2007-01-16  Paolo Bonzini  <bonzini@gnu.org>
122208         * build-aux/bootstrap (MSGID_BUGS_ADDRESS): New overridable variable.
122209         Use it in creating po/Makevars.
122211 2008-01-15  Simon Josefsson  <simon@josefsson.org>
122213         * lib/gc-libgcrypt.c (gc_init): Disable secure memory by default.
122214         Applications that requires it should initialize libgcrypt
122215         manually.
122217 2008-01-16  Simon Josefsson  <simon@josefsson.org>
122219         * lib/gethostname.c [!HAVE_UNAME]: Need string.h for strcpy.
122221 2008-01-15  Paul Eggert  <eggert@cs.ucla.edu>
122223         Fix problem with getdate on mingw32 reported by Simon Josefsson
122224         in <http://lists.gnu.org/r/bug-gnulib/2008-01/msg00192.html>.
122225         * lib/getdate.y (get_date): Check "HAVE_DECL_TZNAME", not "defined
122226         tzname", when deciding whether to declare tzname.
122227         * lib/strftime.c (tzname): Likewise.
122229 2008-01-15  Bruno Haible  <bruno@clisp.org>
122231         Work around a MacOS X 10.5 bug in frexpl().
122232         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Also check denormalized numbers.
122233         * doc/functions/frexpl.texi: Document the bug.
122234         Reported by Elias Pipping <pipping@gentoo.org>.
122236 2008-01-14  Eric Blake  <ebb9@byu.net>
122238         Touch up previous patch.
122239         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR_SIMPLE): Fix typo.
122240         * doc/functions/strcasestr.texi (strcasestr): Document OpenBSD bug.
122242         Convert strcasestr module to use Two-Way algorithm.
122243         * modules/strcasestr-simple: New module, based on the old
122244         strcasestr, but with Two-Way rather than KMP.
122245         * modules/strcasestr (Depends-on): Change to strcasestr-simple.
122246         * lib/string.in.h (rpl_strcasestr): Declare.
122247         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Check for linear
122248         performance.
122249         * lib/strcasestr.c (strcasestr): Simplify, and avoid malloc.
122250         * modules/string (Makefile.am): Support strcasestr.
122251         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Likewise.
122252         * modules/strcasestr-tests (Depends-on): Check for alarm.
122253         * tests/test-strcasestr.c: Augment test.
122254         * lib/str-two-way.h: Clean up stray macro.
122255         * NEWS: Document new module.
122256         * MODULES.html.sh (string handling): Likewise.
122257         * doc/functions/strcasestr.texi: New file.
122258         * doc/gnulib.texi (Function Substitutes): New node.  Move memmem
122259         here, since it is not a POSIX function.
122261 2008-01-14  Colin Watson  <cjwatson@debian.org>
122262             Bruno Haible  <bruno@clisp.org>
122264         * m4/strsignal.m4 (gl_FUNC_STRSIGNAL): Also check whether strsignal
122265         works fine; if not, set REPLACE_STRSIGNAL.
122266         (gl_PREREQ_STRSIGNAL): Require AC_DECL_SYS_SIGLIST.
122267         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
122268         REPLACE_STRSIGNAL.
122269         * lib/string.in.h (strsignal): Consider REPLACE_STRSIGNAL.
122270         * modules/string (Makefile.am): Substitute REPLACE_STRSIGNAL.
122271         * tests/test-strsignal.c (main): Check out-of-range signal numbers.
122273 2008-01-14  Bruno Haible  <bruno@clisp.org>
122275         * modules/strsignal (Include): Change to <string.h>.
122277 2008-01-14  Colin Watson  <cjwatson@debian.org>
122279         * modules/argp (Notice): Add a notice recommending to change
122280         XGETTEXT_OPTIONS.
122281         (configure.ac): Invoke AM_XGETTEXT_OPTION if it exists.
122283 2008-01-13  Colin Watson  <cjwatson@debian.org>
122285         * modules/strsignal-tests: New file.
122286         * tests/test-strsignal.c: New file.
122288         * lib/strsignal.c: New file, from glibc with modifications.
122289         * lib/siglist.h: New file, from glibc with modifications.
122290         * lib/string.in.h (strsignal): New declaration.
122291         * m4/strsignal.m4: New file.
122292         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
122293         GNULIB_STRSIGNAL and HAVE_DECL_STRSIGNAL.
122294         * modules/strsignal: New file.
122295         * modules/string (Makefile.am): Substitute GNULIB_STRSIGNAL and
122296         HAVE_DECL_STRSIGNAL.
122298 2008-01-13  Bruno Haible  <bruno@clisp.org>
122300         * m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): Check that the
122301         locale encoding is not ASCII. Needed for OpenBSD 4.0.
122302         * m4/locale-tr.m4 (gt_LOCALE_TR_UTF8): Likewise.
122303         * m4/locale-zh.m4 (gt_LOCALE_ZH_CN): Likewise.
122305 2008-01-13  Bruno Haible  <bruno@clisp.org>
122307         * lib/argp-fmtstream.h (__attribute__): Don't redefine if
122308         __STRICT_ANSI__ is set: it's not needed by any version of gcc.
122309         * lib/argp.h (__attribute__): Likewise.
122310         * lib/c-stack.c (__attribute__): Likewise.
122311         * lib/error.h (__attribute__): Likewise.
122312         * lib/fts.c (__attribute__): Likewise.
122313         * lib/openat.h (__attribute__): Likewise.
122314         * lib/stdio.in.h (__attribute__): Likewise.
122315         * lib/string.in.h (__attribute__): Likewise.
122316         * lib/utimens.c (__attribute__): Likewise.
122317         * lib/vasnprintf.h (__attribute__): Likewise.
122318         * lib/xalloc.h (__attribute__): Likewise.
122319         * lib/xprintf.h (__attribute__): Likewise.
122320         * lib/xstrtol.h (__attribute__): Likewise.
122321         * lib/xvasprintf.h (__attribute__): Likewise.
122323 2008-01-12  Bruno Haible  <bruno@clisp.org>
122325         * doc/gnulib.texi (Glibc Header File Substitutes): New chapter.
122326         * doc/glibc-headers/a.out.texi: New file.
122327         * doc/glibc-headers/aliases.texi: New file.
122328         * doc/glibc-headers/alloca.texi: New file.
122329         * doc/glibc-headers/ar.texi: New file.
122330         * doc/glibc-headers/argp.texi: New file.
122331         * doc/glibc-headers/argz.texi: New file.
122332         * doc/glibc-headers/byteswap.texi: New file.
122333         * doc/glibc-headers/crypt.texi: New file.
122334         * doc/glibc-headers/endian.texi: New file.
122335         * doc/glibc-headers/envz.texi: New file.
122336         * doc/glibc-headers/err.texi: New file.
122337         * doc/glibc-headers/error.texi: New file.
122338         * doc/glibc-headers/execinfo.texi: New file.
122339         * doc/glibc-headers/fpu_control.texi: New file.
122340         * doc/glibc-headers/fstab.texi: New file.
122341         * doc/glibc-headers/fts.texi: New file.
122342         * doc/glibc-headers/getopt.texi: New file.
122343         * doc/glibc-headers/ieee754.texi: New file.
122344         * doc/glibc-headers/ifaddrs.texi: New file.
122345         * doc/glibc-headers/libintl.texi: New file.
122346         * doc/glibc-headers/mcheck.texi: New file.
122347         * doc/glibc-headers/mntent.texi: New file.
122348         * doc/glibc-headers/obstack.texi: New file.
122349         * doc/glibc-headers/paths.texi: New file.
122350         * doc/glibc-headers/printf.texi: New file.
122351         * doc/glibc-headers/pty.texi: New file.
122352         * doc/glibc-headers/resolv.texi: New file.
122353         * doc/glibc-headers/shadow.texi: New file.
122354         * doc/glibc-headers/sysexits.texi: New file.
122355         * doc/glibc-headers/ttyent.texi: New file.
122357 2008-01-12  Jim Meyering  <meyering@redhat.com>
122359         announce-gen: emit Gnulib's git-based version string.
122360         * build-aux/announce-gen: Remove option: --gnulib-snapshot-time-stamp=S.
122361         New option --gnulib-version=V, where V is expected to be
122362         the output of running git describe in the gnulib directory.
122363         (get_tool_versions): Request feedback on xdelta.  I suspect it's
122364         not useful, and plan to stop publishing an xdelta file with each
122365         coreutils release.
122367         * build-aux/announce-gen: Also check for lzma-compressed files.
122369 2008-01-11  Bruno Haible  <bruno@clisp.org>
122371         * tests/test-memmem.c (main): Increase maximum allowed time.
122372         * tests/test-strstr.c (main): Likewise.
122374 2008-01-11  Bruno Haible  <bruno@clisp.org>
122376         * doc/functions/memmem.texi: Add more precisions about platforms.
122377         * doc/functions/strstr.texi: Likewise.
122379 2008-01-10  Eric Blake  <ebb9@byu.net>
122381         * m4/strstr.m4: Delete cruft from copy-n-paste.
122382         Reported by Bruno Haible.
122384 2008-01-10  Bruno Haible  <bruno@clisp.org>
122386         Make c-strstr rely on strstr.
122387         * lib/c-strstr.c: Don't include str-kmp.h.
122388         (c_strstr): Define in terms of strstr.
122389         * modules/c-strstr (Files): Remove lib/str-kmp.h.
122390         (Depends-on): Remove stdbool, malloca, strnlen. Add strstr.
122392 2008-01-10  Bruno Haible  <bruno@clisp.org>
122394         * doc/gnulib.texi (String Functions in C Locale): New section.
122395         * doc/c-ctype.texi: New file.
122396         * doc/c-strcase.texi: New file.
122397         * doc/c-strcaseeq.texi: New file.
122398         * doc/c-strcasestr.texi: New file.
122399         * doc/c-strstr.texi: New file.
122400         * doc/c-strtod.texi: New file.
122401         * doc/c-strtold.texi: New file.
122403 2008-01-10  Eric Blake  <ebb9@byu.net>
122405         * lib/relocatable.h: Fix a comment.
122407 2008-01-10  Eric Blake  <ebb9@byu.net>
122409         Share two-way algorithm.
122410         * lib/str-two-way.h: New file, merged from...
122411         * lib/memmem.c: ...here...
122412         * lib/strstr.c: ...and here.
122413         * modules/memmem (Files): Use it.
122414         * modules/strstr (Files): Likewise.
122416         Avoid quadratic strstr implementations.
122417         * lib/strstr.c: New file.
122418         * m4/strstr.m4: Likewise.
122419         * modules/strstr: Likewise.
122420         * modules/strstr-tests: Likewise.
122421         * tests/test-strstr.c: Likewise.
122422         * lib/string.in.h (rpl_strstr): Declare.
122423         (memmem) [GNULIB_POSIXCHECK]: Document speed issue.
122424         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Support strstr.
122425         * modules/string (Makefile.am): Likewise.
122426         * MODULES.html.sh (string handling): Mention new module.
122427         * doc/functions/strstr.texi (strstr): Document the bug.
122429 2008-01-10  Bruno Haible  <bruno@clisp.org>
122431         * lib/relocatable.h (relocate): State whether result is freshly
122432         allocated or not.
122433         * lib/relocatable.c (relocate): Return a freshly allocated string
122434         instead of a pointer to a privately held string.
122435         Reported by Sylvain Beucler <beuc@gnu.org>.
122437 2008-01-10  Colin Watson  <cjwatson@debian.org>
122439         * lib/canonicalize-lgpl.c [!_LIBC]: Fix typo in #if directive:
122440         s/S_ISNLK/S_ISLNK/.
122442 2008-01-09  Bruno Haible  <bruno@clisp.org>
122444         * doc/functions/memmem.texi: Use the same structure as snprintf.texi
122445         and other files.
122446         * m4/memmem.m4 (gl_FUNC_MEMMEM): Say "guessing no" instead of "no"
122447         if it's only a guess.
122448         * modules/memmem: Simplify by depending on memmem-simple.
122450 2008-01-09  Bruno Haible  <bruno@clisp.org>
122452         Work around OpenBSD 4.0 tdelete() bug.
122453         * m4/tsearch.m4 (gl_FUNC_TSEARCH): Also check tdelete's return value.
122454         * lib/search.in.h: If REPLACE_TSEARCH is 1, define tsearch etc. as
122455         macros and don't redefine the enum values.
122456         * m4/search_h.m4 (gl_SEARCH_H_DEFAULTS): Initialize REPLACE_TSEARCH.
122457         * modules/search (Makefile.am): Also substitute REPLACE_TSEARCH.
122458         * doc/functions/tdelete.texi: Document the OpenBSD 4.0 bug.
122460 2008-01-09  Bruno Haible  <bruno@clisp.org>
122462         * tests/test-wcwidth.c: Include <string.h> and localcharset.h.
122463         (main): Don't perform the tests if setlocale did not install a UTF-8
122464         locale. Needed on OpenBSD 4.0.
122465         * modules/wcwidth-tests (Depends-on): Add localcharset.
122467 2008-01-09  Paul Eggert  <eggert@cs.ucla.edu>
122469         gl_FUNC_ALLOCA no longer defines HAVE_ALLOCA_H unconditionally.
122470         See <http://lists.gnu.org/r/bug-gnulib/2007-12/msg00149.html>.
122471         * NEWS: announce this.
122472         * m4/alloca.m4 (gl_FUNC_ALLOCA): Don't define HAVE_ALLOCA_H.
122474 2008-01-09  Simon Josefsson  <simon@josefsson.org>
122475         and Eric Blake  <ebb9@byu.net>
122477         Add memmem-simple module.
122478         * m4/memmem.m4 (gl_FUNC_MEMMEM_SIMPLE): New macro.
122479         (gl_FUNC_MEMMEM): Separate performance from presence checks.
122480         * modules/memmem-simple: New file.
122481         * modules/memmem (Description): Tweak.
122482         * MODULES.html.sh (string handling): Mention new module.
122483         * doc/functions/memmem.texi (memmem): Distinguish which flaws are
122484         addressed by memmem-simple.
122485         * NEWS: Document the difference.
122487 2008-01-09  Eric Blake  <ebb9@byu.net>
122489         Give gcc some memmem optimization hints.
122490         * lib/string.in.h (memmem, memrchr, strchrnul, strnlen, strpbrk)
122491         (strcasestr): Declare as pure.
122492         * modules/memmem (Maintainer): Claim my implementation.
122494 2008-01-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
122496         Support AIX 6.1 and higher.
122497         * build-aux/config.libpath: Likewise.
122498         * build-aux/config.rpath: Likewise.
122500 2008-01-08  Jim Meyering  <meyering@redhat.com>
122501             Bruno Haible  <bruno@clisp.org>
122503         * lib/printf-parse.c (PRINTF_PARSE): Handle a size specifier "q"
122504         on MacOS X and a size specifier "I64" on mingw. Needed for PRIdMAX.
122505         Reported by Peter Fales in
122506         <http://lists.gnu.org/r/bug-coreutils/2007-12/msg00148.html>.
122508 2008-01-08  Bruno Haible  <bruno@clisp.org>
122510         * modules/unictype/category-of (Depends-on): Add
122511         unictype/category-none.
122512         * modules/unictype/category-and-tests (Depends-on): Add
122513         unictype/category-{L,N,Lu,Nd}.
122514         * modules/unictype/category-and-not-tests (Depends-on): Likewise.
122515         * modules/unictype/category-or-tests (Depends-on): Add
122516         unictype/category-{L,N}.
122517         * modules/unictype/category-name-tests (Depends-on): Add
122518         unictype/category-{Z,Nl}.
122519         Reported by Simon Josefsson.
122521 2008-01-08  Bruno Haible  <bruno@clisp.org>
122523         * lib/str-kmp.h (knuth_morris_pratt_unibyte): Document the calling
122524         convention better.
122525         * lib/mbsstr.c (knuth_morris_pratt_multibyte): Likewise.
122526         * lib/mbscasestr.c (knuth_morris_pratt_multibyte): Likewise.
122527         Reported by Peter Miller <millerp@canb.auug.org.au>.
122529 2008-01-08  Eric Blake  <ebb9@byu.net>
122531         Rewrite memmem to guarantee linear complexity without malloc.
122532         * lib/memmem.c (memmem): Use Two-Way rather than
122533         Knuth-Morris-Pratt, to allow O(1) space usage.
122534         (critical_factorization, two_way_short_needle)
122535         (two_way_long_needle): New functions.
122536         (knuth_morris_pratt): Delete.
122537         * modules/memmem (Depends-on): No longer need malloca or stdbool.
122538         Add stdint.
122539         * tests/test-memmem.c (main): Add tests for periodic needle and
122540         sublinear performance.
122541         * doc/functions/memmem.texi (memmem): Document other deficiencies
122542         in cygwin and older glibc.
122544 2008-01-08  Bruno Haible  <bruno@clisp.org>
122546         * modules/memmem-tests (Makefile.am): Remove TESTS_ENVIRONMENT
122547         augmentation.
122549 2008-01-08  Mike Frysinger  <vapier@gentoo.org>
122551         Add a configure time option: --disable-acl.
122552         * m4/acl.m4 (gl_FUNC_ACL): Wrap all ACL logic in a call to
122553         AC_ARG_ENABLE(acl).
122555 2008-01-06  Simon Josefsson  <simon@josefsson.org>
122557         * tests/test-localename.c: Don't include obsolete "setenv.h".
122559         * modules/localename-tests (Depends-on): Need unsetenv.
122561 2008-01-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
122563         * DEPENDENCIES: Require Texinfo version 4.6 or newer.
122565 2008-01-06  Colin Watson  <cjwatson@debian.org>
122567         * users.txt: Add man-db.
122569 2008-01-07  Bruno Haible  <bruno@clisp.org>
122571         * doc/gnulib-intro.texi (Library vs Reusable Code): Restore the
122572         previous section name.
122574 2008-01-07  Bruno Haible  <bruno@clisp.org>
122576         * lib/progname.c (set_program_name): Don't strip off a leading
122577         "lt-" prefix outside a .libs directory.
122578         Suggested by Paul Eggert.
122580 2008-01-01  Sylvain Beucler  <beuc@gnu.org>
122581             Bruno Haible  <bruno@clisp.org>
122583         Improve memory cleanup in 'relocatable' module.
122584         * lib/relocatable.h (compute_curr_prefix): Change return type to
122585         'char *'.
122586         * lib/relocatable.c (compute_curr_prefix): Change return type to
122587         'char *'. Free curr_installdir after use.
122588         (relocate): Free curr_prefix_better after use.
122589         * lib/progreloc.c (prepare_relocate): Free curr_prefix after use.
122591 2008-01-01  Bruno Haible  <bruno@clisp.org>
122593         * tests/test-wcwidth.c (main): Relax test of U+2060. Avoids a test
122594         failure on older glibc systems.
122595         Reported by Peter Fales <psfales@alcatel-lucent.com>.
122597 2008-01-05  Eric Blake  <ebb9@byu.net>
122599         Avoid quadratic system memmem.
122600         * m4/memmem.m4 (gl_FUNC_MEMMEM): Check for quadratic memmem.
122601         Reported by Ralf Wildenhues.
122603         Fix memmem test for mingw.
122604         * modules/memmem-tests (configure.ac): Check for alarm.
122605         * tests/test-memmem.c (main): Avoid alarm on platforms that lack
122606         it.
122607         * doc/functions/memmem.texi: New file.
122608         * doc/gnulib.texi (Function Substitutes): Add memmem.
122609         Reported by Bruno Haible.
122611 2008-01-04  Bruno Haible  <bruno@clisp.org>
122613         * m4/strcase.m4 (gl_FUNC_STRCASECMP, gl_FUNC_STRNCASECMP):
122614         Require gl_HEADER_STRINGS_H_DEFAULTS, not
122615         gl_HEADER_STRING_H_DEFAULTS.
122617 2008-01-04  Eric Blake  <ebb9@byu.net>
122619         Shorten duration of memmem test.
122620         * tests/test-memmem.c (main): Use alarm to declare failure if test
122621         is taking too long.
122622         Reported by Ralf Wildenhues.
122624 2007-12-21  Simon Josefsson  <simon@josefsson.org>
122626         * modules/relocatable-prog-wrapper (Depends-on): Add intprops and
122627         string, needed by strerror.
122629 2008-01-03  Colin Watson  <cjwatson@debian.org>
122630             Bruno Haible  <bruno@clisp.org>
122632         * doc/gnulib-tool.texi (Localization): New section.
122634 2008-01-02  Bruno Haible  <bruno@clisp.org>
122636         * lib/memmem.c (knuth_morris_pratt, memmem): Change all 'char *'
122637         variables to 'unsigned char *' type.
122638         Reported by Paul Eggert.
122640 2008-01-02  Jim Meyering  <jim@meyering.net>
122642         * lib/version-etc.c (COPYRIGHT_YEAR): Increase for new year.
122644 2007-12-31  Jim Meyering  <jim@meyering.net>
122646         Avoid use of private FTS type name.
122647         * lib/fts.c (fts_sort): Use FTSENT rather than "struct _ftsent".
122649 2007-12-30  Karl Berry  <karl@gnu.org>
122651         * doc/gnulib.texi (Library vs. Reusable Code): remove period, to
122652         work around defect in Texinfo and/or the standalone Info browser.
122654 2007-12-30  Bruno Haible  <bruno@clisp.org>
122656         Unify 5 copies of the KMP code.
122657         * lib/str-kmp.h: New file.
122658         * lib/c-strcasestr.c: Include str-kmp.h.
122659         (knuth_morris_pratt): Remove function.
122660         (c_strcasestr): Update.
122661         * lib/c-strstr.c: Include str-kmp.h.
122662         (knuth_morris_pratt): Remove function.
122663         (c_strcasestr): Update.
122664         * lib/mbscasestr.c: Include str-kmp.h.
122665         (knuth_morris_pratt_unibyte): Remove function.
122666         * lib/mbsstr.c: Include str-kmp.h.
122667         (knuth_morris_pratt_unibyte): Remove function.
122668         * lib/strcasestr.c: Include str-kmp.h.
122669         (knuth_morris_pratt): Remove function.
122670         (strcasestr): Update.
122671         * modules/c-strcasestr (Files): Add lib/str-kmp.h.
122672         * modules/c-strstr (Files): Likewise.
122673         * modules/mbscasestr (Files): Likewise.
122674         * modules/mbsstr (Files): Likewise.
122675         * modules/strcasestr (Files): Likewise.
122676         Suggested by Paul Eggert.
122678 2007-12-30  Bruno Haible  <bruno@clisp.org>
122680         * lib/xmalloca.c (xmmalloca): Don't define if HAVE_ALLOCA is not
122681         defined.
122683 2007-12-30  Bruno Haible  <bruno@clisp.org>
122685         * lib/xmalloca.h: Include xalloc.h.
122686         (xnmalloca): New macro.
122688 2007-12-30  Bruno Haible  <bruno@clisp.org>
122690         * lib/malloca.h (nmalloca): New macro.
122691         * lib/c-strcasestr.c (knuth_morris_pratt): Use it.
122692         * lib/c-strstr.c (knuth_morris_pratt): Likewise.
122693         * lib/mbscasestr.c (knuth_morris_pratt_unibyte,
122694         knuth_morris_pratt_multibyte): Likewise.
122695         * lib/mbsstr.c (knuth_morris_pratt_unibyte,
122696         knuth_morris_pratt_multibyte): Likewise.
122697         * lib/memmem.c (knuth_morris_pratt): Likewise.
122698         * lib/strcasestr.c (knuth_morris_pratt): Likewise.
122700 2007-12-25  Bruno Haible  <bruno@clisp.org>
122702         Fixup after 2007-10-17 commit. Ensure that 'glob' stays under LGPLv2+.
122703         * lib/glob.c: Don't include openat.h.
122704         (link_exists2_p): Add back the code that deals with the
122705         !GLOB_ALTDIRFUNC case.
122706         (link_exists_p) [!_LIBC && !HAVE_FSTATAT]: Just call link_exists2_p and
122707         let it do the filename concatenation.
122708         * m4/glob.m4 (gl_PREREQ_GLOB): Add check for fstatat.
122709         * modules/glob (Depends-on): Remove openat.
122711 2007-12-31  Bruno Haible  <bruno@clisp.org>
122713         * modules/dirfd (License): Change to LGPLv2+.
122714         Approved by Jim Meyering.
122716 2007-12-29  Paul Eggert  <eggert@cs.ucla.edu>
122718         * lib/memmem.c (knuth_morris_pratt): Check for size_t overflow
122719         when multiplying M by sizeof (size_t).
122721 2007-12-10  Martin Lambers  <marlam@marlam.de>
122723         Override getpagesize on mingw.
122724         * lib/getpagesize.c: New file.
122725         * m4/getpagesize.m4 (gl_FUNC_GETPAGESIZE): Enable replacement on mingw.
122726         * modules/getpagesize (Files): Add lib/getpagesize.c.
122727         * lib/unistd.in.h (getpagesize): Declare if we are using a replacement.
122728         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize
122729         REPLACE_GETPAGESIZE.
122730         * modules/unistd (Makefile.am): Substitute REPLACE_GETPAGESIZE.
122732 2007-12-25  Bruno Haible  <bruno@clisp.org>
122734         * modules/localcharset (Notice): New field.
122735         (configure.ac): Define LOCALCHARSET_TESTS_ENVIRONMENT.
122736         Suggested by Ben Pfaff <blp@cs.stanford.edu>.
122738 2007-12-25  Paul Eggert  <eggert@cs.ucla.edu>
122739             Bruno Haible  <bruno@clisp.org>
122741         Avoid using the syntax symbol() in formatted documentation.
122742         * MODULES.html.sh (func_module): When replacing symbol() with a
122743         hyperlink, remove the parentheses. Show an error if some remain.
122744         Recognize and render the '...' syntax.
122745         * doc/alloca-opt.texi: Remove parentheses from symbol reference.
122746         Rework. Add paragraph about GCC's inlining.
122747         * doc/alloca.texi: Likewise.
122748         * doc/error.texi: Remove parentheses from symbol reference.
122749         * doc/gnulib-intro.texi: Likewise.
122750         * doc/gnulib.texi (alloca, alloca-opt): New nodes.
122751         * modules/fnmatch (Description): Reword to say "the ... function".
122752         * modules/full-read (Description): Likewise.
122753         * modules/full-write (Description): Likewise.
122754         * modules/safe-read (Description): Likewise.
122755         * modules/safe-write (Description): Likewise.
122756         * modules/strchrnul (Description): Likewise.
122757         * modules/trim (Description): Likewise.
122758         * modules/error (Description): Remove parentheses from symbol
122759         references.
122760         * modules/verror (Description): Likewise.
122761         Reported by Karl Berry.
122763 2007-12-25  Bruno Haible  <bruno@clisp.org>
122765         Fixup after 2007-10-16 commit.
122766         * lib/glob.c (glob_in_dir): Don't use ISO C99 syntax.
122768 2007-12-24  Bruno Haible  <bruno@clisp.org>
122770         Make --enable-relocatable work with DESTDIR.
122771         * build-aux/install-reloc: Accept another argument 'destdir'. Use it
122772         to compute installdir from destprog.
122773         * m4/relocatable.m4 (gl_RELOCATABLE_BODY): In INSTALL_PROGRAM_ENV,
122774         also set the RELOC_DESTDIR variable.
122775         Reported by Левашев Иван <octagram@bluebottle.com>.
122777 2007-12-24  Bruno Haible  <bruno@clisp.org>
122779         Fix link error due to xalloc_die().
122780         * lib/progreloc.c: When NO_XMALLOC is defined, use areadlink instead
122781         of xreadlink.
122782         * lib/relocwrapper.c: Update comments.
122783         * build-aux/install-reloc: Remove xreadlink.c from file list.
122784         * modules/relocatable-prog-wrapper (Files): Remove xreadlink.h and
122785         xreadlink.c.
122786         Reported by Левашев Иван <octagram@bluebottle.com>.
122788 2007-12-24  Bruno Haible  <bruno@clisp.org>
122790         Split setenv module into setenv and unsetenv. Get rid of setenv.h.
122791         * lib/setenv.h: Remove file.
122792         * lib/stdlib.in.h (setenv, unsetenv): New declarations, moved here from
122793         lib/setenv.h.
122794         * modules/setenv (Files): Remove lib/setenv.h, lib/unsetenv.c.
122795         (Depends-on): Add stdlib.
122796         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR. Don't invoke
122797         gl_FUNC_UNSETENV.
122798         (Include): Replace setenv.h with <stdlib.h>.
122799         * modules/unsetenv: New file.
122800         * lib/setenv.c: Include <stdlib.h> first, after alloca.h.
122801         * lib/unsetenv.c: Include <stdlib.h> first.
122802         * m4/setenv.m4 (gl_FUNC_SETENV, gl_FUNC_SETENV_SEPARATE): Require
122803         gl_STDLIB_H_DEFAULTS. Conditionally set HAVE_SETENV to 0.
122804         (gl_FUNC_UNSETENV): Require gl_STDLIB_H_DEFAULTS. Conditionally set
122805         HAVE_UNSETENV to 0. Set VOID_UNSETENV as an AC_SUBSTed variable.
122806         * modules/stdlib (Makefile.am): Substitute also GNULIB_SETENV,
122807         HAVE_SETENV, GNULIB_UNSETENV, HAVE_UNSETENV, VOID_UNSETENV.
122808         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize GNULIB_SETENV,
122809         HAVE_SETENV, GNULIB_UNSETENV, HAVE_UNSETENV, VOID_UNSETENV.
122810         * doc/functions/unsetenv.texi: Update.
122811         * modules/xsetenv (Depends-on): Add unsetenv.
122812         * modules/getdate (Depends-on): Likewise.
122813         * lib/xsetenv.h: Include <stdlib.h> instead of setenv.h.
122814         * lib/xsetenv.c: Don't include setenv.h.
122815         * lib/getdate.y: Likewise.
122816         * lib/relocwrapper.c: Likewise.
122817         * modules/relocatable-prog-wrapper (Files): Remove lib/setenv.h.
122818         (Depends-on): Add stdlib.
122819         * NEWS: Mention the changes.
122820         Reported by Левашев Иван <octagram@bluebottle.com>.
122822 2007-12-23  Bruno Haible  <bruno@clisp.org>
122824         * lib/memmem.c (memmem): Use lowercase variable names. Tab
122825         indentation.
122827 2007-12-23  Bruno Haible  <bruno@clisp.org>
122829         * lib/c-strcasestr.c: Add more comments.
122830         * lib/c-strstr.c: Likewise.
122831         * lib/mbscasestr.c: Likewise.
122832         * lib/mbsstr.c: Likewise.
122833         * lib/strcasestr.c: Likewise.
122834         * lib/memmem.c: Likewise.
122836 2007-12-23  Bruno Haible  <bruno@clisp.org>
122838         * tests/test-memmem.c: Include <string.h> first.
122840 2007-12-22  Bruno Haible  <bruno@clisp.org>
122842         * gnulib-tool (func_create_testdir): Change $auxdir while generating
122843         the contents of $testsbase.
122844         Reported by Ralf Wildenhues.
122846 2007-12-22  Bruno Haible  <bruno@clisp.org>
122848         * gnulib-tool (func_emit_tests_Makefile_am): Replace local_ldadd with
122849         two variables local_ldadd_before, local_ldadd_last.
122851 2007-12-20  Eric Blake  <ebb9@byu.net>
122853         Work around circular library issue when cross-compiling.
122854         * lib/progname.c (set_program_name): Use strncmp, not memcmp, so
122855         that progname.o does not need to pull in rpl_memcmp.
122857 2007-12-19  Eric Blake  <ebb9@byu.net>
122859         Fix memmem to avoid O(n^2) worst-case complexity.
122860         * lib/memmem.c (knuth_morris_pratt): New function.
122861         (memmem): Use it if first few naive iterations fail.
122862         * m4/memmem.m4 (gl_FUNC_MEMMEM): Detect cygwin bug.
122863         * modules/memcmp (License): Set to LGPLv2+, not LGPL.
122864         * modules/memchr (License): Likewise.
122865         * modules/memmem (Depends-on): Add memcmp, memchr, stdbool, and
122866         malloca.
122867         * tests/test-memmem.c: Rewrite, borrowing ideas from
122868         test-mbsstr1.c; the old version wouldn't even compile!
122869         * modules/memmem-tests: New file.
122870         * lib/string.in.h (rpl_memmem): Add declaration.
122871         * modules/string (Makefile.am): Substitute REPLACE_MEMMEM.
122872         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Default for
122873         REPLACE_MEMMEM.
122875 2007-12-18  Paul Eggert  <eggert@cs.ucla.edu>
122877         Fix problem with _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H on VMS.
122878         * lib/stdint.in.h (_GL_JUST_INCLUDE_SYSTEM_INTTYPES_H): Define
122879         before any system include files, and undef after them all.  This
122880         should fix a problem on VMS reported by John E. Malmberg in
122881         <http://lists.gnu.org/r/bug-gnulib/2007-12/msg00118.html>.
122883 2007-12-17  Eric Blake  <ebb9@byu.net>
122885         Revert addition of verify, for BSD/OS.
122886         * lib/fseeko.c [!HAVE_FSEEKO]: Allow off_t > long, even though it
122887         can't handle large files, for the sake of obsolete platforms.
122888         * modules/fseeko (Depends-on): Remove verify.
122889         * doc/functions/fseeko.texi (fseeko): Document BSD/OS limitation.
122890         * doc/functions/ftello.texi (ftello): Likewise.
122891         * doc/functions/fgetpos.texi (fgetpos): Likewise.
122892         Reported by Larry Jones.
122894 2007-12-17  Petr Salinger  <Petr.Salinger@seznam.cz>
122896         getcwd.c: Use a more readable witness: HAVE_OPENAT_SUPPORT
122897         * lib/getcwd.c: Define and use HAVE_OPENAT_SUPPORT, in place of AT_FDCWD.
122899 2007-12-17  Jim Meyering  <meyering@redhat.com>
122901         Port to GNU/kFreeBSD - FreeBSD kernel + GNU libc,
122902         which has no openat syscall, yet <fcntl.h> does define AT_FDCWD.
122903         * lib/getcwd.c: Undef AT_FDCWD if there is no openat function.
122904         * modules/getcwd (Depends-on): Add openat.
122905         Reported by Petr Salinger.
122907 2007-12-17  Bruno Haible  <bruno@clisp.org>
122909         * m4/printf.m4 (gl_PRINTF_INFINITE_LONG_DOUBLE): Use GL_NOCRASH to
122910         avoid a segmentation fault of the configure test on x86_64 systems.
122912 2007-12-15  Jim Meyering  <meyering@redhat.com>
122914         * build-aux/gnupload (GPG): Don't hard-code absolute name of gpg binary.
122916 2007-12-13  Eric Blake  <ebb9@byu.net>
122918         Another fseek test.
122919         * tests/test-fseek.c (main): Also test ungetc handling.
122920         * tests/test-fseeko.c (main): Likewise.
122921         * modules/fseeko (Depends-on): Add verify.
122922         * lib/fseeko.c [!HAVE_FSEEKO]: Verify that off_t is not too
122923         large.
122924         Reported by Larry Jones.
122926         Fix fseeko on mingw.
122927         * lib/fseeko.c (rpl_fseeko) [_IOERR]: Reset EOF flag on successful
122928         seek.
122930         Beef up fseek tests.
122931         * tests/test-fseek.c (main): Also test eof handling.
122932         * tests/test-fseeko.c (main): Likewise.
122933         Reported by Larry Jones.
122935 2007-12-13  Larry Jones  <lawrence.jones@siemens.com>  (tiny change)
122937         Fix fseeko on BSD-based platforms.
122938         * lib/fseeko.c (rpl_fseeko) [__sferror]: Reset EOF flag on
122939         successful seek.
122941 2007-12-12  Eric Blake  <ebb9@byu.net>
122943         Allow circular dependency of separate libtests.a
122944         * gnulib-tool (func_emit_tests_Makefile_am): Add AM_LIBTOOLFLAGS
122945         when use_libtests.
122947 2007-12-11  Eric Blake  <ebb9@byu.net>
122949         Fix bug with -0.0L in previous patch.
122950         * lib/isnan.c (rpl_isnanl): Make robust to -0.0L and pad bits.
122951         * tests/test-isnan.c (main): Also test on zeroes.
122952         * tests/test-isnanf.c (main): Likewise.
122953         * tests/test-isnanl.h (main): Likewise.
122955         Detect pseudo-denormals on x86 even when cross-compiling.
122956         * lib/isnan.c (rpl_isnanl) [!KNOWN_EXPBIT0_LOCATION
122957         && USE_LONG_DOUBLE && x86]: Add one more check to filter out
122958         invalid bit patterns that happen to satisfy ==.
122960         Avoid link failures with separate libtests.a.
122961         * gnulib-tool (func_emit_tests_Makefile_am): Also list local_ldadd
122962         last, to satisfy circular dependencies.
122964 2007-12-11  Eric Blake  <ebb9@byu.net>
122965         and Bruno Haible  <bruno@clisp.org>
122967         Fix OpenBSD 4.0 <float.h> handling of long double.
122968         * m4/float_h.m4 (gl_FLOAT_H): Also claim OpenBSD is broken.
122969         * lib/float.in.h [__OpenBSD__]: Add fixes for OpenBSD.
122970         * doc/headers/float.texi (float.h): Document OpenBSD bug.
122972 2007-12-11  Jim Meyering  <meyering@redhat.com>
122974         * users.txt: Add libvirt.
122976         Support versions of autoconf prior to 2.59c.
122977         * gnulib-tool (func_emit_initmacro_done): Define m4_foreach_w
122978         if it is not already defined.
122980 2007-12-09  Bruno Haible  <bruno@clisp.org>
122982         Let 'gnulib-tool --import' collect sources needed for the tests in
122983         tests/ rather than in lib/.
122984         * gnulib-tool (func_emit_tests_Makefile_am): Accept use_libtests
122985         argument. If true, add rules to generate libtests.a, and put libtests.a
122986         into $(LDADD). Consider source files in subdirectories and set
122987         uses_subdirs.
122988         (func_emit_initmacro_start, func_emit_initmacro_end,
122989         func_emit_initmacro_done): Pass all arguments explicitly.
122990         (func_import): Determine two module lists main_modules,
122991         testsrelated_modules. Determine use_libtests. Determine two variables
122992         sed_transform_main_lib_file, sed_transform_testsrelated_lib_file
122993         instead of just sed_transform_lib_file. Determine two variables
122994         main_files and testsrelated_files. Compute 'files' as the union of
122995         both. Adjust sed_rewrite_old_files, sed_rewrite_new_files,
122996         func_add_or_update. In the generated gnulib-comp.m4, collect the
122997         object files for tests/ in different variables than those for lib/.
122998         Substitute LIBTESTS_LIBDEPS.
122999         (func_create_testdir): Combine the uses_subdirs results from
123000         func_emit_lib_Makefile_am and from func_emit_tests_Makefile_am.
123002 2007-12-09  Bruno Haible  <bruno@clisp.org>
123004         * gnulib-tool (func_emit_tests_Makefile_am): Expand references to
123005         the build-aux directory.
123007 2007-12-09  Bruno Haible  <bruno@clisp.org>
123009         * gnulib-tool (func_emit_tests_Makefile_am): Remove redundant code
123010         introduced on 2006-09-09.
123012 2007-12-07  Jim Meyering  <meyering@redhat.com>
123014         Let these macros work also with autoconf-2.59.
123015         * m4/getline.m4 (gl_FUNC_GETLINE): Require only autoconf-2.59.  2.60
123016         is not needed, since gnulib now permits use of AC_CHECK_DECLS_ONCE.
123017         * m4/getdelim.m4 (gl_FUNC_GETDELIM): Likewise.
123019 2007-12-06  Jim Meyering  <meyering@redhat.com>
123021         Avoid a configure-time syntax error in gl_FUNC_ACL.
123022         * m4/acl.m4 (gl_FUNC_ACL): Be careful to check for the acl_trivial
123023         function in each branch, before testing the cache variable.
123025 2007-12-04  Eric Blake  <ebb9@byu.net>
123027         Make scripts executable.
123028         * build-aux/config.guess: Add execute permissions.
123029         * build-aux/config.sub: Likewise.
123030         * build-aux/gendocs.sh: Likewise.
123032         Fix frexp on mingw.
123033         * m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Detect mingw bug when
123034         cross-compiling.
123035         * doc/functions/frexp.texi (frexp): Document the bug.
123037         Make cygwin fseeko check more reliable.
123038         * m4/stdio_h.m4 (gl_STDIN_LARGE_OFFSET) [__CYGWIN__]: Use cygwin
123039         version numbers, rather than unrelated feature check.
123040         * doc/functions/fseeko.texi (fseeko): Tweak failure report.
123041         * doc/functions/ftello.texi (ftello): Likewise.
123042         Reported by Bruno Haible.
123044         * m4/strerror.m4: Bump version number.
123046 2007-12-03  Bruno Haible  <bruno@clisp.org>
123048         * doc/functions/mprotect.texi: Mention the mingw problem.
123050 2007-12-03  Eric Blake  <ebb9@byu.net>
123052         * m4/strerror.m4 (gl_FUNC_STRERROR_SEPARATE): Ensure
123053         REPLACE_STRERROR is initialized before this macro.
123055 2007-12-03  Paul Eggert  <eggert@cs.ucla.edu>
123057         Add support for Solaris 10 ACLs.  Also, ACLs are Gnulib, not Autoconf.
123058         * modules/acl (configure.ac): Rename AC_FUNC_ACL to gl_FUNC_ACL.
123059         * m4/acl.m4 (gl_FUNC_ACL): Renamed from AC_FUNC_ACL.  On Solaris,
123060         put -lsec in even for programs other than 'ls'.  This fixes a problem
123061         for gettext reported by Bruno Haible in
123062         <http://lists.gnu.org/r/bug-gnulib/2007-12/msg00007.html>.
123063         * lib/acl.c (copy_acl, qset_acl) [USE_ACL && defined ACL_NO_TRIVIAL]:
123064         Add support for Solaris 10.  This isn't efficient, but should get the
123065         job done for now.
123067 2007-12-03  James Youngman  <jay@gnu.org>
123069         * doc/regexprops-generic.texi: change "an close-group" to "a
123070         close-group" and "illegal" to "not allowed".
123072 2007-11-23  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
123074         * lib/unictype/pr_byname.c: Include unictype/pr_byname.h instead of
123075         pr_byname.h. Needed for the rare case when the maintainer has done
123076         "make maintainer-clean" in the source directory and then attempts a
123077         build outside the source directory.
123078         * lib/unictype/scripts.c: Include unictype/scripts_byname.h instead of
123079         scripts_byname.h.
123081 2007-12-02  Martin Lambers  <marlam@marlam.de>
123082             Bruno Haible  <bruno@clisp.org>
123084         * lib/getpagesize.h: Remove file.
123085         * lib/unistd.in.h: Include declaration of getpagesize here.
123086         * m4/getpagesize.m4 (gl_FUNC_GETPAGESIZE): Renamed from gl_GETPAGESIZE.
123087         Invoke gl_UNISTD_H_DEFAULTS. Set HAVE_GETPAGESIZE, HAVE_OS_H,
123088         HAVE_SYS_PARAM_H.
123089         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_GETPAGESIZE,
123090         HAVE_GETPAGESIZE, HAVE_OS_H, HAVE_SYS_PARAM_H.
123091         * modules/getpagesize (Files): Remove lib/getpagesize.h.
123092         (Depends-on): Add unistd.
123093         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
123094         (Include): Use <unistd.h> instead of getpagesize.h.
123095         * modules/unistd (Makefile.am): Substitute also GNULIB_GETPAGESIZE,
123096         HAVE_GETPAGESIZE, HAVE_OS_H, HAVE_SYS_PARAM_H.
123097         * m4/pagealign_alloc.m4 (gl_PREREQ_PAGEALIGN_ALLOC): Remove
123098         gl_GETPAGESIZE invocation, already handled by module dependency.
123099         * lib/pagealign_alloc.c: Don't include getpagesize.h.
123101 2007-12-02  Bruno Haible  <bruno@clisp.org>
123103         * modules/strings-tests: New file.
123104         * tests/test-strings.c: New file.
123106         Move declarations of str{,n}casecmp from <string.h> to <strings.h>.
123107         * lib/strings.in.h: New file.
123108         * lib/string.in.h (strcasecmp, strncasecmp): Remove declarations.
123109         * m4/strings_h.m4: New file.
123110         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Remove initialization
123111         of HAVE_STRCASECMP, HAVE_DECL_STRNCASECMP.
123112         * modules/strings: New file.
123113         * modules/string (Makefile.am): Update.
123114         * modules/strcase (Include): Mention <strings.h>, not <string.h>.
123115         Reported by Karl Berry.
123117 2007-12-01  Eric Blake  <ebb9@byu.net>
123119         * m4/stdio_h.m4 (gl_STDIN_LARGE_OFFSET) [__CYGWIN__]: Rewrite to
123120         accommodate fix in cygwin 1.5.25.
123122 2007-12-01  Jim Meyering  <meyering@redhat.com>
123124         Fix a bug that inhibited much of the utf8-optimization in regcomp.c.
123125         * lib/regcomp.c (optimize_utf8): Fix a typo, s/idx/ctx_type/,
123126         that would inhibit utf8-optimization of a regexp containing line-
123127         or buffer-anchors, e.g., `^', `$'.
123129 2007-11-30  Bruno Haible  <bruno@clisp.org>
123131         * lib/lock.h (gl_recursive_lock_init) [PTHREAD &&
123132         PTHREAD_RECURSIVE_MUTEX_INITIALIZER]: Call
123133         glthread_recursive_lock_init.
123134         * lib/lock.c (glthread_recursive_lock_init)
123135         [PTHREAD_RECURSIVE_MUTEX_INITIALIZER]: New function.
123136         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
123138 2007-11-28  Paul Eggert  <eggert@cs.ucla.edu>
123140         New function qset_acl, like set_acl but with syscall semantics.
123141         * lib/acl.h (qset_acl): New decl.
123142         * lib/acl.c (qset_acl): New function.
123143         (set_acl): Use new function.  Use more-consistent diagnostics.
123145 2007-11-28  Jim Meyering  <meyering@redhat.com>
123147         * modules/physmem (License): Change from GPL to LGPLv2+.
123149 2007-11-26  Bruno Haible  <bruno@clisp.org>
123151         * lib/vasnprintf.c (decode_long_double): Don't abort if the
123152         'long double' type has excess precision.
123153         Reported by Jim Meyering in
123154         <http://lists.gnu.org/r/bug-gnulib/2007-11/msg00120.html>.
123156 2007-11-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
123158         * doc/fdl.texi, doc/gpl-3.0.texi, doc/lgpl-3.0.texi:
123159         Sync from <http://gnu.org/licenses>.
123160         * modules/agpl-3.0, doc/agpl-3.0.texi: New module,
123161         with license text from same location.
123162         * doc/maintain.texi, doc/standards.texi:  Sync from
123163         <http://savannah.gnu.org/projects/gnustandards>.
123165 2007-11-22  Ondřej Vašík  <ovasik@redhat.com>
123166         and Jim Meyering  <meyering@redhat.com>
123168         Adjust getdate' grammar to accept a slightly more regular language.
123169         E.g., accept "YYYYMMDD +N days" as well as "YYYYMMDD N days".
123170         Before, the former was rejected.
123171         * lib/getdate.y (digits_to_date_time): New function, factored
123172         out of ...
123173         (number): ...here.  Just call digits_to_date_time.
123174         (hybrid): New non-terminal to handle an <unsigned number,
123175         signed relative offset> sequence consistently.
123177 2007-11-18  Jim Meyering  <meyering@redhat.com>
123179         Pull my changes from coreutils:
123180         bootstrap: fix typo to enable use of $gnulib_tool_option_extras.
123181         * build-aux/bootstrap (gnulib_tool_options): Add a space before the
123182         use of $gnulib_tool_option_extras, so that it's separated from the
123183         preceding argument.
123185         Fix bootstrap failure to handle files like lib/uniwidth/cjk.h.
123186         * build-aux/bootstrap (cp_mark_as_generated): Create any required
123187         parent destination directories before copying a file into place.
123189 2007-11-18  Sergey Poznyakoff  <gray@gnu.org.ua>
123191         bootstrap: work also with 4-argument variant of AC_INIT
123192         * build-aux/bootstrap (gnulib_extra_files): Adjust sed command.
123194 2007-11-16  Paul Eggert  <eggert@cs.ucla.edu>
123196         Port test-getaddrinfo to Solaris.
123197         Problem reported by Bruno Haible in
123198         <http://lists.gnu.org/r/bug-gnulib/2007-03/msg00171.html>.
123199         * tests/test-getaddrinfo.c (simple): Add a comment asking for an
123200         explanation of setting 'hints'.
123201         Don't reject an implementation merely because it returns EAI_SERVICE.
123202         (EAI_SERVICE): Define to 0 if not defined.
123204 2007-11-15  Paul Eggert  <eggert@cs.ucla.edu>
123206         The license of gnu-make and posix-shell is now "GPLed build tool".
123207         * modules/gnu-make (License): Likewise.
123208         * modules/posix-shell (License): Likewise.
123210         New module posix-shell, for determining a POSIX shell
123211         or perhaps something that is close enough to a POSIX shell.
123212         * m4/posix-shell.m4: New file.
123213         * modules/posix-shell: New file.
123215         * MODULES.html.sh: Mention new module.
123217         New module gnu-make, for determining whether we're using GNU Make.
123218         * m4/gnu-make.m4: New file.
123219         * modules/gnu-make: New file.
123220         * MODULES.html.sh: Mention new module.
123222 2007-11-14  Jim Meyering  <meyering@redhat.com>
123224         Define a sometimes-link-required function using ARGMATCH_DIE_DECL.
123225         * tests/test-argmatch.c (ARGMATCH_DIE_DECL): When defined,
123226         use this macro to create a function _definition_.
123227         Remove useless "#undef ARGMATCH_DIE".
123229 2007-11-14  Bruno Haible  <bruno@clisp.org>
123231         * lib/config.charset: Update for OpenBSD 4.1.
123232         Reported and helped by Ben Pfaff <blp@cs.stanford.edu>.
123234 2007-11-12  Paul Eggert  <eggert@cs.ucla.edu>
123236         Document 64-bit #if problems in stdint.texi.
123237         * doc/headers/stdint.texi (stdint.h): Mention problems with
123238         64-bit-#if, and how to work around them.
123240         Don't insist on 'long long int' support in the preprocessor.  It
123241         breaks too many things.  For example, PRIdMAX still uses a 'long
123242         long int' format with the latest Sun compiler, even though
123243         HAVE_LONG_LONG_INT isn't defined due to that compiler's
123244         preprocessor problem.  This causes the latest coreutils to dump
123245         core on Solaris 10 sparc with the Sun C compiler.
123246         Instead, fix the 2007-10-16 problem in a different way, by evaluating
123247         the troublesome expressions at configure-time, not at #if-time.
123248         * m4/longlong.m4 (_AC_TYPE_LONG_LONG_SNIPPET): Don't test the
123249         preprocessor.
123250         * m4/inttypes.m4 (gl_INTTYPES_H): Move the #if checks into
123251         compile-time C checks, done at 'configure'-time.
123252         (gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION): New macro.
123253         * modules/inttypes (Makefile): Substitute the new symbols that
123254         gl_INTTYPES_H now generates.
123255         * lib/inttypes.in.h: Don't use constants wider than 'long' in #if.
123257 2007-11-12  Bruno Haible  <bruno@clisp.org>
123259         Tests for Unicode character classification functions.
123261         * modules/unictype/bidicategory-byname-tests: New file.
123262         * modules/unictype/bidicategory-name-tests: New file.
123263         * modules/unictype/bidicategory-of-tests: New file.
123264         * modules/unictype/bidicategory-test-tests: New file.
123265         * modules/unictype/block-list-tests: New file.
123266         * modules/unictype/block-of-tests: New file.
123267         * modules/unictype/block-test-tests: New file.
123268         * modules/unictype/category-C-tests: New file.
123269         * modules/unictype/category-Cc-tests: New file.
123270         * modules/unictype/category-Cf-tests: New file.
123271         * modules/unictype/category-Cn-tests: New file.
123272         * modules/unictype/category-Co-tests: New file.
123273         * modules/unictype/category-Cs-tests: New file.
123274         * modules/unictype/category-L-tests: New file.
123275         * modules/unictype/category-Ll-tests: New file.
123276         * modules/unictype/category-Lm-tests: New file.
123277         * modules/unictype/category-Lo-tests: New file.
123278         * modules/unictype/category-Lt-tests: New file.
123279         * modules/unictype/category-Lu-tests: New file.
123280         * modules/unictype/category-M-tests: New file.
123281         * modules/unictype/category-Mc-tests: New file.
123282         * modules/unictype/category-Me-tests: New file.
123283         * modules/unictype/category-Mn-tests: New file.
123284         * modules/unictype/category-N-tests: New file.
123285         * modules/unictype/category-Nd-tests: New file.
123286         * modules/unictype/category-Nl-tests: New file.
123287         * modules/unictype/category-No-tests: New file.
123288         * modules/unictype/category-P-tests: New file.
123289         * modules/unictype/category-Pc-tests: New file.
123290         * modules/unictype/category-Pd-tests: New file.
123291         * modules/unictype/category-Pe-tests: New file.
123292         * modules/unictype/category-Pf-tests: New file.
123293         * modules/unictype/category-Pi-tests: New file.
123294         * modules/unictype/category-Po-tests: New file.
123295         * modules/unictype/category-Ps-tests: New file.
123296         * modules/unictype/category-S-tests: New file.
123297         * modules/unictype/category-Sc-tests: New file.
123298         * modules/unictype/category-Sk-tests: New file.
123299         * modules/unictype/category-Sm-tests: New file.
123300         * modules/unictype/category-So-tests: New file.
123301         * modules/unictype/category-Z-tests: New file.
123302         * modules/unictype/category-Zl-tests: New file.
123303         * modules/unictype/category-Zp-tests: New file.
123304         * modules/unictype/category-Zs-tests: New file.
123305         * modules/unictype/category-and-not-tests: New file.
123306         * modules/unictype/category-and-tests: New file.
123307         * modules/unictype/category-byname-tests: New file.
123308         * modules/unictype/category-name-tests: New file.
123309         * modules/unictype/category-none-tests: New file.
123310         * modules/unictype/category-of-tests: New file.
123311         * modules/unictype/category-or-tests: New file.
123312         * modules/unictype/category-test-withtable-tests: New file.
123313         * modules/unictype/combining-class-tests: New file.
123314         * modules/unictype/ctype-alnum-tests: New file.
123315         * modules/unictype/ctype-alpha-tests: New file.
123316         * modules/unictype/ctype-blank-tests: New file.
123317         * modules/unictype/ctype-cntrl-tests: New file.
123318         * modules/unictype/ctype-digit-tests: New file.
123319         * modules/unictype/ctype-graph-tests: New file.
123320         * modules/unictype/ctype-lower-tests: New file.
123321         * modules/unictype/ctype-print-tests: New file.
123322         * modules/unictype/ctype-punct-tests: New file.
123323         * modules/unictype/ctype-space-tests: New file.
123324         * modules/unictype/ctype-upper-tests: New file.
123325         * modules/unictype/ctype-xdigit-tests: New file.
123326         * modules/unictype/decimal-digit-tests: New file.
123327         * modules/unictype/digit-tests: New file.
123328         * modules/unictype/mirror-tests: New file.
123329         * modules/unictype/numeric-tests: New file.
123330         * modules/unictype/property-alphabetic-tests: New file.
123331         * modules/unictype/property-ascii-hex-digit-tests: New file.
123332         * modules/unictype/property-bidi-arabic-digit-tests: New file.
123333         * modules/unictype/property-bidi-arabic-right-to-left-tests: New file.
123334         * modules/unictype/property-bidi-block-separator-tests: New file.
123335         * modules/unictype/property-bidi-boundary-neutral-tests: New file.
123336         * modules/unictype/property-bidi-common-separator-tests: New file.
123337         * modules/unictype/property-bidi-control-tests: New file.
123338         * modules/unictype/property-bidi-embedding-or-override-tests: New file.
123339         * modules/unictype/property-bidi-eur-num-separator-tests: New file.
123340         * modules/unictype/property-bidi-eur-num-terminator-tests: New file.
123341         * modules/unictype/property-bidi-european-digit-tests: New file.
123342         * modules/unictype/property-bidi-hebrew-right-to-left-tests: New file.
123343         * modules/unictype/property-bidi-left-to-right-tests: New file.
123344         * modules/unictype/property-bidi-non-spacing-mark-tests: New file.
123345         * modules/unictype/property-bidi-other-neutral-tests: New file.
123346         * modules/unictype/property-bidi-pdf-tests: New file.
123347         * modules/unictype/property-bidi-segment-separator-tests: New file.
123348         * modules/unictype/property-bidi-whitespace-tests: New file.
123349         * modules/unictype/property-byname-tests: New file.
123350         * modules/unictype/property-combining-tests: New file.
123351         * modules/unictype/property-composite-tests: New file.
123352         * modules/unictype/property-currency-symbol-tests: New file.
123353         * modules/unictype/property-dash-tests: New file.
123354         * modules/unictype/property-decimal-digit-tests: New file.
123355         * modules/unictype/property-default-ignorable-code-point-tests: New file.
123356         * modules/unictype/property-deprecated-tests: New file.
123357         * modules/unictype/property-diacritic-tests: New file.
123358         * modules/unictype/property-extender-tests: New file.
123359         * modules/unictype/property-format-control-tests: New file.
123360         * modules/unictype/property-grapheme-base-tests: New file.
123361         * modules/unictype/property-grapheme-extend-tests: New file.
123362         * modules/unictype/property-grapheme-link-tests: New file.
123363         * modules/unictype/property-hex-digit-tests: New file.
123364         * modules/unictype/property-hyphen-tests: New file.
123365         * modules/unictype/property-id-continue-tests: New file.
123366         * modules/unictype/property-id-start-tests: New file.
123367         * modules/unictype/property-ideographic-tests: New file.
123368         * modules/unictype/property-ids-binary-operator-tests: New file.
123369         * modules/unictype/property-ids-trinary-operator-tests: New file.
123370         * modules/unictype/property-ignorable-control-tests: New file.
123371         * modules/unictype/property-iso-control-tests: New file.
123372         * modules/unictype/property-join-control-tests: New file.
123373         * modules/unictype/property-left-of-pair-tests: New file.
123374         * modules/unictype/property-line-separator-tests: New file.
123375         * modules/unictype/property-logical-order-exception-tests: New file.
123376         * modules/unictype/property-lowercase-tests: New file.
123377         * modules/unictype/property-math-tests: New file.
123378         * modules/unictype/property-non-break-tests: New file.
123379         * modules/unictype/property-not-a-character-tests: New file.
123380         * modules/unictype/property-numeric-tests: New file.
123381         * modules/unictype/property-other-alphabetic-tests: New file.
123382         * modules/unictype/property-other-default-ignorable-code-point-tests: New file.
123383         * modules/unictype/property-other-grapheme-extend-tests: New file.
123384         * modules/unictype/property-other-id-continue-tests: New file.
123385         * modules/unictype/property-other-id-start-tests: New file.
123386         * modules/unictype/property-other-lowercase-tests: New file.
123387         * modules/unictype/property-other-math-tests: New file.
123388         * modules/unictype/property-other-uppercase-tests: New file.
123389         * modules/unictype/property-paired-punctuation-tests: New file.
123390         * modules/unictype/property-paragraph-separator-tests: New file.
123391         * modules/unictype/property-pattern-syntax-tests: New file.
123392         * modules/unictype/property-pattern-white-space-tests: New file.
123393         * modules/unictype/property-private-use-tests: New file.
123394         * modules/unictype/property-punctuation-tests: New file.
123395         * modules/unictype/property-quotation-mark-tests: New file.
123396         * modules/unictype/property-radical-tests: New file.
123397         * modules/unictype/property-sentence-terminal-tests: New file.
123398         * modules/unictype/property-soft-dotted-tests: New file.
123399         * modules/unictype/property-space-tests: New file.
123400         * modules/unictype/property-terminal-punctuation-tests: New file.
123401         * modules/unictype/property-test-tests: New file.
123402         * modules/unictype/property-titlecase-tests: New file.
123403         * modules/unictype/property-unassigned-code-value-tests: New file.
123404         * modules/unictype/property-unified-ideograph-tests: New file.
123405         * modules/unictype/property-uppercase-tests: New file.
123406         * modules/unictype/property-variation-selector-tests: New file.
123407         * modules/unictype/property-white-space-tests: New file.
123408         * modules/unictype/property-xid-continue-tests: New file.
123409         * modules/unictype/property-xid-start-tests: New file.
123410         * modules/unictype/property-zero-width-tests: New file.
123411         * modules/unictype/scripts-tests: New file.
123412         * modules/unictype/syntax-c-ident-tests: New file.
123413         * modules/unictype/syntax-c-whitespace-tests: New file.
123414         * modules/unictype/syntax-java-ident-tests: New file.
123415         * modules/unictype/syntax-java-whitespace-tests: New file.
123416         * tests/unictype/test-bidi_byname.c: New file.
123417         * tests/unictype/test-bidi_name.c: New file.
123418         * tests/unictype/test-bidi_of.c: New file.
123419         * tests/unictype/test-bidi_test.c: New file.
123420         * tests/unictype/test-block_list.c: New file.
123421         * tests/unictype/test-block_of.c: New file.
123422         * tests/unictype/test-block_test.c: New file.
123423         * tests/unictype/test-categ_and.c: New file.
123424         * tests/unictype/test-categ_and_not.c: New file.
123425         * tests/unictype/test-categ_byname.c: New file.
123426         * tests/unictype/test-categ_name.c: New file.
123427         * tests/unictype/test-categ_none.c: New file.
123428         * tests/unictype/test-categ_of.c: New file.
123429         * tests/unictype/test-categ_or.c: New file.
123430         * tests/unictype/test-categ_test_withtable.c: New file.
123431         * tests/unictype/test-combining.c: New file.
123432         * tests/unictype/test-decdigit.c: New file.
123433         * tests/unictype/test-digit.c: New file.
123434         * tests/unictype/test-mirror.c: New file.
123435         * tests/unictype/test-numeric.c: New file.
123436         * tests/unictype/test-pr_byname.c: New file.
123437         * tests/unictype/test-pr_test.c: New file.
123438         * tests/unictype/test-predicate-part1.h: New file.
123439         * tests/unictype/test-predicate-part2.h: New file.
123440         * tests/unictype/test-scripts.c: New file.
123441         * tests/unictype/test-sy_c_ident.c: New file.
123442         * tests/unictype/test-sy_java_ident.c: New file.
123444         * tests/unictype/test-categ_C.c: New file, generated by gen-ctype.c
123445         for Unicode 5.0.0.
123446         * tests/unictype/test-categ_Cc.c: Likewise.
123447         * tests/unictype/test-categ_Cf.c: Likewise.
123448         * tests/unictype/test-categ_Cn.c: Likewise.
123449         * tests/unictype/test-categ_Co.c: Likewise.
123450         * tests/unictype/test-categ_Cs.c: Likewise.
123451         * tests/unictype/test-categ_L.c: Likewise.
123452         * tests/unictype/test-categ_Ll.c: Likewise.
123453         * tests/unictype/test-categ_Lm.c: Likewise.
123454         * tests/unictype/test-categ_Lo.c: Likewise.
123455         * tests/unictype/test-categ_Lt.c: Likewise.
123456         * tests/unictype/test-categ_Lu.c: Likewise.
123457         * tests/unictype/test-categ_M.c: Likewise.
123458         * tests/unictype/test-categ_Mc.c: Likewise.
123459         * tests/unictype/test-categ_Me.c: Likewise.
123460         * tests/unictype/test-categ_Mn.c: Likewise.
123461         * tests/unictype/test-categ_N.c: Likewise.
123462         * tests/unictype/test-categ_Nd.c: Likewise.
123463         * tests/unictype/test-categ_Nl.c: Likewise.
123464         * tests/unictype/test-categ_No.c: Likewise.
123465         * tests/unictype/test-categ_P.c: Likewise.
123466         * tests/unictype/test-categ_Pc.c: Likewise.
123467         * tests/unictype/test-categ_Pd.c: Likewise.
123468         * tests/unictype/test-categ_Pe.c: Likewise.
123469         * tests/unictype/test-categ_Pf.c: Likewise.
123470         * tests/unictype/test-categ_Pi.c: Likewise.
123471         * tests/unictype/test-categ_Po.c: Likewise.
123472         * tests/unictype/test-categ_Ps.c: Likewise.
123473         * tests/unictype/test-categ_S.c: Likewise.
123474         * tests/unictype/test-categ_Sc.c: Likewise.
123475         * tests/unictype/test-categ_Sk.c: Likewise.
123476         * tests/unictype/test-categ_Sm.c: Likewise.
123477         * tests/unictype/test-categ_So.c: Likewise.
123478         * tests/unictype/test-categ_Z.c: Likewise.
123479         * tests/unictype/test-categ_Zl.c: Likewise.
123480         * tests/unictype/test-categ_Zp.c: Likewise.
123481         * tests/unictype/test-categ_Zs.c: Likewise.
123482         * tests/unictype/test-ctype_alnum.c: Likewise.
123483         * tests/unictype/test-ctype_alpha.c: Likewise.
123484         * tests/unictype/test-ctype_blank.c: Likewise.
123485         * tests/unictype/test-ctype_cntrl.c: Likewise.
123486         * tests/unictype/test-ctype_digit.c: Likewise.
123487         * tests/unictype/test-ctype_graph.c: Likewise.
123488         * tests/unictype/test-ctype_lower.c: Likewise.
123489         * tests/unictype/test-ctype_print.c: Likewise.
123490         * tests/unictype/test-ctype_punct.c: Likewise.
123491         * tests/unictype/test-ctype_space.c: Likewise.
123492         * tests/unictype/test-ctype_upper.c: Likewise.
123493         * tests/unictype/test-ctype_xdigit.c: Likewise.
123494         * tests/unictype/test-decdigit.h: Likewise.
123495         * tests/unictype/test-digit.h: Likewise.
123496         * tests/unictype/test-numeric.h: Likewise.
123497         * tests/unictype/test-pr_alphabetic.c: Likewise.
123498         * tests/unictype/test-pr_ascii_hex_digit.c: Likewise.
123499         * tests/unictype/test-pr_bidi_arabic_digit.c: Likewise.
123500         * tests/unictype/test-pr_bidi_arabic_right_to_left.c: Likewise.
123501         * tests/unictype/test-pr_bidi_block_separator.c: Likewise.
123502         * tests/unictype/test-pr_bidi_boundary_neutral.c: Likewise.
123503         * tests/unictype/test-pr_bidi_common_separator.c: Likewise.
123504         * tests/unictype/test-pr_bidi_control.c: Likewise.
123505         * tests/unictype/test-pr_bidi_embedding_or_override.c: Likewise.
123506         * tests/unictype/test-pr_bidi_eur_num_separator.c: Likewise.
123507         * tests/unictype/test-pr_bidi_eur_num_terminator.c: Likewise.
123508         * tests/unictype/test-pr_bidi_european_digit.c: Likewise.
123509         * tests/unictype/test-pr_bidi_hebrew_right_to_left.c: Likewise.
123510         * tests/unictype/test-pr_bidi_left_to_right.c: Likewise.
123511         * tests/unictype/test-pr_bidi_non_spacing_mark.c: Likewise.
123512         * tests/unictype/test-pr_bidi_other_neutral.c: Likewise.
123513         * tests/unictype/test-pr_bidi_pdf.c: Likewise.
123514         * tests/unictype/test-pr_bidi_segment_separator.c: Likewise.
123515         * tests/unictype/test-pr_bidi_whitespace.c: Likewise.
123516         * tests/unictype/test-pr_combining.c: Likewise.
123517         * tests/unictype/test-pr_composite.c: Likewise.
123518         * tests/unictype/test-pr_currency_symbol.c: Likewise.
123519         * tests/unictype/test-pr_dash.c: Likewise.
123520         * tests/unictype/test-pr_decimal_digit.c: Likewise.
123521         * tests/unictype/test-pr_default_ignorable_code_point.c: Likewise.
123522         * tests/unictype/test-pr_deprecated.c: Likewise.
123523         * tests/unictype/test-pr_diacritic.c: Likewise.
123524         * tests/unictype/test-pr_extender.c: Likewise.
123525         * tests/unictype/test-pr_format_control.c: Likewise.
123526         * tests/unictype/test-pr_grapheme_base.c: Likewise.
123527         * tests/unictype/test-pr_grapheme_extend.c: Likewise.
123528         * tests/unictype/test-pr_grapheme_link.c: Likewise.
123529         * tests/unictype/test-pr_hex_digit.c: Likewise.
123530         * tests/unictype/test-pr_hyphen.c: Likewise.
123531         * tests/unictype/test-pr_id_continue.c: Likewise.
123532         * tests/unictype/test-pr_id_start.c: Likewise.
123533         * tests/unictype/test-pr_ideographic.c: Likewise.
123534         * tests/unictype/test-pr_ids_binary_operator.c: Likewise.
123535         * tests/unictype/test-pr_ids_trinary_operator.c: Likewise.
123536         * tests/unictype/test-pr_ignorable_control.c: Likewise.
123537         * tests/unictype/test-pr_iso_control.c: Likewise.
123538         * tests/unictype/test-pr_join_control.c: Likewise.
123539         * tests/unictype/test-pr_left_of_pair.c: Likewise.
123540         * tests/unictype/test-pr_line_separator.c: Likewise.
123541         * tests/unictype/test-pr_logical_order_exception.c: Likewise.
123542         * tests/unictype/test-pr_lowercase.c: Likewise.
123543         * tests/unictype/test-pr_math.c: Likewise.
123544         * tests/unictype/test-pr_non_break.c: Likewise.
123545         * tests/unictype/test-pr_not_a_character.c: Likewise.
123546         * tests/unictype/test-pr_numeric.c: Likewise.
123547         * tests/unictype/test-pr_other_alphabetic.c: Likewise.
123548         * tests/unictype/test-pr_other_default_ignorable_code_point.c: Likewise.
123549         * tests/unictype/test-pr_other_grapheme_extend.c: Likewise.
123550         * tests/unictype/test-pr_other_id_continue.c: Likewise.
123551         * tests/unictype/test-pr_other_id_start.c: Likewise.
123552         * tests/unictype/test-pr_other_lowercase.c: Likewise.
123553         * tests/unictype/test-pr_other_math.c: Likewise.
123554         * tests/unictype/test-pr_other_uppercase.c: Likewise.
123555         * tests/unictype/test-pr_paired_punctuation.c: Likewise.
123556         * tests/unictype/test-pr_paragraph_separator.c: Likewise.
123557         * tests/unictype/test-pr_pattern_syntax.c: Likewise.
123558         * tests/unictype/test-pr_pattern_white_space.c: Likewise.
123559         * tests/unictype/test-pr_private_use.c: Likewise.
123560         * tests/unictype/test-pr_punctuation.c: Likewise.
123561         * tests/unictype/test-pr_quotation_mark.c: Likewise.
123562         * tests/unictype/test-pr_radical.c: Likewise.
123563         * tests/unictype/test-pr_sentence_terminal.c: Likewise.
123564         * tests/unictype/test-pr_soft_dotted.c: Likewise.
123565         * tests/unictype/test-pr_space.c: Likewise.
123566         * tests/unictype/test-pr_terminal_punctuation.c: Likewise.
123567         * tests/unictype/test-pr_titlecase.c: Likewise.
123568         * tests/unictype/test-pr_unassigned_code_value.c: Likewise.
123569         * tests/unictype/test-pr_unified_ideograph.c: Likewise.
123570         * tests/unictype/test-pr_uppercase.c: Likewise.
123571         * tests/unictype/test-pr_variation_selector.c: Likewise.
123572         * tests/unictype/test-pr_white_space.c: Likewise.
123573         * tests/unictype/test-pr_xid_continue.c: Likewise.
123574         * tests/unictype/test-pr_xid_start.c: Likewise.
123575         * tests/unictype/test-pr_zero_width.c: Likewise.
123576         * tests/unictype/test-sy_c_whitespace.c: Likewise.
123577         * tests/unictype/test-sy_java_whitespace.c: Likewise.
123579 2007-11-12  Bruno Haible  <bruno@clisp.org>
123581         Unicode character classification functions.
123582         * lib/unictype.h: New file.
123583         * modules/unictype/base: New file.
123584         * modules/unictype/category-L: New file.
123585         * modules/unictype/category-Lu: New file.
123586         * modules/unictype/category-Ll: New file.
123587         * modules/unictype/category-Lt: New file.
123588         * modules/unictype/category-Lm: New file.
123589         * modules/unictype/category-Lo: New file.
123590         * modules/unictype/category-M: New file.
123591         * modules/unictype/category-Mn: New file.
123592         * modules/unictype/category-Mc: New file.
123593         * modules/unictype/category-Me: New file.
123594         * modules/unictype/category-N: New file.
123595         * modules/unictype/category-Nd: New file.
123596         * modules/unictype/category-Nl: New file.
123597         * modules/unictype/category-No: New file.
123598         * modules/unictype/category-P: New file.
123599         * modules/unictype/category-Pc: New file.
123600         * modules/unictype/category-Pd: New file.
123601         * modules/unictype/category-Ps: New file.
123602         * modules/unictype/category-Pe: New file.
123603         * modules/unictype/category-Pi: New file.
123604         * modules/unictype/category-Pf: New file.
123605         * modules/unictype/category-Po: New file.
123606         * modules/unictype/category-S: New file.
123607         * modules/unictype/category-Sm: New file.
123608         * modules/unictype/category-Sc: New file.
123609         * modules/unictype/category-Sk: New file.
123610         * modules/unictype/category-So: New file.
123611         * modules/unictype/category-Z: New file.
123612         * modules/unictype/category-Zs: New file.
123613         * modules/unictype/category-Zl: New file.
123614         * modules/unictype/category-Zp: New file.
123615         * modules/unictype/category-C: New file.
123616         * modules/unictype/category-Cc: New file.
123617         * modules/unictype/category-Cf: New file.
123618         * modules/unictype/category-Cs: New file.
123619         * modules/unictype/category-Co: New file.
123620         * modules/unictype/category-Cn: New file.
123621         * modules/unictype/category-or: New file.
123622         * modules/unictype/category-of: New file.
123623         * modules/unictype/category-test: New file.
123624         * modules/unictype/category-test-withtable: New file.
123625         * modules/unictype/category-byname: New file.
123626         * modules/unictype/category-none: New file.
123627         * modules/unictype/category-and: New file.
123628         * modules/unictype/category-and-not: New file.
123629         * modules/unictype/category-name: New file.
123630         * modules/unictype/combining-class: New file.
123631         * modules/unictype/category-all: New file.
123632         * modules/unictype/bidicategory-all: New file.
123633         * modules/unictype/bidicategory-byname: New file.
123634         * modules/unictype/bidicategory-name: New file.
123635         * modules/unictype/bidicategory-of: New file.
123636         * modules/unictype/bidicategory-test: New file.
123637         * modules/unictype/decimal-digit: New file.
123638         * modules/unictype/digit: New file.
123639         * modules/unictype/numeric: New file.
123640         * modules/unictype/mirror: New file.
123641         * modules/unictype/property-white-space: New file.
123642         * modules/unictype/property-alphabetic: New file.
123643         * modules/unictype/property-other-alphabetic: New file.
123644         * modules/unictype/property-not-a-character: New file.
123645         * modules/unictype/property-default-ignorable-code-point: New file.
123646         * modules/unictype/property-other-default-ignorable-code-point: New
123647         file.
123648         * modules/unictype/property-deprecated: New file.
123649         * modules/unictype/property-logical-order-exception: New file.
123650         * modules/unictype/property-variation-selector: New file.
123651         * modules/unictype/property-private-use: New file.
123652         * modules/unictype/property-unassigned-code-value: New file.
123653         * modules/unictype/property-uppercase: New file.
123654         * modules/unictype/property-other-uppercase: New file.
123655         * modules/unictype/property-lowercase: New file.
123656         * modules/unictype/property-other-lowercase: New file.
123657         * modules/unictype/property-titlecase: New file.
123658         * modules/unictype/property-soft-dotted: New file.
123659         * modules/unictype/property-id-start: New file.
123660         * modules/unictype/property-other-id-start: New file.
123661         * modules/unictype/property-id-continue: New file.
123662         * modules/unictype/property-other-id-continue: New file.
123663         * modules/unictype/property-xid-start: New file.
123664         * modules/unictype/property-xid-continue: New file.
123665         * modules/unictype/property-pattern-white-space: New file.
123666         * modules/unictype/property-pattern-syntax: New file.
123667         * modules/unictype/property-join-control: New file.
123668         * modules/unictype/property-grapheme-base: New file.
123669         * modules/unictype/property-grapheme-extend: New file.
123670         * modules/unictype/property-other-grapheme-extend: New file.
123671         * modules/unictype/property-grapheme-link: New file.
123672         * modules/unictype/property-bidi-control: New file.
123673         * modules/unictype/property-bidi-left-to-right: New file.
123674         * modules/unictype/property-bidi-hebrew-right-to-left: New file.
123675         * modules/unictype/property-bidi-arabic-right-to-left: New file.
123676         * modules/unictype/property-bidi-european-digit: New file.
123677         * modules/unictype/property-bidi-eur-num-separator: New file.
123678         * modules/unictype/property-bidi-eur-num-terminator: New file.
123679         * modules/unictype/property-bidi-arabic-digit: New file.
123680         * modules/unictype/property-bidi-common-separator: New file.
123681         * modules/unictype/property-bidi-block-separator: New file.
123682         * modules/unictype/property-bidi-segment-separator: New file.
123683         * modules/unictype/property-bidi-whitespace: New file.
123684         * modules/unictype/property-bidi-non-spacing-mark: New file.
123685         * modules/unictype/property-bidi-boundary-neutral: New file.
123686         * modules/unictype/property-bidi-pdf: New file.
123687         * modules/unictype/property-bidi-embedding-or-override: New file.
123688         * modules/unictype/property-bidi-other-neutral: New file.
123689         * modules/unictype/property-hex-digit: New file.
123690         * modules/unictype/property-ascii-hex-digit: New file.
123691         * modules/unictype/property-ideographic: New file.
123692         * modules/unictype/property-unified-ideograph: New file.
123693         * modules/unictype/property-radical: New file.
123694         * modules/unictype/property-ids-binary-operator: New file.
123695         * modules/unictype/property-ids-trinary-operator: New file.
123696         * modules/unictype/property-zero-width: New file.
123697         * modules/unictype/property-space: New file.
123698         * modules/unictype/property-non-break: New file.
123699         * modules/unictype/property-iso-control: New file.
123700         * modules/unictype/property-format-control: New file.
123701         * modules/unictype/property-dash: New file.
123702         * modules/unictype/property-hyphen: New file.
123703         * modules/unictype/property-punctuation: New file.
123704         * modules/unictype/property-line-separator: New file.
123705         * modules/unictype/property-paragraph-separator: New file.
123706         * modules/unictype/property-quotation-mark: New file.
123707         * modules/unictype/property-sentence-terminal: New file.
123708         * modules/unictype/property-terminal-punctuation: New file.
123709         * modules/unictype/property-currency-symbol: New file.
123710         * modules/unictype/property-math: New file.
123711         * modules/unictype/property-other-math: New file.
123712         * modules/unictype/property-paired-punctuation: New file.
123713         * modules/unictype/property-left-of-pair: New file.
123714         * modules/unictype/property-combining: New file.
123715         * modules/unictype/property-composite: New file.
123716         * modules/unictype/property-decimal-digit: New file.
123717         * modules/unictype/property-numeric: New file.
123718         * modules/unictype/property-diacritic: New file.
123719         * modules/unictype/property-extender: New file.
123720         * modules/unictype/property-ignorable-control: New file.
123721         * modules/unictype/property-test: New file.
123722         * modules/unictype/property-byname: New file.
123723         * modules/unictype/property-all: New file.
123724         * modules/unictype/scripts: New file.
123725         * modules/unictype/scripts-all: New file.
123726         * modules/unictype/block-of: New file.
123727         * modules/unictype/block-test: New file.
123728         * modules/unictype/block-list: New file.
123729         * modules/unictype/block-all: New file.
123730         * modules/unictype/syntax-c-whitespace: New file.
123731         * modules/unictype/syntax-java-whitespace: New file.
123732         * modules/unictype/syntax-c-ident: New file.
123733         * modules/unictype/syntax-java-ident: New file.
123734         * modules/unictype/ctype-alnum: New file.
123735         * modules/unictype/ctype-alpha: New file.
123736         * modules/unictype/ctype-cntrl: New file.
123737         * modules/unictype/ctype-digit: New file.
123738         * modules/unictype/ctype-graph: New file.
123739         * modules/unictype/ctype-lower: New file.
123740         * modules/unictype/ctype-print: New file.
123741         * modules/unictype/ctype-punct: New file.
123742         * modules/unictype/ctype-space: New file.
123743         * modules/unictype/ctype-upper: New file.
123744         * modules/unictype/ctype-xdigit: New file.
123745         * modules/unictype/ctype-blank: New file.
123746         * lib/unictype/bidi_byname.c: New file.
123747         * lib/unictype/bidi_name.c: New file.
123748         * lib/unictype/bidi_of.c: New file.
123749         * lib/unictype/bidi_test.c: New file.
123750         * lib/unictype/bitmap.h: New file.
123751         * lib/unictype/block_test.c: New file.
123752         * lib/unictype/blocks.c: New file.
123753         * lib/unictype/categ_C.c: New file.
123754         * lib/unictype/categ_Cc.c: New file.
123755         * lib/unictype/categ_Cf.c: New file.
123756         * lib/unictype/categ_Cn.c: New file.
123757         * lib/unictype/categ_Co.c: New file.
123758         * lib/unictype/categ_Cs.c: New file.
123759         * lib/unictype/categ_L.c: New file.
123760         * lib/unictype/categ_Ll.c: New file.
123761         * lib/unictype/categ_Lm.c: New file.
123762         * lib/unictype/categ_Lo.c: New file.
123763         * lib/unictype/categ_Lt.c: New file.
123764         * lib/unictype/categ_Lu.c: New file.
123765         * lib/unictype/categ_M.c: New file.
123766         * lib/unictype/categ_Mc.c: New file.
123767         * lib/unictype/categ_Me.c: New file.
123768         * lib/unictype/categ_Mn.c: New file.
123769         * lib/unictype/categ_N.c: New file.
123770         * lib/unictype/categ_Nd.c: New file.
123771         * lib/unictype/categ_Nl.c: New file.
123772         * lib/unictype/categ_No.c: New file.
123773         * lib/unictype/categ_P.c: New file.
123774         * lib/unictype/categ_Pc.c: New file.
123775         * lib/unictype/categ_Pd.c: New file.
123776         * lib/unictype/categ_Pe.c: New file.
123777         * lib/unictype/categ_Pf.c: New file.
123778         * lib/unictype/categ_Pi.c: New file.
123779         * lib/unictype/categ_Po.c: New file.
123780         * lib/unictype/categ_Ps.c: New file.
123781         * lib/unictype/categ_S.c: New file.
123782         * lib/unictype/categ_Sc.c: New file.
123783         * lib/unictype/categ_Sk.c: New file.
123784         * lib/unictype/categ_Sm.c: New file.
123785         * lib/unictype/categ_So.c: New file.
123786         * lib/unictype/categ_Z.c: New file.
123787         * lib/unictype/categ_Zl.c: New file.
123788         * lib/unictype/categ_Zp.c: New file.
123789         * lib/unictype/categ_Zs.c: New file.
123790         * lib/unictype/categ_and.c: New file.
123791         * lib/unictype/categ_and_not.c: New file.
123792         * lib/unictype/categ_byname.c: New file.
123793         * lib/unictype/categ_name.c: New file.
123794         * lib/unictype/categ_none.c: New file.
123795         * lib/unictype/categ_of.c: New file.
123796         * lib/unictype/categ_or.c: New file.
123797         * lib/unictype/categ_test.c: New file.
123798         * lib/unictype/combining.c: New file.
123799         * lib/unictype/ctype_alnum.c: New file.
123800         * lib/unictype/ctype_alpha.c: New file.
123801         * lib/unictype/ctype_blank.c: New file.
123802         * lib/unictype/ctype_cntrl.c: New file.
123803         * lib/unictype/ctype_digit.c: New file.
123804         * lib/unictype/ctype_graph.c: New file.
123805         * lib/unictype/ctype_lower.c: New file.
123806         * lib/unictype/ctype_print.c: New file.
123807         * lib/unictype/ctype_punct.c: New file.
123808         * lib/unictype/ctype_space.c: New file.
123809         * lib/unictype/ctype_upper.c: New file.
123810         * lib/unictype/ctype_xdigit.c: New file.
123811         * lib/unictype/decdigit.c: New file.
123812         * lib/unictype/digit.c: New file.
123813         * lib/unictype/identsyntaxmap.h: New file.
123814         * lib/unictype/mirror.c: New file.
123815         * lib/unictype/numeric.c: New file.
123816         * lib/unictype/pr_alphabetic.c: New file.
123817         * lib/unictype/pr_ascii_hex_digit.c: New file.
123818         * lib/unictype/pr_bidi_arabic_digit.c: New file.
123819         * lib/unictype/pr_bidi_arabic_right_to_left.c: New file.
123820         * lib/unictype/pr_bidi_block_separator.c: New file.
123821         * lib/unictype/pr_bidi_boundary_neutral.c: New file.
123822         * lib/unictype/pr_bidi_common_separator.c: New file.
123823         * lib/unictype/pr_bidi_control.c: New file.
123824         * lib/unictype/pr_bidi_embedding_or_override.c: New file.
123825         * lib/unictype/pr_bidi_eur_num_separator.c: New file.
123826         * lib/unictype/pr_bidi_eur_num_terminator.c: New file.
123827         * lib/unictype/pr_bidi_european_digit.c: New file.
123828         * lib/unictype/pr_bidi_hebrew_right_to_left.c: New file.
123829         * lib/unictype/pr_bidi_left_to_right.c: New file.
123830         * lib/unictype/pr_bidi_non_spacing_mark.c: New file.
123831         * lib/unictype/pr_bidi_other_neutral.c: New file.
123832         * lib/unictype/pr_bidi_pdf.c: New file.
123833         * lib/unictype/pr_bidi_segment_separator.c: New file.
123834         * lib/unictype/pr_bidi_whitespace.c: New file.
123835         * lib/unictype/pr_byname.c: New file.
123836         * lib/unictype/pr_byname.gperf: New file.
123837         * lib/unictype/pr_combining.c: New file.
123838         * lib/unictype/pr_composite.c: New file.
123839         * lib/unictype/pr_currency_symbol.c: New file.
123840         * lib/unictype/pr_dash.c: New file.
123841         * lib/unictype/pr_decimal_digit.c: New file.
123842         * lib/unictype/pr_default_ignorable_code_point.c: New file.
123843         * lib/unictype/pr_deprecated.c: New file.
123844         * lib/unictype/pr_diacritic.c: New file.
123845         * lib/unictype/pr_extender.c: New file.
123846         * lib/unictype/pr_format_control.c: New file.
123847         * lib/unictype/pr_grapheme_base.c: New file.
123848         * lib/unictype/pr_grapheme_extend.c: New file.
123849         * lib/unictype/pr_grapheme_link.c: New file.
123850         * lib/unictype/pr_hex_digit.c: New file.
123851         * lib/unictype/pr_hyphen.c: New file.
123852         * lib/unictype/pr_id_continue.c: New file.
123853         * lib/unictype/pr_id_start.c: New file.
123854         * lib/unictype/pr_ideographic.c: New file.
123855         * lib/unictype/pr_ids_binary_operator.c: New file.
123856         * lib/unictype/pr_ids_trinary_operator.c: New file.
123857         * lib/unictype/pr_ignorable_control.c: New file.
123858         * lib/unictype/pr_iso_control.c: New file.
123859         * lib/unictype/pr_join_control.c: New file.
123860         * lib/unictype/pr_left_of_pair.c: New file.
123861         * lib/unictype/pr_line_separator.c: New file.
123862         * lib/unictype/pr_logical_order_exception.c: New file.
123863         * lib/unictype/pr_lowercase.c: New file.
123864         * lib/unictype/pr_math.c: New file.
123865         * lib/unictype/pr_non_break.c: New file.
123866         * lib/unictype/pr_not_a_character.c: New file.
123867         * lib/unictype/pr_numeric.c: New file.
123868         * lib/unictype/pr_other_alphabetic.c: New file.
123869         * lib/unictype/pr_other_default_ignorable_code_point.c: New file.
123870         * lib/unictype/pr_other_grapheme_extend.c: New file.
123871         * lib/unictype/pr_other_id_continue.c: New file.
123872         * lib/unictype/pr_other_id_start.c: New file.
123873         * lib/unictype/pr_other_lowercase.c: New file.
123874         * lib/unictype/pr_other_math.c: New file.
123875         * lib/unictype/pr_other_uppercase.c: New file.
123876         * lib/unictype/pr_paired_punctuation.c: New file.
123877         * lib/unictype/pr_paragraph_separator.c: New file.
123878         * lib/unictype/pr_pattern_syntax.c: New file.
123879         * lib/unictype/pr_pattern_white_space.c: New file.
123880         * lib/unictype/pr_private_use.c: New file.
123881         * lib/unictype/pr_punctuation.c: New file.
123882         * lib/unictype/pr_quotation_mark.c: New file.
123883         * lib/unictype/pr_radical.c: New file.
123884         * lib/unictype/pr_sentence_terminal.c: New file.
123885         * lib/unictype/pr_soft_dotted.c: New file.
123886         * lib/unictype/pr_space.c: New file.
123887         * lib/unictype/pr_terminal_punctuation.c: New file.
123888         * lib/unictype/pr_test.c: New file.
123889         * lib/unictype/pr_titlecase.c: New file.
123890         * lib/unictype/pr_unassigned_code_value.c: New file.
123891         * lib/unictype/pr_unified_ideograph.c: New file.
123892         * lib/unictype/pr_uppercase.c: New file.
123893         * lib/unictype/pr_variation_selector.c: New file.
123894         * lib/unictype/pr_white_space.c: New file.
123895         * lib/unictype/pr_xid_continue.c: New file.
123896         * lib/unictype/pr_xid_start.c: New file.
123897         * lib/unictype/pr_zero_width.c: New file.
123898         * lib/unictype/scripts.c: New file.
123899         * lib/unictype/sy_c_ident.c: New file.
123900         * lib/unictype/sy_c_whitespace.c: New file.
123901         * lib/unictype/sy_java_ident.c: New file.
123902         * lib/unictype/sy_java_whitespace.c: New file.
123904         * lib/unictype/bidi_of.h: New file, generated by gen-ctype.c for
123905         Unicode 5.0.0.
123906         * lib/unictype/blocks.h: Likewise.
123907         * lib/unictype/categ_C.h: Likewise.
123908         * lib/unictype/categ_Cc.h: Likewise.
123909         * lib/unictype/categ_Cf.h: Likewise.
123910         * lib/unictype/categ_Cn.h: Likewise.
123911         * lib/unictype/categ_Co.h: Likewise.
123912         * lib/unictype/categ_Cs.h: Likewise.
123913         * lib/unictype/categ_L.h: Likewise.
123914         * lib/unictype/categ_Ll.h: Likewise.
123915         * lib/unictype/categ_Lm.h: Likewise.
123916         * lib/unictype/categ_Lo.h: Likewise.
123917         * lib/unictype/categ_Lt.h: Likewise.
123918         * lib/unictype/categ_Lu.h: Likewise.
123919         * lib/unictype/categ_M.h: Likewise.
123920         * lib/unictype/categ_Mc.h: Likewise.
123921         * lib/unictype/categ_Me.h: Likewise.
123922         * lib/unictype/categ_Mn.h: Likewise.
123923         * lib/unictype/categ_N.h: Likewise.
123924         * lib/unictype/categ_Nd.h: Likewise.
123925         * lib/unictype/categ_Nl.h: Likewise.
123926         * lib/unictype/categ_No.h: Likewise.
123927         * lib/unictype/categ_P.h: Likewise.
123928         * lib/unictype/categ_Pc.h: Likewise.
123929         * lib/unictype/categ_Pd.h: Likewise.
123930         * lib/unictype/categ_Pe.h: Likewise.
123931         * lib/unictype/categ_Pf.h: Likewise.
123932         * lib/unictype/categ_Pi.h: Likewise.
123933         * lib/unictype/categ_Po.h: Likewise.
123934         * lib/unictype/categ_Ps.h: Likewise.
123935         * lib/unictype/categ_S.h: Likewise.
123936         * lib/unictype/categ_Sc.h: Likewise.
123937         * lib/unictype/categ_Sk.h: Likewise.
123938         * lib/unictype/categ_Sm.h: Likewise.
123939         * lib/unictype/categ_So.h: Likewise.
123940         * lib/unictype/categ_Z.h: Likewise.
123941         * lib/unictype/categ_Zl.h: Likewise.
123942         * lib/unictype/categ_Zp.h: Likewise.
123943         * lib/unictype/categ_Zs.h: Likewise.
123944         * lib/unictype/categ_of.h: Likewise.
123945         * lib/unictype/combining.h: Likewise.
123946         * lib/unictype/ctype_alnum.h: Likewise.
123947         * lib/unictype/ctype_alpha.h: Likewise.
123948         * lib/unictype/ctype_blank.h: Likewise.
123949         * lib/unictype/ctype_cntrl.h: Likewise.
123950         * lib/unictype/ctype_digit.h: Likewise.
123951         * lib/unictype/ctype_graph.h: Likewise.
123952         * lib/unictype/ctype_lower.h: Likewise.
123953         * lib/unictype/ctype_print.h: Likewise.
123954         * lib/unictype/ctype_punct.h: Likewise.
123955         * lib/unictype/ctype_space.h: Likewise.
123956         * lib/unictype/ctype_upper.h: Likewise.
123957         * lib/unictype/ctype_xdigit.h: Likewise.
123958         * lib/unictype/decdigit.h: Likewise.
123959         * lib/unictype/digit.h: Likewise.
123960         * lib/unictype/mirror.h: Likewise.
123961         * lib/unictype/numeric.h: Likewise.
123962         * lib/unictype/pr_alphabetic.h: Likewise.
123963         * lib/unictype/pr_ascii_hex_digit.h: Likewise.
123964         * lib/unictype/pr_bidi_arabic_digit.h: Likewise.
123965         * lib/unictype/pr_bidi_arabic_right_to_left.h: Likewise.
123966         * lib/unictype/pr_bidi_block_separator.h: Likewise.
123967         * lib/unictype/pr_bidi_boundary_neutral.h: Likewise.
123968         * lib/unictype/pr_bidi_common_separator.h: Likewise.
123969         * lib/unictype/pr_bidi_control.h: Likewise.
123970         * lib/unictype/pr_bidi_embedding_or_override.h: Likewise.
123971         * lib/unictype/pr_bidi_eur_num_separator.h: Likewise.
123972         * lib/unictype/pr_bidi_eur_num_terminator.h: Likewise.
123973         * lib/unictype/pr_bidi_european_digit.h: Likewise.
123974         * lib/unictype/pr_bidi_hebrew_right_to_left.h: Likewise.
123975         * lib/unictype/pr_bidi_left_to_right.h: Likewise.
123976         * lib/unictype/pr_bidi_non_spacing_mark.h: Likewise.
123977         * lib/unictype/pr_bidi_other_neutral.h: Likewise.
123978         * lib/unictype/pr_bidi_pdf.h: Likewise.
123979         * lib/unictype/pr_bidi_segment_separator.h: Likewise.
123980         * lib/unictype/pr_bidi_whitespace.h: Likewise.
123981         * lib/unictype/pr_combining.h: Likewise.
123982         * lib/unictype/pr_composite.h: Likewise.
123983         * lib/unictype/pr_currency_symbol.h: Likewise.
123984         * lib/unictype/pr_dash.h: Likewise.
123985         * lib/unictype/pr_decimal_digit.h: Likewise.
123986         * lib/unictype/pr_default_ignorable_code_point.h: Likewise.
123987         * lib/unictype/pr_deprecated.h: Likewise.
123988         * lib/unictype/pr_diacritic.h: Likewise.
123989         * lib/unictype/pr_extender.h: Likewise.
123990         * lib/unictype/pr_format_control.h: Likewise.
123991         * lib/unictype/pr_grapheme_base.h: Likewise.
123992         * lib/unictype/pr_grapheme_extend.h: Likewise.
123993         * lib/unictype/pr_grapheme_link.h: Likewise.
123994         * lib/unictype/pr_hex_digit.h: Likewise.
123995         * lib/unictype/pr_hyphen.h: Likewise.
123996         * lib/unictype/pr_id_continue.h: Likewise.
123997         * lib/unictype/pr_id_start.h: Likewise.
123998         * lib/unictype/pr_ideographic.h: Likewise.
123999         * lib/unictype/pr_ids_binary_operator.h: Likewise.
124000         * lib/unictype/pr_ids_trinary_operator.h: Likewise.
124001         * lib/unictype/pr_ignorable_control.h: Likewise.
124002         * lib/unictype/pr_iso_control.h: Likewise.
124003         * lib/unictype/pr_join_control.h: Likewise.
124004         * lib/unictype/pr_left_of_pair.h: Likewise.
124005         * lib/unictype/pr_line_separator.h: Likewise.
124006         * lib/unictype/pr_logical_order_exception.h: Likewise.
124007         * lib/unictype/pr_lowercase.h: Likewise.
124008         * lib/unictype/pr_math.h: Likewise.
124009         * lib/unictype/pr_non_break.h: Likewise.
124010         * lib/unictype/pr_not_a_character.h: Likewise.
124011         * lib/unictype/pr_numeric.h: Likewise.
124012         * lib/unictype/pr_other_alphabetic.h: Likewise.
124013         * lib/unictype/pr_other_default_ignorable_code_point.h: Likewise.
124014         * lib/unictype/pr_other_grapheme_extend.h: Likewise.
124015         * lib/unictype/pr_other_id_continue.h: Likewise.
124016         * lib/unictype/pr_other_id_start.h: Likewise.
124017         * lib/unictype/pr_other_lowercase.h: Likewise.
124018         * lib/unictype/pr_other_math.h: Likewise.
124019         * lib/unictype/pr_other_uppercase.h: Likewise.
124020         * lib/unictype/pr_paired_punctuation.h: Likewise.
124021         * lib/unictype/pr_paragraph_separator.h: Likewise.
124022         * lib/unictype/pr_pattern_syntax.h: Likewise.
124023         * lib/unictype/pr_pattern_white_space.h: Likewise.
124024         * lib/unictype/pr_private_use.h: Likewise.
124025         * lib/unictype/pr_punctuation.h: Likewise.
124026         * lib/unictype/pr_quotation_mark.h: Likewise.
124027         * lib/unictype/pr_radical.h: Likewise.
124028         * lib/unictype/pr_sentence_terminal.h: Likewise.
124029         * lib/unictype/pr_soft_dotted.h: Likewise.
124030         * lib/unictype/pr_space.h: Likewise.
124031         * lib/unictype/pr_terminal_punctuation.h: Likewise.
124032         * lib/unictype/pr_titlecase.h: Likewise.
124033         * lib/unictype/pr_unassigned_code_value.h: Likewise.
124034         * lib/unictype/pr_unified_ideograph.h: Likewise.
124035         * lib/unictype/pr_uppercase.h: Likewise.
124036         * lib/unictype/pr_variation_selector.h: Likewise.
124037         * lib/unictype/pr_white_space.h: Likewise.
124038         * lib/unictype/pr_xid_continue.h: Likewise.
124039         * lib/unictype/pr_xid_start.h: Likewise.
124040         * lib/unictype/pr_zero_width.h: Likewise.
124041         * lib/unictype/scripts.h: Likewise.
124042         * lib/unictype/scripts_byname.gperf: Likewise.
124043         * lib/unictype/sy_c_ident.h: Likewise.
124044         * lib/unictype/sy_c_whitespace.h: Likewise.
124045         * lib/unictype/sy_java_ident.h: Likewise.
124046         * lib/unictype/sy_java_whitespace.h: Likewise.
124048         * lib/unictype/Makefile: New file.
124049         * lib/unictype/gen-ctype.c: New file, based on gen-unicode-ctype.c in
124050         glibc.
124051         * lib/unictype/3level.h: New file, copied from glibc.
124052         * lib/unictype/3levelbit.h: New file.
124054 2007-11-11  Bruno Haible  <bruno@clisp.org>
124056         * modules/gperf: New file.
124057         * modules/iconv_open (Depends-on): Add it.
124058         (Makefile.am): Remove the GPERF definition.
124060 2007-11-11  Bruno Haible  <bruno@clisp.org>
124062         * m4/round.m4 (gl_FUNC_ROUND): Test against NetBSD 3.0 bug.
124063         * doc/functions/round.texi: Mention the NetBSD 3.0 bug.
124065 2007-11-11  Bruno Haible  <bruno@clisp.org>
124067         * tests/test-argmatch.c (ARGMATCH_DIE): Undefine.
124068         (usage): Remove function.
124070 2007-11-11  Bruno Haible  <bruno@clisp.org>
124072         * m4/roundf.m4 (gl_FUNC_ROUNDF): Use gl_FUNC_FLOORF_LIBS and
124073         gl_FUNC_CEILF_LIBS.
124074         * m4/round.m4 (gl_FUNC_ROUND): Use gl_FUNC_FLOOR_LIBS and
124075         gl_FUNC_CEIL_LIBS.
124076         * m4/roundl.m4 (gl_FUNC_ROUNDL): Use gl_FUNC_FLOORL_LIBS and
124077         gl_FUNC_CEILL_LIBS.
124078         * modules/roundf (Files): Add m4/floorf.m4, m4/ceilf.m4.
124079         * modules/round (Files): Add m4/floor.m4, m4/ceil.m4.
124080         * modules/roundl (Files): Add m4/floorl.m4, m4/ceill.m4.
124082 2007-11-11  Bruno Haible  <bruno@clisp.org>
124084         * m4/roundf.m4 (gl_FUNC_ROUNDF): Handle the case that floorf and
124085         roundf were declared but do not exist on functions.
124086         * m4/roundl.m4 (gl_FUNC_ROUNDL): Handle the case that floorl and
124087         roundl were declared but do not exist on functions.
124088         * lib/round.c (HAVE_FLOOR_AND_CEIL): Use HAVE_FLOORF_AND_CEILF and
124089         HAVE_FLOORL_AND_CEILL, respectively.
124090         Needed for Sun C on Solaris 10.
124092 2007-11-11  Bruno Haible  <bruno@clisp.org>
124094         * m4/roundf.m4 (gl_FUNC_ROUNDF): Set REPLACE_ROUNDF instead of
124095         HAVE_DECL_ROUNDF. Remove redundant AC_SUBST.
124096         * m4/round.m4 (gl_FUNC_ROUND): Set REPLACE_ROUND instead of
124097         HAVE_DECL_ROUND. Remove redundant AC_SUBST.
124098         * m4/roundl.m4 (gl_FUNC_ROUNDL): Set REPLACE_ROUNDL instead of
124099         HAVE_DECL_ROUNDL. Remove redundant AC_SUBST.
124100         * lib/math.in.h (roundf): Use REPLACE_ROUNDF instead of
124101         HAVE_DECL_ROUNDF.
124102         (round): Use REPLACE_ROUND instead of HAVE_DECL_ROUND.
124103         (roundl): Use REPLACE_ROUNDL instead of HAVE_DECL_ROUNDL.
124104         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_ROUND* instead
124105         of HAVE_DECL_ROUND*.
124106         * modules/math (Makefile.am): Update.
124108 2007-11-10  Bruno Haible  <bruno@clisp.org>
124110         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Use same check for
124111         ptrdiff_t as m4/intl.m4.
124113 2007-11-10  Jim Meyering  <meyering@redhat.com>
124115         Avoid link failure for the argmatch test.
124116         * tests/test-argmatch.c (usage): Define function to avoid a link
124117         failure: argmatch_die requires a usage function.
124119 2007-11-09  Bruno Haible  <bruno@clisp.org>
124121         * doc/functions/snprintf.texi: Mention BeOS deficiency.
124122         * doc/functions/vsnprintf.texi: Likewise.
124123         * lib/vasnprintf.c (VASNPRINTF): Ensure that we never call snprintf
124124         with a size argument < 2.
124126 2007-11-09  Bruno Haible  <bruno@clisp.org>
124128         * lib/vasnprintf.c (VASNPRINTF): Increase reallocation of snprintf
124129         buffer. Fixes an inefficiency introduced on 2007-11-03.
124131 2007-11-09  Bruno Haible  <bruno@clisp.org>
124133         * m4/locale-tr.m4 (gt_LOCALE_TR_UTF8) [BeOS]: Make this test return
124134         none instead of tr_TR. Fixes a failure of test-c-strcasecmp.c.
124136 2007-11-08  Jim Meyering  <meyering@redhat.com>
124138         Change cache variable name prefix "jm_" to "gl_" everywhere.
124139         * m4/d-type.m4, m4/jm-winsz1.m4, m4/jm-winsz2.m4, m4/link-follow.m4:
124140         * m4/putenv.m4, m4/strtoimax.m4, m4/strtoumax.m4, m4/unlink-busy.m4:
124141         * m4/uptime.m4: s/gl_/jm_/
124143 2007-11-07  Bruno Haible  <bruno@clisp.org>
124145         Update to GNU gettext 0.17.
124146         * m4/intl.m4: Update to GNU gettext 0.17.
124147         * m4/po.m4: Likewise.
124148         * modules/gettext (Files): Remove m4/ulonglong.m4.
124149         (configure.ac): Require gettext infrastructure from version 0.17.
124151 2007-11-06  Bruno Haible  <bruno@clisp.org>
124153         * lib/fbufmode.c (fbufmode) [QNX]: Use numerical values for flags; the
124154         symbolic values are not defined in a public header.
124155         * lib/freadable.c (freadable) [QNX]: Likewise.
124156         * lib/freadahead.c (freadahead) [QNX]: Likewise.
124157         * lib/freading.c (freading) [QNX]: Likewise.
124158         * lib/fseterr.c (fseterr) [QNX]: Likewise.
124159         * lib/fwritable.c (fwritable) [QNX]: Likewise.
124160         * lib/fwriting.c (fwriting) [QNX]: Likewise.
124161         * lib/fpurge.c (fpurge) [QNX]: Likewise. Add a return statement.
124162         Reported by Alain Magloire.
124164         * m4/fpending.m4 (gl_FUNC_FPENDING): Add a variant for QNX.
124166 2007-11-05  Bruno Haible  <bruno@clisp.org>
124168         * lib/vasnprintf.c (VASNPRINTF): Expand the NEED_PRINTF_DIRECTIVE_A
124169         code when NEED_PRINTF_LONG_DOUBLE or NEED_PRINTF_DOUBLE is set.
124170         Needed on Cygwin, where !NEED_PRINTF_DIRECTIVE_A && NEED_PRINTF_DOUBLE.
124171         Reported by Eric Blake.
124173 2007-10-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
124174             Bruno Haible  <bruno@clisp.org>
124176         * modules/malloc (configure.ac): Define GNULIB_MALLOC_GNU always.
124177         * modules/realloc (configure.ac): Define GNULIB_REALLOC_GNU always.
124178         * lib/realloc.c (SYSTEM_MALLOC_GLIBC_COMPATIBLE): New macro.
124179         (malloc): Undefine also before including <stdlib.h>.
124180         (rpl_realloc): Turn malloc(0) into malloc(1) if necessary.
124181         Needed on OSF/1 4.0.
124183 2007-11-05  Jim Meyering  <meyering@redhat.com>
124185         git-version-gen: sync from coreutils.
124186         * build-aux/git-version-gen: Add comments.
124187         Change the first '-' to '.' in the snapshot version string,
124188         e.g., 6.9-377-08144 -> 6.9.377-08144
124189         Remove first parameter.
124190         Don't declare a version "-dirty" merely because a time
124191         stamp has changed.
124193 2007-11-04  Bruno Haible  <bruno@clisp.org>
124195         * lib/lock.h: Protect all macro definitions containing an 'if'
124196         statement through a "do { ... } while (0)".
124197         * lib/tls.h: Likewise.
124199 2007-11-04  Bruno Haible  <bruno@clisp.org>
124201         * lib/vasnprintf.c (DCHAR_IS_TCHAR, DCHAR_CPY): Undefine at the end.
124203 2007-11-04  Bruno Haible  <bruno@clisp.org>
124205         * m4/printf.m4 (gl_PRINTF_ENOMEM): Use GL_NOCRASH.
124206         * modules/fprintf-posix (Depends-on): Add nocrash.
124207         * modules/snprintf-posix (Depends-on): Likewise.
124208         * modules/sprintf-posix (Depends-on): Likewise.
124209         * modules/vasnprintf-posix (Depends-on): Likewise.
124210         * modules/vasprintf-posix (Depends-on): Likewise.
124211         * modules/vfprintf-posix (Depends-on): Likewise.
124212         * modules/vsnprintf-posix (Depends-on): Likewise.
124213         * modules/vsprintf-posix (Depends-on): Likewise.
124214         * modules/unistdio/u8-vasnprintf (Depends-on): Likewise.
124215         * modules/unistdio/u8-u8-vasnprintf (Depends-on): Likewise.
124216         * modules/unistdio/u16-vasnprintf (Depends-on): Likewise.
124217         * modules/unistdio/u16-u16-vasnprintf (Depends-on): Likewise.
124218         * modules/unistdio/u32-vasnprintf (Depends-on): Likewise.
124219         * modules/unistdio/u32-u32-vasnprintf (Depends-on): Likewise.
124220         * modules/unistdio/ulc-vasnprintf (Depends-on): Likewise.
124222 2007-11-04  Bruno Haible  <bruno@clisp.org>
124224         * modules/nocrash: New file.
124225         * m4/nocrash.m4: New file, taken from GNU clisp. Code taken from
124226         GNU libsigsegv, with permission of GNU libsigsegv's copyright holders.
124228 2007-11-04  Bruno Haible  <bruno@clisp.org>
124230         * tests/test-vasnprintf-posix.c (test_function): Add some tests of
124231         precision handling.
124232         * tests/test-vasprintf-posix.c (test_function): Likewise.
124233         * tests/test-snprintf-posix.h (test_function): Likewise.
124234         * tests/test-sprintf-posix.h (test_function): Likewise.
124236         Fix *printf behaviour for large precisions on mingw and BeOS.
124237         * m4/printf.m4 (gl_PRINTF_PRECISION): New macro.
124238         * lib/vasnprintf.c (VASNPRINTF): Handle NEED_PRINTF_UNBOUNDED_PRECISION.
124239         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_PRECISION): New macro.
124240         (gl_PREREQ_VASNPRINTF_WITH_EXTRAS): Invoke it.
124241         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
124242         gl_PRINTF_PRECISION and test its result. Invoke
124243         gl_PREREQ_VASNPRINTF_PRECISION.
124244         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
124245         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
124246         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
124247         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
124248         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
124249         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
124250         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
124251         * doc/functions/fprintf.texi: Update.
124252         * doc/functions/printf.texi: Update.
124253         * doc/functions/snprintf.texi: Update.
124254         * doc/functions/sprintf.texi: Update.
124255         * doc/functions/vfprintf.texi: Update.
124256         * doc/functions/vprintf.texi: Update.
124257         * doc/functions/vsnprintf.texi: Update.
124258         * doc/functions/vsprintf.texi: Update.
124260 2007-11-04  Bruno Haible  <bruno@clisp.org>
124262         * lib/vasnprintf.c (scale10_round_decimal_decoded): Fix shift loop.
124264 2007-11-04  Bruno Haible  <bruno@clisp.org>
124266         * modules/relocatable-prog (Files): Add m4/lib-ld.m4.
124267         Reported by Sylvain Beucler <beuc@gnu.org>.
124269 2007-11-03  Bruno Haible  <bruno@clisp.org>
124271         * tests/test-fprintf-posix2.sh: New file.
124272         * tests/test-fprintf-posix2.c: New file.
124273         * modules/fprintf-posix-tests (Files): Add them.
124274         (TESTS): Add test-fprintf-posix2.sh.
124275         (configure.ac): Check for getrlimit and setrlimit.
124276         (check_PROGRAMS): Add test-fprintf-posix2.
124278         * tests/test-printf-posix2.sh: New file.
124279         * tests/test-printf-posix2.c: New file.
124280         * modules/printf-posix-tests (Files): Add them.
124281         (TESTS): Add test-printf-posix2.sh.
124282         (configure.ac): Check for getrlimit and setrlimit.
124283         (check_PROGRAMS): Add test-printf-posix2.
124285         Fix *printf behaviour in out-of-memory situations on MacOS X and *BSD.
124286         * m4/printf.m4 (gl_PRINTF_ENOMEM): New macro.
124287         * lib/vasnprintf.c: Implement NEED_PRINTF_DOUBLE.
124288         (decode_double): New function, copied from decode_long_double.
124289         (scale10_round_decimal_decoded): New function, extracted from
124290         scale10_round_decimal_long_double.
124291         (scale10_round_decimal_long_double): Use it.
124292         (scale10_round_decimal_double): New function.
124293         (floorlog10): New function.
124294         (VASNPRINTF): Handle NEED_PRINTF_DOUBLE case.
124295         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_ENOMEM): New macro.
124296         (gl_PREREQ_VASNPRINTF_WITH_EXTRAS): Invoke it.
124297         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
124298         gl_PRINTF_ENOMEM and test its result. Invoke
124299         gl_PREREQ_VASNPRINTF_ENOMEM.
124300         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
124301         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
124302         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
124303         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
124304         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
124305         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
124306         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
124307         * modules/fprintf-posix (Depends-on): Add frexp-nolibm.
124308         * modules/snprintf-posix (Depends-on): Likewise.
124309         * modules/sprintf-posix (Depends-on): Likewise.
124310         * modules/vasnprintf-posix (Depends-on): Likewise.
124311         * modules/vasprintf-posix (Depends-on): Likewise.
124312         * modules/vfprintf-posix (Depends-on): Likewise.
124313         * modules/vsnprintf-posix (Depends-on): Likewise.
124314         * modules/vsprintf-posix (Depends-on): Likewise.
124315         * doc/functions/fprintf.texi: Update.
124316         * doc/functions/printf.texi: Update.
124317         * doc/functions/snprintf.texi: Update.
124318         * doc/functions/sprintf.texi: Update.
124319         * doc/functions/vfprintf.texi: Update.
124320         * doc/functions/vprintf.texi: Update.
124321         * doc/functions/vsnprintf.texi: Update.
124322         * doc/functions/vsprintf.texi: Update.
124324 2007-11-03  Bruno Haible  <bruno@clisp.org>
124326         * modules/frexp-nolibm-tests: New file.
124328         * modules/frexp-nolibm: New file.
124329         * m4/frexp.m4 (gl_FUNC_FREXP_NO_LIBM): New macro.
124331 2007-11-03  Bruno Haible  <bruno@clisp.org>
124333         * lib/vasnprintf.c (VASNPRINTF): Don't assume that snprintf's return
124334         value is C99 compliant.
124335         Needed for OSF/1 5.1.
124337 2007-11-03  Bruno Haible  <bruno@clisp.org>
124339         Fix out-of-memory handling of vasnprintf.
124340         * lib/printf-parse.c: Include <errno.h>.
124341         (PRINTF_PARSE): When failing, set errno to EINVAL or ENOMEM.
124342         * lib/vasnprintf.c (VASNPRINTF): When PRINTF_PARSE fails, assume errno
124343         is already set.
124345 2007-11-02  Eric Blake  <ebb9@byu.net>
124347         Fix tests on cygwin.
124348         * modules/xprintf-posix-tests (Makefile.am): Link against -lintl.
124350 2007-11-01  Bruno Haible  <bruno@clisp.org>
124352         * lib/stdlib.in.h (putenv): Remove the "not POSIX compliant everywhere"
124353         warning.
124354         * doc/functions/putenv.texi: Clarify that the 'putenv' module is not
124355         needed for POSIX compatibility.
124357 2007-11-01  Paul Eggert  <eggert@cs.ucla.edu>
124359         * m4/putenv.m4 (gl_FUNC_PUTENV): Also mention that we're checking
124360         for compatibility with GNU.
124362 2007-11-01  Bruno Haible  <bruno@clisp.org>
124364         * lib/putenv.c: Include <stdlib.h>. Remove rpl_putenv declaration.
124365         (putenv): Renamed from rpl_putenv. Change argument type from
124366         'const char *' to 'char *'.
124367         * m4/putenv.m4 (gl_FUNC_PUTENV): Require gl_STDLIB_H_DEFAULTS. Instead
124368         of defining putenv in config.h, just set REPLACE_PUTENV.
124369         * modules/putenv (Depends-on): Add stdlib.
124370         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
124371         (Include): Use <stdlib.h>.
124372         * lib/stdlib.in.h (putenv): New declaration.
124373         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize GNULIB_PUTENV and
124374         REPLACE_PUTENV.
124375         * modules/stdlib (Makefile.am): Substitute GNULIB_PUTENV and
124376         REPLACE_PUTENV.
124377         Needed for MacOS X 10.5.0.
124378         Reported by Peter O'Gorman <peter@pogma.com>.
124380 2007-11-01  Jim Meyering  <meyering@redhat.com>
124382         Treat an empty date string exactly like "0".
124383         * lib/getdate.y (get_date): Once any isspace or TZ= prefix is consumed,
124384         if the remaining date string (to be parsed) is empty, use "0".
124385         Reported by Mischa Molhoek and discussed in this thread:
124386         <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/11726>.
124388 2007-10-31  Bruno Haible  <bruno@clisp.org>
124390         * m4/intmax_t.m4 (gl_AC_TYPE_INTMAX_T, gt_AC_TYPE_INTMAX_T): Use
124391         AC_TYPE_LONG_LONG_INT instead of gl_AC_TYPE_LONG_LONG.
124392         * m4/uintmax_t.m4 (gl_AC_TYPE_UINTMAX_T): Use
124393         AC_TYPE_UNSIGNED_LONG_LONG_INT instead of gl_AC_TYPE_UNSIGNED_LONG_LONG.
124394         * m4/longlong.m4 (gl_AC_TYPE_LONG_LONG): Remove macro.
124395         * m4/ulonglong.m4 (gl_AC_TYPE_UNSIGNED_LONG_LONG): Remove macro.
124397 2007-10-31  Bruno Haible  <bruno@clisp.org>
124399         * m4/longlong.m4 (_AC_TYPE_LONG_LONG_SNIPPET): New macro, extracted
124400         from AC_TYPE_LONG_LONG_INT and AC_TYPE_UNSIGNED_LONG_LONG_INT.
124401         (AC_TYPE_LONG_LONG_INT): Use it.
124402         (AC_TYPE_UNSIGNED_LONG_LONG_INT): Moved here from m4/ulonglong.m4. Use
124403         it as well.
124404         * m4/ulonglong.m4 (AC_TYPE_UNSIGNED_LONG_LONG_INT): Remove macro; moved
124405         to m4/longlong.m4.
124406         * modules/stdint (Files): Remove m4/ulonglong.m4.
124407         * modules/strtoull (Files): Use m4/longlong.m4 instead of
124408         m4/ulonglong.m4.
124409         * modules/strtoumax (Files): Likewise.
124411 2007-10-30  Bruno Haible  <bruno@clisp.org>
124413         * modules/xvasprintf-posix: New file.
124414         Suggested by Eric Blake.
124416 2007-10-30  Bruno Haible  <bruno@clisp.org>
124418         * modules/xprintf-posix-tests: New file.
124419         * tests/test-xprintf-posix.sh: New file.
124420         * tests/test-xprintf-posix.c: New file.
124421         * tests/test-xfprintf-posix.c: New file.
124423         * modules/xprintf-posix: New file.
124425 2007-10-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
124427         * modules/fbufmode-tests (MOSTLYCLEANFILES): Remove temp files.
124428         * modules/freadable-tests (MOSTLYCLEANFILES): Likewise.
124429         * modules/fwritable-tests (MOSTLYCLEANFILES): Likewise.
124431 2007-10-29  Bruno Haible  <bruno@clisp.org>
124433         * m4/floorf.m4 (gl_FUNC_FLOORF_LIBS): Rename the cache variable to
124434         contain the special marker '_cv_'.
124435         * m4/floor.m4 (gl_FUNC_FLOOR_LIBS): Likewise.
124436         * m4/floorl.m4 (gl_FUNC_FLOORL_LIBS): Likewise.
124437         * m4/ceilf.m4 (gl_FUNC_CEILF_LIBS): Likewise.
124438         * m4/ceil.m4 (gl_FUNC_CEIL_LIBS): Likewise.
124439         * m4/ceill.m4 (gl_FUNC_CEILL_LIBS): Likewise.
124440         Reported by Ralf Wildenhues.
124442 2007-10-29  Bruno Haible  <bruno@clisp.org>
124444         * gnulib-tool (func_import): When --lgpl is not specified, set
124445         sed_transform_lib_file to convert LGPL and GPLv2+ copyright headers to
124446         GPLv3.
124447         Reported by Simon Josefsson.
124449 2007-10-28  Bruno Haible  <bruno@clisp.org>
124451         * lib/math.in.h: Test REPLACE_ISFINITE instead of HAVE_DECL_ISFINITE.
124452         * m4/isfinite.m4 (gl_ISFINITE): Initialize REPLACE_ISFINITE instead of
124453         HAVE_DECL_ISFINITE.
124454         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Update.
124455         * modules/math (Makefile.am): Substitute REPLACE_ISFINITE instead of
124456         HAVE_DECL_ISFINITE.
124458 2007-10-28  Bruno Haible  <bruno@clisp.org>
124460         * lib/stdint.in.h (_STDINT_MAX): Subtract 1 from an unused signed
124461         integer shift in the signed case. Fixes warnings with OSF/1 5.1 cc.
124463 2007-10-28  Bruno Haible  <bruno@clisp.org>
124465         Fix link errors with Sun C 5.0 on Solaris 10.
124466         * m4/floorf.m4 (gl_FUNC_FLOORF): Consider also the case that the
124467         function is declared but not present in the compiler's libm.
124468         * m4/floorl.m4 (gl_FUNC_FLOORL): Likewise.
124469         * m4/ceilf.m4 (gl_FUNC_CEILF): Likewise.
124470         * m4/ceill.m4 (gl_FUNC_CEILL: Likewise.
124471         * lib/math.in.h: Test REPLACE_CEILF instead of HAVE_DECL_CEILF.
124472         Test REPLACE_CEILL instead of HAVE_DECL_CEILL.
124473         Test REPLACE_FLOORF instead of HAVE_DECL_FLOORF.
124474         Test REPLACE_FLOORL instead of HAVE_DECL_FLOORL.
124475         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Update.
124476         * modules/math (Makefile.am): Substitute REPLACE_CEILF instead of
124477         HAVE_DECL_CEILF, REPLACE_CEILL instead of HAVE_DECL_CEILL,
124478         REPLACE_FLOORF instead of HAVE_DECL_FLOORF, REPLACE_FLOORL instead of
124479         HAVE_DECL_FLOORL.
124481 2007-10-28  Bruno Haible  <bruno@clisp.org>
124483         * m4/floorl.m4 (gl_FUNC_FLOORL_LIBS): New macro, extracted from
124484         gl_FUNC_FLOORL. Cache the result.
124485         (gl_FUNC_FLOORL): Use it.
124486         * m4/ceill.m4 (gl_FUNC_CEILL_LIBS): New macro, extracted from
124487         gl_FUNC_CEILL. Cache the result.
124488         (gl_FUNC_CEILL): Use it.
124490         * m4/floor.m4 (gl_FUNC_FLOOR_LIBS): New macro, extracted from
124491         gl_FUNC_FLOOR. Cache the result.
124492         (gl_FUNC_FLOOR): Use it.
124493         * m4/ceil.m4 (gl_FUNC_CEIL_LIBS): New macro, extracted from
124494         gl_FUNC_CEIL. Cache the result.
124495         (gl_FUNC_CEIL): Use it.
124497         * m4/floorf.m4 (gl_FUNC_FLOORF_LIBS): New macro, extracted from
124498         gl_FUNC_FLOORF. Cache the result.
124499         (gl_FUNC_FLOORF): Use it.
124500         * m4/ceilf.m4 (gl_FUNC_CEILF_LIBS): New macro, extracted from
124501         gl_FUNC_CEILF. Cache the result.
124502         (gl_FUNC_CEILF): Use it.
124504 2007-10-28  Bruno Haible  <bruno@clisp.org>
124506         * gnulib-tool: Allow specifying the LGPL version number through
124507         --lgpl=2 or --lgpl=3.
124508         (func_usage): Document --lgpl with argument.
124509         Handle --lgpl=... arguments.
124510         (func_import): Recognize also gl_LGPL calls with an argument. When
124511         --lgpl=2 is used and the module's license is just LGPL, report an
124512         error. Set sed_transform_lib_file according to the lgpl variable. In
124513         the generated files, use --lgpl or gl_LGPL invocations with argument,
124514         if necessary.
124515         * doc/gnulib-intro.texi (Copyright): Explain how to get modules under
124516         an LGPv2+ license.
124517         * doc/gnulib-tool.texi (Modified imports): Update explanation of
124518         gl_LGPL macro.
124520 2007-10-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
124521             Bruno Haible  <bruno@clisp.org>
124523         * lib/unistr.h (u8_uctomb_aux): Declare also if !HAVE_INLINE.
124524         (u16_uctomb_aux): Likewise.
124525         * lib/unistr/u8-uctomb-aux.c (u8_uctomb_aux): Define also if
124526         !HAVE_INLINE.
124527         * lib/unistr/u16-uctomb-aux.c (u16_uctomb_aux): Likewise
124529 2007-10-28  Bruno Haible  <bruno@clisp.org>
124531         * modules/error: Add a notice recommending to change XGETTEXT_OPTIONS.
124532         Invoke AM_GETTEXT_OPTION if it exists.
124533         * modules/vasprintf: Likewise.
124534         * modules/verror: Likewise.
124535         * modules/xprintf: Likewise.
124536         * modules/xvasprintf: Likewise.
124538 2007-10-27  Ben Pfaff  <blp@gnu.org>
124540         * lib/math.in.h: Define isfinite macro and prototypes for
124541         gl_isfinitef, gl_isfinited, gl_isfinitel if we are providing
124542         implementations.
124543         * m4/math_h.m4: New substitutions for isfinite module.
124544         * lib/isfinite.c: New file.
124545         * m4/isfinite.m4: New file.
124546         * modules/math: Replace isfinite-related @VARS@ in math.in.h.
124547         * modules/isfinite: New file.
124548         * modules/isfinite-tests: New file.
124549         * tests/tests-isfinite.c: New file.
124550         * doc/functions/isfinite.texi: Mention isfinite module.
124551         * MODULES.html.sh: Mention new module.
124553 2007-10-27  Ben Pfaff  <blp@gnu.org>
124555         Ralf Wildenhues reported that Tru64 4.0D declares the round
124556         functions but does not have definitions.
124557         * m4/check-math-lib.m4 (gl_CHECK_MATH_LIB): If the target function
124558         cannot be found in any library, set the output variable to
124559         "missing" instead of "".
124560         * m4/round.m4: Also use our substitute if we cannot find round in
124561         any library, even if it is declared.
124562         * m4/roundf.m4: Likewise for roundf.
124563         * m4/roundl.m4: Likewise for roundl.
124564         * lib/math.in.h: Undefine roundf, round, roundl before defining
124565         their replacements, to allow for hypothetical systems where these
124566         may be defined as macros but not available in libraries.
124568 2007-10-27  Bruno Haible  <bruno@clisp.org>
124570         * doc/gnulib.texi: Invoke @firstparagraphindent.
124571         * doc/gnulib-tool.texi (Simple update): Mention possible incompatible
124572         changes in gnulib.
124573         (Source changes): New section.
124575 2007-10-26  Bruno Haible  <bruno@clisp.org>
124577         * m4/gnulib-common.m4 (AC_C_RESTRICT): New overriding definition,
124578         borrowed from autoconf.
124580 2007-10-26  Bruno Haible  <bruno@clisp.org>
124582         * lib/strerror.c (rpl_strerror): Return "Unknown error ..." also if
124583         strerror returned the empty string. Needed on HP-UX 11.00.
124585 2007-10-24  Micah Cowan  <micah@cowan.name>
124587         Remove vestiges of cvs-gnulib-checkout process.  Now we use git.
124588         * build-aux/bootstrap: Remove support for now-unnecessary option,
124589         --cvs-user, and envvars CVS_USER, CVS_RSH.
124591 2007-10-24  Jim Meyering  <meyering@redhat.com>
124593         Avoid diagnostics from sha1sum when there is no cached checksum.
124594         * build-aux/bootstrap (update_po_files): Skip the sha1sum check
124595         if the po.s1 file hasn't been created yet.
124597         * build-aux/bootstrap: Sync from coreutils:
124598         2007-10-24  Jim Meyering  <meyering@redhat.com>
124599         Get gnulib from the git repository, not from an obsolete cvs one.
124600         * build-aux/bootstrap: Suggestion from Micah Cowan.
124601         2007-10-04  Jim Meyering  <jim@meyering.net>
124602         * build-aux/bootstrap (slurp): Adapt to _.h -> .in.h name change.
124603         (update_po_files): Work also when there are no .po files in po/.
124605 2007-10-24  Paul Eggert  <eggert@cs.ucla.edu>
124607         * README: Append ".git" to git and cg examples.
124608         Problem reported by Benoit Sigoure.
124610 2007-10-23  Micah Cowan  <micah@cowan.name>
124612         * users.txt: Add wget.
124614 2007-10-23  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
124616         Fix linking of some unistdio tests on FreeBSD.
124617         * modules/unistdio/u16-vsnprintf-tests
124618         (test_u16_vsprintf1_LDADD): Add @LIBINTL@.
124619         * modules/unistdio/u16-vsprintf-tests
124620         (test_u16_vsnprintf1_LDADD): Likewise.
124621         * modules/unistdio/u32-vsnprintf-tests
124622         (test_u32_vsnprintf1_LDADD): Likewise.
124623         * modules/unistdio/u32-vsprintf-tests
124624         (test_u32_vsprintf1_LDADD): Likewise.
124625         * modules/unistdio/u8-vsnprintf-tests
124626         (test_u8_vsnprintf1_LDADD): Likewise.
124627         * modules/unistdio/u8-vsprintf-tests
124628         (test_u8_vsprintf1_LDADD): Likewise.
124629         * modules/unistdio/ulc-vsnprintf-tests
124630         (test_ulc_vsnprintf1_LDADD): Likewise.
124631         * modules/unistdio/ulc-vsprintf-tests
124632         (test_ulc_vsprintf1_LDADD): Likewise.
124634         Fix linking of some uniconv tests on FreeBSD.
124635         * modules/uniconv/u16-conv-from-enc-tests
124636         (test_u16_conv_from_enc_LDADD): Link $(LDADD) before @LIBICONV@.
124637         * modules/uniconv/u16-conv-to-enc-tests
124638         (test_u16_conv_to_enc_LDADD): Likewise.
124639         * modules/uniconv/u16-strconv-from-enc-tests
124640         (test_u16_strconv_from_enc_LDADD): Likewise.
124641         * modules/uniconv/u16-strconv-to-enc-tests
124642         (test_u16_strconv_to_enc_LDADD): Likewise.
124643         * modules/uniconv/u32-conv-from-enc-tests
124644         (test_u32_conv_from_enc_LDADD): Likewise.
124645         * modules/uniconv/u32-conv-to-enc-tests
124646         (test_u32_conv_to_enc_LDADD): Likewise.
124647         * modules/uniconv/u32-strconv-from-enc-tests
124648         (test_u32_strconv_from_enc_LDADD): Likewise.
124649         * modules/uniconv/u32-strconv-to-enc-tests
124650         (test_u32_strconv_to_enc_LDADD): Likewise.
124651         * modules/uniconv/u8-conv-from-enc-tests
124652         (test_u8_conv_from_enc_LDADD): Likewise.
124653         * modules/uniconv/u8-conv-to-enc-tests
124654         (test_u8_conv_to_enc_LDADD): Likewise.
124655         * modules/uniconv/u8-strconv-from-enc-tests
124656         (test_u8_strconv_from_enc_LDADD): Likewise.
124657         * modules/uniconv/u8-strconv-to-enc-tests
124658         (test_u8_strconv_to_enc_LDADD): Likewise.
124660 2007-10-22  Bruno Haible  <bruno@clisp.org>
124662         * lib/stdint.in.h: Add check that intmax_t and uintmax_t have the same
124663         size.
124665 2007-10-22  Eric Blake  <ebb9@byu.net>
124667         Tweak x*printf documentation.
124668         * lib/xprintf.c (xprintf, xvprintf, xfprintf, xvfprintf): Adjust
124669         variable name and comments.
124670         Suggested by Bruno Haible.
124672 2007-10-22  Bruno Haible  <bruno@clisp.org>
124674         * lib/acl.c (copy_acl): Fix file name in comment.
124676 2007-10-22  Paul Eggert  <eggert@cs.ucla.edu>
124678         Fix Tru64 problem with stdbool.h.
124679         * lib/stdbool.in.h (false, true):
124680         [! (defined __cplusplus || defined __BEOS__) && !defined __GNUC__]:
124681         Don't declare as an enum in this situation; it runs afoul of Tru64.
124682         Problem reported by Steven M. Schweda in
124683         <http://lists.gnu.org/r/bug-autoconf/2007-10/msg00019.html>.
124685 2007-10-22  Eric Blake  <ebb9@byu.net>
124687         Also wrap vf?printf.
124688         * lib/xprintf.h (xvprintf, xvfprintf): New declarations.
124689         * lib/xprintf.c (xprintf, xfprintf): Work for C89.
124690         (xvprintf, xvfprintf): New functions.
124692 2007-10-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
124694         * modules/fstrcmp-tests (test_fstrcmp_LDADD): New, add
124695         @LIBINTL@ for FreeBSD 6.2, $(LIBTHREAD) for AIX 4.3.3.
124697         * lib/uniconv/u16-conv-to-enc.c (U_MBLEN): Define.
124698         * lib/uniconv/u32-conv-to-enc.c (U_MBLEN): Likewise.
124700 2007-10-22  Paul Eggert  <eggert@cs.ucla.edu>
124702         * lib/acl.c (copy_acl): Adjust to IRIX 6.5.  Problem reported
124703         by Bruno Haible.
124705 2007-10-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
124707         * lib/getloadavg.c
124708         [defined (__osf__) && (defined (__alpha) || defined (__alpha__)]:
124709         Undef `sys' after including sys/table.h, for Tru64 4.0D.
124711         * tests/test-i-ring.c: Work for C89.
124713 2007-10-22  Bruno Haible  <bruno@clisp.org>
124715         * m4/ulonglong.m4 (AC_TYPE_UNSIGNED_LONG_LONG_INT): Use -1ull, not
124716         -1u, in preprocessor expression, so that we don't test for the bug
124717         in HP-UX 11.00 cpp.  Testing for this bug caused problems; see
124718         <http://lists.gnu.org/r/bug-gnulib/2007-10/msg00329.html>.
124720 2007-10-22  Eric Blake  <ebb9@byu.net>
124722         * tests/test-yesno.sh: Silence stderr during test.
124724 2007-10-22  Simon Josefsson  <simon@josefsson.org>
124726         * modules/crypto/gc-camellia: New file.
124728         * m4/gc-camellia.m4: New file.
124730         * lib/gc-libgcrypt.c (gc_cipher_open): Support Camellia.
124732         * lib/gc.h (enum Gc_cipher): Add GC_CAMELLIA128, GC_CAMELLIA256.
124734 2007-10-22  Simon Josefsson  <simon@josefsson.org>
124736         * build-aux/maint.mk (gzip_rsyncable): Don't fail if gzip sends
124737         --help to stdout.  Reported by sms@antinode.org (Steven
124738         M. Schweda).
124740 2007-10-22  Simon Josefsson  <simon@josefsson.org>
124742         * users.txt: Fix link to libksba.
124744 2007-10-21  Ben Pfaff  <blp@gnu.org>
124746         * modules/roundf-tests: Add dependency on floorf, ceilf to allow
124747         round.c roundf implementation that depends on floorf and ceilf to
124748         be tested unconditionally.
124750 2007-10-21  Ben Pfaff  <blp@gnu.org>
124752         * m4/check-libm-func.m4: Removed.
124753         * m4/check-math-lib.m4: New file.
124754         * m4/round.m4: Rewrite to use gl_CHECK_MATH_LIB.
124755         * m4/roundf.m4: Ditto, and fix lack of HAVE_DECL_ROUNDF
124756         definition and lack of AC_LIBOBJ([roundf]).
124757         * m4/roundl.m4: Ditto, and similarly for roundl.
124758         * modules/round: Reference new m4 file.
124759         * modules/roundf: Ditto.
124760         * modules/roundl: Ditto.
124761         * tests/test-round2.c (main): Use ROUND instead of round.
124762         Bug report from Bruno Haible.
124764 2007-10-21  Bruno Haible  <bruno@clisp.org>
124766         * lib/printf-parse.c: Don't assume <stdint.h> exists in IN_LIBASPRINTF
124767         context.
124769 2007-10-21  Bruno Haible  <bruno@clisp.org>
124771         * tests/test-wcwidth.c (main): Allow negative result for some control
124772         characters.
124774         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Check also the width of U+200B.
124775         Needed on OSF/1 5.1.
124777 2007-10-21  Bruno Haible  <bruno@clisp.org>
124779         * tests/test-floorf1.c: Include isnanf.h.
124780         (main): Use isnanf() instead of isnan().
124781         * tests/test-ceilf1.c: Include isnanf.h.
124782         (main): Use isnanf() instead of isnan().
124783         * tests/test-truncf1.c: Include isnanf.h.
124784         (main): Use isnanf() instead of isnan().
124785         * tests/test-roundf1.c: Include isnanf.h.
124786         (main): Use isnanf() instead of isnan().
124788 2007-10-21  Eric Blake  <ebb9@byu.net>
124790         * users.txt: Update URL for m4.
124792 2007-10-21  Bruno Haible  <bruno@clisp.org>
124794         * users.txt: Add clisp. Update URLs to Simon Josefsson's projects.
124796 2007-10-21  Bruno Haible  <bruno@clisp.org>
124798         * gnulib-tool (func_create_megatestdir): Determine the cvsdate from
124799         Git's management files if the CVS files are not present.
124801 2007-10-20  Bruno Haible  <bruno@clisp.org>
124803         * lib/count-one-bits.h (COUNT_ONE_BITS): Use the builtin also for
124804         gcc-3.4.x.
124806 2007-10-20  Ben Pfaff  <blp@gnu.org>
124808         * lib/math.in.h: Declare round, roundf, roundl if we are providing
124809         implementations.
124810         * m4/math_h.m4: New substitutions for round, roundf, roundl modules.
124811         * lib/round.c: New file.
124812         * lib/roundf.c: New file.
124813         * lib/roundl.c: New file.
124814         * m4/round.m4: New file.
124815         * m4/roundf.m4: New file.
124816         * m4/roundl.m4: New file.
124817         * m4/check-libm-func-m4: New file.
124818         * modules/math: Replace round, roundf, roundl related @VARS@ in
124819         math.in.h.
124820         * modules/round: New file.
124821         * modules/round-tests: New file.
124822         * modules/roundf: New file.
124823         * modules/roundf-tests: New file.
124824         * modules/roundl: New file.
124825         * modules/roundl-tests: New file.
124826         * tests/test-round1.c: New file.
124827         * tests/test-round2.c: New file.
124828         * tests/test-roundf1.c: New file.
124829         * tests/test-roundf2.c: New file.
124830         * tests/test-roundl.c: New file.
124831         * doc/functions/round.texi: Mention round module.
124832         * doc/functions/roundf.texi: Mention roundf module.
124833         * doc/functions/roundl.texi: Mention roundl module.
124834         * MODULES.html.sh: Mention new modules.
124835         Thanks to Bruno Haible for suggestions.
124837 2007-10-20  Jim Meyering  <meyering@redhat.com>
124839         * lib/xprintf.c: Include <config.h> unconditionally.
124841         Change xprintf's license to GPL.
124842         * modules/xprintf (License): s/LGPL/GPL/, since this module
124843         depends on modules (exit and exitfail) which are GPL.
124844         Suggestion from Bruno Haible.
124846         xprintf fixes.
124847         * lib/xprintf.c (xprintf, xfprintf): Use va_end.
124848         Use a clearer diagnostic.
124849         Patch from Bruno Haible.
124851 2007-10-20  Bruno Haible  <bruno@clisp.org>
124853         * lib/vasnprintf.c (VASNPRINTF): Don't report overflow if the available
124854         length is INT_MAX and sizeof (DCHAR_T) > sizeof (TCHAR_T).
124855         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
124857 2007-10-20  Bruno Haible  <bruno@clisp.org>
124859         * tests/test-floorf2.c (correct_result_p): Don't rely on excess
124860         precision in the comparison result > x - 1 or similar.
124861         * tests/test-ceilf2.c (correct_result_p): Likewise.
124862         * tests/test-truncf2.c (correct_result_p): Likewise.
124863         * tests/test-trunc2.c (correct_result_p): Likewise.
124864         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
124866 2007-10-20  Bruno Haible  <bruno@clisp.org>
124868         * modules/ceil: New file.
124869         * m4/ceil.m4: New file.
124870         * doc/functions/ceil.texi: Mention the 'ceil' module.
124872 2007-10-20  Bruno Haible  <bruno@clisp.org>
124874         * modules/floor: New file.
124875         * m4/floor.m4: New file.
124876         * doc/functions/floor.texi: Mention the 'floor' module.
124878 2007-10-20  Bruno Haible  <bruno@clisp.org>
124880         * modules/ceilf-tests (Depends-on): Add fprintf-posix. Needed for use
124881         of %a.
124882         * modules/floorf-tests (Depends-on): Likewise.
124883         * modules/truncf-tests (Depends-on): Likewise.
124884         * modules/trunc-tests (Depends-on): Likewise.
124885         Reported by Ben Pfaff.
124887 2007-10-19  Jim Meyering  <meyering@redhat.com>
124889         * lib/xprintf.c (xprintf, xfprintf): Test err < 0, not just "err".
124890         Don't bother testing specific errno values.  Just test ferror.
124892         New module: xprintf
124893         * modules/xprintf, lib/xprintf.c, lib/xprintf.h: New files.
124895 2007-10-19  Bruno Haible  <bruno@clisp.org>
124897         * modules/csharpexec (Makefile.am): Use @FOO@ syntax instead of $(FOO)
124898         syntax.
124899         * modules/javaexec (Makefile.am): Likewise.
124900         * modules/relocatable-prog (Makefile.am): Likewise.
124901         Suggested by Jim Meyering.
124903 2007-10-18  Bruno Haible  <bruno@clisp.org>
124905         * lib/vasnprintf.c (VASNPRINTF): Don't use %n on glibc >= 2.3 systems.
124906         Reported by Jim Meyering.
124908 2007-10-18  Eric Blake  <ebb9@byu.net>
124910         * modules/filenamecat-tests (Makefile.am): Link against -lintl.
124912 2007-10-18  Bruno Haible  <bruno@clisp.org>
124914         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_N, gl_SNPRINTF_DIRECTIVE_N): Put
124915         the format string into writable memory. Needed in Fortify conditions.
124917 2007-10-18  Colin Watson  <cjwatson@debian.org>  (tiny change)
124918             Bruno Haible  <bruno@clisp.org>
124920         * lib/trim.c: Include config.h unconditionally. Include trim.h always.
124921         Include ctype.h always. Include stdlib.h, not mbuiter.h, for MB_CUR_MAX.
124922         * modules/trim (Depends-on): Add mbchar.
124923         (configure.ac): Add gl_FUNC_MBRTOWC.
124924         (Makefile.am): Augment lib_SOURCES.
124926 2007-10-17  Paul Eggert  <eggert@cs.ucla.edu>
124928         Modify glob.c to use fstatat and dirfd, to simplify it.
124929         Suggested by Eric Blake.
124930         * lib/glob.c (__fxstatat64) [!_LIBC]: New macro.
124931         Don't include <stdbool.h>; not used.
124932         (link_exists2_p, glob_in_dir) [!_LIBC]: No longer a special case.
124933         (link_exists_p): Simplify implementation, since we can now assume
124934         dirfd and fstatat.
124935         * modules/glob (Depends-on): Add dirfd, openat.  Remove stdbool.
124937 2007-10-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
124939         * gnulib-tool (func_get_dependencies): Fix sed script to
124940         match only tests.
124942 2007-10-17  Bruno Haible  <bruno@clisp.org>
124944         * m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): On Cygwin, don't
124945         allow locale names without encoding suffix.
124946         * m4/locale-tr.m4 (gt_LOCALE_TR_UTF8): Likewise.
124947         * m4/locale-zh.m4 (gt_LOCALE_ZH_CN): Likewise.
124949 2007-10-16  Bruno Haible  <bruno@clisp.org>
124951         * lib/getcwd.c (__getcwd): Define with explicit rpl_ prefix.
124952         * lib/getgroups.c (getgroups): Likewise.
124953         * lib/gettimeofday.c (localtime, gmtime, tzset): Likewise.
124955 2007-10-16  Bruno Haible  <bruno@clisp.org>
124957         * modules/absolute-header (License): Change from LGPL to LGPLv2+.
124958         * modules/malloc-posix (License): Likewise.
124959         * modules/realloc-posix (License): Likewise.
124960         * modules/calloc-posix (License): Likewise.
124961         * modules/intprops (License): Change from GPL to LGPL, with
124962         Paul Eggert's approval.
124964 2007-10-16  Paul Eggert  <eggert@cs.ucla.edu>
124966         Merge glibc changes into lib/glob.c.
124968         * lib/glob.c (glob_in_dir): Sync with glibc/posix/glob.c, dated
124969         2007-10-15 04:59:03 UTC.  Here are the changes:
124971         2007-10-14  Ulrich Drepper  <drepper@redhat.com>
124973         * lib/glob.c: Reimplement link_exists_p to use fstatat64.
124975         * lib/glob.c: Add some branch prediction throughout.
124977         2007-10-07  Ulrich Drepper  <drepper@redhat.com>
124979         [BZ #5103]
124980         * lib/glob.c (glob): Recognize patterns starting \/.
124982         2007-02-14  Jakub Jelinek  <jakub@redhat.com>
124984         [BZ #3996]
124985         * lib/glob.c (attribute_hidden): Define if not defined.
124986         (glob): Unescape dirname, filename or username when needed and not
124987         GLOB_NOESCAPE.  Handle \/ correctly.  Handle GLOB_MARK if filename
124988         is NULL.  Handle unescaped [ in pattern without closing ].
124989         Don't pass GLOB_CHECK down to recursive glob for directories.
124990         (__glob_pattern_type): New function.
124991         (__glob_pattern_p): Implement using __glob_pattern_type.
124992         (glob_in_dir): Handle GLOB_NOCHECK patterns containing no meta
124993         characters and backslashes if not GLOB_NOESCAPE or unterminated [.
124994         Remove unreachable code.
124996         2006-09-30  Ulrich Drepper  <drepper@redhat.com>
124998         * lib/glob.c (glob_in_dir): Add some comments and asserts to
124999         explain why there are no leaks.
125001         2006-09-25  Jakub Jelinek  <jakub@redhat.com>
125003         [BZ #3253]
125004         * lib/glob.c (glob_in_dir): Don't alloca one struct globlink at a
125005         time, rather allocate increasingly bigger arrays of pointers, if
125006         possible with alloca, if too large with malloc.
125008 2007-10-16  Paul Eggert  <eggert@cs.ucla.edu>
125010         Check for 64-bit int errors in HP-UX 10.20 preprocessor.
125011         Problem reported by H.Merijn Brand in
125012         <http://lists.gnu.org/r/bug-tar/2007-10/msg00018.html>.
125013         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Check preprocessor too.
125014         * m4/ulonglong.m4 (AC_TYPE_UNSIGNED_LONG_LONG_INT): Likewise.
125016 2007-10-15  Bruno Haible  <bruno@clisp.org>
125018         * lib/fchdir.c (close, open, closedir, opendir, dup, dup2): Define
125019         with explicit rpl_ prefix.
125020         * lib/fopen.c (fopen): Likewise.
125021         * lib/freopen.c (freopen): Likewise.
125022         * lib/iconv.c (iconv): Likewise.
125023         * lib/iconv_close.c (iconv_close): Likewise.
125025 2007-10-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
125027         * m4/iconv_open (gl_FUNC_ICONV_OPEN_UTF): Fix cache variable name.
125029 2007-10-15  Bruno Haible  <bruno@clisp.org>
125031         * m4/getaddrinfo.m4 (gl_GETADDRINFO, gl_PREREQ_GETADDRINFO): Use
125032         <stddef.h> instead of <stdlib.h> since we only need NULL.
125033         Reported by Ben Pfaff <blp@cs.stanford.edu>.
125035 2007-10-15  Bruno Haible  <bruno@clisp.org>
125037         * doc/gnulib-tool.texi (Initial import): Swap order of -I directives.
125038         Replace paragraph talking about LIBOBJS.
125039         Reported by Colin Watson <cjwatson@debian.org>.
125041 2007-10-15  Bruno Haible  <bruno@clisp.org>
125043         * m4/getaddrinfo.m4 (gl_GETADDRINFO, gl_PREREQ_GETADDRINFO): Include
125044         <stdlib.h> before using NULL.
125046 2007-10-15  Simon Josefsson  <simon@josefsson.org>
125048         * m4/getaddrinfo.m4: Use NULL rather than 0 for pointers.
125049         Reported by Albert Chin <china@thewrittenword.com>.
125051 2007-10-14  Bruno Haible  <bruno@clisp.org>
125053         * modules/iconv_open-utf-tests: New file.
125054         * tests/test-iconv-utf.c: New file.
125056         Enhance iconv_open to support UTF-16BE, UTF-16LE, UTF-32BE, UTF-32LE.
125057         * modules/iconv_open-utf: New file.
125058         * lib/iconv.in.h (_ICONV_UTF8_UTF*, _ICONV_UTF*_UTF8): New macros.
125059         (iconv, iconv_close): New declarations.
125060         * lib/iconv_open.c: Include c-strcase.h. Don't require ICONV_FLAVOR to
125061         be defined.
125062         (iconv_open): Add special handling of conversion between UTF-8 and
125063         UTF-{16,32}{BE,LE}.
125064         * lib/iconv.c: New file, incorporating code from GNU libiconv 1.11.
125065         * lib/iconv_close.c: New file.
125066         * m4/iconv_open.m4 (gl_REPLACE_ICONV_OPEN): New macro, extracted from
125067         gl_FUNC_ICONV_OPEN.
125068         (gl_FUNC_ICONV_OPEN): Use it.
125069         (gl_FUNC_ICONV_OPEN_UTF): New macro.
125070         * m4/iconv_h.m4 (gl_ICONV_H_DEFAULTS): Initialize also REPLACE_ICONV
125071         and REPLACE_ICONV_UTF.
125072         * modules/iconv_open (Depends-on): Add c-strcase.
125073         (Makefile.am): Substitute also REPLACE_ICONV, REPLACE_ICONV_UTF,
125074         ICONV_CONST.
125075         * doc/functions/iconv_open.texi: Mention the iconv_open-utf module.
125077 2007-10-13  Albert Chin  <china@thewrittenword.com>
125078             Bruno Haible  <bruno@clisp.org>
125080         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Perform the test for getaddrinfo
125081         through a link check that includes <netdb.h>. Needed for OSF/1 5.1.
125083 2007-10-13  Bruno Haible  <bruno@clisp.org>
125085         * lib/argp-fmtstream.h (ARGP_FS_EI): If __GNUC_STDC_INLINE__ is
125086         defined, use the ISO C99 inline semantics.
125087         * lib/argp.h (ARGP_EI): Likewise.
125089 2007-10-13  Bruno Haible  <bruno@clisp.org>
125091         Handle 'inline' change in gcc 4.3.0.
125092         * lib/argp-fmtstream.h (argp_fmtstream_putc, argp_fmtstream_puts,
125093         argp_fmtstream_write, argp_fmtstream_set_lmargin,
125094         argp_fmtstream_set_rmargin, argp_fmtstream_set_wmargin,
125095         argp_fmtstream_point): Disable 'extern' declaration if the function
125096         definition is going to be provided inline.
125097         (ARGP_FS_EI): If __GNUC_STDC_INLINE__ is defined, use the GNU C inline
125098         semantics, not the ISO C99 inline semantics.
125099         * lib/argp.h (argp_usage, _option_is_short, _option_is_end): Disable
125100         'extern' declaration if the function definition is going to be provided
125101         inline.
125102         (ARGP_EI): Don't assume GNU C. If __GNUC_STDC_INLINE__ is defined, use
125103         the GNU C inline semantics, not the ISO C99 inline semantics. With
125104         GCC 4.2, avoid a warning.
125106 2007-10-13  Bruno Haible  <bruno@clisp.org>
125108         * lib/freading.h (freading): Enable the use of __freading for
125109         glibc >= 2.7.
125110         * lib/freading.c (freading): Likewise.
125112 2007-10-12  Paul Eggert  <eggert@cs.ucla.edu>
125114         * lib/argp-fmtstream.h (ARGP_FS_EI): Work around GCC 4.2.1 diagnostic
125115         "warning: C99 inline functions are not supported; using GNU89".
125117 2007-10-12  Bruno Haible  <bruno@clisp.org>
125119         * lib/ceil.c (FUNC): Avoid rounding errors for values near a power
125120         of 2.
125121         * tests/test-ceilf2.c: New file.
125122         * modules/ceilf-tests: (Files, Depends-on, Makefile.am): Add new test.
125124         * tests/test-ceilf1.c: Renamed from tests/test-ceilf.c.
125125         * modules/ceilf-tests: Update.
125127 2007-10-12  Bruno Haible  <bruno@clisp.org>
125129         * lib/floor.c (FUNC): Avoid rounding errors for values near a power
125130         of 2.
125131         * tests/test-floorf2.c: New file.
125132         * modules/floorf-tests: (Files, Depends-on, Makefile.am): Add new test.
125134         * tests/test-floorf1.c: Renamed from tests/test-floorf.c.
125135         * modules/floorf-tests: Update.
125137 2007-10-12  Bruno Haible  <bruno@clisp.org>
125139         * tests/test-trunc2.c: New file.
125140         * modules/trunc-tests: (Files, Depends-on, Makefile.am): Add new test.
125142         * tests/test-trunc1.c: Renamed from tests/test-trunc.c.
125143         * modules/trunc-tests: Update.
125145 2007-10-12  Bruno Haible  <bruno@clisp.org>
125147         * lib/trunc.c (FUNC): Avoid rounding errors for values near a power
125148         of 2.
125149         * tests/test-truncf2.c: New file.
125150         * modules/truncf-tests: (Files, Depends-on, Makefile.am): Add new test.
125152         * tests/test-truncf1.c: Renamed from tests/test-truncf.c.
125153         * modules/truncf-tests: Update.
125155 2007-10-11  Eric Blake  <ebb9@byu.net>
125157         Don't claim strerror is broken on Interix.
125158         * doc/functions/strerror.texi (strerror): Known broken systems are
125159         now Solaris 8, and not Interix.
125160         * m4/strerror.m4 (gl_FUNC_STRERROR_SEPARATE): No longer filter out
125161         Interix on cross-compile.
125162         Reported by Martin Koeppe in
125163         http://lists.gnu.org/r/bug-gnulib/2007-10/msg00005.html.
125165 2007-10-11  Bruno Haible  <bruno@clisp.org>
125167         * modules/i-ring-tests: New file.
125168         * tests/test-i-ring.c: Renamed from lib/i-ring-test.c. Use ASSERT
125169         instead of assert.
125171 2007-10-11  Bruno Haible  <bruno@clisp.org>
125173         * modules/filenamecat-tests: New file.
125174         * tests/test-filenamecat.c: New file, extracted from lib/filenamecat.c.
125175         * lib/filenamecat.c: Remove test code.
125177 2007-10-11  Paul Eggert  <eggert@cs.ucla.edu>
125179         Simplify and modernize strerror substitute, partly to fix Solaris 8 bug.
125181         * lib/strerror.c: Include <string.h> always, to test interface,
125182         and to remove the need for the dummy.
125183         Include intprops.h to compute width instead of doing it ourselves
125184         and missing a CHAR_BIT declaration, which broke tar 1.19 on Solaris 8.
125185         (strerror): Define it to return NULL if there's no system strerror.
125186         (rpl_strerror): Use INT_STRLEN_BOUND to compute bound.
125187         Omit !HAVE_STRERROR code.  We don't need to worry about supporting
125188         ancient pre-strerror Unix systems well any more.  Saying "unknown
125189         system error" is enough.
125190         * lib/string.in.h (strerror): Simplify the ifdef to reflect the
125191         simpler strerror.c implementation.
125192         * m4/strerror.m4 (gl_FUNC_STRERROR_SEPARATE, gl_PREREQ_STDERROR):
125193         Simplify the tests to reflect the simpler strerror implementation.
125194         * modules/strerror (Depends-on): Add intprops.
125196 2007-10-09  Eric Blake  <ebb9@byu.net>
125198         Silence test-fpending.
125199         * modules/fpending-tests (Files): Add wrapper script.
125200         * tests/test-fpending.sh: New file.
125202 2007-10-09  Bruno Haible  <bruno@clisp.org>
125204         * MODULES.html.sh (func_module): Don't create a hyperlink for
125205         function names like 'printf_frexp'.
125206         (Misc): Add crc, memxor.
125207         (Characteristics of floating types): New section.
125208         (Mathematics): Add ceilf, ceill, floorf, floorl, frexpl-nolibm,
125209         isnanf-nolibm, signbit, trunc, truncf, truncl.
125210         (Enhancements for ISO C 99 functions): New subsection Input/output.
125211         (Support for systems lacking POSIX:2001): Add arpa_inet, calloc-posix,
125212         fcntl, fopen, freopen, fseek, fseeko, ftell, ftello, iconv_open,
125213         locale, malloc-posix, netinet_in, open, realloc-posix, signal, sleep.
125214         (Compatibility checks for POSIX:2001 functions): Add clock-time.
125215         (Enhancements for POSIX:2001 functions): Add chdir-long.
125216         (File system functions): Add areadlink, chdir-safer, read-file.
125217         Remove cycle-check.
125218         (File system as inode set): New section.
125219         (Date and time): Add gethrxtime.
125220         (Multithreading): Add openmp.
125221         (Internationalization functions): Add localename.
125222         (Unicode string functions): Add unistr/u*-mbsnlen.
125223         (Support for maintaining and releasing projects): Add git-version-gen.
125224         (Lone files): Remove directories.
125226 2007-10-08  Ben Pfaff  <blp@gnu.org>
125228         * lib/xmalloca.h: Fix typo in comment.
125230 2007-10-08  Paul Eggert  <eggert@cs.ucla.edu>
125232         * lib/xnanosleep.c (xnanosleep): Don't assume GCC 4.3.0 behavior
125233         when avoiding problems with integer overflow.  Use a portable test
125234         instead.
125236 2007-10-08  Simon Josefsson  <simon@josefsson.org>
125238         * modules/dummy (License): Change to LGPLv2+.
125239         * modules/float (License): Likewise
125240         * modules/realloc (License): Likewise
125241         * modules/stdlib (License): Likewise
125243 2007-10-07  Bruno Haible  <bruno@clisp.org>
125245         * trunc.c (TWO_MANT_DIG): Change type to DOUBLE.
125246         * floor.c (TWO_MANT_DIG): Likewise.
125247         * ceil.c (TWO_MANT_DIG): Likewise.
125248         Reported by Ben Pfaff.
125250 2007-10-07  Bruno Haible  <bruno@clisp.org>
125252         Avoid gcc warnings "declaration of 'exp' shadows a global declaration".
125253         * lib/math.in.h (frexp, frexpl): Change parameter name to 'expptr'.
125254         * lib/frexp.c (FUNC): Likewise.
125255         * lib/printf-frexp.h (printf_frexp): Likewise.
125256         * lib/printf-frexpl.h (printf_frexpl): Likewise.
125257         * lib/printf-frexp.c (FUNC): Likewise.
125258         Suggested by Jim Meyering.
125260 2007-10-07  Jim Meyering  <meyering@redhat.com>
125262         Make xnanosleep's integer overflow test more robust.
125263         * lib/xnanosleep.c (xnanosleep): Declare a temporary to be "volatile",
125264         so that gcc-4.3.0 doesn't optimize away this test for overflow.
125266 2007-10-07  Bruno Haible  <bruno@clisp.org>
125268         * NEWS: Mention the license change.
125270         * doc/gnulib-intro.texi (Copyright): Update the meaning of the license
125271         abbreviations in the modules files.
125273         Change copyright notice from GPLv2+ to GPLv3+.
125274         * README: Change copyright notice.
125275         * MODULES.html.sh: Likewise.
125276         * build-aux/bootstrap.conf: Likewise.
125277         * build-aux/config.libpath: Likewise.
125278         * build-aux/csharpcomp.sh.in: Likewise.
125279         * build-aux/csharpexec.sh.in: Likewise.
125280         * build-aux/install-reloc: Likewise.
125281         * build-aux/javacomp.sh.in: Likewise.
125282         * build-aux/javaexec.sh.in: Likewise.
125283         * build-aux/ldd.sh.in: Likewise.
125284         * build-aux/reloc-ldflags: Likewise.
125285         * build-aux/relocatable.sh.in: Likewise.
125286         * build-aux/x-to-1.in: Likewise.
125287         * check-module: Likewise.
125288         * config/srclistvars.sh: Likewise.
125289         * gnulib-tool: Likewise.
125290         * lib/acl-internal.h: Likewise.
125291         * lib/acl.c: Likewise.
125292         * lib/acl.h: Likewise.
125293         * lib/acl_entries.c: Likewise.
125294         * lib/areadlink-with-size.c: Likewise.
125295         * lib/areadlink.c: Likewise.
125296         * lib/areadlink.h: Likewise.
125297         * lib/argmatch.c: Likewise.
125298         * lib/argmatch.h: Likewise.
125299         * lib/argp-ba.c: Likewise.
125300         * lib/argp-eexst.c: Likewise.
125301         * lib/argp-fmtstream.c: Likewise.
125302         * lib/argp-fmtstream.h: Likewise.
125303         * lib/argp-fs-xinl.c: Likewise.
125304         * lib/argp-help.c: Likewise.
125305         * lib/argp-namefrob.h: Likewise.
125306         * lib/argp-parse.c: Likewise.
125307         * lib/argp-pin.c: Likewise.
125308         * lib/argp-pv.c: Likewise.
125309         * lib/argp-pvh.c: Likewise.
125310         * lib/argp-xinl.c: Likewise.
125311         * lib/argp.h: Likewise.
125312         * lib/at-func.c: Likewise.
125313         * lib/atanl.c: Likewise.
125314         * lib/backupfile.c: Likewise.
125315         * lib/backupfile.h: Likewise.
125316         * lib/basename.c: Likewise.
125317         * lib/binary-io.h: Likewise.
125318         * lib/byteswap.in.h: Likewise.
125319         * lib/c-stack.c: Likewise.
125320         * lib/c-stack.h: Likewise.
125321         * lib/c-strcasestr.c: Likewise.
125322         * lib/c-strcasestr.h: Likewise.
125323         * lib/c-strstr.c: Likewise.
125324         * lib/c-strstr.h: Likewise.
125325         * lib/c-strtod.c: Likewise.
125326         * lib/calloc.c: Likewise.
125327         * lib/canon-host.c: Likewise.
125328         * lib/canon-host.h: Likewise.
125329         * lib/canonicalize-lgpl.c: Likewise.
125330         * lib/canonicalize.c: Likewise.
125331         * lib/canonicalize.h: Likewise.
125332         * lib/ceil.c: Likewise.
125333         * lib/ceilf.c: Likewise.
125334         * lib/ceill.c: Likewise.
125335         * lib/chdir-long.c: Likewise.
125336         * lib/chdir-long.h: Likewise.
125337         * lib/chdir-safer.c: Likewise.
125338         * lib/chdir-safer.h: Likewise.
125339         * lib/chown.c: Likewise.
125340         * lib/classpath.c: Likewise.
125341         * lib/classpath.h: Likewise.
125342         * lib/clean-temp.c: Likewise.
125343         * lib/clean-temp.h: Likewise.
125344         * lib/cloexec.c: Likewise.
125345         * lib/close-stream.c: Likewise.
125346         * lib/closein.c: Likewise.
125347         * lib/closein.h: Likewise.
125348         * lib/closeout.c: Likewise.
125349         * lib/closeout.h: Likewise.
125350         * lib/concat-filename.c: Likewise.
125351         * lib/copy-file.c: Likewise.
125352         * lib/copy-file.h: Likewise.
125353         * lib/count-one-bits.h: Likewise.
125354         * lib/crc.c: Likewise.
125355         * lib/crc.h: Likewise.
125356         * lib/creat-safer.c: Likewise.
125357         * lib/csharpcomp.c: Likewise.
125358         * lib/csharpcomp.h: Likewise.
125359         * lib/csharpexec.c: Likewise.
125360         * lib/csharpexec.h: Likewise.
125361         * lib/cycle-check.c: Likewise.
125362         * lib/cycle-check.h: Likewise.
125363         * lib/diacrit.c: Likewise.
125364         * lib/diacrit.h: Likewise.
125365         * lib/diffseq.h: Likewise.
125366         * lib/dirchownmod.c: Likewise.
125367         * lib/dirent.in.h: Likewise.
125368         * lib/dirfd.c: Likewise.
125369         * lib/dirfd.h: Likewise.
125370         * lib/dirname.c: Likewise.
125371         * lib/dirname.h: Likewise.
125372         * lib/dummy.c: Likewise.
125373         * lib/dup-safer.c: Likewise.
125374         * lib/dup2.c: Likewise.
125375         * lib/eealloc.h: Likewise.
125376         * lib/error.c: Likewise.
125377         * lib/error.h: Likewise.
125378         * lib/euidaccess.c: Likewise.
125379         * lib/exclude.c: Likewise.
125380         * lib/exclude.h: Likewise.
125381         * lib/execute.c: Likewise.
125382         * lib/execute.h: Likewise.
125383         * lib/exitfail.c: Likewise.
125384         * lib/exitfail.h: Likewise.
125385         * lib/expl.c: Likewise.
125386         * lib/fatal-signal.c: Likewise.
125387         * lib/fatal-signal.h: Likewise.
125388         * lib/fbufmode.c: Likewise.
125389         * lib/fbufmode.h: Likewise.
125390         * lib/fchdir.c: Likewise.
125391         * lib/fchmodat.c: Likewise.
125392         * lib/fchownat.c: Likewise.
125393         * lib/fcntl--.h: Likewise.
125394         * lib/fcntl-safer.h: Likewise.
125395         * lib/fcntl.in.h: Likewise.
125396         * lib/fd-safer.c: Likewise.
125397         * lib/fflush.c: Likewise.
125398         * lib/file-has-acl.c: Likewise.
125399         * lib/file-set.c: Likewise.
125400         * lib/file-type.c: Likewise.
125401         * lib/file-type.h: Likewise.
125402         * lib/fileblocks.c: Likewise.
125403         * lib/filemode.c: Likewise.
125404         * lib/filemode.h: Likewise.
125405         * lib/filename.h: Likewise.
125406         * lib/filenamecat.c: Likewise.
125407         * lib/filenamecat.h: Likewise.
125408         * lib/findprog.c: Likewise.
125409         * lib/findprog.h: Likewise.
125410         * lib/float.in.h: Likewise.
125411         * lib/floor.c: Likewise.
125412         * lib/floorf.c: Likewise.
125413         * lib/floorl.c: Likewise.
125414         * lib/fopen-safer.c: Likewise.
125415         * lib/fopen.c: Likewise.
125416         * lib/fpending.c: Likewise.
125417         * lib/fpending.h: Likewise.
125418         * lib/fprintf.c: Likewise.
125419         * lib/fprintftime.h: Likewise.
125420         * lib/fpucw.h: Likewise.
125421         * lib/fpurge.c: Likewise.
125422         * lib/fpurge.h: Likewise.
125423         * lib/freadable.c: Likewise.
125424         * lib/freadable.h: Likewise.
125425         * lib/freadahead.c: Likewise.
125426         * lib/freadahead.h: Likewise.
125427         * lib/freading.c: Likewise.
125428         * lib/freading.h: Likewise.
125429         * lib/free.c: Likewise.
125430         * lib/freopen.c: Likewise.
125431         * lib/frexp.c: Likewise.
125432         * lib/frexpl.c: Likewise.
125433         * lib/fseek.c: Likewise.
125434         * lib/fseterr.c: Likewise.
125435         * lib/fseterr.h: Likewise.
125436         * lib/fstatat.c: Likewise.
125437         * lib/fstrcmp.c: Likewise.
125438         * lib/fstrcmp.h: Likewise.
125439         * lib/fsusage.c: Likewise.
125440         * lib/fsusage.h: Likewise.
125441         * lib/ftell.c: Likewise.
125442         * lib/ftello.c: Likewise.
125443         * lib/fts-cycle.c: Likewise.
125444         * lib/fts.c: Likewise.
125445         * lib/fts_.h: Likewise.
125446         * lib/full-read.c: Likewise.
125447         * lib/full-read.h: Likewise.
125448         * lib/full-write.c: Likewise.
125449         * lib/full-write.h: Likewise.
125450         * lib/fwritable.c: Likewise.
125451         * lib/fwritable.h: Likewise.
125452         * lib/fwriteerror.c: Likewise.
125453         * lib/fwriteerror.h: Likewise.
125454         * lib/fwriting.c: Likewise.
125455         * lib/fwriting.h: Likewise.
125456         * lib/gcd.c: Likewise.
125457         * lib/gcd.h: Likewise.
125458         * lib/getcwd.c: Likewise.
125459         * lib/getdate.h: Likewise.
125460         * lib/getdate.y: Likewise.
125461         * lib/getdomainname.c: Likewise.
125462         * lib/getdomainname.h: Likewise.
125463         * lib/getgroups.c: Likewise.
125464         * lib/gethostname.c: Likewise.
125465         * lib/gethrxtime.c: Likewise.
125466         * lib/gethrxtime.h: Likewise.
125467         * lib/getloadavg.c: Likewise.
125468         * lib/getndelim2.c: Likewise.
125469         * lib/getndelim2.h: Likewise.
125470         * lib/getnline.c: Likewise.
125471         * lib/getnline.h: Likewise.
125472         * lib/getopt.c: Likewise.
125473         * lib/getopt.in.h: Likewise.
125474         * lib/getopt1.c: Likewise.
125475         * lib/getopt_int.h: Likewise.
125476         * lib/getpagesize.h: Likewise.
125477         * lib/getsubopt.c: Likewise.
125478         * lib/gettime.c: Likewise.
125479         * lib/getugroups.c: Likewise.
125480         * lib/getugroups.h: Likewise.
125481         * lib/getusershell.c: Likewise.
125482         * lib/gl_anyavltree_list1.h: Likewise.
125483         * lib/gl_anyavltree_list2.h: Likewise.
125484         * lib/gl_anyhash_list1.h: Likewise.
125485         * lib/gl_anyhash_list2.h: Likewise.
125486         * lib/gl_anylinked_list1.h: Likewise.
125487         * lib/gl_anylinked_list2.h: Likewise.
125488         * lib/gl_anyrbtree_list1.h: Likewise.
125489         * lib/gl_anyrbtree_list2.h: Likewise.
125490         * lib/gl_anytree_list1.h: Likewise.
125491         * lib/gl_anytree_list2.h: Likewise.
125492         * lib/gl_anytree_oset.h: Likewise.
125493         * lib/gl_anytreehash_list1.h: Likewise.
125494         * lib/gl_anytreehash_list2.h: Likewise.
125495         * lib/gl_array_list.c: Likewise.
125496         * lib/gl_array_list.h: Likewise.
125497         * lib/gl_array_oset.c: Likewise.
125498         * lib/gl_array_oset.h: Likewise.
125499         * lib/gl_avltree_list.c: Likewise.
125500         * lib/gl_avltree_list.h: Likewise.
125501         * lib/gl_avltree_oset.c: Likewise.
125502         * lib/gl_avltree_oset.h: Likewise.
125503         * lib/gl_avltreehash_list.c: Likewise.
125504         * lib/gl_avltreehash_list.h: Likewise.
125505         * lib/gl_carray_list.c: Likewise.
125506         * lib/gl_carray_list.h: Likewise.
125507         * lib/gl_linked_list.c: Likewise.
125508         * lib/gl_linked_list.h: Likewise.
125509         * lib/gl_linkedhash_list.c: Likewise.
125510         * lib/gl_linkedhash_list.h: Likewise.
125511         * lib/gl_list.c: Likewise.
125512         * lib/gl_list.h: Likewise.
125513         * lib/gl_oset.c: Likewise.
125514         * lib/gl_oset.h: Likewise.
125515         * lib/gl_rbtree_list.c: Likewise.
125516         * lib/gl_rbtree_list.h: Likewise.
125517         * lib/gl_rbtree_oset.c: Likewise.
125518         * lib/gl_rbtree_oset.h: Likewise.
125519         * lib/gl_rbtreehash_list.c: Likewise.
125520         * lib/gl_rbtreehash_list.h: Likewise.
125521         * lib/gl_sublist.c: Likewise.
125522         * lib/gl_sublist.h: Likewise.
125523         * lib/group-member.c: Likewise.
125524         * lib/group-member.h: Likewise.
125525         * lib/hard-locale.c: Likewise.
125526         * lib/hard-locale.h: Likewise.
125527         * lib/hash-pjw.c: Likewise.
125528         * lib/hash-pjw.h: Likewise.
125529         * lib/hash-triple.c: Likewise.
125530         * lib/hash.c: Likewise.
125531         * lib/hash.h: Likewise.
125532         * lib/human.c: Likewise.
125533         * lib/human.h: Likewise.
125534         * lib/i-ring.c: Likewise.
125535         * lib/i-ring.h: Likewise.
125536         * lib/idcache.c: Likewise.
125537         * lib/imaxabs.c: Likewise.
125538         * lib/imaxdiv.c: Likewise.
125539         * lib/inet_pton.c: Likewise.
125540         * lib/inet_pton.h: Likewise.
125541         * lib/intprops.h: Likewise.
125542         * lib/inttostr.c: Likewise.
125543         * lib/inttostr.h: Likewise.
125544         * lib/inttypes.in.h: Likewise.
125545         * lib/isapipe.c: Likewise.
125546         * lib/isdir.c: Likewise.
125547         * lib/isnan.c: Likewise.
125548         * lib/isnan.h: Likewise.
125549         * lib/isnanf.c: Likewise.
125550         * lib/isnanf.h: Likewise.
125551         * lib/isnanl-nolibm.h: Likewise.
125552         * lib/isnanl.c: Likewise.
125553         * lib/isnanl.h: Likewise.
125554         * lib/javacomp.c: Likewise.
125555         * lib/javacomp.h: Likewise.
125556         * lib/javaexec.c: Likewise.
125557         * lib/javaexec.h: Likewise.
125558         * lib/javaversion.c: Likewise.
125559         * lib/javaversion.h: Likewise.
125560         * lib/javaversion.java: Likewise.
125561         * lib/lbrkprop.h: Likewise.
125562         * lib/lchmod.h: Likewise.
125563         * lib/lchown.c: Likewise.
125564         * lib/ldexpl.c: Likewise.
125565         * lib/linebreak.c: Likewise.
125566         * lib/linebreak.h: Likewise.
125567         * lib/linebuffer.c: Likewise.
125568         * lib/linebuffer.h: Likewise.
125569         * lib/locale.in.h: Likewise.
125570         * lib/logl.c: Likewise.
125571         * lib/long-options.c: Likewise.
125572         * lib/long-options.h: Likewise.
125573         * lib/lstat.c: Likewise.
125574         * lib/lstat.h: Likewise.
125575         * lib/math.in.h: Likewise.
125576         * lib/mbchar.c: Likewise.
125577         * lib/mbchar.h: Likewise.
125578         * lib/mbfile.h: Likewise.
125579         * lib/mbiter.h: Likewise.
125580         * lib/mbscasecmp.c: Likewise.
125581         * lib/mbscasestr.c: Likewise.
125582         * lib/mbschr.c: Likewise.
125583         * lib/mbscspn.c: Likewise.
125584         * lib/mbslen.c: Likewise.
125585         * lib/mbsncasecmp.c: Likewise.
125586         * lib/mbsnlen.c: Likewise.
125587         * lib/mbspbrk.c: Likewise.
125588         * lib/mbspcasecmp.c: Likewise.
125589         * lib/mbsrchr.c: Likewise.
125590         * lib/mbssep.c: Likewise.
125591         * lib/mbsspn.c: Likewise.
125592         * lib/mbsstr.c: Likewise.
125593         * lib/mbstok_r.c: Likewise.
125594         * lib/mbswidth.c: Likewise.
125595         * lib/mbswidth.h: Likewise.
125596         * lib/mbuiter.h: Likewise.
125597         * lib/memcasecmp.c: Likewise.
125598         * lib/memcasecmp.h: Likewise.
125599         * lib/memchr.c: Likewise.
125600         * lib/memcmp.c: Likewise.
125601         * lib/memcoll.c: Likewise.
125602         * lib/memcoll.h: Likewise.
125603         * lib/memcpy.c: Likewise.
125604         * lib/memrchr.c: Likewise.
125605         * lib/mkancesdirs.c: Likewise.
125606         * lib/mkdir-p.c: Likewise.
125607         * lib/mkdir-p.h: Likewise.
125608         * lib/mkdir.c: Likewise.
125609         * lib/mkdirat.c: Likewise.
125610         * lib/mkdtemp.c: Likewise.
125611         * lib/mkstemp-safer.c: Likewise.
125612         * lib/mkstemp.c: Likewise.
125613         * lib/modechange.c: Likewise.
125614         * lib/modechange.h: Likewise.
125615         * lib/mountlist.c: Likewise.
125616         * lib/mountlist.h: Likewise.
125617         * lib/mpsort.c: Likewise.
125618         * lib/nanosleep.c: Likewise.
125619         * lib/obstack.c: Likewise.
125620         * lib/obstack.h: Likewise.
125621         * lib/open-safer.c: Likewise.
125622         * lib/open.c: Likewise.
125623         * lib/openat-die.c: Likewise.
125624         * lib/openat-priv.h: Likewise.
125625         * lib/openat-proc.c: Likewise.
125626         * lib/openat.c: Likewise.
125627         * lib/openat.h: Likewise.
125628         * lib/pagealign_alloc.c: Likewise.
125629         * lib/pagealign_alloc.h: Likewise.
125630         * lib/physmem.c: Likewise.
125631         * lib/physmem.h: Likewise.
125632         * lib/pipe-safer.c: Likewise.
125633         * lib/pipe.c: Likewise.
125634         * lib/pipe.h: Likewise.
125635         * lib/posixtm.c: Likewise.
125636         * lib/posixtm.h: Likewise.
125637         * lib/posixver.c: Likewise.
125638         * lib/printf-frexp.c: Likewise.
125639         * lib/printf-frexp.h: Likewise.
125640         * lib/printf-frexpl.c: Likewise.
125641         * lib/printf-frexpl.h: Likewise.
125642         * lib/printf.c: Likewise.
125643         * lib/progname.c: Likewise.
125644         * lib/progname.h: Likewise.
125645         * lib/progreloc.c: Likewise.
125646         * lib/putenv.c: Likewise.
125647         * lib/quote.c: Likewise.
125648         * lib/quote.h: Likewise.
125649         * lib/quotearg.c: Likewise.
125650         * lib/quotearg.h: Likewise.
125651         * lib/raise.c: Likewise.
125652         * lib/readline.c: Likewise.
125653         * lib/readline.h: Likewise.
125654         * lib/readlink.c: Likewise.
125655         * lib/readtokens.c: Likewise.
125656         * lib/readtokens.h: Likewise.
125657         * lib/readtokens0.c: Likewise.
125658         * lib/readtokens0.h: Likewise.
125659         * lib/readutmp.c: Likewise.
125660         * lib/readutmp.h: Likewise.
125661         * lib/realloc.c: Likewise.
125662         * lib/relocwrapper.c: Likewise.
125663         * lib/rename-dest-slash.c: Likewise.
125664         * lib/rename.c: Likewise.
125665         * lib/rmdir.c: Likewise.
125666         * lib/rpmatch.c: Likewise.
125667         * lib/safe-read.c: Likewise.
125668         * lib/safe-read.h: Likewise.
125669         * lib/safe-write.c: Likewise.
125670         * lib/safe-write.h: Likewise.
125671         * lib/same-inode.h: Likewise.
125672         * lib/same.c: Likewise.
125673         * lib/same.h: Likewise.
125674         * lib/save-cwd.c: Likewise.
125675         * lib/save-cwd.h: Likewise.
125676         * lib/savedir.c: Likewise.
125677         * lib/savedir.h: Likewise.
125678         * lib/savewd.c: Likewise.
125679         * lib/savewd.h: Likewise.
125680         * lib/search.in.h: Likewise.
125681         * lib/setenv.c: Likewise.
125682         * lib/setenv.h: Likewise.
125683         * lib/settime.c: Likewise.
125684         * lib/sh-quote.c: Likewise.
125685         * lib/sh-quote.h: Likewise.
125686         * lib/sig2str.c: Likewise.
125687         * lib/sig2str.h: Likewise.
125688         * lib/signal.in.h: Likewise.
125689         * lib/signbitd.c: Likewise.
125690         * lib/signbitf.c: Likewise.
125691         * lib/signbitl.c: Likewise.
125692         * lib/sigprocmask.c: Likewise.
125693         * lib/sincosl.c: Likewise.
125694         * lib/sleep.c: Likewise.
125695         * lib/sprintf.c: Likewise.
125696         * lib/sqrtl.c: Likewise.
125697         * lib/stat-time.h: Likewise.
125698         * lib/stdio--.h: Likewise.
125699         * lib/stdio-safer.h: Likewise.
125700         * lib/stdlib--.h: Likewise.
125701         * lib/stdlib-safer.h: Likewise.
125702         * lib/stdlib.in.h: Likewise.
125703         * lib/stpcpy.c: Likewise.
125704         * lib/stpncpy.c: Likewise.
125705         * lib/strchrnul.c: Likewise.
125706         * lib/strcspn.c: Likewise.
125707         * lib/strerror.c: Likewise.
125708         * lib/strftime.c: Likewise.
125709         * lib/strftime.h: Likewise.
125710         * lib/striconveh.c: Likewise.
125711         * lib/striconveh.h: Likewise.
125712         * lib/striconveha.c: Likewise.
125713         * lib/striconveha.h: Likewise.
125714         * lib/stripslash.c: Likewise.
125715         * lib/strnlen1.c: Likewise.
125716         * lib/strnlen1.h: Likewise.
125717         * lib/strtod.c: Likewise.
125718         * lib/strtoimax.c: Likewise.
125719         * lib/strtok_r.c: Likewise.
125720         * lib/strtol.c: Likewise.
125721         * lib/strtoll.c: Likewise.
125722         * lib/strtoul.c: Likewise.
125723         * lib/strtoull.c: Likewise.
125724         * lib/sysexits.in.h: Likewise.
125725         * lib/tempname.c: Likewise.
125726         * lib/tempname.h: Likewise.
125727         * lib/timespec.h: Likewise.
125728         * lib/tls.c: Likewise.
125729         * lib/tls.h: Likewise.
125730         * lib/tmpdir.c: Likewise.
125731         * lib/tmpdir.h: Likewise.
125732         * lib/tmpfile-safer.c: Likewise.
125733         * lib/tmpfile.c: Likewise.
125734         * lib/trigl.c: Likewise.
125735         * lib/trigl.h: Likewise.
125736         * lib/trim.c: Likewise.
125737         * lib/trim.h: Likewise.
125738         * lib/trunc.c: Likewise.
125739         * lib/truncf.c: Likewise.
125740         * lib/truncl.c: Likewise.
125741         * lib/tsearch.c: Likewise.
125742         * lib/unicodeio.c: Likewise.
125743         * lib/unicodeio.h: Likewise.
125744         * lib/unistd--.h: Likewise.
125745         * lib/unistd-safer.h: Likewise.
125746         * lib/unistdio/ulc-fprintf.c: Likewise.
125747         * lib/unistdio/ulc-vfprintf.c: Likewise.
125748         * lib/unlinkdir.c: Likewise.
125749         * lib/unlinkdir.h: Likewise.
125750         * lib/unlocked-io.h: Likewise.
125751         * lib/unsetenv.c: Likewise.
125752         * lib/userspec.c: Likewise.
125753         * lib/utime.c: Likewise.
125754         * lib/utimecmp.c: Likewise.
125755         * lib/utimecmp.h: Likewise.
125756         * lib/utimens.c: Likewise.
125757         * lib/verify.h: Likewise.
125758         * lib/verror.c: Likewise.
125759         * lib/verror.h: Likewise.
125760         * lib/version-etc-fsf.c: Likewise.
125761         * lib/version-etc.c: Likewise.
125762         * lib/version-etc.h: Likewise.
125763         * lib/vfprintf.c: Likewise.
125764         * lib/vprintf.c: Likewise.
125765         * lib/vsprintf.c: Likewise.
125766         * lib/w32spawn.h: Likewise.
125767         * lib/wait-process.c: Likewise.
125768         * lib/wait-process.h: Likewise.
125769         * lib/wcwidth.c: Likewise.
125770         * lib/write-any-file.c: Likewise.
125771         * lib/xalloc-die.c: Likewise.
125772         * lib/xalloc.h: Likewise.
125773         * lib/xasprintf.c: Likewise.
125774         * lib/xgetcwd.c: Likewise.
125775         * lib/xgetcwd.h: Likewise.
125776         * lib/xgetdomainname.c: Likewise.
125777         * lib/xgetdomainname.h: Likewise.
125778         * lib/xgethostname.c: Likewise.
125779         * lib/xmalloc.c: Likewise.
125780         * lib/xmalloca.c: Likewise.
125781         * lib/xmalloca.h: Likewise.
125782         * lib/xmemcoll.c: Likewise.
125783         * lib/xnanosleep.c: Likewise.
125784         * lib/xreadlink.c: Likewise.
125785         * lib/xreadlink.h: Likewise.
125786         * lib/xsetenv.c: Likewise.
125787         * lib/xsetenv.h: Likewise.
125788         * lib/xstriconv.c: Likewise.
125789         * lib/xstriconv.h: Likewise.
125790         * lib/xstrndup.c: Likewise.
125791         * lib/xstrndup.h: Likewise.
125792         * lib/xstrtod.c: Likewise.
125793         * lib/xstrtod.h: Likewise.
125794         * lib/xstrtol-error.c: Likewise.
125795         * lib/xstrtol.c: Likewise.
125796         * lib/xstrtol.h: Likewise.
125797         * lib/xtime.h: Likewise.
125798         * lib/xvasprintf.c: Likewise.
125799         * lib/xvasprintf.h: Likewise.
125800         * lib/yesno.c: Likewise.
125801         * lib/yesno.h: Likewise.
125802         * posix-modules: Likewise.
125803         * tests/test-alloca-opt.c: Likewise.
125804         * tests/test-arcfour.c: Likewise.
125805         * tests/test-arctwo.c: Likewise.
125806         * tests/test-argmatch.c: Likewise.
125807         * tests/test-argp-2.sh: Likewise.
125808         * tests/test-argp.c: Likewise.
125809         * tests/test-arpa_inet.c: Likewise.
125810         * tests/test-array_list.c: Likewise.
125811         * tests/test-array_oset.c: Likewise.
125812         * tests/test-atexit.c: Likewise.
125813         * tests/test-avltree_list.c: Likewise.
125814         * tests/test-avltree_oset.c: Likewise.
125815         * tests/test-avltreehash_list.c: Likewise.
125816         * tests/test-base64.c: Likewise.
125817         * tests/test-binary-io.c: Likewise.
125818         * tests/test-byteswap.c: Likewise.
125819         * tests/test-c-ctype.c: Likewise.
125820         * tests/test-c-strcasecmp.c: Likewise.
125821         * tests/test-c-strcasestr.c: Likewise.
125822         * tests/test-c-strncasecmp.c: Likewise.
125823         * tests/test-c-strstr.c: Likewise.
125824         * tests/test-canonicalize-lgpl.c: Likewise.
125825         * tests/test-canonicalize.c: Likewise.
125826         * tests/test-carray_list.c: Likewise.
125827         * tests/test-ceilf.c: Likewise.
125828         * tests/test-ceill.c: Likewise.
125829         * tests/test-count-one-bits.c: Likewise.
125830         * tests/test-crc.c: Likewise.
125831         * tests/test-dirname.c: Likewise.
125832         * tests/test-fbufmode.c: Likewise.
125833         * tests/test-fcntl.c: Likewise.
125834         * tests/test-fflush.c: Likewise.
125835         * tests/test-floorf.c: Likewise.
125836         * tests/test-floorl.c: Likewise.
125837         * tests/test-fopen.c: Likewise.
125838         * tests/test-fprintf-posix.c: Likewise.
125839         * tests/test-fprintf-posix.h: Likewise.
125840         * tests/test-fpurge.c: Likewise.
125841         * tests/test-freadable.c: Likewise.
125842         * tests/test-freadahead.c: Likewise.
125843         * tests/test-freading.c: Likewise.
125844         * tests/test-freopen.c: Likewise.
125845         * tests/test-frexp.c: Likewise.
125846         * tests/test-frexpl.c: Likewise.
125847         * tests/test-fseek.c: Likewise.
125848         * tests/test-fseeko.c: Likewise.
125849         * tests/test-fseterr.c: Likewise.
125850         * tests/test-fstrcmp.c: Likewise.
125851         * tests/test-ftell.c: Likewise.
125852         * tests/test-ftello.c: Likewise.
125853         * tests/test-fwritable.c: Likewise.
125854         * tests/test-fwriting.c: Likewise.
125855         * tests/test-getaddrinfo.c: Likewise.
125856         * tests/test-getpass.c: Likewise.
125857         * tests/test-gettimeofday.c: Likewise.
125858         * tests/test-hmac-md5.c: Likewise.
125859         * tests/test-hmac-sha1.c: Likewise.
125860         * tests/test-iconv.c: Likewise.
125861         * tests/test-iconvme.c: Likewise.
125862         * tests/test-inttypes.c: Likewise.
125863         * tests/test-isnan.c: Likewise.
125864         * tests/test-isnanf.c: Likewise.
125865         * tests/test-isnanl-nolibm.c: Likewise.
125866         * tests/test-isnanl.c: Likewise.
125867         * tests/test-isnanl.h: Likewise.
125868         * tests/test-ldexpl.c: Likewise.
125869         * tests/test-linked_list.c: Likewise.
125870         * tests/test-linkedhash_list.c: Likewise.
125871         * tests/test-locale.c: Likewise.
125872         * tests/test-localename.c: Likewise.
125873         * tests/test-lock.c: Likewise.
125874         * tests/test-lseek.c: Likewise.
125875         * tests/test-malloca.c: Likewise.
125876         * tests/test-math.c: Likewise.
125877         * tests/test-mbscasecmp.c: Likewise.
125878         * tests/test-mbscasestr1.c: Likewise.
125879         * tests/test-mbscasestr2.c: Likewise.
125880         * tests/test-mbscasestr3.c: Likewise.
125881         * tests/test-mbscasestr4.c: Likewise.
125882         * tests/test-mbschr.c: Likewise.
125883         * tests/test-mbscspn.c: Likewise.
125884         * tests/test-mbsncasecmp.c: Likewise.
125885         * tests/test-mbspbrk.c: Likewise.
125886         * tests/test-mbspcasecmp.c: Likewise.
125887         * tests/test-mbsrchr.c: Likewise.
125888         * tests/test-mbsspn.c: Likewise.
125889         * tests/test-mbsstr1.c: Likewise.
125890         * tests/test-mbsstr2.c: Likewise.
125891         * tests/test-mbsstr3.c: Likewise.
125892         * tests/test-md5.c: Likewise.
125893         * tests/test-memmem.c: Likewise.
125894         * tests/test-netinet_in.c: Likewise.
125895         * tests/test-open.c: Likewise.
125896         * tests/test-printf-frexp.c: Likewise.
125897         * tests/test-printf-frexpl.c: Likewise.
125898         * tests/test-printf-posix.c: Likewise.
125899         * tests/test-printf-posix.h: Likewise.
125900         * tests/test-rbtree_list.c: Likewise.
125901         * tests/test-rbtree_oset.c: Likewise.
125902         * tests/test-rbtreehash_list.c: Likewise.
125903         * tests/test-read-file.c: Likewise.
125904         * tests/test-rijndael.c: Likewise.
125905         * tests/test-search.c: Likewise.
125906         * tests/test-signbit.c: Likewise.
125907         * tests/test-sleep.c: Likewise.
125908         * tests/test-snprintf-posix.c: Likewise.
125909         * tests/test-snprintf-posix.h: Likewise.
125910         * tests/test-snprintf.c: Likewise.
125911         * tests/test-sprintf-posix.c: Likewise.
125912         * tests/test-sprintf-posix.h: Likewise.
125913         * tests/test-stat-time.c: Likewise.
125914         * tests/test-stdbool.c: Likewise.
125915         * tests/test-stdint.c: Likewise.
125916         * tests/test-stdio.c: Likewise.
125917         * tests/test-stdlib.c: Likewise.
125918         * tests/test-stpncpy.c: Likewise.
125919         * tests/test-strcasestr.c: Likewise.
125920         * tests/test-striconv.c: Likewise.
125921         * tests/test-striconveh.c: Likewise.
125922         * tests/test-striconveha.c: Likewise.
125923         * tests/test-string.c: Likewise.
125924         * tests/test-sys_select.c: Likewise.
125925         * tests/test-sys_socket.c: Likewise.
125926         * tests/test-sys_stat.c: Likewise.
125927         * tests/test-sys_time.c: Likewise.
125928         * tests/test-sysexits.c: Likewise.
125929         * tests/test-time.c: Likewise.
125930         * tests/test-tls.c: Likewise.
125931         * tests/test-trunc.c: Likewise.
125932         * tests/test-truncf.c: Likewise.
125933         * tests/test-truncl.c: Likewise.
125934         * tests/test-unistd.c: Likewise.
125935         * tests/test-vasnprintf-posix.c: Likewise.
125936         * tests/test-vasnprintf-posix2.c: Likewise.
125937         * tests/test-vasnprintf.c: Likewise.
125938         * tests/test-vasprintf-posix.c: Likewise.
125939         * tests/test-vasprintf.c: Likewise.
125940         * tests/test-verify.c: Likewise.
125941         * tests/test-vfprintf-posix.c: Likewise.
125942         * tests/test-vprintf-posix.c: Likewise.
125943         * tests/test-vsnprintf-posix.c: Likewise.
125944         * tests/test-vsnprintf.c: Likewise.
125945         * tests/test-vsprintf-posix.c: Likewise.
125946         * tests/test-wchar.c: Likewise.
125947         * tests/test-wctype.c: Likewise.
125948         * tests/test-wcwidth.c: Likewise.
125949         * tests/test-xstrtol.c: Likewise.
125950         * tests/test-xvasprintf.c: Likewise.
125951         * tests/uniconv/test-u16-conv-from-enc.c: Likewise.
125952         * tests/uniconv/test-u16-conv-to-enc.c: Likewise.
125953         * tests/uniconv/test-u16-strconv-from-enc.c: Likewise.
125954         * tests/uniconv/test-u16-strconv-to-enc.c: Likewise.
125955         * tests/uniconv/test-u32-conv-from-enc.c: Likewise.
125956         * tests/uniconv/test-u32-conv-to-enc.c: Likewise.
125957         * tests/uniconv/test-u32-strconv-from-enc.c: Likewise.
125958         * tests/uniconv/test-u32-strconv-to-enc.c: Likewise.
125959         * tests/uniconv/test-u8-conv-from-enc.c: Likewise.
125960         * tests/uniconv/test-u8-conv-to-enc.c: Likewise.
125961         * tests/uniconv/test-u8-strconv-from-enc.c: Likewise.
125962         * tests/uniconv/test-u8-strconv-to-enc.c: Likewise.
125963         * tests/uniname/test-uninames.c: Likewise.
125964         * tests/unistdio/test-u16-asnprintf1.c: Likewise.
125965         * tests/unistdio/test-u16-asnprintf1.h: Likewise.
125966         * tests/unistdio/test-u16-printf1.h: Likewise.
125967         * tests/unistdio/test-u16-vasnprintf1.c: Likewise.
125968         * tests/unistdio/test-u16-vasnprintf2.c: Likewise.
125969         * tests/unistdio/test-u16-vasnprintf3.c: Likewise.
125970         * tests/unistdio/test-u16-vasprintf1.c: Likewise.
125971         * tests/unistdio/test-u16-vsnprintf1.c: Likewise.
125972         * tests/unistdio/test-u16-vsprintf1.c: Likewise.
125973         * tests/unistdio/test-u32-asnprintf1.c: Likewise.
125974         * tests/unistdio/test-u32-asnprintf1.h: Likewise.
125975         * tests/unistdio/test-u32-printf1.h: Likewise.
125976         * tests/unistdio/test-u32-vasnprintf1.c: Likewise.
125977         * tests/unistdio/test-u32-vasnprintf2.c: Likewise.
125978         * tests/unistdio/test-u32-vasnprintf3.c: Likewise.
125979         * tests/unistdio/test-u32-vasprintf1.c: Likewise.
125980         * tests/unistdio/test-u32-vsnprintf1.c: Likewise.
125981         * tests/unistdio/test-u32-vsprintf1.c: Likewise.
125982         * tests/unistdio/test-u8-asnprintf1.c: Likewise.
125983         * tests/unistdio/test-u8-asnprintf1.h: Likewise.
125984         * tests/unistdio/test-u8-printf1.h: Likewise.
125985         * tests/unistdio/test-u8-vasnprintf1.c: Likewise.
125986         * tests/unistdio/test-u8-vasnprintf2.c: Likewise.
125987         * tests/unistdio/test-u8-vasnprintf3.c: Likewise.
125988         * tests/unistdio/test-u8-vasprintf1.c: Likewise.
125989         * tests/unistdio/test-u8-vsnprintf1.c: Likewise.
125990         * tests/unistdio/test-u8-vsprintf1.c: Likewise.
125991         * tests/unistdio/test-ulc-asnprintf1.c: Likewise.
125992         * tests/unistdio/test-ulc-asnprintf1.h: Likewise.
125993         * tests/unistdio/test-ulc-printf1.h: Likewise.
125994         * tests/unistdio/test-ulc-vasnprintf1.c: Likewise.
125995         * tests/unistdio/test-ulc-vasnprintf2.c: Likewise.
125996         * tests/unistdio/test-ulc-vasnprintf3.c: Likewise.
125997         * tests/unistdio/test-ulc-vasprintf1.c: Likewise.
125998         * tests/unistdio/test-ulc-vsnprintf1.c: Likewise.
125999         * tests/unistdio/test-ulc-vsprintf1.c: Likewise.
126000         * tests/uniwidth/test-u16-strwidth.c: Likewise.
126001         * tests/uniwidth/test-u16-width.c: Likewise.
126002         * tests/uniwidth/test-u32-strwidth.c: Likewise.
126003         * tests/uniwidth/test-u32-width.c: Likewise.
126004         * tests/uniwidth/test-u8-strwidth.c: Likewise.
126005         * tests/uniwidth/test-u8-width.c: Likewise.
126006         * tests/uniwidth/test-uc_width.c: Likewise.
126007         * config/srclist-update: Likewise.
126008         (fixlicense): Update to GPLv3+.
126010         Change copyright notice from LGPLv2.1+ to LGPLv3+.
126011         * tests/test-tsearch.c: Change copyright notice.
126013         Change copyright notice from LGPLv2.0+ to LGPLv3+.
126014         * lib/c-strcaseeq.h: Change copyright notice.
126015         * lib/streq.h: Likewise.
126016         * lib/uniconv.h: Likewise.
126017         * lib/uniconv/u-conv-from-enc.h: Likewise.
126018         * lib/uniconv/u-conv-to-enc.h: Likewise.
126019         * lib/uniconv/u-strconv-from-enc.h: Likewise.
126020         * lib/uniconv/u-strconv-to-enc.h: Likewise.
126021         * lib/uniconv/u16-conv-from-enc.c: Likewise.
126022         * lib/uniconv/u16-conv-to-enc.c: Likewise.
126023         * lib/uniconv/u16-strconv-from-enc.c: Likewise.
126024         * lib/uniconv/u16-strconv-from-locale.c: Likewise.
126025         * lib/uniconv/u16-strconv-to-enc.c: Likewise.
126026         * lib/uniconv/u16-strconv-to-locale.c: Likewise.
126027         * lib/uniconv/u32-conv-from-enc.c: Likewise.
126028         * lib/uniconv/u32-conv-to-enc.c: Likewise.
126029         * lib/uniconv/u32-strconv-from-enc.c: Likewise.
126030         * lib/uniconv/u32-strconv-from-locale.c: Likewise.
126031         * lib/uniconv/u32-strconv-to-enc.c: Likewise.
126032         * lib/uniconv/u32-strconv-to-locale.c: Likewise.
126033         * lib/uniconv/u8-conv-from-enc.c: Likewise.
126034         * lib/uniconv/u8-conv-to-enc.c: Likewise.
126035         * lib/uniconv/u8-strconv-from-enc.c: Likewise.
126036         * lib/uniconv/u8-strconv-from-locale.c: Likewise.
126037         * lib/uniconv/u8-strconv-to-enc.c: Likewise.
126038         * lib/uniconv/u8-strconv-to-locale.c: Likewise.
126039         * lib/uniname.h: Likewise.
126040         * lib/uniname/uniname.c: Likewise.
126041         * lib/unistdio.h: Likewise.
126042         * lib/unistdio/u-asnprintf.h: Likewise.
126043         * lib/unistdio/u-asprintf.h: Likewise.
126044         * lib/unistdio/u-printf-args.c: Likewise.
126045         * lib/unistdio/u-printf-args.h: Likewise.
126046         * lib/unistdio/u-printf-parse.h: Likewise.
126047         * lib/unistdio/u-snprintf.h: Likewise.
126048         * lib/unistdio/u-sprintf.h: Likewise.
126049         * lib/unistdio/u-vasprintf.h: Likewise.
126050         * lib/unistdio/u-vsnprintf.h: Likewise.
126051         * lib/unistdio/u-vsprintf.h: Likewise.
126052         * lib/unistdio/u16-asnprintf.c: Likewise.
126053         * lib/unistdio/u16-asprintf.c: Likewise.
126054         * lib/unistdio/u16-printf-parse.c: Likewise.
126055         * lib/unistdio/u16-snprintf.c: Likewise.
126056         * lib/unistdio/u16-sprintf.c: Likewise.
126057         * lib/unistdio/u16-u16-asnprintf.c: Likewise.
126058         * lib/unistdio/u16-u16-asprintf.c: Likewise.
126059         * lib/unistdio/u16-u16-snprintf.c: Likewise.
126060         * lib/unistdio/u16-u16-sprintf.c: Likewise.
126061         * lib/unistdio/u16-u16-vasnprintf.c: Likewise.
126062         * lib/unistdio/u16-u16-vasprintf.c: Likewise.
126063         * lib/unistdio/u16-u16-vsnprintf.c: Likewise.
126064         * lib/unistdio/u16-u16-vsprintf.c: Likewise.
126065         * lib/unistdio/u16-vasnprintf.c: Likewise.
126066         * lib/unistdio/u16-vasprintf.c: Likewise.
126067         * lib/unistdio/u16-vsnprintf.c: Likewise.
126068         * lib/unistdio/u16-vsprintf.c: Likewise.
126069         * lib/unistdio/u32-asnprintf.c: Likewise.
126070         * lib/unistdio/u32-asprintf.c: Likewise.
126071         * lib/unistdio/u32-printf-parse.c: Likewise.
126072         * lib/unistdio/u32-snprintf.c: Likewise.
126073         * lib/unistdio/u32-sprintf.c: Likewise.
126074         * lib/unistdio/u32-u32-asnprintf.c: Likewise.
126075         * lib/unistdio/u32-u32-asprintf.c: Likewise.
126076         * lib/unistdio/u32-u32-snprintf.c: Likewise.
126077         * lib/unistdio/u32-u32-sprintf.c: Likewise.
126078         * lib/unistdio/u32-u32-vasnprintf.c: Likewise.
126079         * lib/unistdio/u32-u32-vasprintf.c: Likewise.
126080         * lib/unistdio/u32-u32-vsnprintf.c: Likewise.
126081         * lib/unistdio/u32-u32-vsprintf.c: Likewise.
126082         * lib/unistdio/u32-vasnprintf.c: Likewise.
126083         * lib/unistdio/u32-vasprintf.c: Likewise.
126084         * lib/unistdio/u32-vsnprintf.c: Likewise.
126085         * lib/unistdio/u32-vsprintf.c: Likewise.
126086         * lib/unistdio/u8-asnprintf.c: Likewise.
126087         * lib/unistdio/u8-asprintf.c: Likewise.
126088         * lib/unistdio/u8-printf-parse.c: Likewise.
126089         * lib/unistdio/u8-snprintf.c: Likewise.
126090         * lib/unistdio/u8-sprintf.c: Likewise.
126091         * lib/unistdio/u8-u8-asnprintf.c: Likewise.
126092         * lib/unistdio/u8-u8-asprintf.c: Likewise.
126093         * lib/unistdio/u8-u8-snprintf.c: Likewise.
126094         * lib/unistdio/u8-u8-sprintf.c: Likewise.
126095         * lib/unistdio/u8-u8-vasnprintf.c: Likewise.
126096         * lib/unistdio/u8-u8-vasprintf.c: Likewise.
126097         * lib/unistdio/u8-u8-vsnprintf.c: Likewise.
126098         * lib/unistdio/u8-u8-vsprintf.c: Likewise.
126099         * lib/unistdio/u8-vasnprintf.c: Likewise.
126100         * lib/unistdio/u8-vasprintf.c: Likewise.
126101         * lib/unistdio/u8-vsnprintf.c: Likewise.
126102         * lib/unistdio/u8-vsprintf.c: Likewise.
126103         * lib/unistdio/ulc-asnprintf.c: Likewise.
126104         * lib/unistdio/ulc-asprintf.c: Likewise.
126105         * lib/unistdio/ulc-printf-parse.c: Likewise.
126106         * lib/unistdio/ulc-snprintf.c: Likewise.
126107         * lib/unistdio/ulc-sprintf.c: Likewise.
126108         * lib/unistdio/ulc-vasnprintf.c: Likewise.
126109         * lib/unistdio/ulc-vasprintf.c: Likewise.
126110         * lib/unistdio/ulc-vsnprintf.c: Likewise.
126111         * lib/unistdio/ulc-vsprintf.c: Likewise.
126112         * lib/unistr.h: Likewise.
126113         * lib/unistr/u-cpy-alloc.h: Likewise.
126114         * lib/unistr/u-cpy.h: Likewise.
126115         * lib/unistr/u-endswith.h: Likewise.
126116         * lib/unistr/u-move.h: Likewise.
126117         * lib/unistr/u-set.h: Likewise.
126118         * lib/unistr/u-startswith.h: Likewise.
126119         * lib/unistr/u-stpcpy.h: Likewise.
126120         * lib/unistr/u-stpncpy.h: Likewise.
126121         * lib/unistr/u-strcat.h: Likewise.
126122         * lib/unistr/u-strcpy.h: Likewise.
126123         * lib/unistr/u-strcspn.h: Likewise.
126124         * lib/unistr/u-strdup.h: Likewise.
126125         * lib/unistr/u-strlen.h: Likewise.
126126         * lib/unistr/u-strncat.h: Likewise.
126127         * lib/unistr/u-strncpy.h: Likewise.
126128         * lib/unistr/u-strnlen.h: Likewise.
126129         * lib/unistr/u-strpbrk.h: Likewise.
126130         * lib/unistr/u-strspn.h: Likewise.
126131         * lib/unistr/u-strstr.h: Likewise.
126132         * lib/unistr/u-strtok.h: Likewise.
126133         * lib/unistr/u16-check.c: Likewise.
126134         * lib/unistr/u16-chr.c: Likewise.
126135         * lib/unistr/u16-cmp.c: Likewise.
126136         * lib/unistr/u16-cpy-alloc.c: Likewise.
126137         * lib/unistr/u16-cpy.c: Likewise.
126138         * lib/unistr/u16-endswith.c: Likewise.
126139         * lib/unistr/u16-mblen.c: Likewise.
126140         * lib/unistr/u16-mbsnlen.c: Likewise.
126141         * lib/unistr/u16-mbtouc-aux.c: Likewise.
126142         * lib/unistr/u16-mbtouc-unsafe-aux.c: Likewise.
126143         * lib/unistr/u16-mbtouc-unsafe.c: Likewise.
126144         * lib/unistr/u16-mbtouc.c: Likewise.
126145         * lib/unistr/u16-mbtoucr.c: Likewise.
126146         * lib/unistr/u16-move.c: Likewise.
126147         * lib/unistr/u16-next.c: Likewise.
126148         * lib/unistr/u16-prev.c: Likewise.
126149         * lib/unistr/u16-set.c: Likewise.
126150         * lib/unistr/u16-startswith.c: Likewise.
126151         * lib/unistr/u16-stpcpy.c: Likewise.
126152         * lib/unistr/u16-stpncpy.c: Likewise.
126153         * lib/unistr/u16-strcat.c: Likewise.
126154         * lib/unistr/u16-strchr.c: Likewise.
126155         * lib/unistr/u16-strcmp.c: Likewise.
126156         * lib/unistr/u16-strcpy.c: Likewise.
126157         * lib/unistr/u16-strcspn.c: Likewise.
126158         * lib/unistr/u16-strdup.c: Likewise.
126159         * lib/unistr/u16-strlen.c: Likewise.
126160         * lib/unistr/u16-strmblen.c: Likewise.
126161         * lib/unistr/u16-strmbtouc.c: Likewise.
126162         * lib/unistr/u16-strncat.c: Likewise.
126163         * lib/unistr/u16-strncmp.c: Likewise.
126164         * lib/unistr/u16-strncpy.c: Likewise.
126165         * lib/unistr/u16-strnlen.c: Likewise.
126166         * lib/unistr/u16-strpbrk.c: Likewise.
126167         * lib/unistr/u16-strrchr.c: Likewise.
126168         * lib/unistr/u16-strspn.c: Likewise.
126169         * lib/unistr/u16-strstr.c: Likewise.
126170         * lib/unistr/u16-strtok.c: Likewise.
126171         * lib/unistr/u16-to-u32.c: Likewise.
126172         * lib/unistr/u16-to-u8.c: Likewise.
126173         * lib/unistr/u16-uctomb-aux.c: Likewise.
126174         * lib/unistr/u16-uctomb.c: Likewise.
126175         * lib/unistr/u32-check.c: Likewise.
126176         * lib/unistr/u32-chr.c: Likewise.
126177         * lib/unistr/u32-cmp.c: Likewise.
126178         * lib/unistr/u32-cpy-alloc.c: Likewise.
126179         * lib/unistr/u32-cpy.c: Likewise.
126180         * lib/unistr/u32-endswith.c: Likewise.
126181         * lib/unistr/u32-mblen.c: Likewise.
126182         * lib/unistr/u32-mbsnlen.c: Likewise.
126183         * lib/unistr/u32-mbtouc-unsafe.c: Likewise.
126184         * lib/unistr/u32-mbtouc.c: Likewise.
126185         * lib/unistr/u32-mbtoucr.c: Likewise.
126186         * lib/unistr/u32-move.c: Likewise.
126187         * lib/unistr/u32-next.c: Likewise.
126188         * lib/unistr/u32-prev.c: Likewise.
126189         * lib/unistr/u32-set.c: Likewise.
126190         * lib/unistr/u32-startswith.c: Likewise.
126191         * lib/unistr/u32-stpcpy.c: Likewise.
126192         * lib/unistr/u32-stpncpy.c: Likewise.
126193         * lib/unistr/u32-strcat.c: Likewise.
126194         * lib/unistr/u32-strchr.c: Likewise.
126195         * lib/unistr/u32-strcmp.c: Likewise.
126196         * lib/unistr/u32-strcpy.c: Likewise.
126197         * lib/unistr/u32-strcspn.c: Likewise.
126198         * lib/unistr/u32-strdup.c: Likewise.
126199         * lib/unistr/u32-strlen.c: Likewise.
126200         * lib/unistr/u32-strmblen.c: Likewise.
126201         * lib/unistr/u32-strmbtouc.c: Likewise.
126202         * lib/unistr/u32-strncat.c: Likewise.
126203         * lib/unistr/u32-strncmp.c: Likewise.
126204         * lib/unistr/u32-strncpy.c: Likewise.
126205         * lib/unistr/u32-strnlen.c: Likewise.
126206         * lib/unistr/u32-strpbrk.c: Likewise.
126207         * lib/unistr/u32-strrchr.c: Likewise.
126208         * lib/unistr/u32-strspn.c: Likewise.
126209         * lib/unistr/u32-strstr.c: Likewise.
126210         * lib/unistr/u32-strtok.c: Likewise.
126211         * lib/unistr/u32-to-u16.c: Likewise.
126212         * lib/unistr/u32-to-u8.c: Likewise.
126213         * lib/unistr/u32-uctomb.c: Likewise.
126214         * lib/unistr/u8-check.c: Likewise.
126215         * lib/unistr/u8-chr.c: Likewise.
126216         * lib/unistr/u8-cmp.c: Likewise.
126217         * lib/unistr/u8-cpy-alloc.c: Likewise.
126218         * lib/unistr/u8-cpy.c: Likewise.
126219         * lib/unistr/u8-endswith.c: Likewise.
126220         * lib/unistr/u8-mblen.c: Likewise.
126221         * lib/unistr/u8-mbsnlen.c: Likewise.
126222         * lib/unistr/u8-mbtouc-aux.c: Likewise.
126223         * lib/unistr/u8-mbtouc-unsafe-aux.c: Likewise.
126224         * lib/unistr/u8-mbtouc-unsafe.c: Likewise.
126225         * lib/unistr/u8-mbtouc.c: Likewise.
126226         * lib/unistr/u8-mbtoucr.c: Likewise.
126227         * lib/unistr/u8-move.c: Likewise.
126228         * lib/unistr/u8-next.c: Likewise.
126229         * lib/unistr/u8-prev.c: Likewise.
126230         * lib/unistr/u8-set.c: Likewise.
126231         * lib/unistr/u8-startswith.c: Likewise.
126232         * lib/unistr/u8-stpcpy.c: Likewise.
126233         * lib/unistr/u8-stpncpy.c: Likewise.
126234         * lib/unistr/u8-strcat.c: Likewise.
126235         * lib/unistr/u8-strchr.c: Likewise.
126236         * lib/unistr/u8-strcmp.c: Likewise.
126237         * lib/unistr/u8-strcpy.c: Likewise.
126238         * lib/unistr/u8-strcspn.c: Likewise.
126239         * lib/unistr/u8-strdup.c: Likewise.
126240         * lib/unistr/u8-strlen.c: Likewise.
126241         * lib/unistr/u8-strmblen.c: Likewise.
126242         * lib/unistr/u8-strmbtouc.c: Likewise.
126243         * lib/unistr/u8-strncat.c: Likewise.
126244         * lib/unistr/u8-strncmp.c: Likewise.
126245         * lib/unistr/u8-strncpy.c: Likewise.
126246         * lib/unistr/u8-strnlen.c: Likewise.
126247         * lib/unistr/u8-strpbrk.c: Likewise.
126248         * lib/unistr/u8-strrchr.c: Likewise.
126249         * lib/unistr/u8-strspn.c: Likewise.
126250         * lib/unistr/u8-strstr.c: Likewise.
126251         * lib/unistr/u8-strtok.c: Likewise.
126252         * lib/unistr/u8-to-u16.c: Likewise.
126253         * lib/unistr/u8-to-u32.c: Likewise.
126254         * lib/unistr/u8-uctomb-aux.c: Likewise.
126255         * lib/unistr/u8-uctomb.c: Likewise.
126256         * lib/unitypes.h: Likewise.
126257         * lib/uniwidth.h: Likewise.
126258         * lib/uniwidth/cjk.h: Likewise.
126259         * lib/uniwidth/u16-strwidth.c: Likewise.
126260         * lib/uniwidth/u16-width.c: Likewise.
126261         * lib/uniwidth/u32-strwidth.c: Likewise.
126262         * lib/uniwidth/u32-width.c: Likewise.
126263         * lib/uniwidth/u8-strwidth.c: Likewise.
126264         * lib/uniwidth/u8-width.c: Likewise.
126265         * lib/uniwidth/width.c: Likewise.
126267 2007-10-07  Bruno Haible  <bruno@clisp.org>
126269         * lib/inttypes.in.h: Change copyright notice from LGPL to GPL.
126270         The file is still under LGPL (see modules/inttypes).
126272 2007-10-06  Bruno Haible  <bruno@clisp.org>
126274         * modules/trunc (Dependencies): Add 'extensions'.
126275         * m4/trunc.m4 (gl_FUNC_TRUNC): Require gl_USE_SYSTEM_EXTENSIONS.
126276         Reported by Ben Pfaff <blp@gnu.org>.
126278 2007-10-06  Bruno Haible  <bruno@clisp.org>
126280         * modules/freopen-tests: New file.
126281         * tests/test-freopen.c: New file.
126283         * modules/fopen-tests: New file.
126284         * tests/test-fopen.c: New file.
126286         * modules/fopen: New file.
126287         * lib/fopen.c: New file.
126288         * m4/fopen.m4: New file.
126289         * modules/freopen: New file.
126290         * lib/freopen.c: New file.
126291         * m4/freopen.m4: New file.
126292         * lib/stdio.in.h (fopen, freopen): New declarations.
126293         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Initialize also GNULIB_FOPEN,
126294         GNULIB_FREOPEN, REPLACE_FOPEN, REPLACE_FREOPEN.
126295         * modules/stdio (Makefile.am): Substitute also GNULIB_FOPEN,
126296         GNULIB_FREOPEN, REPLACE_FOPEN, REPLACE_FREOPEN.
126297         * doc/functions/fopen.texi: Mention the 'fopen' module.
126298         * doc/functions/freopen.texi: Mention the 'freopen' module.
126300 2007-10-06  Bruno Haible  <bruno@clisp.org>
126302         * modules/open-tests: New file.
126303         * tests/test-open.c: New file.
126305         * modules/open: New file.
126306         * lib/open.c: New file.
126307         * m4/open.m4: New file.
126308         * lib/fchdir.c (open): If the gnulib module 'open' is used, do what
126309         lib/open.c does.
126310         * lib/fcntl.in.h (open): Declare also if replaced by the 'open' module.
126311         * m4/fcntl_h.m4 (gl_FCNTL_MODULE_INDICATOR, gl_FCNTL_H_DEFAULTS): New
126312         macros.
126313         (gl_FCNTL_H): Require gl_FCNTL_H_DEFAULTS.
126314         * modules/fcntl (Makefile.am): Also substitute GNULIB_OPEN and
126315         REPLACE_OPEN.
126316         * doc/functions/open.texi: Mention the 'open' module.
126318 2007-10-04  Bruno Haible  <bruno@clisp.org>
126320         * modules/ceill-tests: New file.
126321         * tests/test-ceill.c: New file.
126323         * modules/ceill: New file.
126324         * lib/ceill.c: Replace entire file.
126325         * m4/ceill.m4: New file.
126326         * lib/math.in.h (ceill): Replace declaration.
126327         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_CEILL.
126328         * modules/math (Makefile.am): Substitute also GNULIB_CEILL.
126329         * doc/functions/ceill.texi: Mention the 'ceill' module.
126330         * modules/mathl (Files): Remove lib/ceill.c.
126331         (Depends-on): Add ceill.
126333 2007-10-04  Bruno Haible  <bruno@clisp.org>
126335         * modules/ceilf-tests: New file.
126336         * tests/test-ceilf.c: New file.
126338         * modules/ceilf: New file.
126339         * lib/ceil.c: New file.
126340         * lib/ceilf.c: New file.
126341         * m4/ceilf.m4: New file.
126342         * lib/math.in.h (ceilf): New declaration.
126343         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_CEILF and
126344         HAVE_DECL_CEILF.
126345         * modules/math (Makefile.am): Substitute also GNULIB_CEILF and
126346         HAVE_DECL_CEILF.
126347         * doc/functions/ceilf.texi: Mention the 'ceilf' module.
126349 2007-10-04  Bruno Haible  <bruno@clisp.org>
126351         * modules/floorl-tests: New file.
126352         * tests/test-floorl.c: New file.
126354         * modules/floorl: New file.
126355         * lib/floorl.c: Replace entire file.
126356         * m4/floorl.m4: New file.
126357         * lib/math.in.h (floorl): Replace declaration.
126358         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_FLOORL.
126359         * modules/math (Makefile.am): Substitute also GNULIB_FLOORL.
126360         * doc/functions/floorl.texi: Mention the 'floorl' module.
126361         * modules/mathl (Files): Remove lib/floorl.c.
126362         (Depends-on): Add floorl.
126364 2007-10-04  Bruno Haible  <bruno@clisp.org>
126366         * modules/floorf-tests: New file.
126367         * tests/test-floorf.c: New file.
126369         * modules/floorf: New file.
126370         * lib/floor.c: New file.
126371         * lib/floorf.c: New file.
126372         * m4/floorf.m4: New file.
126373         * lib/math.in.h (floorf): New declaration.
126374         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_FLOORF and
126375         HAVE_DECL_FLOORF.
126376         * modules/math (Makefile.am): Substitute also GNULIB_FLOORF and
126377         HAVE_DECL_FLOORF.
126378         * doc/functions/floorf.texi: Mention the 'floorf' module.
126380 2007-10-04  Benoit Sigoure  <tsuna@lrde.epita.fr>
126381             Bruno Haible  <bruno@clisp.org>
126383         Advertise for the Git server instead of the CVS server.
126384         * doc/gnulib-intro.texi (Steady Development): Mention the Git
126385         repository instead of the CVS one.
126386         * doc/gnulib-tool.texi (VCS Issues): Renamed from "CVS Issues". Talk
126387         about all VCS systems generically.
126388         * doc/gnulib.texi (Introduction): Capitalize `Git'.
126390 2007-10-04  Bruno Haible  <bruno@clisp.org>
126392         * doc/gnulib.texi (Function Substitutes): Explain what an absent module
126393         means.
126394         Reported by Benoît Sigoure <tsuna@lrde.epita.fr>.
126396 2007-10-04  Bruno Haible  <bruno@clisp.org>
126398         * modules/truncl-tests: New file.
126399         * tests/test-truncl.c: New file.
126401         * modules/truncl: New file.
126402         * lib/truncl.c: New file.
126403         * m4/truncl.m4: New file.
126404         * lib/math.in.h (truncl): New declaration.
126405         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_TRUNCL and
126406         HAVE_DECL_TRUNCL.
126407         * modules/math (Makefile.am): Substitute also GNULIB_TRUNCL and
126408         HAVE_DECL_TRUNCL.
126409         * doc/functions/truncl.texi: Mention the 'truncl' module.
126411 2007-10-04  Bruno Haible  <bruno@clisp.org>
126413         * modules/truncf-tests: New file.
126414         * tests/test-truncf.c: New file.
126416         * modules/truncf: New file.
126417         * lib/trunc.c: Make paramerizable through USE_* macros.
126418         * lib/truncf.c: New file.
126419         * m4/truncf.m4: New file.
126420         * lib/math.in.h (truncf): New declaration.
126421         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_TRUNCF and
126422         HAVE_DECL_TRUNCF.
126423         * modules/math (Makefile.am): Substitute also GNULIB_TRUNCF and
126424         HAVE_DECL_TRUNCF.
126425         * doc/functions/truncf.texi: Mention the 'truncf' module.
126427 2007-10-03  Bruno Haible  <bruno@clisp.org>
126429         * gnulib-tool (func_get_automake_snippet): Synthesize an EXTRA_DIST
126430         augmentation also for tests modules.
126431         * modules/argp-tests (Makefile.am): Remove EXTRA_DIST augmentation.
126432         * modules/atexit-tests (Makefile.am): Likewise.
126433         * modules/binary-io-tests (Makefile.am): Likewise.
126434         * modules/c-strcase-tests (Makefile.am): Likewise.
126435         * modules/canonicalize-lgpl-tests (Makefile.am): Likewise.
126436         * modules/canonicalize-tests (Makefile.am): Likewise.
126437         * modules/closein-tests (Makefile.am): Likewise.
126438         * modules/fprintf-posix-tests (Makefile.am): Likewise.
126439         * modules/freadahead-tests (Makefile.am): Likewise.
126440         * modules/fseek-tests (Makefile.am): Likewise.
126441         * modules/fseeko-tests (Makefile.am): Likewise.
126442         * modules/ftell-tests (Makefile.am): Likewise.
126443         * modules/ftello-tests (Makefile.am): Likewise.
126444         * modules/isnanl-nolibm-tests (Makefile.am): Likewise.
126445         * modules/isnanl-tests (Makefile.am): Likewise.
126446         * modules/lseek-tests (Makefile.am): Likewise.
126447         * modules/mbscasecmp-tests (Makefile.am): Likewise.
126448         * modules/mbscasestr-tests (Makefile.am): Likewise.
126449         * modules/mbschr-tests (Makefile.am): Likewise.
126450         * modules/mbscspn-tests (Makefile.am): Likewise.
126451         * modules/mbsncasecmp-tests (Makefile.am): Likewise.
126452         * modules/mbspbrk-tests (Makefile.am): Likewise.
126453         * modules/mbspcasecmp-tests (Makefile.am): Likewise.
126454         * modules/mbsrchr-tests (Makefile.am): Likewise.
126455         * modules/mbsspn-tests (Makefile.am): Likewise.
126456         * modules/mbsstr-tests (Makefile.am): Likewise.
126457         * modules/printf-posix-tests (Makefile.am): Likewise.
126458         * modules/snprintf-posix-tests (Makefile.am): Likewise.
126459         * modules/sprintf-posix-tests (Makefile.am): Likewise.
126460         * modules/tsearch-tests (Makefile.am): Likewise.
126461         * modules/uniname/uniname-tests (Makefile.am): Likewise.
126462         * modules/unistdio/u16-vasnprintf-tests (Makefile.am): Likewise.
126463         * modules/unistdio/u32-vasnprintf-tests (Makefile.am): Likewise.
126464         * modules/unistdio/u8-vasnprintf-tests (Makefile.am): Likewise.
126465         * modules/unistdio/ulc-vasnprintf-tests (Makefile.am): Likewise.
126466         * modules/vasnprintf-posix-tests (Makefile.am): Likewise.
126467         * modules/vfprintf-posix-tests (Makefile.am): Likewise.
126468         * modules/vprintf-posix-tests (Makefile.am): Likewise.
126469         * modules/vsnprintf-posix-tests (Makefile.am): Likewise.
126470         * modules/vsprintf-posix-tests (Makefile.am): Likewise.
126471         * modules/xstrtoimax-tests (Makefile.am): Likewise.
126472         * modules/xstrtol-tests (Makefile.am): Likewise.
126473         * modules/xstrtoumax-tests (Makefile.am): Likewise.
126474         * modules/yesno-tests (Makefile.am): Likewise.
126476 2007-10-03  Bruno Haible  <bruno@clisp.org>
126478         * modules/trunc-tests: New file.
126479         * tests/test-trunc.c: New file.
126481         * modules/trunc: New file.
126482         * lib/trunc.c: New file.
126483         * m4/trunc.m4: New file.
126484         * lib/math.in.h (trunc): New declaration.
126485         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_TRUNC and
126486         HAVE_DECL_TRUNC.
126487         * modules/math (Makefile.am): Substitute also GNULIB_TRUNC and
126488         HAVE_DECL_TRUNC.
126489         * doc/functions/trunc.texi: Mention the 'trunc' module.
126491 2007-10-03  Bruno Haible  <bruno@clisp.org>
126493         * tests/test-fpending.c: New file, mostly copied
126494         from coreutils/lib/t-fpending.c.
126495         * modules/fpending-tests: New file.
126497 2007-10-03  Bruno Haible  <bruno@clisp.org>
126499         Port the stdio extensions to QNX (untested).
126500         * lib/fseterr.c (fseterr): Add support for QNX.
126501         * lib/fbufmode.c (fbufmode): Likewise.
126502         * lib/freadable.c (freadable): Likewise.
126503         * lib/fwritable.c (fwritable): Likewise.
126504         * lib/freading.c (freading): Likewise.
126505         * lib/fwriting.c (fwriting): Likewise.
126506         * lib/freadahead.c (freadahed): Likewise.
126507         * lib/fpurge.c (fpurge): Likewise.
126508         * lib/fseeko.c (rpl_fseeko): Likewise.
126510 2007-10-03  Bruno Haible  <bruno@clisp.org>
126511             Jim Meyering  <jim@meyering.net>
126512             Eric Blake  <ebb9@byu.net>
126514         * doc/relocatable.texi: Use @command instead of @program.
126516 2007-10-02  Jim Meyering  <jim@meyering.net>
126518         Perform one more "_.h" -> ".in.h" substitution.
126519         * modules/unistd (Makefile.am) [unistd.h]: Use unistd.h.in
126520         instead of unistd_.h here, too.
126522 2007-10-01  Bruno Haible  <bruno@clisp.org>
126524         * gnulib-tool (func_emit_initmacro_done): Special case for alloca.c.
126525         Needed for the alloca-opt module.
126527 2007-09-30  Bruno Haible  <bruno@clisp.org>
126529         * lib/alloca.in.h: Renamed from lib/alloca_.h.
126530         * modules/alloca-opt (Files, Makefile.am): Use alloca.in.h instead of
126531         alloca_.h.
126532         * lib/argz.in.h: Renamed from lib/argz_.h.
126533         * modules/argz (Files, Makefile.am): Use argz.in.h instead of argz_.h.
126534         * lib/byteswap.in.h: Renamed from lib/byteswap_.h.
126535         * modules/byteswap (Files, Makefile.am): Use byteswap.in.h instead of
126536         byteswap_.h.
126537         * lib/dirent.in.h: Renamed from lib/dirent_.h.
126538         * modules/fchdir (Files, Makefile.am): Use dirent.in.h instead of
126539         dirent_.h.
126540         * lib/fcntl.in.h: Renamed from lib/fcntl_.h.
126541         * modules/fcntl (Files, Makefile.am): Use fcntl.in.h instead of
126542         fcntl_.h.
126543         * lib/float.in.h: Renamed from lib/float_.h.
126544         * modules/float (Files, Makefile.am): Use float.in.h instead of
126545         float_.h.
126546         * lib/fnmatch.in.h: Renamed from lib/fnmatch_.h.
126547         * modules/fnmatch (Files, Makefile.am): Use fnmatch.in.h instead of
126548         fnmatch_.h.
126549         * lib/getopt.in.h: Renamed from lib/getopt_.h.
126550         * modules/getopt (Files, Makefile.am): Use getopt.in.h instead of
126551         getopt_.h.
126552         * lib/glob.in.h: Renamed from lib/glob_.h.
126553         * modules/glob (Files, Makefile.am): Use glob.in.h instead of glob_.h.
126554         * lib/iconv.in.h: Renamed from lib/iconv_.h.
126555         * modules/iconv_open (Files, Makefile.am): Use iconv.in.h instead of
126556         iconv_.h.
126557         * lib/inttypes.in.h: Renamed from lib/inttypes_.h.
126558         * modules/inttypes (Files, Makefile.am): Use inttypes.in.h instead of
126559         inttypes_.h.
126560         * lib/locale.in.h: Renamed from lib/locale_.h.
126561         * modules/locale (Files, Makefile.am): Use locale.in.h instead of
126562         locale_.h.
126563         * lib/math.in.h: Renamed from lib/math_.h.
126564         * modules/math (Files, Makefile.am): Use math.in.h instead of math_.h.
126565         * lib/netinet_in.in.h: Renamed from lib/netinet_in_.h.
126566         * modules/netinet_in (Files, Makefile.am): Use netinet_in.in.h instead
126567         of netinet_in_.h. Add dependency.
126568         * lib/poll.in.h: Renamed from lib/poll_.h.
126569         * modules/poll (Files, Makefile.am): Use poll.in.h instead of poll_.h.
126570         * lib/search.in.h: Renamed from lib/search_.h.
126571         * modules/search (Files, Makefile.am): Use search.in.h instead of
126572         search_.h.
126573         * lib/signal.in.h: Renamed from lib/signal_.h.
126574         * modules/signal (Files, Makefile.am): Use signal.in.h instead of
126575         _signal.h.
126576         * lib/stdbool.in.h: Renamed from lib/stdbool_.h.
126577         * modules/stdbool (Files, Makefile.am): Use stdbool.in.h instead of
126578         stdbool_.h.
126579         * lib/stdint.in.h: Renamed from lib/stdint_.h.
126580         * modules/stdint (Files, Makefile.am): Use stdint.in.h instead of
126581         stdint_.h.
126582         * lib/stdio.in.h: Renamed from lib/stdio_.h.
126583         * modules/stdio (Files, Makefile.am): Use stdio.in.h instead of
126584         stdio_.h.
126585         * lib/stdlib.in.h: Renamed from lib/stdlib_.h.
126586         * modules/stdlib (Files, Makefile.am): Use stdlib.in.h instead of
126587         stdlib_.h.
126588         * lib/string.in.h: Renamed from lib/string_.h.
126589         * modules/string (Files, Makefile.am): Use string.in.h instead of
126590         string_.h.
126591         * doc/gnulib-tool.texi (Initial import): Update.
126592         * lib/sys_select.in.h: Renamed from lib/sys_select_.h.
126593         * modules/sys_select (Files, Makefile.am): Use sys_select.in.h instead
126594         of sys_select_.h. Add dependency.
126595         * lib/sys_socket.in.h: Renamed from lib/sys_socket_.h.
126596         * modules/sys_socket (Files, Makefile.am): Use sys_socket.in.h instead
126597         of sys_socket_.h.
126598         * lib/sys_stat.in.h: Renamed from lib/sys_stat_.h.
126599         * modules/sys_stat (Files, Makefile.am): Use sys_stat.in.h instead of
126600         sys_stat_.h.
126601         * lib/sys_time.in.h: Renamed from lib/sys_time_.h.
126602         * modules/sys_time (Files, Makefile.am): Use sys_time.in.h instead of
126603         sys_time_.h.
126604         * lib/sysexits.in.h: Renamed from lib/sysexits_.h.
126605         * modules/sysexits (Files, Makefile.am): Use sysexits.in.h instead of
126606         sysexits_.h.
126607         * lib/time.in.h: Renamed from lib/time_.h.
126608         * modules/time (Files, Makefile.am): Use time.in.h instead of time_.h.
126609         * lib/unistd.in.h: Renamed from lib/unistd_.h.
126610         * modules/unistd (Files, Makefile.am): Use unistd.in.h instead of
126611         unistd_.h.
126612         * lib/wchar.in.h: Renamed from lib/wchar_.h.
126613         * modules/wchar (Files, Makefile.am): Use wchar.in.h instead of
126614         wchar_.h.
126615         * lib/wctype.in.h: Renamed from lib/wctype_.h.
126616         * modules/wctype (Files, Makefile.am): Use wctype.in.h instead of
126617         wctype_.h.
126618         * build-aux/bootstrap (slurp): Update.
126619         * lib/.cppi-disable: Update.
126621 2007-09-30  Bruno Haible  <bruno@clisp.org>
126623         * tests/test-getaddrinfo.c (AF_UNSPEC): Provide a fallback definition.
126624         Needed on BeOS.
126626 2007-09-30  Bruno Haible  <bruno@clisp.org>
126628         * modules/dirname-tests (check_PROGRAMS): Renamed from noinst_PROGRAMS.
126630 2007-09-29  Bruno Haible  <bruno@clisp.org>
126632         * lib/stdio_.h (getdelim, getline): Add identifiers. Doc tweak.
126634 2007-09-29  Bruno Haible  <bruno@clisp.org>
126636         * lib/xreadlink.c (xreadlink): Simplify to a wrapper around areadlink.
126637         * modules/xreadlink (Depends-on): Add areadlink, remove readlink etc.
126638         * build-aux/install-reloc: Compile also areadlink.c.
126639         * modules/relocatable-prog-wrapper (Files): Add lib/areadlink.[hc].
126641 2007-09-29  Bruno Haible  <bruno@clisp.org>
126643         * gnulib-tool (func_emit_initmacro_done): Indentation.
126645 2007-09-29  Bruno Haible  <bruno@clisp.org>
126647         * README: Add CVS checkout update instructions.
126648         Info from Bob Proulx <bob@proulx.com>.
126650 2007-09-28  Eric Blake  <ebb9@byu.net>
126652         Provide move-if-change.
126653         * build-aux/move-if-change: New file, based on best practice
126654         rather than any canonical upstream location.
126656 2007-09-28  Jim Meyering  <jim@meyering.net>
126658         Fix canonicalize loop-detection corner case.
126659         Do not attempt to stat the symlink values stored via seen_triple.
126660         Without this, coreutils' tests/misc/readlink-fp-loop test would fail
126661         on linux-2.6.18, (but not 2.6.22).
126662         * lib/canonicalize.c (seen_triple): Use triple_compare_ino_str, not
126663         triple_compare.  The former compares dev,ino,filename, while the latter
126664         would actually stat dirname(filename) when dev and ino were equal.
126665         * lib/hash-triple.c: Install <string.h>.
126666         (STREQ): Define.
126667         (triple_compare_ino_str): New function.
126668         * lib/hash-triple.h (triple_compare_ino_str): Declare it.
126670 2007-09-28  Eric Blake  <ebb9@byu.net>
126672         Enforce that AC_REPLACE_FUNCS files exist.
126673         * gnulib-tool (func_emit_initmacro_done): Make AC_LIBSOURCES
126674         override check for typos.
126676         Fix test-closein on Solaris 10.
126677         * tests/test-closein.c (main): Don't assume stdin can be inherited
126678         closed on all systems.
126679         * tests/test-closein.sh: Likewise.
126680         Reported by Piotr Tarnowski.
126682 2007-09-28  Jim Meyering  <jim@meyering.net>
126684         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Fix typo in comment.
126686 2007-09-27  Jim Meyering  <jim@meyering.net>
126688         canonicalize: Avoid a false-positive cycle failure.
126689         * modules/canonicalize (Depends-on): Add file-set and hash-triple.
126690         Sort.  Remove cycle-check.
126691         * lib/canonicalize.c: Include file-set.h and hash-triple.h,
126692         not cycle-check.h.
126693         (seen_triple): New function.
126694         (canonicalize_filename_mode): Use it instead of cycle-check.
126695         * tests/test-canonicalize.c: Add a test for this bug.
126696         * tests/test-canonicalize.sh: Set up and run the test.
126698         New module, file-set, from coreutils.
126699         * modules/file-set: Define it.
126700         * lib/file-set.c, lib/file-set.h: Implement.
126702         New module, hash-triple, from coreutils.
126703         * modules/hash-triple: Define it.
126704         * lib/hash-triple.c, lib/hash-triple.h: Implement.
126706 2007-09-25  Eric Blake  <ebb9@byu.net>
126708         Fix strerror on Interix.
126709         * lib/string_.h (strerror): Declare replacement.
126710         * doc/functions/strerror.texi (strerror): Document the Interix
126711         shortcoming.
126712         * modules/string (Makefile.am): Support new hooks.
126713         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Add new hooks.
126714         * m4/strerror.m4 (gl_FUNC_STRERROR): Defer to
126715         gl_FUNC_STRERROR_SEPARATE.
126716         (gl_FUNC_STRERROR_SEPARATE): Check for Interix bug.
126717         * lib/strerror.c (rpl_strerror): Provide replacement.
126718         * modules/strerror (Depends-on): Add string.
126719         (configure.ac): Detect use of module.
126720         * tests/test-strerror.c: New file.
126721         * modules/strerror-tests: New test module.
126722         * modules/argp (Depends-on): Add strerror.
126723         * modules/error (Depends-on): Likewise.
126724         Reported by Martin Koeppe.
126726 2007-09-24  Bruno Haible  <bruno@clisp.org>
126728         * README: Update git instructions.
126730 2007-09-24  Eric Blake  <ebb9@byu.net>
126732         Revert fpending breakage from 2007-09-08.
126733         * m4/fpending.m4 (gl_FUNC_FPENDING): Don't require existence of
126734         __fpending.c.
126736 2007-09-24  Jim Meyering  <jim@meyering.net>
126738         filenamecat.c: Add a test.
126739         * lib/filenamecat.c (main) [TEST_FILE_NAME_CONCAT]: Add a test
126740         showing how the function works when DIR is the empty string.
126742 2007-09-21  Simon Josefsson  <simon@josefsson.org>
126744         * tests/test-canonicalize.sh: Turn on executable bit.
126746 2007-09-19  Eric Blake  <ebb9@byu.net>
126748         * README: Update CVS instructions.
126750 2007-09-18  Bruno Haible  <bruno@clisp.org>
126752         * modules/areadlink: New file.
126753         * lib/areadlink.h (areadlink): New declaration.
126754         * lib/areadlink.c: New file, based on lib/xreadlink.c.
126756 2007-09-17  Jim Meyering  <jim@meyering.net>
126758         * lib/savewd.c (ESTALE) [!defined]: Define.
126759         Reported to be required on Interix by Martin Koeppe.
126761 2007-09-17  Bruno Haible  <bruno@clisp.org>
126763         * gnulib-tool (func_version): Use $version.
126765 2007-09-16  Bruno Haible  <bruno@clisp.org>
126767         * m4/printf.m4 (gl_PRINTF_LONG_DOUBLE, gl_PRINTF_INFINITE,
126768         gl_PRINTF_INFINITE_LONG_DOUBLE): Increase buf's size from 100 to 10000.
126769         Needed on glibc-2.6.1 with -fstack-protector -D_FORTIFY_SOURCE=2.
126770         Reported by Greg Schafer <gschafer@zip.com.au>.
126772 2007-09-15  Bruno Haible  <bruno@clisp.org>
126774         * gnulib-tool (sed): Try a little harder to make bash understand the
126775         alias.
126776         Reported by Bruce Korb <bruce.korb@gmail.com>.
126778 2007-09-13  Eric Blake  <ebb9@byu.net>
126780         * ChangeLog: Remove conflict markers.
126782 2007-09-13  Simon Josefsson  <simon@josefsson.org>
126784         * lib/gc-gnulib.c (gc_hash_open): Catch NULL calloc return value.
126785         Reported by Bruno Haible <bruno@clisp.org>.
126787 2007-09-12  Bruno Haible  <bruno@clisp.org>
126789         * m4/lock.m4: Don't provide an AC_USE_SYSTEM_EXTENSIONS definition.
126790         (gl_LOCK_EARLY_BODY): Use AC_GNU_SOURCE when AC_USE_SYSTEM_EXTENSIONS
126791         is not defined.
126793 2007-09-12  Eric Blake  <ebb9@byu.net>
126795         Track CVS Autoconf on AC_USE_SYSTEM_EXTENSIONS.
126796         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Update to CVS
126797         Autoconf definition.
126798         * modules/euidaccess (Depends-on): Add extensions, for
126799         AC_USE_SYSTEM_EXTENSIONS with autoconf <= 2.59.
126800         * modules/fnmatch (Depends-on): Likewise.
126801         * modules/getaddrinfo (Depends-on): Likewise.
126802         * modules/getdelim (Depends-on): Likewise.
126803         * modules/getline (Depends-on): Likewise.
126804         * modules/getsubopt (Depends-on): Likewise.
126805         * modules/gettext (Depends-on): Likewise.
126806         * modules/group-member (Depends-on): Likewise.
126807         * modules/mbchar (Depends-on): Likewise.
126808         * modules/memmem (Depends-on): Likewise.
126809         * modules/mempcpy (Depends-on): Likewise.
126810         * modules/memrchr (Depends-on): Likewise.
126811         * modules/pagealign_alloc (Depends-on): Likewise.
126812         * modules/readutmp (Depends-on): Likewise.
126813         * modules/stpcpy (Depends-on): Likewise.
126814         * modules/stpncpy (Depends-on): Likewise.
126815         * modules/strchrnul (Depends-on): Likewise.
126816         * modules/strndup (Depends-on): Likewise.
126817         * modules/strsep (Depends-on): Likewise.
126818         * modules/strverscmp (Depends-on): Likewise.
126819         * modules/vasprintf (Depends-on): Likewise.
126820         * modules/wcwidth (Depends-on): Likewise.
126821         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): AC_GNU_SOURCE will be
126822         obsolete in Autoconf 2.62; use AC_USE_SYSTEM_EXTENSIONS instead.
126823         * m4/fnmatch.m4 (gl_FUNC_FNMATCH_GNU): Likewise.
126824         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDR_INFO): Likewise.
126825         * m4/getdelim.m4 (gl_FUNC_GETDELIM): Likewise.
126826         * m4/getline.m4 (gl_FUNC_GETLINE): Likewise.
126827         * m4/getsubopt.m4 (gl_FUNC_GETSUBOPT): Likewise.
126828         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
126829         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER): Likewise.
126830         * m4/mbchar.m4 (gl_MBCHAR): Likewise.
126831         * m4/memmem.m4 (gl_FUNC_MEMMEM): Likewise.
126832         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Likewise.
126833         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Likewise.
126834         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Likewise.
126835         * m4/pagealign_alloc.m4 (gl_PAGEALIGN_ALLOC): Likewise.
126836         * m4/readutmp.m4 (gl_READUTMP): Likewise.
126837         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
126838         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Likewise.
126839         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
126840         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Likewise.
126841         * m4/strndup.m4 (gl_FUNC_STRNDUP): Likewise.
126842         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Likewise.
126843         * m4/strsep.m4 (gl_FUNC_STRSEP): Likewise.
126844         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP): Likewise.
126845         * m4/vasprintf.m4 (gl_PREREQ_VASPRINTF_H): Likewise.
126846         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
126847         * m4/lock.m4 (gl_LOCK_EARLY_BODY): Likewise, but provide fallback,
126848         so that lock.m4 can be used in gettext without extensions module.
126850 2007-09-11  Bruno Haible  <bruno@clisp.org>
126852         * m4/isc-posix.m4: Remove file.
126853         Suggested by Eric Blake.
126855 2007-09-11  Eric Blake  <ebb9@byu.net>
126857         * ChangeLog: Restore lines accidentally truncated 2007-04-06.
126859 2007-09-10  Bruno Haible  <bruno@clisp.org>
126861         * posix-modules: Fix typo in error message.
126862         Reported by Matt <mkraai@beckman.com>.
126864 2007-09-09  Bruno Haible  <bruno@clisp.org>
126866         * doc/functions/getdelim.texi: Update list of platforms lacking the
126867         function.
126868         * doc/functions/getline.texi: Likewise.
126870 2007-09-09  Jim Meyering  <jim@meyering.net>
126872         * lib/hash.c (hash_initialize): Detect calloc failure.
126873         Reported by Bruno Haible.
126875 2007-09-09  Bruno Haible  <bruno@clisp.org>
126877         * lib/canonicalize-lgpl.c (__realpath): Set errno to ENOMEM when
126878         malloc or realloc fails.
126880 2007-09-09  Bruno Haible  <bruno@clisp.org>
126882         * modules/getcwd (Depends-on): Add malloc-posix.
126883         * modules/glob (Depends-on): Likewise.
126884         * modules/putenv (Depends-on): Likewise.
126885         * modules/strdup (Depends-on): Likewise.
126886         * modules/getdelim (Depends-on): Add realloc-posix.
126887         * modules/read-file (Depends-on): Likewise.
126889 2007-09-09  Bruno Haible  <bruno@clisp.org>
126891         * m4/malloc.m4 (gl_CHECK_MALLOC_POSIX): New macro.
126892         (gl_FUNC_MALLOC_POSIX): Require it.
126893         * m4/realloc.m4 (gl_FUNC_REALLOC_POSIX): Likewise.
126894         * m4/calloc.m4 (gl_FUNC_CALLOC_POSIX): Likewise.
126895         * modules/realloc (Files): Add m4/malloc.m4.
126896         * modules/calloc (Files): Likewise.
126898 2007-09-09  Bruno Haible  <bruno@clisp.org>
126900         * modules/malloc-posix: New file.
126901         * modules/malloc (Depends-on): Add malloc-posix.
126902         * lib/malloc.c: Include errno.h.
126903         (rpl_malloc): Merge the requirements of a glibc-compatible malloc
126904         and a POSIX-compatible malloc into a single function. Set ENOMEM
126905         when returning NULL.
126906         * m4/malloc.m4: New file.
126907         * doc/functions/malloc.texi: Mention the malloc-posix module.
126908         * lib/stdlib_.h (malloc): New declaration.
126909         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize
126910         GNULIB_MALLOC_POSIX and HAVE_MALLOC_POSIX.
126911         * modules/stdlib (stdlib.h): Substitute also GNULIB_MALLOC_POSIX
126912         and HAVE_MALLOC_POSIX.
126914 2007-09-09  Bruno Haible  <bruno@clisp.org>
126916         * modules/realloc-posix: New file.
126917         * modules/realloc (Depends-on): Add realloc-posix.
126918         * lib/realloc.c: Include errno.h.
126919         (rpl_realloc): Merge the requirements of a glibc-compatible realloc
126920         and a POSIX-compatible realloc into a single function. Set ENOMEM
126921         when returning NULL.
126922         * m4/realloc.m4: New file.
126923         * doc/functions/realloc.texi: Mention the realloc-posix module.
126924         * lib/stdlib_.h (realloc): New declaration.
126925         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize
126926         GNULIB_REALLOC_POSIX and HAVE_REALLOC_POSIX.
126927         * modules/stdlib (stdlib.h): Substitute also GNULIB_REALLOC_POSIX
126928         and HAVE_REALLOC_POSIX.
126930 2007-09-09  Bruno Haible  <bruno@clisp.org>
126932         * modules/calloc-posix: New file.
126933         * modules/calloc (Depends-on): Add calloc-posix.
126934         * lib/calloc.c: Include errno.h.
126935         (rpl_calloc): Merge the requirements of a glibc-compatible calloc
126936         and a POSIX-compatible calloc into a single function. Set ENOMEM
126937         when returning NULL.
126938         * m4/calloc.m4 (gl_FUNC_CALLOC_POSIX): New macro.
126939         * doc/functions/calloc.texi: Mention the calloc-posix module.
126940         * lib/stdlib_.h (calloc): New declaration.
126941         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize
126942         GNULIB_CALLOC_POSIX and HAVE_CALLOC_POSIX.
126943         * modules/stdlib (stdlib.h): Substitute also GNULIB_CALLOC_POSIX
126944         and HAVE_CALLOC_POSIX.
126946 2007-09-09  Bruno Haible  <bruno@clisp.org>
126948         Allow for modules to show an arbitrary notice.
126949         * modules/TEMPLATE-EXTENDED: Add 'Notice' field.
126950         * gnulib-tool: New option --extract-notice.
126951         (func_usage): Document it.
126952         (sed_extract_prog): Update.
126953         (func_get_notice): New function.
126954         (func_modules_notice): New function.
126955         (func_import, func_create_testdir): Invoke it.
126956         Suggested by Jim Meyering.
126958 2007-09-09  Bruno Haible  <bruno@clisp.org>
126960         * gnulib-tool: New options --verbose, --quiet.
126961         (func_usage): Document them.
126962         (verbose): New variable.
126963         (func_execute_command): New function.
126964         (func_import): Don't show the module list and the file list if
126965         $verbose < 0.
126966         (func_create_testdir): Likewise. Use func_execute_command.
126967         (func_create_megatestdir): Use func_execute_command.
126969 2007-09-08  Bruno Haible  <bruno@clisp.org>
126971         * gnulib-tool (func_import): Prefer rsync over wget when available,
126972         for fetching the PO files.
126974 2007-09-08  Bruno Haible  <bruno@clisp.org>
126976         * posix-modules: New file. Portions copied from gnulib-tool.
126977         * doc/gnulib.texi (POSIX Substitutes Library): New chapter.
126979 2007-09-08  Jim Meyering  <jim@meyering.net>
126981         Rename __fpending.c -> fpending.c and __fpending.h -> fpending.h
126982         * lib/fpending.h: Rename from __fpending.h.
126983         * lib/fpending.c: Rename from __fpending.c.
126984         Include "fpending.h", not "__fpending.h".
126985         * lib/__fpending.h, lib/__fpending.c: Remove files.
126986         * modules/fpending (Files): Reflect new file names.
126987         * lib/close-stream.c: Include "fpending.h", not "__fpending.h".
126989 2007-09-08  Bruno Haible  <bruno@clisp.org>
126991         * m4/inttypes-h.m4: Remove stub file.
126993 2007-09-07  Simon Josefsson  <simon@josefsson.org>
126995         * doc/headers/stdint.texi: Discuss #include_next issue.
126997 2007-09-06  Paul Eggert  <eggert@cs.ucla.edu>
126999         * build-aux/bootstrap: Remove obsolete comment about wget --help.
127001 2007-09-06  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
127003         * m4/time_h.m4 (gl_CHECK_TYPE_STRUCT_TIMESPEC): Fix misspelling
127004         in variable name.
127006 2007-09-03  Jim Meyering  <jim@meyering.net>
127008         New module: git-version-gen.
127009         * modules/git-version-gen: New file.
127011         Import changes from coreutils for bootstrap script.
127013         * build-aux/bootstrap (WGET_COMMAND): Remove code to set this variable.
127015         bootstrap: uses rsync to download the .po files
127016         * build-aux/bootstrap (po_download_command_format): New global.
127017         (download_po_files): Use rsync.
127018         (update_po_files): Don't remove .po files after download,
127019         so future rsync runs can take advantage of the copies.
127021         * build-aux/bootstrap (gnulib_tool): Make sha1sum check quietly.
127023         Solve the unnecessary-.po-file-regeneration problem once and for all.
127024         * build-aux/bootstrap (download_po_files): New function, renamed from
127025         get_translations.  Now, downloads, but doesn't update LINGUAS.
127026         (update_po_files): New function.
127028         bootstrap: Ignore more.
127029         * build-aux/bootstrap (symlink_to_dir): Add a directory name like
127030         uniwidth to e.g., lib/.gitignore.
127031         (slurp): Handle the sys_stat_.h -> sys mapping, too.
127033         * build-aux/bootstrap: New setting: vc_ignore.
127034         (insert_sorted_if_absent): Create $file if absent.
127035         Adapt to new, possibly empty, list: $vc_ignore.
127037         bootstrap: generate more ignorable names
127038         * build-aux/bootstrap (slurp): When generating ignorable names,
127039         also map .sin to .sed, .gperf to .c, and .y to .c.
127041 2007-09-03  Jim Meyering  <jim@meyering.net>
127043         * build-aux/git-version-gen: New file, from coreutils.  For details, see
127044         http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=bfe49f506
127046 2007-09-02  Bruno Haible  <bruno@clisp.org>
127048         Fix mis-recognition of 'mcs' on QNX 6.
127049         * m4/csharpcomp.m4 (gt_CSHARPCOMP): Test whether the "mcs --version"
127050         output contains the string "Mono".
127051         * lib/csharpcomp.c (compile_csharp_using_mono): Likewise.
127052         Reported by <kraai@ftbfs.org> at <https://savannah.gnu.org/bugs/?18337>.
127054 2007-09-01  Bruno Haible  <bruno@clisp.org>
127056         Fix collision between uniwidth/* and linebreak modules.
127057         * lib/linebreak.h (locale_charset, uc_width, u8_width, u16_width,
127058         u32_width): Remove declarations.
127059         * lib/linebreak.c: Include uniwidth.h, uniwidth/cjk.h, streq.h.
127060         (u32_mbtouc_unsafe, streq9, streq8, streq7, streq6, streq5, streq4,
127061         streq3, streq2, streq1, streq0): Remove functions.
127062         (STREQ): Remove macro.
127063         (is_cjk_encoding): Remove function.
127064         (nonspacing_table_data, nonspacing_table_ind): Remove constants.
127065         (uc_width, u8_width, u16_width, u32_width): Remove functions.
127066         * modules/linebreak (Depends-on): Add streq, uniwidth/width.
127067         * NEWS: Document the change.
127069 2007-09-01  Bruno Haible  <bruno@clisp.org>
127071         * lib/streq.h: Add double-inclusion guard.
127073 2007-09-01  Karl Berry  <karl@gnu.org>
127075         * MODULES.html.sh: Rename mreadlink_with_size to areadlink_with_size.
127077 2007-08-28  Jim Meyering  <jim@meyering.net>
127079         Rename mreadlink_with_size to areadlink_with_size.
127080         * NEWS: Document the change.
127081         * lib/mreadlink-with-size.c (mreadlink_with_size): Rename this to...
127082         * lib/areadlink-with-size.c (areadlink_with_size): ...this.
127083         * lib/mreadlink.h: Rename this to...
127084         * lib/areadlink.h: ...this.
127085         * modules/mreadlink-with-size: Rename this to...
127086         * modules/areadlink-with-size: ...this.
127087         * lib/canonicalize.c: Reflect the renaming.
127088         * modules/canonicalize: Likewise.
127090 2007-08-26  Bruno Haible  <bruno@clisp.org>
127092         * gnulib-tool (func_import): When deciding which files to remove,
127093         consider also dangling symbolic links.
127094         Reported by Eric Blake.
127096 2007-08-26  Bruno Haible  <bruno@clisp.org>
127098         * gnulib-tool (func_ln_if_changed): Use "test -h", not "test -L".
127100 2007-08-23  Simon Josefsson  <simon@josefsson.org>
127102         * lib/readline.c: Don't include getline.h, the prototype is now
127103         found in stdio.h.
127105 2007-08-23  Jim Meyering  <jim@meyering.net>
127107         Getdelim touchup.
127108         * lib/getdelim.c (getdelim): Don't bother to save/restore errno
127109         around the funlockfile call, since funlockfile never sets errno.
127110         Don't set errno upon failed realloc.
127112 2007-08-22  Eric Blake  <ebb9@byu.net>
127114         Getline touchups.
127115         * lib/getdelim.c (getdelim): Revert regression that required *n to
127116         be 0 when *lineptr is NULL.  Preserve errno across funlockfile.
127117         * m4/getdelim.m4 (gl_FUNC_GETDELIM): Check for declaration of
127118         getdelim, rather than whether implementation is missing.
127119         * m4/getline.m4 (gl_FUNC_GETLINE): Likewise for getline.
127120         * lib/stdio_.h (getline): Also declare if replacement is
127121         required.
127122         * doc/functions/getdelim.texi: New file.
127123         * doc/functions/getline.texi: Likewise.
127124         * doc/gnulib.texi (Function Substitutes): Add new files.
127125         Reported by Bruno Haible.
127127 2007-08-22  Ludovic Courtès  <ludo@gnu.org>
127129         * users.txt: Add Guile.
127131 2007-08-22  Eric Blake  <ebb9@byu.net>
127133         * tests/test-getdelim.c (main): Use remove, not unlink.
127134         * tests/test-getline.c (main): Likewise.
127136         Move getline and getdelim into stdio.h, per POSIX 200x.
127137         * modules/getline (Files): Remove getline.h.
127138         (Depends-on): Add stdio.
127139         (configure.ac): Add module indicator.
127140         * modules/getdelim (Files): Remove getdelim.h.
127141         (Depends-on): Add stdio.
127142         (configure.ac): Add module indicator.
127143         * modules/stdio (Makefile.am): Work with new indicators.
127144         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Add new defaults.
127145         * m4/getdelim.m4 (gl_FUNC_GETDELIM): Work with stdio needs.
127146         * m4/getline.m4 (gl_FUNC_GETLINE): Likewise.
127147         * lib/getdelim.h: Delete.
127148         * lib/getline.h: Delete.
127149         * lib/stdio_.h (getdelim, getline): Declare.
127150         * modules/getdelim-tests: New module.
127151         * modules/getline-tests: Likewise.
127152         * tests/test-getdelim.c: New file.
127153         * tests/test-getline.c: Likewise.
127154         * NEWS: Document the change.
127155         * lib/getline.c: Update choice of header.
127156         * lib/csharpcomp.c: Likewise.
127157         * lib/getpass.c: Likewise.
127158         * lib/javacomp.c: Likewise.
127159         * lib/javaversion.c: Likewise.
127160         * lib/yesno.c: Likewise.
127161         * lib/getdelim.c: Likewise.
127162         (getdelim): Set errno on failure, and avoid memory leak.
127164 2007-08-19  Bruno Haible  <bruno@clisp.org>
127166         * modules/closein (Depends-on): Add freadahead.
127167         * lib/closein.c: Include freadahead.h.
127168         (close_stdin): Skip the fseeko and fflush calls if freadahead(stdin)
127169         is zero.
127171 2007-08-19  Bruno Haible  <bruno@clisp.org>
127173         * modules/freadahead-tests: New file.
127174         * tests/test-freadahead.sh: New file.
127175         * tests/test-freadahead.c: New file.
127177         * modules/freadahead: New file.
127178         * lib/freadahead.h: New file.
127179         * lib/freadahead.c: New file.
127180         * MODULES.html.sh (File stream based Input/Output): Add freadahead,
127181         fbufmode, fpurge, freadable, fwritable.
127183 2007-08-19  Eric Blake  <ebb9@byu.net>
127185         Test yesno in combination with closein.
127186         * lib/yesno.c (yesno): Document use of stdin.
127187         * modules/yesno-tests (Files): New module.
127188         * tests/test-yesno.c (main): New file.
127189         * tests/test-yesno.sh: Likewise.
127191 2007-08-19  Bruno Haible  <bruno@clisp.org>
127193         * lib/fbufmode.c (fbufmode): Add tentative support for Solaris/AMD64.
127194         * lib/fseeko.c (rpl_fseeko): Likewise.
127195         * lib/fseterr.c (fseterr): Likewise.
127197 2007-08-19  Bruno Haible  <bruno@clisp.org>
127199         * tests/test-lseek.c (main): Disable a test for BeOS.
127200         * doc/functions/lseek.texi: Document the BeOS bug.
127202 2007-08-19  Bruno Haible  <bruno@clisp.org>
127203             Eric Blake  <ebb9@byu.net>
127205         * lib/lseek.c: Include <sys/stat.h>.
127206         (rpl_lseek): Add workaround code also for Unix platforms.
127207         Needed for BeOS.
127208         * m4/lseek.m4 (gl_FUNC_LSEEK): When cross-compiling, fail on BeOS.
127209         * doc/functions/lseek.texi: Document BeOS definiency.
127211 2007-08-18  Bruno Haible  <bruno@clisp.org>
127213         * modules/fstrcmp-tests: New file.
127214         * tests/test-fstrcmp.c: New file.
127216 2007-08-18  Bruno Haible  <bruno@clisp.org>
127218         * modules/fstrcmp: New file, from GNU gettext with modifications.
127219         * lib/fstrcmp.h: New file, from GNU gettext.
127220         * lib/fstrcmp.c: New file, from GNU gettext.
127221         * MODULES.html.sh (String handling): Add fstrcmp.
127223 2007-08-18  Bruno Haible  <bruno@clisp.org>
127225         * lib/diffseq.h (struct context): Change type of 'heuristic' field to
127226         'bool'.
127227         (diag, compareseq): Remove const from the ctxt argument.
127228         (USE_HEURISTIC): Undefine at the end.
127230 2007-08-18  Jim Meyering  <jim@meyering.net>
127232         New file: lib/idcache.h
127233         * NEWS: Mention the addition.
127234         * modules/idcache (Files): Add lib/idcache.h
127235         * lib/idcache.c: Include "idcache.h".
127236         Don't include <sys/types.h>.
127237         Add a FIXME comment.
127238         Move file-scoped "static" declarations to the top.
127239         * lib/idcache.h: New file.  Include <sys/types.h> here, instead.
127241 2007-08-17  Bruno Haible  <bruno@clisp.org>
127242         and Paul Eggert  <eggert@cs.ucla.edu>
127244         * MODULES.html.sh: Add diffseq.
127245         * modules/diffseq: New file.
127246         * lib/diffseq.h: New file, from GNU gettext with a few minor changes,
127247         extracted from GNU gettext's fstrcmp.c and GNU diff's analyze.c.
127249 2007-08-15  Paul Eggert  <eggert@cs.ucla.edu>
127251         Import changes from coreutils for bootstrap script.
127253         2007-07-21  Paul Eggert  <eggert@cs.ucla.edu>
127255         * build-aux/bootstrap (slurp): Work even in environments where
127256         "ls" defaults to "ls -A".  Put in a FIXME, though, since the
127257         current code does not slurp files whose names start with ".", and
127258         this looks like it might be a troublesome area.
127260         2007-07-11  Jim Meyering  <jim@meyering.net>
127262         If there's a GPL vN copyright comment, require that N == 3.
127264         2007-07-08  Jim Meyering  <jim@meyering.net>
127266         Run the coreutils-specific code only if tests/Makefile.am.in exists.
127267         * build-aux/bootstrap (mam_template): Move definition out of loop.
127269         Create symlinks for gl/{lib,m4}/*, just as for gnulib/{lib,m4}/*.
127271         * build-aux/bootstrap (symlink_to_dir): Rename function from
127272         symlink_to_gnulib.  Add a directory parameter.  Update all
127273         callers.
127274         (cp_mark_as_generated): Also check for -- and link to -- files in
127275         gl/.
127277         2007-07-08  Jim Meyering  <jim@meyering.net>
127279         Adapt to deeper hierarchy in gnulib.
127280         * build-aux/bootstrap (symlink_to_dir): If the destination
127281         directory doesn't exist, create it. This is required at least for
127282         "lib/uniwidth/cjk.h".
127284         2007-05-15  Jim Meyering  <jim@meyering.net>
127286         * build-aux/bootstrap: Now that generated Makefile.am files
127287         are no longer under version control, they must be created at
127288         bootstrap time.
127290 2007-08-14  Ben Pfaff  <blp@gnu.org>
127292         * lib/count-one-bits.h: Add comments.  From Bruno Haible.
127294 2007-08-14  Paul Eggert  <eggert@cs.ucla.edu>
127296         * lib/count-one-bits.h: Don't include <limits.h>; no longer needed
127297         given the changes below.
127298         (COUNT_ONE_BITS): Use 'verify' rather than 'verify_true'.  Work
127299         even on hosts that have padding bits beyond the supported 64.
127301 2007-08-10  Paul Eggert  <eggert@cs.ucla.edu>
127303         * NEWS: In xstrtol, remove STRTOL_FATAL_ERROR and add xstrtol_fatal.
127304         * lib/xstrtol.h: Don't include exitfail.h; that's now internal to
127305         xstrtol.c.  Include getopt.h, since xstrtol_fatal's signature
127306         depends on it.
127307         (xstrtol_error): Remove.
127308         (xstrtol_fatal): New decl, replacing the functionality of xstrtol_error
127309         but with a different signature.
127310         (ATTRIBUTE_NORETURN, __attribute__): New macros.
127311         * lib/xstrtol-error.c: Include exitfail.h.
127312         (xstrtol_fatal): New function, with a different signature from the
127313         old xstrtol_error, so that the caller need not worry about passing
127314         in an exit status, or about storage management of the option argument.
127315         (xstrtol_error): Now a static function.  Redo signature to
127316         implement xstrtol_fatal.  Output the correct number of hyphens in
127317         front of the option so that the caller need not worry about
127318         storage management.
127319         (N_): New macro.
127320         (_): Remove; not used now.
127321         * modules/xstrtol: Depend on getopt.
127322         * tests/test-xstrtol.c (main): Use new xstrtol_error function instead
127323         of old STRTOL_FATAL_ERROR macro.
127324         * tests/test-xstrtol.sh (t-xstrtol.xo): Adjust to match new behavior
127325         of test program.
127326         * tests/test-xstrtoimax.sh (t-xstrtoimax.xo): Likewise.
127327         * tests/test-xstrtoumax.sh (t-xstrtoumax.xo): Likewise.
127329 2007-08-08  Eric Blake  <ebb9@byu.net>
127331         * lib/xstrtol-error.c: Add missing include.
127333         Move xstrtol messages into gnulib domain, when --pobase is used.
127334         * lib/xstrtol.h (_STRTOL_ERROR): Move messages out of macro...
127335         * lib/xstrtol-error.c (xstrtol_error): ...into new file.
127336         * modules/xstrtol (Files): Distribute new file.
127337         * m4/xstrtol.m4 (gl_XSTRTOL): Build new file.
127338         * lib/xstrtol.c (TESTING_XSTRTO): Move tests...
127339         * tests/test-xstrtol.c: ...into new file.
127340         * tests/test-xstrtoul.c: Also test xstrtoul.
127341         * tests/test-xstrtoimax.c: Also test xstrtoimax.
127342         * tests/test-xstrtoumax.c: Also test xstrtoumax.
127343         * tests/test-xstrtol.sh: Drive the tests.
127344         * tests/test-xstrtoimax.sh: Likewise.
127345         * tests/test-xstrtoumax.sh: Likewise.
127346         * modules/xstrtol-tests: New module.
127347         * modules/xstrtoimax-tests: Likewise.
127348         * modules/xstrtoumax-tests: Likewise.
127350 2007-08-08  Jim Meyering  <jim@meyering.net>
127352         New function: mfile_name_concat.
127353         * lib/filenamecat.c (mfile_name_concat): New function, just like
127354         file_name_concat, but return NULL upon failure rather than exiting
127355         with a diagnostic.
127356         * lib/filenamecat.h: Declare it.
127358 2007-08-07  Bruno Haible  <bruno@clisp.org>
127360         * m4/inttypes.m4 (gl_INTTYPES_H): Use GL_TRIGGER_STDC_LIMIT_MACROS
127361         instead of __STDC_LIMIT_MACROS_TRIGGER. This avoids a redefinition
127362         warning from gcc.
127363         Reported by Eric Blake.
127365 2007-08-07  Simon Josefsson  <simon@josefsson.org>
127367         * modules/crypto/arctwo (License): Use the synonymous term "LGPLv2+".
127368         * modules/crypto/arcfour (License): Likewise.
127369         * modules/crypto/des-tests (License): Likewise.
127370         * modules/crypto/gc-arctwo-tests (License): Likewise.
127371         * modules/crypto/gc-des-tests (License): Likewise.
127372         * modules/crypto/gc-hmac-md5-tests (License): Likewise.
127373         * modules/crypto/gc-hmac-sha1-tests (License): Likewise.
127374         * modules/crypto/gc-md2-tests (License): Likewise.
127375         * modules/crypto/gc-md4-tests (License): Likewise.
127376         * modules/crypto/gc-md5-tests (License): Likewise.
127377         * modules/crypto/gc-pbkdf2-sha1-tests (License): Likewise.
127378         * modules/crypto/gc-rijndael-tests (License): Likewise.
127379         * modules/crypto/gc-sha1-tests (License): Likewise.
127380         * modules/crypto/gc-tests (License): Likewise.
127381         * modules/crypto/hmac-md5 (License): Likewise.
127382         * modules/crypto/hmac-sha1 (License): Likewise.
127383         * modules/crypto/md2-tests (License): Likewise.
127384         * modules/crypto/md4-tests (License): Likewise.
127385         * modules/crypto/md5 (License): Likewise.
127386         * modules/crypto/rijndael (License): Likewise.
127387         * modules/crypto/sha1 (License): Likewise.
127388         * modules/memxor (License): Likewise.
127390 2007-08-06  Paul Eggert  <eggert@cs.ucla.edu>
127391         and Bruno Haible  <bruno@clisp.org>
127393         * NEWS: Describe interface changes to human, xstrtol.
127394         * lib/human.h: Include <xstrtol.h>.
127395         (human_options): Return enum strtol_error, not int.  Remove
127396         bool arg; take int * instead.
127397         * lib/human.c: Don't include "gettext.h".
127398         (_): Remove; no longer used.
127399         Don't include <xstrtol.h>, since human.h does it.
127400         (human_options): Adjust to abovementioned interface changes.
127401         Do not report error to stderr; that's now the caller's
127402         responsibility.
127403         * lib/xstrtol.c (main) [defined TESTING_XSTRTO]: Adjust to
127404         interface change.
127405         * lib/xstrtol.h (_STRTOL_ERROR): Take Option, Arg rather than
127406         Str, Argument_type_string.  All uses changed.  Put " argument"
127407         in diagnostics to make them clearer.  Change wording of suffix
127408         message for clarity.
127409         (STRTOL_FATAL_ERROR): Take Option, Arg rather than Str,
127410         Argument_type_string.
127411         (STRTOL_FATAL_WARN): Remove; no longer used.
127412         * modules/human (Depends-on): Remove gettext-h.
127414 2007-08-06  Simon Josefsson  <simon@josefsson.org>
127416         * build-aux/maint.mk, build-aux/GNUmakefile: Relicense to GPLv3+.
127418 2007-07-31  Bruno Haible  <bruno@clisp.org>
127420         * m4/stdint.m4 (gl_STDINT_H): Test whether WCHAR_MIN and WCHAR_MAX
127421         are defined by <stdint.h> (as opposed to <wchar.h>, as on Dragonfly).
127422         Reported by Joerg Sonnenberger <joerg@britannica.bec.de>.
127424 2007-07-31  Bruno Haible  <bruno@clisp.org>
127426         * lib/fflush.c (rpl_fflush): On BSD systems, use the __SNPT flag.
127427         Suggested by Joerg Sonnenberger <joerg@britannica.bec.de>.
127429 2007-07-30  Bruno Haible  <bruno@clisp.org>
127431         * modules/base64 (License): Use the synonymous term "LGPLv2+".
127432         * modules/c-ctype (License): Likewise.
127433         * modules/c-strcase (License): Likewise.
127434         * modules/check-version (License): Likewise.
127435         * modules/iconv (License): Likewise.
127436         * modules/iconv_open (License): Likewise.
127437         * modules/read-file (License): Likewise.
127438         * modules/striconv (License): Likewise.
127439         * modules/strverscmp (License): Likewise.
127440         * modules/vasprintf (License): Likewise.
127441         * modules/crypto/des (License): Likewise.
127442         * modules/crypto/gc (License): Likewise.
127443         * modules/crypto/gc-arcfour (License): Likewise.
127444         * modules/crypto/gc-arctwo (License): Likewise.
127445         * modules/crypto/gc-des (License): Likewise.
127446         * modules/crypto/gc-hmac-md5 (License): Likewise.
127447         * modules/crypto/gc-hmac-sha1 (License): Likewise.
127448         * modules/crypto/gc-md2 (License): Likewise.
127449         * modules/crypto/gc-md4 (License): Likewise.
127450         * modules/crypto/gc-md5 (License): Likewise.
127451         * modules/crypto/gc-pbkdf2-sha1 (License): Likewise.
127452         * modules/crypto/gc-random (License): Likewise.
127453         * modules/crypto/gc-rijndael (License): Likewise.
127454         * modules/crypto/gc-sha1 (License): Likewise.
127455         * modules/crypto/md2 (License): Likewise.
127456         * modules/crypto/md4 (License): Likewise.
127458 2007-07-30  Jim Meyering  <jim@meyering.net>
127460         * lib/fts.c (fts_read): Upon failure to chdir into a subdirectory,
127461         set fts_info to FTS_DNR, not to FTS_ERR, so that the caller knows
127462         it has valid stat data.  This bug would cause du not to count the
127463         sizes of inaccessible directories.
127464         Patch by Bryan Mason <bmason@redhat.com>, via Jose Maria Plans
127465         in <http://bugzilla.redhat.com/250077>.
127467 2007-07-25  Peter O'Gorman  <peter@pogma.com>
127468             Bruno Haible  <bruno@clisp.org>
127470         * m4/include_next.m4 (gl_INCLUDE_NEXT): Test whether #include_next
127471         really works. Needed because AIX 4.3 "xlc -E" doesn't understand
127472         #include_next, gives a diagnostic about it, but reports no error in
127473         the exit code.
127474         Reported by Gary V. Vaughan <gary@thewrittenword.com>.
127476 2007-07-24  Ben Pfaff  <blp@gnu.org>
127478         Improve name: "count-one-bits" is better than "popcount".
127479         * MODULES.html.sh: Update name.
127480         * lib/popcount.h: Renamed lib/count-one-bits.h.
127481         (popcount): Renamed count_one_bits.
127482         (popcountl): Renamed count_one_bits_l.
127483         (popcountll): Renamed count_one_bits_ll.
127484         * m4/popcount.m4: Renamed m4/count-one-bits.m4.
127485         * modules/popcount: Renamed module/count-one-bits.
127486         * modules/popcount-tests: Renamed module/count-one-bits-tests.
127487         * tests/test-popcount.c: Renamed tests/test-count-one-bits.c.
127489 2007-07-23  Ben Pfaff  <blp@gnu.org>
127491         * lib/popcount.h (popcount32): Reduce size of constants, to allow
127492         better code generation, and add U to large constants to avoid
127493         warnings, in non-GCC case.
127494         Suggested by Bruno Haible.
127496 2007-07-23  Ben Pfaff  <blp@gnu.org>
127498         * lib/popcount.h: Use verify_true instead of if...abort.
127499         * modules/popcount: Depend on verify module.
127500         Suggested by Jim Meyering.
127502 2007-07-23  Bruno Haible  <bruno@clisp.org>
127504         * gnulib-tool (func_import): Create a .cvsignore file also when the
127505         directory is not yet in CVS but the toplevel directory is. When
127506         creating a .cvsignore file, add ".deps" and ".dirstamp" to it.
127507         Reported by Karl Berry.
127509 2007-07-22  Ben Pfaff  <blp@gnu.org>
127511         * lib/popcount.h: Use faster, branchless algorithm for non-GCC
127512         case.
127513         Suggested by Eric Blake.
127515 2007-07-22  Ben Pfaff  <blp@gnu.org>
127517         New module: popcount.
127518         * MODULES.html.sh: Add popcount.
127519         * modules/popcount: New file.
127520         * modules/popcount-tests: New file.
127521         * tests/test-popcount.c: New file.
127522         * lib/popcount.h: New file.
127523         * m4/popcount.m4: New file.
127525 2007-07-22  Paul Eggert  <eggert@cs.ucla.edu>
127527         * build-aux/announce-gen: Update to GPLv3.
127529         * build-aux/config.guess: Update from config.
127531 2007-07-21  Bruno Haible  <bruno@clisp.org>
127533         * lib/error.c (_) [ENABLE_NLS]: Define to gettext.
127534         * lib/verror.c (_) [ENABLE_NLS]: Likewise.
127536 2007-07-20  Jim Meyering  <jim@meyering.net>
127538         * check-module: Diagnose a self-dependency.
127540 2007-07-19  Bruno Haible  <bruno@clisp.org>
127542         * gnulib-tool (func_import): Don't abort if pobase or po_domain is
127543         empty.
127544         Reported by Eric Blake.
127546 2007-07-18  Bruno Haible  <bruno@clisp.org>
127548         * gnulib-tool: New options --po-base, --po-domain.
127549         (func_usage): Document them.
127550         (pobase, po_domain): New variables.
127551         (func_emit_lib_Makefile_am): Augment AM_CPPFLAGS, defining
127552         DEFAULT_TEXT_DOMAIN.
127553         (func_emit_po_Makevars, func_emit_po_POTFILES_in): New functions.
127554         (func_import): Consider pobase and po_domain. Create a po/ directory.
127555         (func_create_testdir): Set pobase and po_domain to empty.
127556         * build-aux/po/Makefile.in.in: New file, from GNU gettext 0.16.1.
127557         * build-aux/po/remove-potcdate.sin: New file, from GNU gettext 0.16.1.
127559 2007-07-18  Bruno Haible  <bruno@clisp.org>
127561         * gnulib-tool (func_get_automake_snippet): Synthesize also an
127562         EXTRA_DIST augmentation for files in build-aux/.
127564 2007-07-16  Bruno Haible  <bruno@clisp.org>
127566         * modules/lseek (License): Use the synonymous term "LGPLv2+".
127567         * modules/getdelim (License): Likewise.
127569 2007-07-16  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
127571         * modules/arpa_inet (License): Use the synonymous term LGPLv2+.
127572         * modules/d-type (License): Likewise.
127573         * modules/extensions (License): Likewise.
127574         * modules/fnmatch (License): Likewise.
127575         * modules/fseeko (License): Likewise.
127576         * modules/getaddrinfo (License): Likewise.
127577         * modules/getline (License): Likewise.
127578         * modules/getlogin_r (License): Likewise.
127579         * modules/getpass (License): Likewise.
127580         * modules/gettimeofday (License): Likewise.
127581         * modules/glob (License): Likewise.
127582         * modules/inet_ntop (License): Likewise.
127583         * modules/malloc (License): Likewise.
127584         * modules/malloca (License): Likewise.
127585         * modules/memmem (License): Likewise.
127586         * modules/mempcpy (License): Likewise.
127587         * modules/memset (License): Likewise.
127588         * modules/minmax (License): Likewise.
127589         * modules/mktime (License): Likewise.
127590         * modules/netinet_in (License): Likewise.
127591         * modules/pathmax (License): Likewise.
127592         * modules/poll (License): Likewise.
127593         * modules/regex (License): Likewise.
127594         * modules/snprintf (License): Likewise.
127595         * modules/stdbool (License): Likewise.
127596         * modules/stdint (License): Likewise.
127597         * modules/stdio (License): Likewise.
127598         * modules/strcase (License): Likewise.
127599         * modules/strcasestr (License): Likewise.
127600         * modules/strdup (License): Likewise.
127601         * modules/string (License): Likewise.
127602         * modules/strndup (License): Likewise.
127603         * modules/strnlen (License): Likewise.
127604         * modules/strpbrk (License): Likewise.
127605         * modules/strptime (License): Likewise.
127606         * modules/strsep (License): Likewise.
127607         * modules/sys_select (License): Likewise.
127608         * modules/sys_socket (License): Likewise.
127609         * modules/sys_stat (License): Likewise.
127610         * modules/sys_time (License): Likewise.
127611         * modules/time (License): Likewise.
127612         * modules/time_r (License): Likewise.
127613         * modules/timegm (License): Likewise.
127614         * modules/unistd (License): Likewise.
127615         * modules/vsnprintf (License): Likewise.
127616         * modules/wctype (License): Likewise.
127618 2007-07-16  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
127620         * modules/argz (License): LGPLv2+.
127622 2007-07-15  Karl Berry  <karl@gnu.org>
127624         * doc/gnulib.texi: revise node structure per new fdl.texi.
127626 2007-07-14  Bruno Haible  <bruno@clisp.org>
127628         * lib/uniname/gen-uninames.lisp (main): Emit a "do not edit" line to
127629         the output file.
127630         * lib/uniname/uninames.h: Regenerated.
127632 2007-07-14  Karl Berry  <karl@gnu.org>
127634         * doc/*gpl*.texi, doc/fdl.texi: new versions, consistently
127635         omitting sectioning and index commands.
127637 2007-07-13  Bruno Haible  <bruno@clisp.org>
127639         New gnulib-tool option --more-symlinks.
127640         * gnulib-tool (func_usage): Document --more-symlinks.
127641         (do_copyrights): New variable.
127642         Recognize option --more-symlinks.
127643         (func_import): Don't add a copyright notice transform to
127644         sed_transform_lib_file if do_copyrights is empty.
127646 2007-07-13  Bruno Haible  <bruno@clisp.org>
127648         * lib/vasnprintf.c (decimal_point_char): Define also if
127649         (NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE)
127650         && !NEED_PRINTF_DIRECTIVE_A.
127651         Reported by Clemens Koller <clemens.koller@anagramm.de> via
127652         Gary V. Vaughan <gary@gnu.org>.
127654 2007-07-13  Paul Eggert  <eggert@cs.ucla.edu>
127656         * lib/inttypes_.h: Undo previous change, since it was fixed
127657         in a different way in the 2007-07-02 fix to m4/inttypes.m4.
127659 2007-07-13  Bruno Haible  <bruno@clisp.org>
127661         * lib/stdint_.h: Fix typo: _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H was
127662         misspelled as _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H.
127664 2007-07-13  Jim Meyering  <jim@meyering.net>
127666         df: Don't fail for Tru64's "file-on-file mount".
127667         * m4/fsusage.m4 (gl_FSUSAGE): Reject Tru64's buggy statvfs,
127668         so we fall through and use statfs instead.  Details here:
127669         <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/10878>
127670         Reported by Albert Chin.
127672 2007-07-13  Bruno Haible  <bruno@clisp.org>
127674         * modules/alloca-opt (License): Use the synonymous term "LGPLv2+".
127675         * modules/configmake (License): Likewise.
127676         * modules/gettext (License): Likewise.
127677         * modules/gettext-h (License): Likewise.
127678         * modules/include_next (License): Likewise.
127679         * modules/link-warning (License): Likewise.
127680         * modules/localcharset (License): Likewise.
127681         * modules/localename (License): Likewise.
127682         * modules/lock (License): Likewise.
127683         * modules/relocatable-lib-lgpl (License): Likewise.
127684         * modules/size_max (License): Likewise.
127685         * modules/vasnprintf (License): Likewise.
127686         * modules/wchar (License): Likewise.
127687         * modules/xsize (License): Likewise.
127689 2007-07-13  Bruno Haible  <bruno@clisp.org>
127691         * gnulib-tool (func_import): Treat LGPLv2 as synonymous to LGPL.
127692         (func_create_testdir): Handle copying terms "GPLv2+" and "LGPLv2+".
127694 2007-07-12  Bruno Haible  <bruno@clisp.org>
127696         * doc/gnulib-intro.texi (Copyright): Clarify the license abbreviations
127697         in the modules files.
127699 2007-07-11  Karl Berry  <karl@gnu.org>
127701         * MODULES.html.sh (func_module): use
127702          sed -e '\|^'"${includefile}"'$|d'
127703          instead of /.../d, to avoid errors on $includefile's containing /.
127705 2007-07-10  Sergey Poznyakoff  <gray@gnu.org.ua>
127707         * gnulib-tool (func_import): Avoid duplication of --avoid
127708         statements
127709         (func_dest_tmpfilename,func_create_testdir): Translate `-' in file
127710         names to `_' in variable names.
127712 2007-07-10  Eric Blake  <ebb9@byu.net>
127714         * lib/version-etc.c (version_etc_va): Default to GPLv3+.
127715         * NEWS: Document this change.
127717 2007-07-08  Bruno Haible  <bruno@clisp.org>
127719         Update to Unicode 5.0.
127720         * lib/uniwidth/width.c (nonspacing_table_data): Add U+00AD,
127721         U+0350..U+035F, U+05A2, U+05BA, U+05C5, U+05C7, U+0600..U+0603,
127722         U+0610..U+0615, U+0656..U+065E, U+07EB..U+07F3, U+0A01, U+0AE2..U+0AE3,
127723         U+0CBC. Remove U+0CBF, U+0CC6. Add U+0CE2..U+0CE3, U+135F,
127724         U+17B4..U+17B5, U+17DD. Remove U+180E. Add U+1920..U+1922,
127725         U+1927..U+192B, U+1932, U+1939..U+193B, U+1A17..U+1A18, U+1B00..U+1B03,
127726         U+1B34, U+1B36..U+1B3A, U+1B3C, U+1B42, U+1B6B..U+1B73, U+1DC0..U+1DCA,
127727         U+1DFE..U+1DFF, U+20EB..U+20EF, U+A802, U+A806, U+A80B, U+A825..U+A826,
127728         U+10A01..U+10A03, U+10A05..U+10A06, U+10A0C..U+10A0F, U+10A38..U+10A3A,
127729         U+10A3F, U+1D242..U+1D244.
127730         (nonspacing_table_ind): Update.
127731         (uc_width): Assign width 0 to U+E0100..U+E01EF. Assign width 1 to
127732         U+4DC0..U+4DFF. Assign width 2 to U+2329..U+232A, U+FE10..U+FE1F.
127734 2007-07-08  Bruno Haible  <bruno@clisp.org>
127736         Update to Unicode 5.0.
127737         * lib/uniname/gen-uninames.lisp (main): Add the range 0x12xxx to the
127738         code transform. Extend the name index field of unicode_name_to_code and
127739         unicode_code_to_name from 16 to 24 bits.
127740         * lib/uniname/uniname.c (unicode_character_name,
127741         unicode_name_character): Add the range 0x12xxx to the code transform.
127742         * lib/uniname/uninames.h: Regenerated.
127743         * tests/uniname/UnicodeDataNames.txt: Update to Unicode 5.0.
127745 2007-07-07  Bruno Haible  <bruno@clisp.org>
127747         * modules/wcwidth-tests: New file.
127748         * tests/test-wcwidth.c: New file.
127750         Work around MacOS X wcwidth() bug.
127751         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Test against MacOS X 10.3 bug.
127752         * lib/wcwidth.c: Include localcharset.h, streq.h, uniwidth.h.
127753         (rpl_wcwidth): Special-case the UTF-8 locales. Fall back to the
127754         original wcwidth in non-UTF-8 locales.
127755         * modules/wcwidth (Depends-on): Add localcharset, streq,
127756         uniwidth/width.
127757         * doc/functions/wcwidth.texi: Update.
127759 2007-07-07  Bruno Haible  <bruno@clisp.org>
127761         * lib/wchar_.h: Include the GL_LINK_WARNING macro.
127762         (wcwidth): New declaration.
127763         * m4/wchar.m4 (gl_WCHAR_MODULE_INDICATOR, gl_WCHAR_H_DEFAULTS): New
127764         macros.
127765         (gl_WCHAR_H): Require gl_WCHAR_H_DEFAULTS. Don't set WCHAR_H to empty
127766         here. Prepare for creating <wchar.h> unconditionally.
127767         * modules/wchar (Depends-on): Add link-warning.
127768         (Makefile.am): Substitute also GNULIB_WCWIDTH, HAVE_DECL_WCWIDTH,
127769         REPLACE_WCWIDTH, and GL_LINK_WARNING.
127770         * lib/wcwidth.h: Remove file.
127771         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Require gl_WCHAR_H_DEFAULTS. Set
127772         HAVE_DECL_WCWIDTH, REPLACE_WCWIDTH, WCHAR_H.
127773         * modules/wcwidth (Files): Remove lib/wcwidth.h.
127774         (configure.ac): Invoke gl_WCHAR_MODULE_INDICATOR.
127775         (Include): Replace wcwidth.h with <wchar.h>.
127776         * lib/wcwidth.c: Include <wchar.h> instead of wcwidth.h.
127777         * lib/mbchar.h: Don't include wcwidth.h.
127778         * lib/mbswidth.c: Likewise.
127779         * NEWS: Mention the change.
127781 2007-07-07  Bruno Haible  <bruno@clisp.org>
127783         * lib/wcwidth.c: New file, extracted from lib/wcwidth.h.
127784         * lib/wcwidth.h: Don't include wctype.h. Replace inline function
127785         definition with an external declaration.
127786         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Use wcwidth.c when wcwidth is not
127787         defined as a function. Remove AC_C_INLINE requirement.
127788         * modules/wcwidth (Files): Add lib/wcwidth.c.
127789         (Makefile.am): Remove redundant statement.
127791 2007-07-07  Bruno Haible  <bruno@clisp.org>
127793         * MODULES.html.sh (Unicode string functions): Add the new modules.
127795         * tests/uniwidth/test-u32-strwidth.c: New file.
127796         * modules/uniwidth/u32-strwidth-tests: New file.
127798         * lib/uniwidth/u32-strwidth.c: New file.
127799         * modules/uniwidth/u32-strwidth: New file.
127801         * tests/uniwidth/test-u16-strwidth.c: New file.
127802         * modules/uniwidth/u16-strwidth-tests: New file.
127804         * lib/uniwidth/u16-strwidth.c: New file.
127805         * modules/uniwidth/u16-strwidth: New file.
127807         * tests/uniwidth/test-u8-strwidth.c: New file.
127808         * modules/uniwidth/u8-strwidth-tests: New file.
127810         * lib/uniwidth/u8-strwidth.c: New file.
127811         * modules/uniwidth/u8-strwidth: New file.
127813         * tests/uniwidth/test-u32-width.c: New file.
127814         * modules/uniwidth/u32-width-tests: New file.
127816         * lib/uniwidth/u32-width.c: New file.
127817         * modules/uniwidth/u32-width: New file.
127819         * tests/uniwidth/test-u16-width.c: New file.
127820         * modules/uniwidth/u16-width-tests: New file.
127822         * lib/uniwidth/u16-width.c: New file.
127823         * modules/uniwidth/u16-width: New file.
127825         * tests/uniwidth/test-u8-width.c: New file.
127826         * modules/uniwidth/u8-width-tests: New file.
127828         * lib/uniwidth/u8-width.c: New file.
127829         * modules/uniwidth/u8-width: New file.
127831         * tests/uniwidth/test-uc_width.c: New file.
127832         * modules/uniwidth/width-tests: New file.
127834         * lib/uniwidth/width.c: New file, from GNU libiconv.
127835         * lib/uniwidth/cjk.h: New file, from GNU libiconv.
127836         * modules/uniwidth/width: New file.
127838         * lib/uniwidth.h: New file, from GNU libiconv.
127839         * modules/uniwidth/base: New file.
127841 2007-07-07  Bruno Haible  <bruno@clisp.org>
127843         * lib/uniname.h: New file, from GNU gettext.
127844         * lib/uniname/gen-uninames.lisp: New file, from GNU gettext.
127845         * lib/uniname/uninames.h: New file, from GNU gettext.
127846         * lib/uniname/uniname.c: New file, from GNU gettext.
127847         * tests/uniname/test-uninames.sh: New file.
127848         * tests/uniname/test-uninames.c: New file, from GNU gettext.
127849         * tests/uniname/UnicodeDataNames.txt: New file, from GNU gettext.
127850         * modules/uniname/base: New file.
127851         * modules/uniname/uniname: New file.
127852         * modules/uniname/uniname-tests: New file.
127853         * MODULES.html.sh (Unicode string functions): Add the new modules.
127855 2007-07-06  Bruno Haible  <bruno@clisp.org>
127857         * doc/Makefile (TEXI2HTML): Specify a --reference-limit.
127859 2007-07-06  Bruno Haible  <bruno@clisp.org>
127861         * lib/sys_time_.h: Use a recursion-safe inclusion guard rather than
127862         a split double-inclusion guard. Needed for cygwin, where <sys/time.h>
127863         includes <cygwin/sys_time.h> which includes <sys/select.h> which
127864         include <sys/time.h>.
127865         Reported by Eric Blake.
127867 2007-07-06  Eric Blake  <ebb9@byu.net>
127869         Fix testing canonicalize on cygwin.
127870         * modules/canonicalize-lgpl-tests (test_canonicalize_lgpl_LDADD):
127871         Revert patch from 2007-06-19.
127872         * tests/test-canonicalize-lgpl.c (main): Instead, skip test when
127873         canonicalize module is also in use.
127874         * tests/test-canonicalize.c: New file.
127875         * tests/test-canonicalize.sh: Likewise.
127876         * modules/canonicalize-tests: Likewise.
127878 2007-07-06  Jim Meyering  <jim@meyering.net>
127880         * lib/getugroups.c (getugroups): Detect getgrent failure.
127881         Adjust comment to reflect reality: this function may return -1.
127883 2007-07-05  Sergey Poznyakoff  <gray@gnu.org.ua>
127885         * build-aux/bootstrap (TP_URL,get_translations): Update to use
127886         the new TP address.
127887         (usage): Fix typo
127888         (gnulib_mk): New variable.
127890 2007-07-05  Jim Meyering  <jim@meyering.net>
127892         Don't let endgrent clobber errno, no matter how improbable.
127893         * lib/getugroups.c (getugroups): Save and restore errno around
127894         endgrent call.
127896         Close the group DB even when failing with 2^31 or more members.
127897         * lib/getugroups.c (getugroups): Don't return without calling endgrent.
127899 2007-07-04  Jim Meyering  <jim@meyering.net>
127901         * lib/getugroups.h: New file.
127902         * lib/getugroups.c: Include "getugroups.h".
127903         Remove uses of "register" keyword.
127904         Move local variable, "cp", down into scope where used.
127905         Give "username" parameter the "const" attribute.
127906         * modules/getugroups (Files): Add lib/getugroups.h
127908 2007-07-04  Karl Berry  <karl@gnu.org>
127910         * MODULES.html.sh (func_all_modules): Complete rename of
127911         gpl/lgpl to gpl-2.0 and lgpl-2.1, and add gpl-3.0.
127913 2007-07-02  Bruno Haible  <bruno@clisp.org>
127915         * m4/inttypes.m4 (gl_INTTYPES_H): Define __STDC_LIMIT_MACROS in C++
127916         mode, when inttypes.h comes from gnulib.
127917         Reported by Joel E. Denny <jdenny@ces.clemson.edu>.
127919 2007-07-02  Simon Josefsson  <simon@josefsson.org>
127921         * NEWS: Mention lgpl module name change.
127923         * modules/lgpl-2.1: Renamed from lgpl.
127925         * NEWS: Mention gpl module name change.
127927         * modules/gpl-3.0: New file, based on gpl-2.0.
127929         * modules/gpl-2.0: Renamed from gpl.
127931         * modules/gpl: Fix filename, doc/gpl.texi is now found at
127932         doc/gpl-2.0.texi.
127934 2007-07-02  Paul Eggert  <eggert@cs.ucla.edu>
127936         * lib/inttypes_.h [defined __cplusplus&&!defined __STDC_LIMIT_MACROS]:
127937         #define __STDC_LIMIT_MACROS temporarily while including
127938         <stdint.h>, so that __STDC_LIMIT_MACROS is defined.
127939         Problem reported by Joel E. Denny in
127940         <http://lists.gnu.org/r/bug-gnulib/2007-07/msg00008.html>.
127942 2007-07-01  Bruno Haible  <bruno@clisp.org>
127944         * lib/unistdio.h: New file.
127945         * lib/unistdio/u-asnprintf.h: New file.
127946         * lib/unistdio/u-asprintf.h: New file.
127947         * lib/unistdio/u-printf-args.c: New file.
127948         * lib/unistdio/u-printf-args.h: New file.
127949         * lib/unistdio/u-printf-parse.h: New file.
127950         * lib/unistdio/u-snprintf.h: New file.
127951         * lib/unistdio/u-sprintf.h: New file.
127952         * lib/unistdio/u-vasprintf.h: New file.
127953         * lib/unistdio/u-vsnprintf.h: New file.
127954         * lib/unistdio/u-vsprintf.h: New file.
127955         * lib/unistdio/ulc-asnprintf.c: New file.
127956         * lib/unistdio/ulc-asprintf.c: New file.
127957         * lib/unistdio/ulc-fprintf.c: New file, based on lib/fprintf.c.
127958         * lib/unistdio/ulc-printf-parse.c: New file.
127959         * lib/unistdio/ulc-snprintf.c: New file.
127960         * lib/unistdio/ulc-sprintf.c: New file.
127961         * lib/unistdio/ulc-vasnprintf.c: New file.
127962         * lib/unistdio/ulc-vasprintf.c: New file.
127963         * lib/unistdio/ulc-vfprintf.c: New file, based on lib/vfprintf.c.
127964         * lib/unistdio/ulc-vsnprintf.c: New file.
127965         * lib/unistdio/ulc-vsprintf.c: New file.
127966         * lib/unistdio/u8-asnprintf.c: New file.
127967         * lib/unistdio/u8-asprintf.c: New file.
127968         * lib/unistdio/u8-printf-parse.c: New file.
127969         * lib/unistdio/u8-snprintf.c: New file.
127970         * lib/unistdio/u8-sprintf.c: New file.
127971         * lib/unistdio/u8-vasnprintf.c: New file.
127972         * lib/unistdio/u8-vasprintf.c: New file.
127973         * lib/unistdio/u8-vsnprintf.c: New file.
127974         * lib/unistdio/u8-vsprintf.c: New file.
127975         * lib/unistdio/u8-u8-asnprintf.c: New file.
127976         * lib/unistdio/u8-u8-asprintf.c: New file.
127977         * lib/unistdio/u8-u8-snprintf.c: New file.
127978         * lib/unistdio/u8-u8-sprintf.c: New file.
127979         * lib/unistdio/u8-u8-vasnprintf.c: New file.
127980         * lib/unistdio/u8-u8-vasprintf.c: New file.
127981         * lib/unistdio/u8-u8-vsnprintf.c: New file.
127982         * lib/unistdio/u8-u8-vsprintf.c: New file.
127983         * lib/unistdio/u16-asnprintf.c: New file.
127984         * lib/unistdio/u16-asprintf.c: New file.
127985         * lib/unistdio/u16-printf-parse.c: New file.
127986         * lib/unistdio/u16-snprintf.c: New file.
127987         * lib/unistdio/u16-sprintf.c: New file.
127988         * lib/unistdio/u16-vasnprintf.c: New file.
127989         * lib/unistdio/u16-vasprintf.c: New file.
127990         * lib/unistdio/u16-vsnprintf.c: New file.
127991         * lib/unistdio/u16-vsprintf.c: New file.
127992         * lib/unistdio/u16-u16-asnprintf.c: New file.
127993         * lib/unistdio/u16-u16-asprintf.c: New file.
127994         * lib/unistdio/u16-u16-snprintf.c: New file.
127995         * lib/unistdio/u16-u16-sprintf.c: New file.
127996         * lib/unistdio/u16-u16-vasnprintf.c: New file.
127997         * lib/unistdio/u16-u16-vasprintf.c: New file.
127998         * lib/unistdio/u16-u16-vsnprintf.c: New file.
127999         * lib/unistdio/u16-u16-vsprintf.c: New file.
128000         * lib/unistdio/u32-asnprintf.c: New file.
128001         * lib/unistdio/u32-asprintf.c: New file.
128002         * lib/unistdio/u32-printf-parse.c: New file.
128003         * lib/unistdio/u32-snprintf.c: New file.
128004         * lib/unistdio/u32-sprintf.c: New file.
128005         * lib/unistdio/u32-vasnprintf.c: New file.
128006         * lib/unistdio/u32-vasprintf.c: New file.
128007         * lib/unistdio/u32-vsnprintf.c: New file.
128008         * lib/unistdio/u32-vsprintf.c: New file.
128009         * lib/unistdio/u32-u32-asnprintf.c: New file.
128010         * lib/unistdio/u32-u32-asprintf.c: New file.
128011         * lib/unistdio/u32-u32-snprintf.c: New file.
128012         * lib/unistdio/u32-u32-sprintf.c: New file.
128013         * lib/unistdio/u32-u32-vasnprintf.c: New file.
128014         * lib/unistdio/u32-u32-vasprintf.c: New file.
128015         * lib/unistdio/u32-u32-vsnprintf.c: New file.
128016         * lib/unistdio/u32-u32-vsprintf.c: New file.
128017         * tests/unistdio/test-ulc-asnprintf1.c: New file.
128018         * tests/unistdio/test-ulc-asnprintf1.h: New file.
128019         * tests/unistdio/test-ulc-printf1.h: New file.
128020         * tests/unistdio/test-ulc-vasnprintf1.c: New file.
128021         * tests/unistdio/test-ulc-vasnprintf2.c: New file.
128022         * tests/unistdio/test-ulc-vasnprintf2.sh: New file.
128023         * tests/unistdio/test-ulc-vasnprintf3.c: New file.
128024         * tests/unistdio/test-ulc-vasnprintf3.sh: New file.
128025         * tests/unistdio/test-ulc-vasprintf1.c: New file.
128026         * tests/unistdio/test-ulc-vsnprintf1.c: New file.
128027         * tests/unistdio/test-ulc-vsprintf1.c: New file.
128028         * tests/unistdio/test-u8-asnprintf1.c: New file.
128029         * tests/unistdio/test-u8-asnprintf1.h: New file.
128030         * tests/unistdio/test-u8-printf1.h: New file.
128031         * tests/unistdio/test-u8-vasnprintf1.c: New file.
128032         * tests/unistdio/test-u8-vasnprintf2.c: New file.
128033         * tests/unistdio/test-u8-vasnprintf2.sh: New file.
128034         * tests/unistdio/test-u8-vasnprintf3.c: New file.
128035         * tests/unistdio/test-u8-vasnprintf3.sh: New file.
128036         * tests/unistdio/test-u8-vasprintf1.c: New file.
128037         * tests/unistdio/test-u8-vsnprintf1.c: New file.
128038         * tests/unistdio/test-u8-vsprintf1.c: New file.
128039         * tests/unistdio/test-u16-asnprintf1.c: New file.
128040         * tests/unistdio/test-u16-asnprintf1.h: New file.
128041         * tests/unistdio/test-u16-printf1.h: New file.
128042         * tests/unistdio/test-u16-vasnprintf1.c: New file.
128043         * tests/unistdio/test-u16-vasnprintf2.c: New file.
128044         * tests/unistdio/test-u16-vasnprintf2.sh: New file.
128045         * tests/unistdio/test-u16-vasnprintf3.c: New file.
128046         * tests/unistdio/test-u16-vasnprintf3.sh: New file.
128047         * tests/unistdio/test-u16-vasprintf1.c: New file.
128048         * tests/unistdio/test-u16-vsnprintf1.c: New file.
128049         * tests/unistdio/test-u16-vsprintf1.c: New file.
128050         * tests/unistdio/test-u32-asnprintf1.c: New file.
128051         * tests/unistdio/test-u32-asnprintf1.h: New file.
128052         * tests/unistdio/test-u32-printf1.h: New file.
128053         * tests/unistdio/test-u32-vasnprintf1.c: New file.
128054         * tests/unistdio/test-u32-vasnprintf2.c: New file.
128055         * tests/unistdio/test-u32-vasnprintf2.sh: New file.
128056         * tests/unistdio/test-u32-vasnprintf3.c: New file.
128057         * tests/unistdio/test-u32-vasnprintf3.sh: New file.
128058         * tests/unistdio/test-u32-vasprintf1.c: New file.
128059         * tests/unistdio/test-u32-vsnprintf1.c: New file.
128060         * tests/unistdio/test-u32-vsprintf1.c: New file.
128061         * modules/unistdio/base: New file.
128062         * modules/unistdio/u-printf-args: New file.
128063         * modules/unistdio/ulc-asnprintf: New file.
128064         * modules/unistdio/ulc-asprintf: New file.
128065         * modules/unistdio/ulc-fprintf: New file.
128066         * modules/unistdio/ulc-printf-parse: New file.
128067         * modules/unistdio/ulc-snprintf: New file.
128068         * modules/unistdio/ulc-sprintf: New file.
128069         * modules/unistdio/ulc-vasnprintf: New file.
128070         * modules/unistdio/ulc-vasprintf: New file.
128071         * modules/unistdio/ulc-vfprintf: New file.
128072         * modules/unistdio/ulc-vsnprintf: New file.
128073         * modules/unistdio/ulc-vsprintf: New file.
128074         * modules/unistdio/u8-asnprintf: New file.
128075         * modules/unistdio/u8-asprintf: New file.
128076         * modules/unistdio/u8-printf-parse: New file.
128077         * modules/unistdio/u8-snprintf: New file.
128078         * modules/unistdio/u8-sprintf: New file.
128079         * modules/unistdio/u8-vasnprintf: New file.
128080         * modules/unistdio/u8-vasprintf: New file.
128081         * modules/unistdio/u8-vsnprintf: New file.
128082         * modules/unistdio/u8-vsprintf: New file.
128083         * modules/unistdio/u8-u8-asnprintf: New file.
128084         * modules/unistdio/u8-u8-asprintf: New file.
128085         * modules/unistdio/u8-u8-snprintf: New file.
128086         * modules/unistdio/u8-u8-sprintf: New file.
128087         * modules/unistdio/u8-u8-vasnprintf: New file.
128088         * modules/unistdio/u8-u8-vasprintf: New file.
128089         * modules/unistdio/u8-u8-vsnprintf: New file.
128090         * modules/unistdio/u8-u8-vsprintf: New file.
128091         * modules/unistdio/u16-asnprintf: New file.
128092         * modules/unistdio/u16-asprintf: New file.
128093         * modules/unistdio/u16-printf-parse: New file.
128094         * modules/unistdio/u16-snprintf: New file.
128095         * modules/unistdio/u16-sprintf: New file.
128096         * modules/unistdio/u16-vasnprintf: New file.
128097         * modules/unistdio/u16-vasprintf: New file.
128098         * modules/unistdio/u16-vsnprintf: New file.
128099         * modules/unistdio/u16-vsprintf: New file.
128100         * modules/unistdio/u16-u16-asnprintf: New file.
128101         * modules/unistdio/u16-u16-asprintf: New file.
128102         * modules/unistdio/u16-u16-snprintf: New file.
128103         * modules/unistdio/u16-u16-sprintf: New file.
128104         * modules/unistdio/u16-u16-vasnprintf: New file.
128105         * modules/unistdio/u16-u16-vasprintf: New file.
128106         * modules/unistdio/u16-u16-vsnprintf: New file.
128107         * modules/unistdio/u16-u16-vsprintf: New file.
128108         * modules/unistdio/u32-asnprintf: New file.
128109         * modules/unistdio/u32-asprintf: New file.
128110         * modules/unistdio/u32-printf-parse: New file.
128111         * modules/unistdio/u32-snprintf: New file.
128112         * modules/unistdio/u32-sprintf: New file.
128113         * modules/unistdio/u32-vasnprintf: New file.
128114         * modules/unistdio/u32-vasprintf: New file.
128115         * modules/unistdio/u32-vsnprintf: New file.
128116         * modules/unistdio/u32-vsprintf: New file.
128117         * modules/unistdio/u32-u32-asnprintf: New file.
128118         * modules/unistdio/u32-u32-asprintf: New file.
128119         * modules/unistdio/u32-u32-snprintf: New file.
128120         * modules/unistdio/u32-u32-sprintf: New file.
128121         * modules/unistdio/u32-u32-vasnprintf: New file.
128122         * modules/unistdio/u32-u32-vasprintf: New file.
128123         * modules/unistdio/u32-u32-vsnprintf: New file.
128124         * modules/unistdio/u32-u32-vsprintf: New file.
128125         * modules/unistdio/ulc-asnprintf-tests: New file.
128126         * modules/unistdio/ulc-vasnprintf-tests: New file.
128127         * modules/unistdio/ulc-vasprintf-tests: New file.
128128         * modules/unistdio/ulc-vsnprintf-tests: New file.
128129         * modules/unistdio/ulc-vsprintf-tests: New file.
128130         * modules/unistdio/u8-asnprintf-tests: New file.
128131         * modules/unistdio/u8-vasnprintf-tests: New file.
128132         * modules/unistdio/u8-vasprintf-tests: New file.
128133         * modules/unistdio/u8-vsnprintf-tests: New file.
128134         * modules/unistdio/u8-vsprintf-tests: New file.
128135         * modules/unistdio/u16-asnprintf-tests: New file.
128136         * modules/unistdio/u16-vasnprintf-tests: New file.
128137         * modules/unistdio/u16-vasprintf-tests: New file.
128138         * modules/unistdio/u16-vsnprintf-tests: New file.
128139         * modules/unistdio/u16-vsprintf-tests: New file.
128140         * modules/unistdio/u32-asnprintf-tests: New file.
128141         * modules/unistdio/u32-vasnprintf-tests: New file.
128142         * modules/unistdio/u32-vasprintf-tests: New file.
128143         * modules/unistdio/u32-vsnprintf-tests: New file.
128144         * modules/unistdio/u32-vsprintf-tests: New file.
128145         * MODULES.html.sh (Unicode string functions): Add the new modules.
128147 2007-07-01  Bruno Haible  <bruno@clisp.org>
128149         * lib/sprintf.c (sprintf): Limit the available length estimation,
128150         to avoid address wraparound.
128151         * lib/vsprintf.c (vsprintf): Likewise.
128152         * modules/sprintf-posix (Dependencies): Add stdint.
128153         * modules/vsprintf-posix (Dependencies): Likewise.
128155 2007-07-01  Bruno Haible  <bruno@clisp.org>
128157         * gnulib-tool (self_abspathname): Determine PATH_SEPARATOR and handle
128158         Windows PATH as well. Conservative double-quoting. Comments.
128160 2007-07-01  Bruno Haible  <bruno@clisp.org>
128161             Eric Blake  <ebb9@byu.net>
128162             Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
128164         * gnulib-tool (self_abspathname): Fix algorithm to cope with
128165         empty components in $PATH, denoting '.'.
128167 2007-07-01  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
128169         * gnulib-tool: Fix indentation.
128170         (func_create_megatestdir): Likewise.
128171         Report by Bruno Haible.
128173 2007-06-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
128175         Sync from Automake.
128176         * build-aux/gnupload: Fix shell portability issues with for loops.
128177         Report by Karl Berry.
128179 2007-06-29  Simon Josefsson  <simon@josefsson.org>
128181         * build-aux/maint.mk (POURL): Use translationproject.org.
128183 2007-06-27  Simon Josefsson  <simon@josefsson.org>
128184             Bruno Haible  <bruno@clisp.org>
128186         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Require gl_HEADER_SYS_SOCKET
128187         before using HAVE_WS2TCPIP_H. Check for gai_strerror through an
128188         explicit link test, rather than AC_REPLACE_FUNCS - for mingw.
128189         (gl_PREREQ_GETADDRINFO): Require gl_HEADER_SYS_SOCKET before using
128190         HAVE_SYS_SOCKET_H and HAVE_WS2TCPIP_H.
128192 2007-06-27  Bruno Haible  <bruno@clisp.org>
128194         * build-aux/config.rpath: Upgrade to libtool-1.5.24.
128195         * build-aux/config.libpath: Upgrade to libtool-1.5.24.
128197 2007-06-26  Karl Berry  <karl@gnu.org>
128199         * MODULES.html.sh: remove xreadlink-with-size.
128201 2007-06-23  Paul Eggert  <eggert@cs.ucla.edu>
128203         * lib/time_.h: Port to Solaris 8 with Sun Studio 11, using a
128204         method that I hope also handles the double-include problem noted
128205         by Bruno Haible in
128206         <http://lists.gnu.org/r/bug-gnulib/2007-05/msg00186.html>.
128208 2007-06-23  Bruno Haible  <bruno@clisp.org>
128210         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
128211         Don't let the 'mostlyclean' target fail if the last subdirectory could
128212         not be removed.
128213         Reported by Karl Berry.
128215 2007-06-23  Bruno Haible  <bruno@clisp.org>
128217         * gnulib-tool (echo): Add a speedier workaround for ksh.
128218         * tests/test-echo.sh: Likewise.
128220 2007-06-23  Bruno Haible  <bruno@clisp.org>
128222         * gnulib-tool (echo): Add workarounds also for bash versions < 2.04.
128223         * tests/test-echo.sh: Likewise.
128225 2007-06-23  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
128227         * gnulib-tool (IFS): Initialize early, so we don't set it to
128228         empty later.
128229         (self_abspathname): Rewrite algorithm to set it, reindent.
128230         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am)
128231         (func_create_megatestdir): Merge some sed scripts.
128233 2007-06-23  Paul Eggert  <eggert@cs.ucla.edu>
128235         * m4/include_next.m4 (gl_CHECK_NEXT_HEADERS): Check some typos
128236         exposed by Sun Studio 11 cc on Solaris 8.
128238 2007-06-22  Bruno Haible  <bruno@clisp.org>
128240         * gnulib-tool (echo): Ensure the echo primitive does not interpret
128241         backslashes.
128242         * tests/test-echo.sh: New file.
128244 2007-06-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
128246         * gnulib-tool (func_add_or_update, func_create_testdir): Do not
128247         simplify `sed_replace_build_aux' scripts, they are portable but
128248         echoing them with `echo' is not.
128249         Report and analysis by Fernando Ferreira <fernando.prog@netcabo.pt>.
128251 2007-06-21  Karl Berry  <karl@gnu.org>
128253         * config/srclist.txt: guess we can't handle the licenses via
128254         srclist at the moment.
128256 2007-06-21  Paul Eggert  <eggert@cs.ucla.edu>
128258         * MODULES.html.sh: Add include_next.
128259         * modules/include_next: New file.
128261 2007-06-20  Paul Eggert  <eggert@cs.ucla.edu>
128263         * m4/include_next.m4 (gl_INCLUDE_NEXT): Define and AC_SUBST
128264         INCLUDE_NEXT.
128265         (gl_CHECK_NEXT_HEADERS): New macro.
128266         * m4/fcntl_h.m4 (gl_FCNTL_H): use gl_CHECK_NEXT_HEADERS instead of
128267         the obsolescent gl_ABSOLUTE_HEADER.
128268         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Likewise.
128269         * m4/float_h.m4 (gl_FLOAT_H): Likewise.
128270         * m4/iconv_h.m4 (gl_ICONV_H): Likewise.
128271         * m4/inttypes.m4 (gl_INTTYPES_H): Likewise.
128272         * m4/locale_h.m4 (gl_LOCALE_H): Likewise.
128273         * m4/math_h.m4 (gl_MATH_H): Likewise.
128274         * m4/netinet_in_h.m4 (gl_HEADER_NETINET_IN): Likewise.
128275         * m4/search_h.m4 (gl_SEARCH_H): Likewise.
128276         * m4/signal_h.m4 (gl_SIGNAL_H): Likewise.
128277         * m4/stdint.m4 (gl_STDINT_H): Likewise.
128278         * m4/stdio_h.m4 (gl_STDIO_H): Likewise.
128279         * m4/stdlib_h.m4 (gl_STDLIB_H): Likewise.
128280         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Likewise.
128281         * m4/sys_select_h.m4 (gl_HEADER_SYS_SELECT): Likewise.
128282         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Likewise.
128283         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Likewise.
128284         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Likewise.
128285         * m4/sysexits.m4 (gl_SYSEXITS): Likewise.
128286         * m4/time_h.m4 (gl_HEADER_TIME_H_BODY): Likewise.
128287         * m4/unistd_h.m4 (gl_UNISTD_H): Likewise.
128288         * m4/wchar.m4 (gl_WCHAR_H): Likewise.
128289         * m4/wctype.m4 (gl_WCTYPE_H): Likewise.
128290         * m4/inttypes.m4 (gl_INTTYPES_H): Define
128291         _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H to avoid the problem of unclean
128292         builds, since ABSOLUTE_INTTYPES_H is no longer being defined.
128293         * m4/stdint.m4 (gl_STDINT_H): Likewise, for
128294         _GL_JUST_INCLUDE_SYSTEM_STDINT_H.
128295         * lib/fcntl_.h: Use @INCLUDE_NEXT@ @NEXT_foo_H@
128296         rather than @HAVE_INCLUDE_NEXT@ and @ABSOLUTE_foo_H@.
128297         * lib/float_.h: Likewise.
128298         * lib/inttypes_.h: Likewise.
128299         * lib/math_.h: Likewise.
128300         * lib/search_.h: Likewise.
128301         * lib/signal_.h: Likewise.
128302         * lib/stdint_.h: Likewise.
128303         * lib/stdio_.h: Likewise.
128304         * lib/stdlib_.h: Likewise.
128305         * lib/string_.h: Likewise.
128306         * lib/sys_stat_.h: Likewise.
128307         * lib/sys_time_.h: Likewise.
128308         * lib/time_.h: Likewise.
128309         * lib/unistd_.h: Likewise.
128310         * lib/wchar_.h: Likewise.
128311         * lib/wctype_.h: Likewise.
128312         * lib/dirent_.h: Likewise.
128313         * lib/iconv_.h: Likewise.
128314         * lib/locale_.h: Likewise.
128315         * lib/netinet_in_.h: Likewise.
128316         * lib/sys_select_.h: Likewise.
128317         * lib/sys_socket_.h: Likewise.
128318         * lib/sysexits_.h: Likewise.
128319         * modules/fcntl (Depends-on): Depend on include_next, not
128320         absolute_header.
128321         (Makefile): Substitute INCLUDE_NEXT and NEXT_foo_H, not
128322         HAVE_INCLUDE_NEXT and ABSOLUTE_foo_H.
128323         * modules/fchdir: Likewise.
128324         * modules/float: Likewise.
128325         * modules/iconv_open: Likewise.
128326         * modules/inttypes: Likewise.
128327         * modules/locale: Likewise.
128328         * modules/math: Likewise.
128329         * modules/netinet_in: Likewise.
128330         * modules/search: Likewise.
128331         * modules/signal: Likewise.
128332         * modules/stdint: Likewise.
128333         * modules/stdio: Likewise.
128334         * modules/stdlib: Likewise.
128335         * modules/string: Likewise.
128336         * modules/sys_select: Likewise.
128337         * modules/sys_socket: Likewise.
128338         * modules/sys_stat: Likewise.
128339         * modules/sys_time: Likewise.
128340         * modules/sysexits: Likewise.
128341         * modules/time: Likewise.
128342         * modules/unistd: Likewise.
128343         * modules/wchar: Likewise.
128344         * modules/wctype: Likewise.
128345         * modules/sys_stat: Change maintainer to "all".
128346         * modules/unistd: Likewise.
128348 2007-06-20  Karl Berry  <karl@gnu.org>
128350         * config/srclist.txt: track www changes in license files.
128352 2007-06-20  Sergey Poznyakoff  <gray@gnu.org.ua>
128354         * build-aux/bootstrap: Remove stray dot.
128355         Make sure build_aux settings are honored when linking
128356         gnulib_extra_files.
128358 2007-06-19  Eric Blake  <ebb9@byu.net>
128360         * modules/canonicalize-lgpl-tests (test_canonicalize_lgpl_LDADD):
128361         Allow compilation on cygwin.
128363 2007-06-19  Jim Meyering  <jim@meyering.net>
128365         xreadlink-with-size: Remove module.  No longer used.
128366         Ex-callers now use xreadlink or mreadlink-with-size.
128367         * modules/xreadlink-with-size: Remove module.
128368         * lib/xreadlink-with-size.c: Remove file.
128369         * lib/xreadlink.h (xreadlink_with_size): Remove prototype.
128370         (xreadlink): Remove inaccurate comment.  The one in xreadlink.c,
128371         just before the function definition *is* accurate.
128373         Eliminate one way canonicalize_filename_mode could exit.
128374         * lib/canonicalize.c (canonicalize_filename_mode):
128375         Use mreadlink_with_size, not xreadlink_with_size.
128377 2007-06-18  Paul Eggert  <eggert@cs.ucla.edu>
128379         Detect porting problems to FreeBSD/arm, which has time_t wider than
128380         long int.  Original problem reported for GNU diff by Xin Li in
128381         <http://lists.gnu.org/r/bug-gnu-utils/2007-06/msg00091.html>.
128382         * modules/getdate (Depends-on): Add intprops, verify.
128383         * lib/getdate.y: Include intprops.h, verify.h.  Verify that time_t
128384         is an integer type no wider than long int.
128386 2007-06-18  Jim Meyering  <jim@meyering.net>
128388         New module: mreadlink-with-size.
128389         * MODULES.html.sh: Add mreadlink-with-size.
128390         * modules/mreadlink-with-size: New module
128391         * modules/canonicalize (Depends-on): Depend on mreadlink-with-size,
128392         not xreadlink-with-size.
128393         * lib/mreadlink-with-size.c, lib/mreadlink.h: New files.
128395 2007-06-16  Bruno Haible  <bruno@clisp.org>
128397         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Catch the MacOS X 10.4 bug.
128398         * doc/functions/frexpl.texi: Document the MacOS X 10.4 bug.
128399         Reported by Gary V. Vaughan <gary@gnu.org>.
128401 2007-06-15  Paul Eggert  <eggert@cs.ucla.edu>
128403         Revamp lchown so that it lives in unistd.h where it belongs.
128404         * lib/lchown.h: Remove.
128405         * lib/dirchownmod.c: Don't include lib/lchown.h.
128406         * lib/fchownat.c: Likewise.
128407         * lib/openat.c: Likewise.
128408         * lib/lchown.c (REPLACE_CHOWN): Define to 0 if the system chown
128409         does not follow symlinks.
128410         (EOPNOTSUPP): Define if not defined.
128411         * lib/unistd_.h (chown): Do not replace if REPLADE_CHOWN
128412         is defined to 0.
128413         (lchown): New decl.
128414         * m4/lchown.m4 (gl_FUNC_LCHOWN): Require gl_UNISTD_H_DEFAULTS.
128415         Do not check for lchown decl.
128416         Set REPLACE_LCHOWN.
128417         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Set GNULIB_LCHOWN,
128418         REPLACE_LCHOWN.
128419         * modules/chown: Make it clear it follows symlinks.
128420         * modules/lchown: Make it clear it doesn't follow symlinks.
128421         (Files): Remove lib/lchown.h
128422         (Depends-on): Add unistd.
128423         (configure.ac): Add gl_UNISTD_MODULE_INDICATOR([lchown]).
128424         (Include): Include <unistd.h>, not "lchown.h".
128425         * modules/unistd (unistd.h): Substitude GNULIB_LCHOWN and
128426         REPLACE_LCHOWN.
128428 2007-06-15  Jim Meyering  <jim@meyering.net>
128430         Change license (GPL to LGPL) of fsusage and dependents.
128431         * modules/fsusage (License): Change to LGPL.
128432         * modules/full-read (License): Likewise.
128433         * modules/full-write (License): Likewise.
128434         * modules/safe-read (License): Likewise.
128435         * modules/safe-write (License): Likewise.
128437 2007-06-14  Ben Pfaff  <blp@gnu.org>
128439         Missing part of allocsa -> malloca transition.
128440         * modules/relocatable-prog-wrapper: gl_ALLOCSA should be
128441         gl_MALLOCA.
128443 2007-06-12  Bruno Haible  <bruno@clisp.org>
128445         * m4/isnanl.m4 (gl_FUNC_ISNANL_WORKS): Guess no when cross-compiling
128446         to ia64, x86_64, i386.
128447         Reported by Eric Blake.
128449 2007-06-12  Bruno Haible  <bruno@clisp.org>
128451         * m4/printf.m4 (gl_PRINTF_INFINITE_LONG_DOUBLE): Guess no also when
128452         cross-compiling to x86_64.
128454 2007-06-12  Paul Eggert  <eggert@cs.ucla.edu>
128456         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Fix POSIX sed portability
128457         glitch reported by Ralf Wildenhues in
128458         <http://lists.gnu.org/r/bug-gnulib/2007-06/msg00114.html>.
128460         * m4/regex.m4 (gl_REGEX): Catch a bug with [[:alnum:]_-] reported by
128461         Vin Shelton.
128463 2007-06-11  Bruno Haible  <bruno@clisp.org>
128465         * lib/printf-args.c (PRINTF_FETCHARGS) [ENABLE_UNISTDIO]: Fix NULL
128466         replacement string.
128467         Reported by Eric Blake.
128469 2007-06-10  Bruno Haible  <bruno@clisp.org>
128471         Prepare vasnprintf code for use with Unicode strings.
128472         * lib/printf-args.h (PRINTF_FETCHARGS): New macro.
128473         (arg_type) [ENABLE_UNISTDIO]: Define TYPE_U8_STRING, TYPE_U16_STRING,
128474         TYPE_U32_STRING.
128475         (argument) [ENABLE_UNISTDIO]: Add a_u8_string, a_u16_string,
128476         a_u32_string variants.
128477         (PRINTF_FETCHARGS): Renamed from printf_fetchargs.
128478         * lib/printf-args.c: Don't include config.h and the specification
128479         header if PRINTF_FETCHARGS is already defined.
128480         (PRINTF_FETCHARGS): Renamed from printf_fetchargs.
128481         (PRINTF_FETCHARGS) [ENABLE_UNISTDIO]: Add code for TYPE_U8_STRING,
128482         TYPE_U16_STRING, TYPE_U32_STRING.
128483         * lib/printf-parse.h [ENABLE_UNISTDIO] (u8_directive, u8_directives,
128484         u16_directive, u16_directives, u32_directive, u32_directives): New
128485         types.
128486         (ulc_printf_parse, u8_printf_parse, u16_printf_parse, u32_printf_parse):
128487         New declarations.
128488         * lib/printf-parse.c: Don't include config.h and the specification
128489         header if PRINTF_PARSE is already defined. Eliminate the set of
128490         parameters for WIDE_CHAR_VERSION; the user of this file must provide
128491         them now. Include c-ctype.h.
128492         (PRINTF_PARSE) [ENABLE_UNISTDIO]: Add code implementing the 'U'
128493         directive and CHAR_T_ONLY_ASCII.
128494         * lib/vasnprintf.c: Don't include config.h and the specification header
128495         if VASNPRINTF is already defined.
128496         (DCHAR_IS_TCHAR, DCHAR_CPY): New macros.
128497         (VASNPRINTF): Use PRINTF_FETCHARGS instead of printf_fetchargs. Use
128498         DCHAR_CPY. Handle the case that DCHAR_T and FCHAR_T are not the same
128499         type. Handle the case that TCHAR_T and FCHAR_T are not of the same
128500         size. Handle the case that DCHAR_T and TCHAR_T are not the same type,
128501         add a conversion from TCHAR_T[] to DCHAR_T[], and rework the padding
128502         code accordingly.
128503         (VASNPRINTF) [ENABLE_UNISTDIO]: Implement the 'U' directive. Enable
128504         pad_ourselves also in this case, with the 'c' and 's' directives, and
128505         with a different notion of "width".
128506         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_WITH_EXTRAS): New macros.
128508 2007-06-10  Bruno Haible  <bruno@clisp.org>
128510         * modules/unistr/u32-mbsnlen: New file.
128511         * lib/unistr/u32-mbsnlen.c: New file.
128513         * modules/unistr/u16-mbsnlen: New file.
128514         * lib/unistr/u16-mbsnlen.c: New file.
128516         * modules/unistr/u8-mbsnlen: New file.
128517         * lib/unistr/u8-mbsnlen.c: New file.
128519         * lib/unistr.h (u8_mbsnlen, u16_mbsnlen, u32_mbsnlen): New
128520         declarations.
128522 2007-06-10  Bruno Haible  <bruno@clisp.org>
128524         * lib/string_.h (mbsnlen): New declaration.
128525         * lib/mbsnlen.c: New file.
128526         * m4/mbsnlen.m4: New file.
128527         * modules/mbsnlen: New file.
128528         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Set GNULIB_MBSNLEN.
128529         * modules/string (string.h): Substitute GNULIB_MBSNLEN.
128530         * MODULES.html.sh (Internationalization functions): Add mbsnlen.
128532 2007-06-10  Bruno Haible  <bruno@clisp.org>
128534         * lib/mbslen.c: Include <stdlib.h>, needed for MB_CUR_MAX.
128536 2007-06-10  Bruno Haible  <bruno@clisp.org>
128538         * lib/mbiter.h: Include <stddef.h>, needed for ptrdiff_t.
128539         * lib/mbuiter.h: Likewise.
128541 2007-06-10  Bruno Haible  <bruno@clisp.org>
128543         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Check for _snprintf
128544         declaration.
128546 2007-06-10  Karl Berry  <karl@gnu.org>
128548         * config/srclist.txt: remove gettext entries, Bruno prefers
128549         to update individually.
128551 2007-06-10  Bruno Haible  <bruno@clisp.org>
128553         * lib/vasnprintf.c (VASNPRINTF) [!USE_SNPRINTF]: Remove variable
128554         'maxlen'. Ensure only length + width bytes are allocated, not
128555         length + 1 + width.
128557 2007-06-09  Bruno Haible  <bruno@clisp.org>
128559         * lib/vasnprintf.c (FCHAR_T, DCHAR_T, TCHAR_T): New macros.
128560         (CHAR_T): Remove macro.
128561         (VASNPRINTF): Update.
128563 2007-06-09  Bruno Haible  <bruno@clisp.org>
128565         * MODULES.html.sh (Unicode string functions): Add the new modules.
128567         * modules/uniconv/u32-conv-to-enc: New file.
128568         * lib/uniconv/u32-conv-to-enc.c: New file.
128569         * modules/uniconv/u32-conv-to-enc-tests: New file.
128570         * tests/uniconv/test-u32-conv-to-enc.c: New file.
128572         * modules/uniconv/u16-conv-to-enc: New file.
128573         * lib/uniconv/u16-conv-to-enc.c: New file.
128574         * lib/uniconv/u-conv-to-enc.h: New file.
128575         * modules/uniconv/u16-conv-to-enc-tests: New file.
128576         * tests/uniconv/test-u16-conv-to-enc.c: New file.
128578         * modules/uniconv/u8-conv-to-enc: New file.
128579         * lib/uniconv/u8-conv-to-enc.c: New file.
128580         * modules/uniconv/u8-conv-to-enc-tests: New file.
128581         * tests/uniconv/test-u8-conv-to-enc.c: New file.
128583         * lib/uniconv.h (u8_conv_to_encoding, u16_conv_to_encoding,
128584         u32_conv_to_encoding): New declarations.
128586 2007-06-09  Bruno Haible  <bruno@clisp.org>
128588         * tests/uniconv/test-u32-strconv-to-enc.c (main): Remove unused code.
128590 2007-06-09  Bruno Haible  <bruno@clisp.org>
128592         Rename 'allocsa' -> 'malloca', 'freesa' -> 'freea'.
128593         * modules/malloca: Renamed from modules/allocsa, updated.
128594         * lib/malloca.h: Renamed from lib/allocsa.h, updated.
128595         * lib/malloca.c: Renamed from lib/allocsa.c, updated.
128596         * lib/malloca.valgrind: Renamed from lib/allocsa.valgrind, updated.
128597         * m4/malloca.m4: Renamed from m4/allocsa.m4, updated.
128598         * modules/malloca-tests: Renamed from modules/allocsa-tests, updated.
128599         * tests/test-malloca.c: Renamed from tests/test-allocsa.c, updated.
128600         * modules/xmalloca: Renamed from modules/xallocsa, updated.
128601         * lib/xmalloca.h: Renamed from lib/xallocsa.h, updated.
128602         * lib/xmalloca.c: Renamed from lib/xallocsa.c, updated.
128603         * modules/c-strcasestr (Depends-on): Update.
128604         * lib/c-strcasestr.c: Update.
128605         * modules/c-strstr (Depends-on): Update.
128606         * lib/c-strstr.c: Update.
128607         * modules/canonicalize-lgpl (Depends-on): Update.
128608         * lib/canonicalize-lgpl.c: Update.
128609         * modules/clean-temp (Depends-on): Update.
128610         * lib/clean-temp.c: Update.
128611         * modules/csharpcomp (Depends-on): Update.
128612         * lib/csharpcomp.c: Update.
128613         * modules/csharpexec (Depends-on): Update.
128614         * lib/csharpexec.c: Update.
128615         * modules/javacomp (Depends-on): Update.
128616         * lib/javacomp.c: Update.
128617         * modules/javaexec (Depends-on): Update.
128618         * lib/javaexec.c: Update.
128619         * modules/mbscasestr (Depends-on): Update.
128620         * lib/mbscasestr.c: Update.
128621         * modules/mbsstr (Depends-on): Update.
128622         * lib/mbsstr.c: Update.
128623         * modules/setenv (Depends-on): Update.
128624         * lib/setenv.c: Update.
128625         * modules/strcasestr (Depends-on): Update.
128626         * lib/strcasestr.c: Update.
128627         * modules/striconveha (Depends-on): Update.
128628         * lib/striconveha.c: Update.
128629         * modules/relocatable-prog-wrapper (Files): Update.
128630         * lib/relocwrapper.c: Update.
128631         * build-aux/install-reloc: Update.
128632         * MODULES.html.sh (Memory management functions <stdlib.h>): Update.
128634 2007-06-08  Bruno Haible  <bruno@clisp.org>
128636         Port to uClibc.
128637         * lib/fbufmode.c (fbufmode): Add special code for uClibc.
128638         * lib/fpurge.c (fpurge): Likewise.
128639         * lib/freading.c (freading): Likewise.
128640         * lib/fseeko.c (rpl_fseeko): Likewise.
128641         * lib/fseterr.c (fseterr): Likewise.
128642         * lib/fwriting.c (fwriting): Likewise.
128643         * tests/test-fflush.c (main): Avoid a failure on uClibc.
128645 2007-06-08  Bruno Haible  <bruno@clisp.org>
128647         * m4/intlmacosx.m4: New file, extracted from gettext.m4.
128648         * m4/gettext.m4 (gt_INTL_MACOSX): Remove macro, moved to intlmacosx.m4.
128649         * modules/gettext (Files): Add m4/intlmacosx.m4.
128651 2007-06-07  Bruno Haible  <bruno@clisp.org>
128653         * modules/localename-tests: New file.
128654         * tests/test-localename.c: New file.
128656         New module 'localename'.
128657         * lib/localename.h: New file.
128658         * lib/localename.c: New file, from GNU gettext.
128659         * m4/localename.m4: New file.
128660         * modules/localename: New file.
128662 2007-06-07  Bruno Haible  <bruno@clisp.org>
128664         Work around the lack of <wchar.h> on some builds of uClibc.
128665         * doc/headers/wchar.texi: Update.
128666         * lib/wchar_.h: Include <wchar.h> only if it exists.
128667         * m4/wchar.m4 (gl_WCHAR_H): Check for <wchar.h>. Set HAVE_WCHAR_H.
128668         * m4/stdint.m4 (gl_STDINT_H): Check for <wchar.h>.
128669         (gl_STDINT_TYPE_PROPERTIES): Don't try to include <wchar.h> if it
128670         doesn't exist.
128671         * modules/wchar (wchar.h): Substitute HAVE_WCHAR_H.
128672         * modules/mbfile (Depends-on): Add wchar.
128673         * modules/mbiter (Depends-on): Likewise.
128674         * modules/mbuiter (Depends-on): Likewise.
128675         Reported by Simon Josefsson.
128677 2007-06-06  Paul Eggert  <eggert@cs.ucla.edu>
128679         Work around problem reported by Steven M. Schweda in
128680         <http://lists.gnu.org/r/bug-tar/2007-06/msg00002.html>:
128681         Tru64 5.1B with the Compaq compiler environment installed declares
128682         an 'isblank' function but does not define it in the C library.
128683         * lib/fnmatch.c (isblank): Check for HAVE_ISBLANK, too.
128684         * lib/regex_internal.h (isblank): Likewise.
128685         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for isblank existence.
128686         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
128688 2007-06-05  Bruno Haible  <bruno@clisp.org>
128690         Fix *printf so that it recognizes non-IEEE numbers on i386, x86_64,
128691         ia64.
128692         * modules/printf-safe: New file.
128693         * modules/fprintf-posix (Depends-on): Add printf-safe.
128694         * modules/printf-posix (Depends-on): Likewise.
128695         * modules/snprintf-posix (Depends-on): Likewise.
128696         * modules/sprintf-posix (Depends-on): Likewise.
128697         * modules/vasnprintf-posix (Depends-on): Likewise.
128698         * modules/vasprintf-posix (Depends-on): Likewise.
128699         * modules/vfprintf-posix (Depends-on): Likewise.
128700         * modules/vprintf-posix (Depends-on): Likewise.
128701         * modules/vsnprintf-posix (Depends-on): Likewise.
128702         * modules/vsprintf-posix (Depends-on): Likewise.
128703         * m4/printf.m4 (gl_PRINTF_INFINITE_LONG_DOUBLE): Require
128704         AC_C_BIGENDIAN. Define CHECK_PRINTF_SAFE if printf-safe is used. Test
128705         non-IEEE numbers on i386, x86_64, ia64. When cross-compiling, guess
128706         "no" on i386, x86_64, ia64.
128707         * tests/test-snprintf-posix.h (LDBL80_WORDS): New macro.
128708         (test_function): Check result of %La, %Lf, %Le, %Lg on non-IEEE numbers
128709         on i386, x86_64, ia64.
128710         * tests/test-sprintf-posix.h (LDBL80_WORDS): New macro.
128711         (test_function): Check result of %La, %Lf, %Le, %Lg on non-IEEE numbers
128712         on i386, x86_64, ia64.
128713         * tests/test-vasnprintf-posix.c: Include float.h.
128714         (LDBL80_WORDS): New macro.
128715         (test_function): Check result of %La, %Lf, %Le, %Lg on non-IEEE numbers
128716         on i386, x86_64, ia64.
128717         * tests/test-vasprintf-posix.c: Include float.h.
128718         (LDBL80_WORDS): New macro.
128719         (test_function): Check result of %La, %Lf, %Le, %Lg on non-IEEE numbers
128720         on i386, x86_64, ia64.
128721         * tests/test-snprintf-posix.c: Include float.h.
128722         * tests/test-sprintf-posix.c: Likewise.
128723         * tests/test-vsnprintf-posix.c: Likewise.
128724         * tests/test-vsprintf-posix.c: Likewise.
128726 2007-06-05  Bruno Haible  <bruno@clisp.org>
128728         Fix isnanl so that it recognizes non-IEEE numbers on i386, x86_64, ia64.
128729         * m4/isnanl.m4 (gl_FUNC_ISNANL_WORKS): Require AC_C_BIGENDIAN. Test
128730         non-IEEE numbers on i386, x86_64, ia64.
128731         (gl_LONG_DOUBLE_EXPONENT_LOCATION): Require AC_C_BIGENDIAN.
128732         * lib/isnan.c (FUNC): Add special code for i386, x86_64, ia64.
128733         * tests/test-isnanl.h: Include float.h.
128734         (main): Check also non-IEEE numbers on i386, x86_64, ia64.
128736 2007-06-05  Bruno Haible  <bruno@clisp.org>
128738         * lib/vasnprintf.c (VASNPRINTF): Do the extra handling of NaN and Inf
128739         also the %a / %A. Handle the %a / %A code before this extra handling.
128741 2007-06-05  Bruno Haible  <bruno@clisp.org>
128743         * lib/vasnprintf.c [NEED_PRINTF_LONG_DOUBLE ||
128744         NEED_PRINTF_INFINITE_LONG_DOUBLE]: Include fpucw.h.
128746 2007-06-05  Bruno Haible  <bruno@clisp.org>
128748         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE): Fix
128749         typo in variable name.
128751 2007-06-05  Eric Blake  <ebb9@byu.net>
128753         * m4/lseek.m4 (gl_FUNC_LSEEK): Work when cross-compiling.
128754         Reported by Simon Josefsson.
128756 2007-06-04  Bruno Haible  <bruno@clisp.org>
128758         Avoid test failures on some PowerPC platforms.
128759         * tests/test-printf-frexpl.c (MIN_NORMAL_EXP, MIN_SUBNORMAL_EXP):
128760         Define differently for PowerPC.
128761         * tests/test-frexpl.c (MIN_NORMAL_EXP): Likewise.
128762         Reported by Gary V. Vaughan <gary@gnu.org>.
128764 2007-06-02  Bruno Haible  <bruno@clisp.org>
128766         Fix test-stdint failure on FreeBSD/ia64.
128767         * m4/stdint.m4 (gl_STDINT_H): Check the values of PTRDIFF_MIN,
128768         PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN,
128769         WCHAR_MAX, WINT_MIN, WINT_MAX entirely, not only for plausibility.
128770         * doc/headers/stdint.texi: Update.
128772 2007-06-01  Bruno Haible  <bruno@clisp.org>
128774         * tests/test-binary-io.c (main): Pass a third argument to open().
128775         Reported by Gary V. Vaughan <gary@gnu.org>.
128777 2007-06-01  Bruno Haible  <bruno@clisp.org>
128779         * doc/functions/frexpl.texi: Update for mingw.
128781 2007-06-01  Bruno Haible  <bruno@clisp.org>
128783         * tests/test-lseek.c (main): Disable test of errno for invalid third
128784         argument.
128785         * doc/functions/lseek.texi: Update.
128786         Reported by Gary V. Vaughan <gary@gnu.org>.
128788 2007-05-28  Bruno Haible  <bruno@clisp.org>
128790         * m4/intl.m4 (AM_INTL_SUBDIR): Substitute variables WOE32, WINDRES.
128792 2007-05-31  Eric Blake  <ebb9@byu.net>
128794         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Guess no on mingw when
128795         cross compiling.
128797 2007-05-30  Eric Blake  <ebb9@byu.net>
128798         and Bruno Haible  <bruno@clisp.org>
128800         Work around mingw test failures exposed by m4-1.4.9b.
128801         * m4/stdint.m4 (gl_STDINT_H): Detect mingw bug.
128802         * tests/test-unistd.c: Disable uid_t and git_t tests for the
128803         moment.
128805 2007-05-30  Bruno Haible  <bruno@clisp.org>
128807         * tests/test-lseek.c: Explicitly close file descriptors 0 and 1 before
128808         assuming that they are closed. Needed on HP-UX 11.
128810 2007-05-29  Bruno Haible  <bruno@clisp.org>
128812         Fix a problem with #include_next.
128813         * lib/dirent_.h: Split the double-inclusion guard.
128814         * lib/fcntl_.h: Likewise.
128815         * lib/float_.h: Likewise.
128816         * lib/iconv_.h: Likewise.
128817         * lib/inttypes_.h: Likewise.
128818         * lib/locale_.h: Likewise.
128819         * lib/math_.h: Likewise.
128820         * lib/netinet_in_.h: Likewise.
128821         * lib/search_.h: Likewise.
128822         * lib/signal_.h: Likewise.
128823         * lib/stdint_.h: Likewise.
128824         * lib/stdio_.h: Likewise.
128825         * lib/stdlib_.h: Likewise.
128826         * lib/string_.h: Likewise.
128827         * lib/sys_select_.h: Likewise.
128828         * lib/sys_socket_.h: Likewise.
128829         * lib/sys_stat_.h: Likewise.
128830         * lib/sys_time_.h: Likewise.
128831         * lib/sysexits_.h: Likewise.
128832         * lib/time_.h: Likewise.
128833         * lib/unistd_.h: Likewise.
128834         * lib/wchar_.h: Likewise.
128835         * lib/wctype_.h: Likewise.
128837 2007-05-29  Bruno Haible  <bruno@clisp.org>
128839         * tests/test-unistd.c: Disable the tests for useconds_t and intptr_t
128840         for the moment.
128842 2007-05-29  Bruno Haible  <bruno@clisp.org>
128844         * m4/isnan.m4 (gl_DOUBLE_EXPONENT_LOCATION): Silence the AC_C_BIGENDIAN
128845         invocation.
128846         Reported by Eric Blake.
128848 2007-05-29  Bruno Haible  <bruno@clisp.org>
128850         * m4/isnanf.m4 (gl_FLOAT_EXPONENT_LOCATION): Fix typo in cross-
128851         compiling case.
128853 2007-05-29  Eric Blake  <ebb9@byu.net>
128854             Bruno Haible  <bruno@clisp.org>
128856         * m4/isnanf.m4 (gl_FUNC_ISNANF_NO_LIBM): Avoid syntax error on
128857         cross compiles.
128859 2007-05-28  Eric Blake  <ebb9@byu.net>
128861         * modules/closein-tests (test_closein_LDADD): Support test on
128862         cygwin with libtool.
128864 2007-05-28  Bruno Haible  <bruno@clisp.org>
128866         * tests/uniconv/test-u16-conv-from-enc.c: Remove #ifdef HAVE_CONFIG_H.
128867         * tests/uniconv/test-u16-strconv-from-enc.c: Likewise.
128868         * tests/uniconv/test-u16-strconv-to-enc.c: Likewise.
128869         * tests/uniconv/test-u32-conv-from-enc.c: Likewise.
128870         * tests/uniconv/test-u32-strconv-from-enc.c: Likewise.
128871         * tests/uniconv/test-u32-strconv-to-enc.c: Likewise.
128872         * tests/uniconv/test-u8-conv-from-enc.c: Likewise.
128873         * tests/uniconv/test-u8-strconv-from-enc.c: Likewise.
128874         * tests/uniconv/test-u8-strconv-to-enc.c: Likewise.
128876 2007-05-28  Eric Blake  <ebb9@byu.net>
128878         Unconditionally include <config.h> in unit tests.
128879         * tests/test-alloca-opt.c: Remove #ifdef HAVE_CONFIG_H.
128880         * tests/test-allocsa.c, tests/test-arcfour.c,
128881         tests/test-arctwo.c, tests/test-argmatch.c, tests/test-argp.c,
128882         tests/test-array_list.c, tests/test-array_oset.c,
128883         tests/test-atexit.c, test-avltree_list.c, test-avltree_oset.c,
128884         test-avltreehash_list.c, test-base64.c, test-binary-io.c,
128885         test-c-ctype.c, test-c-strcasecmp.c, test-c-strcasestr.c,
128886         test-c-strncasecmp.c, test-c-strstr.c, test-canonicalize-lgpl.c,
128887         test-carray_list.c, test-crc.c, test-des.c, test-dirname.c,
128888         test-fflush.c, test-fprintf-posix.c, test-gc-arcfour.c,
128889         test-gc-arctwo.c, test-gc-des.c, test-gc-hmac-md5.c,
128890         test-gc-hmac-sha1.c, test-gc-md2.c, test-gc-md4.c, test-gc-md5.c,
128891         test-gc-pbkdf2-sha1.c, test-gc-rijndael.c, test-gc-sha1.c,
128892         test-gc.c, test-getpass.c, test-hmac-md5.c, test-hmac-sha1.c,
128893         test-iconv.c, test-linked_list.c, test-linkedhash_list.c,
128894         test-lock.c, test-mbscasecmp.c, test-mbscasestr1.c,
128895         test-mbscasestr2.c, test-mbscasestr3.c, test-mbscasestr4.c,
128896         test-mbschr.c, test-mbscspn.c, test-mbsncasecmp.c, test-mbspbrk.c,
128897         test-mbspcasecmp.c, test-mbsrchr.c, test-mbsspn.c, test-mbsstr1.c,
128898         test-mbsstr2.c, test-mbsstr3.c, test-md2.c, test-md4.c,
128899         test-md5.c, test-memmem.c, test-printf-posix.c,
128900         test-rbtree_list.c, test-rbtree_oset.c, test-rbtreehash_list.c,
128901         test-read-file.c, test-rijndael.c, test-snprintf-posix.c,
128902         test-snprintf.c, test-sprintf-posix.c, test-stdint.c,
128903         test-strcasestr.c, test-striconv.c, test-striconveh.c,
128904         test-striconveha.c, test-tls.c, test-vasnprintf-posix.c,
128905         test-vasnprintf-posix2.c, test-vasnprintf.c,
128906         test-vasprintf-posix.c, test-vasprintf.c, test-verify.c,
128907         test-vfprintf-posix.c, test-vprintf-posix.c,
128908         test-vsnprintf-posix.c, test-vsnprintf.c, test-vsprintf-posix.c,
128909         test-xvasprintf.c: Likewise.
128911 2007-05-28  Bruno Haible  <bruno@clisp.org>
128913         * gnulib-tool (func_import): Remember the --with-tests command-line
128914         option through the macro gl_WITH_TESTS in the gnulib-cache.m4.
128915         Reported by Eric Blake.
128917 2007-05-28  Bruno Haible  <bruno@clisp.org>
128919         * modules/ftell-tests: New file.
128920         * tests/test-ftell.c: New file, based on tests/test-ftello.c.
128921         * tests/test-ftell.sh: New file, based on tests/test-ftello.sh.
128923         * lib/ftell.c: New file.
128924         * modules/ftell: New file.
128925         * m4/ftell.m4: New file.
128926         * doc/functions/ftell.texi: Update.
128927         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FTELL,
128928         REPLACE_FTELL.
128929         * lib/stdio_.h (rpl_ftell): New declaration.
128930         * modules/stdio (Makefile.am): Substitute also GNULIB_FTELL,
128931         REPLACE_FTELL.
128933 2007-05-28  Eric Blake  <ebb9@byu.net>
128935         * lib/allocsa.h (safe_alloca): Avoid compiler warning.
128937 2007-05-28  Bruno Haible  <bruno@clisp.org>
128939         * modules/fseek-tests: New file.
128940         * tests/test-fseek.c: New file, based on tests/test-fseeko.c.
128941         * tests/test-fseek.sh: New file, based on tests/test-fseeko.sh.
128943         * lib/fseek.c: New file.
128944         * modules/fseek: New file.
128945         * m4/fseek.m4: New file.
128946         * doc/functions/fseek.texi: Update.
128947         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FSEEK,
128948         REPLACE_FSEEK.
128949         * lib/stdio_.h (rpl_fseek): New declaration.
128950         * modules/stdio (Makefile.am): Substitute also GNULIB_FSEEK,
128951         REPLACE_FSEEK.
128953 2007-05-28  Bruno Haible  <bruno@clisp.org>
128955         * lib/stdio_.h (fflush): More comments.
128957 2007-05-28  Bruno Haible  <bruno@clisp.org>
128959         * m4/lseek.m4 (gl_FUNC_LSEEK): When not cross-compiling, perform a real
128960         runtime test.
128962 2007-05-28  Eric Blake  <ebb9@byu.net>
128964         Improve lseek module.
128965         * lib/lseek.c (rpl_lseek): Detect EBADF on mingw.
128966         * lib/unistd_.h (lseek): Scale back link warning message.
128967         * tests/test-lseek.c: Beef up test.
128968         * tests/test-lseek.sh: Exercise more facets of lseek.
128969         Reported by Bruno Haible.
128971 2007-05-28  Bruno Haible  <bruno@clisp.org>
128973         * tests/test-unistd.c: Test all the types that <unistd.h> is expected
128974         to define.
128976 2007-05-27  Bruno Haible  <bruno@clisp.org>
128978         * m4/iconv.m4 (AM_ICONV_LINK): Fix 2007-03-31 patch.
128980 2007-05-27  Bruno Haible  <bruno@clisp.org>
128982         * modules/openmp: New file.
128983         * m4/openmp.m4: New file, taken from autoconf's CVS with changes by
128984         Noah Misch.
128986 2007-05-26  Bruno Haible  <bruno@clisp.org>
128988         * modules/chdir-long (Depends-on): Add fchdir.
128989         * modules/chdir-safer (Depends-on): Likewise.
128990         * modules/fts (Depends-on): Likewise.
128991         * modules/fts-lgpl (Depends-on): Likewise.
128992         * modules/openat (Depends-on): Likewise.
128993         * modules/savewd (Depends-on): Likewise.
128995 2007-05-24  Eric Blake  <ebb9@byu.net>
128997         Fix lseek on mingw.
128998         * modules/lseek: New module.
128999         * m4/lseek.m4: New file.
129000         * lib/lseek.c: New file.
129001         * modules/lseek-tests: New file.
129002         * tests/test-lseek.c: New file.
129003         * tests/test-lseek.sh: New file.
129004         * MODULES.html.sh: Document lseek module.
129005         * modules/fflush (Depends-on): Add lseek, fseeko.
129006         * modules/fseeko (Depends-on): Likewise.
129007         * modules/ftello (Depends-on): Likewise.
129008         * m4/fseeko.m4 (gl_FUNC_FSEEKO): Replace fseek[o] if lseek is
129009         broken.
129010         * m4/ftello.m4 (gl_FUNC_FTELLO): Replace ftell[o] if lseek is
129011         broken.
129012         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Trigger fseeko module.
129013         * lib/fseeko.c (rpl_fseeko): Quit early on non-seekable files.
129014         * lib/ftello.c (rpl_ftello): Likewise.
129015         * tests/test-fseeko.c (main): Test this.
129016         * tests/test-fseeko.sh: Likewise.
129017         * tests/test-ftello.c (main): Likewise.
129018         * tests/test-ftello.sh: Likewise.
129019         * lib/stdio_.h (fseek, ftell): Simplify, since missing fseeko now
129020         implies replacing fseek.
129021         * modules/stdio (Makefile.am): No longer need HAVE_FSEEKO,
129022         HAVE_FTELLO.
129023         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add lseek info.
129024         * modules/unistd (Makefile.am): Likewise.
129025         * lib/unistd_.h (lseek): Declare a replacement.
129026         * doc/functions/lseek.texi (lseek): Document this fix.
129027         * doc/functions/fseek.texi (fseek): Likewise.
129028         * doc/functions/ftell.texi (ftell): Likewise.
129030 2007-05-24  Bruno Haible  <bruno@clisp.org>
129032         * tests/test-vasnprintf-posix.c (test_function): Allow up to 50 bytes
129033         in the printed representation of a NaN.
129034         * tests/test-vasprintf-posix.c (test_function): Likewise.
129035         * tests/test-snprintf-posix.h (test_function): Likewise.
129036         * tests/test-sprintf-posix.h (test_function): Likewise.
129037         Reported by Eric Blake.
129039 2007-05-23  Eric Blake  <ebb9@byu.net>
129041         Fix fseeko/ftello on cygwin 1.5.24.
129042         * doc/functions/fseeko.texi (fseeko): Document the fix.
129043         * doc/functions/ftello.texi (ftello): Document the fix.
129044         * doc/functions/stdin.texi (stdin): Document the cygwin bug.
129045         * doc/functions/stdout.text (stdout): New file.
129046         * doc/functions/stderr.text (stderr): New file.
129047         * doc/gnulib.texi (Function Substitutes): Use new files.
129048         * tests/test-fseeko.c (main): Check for broken fseeko on cygwin
129049         prior to 1.7.0.
129050         * tests/test-ftello.c (main): Likewise for ftello.
129051         * tests/test-fseeko.sh: New file.
129052         * tests/test-ftello.sh: New file.
129053         * modules/fseeko-tests (Makefile.am): Ensure test-fseeko is run
129054         with seekable stdin.
129055         * modules/ftello-tests (Makefile.am): Likewise for test-ftello.
129056         * m4/fseeko.m4 (gl_FUNC_FSEEKO): Detect the cygwin bug.
129057         (gl_REPLACE_FSEEKO): New macro.
129058         * m4/ftello.m4 (gl_FUNC_FTELLO, gl_REPLACE_FTELLO): Likewise.
129059         * modules/fseeko (Files): Distribute fseeko.c.
129060         * modules/ftello (Files): Distribute ftello.c.
129061         * lib/fseeko.c (rpl_fseeko) [__CYGWIN__]: Convert stdin to 64-bit
129062         mode.
129063         * lib/ftello.c (rpl_ftello): New file.
129064         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Allow replacement of
129065         fseeko, ftello.
129066         (gl_STDIN_LARGE_OFFSET): New macro.
129067         * modules/stdio (Makefile.am): Perform the replacement.
129068         * lib/stdio_.h (rpl_fseeko, rpl_ftello): Define when needed.
129070 2007-05-23  Bruno Haible  <bruno@clisp.org>
129072         * lib/stdio_.h (fseeko, ftello): Provide a link warning only if
129073         GNULIB_POSIXCHECK is defined.
129075 2007-05-21  Bruno Haible  <bruno@clisp.org>
129077         * m4/printf.m4 (gl_PRINTF_INFINITE, gl_PRINTF_INFINITE_LONG_DOUBLE):
129078         Check also the output for NaN arguments. When cross-compiling, guess
129079         no on IRIX.
129080         * lib/vasnprintf.c: Update comments.
129081         * tests/test-vasnprintf-posix.c (strisnan): New function.
129082         (test_function): Use it.
129083         * tests/test-vasprintf-posix.c (strisnan): New function.
129084         (test_function): Use it.
129085         * tests/test-snprintf-posix.h (strisnan): New function.
129086         (test_function): Use it.
129087         * tests/test-sprintf-posix.h (strisnan): New function.
129088         (test_function): Use it.
129089         Reported by Eric Blake.
129091 2007-05-20  Bruno Haible  <bruno@clisp.org>
129093         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Add test for large finite
129094         numbers that fails on BeOS.
129095         * doc/functions/frexpl.texi: Update.
129097 2007-05-20  Jim Meyering  <jim@meyering.net>
129099         * NEWS: Mention the incompatible change (s/futimens/gl_futimens/)
129100         forced upon us by glibc-2.6.
129102 2007-05-20  Bruno Haible  <bruno@clisp.org>
129104         Fix *printf result for NaN, Inf on AIX, Solaris, OSF/1.
129105         * m4/printf.m4 (gl_PRINTF_INFINITE): Update cross-compiling guesses.
129106         (gl_PRINTF_INFINITE_LONG_DOUBLE): New macro.
129107         * lib/vasnprintf.c: Use NEED_PRINTF_INFINITE_DOUBLE instead of
129108         NEED_PRINTF_INFINITE.
129109         (is_infinitel): New function.
129110         (VASNPRINTF): Handle NEED_PRINTF_INFINITE_LONG_DOUBLE case.
129111         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE): Renamed from
129112         gl_PREREQ_VASNPRINTF_INFINITE.
129113         (gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE): New macro.
129114         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
129115         gl_PRINTF_INFINITE_LONG_DOUBLE and test its result. Invoke
129116         gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE and
129117         gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE instead of
129118         gl_PREREQ_VASNPRINTF_INFINITE.
129119         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
129120         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
129121         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
129122         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
129123         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
129124         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
129125         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
129126         * doc/functions/fprintf.texi: Update.
129127         * doc/functions/printf.texi: Update.
129128         * doc/functions/snprintf.texi: Update.
129129         * doc/functions/sprintf.texi: Update.
129130         * doc/functions/vfprintf.texi: Update.
129131         * doc/functions/vprintf.texi: Update.
129132         * doc/functions/vsnprintf.texi: Update.
129133         * doc/functions/vsprintf.texi: Update.
129135 2007-05-20  Bruno Haible  <bruno@clisp.org>
129137         * m4/frexpl.m4 (gl_FUNC_FREXPL_NO_LIBM): Set REPLACE_FREXPL if frexpl
129138         was not found in libc.
129139         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Likewise.
129141 2007-05-20  Bruno Haible  <bruno@clisp.org>
129143         * tests/test-vasnprintf-posix.c (test_function): Allow NaN to be
129144         printed as "-nan" instead of "nan".
129145         * tests/test-vasprintf-posix.c (test_function): Likewise.
129146         * tests/test-snprintf-posix.h (test_function): Likewise.
129147         * tests/test-sprintf-posix.h (test_function): Likewise.
129148         Needed for HP-UX 11.
129150 2007-05-20  Jim Meyering  <jim@meyering.net>
129152         Fix buggy test for the fchownat-deref bug.
129153         * m4/openat.m4 (gl_FUNC_FCHOWNAT_DEREF_BUG): Create the dangling
129154         symlink required for the run-test.  Without it, this test would
129155         always declare that fchownat doesn't work, and client code would
129156         unnecessarily use the replacement function with fixed libc.
129157         (gl_FUNC_FCHOWNAT): Eliminate a variable that wasn't initialized.
129158         Reported by Greg Schafer.
129160 2007-05-19  Bruno Haible  <bruno@clisp.org>
129162         * m4/isnanf.m4 (gl_ISNANF_WORKS): New macro.
129163         (gl_FUNC_ISNANF_NO_LIBM): Invoke it.
129164         * lib/isnan.c (FUNC): Use run-time expressions for SGI compiler.
129165         Needed for IRIX 6.5 and Solaris 2.5.1.
129167 2007-05-19  Bruno Haible  <bruno@clisp.org>
129169         * tests/test-vasnprintf-posix.c (have_minus_zero): New function.
129170         (test_function): Skip tests involving -0.0 on platforms where
129171         -0.0 = 0.0.
129172         * tests/test-vasprintf-posix.c (have_minus_zero): New function.
129173         (test_function): Skip tests involving -0.0 on platforms where
129174         -0.0 = 0.0.
129175         * tests/test-snprintf-posix.h (have_minus_zero): New function.
129176         (test_function): Skip tests involving -0.0 on platforms where
129177         -0.0 = 0.0.
129178         * tests/test-sprintf-posix.h (have_minus_zero): New function.
129179         (test_function): Skip tests involving -0.0 on platforms where
129180         -0.0 = 0.0.
129181         * tests/test-fprintf-posix.h (test_function): Remove all -0.0 related
129182         tests.
129183         * tests/test-printf-posix.h (test_function): Likewise.
129184         * tests/test-printf-posix.output: Remove all -0.0 related results.
129185         Needed for IRIX 6.5.
129187 2007-05-19  Bruno Haible  <bruno@clisp.org>
129189         * tests/test-vasnprintf-posix.c (test_function): Allow NaN to be
129190         printed as "nan0x7fffffff" instead of "nan".
129191         * tests/test-vasprintf-posix.c (test_function): Likewise.
129192         * tests/test-snprintf-posix.h (test_function): Likewise.
129193         * tests/test-sprintf-posix.h (test_function): Likewise.
129194         * tests/test-fprintf-posix.h (NaN): Remove macro.
129195         (test_function): Remove all NaN related tests.
129196         * tests/test-printf-posix.h (NaN): Remove macro.
129197         (test_function): Remove all NaN related tests.
129198         * tests/test-printf-posix.output: Remove all NaN related results.
129199         Needed for IRIX 6.5.
129201 2007-05-19  Bruno Haible  <bruno@clisp.org>
129203         * m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Fix C89 syntax error in test code.
129204         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Likewise.
129206 2007-05-19  Bruno Haible  <bruno@clisp.org>
129208         * lib/float_.h: New file.
129209         * m4/float_h.m4: New file.
129210         * modules/float: New file.
129211         * modules/isnanl (Dependencies): Add float.
129212         * modules/isnanl-nolibm (Dependencies): Likewise.
129213         * modules/mathl (Dependencies): Likewise.
129214         * modules/printf-frexpl (Dependencies): Likewise.
129215         * modules/signbit (Dependencies): Likewise.
129216         * modules/vasnprintf (Dependencies): Likewise.
129217         * doc/headers/float.texi: Update.
129219 2007-05-19  Jim Meyering  <jim@meyering.net>
129221         * lib/utimens.c (gl_futimens): Rename from futimens,
129222         now that glibc-2.6 declares futimens.
129223         * lib/utimens.h: Likewise.
129225 2007-05-19  Bruno Haible  <bruno@clisp.org>
129227         Avoid test failures on mingw.
129228         * tests/test-fprintf-posix.sh: Convert CR/LF to LF in output.
129229         * tests/test-printf-posix.sh: Likewise.
129230         * tests/test-vfprintf-posix.sh: Likewise.
129231         * tests/test-vprintf-posix.sh: Likewise.
129233 2007-05-19  Bruno Haible  <bruno@clisp.org>
129235         Fix *printf result for NaN, Inf, -0.0 on mingw.
129236         * m4/printf.m4 (gl_PRINTF_INFINITE): New macro.
129237         * lib/vasnprintf.c: Include math.h and isnan.h.
129238         (is_infinite_or_zero): New function.
129239         (VASNPRINTF): Fix also the handling of infinite or zero 'double'
129240         values in the %f, %F, %e, %E, %g, %G directives.
129241         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_INFINITE): New macro.
129242         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
129243         gl_PRINTF_INFINITE and test its result. Invoke
129244         gl_PREREQ_VASNPRINTF_INFINITE.
129245         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
129246         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
129247         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
129248         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
129249         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
129250         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
129251         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
129252         * doc/functions/fprintf.texi: Update.
129253         * doc/functions/printf.texi: Update.
129254         * doc/functions/snprintf.texi: Update.
129255         * doc/functions/sprintf.texi: Update.
129256         * doc/functions/vfprintf.texi: Update.
129257         * doc/functions/vprintf.texi: Update.
129258         * doc/functions/vsnprintf.texi: Update.
129259         * doc/functions/vsprintf.texi: Update.
129261 2007-05-19  Bruno Haible  <bruno@clisp.org>
129263         * lib/vasnprintf.c (convert_to_decimal): Add an extra_zeroes argument.
129264         (scale10_round_decimal_long_double): Inline scale10_round_long_double.
129265         Instead of multiplying with 10^k, set extra_zeroes to k.
129266         (scale10_round_long_double): Remove function.
129268 2007-05-18  Bruno Haible  <bruno@clisp.org>
129270         * lib/vasnprintf.c (VASNPRINTF) [NEED_PRINTF_FLAG_ZERO]: Fix logic bug
129271         introduced on 2007-05-06.
129273 2007-05-18  Bruno Haible  <bruno@clisp.org>
129275         * tests/test-vasnprintf-posix.c (test_function): Also test the %e and
129276         %g directives.
129277         * tests/test-vasprintf-posix.c (test_function): Likewise.
129278         * tests/test-snprintf-posix.h (test_function): Likewise.
129279         * tests/test-sprintf-posix.h (test_function): Likewise.
129281 2007-05-18  Bruno Haible  <bruno@clisp.org>
129283         * tests/test-vasnprintf-posix.c (SIZEOF): New macro.
129284         (strmatch): New function.
129285         (test_function): Test the %f directive on numbers of various exponents.
129286         * tests/test-vasprintf-posix.c (SIZEOF): New macro.
129287         (strmatch): New function.
129288         (test_function): Test the %f directive on numbers of various exponents.
129289         * tests/test-snprintf-posix.h (strmatch): New function.
129290         (test_function): Test the %f directive on numbers of various exponents.
129291         * tests/test-sprintf-posix.h (strmatch): New function.
129292         (test_function): Test the %f directive on numbers of various exponents.
129293         * tests/test-snprintf-posix.c (SIZEOF): New macro.
129294         * tests/test-sprintf-posix.c (SIZEOF): New macro.
129295         * tests/test-vsnprintf-posix.c (SIZEOF): New macro.
129296         * tests/test-vsprintf-posix.c (SIZEOF): New macro.
129298 2007-05-18  Bruno Haible  <bruno@clisp.org>
129300         Add support for 'long double' number output.
129301         * m4/printf.m4 (gl_PRINTF_LONG_DOUBLE): New macro.
129302         * lib/vasnprintf.c: Include math.h and float+.h.
129303         (mp_limb_t): New type.
129304         (GMP_LIMB_BITS): New macro.
129305         (mp_twolimb_t): New type.
129306         (GMP_TWOLIMB_BITS): New macro.
129307         (mpn_t): New type.
129308         (multiply, divide, convert_to_decimal, decode_long_double,
129309         scale10_round_long_double, scale10_round_decimal_long_double,
129310         floorlog10l): New functions.
129311         (VASNPRINTF) [NEED_PRINTF_LONG_DOUBLE]: Implement 'long double' support
129312         for the %f, %F, %e, %E, %g, %G directives.
129313         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_LONG_DOUBLE): New macro.
129314         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
129315         gl_PRINTF_LONG_DOUBLE and test its result. Invoke
129316         gl_PREREQ_VASNPRINTF_LONG_DOUBLE.
129317         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
129318         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
129319         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
129320         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
129321         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
129322         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
129323         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
129324         * modules/fprintf-posix (Depends-on): Add frexpl-nolibm.
129325         * modules/snprintf-posix (Depends-on): Likewise.
129326         * modules/sprintf-posix (Depends-on): Likewise.
129327         * modules/vasnprintf-posix (Depends-on): Likewise.
129328         * modules/vasprintf-posix (Depends-on): Likewise.
129329         * modules/vfprintf-posix (Depends-on): Likewise.
129330         * modules/vsnprintf-posix (Depends-on): Likewise.
129331         * modules/vsprintf-posix (Depends-on): Likewise.
129332         * modules/vasnprintf (Files): Add lib/float+.h.
129333         * doc/functions/fprintf.texi: Update.
129334         * doc/functions/printf.texi: Update.
129335         * doc/functions/snprintf.texi: Update.
129336         * doc/functions/sprintf.texi: Update.
129337         * doc/functions/vfprintf.texi: Update.
129338         * doc/functions/vprintf.texi: Update.
129339         * doc/functions/vsnprintf.texi: Update.
129340         * doc/functions/vsprintf.texi: Update.
129342 2007-05-18  Bruno Haible  <bruno@clisp.org>
129344         * lib/vasnprintf.c (USE_SNPRINTF): Define to 0 on BeOS.
129346 2007-05-18  Bruno Haible  <bruno@clisp.org>
129348         * lib/vasnprintf.c (VASNPRINTF) [WIN32]: Use %I64d instead of %lld
129349         for printing 64-bit integers. Needed for mingw.
129351 2007-05-18  Bruno Haible  <bruno@clisp.org>
129353         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Invoke
129354         gl_FUNC_FREXPL_WORKS.
129355         * modules/printf-frexpl (Files): Add m4/frexpl.m4.
129357 2007-05-18  Bruno Haible  <bruno@clisp.org>
129359         * modules/frexpl-nolibm-tests: New file.
129361         * modules/frexpl-nolibm: New file.
129362         * m4/frexpl.m4 (gl_FUNC_FREXPL_NO_LIBM): New macro.
129364 2007-05-17  Paul Eggert  <eggert@cs.ucla.edu>
129366         * lib/dirent_.h: Prefer #include_next <foo.h> to #include
129367         @ABSOLUTE_FOO_H@ if @HAVE_INCLUDE_NEXT@.  This works better with
129368         GCC 4.2, which otherwise issues a lot of warnings.
129369         * lib/iconv_.h, lib/locale_.h, lib/netinet_in_.h, lib/sys_select_.h:
129370         * lib/sys_socket_.h, lib/sys_stat_.h, lib/sysexits_.h, lib/unistd_.h:
129371         Likewise.
129372         * modules/fchdir (dirent.h): Substitute @HAVE_INCLUDE_NEXT@.
129373         * modules/iconv_open (iconv.h): Likewise.
129374         * modules/locale (locale.h): Likewise.
129375         * modules/netinet_in (netinet/in.h): Likewise.
129376         * modules/sys_select (sys_select.h): Likewise.
129377         * modules/sys_socket (sys/socket.h): Likewise.
129378         * modules/sys_stat (sys/stat.h): Likewise.
129379         * modules/sysexits (sysexits.h): Likewise.
129380         * modules/unistd (unistd.h): Likewise.
129382 2007-05-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
129384         * modules/closein-tests (Makefile.am): Distribute
129385         `test-closein.sh'.
129387 2007-05-17  Bruno Haible  <bruno@clisp.org>
129389         * tests/test-printf-posix.output: Renamed from
129390         tests/test-fprintf-posix.out.
129391         * modules/fprintf-posix-tests: Update.
129392         * modules/printf-posix-tests: Update.
129393         * modules/vfprintf-posix-tests: Update.
129394         * modules/vprintf-posix-tests: Update.
129395         * tests/test-fprintf-posix.sh: Update.
129396         * tests/test-printf-posix.sh: Update.
129397         * tests/test-vfprintf-posix.sh: Update.
129398         * tests/test-vprintf-posix.sh: Update.
129399         Reported by Ralf Wildenhues.
129401 2007-05-16  Paul Eggert  <eggert@cs.ucla.edu>
129403         * lib/fcntl_.h: Prefer #include_next <foo.h> to #include
129404         @ABSOLUTE_FOO_H@ if @HAVE_INCLUDE_NEXT@.  This works better with
129405         GCC 4.2, which otherwise issues a lot of warnings.
129406         * lib/inttypes_.h, lib/math_.h, lib/search_.h, lib/signal_.h:
129407         * lib/stdint_.h, lib/stdio_.h, lib/stdlib_.h, lib/string_.h:
129408         * lib/sys_time_.h, lib/time_.h, lib/wchar_.h, lib/wctype_.h: Likewise.
129409         * lib/stdlib_.h: Don't bother with #pragma GCC system_header, as
129410         it should no longer be needed.
129411         * lib/string_.h: Likewise.
129412         * modules/absolute-header (HAVE_INCLUDE_NEXT): New 'make' define.
129413         * modules/fcntl (fcntl.h): Substitute @HAVE_INCLUDE_NEXT@.
129414         * modules/inttypes (inttypes.h): Likewise.
129415         * modules/math (math.h): Likewise.
129416         * modules/search (search.h): Likewise.
129417         * modules/signal (signal.h): Likewise.
129418         * modules/stdint (stdint.h): Likewise.
129419         * modules/stdio (stdio.h): Likewise.
129420         * modules/stdlib (stdlib.h): Likewise.
129421         * modules/string (string.h): Likewise.
129422         * modules/sys_time (sys/time.h): Likewise.
129423         * modules/time (time.h): Likewise.
129424         * modules/wchar (wchar.h): Likewise.
129425         * modules/wctype (wtype.h): Likewise.
129427 2007-05-16  Thien-Thi Nguyen  <ttn@gnuvola.org>  (tiny change)
129429         * doc/gnulib-tool.texi (CVS Issues): Fix typo.
129431 2007-05-13  Bruno Haible  <bruno@clisp.org>
129433         * stpcpy.m4 (gl_FUNC_STPCPY): Require AC_C_RESTRICT.
129434         * stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
129435         * strsep.m4 (gl_FUNC_STRSEP): Likewise.
129436         * strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
129437         (gl_PREREQ_STRTOK_R): Don't require it here.
129439 2007-05-13  Bruno Haible  <bruno@clisp.org>
129441         * lib/stdlib_.h (mkdtemp, mkstemp): Comment out argument name. Needed
129442         when used in C++ mode.
129444 2007-05-12  Bruno Haible  <bruno@clisp.org>
129446         * lib/linebuffer.h: Tweak doc.
129447         * lib/linebuffer.c: Likewise.
129449 2007-05-12  James Youngman  <jay@gnu.org>
129451         * lib/linebuffer.c (readlinebuffer_delim): New function,
129452         like readlinebuffer, but use a caller-specified delimiter.
129453         (readlinebuffer): Just call readlinebuffer_delim with '\n'
129454         as the delimiter.
129455         * lib/linebuffer.h (readlinebuffer_delim): Declare it.
129457 2007-05-12  Sergey Poznyakoff  <gray@gnu.org.ua>
129459         * m4/openat.m4 (gl_FUNC_OPENAT): Do not require openat-die.
129460         * modules/openat (Files): Remove openat-die.c.
129461         (Depends-on): Add openat-die.
129462         * modules/openat-die: New module.
129464 2007-05-06  Bruno Haible  <bruno@clisp.org>
129466         * m4/printf.m4 (gl_PRINTF_FLAG_GROUPING, gl_VSNPRINTF_ZEROSIZE_C99):
129467         Update with info about Cygwin.
129468         * doc/functions/fprintf.texi: Update.
129469         * doc/functions/printf.texi: Update.
129470         * doc/functions/snprintf.texi: Update.
129471         * doc/functions/sprintf.texi: Update.
129472         * doc/functions/vfprintf.texi: Update.
129473         * doc/functions/vprintf.texi: Update.
129474         * doc/functions/vsnprintf.texi: Update.
129475         * doc/functions/vsprintf.texi: Update.
129476         Reported by Eric Blake.
129478 2007-05-06  Bruno Haible  <bruno@clisp.org>
129480         * lib/vasnprintf.c (VASNPRINTF) [NEED_PRINTF_FLAG_ZERO]: Perform the
129481         padding ourselves for the floating-point directives.
129482         * m4/printf.m4 (gl_PRINTF_FLAG_ZERO): New macro.
129483         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_FLAG_ZERO): New macro.
129484         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Invoke
129485         gl_PRINTF_FLAG_ZERO and test its result. Invoke
129486         gl_PREREQ_VASNPRINTF_FLAG_ZERO.
129487         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
129488         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Likewise.
129489         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
129490         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
129491         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
129492         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
129493         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
129494         * tests/test-snprintf-posix.h (test_function): Also check the width
129495         and some flags in the %f directive.
129496         * tests/test-sprintf-posix.h (test_function): Likewise.
129497         * tests/test-vasnprintf-posix.c (test_function): Likewise.
129498         * tests/test-vasprintf-posix.c (test_function): Likewise.
129499         * doc/functions/fprintf.texi: Update.
129500         * doc/functions/printf.texi: Update.
129501         * doc/functions/snprintf.texi: Update.
129502         * doc/functions/sprintf.texi: Update.
129503         * doc/functions/vfprintf.texi: Update.
129504         * doc/functions/vprintf.texi: Update.
129505         * doc/functions/vsnprintf.texi: Update.
129506         * doc/functions/vsprintf.texi: Update.
129508 2007-05-06  Bruno Haible  <bruno@clisp.org>
129510         * lib/vasnprintf.c (VASNPRINTF) [NEED_PRINTF_FLAG_GROUPING]: Don't
129511         pass the ' flag character to sprintf or snprintf.
129512         * m4/printf.m4 (gl_PRINTF_FLAG_GROUPING): New macro.
129513         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_FLAG_GROUPING): New macro.
129514         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Invoke
129515         gl_PRINTF_FLAG_GROUPING and test its result. Invoke
129516         gl_PREREQ_VASNPRINTF_FLAG_GROUPING.
129517         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
129518         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Likewise.
129519         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
129520         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
129521         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
129522         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
129523         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
129524         * tests/test-snprintf-posix.h (test_function): Also check the grouping
129525         flag.
129526         * tests/test-sprintf-posix.h (test_function): Likewise.
129527         * tests/test-vasnprintf-posix.c (test_function): Likewise.
129528         * tests/test-vasprintf-posix.c (test_function): Likewise.
129529         * doc/functions/fprintf.texi: Update.
129530         * doc/functions/printf.texi: Update.
129531         * doc/functions/snprintf.texi: Update.
129532         * doc/functions/sprintf.texi: Update.
129533         * doc/functions/vfprintf.texi: Update.
129534         * doc/functions/vprintf.texi: Update.
129535         * doc/functions/vsnprintf.texi: Update.
129536         * doc/functions/vsprintf.texi: Update.
129538 2007-05-01  Bruno Haible  <bruno@clisp.org>
129540         * tests/test-argp-2.sh (func_compare): Drop .exe suffix.
129542 2007-05-03  Paul Eggert  <eggert@cs.ucla.edu>
129544         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Use better
129545         comment for D_INO_IN_DIRENT.  Problem reported by James Youngman.
129547 2007-05-02  Paul Eggert  <eggert@cs.ucla.edu>
129549         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Test whether
129550         readdir returns garbage in d_ino.  Problem reported by Kaz Sasayama in
129551         <http://lists.gnu.org/r/bug-gnulib/2007-05/msg00021.html>.
129553 2007-05-02  Sergey Poznyakoff  <gray@gnu.org.ua>
129555         * lib/argp-help.c (struct hol_entry): New member `ord'.
129556         (HOL_ENTRY_PTRCMP): Use ord for comparison
129557         (hol_sort): Initialize ord.
129559 2007-05-01  Bruno Haible  <bruno@clisp.org>
129561         * doc/functions/_Exit_C99.texi: Renamed from doc/functions/_Exit.texi.
129562         Reported by Eric Blake.
129563         * doc/gnulib.texi (Function Substitutes): Update.
129565 2007-05-01  Bruno Haible  <bruno@clisp.org>
129567         * doc/functions.texi: Remove file, now redundant through
129568         doc/functions/*.texi.
129570 2007-05-01  Bruno Haible  <bruno@clisp.org>
129572         * modules/argp (Depends-on): Add sleep.
129574 2007-05-01  Bruno Haible  <bruno@clisp.org>
129576         * modules/sleep-tests: New file.
129577         * tests/test-sleep.c: New file.
129579         * modules/sleep: New file.
129580         * lib/sleep.c: New file.
129581         * m4/sleep.m4: New file.
129582         * lib/unistd_.h (sleep): New declaration.
129583         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_SLEEP,
129584         HAVE_SLEEP.
129585         * modules/unistd (Makefile.am): Substitute GNULIB_SLEEP, HAVE_SLEEP.
129586         * doc/functions/sleep.texi: Document the sleep module.
129588 2007-05-01  Bruno Haible  <bruno@clisp.org>
129590         * lib/sigprocmask.h: Remove file.
129591         * lib/signal_.h: Incorporate the previous contents of sigprocmask.h.
129592         * lib/sigprocmask.c: Include <signal.h> instead of sigprocmask.h.
129593         * m4/signal_h.m4 (gl_SIGNAL_H_DEFAULTS): Substitute GNULIB_SIGPROCMASK,
129594         HAVE_POSIX_SIGNALBLOCKING, HAVE_SIGSET_T.
129595         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Require
129596         gl_SIGNAL_H_DEFAULTS. Set HAVE_POSIX_SIGNALBLOCKING as a shell variable.
129597         (gl_PREREQ_SIGPROCMASK): Require gl_SIGNAL_H_DEFAULTS. Set
129598         HAVE_SIGSET_T as a shell variable.
129599         * modules/signal (Makefile.am): Substitute GNULIB_SIGPROCMASK,
129600         HAVE_POSIX_SIGNALBLOCKING, HAVE_SIGSET_T into signal.h.
129601         * modules/sigprocmask (Files): Remove lib/sigprocmask.h.
129602         (Depends-on): Add signal. Remove verify.
129603         (configure.ac): Invoke gl_SIGNAL_MODULE_INDICATOR.
129604         (Include): Mention <signal.h> instead of sigprocmask.h.
129605         * NEWS: Mention the change.
129606         * lib/fatal-signal.c: Don't include sigprocmask.h.
129608 2007-05-01  Bruno Haible  <bruno@clisp.org>
129610         * modules/signal: New file.
129611         * lib/signal_.h: New file.
129612         * m4/signal_h.m4: New file.
129614 2007-05-01  Bruno Haible  <bruno@clisp.org>
129616         * lib/wctype_.h: Test HAVE_ISWCNTRL at configure time.
129617         * m4/wctype.m4 (gl_WCTYPE_H): Substitute HAVE_ISWCNTRL.
129618         * modules/wctype (Makefile.am): Substitute HAVE_ISWCNTRL instead of
129619         HAVE_WCTYPE_CTMP_BUG into wctype.h.
129621 2007-05-01  Bruno Haible  <bruno@clisp.org>
129623         * lib/sys_stat_.h: Test HAVE_LSTAT, HAVE_DECL_MKDIR, HAVE_IO_H at
129624         configure time.
129625         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Substitute HAVE_LSTAT,
129626         HAVE_DECL_MKDIR, HAVE_IO_H via AC_SUBST.
129627         * modules/sys_stat (Makefile.am): Substitute their values into
129628         sys/stat.h.
129630 2007-05-01  Bruno Haible  <bruno@clisp.org>
129632         * lib/glob_.h: Test HAVE_SYS_CDEFS_H at configure time.
129633         * m4/glob.m4 (gl_PREREQ_GLOB): Substitute HAVE_SYS_CDEFS_H via AC_SUBST.
129634         * modules/glob (Makefile.am): Put HAVE_SYS_CDEFS_H value into glob.h.
129636 2007-05-01  Bruno Haible  <bruno@clisp.org>
129638         * doc/header/assert.texi: Undo last change: don't mention the gnulib
129639         'assert' module here.
129641 2007-05-01  Bruno Haible  <bruno@clisp.org>
129643         * doc/functions/*.texi: New files.
129644         * doc/functions/google-ranking.txt: New file.
129645         * doc/gnulib.texi (Function Substitutes): New chapter.
129646         (ctime, inet_ntoa): Remove sections.
129647         * doc/ctime.texi: Remove file.
129648         * doc/inet_ntoa.texi: Remove file.
129649         * doc/Makefile (gnulib.info, gnulib.html, gnulib.dvi): Update
129650         dependencies.
129651         (%.info): New rule, specifying a --reference-limit.
129653 2007-05-01  Bruno Haible  <bruno@clisp.org>
129655         * MODULES.html.sh (posix_functions): Remove 'exec', 'toc'.
129657 2007-05-01  Bruno Haible  <bruno@clisp.org>
129659         * modules/mkdir (Depends-on): Add sys_stat, because sys_stat provides
129660         the portability of 'mkdir' to mingw systems.
129662 2007-05-01  Bruno Haible  <bruno@clisp.org>
129664         * doc/headers/google-ranking.txt: New file.
129666 2007-04-30  Eric Blake  <ebb9@byu.net>
129668         Prefer fseeko to fseek.
129669         * modules/getpass (Depends-on): Add fseeko.
129670         * lib/getpass.c (getpass): Use fseeko, not fseek.
129672 2007-04-30  Sergey Poznyakoff  <gray@gnu.org.ua>
129674         * lib/argp-help.c (hol_entry_cmp): Option sorting algorithm
129675         assumes the sorting is stable, while most qsort implementations
129676         are not.  Use argument addresses to ensure they never compare as
129677         equal.
129679         * tests/test-argp-2.sh (usage-indent test): Fix output
129680         (func_compare): Restore diff options
129681         * tests/test-argp.c: Restore #include "progname.h"
129683 2007-04-29  Bruno Haible  <bruno@clisp.org>
129685         * m4/printf.m4 (gl_VSNPRINTF_ZEROSIZE_C99): New macro.
129686         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Invoke
129687         gl_VSNPRINTF_ZEROSIZE_C99. Test gl_cv_func_vsnprintf_zerosize_c99.
129688         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
129689         * modules/snprintf-posix-tests (Files): Add tests/test-snprintf.c.
129690         (configure.ac): Define CHECK_SNPRINTF_POSIX.
129691         (TESTS, check_PROGRAMS): Add test-snprintf.
129692         * modules/vsnprintf-posix-tests (Files): Add tests/test-vsnprintf.c.
129693         (configure.ac): Define CHECK_VSNPRINTF_POSIX.
129694         (TESTS, check_PROGRAMS): Add test-vsnprintf.
129695         * tests/test-snprintf.c (main) [!CHECK_SNPRINTF_POSIX]: Disable
129696         assertions that fail on HP-UX, OSF/1, or IRIX.
129697         * tests/test-vsnprintf.c (main) [!CHECK_VSNPRINTF_POSIX]: Likewise.
129699 2007-04-29  Bruno Haible  <bruno@clisp.org>
129701         * MODULES.html.sh (posix_functions): Remove 'contents'.
129703 2007-04-29  Karl Berry  <karl@gnu.org>
129705         * config/srclist.txt (gendocs_template_min): new entry.
129707 2007-04-29  Bruno Haible  <bruno@clisp.org>
129709         Work around fpurge bug on BSD systems.
129710         * modules/fpurge (Makefile.am): Compile fpurge.c unconditionally.
129711         * m4/fpurge.m4 (gl_FUNC_FPURGE): Don't invoke AC_LIBOBJ.
129712         * lib/fpurge.h (fpurge): Don't handle __fpurge wrapper here. Define
129713         fpurge to rpl_fpurge if the system already has this function.
129714         * lib/fpurge.c (fpurge): Handle also the __fpurge wrapper case and
129715         the case where the system already has this function. Correct invariants
129716         on BSD systems.
129717         * lib/fseeko.c (rpl_fseeko): Update recognition of preceding fflush on
129718         BSD systems.
129720 2007-04-29  Sergey Poznyakoff  <gray@gnu.org.ua>
129722         * lib/argp-help.c (hol_cluster_cmp): Reverse comparison.  Change
129723         proposed by Sven Verdoolaege.
129725         * tests/test-argp.c: Fix option ordering.  Test deeply clustered
129726         options.
129727         * tests/test-argp-2.sh (func_compare): Use diff instead of cmp.
129728         (usage and help tests): Update
129730 2007-04-29  Bruno Haible  <bruno@clisp.org>
129732         * tests/test-fflush.c (main): Use a file of size 17, not 10.
129733         Print more information in case of failure. Disable a test on BeOS.
129735 2007-04-29  Bruno Haible  <bruno@clisp.org>
129737         * tests/**/test-*.[hc] (ASSERT): Use fprintf to show the line number.
129738         This helps debugging on systems on which no gdb is available.
129740 2007-04-29  Bruno Haible  <bruno@clisp.org>
129742         * lib/freading.h: Improve comments.
129743         * lib/fwriting.h: Likewise.
129744         * tests/test-freading.c (main): Don't check freading immediately after
129745         repositioning. Needed for glibc.
129747 2007-04-29  Bruno Haible  <bruno@clisp.org>
129749         * lib/freading.c (freading): Trivial simplification.
129751 2007-04-28  Bruno Haible  <bruno@clisp.org>
129753         * tests/test-fwriting.c (main): Also test the interaction between
129754         fflush and fwriting.
129755         * modules/fwriting-tests (Depends-on): Add fflush.
129757         * tests/test-freading.c (main): Also test the interaction between
129758         fflush and freading.
129759         * modules/freading-tests (Depends-on): Add fflush.
129761 2007-04-28  Bruno Haible  <bruno@clisp.org>
129763         * lib/stdio_.h (fseek, ftell): Provide link warnings suggesting to use
129764         fseeko and ftello.
129765         Suggested by Eric Blake.
129767 2007-04-28  Jim Meyering  <jim@meyering.net>
129769         Avoid false-negative in gl_STDINT_H's C99 conformance test.
129770         * m4/stdint.m4 (gl_STDINT_H): When checking whether stdint.h conforms
129771         to C99, include all of gl_STDINT_INCLUDES, not just <stddef.h>.
129773 2007-04-27  Eric Blake  <ebb9@byu.net>
129775         * doc/headers/assert.texi (assert.h): Document assert module use.
129777 2007-04-27  Bruno Haible  <bruno@clisp.org>
129779         * doc/headers/*.texi: New files.
129780         * doc/gnulib.texi (Header File Substitutes): New chapter.
129781         * doc/Makefile (gnulib.info, gnulib.html, gnulib.dvi): Specify
129782         dependencies.
129783         (standards.info ,standards.html, standards.dvi): Update dependencies.
129784         (mostlyclean, clean): New targets.
129786 2007-04-27  Bruno Haible  <bruno@clisp.org>
129788         * lib/sysexits_.h: Renamed from lib/sysexit_.h.
129789         * modules/sysexits (Files, Makefile.am): Update.
129791         * lib/sys_socket_.h: Renamed from lib/socket_.h.
129792         * modules/sys_socket (Files, Makefile.am): Update.
129794         * lib/sys_stat_.h: Renamed from lib/stat_.h.
129795         * modules/sys_stat (Files, Makefile.am): Update.
129797 2007-04-27  Eric Blake  <ebb9@byu.net>
129799         * lib/freading.h: Improve comments.
129800         * lib/fwriting.h: Likewise.
129801         * lib/fflush.c: Likewise.
129803         Fix closein for mingw.
129804         * modules/closein-tests: Add tests for closein.
129805         * tests/test-closein.c: New file.
129806         * tests/test-closein.sh: Likewise.
129807         * lib/unistd_.h [!SEEK_CUR]: Mingw also needs stdlib.h for _exit.
129808         * lib/closein.c (close_stdin): Don't fflush non-seekable streams.
129810 2007-04-27  Bruno Haible  <bruno@clisp.org>
129812         * lib/inttypes_.h [_DECC]: Don't use #include_next if the compiler
129813         version is < 6.
129814         * lib/math_.h [__DECC]: Likewise.
129815         * lib/stdio_.h [__DECC]: Likewise.
129816         * lib/stdlib_.h [__DECC]: Likewise.
129817         * lib/string_.h [__DECC]: Likewise.
129818         * lib/time_.h [__DECC]: Likewise.
129819         * lib/wchar_.h [__DECC]: Likewise.
129820         * lib/wctype_.h [__DECC]: Likewise.
129822 2007-04-27  Bruno Haible  <bruno@clisp.org>
129824         * tests/test-fbufmode.c (main): Relax test, to avoid failure on mingw.
129826 2007-04-27  Bruno Haible  <bruno@clisp.org>
129828         * lib/fflush.c: Add comments.
129829         * modules/fpurge-tests (Depends-on): Add fflush.
129830         * modules/freadable-tests (Depends-on): Likewise.
129831         * modules/fwritable-tests (Depends-on): Likewise.
129833 2007-04-27  Charles Wilson  <libtool@cwilson.fastmail.fm>
129835         * m4/argz.m4 (gl_FUNC_ARGZ): Use !HAVE_WORKING_ARGZ instead of
129836         SYSTEM_ARGZ_IS_BROKEN.  Also, minor stylistic improvements.
129837         Report by Bruno Haible <bruno@clisp.org>.
129839 2007-04-26  Eric Blake  <ebb9@byu.net>
129841         Fix fflush on mingw.
129842         * modules/fflush (Depends-on): Add freading.
129843         * lib/fflush.c (rpl_fflush): Use freading to avoid losing buffered
129844         but unread data.
129846 2007-04-26  Eric Blake  <ebb9@byu.net>
129847         and Bruno Haible  <bruno@clisp.org>
129849         Implement freading and fwriting.
129850         * lib/freading.c: New file.
129851         * lib/freading.h: Likewise.
129852         * m4/freading.m4: Likewise.
129853         * modules/freading: Likewise.
129854         * modules/freading-tests: Likewise.
129855         * tests/test-freading.c: Likewise.
129856         * lib/fwriting.c: New file.
129857         * lib/fwriting.h: Likewise.
129858         * m4/fwriting.m4: Likewise.
129859         * modules/fwriting: Likewise.
129860         * modules/fwriting-tests: Likewise.
129861         * tests/test-fwriting.c: Likewise.
129862         * MODULES.html.sh (File stream based Input/Output): Mention them.
129864 2007-04-26  Bruno Haible  <bruno@clisp.org>
129866         * lib/stdio_.h (fseeko, ftello): Check that off_t has the same size as
129867         'long' when we assume it.
129868         Suggested by Eric Blake.
129870 2007-04-26  Bruno Haible  <bruno@clisp.org>
129872         Ensure fseeko, ftello are declared on glibc systems.
129873         * modules/fflush (configure.ac-early): Require AC_FUNC_FSEEKO.
129874         * modules/fseeko (configure.ac-early): Likewise.
129875         * modules/ftello (configure.ac-early): Likewise.
129876         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Don't define HAVE_FSEEKO, rely on
129877         AC_FUNC_FSEEKO for this.
129878         * m4/fseeko.m4 (gl_FUNC_FSEEKO): Inline gl_CHECK_FSEEKO.
129879         (gl_CHECK_FSEEKO): Remove macro.
129881 2007-04-26  Bruno Haible  <bruno@clisp.org>
129883         * tests/test-fflush.c (main): Also check the ftell result after
129884         fflush and fseek/fseeko.
129885         * lib/fflush.c (rpl_fflush): For BSD implementations, update the
129886         file descriptor position cache in the stream.
129887         * lib/fseeko.c (rpl_fseeko): Likewise.
129889 2007-04-26  Bruno Haible  <bruno@clisp.org>
129891         * modules/fflush-tests (Depends-on): Add fseeko.
129893 2007-04-25  Charles Wilson  <libtool@cwilson.fastmail.fm>
129894             Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
129896         * lib/argz_.h: ensure error_t definition is obtained in same
129897         mechanism system argz.h would have.
129898         * m4/argz.m4 (gl_FUNC_ARGZ): add new test to check if $host's
129899         argz facilities are known bad.  Err on the side of caution if
129900         cross-compiling.
129902 2007-04-25  Eric Blake  <ebb9@byu.net>
129904         * lib/fpurge.c (includes): Use stdlib.h for free.
129905         * tests/test-fflush.c (main): Also test fflush-fseeko.
129907 2007-04-25  Bruno Haible  <bruno@clisp.org>
129909         Make fflush+fseek POSIX-compliant on FreeBSD and MacOS X.
129910         * lib/fseeko.c: New file.
129911         * lib/stdio_.h: Include <sys/types.h> when off_t is needed.
129912         (fseeko, fseek): Define to replacements if REPLACE_FFLUSH.
129913         * m4/fseeko.m4 (gl_CHECK_FSEEKO): New macro, extracted from
129914         gl_FUNC_FSEEKO.
129915         (gl_FUNC_FSEEKO): Invoke it.
129916         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Arrange to compile fseeko.c. Invoke
129917         gl_CHECK_FSEEKO. Define HAVE_FSEEKO.
129918         * modules/fflush (Files): Add lib/fseeko.c, m4/fseeko.m4.
129920 2007-04-25  Bruno Haible  <bruno@clisp.org>
129922         * modules/fflush (Depends-on): Add ftello.
129924 2007-04-25  Bruno Haible  <bruno@clisp.org>
129926         * modules/ftello-tests: New file.
129927         * tests/test-ftello.c: New file.
129929         * modules/ftello: New file.
129930         * m4/ftello.m4: New file.
129931         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FTELLO,
129932         HAVE_FTELLO.
129933         * lib/stdio_.h (ftello): New declaration.
129934         * modules/stdio (Makefile.am): Substitute also GNULIB_FTELLO,
129935         HAVE_FTELLO.
129937 2007-04-25  Bruno Haible  <bruno@clisp.org>
129939         * modules/fseeko-tests: New file.
129940         * tests/test-fseeko.c: New file.
129942         * modules/fseeko: New file.
129943         * m4/fseeko.m4: New file.
129944         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FSEEKO,
129945         HAVE_FSEEKO.
129946         * lib/stdio_.h (fseeko): New declaration.
129947         * modules/stdio (Makefile.am): Substitute also GNULIB_FSEEKO,
129948         HAVE_FSEEKO.
129950 2007-04-25  Bruno Haible  <bruno@clisp.org>
129952         * lib/stdio_.h (fflush): Add support for GNULIB_POSIXCHECK.
129954 2007-04-25  Bruno Haible  <bruno@clisp.org>
129956         * lib/unistd_.h: Include <stdio.h> if needed to get the SEEK_* macros.
129957         * tests/test-stdio.c: Check that the various SEEK_* macros are defined.
129958         * tests/test-unistd.c: Likewise.
129959         * tests/test-fcntl.c: Likewise.
129961 2007-04-23  Eric Blake  <ebb9@byu.net>
129963         * lib/fflush.c: Fix missing include.
129964         Reported by Bruno Haible.
129966 2007-04-23  Bruno Haible  <bruno@clisp.org>
129968         * lib/fpurge.c (fpurge) [glibc, BSD]: Free a malloc()ed ungetc buffer.
129969         Reported by Eric Blake.
129971 2007-04-23  Bruno Haible  <bruno@clisp.org>
129973         * lib/fbufmode.c (fbufmode): Port to Solaris/SPARC64.
129975 2007-04-23  Bruno Haible  <bruno@clisp.org>
129977         * lib/fseterr.c (fseterr): Don't hardcode the value of _IOERR.
129979 2007-04-23  Bruno Haible  <bruno@clisp.org>
129981         * tests/test-fbufmode.c (main): Be prepared to a failure of setvbuf.
129982         Needed on HP-UX 11.
129984 2007-04-16  Eric Blake  <ebb9@byu.net>
129986         Make fflush rely on fpurge.
129987         * lib/fflush.c (rpl_fflush): Rely on fpurge module, rather than
129988         open coding all variants.
129989         * modules/fflush (Depends-on): Add fpurge and unistd.
129990         * modules/fflush-tests (Depends-on): Unistd is no longer extra.
129991         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Simplify.
129993         Fix --with-tests compilation on cygwin.
129994         * modules/argmatch-tests (Makefile.am): List gnulib library first
129995         in LDADD.
129996         * modules/argp-tests (Makefile.am): Likewise.
129997         * modules/array-list-tests (Makefile.am): Likewise.
129998         * modules/array-oset-tests (Makefile.am): Likewise.
129999         * modules/avltree-list-tests (Makefile.am): Likewise.
130000         * modules/avltree-oset-tests (Makefile.am): Likewise.
130001         * modules/avltreehash-list-tests (Makefile.am): Likewise.
130002         * modules/carray-list-tests (Makefile.am): Likewise.
130003         * modules/dirname-tests (Makefile.am): Likewise.
130004         * modules/frexp-tests (Makefile.am): Likewise.
130005         * modules/isnanl-tests (Makefile.am): Likewise.
130006         * modules/linked-list-tests (Makefile.am): Likewise.
130007         * modules/linkedhash-list-tests (Makefile.am): Likewise.
130008         * modules/lock-tests (Makefile.am): Likewise.
130009         * modules/rbtree-list-tests (Makefile.am): Likewise.
130010         * modules/rbtree-oset-tests (Makefile.am): Likewise.
130011         * modules/rbtreehash-list-tests (Makefile.am): Likewise.
130012         * modules/tls-tests (Makefile.am): Likewise.
130013         * modules/tsearch-tests (Makefile.am): Likewise.
130014         * modules/xvasprintf-tests (Makefile.am): Likewise.
130016         Fix fpurge for cygwin.
130017         * lib/fpurge.c (fpurge): Fix order of operation flub, and return a
130018         value.
130019         * modules/fpurge-tests (Depends-on): Clean up trash.
130021 2007-04-16  Simon Josefsson  <simon@josefsson.org>
130023         * lib/gc-libgcrypt.c (gc_hash_open): Shut up compiler warnings.
130025         * m4/autobuild.m4: Re-indent.
130027 2007-04-13  Bruno Haible  <bruno@clisp.org>
130029         * modules/fpurge-tests: New file.
130030         * tests/test-fpurge.c: New file.
130032         * modules/fpurge: New file.
130033         * lib/fpurge.h: New file.
130034         * lib/fpurge.c: New file.
130035         * m4/fpurge.m4: New file.
130037 2007-04-13  Bruno Haible  <bruno@clisp.org>
130039         * modules/fbufmode-tests: New file.
130040         * tests/test-fbufmode.c: New file.
130042         * modules/fbufmode: New file.
130043         * lib/fbufmode.h: New file.
130044         * lib/fbufmode.c: New file.
130045         * m4/fbufmode.m4: New file.
130047 2007-04-13  Bruno Haible  <bruno@clisp.org>
130049         * modules/fwritable-tests: New file.
130050         * tests/test-fwritable.c: New file.
130052         * modules/fwritable: New file.
130053         * lib/fwritable.h: New file.
130054         * lib/fwritable.c: New file.
130055         * m4/fwritable.m4: New file.
130057 2007-04-13  Bruno Haible  <bruno@clisp.org>
130059         * modules/freadable-tests: New file.
130060         * tests/test-freadable.c: New file.
130062         * modules/freadable: New file.
130063         * lib/freadable.h: New file.
130064         * lib/freadable.c: New file.
130065         * m4/freadable.m4: New file.
130067 2007-04-13  Bruno Haible  <bruno@clisp.org>
130069         * modules/fflush-tests (Makefile.am): Remove EXTRA_DIST. Augment
130070         MOSTLYCLEANFILES.
130072 2007-04-13  Paul Eggert  <eggert@cs.ucla.edu>
130074         * build-aux/bootstrap (gnulib_tool_option_extras): New var, used by
130075         gzip bootstrap.conf to avoid dragging in i18n machinery.
130076         (gnulib_tool_option): Use it.
130078 2007-04-13  Bruno Haible  <bruno@clisp.org>
130080         * tests/test-vasnprintf-posix.c (test_function): Add tests for %f and
130081         %F directives.
130082         * tests/test-vasprintf-posix.c (test_function): Likewise.
130083         * tests/test-snprintf-posix.h (test_function): Likewise.
130084         * tests/test-sprintf-posix.h (test_function): Likewise.
130085         * tests/test-fprintf-posix.h (test_function): Likewise.
130086         * tests/test-printf-posix.h (test_function): Likewise.
130087         * tests/test-fprintf-posix.out: Likewise.
130089 2007-04-13  Bruno Haible  <bruno@clisp.org>
130091         * modules/lock-tests (configure.ac): For LIBSCHED, try also -lposix4.
130092         * modules/tls-tests (configure.ac): Likewise.
130093         Reported by Arto C. Nirkko <anirkko@insel.ch>.
130095 2007-04-13  Bruno Haible  <bruno@clisp.org>
130097         * lib/tls.c (glthread_tls_get): Fix return type.
130098         Patch by Arto C. Nirkko <anirkko@insel.ch>.
130100 2007-04-12  Eric Blake  <ebb9@byu.net>
130102         * modules/gettime (Depends-on): Remove gettime.
130103         Reported by Dmitry V. Levin.
130105 2007-04-12  Bruno Haible  <bruno@clisp.org>
130107         * modules/fflush (Include): Mention <stdio.h>.
130108         * modules/strtoimax (Include): Mention <inttypes.h>.
130109         * modules/strtoumax (Include): Likewise.
130111 2007-04-12  Eric Blake  <ebb9@byu.net>
130113         * .cvsignore: New file.
130114         * .gitignore: Likewise.
130116 2007-04-12  Bruno Haible  <bruno@clisp.org>
130118         * modules/iconv-tests (test_iconv_LDADD): Mention -liconv after LDADD,
130119         not before, since $(LDADD) often contains libgnu.a.
130120         * modules/striconv-tests (test_striconv_LDADD): Likewise.
130121         * modules/striconveh-tests (test_striconveh_LDADD): Likewise.
130122         * modules/striconveha-tests (test_striconveha_LDADD): Likewise.
130123         Needed on Cygwin.
130125 2007-04-12  Eric Blake  <ebb9@byu.net>
130127         Work around glibc's failure to flush stdin on fclose.
130128         * lib/closein.c (close_stdin): Flush stdin before closing.
130130         Work around glibc's failure to reset seekable stdin on exit.
130131         * modules/closein: New module.
130132         * lib/closein.c: New file.
130133         * lib/closein.h: Likewise.
130134         * m4/closein.m4: Likewise.
130135         * MODULES.html.sh (File stream based Input/Output): Document it.
130137 2007-04-12  Simon Josefsson  <simon@josefsson.org>
130139         * gnulib-tool: Rename generated 'autobuild' script to
130140         'do-autobuild' in --create-megatestdir output.
130142         * doc/gnulib.texi (Build robot for gnulib): Fix.
130144 2007-04-12  Simon Josefsson  <simon@josefsson.org>
130146         * modules/sysexits (Depends-on): Add absolute-header.
130148 2007-04-12  Eric Blake  <ebb9@byu.net>
130150         No need to preserve errno on success.
130151         * lib/fflush.c (rpl_fflush): Simplify errno tracking.
130152         Reported by Bruno Haible.
130154 2007-04-12  Simon Josefsson  <simon@josefsson.org>
130156         * MODULES.html.sh (Support for maintaining and releasing
130157         projects): Add autobuild.  Suggested by Eric Blake <ebb9@byu.net>.
130159 2007-04-12  Simon Josefsson  <simon@josefsson.org>
130161         * gnulib-tool (func_modules_add_dummy): Respect --avoid=dummy.
130163 2007-04-12  Simon Josefsson  <simon@josefsson.org>
130165         * modules/autobuild: New module.
130167         * m4/autobuild.m4: New file.
130169 2007-04-11  Bruno Haible  <bruno@clisp.org>
130171         * lib/vasnprintf.c (VASNPRINTF): Implement the %F directive using the
130172         %f directive, if NEED_PRINTF_DIRECTIVE_F is defined.
130173         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_F): New macro.
130174         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_F): New macro.
130175         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
130176         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
130177         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
130178         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Invoke
130179         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
130180         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
130181         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Invoke
130182         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
130183         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
130184         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Invoke
130185         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
130186         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
130187         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Invoke
130188         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
130189         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
130190         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Invoke
130191         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
130192         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
130193         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Invoke
130194         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
130195         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
130196         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Invoke
130197         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
130198         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
130199         Reported by Eric Blake.
130201 2007-04-11  Bruno Haible  <bruno@clisp.org>
130203         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Fix test. It always failed.
130205 2007-04-10  Bruno Haible  <bruno@clisp.org>
130207         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Add a test for correct result
130208         for NaN and Infinity. Needed on FreeBSD 6.1.
130209         * tests/test-vasnprintf-posix.c (test_function): Undo last change
130210         regarding results for "%010a" of Infinity and NaN.
130211         * tests/test-vasprintf-posix.c (test_function): Likewise.
130212         * tests/test-snprintf-posix.h (test_function): Likewise.
130213         * tests/test-sprintf-posix.h (test_function): Likewise.
130214         * tests/test-fprintf-posix.h (test_function): Likewise.
130215         * tests/test-printf-posix.h (test_function): Likewise.
130216         * tests/test-fprintf-posix.out: Likewise.
130218 2007-04-10  Bruno Haible  <bruno@clisp.org>
130220         * modules/locale-tests: New file.
130221         * tests/test-locale.c: New file.
130223         * modules/locale: New file.
130224         * lib/locale_.h: New file.
130225         * m4/locale_h.m4: New file.
130227 2007-04-10  Paul Eggert  <eggert@cs.ucla.edu>
130228             Bruno Haible  <bruno@clisp.org>
130230         * m4/signbit.m4 (gl_SIGNBIT): When the sign bit position could not
130231         be determined, test for availability of the copysignf, copysign,
130232         copysignl functions.
130233         * lib/signbitf.c (gl_signbitf): Use copysignf if available in libc.
130234         * lib/signbitd.c (gl_signbitd): Use copysign if available in libc.
130235         * lib/signbitl.c (gl_signbitl): Use copysignl if available in libc.
130237 2007-04-09  Eric Blake  <ebb9@byu.net>
130239         * lib/stdio_.h [REPLACE_FFLUSH]: Declare rpl_fflush.
130240         * modules/stdio (Makefile.am): Support fflush.
130241         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Likewise.
130242         * modules/fflush: New file.
130243         * lib/fflush.c: Likewise.
130244         * m4/fflush.m4: Likewise.
130245         * modules/fflush-tests: New test.
130246         * tests/test-fflush.c: Likewise.
130247         * MODULES.html.sh (Input/output <stdio.h>): Document new module.
130249 2007-04-06  Bruno Haible  <bruno@clisp.org>
130251         * lib/vasnprintf.c: Include <math.h>. Don't include float+.h.
130252         (VASNPRINTF): Use signbit for faster determination whether to print a
130253         minus sign.
130254         * modules/vasnprintf (Files): Remove lib/float+.h.
130255         * modules/fprintf-posix (Depends-on): Add signbit.
130256         * modules/snprintf-posix (Depends-on): Likewise.
130257         * modules/sprintf-posix (Depends-on): Likewise.
130258         * modules/vasnprintf-posix (Depends-on): Likewise.
130259         * modules/vasprintf-posix (Depends-on): Likewise.
130260         * modules/vfprintf-posix (Depends-on): Likewise.
130261         * modules/vsnprintf-posix (Depends-on): Likewise.
130262         * modules/vsprintf-posix (Depends-on): Likewise.
130264 2007-04-06  Bruno Haible  <bruno@clisp.org>
130266         * tests/test-frexp.c (main): Test also the sign bit of zero results.
130267         * tests/test-frexpl.c (main): Likewise.
130268         * tests/test-ldexpl.c (main): Likewise.
130269         * modules/frexp-tests (Depends-on): Add signbit.
130270         * modules/frexpl-tests (Depdends-on): Likewise.
130271         * modules/ldexpl-tests (Depdends-on): Likewise.
130273 2007-04-06  Bruno Haible  <bruno@clisp.org>
130275         * modules/signbit-tests: New file.
130276         * tests/test-signbit.c: New file.
130278         * modules/signbit: New file.
130279         * lib/signbitf.c: New file.
130280         * lib/signbitd.c: New file.
130281         * lib/signbitl.c: New file.
130282         * m4/signbit.m4: New file.
130283         * lib/math_.h (gl_signbitf, gl_signbitd, gl_signbitl): New declarations.
130284         (signbit): New macro.
130285         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_SIGNBIT and
130286         REPLACE_SIGNBIT.
130287         * modules/math (Makefile.am): Substitute also GNULIB_SIGNBIT and
130288         REPLACE_FREXPL into math.h.
130290 2007-04-06  Bruno Haible  <bruno@clisp.org>
130292         * modules/isnanf-nolibm-tests: New file.
130293         * tests/test-isnanf.c: New file.
130295         * modules/isnanf-nolibm: New file.
130296         * lib/isnanf.h: New file.
130297         * lib/isnanf.c: New file.
130298         * lib/isnan.c: Consider the USE_FLOAT macro.
130299         * m4/isnanf.m4: New file.
130301 2007-04-06  Bruno Haible  <bruno@clisp.org>
130303         * modules/gettext-h (configure.ac): AC_SUBST LIBINTL and LTLIBINTL.
130304         (Link): New section.
130306         * modules/canonicalize-lgpl-tests (Makefile.am): Undo last change.
130308 2007-04-06  Bruno Haible  <bruno@clisp.org>
130310         Assume the 'long double' type.
130311         * m4/longdouble.m4: Remove file.
130312         * config/srclist.txt: Don't mention longdouble.m4.
130313         * lib/allocsa.h: Assume HAVE_LONG_DOUBLE to be true.
130314         * lib/float+.h: Likewise.
130315         * lib/frexp.c: Likewise.
130316         * lib/printf-args.h: Likewise.
130317         * lib/printf-args.c: Likewise.
130318         * lib/printf-frexp.c: Likewise.
130319         * lib/printf-parse.c: Likewise.
130320         * lib/vasnprintf.c: Likewise.
130321         * m4/allocsa.m4: Remove gt_TYPE_LONGDOUBLE invocation.
130322         * m4/intl.m4: Likewise.
130323         * m4/isnanl.m4: Likewise.
130324         * m4/printf.m4: Likewise.
130325         * m4/printf-frexpl.m4: Likewise.
130326         * m4/vasnprintf.m4: Likewise.
130327         * modules/allocsa (Files): Remove m4/longdouble.m4.
130328         * modules/gettext (Files): Likewise.
130329         * modules/relocatable-prog-wrapper (Files): Likewise.
130330         * modules/vasnprintf (Files): Likewise.
130331         * modules/isnanl (Files): Likewise.
130332         (Include): Simplify.
130333         * modules/isnanl-nolibm (Files): Remove m4/longdouble.m4.
130334         (Include): Simplify.
130335         * modules/printf-frexpl (Files): Remove m4/longdouble.m4.
130336         (Include): Simplify.
130337         * modules/snprintf-posix-tests (Files): Remove m4/longdouble.m4.
130338         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
130339         * modules/sprintf-posix-tests (Files): Remove m4/longdouble.m4.
130340         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
130341         * modules/vasnprintf-posix-tests (Files): Remove m4/longdouble.m4.
130342         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
130343         * modules/vasprintf-posix-tests (Files): Remove m4/longdouble.m4.
130344         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
130345         * modules/vsnprintf-posix-tests (Files): Remove m4/longdouble.m4.
130346         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
130347         * modules/vsprintf-posix-tests (Files): Remove m4/longdouble.m4.
130348         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
130349         * tests/test-isnanl-nolibm.c: Assume HAVE_LONG_DOUBLE to be true.
130350         * tests/test-isnanl.c: Likewise.
130351         * tests/test-snprintf-posix.h: Likewise.
130352         * tests/test-sprintf-posix.h: Likewise.
130353         * tests/test-vasnprintf-posix.c: Likewise.
130354         * tests/test-vasnprintf-posix2.c: Likewise.
130355         * tests/test-vasprintf-posix.c: Likewise.
130357 2007-04-06  Bruno Haible  <bruno@clisp.org>
130359         Fix problem with Compaq (ex-DEC) Desktop C compiler on Tru64.
130360         * lib/math_.h [__DECC]: Include the overridden include file through
130361         #include_next, outside the double-inclusion guard.
130362         * lib/stdio_.h [__DECC]: Likewise.
130363         * lib/stdlib_.h [__DECC]: Likewise.
130364         * lib/string_.h [__DECC]: Likewise.
130365         * lib/time_.h [__DECC]: Likewise.
130366         * lib/wchar_.h [__DECC]: Likewise.
130367         * lib/wctype_.h [__DECC]: Likewise.
130368         * lib/inttypes_.h [__DECC]: Likewise.
130369         Reported by Albert Chin <china@thewrittenword.com> in
130370         <http://lists.gnu.org/r/bug-gnulib/2007-04/msg00088.html>.
130372 2007-04-04  Eric Blake  <ebb9@byu.net>
130374         * m4/stdint.m4 (gl_STDINT_H): Detect WINT_MAX bug in cygwin
130375         1.5.x.
130377 2007-04-04  Bruno Haible  <bruno@clisp.org>
130379         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Add a test for correct
130380         rounding. Don't assume that FreeBSD 6 and NetBSD 4 pass this test.
130382 2007-04-04  Bruno Haible  <bruno@clisp.org>
130384         * tests/test-vasnprintf-posix.c (test_function): Allow two possible
130385         results for "%010a" of Infinity and NaN.
130386         * tests/test-vasprintf-posix.c (test_function): Likewise.
130387         * tests/test-snprintf-posix.h (test_function): Likewise.
130388         * tests/test-sprintf-posix.h (test_function): Likewise.
130389         * tests/test-fprintf-posix.h (test_function): Remove these tests.
130390         * tests/test-printf-posix.h (test_function): Likewise.
130391         * tests/test-fprintf-posix.out: Update.
130392         Needed for FreeBSD 6.1.
130394 2007-04-04  Bruno Haible  <bruno@clisp.org>
130396         * DEPENDENCIES: Remove mentions of tar and gzip, since they are not
130397         directly used by the gnulib modules nor by gnulib-tool.
130399 2007-04-04  Paul Eggert  <eggert@cs.ucla.edu>
130401         * DEPENDENCIES: Give overall description of version dependency
130402         desirability.  Use more-typical names for apps.
130403         Add shell, coreutils, diffutils, grep, tar, gzip.
130405 2007-04-04  Simon Josefsson  <simon@josefsson.org>
130407         * MODULES.html.sh: Rename crypto modules.  Remove iconvme.
130409 2007-04-04  Karl Berry  <karl@gnu.org>
130411         * MODULES.html.sh (func_module): missing '.
130413 2007-04-03  Bruno Haible  <bruno@clisp.org>
130415         * modules/argmatch-tests (Makefile.am): New variable
130416         test_argmatch_LDADD.
130417         * modules/argp-tests (Makefile.am): New variable test_argp_LDADD.
130418         * modules/array-list-tests (Makefile.am): New variable
130419         test_array_list_LDADD.
130420         * modules/array-oset-tests (Makefile.am): New variable
130421         test_array_oset_LDADD.
130422         * modules/avltree-list-tests (Makefile.am): New variable
130423         test_avltree_list_LDADD.
130424         * modules/avltree-oset-tests (Makefile.am): New variable
130425         test_avltree_oset_LDADD.
130426         * modules/avltreehash-list-tests (Makefile.am): New variable
130427         test_avltreehash_list_LDADD.
130428         * modules/canonicalize-lgpl-tests (Makefile.am): New variable
130429         test_canonicalize_lgpl_LDADD.
130430         * modules/carray-list-tests (Makefile.am): New variable
130431         test_carray_list_LDADD.
130432         * modules/dirname-tests (Makefile.am): New variable
130433         test_dirname_LDADD.
130434         * modules/linked-list-tests (Makefile.am): New variable
130435         test_linked_list_LDADD.
130436         * modules/linkedhash-list-tests (Makefile.am): New variable
130437         test_linkedhash_list_LDADD.
130438         * modules/rbtree-list-tests (Makefile.am): New variable
130439         test_rbtree_list_LDADD.
130440         * modules/rbtree-oset-tests (Makefile.am): New variable
130441         test_rbtree_oset_LDADD.
130442         * modules/rbtreehash-list-tests (Makefile.am): New variable
130443         test_rbtreehash_list_LDADD.
130444         * modules/xvasprintf-tests (Makefile.am): New variable
130445         test_xvasprintf_LDADD.
130446         Reported by Eric Blake.
130448 2007-04-03  Eric Blake  <ebb9@byu.net>
130450         * DEPENDENCIES: Weaken m4 requirements.
130452 2007-04-03  Bruno Haible  <bruno@clisp.org>
130454         * modules/frexp-tests (configure.ac): Remove AC_SUBST.
130455         * modules/isnanl-tests (configure.ac): Likewise.
130457 2007-04-03  Ben Pfaff  <blp@gnu.org>
130459         * modules/iconv_open: Add $(srcdir)/ to source directory
130460         references in Makefile fragments that call gperf, to fix VPATH
130461         builds.
130463 2007-04-03  Bruno Haible  <bruno@clisp.org>
130465         * modules/ldexpl (Depends-on): Add isnanl, remove isnanl-nolibm.
130466         * lib/ldexpl.c: Undo last change.
130468 2007-04-03  Bruno Haible  <bruno@clisp.org>
130470         * modules/printf-frexpl (Depends-on): Undo last change.
130471         (Files): Add m4/ldexpl.m4.
130473 2007-04-03  Bruno Haible  <bruno@clisp.org>
130475         * m4/isnanl.m4 (gl_FUNC_ISNANL): Substitute ISNANL_LIBM.
130476         * modules/isnanl (Link): New section.
130478         * m4/frexp.m4 (gl_FUNC_FREXP): Substitute FREXP_LIBM.
130479         * modules/frexp (Link): New section.
130481         * m4/frexpl.m4 (gl_FUNC_FREXPL): Substitute FREXPL_LIBM.
130482         * modules/frexpl (Link): New section.
130484         * m4/ldexpl.m4 (gl_FUNC_LDEXPL): Substitute LDEXPL_LIBM.
130485         * modules/ldexpl (Link): New section.
130487 2007-04-03  Bruno Haible  <bruno@clisp.org>
130489         * modules/TEMPLATE-EXTENDED: New file.
130490         * gnulib-tool (func_all_modules, func_verify_module): Exclude it.
130492 2007-04-03  Bruno Haible  <bruno@clisp.org>
130494         * DEPENDENCIES: New file.
130495         Suggested by Simon Josefsson.
130497 2007-04-03  Bruno Haible  <bruno@clisp.org>
130499         * doc/gnulib.texi: Escape @.
130501 2007-04-03  James Youngman  <jay@gnu.org>
130502         and Paul Eggert  <eggert@cs.ucla.edu>
130504         * lib/stat-time.h (get_stat_birthtime): Check for zero-valued
130505         birthtime on all systems that have birthtime, not just those which
130506         use st_birthtimensec rather than st_birthtim.  Putting zero in
130507         st_birthtim.tv_sec is how (for example) FreeBSD/x86 6.1 indicates
130508         that the birth time is not available for files on an NFS mount.
130510 2007-04-03  Simon Josefsson  <simon@josefsson.org>
130512         * modules/memxor: Move back from crypto/, suggested by Bruno.
130513         * modules/crypto/hmac-sha1: Fix memxor dependency.
130515         * modules/crypto/gc: Moved from ../.
130517 2007-04-02  Eric Blake  <ebb9@byu.net>
130519         * lib/ldexpl.c (includes): Avoid libm.
130521         * modules/printf-frexpl (Depends-on): Depend on ldexpl.
130523 2007-04-02  Bruno Haible  <bruno@clisp.org>
130525         * lib/sysexit_.h (EX_OK): Disable the EX_OK definition from <unistd.h>
130526         on IRIX.
130528 2007-04-02  Bruno Haible  <bruno@clisp.org>
130530         * m4/intdiv0.m4 (gt_INTDIV0): Avoid performing the test for real on
130531         x86 or x86_64 platforms running MacOS X.
130532         Reported by Ryan Schmidt <@ryandesign.com>.
130534 2007-04-02  Bruno Haible  <bruno@clisp.org>
130536         * m4/intdiv0.m4 (gt_INTDIV0): When cross-compiling, treat x86_64 like
130537         i386.
130539 2007-04-01  Simon Josefsson  <simon@josefsson.org>
130541         * modules/crypto/arcfour: Moved from ../.
130542         * modules/crypto/arcfour-tests: Moved from ../.
130543         * modules/crypto/arctwo: Moved from ../.
130544         * modules/crypto/arctwo-tests: Moved from ../.
130545         * modules/crypto/des: Moved from ../.
130546         * modules/crypto/des-tests: Moved from ../.
130547         * modules/crypto/gc-arcfour: Moved from ../.
130548         * modules/crypto/gc-arcfour-tests: Moved from ../.
130549         * modules/crypto/gc-arctwo: Moved from ../.
130550         * modules/crypto/gc-arctwo-tests: Moved from ../.
130551         * modules/crypto/gc-des: Moved from ../.
130552         * modules/crypto/gc-des-tests: Moved from ../.
130553         * modules/crypto/gc-hmac-md5: Moved from ../.
130554         * modules/crypto/gc-hmac-md5-tests: Moved from ../.
130555         * modules/crypto/gc-hmac-sha1: Moved from ../.
130556         * modules/crypto/gc-hmac-sha1-tests: Moved from ../.
130557         * modules/crypto/gc-md2: Moved from ../.
130558         * modules/crypto/gc-md2-tests: Moved from ../.
130559         * modules/crypto/gc-md4: Moved from ../.
130560         * modules/crypto/gc-md4-tests: Moved from ../.
130561         * modules/crypto/gc-md5: Moved from ../.
130562         * modules/crypto/gc-md5-tests: Moved from ../.
130563         * modules/crypto/gc-pbkdf2-sha1: Moved from ../.
130564         * modules/crypto/gc-pbkdf2-sha1-tests: Moved from ../.
130565         * modules/crypto/gc-random: Moved from ../.
130566         * modules/crypto/gc-rijndael: Moved from ../.
130567         * modules/crypto/gc-rijndael-tests: Moved from ../.
130568         * modules/crypto/gc-sha1: Moved from ../.
130569         * modules/crypto/gc-sha1-tests: Moved from ../.
130570         * modules/crypto/gc-tests: Moved from ../.
130571         * modules/crypto/hmac-md5: Moved from ../.
130572         * modules/crypto/hmac-md5-tests: Moved from ../.
130573         * modules/crypto/hmac-sha1: Moved from ../.
130574         * modules/crypto/hmac-sha1-tests: Moved from ../.
130575         * modules/crypto/md2: Moved from ../.
130576         * modules/crypto/md2-tests: Moved from ../.
130577         * modules/crypto/md4: Moved from ../.
130578         * modules/crypto/md4-tests: Moved from ../.
130579         * modules/crypto/md5: Moved from ../.
130580         * modules/crypto/md5-tests: Moved from ../.
130581         * modules/crypto/memxor: Moved from ../.
130582         * modules/crypto/rijndael: Moved from ../.
130583         * modules/crypto/rijndael-tests: Moved from ../.
130584         * modules/crypto/sha1: Moved from ../.
130586 2007-03-30  James Youngman  <jay@gnu.org>
130588         * tests/test-stat-time.c (prepare_test): use chmod() rather than
130589         rename() to change the ctime of a file (because ctime is unaffected
130590         by rename on jfs2 on AIX 5.1).
130591         (main): Start by doing cleanup, in case a previous run failed leaving
130592         test files behind.
130594 2007-03-31  Bruno Haible  <bruno@clisp.org>
130596         Support old proprietary implementations of iconv.
130597         * modules/iconv_open: New file.
130598         * lib/iconv_.h: New file.
130599         * m4/iconv_h.m4: New file.
130600         * lib/iconv_open.c: New file.
130601         * lib/iconv_open-aix.gperf: New file.
130602         * lib/iconv_open-hpux.gperf: New file.
130603         * lib/iconv_open-irix.gperf: New file.
130604         * lib/iconv_open-osf.gperf: New file.
130605         * m4/iconv_open.m4: New file.
130606         * modules/linebreak (Depends-on): Add iconv_open.
130607         * modules/striconv (Depends-on): Likewise.
130608         * modules/striconveh (Depends-on): Likewise.
130609         * modules/unicodeio (Depends-on): Likewise.
130610         * lib/striconveh.h (mem_cd_iconveh, str_cd_iconveh): Allow cd to be
130611         (iconv_t)(-1).
130612         * lib/striconveh.c (mem_cd_iconveh_internal): Use an indirect
130613         conversion if cd is (iconv_t)(-1).
130614         (mem_iconveh, str_iconveh): Don't fail just because a direct conversion
130615         is not possible.
130617 2007-03-31  Bruno Haible  <bruno@clisp.org>
130619         * tests/test-striconveha.c (main): Don't expect "autodetect_jp" to
130620         work on Solaris either. Protect also second use of "autodetect_jp".
130622 2007-03-31  Bruno Haible  <bruno@clisp.org>
130624         * m4/frexpl.m4 (gl_FUNC_FREXPL): Set HAVE_DECL_FREXPL to 0 when
130625         the function is not present.
130627 2007-03-31  Bruno Haible  <bruno@clisp.org>
130629         * m4/ldexpl.m4 (gl_FUNC_LDEXPL): Set HAVE_DECL_LDEXPL to 0 when
130630         the function is not present.
130632 2007-03-31  Bruno Haible  <bruno@clisp.org>
130634         * m4/iconv.m4 (AM_ICONV_LINK): Fix 2007-03-29 patch. Test also against
130635         a bug in HP-UX iconv_open().
130637 2007-03-31  Bruno Haible  <bruno@clisp.org>
130639         * MODULES.html.sh (func_module): Don't show gnulib-common.m4.
130640         (Mathematics <math.h>): New section, add fpieee.
130641         (Input/output <stdio.h>): Add fseterr.
130642         (Mathematics <math.h>): New section, add printf-frexp.
130643         (Container data structures): Add sublist.
130644         (Core language properties): Add fpucw, inline.
130645         (Functions for greatest-width integer types <inttypes.h>): Add
130646         imaxabs, imaxdiv, inttypes.
130647         (Mathematics <math.h>): Add frexp, frexpl, isnan-nolibm, isnanl,
130648         isnanl-nolibm, ldexp.
130649         (Mathematics <math.h>): New section, add printf-frexpl.
130650         (Support for systems lacking POSIX:2001): Add fprintf-posix,
130651         printf-posix, snprintf-posix, sprintf-posix, string, search, socklen,
130652         sys_select, sys_socket, vasnprintf-posix, vasprintf-posix,
130653         vfprintf-posix, vprintf-posix, vsnprintf-posix, vsprintf-posix.
130654         (Unicode string functions): Add unistr/u*-mbtoucr.
130655         (Java): Add javacomp-script, javaexec-script.
130656         (C#): Add csharpcomp-script, csharpexec-script.
130657         (Support for building libraries and executables): Add havelib,
130658         relocatable-*.
130659         (Support for maintaining and releasing projects): Renamed from
130660         'Support for maintaining and release projects'. Add announce-gen.
130662 2007-03-31  Bruno Haible  <bruno@clisp.org>
130664         * README: Talk primarily about git.
130665         (git and CVS): Renamed from CVS.
130666         * doc/gnulib.texi (Introduction, Build robot for gnulib): Mention that
130667         gnulib is available through git.
130668         * doc/gnulib-tool.texi (CVS Issues): Mention git and svn as well.
130670 2007-03-30  Bruno Haible  <bruno@clisp.org>
130672         * lib/alloca_.h: Change prefix of double-inclusion guard macro to _GL_.
130673         * lib/poll_.h: Likewise.
130674         * lib/stat_.h: Likewise.
130675         * lib/sys_time_.h: Likewise.
130676         * lib/sysexit_.h: Likewise.
130677         * lib/glob_.h: Prefix double-inclusion guard macro with _GL_.
130678         * lib/stdbool_.h: Likewise.
130679         * lib/byteswap_.h: Add double-inclusion guard.
130681 2007-03-30  Sergey Poznyakoff  <gray@mirddin.farlep.net>
130683         * lib/sysexit_.h: Prefix double-inclusion guard macro with _GNULIB.
130685 2007-03-30  Karl Berry  <karl@gnu.org>
130687         * config/srclist-update: double space after USA in the license
130688         substitution, since that's how it's usually (?) written.
130690 2007-03-30  Paul Eggert  <eggert@cs.ucla.edu>
130692         * lib/write-any-file.c (can_write_any_file): Fix else-else bug
130693         reported by Bruno Haible.
130695 2007-03-29  Bruno Haible  <bruno@clisp.org>
130697         * m4/iconv.m4 (AM_ICONV_LINK): Require AC_CANONICAL_HOST. Test against
130698         a bug in AIX iconv().
130700 2007-03-29  Bruno Haible  <bruno@clisp.org>
130702         * modules/ldexpl-tests: New file.
130703         * tests/test-ldexpl.c: New file.
130705 2007-03-29  Bruno Haible  <bruno@clisp.org>
130707         * lib/ldexpl.c: Include fpucw.h.
130708         (ldexpl): Use BEGIN/END_LONG_DOUBLE_ROUNDING. Skip the last unneeded
130709         multiplication.
130710         * modules/ldexpl (Depends-on): Add fpucw.
130712 2007-03-29  Bruno Haible  <bruno@clisp.org>
130714         * modules/ldexpl: New file.
130715         * m4/ldexpl.m4: New file.
130716         * lib/math_.h (ldexpl): Define to a replacement if REPLACE_LDEXPL is
130717         set.
130718         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize also GNULIB_LDEXPL,
130719         REPLACE_LDEXPL.
130720         * modules/math (Makefile.am): Substitute also GNULIB_LDEXPL,
130721         REPLACE_LDEXPL.
130722         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Invoke
130723         gl_FUNC_LDEXPL_WORKS.
130724         * m4/mathl.m4 (gl_FUNC_LONG_DOUBLE_MATH): Remove test for ldexpl.
130725         * modules/mathl (Files): Remove lib/ldexpl.c.
130726         (Depends-on): Add ldexpl.
130728 2007-03-29  Bruno Haible  <bruno@clisp.org>
130730         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Declare frexpl.
130732 2007-03-29  Bruno Haible  <bruno@clisp.org>
130734         * tests/test-striconveh.c (main): Don't assume that a direct conversion
130735         between ISO-8859-1 and ISO-8859-2 is possible. Needed for OSF/1, IRIX
130736         and possibly also HP-UX.
130737         * tests/test-striconveha.c (main): Don't expect "autodetect_jp" to
130738         work on AIX, IRIX, HP-UX, OSF/1.
130739         * tests/uniconv/test-u16-conv-from-enc.c (main): Likewise.
130740         * tests/uniconv/test-u16-strconv-from-enc.c (main): Likewise.
130741         * tests/uniconv/test-u32-conv-from-enc.c (main): Likewise.
130742         * tests/uniconv/test-u32-strconv-from-enc.c (main): Likewise.
130743         * tests/uniconv/test-u8-conv-from-enc.c (main): Likewise.
130744         * tests/uniconv/test-u8-strconv-from-enc.c (main): Likewise.
130746 2007-03-29  Bruno Haible  <bruno@clisp.org>
130748         * tests/test-stat-time.c: Include <fcntl.h>, not <sys/fcntl.h>.
130750 2007-03-29  Paul Eggert  <eggert@cs.ucla.edu>
130752         * lib/acl-internal.h (acl_get_fd, acl_set_fd): undef before defining,
130753         to work around a problem on OSF/1 5.1 reported by Bruno Haible.
130755 2007-03-29  Eric Blake  <ebb9@byu.net>
130757         * lib/acl-internal.h: Remove redundant include.
130758         (ACL_NOT_WELL_SUPPORTED): Also filter on EBUSY, returned by
130759         Cygwin when a file is locked.
130761 2007-03-29  Bruno Haible  <bruno@clisp.org>
130763         * lib/vasprintf.c [IN_LIBASPRINTF]: Include different specification
130764         file.
130765         * lib/asprintf.c [IN_LIBASPRINTF]: Likewise.
130767 2007-03-29  Paul Eggert  <eggert@cs.ucla.edu>
130769         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Don't bother to
130770         try to remove a parent directory if the child couldn't be removed
130771         (except for the first rmdir, which could fail because the child
130772         doesn't exist).  Problem reported by Jeff Blaine in
130773         <http://lists.gnu.org/r/bug-tar/2007-03/msg00014.html>.
130775 2007-03-28  Bruno Haible  <bruno@clisp.org>
130777         * lib/striconveh.c (utf8conv_carefully): New function.
130778         (mem_cd_iconveh_internal): Invoke it.
130780 2007-03-28  Bruno Haible  <bruno@clisp.org>
130782         * lib/striconveh.c (mem_cd_iconveh_internal): Use u8_mbtoucr instead
130783         of u8_mbtouc in order to distinguish invalid and incomplete UTF-8
130784         input.
130785         * modules/striconveh (Depends-on): Add unistr/u8-mbtoucr. Replace
130786         utf8-ucs4 with unistr/u8-mbtouc. Replace ucs4-utf8 with
130787         unistr/u8-uctomb.
130789 2007-03-28  Bruno Haible  <bruno@clisp.org>
130791         * modules/unistr/u8-mbtoucr: New file.
130792         * lib/unistr/u8-mbtoucr.c: New file.
130793         * modules/unistr/u16-mbtoucr: New file.
130794         * lib/unistr/u16-mbtoucr.c: New file.
130795         * modules/unistr/u16-mbtoucr: New file.
130796         * lib/unistr/u16-mbtoucr.c: New file.
130797         * lib/unistr.h (u8_mbtoucr, u16_mbtoucr, u32_mbtoucr): New declarations.
130799 2007-03-27  Simon Josefsson  <simon@josefsson.org>
130800             Bruno Haible  <bruno@clisp.org>
130802         * m4/vasprintf.m4: Convert AC_SUBST into shell variable for
130803         REPLACE_VASPRINTF.  Set HAVE_VASPRINTF.  Add
130804         AC_REQUIRE([gl_STDIO_H_DEFAULTS]).
130806         * m4/stdio_h.m4: Add stubs for vasprintf too.
130808         * modules/stdio: Support vasprintf in sed command.
130810         * modules/vasprintf: Depend on stdio for prototypes.  Remove
130811         vasprintf.h.  Add stdio module indicator.
130813         * lib/stdio_.h: Declare asprintf and vasprintf, based on
130814         vasprintf.h.
130816         * lib/vasprintf.h: File removed.
130818         * lib/asprintf.c: Use stdio.h instead of vasprintf.h.
130819         * lib/vasprintf.c: Ditto.
130820         * lib/xvasprintf.c: Ditto.
130821         * tests/test-vasprintf-posix.c: Ditto.
130822         * tests/test-vasprintf.c: Ditto.
130824 2007-03-27  Bruno Haible  <bruno@clisp.org>
130826         Make vasnprintf multithread-safe.
130827         * lib/vasnprintf.c (decimal_point_char): New function.
130828         (VASNPRINTF): Use it.
130829         Suggested by Simon Josefsson.
130831 2007-03-27  Eric Blake  <ebb9@byu.net>
130833         Support sub-second birthtime on cygwin.
130834         * m4/stat-time.m4 (gl_STAT_BIRTHTIME): Also check for st_birthtim.
130835         * lib/stat-time.h (STAT_TIMESPEC): Adjust comments.
130836         (get_stat_birthtime): Also work with st_birthtim.
130838 2007-03-27  Paul Eggert  <eggert@cs.ucla.edu>
130840         * lib/stat-time.h (USE_BIRTHTIME): Remove.
130841         (get_stat_atime_ns, get_stat_ctime_ns, get_stat_mtime_ns):
130842         (get_stat_birthtime_ns): Do not try to use "spare" fields.
130843         (get_stat_birthtime_ns): Simplify compile-time tests.
130844         (get_stat_birthtime): Change the API to look like
130845         get_stat_mtime etc., except return a negative tv_nsec on error.
130846         * m4/stat-time.m4 (gl_STAT_TIME, gl_STAT_BIRTHTIME):
130847         Don't check for "spare" fields.
130848         (gl_STAT_BIRTHTIME): Don't check for struct stat.st_birthtimespec.tv_sec
130849         or for struct stat.st_birthtime, as these tests aren't used.
130850         * tests/test-stat-time.c (test_birthtime): Adjust to new API.
130852 2007-03-27  Bruno Haible  <bruno@clisp.org>
130854         * lib/stat-time.h: Include <sys/stat.h>.
130856 2007-03-27  James Youngman  <jay@gnu.org>
130858         * lib/stat-time.h (get_stat_birthtime): New function for
130859           retrieving st_birthtime as provided by UFS2 (hence *BSD).
130860         * m4/stat-time.m4 (gl_STAT_BIRTHTIME): Probe for st_birthtime
130861           and its variants.
130862         * modules/stat-time (configure.ac): call gl_STAT_BIRTHTIME.
130863         * modules/stat-time-test: New file.
130864         * tests/test-stat-time.c: New test, devised by Bruno Haible.
130866 2007-03-26  Bruno Haible  <bruno@clisp.org>
130868         Better support of signalling NaNs.
130869         * lib/atanl.c: Include isnanl.h.
130870         (atanl): Perform test for NaN at the beginning of the function and
130871         through a call to isnanl.
130872         * lib/cosl.c: Include isnanl.h.
130873         (cosl): Perform test for NaN at the beginning of the function and
130874         through a call to isnanl.
130875         * lib/ldexpl.c: Include isnanl.h.
130876         (ldexpl): Perform test for NaN through a call to isnanl.
130877         * lib/logl.c: Include isnanl.h.
130878         (logl): Perform test for NaN at the beginning of the function and
130879         through a call to isnanl.
130880         * lib/sinl.c: Include isnanl.h.
130881         (sinl): Perform test for NaN at the beginning of the function and
130882         through a call to isnanl.
130883         * lib/sqrtl.c: Include isnanl.h.
130884         (sqrtl): Perform test for NaN at the beginning of the function and
130885         through a call to isnanl.
130886         * lib/tanl.c: Include isnanl.h.
130887         (tanl): Perform test for NaN at the beginning of the function and
130888         through a call to isnanl.
130889         * lib/trigl.c (ieee754_rem_pio2l): Remove test for NaN.
130890         * modules/mathl (Depends-on): Add isnanl.
130892 2007-03-26  Eric Blake  <ebb9@byu.net>
130894         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_A): Fix
130895         regression in logic sense of previous patch.
130897 2007-03-26  Bruno Haible  <bruno@clisp.org>
130899         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_A): Don't use
130900         unportable shell command "if ! ...".
130901         Reported by Ralf Wildenhues.
130903 2007-03-25  Bruno Haible  <bruno@clisp.org>
130905         * lib/sysexit_,h: If HAVE_SYSEXITS_H is defined, include the original
130906         <sysexits.h> file, and only add EX_CONFIG.
130907         * m4/sysexits.m4 (gl_SYSEXITS): If <sysexits.h> exists, check its
130908         absolute file name and whether it is sufficient. Substitute also
130909         HAVE_SYSEXITS_H and ABSOLUTE_SYSEXITS_H.
130910         * modules/sysexits (Makefile.am): Substitute HAVE_SYSEXITS_H and
130911         ABSOLUTE_SYSEXITS_H into sysexits.h.
130913 2007-03-25  Bruno Haible  <bruno@clisp.org>
130915         * lib/getaddrinfo.c (getaddrinfo): Don't access hints->ai_flags when
130916         hints is NULL.
130918 2007-03-25  Bruno Haible  <bruno@clisp.org>
130920         * lib/uniconv/u8-conv-from-enc.c (u8_conv_from_encoding): Add a cast.
130921         * lib/uniconv/u8-strconv-to-enc.c (u8_strconv_to_encoding): Likewise.
130923 2007-03-25  Bruno Haible  <bruno@clisp.org>
130925         * lib/vasnprintf.c: Include langinfo.h.
130926         (VASNPRINTF): Prefer nl_langinfo over localeconv, since it's more
130927         multithread-safe.
130928         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_A): New macro.
130929         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke it.
130930         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
130931         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
130932         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
130933         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
130934         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
130935         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX: Likewise.
130936         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
130937         Reported by Simon Josefsson.
130939 2007-03-25  Bruno Haible  <bruno@clisp.org>
130941         * lib/printf-parse.c [!IN_LIBINTL]: Include <stdint.h>, for intmax_t.
130942         (PRINTF_PARSE): Make the support for size specifier 'j' unconditional.
130943         * modules/vasnprintf (Depends-on): Add stdint.
130945 2007-03-25  Bruno Haible  <bruno@clisp.org>
130947         * modules/fpieee: New file.
130948         * m4/fpieee.m4: New file.
130949         * modules/isnan-nolibm (Depends-on): Add fpieee.
130950         * modules/isnanl-nolibm (Depends-on): Add fpieee.
130951         * modules/isnanl (Depends-on): Add fpieee.
130953 2007-03-25  Bruno Haible  <bruno@clisp.org>
130955         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Test also finite numbers.
130957 2007-03-25  Bruno Haible  <bruno@clisp.org>
130959         Avoid test failures on IRIX 6.5.
130960         * tests/test-frexpl.c (MIN_NORMAL_EXP): New macro.
130961         (main): Use it.
130962         * tests/test-printf-frexpl.c (MIN_NORMAL_EXP, MIN_SUBNORMAL_EXP): New
130963         macros.
130964         (main): Use them.
130966 2007-03-25  Bruno Haible  <bruno@clisp.org>
130968         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): New macro.
130969         (gl_FUNC_FREXPL): Invoke it. Set REPLACE_FREXPL to 1 if it frexpl
130970         exists but doesn't work.
130971         * lib/math_.h (frexpl): Define as a replacement macro if REPLACE_FREXPL
130972         is set. Don't provide a prototype if REPLACE_FREXPL is not set.
130973         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_FREXPL.
130974         * modules/math (Makefile.am): Substitute also REPLACE_FREXPL into
130975         math.h.
130977 2007-03-25  Bruno Haible  <bruno@clisp.org>
130979         * m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Add check whether frexp(inf)
130980         returns inf. Needed on IRIX 6.5.
130982 2007-03-25  Bruno Haible  <bruno@clisp.org>
130984         * tests/test-frexpl.c: Include isnanl-nolibm.h.
130985         (main): Use isnanl instead of x != x idiom.
130986         * modules/frexpl-tests (Depends-on): Add isnanl-nolibm.
130988         * tests/test-frexp.c: Include isnan.h.
130989         (main): Use isnan instead of x != x idiom.
130990         * modules/frexp-tests (Depends-on): Add isnan-nolibm.
130992 2007-03-25  Bruno Haible  <bruno@clisp.org>
130994         * tests/test-frexp.c (NaN): New function/macro.
130995         (main): Use it instead of 0.0 / 0.0.
130996         * tests/test-isnan.c (NaN): New function/macro.
130997         (main): Use it instead of 0.0 / 0.0.
130998         * tests/test-vasnprintf-posix.c (NaN): New function/macro.
130999         (test_function): Use it instead of 0.0 / 0.0.
131000         * tests/test-vasprintf-posix.c (NaN): New function/macro.
131001         (test_function): Use it instead of 0.0 / 0.0.
131002         * tests/test-snprintf-posix.h (NaN): New function/macro.
131003         (test_function): Use it instead of 0.0 / 0.0.
131004         * tests/test-sprintf-posix.h (NaN): New function/macro.
131005         (test_function): Use it instead of 0.0 / 0.0.
131006         * tests/test-fprintf-posix.h (NaN): New function/macro.
131007         (test_function): Use it instead of 0.0 / 0.0.
131008         * tests/test-printf-posix.h (NaN): New function/macro.
131009         (test_function): Use it instead of 0.0 / 0.0.
131011         * lib/isnan.c (FUNC): Work around a DEC C compiler bug.
131013 2007-03-25  Bruno Haible  <bruno@clisp.org>
131015         * lib/glob_.h: Include <sys/stat.h>. Avoids warnings on AIX 5.1.
131017 2007-03-25  Bruno Haible  <bruno@clisp.org>
131019         * lib/regexec.c (merge_state_with_log): Make static.
131021 2007-03-25  Bruno Haible  <bruno@clisp.org>
131023         * lib/trigl.c (kernel_rem_pio2): Make static.
131025 2007-03-25  Bruno Haible  <bruno@clisp.org>
131027         * lib/sincosl.c (sincosl_table): Make static.
131029 2007-03-25  Bruno Haible  <bruno@clisp.org>
131031         * lib/argp.h (__restrict): Define to empty, rather than to 'restrict',
131032         if the compiler does not support C99.
131034 2007-03-25  Bruno Haible  <bruno@clisp.org>
131036         * modules/time (Makefile.am): Ensure all rule action lines start with a
131037         tab.
131039 2007-03-24  Bruno Haible  <bruno@clisp.org>
131041         * modules/tsearch-tests: New file.
131042         * tests/test-tsearch.sh: New file.
131043         * tests/test-tsearch.c: New file, mostly copied from glibc.
131045         * modules/search-tests: New file.
131046         * tests/test-search.c: New file.
131048         * modules/search: New file.
131049         * lib/search_.h: New file, incorporating lib/tsearch.h.
131050         * m4/search_h.m4: New file.
131051         * lib/tsearch.h: Remove file.
131052         * lib/tsearch.c: Include search.h instead of tsearch.h.
131053         * m4/tsearch.m4 (gl_FUNC_TSEARCH): Require gl_SEARCH_H_DEFAULTS. Set
131054         HAVE_TSEARCH.
131055         * modules/tsearch (Files): Remove lib/tsearch.h.
131056         (Depends-on): Add search.
131057         (configure.ac): Invoke gl_SEARCH_MODULE_INDICATOR.
131058         (Include): Change tsearch.h into search.h.
131060 2007-03-24  Bruno Haible  <bruno@clisp.org>
131062         * modules/fpucw: New file.
131063         * lib/fpucw.h: New file.
131064         * lib/frexp.c: Include fpucw.h.
131065         (DECL_ROUNDING, BEGIN_ROUNDING, END_ROUNDING): New macros.
131066         (FUNC): Use them.
131067         * lib/printf-frexp.c: Include fpucw.h.
131068         (DECL_ROUNDING, BEGIN_ROUNDING, END_ROUNDING): New macros.
131069         (FUNC): Use them.
131070         * lib/vasnprintf.c: Include fpucw.h.
131071         (VASNPRINTF): Invoke BEGIN/END_LONG_DOUBLE_ROUNDING around the
131072         'long double' calculations.
131073         * tests/test-frexpl.c: Include fpucw.h.
131074         (main): Invoke BEGIN_LONG_DOUBLE_ROUNDING.
131075         * tests/test-printf-frexpl.c: Include fpucw.h.
131076         (main): Invoke BEGIN_LONG_DOUBLE_ROUNDING.
131077         * modules/frexpl (Depends-on): Add fpucw.
131078         * modules/printf-frexpl (Depends-on): Likewise.
131079         * modules/fprintf-posix (Depends-on): Likewise.
131080         * modules/snprintf-posix (Depends-on): Likewise.
131081         * modules/sprintf-posix (Depends-on): Likewise.
131082         * modules/vasnprintf-posix (Depends-on): Likewise.
131083         * modules/vasprintf-posix (Depends-on): Likewise.
131084         * modules/vfprintf-posix (Depends-on): Likewise.
131085         * modules/vsnprintf-posix (Depends-on): Likewise.
131086         * modules/vsprintf-posix (Depends-on): Likewise.
131087         * modules/frexpl-tests (Depends-on): Likewise.
131088         * modules/printf-frexpl-tests (Depends-on): Likewise.
131090 2007-03-24  Bruno Haible  <bruno@clisp.org>
131092         * lib/float+.h: New file.
131093         * lib/isnan.c: Include float+.h.
131094         (SIZE): New macro.
131095         (FUNC): Compare only SIZE bytes of the value.
131096         * lib/vasnprintf.c: Include float+.h.
131097         (VASNPRINTF): When comparing against +0.0L or +0.0, compare only
131098         SIZEOF_LDBL or SIZEOF_DBL bytes.
131099         * modules/isnan-nolibm (Files): Add lib/float+.h.
131100         * modules/isnanl-nolibm (Files): Add lib/float+.h.
131101         * modules/isnanl (Files): Add lib/float+.h.
131102         * modules/vasnprintf (Files): Add lib/float+.h.
131104 2007-03-24  Bruno Haible  <bruno@clisp.org>
131106         * lib/vasnprintf.c [!HAVE_LONG_DOUBLE]: Include printf-frexp.h. Don't
131107         include isnanl-nolibm.h.
131109 2007-03-24  Bruno Haible  <bruno@clisp.org>
131111         * tests/test-read-file.c (main): Don't produce spurious output for
131112         expected situations. Make the test fail if it encountered unexpected
131113         results.
131115 2007-03-24  Bruno Haible  <bruno@clisp.org>
131117         * m4/locale-fr.m4 (gt_LOCALE_FR): Remove the special-casing of NetBSD,
131118         since its fr_FR.ISO8859-1 locale wouldn't pass the tests.
131120 2007-03-24  Bruno Haible  <bruno@clisp.org>
131122         * m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): Fix last change.
131124 2007-03-24  Bruno Haible  <bruno@clisp.org>
131126         * modules/unistr/base (Depends-on): Remove utf8-ucs4-unsafe,
131127         utf16-ucs4-unsafe, utf8-ucs4, utf16-ucs4, ucs4-utf8, ucs4-utf16.
131129         * modules/unistr/u8-mbtouc: Add source files from module utf8-ucs4.
131130         * modules/utf8-ucs4: Turn into a symbolic link to module
131131         unistr/u8-mbtouc.
131133         * modules/unistr/u8-mbtouc-unsafe: Add source files from module
131134         utf8-ucs4-unsafe.
131135         * modules/utf8-ucs4-unsafe: Turn into a symbolic link to module
131136         unistr/u8-mbtouc-unsafe.
131138         * modules/unistr/u16-mbtouc: Add source files from module utf16-ucs4.
131139         * modules/utf16-ucs4: Turn into a symbolic link to module
131140         unistr/u16-mbtouc.
131142         * modules/unistr/u16-mbtouc-unsafe: Add source files from module
131143         utf16-ucs4-unsafe.
131144         * modules/utf16-ucs4-unsafe: Turn into a symbolic link to module
131145         unistr/u16-mbtouc-unsafe.
131147         * modules/unistr/u8-uctomb: Add source files from module utf4-utf8.
131148         * modules/ucs4-utf8: Turn into a symbolic link to module
131149         unistr/u8-ubtomb.
131151         * modules/unistr/u16-uctomb: Add source files from module utf4-utf16.
131152         * modules/ucs4-utf16: Turn into a symbolic link to module
131153         unistr/u16-ubtomb.
131155 2007-03-24  Bruno Haible  <bruno@clisp.org>
131157         * lib/unistr/u8-mbtouc-aux.c: Renamed from lib/unistr/utf8-ucs4.c.
131158         Enable the function only if HAVE_INLINE.
131159         * lib/unistr/u8-mbtouc-unsafe-aux.c: Renamed from
131160         lib/unistr/utf8-ucs4-unsafe.c. Enable the function only if HAVE_INLINE.
131161         * lib/unistr/u16-mbtouc-aux.c: Renamed from lib/unistr/utf16-ucs4.c.
131162         Enable the function only if HAVE_INLINE.
131163         * lib/unistr/u16-mbtouc-unsafe-aux.c: Renamed from
131164         lib/unistr/utf16-ucs4-unsafe.c. Enable the function only if HAVE_INLINE.
131165         * lib/unistr/u8-uctomb-aux.c: Renamed from lib/unistr/ucs4-utf8.c.
131166         Enable the function only if HAVE_INLINE.
131167         * lib/unistr/u16-uctomb-aux.c: Renamed from lib/unistr/ucs4-utf16.c.
131168         Enable the function only if HAVE_INLINE.
131169         * modules/utf8-ucs4: Update.
131170         * modules/utf8-ucs4-unsafe: Update.
131171         * modules/utf16-ucs4: Update.
131172         * modules/utf16-ucs4-unsafe: Update.
131173         * modules/ucs4-utf8: Update.
131174         * modules/ucs4-utf16: Update.
131176 2007-03-24  Bruno Haible  <bruno@clisp.org>
131178         * lib/utf8-ucs4.h: Remove file.
131179         * lib/utf8-ucs4-unsafe.h: Remove file.
131180         * lib/utf16-ucs4.h: Remove file.
131181         * lib/utf16-ucs4-unsafe.h: Remove file.
131182         * lib/ucs4-utf8.h: Remove file.
131183         * lib/ucs4-utf16.h: Remove file.
131184         * lib/unistr.h: Include their previous contents.
131185         * m4/utf-ucs4.m4: Remove file.
131186         * m4/ucs4-utf.m4: Remove file.
131187         * modules/utf8-ucs4 (Files): Remove lib/utf8-ucs4.h.
131188         (Depends-on): Add unistr/base.
131189         (configure.ac): Remove gl_UTF_UCS4.
131190         (Makefile.am): Update.
131191         (Include): Change to unistr.h.
131192         * modules/utf8-ucs4-unsafe (Files): Remove lib/utf8-ucs4-unsafe.h.
131193         (Depends-on): Add unistr/base.
131194         (configure.ac): Remove gl_UTF_UCS4.
131195         (Makefile.am): Update.
131196         (Include): Change to unistr.h.
131197         * modules/utf16-ucs4 (Files): Remove lib/utf16-ucs4.h.
131198         (Depends-on): Add unistr/base.
131199         (configure.ac): Remove gl_UTF_UCS4.
131200         (Makefile.am): Update.
131201         (Include): Change to unistr.h.
131202         * modules/utf16-ucs4-unsafe (Files): Remove lib/utf16-ucs4-unsafe.h.
131203         (Depends-on): Add unistr/base.
131204         (configure.ac): Remove gl_UTF_UCS4.
131205         (Makefile.am): Update.
131206         (Include): Change to unistr.h.
131207         * modules/ucs4-utf8 (Files): Remove lib/ucs4-utf8.h.
131208         (Depends-on): Add unistr/base.
131209         (configure.ac): Remove gl_UCS4_UTF.
131210         (Makefile.am): Update.
131211         (Include): Change to unistr.h.
131212         * modules/ucs4-utf16 (Files): Remove lib/ucs4-utf16.h.
131213         (Depends-on): Add unistr/base.
131214         (configure.ac): Remove gl_UCS4_UTF.
131215         (Makefile.am): Update.
131216         (Include): Change to unistr.h.
131217         * lib/unistr/utf8-ucs4.c: Include unistr.h instead of utf8-ucs4.h.
131218         * lib/unistr/utf8-ucs4-unsafe.c: Include unistr.h instead of
131219         utf8-ucs4-unsafe.h.
131220         * lib/unistr/utf16-ucs4.c: Include unistr.h instead of utf16-ucs4.h.
131221         * lib/unistr/utf16-ucs4-unsafe.c: Include unistr.h instead of
131222         utf16-ucs4-unsafe.h.
131223         * lib/unistr/ucs4-utf8.c: Include unistr.h instead of ucs4-utf8.h.
131224         * lib/unistr/ucs4-utf16.c: Include unistr.h instead of ucs4-utf16.h.
131225         * lib/unistr/u8-chr.c: Don't include ucs4-utf8.h.
131226         * lib/unistr/u8-strchr.c: Likewise.
131227         * lib/unistr/u8-strrchr.c: Likewise.
131228         * lib/unistr/u16-chr.c: Don't include ucs4-utf16.h.
131229         * lib/unistr/u16-strchr.c: Likewise.
131230         * lib/unistr/u16-strrchr.c: Likewise.
131231         * lib/striconveh.c: Update.
131232         * lib/linebreak.c: Update.
131234 2007-03-24  Bruno Haible  <bruno@clisp.org>
131236         * lib/argp-help.c (fill_in_uparams, canon_doc_option): Cast the
131237         arguments of isspace, isalpha, isalnum, isdigit to 'unsigned char'.
131239 2007-03-22  Bruno Haible  <bruno@clisp.org>
131241         * lib/strptime.c (__strptime_internal): Use ANSI C syntax.
131243 2007-03-23  Paul Eggert  <eggert@cs.ucla.edu>
131245         * MODULES.html.sh (File system functions): New module write-any-file.
131246         * modules/write-any-file, lib/write-any-file.c, lib/write-any-file.h:
131247         * m4/write-any-file.m4: New files.
131249 2007-03-23  Eric Blake  <ebb9@byu.net>
131251         * gnulib-tool: Rearrange space-tab sequences, since some editors
131252         like to eat them.
131254 2007-03-23  Eric Blake  <ebb9@byu.net>
131256         * lib/version-etc.c (version_etc_va): Update license wording to
131257         be more concise.  Recommended by Richard Stallman.
131259 2007-03-22  Bruno Haible  <bruno@clisp.org>
131261         * lib/poll.c (MSG_PEEK): New fallback definition.
131263 2007-03-22  Bruno Haible  <bruno@clisp.org>
131265         * modules/sys_socket-tests (configure.ac): Check for shutdown function.
131266         * tests/test-sys_socket.c (a): Test only if shutdown() exists.
131267         (main): Update.
131268         Fixes a compilation error on BeOS.
131270 2007-03-22  Bruno Haible  <bruno@clisp.org>
131272         * modules/frexpl-tests: New file.
131273         * tests/test-frexpl.c: New file.
131275         * modules/frexpl: New file.
131276         * m4/frexpl.m4: New file.
131277         * modules/math (Makefile.am): Also substitute GNULIB_FREXPL into math.h.
131278         * lib/math_.h (frexpl): Test GNULIB_FREXPL instead of GNULIB_MATHL.
131279         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_FREXPL.
131280         * modules/mathl (Files): Remove lib/frexpl.c, lib/frexp.c.
131281         (Depends-on): Add frexpl. Remove isnanl-nolibm.
131282         * m4/mathl.m4 (gl_FUNC_LONG_DOUBLE_MATH): Don't test for frexpl.
131284 2007-03-22  Bruno Haible  <bruno@clisp.org>
131286         * lib/frexpl.c: Share code with lib/frexp.c.
131287         * modules/mathl (Files): Add lib/frexp.c.
131288         (Depends-on): Add isnanl-nolibm.
131290 2007-03-22  Bruno Haible  <bruno@clisp.org>
131292         * modules/printf-frexp (Files): Add m4/frexp.m4.
131293         * m4/printf-frexp.m4 (gl_FUNC_PRINTF_FREXP): Define HAVE_FREXP_IN_LIBC
131294         only if the found frexp function actually works.
131296 2007-03-22  Bruno Haible  <bruno@clisp.org>
131298         * lib/frexp.c: Remove older implementation that uses divisions.
131300 2007-03-21  Bruno Haible  <bruno@clisp.org>
131302         * modules/frexp-tests: New file.
131303         * tests/test-frexp.c: New file.
131305         * modules/frexp: New file.
131306         * lib/frexp.c: New file.
131307         * m4/frexp.m4: New file.
131308         * lib/math_.h (frexp): New declaration.
131309         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Also initialize GNULIB_FREXP and
131310         REPLACE_FREXP.
131311         * modules/math (math.h): Also substitute GNULIB_FREXP, REPLACE_FREXP.
131313 2007-03-21  Bruno Haible  <bruno@clisp.org>
131315         * modules/isnanl-tests: New file.
131316         * tests/test-isnanl.c: New file.
131318         * modules/isnanl: New file.
131319         * lib/isnanl.h: New file.
131320         * m4/isnanl.m4 (gl_FUNC_ISNANL): New macro.
131321         (gl_FUNC_ISNANL_NO_LIBM): Invoke gl_HAVE_ISNANL_NO_LIBM,
131322         gl_FUNC_ISNANL_WORKS.
131323         (gl_HAVE_ISNANL_NO_LIBM, gl_HAVE_ISNANL_IN_LIBM, gl_FUNC_ISNANL_WORKS):
131324         New macros.
131326 2007-03-21  Bruno Haible  <bruno@clisp.org>
131328         * modules/isnanl-nolibm (Files): Add lib/isnanl-nolibm.h, remove
131329         lib/isnanl.h.
131330         (Include): Update.
131331         * lib/isnanl-nolibm.h: Renamed from lib/isnanl.h.
131332         * lib/vasnprintf.c: Update.
131333         * modules/isnanl-nolibm-tests (Files): Add tests/test-isnanl-nolibm.c,
131334         tests/test-isnanl.h, remove tests/test-isnanl.c.
131335         (Makefile.am): Update.
131336         * tests/test-isnanl-nolibm.c: New file.
131337         * tests/test-isnanl.h: New file.
131338         * tests/test-isnanl.c: Remove file.
131340 2007-03-21  Jim Meyering  <jim@meyering.net>
131342         When trying to open ".", treat ESTALE like EACCES.
131343         * lib/savewd.c (savewd_save): Resort to forking not just upon
131344         failure with EACCES, but also when errno is ESTALE.
131346 2007-03-20  Bruno Haible  <bruno@clisp.org>
131348         * lib/string_.h (strndup): Enable declaration also if HAVE_STRNDUP.
131349         Needed on AIX 5.1. Reported by Matthew Woehlke.
131351 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
131353         Suggestions by Bruno Haible:
131354         * lib/acl-internal.h: Include "gettext.h" rather than rolling
131355         our own.
131356         (ACL_NOT_WELL_SUPPORTED): Parenthesize arg when used.
131357         * modules/acl (Depends-on): Add gettext.
131359 2007-03-19  Bruno Haible  <bruno@clisp.org>
131361         * modules/iconvme: Remove file.
131362         * lib/iconvme.h: Remove file.
131363         * lib/iconvme.c: Remove file.
131364         * m4/iconvme.m4: Remove file.
131366 2007-03-19  Bruno Haible  <bruno@clisp.org>
131368         * doc/relocatable-maint.texi: Break long shell script line.
131369         Suggested by Thien-Thi Nguyen <ttn@gnuvola.org>.
131371 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
131373         Add limited support for Solaris 10 ZFS-style ACLs: just enough to
131374         handle file_has_acl.
131375         * lib/acl-internal.h, lib/acl_entries.c, lib/file-has-acl.c: New files.
131376         * lib/acl.c: Move header inclusions and related macro defns into
131377         lib/acl-internal.h.
131378         (S_ISLNK): Remove defn, since that's now done for us.
131379         (file_has_acl): Move to lib/file-has-acl.c.
131380         Call acl_trivial if available.  This is the crucial part of the fix.
131381         (acl_entries): Move to lib/acl_entries.c.  Now extern, since it's
131382         shared within the library.  Rewrite a bit, partly to make it compatible
131383         with the GNU coding style.
131384         * m4/acl.m4 (AC_FUNC_ACL): Add AC_LIBOBJ([file-has-acl]).
131385         Remove unnecessary double-quotes.
131386         Don't test for acl_to_text; the build will catch that.
131387         Replace acl_entries if it doesn't exist and it is needed.
131388         Check for -lsec and acl_trivial (as used on Solaris 10).
131389         * modules/acl (Files): Add lib/acl-internal.h, lib/acl_entries.c,
131390         lib/file-has-acl.c.
131391         (Depends-on): Add sys_stat, for S_ISLNK.
131393 2007-03-19  Ben Pfaff  <blp@gnu.org>
131395         * doc/gnulib.texi: Fix typos.
131396         Suggested by Thien-Thi Nguyen <ttn@gnuvola.org>.
131398 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
131400         * lib/getcwd.c (__getcwd): Remove redundant comparison of buf to NULL.
131401         If size is zero here, buf must be zero.
131403 2007-03-19  Simon Josefsson  <simon@josefsson.org>
131405         * des.c: Remove weak_keys_chksum.  Reported by Bruno Haible
131406         <bruno@clisp.org>.
131408 2007-03-18  Bruno Haible  <bruno@clisp.org>
131410         * lib/vasnprintf.c (VASNPRINTF): Undo first part of last patch.
131411         Suggested by Eric Blake.
131413 2007-03-18  Ben Pfaff  <blp@gnu.org>
131415         * doc/relocatable.texi: Recommend using as prefix a directory
131416         that does not exist and will never be created.  Based on
131417         discussion with Bruno Haible, Ralf Wildenhues, Matthew Woehlke,
131418         and others.
131420 2007-03-17  Bruno Haible  <bruno@clisp.org>
131422         * lib/fchownat.c: Include lchown.h.
131424 2007-03-17  Bruno Haible  <bruno@clisp.org>
131426         Fix endless loop when the given allocated size was > INT_MAX.
131427         * lib/vasnprintf.c (EOVERFLOW): New fallback definition.
131428         (VASNPRINTF): Fail with EOVERFLOW when the given allocated size is
131429         larger than INT_MAX, or when it grow to a value larger than INT_MAX.
131430         * lib/vsprintf.c (vsprintf): Don't pass a size > INT_MAX to vasnprintf.
131431         * lib/sprintf.c (sprintf): Likewise.
131433 2007-03-17  Bruno Haible  <bruno@clisp.org>
131435         * tests/test-argp-2.sh (func_compare): Output a context diff.
131437 2007-03-17  Bruno Haible  <bruno@clisp.org>
131439         * m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): Check also the
131440         locale's decimal-point character.
131442 2007-03-17  Bruno Haible  <bruno@clisp.org>
131444         * lib/vasnprintf.c (VASNPRINTF): Clear out the memory used for arg_mem
131445         before comparing it. Needed because on some platforms (e.g. x86) a
131446         'long double' occupies less bytes than sizeof (long double).
131448 2007-03-17  Bruno Haible  <bruno@clisp.org>
131450         * tests/test-crc.c (main): Make printf statements 64-bit clean.
131451         * tests/test-gc-pbkdf2-sha1.c (main): Likewise.
131452         * tests/test-getaddrinfo.c (simple): Likewise.
131453         * tests/test-read-file.c (main): Likewise.
131455 2007-03-17  Bruno Haible  <bruno@clisp.org>
131457         * tests/test-dirname.c (main): Make printf statements 64-bit clean.
131459 2007-03-17  Bruno Haible  <bruno@clisp.org>
131461         * tests/test-xvasprintf.c (test_xvasprintf, test_xasprintf): Remove
131462         unused variable.
131464 2007-03-17  Bruno Haible  <bruno@clisp.org>
131466         * tests/test-c-strcasecmp.c: Include c-strcase.h.
131467         * tests/test-c-strncasecmp.c: Likewise.
131469 2007-03-17  Bruno Haible  <bruno@clisp.org>
131471         * modules/stdlib (Depends-on): Add unistd.
131472         * lib/stdlib_.h: Include <unistd.h> if mkstemp is desired.
131473         Needed for MacOS X 10.3.
131475 2007-03-17  Bruno Haible  <bruno@clisp.org>
131477         * lib/unistr/u-strdup.h: Include <stdlib.h>.
131479 2007-03-17  Bruno Haible  <bruno@clisp.org>
131481         * lib/unistr/u-cpy-alloc.h: Include <stdlib.h>.
131483 2007-03-17  Bruno Haible  <bruno@clisp.org>
131485         * gnulib-tool (func_import): Update .cvsignore and .gitignore files
131486         to reflect files copied from gnulib (with or without modifications).
131487         Suggested by Jim Meyering.
131489 2007-03-17  Eric Blake  <ebb9@byu.net>
131491         * NEWS: Document stdlib change from 2007-02-18.
131493 2007-03-17  Jim Meyering  <jim@meyering.net>
131495         Detect use of AC_CONFIG_AUX_DIR also when its argument is quoted.
131496         * build-aux/bootstrap: Put ""s around use of $build_aux, in case
131497         someone uses a name containing shell meta-characters.
131498         Reported by Alfred M. Szmidt.
131500         * build-aux/bootstrap: Don't use \> in grep regexp.  For HP-UX.
131502 2007-03-16  Alfred M. Szmidt  <ams@gnu.org>
131504         * build-aux/bootstrap (with_gettext): New variable.  Run autopoint
131505         and copy gettext configuration files only if configure.ac contains
131506         a use of AM_GNU_GETTEXT_VERSION.
131508 2007-03-16  Alfred M. Szmidt  <ams@gnu.org>
131510         * build-aux/bootstrap (gnulib_name): New variable.
131511         (gnulib_tool_options): Use it.
131513 2007-03-13  Simon Josefsson  <simon@josefsson.org>
131515         * tests/test-des.c: Use new namespace.
131517 2007-03-15  Bruno Haible  <bruno@clisp.org>
131519         * lib/dummy.c (gl_dummy_symbol): Renamed from 'dummy'.
131520         Reported by James Youngman <jay@gnu.org>.
131522 2007-03-15  Bruno Haible  <bruno@clisp.org>
131524         * lib/glob.c (glob): Add 'restrict' so that prototype matches the
131525         declared prototype. Needed with cc on OSF/1 5.1.
131527 2007-03-15  Bruno Haible  <bruno@clisp.org>
131529         * lib/gl_list.h (gl_listelement_dispose_fn): New type.
131530         (gl_list_create_empty, gl_list_create): Add dispose_fn argument.
131531         (struct gl_list_implementation): Add dispose_fn argument to the
131532         'create_empty', 'create' methods.
131533         (struct gl_list_impl_base): Add field 'dispose_fn'.
131534         * lib/gl_list.c (gl_list_create_empty, gl_list_create): Add dispose_fn
131535         argument.
131536         * lib/gl_array_list.c (gl_array_create_empty, gl_array_create): Add
131537         dispose_fn argument.
131538         (gl_array_remove_node, gl_array_remove_at, gl_array_list_free): Call
131539         dispose_fn on the dropped values.
131540         * lib/gl_carray_list.c (gl_carray_create_empty, gl_carray_create): Add
131541         dispose_fn argument.
131542         (gl_carray_remove_at, gl_carray_list_free): Call dispose_fn on the
131543         dropped values.
131544         * lib/gl_anyavltree_list2.h (gl_tree_create): Add dispose_fn argument.
131545         (gl_tree_remove_node): Call dispose_fn on the dropped value.
131546         * lib/gl_anyrbtree_list2.h (gl_tree_create): Add dispose_fn argument.
131547         (gl_tree_remove_node): Call dispose_fn on the dropped value.
131548         * lib/gl_anytree_list2.h (gl_tree_create_empty): Add dispose_fn
131549         argument.
131550         (gl_tree_list_free): Call dispose_fn on the dropped values.
131551         * lib/gl_anytreehash_list2.h (gl_tree_list_free): Call dispose_fn on
131552         the dropped values.
131553         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
131554         Add dispose_fn argument.
131555         (gl_linked_remove_node, gl_linked_remove_at, gl_linked_list_free):
131556         Call dispose_fn on the dropped values.
131557         * lib/gl_sublist.c (gl_sublist_create_empty, gl_sublist_create_fill):
131558         Add dispose_fn argument.
131559         (gl_sublist_create): Initialize the 'dispose_fn' field.
131560         * lib/clean-temp.c (create_temp_dir, register_fd): Update.
131561         * tests/test-array_list.c (main): Update.
131562         * tests/test-carray_list.c (main): Update.
131563         * tests/test-avltree_list.c (main): Update.
131564         * tests/test-rbtree_list.c (main): Update.
131565         * tests/test-avltreehash_list.c (main): Update.
131566         * tests/test-rbtreehash_list.c (main): Update.
131567         * tests/test-linked_list.c (main): Update.
131568         * tests/test-linkedhash_list.c (main): Update.
131569         * tests/test-array_oset.c (main): Update.
131571 2007-03-15  Bruno Haible  <bruno@clisp.org>
131573         * lib/gl_oset.h (gl_setelement_dispose_fn): New type.
131574         (gl_oset_create_empty): Add dispose_fn argument.
131575         (struct gl_oset_implementation): Add dispose_fn argument to
131576         'create_empty' method.
131577         (struct gl_oset_impl_base): Add dispose_fn field.
131578         * lib/gl_oset.c (gl_oset_create_empty): Add dispose_fn argument.
131579         * lib/gl_array_oset.c (gl_array_create_empty): Add dispose_fn argument.
131580         (gl_array_remove_at, gl_array_free): Call dispose_fn on the dropped
131581         values.
131582         * lib/gl_anytree_oset.h (gl_tree_create_empty): Add dispose_fn argument.
131583         (gl_tree_oset_free): Call dispose_fn on the dropped values.
131584         * lib/gl_avltree_oset.c (gl_tree_remove_node): Call dispose_fn on the
131585         dropped value.
131586         * lib/gl_rbtree_oset.c (gl_tree_remove_node): Call dispose_fn on the
131587         dropped value.
131588         * tests/test-array_oset.c (main): Update.
131589         * tests/test-avltree_oset.c (main): Update.
131590         * tests/test-rbtree_oset.c (main): Update.
131591         * lib/gl_anytreehash_list1.h (add_to_bucket): Update.
131593 2007-03-13  Bruno Haible  <bruno@clisp.org>
131595         * tests/test-stdbool.c (i): Update after last patch.
131597 2007-03-12  Bruno Haible  <bruno@clisp.org>
131599         * lib/quotearg.c: Include <wctype.h> early, before the definition of
131600         the iswprint macro. Needed on Solaris 2.5.1.
131602 2007-03-12  Bruno Haible  <bruno@clisp.org>
131604         * tests/test-printf-frexp.c (main): Declare x as volatile.
131606 2007-03-12  Simon Josefsson  <simon@josefsson.org>
131608         * doc/gnulib.texi (Build robot for gnulib): New section.
131610 2007-03-12  Jim Meyering  <jim@meyering.net>
131612         * build-aux/bootstrap: New file.
131613         * build-aux/bootstrap.conf: New file, from coreutils.
131615 2007-03-11  Bruno Haible  <bruno@clisp.org>
131617         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Require AC_C_INLINE.
131619 2007-03-12  Simon Josefsson  <simon@josefsson.org>
131621         * lib/des.h, lib/des.c, lib/gc-gnulib.c: Use gl_ namespace, to
131622         avoid collisions with 'des_setkey'.  Reported by Bruno Haible
131623         <bruno@clisp.org>.  Also change 'tripledes_' to '3des_'.
131625 2007-03-11  Bruno Haible  <bruno@clisp.org>
131627         * m4/locale-tr.m4 (gt_LOCALE_TR_UTF8): If the test program fails to
131628         compile, set LOCALE_TR_UTF8 to 'none' instead of empty.
131630 2007-03-11  Bruno Haible  <bruno@clisp.org>
131632         * lib/stdint_.h (INT64_MIN, INTMAX_MIN): Avoid using the ~INT..._MAX
131633         formula. Needed for SunPRO C 5.0.
131635 2007-03-11  Bruno Haible  <bruno@clisp.org>
131637         * modules/long-options (Depends-on): Add getopt.
131639 2007-03-11  Bruno Haible  <bruno@clisp.org>
131641         * modules/modechange (Depends-on): Add stdbool.
131643 2007-03-11  Bruno Haible  <bruno@clisp.org>
131645         * modules/i-ring (Depends-on): Add stdbool.
131647 2007-03-11  Bruno Haible  <bruno@clisp.org>
131649         * modules/gc-des (Depends-on): Add stdbool.
131651 2007-03-11  Bruno Haible  <bruno@clisp.org>
131653         * m4/mktime.m4 (gl_PREREQ_MKTIME): Require AC_C_INLINE.
131655 2007-03-11  Bruno Haible  <bruno@clisp.org>
131657         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Require AC_C_RESTRICT.
131659 2007-03-11  Bruno Haible  <bruno@clisp.org>
131661         * lib/unistr/u32-mbtouc-unsafe.c (u32_mbtouc_unsafe): Fix syntax error.
131663 2007-03-11  Bruno Haible  <bruno@clisp.org>
131665         * lib/vasnprintf.c (sprintf): Undefine.
131667 2007-03-11  Bruno Haible  <bruno@clisp.org>
131669         * lib/isnan.c (rpl_isnan, rpl_isnanl): Work around bug regarding
131670         initializers in SunPRO C and Compaq C compilers.
131672 2007-03-11  Bruno Haible  <bruno@clisp.org>
131674         * lib/gl_array_oset.c (gl_array_iterator_next): Make pointer
131675         decrementing code ANSI C compliant.
131677 2007-03-11  Bruno Haible  <bruno@clisp.org>
131679         * lib/dummy.c [__sun]: Define a dummy variable, not just a typedef.
131680         Needed for Solaris 2.5.1 ranlib and SunPRO C 5.0.
131682 2007-03-11  Bruno Haible  <bruno@clisp.org>
131684         * tests/test-stdbool.c (s, d, e, xlcbug): Disable checks that gnulib's
131685         <stdbool.h> substitute doesn't pass.
131687 2007-03-11  Bruno Haible  <bruno@clisp.org>
131689         * lib/vasnprintf.c (snprintf): Undefine. Avoids an endless recursion.
131691 2007-03-11  Bruno Haible  <bruno@clisp.org>
131693         * gnulib-tool (func_create_megatestdir): Create also an autobuild
131694         script, for submission to autobuild.josefsson.org.
131696 2007-03-10  Bruno Haible  <bruno@clisp.org>
131698         * modules/canonicalize-lgpl-tests: New file.
131699         * tests/test-canonicalize-lgpl.sh: New file.
131700         * tests/test-canonicalize-lgpl.c: New file.
131702         * modules/c-strcase-tests: New file.
131703         * tests/test-c-strcase.sh: New file.
131704         * tests/test-c-strcasecmp.c: New file.
131705         * tests/test-c-strncasecmp.c: New file.
131707         * modules/atexit-tests: New file.
131708         * tests/test-atexit.sh: New file.
131709         * tests/test-atexit.c: New file.
131711 2007-03-10  Bruno Haible  <bruno@clisp.org>
131713         * tests/test-binary-io.sh: Use temporary filenames that are not so
131714         likely to clash with those of other tests (in a parallel make).
131715         * tests/test-binary-io.c: Likewise.
131717 2007-03-10  Bruno Haible  <bruno@clisp.org>
131719         * lib/fseterr.c (fseterr): Port to Solaris/SPARC64. Deactivate the
131720         fallback; use #error instead.
131721         Suggested by Simon Josefsson.
131723 2007-03-10  Bruno Haible  <bruno@clisp.org>
131725         * gnulib-tool (func_create_testdir): Treat MOSTLYCLEANFILES like
131726         CLEANFILES. Put spaces in each line of $cleaned_files, not only the
131727         first and the last.
131729 2007-03-10  Bruno Haible  <bruno@clisp.org>
131731         * lib/stdint_.h (uint_least64_t): Fix typo in last patch.
131733 2007-03-10  Bruno Haible  <bruno@clisp.org>
131735         * modules/snprintf-posix-tests (EXTRA_DIST): New variable. Needed for
131736         "make distcheck".
131737         * modules/sprintf-posix-tests (EXTRA_DIST): Likewise.
131738         * modules/vsnprintf-posix-tests (EXTRA_DIST): Likewise.
131739         * modules/vsprintf-posix-tests (EXTRA_DIST): Likewise.
131741 2007-03-10  Bruno Haible  <bruno@clisp.org>
131743         * modules/allocsa-tests (test_allocsa_SOURCES): Remove redundant
131744         variable.
131745         * modules/dirname-tests (test_dirname_SOURCES): Remove redundant
131746         variable.
131748 2007-03-09  Eric Blake  <ebb9@byu.net>
131749         and Matthew Woehlke  <mw_triad@users.sourceforge.net>  (tiny change)
131751         * lib/stdint_.h (int64_t, uint64_t): Don't undefine if 64-bit
131752         types are not being provided by gnulib.
131753         (GL_INT64_T, GL_UINT64_T): New witnesses of whether gnulib 64-bit
131754         types are supported.
131756 2007-03-10  Bruno Haible  <bruno@clisp.org>
131758         * lib/stdio_.h (__attribute__): New macro.
131759         (fprintf, vfprintf, printf, vprintf, snprintf, vsnprintf, sprintf,
131760         vsprintf): Specify __attribute__ __format__ for GCC.
131761         Suggested by Eric Blake.
131763 2007-03-09  Bruno Haible  <bruno@clisp.org>
131765         * modules/printf-posix-tests: New file.
131766         * tests/test-printf-posix.sh: New file.
131767         * tests/test-printf-posix.c: New file.
131769         * modules/printf-posix: New file.
131770         * lib/printf.c: New file.
131771         * m4/printf-posix-rpl.m4: New file.
131772         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_PRINTF_POSIX,
131773         REPLACE_PRINTF.
131774         * lib/stdio_.h (printf): New declaration.
131775         (format, __format__, ____printf____, ____scanf____, ____strftime____,
131776         ____strfmon____): New macros.
131777         * modules/stdio (Makefile.am): Substitute also GNULIB_PRINTF_POSIX,
131778         REPLACE_PRINTF.
131780 2007-03-09  Bruno Haible  <bruno@clisp.org>
131782         * tests/test-vasnprintf-posix2.sh: New file.
131783         * tests/test-vasnprintf-posix2.c: New file.
131784         * modules/vasnprintf-posix-tests (Files): Add them and m4/locale-fr.m4.
131785         (configure.ac): Invoke gt_LOCALE_FR and gt_LOCALE_FR_UTF8.
131786         (Makefile.am): Activate test-vasnprintf-posix2.sh.
131788         * lib/vasnprintf.c (VASNPRINTF): For the 'a' and 'A' directives, use
131789         a locale dependent decimal point, rather than always '.'.
131791 2007-03-09  Eric Blake  <ebb9@byu.net>
131793         * lib/stdlib_.h (EXIT_FAILURE): GNU code expects this to be 1, in
131794         spite of platforms like Tandem/NSK that define it to -1.
131796 2007-03-08  Bruno Haible  <bruno@clisp.org>
131798         * modules/vprintf-posix-tests: New file.
131799         * tests/test-vprintf-posix.sh: New file.
131800         * tests/test-vprintf-posix.c: New file.
131801         * tests/test-printf-posix.h: New file.
131803         * modules/vprintf-posix: New file.
131804         * lib/vprintf.c: New file.
131805         * m4/vprintf-posix.m4: New file.
131806         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VPRINTF_POSIX,
131807         REPLACE_VPRINTF.
131808         * lib/stdio_.h (vprintf): New declaration.
131809         * modules/stdio (Makefile.am): Substitute also GNULIB_VPRINTF_POSIX,
131810         REPLACE_VPRINTF.
131812 2007-03-08  Bruno Haible  <bruno@clisp.org>
131814         * modules/fprintf-posix-tests: New file.
131815         * tests/test-fprintf-posix.sh: New file.
131816         * tests/test-fprintf-posix.c: New file.
131818         * modules/fprintf-posix: New file.
131819         * lib/fprintf.c: New file.
131820         * m4/fprintf-posix.m4: New file.
131821         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FPRINTF_POSIX,
131822         REPLACE_FPRINTF.
131823         * lib/stdio_.h (fprintf): New declaration.
131824         * modules/stdio (Makefile.am): Substitute also GNULIB_FPRINTF_POSIX,
131825         REPLACE_FPRINTF.
131827 2007-03-08  Bruno Haible  <bruno@clisp.org>
131829         * modules/vfprintf-posix-tests: New file.
131830         * tests/test-vfprintf-posix.sh: New file.
131831         * tests/test-vfprintf-posix.c: New file.
131832         * tests/test-fprintf-posix.h: New file.
131833         * tests/test-fprintf-posix.out: New file.
131835         * modules/vfprintf-posix: New file.
131836         * lib/vfprintf.c: New file.
131837         * m4/vfprintf-posix.m4: New file.
131838         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VFPRINTF_POSIX,
131839         REPLACE_VFPRINTF.
131840         * lib/stdio_.h (vfprintf): New declaration.
131841         * modules/stdio (Makefile.am): Substitute also GNULIB_VFPRINTF_POSIX,
131842         REPLACE_VFPRINTF.
131844 2007-03-08  Bruno Haible  <bruno@clisp.org>
131846         * lib/stdio_.h: Treat __need___FILE like __need_FILE.
131848 2007-03-08  Bruno Haible  <bruno@clisp.org>
131850         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Use 'case' statements
131851         instead of 'expr' invocations.
131852         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
131853         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
131854         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
131855         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
131856         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
131857         Suggested by Paul Eggert.
131859 2007-03-08  Bruno Haible  <bruno@clisp.org>
131861         * modules/fseterr-tests: New file.
131862         * tests/test-fseterr.c: New file.
131864         * modules/fseterr: New file.
131865         * lib/fseterr.h: New file.
131866         * lib/fseterr.c: New file.
131868 2007-03-08  Bruno Haible  <bruno@clisp.org>
131870         * lib/fnmatch_.h: Convert tabs in the middle of lines to spaces.
131871         * lib/getopt_.h: Likewise.
131872         * lib/mbswidth.h: Likewise.
131873         * lib/setenv.h: Likewise.
131874         * lib/vasnprintf.h: Likewise.
131875         * lib/vasprintf.h: Likewise.
131876         * lib/verror.h: Likewise.
131877         * lib/xsetenv.h: Likewise.
131878         * lib/xvasprintf.h: Likewise.
131880 2007-03-08  Jim Meyering  <jim@meyering.net>
131882         * users.txt: Add parted.
131884         * ChangeLog: Restore 1500 lines mistakenly removed from the end.
131886 2007-03-07  Bruno Haible  <bruno@clisp.org>
131888         * m4/printf.m4: Make the shell script snippets copy&pastable.
131890 2007-03-02  Bruno Haible  <bruno@clisp.org>
131892         * lib/netinet_in_.h: New file.
131893         * m4/netinet_in_h.m4 (gl_HEADER_NETINET_IN): Test whether netinet/in.h
131894         is self-contained. Set ABSOLUTE_NETINET_IN_H, HAVE_NETINET_IN_H.
131895         * modules/netinet_in (Files): Add lib/netinet_in_.h.
131896         (Depends-on): Add absolute-header.
131897         (Makefile.am): Substitute ABSOLUTE_NETINET_IN_H, HAVE_NETINET_IN_H
131898         into netinet/in.h.
131900 2007-03-03  Bruno Haible  <bruno@clisp.org>
131902         * lib/sys_select_.h: New file.
131903         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SELECT): Test whether sys/select.h
131904         is self-contained. Set ABSOLUTE_SYS_SELECT_H, HAVE_SYS_SELECT_H.
131905         * modules/sys_select (Files): Add lib/sys_select_.h.
131906         (Depends-on): Add absolute-header.
131907         (Makefile.am): Substitute ABSOLUTE_SYS_SELECT_H, HAVE_SYS_SELECT_H
131908         into sys/select.h.
131910 2007-03-02  Bruno Haible  <bruno@clisp.org>
131912         * lib/socket_.h: If sys/socket.h exists, include that and <sys/types.h>
131913         before it. Turn HAVE_WINSOCK2_H and HAVE_WS2TCPIP_H into configute-time
131914         values.
131915         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Test also whether
131916         <sys/socket.h> is self-contained. Set ABSOLUTE_SYS_SOCKET_H,
131917         HAVE_SYS_SOCKET_H, HAVE_WINSOCK2_H, HAVE_WS2TCPIP_H.
131918         * modules/sys_socket (Depends-on): Add absolute-header.
131919         (Makefile.am): Substitute ABSOLUTE_SYS_SOCKET_H, HAVE_SYS_SOCKET_H,
131920         HAVE_WINSOCK2_H, HAVE_WS2TCPIP_H into sys/socket.h.
131921         (Include): Remove requirement of inclusion of <sys/types.h>.
131923 2007-03-02  Bruno Haible  <bruno@clisp.org>
131925         * lib/byteswap_.h (bswap_32): Fix formula.
131927 2007-03-06  Bruno Haible  <bruno@clisp.org>
131929         * modules/sprintf-posix-tests: New file.
131930         * tests/test-sprintf-posix.c: New file.
131932         * modules/sprintf-posix: New file.
131933         * lib/sprintf.c: New file.
131934         * m4/sprintf-posix.m4: New file.
131935         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_SPRINTF_POSIX,
131936         REPLACE_SPRINTF.
131937         * lib/stdio_.h (sprintf): New declaration.
131938         * modules/stdio (Makefile.am): Substitute also GNULIB_SPRINTF_POSIX,
131939         REPLACE_SPRINTF.
131941 2007-03-06  Bruno Haible  <bruno@clisp.org>
131943         * modules/vsprintf-posix-tests: New file.
131944         * tests/test-vsprintf-posix.c: New file.
131945         * tests/test-sprintf-posix.h: New file.
131947         * modules/vsprintf-posix: New file.
131948         * lib/vsprintf.c: New file.
131949         * m4/vsprintf-posix.m4: New file.
131950         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VSPRINTF_POSIX,
131951         REPLACE_VSPRINTF.
131952         * lib/stdio_.h (vsprintf): New declaration.
131953         * modules/stdio (Makefile.am): Substitute also GNULIB_VSPRINTF_POSIX,
131954         REPLACE_VSPRINTF.
131956 2007-03-06  Bruno Haible  <bruno@clisp.org>
131958         * modules/vsnprintf (Depend-on): Remove minmax.
131960 2007-03-06  Bruno Haible  <bruno@clisp.org>
131962         * modules/snprintf-posix-tests: New file.
131963         * tests/test-snprintf-posix.c: New file.
131965         * modules/snprintf-posix: New file.
131966         * m4/snprintf-posix.m4: New file.
131967         * m4/snprintf.m4 (gl_REPLACE_SNPRINTF): New macro, extracted from
131968         gl_FUNC_SNPRINTF.
131969         (gl_FUNC_SNPRINTF): Invoke it.
131970         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also REPLACE_SNPRINTF.
131971         * lib/stdio_.h (snprintf): Define as a replacement if REPLACE_SNPRINTF
131972         is set.
131973         * modules/stdio (Makefile.am): Substitute also REPLACE_SNPRINTF.
131975 2007-03-06  Bruno Haible  <bruno@clisp.org>
131977         * modules/vsnprintf-posix-tests: New file.
131978         * tests/test-vsnprintf-posix.c: New file.
131979         * tests/test-snprintf-posix.h: New file.
131981         * modules/vsnprintf-posix: New file.
131982         * m4/vsnprintf-posix.m4: New file.
131983         * m4/vsnprintf.m4 (gl_REPLACE_VSNPRINTF): New macro, extracted from
131984         gl_FUNC_VSNPRINTF.
131985         (gl_FUNC_VSNPRINTF): Invoke it.
131986         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also REPLACE_VSNPRINTF.
131987         * lib/stdio_.h (vsnprintf): Define as a replacement if
131988         REPLACE_VSNPRINTF is set.
131989         * modules/stdio (Makefile.am): Substitute also REPLACE_VSNPRINTF.
131991 2007-03-06  Bruno Haible  <bruno@clisp.org>
131993         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): Test for vasnprintf here.
131994         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): ... not here.
131996 2007-03-06  Bruno Haible  <bruno@clisp.org>
131998         * lib/math_.h (acosl): Declare also if HAVE_DECL_ACOSL is set.
131999         (asinl): Declare also if HAVE_DECL_ASINL is set.
132000         (atanl): Declare also if HAVE_DECL_ATANL is set.
132001         (ceill): Declare also if HAVE_DECL_CEILL is set.
132002         (cosl): Declare also if HAVE_DECL_COSL is set.
132003         (expl): Declare also if HAVE_DECL_EXPL is set.
132004         (floorl): Declare also if HAVE_DECL_FLOORL is set.
132005         (frexpl): Declare also if HAVE_DECL_FREXPL is set.
132006         (ldexpl): Declare also if HAVE_DECL_LDEXPL is set.
132007         (logl): Declare also if HAVE_DECL_LOGL is set.
132008         (sinl): Declare also if HAVE_DECL_SINL is set.
132009         (sqrtl): Declare also if HAVE_DECL_SQRTL is set.
132010         (tanl): Declare also if HAVE_DECL_TANL is set.
132011         * modules/math (Makefile.am): Substitute the values of HAVE_DECL_*.
132012         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Set HAVE_DECL_* to 1.
132013         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Fix tests for the
132014         declaration of frexpl, ldexpl.
132015         * modules/printf-frexpl (Depends-on): Add math.
132016         * lib/printf-frexp.c (frexpl, ldexpl): Undo last change.
132018 2007-03-05  Bruno Haible  <bruno@clisp.org>
132020         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Also test whether
132021         frexpl and ldexpl are declared.
132022         * lib/printf-frexp.c (frexpl, ldexpl): Provide fallback declarations.
132024 2007-03-05  Bruno Haible  <bruno@clisp.org>
132026         * gnulib-tool (func_get_automake_snippet): Don't synthesize an
132027         EXTRA_lib_SOURCES augmentation for the relocatable-prog-wrapper module.
132029 2007-03-05  Bruno Haible  <bruno@clisp.org>
132031         * lib/stdio_.h: Include <stddef.h>.
132033 2007-03-05  Bruno Haible  <bruno@clisp.org>
132035         * m4/printf.m4 (gl_SNPRINTF_DIRECTIVE_N): New macro.
132037 2007-03-05  Bruno Haible  <bruno@clisp.org>
132039         * m4/printf.m4: Update with info about OpenBSD 3.9, HP-UX 10.20,
132040         NetBSD 4, from Ralf Wildenhues.
132042 2007-03-04  Bruno Haible  <bruno@clisp.org>
132044         * lib/vasprintf.h: Update #if logic for the case when the functions
132045         exist but are overridden.
132047 2007-03-04  Bruno Haible  <bruno@clisp.org>
132049         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Exclude two buggy
132050         implementations: glibc-2.4 and MacOS X 10.3.
132051         * tests/test-vasnprintf-posix.c (test_function): Test also the case
132052         that exhibits the bugs in glibc-2.4 and MacOS X 10.3.
132053         * tests/test-vasprintf-posix.c (test_function): Likewise.
132055 2007-03-04  Bruno Haible  <bruno@clisp.org>
132057         * modules/vasprintf-posix-tests: New file.
132058         * tests/test-vasprintf-posix.c: New file.
132060         * modules/vasprintf-posix: New file.
132061         * lib/vasprintf.h (asprintf, vasprintf): Rename if REPLACE_VASPRINTF is
132062         defined.
132063         * m4/vasprintf-posix.m4: New file.
132064         * m4/vasprintf.m4 (gl_REPLACE_VASPRINTF): New macro, extracted from
132065         gl_FUNC_VASPRINTF.
132066         (gl_FUNC_VASPRINTF): Invoke it.
132067         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): Define REPLACE_VASNPRINTF
132068         here.
132069         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Not here.
132071 2007-03-04  Bruno Haible  <bruno@clisp.org>
132073         * lib/sys_time_.h: Rename GETTIMEOFDAY_REPLACEMENT to
132074         REPLACE_GETTIMEOFDAY.
132075         * modules/sys_time (Makefile.am): Likewise.
132076         * m4/sys_time_h.m4: Likewise.
132077         * m4/gettimeofday.m4: Likewise.
132079 2007-03-04  Bruno Haible  <bruno@clisp.org>
132081         * modules/vasnprintf-posix-tests: New file.
132082         * tests/test-vasnprintf-posix.c: New file.
132084         * modules/vasnprintf-posix: New file.
132085         * lib/vasnprintf.c: Include isnan.h, isnanl.h, printf-frexp.h,
132086         printf-frexpl.h.
132087         (VASNPRINTF): Handle the 'a' and 'A' directives here, if needed.
132088         * lib/vasnprintf.h (asnprintf, vasnprintf): Rename if
132089         REPLACE_VASNPRINTF is defined.
132090         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): New macro, extracted from
132091         gl_FUNC_VASNPRINTF.
132092         (gl_FUNC_VASNPRINTF): Invoke it.
132093         * m4/vasnprintf-posix.m4: New file.
132094         * m4/printf.m4: New file.
132096 2007-03-04  Bruno Haible  <bruno@clisp.org>
132098         Compile progreloc.c only if --enable-relocatable is specified.
132099         * m4/relocatable.m4 (gl_RELOCATABLE): Arrange to compile progreloc.c
132100         if --enable-relocatable was specified.
132101         * modules/relocatable-prog (Makefile.am): Remove progreloc.c from
132102         lib_SOURCES.
132104 2007-03-04  Jim Meyering  <jim@meyering.net>
132106         * lib/acl.c (ACL_NOT_WELL_SUPPORTED): New macro.
132107         Use it consistently, rather than enumerating errno constants.
132109 2007-03-04  Bruno Haible  <bruno@clisp.org>
132111         * modules/xvasprintf-tests: New file.
132112         * tests/test-xvasprintf.c: New file.
132114         * modules/vasprintf-tests: New file.
132115         * tests/test-vasprintf.c: New file.
132117         * modules/vasnprintf-tests: New file.
132118         * tests/test-vasnprintf.c: New file.
132120         * modules/vsnprintf-tests: New file.
132121         * tests/test-vsnprintf.c: New file.
132123         * modules/snprintf-tests: New file.
132124         * tests/test-snprintf.c: New file.
132126 2007-03-04  Bruno Haible  <bruno@clisp.org>
132128         Compile relocatable.c only if --enable-relocatable is specified.
132129         * m4/relocatable-lib.m4 (gl_RELOCATABLE_LIBRARY_BODY): Renamed from
132130         gl_RELOCATABLE_LIBRARY.
132131         (gl_RELOCATABLE_LIBRARY, gl_RELOCATABLE_LIBRARY_SEPARATE): New macros.
132132         * m4/relocatable.m4 (gl_RELOCATABLE): Invoke gl_RELOCATABLE_LIBRARY.
132133         (gl_RELOCATABLE_BODY): Require gl_RELOCATABLE_LIBRARY_BODY instead of
132134         gl_RELOCATABLE_LIBRARY.
132135         * modules/relocatable-lib (configure.ac): Invoke gl_RELOCATABLE_LIBRARY.
132136         (Makefile.am): Remove lib_SOURCES.
132137         * modules/relocatable-lib-lgpl (configure.ac): Invoke
132138         gl_RELOCATABLE_LIBRARY.
132139         (Makefile.am): Remove lib_SOURCES.
132140         * modules/relocatable-prog (Makefile.am): Don't compile relocatable.c
132141         always.
132142         * modules/relocatable-prog-wrapper (configure.ac): Invoke
132143         gl_RELOCATABLE_LIBRARY_SEPARATE instead of gl_RELOCATABLE_LIBRARY.
132145 2007-03-04  Bruno Haible  <bruno@clisp.org>
132147         * modules/argmatch-tests: New file.
132148         * tests/test-argmatch.c: New file.
132150         * tests/test-allocsa.c (main): Halve the number of loop runs.
132152         * modules/alloca-opt-tests: New file.
132153         * tests/test-alloca-opt.c: New file.
132155 2007-03-04  Jim Meyering  <jim@meyering.net>
132157         Work around difference between Linux ACLs and Solaris 10 ZFS.
132158         * lib/acl.c (set_acl): Revert to using chmod_or_fchmod also
132159         for EINVAL.
132161 2007-03-03  Bruno Haible  <bruno@clisp.org>
132163         * modules/relocatable-prog (Depends-on): Add back progreloc's
132164         dependencies: canonicalize-lgpl, xalloc, xreadlink, stdbool, unistd.
132166 2007-03-03  Bruno Haible  <bruno@clisp.org>
132168         * modules/relocatable-lib-lgpl: Renamed from modules/relocatable-lib.
132169         * modules/relocatable-lib: New file.
132171 2007-03-03  Bruno Haible  <bruno@clisp.org>
132173         * modules/relocatable-prog: Renamed from modules/relocatable.
132174         * doc/relocatable-maint.texi: Talk about module 'relocatable-prog'.
132176 2007-03-03  Bruno Haible  <bruno@clisp.org>
132178         * modules/relocatable-script (Files): Add doc/relocatable.texi,
132179         m4/relocatable-lib.m4.
132180         (Depends-on): Remove 'relocatable'.
132181         (configure.ac): Add gl_RELOCATABLE_NOP.
132183 2007-03-03  Bruno Haible  <bruno@clisp.org>
132185         * modules/relocatable-prog-wrapper: New file.
132186         * modules/relocatable (Depends-on): Add it. Remove all other
132187         dependencies except progname.
132188         (Files): Remove build-aux/install-reloc, lib/relocwrapper.c.
132190         * m4/strerror.m4 (gl_FUNC_STRERROR_SEPARATE): New macro.
132191         (gl_FUNC_STRERROR): Nop.
132192         * lib/strerror.c: Compile the file only if !HAVE_STRERROR.
132194         * m4/setenv.m4 (gl_FUNC_SETENV_SEPARATE): New macro.
132195         * lib/setenv.c: Compile the file only if _LIBC || !HAVE_SETENV.
132197         * m4/readlink.m4 (gl_FUNC_READLINK_SEPARATE): New macro.
132198         (gl_FUNC_READLINK): Update.
132200         * m4/canonicalize-lgpl.m4 (gl_CANONICALIZE_LGPL_SEPARATE): New macro.
132202 2007-03-03  Bruno Haible  <bruno@clisp.org>
132204         * lib/xreadlink.c: Include <unistd.h> unconditionally.
132205         * modules/xreadlink (Depends-on): Add unistd.
132206         * modules/xreadlink-with-size (Depends-on): Likewise.
132208 2007-03-03  Bruno Haible  <bruno@clisp.org>
132210         * m4/setenv.m4 (gl_FUNC_SETENV, gl_FUNC_UNSETENV): New macros,
132211         extracted from gt_FUNC_SETENV.
132212         (gt_FUNC_SETENV): Remove macro.
132213         * modules/setenv (configure.ac): Add gl_FUNC_SETENV, gl_FUNC_UNSETENV,
132214         remove gt_FUNC_SETENV.
132216 2007-03-03  Bruno Haible  <bruno@clisp.org>
132218         * m4/relocatable-lib.m4 (gl_RELOCATABLE_LIBRARY): Define
132219         ENABLE_RELOCATABLE here.
132220         * m4/relocatable.m4 (gl_RELOCATABLE_BODY): Don't define it here.
132222 2007-03-03  Bruno Haible  <bruno@clisp.org>
132224         * modules/rbtreehash-list-tests (Depends-on): Add progname.
132225         * tests/test-rbtreehash_list.c: Include progname.h.
132226         (main): Call set_program_name.
132228         * modules/rbtree-oset-tests (Depends-on): Add progname.
132229         * tests/test-rbtree_oset.c: Include progname.h.
132230         (main): Call set_program_name.
132232         * modules/rbtree-list-tests (Depends-on): Add progname.
132233         * tests/test-rbtree_list.c: Include progname.h.
132234         (main): Call set_program_name.
132236         * modules/linked-list-tests (Depends-on): Add progname.
132237         * tests/test-linked_list.c: Include progname.h.
132238         (main): Call set_program_name.
132240 2007-03-03  Bruno Haible  <bruno@clisp.org>
132242         * lib/glob-libc.h (_Restrict_): New macro, copied from lib/regex.h.
132243         All uses of __restrict changed to _Restrict_.
132244         * lib/glob_.h (__restrict): Remove macro.
132246 2007-03-02  Bruno Haible  <bruno@clisp.org>
132248         * modules/gettext (configure.ac): Require gettext infrastructure
132249         from version 0.16.1.
132251 2007-03-02  Bruno Haible  <bruno@clisp.org>
132253         * modules/linkedhash-list-tests (Depends-on): Add progname.
132254         * tests/test-linkedhash_list.c: Include progname.h.
132255         (main): Call set_program_name.
132257         * modules/carray-list-tests (Depends-on): Add progname.
132258         * tests/test-carray_list.c: Include progname.h.
132259         (main): Call set_program_name.
132261         * modules/avltreehash-list-tests (Depends-on): Add progname.
132262         * tests/test-avltreehash_list.c: Include progname.h.
132263         (main): Call set_program_name.
132265         * modules/avltree-oset-tests (Depends-on): Add progname.
132266         * tests/test-avltree_oset.c: Include progname.h.
132267         (main): Call set_program_name.
132269         * modules/avltree-list-tests (Depends-on): Add progname.
132270         * tests/test-avltree_list.c: Include progname.h.
132271         (main): Call set_program_name.
132273         * modules/array-oset-tests (Depends-on): Add progname.
132274         * tests/test-array_oset.c: Include progname.h.
132275         (main): Call set_program_name.
132277         * modules/array-list-tests (Depends-on): Add progname.
132278         * tests/test-array_list.c: Include progname.h.
132279         (main): Call set_program_name.
132281         * modules/argp-tests (Depends-on): Add progname.
132282         * tests/test-argp.c: Include argp.h first. Include progname.h.
132283         (main): Call set_program_name.
132285 2007-03-02  Paul Eggert  <eggert@cs.ucla.edu>
132287         * doc/gnulib-tool.texi (Initial import): Reword description of
132288         _FILE_OFFSET_BITS and _GNU_SOURCE, since they sometimes have a
132289         limited effect even if defined after the first system include.
132291 2007-03-01  Bruno Haible  <bruno@clisp.org>
132293         * build-aux/config.libpath: Update to libtool-1.5.22.
132294         Reported by Albert Chin <bug-gnulib@mlists.thewrittenword.com>.
132296 2007-03-01  Bruno Haible  <bruno@clisp.org>
132298         * doc/relocatable-maint.texi: Recommend to set foo_CPPFLAGS, not
132299         foo_CFLAGS.
132300         Reported by Ralf Wildenhues.
132302 2007-03-01  Bruno Haible  <bruno@clisp.org>
132304         * build-aux/install-reloc: Remove object files left over by some
132305         compilers.
132306         Reported by Ralf Wildenhues.
132308 2007-03-01  Bruno Haible  <bruno@clisp.org>
132310         * build-aux/install-reloc: Break long lines.
132312 2007-03-01  Bruno Haible  <bruno@clisp.org>
132314         * doc/relocatable.texi: Document that it may not work on OpenBSD.
132315         Reported by Ralf Wildenhues.
132317 2007-03-01  Bruno Haible  <bruno@clisp.org>
132319         * doc/gnulib-tool.texi (Initial import): Remove paragraph about
132320         include ordering constraints.
132322 2007-03-01  Paul Eggert  <eggert@cs.ucla.edu>
132324         Followup to the 2007-02-12 patch, using suggestions from Bruno Haible in
132325         <http://lists.gnu.org/r/bug-gnulib/2007-02/msg00136.html>.
132326         * doc/gnulib-tool.texi (Initial import): Mention _FILE_OFFSET_BITS
132327         as another example.
132328         * lib/time_.h: Fix misspelling.
132329         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
132330         Require gl_HEADER_TIME_H_DEFAULTS.
132331         * m4/strptime.m4 (gl_FUNC_STRPTIME): Likewise.
132332         * m4/time_r.m4 (gl_TIME_R): Likewise.
132333         * m4/timegm.m4 (gl_FUNC_TIMEGM): Likewise.
132335 2007-03-01  Bruno Haible  <bruno@clisp.org>
132337         * m4/utimecmp.m4 (gl_UTIMECMP): Don't require gl_TIMESPEC.
132338         * m4/utimens.m4 (gl_UTIMENS): Likewise.
132340 2007-03-01  Jim Meyering  <jim@meyering.net>
132342         * modules/xreadlink (Maintainer): Add my name.
132343         * modules/xreadlink-with-size (Depends-on): Alphabetize.
132345 2007-02-26  Ben Pfaff  <blp@cs.stanford.edu>
132346             Bruno Haible  <bruno@clisp.org>
132348         * build-aux/install-reloc: Compile also c-ctype.c.
132349         * build-aux/relocatable.sh.in: New file.
132350         * doc/relocatable.texi: New file.
132351         * doc/relocatable-maint.texi: New file.
132352         * doc/gnulib.texi: Include relocatable-maint.texi.
132353         * lib/progreloc.c: Include unistd.h unconditionally.
132354         * lib/relocwrapper.c: Include unistd.h unconditionally.
132355         Include c-ctype.h.
132356         (add_dotbin): Use c_tolower.
132357         * m4/relocatable-lib.m4: New file, extracted from m4/relocatable.m4.
132358         (gl_RELOCATABLE_LIBRARY): Renamed from AC_RELOCATABLE_LIBRARY.
132359         (gl_RELOCATABLE_NOP): Renamed from AC_RELOCATABLE_NOP.
132360         * m4/relocatable.m4 (AC_RELOCATABLE_LIBRARY, AC_RELOCATABLE_NOP): Move
132361         to m4/relocatable-lib.m4.
132362         (gl_RELOCATABLE): Renamed from AC_RELOCATABLE. Set also
132363         RELOCATABLE_CONFIG_H_DIR, RELOCATABLE_SRC_DIR, RELOCATABLE_BUILD_DIR.
132364         (gl_RELOCATABLE_BODY): Renamed from AC_RELOCATABLE_BODY. Don't
132365         require obsolete macro AC_EXEEXT. Don't check for unistd.h. Don't set
132366         SET_RELOCATABLE. Instead set RELOCATABLE_LDFLAGS, INSTALL_PROGRAM_ENV.
132367         * modules/relocatable: New file.
132368         * modules/relocatable-lib: New file.
132369         * modules/relocatable-script: New file.
132371 2007-02-28  Bruno Haible  <bruno@clisp.org>
132373         Import --enable-relocatable infrastructure.
132374         * build-aux/config.libpath: New file, from GNU gettext.
132375         * build-aux/install-reloc: New file, from GNU gettext.
132376         * build-aux/reloc-ldflags: New file, from GNU gettext.
132377         * lib/relocatable.h: New file, from GNU gettext.
132378         * lib/relocatable.c: New file, from GNU gettext.
132379         * lib/relocwrapper.c: New file, from GNU gettext.
132380         * m4/relocatable.m4: New file, from GNU gettext.
132382 2007-02-28  Bruno Haible  <bruno@clisp.org>
132384         * MODULES.html.sh (File system functions): Add xreadlink-with-size.
132386         * modules/xreadlink: New file, from GNU gettext with modifications.
132387         * lib/xreadlink.c: New file, from GNU gettext.
132388         * lib/xreadlink.h: Add comments.
132389         (xreadlink): New declaration.
132391         * modules/xreadlink-with-size: Renamed from modules/xreadlink.
132392         (Files): Remove m4/xreadlink.m4. Replace lib/xreadlink.c with
132393         lib/xreadlink-with-size.c.
132394         (configure.ac): Remove gl_XREADLINK invocation.
132395         (Makefile.am): Augment lib_SOURCES.
132396         * m4/xreadlink.m4: Remove file.
132397         * lib/xreadlink-with-size.c: Renamed from lib/xreadlink.c.
132398         (xreadlink_with_size): Renamed from xreadink.
132399         * lib/xreadlink.h (xreadlink_with_size): Renamed from xreadink.
132400         * modules/canonicalize (Depends-on): Replace xreadlink with
132401         xreadlink-with-size.
132402         * lib/canonicalize.c (canonicalize_filename_mode): Update.
132404 2007-02-25  Jim Meyering  <jim@meyering.net>
132406         * build-aux/announce-gen: When complaining about excess arguments,
132407         list them.
132409 2007-02-25  Paul Eggert  <eggert@cs.ucla.edu>
132411         * README: Document signed integer overflow situation more
132412         accurately.
132414 2007-02-25  Bruno Haible  <bruno@clisp.org>
132416         * lib/vasnprintf.c (VASNPRINTF): Fix estimate of size needed for a
132417         'a' or 'A' conversion.
132419 2007-02-25  Bruno Haible  <bruno@clisp.org>
132421         * modules/filename: Renamed from modules/pathname.
132422         (Files): Replace lib/pathname.h with lib/filename.h. Replace
132423         lib/concatpath.c with lib/concat-filename.c.
132424         (Makefile.am): Update.
132425         (Include): Replace pathname.h with filename.h.
132426         * lib/filename.h: Renamed from lib/pathname.h.
132427         (concatenated_filename): Renamed from concatenated_pathname.
132428         * lib/concat-filename.c: Renamed from lib/concatpath.c.
132429         (concatenated_filename): Renamed from concatenated_pathname.
132430         * lib/findprog.c: Include filename.h instead of pathname.h.
132431         (find_in_path): Update.
132432         * lib/javacomp.c: Include filename.h instead of pathname.h.
132433         (is_envjavac_gcj43_usable, is_envjavac_oldgcj_14_14_usable,
132434         is_envjavac_oldgcj_14_13_usable, is_envjavac_nongcj_usable,
132435         is_gcj_present, is_gcj43_usable, is_oldgcj_14_14_usable,
132436         is_oldgcj_14_13_usable, is_javac_usable): Update.
132437         * lib/javaexec.c: Include filename.h instead of pathname.h.
132438         (execute_java_class): Update.
132439         * modules/findprog: Update.
132440         * modules/javacomp: Update.
132441         * modules/javaexec: Update.
132442         * MODULES.html.sh (File system functions): Add 'filename', remove
132443         'pathname'.
132445 2007-02-25  Bruno Haible  <bruno@clisp.org>
132447         * modules/printf-frexpl-tests: New file.
132448         * tests/test-printf-frexpl.c: New file.
132450         * modules/printf-frexpl: New file.
132451         * lib/printf-frexpl.h: New file.
132452         * lib/printf-frexpl.c: New file.
132453         * m4/printf-frexpl.m4: New file.
132455 2007-02-25  Bruno Haible  <bruno@clisp.org>
132457         * modules/printf-frexp-tests: New file.
132458         * tests/test-printf-frexp.c: New file.
132460         * modules/printf-frexp: New file.
132461         * lib/printf-frexp.h: New file.
132462         * lib/printf-frexp.c: New file.
132463         * m4/printf-frexp.m4: New file.
132465 2007-02-25  Bruno Haible  <bruno@clisp.org>
132467         Assume automake >= 1.10 for the tests.
132468         * modules/arcfour-tests (TESTS): Remove $(EXEEXT) suffix.
132469         * modules/arctwo-tests: Likewise.
132470         * modules/argp-tests: Likewise.
132471         * modules/avltree-list-tests: Likewise.
132472         * modules/avltree-oset-tests: Likewise.
132473         * modules/avltreehash-list-tests: Likewise.
132474         * modules/carray-list-tests: Likewise.
132475         * modules/crc-tests: Likewise.
132476         * modules/des-tests: Likewise.
132477         * modules/gc-arcfour-tests: Likewise.
132478         * modules/gc-arctwo-tests: Likewise.
132479         * modules/gc-des-tests: Likewise.
132480         * modules/gc-hmac-md5-tests: Likewise.
132481         * modules/gc-hmac-sha1-tests: Likewise.
132482         * modules/gc-md2-tests: Likewise.
132483         * modules/gc-md4-tests: Likewise.
132484         * modules/gc-md5-tests: Likewise.
132485         * modules/gc-pbkdf2-sha1-tests: Likewise.
132486         * modules/gc-rijndael-tests: Likewise.
132487         * modules/gc-sha1-tests: Likewise.
132488         * modules/gc-tests: Likewise.
132489         * modules/getaddrinfo-tests: Likewise.
132490         * modules/hmac-md5-tests: Likewise.
132491         * modules/hmac-sha1-tests: Likewise.
132492         * modules/linked-list-tests: Likewise.
132493         * modules/linkedhash-list-tests: Likewise.
132494         * modules/lock-tests: Likewise.
132495         * modules/md2-tests: Likewise.
132496         * modules/md4-tests: Likewise.
132497         * modules/md5-tests: Likewise.
132498         * modules/rbtree-list-tests: Likewise.
132499         * modules/rbtree-oset-tests: Likewise.
132500         * modules/rbtreehash-list-tests: Likewise.
132501         * modules/read-file-tests: Likewise.
132502         * modules/rijndael-tests: Likewise.
132503         * modules/stdint-tests: Likewise.
132504         * modules/tls-tests: Likewise.
132506 2007-02-24  Bruno Haible  <bruno@clisp.org>
132508         * lib/isnanl.h (isnanl): Define through isnan if isnan is a macro.
132509         * m4/isnan.m4 (gl_FUNC_ISNAN_NO_LIBM): Don't check for isnan as a
132510         function; instead check whether isnan with a double argument links.
132511         * m4/isnanl.m4 (gl_FUNC_ISNANL_NO_LIBM): Don't check for isnanl as a
132512         function; instead check whether isnan with a 'long double' argument
132513         links.
132514         Reported by Eric Blake <ebb9@byu.net>.
132516 2007-02-24  Bruno Haible  <bruno@clisp.org>
132518         * lib/isnan.c: Support the 'long double' case if USE_LONG_DOUBLE is
132519         defined.
132520         * lib/isnanl.c: Remove all code. Just include isnan.c.
132521         * modules/isnanl-nolibm (Files): Add lib/isnan.c.
132523 2007-02-25  Jim Meyering  <jim@meyering.net>
132525         Avoid conflicting types for 'unsetenv' on FreeBSD.
132526         * lib/putenv.c (_unsetenv): Rename from "unsetenv", to avoid
132527         conflicting with FreeBSD's (5.0 and 6.1) function declaration
132528         in stdlib.h.
132530 2007-02-24  Bruno Haible  <bruno@clisp.org>
132532         * modules/isnanl-nolibm-tests: New file.
132533         * tests/test-isnanl.c: New file.
132535         * modules/isnanl-nolibm: New file.
132536         * lib/isnanl.h: New file.
132537         * lib/isnanl.c: New file.
132538         * m4/isnanl.m4: New file.
132540 2007-02-24  Bruno Haible  <bruno@clisp.org>
132542         * modules/isnan-nolibm-tests: New file.
132543         * tests/test-isnan.c: New file.
132545         * modules/isnan-nolibm: New file.
132546         * lib/isnan.h: New file.
132547         * lib/isnan.c: New file.
132548         * m4/isnan.m4: New file.
132550 2007-02-24  Bruno Haible  <bruno@clisp.org>
132552         * lib/frexpl.c (frexpl): Correct return values for x = 1.0L. Don't
132553         assume that an exponent fits in 20 bits.
132555 2007-02-24  Jim Meyering  <jim@meyering.net>
132557         * m4/regex.m4: Update the description of the configure-time option,
132558         --without-included-regex, to state accurately what the defaults are,
132559         and perhaps to give people an idea why using this option is risky.
132561 2007-02-24  Paul Eggert  <eggert@cs.ucla.edu>
132563         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Check for a nanosleep that
132564         loops on small arguments.  This attempts to avoid the problem
132565         Bruno Haible reported for AIX 4.3.2 in
132566         <http://lists.gnu.org/r/bug-gnulib/2007-02/msg00309.html>.
132568 2007-02-23  Bruno Haible  <bruno@clisp.org>
132570         * m4/perl.m4 (gl_PERL): Require version 5.005, not 5.003.
132571         Needed for help2man.
132573 2007-02-23  Karl Berry  <karl@gnu.org>
132575         * doc/gnulib-tool.texi (CVS Issues): mention that when foo_.h
132576         exists, foo.h should be cvs-ignored, not committed.
132578 2007-02-23  Eric Blake  <ebb9@byu.net>
132580         * lib/getdate.h (includes):  Include <time.h>, not "timespec.h".
132581         * lib/stat-time.h (includes): Likewise.
132582         * lib/utimecmp.c (includes): Likewise.
132583         * lib/utimens.h (includes): Likewise.
132584         * lib/getdate.y (includes): Also include "timespec.h" for use
132585         internal to the module.
132586         * modules/utimens (Depends-on): Revert yesterday's patch.
132587         * modules/nanosleep (Depends-on): Add missing dependency.
132589 2007-02-22  Bruno Haible  <bruno@clisp.org>
132591         * lib/glob.c: Don't include getlogin_r.h.
132593 2007-02-22  Jim Meyering  <jim@meyering.net>
132595         * modules/utimens (Depends-on): Add timespec, required for
132596         utimens.h's inclusion of timespec.h.
132598 2007-02-21  Paul Eggert  <eggert@cs.ucla.edu>
132600         * lib/getcwd.c (__getcwd): Undo previous change; it mishandled
132601         long unreadable paths in GNU/Linux.  Problem reported by Andreas
132602         Schwab in
132603         <http://lists.gnu.org/r/bug-gnulib/2007-02/msg00261.html>.
132604         I'll try to think of a better way to fix the Solaris problem.
132606         * lib/getcwd.c (__getcwd): Don't assume getcwd (NULL, 0) works
132607         like glibc; on Solaris 10, it fails with errno == EINVAL.
132608         POSIX says the behavior is unspecified if the first argument is NULL,
132609         so play it safe and never pass NULL to the system getcwd.
132611 2007-02-21  Jim Meyering  <jim@meyering.net>
132613         * lib/gettimeofday.c (rpl_gettimeofday): Remove declaration
132614         of gettimeofday.  It would conflict with the one now always
132615         provided via sys_time_.h.  Reported by Matthew Woehlke, as
132616         an IRIX 6.5 build failure.
132618 2007-02-20  Paul Eggert  <eggert@cs.ucla.edu>
132620         Minor fixups to port to Solaris 10 with Sun C 5.8.
132621         * lib/getcwd.c [!_LIBC]: Include dirfd.h, since we use dirfd.
132622         * modules/getcwd (Depends-on): Add dirfd.
132623         * lib/putenv.c (putenv): #undef it.
132624         (rpl_putenv): New decl.
132625         (malloc, free): Include <stdlib.h> rather than prototyping separately.
132627 2007-02-20  Bruno Haible  <bruno@clisp.org>
132629         * modules/stdio-tests: New file.
132630         * tests/test-stdio.c: New file.
132632         * modules/vsnprintf (Files): Remove lib/vsnprintf.h.
132633         (Depends-on): Add stdio.
132634         (configure.ac): Invoke gl_STDIO_MODULE_INDICATOR.
132635         (Include): Use <stdio.h> instead of vsnprintf.h.
132636         * m4/vsnprintf.m4 (gl_FUNC_VSNPRINTF): Require gl_STDIO_H_DEFAULTS. Set
132637         HAVE_DECL_VSNPRINTF.
132638         * lib/vsnprintf.c: Include <stdio.h> instead of vsnprintf.h.
132640         * modules/snprintf (Files): Remove lib/snprintf.h.
132641         (Depends-on): Add stdio.
132642         (configure.ac): Invoke gl_STDIO_MODULE_INDICATOR.
132643         (Include): Use <stdio.h> instead of snprintf.h.
132644         * m4/snprintf.m4 (gl_FUNC_SNPRINTF): Require gl_STDIO_H_DEFAULTS. Set
132645         HAVE_DECL_SNPRINTF.
132646         * lib/snprintf.c: Include <stdio.h> instead of snprintf.h.
132647         * lib/getaddrinfo.c: Likewise.
132649         * modules/stdio: New file.
132650         * lib/stdio_.h: New file, incorporating snprintf.h and vsnprintf.h.
132651         * lib/snprintf.h: Remove file.
132652         * lib/vsnprintf.h: Remove file.
132653         * lib/.cppi-disable: Remove snprintf.h.
132654         * m4/stdio_h.m4: New file.
132655         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdio.
132657 2007-02-20  Jim Meyering  <jim@meyering.net>
132659         * lib/ftruncate.c [HAVE_CHSIZE]: Document that this code is
132660         used by e.g., mingw.  From Bruno Haible.
132662 2007-02-19  Bruno Haible  <bruno@clisp.org>
132664         * lib/string_.h: Use "#pragma GCC system_header" to suppress some gcc
132665         warnings.
132666         Reported by Ben Pfaff <blp@cs.stanford.edu>.
132668 2007-02-19  Bruno Haible  <bruno@clisp.org>
132670         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Don't request a complaint mail
132671         from mingw users.
132673 2007-02-19  Bruno Haible  <bruno@clisp.org>
132675         * lib/stdlib_.h: Use "#pragma GCC system_header" to suppress some gcc
132676         warnings.
132677         Reported by Joel E. Denny <jdenny@ces.clemson.edu> via Paul Eggert.
132679 2007-02-19  Jim Meyering  <jim@meyering.net>
132681         Don't use FD after a successful "fdopendir (fd)".
132682         * lib/getcwd.c (__getcwd) [AT_FDCWD]: fdopendir (fd) usually closes fd.
132683         Reset it by calling dirfd on the just-obtained DIR*.
132685         * m4/ftruncate.m4: Adjust comment to give this module a 3-year reprieve.
132686         Prompted by a report from Bruno Haible that mingw lacks ftruncate.
132688 2007-02-18  Bruno Haible  <bruno@clisp.org>
132690         * lib/readlink.c: Include <unistd.h>.
132691         * m4/readlink.m4 (gl_FUNC_READLINK): Require gl_UNISTD_H_DEFAULTS. Set
132692         HAVE_READLINK.
132693         * modules/readlink (Depends-on): Add unistd.
132694         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
132695         (Include): Add <unistd.h>.
132697         * lib/getlogin_r.h: Remove file.
132698         * lib/getlogin_r.c: Include <unistd.h> instead of getlogin_r.h.
132699         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE): Remove macro.
132700         (gl_GETLOGIN_R): Inline it here. Require gl_UNISTD_H_DEFAULTS. Set
132701         HAVE_DECL_GETLOGIN_R.
132702         * modules/getlogin_r (Files): Remove lib/getlogin_r.h.
132703         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
132704         (Include): Use <unistd.h> instead of getlogin_r.h.
132706         * lib/getcwd.h: Remove file.
132707         * lib/getcwd.c: Include <unistd.h> instead of getcwd.h.
132708         * lib/xgetcwd.c: Likewise.
132709         * m4/getcwd.m4 (gl_FUNC_GETCWD): Require gl_UNISTD_H_DEFAULTS. Set
132710         REPLACE_GETCWD. Don't define __GETCWD_PREFIX.
132711         * modules/getcwd (Files): Remove lib/getcwd.h.
132712         (Depends-on): Add unistd.
132713         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
132714         (Include): Use <unistd.h> instad of getcwd.h.
132716         * lib/ftruncate.c: Include <unistd.h> first.
132717         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Require gl_UNISTD_H_DEFAULTS.
132718         Set HAVE_FTRUNCATE.
132719         * modules/ftruncate (Depends-on): Add unistd.
132720         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
132722         * lib/fchdir.c: Include <unistd.h> first.
132723         * lib/dirent_.h: Test REPLACE_FCHDIR, not FCHDIR_REPLACEMENT.
132724         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_UNISTD_H_DEFAULTS instead
132725         of gl_HEADER_UNISTD_DEFAULTS. Set REPLACE_FCHDIR. Don't set UNISTD_H.
132726         * modules/fchdir (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
132727         (Makefile.am): Substitute also REPLACE_FCHDIR into dirent.h.
132729         * lib/dup2.c: Include <unistd.h> first.
132730         * m4/dup2.m4 (gl_FUNC_DUP2): Require gl_UNISTD_H_DEFAULTS. Set
132731         HAVE_DUP2.
132732         * modules/dup2 (Depends-on): Add unistd.
132733         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
132735         * lib/chown.c: Include <unistd.h> first. Undefine chown later.
132736         * m4/chown.m4 (gl_FUNC_CHOWN): Require gl_UNISTD_H_DEFAULTS. Set
132737         REPLACE_CHOWN. Don't define chown as a macro here.
132738         * modules/chown (Depends-on): Add unistd.
132739         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
132741         * lib/unistd_.h: Test HAVE_UNISTD_H determined at configure time.
132742         Add definition for GL_LINK_WARNING.
132743         (chown, dup2): New declarations.
132744         (fchdir): Test REPLACE_FCHDIR, not FCHDIR_REPLACEMENT. Provide optional
132745         link warning.
132746         (ftruncate): New declaration.
132747         (getcwd): New declaration, taken from old getcwd.h.
132748         (getlogin_r): New declaration, taken from old getlogin_r.h.
132749         (readlink): New declaration.
132750         * m4/unistd_h.m4 (gl_UNISTD_H): Renamed from gl_HEADER_UNISTD. Don't
132751         set UNISTD_H. Inline gl_PREREQ_UNISTD. Set HAVE_UNISTD_H.
132752         (gl_PREREQ_UNISTD): Remove macro.
132753         (gl_UNISTD_MODULE_INDICATOR): New macro.
132754         (gl_UNISTD_H_DEFAULTS): Renamed from gl_HEADER_UNISTD_DEFAULTS. Set
132755         many new variables. Don't set UNISTD_H.
132756         * modules/unistd (Description): Change.
132757         (Depends-on): Add link-warning.
132758         (configure.ac): Update.
132759         (Makefile.am): Create unistd.h always. Substitute many new variables
132760         into it.
132762 2007-02-18  Bruno Haible  <bruno@clisp.org>
132764         * lib/stdlib_.h (getsubopt): New declaration, copied from getsubopt.h.
132765         * modules/stdlib (stdlib.h): Also substitute GNULIB_GETSUBOPT and
132766         HAVE_GETSUBOPT.
132767         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Also initialize
132768         GNULIB_GETSUBOPT and HAVE_GETSUBOPT.
132769         * lib/getsubopt.h: Remove file.
132770         * modules/getsubopt (Files): Remove lib/getsubopt.h.
132771         (Depends-on): Add stdlib.
132772         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
132773         (Includes): Use <stdlib.h> instead of getsubopt.h.
132774         * m4/getsubopt.m4 (gl_FUNC_GETSUBOPT): Require gl_STDLIB_H_DEFAULTS.
132775         Set HAVE_GETSUBOPT.
132776         * lib/getsubopt.c: Don't include getsubopt.h.
132778 2007-02-18  Bruno Haible  <bruno@clisp.org>
132780         * modules/fchdir (Depends-on): Add dup2.
132782 2007-02-18  Bruno Haible  <bruno@clisp.org>
132784         * lib/stdlib_.h: Handle glibc's special invocation convention
132785         specially.
132787 2007-02-18  Bruno Haible  <bruno@clisp.org>
132789         * modules/stdlib-tests: New file.
132790         * tests/test-stdlib.c: New file.
132792         * modules/mkstemp (Files): Remove lib/mkstemp.h.
132793         (Depends-on): Add stdlib.
132794         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
132795         (Includes): Use <stdlib.h> instead of mkstemp.h.
132796         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require gl_STDLIB_H_DEFAULTS. Set
132797         REPLACE_MKSTEMP. Remove definition of __MKSTEMP_PREFIX.
132798         * lib/mkstemp.c: Don't include mkstemp.h.
132799         * lib/mkstemp-safer.c: Include <stdlib.h> instead of mkstemp.h.
132800         * lib/stdlib--.h: Don't include mkstemp.h.
132802         * modules/mkdtemp (Files): Remove lib/mkdtemp.h.
132803         (Depends-on): Add stdlib.
132804         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
132805         (Includes): Use <stdlib.h> instead of mkdtemp.h.
132806         * m4/mkdtemp.m4 (gt_FUNC_MKDTEMP): Require gl_STDLIB_H_DEFAULTS. Set
132807         HAVE_MKDTEMP.
132808         * lib/mkdtemp.c: Don't include mkdtemp.h.
132809         * lib/clean-temp.c: Don't include mkdtemp.h.
132811         * modules/exit (Files): Remove lib/exit.h.
132812         (Depends-on): Add stdlib.
132813         (Makefile.am): Remove lib_SOURCES.
132814         (Include): Use <stdlib.h> instead of exit.h.
132815         * lib/argmatch.c: Don't include exit.h.
132816         * lib/execute.c: Likewise.
132817         * lib/pagealign_alloc.c: Likewise.
132818         * lib/pipe.c: Likewise.
132819         * lib/wait-process.c: Likewise.
132820         * lib/copy-file.c: Include <stdlib.h> instead of exit.h.
132821         * lib/exitfail.c: Likewise.
132822         * lib/savewd.c: Likewise.
132823         * lib/xsetenv.c: Likewise.
132825         * modules/stdlib: New file.
132826         * lib/stdlib_.h: New file, incorporating exit.h, mkdtemp.h, mkstemp.h
132827         and extra comments about mkstemp().
132828         * lib/exit.h: Remove file.
132829         * lib/mkdtemp.h: Remove file.
132830         * lib/mkstemp.h: Remove file.
132831         * m4/stdlib_h.m4: New file.
132832         * MODULES.html.sh (Support for systems lacking ANSI C 89): Add stdlib.
132834 2007-02-18  Bruno Haible  <bruno@clisp.org>
132836         * modules/math-tests: New file.
132837         * tests/test-math.c: New file.
132839         * modules/math: New file.
132840         * modules/mathl (Files): Remove lib/mathl.h.
132841         (Depends-on): Add math.
132842         (Makefile.am): Don't mention mathl.h.
132843         (Include): Use <math.h> instead of mathl.h.
132844         * lib/math_.h: New file.
132845         * lib/mathl.h: Remove file.
132846         * lib/acosl.c: Include <config.h> and <math.h> first. Don't include
132847         mathl.h.
132848         * lib/asinl.c: Likewise.
132849         * lib/atanl.c: Likewise.
132850         * lib/ceill.c: Likewise.
132851         * lib/cosl.c: Likewise.
132852         * lib/expl.c: Likewise.
132853         * lib/floorl.c: Likewise.
132854         * lib/frexpl.c: Likewise.
132855         * lib/ldexpl.c: Likewise.
132856         * lib/logl.c: Likewise.
132857         * lib/sincosl.c: Likewise.
132858         * lib/sinl.c: Likewise.
132859         * lib/sqrtl.c: Likewise.
132860         * lib/tanl.c: Likewise.
132861         * lib/trigl.c: Likewise.
132862         * m4/math_h.m4: New file.
132863         * MODULES.html.sh (Mathematics): Add math.
132865 2007-02-17  Bruno Haible  <bruno@clisp.org>
132867         * modules/wctype-tests: New file.
132868         * tests/test-wctype.c: New file.
132870         * modules/wchar-tests: New file.
132871         * tests/test-wchar.c: New file.
132873         * modules/unistd-tests: New file.
132874         * tests/test-unistd.c: New file.
132876         * modules/time-tests: New file.
132877         * tests/test-time.c: New file.
132879         * modules/sysexits-tests: New file.
132880         * tests/test-sysexits.c: New file.
132882         * modules/sys_time-tests: New file.
132883         * tests/test-sys_time.c: New file.
132885         * modules/sys_stat-tests: New file.
132886         * tests/test-sys_stat.c: New file.
132888         * modules/sys_socket-tests: New file.
132889         * tests/test-sys_socket.c: New file.
132891         * modules/sys_select-tests: New file.
132892         * tests/test-sys_select.c: New file.
132894         * modules/string-tests: New file.
132895         * tests/test-string.c: New file.
132897         * modules/stdbool-tests: New file.
132898         * tests/test-stdbool.c: New file.
132900         * modules/netinet_in-tests: New file.
132901         * tests/test-netinet_in.c: New file.
132903         * modules/inttypes-tests: New file.
132904         * tests/test-inttypes.c: New file.
132906         * modules/fcntl-tests: New file.
132907         * tests/test-fcntl.c: New file.
132909         * modules/byteswap-tests: New file.
132910         * tests/test-byteswap.c: New file.
132912         * modules/arpa_inet-tests: New file.
132913         * tests/test-arpa_inet.c: New file.
132915 2007-02-17  Bruno Haible  <bruno@clisp.org>
132917         * lib/inttypes_.h: Add definition for GL_LINK_WARNING.
132918         (imaxabs, imaxdiv, strtoimax, strtoumax): Don't declare the function
132919         if the corresponding module is not enabled. Emit link warnings if
132920         the function is used nevertheless.
132921         * m4/inttypes.m4 (gl_INTTYPES_H): Never use the existing <inttypes.h>.
132922         Don't AC_SUBST HAVE_DECL_IMAXABS, HAVE_DECL_IMAXDIV,
132923         HAVE_DECL_STRTOIMAX, HAVE_DECL_STRTOUMAX.
132924         (gl_INTTYPES_MODULE_INDICATOR, gl_INTTYPES_H_DEFAULTS): New macros.
132925         * modules/inttypes (Depends-on): Add link-warning.
132926         (Makefile.am): Copy the contents of build-aux/link-warning.h into
132927         inttypes.h. Substitute also GNULIB_IMAXABS, GNULIB_IMAXDIV,
132928         GNULIB_STRTOIMAX, GNULIB_STRTOUMAX.
132929         * modules/imaxabs (configure.ac): Invoke gl_INTTYPES_MODULE_INDICATOR.
132930         * modules/imaxdiv (configure.ac): Likewise.
132931         * modules/strtoimax (configure.ac): Likewise.
132932         * modules/strtoumax (configure.ac): Likewise.
132934 2007-02-17  Bruno Haible  <bruno@clisp.org>
132936         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Include the contents of
132937         gl_STRING_MODULE_INDICATOR_DEFAULTS.
132938         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Remove macro.
132939         (gl_HEADER_STRING_H_BODY, gl_STRING_MODULE_INDICATOR): Update.
132941 2007-02-17  Bruno Haible  <bruno@clisp.org>
132943         * modules/link-warning: New file.
132944         * build-aux/link-warning.h: New file, extracted from lib/string_.h.
132945         * lib/string_.h (GL_LINK_WARNING): Remove definition.
132946         * modules/string (Depends-on): Add link-warning.
132947         (Makefile.am): Copy the contents of build-aux/link-warning.h into
132948         string.h.
132949         * MODULES.html.sh (Support for building libraries and executables): Add
132950         link-warning.
132952 2007-02-17  Bruno Haible  <bruno@clisp.org>
132954         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strcasecmp,
132955         strncasecmp, strchr, strchrnul, strdup, strndup, strnlen, strcspn,
132956         strpbrk, strspn, strrchr, strsep, strstr, strcasestr, strtok_r): Break
132957         long lines.
132959 2007-02-17  Ben Pfaff  <blp@cs.stanford.edu>
132960             Bruno Haible  <bruno@clisp.org>
132962         * modules/tmpfile: New file.
132963         * lib/tmpfile.c: New file.
132964         * m4/tmpfile.m4: New file.
132965         * MODULES.html.sh (func_all_modules): New section "Input/output".
132967 2007-02-15  Bruno Haible  <bruno@clisp.org>
132969         * lib/clean-temp.c [WIN32 && !CYGWIN]: Include <windows.h>.
132970         (supports_delete_on_close): New function.
132971         (open_temp, fopen_temp): Use _O_TEMPORARY when supported.
132973 2007-02-14  Bruno Haible  <bruno@clisp.org>
132975         * modules/mbspcasecmp-tests: New file.
132976         * tests/test-mbspcasecmp.sh: New file.
132977         * tests/test-mbspcasecmp.c: New file.
132979         New module mbspcasecmp.
132980         * modules/mbspcasecmp: New file.
132981         * lib/mbspcasecmp.c: New file.
132982         * lib/string_.h (strncasecmp): Change warning message.
132983         (mbspcasecmp): New declaration.
132984         * m4/mbspcasecmp.m4: New file.
132985         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
132986         GNULIB_MBSPCASECMP.
132987         * modules/string (string.h): Also substitute GNULIB_MBSPCASECMP.
132988         * MODULES.html.sh (Internationalization functions): Add mbspcasecmp.
132990 2007-02-14  Bruno Haible  <bruno@clisp.org>
132992         * modules/mbsncasecmp-tests: New file.
132993         * tests/test-mbsncasecmp.sh: New file.
132994         * tests/test-mbsncasecmp.c: New file.
132996         New module mbsncasecmp.
132997         * modules/mbsncasecmp: New file.
132998         * lib/mbsncasecmp.c: New file.
132999         * lib/string_.h (mbsncasecmp): New declaration.
133000         * m4/mbsncasecmp.m4: New file.
133001         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
133002         GNULIB_MBSNCASECMP.
133003         * modules/string (string.h): Also substitute GNULIB_MBSNCASECMP.
133004         * MODULES.html.sh (Internationalization functions): Add mbsncasecmp.
133006 2007-02-14  Paul Eggert  <eggert@cs.ucla.edu>
133008         * lib/exclude.c (FNM_EXTMATCH): Define if system does not.
133009         Verify that it doesn't overlap with our flags.
133010         (fnmatch_no_wildcards): Don't use strcasecmp or strncasecmp, which
133011         do not have the desired effect in multibyte locales; instead, use
133012         mbscasecmp.
133013         * modules/exclude (Depends-on): Depend on mbscasecmp, not strcase.
133014         Add dependency on xalloc.  Depend on fnmatch, not fnmatch-gnu, since
133015         we don't require GNU fnmatch ourselves (if our users require it, they
133016         should do so explicitly).
133018         Fix regex code so it doesn't rely on strcasecmp.
133019         * lib/regex_internal.h: Include <langinfo.h> only if _LIBC is defined.
133020         Otherwise, include gnulib's langinfo.h.
133021         * lib/regcomp.c (init_dfa): Don't use strcasecmp, as it can have
133022         undesirable behavior in non-C locales.  Instead, rely on localecharset.
133023         * m4/regex.m4 (gl_PREREQ_REGEX): Don't require AM_LANGINFO_CODESET.
133024         * modules/regex (FILES): Remove m4/codeset.m4.
133025         (Depends-on): Add localcharset.  Remove strcase.
133027 2007-02-13  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
133029         * m4/unlinkdir.m4 (gl_UNLINKDIR): Fix m4 quoting bug.
133030         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Likewise.
133032 2007-02-13  Bruno Haible  <bruno@clisp.org>
133034         * m4/intdiv0.m4 (gt_INTDIV0): Assume ANSI C. Fix underquoting bug.
133035         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
133037 2007-02-12  Bruno Haible  <bruno@clisp.org>
133039         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
133040         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): If
133041         GNULIB_POSIXCHECK and the gnulib module not enabled, provoke a link-
133042         time warning rather than a link error.
133044 2007-02-12  Bruno Haible  <bruno@clisp.org>
133046         * m4/locale-fr.m4 (gt_LOCALE_FR): Fix m4 quoting bug.
133047         * m4/locale-zh.m4 (gt_LOCALE_ZH_CN): Likewise.
133048         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
133050 2007-02-12  Paul Eggert  <eggert@cs.ucla.edu>
133052         * lib/string_.h (strncasecmp): Fix typo: this macro takes 3
133053         args, not 2.
133055 2007-02-12  Paul Eggert  <eggert@cs.ucla.edu>
133057         New module 'time', so that apps can include <time.h> as per
133058         POSIX and GNU instead of separate include files like time_r.h
133059         and timegm.h.  This implementation tries out a simpler approach
133060         for replacing decls in standard include files (as compared to
133061         the string module), somewhat as an experiment.
133063         * config/srclist.txt: Comment out mktime.c for now.
133064         * doc/gnulib-tool.texi (Initial import): Don't use time_r as an example
133065         since it doesn't apply any more.  Use generic wording instead.
133066         * MODULES.html.sh (Support for systems lacking POSIX:2001): New module
133067         'time'.
133068         * lib/time_.h, m4/time_h.m4, modules/time: New files.
133069         * lib/strptime.h, lib/time_r.h, lib/timegm.h: Remove.
133070         * lib/mktime.c: Include config.h depending on _LIBC, not HAVE_CONFIG_H.
133071         Don't include <sys/types.h>; no longer needed since we assume C89.
133072         * lib/mktime.c: Don't include "time_r.h"; no longer needed.
133073         * lib/strftime.c: Likewise.
133074         * lib/time_r.c: Likewise.
133075         * lib/nanosleep.c (nanosleep): #undef after include files, not before.
133076         * lib/nanosleep.c: Include <time.h> first, to check interface.
133077         * lib/strptime.c: Likewise.
133078         * lib/time_r.c: Likewise.
133079         * lib/timegm.c: Likewise.
133080         * lib/strptime.c: Don't include strptime.h or time_r.h; no longer
133081         needed.
133082         * lib/timegm.c: Don't include timegm.h; no longer needed.
133083         * lib/timespec.h: Don't include <sys/time.h> before <time.h>;
133084         time.h now handles any problems in that area.
133085         (struct timespec, nanosleep): Remove; time.h now arranges for these.
133086         * lib/xnanosleep.c: Don't include timespec.h; no longer needed now
133087         that time.h defines struct timespec.
133088         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Check that nanosleep is declared.
133089         Set REPLACE_NANOSLEEP.  Don't AC_DEFINE nanosleep; the time module now
133090         handles that.
133091         * m4/strptime.m4 (gl_FUNC_STPRTIME): Set REPLACE_STRPTIME.
133092         * m4/time_r.m4 (gl_TIME_R): Don't define HAVE_TIME_R_POSIX; no longer
133093         needed.  Set REPLACE_LOCALTIME.
133094         * m4/timegm.m4 (gl_FUNC_TIMEGM): Set REPLACE_TIMEGM.
133095         * m4/timespec.m4 (gl_CHECK_TYPE_STRUCT_TIMESPEC): Move to time_h.m4.
133096         (gl_TIMESPEC): Don't check for sys/time.h or struct timespec or
133097         nanosleep; time_h.m4 now does that.  Don't require
133098         gl_USE_SYSTEM_EXTENSIONS; no longer needed directly, and the time
133099         module handles this now.
133100         * modules/getdate (Depends-on): Remove timespec.  Add time.
133101         * modules/nanosleep (Depends-on): Likewise.
133102         * modules/stat-time (Depends-on): Likewise.
133103         * modules/nanosleep (Include): Include time.h, not timespec.h.
133104         * modules/strptime (Files): Remove lib/strptime.h.
133105         (Depends-on): Add extensions, time.
133106         (Include): Include time.h, not strptime.h.
133107         * modules/time_r (Files): Remove lib/time_r.h.
133108         (Depends-on): Add time.
133109         (Include): Include time.h, not time_r.h.
133110         * modules/timegm: Likewise.
133111         * modules/timespec (Description): Now does timespec-related decls
133112         of our own, instead of struct timespec itself.
133113         (Depends-on): Add time; remove extensions.
133114         (Maintainer): Add self.
133115         * modules/utimecmp (Depends-on): Add time; remove timespec.
133116         * modules/utimens (Depends-on): Likewise.
133117         * modules/xnanosleep (Depends-on): Likewise.
133119 2007-02-11  Bruno Haible  <bruno@clisp.org>
133121         * lib/c-strstr.c: Include allocsa.h.
133122         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
133123         * lib/c-strcasestr.c: Include allocsa.h.
133124         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
133125         * lib/strcasestr.c: Include allocsa.h.
133126         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
133127         * lib/mbsstr.c: Include allocsa.h.
133128         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): Use
133129         allocsa/freesa instead of malloc/free.
133130         * lib/mbscasestr.c: Include allocsa.h.
133131         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): Use
133132         allocsa/freesa instead of malloc/free.
133133         * modules/c-strstr (Depends-on): Add allocsa.
133134         * modules/c-strcasestr (Depends-on): Likewise.
133135         * modules/strcasestr (Depends-on): Likewise.
133136         * modules/mbsstr (Depends-on): Likewise.
133137         * modules/mbscasestr (Depends-on): Likewise.
133139 2007-02-11  Bruno Haible  <bruno@clisp.org>
133141         * lib/mbsspn.c (mbsspn): Fix bug. Remove unnecessary strlen call.
133143         * modules/mbsspn-tests: New file.
133144         * tests/test-mbsspn.sh: New file.
133145         * tests/test-mbsspn.c: New file.
133147 2007-02-11  Bruno Haible  <bruno@clisp.org>
133149         * lib/mbspbrk.c (mbspbrk): Remove unneeded cast.
133151         * modules/mbspbrk-tests: New file.
133152         * tests/test-mbspbrk.sh: New file.
133153         * tests/test-mbspbrk.c: New file.
133155 2007-02-11  Bruno Haible  <bruno@clisp.org>
133157         * lib/mbscspn.c (mbscspn): Remove unnecessary strlen call and
133158         unneeded cast.
133160         * modules/mbscspn-tests: New file.
133161         * tests/test-mbscspn.sh: New file.
133162         * tests/test-mbscspn.c: New file.
133164 2007-02-11  Bruno Haible  <bruno@clisp.org>
133166         * modules/mbscasecmp-tests: New file.
133167         * tests/test-mbscasecmp.sh: New file.
133168         * tests/test-mbscasecmp.c: New file.
133170 2007-02-11  Bruno Haible  <bruno@clisp.org>
133172         Ensure O(n) worst-case complexity of mbscasestr.
133173         * lib/mbscasestr.c: Include stdbool.h.
133174         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): New
133175         functions.
133176         (mbscasestr): Add some bookkeeping. Invoke knuth_morris_pratt_* when
133177         the bookkeeping indicates that it's worth it.
133178         * modules/mbscasestr (Depends-on): Add stdbool, mbslen, strnlen.
133180         * modules/mbscasestr-tests: New file.
133181         * tests/test-mbscasestr1.c: New file.
133182         * tests/test-mbscasestr2.sh: New file.
133183         * tests/test-mbscasestr2.c: New file.
133184         * tests/test-mbscasestr3.sh: New file.
133185         * tests/test-mbscasestr3.c: New file.
133186         * tests/test-mbscasestr4.sh: New file.
133187         * tests/test-mbscasestr4.c: New file.
133188         * m4/locale-tr.m4: New file.
133190 2007-02-11  Bruno Haible  <bruno@clisp.org>
133192         Ensure O(n) worst-case complexity of mbsstr.
133193         * lib/mbsstr.c: Include stdbool.h.
133194         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): New
133195         functions.
133196         (mbsstr): Add some bookkeeping. Invoke knuth_morris_pratt_* when the
133197         bookkeeping indicates that it's worth it.
133198         * modules/mbsstr (Depends-on): Add stdbool, mbslen, strnlen.
133200         * modules/mbsstr-tests: New file.
133201         * tests/test-mbsstr1.c: New file.
133202         * tests/test-mbsstr2.sh: New file.
133203         * tests/test-mbsstr2.c: New file.
133204         * tests/test-mbsstr3.sh: New file.
133205         * tests/test-mbsstr3.c: New file.
133206         * m4/locale-fr.m4: New file.
133208 2007-02-11  Bruno Haible  <bruno@clisp.org>
133210         * lib/mbsrchr.c (mbsrchr): Fix bug.
133212         * modules/mbsrchr-tests: New file.
133213         * tests/test-mbsrchr.sh: New file.
133214         * tests/test-mbsrchr.c: New file.
133216 2007-02-11  Bruno Haible  <bruno@clisp.org>
133218         * lib/mbschr.c (mbschr): Fix bug.
133220         * modules/mbschr-tests: New file.
133221         * tests/test-mbschr.sh: New file.
133222         * tests/test-mbschr.c: New file.
133223         * m4/locale-zh.m4: New file.
133225 2007-02-11  Bruno Haible  <bruno@clisp.org>
133227         Support for copying multibyte string iterators.
133228         * lib/mbiter.h: Include <string.h>.
133229         (mbiter_multi_copy): New function.
133230         (mbi_copy): New macro.
133231         * lib/mbuiter.h: Include <string.h>.
133232         (mbuiter_multi_copy): New function.
133233         (mbui_copy): New macro.
133235 2007-02-11  Bruno Haible  <bruno@clisp.org>
133237         New module mbslen.
133238         * modules/mbslen: New file.
133239         * lib/mbslen.c: New file.
133240         * lib/string_.h (mbslen): New declaration.
133241         * m4/mbslen.m4: New file.
133242         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
133243         GNULIB_MBSLEN.
133244         * modules/string (string.h): Also substitute GNULIB_MBSLEN.
133245         * MODULES.html.sh (Internationalization functions): Add mbslen.
133247 2007-02-11  Bruno Haible  <bruno@clisp.org>
133249         Ensure O(n) worst-case complexity of strcasestr substitute.
133250         * lib/strcasestr.c: Include stdbool.h.
133251         (knuth_morris_pratt): New function.
133252         (strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when the
133253         bookkeeping indicates that it's worth it.
133254         * modules/strcasestr (Depends-on): Add stdbool, strnlen.
133256         * modules/strcasestr-tests: New file.
133257         * tests/test-strcasestr.c: New file.
133259 2007-02-11  Bruno Haible  <bruno@clisp.org>
133261         Ensure O(n) worst-case complexity of c_strcasestr.
133262         * lib/c-strcasestr.c: Include stdbool.h, string.h.
133263         (knuth_morris_pratt): New function.
133264         (c_strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when
133265         the bookkeeping indicates that it's worth it.
133266         * modules/c-strcasestr (Depends-on): Add stdbool, strnlen.
133268         * modules/c-strcasestr-tests: New file.
133269         * tests/test-c-strcasestr.c: New file.
133271 2007-02-11  Bruno Haible  <bruno@clisp.org>
133273         Ensure O(n) worst-case complexity of c_strstr.
133274         * lib/c-strstr.c: Include stdbool.h, string.h.
133275         (knuth_morris_pratt): New function.
133276         (c_strstr): Add some bookkeeping. Invoke knuth_morris_pratt when the
133277         bookkeeping indicates that it's worth it.
133278         * modules/c-strstr (Depends-on): Add stdbool, strnlen.
133280         * lib/c-strstr.c: Complete rewrite for maintainability.
133282         * modules/c-strstr-tests: New file.
133283         * tests/test-c-strstr.c: New file.
133285 2007-02-11  Bruno Haible  <bruno@clisp.org>
133287         * m4/javacomp.m4 (gt_JAVACOMP): Work around a 'tr' bug in coreutils
133288         5.2.1 and earlier, whereby \055 was treated just like the range
133289         delimiter '-'.
133290         Reported by Joel E. Denny <jdenny@ces.clemson.edu>.
133292 2007-02-08  Bruno Haible  <bruno@clisp.org>
133294         * modules/regex (Depends-on): Add stdbool.
133295         Reported by Dalibor Topic <robilad@kaffe.org>.
133297 2007-02-05  Paul Eggert  <eggert@cs.ucla.edu>
133299         * m4/regex.m4 (gl_REGEX): Check for glibc bug #3957.
133300         Prefer returning from main to exiting from it.
133301         Remove unnecessary parens after sizeof.
133303 2007-02-05  Bruno Haible  <bruno@clisp.org>
133305         New module mbssep.
133306         * modules/mbssep: New file.
133307         * lib/mbssep.c: New file.
133308         * lib/string_.h (strsep): Add a conditional link warning.
133309         (mbssep): New declaration.
133310         * m4/mbssep.m4: New file.
133311         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
133312         GNULIB_MBSSEP.
133313         * modules/string (string.h): Also substitute GNULIB_MBSSEP.
133314         * MODULES.html.sh (Internationalization functions): Add mbssep.
133316 2007-02-05  Bruno Haible  <bruno@clisp.org>
133318         * lib/strsep.c (strsep): Fix actions in case of no delimiters.
133319         Optimize search in case of 1 delimiter.
133321 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
133323         * lib/acl.h: Include sys/types.h before sys/acl.h.
133325 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
133327         Merge upstream fix for glibc bugzilla #3957:
133329         2007-02-05  Jakub Jelinek  <jakub@redhat.com>
133331         * lib/regcomp.c (parse_bracket_exp): Set '\n' bit rather than '\0'
133332         bit for RE_HAT_LISTS_NOT_NEWLINE.
133333         (build_charclass_op): Remove bogus comment.
133335 2007-02-05  Simon Josefsson  <simon@josefsson.org>
133337         * lib/gc.h, lib/gc-libgcrypt.c: Support SHA-256/384/512.
133339 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
133341         * lib/getsubopt.c [!_LIBC]: Include config.h and getsubopt.h.
133342         * lib/memmem.c [!defined _LIBC]: Include config.h.
133344 2007-02-04  Bruno Haible  <bruno@clisp.org>
133346         * lib/string_.h (GL_LINK_WARNING2): Put the word "warning:" into the
133347         warning message.
133349 2007-02-04  Bruno Haible  <bruno@clisp.org>
133351         New module mbstok_r.
133352         * modules/mbstok_r: New file.
133353         * lib/mbstok_r.c: New file.
133354         * lib/string_.h (strtok_r): Change argument names to match the
133355         comments. Add a conditional link warning.
133356         (mbstok_r): New declaration.
133357         * m4/mbstok_r.m4: New file.
133358         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
133359         GNULIB_MBSTOK_R.
133360         * modules/string (string.h): Also substitute GNULIB_MBSTOK_R.
133361         * MODULES.html.sh (Internationalization functions): Add mbstok_r.
133363 2007-02-04  Bruno Haible  <bruno@clisp.org>
133365         New module mbsspn.
133366         * modules/mbsspn: New file.
133367         * lib/mbsspn.c: New file.
133368         * lib/string_.h (strspn): Add a conditional link warning.
133369         (mbsspn): New declaration.
133370         * m4/mbsspn.m4: New file.
133371         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
133372         GNULIB_MBSSPN.
133373         * modules/string (string.h): Also substitute GNULIB_MBSSPN.
133374         * MODULES.html.sh (Internationalization functions): Add mbsspn.
133376 2007-02-04  Bruno Haible  <bruno@clisp.org>
133378         New module mbspbrk.
133379         * modules/mbspbrk: New file.
133380         * lib/mbspbrk.c: New file.
133381         * lib/string_.h (strpbrk): Add a conditional link warning.
133382         (mbspbrk): New declaration.
133383         * m4/mbspbrk.m4: New file.
133384         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
133385         GNULIB_MBSPBRK.
133386         * modules/string (string.h): Also substitute GNULIB_MBSPBRK.
133387         * MODULES.html.sh (Internationalization functions): Add mbspbrk.
133389 2007-02-04  Bruno Haible  <bruno@clisp.org>
133391         New module mbscspn.
133392         * modules/mbscspn: New file.
133393         * lib/mbscspn.c: New file.
133394         * lib/string_.h (strcspn): Add a conditional link warning.
133395         (mbscspn): New declaration.
133396         * m4/mbscspn.m4: New file.
133397         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
133398         GNULIB_MBSCSPN.
133399         * modules/string (string.h): Also substitute GNULIB_MBSCSPN.
133400         * MODULES.html.sh (Internationalization functions): Add mbscspn.
133402 2007-02-04  Bruno Haible  <bruno@clisp.org>
133404         New module mbscasestr, reduced goal of strcasestr.
133405         * modules/mbscasestr: New file.
133406         * lib/mbscasestr.c: New file, copied from lib/strcasestr.c.
133407         (mbscasestr): Renamed from strcasestr.
133408         * lib/strcasestr.c: Don't include mbuiter.h.
133409         (strcasestr): Remove support for multibyte locales.
133410         * lib/string_.h (strcasestr): Don`t rename. Declare only if missing.
133411         Change the conditional link warning.
133412         (mbscasestr): New declaration.
133413         * m4/mbscasestr.m4: New file.
133414         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Enable the replacement only if
133415         the system does not have strcasestr. Set HAVE_STRCASESTR instead of
133416         REPLACE_STRCASESTR.
133417         (gl_PREREQ_STRCASESTR): Don't require gl_FUNC_MBRTOWC.
133418         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
133419         HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
133420         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSCASESTR.
133421         * modules/string (string.h): Also substitute GNULIB_MBSCASESTR.
133422         Substitute HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
133423         * modules/strcasestr (Files): Remove m4/mbrtowc.m4.
133424         (Depends-on): Remove mbuiter.
133425         * MODULES.html.sh (Internationalization functions): Add mbscasestr.
133427 2007-02-04  Bruno Haible  <bruno@clisp.org>
133429         Simplify handling of strncasecmp.
133430         * lib/string_.h (strncasecmp): Remove test for GNULIB_STRCASE. Change
133431         the conditional link warning.
133432         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
133433         HAVE_STRCASECMP, not REPLACE_STRCASECMP.
133434         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Don't initialize GNULIB_STRCASE.
133435         * modules/strcase (configure.ac): Don't invoke
133436         gl_STRING_MODULE_INDICATOR.
133437         * modules/string (string.h): Don't substitute GNULIB_STRCASE.
133439 2007-02-04  Bruno Haible  <bruno@clisp.org>
133441         New module mbscasecmp, reduced goal of strcasecmp.
133442         * modules/mbscasecmp: New file.
133443         * lib/mbscasecmp.c: New file, copied from lib/strcasecmp.c.
133444         (mbscasecmp): Renamed from strcasecmp.
133445         * lib/strcasecmp.c: Don't include mbuiter.h.
133446         (strcasecmp): Remove support for multibyte locales.
133447         * lib/string_.h (strcasecmp): Don`t rename. Declare only if missing.
133448         Change the conditional link warning.
133449         (mbscasecmp): New declaration.
133450         * m4/mbscasecmp.m4: New file.
133451         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Enable the replacement only if
133452         the system lacks strcasecmp. Set HAVE_STRCASECMP instead of
133453         REPLACE_STRCASECMP.
133454         (gl_PREREQ_STRCASECMP): Don't require gl_FUNC_MBRTOWC.
133455         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
133456         GNULIB_MBSCASECMP.
133457         * modules/string (string.h): Also substitute GNULIB_MBSCASECMP.
133458         Substitute HAVE_STRCASECMP instead of REPLACE_STRCASECMP.
133459         * modules/strcase (Files): Remove m4/mbrtowc.m4.
133460         (Depends-on): Remove mbuiter.
133461         * MODULES.html.sh (Internationalization functions): Add mbscasecmp.
133463 2007-02-04  Bruno Haible  <bruno@clisp.org>
133465         New module mbsstr. Remove module strstr.
133466         * modules/mbsstr: New file.
133467         * modules/strstr: Remove file.
133468         * lib/mbsstr.c: Renamed from lib/strstr.c.
133469         (mbsstr): Renamed from strstr.
133470         * lib/string_.h (strstr): Remove declaration. Change the conditional
133471         link warning.
133472         (mbsstr): New declaration.
133473         * m4/mbsstr.m4: New file.
133474         * m4/strstr.m4: Remove file.
133475         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Don't initialize
133476         REPLACE_STRSTR.
133477         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSSTR.
133478         Don't initialize GNULIB_STRSTR.
133479         * modules/string (string.h): Also substitute GNULIB_MBSSTR. Don't
133480         substitute GNULIB_STRSTR and REPLACE_STRSTR.
133481         * MODULES.html.sh (Internationalization functions): Add mbsstr.
133482         (Support for systems lacking ANSI C 89): Remove strstr.
133484 2007-02-04  Bruno Haible  <bruno@clisp.org>
133486         New module mbsrchr.
133487         * modules/mbsrchr: New file.
133488         * lib/mbsrchr.c: New file.
133489         * lib/string_.h (strrchr): Add a conditional link warning.
133490         (mbsrchr): New declaration.
133491         * m4/mbsrchr.m4: New file.
133492         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
133493         GNULIB_MBSRCHR.
133494         * modules/string (string.h): Also substitute GNULIB_MBSRCHR.
133495         * MODULES.html.sh (Internationalization functions): Add mbsrchr.
133497 2007-02-04  Bruno Haible  <bruno@clisp.org>
133499         New module mbschr.
133500         * modules/mbschr: New file.
133501         * lib/mbschr.c: New file.
133502         * lib/string_.h (strchr): Add a conditional link warning.
133503         (mbschr): New declaration.
133504         * m4/mbschr.m4: New file.
133505         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
133506         GNULIB_MBSCHR.
133507         * modules/string (string.h): Also substitute GNULIB_MBSCHR.
133508         * MODULES.html.sh (Internationalization functions): Add mbschr.
133510 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
133512         * lib/stdbool_.h: Mention that bool bit-fields aren't supported.
133514         * modules/stdarg (configure.ac-early): Require AC_PROG_CC_STDC.
133516 2007-02-04  Bruno Haible  <bruno@clisp.org>
133518         New module description section 'configure.ac-early'.
133519         * gnulib-tool (sed_extract_prog): Recognize configure.ac-early.
133520         (func_get_autoconf_early_snippet): New function.
133521         (func_import, func_create_testdir): Use it. Remove special cases for
133522         modules 'extensions' and 'lock'.
133523         * modules/extensions (configure.ac-early): Require
133524         gl_USE_SYSTEM_EXTENSIONS.
133525         * modules/lock (configure.ac-early): Require gl_LOCK_EARLY.
133527 2007-02-04  Bruno Haible  <bruno@clisp.org>
133529         Make use of gcj-4.3's -fsource and -ftarget option.
133530         * m4/javacomp.m4 (gt_JAVACOMP): Test whether gcj is in version >= 4.3,
133531         and if so try the options -fsource and -ftarget.
133532         * lib/javacomp.c (compile_using_gcj): Add fsource_option,
133533         source_version, ftarget_option, target_version arguments.
133534         (is_envjavac_gcj43, is_envjavac_gcj43_usable): New functions.
133535         (is_envjavac_oldgcj_14_14_usable): Renamed from
133536         is_envjavac_gcj_14_14_usable.
133537         (is_envjavac_oldgcj_14_13_usable): Renamed from
133538         is_envjavac_gcj_14_13_usable.
133539         (is_gcj_present): Update.
133540         (is_gcj_43, is_gcj43_usable): New functions.
133541         (is_oldgcj_14_14_usable): Renamed from is_gcj_14_14_usable. Update.
133542         (is_oldgcj_14_13_usable): Renamed from is_gcj_14_13_usable. Update.
133543         (compile_java_class): Test whether gcj is in version >= 4.3, and if so
133544         try the options -fsource and -ftarget.
133546 2007-02-03  Paul Eggert  <eggert@cs.ucla.edu>
133548         * lib/xalloc.h (x2nrealloc): Fix an unlikely bug in the overflow
133549         checking code.  Set N = ceil (1.5 * N) rather than to a slightly
133550         larger value.
133552 2007-02-03  Jim Meyering  <jim@meyering.net>
133554         Give tools a better chance to allocate space for very large buffers.
133555         * lib/xalloc.h (x2nrealloc): Use 3/2, not 2, as buffer size factor.
133557         Make pwd and readlink work also when run with an unreadable parent dir
133558         on systems with openat support.
133559         * lib/getcwd.c (__getcwd) [HAVE_PARTLY_WORKING_GETCWD]: Use the system
133560         provided getcwd function, even when we have openat support.
133561         Reported by Dmitry V. Levin in <http://bugzilla.redhat.com/227168>.
133563 2007-02-02  Bruno Haible  <bruno@clisp.org>
133565         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
133566         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): Provoke a link
133567         error only if GNULIB_POSIXCHECK is defined. Needed to avoid artificial
133568         portability problems if one of these functions is only used on specific
133569         platforms.
133570         Reported by Paul Eggert.
133572 2007-02-02  Paul Eggert  <eggert@cs.ucla.edu>
133574         Avoid mempcpy in the regex code, as the string.h mempcpy stuff
133575         is causing more trouble than it's curing.
133576         * lib/regex_internal.h (__mempcpy): Remove.
133577         * lib/regcomp.c (regerror): Rewrite to avoid the need for mempcpy
133578         (and make the code a tad smaller to boot).
133579         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for mempcpy.
133581 2007-02-02  Jim Meyering  <jim@meyering.net>
133583         * modules/arpa_inet: Put AC_PROG_MKDIR_P in the configure.ac:
133584         section, not in the Makefile.am: one.
133586 2007-02-02  Eric Blake  <ebb9@byu.net>
133588         * lib/strchrnul.c: Always include config.h first.
133590         * modules/mountlist (Depends-on): Revert 2007-01-31 change,
133591         gnulib strstr is not necessary here.
133593 2007-02-02  Simon Josefsson  <simon@josefsson.org>
133595         * m4/socklen.m4: Fix typo.
133597 2007-02-02  Eric Blake  <ebb9@byu.net>
133599         * modules/arpa_inet (Makefile.am): Use MKDIR_P to avoid races.
133600         * modules/netinet_in (Makefile.am): Likewise.
133602 2007-02-01  Bruno Haible  <bruno@clisp.org>
133604         * lib/string_.h (GL_LINK_WARNING): New macro.
133605         (strcasecmp, strstr, strcasestr): If provided by the system,
133606         conditionally define as a macro that leads to a warning instead of to
133607         an error.
133608         (strncasecmp): Conditionally define as a macro that leads to a warning.
133610 2007-02-01  Karl Berry  <karl@gnu.org>
133612         * config/srclist.txt (strtok_r.c): lose sync, no more strtok_r.h.
133614 2007-02-01  Bruno Haible  <bruno@clisp.org>
133616         * MODULES.html.sh (Unicode string functions): Update after 2007-01-27
133617         renamings.
133619 2007-02-01  Eric Blake  <ebb9@byu.net>
133621         * modules/regex (Depends-on): Revert dependence on mempcpy.
133622         * lib/regex_internal.h [! _LIBC && !__mempcpy]: Undo string
133623         module's definition of mempcpy.
133624         Reported by Paul Eggert.
133626 2007-02-01  Paul Eggert  <eggert@cs.ucla.edu>
133628         * lib/string_.h: If the gnulib module XYZ is not present, undefine
133629         the symbol XYZ before redefining it.  This fixes a problem with
133630         programs that don't use XYZ, when compiled on systems that define
133631         XYZ to something else.
133633 2007-01-31  Paul Eggert  <eggert@cs.ucla.edu>
133635         * lib/mkdir-p.c (make_dir_parents): Close a race condition that
133636         occurs when "mkdir -m foo" creates a setgid directory that is (1)
133637         writeable to group or other and (2) is intended to have a special
133638         mode bit that is set or cleared.  In such a case, the directory
133639         should be neither group- nor other-writeable until the special
133640         mode bits are right.
133642 2007-01-31  Eric Blake  <ebb9@byu.net>
133644         * modules/mountlist (Depends-on): Add strstr.
133646         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): Correct m4 usage
133647         bug.
133648         * modules/string (Makefile.am): Remove redundant replacement.
133649         * modules/regex (Depends-on): Add mempcpy.
133651 2007-01-31  Bruno Haible  <bruno@clisp.org>
133653         New module description field 'Link'.
133654         * gnulib-tool (func_usage): Document --extract-link-directive.
133655         (sed_extract_prog): Recognize 'Link' directive.
133656         (func_get_link_directive): New function.
133657         (func_import): Show summary of link directives.
133658         Handle --extract-link-directive option.
133659         * modules/acl (Link): New section.
133660         * modules/clock-time (Link): New section.
133661         * modules/euidaccess (Link): New section.
133662         * modules/gettext (Link): New section.
133663         * modules/iconv (Link): New section.
133664         * modules/lock (Link): New section.
133665         * modules/nanosleep (Link): New section.
133666         * modules/readline (Link): New section.
133668 2007-01-27  Bruno Haible  <bruno@clisp.org>
133670         Enforce the use of gnulib modules for unportable <string.h> functions.
133671         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): New macro.
133672         (gl_STRING_MODULE_INDICATOR_DEFAULTS): New macro.
133673         (gl_HEADER_STRING_H_BODY): Require it.
133674         * lib/string_.h: If the gnulib module XYZ is not present, redefine
133675         the symbol XYZ to one that gives a link error.
133676         * modules/string (Makefile.am): Also substitute the GNULIB_* variables.
133677         * modules/memmem (configure.ac): Invoke gl_STRING_MODULE_INDICATOR.
133678         * modules/mempcpy (configure.ac): Likewise.
133679         * modules/memrchr (configure.ac): Likewise.
133680         * modules/stpcpy (configure.ac): Likewise.
133681         * modules/stpncpy (configure.ac): Likewise.
133682         * modules/strcase (configure.ac): Likewise.
133683         * modules/strcasestr (configure.ac): Likewise.
133684         * modules/strchrnul (configure.ac): Likewise.
133685         * modules/strdup (configure.ac): Likewise.
133686         * modules/strndup (configure.ac): Likewise.
133687         * modules/strnlen (configure.ac): Likewise.
133688         * modules/strpbrk (configure.ac): Likewise.
133689         * modules/strsep (configure.ac): Likewise.
133690         * modules/strstr (configure.ac): Likewise.
133691         * modules/strtok_r (configure.ac): Likewise.
133693 2007-01-31  Jean-Louis Martineau  <martineau@zmanda.com>  (tiny change)
133695         * lib/gai_strerror.c (values): Add EAI_OVERFLOW.
133697 2007-01-30  Jim Meyering  <jim@meyering.net>
133699         * lib/mpsort.c (mpsort): Remove spurious "return" in void function.
133701 2007-01-29  Bruno Haible  <bruno@clisp.org>
133703         * lib/allocsa.h: Use '#if HAVE_*' instead of '#ifdef HAVE_*'.
133704         * lib/execute.c: Likewise.
133705         * lib/pipe.c: Likewise.
133706         * lib/printf-args.h: Likewise.
133707         * lib/printf-args.c: Likewise.
133708         * lib/printf-parse.c: Likewise.
133709         * lib/vasnprintf.c: Likewise.
133711 2007-01-29  Eric Blake  <ebb9@byu.net>
133713         * lib/memrchr.c: Assume <string.h> unconditionally, to pull in
133714         declaration.
133716 2007-01-29  Paul Eggert  <eggert@cs.ucla.edu>
133718         * lib/strptime.h (strptime): Use 'restrict' for args where
133719         POSIX requires this.
133720         * lib/strptime.c (strptime): Likewise.
133721         Change license notice from LGPL to GPL, since gnulib-tool will
133722         change this as needed.
133723         Include <config.h> if _LIBC is not defined, not if HAVE_CONFIG_H is
133724         defined.
133725         Include "strptime.h" first, to check interface.
133726         Do not #undef _LIBC and _NL_CURRENT.
133727         Do not include <stdlib.h>; no longer needed.
133728         Include "time_r.h" and declare ptime_locale_status
133729         only if _LIBC is not defined.
133730         (__P): Remove unused macro.
133731         (match_string): Bring back glibc version, but use it only if _LIBC
133732         is defined.
133733         (__strptime_internal): Compile tm_gmtoff code if _LIBC is defined, too.
133734         Remove unnecessary assertion and abort() call.
133735         Use #ifdef _NL_CURRENT rather than #if 0, for benefit of glibc.
133736         * m4/strptime.m4: Fix serial number comment.
133737         (gl_FUNC_STRPTIME): Require AC_C_RESTRICT, gl_TM_GMTOFF.
133738         * modules/strptime (Files): Add m4/tm_gmtoff.m4.
133739         (Depends-on): Add time_r.
133741 2007-01-29  Bruno Haible  <bruno@clisp.org>
133743         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
133744         strptime.
133745         * modules/strptime (Depends-on): Add stdbool.
133746         * lib/strptime.h: Include <time.h> always. Add comments.
133748 2007-01-29  Yoann Vandoorselaere  <yoann@prelude-ids.org>
133750         * modules/strptime: New file.
133751         * lib/strptime.h: New file.
133752         * lib/strptime.c: New file.
133753         * m4/strptime.m4: New file.
133755 2007-01-28  Paul Eggert  <eggert@cs.ucla.edu>
133757         * MODULES.html.sh: New module mpsort.
133758         * lib/mpsort.c, lib/mpsort.h, m4/mpsort.m4, modules/mpsort: New files.
133760         * lib/regex.h (_Restrict_): Renamed from __restrict, to avoid
133761         a circularity problem with HP-UX ia64 reported by Bob Proulx in
133762         <http://lists.gnu.org/r/bug-gnulib/2007-01/msg00394.html>.
133763         All uses changed.
133764         (_Restrict_arr_): Renamed from __restrict_arr, for similar reasons.
133765         All uses changed.
133766         * lib/regcomp.c, lib/regexec.c: Change all uses from __restrict
133767         to _Restrict_.
133768         * lib/regexec.c (regexec): Declare pmatch with _Restrict_arr_, so that
133769         the parameter matches the prototype.
133771 2007-01-28  Jim Meyering  <jim@meyering.net>
133773         * modules/sys_time (Makefile.am) [MOSTLYCLEANFILES]: Do use
133774         sys/time.h here, reverting that part of the previous patch:
133775         <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/8959>.
133777 2007-01-28  Bruno Haible  <bruno@clisp.org>
133779         * modules/sys_time (Makefile.am): Build sys/time.h only when it's the
133780         value of $(SYS_TIME_H).
133781         [MOSTLYCLEANFILES]: Now that sys/time.h is created only when needed,
133782         remove it conditionally, too. [added by Jim Meyering]
133783         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Set SYS_TIME_H.
133784         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
133785         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Set SYS_TIME_H when setting
133786         GETTIMEOFDAY_REPLACEMENT to 1.
133788 2007-01-28  Bruno Haible  <bruno@clisp.org>
133790         * m4/unistd_h.m4 (gl_HEADER_UNISTD_DEFAULTS): New macro.
133791         (gl_HEADER_UNISTD): Require it. Don't set UNISTD_H to empty here.
133792         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_HEADER_UNISTD_DEFAULTS.
133793         Set UNISTD_H instead of UNISTD_H2.
133794         * modules/fchdir (BUILT_SOURCES): Drop $(UNISTD_H2).
133796 2007-01-28  Bruno Haible  <bruno@clisp.org>
133798         * modules/mbchar (Makefile.am): Add mbchar.c to lib_SOURCES.
133799         * m4/mbchar.m4 (gl_MBCHAR): Remove AC_LIBOBJ invocation.
133801 2007-01-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
133803         * gnulib-tool (func_emit_lib_Makefile_am, func_add_or_update)
133804         (func_create_testdir): Ensure C locale for `grep' and `tr'
133805         character ranges.
133806         (func_create_megatestdir): Avoid one `grep'.  Fix bug in
133807         ACLOCAL_AMFLAGS parsing state machine.
133809 2007-01-27  Bruno Haible  <bruno@clisp.org>
133811         * modules/unistr/base: Update.
133813 2007-01-27  Bruno Haible  <bruno@clisp.org>
133815         Rename u32-mbtouc -> u32-mbtouc-unsafe, u32-mbtouc-safe -> u32-mbtouc,
133816         u32_mbtouc -> u32_mbtouc_unsafe, u32_mbtouc_safe -> u32_mbtouc.
133817         * modules/unistr/u32-mbtouc-unsafe: Renamed from
133818         modules/unistr/u32-mbtouc.
133819         * lib/unistr/u32-mbtouc-unsafe.c: Renamed from lib/unistr/u32-mbtouc.c.
133820         * lib/unistr.h: Update.
133821         * lib/linebreak.c: Update.
133822         * modules/unistr/u32-mbtouc: Renamed from
133823         modules/unistr/u32-mbtouc-safe.
133824         * lib/unistr/u32-mbtouc.c: Renamed from lib/unistr/u32-mbtouc-safe.c.
133825         * lib/unistr.h: Update.
133826         * lib/unistr/u32-to-u8.c: Update.
133827         * lib/unistr/u32-to-u16.c: Update.
133829 2007-01-27  Bruno Haible  <bruno@clisp.org>
133831         Rename utf16-ucs4 -> utf16-ucs4-unsafe, utf16-ucs4-safe -> utf16-ucs4,
133832         u16_mbtouc -> u16_mbtouc_unsafe, u16_mbtouc_safe -> u16_mbtouc.
133833         * modules/utf16-ucs4-unsafe: Renamed from modules/utf16-ucs4.
133834         * lib/utf16-ucs4-unsafe.h: Renamed from lib/utf16-ucs4.h.
133835         * lib/unistr/utf16-ucs4-unsafe.c: Renamed from lib/unistr/utf16-ucs4.c.
133836         * modules/unistr/u16-mbtouc-unsafe: Renamed from
133837         modules/unistr/u16-mbtouc.
133838         * lib/unistr/u16-mbtouc-unsafe.c: Renamed from lib/unistr/u16-mbtouc.c.
133839         * lib/unistr.h: Update.
133840         * lib/linebreak.c: Update.
133841         * modules/linebreak: Update.
133842         * modules/utf16-ucs4: Renamed from modules/utf16-ucs4-safe.
133843         * lib/utf16-ucs4.h: Renamed from lib/utf16-ucs4-safe.h.
133844         * lib/unistr/utf16-ucs4.c: Renamed from lib/unistr/utf16-ucs4-safe.c.
133845         * modules/unistr/u16-mbtouc: Renamed from
133846         modules/unistr/u16-mbtouc-safe.
133847         * lib/unistr/u16-mbtouc.c: Renamed from lib/unistr/u16-mbtouc-safe.c.
133848         * lib/unistr.h: Update.
133849         * lib/unistr/u16-to-u8.c: Update.
133850         * modules/unistr/u16-to-u8: Update.
133851         * lib/unistr/u16-to-u32.c: Update.
133852         * modules/unistr/u16-to-u32: Update.
133854 2007-01-27  Bruno Haible  <bruno@clisp.org>
133856         Rename utf8-ucs4 -> utf8-ucs4-unsafe, utf8-ucs4-safe -> utf8-ucs4,
133857         u8_mbtouc -> u8_mbtouc_unsafe, u8_mbtouc_safe -> u8_mbtouc.
133858         * modules/utf8-ucs4-unsafe: Renamed from modules/utf8-ucs4.
133859         * lib/utf8-ucs4-unsafe.h: Renamed from lib/utf8-ucs4.h.
133860         * lib/unistr/utf8-ucs4-unsafe.c: Renamed from lib/unistr/utf8-ucs4.c.
133861         * modules/unistr/u8-mbtouc-unsafe: Renamed from
133862         modules/unistr/u8-mbtouc.
133863         * lib/unistr/u8-mbtouc-unsafe.c: Renamed from lib/unistr/u8-mbtouc.c.
133864         * lib/unistr.h: Update.
133865         * lib/striconveh.c: Update.
133866         * modules/striconveh: Update.
133867         * lib/linebreak.c: Update.
133868         * modules/linebreak: Update.
133869         * modules/utf8-ucs4: Renamed from modules/utf8-ucs4-safe.
133870         * lib/utf8-ucs4.h: Renamed from lib/utf8-ucs4-safe.h.
133871         * lib/unistr/utf8-ucs4.c: Renamed from lib/unistr/utf8-ucs4-safe.c.
133872         * modules/unistr/u8-mbtouc: Renamed from modules/unistr/u8-mbtouc-safe.
133873         * lib/unistr/u8-mbtouc.c: Renamed from lib/unistr/u8-mbtouc-safe.c.
133874         * lib/unistr.h: Update.
133875         * lib/striconveh.c: Update.
133876         * modules/striconveh: Update.
133877         * lib/unistr/u8-to-u16.c: Update.
133878         * modules/unistr/u8-to-u16: Update.
133879         * lib/unistr/u8-to-u32.c: Update.
133880         * modules/unistr/u8-to-u32: Update.
133882 2007-01-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
133884         Sync from Libtool.
133885         * lib/argz.c: Do not include strings.h nor memory.h, include
133886         string.h unconditionally.  Patch by Simon Josefsson.
133888 2007-01-27  Bruno Haible  <bruno@clisp.org>
133890         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): New macro, extracted
133891         from gl_HEADER_STRING_H_BODY.
133892         (gl_HEADER_STRING_H_BODY): Require it.
133893         * m4/memmem.m4 (gl_FUNC_MEMMEM): Require gl_HEADER_STRING_H_DEFAULTS.
133894         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Likewise.
133895         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Likewise.
133896         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Likewise.
133897         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
133898         * m4/strcase.m4 (gl_FUNC_STRCASECMP, gl_FUNC_STRNCASECMP): Likewise.
133899         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Likewise.
133900         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Likewise.
133901         * m4/strdup.m4 (gl_FUNC_STRDUP): Likewise.
133902         * m4/strndup.m4 (gl_FUNC_STRNDUP): Likewise.
133903         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Likewise.
133904         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Likewise.
133905         * m4/strsep.m4 (gl_FUNC_STRSEP): Likewise.
133906         * m4/strstr.m4 (gl_FUNC_STRSTR): Likewise.
133907         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
133909 2007-01-27  Bruno Haible  <bruno@clisp.org>
133911         * gnulib-tool (func_emit_lib_Makefile_am): If $for_test is true, turn
133912         check_PROGRAMS into noinst_PROGRAMS.
133913         (func_emit_tests_Makefile_am): Likewise. Also don't initialize
133914         check_PROGRAMS in this case.
133915         (func_import): Set for_test to false.
133916         (func_create_testdir): Set for_test to true.
133918 2007-01-27  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
133919             Bruno Haible  <bruno@clisp.org>
133921         * modules/strcasestr (Files): Remove lib/strcasestr.h.
133922         (Depends-on): Add string.
133923         (Includes): Use <string.h> instead of strcasestr.h.
133924         * modules/string (Makefile.am): Also substitute the value of
133925         REPLACE_STRCASESTR.
133926         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Don't define strcasestr here;
133927         assume strcasestr is declared in <string.h> not <strings.h>. Also
133928         set REPLACE_STRCASESTR.
133929         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Provide a default value for
133930         REPLACE_STRCASESTR.
133931         * lib/strcasestr.h: Remove file.
133932         * lib/strcasestr.c: Include <string.h> instead of strcasestr.h.
133933         * lib/string_.h (strcasestr): New declaration.
133935 2007-01-27  Bruno Haible  <bruno@clisp.org>
133937         * lib/string_.h: Use 'extern'.
133939 2007-01-27  Jim Meyering  <jim@meyering.net>
133941         * lib/regex_internal.c (re_string_reconstruct): Remove declaration
133942         of set-but-not-used local, "q".
133944         * lib/mempcpy.c: Include <config.h> before <string.h>.
133945         This fixes a compilation error on HP-UX, due to the system's
133946         "restrict"-using mempcpy prototype.
133948 2007-01-26  Bruno Haible  <bruno@clisp.org>
133950         Small optimization.
133951         * lib/javacomp.c: Include c-strstr.h.
133952          (is_envjavac_gcj): Use c_strstr instead of strstr.
133953         * modules/javacomp (Depends-on): Add c-strstr, remove strstr.
133955 2007-01-26  Bruno Haible  <bruno@clisp.org>
133957         * MODULES.html.sh (Unicode string functions): Add the new modules.
133959         * modules/uniconv/u32-strconv-to-locale: New file.
133960         * lib/uniconv/u32-strconv-to-locale.c: New file.
133962         * modules/uniconv/u16-strconv-to-locale: New file.
133963         * lib/uniconv/u16-strconv-to-locale.c: New file.
133965         * modules/uniconv/u8-strconv-to-locale: New file.
133966         * lib/uniconv/u8-strconv-to-locale.c: New file.
133968         * modules/uniconv/u32-strconv-from-locale: New file.
133969         * lib/uniconv/u32-strconv-from-locale.c: New file.
133971         * modules/uniconv/u16-strconv-from-locale: New file.
133972         * lib/uniconv/u16-strconv-from-locale.c: New file.
133974         * modules/uniconv/u8-strconv-from-locale: New file.
133975         * lib/uniconv/u8-strconv-from-locale.c: New file.
133977         * modules/uniconv/u32-strconv-to-enc: New file.
133978         * lib/uniconv/u32-strconv-to-enc.c: New file.
133979         * modules/uniconv/u32-strconv-to-enc-tests: New file.
133980         * tests/uniconv/test-u32-strconv-to-enc.c: New file.
133982         * modules/uniconv/u16-strconv-to-enc: New file.
133983         * lib/uniconv/u16-strconv-to-enc.c: New file.
133984         * lib/uniconv/u-strconv-to-enc.h: New file.
133985         * modules/uniconv/u16-strconv-to-enc-tests: New file.
133986         * tests/uniconv/test-u16-strconv-to-enc.c: New file.
133988         * modules/uniconv/u8-strconv-to-enc: New file.
133989         * lib/uniconv/u8-strconv-to-enc.c: New file.
133990         * modules/uniconv/u8-strconv-to-enc-tests: New file.
133991         * tests/uniconv/test-u8-strconv-to-enc.c: New file.
133993         * modules/uniconv/u32-strconv-from-enc: New file.
133994         * lib/uniconv/u32-strconv-from-enc.c: New file.
133995         * modules/uniconv/u32-strconv-from-enc-tests: New file.
133996         * tests/uniconv/test-u32-strconv-from-enc.c: New file.
133998         * modules/uniconv/u16-strconv-from-enc: New file.
133999         * lib/uniconv/u16-strconv-from-enc.c: New file.
134000         * modules/uniconv/u16-strconv-from-enc-tests: New file.
134001         * tests/uniconv/test-u16-strconv-from-enc.c: New file.
134003         * modules/uniconv/u8-strconv-from-enc: New file.
134004         * lib/uniconv/u8-strconv-from-enc.c: New file.
134005         * lib/uniconv/u-strconv-from-enc.h: New file.
134006         * modules/uniconv/u8-strconv-from-enc-tests: New file.
134007         * tests/uniconv/test-u8-strconv-from-enc.c: New file.
134009         * modules/uniconv/u32-conv-from-enc: New file.
134010         * lib/uniconv/u32-conv-from-enc.c: New file.
134011         * modules/uniconv/u32-conv-from-enc-tests: New file.
134012         * tests/uniconv/test-u32-conv-from-enc.c: New file.
134014         * modules/uniconv/u16-conv-from-enc: New file.
134015         * lib/uniconv/u16-conv-from-enc.c: New file.
134016         * lib/uniconv/u-conv-from-enc.h: New file.
134017         * modules/uniconv/u16-conv-from-enc-tests: New file.
134018         * tests/uniconv/test-u16-conv-from-enc.c: New file.
134020         * modules/uniconv/u8-conv-from-enc: New file.
134021         * lib/uniconv/u8-conv-from-enc.c: New file.
134022         * modules/uniconv/u8-conv-from-enc-tests: New file.
134023         * tests/uniconv/test-u8-conv-from-enc.c: New file.
134025         * modules/uniconv/base: New file.
134026         * lib/uniconv.h: New file.
134028 2007-01-26  Paul Eggert  <eggert@cs.ucla.edu>
134030         * doc/gnulib-tool.texi (Initial import): Update to match current
134031         behavior with strdup module.
134032         * lib/.cppi-disable: Remove strcase.h, strdup.h, strndup.h, strnlen.h.
134033         * lib/memmem.h: Remove; all uses removed.  This is now done
134034         by <string.h>.
134035         * lib/mempcpy.h: Likewise.
134036         * lib/memrchr.h: Likewise.
134037         * lib/stpcpy.h: Likewise.
134038         * lib/stpncpy.h: Likewise.
134039         * lib/strcase.h: Likewise.
134040         * lib/strchrnul.h: Likewise.
134041         * lib/strdup.h: Likewise.
134042         * lib/strndup.h: Likewise.
134043         * lib/strnlen.h: Likewise.
134044         * lib/strpbrk.h: Likewise.
134045         * lib/strsep.h: Likewise.
134046         * lib/strstr.h: Likewise.
134047         * lib/strtok_r.h: Likewise.
134048         * lib/string_.h: New file.
134049         * lib/argp-namefrob.h: Don't include no-longer-existent include files.
134050         Rely on <string.h> instead.
134051         * lib/canon-host.c: Likewise.
134052         * lib/chdir-long.c: Likewise.
134053         * lib/concatpath.c: Likewise.
134054         * lib/exclude.c: Likewise.
134055         * lib/fchdir.c: Likewise.
134056         * lib/getaddrinfo.c: Likewise.
134057         * lib/getcwd.c: Likewise.
134058         * lib/getsubopt.c: Likewise.
134059         * lib/glob.c: Likewise.
134060         * lib/hard-locale.c: Likewise.
134061         * lib/iconvme.c: Likewise.
134062         * lib/javacomp.c: Likewise.
134063         * lib/mempcpy.c: Likewise.
134064         * lib/memrchr.c: Likewise.
134065         * lib/regex_internal.h: Likewise.
134066         * lib/stpncpy.c: Likewise.
134067         * lib/strcasecmp.c: Likewise.
134068         * lib/strchrnul.c: Likewise.
134069         * lib/strdup.c: Likewise.
134070         * lib/striconv.c: Likewise.
134071         * lib/striconveh.c: Likewise.
134072         * lib/striconveha.c: Likewise.
134073         * lib/strncasecmp.c: Likewise.
134074         * lib/strndup.c: Likewise.
134075         * lib/strnlen.c: Likewise.
134076         * lib/strsep.c: Likewise.
134077         * lib/strstr.c: Likewise.
134078         * lib/strtok_r.c: Likewise.
134079         * lib/userspec.c: Likewise.
134080         * lib/w32spawn.h: Likewise.
134081         * lib/xstrndup.c: Likewise.
134082         * lib/mountlist.c (strstr): Remove decl.
134083         * m4/string_h.m4: New file.
134084         * m4/memmem.m4 (gl_FUNC_MEMMEM): Set HAVE_DECL_MEMMEM if necessary.
134085         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Set HAVE_MEMPCPY if necessary.
134086         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Set HAVE_MEMRCHR
134087         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Set HAVE_STPCPY if necessary.
134088         * m4/stpncpy.m4 (gl_PREREQ_STPNCPY): Set HAVE_STPNCPY if necessary.
134089         * m4/strcase.m4 (gl_FUNC_STRCASECMP):
134090         Set REPLACE_STRCASECMP if necessary.
134091         (gl_FUNC_STRNCASECMP): Set HAVE_DECL_STRNCASECMP if necessary.
134092         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Set HAVE_STRCHRNUL if necessary.
134093         * m4/strdup.m4 (gl_FUNC_STRDUP): Set HAVE_DECL_STRDUP if necessary.
134094         * m4/strndup.m4 (gl_FUNC_STRNDUP): Set HAVE_DECL_STRNLEN and
134095         HAVE_DECL_STRDUP if necessary.
134096         (gl_PREREQ_STRNLEN): Don't bother to check for strnlen decl,
134097         since gl_FUNC_STRNDUP does that now.
134098         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Set HAVE_DECL_STRNLEN if necessary.
134099         Check for decl here...
134100         (gl_PREREQ_STRNLEN): ... not here.
134101         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Set HAVE_STRPBRK if necessary.
134102         * m4/strsep.m4 (gl_FUNC_STRSEP): Set HAVE_STRSEP if necessary.
134103         * m4/strstr.m4 (gl_FUNC_STRSTR): Set REPLACE_STRSTR if necessary.
134104         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Set HAVE_DECL_STRTOK_R if
134105         necessary.
134106         * modules/string: New file.
134107         * modules/memmem (Files): Remove special-purpose include file.
134108         (Depends-on): Add string.
134109         (Include): Include <string.h>, not the removed file.
134110         * modules/mempcpy: Likewise.
134111         * modules/memrchr: Likewise.
134112         * modules/stpcpy: Likewise.
134113         * modules/stpncpy: Likewise.
134114         * modules/strcase: Likewise.
134115         * modules/strchrnul: Likewise.
134116         * modules/strdup: Likewise.
134117         * modules/strndup: Likewise.
134118         * modules/strnlen: Likewise.
134119         * modules/strpbrk: Likewise.
134120         * modules/strsep: Likewise.
134121         * modules/strstr: Likewise.
134122         * modules/strtok_r: Likewise.
134123         * tests/test-dirname.c: Don't include "strdup.h", since
134124         <string.h> now suffices.
134125         * tests/test-memmem.c: Don't include "memmem.h", since
134126         <string.h> now suffices.
134128 2007-01-25  Bruno Haible  <bruno@clisp.org>
134130         * lib/striconveh.c (mem_cd_iconveh_internal): Ignore *lengthp if
134131         *resultp is 0.
134133         * lib/unistr/u16-to-u8.c (u16_to_u8): Fix u8_uctomb invocation.
134134         * lib/unistr/u32-to-u8.c (u32_to_u8): Likewise.
134135         * lib/unistr/u8-to-u16.c (u8_to_u16): Fix u16_uctomb invocation.
134136         * lib/unistr/u32-to-u16.c (u32_to_u16): Likewise.
134138         * modules/unistr/u8-to-u16 (Depends-on): Add missing modules.
134139         * modules/unistr/u8-to-u32 (Depends-on): Add missing modules.
134140         * modules/unistr/u16-to-u8 (Depends-on): Add missing modules.
134141         * modules/unistr/u16-to-u32 (Depends-on): Add missing modules.
134142         * modules/unistr/u32-to-u8 (Depends-on): Add missing modules.
134143         * modules/unistr/u32-to-u16 (Depends-on): Add missing modules.
134145 2007-01-24  Bruno Haible  <bruno@clisp.org>
134147         Don't AC_REQUIRE autoconf macros that invoke AC_LIBOBJ. See
134148         <http://lists.gnu.org/r/bug-gnulib/2006-10/msg00279.html>.
134149         * m4/argp.m4 (gl_ARGP): Invoke, don't require, gl_GETOPT_SUBSTITUTE.
134150         * m4/fts.m4 (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): Invoke, don't require,
134151         gl_FUNC_FTS_CORE.
134152         (gl_FUNC_FTS_CORE): Invoke, don't require, gl_FUNC_OPENAT.
134153         * m4/lstat.m4 (gl_FUNC_LSTAT): Invoke, don't require,
134154         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
134155         * m4/memcmp.m4 (gl_FUNC_MEMCMP): Invoke, don't require, AC_FUNC_MEMCMP.
134156         * m4/mktime.m4 (gl_FUNC_MKTIME): Invoke, don't require, AC_FUNC_MKTIME.
134157         * m4/openat.m4 (gl_FUNC_OPENAT): Invoke, don't require,
134158         gl_FUNC_FCHOWNAT.
134159         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Invoke, don't require,
134160         gl_FUNC_STRFTIME.
134161         * m4/strtod.m4 (gl_FUNC_STRTOD): Invoke, don't require, AC_FUNC_STRTOD.
134162         Reported by Ralf Wildenhues.
134164 2007-01-24  Bruno Haible  <bruno@clisp.org>
134166         Drop AC_REQUIRE calls that are redundant with the module dependencies.
134167         * m4/canon-host.m4 (gl_PREREQ_CANON_HOST): Don't require
134168         gl_GETADDRINFO.
134169         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Don't require AM_STDBOOL_H,
134170         gl_FUNC_MEMPCPY, gl_FUNC_OPENAT, gl_FUNC_MEMRCHR.
134171         * m4/openat.m4 (gl_PREREQ_OPENAT): Don't require gl_SAVE_CWD.
134173 2007-01-24  Paul Eggert  <eggert@cs.ucla.edu>
134175         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Add test for glibc bug 361.
134176         Don't use 'exit'; just return from 'main'.
134177         (_AC_LIBOBJ_FNMATCH): Check for headers and functions just once.
134179         * lib/fnmatch_.h: Readjust white space and comments to match
134180         glibc, to avoid spurious diffs.
134182 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
134184         * lib/fnmatch_loop.c (internal_fnmatch) [!_LIBC]: #if-out the
134185         2004-12-01 change by Jakub Jelinek, since this code won't compile
134186         if !LIBC.  Problem reported by Bob Proulx.
134188 2007-01-23  Bruno Haible  <bruno@clisp.org>
134190         * lib/striconveh.c: Include c-strcaseeq.h.
134191         (mem_iconveh, str_iconveh): Use STRCASEEQ instead of c_strcasecmp.
134192         * modules/striconveh (Depends-on): Add c-strcaseeq.
134194 2007-01-23  Bruno Haible  <bruno@clisp.org>
134196         * MODULES.html.sh (String handling): Add streq, c-strcaseeq.
134198         * modules/c-strcaseeq: New file.
134199         * lib/c-strcaseeq.h: New file.
134201         * modules/streq: New file.
134202         * lib/streq.h: New file.
134204 2007-01-23  Bruno Haible  <bruno@clisp.org>
134206         * modules/striconveha-tests: New file.
134207         * tests/test-striconveha.c: New file.
134209         * lib/striconveha.h: Include <stdbool.h>.
134210         (mem_iconveha, str_iconveha): Add 'transliterate' argument.
134211         * lib/striconveha.c: Include allocsa.h, strdup.h, c-strcase.h.
134212         (mem_iconveha_notranslit): Renamed from mem_iconveha.
134213         (mem_iconveha): New function.
134214         (str_iconveha_notranslit): Renamed from str_iconveha.
134215         (str_iconveha): New function.
134216         * modules/striconveha (Depends-on): Add stdbool, allocsa, strdup,
134217         c-strcase.
134219 2007-01-23  Bruno Haible  <bruno@clisp.org>
134221         * lib/striconveha.c (mem_iconveha): Fix endless recursion. Try all
134222         encodings without forgiving before trying any encoding with handler.
134223         (str_iconveha): Try all encodings without forgiving before trying any
134224         encoding with handler.
134226 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
134228         Import the following changes from libc.
134230         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
134232         * lib/fnmatch_loop.c: Adjust for changed secondary hash function.
134234         2004-12-01  Jakub Jelinek  <jakub@redhat.com>
134236         * lib/fnmatch_loop.c (internal_fnmatch): Clear is_seqval after
134237         normal_bracket label.
134239         2004-09-01  Jakub Jelinek  <jakub@redhat.com>
134241         [BZ #361]
134242         * lib/fnmatch_loop.c (FCT): For backslash between brackets, branch
134243         to normal_bracket after fetching the next character.
134245 2007-01-22  Bruno Haible  <bruno@clisp.org>
134247         * lib/striconveh.h (mem_cd_iconveh, mem_iconveh): Add 'offsets'
134248         argument.
134249         * lib/striconveh.c (iconv_carefully_1): New function.
134250         (mem_cd_iconveh_internal, mem_cd_iconveh, mem_iconveh): Add 'offsets'
134251         argument.
134252         (str_cd_iconveh): Update.
134253         * lib/striconveha.h (mem_iconveha): Add 'offsets' argument.
134254         * lib/striconveha.c (mem_iconveha): Add 'offsets' argument.
134255         * tests/test-striconveh.c (MAGIC): New macro.
134256         (new_offsets): New function.
134257         (main): Test call with and without offsets.
134259 2007-01-22  Bruno Haible  <bruno@clisp.org>
134261         * modules/sys_stat (Makefile.am): Use @MKDIR_P@ instead of $(MKDIR_P).
134262         * modules/sys_select (Makefile.am): Likewise.
134263         * modules/sys_socket (Makefile.am): Likewise.
134264         * modules/sys_time (Makefile.am): Likewise.
134266 2007-01-22  Paul Eggert  <eggert@cs.ucla.edu>
134268         * modules/gettimeofday (License): Change from GPL to LGPL, since
134269         gettimeofday is a library function.
134271 2007-01-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
134273         * lib/poll.c (rpl_poll): Don't check against FD_SETSIZE under Win32.
134275 2007-01-21  Bruno Haible  <bruno@clisp.org>
134277         * m4/gnulib-common.m4 (AC_PROG_MKDIR_P): New macro.
134279 2007-01-21  Bruno Haible  <bruno@clisp.org>
134281         * modules/striconveha: New file.
134282         * lib/striconveha.h: New file.
134283         * lib/striconveha.c: New file.
134284         * MODULES.html.sh (Internationalization functions): Add striconveha.
134285         * lib/striconv.c (str_iconv): Optimize the case of an empty input
134286         string.
134287         * lib/striconveh.c (mem_iconveh, str_iconveh): Likewise.
134289 2007-01-21  Bruno Haible  <bruno@clisp.org>
134291         * lib/striconv.c (str_iconv): Guarantee errno is set when strdup fails.
134292         * lib/striconveh.c (str_iconveh): Likewise.
134294 2007-01-21  Bruno Haible  <bruno@clisp.org>
134296         * lib/striconveh.h (mem_iconveh): New declaration.
134297         * lib/striconveh.c (mem_iconveh): New function.
134298         * tests/test-striconveh.c (main): Add tests for mem_iconveh.
134300 2007-01-21  Bruno Haible  <bruno@clisp.org>
134302         * lib/xstriconv.h (xmem_cd_iconv): Change specification.
134304         * lib/striconveh.h (mem_cd_iconveh): Change specification.
134305         * lib/striconveh.c (mem_cd_iconveh): Don't free the user-supplied
134306         original result buffer.
134307         (str_cd_iconveh): Update.
134308         * tests/test-striconveh.c (main): Update.
134310         * lib/striconv.h (mem_cd_iconv): Change specification.
134311         * lib/striconv.c (mem_cd_iconv): Don't free the user-supplied original
134312         result buffer.
134313         (str_cd_iconv): Update.
134314         * tests/test-striconv.c (main): Update.
134316 2007-01-21  Bruno Haible  <bruno@clisp.org>
134318         * gnulib-tool: Fix test whether sed is GNU sed supporting --posix.
134320 2007-01-20  Jim Meyering  <jim@meyering.net>
134322         * lib/userspec.c (parse_with_separator): If a user or group string
134323         starts with "+", skip the corresponding name-to-ID look-up, since
134324         such a look-up must fail: user and group names may not include "+".
134326 2007-01-19  Paul Eggert  <eggert@cs.ucla.edu>
134328         * lib/poll.c: Include sys/time.h and time.h unconditionally,
134329         since we now assume the sys_time module.
134330         * m4/poll.m4 (gl_PREREQ_POLL): Don't require AC_HEADER_TIME or
134331         check for sys/time.h; no longer needed.
134332         * modules/poll (Depends-on): Depend on sys_time.
134334 2007-01-18  Bruno Haible  <bruno@clisp.org>
134336         * m4/mktime.m4 (AC_FUNC_MKTIME): Remove test for <sys/time.h>.
134337         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
134339         * m4/tempname.m4 (gl_PREREQ_TEMPNAME): Remove tests for sys/time.h and
134340         gettimeofday.
134342         * tests/test-gettimeofday.c: Include <time.h>.
134343         (dummy): Remove variable.
134345         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Renamed from
134346         gl_HEADER_SYS_TIME_H.
134347         (gl_HEADER_SYS_TIME_H): New macro.
134349         * lib/sys_time_.h: Test GETTIMEOFDAY_REPLACEMENT instead of
134350         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
134351         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY,
134352         gl_FUNC_GETTIMEOFDAY_CLOBBER): Set GETTIMEOFDAY_REPLACEMENT instead of
134353         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
134354         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H): Initialize
134355         GETTIMEOFDAY_REPLACEMENT instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE
134356         and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
134357         * modules/sys_time (sys/time.h): Substitute GETTIMEOFDAY_REPLACEMENT
134358         instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and
134359         GETTIMEOFDAY_CLOBBERS_LOCALTIME.
134361         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Undo the
134362         last change; it caused a compilation error when cross-compiling to
134363         Cygwin.
134365 2007-01-18  Jim Meyering  <jim@meyering.net>
134367         Use "$(MKDIR_P) sys", not race-prone "test -d sys || mkdir sys".
134368         * modules/sys_stat (Makefile.am): Use "$(MKDIR_P) sys", rather
134369         than the race-prone "test -d sys || mkdir sys".
134370         (configure.ac): Use AC_PROG_MKDIR_P.
134371         * modules/sys_select: Likewise.
134372         * modules/sys_socket: Likewise.
134373         * modules/sys_time: Likewise.
134375 2007-01-18  Eric Blake  <ebb9@byu.net>
134377         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Also
134378         replace gettimeofday.
134379         * lib/gettimeofday.c (rpl_gettimeofday): Declare with replacement
134380         name, to avoid infinite recursion.
134382 2007-01-17  Paul Eggert  <eggert@cs.ucla.edu>
134384         * MODULES.html.sh (Support for systems lacking POSIX:2001): New
134385         module sys_time.
134386         * lib/gethrxtime.c: Include <sys/time.h>, since we can no longer
134387         assume timespec.h defines struct timeval.
134388         * lib/settime.c: Likewise.
134389         * lib/utimens.c: Likewise.
134390         * lib/gettime.c (gettime): Remove test against HAVE_GETTIMEOFDAY,
134391         since we now assume the gettimeofday module.
134392         * lib/tempname.c (__gen_tempname): Likewise.
134393         * lib/gettimeofday.h: Remove.
134394         * lib/gettimeofday.c: Include <sys/time.h> instead of "gettimeofday.h".
134395         Don't include <sys/types.h> and <stdlib.h>; shouldn't be needed.
134396         Include <time.h>, for 'time()'.
134397         (localtime_buffer_addr): Also use this workaround if
134398         TZSET_CLOBBERS_LOCALTIME.  Set to a dummy static variable by default,
134399         to simplify the uses.  All uses changed.
134400         (localtime, gmtime, tzset, gettimeofday): Reformat slightly so
134401         that #undef is inside {}, and 'const' follows type name consistently.
134402         (tzset): Define replacement only if TZSET_CLOBBERS_LOCALTIME.
134403         (gettimeofday): Do not use the maximum possible value for
134404         tv->tv_usec, since that might break usages other than ls.c.
134405         Instead, we'll leave ls.c alone.  This undoes today's patch
134406         by Bruno.  Add a compile-time warning for 1s-clock resolution;
134407         we've never observed the problem but might as well keep the
134408         canary.
134409         * lib/nanosleep.c: Include timespec.h first, for interface check.
134410         * lib/nanosleep.c: Include <sys/time.h> unconditionally, since we
134411         now assume the sys_time module.
134412         * lib/tempname.c: Likewise.
134413         * lib/timespec.h: Likewise.
134414         * lib/nanosleep.c: Don't worry about TIME_WITH_SYS_TIME; no longer
134415         needed.
134416         * lib/strftime.c: Likewise.
134417         * lib/timespec.h: Likewise.
134418         * lib/posixtm.c: Include posixtm.h first, for interface check.
134419         Don't worry about TM_IN_SYS_TIME; that's wayyy obsolete.
134420         * lib/posixtm.h: Include stdbool.h and time.h, for proper interface.
134421         * lib/strftime.c: Don't include <sys/types.h>; shouldn't be needed.
134422         * lib/sys_time_.h: New file.
134423         * lib/timespec.h (struct timespec): Use long int, not long.
134424         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
134425         (gl_FUNC_GETTIMEOFDAY_CLOBBER, gl_PREREQ_GETTIMEOFDAY):
134426         Remove obsolescent call to AC_HEADER_TIME.
134427         * m4/mktime.m4 (AC_FUNC_MKTIME): Likewise.
134428         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
134429         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
134430         * m4/timespec.m4 (gl_TIMESPEC, gl_CHECK_TYPE_STRUCT_TIMESPEC):
134431         Likewise.
134432         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Likewise.
134433         * m4/utimbuf.m4 (gl_CHECK_TYPE_STRUCT_UTIMBUF): Likewise.
134434         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): Move sys/time.h tests
134435         into the sys_time module.  Check for gettimeofday just once.
134436         Prefix our variables with gl_, not with ac_ or jm_.  Tighten test
134437         for gettimeofday signature to just check the signature.  Merely
134438         compile it, since linking doesn't test signature.  Improve test for
134439         whether gettimeofday.o is actually needed.
134440         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Renamed from
134441         AC_FUNC_GETTIMEOFDAY_CLOBBER.  All uses changed.  Use
134442         AC_RUN_IFELSE rather than AC_TRY_RUN.  If clobbering, set
134443         and define GETTIMEOFDAY_CLOBBERS_LOCALTIME.
134444         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Don't define
134445         GETTIMEOFDAY_CLOBBERS_LOCALTIME; that's gl_FUNC_GETTIMEOFDAY_CLOBBER's
134446         job.  Don't define tzset; that's gl_FUNC_TZSET_CLOBBER's job.
134447         * m4/mktime.m4 (AC_FUNC_MKTIME): Just include <time.h> rather
134448         than worrying about sys/time.h.
134449         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
134450         Don't bother worrying about TIME_WITH_SYS_TIME.
134451         * m4/stat-time.m4 (gl_STAT_TIME): Likewise.
134452         * m4/posixtm.m4 (gl_POSIXTM): Remove obsolescent call to AC_STRUCT_TM.
134453         * m4/sys_time_h.m4: New file.
134454         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Require gl_HEADER_SYS_TIME_H.
134455         Don't include sys/time.h.  Return from main rather than exiting.
134456         Define TZSET_CLOBBERS_LOCALTIME, for consistency with other names;
134457         all uses changed.
134458         * modules/gethrxtime (Depends-on): Add sys_time.
134459         * modules/gettime (Depends-on): Likewise.
134460         * modules/gettimeofday (Depends-on): Likewise.
134461         * modules/nanosleep (Depends-on): Likewise.
134462         * modules/settime (Depends-on): Likewise.
134463         * modules/tempname (Depends-on): Likewise.
134464         * modules/utimens (Depends-on): Likewise.
134465         * modules/gettimeofday (Files): Remove lib/gettimeofday.h.
134466         (Include): Change back to <sys/time.h>.
134467         (Maintainer): Add self.
134468         * modules/sys_time: New file.
134469         * modules/tempname (Depends-on): Add gettimeofday.
134470         * tests/test-gettimeofday.c: Include <sys/time.h>
134471         rather than gettimeofday.h.
134473 2007-01-17  Bruno Haible  <bruno@clisp.org>
134475         * gnulib-tool (func_get_license): Revert last patch. Instead, let
134476         the license default to GPL.
134477         (func_create_testdir): Don't complain if a module is LGPL and its
134478         tests module depends on GPLed modules.
134480 2007-01-17  Bruno Haible  <bruno@clisp.org>
134482         * lib/gettimeofday.c (gettimeofday): Add code for the case
134483         HAVE_GETTIMEOFDAY && !GETTIMEOFDAY_CLOBBERS_LOCALTIME. Use the
134484         maximum possible value for tv->tv_usec, rather than the minimum one.
134486 2005-10-08  Martin Lambers  <marlam@marlam.de>
134487 2005-10-08  Paul Eggert  <eggert@cs.ucla.edu>
134488 2007-01-16  Bruno Haible  <bruno@clisp.org>
134490         * modules/gettimeofday (Files): Add lib/gettimeofday.h.
134491         (configure.ac): Remove AC_FUNC_GETTIMEOFDAY_CLOBBER. Add
134492         gl_FUNC_GETTIMEOFDAY.
134493         (Include): Add gettimeofday.h.
134494         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): New macro.
134495         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't invoke gl_PREREQ_GETTIMEOFDAY.
134496         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Define
134497         GETTIMEOFDAY_CLOBBERS_LOCALTIME. Invoke gl_PREREQ_GETTIMEOFDAY here.
134498         (gl_PREREQ_GETTIMEOFDAY): Check for <sys/timeb.h> and _ftime.
134499         * lib/gettimeofday.h: New file.
134500         * lib/gettimeofday.c: Include <sys/timeb.h>.
134501         (localtime_buffer_addr, rpl_localtime, rpl_gmtime, rpl_tzset): Define
134502         only if GETTIMEOFDAY_CLOBBERS_LOCALTIME.
134503         (rpl_gettimeofday) [!HAVE_GETTIMEOFDAY]: Use _ftime() when available;
134504         fall back on time().
134506         * tests/test-gettimeofday.c: New file.
134507         * modules/gettimeofday-tests: New file.
134509 2007-01-16  Eric Blake  <ebb9@byu.net>
134511         * modules/fnmatch (Depends-on): Depend on wchar.
134512         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Assume <wchar.h>.
134513         * m4/fnmatch.m4: Likewise.
134514         * modules/mbchar (Makefile.am): Assume <wchar.h>.
134515         * m4/mbchar.m4: Likewise.
134516         * modules/mbswidth (Depends-on): Depend on wchar.
134517         * lib/mbswidth.c: Assume <wchar.h>.
134518         * m4/mbswidth.m4: Likewise.
134519         * modules/quotearg (Depends-on): Depend on wchar.
134520         * lib/quotearg.c: Assume <wchar.h>.
134521         * m4/quotearg.m4: Likewise.
134522         * modules/regex (Depends-on): Depend on wchar.
134523         * lib/regex_internal.h: Assume <wchar.h>.
134524         * m4/regex.m4: Likewise.
134525         * modules/stdint (Depends-on): Depend on wchar.
134526         * lib/stdint_.h [!defined WCHAR_MIN]: Assume <wchar.h>.
134527         * m4/stdint.m4: Likewise.
134528         * tests/test-stdint.c [HAVE_WINT_T]: Likewise.
134529         * modules/strftime (Depends-on): Depend on wchar.
134530         * lib/strftime.c (DO_MULTIBYTE): Assume <wchar.h>.
134531         * modules/strtol (Depends-on): Depend on wchar.
134532         * lib/strtol.c: Assume <wchar.h>.
134533         * modules/wcwidth (Depends-on): Depend on wchar.
134534         * lib/wcwidth.h: Assume <wchar.h>.
134535         * m4/wcwidth.m4: Likewise.
134537 2007-01-16  Bruno Haible  <bruno@clisp.org>
134539         * modules/csharpexec-script: New, created from...
134540         * modules/csharpexec: ... this.
134542 2007-01-16  Paolo Bonzini  <bonzini@gnu.org>
134544         * modules/javaexec-script: New, created from...
134545         * modules/javaexec: ... this.
134547 2007-01-16  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
134549         * modules/poll (Dependencies): Add sys_select.
134551 2007-01-15  Jim Meyering  <jim@meyering.net>
134553         * m4/readutmp.m4 (gl_READUTMP): Work around AIX 4.3 struct-
134554         redefinition bug when using both <utmp.h> and <utmpx.h> headers.
134555         * lib/readutmp.h: Likewise.  Reported by Daniel Richard G. in
134556         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/9415>.
134558 2007-01-15  Bruno Haible  <bruno@clisp.org>
134560         * modules/striconveh: New file.
134561         * lib/striconveh.h: New file.
134562         * lib/striconveh.c: New file.
134563         * MODULES.html.sh (Internationalization functions): Add striconveh.
134565         * modules/striconveh-tests: New file.
134566         * tests/test-striconveh.c: New file.
134568 2007-01-15  Bruno Haible  <bruno@clisp.org>
134570         * lib/striconv.c (str_cd_iconv): Use the first algorithm if iconv is
134571         not from GNU libiconv or GNU libc.
134573 2007-01-15  Bruno Haible  <bruno@clisp.org>
134575         * doc/gnulib-intro.texi (Copyright): Explain the different license
134576         terms for module descriptions, autoconf macros, tests, documentation.
134578 2007-01-14  Bruno Haible  <bruno@clisp.org>
134580         * modules/striconv-tests: New file.
134581         * tests/test-striconv.c: New file.
134583 2007-01-14  Bruno Haible  <bruno@clisp.org>
134585         * modules/iconv-tests: New file.
134586         * tests/test-iconv.c: New file.
134588 2007-01-14  Bruno Haible  <bruno@clisp.org>
134590         * gnulib-tool (func_get_license): For test modules, use the license of
134591         the main module.
134593 2007-01-14  Bruno Haible  <bruno@clisp.org>
134595         * modules/iconv (Include): Clarify that <iconv.h> can only be included
134596         if iconv is found to exist.
134598 2007-01-14  Bruno Haible  <bruno@clisp.org>
134600         * modules/c-ctype-tests: New file.
134601         * tests/test-c-ctype.c: New file.
134603 2007-01-14  Bruno Haible  <bruno@clisp.org>
134605         * modules/binary-io-tests: New file.
134606         * tests/test-binary-io.sh: New file.
134607         * tests/test-binary-io.c: New file.
134609 2007-01-14  Bruno Haible  <bruno@clisp.org>
134611         * modules/array-oset-tests: New file.
134612         * tests/test-array_oset.c: New file.
134614 2007-01-14  Bruno Haible  <bruno@clisp.org>
134616         * modules/array-list-tests: New file.
134617         * tests/test-array_list.c: New file.
134619 2007-01-14  Bruno Haible  <bruno@clisp.org>
134621         * gnulib-tool (func_create_testdir): Don't unnecessarily run configure
134622         and make.
134623         Reported by Simon Josefsson in
134624         <http://lists.gnu.org/r/bug-gnulib/2007-01/msg00139.html>
134626 2007-01-14  Bruno Haible  <bruno@clisp.org>
134628         * modules/allocsa-tests: New file.
134629         * tests/test-allocsa.c: New file.
134631 2007-01-14  Bruno Haible  <bruno@clisp.org>
134633         * modules/fchdir (Depends-on): Add absolute-header.
134634         * modules/unistd (Depends-on): Likewise.
134636 2006-12-30  Bruno Haible  <bruno@clisp.org>
134638         * modules/fchdir: New file.
134639         * modules/unistd (Files): Add lib/unistd_.h.
134640         (Makefile.am): Generate unistd.h from unistd_.h.
134641         * lib/fchdir.c: New file.
134642         * lib/dirent_.h: New file.
134643         * lib/unistd_.h: New file.
134644         * lib/fcntl_.h (open) [FCHDIR_REPLACEMENT]: New replacement.
134645         * m4/fchdir.m4: New file.
134646         * m4/unistd_h.m4 (gl_PREREQ_UNISTD): New macro.
134647         (gl_HEADER_UNISTD): Invoke it.
134648         * lib/dup-safer.c (dup_safer) [FCHDIR_REPLACEMENT]: Use the dup
134649         function.
134650         * lib/backupfile.c (opendir, closedir): Undefine.
134651         * lib/chown.c (open, close): Undefine.
134652         * lib/clean-temp.c (open, close): Undefine.
134653         * lib/copy-file.c (open, close): Undefine.
134654         * lib/execute.c (open, close): Undefine.
134655         * lib/fsusage.c (open, close): Undefine.
134656         * lib/gc-gnulib.c (open, close): Undefine.
134657         * lib/getcwd.c (opendir, closedir): Undefine.
134658         * lib/glob.c (opendir, closedir): Undefine.
134659         * lib/javacomp.c (open, close): Undefine.
134660         * lib/mountlist.c (open, close, opendir, closedir): Undefine.
134661         * lib/openat-proc.c (open, close): Undefine.
134662         * lib/pagealign_alloc.c (open, close): Undefine.
134663         * lib/pipe.c (open, close): Undefine.
134664         * lib/progreloc.c (open, close): Undefine.
134665         * lib/savedir.c (opendir, closedir): Undefine.
134666         * lib/utime.c (open, close): Undefine.
134667         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add fchdir.
134669 2007-01-10  Bruno Haible  <bruno@clisp.org>
134671         * lib/striconv.c (mem_cd_iconv): Align the temporary buffer.
134673 2007-01-12  Eric Blake  <ebb9@byu.net>
134675         Provide a robust <wchar.h>.  Further simplifications are now
134676         possible in other modules, but not included here.
134677         * modules/wchar: New module.
134678         * m4/wchar.m4: New file.
134679         * lib/wchar_.h: Likewise.
134680         * modules/mbchar (Depends-on): Depend on wchar, as the first use
134681         of the new module.
134682         * MODULES.html.sh (Extended multibyte and wide character utilities):
134683         New section.
134685 2007-01-12  Paul Eggert  <eggert@cs.ucla.edu>
134687         * lib/xreadlink.c (SYMLINK_MAX) [!defined SYMLINK_MAX]: Define
134688         to a reasonable default for memory allocation.
134689         (xreadlink): Don't allocate a huge buffer, to work around a buggy
134690         file system that reports garbage st_size values for symlinks.
134691         Problem reported by Liyang Hu.
134693 2007-01-11  Simon Josefsson  <simon@josefsson.org>
134695         * gnulib-tool (func_all_modules): Exclude all .* files (e.g.,
134696         Emacs .#* auto-save files).
134698 2007-01-11  Bruno Haible  <bruno@clisp.org>
134700         * gnulib-tool (func_all_modules): Exclude all files inside the CVS
134701         directory.
134703 2007-01-10  Paul Eggert  <eggert@cs.ucla.edu>
134705         Use @...@ consistently in lib/wctype_.h.
134706         * lib/wctype_.h [HAVE_WINT_T]: Go back to using @...@, but rely
134707         on it being set to 1 or 0.
134708         * m4/wctype.m4 (gl_WCTYPE_H): Set HAVE_WINT_T to 1 or 0, and
134709         go back to AC_SUBSTing it.
134710         * modules/wctype (Makefile.am): Undo previous change.
134712 2007-01-10  Eric Blake  <ebb9@byu.net>
134714         * lib/wctype_.h [HAVE_WINT_T]: Rely on AC_DEFINE.
134715         * m4/wctype.m4 (gl_WCTYPE_H): No need to AC_SUBST(HAVE_WINT_T).
134716         * modules/wctype (Makefile.am): Likewise.
134717         Reported by Chris McGuire.
134719 2007-01-10  Jim Meyering  <jim@meyering.net>
134721         fts.c: a small readability/maintainability improvement
134722         * lib/fts.c (fts_read): Make this code slightly more readable and
134723         maintainable by hoisting the "sp->fts_cur = p" assignments to
134724         immediately follow the statements that set P.  Derived from
134725         the patch by Miloslav Trmac in http://bugzilla.redhat.com/222089.
134727 2007-01-10  Eric Blake  <ebb9@byu.net>
134729         * lib/wctype_.h [HAVE_WINT_T]: Include <stddef.h> before
134730         <wchar.h>, to work around BSDI bug in BSD/OS 4.0.1.
134731         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
134732         * m4/wint_t.m4 (gt_TYPE_WINT_T): Likewise.
134733         Reported by Chris McGuire.
134735 2007-01-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
134737         * gnulib-tool (func_all_modules): Use POSIX conforming escaping
134738         in sed script.
134740 2007-01-09  Bruno Haible  <bruno@clisp.org>
134742         * MODULES.html.sh: Accept options --cvs-urls, --git-urls.
134743         (repo_url_prefix, repo_url_suffix, repo_url_suffix_repl): New
134744         variables.
134745         (func_module): Use them.
134747 2007-01-09  Bruno Haible  <bruno@clisp.org>
134749         * modules/unistr/base: New file.
134750         * lib/unistr.h: New file.
134752         * modules/unistr/u8-to-u16: New file.
134753         * lib/unistr/u8-to-u16.c: New file.
134755         * modules/unistr/u8-to-u32: New file.
134756         * lib/unistr/u8-to-u32.c: New file.
134758         * modules/unistr/u16-to-u8: New file.
134759         * lib/unistr/u16-to-u8.c: New file.
134761         * modules/unistr/u16-to-u32: New file.
134762         * lib/unistr/u16-to-u32.c: New file.
134764         * modules/unistr/u32-to-u8: New file.
134765         * lib/unistr/u32-to-u8.c: New file.
134767         * modules/unistr/u32-to-u16: New file.
134768         * lib/unistr/u32-to-u16.c: New file.
134770         * modules/unistr/u8-check: New file.
134771         * modules/unistr/u16-check: New file.
134772         * modules/unistr/u32-check: New file.
134773         * lib/unistr/u8-check.c: New file.
134774         * lib/unistr/u16-check.c: New file.
134775         * lib/unistr/u32-check.c: New file.
134777         * modules/unistr/u8-chr: New file.
134778         * modules/unistr/u16-chr: New file.
134779         * modules/unistr/u32-chr: New file.
134780         * lib/unistr/u8-chr.c: New file.
134781         * lib/unistr/u16-chr.c: New file.
134782         * lib/unistr/u32-chr.c: New file.
134784         * modules/unistr/u8-cmp: New file.
134785         * modules/unistr/u16-cmp: New file.
134786         * modules/unistr/u32-cmp: New file.
134787         * lib/unistr/u8-cmp.c: New file.
134788         * lib/unistr/u16-cmp.c: New file.
134789         * lib/unistr/u32-cmp.c: New file.
134791         * modules/unistr/u8-cpy: New file.
134792         * modules/unistr/u16-cpy: New file.
134793         * modules/unistr/u32-cpy: New file.
134794         * lib/unistr/u8-cpy.c: New file.
134795         * lib/unistr/u16-cpy.c: New file.
134796         * lib/unistr/u32-cpy.c: New file.
134797         * lib/unistr/u-cpy.h: New file.
134799         * modules/unistr/u8-cpy-alloc: New file.
134800         * modules/unistr/u16-cpy-alloc: New file.
134801         * modules/unistr/u32-cpy-alloc: New file.
134802         * lib/unistr/u8-cpy-alloc.c: New file.
134803         * lib/unistr/u16-cpy-alloc.c: New file.
134804         * lib/unistr/u32-cpy-alloc.c: New file.
134805         * lib/unistr/u-cpy-alloc.h: New file.
134807         * modules/unistr/u8-endswith: New file.
134808         * modules/unistr/u16-endswith: New file.
134809         * modules/unistr/u32-endswith: New file.
134810         * lib/unistr/u8-endswith.c: New file.
134811         * lib/unistr/u16-endswith.c: New file.
134812         * lib/unistr/u32-endswith.c: New file.
134813         * lib/unistr/u-endswith.h: New file.
134815         * modules/unistr/u8-mblen: New file.
134816         * modules/unistr/u16-mblen: New file.
134817         * modules/unistr/u32-mblen: New file.
134818         * lib/unistr/u8-mblen.c: New file.
134819         * lib/unistr/u16-mblen.c: New file.
134820         * lib/unistr/u32-mblen.c: New file.
134822         * modules/unistr/u8-mbtouc: New file.
134823         * modules/unistr/u16-mbtouc: New file.
134824         * modules/unistr/u32-mbtouc: New file.
134825         * lib/unistr/u8-mbtouc.c: New file.
134826         * lib/unistr/u16-mbtouc.c: New file.
134827         * lib/unistr/u32-mbtouc.c: New file.
134829         * modules/unistr/u8-mbtouc-safe: New file.
134830         * modules/unistr/u16-mbtouc-safe: New file.
134831         * modules/unistr/u32-mbtouc-safe: New file.
134832         * lib/unistr/u8-mbtouc-safe.c: New file.
134833         * lib/unistr/u16-mbtouc-safe.c: New file.
134834         * lib/unistr/u32-mbtouc-safe.c: New file.
134836         * modules/unistr/u8-move: New file.
134837         * modules/unistr/u16-move: New file.
134838         * modules/unistr/u32-move: New file.
134839         * lib/unistr/u8-move.c: New file.
134840         * lib/unistr/u16-move.c: New file.
134841         * lib/unistr/u32-move.c: New file.
134842         * lib/unistr/u-move.h: New file.
134844         * modules/unistr/u8-next: New file.
134845         * modules/unistr/u16-next: New file.
134846         * modules/unistr/u32-next: New file.
134847         * lib/unistr/u8-next.c: New file.
134848         * lib/unistr/u16-next.c: New file.
134849         * lib/unistr/u32-next.c: New file.
134851         * modules/unistr/u8-prev: New file.
134852         * modules/unistr/u16-prev: New file.
134853         * modules/unistr/u32-prev: New file.
134854         * lib/unistr/u8-prev.c: New file.
134855         * lib/unistr/u16-prev.c: New file.
134856         * lib/unistr/u32-prev.c: New file.
134858         * modules/unistr/u8-set: New file.
134859         * modules/unistr/u16-set: New file.
134860         * modules/unistr/u32-set: New file.
134861         * lib/unistr/u8-set.c: New file.
134862         * lib/unistr/u16-set.c: New file.
134863         * lib/unistr/u32-set.c: New file.
134864         * lib/unistr/u-set.h: New file.
134866         * modules/unistr/u8-startswith: New file.
134867         * modules/unistr/u16-startswith: New file.
134868         * modules/unistr/u32-startswith: New file.
134869         * lib/unistr/u8-startswith.c: New file.
134870         * lib/unistr/u16-startswith.c: New file.
134871         * lib/unistr/u32-startswith.c: New file.
134872         * lib/unistr/u-startswith.h: New file.
134874         * modules/unistr/u8-stpcpy: New file.
134875         * modules/unistr/u16-stpcpy: New file.
134876         * modules/unistr/u32-stpcpy: New file.
134877         * lib/unistr/u8-stpcpy.c: New file.
134878         * lib/unistr/u16-stpcpy.c: New file.
134879         * lib/unistr/u32-stpcpy.c: New file.
134880         * lib/unistr/u-stpcpy.h: New file.
134882         * modules/unistr/u8-stpncpy: New file.
134883         * modules/unistr/u16-stpncpy: New file.
134884         * modules/unistr/u32-stpncpy: New file.
134885         * lib/unistr/u8-stpncpy.c: New file.
134886         * lib/unistr/u16-stpncpy.c: New file.
134887         * lib/unistr/u32-stpncpy.c: New file.
134888         * lib/unistr/u-stpncpy.h: New file.
134890         * modules/unistr/u8-strcat: New file.
134891         * modules/unistr/u16-strcat: New file.
134892         * modules/unistr/u32-strcat: New file.
134893         * lib/unistr/u8-strcat.c: New file.
134894         * lib/unistr/u16-strcat.c: New file.
134895         * lib/unistr/u32-strcat.c: New file.
134896         * lib/unistr/u-strcat.h: New file.
134898         * modules/unistr/u8-strchr: New file.
134899         * modules/unistr/u16-strchr: New file.
134900         * modules/unistr/u32-strchr: New file.
134901         * lib/unistr/u8-strchr.c: New file.
134902         * lib/unistr/u16-strchr.c: New file.
134903         * lib/unistr/u32-strchr.c: New file.
134905         * modules/unistr/u8-strcmp: New file.
134906         * modules/unistr/u16-strcmp: New file.
134907         * modules/unistr/u32-strcmp: New file.
134908         * lib/unistr/u8-strcmp.c: New file.
134909         * lib/unistr/u16-strcmp.c: New file.
134910         * lib/unistr/u32-strcmp.c: New file.
134912         * modules/unistr/u8-strcpy: New file.
134913         * modules/unistr/u16-strcpy: New file.
134914         * modules/unistr/u32-strcpy: New file.
134915         * lib/unistr/u8-strcpy.c: New file.
134916         * lib/unistr/u16-strcpy.c: New file.
134917         * lib/unistr/u32-strcpy.c: New file.
134918         * lib/unistr/u-strcpy.h: New file.
134920         * modules/unistr/u8-strcspn: New file.
134921         * modules/unistr/u16-strcspn: New file.
134922         * modules/unistr/u32-strcspn: New file.
134923         * lib/unistr/u8-strcspn.c: New file.
134924         * lib/unistr/u16-strcspn.c: New file.
134925         * lib/unistr/u32-strcspn.c: New file.
134926         * lib/unistr/u-strcspn.h: New file.
134928         * modules/unistr/u8-strdup: New file.
134929         * modules/unistr/u16-strdup: New file.
134930         * modules/unistr/u32-strdup: New file.
134931         * lib/unistr/u8-strdup.c: New file.
134932         * lib/unistr/u16-strdup.c: New file.
134933         * lib/unistr/u32-strdup.c: New file.
134934         * lib/unistr/u-strdup.h: New file.
134936         * modules/unistr/u8-strlen: New file.
134937         * modules/unistr/u16-strlen: New file.
134938         * modules/unistr/u32-strlen: New file.
134939         * lib/unistr/u8-strlen.c: New file.
134940         * lib/unistr/u16-strlen.c: New file.
134941         * lib/unistr/u32-strlen.c: New file.
134942         * lib/unistr/u-strlen.h: New file.
134944         * modules/unistr/u8-strmblen: New file.
134945         * modules/unistr/u16-strmblen: New file.
134946         * modules/unistr/u32-strmblen: New file.
134947         * lib/unistr/u8-strmblen.c: New file.
134948         * lib/unistr/u16-strmblen.c: New file.
134949         * lib/unistr/u32-strmblen.c: New file.
134951         * modules/unistr/u8-strmbtouc: New file.
134952         * modules/unistr/u16-strmbtouc: New file.
134953         * modules/unistr/u32-strmbtouc: New file.
134954         * lib/unistr/u8-strmbtouc.c: New file.
134955         * lib/unistr/u16-strmbtouc.c: New file.
134956         * lib/unistr/u32-strmbtouc.c: New file.
134958         * modules/unistr/u8-strncat: New file.
134959         * modules/unistr/u16-strncat: New file.
134960         * modules/unistr/u32-strncat: New file.
134961         * lib/unistr/u8-strncat.c: New file.
134962         * lib/unistr/u16-strncat.c: New file.
134963         * lib/unistr/u32-strncat.c: New file.
134964         * lib/unistr/u-strncat.h: New file.
134966         * modules/unistr/u8-strncmp: New file.
134967         * modules/unistr/u16-strncmp: New file.
134968         * modules/unistr/u32-strncmp: New file.
134969         * lib/unistr/u8-strncmp.c: New file.
134970         * lib/unistr/u16-strncmp.c: New file.
134971         * lib/unistr/u32-strncmp.c: New file.
134973         * modules/unistr/u8-strncpy: New file.
134974         * modules/unistr/u16-strncpy: New file.
134975         * modules/unistr/u32-strncpy: New file.
134976         * lib/unistr/u8-strncpy.c: New file.
134977         * lib/unistr/u16-strncpy.c: New file.
134978         * lib/unistr/u32-strncpy.c: New file.
134979         * lib/unistr/u-strncpy.h: New file.
134981         * modules/unistr/u8-strnlen: New file.
134982         * modules/unistr/u16-strnlen: New file.
134983         * modules/unistr/u32-strnlen: New file.
134984         * lib/unistr/u8-strnlen.c: New file.
134985         * lib/unistr/u16-strnlen.c: New file.
134986         * lib/unistr/u32-strnlen.c: New file.
134987         * lib/unistr/u-strnlen.h: New file.
134989         * modules/unistr/u8-strpbrk: New file.
134990         * modules/unistr/u16-strpbrk: New file.
134991         * modules/unistr/u32-strpbrk: New file.
134992         * lib/unistr/u8-strpbrk.c: New file.
134993         * lib/unistr/u16-strpbrk.c: New file.
134994         * lib/unistr/u32-strpbrk.c: New file.
134995         * lib/unistr/u-strpbrk.h: New file.
134997         * modules/unistr/u8-strrchr: New file.
134998         * modules/unistr/u16-strrchr: New file.
134999         * modules/unistr/u32-strrchr: New file.
135000         * lib/unistr/u8-strrchr.c: New file.
135001         * lib/unistr/u16-strrchr.c: New file.
135002         * lib/unistr/u32-strrchr.c: New file.
135004         * modules/unistr/u8-strspn: New file.
135005         * modules/unistr/u16-strspn: New file.
135006         * modules/unistr/u32-strspn: New file.
135007         * lib/unistr/u8-strspn.c: New file.
135008         * lib/unistr/u16-strspn.c: New file.
135009         * lib/unistr/u32-strspn.c: New file.
135010         * lib/unistr/u-strspn.h: New file.
135012         * modules/unistr/u8-strstr: New file.
135013         * modules/unistr/u16-strstr: New file.
135014         * modules/unistr/u32-strstr: New file.
135015         * lib/unistr/u8-strstr.c: New file.
135016         * lib/unistr/u16-strstr.c: New file.
135017         * lib/unistr/u32-strstr.c: New file.
135018         * lib/unistr/u-strstr.h: New file.
135020         * modules/unistr/u8-strtok: New file.
135021         * modules/unistr/u16-strtok: New file.
135022         * modules/unistr/u32-strtok: New file.
135023         * lib/unistr/u8-strtok.c: New file.
135024         * lib/unistr/u16-strtok.c: New file.
135025         * lib/unistr/u32-strtok.c: New file.
135026         * lib/unistr/u-strtok.h: New file.
135028         * modules/unistr/u8-uctomb: New file.
135029         * modules/unistr/u16-uctomb: New file.
135030         * modules/unistr/u32-uctomb: New file.
135031         * lib/unistr/u8-uctomb.c: New file.
135032         * lib/unistr/u16-uctomb.c: New file.
135033         * lib/unistr/u32-uctomb.c: New file.
135035         * MODULES.html.sh (Unicode string functions): Add the new modules.
135037 2007-01-08  Bruno Haible  <bruno@clisp.org>
135039         * gnulib-tool (func_all_modules): Use find, not ls, to traverse the
135040         modules directory. Filter out CVS, ChangeLog, COPYING, README also from
135041         subdirectories.
135043 2007-01-08  Karl Berry  <karl@gnu.org>
135045         * doc/error.texi: mention that main() fns must set program_name
135046         when progname is used.
135048 2007-01-08  Paul Eggert  <eggert@cs.ucla.edu>
135050         * m4/wctype.m4 (gl_WCTYPE_H): Compute ABSOLUTE_WCTYPE_H even if
135051         WCTYPE_H is empty, for the benefit of builds from non-distclean
135052         directories.  Problem reported by Eric Blake in
135053         <http://lists.gnu.org/r/bug-gnulib/2007-01/msg00157.html>.
135055 2007-01-08  Bruno Haible  <bruno@clisp.org>
135057         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Remove
135058         PROVIDE_CANONICALIZE_FILENAME_MODE macro definition.
135059         * lib/canonicalize.h: Test GNULIB_CANONICALIZE instead of
135060         PROVIDE_CANONICALIZE_FILENAME_MODE.
135061         * modules/canonicalize (configure.ac): Use gl_MODULE_INDICATOR.
135063 2007-01-08  Bruno Haible  <bruno@clisp.org>
135065         * m4/fts.m4 (gl_FUNC_FTS_LGPL): Remove _LGPL_PACKAGE macro definition.
135066         * lib/fts_.h (_LGPL_PACKAGE): Remove macro.
135067         Use !GNULIB_FTS instead of _LGPL_PACKAGE.
135068         * lib/fts.c: Likewise.
135069         * modules/fts (configure.ac): Use gl_MODULE_INDICATOR.
135071 2006-12-25  Bruno Haible  <bruno@clisp.org>
135073         * modules/utf8-ucs4-safe: New file.
135074         * lib/utf8-ucs4-safe.h: New file.
135075         * lib/unistr/utf8-ucs4-safe.c: New file.
135077         * modules/utf16-ucs4-safe: New file.
135078         * lib/utf16-ucs4-safe.h: New file.
135079         * lib/unistr/utf16-ucs4-safe.c: New file.
135081         * MODULES.html.sh (Unicode string functions): Add the new modules.
135083 2007-01-08  Bruno Haible  <bruno@clisp.org>
135085         * modules/utf8-ucs4 (Files, lib_SOURCES): Add unistr/utf8-ucs4.c.
135086         (Depends-on): Add unitypes.
135087         * lib/utf8-ucs4.h: Add double-inclusion guard. Include unitypes.h.
135088         (u8_mbtouc_aux): Move out to separate file.
135089         (u8_mbtouc): Use ucs4_t, uint8_t types.
135090         * lib/unistr/utf8-ucs4.c: New file.
135092         * modules/utf16-ucs4 (Files, lib_SOURCES): Add unistr/utf16-ucs4.c.
135093         (Depends-on): Add unitypes.
135094         * lib/utf16-ucs4.h: Add double-inclusion guard. Include unitypes.h.
135095         (u16_mbtouc_aux): Move out to separate file.
135096         (u16_mbtouc): Use ucs4_t, uint16_t types.
135097         * lib/unistr/utf16-ucs4.c: New file.
135099         * modules/ucs4-utf8 (Files, lib_SOURCES): Add unistr/ucs4-utf8.c.
135100         (Depends-on): Add unitypes.
135101         * lib/ucs4-utf8.h: Add double-inclusion guard. Include unitypes.h.
135102         (u8_uctomb_aux): Move out to separate file.
135103         (u8_uctomb): Use ucs4_t, uint8_t types.
135104         * lib/unistr/ucs4-utf8.c: New file.
135106         * modules/ucs4-utf16 (Files, lib_SOURCES): Add unistr/ucs4-utf16.c.
135107         (Depends-on): Add unitypes.
135108         * lib/ucs4-utf16.h: Add double-inclusion guard. Include unitypes.h.
135109         (u16_uctomb_aux): Move out to separate file.
135110         (u16_uctomb): Use ucs4_t, uint16_t types.
135111         * lib/unistr/ucs4-utf16.c: New file.
135113 2006-12-25  Bruno Haible  <bruno@clisp.org>
135115         * modules/unitypes: New file.
135116         * lib/unitypes.h: New file.
135117         * MODULES.html.sh (func_all_modules): New section "Unicode string
135118         functions". Move ucs4-utf8, ucs4-utf16, utf8-ucs4, utf16-ucs4 to
135119         this section. Add unitypes.
135121 2007-01-08  Bruno Haible  <bruno@clisp.org>
135123         Avoid variable names that conflict with those from libtool.
135124         * m4/lib-link.m4 (AC_LIB_RPATH, AC_LIB_LINKFLAGS_BODY,
135125         AC_LIB_LINKFLAGS_FROM_LIBS): Rename libext to acl_libext,
135126         shlibext to acl_shlibext, libname_spec to acl_libname_spec,
135127         library_names_spec to acl_library_names_spec, hardcode_* to
135128         acl_hardcode_*.
135129         Reported by Ralf Wildenhues.
135131 2007-01-08  Bruno Haible  <bruno@clisp.org>
135133         * m4/gc-arcfour.m4 (gl_GC_ARCFOUR): Remove GC_USE_ARCFOUR macro
135134         definition.
135135         * m4/gc-arctwo.m4 (gl_GC_ARCTWO): Remove GC_USE_ARCTWO macro
135136         definition.
135137         * m4/gc-des.m4 (gl_GC_DES): Remove GC_USE_DES macro definition.
135138         * m4/gc-hmac-md5.m4 (gl_GC_HMAC_MD5): Remove GC_USE_HMAC_MD5 macro
135139         definition.
135140         * m4/gc-hmac-sha1.m4 (gl_GC_HMAC_SHA1): Remove GC_USE_HMAC_SHA1 macro
135141         definition.
135142         * m4/gc-md2.m4 (gl_GC_MD2): Remove GC_USE_MD2 macro definition.
135143         * m4/gc-md4.m4 (gl_GC_MD4): Remove GC_USE_MD4 macro definition.
135144         * m4/gc-md5.m4 (gl_GC_MD5): Remove GC_USE_MD5 macro definition.
135145         * m4/gc-random.m4 (gl_GC_RANDOM): Remove GC_USE_RANDOM macro
135146         definition.
135147         * m4/gc-rijndael.m4 (gl_GC_RIJNDAEL): Remove GC_USE_RIJNDAEL macro
135148         definition.
135149         * m4/gc-sha1.m4 (gl_GC_SHA1): Remove GC_USE_SHA1 macro definition.
135150         * lib/gc-gnulib.c: Use GNULIB_GC_<algorithm> instead of
135151         GC_USE_<algorithm>.
135152         * lib/gc-libgcrypt.c: Likewise.
135153         * modules/gc-arcfour (configure.ac): Use gl_MODULE_INDICATOR.
135154         * modules/gc-arctwo (configure.ac): Likewise.
135155         * modules/gc-des (configure.ac): Likewise.
135156         * modules/gc-hmac-md5 (configure.ac): Likewise.
135157         * modules/gc-hmac-sha1 (configure.ac): Likewise.
135158         * modules/gc-md2 (configure.ac): Likewise.
135159         * modules/gc-md4 (configure.ac): Likewise.
135160         * modules/gc-md5 (configure.ac): Likewise.
135161         * modules/gc-random (configure.ac): Likewise.
135162         * modules/gc-rijndael (configure.ac): Likewise.
135163         * modules/gc-sha1 (configure.ac): Likewise.
135165 2007-01-08  Bruno Haible  <bruno@clisp.org>
135167         * m4/close-stream.m4 (gl_CLOSE_STREAM): Remove GNULIB_CLOSE_STREAM
135168         macro definition.
135169         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Remove GNULIB_FCNTL_SAFER macro
135170         definition.
135171         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Remove GNULIB_FOPEN_SAFER macro
135172         definition.
135173         * modules/close-stream (configure.ac): Invoke gl_MODULE_INDICATOR.
135174         * modules/fcntl-safer (configure.ac): Likewise.
135175         * modules/fopen-safer (configure.ac): Likewise.
135176         * modules/fwriteerror (configure.ac): Likewise. Remove explicit
135177         GNULIB_FWRITEERROR macro definition.
135179 2007-01-08  Bruno Haible  <bruno@clisp.org>
135181         * m4/gnulib-common.m4: New file.
135182         * gnulib-tool (func_get_autoconf_snippet): Undo last change.
135183         (func_get_filelist): Add m4/gnulib-common.m4.
135185 2007-01-08  Bruno Haible  <bruno@clisp.org>
135187         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Simplify the sorting
135188         command.
135190 2007-01-08  Jim Meyering  <jim@meyering.net>
135192         Use a more robust test for a "can't happen" condition.
135193         * lib/fts.c (fts_read): Revert the change of 2006-11-22, since it
135194         narrowed the st_size value.  Presuming the "can't happen" condition
135195         is true, that narrowing could conceivably convert an invalid st_size
135196         value into a valid one.  Instead, use a change based on Matthew
135197         Woehlke's original patch.
135199         Slight readability improvement: use an assert-like macro
135200         in place of literal "abort ()" uses.
135201         * lib/fts.c (fts_assert): Define.
135202         (fts_set_stat_required, cwd_advance_fd, fts_read, fd_ring_check):
135203         Use this macro instead of a bare 'abort'.
135205 2007-01-05  Paul Eggert  <eggert@cs.ucla.edu>
135207         Don't worry about using IRIX 5.3's wctype.h broken definitions;
135208         simply work around them.
135209         * lib/wctype_.h: Remove test for HAVE_WCTYPE_CTMP_BUG.
135210         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph, iswlower):
135211         (iswprint, iswpunct, iswspace, iswupper, iswxdigit): Undef before
135212         declaring.
135213         Don't bother to define as macros, since the standard doesn't require it.
135214         * m4/wctype.m4 (WCTYPE_H, ABSOLUTE_WCTYPE_H): Simplify, since we no
135215         longer worry about IRIX 5.3.
135216         (HAVE_WCTYPE_CTMP_BUG): Remove.
135218 2007-01-04  Paul Eggert  <eggert@cs.ucla.edu>
135220         * lib/wctype_.h (_ctmp_) [HAVE_WCTYPE_CTMP_BUG]: Now of type wchar_t,
135221         not wint_t.  Also, include <ctype.h>, to fix another IRIX bug.
135222         * m4/wctype.m4 (gl_WCTYPE_H): Likewise.
135223         Problems reported by Georg Schwarz for IRIX 5.3.
135225         * gnulib-tool (autoconf_minversion): Take the maximum version number
135226         found, not the minimum.  Problem reported by James Youngman.
135228 2007-01-03  Karl Berry  <karl@gnu.org>
135230         * doc/error.texi: new file, explaining interaction with progname.
135231         * doc/gnulib.texi: include it.  Update copyright.
135233 2007-01-03  Simon Josefsson  <simon@josefsson.org>
135235         * gnulib-tool (func_create_testdir): Run AC_CANONICAL_BUILD and
135236         AC_CANONICAL_HOST, to improve autobuild outputs.
135238 2007-01-03  Paolo Bonzini  <bonzini@gnu.org>
135239             Yoann Vandoorselaere <yoann.v@prelude-ids.com>
135241         * lib/poll.c (poll): Use recv on Mac OS X to distinguish connected
135242         sockets, server sockets, and other file descriptors.  Count errors
135243         to compute the return value.  Reorder the code a bit to be easier
135244         to follow.  Don't set event bits that were not requested (except
135245         POLLERR and POLLHUP).
135247 2007-01-01  Bruno Haible  <bruno@clisp.org>
135249         * modules/lchmod (Include): Require lchmod.h, not lchown.h.
135251 2007-01-03  Jim Meyering  <jim@meyering.net>
135253         * modules/fts-lgpl (Depends-on): Add i-ring.  Reported by Bruno Haible.
135255 2007-01-02  Bruno Haible  <bruno@clisp.org>
135257         * modules/settime (Include): Require timespec.h.
135258         * modules/nanosleep (Include): Likewise.
135260 2007-01-01  Bruno Haible  <bruno@clisp.org>
135262         * gnulib-tool (func_emit_copyright_notice): Bump year.
135263         (func_get_autoconf_snippet): Emit a GNULIB_<modulename> macro.
135265 2007-01-01  Bruno Haible  <bruno@clisp.org>
135267         Improve support for OpenBSD.
135268         * build-aux/config.rpath (libname_spec): Export.
135269         (library_names_spec): New variable. Export.
135270         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Extract libname_spec and
135271         library_names_spec from the config.rpath output. Locate shared library
135272         through the name pattern in library_names_spec.
135274 2007-01-01  Eric Blake  <ebb9@byu.net>
135276         * lib/version-etc.c (COPYRIGHT_YEAR): Bump for new year.
135278 2006-12-30  Paul Eggert  <eggert@cs.ucla.edu>
135280         * gnulib-tool (SORT): Remove, since we no longer assume GNU sort.
135281         Rewrite so as not to assume GNU sort or "tail -1".  Also, don't
135282         assume the C locale, and avoid an "eval" that could cause trouble.
135283         Problem with SORT reported by Bob Proulx.
135285         * lib/getpagesize.h (getpagesize) [defined __amigaos4__]:
135286         Define.  Trivial patch from Henning Nielsen Lund, originally
135287         sent to bug-grep@gnu.org today.
135289 2006-12-29  Paul Eggert  <eggert@cs.ucla.edu>
135291         * lib/acl.h: Include sys/types.h and sys/stat.h, for mode_t and
135292         struct stat.  Problem reported by Henning Nielsen Lund.
135293         * lib/acl.c: Include acl.h first, to check interface.  Don't
135294         bother to include sys/types.h and sys/stat.h again.
135296 2006-12-28  Paul Eggert  <eggert@cs.ucla.edu>
135298         Import the following change from libc; problem reported by
135299         Sven Verdoolaege.
135301         2005-10-13  Ulrich Drepper  <drepper@redhat.com>
135303         [BZ #1373]
135304         * lib/argp.h: Remove __NTH for __argp_usage inline function.
135306 2006-12-28  Jim Meyering  <jim@meyering.net>
135308         * build-aux/announce-gen: Do not assume that the package
135309         builds any of tar.gz, tar.bz2, and .xdelta files.
135310         Suggestion from Simon Josefsson.
135312 2006-12-28  Simon Josefsson  <simon@josefsson.org>
135314         * modules/announce-gen: New file.
135316 2006-12-27  Paul Eggert  <eggert@cs.ucla.edu>
135318         * lib/mbchar.h: Just include <wctype.h>; the wctype module
135319         handles its gotchas now.
135320         * lib/mbswidth.c: Likewise.
135321         * lib/wcwidth.h: Likewise.
135322         * m4/mbchar.m4 (gl_MBCHAR): Don't bother checking for wctype.h
135323         and iswcntrl; the wctype module does this stuff now.
135324         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
135325         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
135326         * modules/mbchar (Depends-on): Add wctype.
135327         * modules/mbswidth (Depends-on): Likewise.
135328         * modules/wcwidth (Depends-on): Likewise.
135330 2006-12-27  Eric Blake  <ebb9@byu.net>
135332         * lib/fnmatch.c: Reinstate inclusion of <wchar.h>, since this
135333         module uses more than what <wctype.h> is required to provide.
135335 2006-12-26  Eric Blake  <ebb9@byu.net>
135337         * gnulib-tool (sed_extract_prog): Avoid space-tab.
135339 2006-12-26  Eric Blake  <ebb9@byu.net>
135341         * modules/absolute-header: New module.
135342         * modules/fcntl (Depends-on): Depend on it.
135343         * modules/inttypes (Depends-on): Likewise.
135344         * modules/stdint (Depends-on): Likewise.
135345         * modules/sys_stat (Depends-on): Likewise.
135346         * modules/wctype (Depends-on): Likewise.
135347         * MODULES.html.sh (Support for building libraries and
135348         executables): Document it.
135350 2006-12-25  Paul Eggert  <eggert@cs.ucla.edu>
135352         * gnulib-tool (SED): Remove, undoing previous change.
135353         The problem was that it broke coreutils on Solaris, because
135354         "sed --posix" leaked into a makefile.
135355         (sed): New alias, if 'alias' and GNU sed.
135357 2006-12-24  Jim Meyering  <jim@meyering.net>
135359         Work around an fchownat bug in glibc-2.4:
135360         http://lists.ubuntu.com/archives/ubuntu-users/2006-September/093218.html
135361         This bug would cause "chown -RP ... DIR" to follow symlinks in DIR,
135362         in spite of the -P option.
135363         * m4/openat.m4 (gl_FUNC_FCHOWNAT, gl_FUNC_FCHOWNAT_DEREF_BUG):
135364         New macros.
135365         (gl_PREREQ_OPENAT): Require gl_FUNC_FCHOWNAT.
135366         * modules/openat (Files): Add lib/fchownat.c.
135367         * lib/openat.c (fchownat): Don't define here.  Move to...
135368         * lib/fchownat.c: ...this new file.
135370 2006-12-23  Paul Eggert  <eggert@cs.ucla.edu>
135372         Fix bug reported by Bruno Haible in
135373         <http://lists.gnu.org/r/bug-gnulib/2006-12/msg00228.html>
135374         where quotearg.c didn't compile on Mac OS X 10.2 because it
135375         lacks <wchar.h> and wint_t.
135376         * lib/wctype_.h (__wctype_wint_t): New type.
135377         Include <stdio.h>, <time.h>, <wchar.h> only if HAVE_WINT_T.
135378         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph):
135379         (iswlower, iswprint, iswpunct, iswspace, iswupper, ixwxdigit):
135380         Arg is now of type __wctype_wint_t, not wint_t.
135381         * m4/wctype.m4 (gl_WCTYPE_H): Require gt_TYPE_WINT_T, and
135382         substitute HAVE_WINT_T.
135383         * modules/wctype (Files): Add m4/wint_t.m4.
135384         (wctype.h): Substitute HAVE_WINT_T.
135386 2006-12-23  Bruno Haible  <bruno@clisp.org>
135388         * lib/safe-read.h [C++]: Wrap declarations in extern "C".
135390 2006-12-23  Bruno Haible  <bruno@clisp.org>
135392         * lib/canonicalize-lgpl.c (__realpath): Test HAVE_READLINK instead of
135393         S_ISLNK.
135394         Needed because gnulib's sys/stat.h replacement defines S_ISLNK on
135395         mingw.
135397 2006-12-22  Bruno Haible  <bruno@clisp.org>
135399         * lib/copy-file.c: Include acl.h.
135400         (copy_file_preserving) [USE_ACL]: Use copy_acl instead of chmod.
135401         Close the file descriptors only after being done with copy_acl.
135402         * modules/copy-file (Depends-on): Add acl.
135404 2006-12-22  Bruno Haible  <bruno@clisp.org>
135406         * gnulib-tool (SED): New variable.
135407         Use $SED instead of sed everywhere.
135409 2006-12-22  Bruno Haible  <bruno@clisp.org>
135411         * modules/no-c++: New file.
135412         * m4/no-c++.m4: New file.
135413         * MODULES.html.sh (Support for building libraries and executables):
135414         Add no-c++.
135416 2006-12-22  Paul Eggert  <eggert@cs.ucla.edu>
135418         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
135419         Include <limits.h>, and use its INT_MAX to rewrite the
135420         j loop so that it does not overflow 'int'.  Problem reported by
135421         Ralf Wildenhues in
135422         <http://lists.gnu.org/r/bug-gnulib/2006-12/msg00084.html>.
135423         Play it safe by shifting left by 1 rather than multiplying by 2,
135424         as GCC is less likely to optimize this away when the value
135425         is signed (when it assumes overflow leads to undefined behavior).
135426         Also, don't assume time_t uses two's complement.
135428 2006-12-21  Paul Eggert  <eggert@cs.ucla.edu>
135430         * MODULES.html.sh: New module wctype.
135431         * lib/wctype_.h, m4/wctype.m4, modules/wctype: New files.
135432         * lib/fnmatch.c: Don't bother to include <wchar.h> before
135433         <wctype.h>, since the new wctype module should fix this.
135434         * lib/quotearg.c: Include <wctype.h> unconditionally, since
135435         the wctype module should arrange for it.
135436         * lib/regex_internal.h: Likewise.
135437         * m4/quotearg.m4 (gl_QUOTEARG): Don't check for wctype.h or iswprint,
135438         since the wctype module should handle this now.
135439         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for wctype.h.
135440         * modules/fnmatch (Depends-on): Add wctype.
135441         * modules/quotearg (Depends-on): Likewise.
135442         * modules/regex (Depends-on): Likewise.
135444 2006-12-19  Bruno Haible  <bruno@clisp.org>
135446         * lib/strdup.h [C++]: Wrap definitions in extern "C".
135447         Suggested by Lorenzo Bettini <bettini@dsi.unifi.it>.
135449 2006-12-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
135451         * modules/savewd (Depends-on): Fix dependency on fcntl.
135453 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
135455         * m4/stdint.m4 (gl_STDINT_H): Set STDINT_H to empty if stdint.h
135456         conforms to C99, rather than relying on the user's environment
135457         setting of STDINT_H.
135459 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
135460         and Eric Blake  <ebb9@byu.net>
135462         * lib/dirname.h (DOUBLE_SLASH_IS_DISTINCT_ROOT): Default to 0, not 1.
135463         This is more consistent with the other defines here.
135464         * m4/double-slash-root.m4 (gl_DOUBLE_SLASH_ROOT):
135465         Port to z/OS.  Problem reported by Paul Gilmartin.
135466         Change local vars to use gl_ prefix rather than ac_.
135467         Don't define DOUBLE_SLASH_IS_DISTINCT_ROOT to 0, for consistency
135468         with other defines.
135469         * modules/double-slash-root: New module.
135470         * modules/dirname (Files): Remove m4/double-slash-root.m4.
135471         (Depends-on): Add double-slash-root.
135472         * MODULES.html.sh (File system functions): Mention new module.
135474 2006-12-14  Paul Eggert  <eggert@cs.ucla.edu>
135476         * lib/yesno.c [!ENABLE_NLS]: Don't include getline.h.
135477         (yesno) [!ENABLE_NLS]: Don't invoke getline or rpmatch.
135478         This is for the benefit of gzip, which doesn't do i18n.
135480 2006-12-12  Jim Meyering  <jim@meyering.net>
135482         * m4/acl.m4 (gl_ACL_GET_FILE): Fix logic error.
135483         Reported by Andreas Schwab <schwab@suse.de>.
135485 2006-12-12  Bruno Haible  <bruno@clisp.org>
135487         Merge these changes.
135488         2006-09-05  Bruno Haible  <bruno@clisp.org>
135489         * lib/iconvme.c (iconv_string): No need to save and restore errno when
135490         iconv_alloc succeeded.
135491         (iconv_alloc): Don't assume that malloc() or realloc(), when failing,
135492         sets errno to ENOMEM. (malloc on GNU/kFreeBSD doesn't.) No need to
135493         test for " && dest " at the end - dest is always != NULL there. Call
135494         iconv with 4xNULL arguments initially, to reset the state. Call iconv
135495         with 2xNULL arguments, also to flush the state storage. Handle the
135496         IRIX iconv behaviour. Realloc the final result, to throw away unused
135497         memory.
135499 2006-12-11  Paul Eggert  <eggert@cs.ucla.edu>
135501         * m4/openat.m4 (gl_FUNC_OPENAT): Don't compile mkdirat
135502         and fchmodat unconditionally, since glibc 2.4 has them.
135503         Problem reported by Arkadiusz Miskiewicz.
135505 2006-12-10  Bruno Haible  <bruno@clisp.org>
135507         * gnulib-tool (func_import): Show the include files only for those
135508         modules that are copied and specified.
135509         Reported by Karl Berry.
135511 2006-12-08  Jim Meyering  <jim@meyering.net>
135513         * build-aux/announce-gen ($VERSION): Don't use of $Revision...$.
135514         Instead, use Emacs' time-stamp write hook.  Note that the time is UTC.
135516         * build-aux/announce-gen: Add two new options, both optional:
135517         --bootstrap-tools=TOOL_LIST
135518               a comma-separated list of tools, e.g.,
135519               autoconf,automake,bison,gnulib
135520         --gnulib-snapshot-date=DATE
135521               if gnulib is in the bootstrap tool list,
135522               then report this as the snapshot date.
135523               If not specified, use the current date/time.
135524               If you specify a date here, be sure it's UTC.
135526 2006-12-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
135528         * tests/test-argp-2.sh: Fix test to match actual output.
135529         (func_compare): Fix sed script to be portable.
135531 2006-12-05  Paul Eggert  <eggert@cs.ucla.edu>
135533         * lib/utimens.c (futimens) [HAVE_BUGGY_NFS_TIME_STAMPS]: Add a
135534         workaround for this case.  It is not autoconfigured now; offhand
135535         it's hard to see how to autoconfigure it.
135537 2006-12-03  Paul Eggert  <eggert@cs.ucla.edu>
135539         * lib/mkdir-p.c (make_dir_parents): Fix race condition when making
135540         a directory that is about to be chowned.  Such a directory's
135541         initial file permissions should permit the owner only and this
135542         should not be changed until after the chown, since the group and
135543         other bits would be incorrect if they granted permission before
135544         the chown.
135546         Fix porting problem for iswctype reported by Georg Schwarz in:
135547         http://lists.gnu.org/r/bug-coreutils/2006-12/msg00017.html
135548         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Require HAVE_ISWCTYPE, too.
135549         * lib/regex_internal.h (RE_ENABLE_I18N): Likewise.
135550         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for iswctype, too.
135551         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
135553 2006-12-03  Jim Meyering  <jim@meyering.net>
135555         * lib/fts.c (fts_load): Don't set sp->fts_dev here, since
135556         p->fts_statp may not yet be defined.
135557         (fts_read): Instead, set it in the caller, once p->fts_statp is
135558         sure to be defined, and corresponds to a top-level directory.
135559         This bug made du -x fail.  Here's the coreutils test case:
135560         http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commit;h=ba45154d8e9f
135561         Reported by Mike Frysinger.
135563 2006-12-01  Jim Meyering  <jim@meyering.net>
135565         * modules/savewd (Depends-on): Add fcntl_h to avoid self-test
135566         build failure due to missing definition of HAVE_WORKING_O_NOFOLLOW.
135567         Reported by Simon Josefsson.
135569 2006-11-30  Jim Meyering  <jim@meyering.net>
135571         * m4/warning.m4: Use the all-permissive copyright notice
135572         recommended by RMS (rather than LGPL).
135573         * m4/vararrays.m4: Likewise.
135574         * m4/flexmember.m4: Likewise.
135576 2006-11-29  Bruno Haible  <bruno@clisp.org>
135578         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
135579         noinst_LIBRARIES. Augment noinst_LIBRARIES and noinst_LTLIBRARIES
135580         using +=.
135581         Reported by Simon Josefsson <simon@josefsson.org>.
135583 2006-11-28  James Youngman  <jay@gnu.org>
135585         * README: Advise users that they might find the bug-gnulib@gnu.org
135586         and autotools-announce@gnu.org mailing lists useful.
135588 2006-11-28  Bruno Haible  <bruno@clisp.org>
135590         * m4/ptrdiff_max.m4: Remove file.
135592 2006-11-21  Bruno Haible  <bruno@clisp.org>
135594         * m4/eoverflow.m4 (gl_EOVERFLOW): Use AC_COMPUTE_INT instead of
135595         _AC_COMPUTE_INT.
135596         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
135597         * m4/ptrdiff_max.m4 (gl_PTRDIFF_MAX): Use AC_COMPUTE_INT instead of
135598         _AC_COMPUTE_INT.
135599         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
135600         * m4/size_max.m4 (gl_SIZE_MAX): Use AC_COMPUTE_INT instead of
135601         _AC_COMPUTE_INT.
135602         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
135604 2006-11-28  Jim Meyering  <jim@meyering.net>
135606         * lib/regcomp.c (parse_branch): Rename local, exp->expr, to avoid
135607         warning from "gcc -Wshadow" about shadowing the builtin.
135609 2006-11-27  Bruno Haible  <bruno@clisp.org>
135611         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): Use AC_COMPUTE_INT instead of
135612         _AC_COMPUTE_INT.
135613         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
135615 2006-11-27  Bruno Haible  <bruno@clisp.org>
135616             Paul Eggert  <eggert@cs.ucla.edu>
135618         * lib/regex.h (__restrict_arr): Redo logic of #if, for clarity.
135620 2006-11-26  Bruno Haible  <bruno@clisp.org>
135622         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
135623         noinst_LTLIBRARIES.
135625 2006-11-27  Paul Eggert  <eggert@cs.ucla.edu>
135626             Bruno Haible  <bruno@clisp.org>
135628         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to 0
135629         if compiling with "gcc -ansi".
135631 2006-11-26  Paul Eggert  <eggert@cs.ucla.edu>
135633         Fix some incompatibilities with gcc -ansi -pedantic.
135634         * lib/regex.h (__restrict_arr): Don't use the [restrict] syntax
135635         if compiling pedantically with GCC, unless it's C99 or later.
135636         Don't trust sys/cdefs.h's definition of __restrict_arr, either, as
135637         it mishandles gcc -ansi -pedantic as well.
135638         * lib/regex_internal.h (re_token_t): Don't use enum bitfields
135639         if gcc -pedantic.
135640         * lib/regexec.c (check_node_accept_bytes): Don't use auto
135641         initializers for struct if -pedantic, unless it's C99 or later.
135643 2006-11-25  Nix  <nix@esperi.org.uk>  (tiny change)
135645         * m4/fcntl_h.m4 (gl_FCNTL_H): Test the atime, not the mtime.
135646         Don't close an fd more than once. Identical atimes indicate
135647         success, not failure.
135649 2006-11-22  Robinson Mittmann  <bob@hoplon.com>  (tiny change)
135651         * lib/sincosl.c (kernel_sinl): Fix typo in threshold.
135653 2006-11-23  Jim Meyering  <jim@meyering.net>
135655         * build-aux/announce-gen: New file.  From coreutils.
135657 2006-11-22  Jim Meyering  <jim@meyering.net>
135659         Work around a compile-time error from the HP-UX 11.00 /bin/cc.
135660         * lib/fts.c (enum Fts_stat): Give this previously-anon enum a name.
135661         (fts_read): Use a temporary to narrow the overused st_size member
135662         before using it in a switch statement.  Reported by Matthew Woehlke.
135664         * m4/clock_time.m4 (gl_CLOCK_TIME): Quote AC_SUBST argument.
135665         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Likewise.
135667 2006-11-20  Bruno Haible  <bruno@clisp.org>
135669         * gettext.m4 (AM_GNU_GETTEXT): Revert 2005-07-28 patch: Use
135670         changequote instead of pairs of brackets.
135671         Reported by Andreas Schwab <schwab@suse.de>.
135673 2006-11-21  Jim Meyering  <jim@meyering.net>
135675         * lib/fts.c (fts_safe_changedir): Move a declaration "up",
135676         so as to remain compatible with older compilers.
135677         Patch from Michael Deutschmann.
135679 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
135681         * MODULES.html.sh (File system functions): Add openat.
135683         * lib/openat.h (rpl_fstatat): New macro, if
135684         [HAVE_OPENAT && ! LSTAT_FOLLOWS_SLASHED_SYMLINK.
135685         (fstatat): Define to rpl_fstatat under the same conditions,
135686         unless COMPILING_FSTATAT.
135687         * m4/openat.m4 (gl_FUNC_OPENAT): Compile fstatat.c too, if fstatat
135688         seems to have the bug.
135689         * lib/fstatat.c: New file.
135690         * modules/openat (Files): Add it.
135692 2006-11-20  Bruno Haible  <bruno@clisp.org>
135694         * Makefile: New file.
135696 2006-11-20  Jim Meyering  <jim@meyering.net>
135698         The beginnings of syntax-related checks for gnulib.
135699         * lib/Makefile: New file.
135700         * lib/t-idcache: New script.  Ensure that the two halves of
135701         idcache.c stay in sync.
135703         * lib/idcache.c: Adjust comments in user- and group- portions to
135704         be more accurate, and to be consistent with one another.
135706 2006-11-20  Jim Meyering  <jim@meyering.net>
135708         * lib/idcache.c: Restore most of the 2006-11-06 patch, so as to
135709         continue using the flexible array member (thus, this module performs
135710         half as many malloc calls), with the addition that...
135711         (getgroup, getuser): Consistently record a non-match via an empty
135712         "name" string, and map an empty string match to a NULL return value.
135713         * modules/idcache (Depends-on): Re-add flexmember.
135715         * lib/idcache.c (getuser): Remove all uses of the register keyword.
135716         (getuidbyname, getgroup, getgidbyname): Likewise.
135718         Use cleaner syntax: NULL rather than 0.
135719         * lib/idcache.c (getuidbyname, getgidbyname): Return NULL, not 0.
135721 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
135723         * lib/idcache.c: Undo most recent patch, dated 2006-11-06.
135724         It mishandled the case where the group was missing.
135725         Problem reported by Greg Schafer.
135726         * modules/idcache: Likewise.
135728 2006-11-18  Jim Meyering  <jim@meyering.net>
135730         * check-module (%exempt_header): Add exception for some
135731         conditionally-included headers.
135733         * modules/i-ring (Depends-on): Add verify.
135734         (License): Change to LGPL.
135736 2006-11-16  Paul Eggert  <eggert@cs.ucla.edu>
135738         * modules/getaddrinfo (Depends-on): Remove inttostr; add snprintf.
135739         * lib/getaddrinfo.c: Include snprintf.h rather than intprops.h
135740         and inttostr.h.  Use snprintf rather than uinttostr, so that
135741         LGPLed code doesn't depend on GPLed.
135743 2006-11-17  Paul Eggert  <eggert@cs.ucla.edu>
135745         * modules/inline (License): Change from GPL to LGPL.
135747 2006-11-17  Jim Meyering  <jim@meyering.net>
135749         * modules/d-type (License): Switch to LGPL.
135751 2006-11-15  Bruno Haible  <bruno@clisp.org>
135753         * m4/alloca.m4 (gl_FUNC_ALLOCA): Fix the AC_CACHE_CHECK message.
135755 2006-11-15  Eric Blake  <ebb9@byu.net>
135757         * m4/allocsa.m4 (gl_ALLOCSA): Don't invoke macro already picked up by
135758         the module dependency.
135760 2006-11-15  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
135761             Bruno Haible  <bruno@clisp.org>
135763         * gnulib-tool (func_create_testdir): Add license consistency check.
135765 2006-11-15  Eric Blake  <ebb9@byu.net>
135767         * m4/alloca.m4 (gl_FUNC_ALLOCA): Use AC_CACHE_CHECK to avoid a
135768         random "(cached)" in configure output.
135770 2006-11-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
135772         * m4/inttypes.m4 (gl_INTTYPES_H): Use AC_CACHE_CHECK so that the
135773         test for conforming inttypes.h is both announced and cached.
135775         * MODULES.html.sh (seen_modules, seen_files): New variables.
135776         (func_module): Rewrite to use a few less gnulib-tool and sed
135777         invocations.  Avoid a couple of quadratic algorithms for ...
135778         (missed_modules, missed_files): ... these, with ...
135779         (func_append, func_tmpdir): ... these new functions, from
135780         gnulib-tool.  Analogously, install traps for cleanup.
135782         * tests/test-gc.c (main): Remove unused variables.
135783         * tests/test-read-file.c: Include stdlib.h, for 'free'.
135785 2006-11-14  Paul Eggert  <eggert@cs.ucla.edu>
135787         * modules/inttostr (License): Change to LGPL.
135789 2006-11-14  Eric Blake  <ebb9@byu.net>
135791         * modules/tempname (License): Change to LGPL.
135793 2006-11-14  Eric Blake  <ebb9@byu.net>
135795         * doc/functions.texi (Function Portability): *printf functions on
135796         Cygwin now understand all POSIX size specifiers.
135798 2006-11-14  Bruno Haible  <bruno@clisp.org>
135800         * modules/c-ctype (License): Change to LGPL.
135802 2006-11-12  Bruno Haible  <bruno@clisp.org>
135804         * m4/lib-link.m4 (AC_LIB_LINKFLAGS, AC_LIB_HAVE_LINKFLAGS,
135805         AC_LIB_LINKFLAGS_BODY): Also set a LIB${NAME}_PREFIX variable. Needed
135806         for GNOME libraries, for which the include files are installed in
135807         subdirectories of $prefix/include.
135809 2006-11-12  Bruno Haible  <bruno@clisp.org>
135811         * m4/lib-link.m4: Require at least autoconf-2.54.
135812         (AC_LIB_LINKFLAGS_BODY) [autoconf < 2.61]: Turn dots into the library
135813         name to underscores for the --with option.
135815 2006-11-13  Bruno Haible  <bruno@clisp.org>
135817         * gnulib-tool (func_create_testdir): Set gl_source_base correctly in
135818         the tests directory.
135819         Reported by Ralf Wildenhues.
135821 2006-11-13  Bruno Haible  <bruno@clisp.org>
135823         * gnulib-tool (func_emit_initmacro_start): Also override AC_LIBSOURCES.
135824         (func_emit_initmacro_end): Undo the override here.
135825         (func_emit_initmacro_done): Emit a definition for gl_LIBSOURCES.
135826         Works around the famous automake error in coreutils.
135828 2006-11-13  Eric Blake  <ebb9@byu.net>
135830         * lib/gl_anytree_oset.h (gl_tree_search_atleast): Return the
135831         element, not its node.
135833 2006-11-12  Bruno Haible  <bruno@clisp.org>
135835         * gnulib-tool (func_emit_lib_Makefile_am): Replace occurrences of
135836         '$(top_srcdir)/build-aux/', taking into account the real auxdir.
135838 2006-11-12  Bruno Haible  <bruno@clisp.org>
135840         * gnulib-tool: New option --local-symlink.
135841         (func_usage): Document it.
135842         (lsymbolic): New variable.
135843         (func_import, func_create_testdir): If --symlink was not specified,
135844         test whether --local-symlink was specified and the file comes from
135845         the local_gnulib_dir.
135847 2006-11-12  Bruno Haible  <bruno@clisp.org>
135849         * gnulib-tool (func_ln): New function.
135850         (func_ln_if_changed, func_create_testdir): Use it instead of "ln -s".
135852 2006-11-12  Bruno Haible  <bruno@clisp.org>
135854         Finish support for source files in subdirectories.
135855         * gnulib-tool (func_emit_lib_Makefile_am): If some of the source files
135856         are in subdirectories, set uses_subdirs and add 'subdir-objects' to
135857         AUTOMAKE_OPTIONS.
135858         (func_import, func_create_testdir): Invoke AM_PROG_CC_C_O in this case.
135860 2006-11-12  Bruno Haible  <bruno@clisp.org>
135862         * gnulib-tool (func_get_automake_snippet): Synthesize also an
135863         EXTRA_lib_SOURCES augmentation.
135864         (func_emit_lib_Makefile_am): Initialize EXTRA_lib..._SOURCES to empty.
135866 2006-11-12  Jim Meyering  <jim@meyering.net>
135868         Make fts (in FTS_CWDFD mode) more efficient by caching a few open
135869         file descriptors.  This also averts a failure on systems with
135870         native openat support when a traversed directory lacks "x" access.
135871         * lib/fts_.h: Include "i-ring.h"
135872         (struct FTS) [fts_fd_ring]: New member.
135873         * lib/fts.c (RESTORE_INITIAL_CWD): Also call fd_ring_clear.
135874         (FCHDIR): Add parentheses.
135875         (fd_ring_check, fd_ring_print) [!FTS_DEBUG]: Define away.
135876         (cwd_advance_fd): Add a 3rd parameter.  Adjust all callers.
135877         When descending, rather than simply closing the previous
135878         fts_cwd_fd value, push that file descriptor onto the ring.
135879         (same_fd, fd_ring_print, fd_ring_check) [FTS_DEBUG]: New functions.
135880         (fts_open): Initialize the new fd_ring member.
135881         (fts_close): Clear the ring.
135882         (fts_safe_changedir): When possible, use our new fd_ring to skip
135883         the diropen and fstat and dev/ino comparison that would normally
135884         accompany a virtual `chdir ("..")'.
135886         * modules/fts (Depends-on): Add i-ring.
135887         * modules/i-ring: New module.
135888         * lib/i-ring.c, lib/i-ring.h, lib/i-ring-test.c: New files.
135889         * m4/i-ring.m4: New file.
135891 2006-11-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
135893         * gnulib-tool (func_create_testdir): Fix replacement of
135894         `build-aux' in configure.ac.  Run autotools in gltests
135895         subdirectory.
135896         (func_create_testdir, func_create_megatestdir, test): There is
135897         no need for '--force' in most autotool invocations in a new
135898         tree.  Actually fail the whole test if any of the tools, or the
135899         configure or make stages fail.
135901         Sync from Automake.
135902         * build-aux/gnupload: Revert last change.  Add pointer to upload
135903         instructions of the GNU Maintenance Instructions.
135904         Suggestion by Karl Berry.
135906 2006-11-10  Jim Meyering  <jim@meyering.net>
135908         * lib/fts.c [FTS_DEBUG]: Don't try to print a pointer via %s.
135910 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
135912         * lib/gettext.h (dgettext, dcgettext, ngettext) [! ENABLE_NLS]:
135913         (dngettext, dcngettext, bindtextdomain) [! ENABLE_NLS]:
135914         (bind_textdomain_codeset) [! ENABLE_NLS]:
135915         Evaluate all the arguments.  That way, callers get compatible behavior
135916         if the arguments have side effects.  Also, it avoids some GCC
135917         diagnostics in some cases; Joel E. Denny reported problems when Bison
135918         was configured with --enable-gcc-warnigs.
135920 2006-11-10  Jim Meyering  <jim@meyering.net>
135922         * m4/inline.m4 (gl_INLINE): Check with the compiler, not cpp, so that
135923         relevant options in CFLAGS (like -O, -fno-inline) are taken into
135924         account.
135926 2006-11-10  Jim Meyering  <jim@meyering.net>
135928         * modules/inline: New file/module.
135929         * modules/xalloc (Files): Remove m4/inline.m4.
135930         (Depends-on): Add inline, instead.
135931         * modules/oset: Likewise.
135932         * modules/list: Likewise.
135934 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
135936         * lib/stdint_.h (uintmax_t): Fix typo: int64_t -> uint64_t.
135937         Problem reported by Matthew Woehlke.
135939 2006-11-09  Bruno Haible  <bruno@clisp.org>
135941         * lib/tempname.c (gen_tempname): Remove variant that invokes
135942         __gen_tempname.
135943         * m4/tempname.m4 (gl_FUNC_GEN_TEMPNAME): Don't test for
135944         __gen_tempname.
135946 2006-11-08  Bruno Haible  <bruno@clisp.org>
135948         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Set ac_cv_type_long_long_int
135949         to 'yes' instead of 'cross-compiling'.
135951 2006-11-08  Paul Eggert  <eggert@cs.ucla.edu>
135953         * lib/quotearg.h (quotearg_free): New decl.
135954         * lib/quotearg.c (quotearg_free): New function.
135955         (slot0, nslots, slotvec0, slotvec):
135956         Now file-scope so that quotearg_free can get at them.
135958 2006-11-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
135960         Sync from Automake.
135961         * build-aux/gnupload: Add missing 'gnu' to example URL.
135962         Report by Karl Berry.
135964 2006-11-08  Bruno Haible  <bruno@clisp.org>
135966         * m4/inline.m4 (gl_INLINE): Also test __NO_INLINE__.
135967         Suggested by Paul Eggert.
135969 2006-11-08  Jim Meyering  <jim@meyering.net>
135971         * lib/fts.c [!_LGPL_PACKAGE]: Don't include fcntl--.h twice.
135972         It's already included if !_LIBC.
135973         (fts_safe_changedir): Add a comment.
135975 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
135977         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Detect bug in
135978         Tandem NonStop Kernel (OSS) cc -O circa 2004, reported by
135979         Matthew Woehlke.
135981         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Move
135982         definitions up, to avoid colliding with change below.
135983         (static_inline) [HAVE_INLINE]: New macro.
135984         (xnmalloc, xnrealloc, x2nrealloc, xcharalloc):
135985         Provide extern decls when !HAVE_INLINE.  Do not define unless
135986         static_inline is defined, either by us or by xmalloc.c.  Use
135987         static_inline rather than static inline.
135988         (XCALLOC): Optimize sizeof(T) = 1 case.
135989         * lib/xmalloc.c (static_inline) [!HAVE_INLINE]: New macro.
135991 2006-11-07  Bruno Haible  <bruno@clisp.org>
135993         * lib/xalloc.h (XNMALLOC): Restore optimization of sizeof(T) = 1 case.
135994         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require gl_INLINE instead of
135995         AC_C_INLINE.
135996         * modules/xalloc (Files): Add m4/inline.m4.
135998 2006-11-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
136000         * README: Fix typo.
136001         * doc/gnulib.texi (Miscellaneous Notes): Likewise, rename...
136002         (Miscellanous Notes): ...from this.
136004 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
136006         * m4/flexmember.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER):
136007         Mention that offsetof should be used instead of sizeof.
136008         From Bruno Haible.
136010 2006-11-07  Bruno Haible  <bruno@clisp.org>
136012         * lib/w32spawn.h (prepare_spawn): Use XNMALLOC instead of xmalloc.
136014 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
136016         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
136017         * lib/gl_anyavltree_list2.h (create_subtree_with_contents):
136018         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
136019         (gl_tree_add_before, gl_tree_add_after):
136020         Use XMALLOC instead of xmalloc, and XCALLOC instead of xzalloc.
136021         * lib/gl_anyhash_list2.h (hash_resize): Likewise.
136022         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
136023         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before):
136024         (gl_linked_add_after, gl_linked_add_at): Likewise.
136025         * lib/gl_anyrbtree_list2.h (create_subtree_with_contents):
136026         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
136027         (gl_tree_add_before, gl_tree_add_after): Likewise.
136028         * lib/gl_anytree_list2.h (gl_tree_create_empty): Likewise.
136029         * lib/gl_anytree_oset.h (gl_tree_create_empty): Likewise.
136030         * lib/gl_anytreehash_list1.h (add_to_bucket): Likewise.
136032 2006-11-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
136034         * lib/gl_oset.h: Use C comment style, not C++ comment style.
136036 2006-11-06  Bruno Haible  <bruno@clisp.org>
136038         * m4/inline.m4: New file.
136039         * m4/gl_list.m4 (gl_LIST): Require gl_INLINE.
136040         * modules/list (Files): Add m4/inline.m4.
136041         * modules/oset (Files): Likewise.
136043 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
136045         * lib/idcache.c: Include <stddef.h>, for offsetof.
136046         (struct userid.name): Change from char * to a flexible array member.
136047         All uses changed.
136048         * modules/idcache (Depends-on): Add flexmember.
136050         * MODULES.html.sh (Core language properties): New module flexmember.
136051         * modules/flexmember, m4/flexmember.m4: New files.
136053         * lib/xalloc.h (xnmalloc, xnrealloc, x2nrealloc): Now static
136054         inline functions that are identical with the old xnmalloc_inline,
136055         xnrealloc_inline, x2nrealloc_inline of lib/xmalloc.c.  This is so
136056         that we can avoid some unnecessary integer multiplications and
136057         divisions in the common case where the element size is known at
136058         compile time.
136059         (XNMALLOC) [HAVE_INLINE]: Remove special case, which is no longer
136060         needed.
136061         (xnboundedmalloc): Remove.
136062         (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Use lower-case letters for
136063         arguments, for consistency with rest of this header.
136064         (xcharalloc): Rewrite using XNMALLOC.
136065         * lib/xmalloc.c (xnmalloc_inline, xnmalloc, xnrealloc_inline):
136066         (xnrealloc, x2nrealloc_inline, x2nrealloc): Remove.  The *_inline
136067         versions have been moved to lib/xalloc.h and renamed to be the
136068         non-*_inline versions.
136069         (xmalloc, xrealloc): Implement without reference to the xnmalloc
136070         and xnrealloc functions, since those functions are now inline and
136071         now call us.
136072         (x2realloc): Invoke x2realloc, not x2realloc_inline, to accommodate
136073         renaming described above.
136074         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Remove AC_C_INLINE since
136075         xmalloc.c no longer uses inline directly.  gl_PREREQ_XALLOC now
136076         captures the dependency in AC_C_INLINE.
136078         New module canonicalize-lgpl, proposed by Charles Wilson in
136079         <http://lists.gnu.org/r/bug-gnulib/2006-11/msg00020.html>
136080         with a few small changes afterwards.
136081         * MODULES.html.sh (File system functions): New module
136082         canonicalize-lgpl.
136083         * lib/canonicalize.h: Add comments for canonicalize_filename_mode
136084         and canonicalize_file_name.
136085         * lib/canonicalize-lgpl.c, m4/canonicalize-lgpl.m4:
136086         * modules/canonicalize-lgpl: New files.
136088 2006-11-05  Bruno Haible  <bruno@clisp.org>
136090         * gnulib-tool (func_import, func_create_testdir): Create directories
136091         also for files in subdirectories of lib/.
136093 2006-11-05  Bruno Haible  <bruno@clisp.org>
136095         * lib/gl_array_list.c (gl_array_iterator_next): Make pointer decrement
136096         ANSI C compliant.
136098 2006-11-03  Bruno Haible  <bruno@clisp.org>
136100         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
136101         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require AC_C_INLINE.
136102         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): New macros.
136103         (xnboundedmalloc): New inline function.
136104         * lib/classpath.c (new_classpath): Use XNMALLOC instead of xmalloc.
136105         * lib/clean-temp.c (create_temp_dir): Use XNMALLOC, XMALLOC instead of
136106         xmalloc.
136107         * lib/concatpath.c (concatenated_pathname): Use XNMALLOC instead of
136108         xmalloc.
136109         * lib/fatal-signal.c (at_fatal_signal): Use XNMALLOC instead of xmalloc.
136110         * lib/findprog.c (find_in_path): Use XNMALLOC instead of xmalloc.
136111         * lib/gl_array_list.c (gl_array_create_empty): Use XMALLOC instead of
136112         xmalloc.
136113         (gl_array_create): Use XNMALLOC, XMALLOC instead of xmalloc.
136114         * lib/gl_array_oset.c (gl_array_create_empty): Use XNMALLOC instead of
136115         xmalloc.
136116         * lib/gl_avltree_oset.c (gl_tree_add_first, gl_tree_add_before,
136117         gl_tree_add_after): Use XMALLOC instead of xmalloc.
136118         * lib/gl_carray_list.c (gl_carray_create_empty): Use XMALLOC instead of
136119         xmalloc.
136120         (gl_carray_create): Use XNMALLOC, XMALLOC instead of xmalloc.
136121         * lib/gl_rbtree_oset.c (gl_tree_add_first, gl_tree_add_before,
136122         gl_tree_add_after): Use XMALLOC instead of xmalloc.
136123         * lib/gl_sublist.c (gl_sublist_create): Use XMALLOC instead of xmalloc.
136124         * lib/pagealign_alloc.c (new_memnode): Use XMALLOC instead of xmalloc.
136125         * lib/sh-quote.c (shell_quote_argv): Use XNMALLOC instead of xmalloc.
136126         * lib/xvasprintf.c (xstrcat): Use XNMALLOC instead of xmalloc.
136128 2006-11-03  Bruno Haible  <bruno@clisp.org>
136130         * lib/c-ctype.h [C++]: Define functions without name mangling.
136131         * lib/fwriteerror.h [C++]: Likewise.
136132         * lib/gcd.h [C++]: Likewise.
136133         * lib/linebreak.h [C++]: Likewise.
136135 2006-11-03  Paul Eggert  <eggert@cs.ucla.edu>
136137         * lib/canonicalize.h: (canonicalize_mode_t, CAN_EXISTING):
136138         (CAN_ALL_BUT_LAST, CAN_MISSING, canonicalize_filename_mode):
136139         Define only if PROVIDE_CANONICALIZE_FILENAME_MODE is defined.
136140         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
136141         Check for functions and headers just once.
136142         Check for declaration of canonicalize_file_name.
136143         Define PROVIDE_CANONICALIZE_FILENAME_MODE.
136145 2006-11-02  Charles Wilson  <cygwin@cwilson.fastmail.fm>
136147         * gnulib-tool (func_import): Fix typo in actioncmd.
136149 2006-11-02  Bruno Haible  <bruno@clisp.org>
136151         * gnulib-tool (func_get_automake_snippet): Interpret a backslash-
136152         newline sequence in the Makefile.am snippet as a space, like "make"
136153         does.
136154         Reported by Roger Persson <perrog@gmail.com>.
136156 2006-11-01  Bruno Haible  <bruno@clisp.org>
136158         * m4/strcase.m4 (gl_FUNC_STRNCASECMP): Check whether strncasecmp is
136159         already declared in <string.h>.
136160         * lib/strcase.h (strncasecmp): Don't declare it if yes.
136162 2006-11-01  Bruno Haible  <bruno@clisp.org>
136164         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Don't define strcasecmp here.
136165         * lib/strcase.h: Include <string.h>.
136166         (strcasecmp): Define to rpl_strcasecmp here.
136168 2006-11-01  Bruno Haible  <bruno@clisp.org>
136170         * lib/printf-parse.c (PRINTF_PARSE): Cast malloc/realloc results.
136172 2006-11-01  Eric Blake  <ebb9@byu.net>
136174         * lib/mkstemp-safer.c (mkstemp_safer): Allow C++ compilation.
136176         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Allow C++ configuration.
136178 2006-10-29  Bruno Haible  <bruno@clisp.org>
136180         Make it compile in C++ mode.
136181         * lib/full-write.c (full_rw): Add a cast.
136183 2006-11-01  Bruno Haible  <bruno@clisp.org>
136185         * gnulib-tool (func_get_automake_snippet): Change sed_combine_lines to
136186         be POSIX compliant.
136187         Reported by Roger Persson <perrog@gmail.com>.
136189 2006-11-01  Eric Blake  <ebb9@byu.net>
136191         * lib/getopt_.h: Fix comments.
136193 2006-10-31  Eric Blake  <ebb9@byu.net>
136195         * modules/tmpdir (Depends-on): Add sys_stat.
136196         * modules/mkdtemp (Depends-on): Add tempname, drop unistd.
136197         * lib/mkdtemp.c (gen_tempname): Remove; tempname covers this.
136198         * lib/tmpdir.c (S_ISDIR): Simplify, thanks to sys_stat.
136199         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Simplify, thanks to
136200         tempname.
136202 2006-10-31  Paul Eggert  <eggert@cs.ucla.edu>
136204         Avoid some C++ diagnostics reported by Bruno Haible.
136205         * lib/quotearg.c (clone_quoting_options): Use xmemdup rather than
136206         xmalloc.
136207         (quotearg_alloc): Use xcharalloc rather than xmalloc.
136208         (struct slotvec): Move to top level.
136209         (quotearg_n_options): Rewrite to avoid xmalloc.
136210         * lib/xalloc.h (xcharalloc): New function.
136211         * (xrealloc, xnrealloc, x2realloc, x2nrealloc, xmemdup):
136212         [defined __cplusplus]: Add function template that provides result
136213         type propagation.  This part of the change is from Bruno Haible.
136215 2006-10-29  Bruno Haible  <bruno@clisp.org>
136217         Make it compile in C++ mode.
136218         * lib/striconv.c (mem_cd_iconv): Cast malloc/realloc result.
136219         * lib/strnlen1.c (strnlen1): Cast memchr result.
136220         * lib/mbchar.h (mb_copy): Rename arguments to 'new_mbc', 'old_mbc'.
136221         * lib/clean-temp.c (string_equals, string_hash): Add casts.
136222         (create_temp_dir): Rename local variable 'template'.
136223         (compile_csharp_using_sscli): Add cast.
136224         * lib/fatal-signal.c (at_fatal_signal): Cast xmalloc result.
136225         * lib/findprog.c (find_in_path): Likewise.
136226         * lib/linebreak.c (mbs_width_linebreaks): Cast malloc result.
136227         * lib/wait-process.c (register_slave_subprocess): Likewise.
136229 2006-10-22  Bruno Haible  <bruno@clisp.org>
136231         * modules/tsearch: New file.
136232         * lib/tsearch.h: New file.
136233         * lib/tsearch.c: New file, from glibc-2.5 with small modifications.
136234         * m4/tsearch.m4: New file.
136235         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add tsearch.
136237 2006-10-29  Eric Blake  <ebb9@byu.net>
136239         * lib/arcfour.c: Assume config.h.
136240         * lib/arctwo.c: Likewise.
136241         * lib/base64.c: Likewise.
136242         * lib/check-version.c: Likewise.
136243         * lib/crc.c: Likewise.
136244         * lib/des.c: Likewise.
136245         * lib/gc-gnulib.c: Likewise.
136246         * lib/gc-libgcrypt.c: Likewise.
136247         * lib/gc-pbkdf2-sha1.c: Likewise.
136248         * lib/getaddrinfo.c: Likewise.
136249         * lib/getdelim.c: Likewise.
136250         * lib/getline.c: Likewise.
136251         * lib/hmac-md5.c: Likewise.
136252         * lib/hmac-sha1.c: Likewise.
136253         * lib/iconvme.c: Likewise.
136254         * lib/md2.c: Likewise.
136255         * lib/md4.c: Likewise.
136256         * lib/memxor.c: Likewise.
136257         * lib/read-file.c: Likewise.
136258         * lib/readline.c: Likewise.
136259         * lib/rijndael-alg-fst.c: Likewise.
136260         * lib/rijndael-api-fst.c: Likewise.
136261         * lib/xgetdomainname.c: Likewise.
136263 2006-10-28  Eric Blake  <ebb9@byu.net>
136265         * lib/xstrndup.c: Assume config.h.
136267 2006-10-27  Paul Eggert  <eggert@cs.ucla.edu>
136269         Move stat.h-substitute stuff from lib/stat-macros.h to lib/stat_.h.
136270         stat-macros.h is now for our own macros, whereas stat_h is for
136271         macros in the <sys/stat.h> name space.
136272         * lib/stat-macros.h: Remove copyright notice, as this file is now tiny.
136273         (STAT_MACROS_H): Remove.
136274         (S_IFMT, S_ISBLK, S_ISCHR, S_ISDIR, S_ISFIFO, S_ISLNK, S_ISNAM):
136275         (S_ISMPB, S_ISMPC, S_ISNWK, S_ISREG, S_ISSOCK, S_ISDOOR, S_ISPORT):
136276         (S_TYPEISMQ, S_TYPEISTMO, S_TYPEISSEM, S_TYPEISSHM, S_ISCTG, S_ISOFD):
136277         (S_ISOFL, S_ISWHT, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IRGRP):
136278         (S_IROTH, S_IWUSR, S_IWGRP, S_IWOTH, S_IXUSR, S_IXGRP, S_IXOTH):
136279         (S_IRWXU, S_IRWXG, S_IRWXO, S_IXUGO, S_IRWXUGO):
136280         Move these macros to ...
136281         * lib/stat_.h: here.  Don't include stat-macros.h.
136282         * lib/canonicalize.c: Don't include stat-macros.h.
136283         * lib/chown.c: Likewise.
136284         * lib/euidaccess.c: Likewise.
136285         * lib/file-type.c: Likewise.
136286         * lib/filemode.c: Likewise.
136287         * lib/glob.c: Likewise.
136288         * lib/isapipe.c: Likewise.
136289         * lib/lchown.c: Likewise.
136290         * lib/lstat.c: Likewise.
136291         * lib/mkdir-p.c: Likewise.
136292         * lib/rmdir.c: Likewise.
136293         * m4/lchown.m4 (gl_FUNC_LCHOWN): Don't require gl_STAT_MACROS.
136294         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Don't check for io.h
136295         unless mkdir isn't declared, to speed up 'configure'.
136296         Always create sys/stat.h, since it's unlikely any real sys/stat.h
136297         would define all the S_* symbols.
136298         * modules/canonicalize (Depends-on):
136299         Depend on sys_stat, not stat-macros.
136300         * modules/chown: Likewise.
136301         * modules/euidaccess: Likewise.
136302         * modules/filemode: Likewise.
136303         * modules/file-type: Likewise.
136304         * modules/glob: Likewise.
136305         * modules/isapipe: Likewise.
136306         * modules/lchown: Likewise.
136307         * modules/lstat: Likewise.
136308         * modules/mkancesdirs: Likewise.
136309         * modules/rmdir: Likewise.
136310         * modules/mkdir-p (Depends-on): Also depend on sys_stat.
136311         * modules/modechange: Likewise.
136312         * modules/stat-macros (Files): Remove m4/stat-macros.m4.
136313         (configure.ac): Remove gl_STAT_MACROS.
136314         * modules/sys_stat (Depends-on): Remove stat-macros.
136316 2006-10-27  Bruno Haible  <bruno@clisp.org>
136318         * m4/signed.m4: Remove file.
136319         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS_: Remove bh_C_SIGNED
136320         invocation.
136321         * modules/vasnprintf (Files): Remove m4/signed.m4.
136323 2006-10-27  Bruno Haible  <bruno@clisp.org>
136325         Update to GNU gettext 0.16.
136326         * modules/gettext (Files): Add m4/intl.m4, m4/intldir.m4. Remove
136327         m4/inttypes-h.m4, m4/signed.m4.
136328         * m4/gettext.m4: Update to GNU gettext 0.16.
136329         * m4/intl.m4: New file, from GNU gettext.
136330         * m4/intldir.m4: New file, from GNU gettext.
136331         * config/srclist.txt: Update
136333 2006-10-27  Eric Blake  <ebb9@byu.net>
136335         * MODULES.html.sh: Document tempname.
136336         * modules/mkstemp (Depends-on): Add tempname, and drop transitive
136337         dependencies.
136338         (Files): Move lib/tempname.c...
136339         * modules/tempname: ...to this new module.
136340         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Remove tempname checks.
136341         (gl_PREREQ_TEMPNAME): Move...
136342         * m4/tempname.m4: ...to this new file.
136343         * lib/mkstemp.c (includes) [!_LIBC]: Use tempname.h.
136344         * modules/sys_stat (Depends-on): Add stat-macros.
136345         * lib/stat_.h (includes): Pick up stat macros.
136346         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Replace <sys/stat.h>
136347         if stat macros are broken.
136348         * lib/tempname.c (includes): No need to include "stat-macros.h".
136349         (__gen_tempname) [!_LIBC]: Expose as gen_tempname.
136350         (direxists, __path_search) [!_LIBC]: Don't compile these in
136351         gnulib; the tmpdir module covers that.
136352         * lib/tempname.h: New file.
136354 2006-10-26  Paul Eggert  <eggert@cs.ucla.edu>
136356         * COPYING: Explain how gnulib-tool converts licence headers.
136357         Almost all wording by Eric Blake.
136359 2006-10-25  Paul Eggert  <eggert@cs.ucla.edu>
136361         * lib/mbchar.h (is_basic_table): Make read-only.
136362         * lib/mbchar.c (is_basic_table): Likewise.
136363         Reported by John Darrington.
136365 2006-10-25  Bruno Haible  <bruno@clisp.org>
136367         * lib/progname.h (set_program_name): Undefine before defining.
136369 2006-10-25  Bruno Haible  <bruno@clisp.org>
136371         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to
136372         false for non-gcc C++ compilers.
136373         Reported by Nelson H. F. Beebe <beebe@math.utah.edu>.
136375 2006-10-24  Bruno Haible  <bruno@clisp.org>
136377         * lib/striconv.c (mem_cd_iconv, str_cd_iconv): Treat all non-GNU
136378         iconv implementations like Irix iconv.
136380 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
136382         * modules/vararrays: New file.
136383         * m4/vararrays.m4: New file, taken from diffutils.
136384         * MODULES.html.sh: New module vararrays.
136386 2006-10-24  Karl Berry  <karl@gnu.org>
136388         * doc/gnulib-intro.texi: --- instead of --; non-naive naive.
136389         Don't call GNU Unix.
136391 2006-10-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
136393         * users.txt: Add Libtool.
136395         Sync from Libtool:
136397         2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
136399         * lib/argz.c: Remove check for HAVE_CONFIG_H, to conform
136400         to gnulib's policy of including config.h unconditionally.
136402 2006-10-24  Bruno Haible  <bruno@clisp.org>
136404         * modules/wcwidth (Files): Add m4/wint_t.m4.
136405         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Require gt_TYPE_WINT_T.
136406         * lib/wcwidth.h (iswprint): Use 'int' if 'wint_t' is not defined.
136408 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
136410         * lib/getdate.y (yyerror): Make the arguments pointer-to-const,
136411         to pacify GCC with some -W flags enabled.  Problem reported by
136412         Bruno Haible.
136414 2006-10-24  Jim Meyering  <jim@meyering.net>
136416         * MODULES.html.sh: Remove uinttostr.  It's not a module.
136417         Reported by Karl Berry.
136419 2006-10-23  Bruno Haible  <bruno@clisp.org>
136421         * lib/fts.c (fts_build): Move variable declaration, for C89 compliance.
136423 2006-10-24  Bruno Haible  <bruno@clisp.org>
136425         * lib/gl_list.h: Use C comment style, not C++ comment style.
136427 2006-10-23  Eric Blake  <ebb9@byu.net>
136429         * lib/getaddrinfo.c (includes): Add missing include.
136431 2006-10-23  Bruno Haible  <bruno@clisp.org>
136432             Paul Eggert  <eggert@cs.ucla.edu>
136434         Ability to rename obstack_free.
136435         * lib/obstack.h (__obstack_free): New macro. Declare instead of
136436         obstack_free.
136437         (obstack_free): Invoke the __obstack_free macro.
136438         * lib/obstack.c (obstack_free): Use __obstack_free macro.
136440 2006-10-23  Bruno Haible  <bruno@clisp.org>
136441             Paul Eggert  <eggert@cs.ucla.edu>
136443         * lib/argp.h (argp_parse, __argp_parse): Comment out the identifiers
136444         __argc, __argv from the declaration. (They are defined as macros on
136445         mingw.)
136447 2006-10-22  Bruno Haible  <bruno@clisp.org>
136449         * doc/gnulib-intro.texi: New file.
136450         * doc/gnulib.texi: Include it.
136452 2006-10-21  Bruno Haible  <bruno@clisp.org>
136454         * doc/gnulib.texi: Split the chapter "Gnulib" into 3 chapters
136455         "Introduction", "Miscellanous Notes", "Particular Modules".
136457 2006-10-21  Bruno Haible  <bruno@clisp.org>
136459         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
136460         Change mostlyclean-local rule to avoid sh syntax error from bash
136461         versions 2.00..2.05 when $(MOSTLYCLEANDIRS) is empty.
136463 2006-10-23  Jim Meyering  <jim@meyering.net>
136465         * lib/getaddrinfo.c (getnameinfo): Use new lightweight uinttostr,
136466         in place of snprintf.
136468         * modules/inttostr (Files): Add lib/uinttostr.c.
136469         * lib/uinttostr.c (inttostr): New file/function.
136470         * lib/inttostr.h (uinttostr): Declare.
136471         * m4/inttostr.m4: Add AC_LIBOBJ([uinttostr]).
136472         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
136473         Add uinttostr.
136474         * modules/getaddrinfo (Depends-on): Remove snprintf.  Add inttostr.
136476 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
136478         * lib/canonicalize.c (ELOOP): Define if not already defined.
136479         Problem reported by Bruno Haible in
136480         <http://lists.gnu.org/r/bug-gnulib/2006-10/msg00282.html>.
136482 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
136484         * lib/stdint_.h [defined _AIX]: Don't include <sys/types.h>.
136485         Problem reported by Perry Smith and Ville Laurikari.
136487         * lib/getndelim2.c (SSIZE_MAX): Use same defn that getdelim.c
136488         uses.
136490 2006-10-19  Bruno Haible  <bruno@clisp.org>
136492         * lib/getndelim2.c (SSIZE_MAX): Provide fallback definition. Needed
136493         for mingw.
136495 2006-10-19  Bruno Haible  <bruno@clisp.org>
136497         * lib/openat-priv.h (EOPNOTSUPP): Provide fallback definition.
136498         Needed for mingw.
136500 2006-10-19  Bruno Haible  <bruno@clisp.org>
136502         * m4/size_max.m4 (gl_SIZE_MAX): Cache the result.
136504 2006-10-19  Bruno Haible  <bruno@clisp.org>
136506         * m4/allocsa.m4 (gl_ALLOCSA): Invoke gl_FUNC_ALLOCA, don't AC_REQUIRE
136507         it.
136509 2006-10-19  Bruno Haible  <bruno@clisp.org>
136511         * m4/alloca.m4 (gl_FUNC_ALLOCA): Cache the result of the AC_EGREP_CPP
136512         invocation.
136514 2006-10-19  Bruno Haible  <bruno@clisp.org>
136516         * gnulib-tool (func_create_testdir): Don't include ftruncate and
136517         mountlist by default.
136519 2006-10-16  Bruno Haible  <bruno@clisp.org>
136521         * lib/c-strstr.c: Include c-strstr.h.
136523 2006-10-18  Charles Wilson  <cygwin@cwilson.fastmail.fm>
136525         * gnulib-tool: Don't clobber $sourcebase when $local_gnulib_dir ends
136526         in a slash.
136528 2006-10-18  Bruno Haible  <bruno@clisp.org>
136530         * lib/lock.h [C++]: Wrap definitions in extern "C".
136532 2006-10-18  Bruno Haible  <bruno@clisp.org>
136534         * gnulib-tool (func_emit_initmacro_end): Remove duplicates from the
136535         gl_LIBOBJS list.
136537 2006-10-18  Bruno Haible  <bruno@clisp.org>
136539         * lib/findprog.c (find_in_path): Avoid "gcc -Wwrite-strings" warning.
136541 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>
136543         * lib/xstrtol.h: Include gettext.h.
136544         (_STRTOL_ERROR): Wrap English-language formats inside gettext.
136545         Problem reported by Eric Blake.
136546         * modules/xstrtol (Depends-on): Add gettext-h.
136548 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)
136550         * lib/strftime.c (advance): New macro.
136551         (add): Use it to avoid adding 0 to a FILE *.  FILE can be an
136552         incomplete type, so you can't add 0 to it.  Problem and patch
136553         reported by Eelco Dolstra for dietlibc.
136555 2006-10-18  Jim Meyering  <jim@meyering.net>
136557         * lib/readutmp.c (desirable_utmp_entry): Use "bool" as the
136558         type for a local, and rename it: s/up/user_proc/.
136560 2006-10-18  Sergey Poznyakoff  <gray@gnu.org.ua>
136562         * lib/readutmp.c (desirable_utmp_entry): Implement new flag:
136563         READ_UTMP_USER_PROCESS.
136564         * lib/readutmp.h (READ_UTMP_USER_PROCESS): New flag
136566 2006-10-17  Paul Eggert  <eggert@cs.ucla.edu>
136568         * lib/localcharset.c: Do not check HAVE_SETLOCALE.
136569         * m4/localcharset.m4 (gl_LOCALCHARSET): Don't check for setlocale.
136571 2006-10-17  Eric Blake  <ebb9@byu.net>
136573         * lib/sigprocmask.c (sigprocmask): Fix typo.
136575         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Fix typo.
136577         * modules/clean-temp (Makefile.am): Don't add to make output...
136578         (configure.ac): ...instead define SIGNAL_SAFE_LIST inside
136579         config.h.
136581 2006-10-17  Bruno Haible  <bruno@clisp.org>
136583         * lib/gettext.h (gettext, ngettext, pgettext, npgettext): Define
136584         differently if DEFAULT_TEXT_DOMAIN is set.
136586 2006-10-16  Bruno Haible  <bruno@clisp.org>
136588         * lib/clean-temp.c: Include fwriteerror.h.
136590 2006-10-16  Bruno Haible  <bruno@clisp.org>
136592         * getndelim2.m4 (gl_GETNDELIM2): Remove 2003-10-23 hack.
136594 2006-10-16  Bruno Haible  <bruno@clisp.org>
136596         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Also test for sigset_t.
136597         * lib/sigprocmask.h: Include <sys/types.h>.
136598         (sigset_t): Use the system's definition if present.
136600 2006-10-17  Eric Blake  <ebb9@byu.net>
136602         * lib/xvasprintf.c (includes): Assume config.h.
136603         * lib/xasprintf.c (includes): Likewise.
136605 2006-10-16  Paul Eggert  <eggert@cs.ucla.edu>
136607         * lib/fsusage.c (PROPAGATE_ALL_ONES): Don't assume uintmax_t is
136608         at least as wide as intmax_t.
136610 2006-10-16  Alexandre Duret-Lutz  <adl@gnu.org>
136612         (Imported from Automake.)
136613         * build-aux/gnupload: Update to version 1.1 of directive file.
136615 2006-10-16  Eric Blake  <ebb9@byu.net>
136617         * modules/configmake (Makefile.am): Add pkglibexecdir support, to
136618         match Automake 1.10a.
136620 2006-10-14  Bruno Haible  <bruno@clisp.org>
136622         * modules/sigprocmask: New file.
136623         * lib/sigprocmask.h: New file.
136624         * lib/sigprocmask.c: New file.
136625         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Renamed from
136626         gt_SIGNALBLOCKING. When not defining HAVE_POSIX_SIGNALBLOCKING,
136627         request sigprocmask.o.
136628         (gl_PREREQ_SIGPROCMASK): New macro.
136629         * modules/fatal-signal (Files): Remove m4/signalblocking.m4.
136630         (Depends-on): Add sigprocmask.
136631         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Don't require
136632         gt_SIGNALBLOCKING. Test for 'raise' only once.
136633         * lib/fatal-signal.c: Include sigprocmask.h.
136634         (fatal_signal_set, init_fatal_signal_set, block_fatal_signals,
136635         unblock_fatal_signals): Define always.
136636         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
136637         sigprocmask.
136639 2006-10-14  Paul Eggert  <eggert@cs.ucla.edu>
136641         Sync from Automake.
136642         * build-aux/install-sh (posix_mkdir): Reject FreeBSD 6.1 mkdir -p -m,
136643         which incorrectly sets the mode of an existing destination
136644         directory.  In some cases the unpatched install-sh could do the
136645         equivalent of "chmod 777 /" or "chmod 0 /" on a buggy FreeBSD
136646         system.  We hope this is rare in practice, but it's clearly worth
136647         fixing.  Problem reported by Alex Unleashed in
136648         <http://lists.gnu.org/r/bug-autoconf/2006-10/msg00012.html>.
136649         Also, don't bother to check for -m bugs unless we're using -m;
136650         suggested by Stepan Kasal.
136652 2006-10-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
136654         Sync from Automake.
136655         * build-aux/depcomp (gcc3): Put dependency extraction flags before the
136656         `-c' flag, so they appear at the same position as in %FASTDEP%
136657         mode in depend2.am.  Fixes build failure for FreeBSD's c89,
136658         which ignores unknown options only after the first non-option.
136659         Bug report against M4 by Nelson H. F. Beebe.
136661 2006-10-13  Jim Meyering  <jim@meyering.net>
136663         Fix a bug in yesterday's change.
136664         * lib/fts.c (fts_open): When using FTS_XDEV|FTS_NOSTAT,
136665         p->fts_statp->st_dev would be used uninitialized.
136666         Ensures that we always call fts_stat on the very first entry.
136667         Miklos Szeredi reported that find -xdev stopped working.
136669 2006-10-12  Bruno Haible  <bruno@clisp.org>
136671         * gnulib-tool (func_get_automake_snippet): Append an automatically
136672         computed EXTRA_DIST augmentation.
136673         * modules/acl (Makefile.am): Remove EXTRA_DIST augmentation.
136674         * modules/alloca-opt (Makefile.am): Likewise.
136675         * modules/allocsa (Makefile.am): Likewise.
136676         * modules/arcfour (Makefile.am): Likewise.
136677         * modules/arctwo (Makefile.am): Likewise.
136678         * modules/argmatch (Makefile.am): Likewise.
136679         * modules/argz (Makefile.am): Likewise.
136680         * modules/atexit (Makefile.am): Likewise.
136681         * modules/backupfile (Makefile.am): Likewise.
136682         * modules/byteswap (Makefile.am): Likewise.
136683         * modules/c-strtod (Makefile.am): Likewise.
136684         * modules/c-strtold (Makefile.am): Likewise.
136685         * modules/calloc (Makefile.am): Likewise.
136686         * modules/canon-host (Makefile.am): Likewise.
136687         * modules/canonicalize (Makefile.am): Likewise.
136688         * modules/chdir-long (Makefile.am): Likewise.
136689         * modules/chdir-safer (Makefile.am): Likewise.
136690         * modules/check-version (Makefile.am): Likewise.
136691         * modules/chown (Makefile.am): Likewise.
136692         * modules/cloexec (Makefile.am): Likewise.
136693         * modules/close-stream (Makefile.am): Likewise.
136694         * modules/closeout (Makefile.am): Likewise.
136695         * modules/crc (Makefile.am): Likewise.
136696         * modules/csharpexec (Makefile.am): Likewise.
136697         * modules/cycle-check (Makefile.am): Likewise.
136698         * modules/des (Makefile.am): Likewise.
136699         * modules/dev-ino (Makefile.am): Likewise.
136700         * modules/dirfd (Makefile.am): Likewise.
136701         * modules/dirname (Makefile.am): Likewise.
136702         * modules/dup2 (Makefile.am): Likewise.
136703         * modules/eealloc (Makefile.am): Likewise.
136704         * modules/error (Makefile.am): Likewise.
136705         * modules/euidaccess (Makefile.am): Likewise.
136706         * modules/exclude (Makefile.am): Likewise.
136707         * modules/exitfail (Makefile.am): Likewise.
136708         * modules/fcntl-safer (Makefile.am): Likewise.
136709         * modules/fcntl (Makefile.am): Likewise.
136710         * modules/file-type (Makefile.am): Likewise.
136711         * modules/fileblocks (Makefile.am): Likewise.
136712         * modules/filemode (Makefile.am): Likewise.
136713         * modules/filenamecat (Makefile.am): Likewise.
136714         * modules/fnmatch (Makefile.am): Likewise.
136715         * modules/fopen-safer (Makefile.am): Likewise.
136716         * modules/fpending (Makefile.am): Likewise.
136717         * modules/fprintftime (Makefile.am): Likewise.
136718         * modules/free (Makefile.am): Likewise.
136719         * modules/fsusage (Makefile.am): Likewise.
136720         * modules/ftruncate (Makefile.am): Likewise.
136721         * modules/fts (Makefile.am): Likewise.
136722         * modules/gc-arcfour (Makefile.am): Likewise.
136723         * modules/gc-des (Makefile.am): Likewise.
136724         * modules/gc-hmac-md5 (Makefile.am): Likewise.
136725         * modules/gc-hmac-sha1 (Makefile.am): Likewise.
136726         * modules/gc-md4 (Makefile.am): Likewise.
136727         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
136728         * modules/gc-sha1 (Makefile.am): Likewise.
136729         * modules/gc (Makefile.am): Likewise.
136730         * modules/getaddrinfo (Makefile.am): Likewise.
136731         * modules/getcwd (Makefile.am): Likewise.
136732         * modules/getdelim (Makefile.am): Likewise.
136733         * modules/getdomainname (Makefile.am): Likewise.
136734         * modules/getgroups (Makefile.am): Likewise.
136735         * modules/gethostname (Makefile.am): Likewise.
136736         * modules/gethrxtime (Makefile.am): Likewise.
136737         * modules/getline (Makefile.am): Likewise.
136738         * modules/getloadavg (Makefile.am): Likewise.
136739         * modules/getlogin_r (Makefile.am): Likewise.
136740         * modules/getndelim2 (Makefile.am): Likewise.
136741         * modules/getopt (Makefile.am): Likewise.
136742         * modules/getpagesize (Makefile.am): Likewise.
136743         * modules/getpass-gnu (Makefile.am): Likewise.
136744         * modules/getpass (Makefile.am): Likewise.
136745         * modules/getsubopt (Makefile.am): Likewise.
136746         * modules/gettime (Makefile.am): Likewise.
136747         * modules/gettimeofday (Makefile.am): Likewise.
136748         * modules/getugroups (Makefile.am): Likewise.
136749         * modules/getusershell (Makefile.am): Likewise.
136750         * modules/glob (Makefile.am): Likewise.
136751         * modules/group-member (Makefile.am): Likewise.
136752         * modules/hard-locale (Makefile.am): Likewise.
136753         * modules/hash (Makefile.am): Likewise.
136754         * modules/hmac-md5 (Makefile.am): Likewise.
136755         * modules/hmac-sha1 (Makefile.am): Likewise.
136756         * modules/human (Makefile.am): Likewise.
136757         * modules/idcache (Makefile.am): Likewise.
136758         * modules/imaxabs (Makefile.am): Likewise.
136759         * modules/imaxdiv (Makefile.am): Likewise.
136760         * modules/inet_ntop (Makefile.am): Likewise.
136761         * modules/inet_pton (Makefile.am): Likewise.
136762         * modules/intprops (Makefile.am): Likewise.
136763         * modules/inttostr (Makefile.am): Likewise.
136764         * modules/inttypes (Makefile.am): Likewise.
136765         * modules/isapipe (Makefile.am): Likewise.
136766         * modules/javaversion (Makefile.am): Likewise.
136767         * modules/lchmod (Makefile.am): Likewise.
136768         * modules/lchown (Makefile.am): Likewise.
136769         * modules/localcharset (Makefile.am): Likewise.
136770         * modules/long-options (Makefile.am): Likewise.
136771         * modules/lstat (Makefile.am): Likewise.
136772         * modules/malloc (Makefile.am): Likewise.
136773         * modules/mathl (Makefile.am): Likewise.
136774         * modules/mbchar (Makefile.am): Likewise.
136775         * modules/md2 (Makefile.am): Likewise.
136776         * modules/md4 (Makefile.am): Likewise.
136777         * modules/md5 (Makefile.am): Likewise.
136778         * modules/memcasecmp (Makefile.am): Likewise.
136779         * modules/memchr (Makefile.am): Likewise.
136780         * modules/memcmp (Makefile.am): Likewise.
136781         * modules/memcoll (Makefile.am): Likewise.
136782         * modules/memcpy (Makefile.am): Likewise.
136783         * modules/memmem (Makefile.am): Likewise.
136784         * modules/memmove (Makefile.am): Likewise.
136785         * modules/mempcpy (Makefile.am): Likewise.
136786         * modules/memrchr (Makefile.am): Likewise.
136787         * modules/memset (Makefile.am): Likewise.
136788         * modules/memxor (Makefile.am): Likewise.
136789         * modules/mkancesdirs (Makefile.am): Likewise.
136790         * modules/mkdir-p (Makefile.am): Likewise.
136791         * modules/mkdir (Makefile.am): Likewise.
136792         * modules/mkdtemp (Makefile.am): Likewise.
136793         * modules/mkstemp (Makefile.am): Likewise.
136794         * modules/mktime (Makefile.am): Likewise.
136795         * modules/modechange (Makefile.am): Likewise.
136796         * modules/mountlist (Makefile.am): Likewise.
136797         * modules/nanosleep (Makefile.am): Likewise.
136798         * modules/obstack (Makefile.am): Likewise.
136799         * modules/openat (Makefile.am): Likewise.
136800         * modules/pagealign_alloc (Makefile.am): Likewise.
136801         * modules/pathmax (Makefile.am): Likewise.
136802         * modules/physmem (Makefile.am): Likewise.
136803         * modules/poll (Makefile.am): Likewise.
136804         * modules/posixtm (Makefile.am): Likewise.
136805         * modules/posixver (Makefile.am): Likewise.
136806         * modules/putenv (Makefile.am): Likewise.
136807         * modules/quote (Makefile.am): Likewise.
136808         * modules/quotearg (Makefile.am): Likewise.
136809         * modules/raise (Makefile.am): Likewise.
136810         * modules/read-file (Makefile.am): Likewise.
136811         * modules/readline (Makefile.am): Likewise.
136812         * modules/readlink (Makefile.am): Likewise.
136813         * modules/readtokens (Makefile.am): Likewise.
136814         * modules/readutmp (Makefile.am): Likewise.
136815         * modules/realloc (Makefile.am): Likewise.
136816         * modules/regex (Makefile.am): Likewise.
136817         * modules/rename-dest-slash (Makefile.am): Likewise.
136818         * modules/rename (Makefile.am): Likewise.
136819         * modules/rijndael (Makefile.am): Likewise.
136820         * modules/rmdir (Makefile.am): Likewise.
136821         * modules/rpmatch (Makefile.am): Likewise.
136822         * modules/safe-read (Makefile.am): Likewise.
136823         * modules/safe-write (Makefile.am): Likewise.
136824         * modules/same-inode (Makefile.am): Likewise.
136825         * modules/same (Makefile.am): Likewise.
136826         * modules/save-cwd (Makefile.am): Likewise.
136827         * modules/savedir (Makefile.am): Likewise.
136828         * modules/setenv (Makefile.am): Likewise.
136829         * modules/settime (Makefile.am): Likewise.
136830         * modules/sha1 (Makefile.am): Likewise.
136831         * modules/sig2str (Makefile.am): Likewise.
136832         * modules/snprintf (Makefile.am): Likewise.
136833         * modules/stat-macros (Makefile.am): Likewise.
136834         * modules/stat-time (Makefile.am): Likewise.
136835         * modules/stdbool (Makefile.am): Likewise.
136836         * modules/stdint (Makefile.am): Likewise.
136837         * modules/stdlib-safer (Makefile.am): Likewise.
136838         * modules/stpcpy (Makefile.am): Likewise.
136839         * modules/stpncpy (Makefile.am): Likewise.
136840         * modules/strcase (Makefile.am): Likewise.
136841         * modules/strcasestr (Makefile.am): Likewise.
136842         * modules/strchrnul (Makefile.am): Likewise.
136843         * modules/strcspn (Makefile.am): Likewise.
136844         * modules/strdup (Makefile.am): Likewise.
136845         * modules/strerror (Makefile.am): Likewise.
136846         * modules/strftime (Makefile.am): Likewise.
136847         * modules/strndup (Makefile.am): Likewise.
136848         * modules/strnlen (Makefile.am): Likewise.
136849         * modules/strpbrk (Makefile.am): Likewise.
136850         * modules/strsep (Makefile.am): Likewise.
136851         * modules/strstr (Makefile.am): Likewise.
136852         * modules/strtod (Makefile.am): Likewise.
136853         * modules/strtoimax (Makefile.am): Likewise.
136854         * modules/strtok_r (Makefile.am): Likewise.
136855         * modules/strtol (Makefile.am): Likewise.
136856         * modules/strtoll (Makefile.am): Likewise.
136857         * modules/strtoul (Makefile.am): Likewise.
136858         * modules/strtoull (Makefile.am): Likewise.
136859         * modules/strtoumax (Makefile.am): Likewise.
136860         * modules/strverscmp (Makefile.am): Likewise.
136861         * modules/sys_socket (Makefile.am): Likewise.
136862         * modules/sys_stat (Makefile.am): Likewise.
136863         * modules/sysexits (Makefile.am): Likewise.
136864         * modules/time_r (Makefile.am): Likewise.
136865         * modules/timegm (Makefile.am): Likewise.
136866         * modules/timespec (Makefile.am): Likewise.
136867         * modules/tmpfile-safer (Makefile.am): Likewise.
136868         * modules/trim (Makefile.am): Likewise.
136869         * modules/unistd-safer (Makefile.am): Likewise.
136870         * modules/unlinkdir (Makefile.am): Likewise.
136871         * modules/unlocked-io (Makefile.am): Likewise.
136872         * modules/userspec (Makefile.am): Likewise.
136873         * modules/utime (Makefile.am): Likewise.
136874         * modules/utimecmp (Makefile.am): Likewise.
136875         * modules/utimens (Makefile.am): Likewise.
136876         * modules/vasnprintf (Makefile.am): Likewise.
136877         * modules/vasprintf (Makefile.am): Likewise.
136878         * modules/vsnprintf (Makefile.am): Likewise.
136879         * modules/xalloc (Makefile.am): Likewise.
136880         * modules/xgetcwd (Makefile.am): Likewise.
136881         * modules/xnanosleep (Makefile.am): Likewise.
136882         * modules/xreadlink (Makefile.am): Likewise.
136883         * modules/xstrtod (Makefile.am): Likewise.
136884         * modules/xstrtol (Makefile.am): Likewise.
136885         * modules/xstrtold (Makefile.am): Likewise.
136886         * modules/yesno (Makefile.am): Likewise.
136887         * modules/getdate (Makefile.am): Don't add getdate.h to EXTRA_DIST.
136889 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
136891         * modules/error (Makefile.am): Distribute files through
136892         EXTRA_DIST, not lib_SOURCES.
136894 2006-10-12  Eric Blake  <ebb9@byu.net>
136896         * modules/error (Makefile.am): Distribute files in /lib.
136897         * modules/obstack (Makefile.am): Likewise.
136899 2006-10-12  Bruno Haible  <bruno@clisp.org>
136901         * modules/acl (Makefile.am): Distribute all files in lib/ through
136902         EXTRA_DIST.
136903         * modules/arcfour (Makefile.am): Likewise.
136904         * modules/arctwo (Makefile.am): Likewise.
136905         * modules/argmatch (Makefile.am): Likewise.
136906         * modules/argz (Makefile.am): Likewise.
136907         * modules/atexit (Makefile.am): Likewise.
136908         * modules/backupfile (Makefile.am): Likewise.
136909         * modules/c-strtod (Makefile.am): Likewise.
136910         * modules/c-strtold (Makefile.am): Likewise.
136911         * modules/calloc (Makefile.am): Likewise.
136912         * modules/canon-host (Makefile.am): Likewise.
136913         * modules/canonicalize (Makefile.am): Likewise.
136914         * modules/chdir-long (Makefile.am): Likewise.
136915         * modules/chdir-safer (Makefile.am): Likewise.
136916         * modules/check-version (Makefile.am): Likewise.
136917         * modules/chown (Makefile.am): Likewise.
136918         * modules/cloexec (Makefile.am): Likewise.
136919         * modules/close-stream (Makefile.am): Likewise.
136920         * modules/closeout (Makefile.am): Likewise.
136921         * modules/crc (Makefile.am): Likewise.
136922         * modules/cycle-check (Makefile.am): Likewise.
136923         * modules/des (Makefile.am): Likewise.
136924         * modules/dirfd (Makefile.am): Likewise.
136925         * modules/dirname (Makefile.am): Likewise.
136926         * modules/dup2 (Makefile.am): Likewise.
136927         * modules/euidaccess (Makefile.am): Likewise.
136928         * modules/exclude (Makefile.am): Likewise.
136929         * modules/exitfail (Makefile.am): Likewise.
136930         * modules/fcntl-safer (Makefile.am): Likewise.
136931         * modules/file-type (Makefile.am): Likewise.
136932         * modules/fileblocks (Makefile.am): Likewise.
136933         * modules/filemode (Makefile.am): Likewise.
136934         * modules/filenamecat (Makefile.am): Likewise.
136935         * modules/fnmatch (Makefile.am): Likewise.
136936         * modules/fopen-safer (Makefile.am): Likewise.
136937         * modules/fpending (Makefile.am): Likewise.
136938         * modules/fprintftime (Makefile.am): Likewise.
136939         * modules/free (Makefile.am): Likewise.
136940         * modules/fsusage (Makefile.am): Likewise.
136941         * modules/ftruncate (Makefile.am): Likewise.
136942         * modules/fts (Makefile.am): Likewise.
136943         * modules/gc (Makefile.am): Likewise.
136944         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
136945         * modules/getaddrinfo (Makefile.am): Likewise.
136946         * modules/getcwd (Makefile.am): Likewise.
136947         * modules/getdelim (Makefile.am): Likewise.
136948         * modules/getdomainname (Makefile.am): Likewise.
136949         * modules/getgroups (Makefile.am): Likewise.
136950         * modules/gethostname (Makefile.am): Likewise.
136951         * modules/gethrxtime (Makefile.am): Likewise.
136952         * modules/getline (Makefile.am): Likewise.
136953         * modules/getloadavg (Makefile.am): Likewise.
136954         * modules/getlogin_r (Makefile.am): Likewise.
136955         * modules/getopt (Makefile.am): Likewise.
136956         * modules/getpass (Makefile.am): Likewise.
136957         * modules/getpass-gnu (Makefile.am): Likewise.
136958         * modules/getsubopt (Makefile.am): Likewise.
136959         * modules/gettime (Makefile.am): Likewise.
136960         * modules/gettimeofday (Makefile.am): Likewise.
136961         * modules/getugroups (Makefile.am): Likewise.
136962         * modules/getusershell (Makefile.am): Likewise.
136963         * modules/glob (Makefile.am): Likewise.
136964         * modules/group-member (Makefile.am): Likewise.
136965         * modules/hard-locale (Makefile.am): Likewise.
136966         * modules/hash (Makefile.am): Likewise.
136967         * modules/hmac-md5 (Makefile.am): Likewise.
136968         * modules/hmac-sha1 (Makefile.am): Likewise.
136969         * modules/human (Makefile.am): Likewise.
136970         * modules/idcache (Makefile.am): Likewise.
136971         * modules/imaxabs (Makefile.am): Likewise.
136972         * modules/imaxdiv (Makefile.am): Likewise.
136973         * modules/inet_ntop (Makefile.am): Likewise.
136974         * modules/inet_pton (Makefile.am): Likewise.
136975         * modules/inttostr (Makefile.am): Likewise.
136976         * modules/isapipe (Makefile.am): Likewise.
136977         * modules/lchown (Makefile.am): Likewise.
136978         * modules/long-options (Makefile.am): Likewise.
136979         * modules/lstat (Makefile.am): Likewise.
136980         * modules/malloc (Makefile.am): Likewise.
136981         * modules/mathl (Makefile.am): Likewise.
136982         * modules/mbchar (Makefile.am): Likewise.
136983         * modules/md2 (Makefile.am): Likewise.
136984         * modules/md4 (Makefile.am): Likewise.
136985         * modules/md5 (Makefile.am): Likewise.
136986         * modules/memcasecmp (Makefile.am): Likewise.
136987         * modules/memchr (Makefile.am): Likewise.
136988         * modules/memcmp (Makefile.am): Likewise.
136989         * modules/memcoll (Makefile.am): Likewise.
136990         * modules/memcpy (Makefile.am): Likewise.
136991         * modules/memmem (Makefile.am): Likewise.
136992         * modules/memmove (Makefile.am): Likewise.
136993         * modules/mempcpy (Makefile.am): Likewise.
136994         * modules/memrchr (Makefile.am): Likewise.
136995         * modules/memset (Makefile.am): Likewise.
136996         * modules/memxor (Makefile.am): Likewise.
136997         * modules/mkancesdirs (Makefile.am): Likewise.
136998         * modules/mkdir (Makefile.am): Likewise.
136999         * modules/mkdir-p (Makefile.am): Likewise.
137000         * modules/mkdtemp (Makefile.am): Likewise.
137001         * modules/mkstemp (Makefile.am): Likewise.
137002         * modules/mktime (Makefile.am): Likewise.
137003         * modules/modechange (Makefile.am): Likewise.
137004         * modules/mountlist (Makefile.am): Likewise.
137005         * modules/nanosleep (Makefile.am): Likewise.
137006         * modules/openat (Makefile.am): Likewise.
137007         * modules/pagealign_alloc (Makefile.am): Likewise.
137008         * modules/physmem (Makefile.am): Likewise.
137009         * modules/poll (Makefile.am): Likewise.
137010         * modules/posixtm (Makefile.am): Likewise.
137011         * modules/posixver (Makefile.am): Likewise.
137012         * modules/putenv (Makefile.am): Likewise.
137013         * modules/quote (Makefile.am): Likewise.
137014         * modules/quotearg (Makefile.am): Likewise.
137015         * modules/raise (Makefile.am): Likewise.
137016         * modules/read-file (Makefile.am): Likewise.
137017         * modules/readline (Makefile.am): Likewise.
137018         * modules/readlink (Makefile.am): Likewise.
137019         * modules/readtokens (Makefile.am): Likewise.
137020         * modules/readutmp (Makefile.am): Likewise.
137021         * modules/realloc (Makefile.am): Likewise.
137022         * modules/regex (Makefile.am): Likewise.
137023         * modules/rename (Makefile.am): Likewise.
137024         * modules/rename-dest-slash (Makefile.am): Likewise.
137025         * modules/rijndael (Makefile.am): Likewise.
137026         * modules/rmdir (Makefile.am): Likewise.
137027         * modules/rpmatch (Makefile.am): Likewise.
137028         * modules/safe-read (Makefile.am): Likewise.
137029         * modules/safe-write (Makefile.am): Likewise.
137030         * modules/same (Makefile.am): Likewise.
137031         * modules/save-cwd (Makefile.am): Likewise.
137032         * modules/savedir (Makefile.am): Likewise.
137033         * modules/setenv (Makefile.am): Likewise.
137034         * modules/settime (Makefile.am): Likewise.
137035         * modules/sha1 (Makefile.am): Likewise.
137036         * modules/sig2str (Makefile.am): Likewise.
137037         * modules/snprintf (Makefile.am): Likewise.
137038         * modules/stdlib-safer (Makefile.am): Likewise.
137039         * modules/stpcpy (Makefile.am): Likewise.
137040         * modules/stpncpy (Makefile.am): Likewise.
137041         * modules/strcase (Makefile.am): Likewise.
137042         * modules/strcasestr (Makefile.am): Likewise.
137043         * modules/strchrnul (Makefile.am): Likewise.
137044         * modules/strcspn (Makefile.am): Likewise.
137045         * modules/strdup (Makefile.am): Likewise.
137046         * modules/strerror (Makefile.am): Likewise.
137047         * modules/strftime (Makefile.am): Likewise.
137048         * modules/strndup (Makefile.am): Likewise.
137049         * modules/strnlen (Makefile.am): Likewise.
137050         * modules/strpbrk (Makefile.am): Likewise.
137051         * modules/strsep (Makefile.am): Likewise.
137052         * modules/strstr (Makefile.am): Likewise.
137053         * modules/strtod (Makefile.am): Likewise.
137054         * modules/strtoimax (Makefile.am): Likewise.
137055         * modules/strtok_r (Makefile.am): Likewise.
137056         * modules/strtol (Makefile.am): Likewise.
137057         * modules/strtoll (Makefile.am): Likewise.
137058         * modules/strtoul (Makefile.am): Likewise.
137059         * modules/strtoull (Makefile.am): Likewise.
137060         * modules/strtoumax (Makefile.am): Likewise.
137061         * modules/strverscmp (Makefile.am): Likewise.
137062         * modules/time_r (Makefile.am): Likewise.
137063         * modules/timegm (Makefile.am): Likewise.
137064         * modules/tmpfile-safer (Makefile.am): Likewise.
137065         * modules/unistd-safer (Makefile.am): Likewise.
137066         * modules/unlinkdir (Makefile.am): Likewise.
137067         * modules/userspec (Makefile.am): Likewise.
137068         * modules/utime (Makefile.am): Likewise.
137069         * modules/utimecmp (Makefile.am): Likewise.
137070         * modules/utimens (Makefile.am): Likewise.
137071         * modules/vasnprintf (Makefile.am): Likewise.
137072         * modules/vasprintf (Makefile.am): Likewise.
137073         * modules/vsnprintf (Makefile.am): Likewise.
137074         * modules/xalloc (Makefile.am): Likewise.
137075         * modules/xgetcwd (Makefile.am): Likewise.
137076         * modules/xnanosleep (Makefile.am): Likewise.
137077         * modules/xreadlink (Makefile.am): Likewise.
137078         * modules/xstrtod (Makefile.am): Likewise.
137079         * modules/xstrtol (Makefile.am): Likewise.
137080         * modules/xstrtold (Makefile.am): Likewise.
137081         * modules/yesno (Makefile.am): Likewise.
137083 2006-10-12  Jim Meyering  <jim@meyering.net>
137085         * m4/getloadavg.m4: Revert the change below.
137087         * m4/getloadavg.m4 (gl_GETLOADAVG): Test for the existence of
137088         lib/getloadavg.c using "ls -L", not "test -f".  The latter would
137089         fail with a symlink, which is what coreutils' ./bootstrap now
137090         creates by default.
137092 2006-10-12  Bruno Haible  <bruno@clisp.org>
137094         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): Don't define for MSVC or
137095         mingw.
137096         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX): Handle
137097         MSVC and mingw explicitly.
137099 2006-10-11  Simon Josefsson  <jas@extundo.com>
137100             Bruno Haible  <bruno@clisp.org>
137102         Add support for multiple gnulib-tool invocations in the scope of a
137103         single configure.ac file.
137104         * gnulib-tool (func_emit_lib_Makefile_am): In the _LIBADD variable,
137105         use a private [LT]LIBOBJS variant. Define a _DEPENDENCIES variable
137106         with the same contents as the _LIBADD variable.
137107         (func_emit_initmacro_start, func_emit_initmacro_end,
137108         func_emit_initmacro_done): New functions.
137109         (func_import, func_create_testdir): Invoke them. Allow the identifiers
137110         gl_LIBOBJS and gl_LTLIBOBJS.
137112 2006-10-11  Bruno Haible  <bruno@clisp.org>
137114         * gnulib-tool (GETTEXTPATH, AUTOHEADER, AUTOPOINT): New variables.
137115         (func_create_testdir): Don't create po/Makefile.am, don't invoke
137116         autoreconf. Instead, invoke autopoint explicitly but move back the
137117         *.m4 files from gnulib.
137119 2006-10-11  Bruno Haible  <bruno@clisp.org>
137121         * gnulib-tool (func_usage): Make module names after --create-testdir
137122         optional.
137123         (func_create_testdir): If no module was specified, use nearly all
137124         modules.
137126 2006-10-12  Jim Meyering  <jim@meyering.net>
137128         Big performance improvement for fts-based tools that use FTS_NOSTAT.
137129         Avoid spurious inode-mismatch problems on non-POSIX file systems.
137130         Details: http://article.gmane.org/gmane.comp.lib.gnulib.bugs/7416
137131         * lib/fts_.h (FTS_DEFER_STAT): Define new flag.
137132         (FTS_OPTIONMASK): Extend the mask to reflect this addition.
137133         * lib/fts.c (DT_IS_KNOWN, DT_MUST_BE): Define.
137134         (FTS_NO_STAT_REQUIRED, FTS_STAT_REQUIRED): Define.
137135         (fts_set_stat_required): New function.
137136         (fts_open): Defer the calls to fts_stat, if possible or requested.
137137         Move the code that maps a command-line fts_info value FTS_DOT to FTS_D
137138         into fts_stat itself.
137139         (fts_read): Perform any required (deferred) fts_stat call.
137140         (fts_build): Likewise, for the directory we're about to open and read.
137141         In the readdir loop, carefully decide whether each entry will require
137142         an eventual call to fts_stat, using dirent.d_type info if available.
137143         (fts_stat): Move the test for whether to honor FTS_COMFOLLOW on
137144         a command line argument into this function.  Update all callers.
137145         Map a return value of FTS_DOT to FTS_D for a command line argument.
137146         * modules/fts (Depends-on): Add d-type.  Alphabetize.
137147         Thanks to Miklos Szeredi for his tenacity and for the initial
137148         bug report about "find" failing on a FUSE-based file system.
137150         * lib/fts.c (fts_open): Use consistent indentation.
137152 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
137154         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Renamed from
137155         gl_USE_SYSTEM_EXTENSIONS, to fix a coreutils bootstrap failure
137156         reported by Jim Meyering.  All uses of cache variables renamed
137157         to match Autoconf's.
137158         (gl_USE_SYSTEM_EXTENSIONS): New macro, which simply requires
137159         the other one.
137161         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH):
137162         Fix misspelling in diagnostic.
137164 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
137166         * lib/mkdir-p.c (HAVE_FCHMOD): Define to false if not already
137167         defined.  Problem reported by Matthew Woehlke.
137169         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): New macro.
137170         Add support for Tandem NonStop R series.
137171         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX):
137172         Use new macro.
137174         * lib/rename-dest-slash.c: Include stdbool.h but not string.h.
137175         (has_trailing_slash): Omit size arg; all callers changed.
137176         Omit 'inline', since it doesn't help performance and we'd
137177         need to configure it.
137178         Don't count //, ///, etc. as having a trailing slash.
137179         As a side effect, this removes a C99ism reported by Matthew Woehlke.
137180         (rpl_rename_dest_slash): On failure, use rename's errno rather
137181         than (in some cases) an incorrect or junk errno.
137182         Simplify code by removing need to compute length; this does
137183         cause it to make two passes instead of one over the file name,
137184         but it's worth it.
137186         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Undo previous
137187         change, since Autoconf's version may no longer be appropriate now
137188         that we are using CVS Autoconf's version.  Add support for Tandem.
137190 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
137191             Bruno Haible  <bruno@clisp.org>
137193         * lib/allocsa.h (sa_alignment_longlong, sa_alignment_max): Test
137194         HAVE_LONG_LONG_INT instead of HAVE_LONG_LONG.
137195         * m4/allocsa.m4 (gl_ALLOCSA): Invoke AC_TYPE_LONG_LONG_INT instead of
137196         gl_AC_TYPE_LONG_LONG.
137198         * lib/printf-args.h (arg_type, argument): Test HAVE_LONG_LONG_INT
137199         instead of HAVE_LONG_LONG.
137200         * lib/printf-args.c (printf_fetchargs): Likewise.
137201         * lib/printf-parse.c (PRINTF_PARSE): Likewise.
137202         * lib/vasnprintf.c (VASNPRINTF): Likewise.
137203         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS, gl_PREREQ_PRINTF_PARSE,
137204         gl_PREREQ_VASNPRINTF): Invoke AC_TYPE_LONG_LONG_INT instead of
137205         gl_AC_TYPE_LONG_LONG.
137207 2006-10-11  Bruno Haible  <bruno@clisp.org>
137209         * m4/longlong.m4: Add comments.
137210         * m4/ulonglong.m4: Likewise.
137212 2006-10-10  Bruno Haible  <bruno@clisp.org>
137214         Make it possible to #define stpcpy, strdup to aliases.
137215         * lib/stpcpy.c (stpcpy) [!_LIBC]: Don't undefine.
137216         * lib/strdup.c (strdup) [!_LIBC]: Don't undefine.
137218 2006-10-10  Bruno Haible  <bruno@clisp.org>
137220         Make it possible to #define gcd to an alias.
137221         * lib/gcd.c: Include config.h.
137223 2006-10-10  Bruno Haible  <bruno@clisp.org>
137225         Make it possible to #define c_isascii to an alias.
137226         * lib/c-ctype.h: Don't define the macros if NO_C_CTYPE_MACROS is
137227         defined. Undefine the macros before defining them, to avoid gcc
137228         warnings.
137229         * lib/c-ctype.c: Include config.h. Don't undefine the macros; instead,
137230         define NO_C_CTYPE_MACROS early.
137232 2006-10-10  Bruno Haible  <bruno@clisp.org>
137234         Make it possible to #define set_program_name to an alias.
137235         * lib/progname.c: Don't undefine set_program_name; instead, undefine
137236         ENABLE_RELOCATABLE early.
137238 2006-10-10  Paul Eggert  <eggert@cs.ucla.edu>
137240         Port to Tandem NSK OSS, which has 64-bit signed int but at most
137241         32-bit unsigned int.  Problem reported by Matthew Woehlke in:
137242         http://lists.gnu.org/r/bug-coreutils/2006-10/msg00062.html
137243         More generally, don't assume that 64-bit signed int is available
137244         if unsigned int is, and vice versa.
137245         * lib/inttypes_.h (_PRIu64_PREFIX, _SCNu64_PREFIX): Depend on
137246         unsigned symbols, not on their signed counterparts.
137247         * lib/stdint_.h (uint64_t, uint_least64_t, uint_fast64_t, uintmax_t):
137248         (UINT64_MAX, UINT_LEAST64_MAX, UINT_FAST64_MAX, UINTMAX_MAX):
137249         (UINT64_C, UINTMAX_C):
137250         Likewise.
137251         * lib/strtoimax.c (strtoll): Depend on signed symbols, not their
137252         unsigned counterparts.
137253         (Have_long_long, Unsigned): New macros.
137254         (Int): Renamed from INT.
137255         (strtoimax): Use the new macros.
137256         * m4/stdint.m4 (gl_STDINT_H): Require AC_TYPE_UNSIGNED_LONG_LONG_INT
137257         and substitute HAVE_UNSIGNED_LONG_LONG_INT.
137258         * modules/inttypes (inttypes.h): Substitute
137259         HAVE_UNSIGNED_LONG_LONG_INT.
137260         * modules/stdint (stdint.h): Likewise.
137261         (Files): Add m4/ulonglong.m4.
137263 2006-10-10  Bruno Haible  <bruno@clisp.org>
137265         Fix a gcc -Wshadow warning.
137266         * lib/gl_anyhash_list2.h (hash_resize): Rename local variable 'index'
137267         to 'bucket'.
137268         * lib/gl_anylinked_list2.h (gl_linked_search_from_to,
137269         gl_linked_indexof_from_to): Likewise.
137270         * lib/gl_linkedhash_list.c (add_to_bucket, remove_from_bucket):
137271         Likewise.
137272         * lib/gl_anytreehash_list1.h (add_to_bucket, remove_from_bucket):
137273         Likewise.
137274         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Likewise.
137275         Reported by Eric Blake.
137277 2006-10-09  Paul Eggert  <eggert@cs.ucla.edu>
137279         * lib/filemode.h [HAVE_DECL_STRMODE]: Include unistd.h too,
137280         for NetBSD.  Problem reported by Bruno Haible.
137282 2006-10-09  Jim Meyering  <jim@meyering.net>
137284         * lib/lchown.c: Include <sys/stat.h> before "stat-macros.h".
137285         Patch from Bruno Haible.
137287 2006-10-09  Jim Meyering  <jim@meyering.net>
137289         * lib/fts-cycle.c (leave_dir): When "leaving" a top level directory due
137290         to FTS_SKIP, don't copy the parent's uninitialized dev/ino values.
137291         Trigger with e.g., mkdir d && valgrind ./chmod u+rwx d d
137293 2006-10-08  Paul Eggert  <eggert@cs.ucla.edu>
137295         Don't include <config.h> twice; this doesn't work in some cases,
137296         e.g., when config.h has "#define intmax_t long long int" and
137297         we include <config.h>, <inttypes.h>, <config.h> in that order.
137298         Problem reported by Matthew Woehlke in:
137299         http://lists.gnu.org/r/bug-coreutils/2006-10/msg00073.html
137300         * lib/fprintftime.c: Don't include config.h or fprintftime.h.
137301         * lib/fts-cycle.c: Don't include config.h.
137302         * lib/strftime.c: Include fprintftime.h if FPRINTFTIME is defined.
137303         * lib/xstrtoimax.c: Remove copyright notice since it's short tnow.
137304         Don't include config.h or xstrtol.h.  Define STRTOL_T_MINIMUM
137305         and STRTOL_T_MAXIMUM unconditionally, since we now assume gnulib
137306         inttypes.h.
137307         * lib/xstrtoumax.c: Likewise.
137308         * lib/xstrtol.c: Include config.h and xstrtol.h after defining
137309         __strtol and the like, so that this module is more like its siblings.
137310         (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [! defined STRTOL_T_MINIMUM]:
137311         Remove; no longer needed now that we assume gnulib inttypes.h.
137313 2006-10-08  Bruno Haible  <bruno@clisp.org>
137315         * doc/gnulib-tool.texi: Emphasize the drawbacks of the --symlink
137316         option.
137318 2006-10-07  Jim Meyering  <jim@meyering.net>
137320         * modules/inttypes (inttypes.h): Revert what seems to have been
137321         an inadvertent part of today's change: use "|", not "/" in the
137322         substitution for the "/"-containing string, $(ABSOLUTE_INTTYPES_H).
137324 2006-10-07  Bruno Haible  <bruno@clisp.org>
137326         * modules/sublist: New file.
137328 2006-10-07  Bruno Haible  <bruno@clisp.org>
137330         * modules/alloca-opt (alloca.h): Add a "DO NOT EDIT" comment.
137331         * modules/argz (argz.h): Likewise.
137332         * modules/arpa_inet (arpa/inet.h): Likewise.
137333         * modules/byteswap (byteswap.h): Likewise.
137334         * modules/configmake (configmake.h): Likewise.
137335         * modules/fcntl (fcntl.h): Likewise.
137336         * modules/fnmatch (fnmatch.h): Likewise.
137337         * modules/getopt (getopt.h): Likewise.
137338         * modules/glob (glob.h): Likewise.
137339         * modules/inttypes (inttypes.h): Likewise.
137340         * modules/netinet_in (netinet/in.h): Likewise.
137341         * modules/poll (poll.h): Likewise.
137342         * modules/stdbool (stdbool.h): Likewise.
137343         * modules/stdint (stdint.h): Likewise.
137344         * modules/sys_select (sys/select.h): Likewise.
137345         * modules/sys_socket (sys/socket.h): Likewise.
137346         * modules/sys_stat (sys/stat.h): Likewise.
137347         * modules/sysexits (sysexits.h): Likewise.
137348         * modules/unistd (unistd.h): Likewise.
137349         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
137350         Add a "DO NOT EDIT" comment to the generated file.
137351         (func_import): Likewise for gnulib-comp.m4.
137353 2006-10-07  Bruno Haible  <bruno@clisp.org>
137355         * lib/gl_sublist.h: New file.
137356         * lib/gl_sublist.c: New file.
137358 2006-10-06  Paul Eggert  <eggert@cs.ucla.edu>
137360         * lib/mkancesdirs.c (mkancesdirs): Pass to MAKE_DIR both the full file
137361         name (relative to the original working directory) and the file
137362         name component (relative to the temporary working directory).  All
137363         callers changed.
137364         * lib/mkancesdirs.h (mkancesdirs): Adjust prototype to match.
137365         * lib/mkdir-p.c (make_dir_parents): Likewise.
137366         * lib/mkdir-p.h (make_dir_parents): Likewise.
137368 2006-10-06  Eric Blake  <ebb9@byu.net>
137370         Define several macros for use by the clean-temp module.
137371         * m4/close-stream.m4 (gl_CLOSE_STREAM): Define GNULIB_CLOSE_STREAM.
137372         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Define GNULIB_FCNTL_SAFER.
137373         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Define GNULIB_FOPEN_SAFER.
137375         * lib/clean-temp.h (close_stream_temp): New declaration.
137376         * lib/clean-temp.c (includes): Pull in headers according to what
137377         other modules are in use.
137378         (close_stream_temp) [GNULIB_CLOSE_STREAM]: New function.
137380 2006-10-06  Bruno Haible  <bruno@clisp.org>
137382         * lib/javacomp.c (write_temp_file): Use fopen_temp, fwriteerror_temp
137383         instead of fopen, fwriteerror.
137385 2006-10-06  Bruno Haible  <bruno@clisp.org>
137387         * lib/clean-temp.h (cleanup_temp_file, cleanup_temp_subdir,
137388         cleanup_temp_dir_contents, cleanup_temp_dir): Change return type to
137389         int.
137390         * lib/clean-temp.c (do_unlink, do_rmdir, cleanup_temp_file,
137391         cleanup_temp_subdir, cleanup_temp_dir_contents, cleanup_temp_dir):
137392         Return an error indicator.
137393         Suggested by Eric Blake.
137395 2006-10-06  Bruno Haible  <bruno@clisp.org>
137397         * lib/clean-temp.c (PATH_MAX): Provide a fallback for GNU Hurd.
137398         Reported by Eric Blake.
137400 2006-10-06  Bruno Haible  <bruno@clisp.org>
137402         * modules/closeout (Description): Mention stderr too.
137404 2006-10-06  Bruno Haible  <bruno@clisp.org>
137405         and Paul Eggert  <eggert@cs.ucla.edu>
137407         * lib/closeout.c (close_stdout): Also close stderr.
137408         * lib/closeout.h: Update comment.
137410 2006-10-05  Paul Eggert  <eggert@cs.ucla.edu>
137412         Fix some Darwin-7.9.0 porting problems reported by Bruno Haible in
137413         <http://lists.gnu.org/r/bug-coreutils/2006-10/msg00063.html>.
137414         * lib/dirchownmod.c: Include lchown.h.
137415         * lib/lchown.c: Don't include files that lchown.h now includes.
137416         Don't declare chown, since lchown.h now does that.
137417         * lib/lchown.h: Include errno.h, sys/types.h, unistd.h.
137418         (lchown): Define to rpl_chown if lchown is declared but
137419         does not exist.  Declare using a prototype if lchown is not
137420         declared.  Add a copyright notice.
137421         * lib/mkstemp.h: Include <unistd.h>.
137422         * lib/openat.c: Include lchown.h.
137424         * lib/fcntl_.h (O_NOFOLLOW): Don't depend on O_NOFOLLOW_IS_INEFFECTIVE;
137425         we now test for that separately.
137426         * lib/fts.c (fts_safe_changedir): Inspect HAVE_WORKING_O_NOFOLLOW
137427         rather than O_NOFOLLOW, when testing whether it's possible to
137428         avoid a race condition reliably.
137429         * lib/savewd.c (savewd_chdir): Likewise.
137431         Remove macros that are no longer needed now that stdint.h is
137432         reliable.
137433         * lib/fsusage.c (UINTMAX_MAX): Remove.
137434         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Remove.
137435         * lib/utimecmp.c (SIZE_MAX): Remove.
137437         * m4/lchown.m4 (gl_FUNC_LCHOWN): Check whether lchown is declared.
137439         * m4/fcntl_h.m4 (gl_FCNTL_H): Define HAVE_WORKING_O_NOFOLLOW instead
137440         of O_NOFOLLOW_IS_INEFFECTIVE.  Define HAVE_WORKING_O_NOATIME if
137441         O_NOATIME works.
137443 2006-10-05  Bruno Haible  <bruno@clisp.org>
137445         * lib/gl_list.h (gl_sortedlist_search_from_to,
137446         gl_sortedlist_indexof_from_to): New declarations.
137447         (gl_list_implementation): New fields sortedlist_search_from_to,
137448         sortedlist_indexof_from_to.
137449         (gl_sortedlist_search_from_to, gl_sortedlist_indexof_from_to): New
137450         inline functions.
137451         * lib/gl_list.c (gl_sortedlist_search_from_to,
137452         gl_sortedlist_indexof_from_to): New functions.
137453         * lib/gl_array_list.c (gl_array_sortedlist_indexof_from_to): New
137454         function.
137455         (gl_array_sortedlist_indexof, gl_array_sortedlist_search): Use it.
137456         (gl_array_sortedlist_search_from_to): New function.
137457         (gl_array_list_implementation): Update.
137458         * lib/gl_carray_list.c (gl_carray_sortedlist_indexof_from_to): New
137459         function.
137460         (gl_carray_sortedlist_indexof, gl_carray_sortedlist_search): Use it.
137461         (gl_carray_sortedlist_search_from_to): New function.
137462         (gl_carray_list_implementation): Update.
137463         * lib/gl_anylinked_list2.h (gl_linked_sortedlist_search_from_to,
137464         gl_linked_sortedlist_indexof_from_to): New functions.
137465         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
137466         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
137467         * lib/gl_anytree_list2.h (gl_tree_sortedlist_search_from_to,
137468         gl_tree_sortedlist_indexof_from_to): New functions.
137469         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
137470         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
137471         Update.
137472         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
137473         * lib/gl_rbtreehash_list.c (gl_avltreehash_list_implementation):
137474         Update.
137476 2006-10-05  Bruno Haible  <bruno@clisp.org>
137478         * lib/gl_list.h (gl_list_search_from, gl_list_search_from_to,
137479         gl_list_indexof_from, gl_list_indexof_from_to): New declarations.
137480         (struct gl_list_implementation): Add fields search_from_to,
137481         indexof_from_to. Remove fields search, indexof.
137482         (gl_list_search): Use the search_from_to method.
137483         (gl_list_search_from, gl_list_search_from_to): New functions.
137484         (gl_list_indexof): Use the indexof_from_to method.
137485         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
137486         * lib/gl_list.c (gl_list_search): Use the search_from_to method.
137487         (gl_list_search_from, gl_list_search_from_to): New functions.
137488         (gl_list_indexof): Use the indexof_from_to method.
137489         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
137490         * lib/gl_array_list.c (gl_array_indexof_from_to): Renamed from
137491         gl_array_indexof. Add start_index, end_index arguments.
137492         (gl_array_search_from_to): Renamed from gl_array_search. Add
137493         start_index, end_index arguments.
137494         (gl_array_remove, gl_array_list_implementation): Update.
137495         * lib/gl_carray_list.c (gl_carray_indexof_from_to): Renamed from
137496         gl_carray_indexof. Add start_index, end_index arguments.
137497         (gl_carray_search_from_to): Renamed from gl_carray_search. Add
137498         start_index, end_index arguments.
137499         (gl_carray_remove, gl_carray_list_implementation): Update.
137500         * lib/gl_anylinked_list2.h (gl_linked_search_from_to): Renamed from
137501         gl_linked_search. Add start_index, end_index arguments.
137502         (gl_linked_indexof_from_to): Renamed from gl_linked_indexof. Add
137503         start_index, end_index arguments.
137504         (gl_linked_remove): Update.
137505         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
137506         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
137507         * lib/gl_anytree_list1.h (iterstack_item_t): Change type of 'rightp'
137508         field to 'size_t'.
137509         * lib/gl_anytree_list2.h (gl_tree_search_from_to): Renamed from
137510         gl_tree_search. Add start_index, end_index arguments.
137511         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
137512         start_index, end_index arguments.
137513         (gl_tree_remove): Update.
137514         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
137515         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
137516         * lib/gl_anytreehash_list1.h (compare_position_threshold): New
137517         function.
137518         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Renamed from
137519         gl_tree_search. Add start_index, end_index arguments.
137520         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
137521         start_index, end_index arguments.
137522         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
137523         Update.
137524         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Update.
137526 2006-10-05  Bruno Haible  <bruno@clisp.org>
137528         * modules/fwriteerror (configure.ac): Define GNULIB_FWRITEERROR.
137530         * lib/clean-temp.h (open_temp, fopen_temp, close_temp, fclose_temp,
137531         fwriteerror_temp): New declarations.
137532         * lib/clean-temp.c (uintptr_t): Provide fallback definition.
137533         (descriptors): New variable.
137534         (cleanup): First, close the descriptors.
137535         (register_fd, unregister_fd, open_temp, fopen_temp, close_temp,
137536         fclose_temp, fwriteerror_temp): New functions.
137538 2006-10-04  Jim Meyering  <jim@meyering.net>
137540         * lib/fts.c (fts_open): Tiny comment change.
137542 2006-10-04  Bruno Haible  <bruno@clisp.org>
137544         Make it possible to invoke AC_GNU_SOURCE after gl_LOCK_EARLY.
137545         * m4/lock.m4 (gl_LOCK_EARLY_BODY): New macro, extracted code from
137546         gl_LOCK_BODY.
137547         (gl_LOCK_EARLY): Require gl_LOCK_EARLY_BODY, not gl_LOCK_BODY.
137548         (gl_LOCK_BODY): Remove settings of CPPFLAGS, now done in
137549         gl_LOCK_EARLY_BODY.
137550         (gl_LOCK): Require gl_LOCK_BODY.
137552 2006-10-04  Bruno Haible  <bruno@clisp.org>
137554         * lib/gl_oset.h (gl_setelement_threshold_fn): New type.
137555         (gl_oset_search_atleast): New declaration.
137556         (struct gl_oset_implementation): Add field 'search_atleast'.
137557         (gl_oset_search_atleast): New inline function.
137558         * lib/gl_oset.c (gl_oset_search_atleast): New function.
137559         * lib/gl_array_oset.c (gl_array_search_atleast): New function.
137560         (gl_array_oset_implementation): Update.
137561         * lib/gl_anytree_oset.h (gl_tree_search_atleast): New function.
137562         * lib/gl_avltree_oset.c (gl_avltree_oset_implementation): Update.
137563         * lib/gl_rbtree_oset.c (gl_rbtree_oset_implementation): Update.
137565 2006-10-04  Bruno Haible  <bruno@clisp.org>
137567         * lib/fatal-signal.c (fatal_signals) [WOE32]: Add the SIGBREAK signal.
137569 2006-10-03  Bruno Haible  <bruno@clisp.org>
137571         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Renamed
137572         from gl_avltreehash_list_implementation.
137574 2006-10-03  Bruno Haible  <bruno@clisp.org>
137576         * lib/gl_oset.c (gl_oset_add): Fix return type.
137578 2006-10-02  Paolo Bonzini  <bonzini@gnu.org>  (tiny change)
137580         * lib/quotearg.c (mbstate_t) [!HAVE_MBRTOWC]: #define to int.
137582 2006-10-02  Eric Blake  <ebb9@byu.net>
137584         * modules/strnlen (Depends-on): Add extensions.
137586 2006-10-02  Eric Blake  <ebb9@byu.net>
137588         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use autoconf's
137589         definition in 2.60+.
137591 2006-10-02  Dmitry V. Levin  <ldv@altlinux.org>
137593         * lib/fts.c (fts_close, fts_build, fts_palloc): Remove redundant
137594         checks.
137596 2006-10-02  Bruno Haible  <bruno@clisp.org>
137598         * gnulib-tool (func_emit_lib_Makefile_am): Don't add no-dependencies
137599         to the AUTOMAKE_OPTIONS.
137600         Reported by Jim Meyering.
137602 2006-09-29  Paul Eggert  <eggert@cs.ucla.edu>
137604         Work around bug in Solaris 10 /proc file system:
137605         /proc/self/fd/NNN/.. isn't the parent directory of
137606         the directory whose file descriptor is NNN.  This needs to
137607         be worked around at run time, not compile time, since a
137608         program might be built on Solaris 8, where things work, and
137609         run on Solaris 10.
137610         * lib/openat-priv.h (BUILD_PROC_NAME): Remove.  All callers changed
137611         to use the following interface instead:
137612         (OPENAT_BUFFER_SIZE): New macro.
137613         (openat_proc_name): New function.
137614         * lib/at-func.c (AT_FUNC_NAME): Adjust to above changes.
137615         * lib/openat.c (openat_permissive, openat_needs_fchdir, fdopendir):
137616         Likewise.
137617         * lib/openat-proc.c: New file.
137618         * modules/openat (Files): Add lib/openat-proc.c.
137619         (Depends-on): Add same-inode, stdbool.
137620         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBOBJ(openat-proc).
137622 2006-09-29  Bruno Haible  <bruno@clisp.org>
137624         * lib/fwriteerror.h (fwriteerror_no_ebadf): New declaration.
137625         * lib/(do_fwriteerror): Renamed from fwriteerror. Add ignore_ebadf
137626         argument. Set stdout_closed before testing for ferror, not after.
137627         (fwriteerror, fwriteerror_no_ebadf): New functions.
137629 2006-09-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
137631         * m4/intmax.m4 (gt_TYPE_INTMAX_T): Avoid unused variables warning.
137633 2006-09-28  Paolo Bonzini  <bonzini@gnu.org>
137635         * lib/poll.c (rpl_poll) [__APPLE__]: Use FIONREAD instead of MSG_PEEK.
137636         * m4/poll.m4: Look for sys/ioctl.h and sys/filio.h.
137638 2006-09-28  Jim Meyering  <jim@meyering.net>
137640         * lib/mkdir-p.c: Include "dirchownmod.h", not "dirchownmod.c".
137641         Include <unistd.h>.
137643 2006-09-28  Bruno Haible  <bruno@clisp.org>
137645         * modules/avltreehash-list (Depends-on): Add stdint, remove size_max.
137646         * modules/linkedhash-list (Depends-on): Likewise.
137647         * modules/rbtreehash-list (Depends-on): Likewise.
137649 2006-09-28  Bruno Haible  <bruno@clisp.org>
137651         * lib/strndup.h: Simplify the redefinition of strndup.
137652         (_GL_CONCAT, _GL_XCONCAT, __STRNDUP_ID): Remove macros.
137653         * m4/strndup.m4 (gl_FUNC_STRNDUP): Don't define __STRNDUP_PREFIX.
137655 2006-09-28  Bruno Haible  <bruno@clisp.org>
137657         * lib/gl_avltreehash_list.c: Include <stdint.h> instead of size_max.h.
137658         * lib/gl_linkedhash_list.c: Likewise.
137659         * lib/gl_rbtreehash_list.c: Likewise.
137661 2006-09-27  Paul Eggert  <eggert@cs.ucla.edu>
137663         * lib/canon-host.c (canon_host_r): Work around bug in Darwin 7.9.0
137664         getaddrinfo.
137666         * lib/__fpending.h: Don't include <stdio_ext.h> unless
137667         HAVE_DECL___FPENDING.  This avoids a bug with lsbcc, where
137668         it causes <stdio_ext.h> to cause a compile-time error.
137669         Problem reported by Nelson H. F. Beebe.
137670         * lib/getpass.c: Likewise, except for HAVE_DECL___FSETLOCKING instead
137671         of HAVE_DECL___PENDING.
137673         * m4/fpending.m4 (gl_FUNC_FPENDING): Check for stdio_ext at most once.
137674         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for __fsetlocking's
137675         declaration.
137677 2006-09-27  Jim Meyering  <jim@meyering.net>
137679         This file could end up with a definition for a function
137680         named __strndup, rather than rpl_strndup on a system with
137681         incomplete weak_alias support.
137682         * lib/strndup.c (strndup): Rename from __strndup.
137683         Remove #defines that used to map __strndup to strndup.
137684         Don't use K&R prototypes.
137685         Remove LIBC-related code, since this file is not sync'd with glibc.
137686         * lib/strndup.h: Revamp, accordingly.
137687         * m4/strndup.m4: Modernize.
137689 2006-09-26  Paul Eggert  <eggert@cs.ucla.edu>
137691         * modules/savewd (Depends-on): Add 'raise'.
137692         * lib/savewd.c: Include <signal.h>, for 'raise'.
137694 2006-09-26  Jim Meyering  <jim@meyering.net>
137696         * m4/acl.m4 (AC_FUNC_ACL): Disable ACL support altogether
137697         when we detect Darwin 8.7.0's acl_get_file bug.
137698         Rearrange to perform the new (below) run-test while $LIBS
137699         contains any acl-related library.  Set USE_ACL at the end.
137700         (gl_ACL_GET_FILE): New function.
137702 2006-09-26  Eric Blake  <ebb9@byu.net>
137704         * lib/verror.c: Include <config.h> unconditionally.
137706 2006-09-25  Paul Eggert  <eggert@cs.ucla.edu>
137708         * modules/clock-time (Maintainer): Add self.
137709         * modules/getlogin_r (Depends-on): Add extensions.
137711 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
137713         * modules/clock-time: New module.
137714         * modules/nanosleep (Depends-on): Add clock-time.
137715         * modules/gethrxtime (Depends-on): Likewise.
137716         * modules/gettime (Depends-on): Likewise.
137717         * modules/settime (Depends-on): Likewise.
137719         * modules/fts-lgpl: Depend on openat.
137720         * modules/mkancesdirs: Depend on savewd.
137721         * modules/mkdir-p: Likewise.
137723 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
137725         * m4/host-os.m4 (gl_HOST_OS): Require AC_CANONICAL_HOST.
137727         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Rename cache variable from
137728         `gl_have_arbitrary_file_name_length_limit' to
137729         `gl_cv_have_arbitrary_file_name_length_limit', so that caching
137730         actually works between configure runs.
137732 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
137733             Bruno Haible  <bruno@clisp.org>
137735         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Include <string.h>.
137737 2006-09-25  Jim Meyering  <jim@meyering.net>
137739         * m4/fcntl_h.m4 (gl_FCNTL_H): Fix typo in test for failed open.
137740         This typo caused coreutils/tests/dd/misc to fail on Darwin 8.7.0.
137742 2006-09-25  Eric Blake  <ebb9@byu.net>
137744         * gnulib-tool (func_import, func_create_testdir): Fix typos in
137745         exec's in 2006-09-18 patch when shuffling fds.
137747 2006-09-25  Bruno Haible  <bruno@clisp.org>
137749         * m4/getloadavg.m4 (gl_GETLOADAVG): Fix directory in error message.
137750         Reported by Jim Meyering.
137752 2006-09-24  Jim Meyering  <jim@meyering.net>
137754         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't use '>' to
137755         compare a pointer against a literal "0".  That caused failures with
137756         at least HP-UX's hpcc.
137758 2006-09-22  Simon Josefsson  <jas@extundo.com>
137760         * modules/gc-sha1:
137761         * modules/gc-md4:
137762         * modules/gc-hmac-sha1:
137763         * modules/gc-hmac-md5:
137764         * modules/gc-des:
137765         * modules/gc-arcfour: Distribute more files.
137767 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
137769         * lib/gl_anylinked_list2.h [lint] (gl_linked_iterator)
137770         (gl_linked_iterator_from_to): Initialize struct completely.
137771         * lib/gl_anytree_list2.h [lint] (gl_tree_iterator): Likewise.
137772         (gl_tree_iterator_from_to): Likewise
137773         * lib/gl_anytree_oset.h [lint] (gl_tree_iterator): Likewise.
137774         * lib/gl_array_list.c [lint] (gl_array_iterator)
137775         (gl_array_iterator_from_to): Likewise.
137776         * lib/gl_array_oset.c [lint] (gl_array_iterator): Likewise.
137777         * lib/gl_carray_list.c [lint] (gl_carray_iterator)
137778         (gl_carray_iterator_from_to): Likewise.
137780         * lib/gc-gnulib.c [GC_USE_HMAC_SHA1]: include hmac.h for hmac_sha1.
137781         * lib/md4.c (md4_process_block): Remove unused variable.
137782         * lib/rijndael-api-fst.c (rijndaelBlockDecrypt): GCC suggests
137783         parentheses for clarity.
137785 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
137787         * modules/bison-i18n (Depends-on): Add gettext.
137789 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
137791         * m4/fsusage.m4 (gl_STATFS_TRUNCATES): Avoid unused variable.
137792         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): Likewise.
137793         * m4/jm-winsz1.m4 (gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H): Likewise;
137794         also add missing comma that caused broken test.
137795         * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Include
137796         stdlib.h, for `abort'.
137797         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Avoid unused
137798         variables.
137799         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Check for and
137800         include unistd.h if present, for `rmdir'.
137801         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): Avoid unused
137802         variables.
137803         * m4/putenv.m4 (gl_FUNC_PUTENV): Rewrite using AC_RUN_IFELSE, and
137804         in the process include standard headers for prototypes.
137805         * m4/readutmp.m4 (gl_READUTMP): Require AC_GNU_SOURCE, so utmpxname
137806         gets declared on GNU/Linux.
137807         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Check for and include
137808         unistd.h, for `rmdir'.
137809         * m4/time_r.m4 (gl_TIME_R): Avoid unused variables.
137811         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Avoid expression that is
137812         always true.
137813         * m4/strndup.m4 (gl_FUNC_STRNDUP): include stdlib.h, for `free'.
137815         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Avoid gcc -Wall warnings.
137817 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
137819         * gnulib-tool (func_version): Create output all at once.  This
137820         may help avoid triggering unnecessary SIGPIPEs, and at any
137821         rate it doesn't hurt.
137823 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
137824             Bruno Haible  <bruno@clisp.org>
137826         * m4/lock.m4 (gl_LOCK_BODY): Avoid unused variables warning.
137827         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
137828         * m4/signed.m4 (bh_C_SIGNED): Likewise.
137830         * m4/vasprintf.m4 (gl_PREREQ_VASPRINTF_H): New macro.
137831         (gl_FUNC_VASPRINTF): Invoke it.
137833 2006-09-22  Bruno Haible  <bruno@clisp.org>
137835         * m4/getloadavg.m4 (gl_GETLOADAVG): Expect the directory of
137836         getloadavg.c as first argument.
137838 2006-09-22  Bruno Haible  <bruno@clisp.org>
137840         * gnulib-tool (func_import, func_create_testdir): Set gl_source_base
137841         at the beginning of the gl_INIT macro.
137842         * modules/getloadavg (configure.ac): Pass $gl_source_base to
137843         gl_GETLOADAVG.
137845 2006-09-22  Bruno Haible  <bruno@clisp.org>
137847         * gnulib-tool (func_create_megatestdir): Don't include the config-h
137848         module.
137849         Suggested by Ralf Wildenhues.
137851 2006-09-20  Paul Eggert  <eggert@cs.ucla.edu>
137853         Import this patch from libc:
137855         2006-09-06  Jakub Jelinek  <jakub@redhat.com>
137857         * lib/regex_internal.c (re_string_reconstruct): Handle
137858         offset < pstr->valid_raw_len && pstr->offsets_needed case.
137859         Ensure no bytes read before raw_mbs array.  Pass a saved copy of
137860         pstr->valid_len - 1 rather than pstr->valid_raw_len - 1 to
137861         re_string_context_at.
137863         * m4/regex.m4 (gl_REGEX): Check for locale.h, since the test
137864         now requires it.
137865         (gl_PREREQ_REGEX): Don't check for locale.h any more, since
137866         gl_REGEX now does it for us.
137867         (gl_REGEX): Add test taken from
137868         http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html.
137870         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require AC_SYS_LARGEFILE.
137871         Check that large offsets work.  Modernize Autoconf usages.
137872         Prefer "yes" to mean a good thing rather than a bad.
137873         Don't put "#define mkstemp" in config.h, as this might interfere
137874         with standard system headers that "#define mkstemp mkstemp64".
137876         * modules/mkstemp (Depends-on): Add extensions, so that
137877         mkstemp is visible on some platforms.
137878         (Makefile.am): Add mkstemp.h to EXTRA_DIST.
137879         (Include): Change to "mkstemp.h" from <stdlib.h>.
137880         (Files): Add mkstemp.h.
137882         * lib/mkstemp.h: New file, since some standard headers
137883         #define mkstemp.
137884         * lib/mkstemp.c: Revamp to put the !_LIBC code together.
137885         Include "mkstemp.h".
137886         Make the _LIBC code resemble glibc original more,
137887         e.g., use K&R style.
137888         * lib/mkstemp-safer.c: Include "mkstemp.h" instead of <stdlib.h>.
137889         (mkstemp): Remove, since mkstemp.h does this for us.
137890         * lib/stdlib--.h: Include mkstemp.h.
137892         Import this patch from libc:
137894         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
137896         * lib/tempname.c (__gen_tempname): Change attempts_min
137897         into a macro.  Use preprocessor to decide how to initialize
137898         attempts [Coverity CID 67].
137900 2006-09-20  Bruno Haible  <bruno@clisp.org>
137902         * lib/mkdtemp.c: Import from libc.
137903         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
137904                 * sysdeps/posix/tempname.c (__gen_tempname): Change
137905                 attempts_min into a macro.  Use preprocessor to decide how to
137906                 initialize attempts [Coverity CID 67].
137907         2001-11-27  Paul Eggert  <eggert@twinsun.com>
137908                 * sysdeps/posix/tempname.c (__gen_tempname): Try at least
137909                 ATTEMPTS_MIN or TMP_MAX times, whichever is greater.
137911 2006-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
137913         * gnulib-tool (func_exit): New function, to allow to pass the
137914         exit status portably through the trap.  Use everywhere.
137915         (--help, --version): Signal a write error.
137916         (trap): catch SIGPIPE, for write errors.
137917         Exit at the end of the trap, with the correct exit status.
137919 2006-09-19  Karl Berry  <karl@gnu.org>
137921         * doc/gnulib.texi: note about the license texinfo files.
137923 2006-09-19  Eric Blake  <ebb9@byu.net>
137925         * gnulib-tool: Avoid space-tab.
137927 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
137929         * lib/getaddrinfo.c (getaddrinfo) [defined HAVE_IPV6]: Fix typo
137930         that prevented coreutils 6.1 from building.  Problem reported
137931         by Petter Reinholdtsen.
137933 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
137935         * gnulib-tool (avoidlist): Fix typo that broke options like
137936         --avoid=lock that are used by coreutils bootstrap.
137938 2006-09-18  Mark D. Baushke  <mdb@gnu.org>
137940         * m4/inttypes.m4 (gl_INTTYPES_H): Quote "test" args
137941         more systematically.
137943 2006-09-18  Jim Meyering  <jim@meyering.net>
137945         * lib/savewd.c (savewd_restore): Don't shadow: s/status/child_status/.
137947 2006-09-18  Bruno Haible  <bruno@clisp.org>
137949         * modules/inttypes (Files): Remove m4/inttypes-h.m4.
137951 2006-09-18  Bruno Haible  <bruno@clisp.org>
137953         * m4/inttypes-h.m4 (gl_HEADER_INTTYPES_H): Remove macro.
137954         * m4/inttypes-pri.m4: Require autoconf >= 2.52.
137955         (gt_INTTYPES_PRI): Invoke AC_CHECK_HEADERS on inttypes.h. Test
137956         ac_cv_header_inttypes_h instead of gl_cv_header_inttypes_h.
137957         * m4/gettext.m4: Require autoconf >= 2.52.
137958         (gt_INTL_SUBDIR_CORE): Invoke AC_CHECK_HEADERS on inttypes.h.
137959         * m4/inttypes.m4 (gl_INTTYPES_H): Test ac_cv_header_inttypes_h instead
137960         of gl_cv_header_inttypes_h.
137962 2006-09-18  Bruno Haible  <bruno@clisp.org>
137964         * lib/javaversion.c: Include configmake.h.
137966 2006-09-18  Bruno Haible  <bruno@clisp.org>
137968         * gnulib-tool (func_import, func_create_testdir): Use exec tricks to
137969         avoid that the while loops be executed in a subshell.
137971 2006-09-18  Bruno Haible  <bruno@clisp.org>
137973         * MODULES.html.sh (func_module): Break long lines.
137974         Suggested by Bruce Korb <bkorb@gnu.org>.
137976 2006-09-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
137978         Speed up by a factor of 1.12.
137979         * gnulib-tool (nl): New variable.
137980         (func_import): Rewrite include directive extraction to only read each
137981         directive once.
137983 2006-09-17  Bruno Haible  <bruno@clisp.org>
137985         * modules/javaversion (Makefile.am): Remove DEFS setting.
137986         (Depends-on): Add configmake, for PKGDATADIR definition.
137988 2006-09-17  Bruno Haible  <bruno@clisp.org>
137990         * gnulib-tool (func_create_testdir): Rewrite all files at once.
137992 2006-09-17  Bruno Haible  <bruno@clisp.org>
137994         * gnulib-tool (func_append): New function, stolen from libtool.m4.
137995         (func_modules_transitive_closure, func_modules_add_dummy,
137996         func_modules_to_filelist, func_import, func_create_testdir,
137997         func_create_megatestdir, ...): Use it wherever possible.
137998         Suggested by Ralf Wildenhues.
138000 2006-09-16  Karl Berry  <karl@gnu.org>
138002         * doc/fdl.texi (ADDENDUM): switch to @heading from @appendixsubsec,
138003         to avoid sectioning errors.
138004         * doc/lgpl.texi, gpl.texi (Copying): downcase @unnumbered title.
138005         [ifinfo]: blank line after @center-ed titles.
138006         * doc/lgpl.texi (Library Copying): Rename main node to GNU LGPL.
138007         Spell FSF address consistently with others.
138008         (These changes approved by rms.)
138010 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
138012         Speed up by a factor of 1.61.
138013         * gnulib-tool (func_modules_transitive_closure): Rewrite to not check
138014         already checked module names again.
138016 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
138018         Speed up by a factor of 1.13.
138019         * gnulib-tool (func_import): Rewrite all old_files at once; likewise
138020         for new_files, and the input to func_add_or_update.
138022 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
138024         * gnulib-tool (func_all_modules, func_modules_to_filelist, func_import,
138025         func_create_testdir, ...): Change 'sort | uniq' to 'sort -u'.
138027 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
138029         * modules/mkancesdirs (Depends-on): Add fcntl.
138030         * modules/savewd: New file.
138031         * MODULES.html.sh (File system functions): Add savewd.
138033         * modules/configmake (Makefile.am): Add support for the
138034         Automake-supplied PKGLIBDIR, PKGINCLUDEDIR, PKGDATADIR.
138036 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
138038         * m4/savewd.m4: New file.
138040 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
138042         * lib/dirchownmod.c: Don't include fcntl.h; no longer needed.
138043         (dirchownmod): New arg FD.  All callers changed.
138044         Use FD rather than opening the directory ourself, as opening is
138045         now the caller's responsibility.
138046         * lib/dirchownmod.h: Likewise.
138047         * lib/mkancesdirs.c: Include <sys/types.h>, for portability to older
138048         hosts that require <sys/types.h> before <sys/stat.h>.  Include
138049         fcntl.h, savewd.h, and unistd.h, not dirname.h and stat-macros.h.
138050         (test_dir): Remove.
138051         (mkancesdirs): Return length of prefix of FILE that has already
138052         been made, or -2 if there is a child doing the work.  Redo
138053         algorithm so that it is O(N) rather than O(N**2).  Optimize away
138054         ".", and treat ".." specially since it might stray back into
138055         already-created areas.  Use a subprocess if necessary.  New arg
138056         WD; all users changed.  MAKE_DIR function should now return 1
138057         if it creates a directory that is not readable.  Return -2 if
138058         a child process is spun off.
138059         * lib/mkancesdirs.h: Include <stddef.h>, for ptrdiff_t.
138060         Adjust signature to match code.
138061         * lib/mkdir-p.c: Include dirname.h, for IS_ABSOLUTE_FILE_NAME.
138062         (make_dir_parents): Use a subprocess if necessary.  New arg WD;
138063         all users changed.
138064         * lib/savewd.c, lib/savewd.h: New files.
138066 2006-09-15  Jim Meyering  <jim@meyering.net>
138068         * modules/rename-dest-slash: New module.
138069         * MODULES.html.sh (posix_compat): Add it here.
138071         * modules/rename: Reflect vb_FUNC_RENAME -> gl_FUNC_RENAME change.
138073 2006-09-15  Jim Meyering  <jim@meyering.net>
138075         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH): New
138076         file.
138078         * m4/rename.m4 (gl_FUNC_RENAME): Rename from vb_FUNC_RENAME.
138080 2006-09-15  Jim Meyering  <jim@meyering.net>
138082         * lib/rename-dest-slash.c (has_trailing_slash): Use
138083         FILE_SYSTEM_PREFIX_LEN, for non-POSIX systems.
138084         (rpl_rename_dest_slash): Perform the cheaper trailing slash
138085         test before testing whether SRC is a directory.
138086         Suggestions from Bruno Haible.
138088         Avoid a warning about an unused variable.
138089         * lib/regex_internal.c (re_dfa_add_node): Move declaration of "type"
138090         into the #ifdef block where it's used.
138092         * lib/rename-dest-slash.c: New file.
138094 2006-09-14  Bruno Haible  <bruno@clisp.org>
138096         * lib/allocsa.c: Include <config.h> unconditionally.
138097         * lib/asnprintf.c: Likewise.
138098         * lib/asprintf.c: Likewise.
138099         * lib/c-strcasecmp.c: Likewise.
138100         * lib/c-strcasestr.c: Likewise.
138101         * lib/c-strncasecmp.c: Likewise.
138102         * lib/c-strstr.c: Likewise.
138103         * lib/classpath.c: Likewise.
138104         * lib/clean-temp.c: Likewise.
138105         * lib/concatpath.c: Likewise.
138106         * lib/copy-file.c: Likewise.
138107         * lib/csharpcomp.c: Likewise.
138108         * lib/csharpexec.c: Likewise.
138109         * lib/execute.c: Likewise.
138110         * lib/fatal-signal.c: Likewise.
138111         * lib/findprog.c: Likewise.
138112         * lib/fwriteerror.c: Likewise.
138113         * lib/gl_array_list.c: Likewise.
138114         * lib/gl_array_oset.c: Likewise.
138115         * lib/gl_avltree_list.c: Likewise.
138116         * lib/gl_avltree_oset.c: Likewise.
138117         * lib/gl_avltreehash_list.c: Likewise.
138118         * lib/gl_carray_list.c: Likewise.
138119         * lib/gl_linked_list.c: Likewise.
138120         * lib/gl_linkedhash_list.c: Likewise.
138121         * lib/gl_list.c: Likewise.
138122         * lib/gl_oset.c: Likewise.
138123         * lib/gl_rbtree_list.c: Likewise.
138124         * lib/gl_rbtree_oset.c: Likewise.
138125         * lib/gl_rbtreehash_list.c: Likewise.
138126         * lib/imaxabs.c: Likewise.
138127         * lib/imaxdiv.c: Likewise.
138128         * lib/javacomp.c: Likewise.
138129         * lib/javaexec.c: Likewise.
138130         * lib/javaversion.c: Likewise.
138131         * lib/linebreak.c: Likewise.
138132         * lib/localcharset.c: Likewise.
138133         * lib/lock.c: Likewise.
138134         * lib/mbchar.c: Likewise.
138135         * lib/mbswidth.c: Likewise.
138136         * lib/mkdtemp.c: Likewise.
138137         * lib/pipe.c: Likewise.
138138         * lib/printf-args.c: Likewise.
138139         * lib/printf-parse.c: Likewise.
138140         * lib/progname.c: Likewise.
138141         * lib/progreloc.c: Likewise.
138142         * lib/readlink.c: Likewise.
138143         * lib/sh-quote.c: Likewise.
138144         * lib/stpcpy.c: Likewise.
138145         * lib/stpncpy.c: Likewise.
138146         * lib/strcasecmp.c: Likewise.
138147         * lib/strcasestr.c: Likewise.
138148         * lib/strcspn.c: Likewise.
138149         * lib/striconv.c: Likewise.
138150         * lib/strncasecmp.c: Likewise.
138151         * lib/strnlen1.c: Likewise.
138152         * lib/strstr.c: Likewise.
138153         * lib/strtok_r.c: Likewise.
138154         * lib/tls.c: Likewise.
138155         * lib/tmpdir.c: Likewise.
138156         * lib/unicodeio.c: Likewise.
138157         * lib/unsetenv.c: Likewise.
138158         * lib/vasnprintf.c: Likewise.
138159         * lib/vasprintf.c: Likewise.
138160         * lib/wait-process.c: Likewise.
138161         * lib/xallocsa.c: Likewise.
138162         * lib/xsetenv.c: Likewise.
138163         * lib/xstriconv.c: Likewise.
138165 2006-09-13  Simon Josefsson  <jas@extundo.com>
138167         * m4/getdate.m4: Don't AC_LIBOBJ([getdate]), automake takes care of
138168         that internally, suggested by Ralf Wildenhues
138169         <Ralf.Wildenhues@gmx.de>.
138171 2006-09-13  Simon Josefsson  <jas@extundo.com>
138173         * gnulib-tool (func_emit_lib_Makefile_am): Use $(LIBOBJS), not
138174         @LIBOBJS@.
138175         Suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
138177 2006-09-13  Paul Eggert  <eggert@cs.ucla.edu>
138179         * lib/_fpending.c: Include <config.h> unconditionally, since we no
138180         longer worry about uses that don't define HAVE_CONFIG_H.
138181         * lib/acl.c, lib/alloca.c, lib/argmatch.c, lib/atexit.c:
138182         * lib/backupfile.c, lib/basename.c, lib/c-stack.c, lib/c-strtod.c:
138183         * lib/calloc.c,lib/ canon-host.c, lib/canonicalize.c, lib/chdir-long.c:
138184         * lib/chdir-safer.c, lib/chown.c, lib/cloexec.c, lib/close-stream.c:
138185         * lib/closeout.c, lib/creat-safer.c, lib/cycle-check.c, lib/diacrit.c:
138186         * lib/dirchownmod.c, lib/dirfd.c, lib/dirname.c, lib/dup-safer.c:
138187         * lib/dup2.c, lib/error.c, lib/euidaccess.c, lib/exclude.c:
138188         * lib/exitfail.c, lib/fchmodat.c, lib/fchown-stub.c, lib/fd-safer.c:
138189         * lib/file-type.c, lib/fileblocks.c, lib/filemode.c, lib/filenamecat.c:
138190         * lib/fnmatch.c, lib/fopen-safer.c, lib/fprintftime.c, lib/free.c:
138191         * lib/fsusage.c, lib/ftruncate.c, lib/fts-cycle.c, lib/fts.c:
138192         * lib/full-write.c, lib/gai_strerror.c, lib/getcwd.c, lib/getdate.y:
138193         * lib/getdomainname.c, lib/getgroups.c, lib/gethostname.c:
138194         * lib/gethrxtime.c, lib/getloadavg.c, lib/getlogin_r.c:
138195         * lib/getndelim2.c, lib/getnline.c, lib/getopt.c, lib/getopt1.c:
138196         * lib/getpass.c, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c:
138197         * lib/getusershell.c, lib/glob.c, lib/group-member.c:
138198         * lib/hard-locale.c, lib/hash-pjw.c, lib/hash.c, lib/human.c:
138199         * lib/idcache.c, lib/inet_ntop.c, lib/inet_pton.c, lib/inttostr.c:
138200         * lib/isdir.c, lib/lchown.c, lib/linebuffer.c, lib/long-options.c:
138201         * lib/lstat.c, lib/malloc.c, lib/md5.c, lib/memcasecmp.c, lib/memchr.c:
138202         * lib/memcmp.c, lib/memcoll.c, lib/memcpy.c, lib/memmove.c:
138203         * lib/memrchr.c, lib/mkancesdirs.c, lib/mkdir-p.c, lib/mkdir.c:
138204         * lib/mkdirat.c, lib/mkstemp-safer.c, lib/mkstemp.c, lib/modechange.c:
138205         * lib/mountlist.c, lib/nanosleep.c, lib/obstack.c, lib/open-safer.c:
138206         * lib/openat-die.c, lib/openat.c, lib/pagealign_alloc.c, lib/physmem.c:
138207         * lib/pipe-safer.c, lib/posixtm.c, lib/posixver.c, lib/putenv.c:
138208         * lib/quote.c, lib/quotearg.c, lib/raise.c, lib/readtokens.c:
138209         * lib/readtokens0.c, lib/readutmp.c, lib/realloc.c, lib/regex.c:
138210         * lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c:
138211         * lib/same.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c:
138212         * lib/settime.c, lib/sha1.c, lib/sig2str.c, lib/snprintf.c:
138213         * lib/strdup.c, lib/strerror.c, lib/strftime.c, lib/stripslash.c:
138214         * lib/strndup.c, lib/strnlen.c, lib/strpbrk.c, lib/strtod.c:
138215         * lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c:
138216         * lib/time_r.c, lib/timegm.c, lib/tmpfile-safer.c, lib/unlinkdir.c:
138217         * lib/userspec.c, lib/utime.c, lib/utimecmp.c, lib/utimens.c:
138218         * lib/version-etc-fsf.c, lib/version-etc.c, lib/xalloc-die.c:
138219         * lib/xgetcwd.c, lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c:
138220         * lib/xnanosleep.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtoimax.c:
138221         * lib/xstrtol.c, lib/xstrtoumax.c, lib/yesno.c:
138222         Likewise.
138224 2006-09-13  Eric Blake  <ebb9@byu.net>
138226         * lib/getopt.c: Fix typo in last commit.
138228 2006-09-12  Sergey Poznyakoff  <gray@gnu.org.ua>
138230         * lib/argp-help.c (argp_doc): Make sure NULL is not passed to
138231         dgettext.
138233 2006-09-12  Jim Meyering  <jim@meyering.net>
138235         * lib/nanosleep.c: Include <sys/types.h> before sys/select.h, to avoid
138236         compilation failure (due to use of pid_t in latter) on NetBSD 1.6.
138237         Reported by Nelson H. F. Beebe.
138239 2006-09-10  Sergey Poznyakoff  <gray@gnu.org.ua>
138241         * lib/argp-parse.c (__argp_parse) [!_LIBC]: Make sure
138242         program_invocation_name and program_invocation_short_name are
138243         initialized.
138244         * lib/argp-namefrob.h: Move declarations of program_invocation_name
138245         and program_invocation_short_name to argp.h, so they are visible
138246         to user programs.
138247         * lib/argp.h: Likewise
138249 2006-09-10  Bruno Haible  <bruno@clisp.org>
138251         * modules/mkdtemp (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
138252         m4/inttypes_h.m4, m4/uintmax_t.m4.
138254 2006-09-10  Bruno Haible  <bruno@clisp.org>
138256         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Don't require
138257         gl_AC_TYPE_UINTMAX_T.
138259 2006-09-10  Bruno Haible  <bruno@clisp.org>
138261         * lib/mkdtemp.c: Include <stdint.h> always. Don't include <inttypes.h>.
138263 2006-09-09  Sergey Poznyakoff  <gray@gnu.org.ua>
138265         * lib/argp.h (struct argp): Document the N_("..") "\v" N_("..")
138266         convention.  Text proposed by Bruno Haible.
138267         (struct argp_option): Document the use of N_() wrappers.
138269         * lib/argp-help.c (argp_doc): Split the untranslated doc string on
138270         '\v', and translate the two parts separately, instead of feeding
138271         the whole string to gettext.  This allows to exclude
138272         '\v' from the strings visible to the translator by writing doc
138273         strings as N_("..") "\v" N_("..").
138275 2006-09-09  Paul Eggert  <eggert@cs.ucla.edu>
138277         * config/srclist.txt: Undo latest change; the bug was fixed.
138279 2006-09-09  Bruno Haible  <bruno@clisp.org>
138281         * gnulib-tool (func_emit_lib_Makefile_am): Eliminate lib_LDFLAGS
138282         assignments if building a library without libtool.
138283         (func_emit_tests_Makefile_am): Likewise. Handle lib_* variables as
138284         in func_emit_lib_Makefile_am.
138285         (func_import): When building a static library libfoo.a, arrange to
138286         define variables LIBFOO_LIBDEPS and LIBFOO_LTLIBDEPS.
138287         (func_create_testdir): Likewise.
138288         * modules/gc (configure.ac, Makefile.am): If building statically,
138289         augment gl_libdeps and gl_ltlibdeps instead of lib_LDFLAGS.
138290         * modules/iconvme (configure.ac, Makefile.am): Likewise.
138291         * modules/striconv (configure.ac, Makefile.am): Likewise.
138292         Based on a suggestion by Ralf Wildenhues.
138294 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
138296         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
138297         Check for unistd.h too, since Autoconf doesn't assume POSIX.
138298         Also:
138300         2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
138301         Add year_2050_test to catch glibc bug 2821
138302         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
138304         2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
138305         Prefer #ifdef to #if.
138307         2006-04-02  Paul Eggert  <eggert@cs.ucla.edu>
138308         Return from 'main' instead of calling 'exit'.
138310 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
138312         * lib/mktime.c (guess_time_tm): Fix bug where mktime
138313         returned the maximum time_t value rather than (time_t) -1.
138314         Problem originally reported by William Bardwell
138315         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
138317         * lib/isapipe.h (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
138318         Moved to here ...
138319         * lib/isapipe.c (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
138320         ... from here.
138322 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
138324         * config/srclist.txt: Temporarily comment out mktime.c until glibc bug
138325         2821 is fixed.
138327 2006-09-08  Jim Meyering  <jim@meyering.net>
138329         Don't make generated files read-only.  That would bother too many
138330         people.  However, do retain the ability to work when targets are
138331         read-only: remove the destination and temporary files before writing
138332         them (when generated via sed or echo), or by using the -f option for
138333         both cp and mv commands.  Suggestion to use -f from Paul Eggert.
138334         * modules/alloca-opt, modules/argz, modules/arpa_inet:
138335         * modules/byteswap, modules/configmake, modules/fcntl:
138336         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
138337         * modules/localcharset, modules/netinet_in, modules/poll:
138338         * modules/stdbool, modules/stdint, modules/sys_select:
138339         * modules/sys_socket, modules/sys_stat, modules/sysexits:
138341 2006-09-08  Jim Meyering  <jim@meyering.net>
138343         Avoid new build failure on FreeBSD 6.0.
138344         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Include
138345         <sys/param.h> when testing whether getmntinfo uses statvfs.  Patch by
138346         Pavel Tsekov, in <http://savannah.gnu.org/bugs/?17643>.
138348 2006-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
138350         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't use plain echo.
138352 2006-09-07  Jim Meyering  <jim@meyering.net>
138354         Fix global typo in last change: use chmod u-w, not chmod u-x.
138355         Spotted by Paul Eggert and Bruce Korb.
138356         * modules/alloca-opt, modules/argz, modules/arpa_inet:
138357         * modules/byteswap, modules/configmake, modules/fcntl:
138358         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
138359         * modules/localcharset, modules/netinet_in, modules/poll:
138360         * modules/stdbool, modules/stdint, modules/sys_select:
138361         * modules/sys_socket, modules/sys_stat, modules/sysexits:
138363 2006-09-06  Jim Meyering  <jim@meyering.net>
138365         Make generated files be read-only.
138366         * modules/alloca-opt (Makefile.am): Work also when $@ is read-only.
138367         Ensure that each generated file is now read-only.
138368         * modules/argz: Likewise.
138369         * modules/arpa_inet: Likewise.
138370         * modules/byteswap: Likewise.
138371         * modules/configmake: Likewise.
138372         * modules/fcntl: Likewise.
138373         * modules/fnmatch: Likewise.
138374         * modules/getopt: Likewise.
138375         * modules/glob: Likewise.
138376         * modules/inttypes: Likewise.
138377         * modules/netinet_in: Likewise.
138378         * modules/poll: Likewise.
138379         * modules/stdbool: Likewise.
138380         * modules/stdint: Likewise.
138381         * modules/sys_select: Likewise.
138382         * modules/sys_socket: Likewise.
138383         * modules/sys_stat: Likewise.
138384         * modules/sysexits: Likewise.
138385         * modules/localcharset: Same as above, but continue using temporary
138386         file named "t-$@" (why different?) rather than the "$@-t" used
138387         everywhere else.
138389         * modules/sysexits (Makefile.am): Replace literal occurrences
138390         of "sysexit.h" more readable, and more consistent, "$@".
138392 2006-09-06  Bruno Haible  <bruno@clisp.org>
138394         * modules/striconv: New file.
138395         * modules/xstriconv: New file.
138396         * MODULES.html.sh (Internationalization functions): Add striconv,
138397         xstriconv.
138399 2006-09-06  Bruno Haible  <bruno@clisp.org>
138401         * modules/gc (Makefile.am): Augment lib_LDFLAGS, not lib_LIBADD.
138402         * modules/iconvme (Makefile.am): Likewise. Also handle the case of
138403         not using libtool correctly.
138405 2006-09-06  Bruno Haible  <bruno@clisp.org>
138407         * lib/striconv.h: New file.
138408         * lib/striconv.c: New file, merging iconvme.c with GNU gettext's
138409         iconvstring.c.
138410         * lib/xstriconv.h: New file.
138411         * lib/xstriconv.c: New file.
138413 2006-09-06  Bruno Haible  <bruno@clisp.org>
138415         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
138416         lib_..._LDFLAGS.
138418 2006-09-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
138420         * lib/argz_.h: Sync from Libtool.
138422         2006-09-04  George Bosilca <bosilca@cs.utk.edu>
138423                 and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
138425         * lib/libltdl/argz_.h: It's __cplusplus, not _cplusplus.
138427 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
138429         * modules/trim: New file.
138431 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
138433         * lib/trim.h: New file.
138434         * lib/trim.c: New file.
138436 2006-09-05  Bruno Haible  <bruno@clisp.org>
138438         * MODULES.html.sh (String handling): Add trim.
138440 2006-09-04  Karl Berry  <karl@gnu.org>
138442         * config/srclist.txt (signed.m4, gettext.m4): changes not propagated
138443         until next release.
138445 2006-09-03  Bruno Haible  <bruno@clisp.org>
138447         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Locate mingw shared libraries
138448         correctly.
138450 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
138452         * m4/getloadavg.m4 (gl_GETLOADAVG): Use CONFIGURING_GETLOADAVG,
138453         not gl_GETLOADAVG.  Omit unneeded semicolons.
138454         Problems reported by Ralf Wildenhues in
138455         <http://lists.gnu.org/r/bug-gnulib/2006-09/msg00000.html>.
138456         (gl_PREREQ_GETLOADAVG): Use AC_DEFUN, not m4_define.  Put
138457         at the end, which is the usual gnulib style.
138459         * m4/fstypename.m4 (gl_FSTYPENAME): Use AC_CHECK_MEMBERS instead
138460         of doing all the work ourselves.
138461         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Don't check for
138462         sys/statvfs.h since the code doesn't use HAVE_SYS_STATVFS_H.
138464 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
138466         * lib/getloadavg.c: Use CONFIGURING_GETLOADAVG, not gl_GETLOADAVG.
138467         Problem reported by Ralf Wildenhues in
138468         <http://lists.gnu.org/r/bug-gnulib/2006-09/msg00000.html>.
138470         * lib/mountlist.c: All uses of HAVE_F_FSTYPENAME_IN_STATFS replaced by
138471         HAVE_STRUCT_STATFS_F_FSTYPENAME.
138473 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
138475         * gnulib-tool (func_emit_lib_Makefile_am): Fix typos in
138476         yesterday's patch by changing test -n to test -z.
138478 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
138480         * modules/getloadavg (Files): Add m4/getloadavg.m4.
138481         (configure.ac): AC_FUNC_GETLOADAVG -> gl_GETLOADAVG, as
138482         the former is now obsolescent.
138484         * modules/chdir-long (Depends-on): Add fcntl.
138486 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
138488         * m4/fnmatch.m4: Add comment that Autoconf AC_FUNC_FNMATCH is
138489         obsolescent, and programs should use gnulib instead.
138490         * m4/getloadavg.m4: New file, with contents taken from Autoconf
138491         but with prefixes changed.
138493 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
138495         * lib/getloadavg.c [defined gl_GETLOADAVG]: Don't include config.h
138496         or stdbool.h, because they might not exist while configuring.
138498         * lib/chdir-long.c: Include <fcntl.h>, for O_DIRECTORY.
138499         Don't include unistd.h or limits.h; not needed, since chdir-long.h
138500         does that for us.
138501         (O_DIRECTORY): Remove.
138503 2006-08-31  Eric Blake  <ebb9@byu.net>
138505         * gnulib-tool: Don't let emacs change spaces to TAB.
138507 2006-08-31  Bruno Haible  <bruno@clisp.org>
138509         * gnulib-tool: When calling func_import more than once, do it in a
138510         subshell.
138511         Reported by Eric Blake <ebb9@byu.net>.
138513 2006-08-31  Bruno Haible  <bruno@clisp.org>
138515         * gnulib-tool (nl): Remove variable.
138516         (sed_transform_lib_file): Use more robust test for config-h module.
138517         (func_import): Fix typo in 2006-08-25 patch.
138519 2006-08-31  Bruno Haible  <bruno@clisp.org>
138521         * gnulib-tool (func_emit_lib_Makefile_am): When --makefile-name was
138522         specified, augment Makefile.am variables instead of assigning them.
138524 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
138526         Work around a bug in both the Linux and SunOS 64-bit kernels:
138527         nanosleep mishandles sleeps for longer than 2**31 seconds.
138528         Problem reported by Frank v Waveren in
138529         <http://lists.gnu.org/r/bug-coreutils/2006-08/msg00298.html>.
138530         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Require gl_CLOCK_TIME.
138531         Check for nanosleep bug.
138532         (LIB_NANOSLEEP): Append clock_gettime library if needed.
138534 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
138536         Work around a bug in both the Linux and SunOS 64-bit kernels:
138537         nanosleep mishandles sleeps for longer than 2**31 seconds.
138538         Problem reported by Frank v Waveren in
138539         <http://lists.gnu.org/r/bug-coreutils/2006-08/msg00298.html>.
138540         * lib/nanosleep.c (BILLION): New constant.
138541         (getnow) [HAVE_BUG_BIG_NANOSLEEP]: New functions.
138542         (rpl_nanosleep) [HAVE_BUG_BIG_NANOSLEEP]: Completely new
138543         implementation.
138545 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
138547         * modules/nanosleep (Depends-on): Add gettime.
138549 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
138550         and Simon Josefsson  <jas@extundo.com>
138551         and Oskar Liljeblad  <oskar@osk.mine.nu>
138553         * MODULES.html.sh (Support for building documentation): Add gpl, lgpl.
138554         * gnulib-tool (func_import): New license type 'unmodifiable license
138555         text'.
138556         * modules/fdl: Use it.  Longer description.
138557         * module/gpl, module/lgpl: New files.
138559 2006-08-30  Jim Meyering  <jim@meyering.net>
138561         * lib/isapipe.c (isapipe): Rename local s/fd/fd_pair/ to avoid
138562         shadowing the parameter.
138564 2006-08-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
138566         Sync from Libtool:
138568         2006-08-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
138570         * lib/libltdl/argz.c: Use `#ifdef HAVE_CONFIG_H', to facilitate code
138571         sharing with gnulib.  Report by Eric Blake.
138573 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
138575         * modules/isapipe: New file.
138576         * MODULES.html.sh (File descriptor based Input/Output): Add isapipe.
138578 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
138580         * modules/configmake (Makefile.am): Add a comment, and omit
138581         the CONFIGMAKE_ prefix from generated macro names.  Suggested
138582         by Bruno Haible.
138584 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
138586         * m4/isapipe.m4: New file.
138588 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
138590         * lib/isapipe.c, lib/isapipe.h: New files.
138592 2006-08-29  Jim Meyering  <jim@meyering.net>
138594         * modules/configmake (Makefile.am): Make configmake.h depend on
138595         Makefile.  Otherwise, a stale configmake.h could hang around.
138597 2006-08-29  Eric Blake  <ebb9@byu.net>
138599         * lib/error.c (error_at_line, print_errno_message): Match libc, after
138600         resolution of upstream bug 3044.
138602 2006-08-29  Bruno Haible  <bruno@clisp.org>
138604         * modules/localcharset (Depends-on): Add configmake.
138605         (Makefile.am): Remove setting of LIBDIR through DEFS.
138607 2006-08-29  Bruno Haible  <bruno@clisp.org>
138609         * lib/localcharset.c: Include configmake.h in order to get LIBDIR
138610         defined.
138612 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
138614         * modules/fcntl: New file.
138615         * modules/chdir-safer (Depends-on): Add fcntl.
138616         * modules/fts: Likewise.
138617         * modules/mkdir-p: Likewise.
138619         * modules/stdint (Makefile.am): Do not substitute ABSOLUTE_INTTYPES_H.
138620         This undoes the most recent change, since we're now addressing the
138621         problem in a different way.
138623         * gnulib-tool (emit_lib_Makefile_am): Don't put $makefile_name
138624         into output, since the output might be called Makefile.am even
138625         if $makefile_name is something different.
138626         (func_import): Use $makefile_am rather than
138627         ${makefile_name-Makefile.am}, to fix a bug where makefile_name was
138628         empty.
138630         * modules/inttypes (Files): Add m4/inttypes-h.m4.
138632 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
138634         * m4/inttypes.m4 (gl_INTTYPES_H): Move ABSOLUTE_INTTYPES_H code here...
138635         * m4/stdint.m4 (gl_STDINT_H): ... from here.  This undoes the most
138636         recent change to stdint.m4, since we're now addressing the problem in a
138637         different way.
138639 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
138641         * m4/fcntl_h.m4: New file.
138643 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
138645         * lib/fcntl_.h: New file.
138646         * lib/chdir-safer.c (O_DIRECTORY, O_NOFOLLOW): Remove, now that we have
138647         the fcntl module.
138648         * lib/dirchownmod.c: Likewise.
138649         * lib/fts.c: Likewise.
138651         * lib/inttypes_.h [defined _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H]:
138652         Include @ABSOLUTE_INTTYPES_H@ if available, but do nothing else.
138653         * lib/stdint_.h (_GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H): Define
138654         just before including <inttypes.h>, to avoid circular inclusion.
138656 2006-08-28  Jim Meyering  <jim@meyering.net>
138658         * doc/visibility.texi: Actually read and correct the grammar of the
138659         sentence affected by yesterday's change.
138661 2006-08-28  Eric Blake  <ebb9@byu.net>
138663         * modules/inttypes (Makefile.am): Fix sed error when inttypes.h
138664         needs wrapper.
138666 2006-08-28  Eric Blake  <ebb9@byu.net>
138668         * m4/inttypes.m4 (gl_INTTYPES_H): Fix missing #endif.
138670 2006-08-28  Eric Blake  <ebb9@byu.net>
138672         * m4/codeset.m4 (AM_LANGINFO_CODESET): Avoid compiler warning.
138674 2006-08-28  Bruno Haible  <bruno@clisp.org>
138676         * modules/c-strstr: New file, from GNU gettext.
138677         * MODULES.html.sh (String handling): Add c-strstr.
138679 2006-08-28  Bruno Haible  <bruno@clisp.org>
138681         * m4/inttypes.m4 (gl_INTTYPES_H): Don't test for the existence of SCNX*
138682         macros.
138683         Reported by Eric Blake.
138685 2006-08-28  Bruno Haible  <bruno@clisp.org>
138687         * lib/vasnprintf.c (EOVERFLOW): Remove definition.
138688         (VASNPRINTF): Return a string of length > INT_MAX without failing.
138689         * lib/vasprintf.c: Include errno.h, limits.h.
138690         (EOVERFLOW): New fallback definition.
138691         (vasprintf): Test here whether the string length is > INT_MAX.
138692         * lib/vsnprintf.c: Include errno.h, limits.h.
138693         (EOVERFLOW): New fallback definition.
138694         (vsnprintf): Fix bug when generated string was too long for the buffer.
138695         Test here whether the string length is > INT_MAX.
138697 2006-08-28  Bruno Haible  <bruno@clisp.org>
138699         * lib/inttypes_.h (SCNX*): Remove definitions.
138700         Reported by Eric Blake.
138702 2006-08-28  Bruno Haible  <bruno@clisp.org>
138704         * lib/c-strstr.h: New file, from GNU gettext.
138705         * lib/c-strstr.c: New file, from GNU gettext.
138707 2006-08-28  Bruno Haible  <bruno@clisp.org>
138709         * gnulib-tool: Reorder some statements.
138711 2006-08-28  Bruno Haible  <bruno@clisp.org>
138713         * gnulib-tool: New option --makefile-name.
138714         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Use
138715         $makefile_name.
138716         (func_import): Write $makefile_name to the cache file, and read it from
138717         there unless explicitly specified. Use $makefile_name as file name
138718         instead of Makefile.am. Adjust the recommendations accordingly.
138720 2006-08-28  Bruno Haible  <bruno@clisp.org>
138722         * gnulib-tool (func_verify_module): Check against misapplying patch.
138724 2006-08-28  Bruno Haible  <bruno@clisp.org>
138726         * gnulib-tool (func_relativize, func_relconcat): New functions.
138727         Give an error if --local-dir is given with --update.
138728         Remove trailing slashes from $local_gnulib_dir.
138729         (func_import): Store the relativized $local_gnulib_dir in
138730         gnulib-cache.m4, and read it from there if not specified explicitly.
138732 2006-08-28  Bruno Haible  <bruno@clisp.org>
138734         * gnulib-tool (func_get_tests_module): Don't assume that $gnulib_dir
138735         is the current directory. Respect also $local_gnulib_dir.
138737 2006-08-28  Bruno Haible  <bruno@clisp.org>
138738             Simon Josefsson  <jas@extundo.com>
138740         BeOS portability.
138741         * lib/getaddrinfo.c (PF_INET, PF_UNSPEC): New macros.
138743 2006-08-27  Jim Meyering  <jim@meyering.net>
138745         * doc/visibility.texi: Remove duplicate word: "pointer".
138747 2006-08-26  Bruno Haible  <bruno@clisp.org>
138749         * modules/inttypes (Files): Add lib/inttypes_.h, remove lib/inttypes.h.
138750         Add m4/inttypes.m4, remove m4/_inttypes_h.m4 and m4/include_next.m4.
138751         (Makefile.am): Create inttypes.h from inttypes_.h.
138752         * modules/stdint (Makefile.am): Substitute also ABSOLUTE_INTTYPES_H.
138754         * modules/imaxabs: New file.
138756         * modules/imaxdiv: New file.
138758 2006-08-26  Bruno Haible  <bruno@clisp.org>
138760         * m4/inttypes.m4: New file.
138761         * m4/_inttypes_h.m4: Remove file.
138762         * m4/inttypes-pri.m4 (gt_INTTYPES_PRI): Also AC_SUBST
138763         PRI_MACROS_BROKEN.
138764         * m4/stdint.m4 (gl_STDINT_H): Define also ABSOLUTE_INTTYPES_H.
138766         * m4/imaxabs.m4: New file.
138768         * m4/imaxdiv.m4: New file.
138770 2006-08-26  Bruno Haible  <bruno@clisp.org>
138772         * lib/inttypes_.h: New file.
138773         * lib/inttypes.h: Remove file.
138774         * lib/stdint_.h: Include <inttypes.h> through its absolute filename.
138776         * lib/imaxabs.c: New file.
138778         * lib/imaxdiv.c: New file.
138780 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
138782         New config-h module, so that "make" output needn't be cluttered
138783         by -DHAVE_CONFIG_H.
138784         * MODULES.html.sh (Support for building libraries and executables):
138785         Add config-h.
138786         * modules/config-h: New file.
138787         * gnulib-tool (nl, sed_transform_lib_file): New vars.
138788         (func_import): Turn "#ifdef HAVE_CONFIG_H" to "#if 1" if
138789         the config-h module is used.
138791         New configmake module, so that "make" output needn't be cluttered
138792         by fluff like '-DLIBDIR=\"/usr/local/lib\"'.
138793         * MODULES.html.sh (Support for building libraries and executables):
138794         Add configmake.
138795         * modules/configmake: New file.
138797 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
138799         * m4/config-h.m4: New file.
138801 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
138803         * config/srclist.txt: Add elisp-comp.
138805 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
138807         * MODULES.html.sh (Support for building libraries and executables):
138808         Add elisp-comp.
138809         * build-aux/elisp-comp: New file.
138810         * modules/elisp-comp: New file.
138812 2006-08-24  Bruno Haible  <bruno@clisp.org>
138814         * gnulib-tool (func_create_testdir): Use non-default values of
138815         sourcebase and m4base.
138817 2006-08-24  Bruno Haible  <bruno@clisp.org>
138819         * MODULES.html.sh (Compatibility checks for POSIX:2001 functions: Fix
138820         HTML structure.
138822 2006-08-23  Paul Eggert  <eggert@cs.ucla.edu>
138824         * modules/openat (Depends-on): Add lchown.
138826 2006-08-23  Bruno Haible  <bruno@clisp.org>
138828         * gnulib-tool (func_import, func_create_testdir): Emit an invocation
138829         of gl_LOCK_EARLY instead of gl_LOCK.
138831 2006-08-23  Bruno Haible  <bruno@clisp.org>
138833         * m4/lock.m4 (gl_LOCK_BODY): Change the default value of gl_use_threads
138834         on OSF/1 to no.
138835         Reported by Stephen Cartwright <sgcartwr@ucalgary.ca>.
138837 2006-08-23  Bruno Haible  <bruno@clisp.org>
138839         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't consider BeOS statvfs
138840         as unusable.
138842         * m4/lock.m4 (gl_LOCK_EARLY): Renamed from gl_LOCK.
138843         (gl_LOCK_BODY): Remove gl_PREREQ_LOCK invocation.
138844         (gl_LOCK): New macro.
138846 2006-08-22  Simon Josefsson  <jas@extundo.com>
138848         * modules/gc-md5 (Makefile.am): Need to add md5.h, after changes
138849         to md5 module.
138851 2006-08-22  Simon Josefsson  <jas@extundo.com>
138853         * MODULES.html.sh: Add "Support for maintaining and release
138854         projects".
138856         * build-aux/gnupload: New file, from coreutils.
138858 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
138860         Avoid the need for AC_LIBSOURCES in m4 macros.
138861         * modules/arcfour (EXTRA_DIST): Add arcfour.h.
138862         * modules/arctwo (EXTRA_DIST): Add arctwo.h.
138863         * modules/check-version (EXTRA_DIST): Add check-version.h.
138864         * modules/crc (EXTRA_DIST): Add crc.h.
138865         * modules/des (EXTRA_DIST): Add des.h.
138866         * modules/gc (EXTRA_DIST): Add gc.h.
138867         * modules/getdelim (EXTRA_DIST): Add getdelim.h.
138868         * modules/getline (EXTRA_DIST): Add getline.h.
138869         * modules/getlogin_r (EXTRA_DIST): Add getlogin_r.h.
138870         * modules/hmac-md5 (EXTRA_DIST): Add hmac.h.
138871         * modules/hmac-sha1 (EXTRA_DIST): Add hmac.h.
138872         * modules/md2 (EXTRA_DIST): Add md2.h.
138873         * modules/md4 (EXTRA_DIST): Add md4.h.
138874         * modules/pagealign_alloc (EXTRA_DIST): Add pagealign_alloc.h.
138875         * modules/read-file (EXTRA_DIST): Add read-file.h.
138876         * modules/readline (EXTRA_DIST): Add readline.h.
138877         * modules/rijndael (EXTRA_DIST): Add rijndael-alg-fst.h,
138878         rijndael-api-fst.h.
138880 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
138882         * m4/rijndael.m4 (gl_ARCFOUR):
138883         * m4/arctwo.m4 (gl_ARCTWO):
138884         * m4/check-version.m4 (gl_CHECK_VERSION):
138885         * m4/crc.m4 (gl_CRC):
138886         * m4/des.m4 (gl_DES):
138887         * m4/gc-pbkdf2-sha1.m4 (gl_GC_PBKDF2_SHA1):
138888         * m4/gc.m4 (gl_GC):
138889         * m4/getdelim.m4 (gl_FUNC_GETDELIM):
138890         * m4/getline.m4 (gl_FUNC_GETLINE):
138891         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE):
138892         * m4/hmac-md5.m4 (gl_HMAC_MD5):
138893         * m4/hmac-sha1.m4 (gl_HMAC_SHA1):
138894         * m4/md2.m4 (gl_MD2):
138895         * m4/md4.m4 (gl_MD4):
138896         * m4/pagealign_alloc.m4 (gl_PAGEALIGN_ALLOC):
138897         * m4/read-file.m4 (gl_FUNC_READ_FILE):
138898         * m4/readline.m4 (gl_FUNC_READLINE):
138899         * m4/rijndael.m4 (gl_RIJNDAEL):
138900         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
138901         to get the necessary .h files and whatnot.
138903 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
138905         * config/srclist.txt: Remove gnupload, since coreutils now syncs from
138906         gnulib rather than the other way around.
138907         * config/srclistvars.sh (COREUTILS): Remove.
138909 2006-08-22  Jim Meyering  <jim@meyering.net>
138911         * modules/mkdir-p (Makefile.am): Fix typo: s/lib+SOURCES/lib_SOURCES/.
138913         * modules/getpass-gnu (Makefile.am): Add getpass.h to EXTRA_DIST.
138915 2006-08-22  Eric Blake  <ebb9@byu.net>
138917         * modules/regexprops-generic: New file.
138918         * MODULES.html.sh (Support for building documentation): List it.
138920 2006-08-22  Eric Blake  <ebb9@byu.net>
138922         * m4/stdint_h.m4 (gl_AC_HEADER_STDINT_H): Avoid compiler warning.
138923         * m4/inttypes_h.m4 (gl_AC_HEADER_INTTYPES_H): Likewise.
138924         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Likewise.
138925         * m4/intmax_t.m4 (gt_AC_TYPE_INTMAX_T): Likewise.
138927 2006-08-22  Bruno Haible  <bruno@clisp.org>
138929         * gnulib-tool (func_emit_lib_Makefile_am): Don't treat lib_LIBRARIES
138930         and lib_LTLIBRARIES like the other lib_* variables.
138932 2006-08-22  Bruno Haible  <bruno@clisp.org>
138934         * build-aux/x-to-1.in: New file, from GNU gettext.
138936 2006-08-22  Bruno Haible  <bruno@clisp.org>
138938         * m4/readutmp.m4 (gl_READUTMP): Compile readutmp.c only if <utmp.h> or
138939         <utmpx.h> exists.
138941 2006-08-22  Bruno Haible  <bruno@clisp.org>
138943         * lib/readutmp.h: Skip most definitions if neither <utmp.h> nor
138944         <utmpx.h> exists.
138946 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
138948         BeOS portability.
138949         * lib/dirchownmod.c (dirchownmod): Don't use fchmod if it doesn't
138950         exist.
138951         Problem reported by Bruno Haible.
138953 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
138955         Avoid the need for AC_LIBSOURCES in m4 macros.
138956         * modules/acl (EXTRA_DIST): Add acl.h.
138957         * modules/argmatch (Files): Add m4/argmatch.m4.
138958         (configure.ac): Add gl_ARGMATCH.
138959         (EXTRA_DIST): Renamed from lib_SOURCES, for
138960         consistency with the other modules.  Remove argmatch.c.
138961         * modules/backupfile (EXTRA_DIST): Add backupfile.h.
138962         * modules/c-strtod (EXTRA_DIST): Add c-strtod.h.
138963         * modules/c-strtold (EXTRA_DIST): Add c-strtod.c, c-strtod.h.
138964         * modules/canonhost (EXTRA_DIST): Add c-canonhost.h.
138965         * modules/canonicalize (EXTRA_DIST): Add canonicalize.h.
138966         * modules/chdir-long (EXTRA_DIST): Add chdir-long.h.
138967         * modules/chdir-safer (EXTRA_DIST): Add chdir-safer.h.
138968         * modules/cloexec (EXTRA_DIST): Add cloexec.h.
138969         * modules/close-stream (EXTRA_DIST): Add close-stream.h.
138970         * modules/closeout (EXTRA_DIST): Add closeout.h.
138971         * modules/cycle-check (EXTRA_DIST): Add cycle-check.h.
138972         * modules/dev-ino (EXTRA_DIST): Add dev-ino.h.
138973         * modules/dirfd (EXTRA_DIST): Add dirfd.h.
138974         * modules/dirname (EXTRA_DIST): Renamed from lib_SOURCES.  Add
138975         dirname.h; remove basename.c and stripslash.c.
138976         * modules/exclude (EXTRA_DIST): Add exclude.h.
138977         * modules/exitfail (EXTRA_DIST): Add exitfail.h.
138978         * modules/fcntl-safer (EXTRA_DIST): Add fcntl-safer.h fcntl--.h.
138979         * modules/file-type (EXTRA_DIST): Add file-type.h.
138980         * modules/filemode (EXTRA_DIST): Add filemode.h.
138981         * modules/filenamecat (EXTRA_DIST): Add filenamecat.h.
138982         * modules/fopen-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
138983         * modules/fpending (EXTRA_DIST): Add __fpending.h.
138984         * modules/fprintftime (EXTRA_DIST): Add fprintftime.h.
138985         * modules/fsusage (EXTRA_DIST): Add fsusage.h.
138986         * modules/fts (EXTRA_DIST): Add fts_.h fts-cycle.c.
138987         * modules/getcwd (EXTRA_DIST): Add getcwd.h.
138988         * modules/getdate (EXTRA_DIST): Add getdate.c.
138989         * modules/gethrxtime (EXTRA_DIST): Add gethrxtime.h xtime.h.
138990         * modules/getpagesize (EXTRA_DIST): Add getpagesize.h.
138991         * modules/getpass (EXTRA_DIST): Add getpass.h.
138992         * modules/glob (EXTRA_DIST): Add glob_.h glob-libc.h.
138993         * modules/group-member (EXTRA_DIST): Add group-member.h.
138994         * modules/hard-locale (EXTRA_DIST): Add hard-locale.h.
138995         * modules/hash (EXTRA_DIST): Add hash.h.
138996         * modules/human (EXTRA_DIST): Add human.h.
138997         * modules/inttypes (EXTRA_DIST): Add inttypes.h.
138998         * modules/lchmod (EXTRA_DIST): Add lchmod.h.
138999         * modules/lchown (EXTRA_DIST): Add lchown.h.
139000         * modules/long-options (EXTRA_DIST): Add long-options.h.
139001         * modules/lstat (EXTRA_DIST): Add lstat.h.
139002         * modules/md5 (EXTRA_DIST): Add memcasecmp.h.
139003         * modules/memcoll (EXTRA_DIST): Add memcoll.h.
139004         * modules/mempcpy (EXTRA_DIST): Add mempcpy.h.
139005         * modules/memrchr (EXTRA_DIST): Add memrchr.h.
139006         * modules/memxor (EXTRA_DIST): Add memxor.h.
139007         * modules/mkancesdirs (EXTRA_DIST): Add mkancesdirs.h.
139008         * modules/mkdir-p (EXTRA_DIST): Add modechange.h.
139009         * modules/mountlist (EXTRA_DIST): Add mountlist.h.
139010         * modules/openat (EXTRA_DIST): Add at-func.c openat.h openat-priv.h.
139011         * modules/pathmax (EXTRA_DIST): Add pathmax.h.
139012         * modules/physmem (EXTRA_DIST): Add physmem.h.
139013         * modules/posixtm (EXTRA_DIST): Add posixtm.h.
139014         * modules/posixver (EXTRA_DIST): Add posixver.h.
139015         * modules/quote (EXTRA_DIST): Add quote.h.
139016         * modules/quotearg (EXTRA_DIST): Add quotearg.h.
139017         * modules/readtokens (EXTRA_DIST): Add readtokens.h.
139018         * modules/readutmp (EXTRA_DIST): Add readutmp.h.
139019         * modules/regex (EXTRA_DIST): Add regcomp.c regex.h regex_internal.c
139020         regex_internal.h regexec.c.
139021         * modules/safe-read (EXTRA_DIST): Add safe-read.h.
139022         * modules/safe-write (EXTRA_DIST): Add safe-write.h.
139023         * modules/same (EXTRA_DIST): Add same.h.
139024         * modules/same-inode (EXTRA_DIST): Add same-inode.h.
139025         * modules/save-cwd (EXTRA_DIST): Add save-cwd.h.
139026         * modules/savedir (EXTRA_DIST): Add savedir.h.
139027         * modules/sha1 (EXTRA_DIST): Add sha1.h.
139028         * modules/sig2str (EXTRA_DIST): Add sig2str.h.
139029         * modules/stat-macros (EXTRA_DIST): Add stat-macros.h.
139030         * modules/stat-time (EXTRA_DIST): Add stat-time.h.
139031         * modules/stdlib-safer (EXTRA_DIST): Add stdlib-safer.h stdlib--.h.
139032         * modules/strdup (EXTRA_DIST): Add strdup.h.
139033         * modules/strftime (EXTRA_DIST): Add strftime.h.
139034         * modules/strndup (EXTRA_DIST): Add strndup.h.
139035         * modules/strnlen (EXTRA_DIST): Add strnlen.h.
139036         * modules/strverscmp (EXTRA_DIST): Add strverscmp.h.
139037         * modules/time_r (EXTRA_DIST): Add time_r.h.
139038         * modules/timespec (EXTRA_DIST): Add timespec.h.
139039         * modules/tmpfile-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
139040         * modules/unistd-safer (EXTRA_DIST): Add unistd-safer.h unistd--.h.
139041         * modules/unlinkdir (EXTRA_DIST): Add unlinkdir.h.
139042         * modules/unlocked-io (EXTRA_DIST): Add unlocked-io.h.
139043         * modules/userspec (EXTRA_DIST): Add userspec.h.
139044         * modules/utimecmp (EXTRA_DIST): Add utimecmp.h.
139045         * modules/utimens (EXTRA_DIST): Add utimens.h.
139046         * modules/xalloc (EXTRA_DIST): Add xalloc.h.
139047         * modules/xgetcwd (EXTRA_DIST): Add xgetcwd.h.
139048         * modules/xnanosleep (EXTRA_DIST): Add xnanosleep.h.
139049         * modules/xreadlink (EXTRA_DIST): Add xreadlink.h.
139050         * modules/xstrtod (EXTRA_DIST): Add xstrtod.h.
139051         * modules/xstrtol (EXTRA_DIST): Add xstrtol.h.
139052         * modules/xstrtold (EXTRA_DIST): Add xstrtod.c xstrtod.h.
139053         * modules/yesno (EXTRA_DIST): Add yesno.h.
139055 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
139057         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Check for fchmod.
139059         * m4/argmatch.m4: New file, from coreutils with AC_LIBSOURCES removed.
139060         * m4/dev-ino.m4, same-inode.m4: Remove.
139062         * m4/_inttypes_h.m4 (gl_INTTYPES_H):
139063         * m4/acl.m4 (AC_FUNC_ACL):
139064         * m4/backupfile.m4 (gl_BACKUPFILE):
139065         * m4/c-strtod.m4 (gl_C99_STRTOLD):
139066         * m4/canon-host.m4 (gl_CANON_HOST):
139067         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
139068         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG):
139069         * m4/chdir-safer.m4 (gl_CHDIR_SAFER):
139070         * m4/cloexec.m4 (gl_CLOEXEC):
139071         * m4/close-stream.m4 (gl_CLOSE_STREAM):
139072         * m4/closeout.m4 (gl_CLOSEOUT):
139073         * m4/dirfd.m4 (gl_FUNC_DIRFD):
139074         * m4/dirname.m4 (gl_DIRNAME):
139075         * m4/exclude.m4 (gl_EXCLUDE):
139076         * m4/exitfail.m4 (gl_EXITFAIL):
139077         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER):
139078         * m4/file-type.m4 (gl_FILE_TYPE):
139079         * m4/filemode.m4 (gl_FILEMODE):
139080         * m4/filenamecat.m4 (gl_FILE_NAME_CONCAT):
139081         * m4/fpending.m4 (gl_FUNC_FPENDING):
139082         * m4/fprintftime.m4 (gl_FPRINTFTIME):
139083         * m4/fts.m4 (gl_FUNC_FTS):
139084         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL):
139085         * m4/getdate.m4 (gl_GETDATE):
139086         * m4/gethrxtime.m4 (gl_GETHRXTIME):
139087         * m4/getpagesize.m4 (gl_GETPAGESIZE):
139088         * m4/getpass.m4 (gl_FUNC_GETPASS):
139089         * m4/gettime.m4 (gl_GETTIME):
139090         * m4/getugroups.m4 (gl_GETUGROUPS):
139091         * m4/glob.m4 (gl_GLOB_SUBSTITUTE):
139092         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER):
139093         * m4/hard-locale.m4 (gl_HARD_LOCALE):
139094         * m4/hash.m4 (gl_HASH):
139095         * m4/idcache.m4 (gl_IDCACHE):
139096         * m4/lchmod.m4 (gl_FUNC_LCHMOD):
139097         * m4/lchown.m4 (gl_FUNC_LCHOWN):
139098         * m4/long-options.m4 (gl_LONG_OPTIONS):
139099         * m4/lstat.m4 (gl_FUNC_LSTAT):
139100         * m4/md5.m4 (gl_MD5):
139101         * m4/memcasecmp.m4 (gl_MEMCASECMP):
139102         * m4/memcoll.m4 (gl_MEMCOLL):
139103         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY):
139104         * m4/memrchr.m4 (gl_FUNC_MEMRCHR):
139105         * m4/memxor.m4 (gl_MEMXOR):
139106         * m4/mkancesdirs.m4 (gl_MKANCESDIRS):
139107         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS):
139108         * m4/modechange.m4 (gl_MODECHANGE):
139109         * m4/mountlist.m4 (gl_MOUNTLIST):
139110         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
139111         * m4/openat.m4 (gl_FUNC_OPENAT):
139112         * m4/pathmax.m4 (gl_PATHMAX):
139113         * m4/physmem.m4 (gl_PHYSMEM):
139114         * m4/posixtm.m4 (gl_POSIXTM):
139115         * m4/posixver.m4 (gl_POSIXVER):
139116         * m4/quote.m4 (gl_QUOTE):
139117         * m4/quotearg.m4 (gl_QUOTEARG):
139118         * m4/readtokens.m4 (gl_READTOKENS):
139119         * m4/readutmp.m4 (gl_READUTMP):
139120         * m4/regex.m4 (gl_REGEX):
139121         * m4/safe-read.m4 (gl_SAFE_READ):
139122         * m4/safe-write.m4 (gl_SAFE_WRITE):
139123         * m4/same.m4 (gl_SAME):
139124         * m4/save-cwd.m4 (gl_SAVE_CWD):
139125         * m4/savedir.m4 (gl_SAVEDIR):
139126         * m4/settime.m4 (gl_SETTIME):
139127         * m4/sha1.m4 (gl_SHA1):
139128         * m4/sig2str.m4 (gl_FUNC_SIG2STR):
139129         * m4/stat-macros.m4 (gl_STAT_MACROS):
139130         * m4/stat-time.m4 (gl_STAT_TIME):
139131         * m4/stdio-safer.m4 (gl_FOPEN_SAFER):
139132         * m4/stdlib-safer.m4 (gl_STDLIB_SAFER):
139133         * m4/strdup.m4 (gl_FUNC_STRDUP):
139134         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME):
139135         * m4/strndup.m4 (gl_FUNC_STRNDUP):
139136         * m4/strnlen.m4 (gl_FUNC_STRNLEN):
139137         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP):
139138         * m4/time_r.m4 (gl_TIME_R):
139139         * m4/timespec.m4 (gl_TIMESPEC):
139140         * m4/unistd-safer.m4 (gl_UNISTD_SAFER):
139141         * m4/unlinkdir.m4 (gl_UNLINKDIR):
139142         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO):
139143         * m4/userspec.m4 (gl_USERSPEC):
139144         * m4/utimecmp.m4 (gl_UTIMECMP):
139145         * m4/utimens.m4 (gl_UTIMENS):
139146         * m4/xalloc.m4 (gl_XALLOC):
139147         * m4/xgetcwd.m4 (gl_XGETCWD):
139148         * m4/xnanosleep.m4 (gl_XNANOSLEEP):
139149         * m4/xreadlink.m4 (gl_XREADLINK):
139150         * m4/xstrtod.m4 (gl_XSTRTOD):
139151         * m4/yesno.m4 (gl_YESNO):
139152         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
139153         to get the necessary .h files and whatnot.
139155 2006-08-21  Mark D. Baushke  <mdb@gnu.org>
139156             Bruno Haible  <bruno@clisp.org>
139158         * gnulib-tool (func_verify_module): Work around Sun's non-POSIX 1003.2
139159         /bin/sh understanding of '!' conditional negation.
139161 2006-08-21  Jim Meyering  <jim@meyering.net>
139163         * modules/openat (Depends-on): Really alphabetize.
139165         * modules/acl (Depends-on): Add error and quote.
139167         * check-module (find_included_lib_files): Add at-func.c to the
139168         ok-to-include-more-than-once white list.
139170         * modules/openat (Depends-on): Add lstat.  Alphabetize.
139172 2006-08-21  Bruno Haible  <bruno@clisp.org>
139174         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
139175         Emit a pkgdata_DATA variable only if some snippets add contents to it.
139176         Reported by Martin Lambers <marlam@marlam.de>.
139178 2006-08-21  Bruno Haible  <bruno@clisp.org>
139180         * gnulib-tool (func_emit_lib_Makefile_am): If the snippets already
139181         specify an installation location, don't emit a noinst_LIBRARIES or
139182         noinst_LTLIBRARIES assignment.
139184 2006-08-21  Bruno Haible  <bruno@clisp.org>
139186         BeOS portability.
139187         * modules/mbchar (Include): Don't test HAVE_WCTYPE_H any more, since
139188         BeOS has mbrtowc() but no <wctype.h>.
139190 2006-08-21  Bruno Haible  <bruno@clisp.org>
139192         BeOS portability.
139193         * m4/mbchar.m4 (gl_MBCHAR): Compile mbchar.c also if <wctype.h> doesn't
139194         exist.
139196 2006-08-21  Bruno Haible  <bruno@clisp.org>
139198         BeOS portability.
139199         * lib/mbchar.h: Include <wctype.h> only if it exists.
139201 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
139203         Remove files that are no longer needed by their respective modules.
139204         * m4/obstack.m4: Remove.
139205         * m4/strerror_r.m4: Remove.
139206         * m4/uint32_t.m4: Remove.
139207         * m4/uintptr_t.m4: Remove.
139208         * m4/ullong_max.m4: Remove.
139209         * m4/xstrtoimax.m4: Remove.
139210         * m4/xstrtoumax.m4: Remove.
139212         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Do not require
139213         gl_AC_TYPE_UINTMAX_T, gl_STRUCT_DEV_INO, or gl_SAME_INODE, since gnulib
139214         dependencies now capture this.
139216         * m4/cycle-check.m4 (gl_CYCLE_CHECK):
139217         Do not use AC_LIBSOURCES, since gnulib modules now do this.
139218         * m4/fsusage.m4 (gl_FSUSAGE): Likewise.
139219         * m4/human.m4 (gl_HUMAN): Likewise.
139220         * m4/inttostr.m4 (gl_INTTOSTR): Likewise.
139221         * m4/xstrtol.m4 (gl_XSTRTOL): Likewise.
139223         * m4/filemode.m4 (gl_FILEMODE): Require AC_STRUCT_ST_DM_MODE.
139225         * m4/filemode.m4 (gl_PREREQ_FSUSAGE_EXTRA): Do not require
139226         gl_AC_TYPE_INTMAX_T or gl_AC_TYPE_UINTMAX_T, since we now require
139227         stdint.
139228         * m4/human.m4 (gl_HUMAN): Likewise.
139229         * m4/inttostr.m4 (gl_PREREQ_INTTOSTR): Likewise.
139230         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Likewise.
139231         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
139232         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
139233         * m4/xstrtol (gl_XSTRTOL): Likewise.
139235         * m4/gethrxtime.m4 (gl_XTIME): gl_AC_TYPE_LONG_LONG ->
139236         AC_TYPE_LONG_LONG_INT.
139237         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
139238         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Likewise.
139239         * m4/strtoull.m4 (gl_FUNC_STRTOULL): Likewise, for unsigned long.
139240         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
139242         * m4/human.m4 (gl_HUMAN): Do not require AM_STDBOOL_H since we depend
139243         on stdbool.
139245         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL_H, gl_PREREQ_XSTRTOL): Remove.
139246         (gl_PREREQ_XSTRTOUL): Remove.
139248         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Check for hasmntopt.
139250         * m4/posixver.m4: Fix comment since head -1 now works even in POSIX
139251         mode.
139253 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
139255         Add and change modules to make it easier for coreutils to use
139256         gnulib-tool.
139257         * modules/backupfile (Files): Remove m4/d-ino.m4.
139258         (Depends-on): Add d-ino.
139259         * modules/cycle-check (Depends-on): Add stdint.
139260         (lib_SOURCES): Add cycle-check.h.
139261         * modules/d-ino: New module.
139262         * modules/d-type: New module.
139263         * modules/error (Files): Remove m4/strerror_r.m4.
139264         * modules/filemode (Files): Add m4/st_dm_mode.m4.
139265         * modules/fsuage (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
139266         m4/inttypes_h.m4, m4/uintmax_t.m4.
139267         (Depends-on): Add stdint.
139268         (lib_SOURCES): Add fsusage.h.
139269         * modules/getcwd (Files): Remove d-ino.m4.
139270         (Depends-on): Add d-ino.
139271         * modules/getndelim2 (Depends-on): Add stdint.
139272         * modules/glob (Files): Remove m4/d-type.m4.
139273         (Depends-on): Add d-type.
139274         * modules/host-os: New module.
139275         * modules/human (Files):  Remove m4/ulonglong.m4, m4/stdint_h.m4,
139276         m4/inttypes_h.m4, m4/uintmax_t.m4.
139277         * Depends-on: Add stdint.
139278         (lib_SOURCES): Add human.h.
139279         * modules/inttostr (Files): Remove m4/intmax_t.m4,
139280         m4/inttostr.m4, m4/inttypes_h.m4, m4/longlong.m4, m4/stdint_h.m4,
139281         m4/uintmax_t.m4, m4/ulonglong.m4.
139282         (Depends-on): Add stdint.
139283         (EXTRA_DIST): Add inttostr.h.
139284         * modules/lchmod: New module.
139285         * modules/link-follow: New module.
139286         * modules/mkdir-p (Files): Remove lib/lchmod.h, m4/lchmod.m4.
139287         (Depends-on): Add lchmod.
139288         * modules/mkstemp (Files): Remove m4/ulonglong.m4,
139289         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4.
139290         (Depends-on): Add stdint.
139291         * modules/obstack (Files): Remove m4/inttypes_h.m4, m4/obstack.m4,
139292         m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
139293         (Depends-on): Add stdint.
139294         (configure.ac): Change gl_OBSTACK to AC_FUNC_OBSTACK.
139295         * modules/perl: New module.
139296         * modules/regex (Depends-on): Add stdint.
139297         * modules/rmdir-errno: New module.
139298         * modules/strtoimax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
139299         m4/intmax_t.m4.
139300         (Depends-on): Add stdint.
139301         * modules/strtoumax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
139302         m4/uintmax_t.m4.
139303         (Depends-on): Add stdint.
139304         * modules/unlink-busy: New module.
139305         * modules/utimecmp (Depends-on): Add stdint.
139306         * modules/uptime: New module.
139307         * modules/winsz-ioctl: New module.
139308         * modules/winsz-termios: New module.
139309         * modules/xnanosleep (Depends-on): Add nanosleep.
139310         * modules/ullong_max: Remove.
139311         * modules/xstrtoimax (Files): Remove m4/xstrtoimax.m4.
139312         (configure.ac): Remove gl_XSTRTOIMAX; no action needed now.
139313         * modules/xstrtol (Files): Remove m4/ulonglong.m4, m4/longlong.m4,
139314         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4, m4/intmax_t.m4.
139315         (Depends-on): Add inttypes.
139316         (lib_SOURCES): Add xstrtol.h.
139317         * modules/xstrtoumax (Files): Remove m4/xstrtoumax.m4.
139318         (configure.ac): Remove gl_XSTRTOUMAX; no action needed now.
139319         * MODULES.html.sh: Move 'assert' into the assert section.
139320         Move 'dummy' into the linking section.
139321         Remove ullong_max.
139322         Add section for compatibility checks for POSIX:2001 functions,
139323         and put d-ino, d-type, link-follow, rmdir-errno, unlink-busy,
139324         winsz-ioctl, and winsz-termios into it.
139325         Add lchmod.
139326         Add top-level Misc section and put host-os, perl, and uptime
139327         into it.
139329 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
139331         * lib/cycle-check.h: Include <stdint.h> unconditionally, since we
139332         now assume the stdint module.  Do not include inttypes.h.
139333         * lib/fsusage.h: Likewise.
139334         * lib/getndelim2.c: Likewise.
139335         * lib/human.h: Likewise.
139336         * lib/inttostr.h: Likewise.
139337         * lib/obstack.c: Likewise.
139338         * lib/regex_internal.h: Likewise.
139339         * lib/tempname.c: Likewise.
139340         * lib/utimecmp.c: Likewise.
139341         * lib/xstrtol.h: Likewise.
139343         * lib/stat_.h: Fix typo: HAVE_FUNC_LSTAT -> HAVE_LSTAT.
139345         * lib/strtoimax.c: Adjust to macro name changes in Autoconf,
139346         e.g., HAVE_LONG_LONG -> HAVE_LONG_LONG_INT.
139347         * lib/xtime.h: Likewise.
139349 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
139351         * modules/openat (Files): Add lib/fchmodat.c.
139352         Fixes problem reported by Jay Youngman.
139354 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
139356         * lib/fchmodat.c: New file, from coreutils.  This was inadvertently
139357         omitted in the 2006-08-17 update.  Problem reported by Jay Youngman.
139359 2006-08-18  Paul Eggert  <eggert@cs.ucla.edu>
139360             Bruno Haible  <bruno@clisp.org>
139362         * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
139363         and is a script that invokes bison. Tighten the code. Add comments.
139365 2006-08-18  Jim Meyering  <jim@meyering.net>
139367         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Also check for
139368         CLOCK_REALTIME, since gethrxtime may revert to using clock_gettime via
139369         gettime.c.  Gabor Z. Papp reported that gethrxtime-using programs
139370         failed to link due to unresolved clock_gettime on a linux-2.4.x system.
139372 2006-08-18  Bruno Haible  <bruno@clisp.org>
139374         * modules/bison-i18n: New file.
139375         * MODULES.html.sh (Internationalization functions): Add it.
139377 2006-08-18  Bruno Haible  <bruno@clisp.org>
139379         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Also check for
139380         sys/statvfs.h. When getmntinfo was found, check its declaration and
139381         set either MOUNTED_GETMNTINFO or MOUNTED_GETMNTINFO2 depending on it.
139383 2006-08-18  Bruno Haible  <bruno@clisp.org>
139385         * m4/bison-i18n.m4: New file, from bison.
139387 2006-08-18  Bruno Haible  <bruno@clisp.org>
139389         * lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
139390         (ME_DUMMY): Treat "kernfs" as a dummy.
139391         (read_file_system_list) [MOUNTED_GETMNTINFO2]: Implement.
139393 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
139395         Update from coreutils.
139397         2006-08-15  Jim Meyering  <jim@meyering.net>
139399         * m4/openat.m4 (gl_FUNC_OPENAT): Add at-func.c via AC_LIBSOURCES.
139401         2006-01-17  Jim Meyering  <jim@meyering.net>
139403         * m4/fts.m4 (gl_FUNC_FTS_CORE): Depend on gl_FUNC_OPENAT.
139405         2006-01-11  Jim Meyering  <jim@meyering.net>
139407         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile fchmodat.c.
139408         Check for the lchmod function.
139410 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
139412         Update from coreutils.
139414         * lib/__fpending.h: Add copyright notice.
139415         * lib/fprintftime.h: Likewise.
139416         * lib/savedir.c: Use (C) in copyright notice.
139417         * lib/savedir.h: Likewise.
139419         2006-08-15  Jim Meyering  <jim@meyering.net>
139421         * lib/at-func.c: New file, with the logic of all emulated at-functions.
139422         * lib/openat-priv.h: Include <errno.h> and define ENOSYS,
139423         in support of the EXPECTED_ERRNO macro.
139424         * lib/openat.c (fstatat, unlinkat, fchownat): Remove function
139425         definitions.  Instead, define the appropriate symbols and include
139426         "at-func.c".
139427         * lib/mkdirat.c (mkdirat): Likewise.
139428         * lib/fchmodat.c (fchmodat): Likewise.
139429         (ENOSYS): Remove definition.
139430         * lib/openat.c: Don't include <errno.h>, now that "openat-priv.h" does
139431         it.  Don't include "unistd--.h" -- it wasn't ever used.
139433         2006-01-17  Jim Meyering  <jim@meyering.net>
139435         Rewrite fts.c not to change the current working directory,
139436         by using openat, fstatat, fdopendir, etc..
139438         * lib/fts.c [! _LIBC]: Include "openat.h" and "unistd--.h".
139439         (HAVE_OPENAT_SUPPORT): Define.
139440         [_LIBC] (fchdir): Don't undef or define; no longer used.
139441         (FCHDIR): Define in terms of cwd_advance_fd rather than fchdir.
139442         Now, this `function' always succeeds, and consumes its file descriptor
139443         parameter -- so callers must not close such FDs.  Update callers.
139444         (diropen_fd, opendirat, cwd_advance_fd): New functions.
139445         (diropen): Add parameter, SP.  Adjust all callers.
139446         Implement using diropen_fd, rather than open.
139447         (fts_open): Initialize new member, fts_cwd_fd.
139448         Remove fts_rft-setting code.
139449         (fts_close): Close fts_cwd_fd, if necessary.
139450         (__opendir2): Define in terms of opendir or opendirat,
139451         depending on whether the FST_NOCHDIR flag is set.
139452         (fts_build): Since fts_safe_changedir consumes its FD, and since
139453         this code must do `closedir(dirp)', dup the dirfd(dirp) argument,
139454         and close the dup'd file descriptor upon failure.
139455         (fts_stat): Use fstatat(...AT_SYMLINK_NOFOLLOW) in place of lstat.
139456         (fts_safe_changedir): Tweak semantics to reflect that this function
139457         now calls cwd_advance_fd and hence consumes its FD argument.
139458         * lib/fts_.h [struct FTS] (fts_cwd_fd): New member.
139459         [struct FTS] (fts_rft): Remove now-unused member.
139460         [struct FTS] (fts_cycle.state): Improve comment.
139462         * lib/openat.c (openat_needs_fchdir): New function.
139463         * lib/openat.h (openat_needs_fchdir): Declare it.
139465 2006-08-16  Paul Eggert  <eggert@cs.ucla.edu>
139467         * lib/memcoll.c (memcoll): Set errno = 0 in the shortcut case, too.
139468         Problem and fix reported by Pádraig Brady in
139469         <http://lists.gnu.org/r/bug-coreutils/2006-08/msg00099.html>.
139471 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
139473         * modules/cycle-check (configure.ac): Add gl_CYCLE_CHECK.
139475 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
139477         * lib/memcoll.c (memcoll): Optimize for the common case where the
139478         arguments are bytewise equal.
139480 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
139482         * doc/regexprops-generic.texi: Add a copyright notice.
139484 2006-08-15  Bruno Haible  <bruno@clisp.org>
139486         * modules/tmpdir (License): Change to LGPL.
139488 2006-08-15  Bruno Haible  <bruno@clisp.org>
139490         * gnulib-tool (func_all_modules, func_verify_module): COPYING is not a
139491         module.
139493 2006-08-14  Simon Josefsson  <jas@extundo.com>
139495         * config/srclist.txt: Add gnupload.
139497 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
139499         Change copyright notice from LGPL 2 to GPL 2, since that's the
139500         standard form used in the gnulib repository.
139501         * tests/test-lock.c: Likewise.
139502         * tests/test-stdint.c: Likewise.
139503         * tests/test-tls.c: Likewise.
139505         * users.txt: Add bison, diffutils, libprelude, prelude-lml,
139506         prelude-manager.  User shorter URLs for GNU projects, without '?'.
139507         Add copyright notice.
139509         * check-module: Add copyright notice.  Output a copyright
139510         notice if "--version" is specified.
139511         * modules/COPYING: New file.
139512         * tests/test-getaddrinfo.c: Add copyright notice.
139513         * tests/test-verify.c: Likewise.
139515 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
139517         Change copyright notice from LGPL 2 to GPL 2, since that's the
139518         standard form used in the gnulib repository.
139519         * lib/lock.c: LGPL -> GPL.
139520         * lib/lock.h: Likewise.
139521         * lib/strnlen1.c: Likewise.
139522         * lib/strnlen1.h: Likewise.
139523         * lib/tls.c: Likewise.
139524         * lib/tls.h: Likewise.
139525         * lib/tmpdir.c: Likewise.
139527         * lib/TODO: Remove; this belongs only in coreutils.
139529 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
139531         Add copyright notices to long-enough files that lack them, since
139532         otherwise the files aren't clearly free.  Use the same notice that
139533         getdate.texi already uses.
139534         * doc/alloca-opt.texi: Add copyright notice.
139535         * doc/alloca.texi: Likewise.
139536         * doc/ctime.texi: Likewise.
139537         * doc/functions.texi: Likewise.
139538         * doc/gcd.texi: Likewise.
139539         * doc/gnulib-tool.texi: Likewise.
139540         * doc/inet_ntoa.texi: Likewise.
139541         * doc/visibility.texi: Likewise.
139543         * doc/getdate.texi: Update FDL version from 1.1 to 1.2.
139544         * doc/quote.texi: Add copyright notice.
139546         * doc/solaris-versions: Add SunOS 5.10, SunOS 1.x, SunOS 4.0, SunOS
139547         4.0.x, SunOS 4.1.1.1, SunOS 4.1.1_U1, SunOS 4.1.3B.  SunOS 4.1.3
139548         was Solaris 1.1A.  Remove space before B in Solaris 1.1.1B.
139549         Mention SunOS 5.11.  Mention that everything before SunOS 5.7
139550         is now obsolete, and give a pointer to the Sun list.
139551         Add copyright notice.
139553 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
139555         * config/srclistvars.sh: Add copyright notice.
139557 2006-08-14  Eric Blake  <ebb9@byu.net>
139559         Import the following change from libc:
139561         2006-08-12  Ulrich Drepper  <drepper@redhat.com>
139563         Upstream bug 2997.
139564         * lib/misc/error.c: Add space between program name and message if file
139565         name is missing.
139567 2006-08-12  Karl Berry  <karl@gnu.org>
139569         * config/srclist.txt (ssize_t.m4, sig_atomic_t.m4, signalblocking.m4):
139570         remove, these originate in gnulib now.
139572 2006-08-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
139574         * doc/Makefile (standards.info standards.html standards.dvi):
139575         Also depend on make-stds.texi.
139577 2006-08-11  Paul Eggert  <eggert@cs.ucla.edu>
139579         * lib/pipe-safer.c (pipe_safer): Fix misspelling: HAVE_FUNC_PIPE ->
139580         HAVE_PIPE.  Fix a file descriptor leak when fd_safer fails.
139582         * lib/regex_internal.c (re_string_skip_chars): Don't assume WEOF fits
139583         in wchar_t.  Problem reported by Eric Blake.
139585         * lib/snprintf.c (snprintf): memcpy LEN bytes, not SIZE - 1, when
139586         LEN is smaller than SIZE.  Suggested by Bruno Haible.
139587         Also, help the compiler to keep LEN in a register.
139589 2006-08-11  Eric Blake  <ebb9@byu.net>
139591         * users.txt: Sort.  Add tar.
139593 2006-08-11  Bruno Haible  <bruno@clisp.org>
139595         * users.txt: New file.
139597 2006-08-11  Bruno Haible  <bruno@clisp.org>
139599         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Include <stdio.h> and <time.h>
139600         before <wchar.h>. Needed for OSF/1 and BSD/OS.
139602 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
139604         * modules/snprintf (Depends-on): Remove minmax.
139605         (Maintainer): Add self and Bruno.
139607 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
139609         * lib/.cppi-disable: Add snprintf.h, socket_.h.
139610         * lib/snprintf.c: Include <errno.h> and <limits.h>.
139611         (EOVERFLOW): Define if the system does not.
139612         Do not include "minmax.h"; it wasn't used.
139613         (snprintf): Don't assume size_t promotes to an unsigned type.
139614         Fix bug when generated string was too long for the buffer: the
139615         buffer's contents are supposed to be the initial prefix of the
139616         output.  Don't assume vasnprintf returns EOVERFLOW if the size
139617         exceeds INT_MAX; do the check ourselves.
139619         Import the following changes from libc:
139621         2006-06-02  Jakub Jelinek  <jakub@redhat.com>
139623         * lib/posix/regex_internal.c (re_string_skip_chars): If no character
139624         has been converted at all, set *last_wc to WEOF.  If mbrtowc failed,
139625         set wc to the byte which couldn't be converted.
139626         (re_string_reconstruct): Don't clear valid_raw_len before calling
139627         re_string_skip_chars.  If wc is WEOF after re_string_skip_chars, set
139628         tip_context using re_string_context_at.
139630         2006-05-02  Ulrich Drepper  <drepper@redhat.com>
139632         * lib/posix/regex.h: g++ still cannot handled [restrict].
139634         2006-04-21  Ulrich Drepper  <drepper@redhat.com>
139636         * lib/posix/regex.h: Remove special handling for VMS.
139638 2006-08-10  Jim Meyering  <jim@meyering.net>
139640         * modules/same-inode: New module.
139641         * modules/dev-ino: New module.
139642         * modules/cycle-check: Depend on these modules, rather than simply
139643         including their .h files.
139644         (Makefile.am): Don't list cycle-check.[ch] here, now that they're
139645         required via m4/cycle-check.m4.
139646         * modules/same: Depend on new same-inode module, rather than
139647         including same-inode.h.
139648         * modules/chdir-safer: New file.
139650         * modules/chown (Depends-on): Add stat-macros.
139652 2006-08-10  Jim Meyering  <jim@meyering.net>
139654         * m4/cycle-check.m4: New file.
139655         Require gl_STRUCT_DEV_INO and gl_SAME_INODE.
139656         * m4/dev-ino.m4, m4/same-inode.m4: New files.
139658 2006-08-10  Eric Blake  <ebb9@byu.net>
139660         * modules/verror (Depends-on): Remove bogus gl_VERROR that snuck
139661         in from original proposal.
139663 2006-08-10  Eric Blake  <ebb9@byu.net>
139664         and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
139666         * gnulib-tool (func_import): Detect unexpanded macros in gnulib
139667         namespace.
139669 2006-08-10  Bruno Haible  <bruno@clisp.org>
139671         * gnulib-tool (func_create_testdir): Detect unexpanded macros here
139672         as well.
139674 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
139676         Sync from coreutils.
139678         2006-07-19  Mike Frysinger  <vapier@gentoo.org>
139680         * lib/mountlist.c [ME_REMOTE]: Filter out cifs.
139681         Reported by Toralf Förster in <http://bugs.gentoo.org/141012>.
139683 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
139685         * modules/restrict: Remove; no longer needed now that we assume
139686         Autoconf 2.59 or later.
139687         * MODULES.html.sh: Remove 'restrict'.
139688         * modules/argp (Depends-on): Remove 'restrict'.
139689         * modules/base64 (Depends-on): Likewise.
139690         * modules/gc (Depends-on): Likewise.
139691         * modules/getaddrinfo (Depends-on): Likewise.
139692         * modules/glob (Depends-on): Likewise.
139693         * modules/inet_ntop (Depends-on): Likewise.
139694         * modules/inet_pton (Depends-on): Likewise.
139695         * modules/memxor (Depends-on): Likewise.
139696         * modules/regex (Depends-on): Likewise.
139697         * modules/strtok_r (Depends-on): Likewise.
139698         * modules/time_r (Depends-on): Likewise.
139700 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
139702         * m4/argp.m4 (gl_ARGP): Require AC_C_RESTRICT.
139703         * m4/gc.m4 (gl_PREREQ_GC): Likewise.
139704         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
139705         * m4/inet_ntop.m4 (gl_PREREQ_INET_NTOP): Likewise.
139706         * m4/inet_pton.m4 (gl_PREREQ_INET_PTON): Likewise.
139707         * m4/memxor.m4 (gl_MEMXOR): Likewise.
139708         * m4/restrict.m4: Remove; no longer needed.  All remaining uses of
139709         gl_C_RESTRICT replaced by AC_C_RESTRICT.
139711         Merge from coreutils.
139712         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_C_RESTRICT, not
139713         gl_C_RESTRICT, now that we assume Autoconf 2.59 or later.
139714         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
139715         * m4/time_r.m4 (gl_TIME_R): Likewise.
139717 2006-08-09  Karl Berry  <karl@gnu.org>
139719         * config/srclist.txt: no more gettext-tools, per Bruno.
139721 2006-08-08  Eric Blake  <ebb9@byu.net>
139723         * modules/verror: New module.
139724         * MODULES.html.sh: Document it.
139726 2006-08-08  Eric Blake  <ebb9@byu.net>
139728         * lib/verror.h, lib/verror.c: New files.
139730 2006-08-08  Eric Blake  <ebb9@byu.net>
139732         * lib/verror.c (verror_at_line): Work around glibc bug 2997, so that
139733         verror_at_line output complies with GNU Coding Standards even when
139734         file is NULL.
139736 2006-08-07  Bruno Haible  <bruno@clisp.org>
139738         * lib/allocsa.h (sa_alignof) [_AIX]: Also consider 'long long' in newer
139739         versions of AIX.
139740         Reported by Ralf Wildenhues.
139742 2006-08-07  Bruno Haible  <bruno@clisp.org>
139744         * gnulib-tool (func_create_testdir): Wrap the set of autoconf snippets
139745         in an AC_DEFUN. Needed so that the autoconf snippets can use
139746         AC_REQUIRE.
139748 2006-08-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
139750         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
139751         Initialize pkgdata_DATA.
139752         * modules/javaversion (Makefile.am): Add to pkgdata_DATA, rather than
139753         overriding it.
139755 2006-08-06  Eric Blake  <ebb9@byu.net>
139757         * lib/error.h: Fold in some upstream changes from glibc.
139758         * lib/error.c: Likewise.
139760 2006-08-04  Bruno Haible  <bruno@clisp.org>
139762         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
139763         Make the mostlyclean-local rule depend on mostlyclean-generic.
139764         Reported by Jim Meyering. Solution suggested by Ralf Wildenhues.
139766 2006-07-31  Bruno Haible  <bruno@clisp.org>
139768         * m4/localcharset.m4 (gl_LOCALCHARSET): Remove tests for <stddef.h>,
139769         <stdlib.h>, <string.h>.
139771 2006-07-30  Bruno Haible  <bruno@clisp.org>
139773         * modules/readlink (License): Change to LGPL.
139775 2006-07-30  Bruno Haible  <bruno@clisp.org>
139777         * modules/javaversion (Makefile.am): Distribute javaversion.java and
139778         javaversion.class. Also install javaversion.class in $(pkgdatadir) and
139779         set PKGDATADIR to point to it.
139781 2006-07-30  Bruno Haible  <bruno@clisp.org>
139783         * modules/csharpexec (configure.ac): Comment out macro invocation.
139784         * modules/javaexec (configure.ac): Likewise.
139785         * modules/javacomp-script (configure.ac): Likewise.
139787         * modules/csharpcomp-script (configure.ac): Use AC_REQUIRE.
139789 2006-07-30  Bruno Haible  <bruno@clisp.org>
139791         * modules/clean-temp (Depends-on): Add linkedhash-list, remove
139792         linked-list.
139794 2006-07-30  Bruno Haible  <bruno@clisp.org>
139796         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Assume <string.h> exists.
139798 2006-07-30  Bruno Haible  <bruno@clisp.org>
139800         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
139801         Initialize MOSTLYCLEANFILES to core and *.stackdump, so that core dumps
139802         get removed.
139804 2006-07-29  Bruno Haible  <bruno@clisp.org>
139806         Make it possible for gnulib-tool to work with locally modified or
139807         augmented gnulib repositories.
139808         * gnulib-tool (func_usage): Document --local-dir option.
139809         (local_gnulib_dir): New variable.
139810         Handle --local-dir option.
139811         (func_lookup_file): New function.
139812         (func_all_modules, func_verify_module): Look also in $local_gnulib_dir.
139813         (func_get_description, func_get_filelist, func_get_description,
139814         func_get_filelist, func_get_dependencies, func_get_autoconf_snippet,
139815         func_get_automake_snippet, func_get_include_directive,
139816         func_get_license, func_get_maintainer): Use func_lookup_file.
139817         (func_import, func_create_testdir): Use func_lookup_file.
139819 2006-07-29  Bruno Haible  <bruno@clisp.org>
139821         * modules/setenv (Depends-on): Add unistd.
139823 2006-07-29  Bruno Haible  <bruno@clisp.org>
139825         * lib/setenv.c: Undo unintended modification done on 2006-02-27.
139827 2006-07-29  Bruno Haible  <bruno@clisp.org>
139829         * lib/localcharset.c: Assume <stddef.h>, <stdlib.h>, <string.h> exist.
139831 2006-07-29  Bruno Haible  <bruno@clisp.org>
139833         * gnulib-tool (import, update): If there is no Makefile.am, look at
139834         aclocal.m4, instead of bailing out.
139836 2006-07-29  Bruno Haible  <bruno@clisp.org>
139838         * gnulib-tool (func_usage): Revert most of the 2006-07-15 change.
139839         Categorize the options by when they are useful.
139841 2006-07-29  Bruno Haible  <bruno@clisp.org>
139843         * gnulib-tool (func_usage): Document option --no-libtool.
139844         Handle option --no-libtool.
139845         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Update
139846         for changed semantics of $libtool variable.
139847         (func_import): Likewise. If libtool is not used, show this through
139848         an option --no-libtool.
139849         (func_create_testdir): Update.
139851 2006-07-29  Bruno Haible  <bruno@clisp.org>
139853         * gnulib-tool (func_import): Extend error message about missing
139854         --doc-base.
139856 2006-07-29  Bruno Haible  <bruno@clisp.org>
139858         * gnulib-tool (func_import): Don't create the $docbase directory if
139859         there is no file to store there.
139861 2006-07-29  Bruno Haible  <bruno@clisp.org>
139863         * gnulib-tool (autoconf_minversion): If a --dir option is given and
139864         relevant, look for configure.ac there, not in the current directory.
139865         Also use a simple search for AC_PREREQ, not "autoconf --trace".
139867 2006-07-29  Bruno Haible  <bruno@clisp.org>
139869         * gnulib-tool (SORT): New variable.
139870         (func_usage): Undocument --assume-autoconf option.
139871         Remove --assume-autoconf option handling.
139872         (autoconf_minversion): Determine from the contents of configure.ac.
139873         (func_import): Remove autoconf_minversion handling.
139874         Suggested by Eric Blake.
139876 2006-07-29  Bruno Haible  <bruno@clisp.org>
139878         * doc/gnulib-tool.texi (gl_LIBTOOL): Mention --no-libtool option.
139880 2006-07-29  Bruno Haible  <bruno@clisp.org>
139882         * config/srclist.txt (*setenv.[ch]): Remove rules.
139884 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
139886         * m4/inet_pton.m4, inet_ntop.m4: Check for netinet/in.h too.
139888 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
139890         * lib/inet_ntop.h, inet_pton.h: Need to include netinet/in.h before
139891         arpa/inet.h.
139893 2006-07-28  Simon Josefsson  <jas@extundo.com>
139895         * modules/inet_ntop (Depends-on): Depend on arpa_inet.
139896         * modules/inet_pton (Depends-on): Likewise.
139898 2006-07-28  Simon Josefsson  <jas@extundo.com>
139900         * m4/netinet_in_h.m4: New file.
139902 2006-07-28  Simon Josefsson  <jas@extundo.com>
139904         * lib/inet_ntop.h, inet_pton.h: No need to guard netinet/in.h
139905         #include's.
139907 2006-07-28  Simon Josefsson  <jas@extundo.com>
139909         * lib/inet_ntop.h, inet_pton.h: No need to guard arpa/inet.h
139910         #include's.
139912 2006-07-28  Paul Eggert  <eggert@cs.ucla.edu>
139914         * lib/modechange.c (mode_compile): Numeric modes now affect setuid and
139915         setgid on directories only if they set these bits.
139916         * lib/modechange.h: Remove obsolete comment about masks.
139918 2006-07-28  Eric Blake  <ebb9@byu.net>
139920         * lib/regex_internal.h (struct re_dfa_t) [!_LIBC]: Avoid invalid C89
139921         macro expansion.
139923 2006-07-28  Bruno Haible  <bruno@clisp.org>
139925         * lib/inet_ntop.h, inet_pton.h: Use #if HAVE* instead of #ifdef HAVE*.
139927 2006-07-28  Bruno Haible  <bruno@clisp.org>
139929         * m4/mbchar.m4 (gl_MBCHAR): Also test for iswcntrl.
139931 2006-07-28  Bruno Haible  <bruno@clisp.org>
139933         * lib/mbchar.h (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit,
139934         iswgraph, iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit):
139935         Define fallbacks.
139936         Avoids link error on FreeBSD 4.x.
139937         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
139939         * lib/wcwidth.h (iswprint): Assume an ASCII compatible wide character
139940         encoding.
139941         * lib/mbswidth.c (iswcntrl): Likewise.
139943 2006-07-27  Bruno Haible  <bruno@clisp.org>
139945         * m4/stdint.m4 (gl_STDINT_H): Define __STDC_CONSTANT_MACROS during the
139946         test.
139948 2006-07-27  Bruno Haible  <bruno@clisp.org>
139950         * lib/stdint_.h (INT*_C, UINT*_C) [C++]: Define these if
139951         __STDC_CONSTANT_MACROS is defined, not if __STDC_LIMIT_MACROS is
139952         defined.
139954 2006-07-26  Eric Blake  <ebb9@byu.net>
139956         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Check for missing pipe.
139958 2006-07-26  Eric Blake  <ebb9@byu.net>
139960         * lib/mkstemp-safer.c [! HAVE_MKSTEMP]: Add prototype for platforms
139961         like mingw that lack mkstemp.
139962         * lib/pipe-safer.c (pipe_safer) [!HAVE_FUNC_PIPE]: Provide fallback to
139963         avoid compilation warning on mingw.
139965 2006-07-26  Bruno Haible  <bruno@clisp.org>
139967         * m4/stdint.m4 (gl_STDINT_H): Also verify the existence of the macros
139968         INT*_MIN, INT_LEAST*_MAX, INT_LEAST*_MIN, UINT_LEAST*_MAX,
139969         INT_FAST*_MIN, INTPTR_MIN.
139971 2006-07-25  Bruno Haible  <bruno@clisp.org>
139973         * modules/version-etc (Depends-on): Add stdarg.
139975 2006-07-25  Bruno Haible  <bruno@clisp.org>
139977         * m4/stdint.m4 (gl_INTEGER_TYPE_SUFFIX): Avoid 'eval' in front of
139978         complex commands.
139980 2006-07-25  Bruno Haible  <bruno@clisp.org>
139982         * lib/version-etc.c (version_etc_va): Use va_copy, assumed to be
139983         defined in <stdarg.h> or config.h.
139985 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
139987         * m4/stdio-safer.m4 (gl_FOPEN_SAFER, gl_TMPFILE_SAFER): New macros.
139988         (gl_STDIO_SAFER): Remove.
139990 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
139992         * MODULES.html.sh (File stream based Input/Output):
139993         Add fopen-safer, tmpfile-safer; remove stdio-safer.
139994         * modules/getusershell (Depends-on): Change stdio-safer to fopen-safer.
139995         * modules/fopen-safer, modules/tmpfile-safer: New files.
139996         * modules/stdio-safer: Remove.
139998 2006-07-24  Bruno Haible  <bruno@clisp.org>
140000         * modules/tmpdir: New file.
140001         * MODULES.html.sh (File system functions): Add it.
140003 2006-07-24  Bruno Haible  <bruno@clisp.org>
140005         * modules/javacomp (Depends-on): Add unistd, javaversion, binary-io,
140006         getline, pathname, fwriteerror, clean-temp, xvasprintf, strstr.
140008 2006-07-24  Bruno Haible  <bruno@clisp.org>
140010         * modules/clean-temp: New file.
140012 2006-07-24  Bruno Haible  <bruno@clisp.org>
140014         * m4/tmpdir.m4: New file, from GNU gettext.
140016 2006-07-24  Bruno Haible  <bruno@clisp.org>
140018         * lib/tmpdir.h: New file, from GNU gettext.
140019         * lib/tmpdir.c: New file, from GNU gettext.
140021 2006-07-24  Bruno Haible  <bruno@clisp.org>
140023         * lib/clean-temp.h: New file, from GNU gettext.
140024         * lib/clean-temp.c: New file, from GNU gettext.
140026 2006-07-23  Eric Blake  <ebb9@byu.net>
140028         * modules/stdio-safer (Files): Add tmpfile-safer.c.
140029         (Depends-on): Add binary-io.
140031 2006-07-23  Eric Blake  <ebb9@byu.net>
140033         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add tmpfile-safer.c.
140035 2006-07-23  Eric Blake  <ebb9@byu.net>
140037         * lib/tmpfile-safer.c: New file.
140038         * lib/stdio-safer.h (fopen_safer): Add prototype.
140039         * lib/stdio--.h (tmpfile): Make safer.
140041 2006-07-23  Bruno Haible  <bruno@clisp.org>
140043         * lib/gl_anylinked_list2.h (ASYNCSAFE): New macro.
140044         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before,
140045         gl_linked_add_after, gl_linked_add_at, gl_linked_remove_node,
140046         gl_linked_remove_at): Use it.
140048 2006-07-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
140049         and Simon Josefsson <jas@extundo.com>
140051         * lib/getaddrinfo.h (AI_PASSIVE): Make sure it is defined.
140053         * lib/getaddrinfo.c (getaddrinfo): Support AI_PASSIVE.
140055 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
140057         * modules/close-stream: New file.
140058         * modules/closeout (Description): Make it clear that it exits
140059         with a diagnostic on error.
140060         (Depends-on): Add close-stream.  Remove fpending, stdbool.
140061         * MODULES.html.sh (File stream based Input/Output): Add close-stream.
140063 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
140065         * m4/close-stream.m4: New file.
140067 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
140069         * lib/close-stream.c, lib/close-stream.h: New files.
140071 2006-07-22  Bruno Haible  <bruno@clisp.org>
140073         Merge from GNU gettext 0.15.
140075         2006-05-01  Bruno Haible  <bruno@clisp.org>
140077                 * build-aux/javacomp.sh.in: Update for changed javacomp.m4.
140079         2006-07-22  Bruno Haible  <bruno@clisp.org>
140081                 * modules/javaversion: New file.
140082                 * MODULES.html.sh (Java): Add javaversion.
140084         2006-03-12  Bruno Haible  <bruno@clisp.org>
140086                 * build-aux/javaexec.sh.in: Update for changed javaexec.m4.
140088         2005-12-04  Bruno Haible  <bruno@clisp.org>
140090                 * build-aux/csharpexec.sh.in: Add support for 'clix' launcher
140091                 (untested).
140093         2006-06-21  Bruno Haible  <bruno@clisp.org>
140095                 Avoid warnings from recent versions of mcs.
140096                 * build-aux/csharpcomp.sh.in (options_mcs): Don't use options
140097                 -o, -L, -r any more. Use options documented since mcs-1.0
140098                 instead. Similarly for -g.
140100         2005-12-04  Bruno Haible  <bruno@clisp.org>
140102                 * build-aux/csharpcomp.sh.in: Suffix for resources is
140103                 .resources, not .resource.
140105         2005-07-09  Bruno Haible  <bruno@clisp.org>
140107                 * build-aux/csharpcomp.sh.in (options_csc): For -l option,
140108                 add a .dll suffix.
140109                 Reported by Mark Junker <mjscod@gmx.de>.
140111         2006-07-22  Bruno Haible  <bruno@clisp.org>
140113                 * modules/gettext: Upgrade to gettext-0.15.
140114                 (Files): Remove m4/isc-posix.m4. Add m4/lock.m4,
140115                 m4/visibility.m4.
140116                 Replace m4/inttypes.m4 with m4/inttypes-h.m4.
140118 2006-07-22  Bruno Haible  <bruno@clisp.org>
140120         Merge from GNU gettext 0.15.
140122         2006-03-25  Bruno Haible  <bruno@clisp.org>
140124                 * lib-link.m4 (AC_LIB_LINKFLAGS_FROM_LIBS): New macro.
140126         2006-07-21  Bruno Haible  <bruno@clisp.org>
140128                 * javacomp.m4 (gt_JAVACOMP): Convert target_version "null" to
140129                 "1.1".
140131         2006-05-09  Bruno Haible  <bruno@clisp.org>
140133                 * javacomp.m4 (gt_JAVACOMP): On Cygwin, set
140134                 CLASSPATH_SEPARATOR to a semicolon. Use CLASSPATH_SEPARATOR
140135                 for the conftestver execution.
140137         2006-05-01  Bruno Haible  <bruno@clisp.org>
140139                 * javacomp.m4 (gt_JAVACOMP): Accept a source-version and an
140140                 optional target-version argument. Verify that the compiler
140141                 groks source of the specified source-version, or add -source
140142                 option as necessary. Verify that the compiler produces
140143                 bytecode in the specified target-version, or add -target and
140144                 -source options as necessary. Make the result of the test
140145                 available as variable CONF_JAVAC. Also log error output in
140146                 config.log.
140148         2006-03-11  Bruno Haible  <bruno@clisp.org>
140150                 * javacomp.m4 (gt_JAVACOMP): Treat gcj-4.x like gcj-3.x.
140152         2006-05-09  Bruno Haible  <bruno@clisp.org>
140154                 * javaexec.m4 (gt_JAVAEXEC): On Cygwin, set
140155                 CLASSPATH_SEPARATOR to a semicolon.
140157         2006-03-12  Bruno Haible  <bruno@clisp.org>
140159                 * javaexec.m4 (gt_JAVAEXEC): Make the result of the test
140160                 available as variable CONF_JAVA, for subsequent autoconf
140161                 tests. Also log error output in config.log.
140163         2006-07-19  Bruno Haible  <bruno@clisp.org>
140165                 * getline.m4 (AM_FUNC_GETLINE): When cross-compiling, assume
140166                 that getline works on glibc2 systems. Needed to avoid trouble
140167                 in relocatable.c.
140168                 Reported by Nils Magnus Larsgard <nmlarsgaard@atmel.no>.
140170         2005-12-04  Bruno Haible  <bruno@clisp.org>
140172                 * csharpexec.m4 (gt_CSHARPEXEC): Add support for 'clix'
140173                 launcher (untested).
140175         2005-12-04  Bruno Haible  <bruno@clisp.org>
140177                 * csharpcomp.m4 (gt_CSHARPCOMP): Also set CSHARPCOMPFLAGS.
140179         2006-07-22  Bruno Haible  <bruno@clisp.org>
140181                 * gettext.m4: Update from GNU gettext-0.15.
140182                 * nls.m4: Likewise.
140183                 * po.m4: Likewise.
140184                 * inttypes-pri.m4: Likewise.
140185                 * inttypes-h.m4: Renamed from inttypes.m4.
140186                 (gl_HEADER_INTTYPES_H): Renamed from gt_HEADER_INTTYPES_H.
140188 2006-07-22  Bruno Haible  <bruno@clisp.org>
140190         Merge from GNU gettext 0.15.
140192         2005-07-05  Bruno Haible  <bruno@clisp.org>
140194                 * printf-args.c (printf_fetchargs): Work around broken
140195                 definition of wint_t on mingw.
140197         2005-02-12  Bruno Haible  <bruno@clisp.org>
140199                 * xallocsa.h: Add extern "C" for C++.
140201         2006-05-17  Bruno Haible  <bruno@clisp.org>
140203                 Cygwin portability.
140204                 * progreloc.c (WIN32_NATIVE): Renamed from WIN32.
140206         2006-04-30  Bruno Haible  <bruno@clisp.org>
140208                 * progreloc.c: Include <mach-o/dyld.h> if available.
140209                 (find_executable): Use _NSGetExecutablePath when possible.
140211         2006-05-06  Charles Wilson  <cygwin@cwilson.fastmail.fm>
140213                 * progreloc.c (maybe_executable) [CYGWIN]: Use the access()
140214                 function.
140216         2005-12-29  Bruno Haible  <bruno@clisp.org>
140218                 * progreloc.c (set_program_name_and_installdir): Fix
140219                 compilation error.
140221         2005-12-04  Bruno Haible  <bruno@clisp.org>
140223                 Cygwin portability.
140224                 * progreloc.c: Include <windows.h> also on Cygwin.
140225                 (find_executable): Add support for Cygwin.
140226                 (set_program_name_and_installdir): Handle also platforms with
140227                 nonempty EXEEXT.
140229         2006-07-11  Bruno Haible  <bruno@clisp.org>
140231                 * javacomp.c: Fix a comment.
140232                 Reported by Jim Meyering.
140234         2006-04-30  Bruno Haible  <bruno@clisp.org>
140236                 * javacomp.h (compile_java_class): Add source_version,
140237                 target_version arguments.
140238                 * javacomp.c: Rewritten to choose only a compiler that
140239                 respects the specified source_version and target_version.
140241         2006-06-27  Bruno Haible  <bruno@clisp.org>
140243                 Assume correct S_ISDIR macro.
140244                 * mkdtemp.c: Remove test of STAT_MACROS_BROKEN.
140246         2006-07-22  Bruno Haible  <bruno@clisp.org>
140248                 * javaversion.h: New file, from GNU gettext.
140249                 * javaversion.c: New file, from GNU gettext.
140250                 * javaversion.java: New file, from GNU gettext.
140251                 * javaversion.class: New file, from GNU gettext.
140253         2006-05-17  Bruno Haible  <bruno@clisp.org>
140255                 Cygwin portability.
140256                 * javaexec.c (execute_java_class): Test for jview program
140257                 also on Cygwin.
140259         2006-04-09  Bruno Haible  <bruno@clisp.org>
140261                 * fatal-signal.c: Don't include string.h.
140262                 (at_fatal_signal): Use a copying loop instead of memcpy.
140264         2005-12-04  Bruno Haible  <bruno@clisp.org>
140266                 * csharpexec.c: Add support for 'clix' launcher (untested).
140267                 (execute_csharp_using_sscli): New function.
140268                 (execute_csharp_program): Call it.
140270         2006-06-21  Bruno Haible  <bruno@clisp.org>
140272                 Avoid warnings from recent versions of mcs.
140273                 * csharpcomp.c (compile_csharp_using_mono): Don't use options
140274                 -o, -L, -r any more. Use options documented since mcs-1.0
140275                 instead. Similarly for -g.
140277         2005-07-09  Bruno Haible  <bruno@clisp.org>
140279                 * csharpcomp.c (compile_csharp_using_sscli): For -l option,
140280                 add a .dll suffix.
140281                 Reported by Mark Junker <mjscod@gmx.de>.
140283         2006-06-17  Bruno Haible  <bruno@clisp.org>
140285                 * config.charset: Update for NetBSD 3.0.
140287         2006-05-17  Bruno Haible  <bruno@clisp.org>
140289                 Cygwin portability.
140290                 * localcharset.c (WIN32_NATIVE): Renamed from WIN32.
140292         2006-05-16  Bruno Haible  <bruno@clisp.org>
140294                 * localcharset.c [CYGWIN]: Include <windows.h>.
140295                 (get_charset_aliases): For Cygwin, return the same CPxxx
140296                 aliases list as under WIN32.
140297                 (locale_charset) [CYGWIN]: Try to retrieve the encoding from
140298                 the environment variables. Fall back to GetACP().
140300         2006-04-05  Bruno Haible  <bruno@clisp.org>
140302                 * config.charset: Update Juan Manuel Guerrero's address.
140304         2005-02-12  Bruno Haible  <bruno@clisp.org>
140306                 * allocsa.h: Add extern "C" for C++.
140308         2005-02-10  Bruno Haible  <bruno@clisp.org>
140310                 * allocsa.h (sa_alignof): Define differently with AIX xlc, to
140311                 avoid a bug of this compiler on AIX 3.2.5 dealing with enums.
140313         2006-07-22  Bruno Haible  <bruno@clisp.org>
140315                 * gettext.h: Update to GNU gettext-0.15.
140317 2006-07-22  Bruno Haible  <bruno@clisp.org>
140319         * config/srclist.txt: Resync printf-args.c, vasnprintf.c,
140320         localcharset.c, mkdtemp.c, config.rpath, lib-ld.m4, lib-link.m4,
140321         lib-prefix.m4, longdouble.m4, ssize_t.m4.
140323 2006-07-21  Eric Blake  <ebb9@byu.net>
140325         * modules/stdlib-safer: New file.
140326         * MODULES.html.sh (File stream based Input/Output): Add
140327         stdlib-safer.
140329 2006-07-21  Eric Blake  <ebb9@byu.net>
140331         * lib/stdlib-safer.h: New file from coreutils, required by
140332         stdlib--.h.
140334 2006-07-20  Paul Eggert  <eggert@cs.ucla.edu>
140336         * gnulib-tool (func_usage): Document --assume-autoconf='latest-stable'.
140338 2006-07-20  Bruno Haible  <bruno@clisp.org>
140340         * gnulib-tool: Recognize new option --assume-autoconf.
140341         (autoconf_minversion): New variable.
140342         (func_get_filelist): Use it to decide whether to add onceonly_2_57.m4.
140344 2006-07-20  Bruno Haible  <bruno@clisp.org>
140346         * MODULES.html.sh (func_all_modules): Add a missing func_begin_table.
140348 2006-07-19  Derek R. Price  <derek@ximbiot.com>
140350         * lib/getaddrinfo.h: Don't define unimplemented AI_* flags.
140351         Reindent and repaginate.
140353 2006-07-19  Derek Price  <derek@ximbiot.com>
140355         * doc/gnulib.texi (Libtool and Windows):  Eliminate passive voice.
140356         Correct grammar.
140358 2006-07-17  Bruno Haible  <bruno@clisp.org>
140360         * modules/list: New file.
140361         * modules/array-list: New file.
140362         * modules/carray-list, modules/carray-list-tests: New files.
140363         * modules/linked-list, modules/linked-list-tests: New files.
140364         * modules/avltree-list, modules/avltree-list-tests: New files.
140365         * modules/rbtree-list, modules/rbtree-list-tests: New files.
140366         * modules/linkedhash-list, modules/linkedhash-list-tests: New files.
140367         * modules/avltreehash-list, modules/avltreehash-list-tests: New files.
140368         * modules/rbtreehash-list, modules/rbtreehash-list-tests: New files.
140369         * modules/oset: New file.
140370         * modules/array-oset: New file.
140371         * modules/avltree-oset, modules/avltree-oset-tests: New files.
140372         * modules/rbtree-oset, modules/rbtree-oset-tests: New files.
140373         * tests/test-carray_list.c: New file.
140374         * tests/test-linked_list.c: New file.
140375         * tests/test-avltree_list.c: New file.
140376         * tests/test-rbtree_list.c: New file.
140377         * tests/test-linkedhash_list.c: New file.
140378         * tests/test-avltreehash_list.c: New file.
140379         * tests/test-rbtreehash_list.c: New file.
140380         * tests/test-avltree_oset.c: New file.
140381         * tests/test-rbtree_oset.c: New file.
140382         * MODULES.html.sh (Container data structures): New section.
140384 2006-07-17  Bruno Haible  <bruno@clisp.org>
140386         * m4/gl_list.m4: New file.
140388 2006-07-17  Bruno Haible  <bruno@clisp.org>
140390         * lib/gl_list.h: New file.
140391         * lib/gl_list.c: New file.
140392         * lib/gl_array_list.h: New file.
140393         * lib/gl_array_list.c: New file.
140394         * lib/gl_carray_list.h: New file.
140395         * lib/gl_carray_list.c: New file.
140396         * lib/gl_linked_list.h: New file.
140397         * lib/gl_linked_list.c: New file.
140398         * lib/gl_anylinked_list1.h: New file.
140399         * lib/gl_anylinked_list2.h: New file.
140400         * lib/gl_avltree_list.h: New file.
140401         * lib/gl_avltree_list.c: New file.
140402         * lib/gl_anyavltree_list1.h: New file.
140403         * lib/gl_anyavltree_list2.h: New file.
140404         * lib/gl_rbtree_list.h: New file.
140405         * lib/gl_rbtree_list.c: New file.
140406         * lib/gl_anyrbtree_list1.h: New file.
140407         * lib/gl_anyrbtree_list2.h: New file.
140408         * lib/gl_anytree_list1.h: New file.
140409         * lib/gl_anytree_list2.h: New file.
140410         * lib/gl_linkedhash_list.h: New file.
140411         * lib/gl_linkedhash_list.c: New file.
140412         * lib/gl_anyhash_list1.h: New file.
140413         * lib/gl_anyhash_list2.h: New file.
140414         * lib/gl_avltreehash_list.h: New file.
140415         * lib/gl_avltreehash_list.c: New file.
140416         * lib/gl_rbtreehash_list.h: New file.
140417         * lib/gl_rbtreehash_list.c: New file.
140418         * lib/gl_anytreehash_list1.h: New file.
140419         * lib/gl_anytreehash_list2.h: New file.
140421         * lib/gl_oset.h: New file.
140422         * lib/gl_oset.c: New file.
140423         * lib/gl_array_oset.h: New file.
140424         * lib/gl_array_oset.c: New file.
140425         * lib/gl_avltree_oset.h: New file.
140426         * lib/gl_avltree_oset.c: New file.
140427         * lib/gl_rbtree_oset.h: New file.
140428         * lib/gl_rbtree_oset.c: New file.
140429         * lib/gl_anytree_oset.h: New file.
140431 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
140433         * m4/mkancesdirs.m4: New file.
140434         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Mention dirchownmod.c,
140435         dirchownmod.h.  Don't require AC_FUNC_ALLOCA, gl_AFS, gl_CHDIR_SAFER;
140436         no longer needed.  Require gl_FUNC_LCHOWN, since dirchownmod.c needs
140437         it.
140439 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
140441         * lib/dirchownmod.c, lib/dirchownmod.h, lib/mkancesdirs.c:
140442         * lib/mkancesdirs.h: New files.
140443         * lib/mkdir-p.c: Don't include alloca.h, stdio.h, sys/types.h,
140444         unistd.h, string.h, chdir-safer.h, dirname.h, lchmod.h, lchown.h,
140445         save-cwd.h.  Instead, include dirchownmod.h and mkancesdirs.h.
140446         (make_dir_parents): New args MAKE_ANCESTOR, OPTIONS, ANNOUNCE,
140447         MODE_BITS.  Remove options VERBOSE_FMT_STRING, CWD_ERRNO.  All
140448         callers changed.  Revamp internals significantly, by not
140449         attempting to create directories that are temporarily more
140450         permissive than the final results.  Do not attempt to use
140451         save_cwd/restore_cwd; it isn't worth it for mkdir and install.
140452         This removes some race conditions, fixes some bugs, and simplifies
140453         things.  Use new dirchownmod function to do owner and mode changes.
140454         * lib/mkdir-p.h: Likewise.
140455         * lib/modechange.c (octal_to_mode): New function.
140456         (struct mode_change): New member mentioned.
140457         (make_node_op_equals): New arg mentioned.  All callers changed.
140458         (mode_compile): Keep track of which mode bits the user has explicitly
140459         mentioned.
140460         (mode_adjust): New arg DIR, so that we implement the X op correctly.
140461         New arg PMODE_BITS, to keep track of which mode bits the user
140462         mentioned; it treats S_ISUID and S_ISGID speciall.
140463         All callers changed.
140464         * lib/modechange.h: Likewise.
140466 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
140468         * MODULES.html.sh: Add mkancestors.
140469         * modules/mkancesdirs: New module.
140470         * modules/mkdir-p (Files): Remove lib/chdir-safer.c, lib/chdir-safer.h,
140471         lib/same-inode.h, m4/afs.m4, m4/chdir-safer.m4.
140472         The chdir-safer and afs files are now orphans; I'll remove them
140473         unless someone speaks up.
140474         Add lib/dirchownmod.c, lib/dirchownmod.h.
140475         (Depends-on): Remove alloca, chown, save-cwd, dirname.
140476         Add lchown, mkancesdirs.
140477         (Maintainer): Add self.
140479 2006-07-15  Karl Berry  <karl@gnu.org>
140481         * gnulib-tool: help message wording/arrangement.
140483 2006-07-14  Simon Josefsson  <jas@extundo.com>
140485         * doc/gnulib.texi (Libtool and Windows): New section.
140487 2006-07-12  Simon Josefsson  <jas@extundo.com>
140489         * modules/gendocs (License): Fix license, approved by Karl.
140491 2006-07-12  Eric Blake  <ebb9@byu.net>
140493         * MODULES.html.sh: Add gendocs.
140495 2006-07-11  Eric Blake  <ebb9@byu.net>
140497         * modules/fdl: New module, to install doc/fdl.texi.
140498         * MODULES.html.sh: Add new section for documentation modules.
140499         * gnulib-tool: Avoid space-tab.
140500         (--doc-base): New option, to manage files from doc.
140502 2006-07-11  Eric Blake  <ebb9@byu.net>
140504         * m4/absolute-header.m4: Fix comments to match recent change.
140506 2006-07-11  Eric Blake  <ebb9@byu.net>
140508         * gnulib-tool: List --doc-base before --tests-base.
140510 2006-07-11  Derek R. Price  <derek@ximbiot.com>
140512         * lib/glob.c: s/NAMLEN/_D_EXACT_NAMLEN/.
140514 2006-07-11  Bruno Haible  <bruno@clisp.org>
140516         * README: Mention where to put documentation.
140518 2006-07-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
140520         * doc/functions.texi, gnulib-tool.texi, gnulib.texi: Fix some typos.
140522 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
140524         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Like today's change
140525         to stdint.m4.
140527 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
140529         * m4/stdint.m4 (gl_STDINT_H): Like yesterday's change to
140530         absolute-header.m4.  Also, set ABSOLUTE_STDINT_H to a string
140531         "no/such/file/stdint.h" when there is no such file, so that
140532         the resulting C code can be parsed by dodgy compilers.
140533         Problems reported by Bob Proulx.
140535 2006-07-10  Derek R. Price  <derek@ximbiot.com>
140537         * lib/backupfile.c, dirfd.h, fts.c, getcwd.c, glob.c, glob_.h:
140538         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
140539         macros into the GNU _D_EXACT_NAMLEN.
140540         * lib/savedir.c:  Likewise.
140541         (savedirstream): Use _D_EXACT_NAMLEN in preference to strlen.
140543 2006-07-10  Derek R. Price  <derek@ximbiot.com>
140544         and Paul Eggert  <eggert@cs.ucla.edu>
140546         * m4/backupfile.m4, d-ino.m4, d-type.m4, dirfd.m4, fts.m4, getcwd.m4:
140547         * m4/savedir.m4:
140548         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
140549         macros into the GNU _D_EXACT_NAMLEN.
140551 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
140553         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Use "" rather than <>
140554         around the absolute name, to work around a problem with the HP-UX
140555         11.23 native C compiler, reported by Bob Proulx.
140557 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
140559         * doc/maintain.texi, make-stds.texi: Sync from
140560         <http://savannah.gnu.org/projects/gnustandards>.
140562 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
140564         * build-aux/depcomp, build-aux/install-sh: Sync from Automake.
140566 2006-07-09  Jim Meyering  <jim@meyering.net>
140568         * m4/glob.m4: Remove a doubled word in a comment.
140570 2006-07-09  Jim Meyering  <jim@meyering.net>
140572         * lib/argp-pv.c: Remove a doubled word in a comment.
140573         * lib/check-version.c (check_version): Likewise.
140574         * lib/javacomp.c (compile_java_class): Likewise.
140576 2006-07-08  Paul Eggert  <eggert@cs.ucla.edu>
140578         * gnulib-tool (func_get_filelist): Don't echo m4/onceonly_2_57.m4,
140579         for the benefit of people using Autoconf 2.60.  If you want to
140580         support older Autoconf versions you can copy m4/onceonly_2_57.m4
140581         (or m4/onceonly.m4, if pre-2.57) manually.
140583 2006-07-08  Jim Meyering  <jim@meyering.net>
140585         * m4/link-follow.m4: Remove one of two adjacent "whether"s in a
140586         comment.
140587         * m4/getopt.m4: Remove one of two adjacent "your"s in a comment.
140588         * m4/regex.m4 (gl_REGEX): Remove one of two adjacent "the"s in a
140589         comment.
140591 2006-07-08  Jim Meyering  <jim@meyering.net>
140593         * lib/getndelim2.h (getndelim2): Remove doubled "after" in comment.
140595 2006-07-07  Simon Josefsson  <jas@extundo.com>
140597         * tests/test-crc.c: Change expected crc value, the test vector
140598         were probably computed using the old broken crc.c?
140600 2006-07-06  Simon Josefsson  <jas@extundo.com>
140602         * modules/sys_socket (Files): Add m4/sockpfaf.m4 (this module is
140603         now the canonical place for the M4 file).
140605         * modules/getaddrinfo (Files): Remove m4/sockpfaf.m4, we get it
140606         from the sys_socket dependency now.
140608         * modules/inet_pton (Files): Ditto.
140610         * modules/inet_ntop (Files): Ditto.
140612 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
140614         * modules/getusershell (configure.ac): Use gl_FUNC_GETUSERSHELL,
140615         not gl_PREREQ_GETUSERSHELL.
140617 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
140619         * m4/_inttypes_h.m4 (gl_INTTYPES_H): Use AC_CHECK_DECLS_ONCE
140620         with only one argument, for Autoconf 2.60.
140621         * m4/fileblocks.m4 (gl_PREREQ_FILEBLOCKS): AC_CHECK_DECLS_ONCE may
140622         expand to nothing, so add a shell command to avoid syntax error.
140623         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
140625 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
140627         * lib/strtod.c (strtod): cast the argument of tolower to unsigned char.
140629 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
140631         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't check for getenv decl;
140632         no longer needed.  Check for isblank decl.
140633         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Don't check for getenv decl.
140634         * m4/regex.m4 (gl_PREREQ_REGEX): Dheck for isblank decl instead
140635         of existence.
140637 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
140639         * lib/getloadavg.c: Use __VMS, not VMS.
140640         * lib/getopt.c: Likewise.
140641         * lib/getpagesize.h: Likewise.
140642         * lib/glob.c: Remove most VMS cruft; it hasn't been tested for a while
140643         and probably does not work.
140645 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
140647         * lib/.cppi-disable: Add wcwidth.
140648         * lib/fnmatch.c (ISBLANK): Remove.  All uses changed to isblank.
140649         (isblank) [! (defined isblank || HAVE_DECL_ISBLANK)]: New macro.
140650         (ISGRAPH): Remove.  All uses changed to isgraph.
140651         (FOLD) [!defined _LIBC]: Remove special case.
140652         * lib/getdate.y (lookup_word): Remove no-longer-needed call to islower.
140653         * lib/regex_internal.h (isblank): Depend on HAVE_DECL_ISBLANK, not
140654         HAVE_ISBLANK.
140655         * lib/strftime.c (TOLOWER, TOUPPER) [!defined _LIBC]: Remove special
140656         case.
140658 2006-07-06  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
140660         * lib/getaddrinfo.c: Changes to compile under MSVC6: changed
140661         '#if WIN32_NATIVE' to '#ifdef' & moved WSAAPI macro inside
140662         brackets.  Other minor changes to suppress some compiler
140663         warnings.
140665 2006-07-06  Derek R. Price  <derek@ximbiot.com>
140666         and Paul Eggert  <eggert@cs.ucla.edu>
140668         * m4/backupfile.m4 (gl_BACKUPFILE): Check for dirent.h, instead
140669         of invoking obsolescent AC_HEADER_DIRENT macro.
140670         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
140671         * m4/d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Likewise.
140672         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
140673         * m4/fts.m4 (gl_FUNC_FTS_CORE): Likewise.
140674         * m4/getcwd.m4 (gl_PREREQ_GETCWD): Likewise.
140675         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
140676         * m4/savedir.m4 (gl_SAVEDIR): Likewise.
140677         * m4/readdir.m4: Remove; no longer needed.
140679 2006-07-06  Derek R. Price  <derek@ximbiot.com>
140680         and Paul Eggert  <eggert@cs.ucla.edu>
140682         * lib/backupfile.c [HAVE_DIRENT_H && ! HAVE_NDIR_H]:
140683         Don't worry about this obsolete case any more.
140684         (HAVE_DIR): Remove.  All uses removed; we now assume you can read
140685         directories.
140686         * lib/dirfd.h [HAVE_DIRENT_H && ! HAVE_NDIR_H]: Don't
140687         worry about this obsolete case any more.
140688         * lib/fts.c: Likewise.
140689         * lib/getcwd.c: Likewise.
140690         * lib/glob.h: Likewise.
140691         * lib/savedir.c: Likewise.
140693 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
140695         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Use AC_CHECK_DECLS_ONCE
140696         rather than AC_CHECK_DECLS for strtoimax and strtoumax.
140697         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Remove; no longer
140698         needed.
140699         All uses removed.
140700         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
140701         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
140702         * m4/exclude.m4 (gl_EXCLUDE): Don't check for isascii; no longer
140703         needed.
140704         * m4/getdate.m4 (gl_GETDATE): Likewise.
140705         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
140706         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
140707         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
140708         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
140709         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
140710         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
140711         * m4/exclude.m4 (gl_EXCLUDE): Don't require AC_C_INLINE; no longer
140712         needed.
140714 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
140716         * lib/memcasecmp.c: Include <limits.h>.
140717         (memcasecmp): Don't assume UCHAR_MAX <= INT_MAX.
140718         * lib/strtod.c (strtod): Don't assume isspace works on negative chars.
140719         Don't assume isdigit succeeds only on '0' through '9'.
140721 2006-07-05  Eric Blake  <ebb9@byu.net>
140723         * modules/getaddrinfo (Depends-on): Add snprintf.
140725 2006-07-05  Eric Blake  <ebb9@byu.net>
140727         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Use gl_HEADER_SYS_SOCKET
140728         to avoid 'header present but could not be compiled' on cygwin.
140730 2006-07-05  Eric Blake  <ebb9@byu.net>
140732         * lib/getaddrinfo.h (NI_NUMERICHOST, NI_NUMERICSERV): Define if
140733         missing from netdb.h.
140734         * lib/getaddrinfo.c (includes): Include inet_ntop and snprintf.
140736 2006-07-05  Derek R. Price  <derek@ximbiot.com>
140738         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Don't require AC_HEADER_STDC;
140739         no longer needed.
140740         * m4/exclude.m4 (gl_EXCLUDE): Likewise.
140741         * m4/getdate.m4 (gl_GETDATE): Likewise.
140742         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
140743         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
140744         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
140745         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
140746         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
140748 2006-07-05  Derek R. Price  <derek@ximbiot.com>
140750         * lib/exclude.c (IN_CTYPE_DOMAIN, is_space): Remove; no longer needed.
140751         All uses of is_space replaced by isspace.
140752         * lib/exit.h: Don't talk about STDC_HEADERS.
140753         * lib/fnmatch.c (ISASCII): Remove; no longer needed.  All uses removed.
140754         (ISPRINT, ISDIGIT, ISALNUM, ISALPHA, ISCNTRL, ISLOWER, ISPUNCT):
140755         (ISSPACE, ISUPPER, ISXDIGIT): Remove; no longer needed.  All uses
140756         replaced by isprint etc.
140757         * lib/getdate.y (IN_CTYPE_DOMAIN, ISSPACE, ISALPHA, ISLOWER): Likewise.
140758         * lib/getusershell.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
140759         * lib/memcasecmp.c (IN_CTYPE_DOMAIN, ISLOWER, TOUPPER): Likewise.
140760         * lib/strtod.c (IN_CTYPE_DOMAIN, ISSPACE, ISDIGIT, TOLOWER): Likewise.
140761         * lib/strtol.c (IN_CTYPE_DOMAIN): Likewise.
140762         * lib/xstrtol.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
140764 2006-07-05  Bruno Haible  <bruno@clisp.org>
140766         * m4/strndup.m4 (gl_FUNC_STRNDUP): When cross-compiling, check whether
140767         the function exists, before testing against AIX.
140768         Reported by Martin Lambers <marlam@marlam.de>.
140770 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
140772         * modules/cycle-check (lib_SOURCES): Add same-inode.h.
140773         From Mark D. Baushke.
140775 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
140777         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Prepend three slashes
140778         to the absolute name, not just one, to bypass Sun C 5.8's
140779         "warning: #include of /usr/include/... may be non-portable".
140781 2006-07-04  Eric Blake  <ebb9@byu.net>
140783         * modules/dirname-tests: New test module.
140784         * tests/test-dirname.c: New file, replacing dirname.c
140785         TEST_DIRNAME section that was recently deleted.
140787 2006-07-04  Bruno Haible  <bruno@clisp.org>
140789         Assume ANSI C header files and <ctype.h> functions.
140790         * lib/mbswidth.c (IN_CTYPE_DOMAIN, ISPRINT, ISCNTRL): Remove macros.
140791         (mbsnwidth): Use isprint, iscntrl instead.
140793 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
140795         Merge from coreutils.
140796         * MODULES.html.sh: Add xstrtold.
140797         * modules/xstrtold: New file.
140798         * modules/cycle-check (Files): Add lib/same-inode.h.
140799         * modules/dirname (Files): Add m4/double-slash-root.m4.
140800         * modules/getcwd (Files): Add m4/getcwd-abort-bug.m4.
140801         * modules/mkdir-p (Files): Add lib/same-inode.h.
140802         * modules/same (Files): Add lib/same-inode.h.
140804 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
140806         * m4/absolute-header.m4: Renamed from full-header-path.m4.
140807         This is to keep the terminology clean; POSIX talks about
140808         "absolute pathnames", not "full pathnames", but the GNU
140809         Coding Standards say to use "path" for something else;
140810         so use "absolute" to keep both sides happy.
140811         (gl_ABSOLUTE_HEADER): Renamed from gl_FULL_HEADER_PATH.
140812         Set gl_absolute_header, not gl_full_header_path.
140813         Set gl_cv_absolute_<header>, not gl_full_path_<header>.
140814         Define ABSOLUTE_<HEADER>, not FULL_PATH_<HEADER>.
140815         All uses changed.
140817         Merge from coreutils.
140819         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
140821         * m4/c-strtod.m4 (gl_C_STRTOLD): Add c-strtod.c to LIBSOURCES.
140822         Require gl_USE_SYSTEM_EXTENSIONS, not gl_C_STRTOD, since we don't
140823         want to require the building of c-strtod.o.
140824         * m4/lib-check.m4 (cu_LIB_CHECK): Remove SEQ_LIBM, since seq no longer
140825         needs -lm directly.
140826         * m4/xstrtod.m4 (gl_XSTRTOLD): New macro.
140828         2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
140830         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Prefer binutils's
140831         --as-needed option if available.  Problem reported by Albert Chin in
140832         <http://lists.gnu.org/r/bug-gnulib/2006-06/msg00114.html>.
140833         However, use -Wl,--as-needed, not bare --as-needed, since HP-UX 11.11
140834         cc merely issues a bunch of annoying warnings for --as-needed
140835         (this problem was reported by Bob Proulx).  Also, try linking with
140836         -lm to detect a bug in binutils 2.16 (this problem was reported
140837         by Ralf Wildenhues).
140839         2006-06-18  Jim Meyering  <jim@meyering.net>
140841         Test for a bug that causes glibc's getcwd to suffer a failed assertion.
140842         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): New file and
140843         macro.
140844         * m4/getcwd.m4 (gl_FUNC_GETCWD): If we detect support for getcwd_null,
140845         also check for glibc-2.4's abort-inducing bug.
140847         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Fix typo.
140848         Low-probability clean-up should be to use rmdir to get rid of
140849         the just-created directory, not unlink.
140851         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): If ftruncate is missing, make
140852         configure fail, and request a bug report to inform us about it.
140853         Add a comment that, barring reports to the contrary, in 2007 we'll
140854         assume ftruncate is universally available.
140856         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
140858         * m4/filemode.m4 (gl_FILEMODE): Check for strmode declaration.
140860         2006-03-12  Jim Meyering  <jim@meyering.net>
140862         * m4/chdir-safer.m4 (gl_CHDIR_SAFER): Add same-inode.h to the list.
140863         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Likewise.
140864         * m4/same.m4 (gl_SAME): Likewise.
140865         * m4/root-dev-ino.m4 (gl_ROOT_DEV_INO): Likewise.
140867         2006-03-11  Eric Blake  <ebb9@byu.net>
140869         * m4/double-slash-root.m4: New file, provides gl_DOUBLE_SLASH_ROOT.
140870         * m4/dirname.m4 (gl_DIRNAME): Use gl_DOUBLE_SLASH_ROOT.
140871         * m4/dos.m4 (FILE_SYSTEM_PREFIX_LEN): Move from here to dirname.h.
140872         (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE): New define.
140874 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
140876         * lib/stdint_.h: Include <sys/types.h> after @FULL_PATH_STDINT_H@, for
140877         MacOS X 10.4.6.  Don't mention <sys/int_types.h>.  Problems
140878         reported by Mark D. Baushke, one in
140879         <http://lists.gnu.org/r/bug-gnulib/2006-07/msg00015.html>.
140881         Merge from coreutils.
140883         * lib/.cppi-disable: Add stdint_.h.
140884         * lib/.cvsignore: Add stdint.h.
140886         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
140888         * lib/xstrtod.c (XSTRTOD, DOUBLE): New macros, so that we can support
140889         both double and long double versions.
140890         (XSTRTOD): Renamed from xstrtod.  Use DOUBLE internally.
140891         * lib/xstrtold.c: New file.
140892         * lib/xstrtod.h (xstrtold): New decl.
140894         2006-05-22  Paul Eggert  <eggert@cs.ucla.edu>
140896         * lib/filemode.c (setst): Remove.
140897         (strmode): Rewrite to avoid setst.  This makes the code shorter,
140898         (arguably) clearer, and the generated code is a bit smaller on my
140899         Debian GNU/Linux stable x86 host.
140901         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
140903         * lib/filemode.c: Include "filemode.h" first, to test the interface.
140904         Assume that filemode.h includes sys/types.h and sys/stat.h.
140905         (HAVE_ST_DM_MODE): New macro, moved here from ls.c.
140906         (ftypelet): Reorder to put common cases first, for efficiency.
140907         Add 'P', 'w'.  Remove 'M', since it's now the caller's responsibility
140908         to do 'M'.
140909         (strmode): Renamed from mode_string, and now stores 12 bytes instead
140910         of 10, for compatibility with FreeBSD.  All callers changed.
140911         (filemodestring): Now stores 12 bytes instead of 10, and sets file
140912         types that can't be deduced solely from st_mode.  First arg is now a
140913         const pointer.
140914         * lib/filemode.h (HAVE_DECL_STRMODE): Include <string.h> for strmode.
140915         (strmode): Renamed from mode_string.
140916         (filemodestring): New decl.
140917         * lib/stat-macros.h: Don't undef S_ISDOOR, since it's never buggy.
140918         (S_ISDOOR): Don't bother with S_IFDOOR, since that code is never
140919         needed.
140920         (S_ISPORT, S_ISWHT): New macros, if not already defined.
140922         2006-04-12  Paul Eggert  <eggert@cs.ucla.edu>
140924         * lib/fsusage.c: Don't include <inttypes.h> or <stdint.h>, since
140925         fsusage.h now does that.  Include fsusage.h first, to test interface.
140926         Prefer statvfs if it works, since it's blessed by POSIX.  Attempt
140927         at most one method (the old code could have generated decls that
140928         didn't conform to C89, not that this was ever exercised).
140929         * lib/fsusage.h: Include <inttypes.h> and <stdint.h> if they exist.
140931         2006-03-19  Jim Meyering  <jim@meyering.net>
140933         Work even in a chroot where d_ino values for entries in "/"
140934         don't match the stat.st_ino values for the same names.
140935         * lib/getcwd.c (__getcwd): When no d_ino value matches the target inode
140936         number, iterate through all entries again, using lstat instead.
140937         Reported by Kenshi Muto in http://bugs.debian.org/355810, and by
140938         Zouhir Hafidi in https://bugzilla.redhat.com/bugzilla/190656.
140940         * lib/getcwd.c (__getcwd): Clarify a comment.
140941         Use memcpy in place of a call to strcpy.
140943         2006-03-12  Jim Meyering  <jim@meyering.net>
140945         * lib/fts-cycle.c (leave_dir): If cycle-check's saved dev-ino pair
140946         matches that of the current directory (which we're about to chdir ".."
140947         out of), then save the dev-ino of the parent, instead.
140949         * lib/same-inode.h (SAME_INODE): New file/macro.
140950         * lib/chdir-safer.c (SAME_INODE): Remove definition.
140951         Include "same-inode.h", instead.
140952         * lib/same.c: Likewise.
140953         * lib/cycle-check.h: Include "same-inode.h".
140954         (CYCLE_CHECK_REFLECT_CHDIR_UP): Define.
140955         * lib/cycle-check.c (SAME_INODE): Remove definition.
140956         * lib/root-dev-ino.h: Include "same-inode.h".
140958         2006-03-11  Eric Blake  <ebb9@byu.net>
140960         * lib/same.c (same_name): s/base_name/last_component/
140961         * lib/backupfile.c (check_extension, numbered_backup): Likewise.
140962         * lib/filenamecat.c (file_name_concat): Likewise.
140964         2006-03-11  Eric Blake  <ebb9@byu.net>,
140965                     Paul Eggert  <eggert@cs.ucla.edu>
140967         * lib/dirname.h (FILE_SYSTEM_PREFIX_LEN): Move here from dos.m4.
140968         [FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't treat 1: as a
140969         drive prefix.
140970         (IS_ABSOLUTE_FILE_NAME): Treat all drive letters as absolute on
140971         platforms like cygwin with FILE_SYSTEM_DRIVE_PREFIX_IS_ABSOLUTE.
140972         (last_component): New method.
140973         * lib/dirname.c (dir_len): Determine when drive letters need a
140974         subsequent slash.  Preserve // when it is special.
140975         (dir_name): Don't append dot when drive letter is absolute.
140976         [TEST_DIRNAME]: Move into a full-blown gnulib test.
140977         * lib/basename.c (base_name): New semantics - malloc the result.
140978         Preserve // when it is special.  Preserve relative files that look
140979         like drive letters.
140980         (base_len): Preserve // when it is special.
140981         (last_component): New method, similar to old base_name semantics.
140982         * lib/stripslash.c (strip_trailing_slashes): Use last_component, not
140983         base_name.  Strip redundant slashes from ///.
140985 2006-07-03  Jim Meyering  <jim@meyering.net>
140987         * lib/cycle-check.h (CYCLE_CHECK_REFLECT_CHDIR_UP): Abort if this
140988         macro is used before the first cycle_check call.
140990 2006-07-03  Eric Blake  <ebb9@byu.net>
140992         * modules/dirname (Depends-on): Add xstrndup.
140994 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
140996         * m4/stdint.m4 (gl_STDINT_H): Use more-mnemonic identifiers for
140997         test cases, so that config.log is a bit easier to follow.
140999 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
141001         * lib/stdint_.h (intmax_t, uintmax_t): Prefer long to long long if
141002         both are 64 bits, since this seems to be the tradition, and this
141003         prevents gcc -Wformat from warning about usages with PRIuMAX.  If
141004         we ever run into a host that prefers long long to long in this
141005         case, we'll need another configure-time test.  Problem reported by
141006         Jim Meyering.
141008 2006-07-02  Eric Blake  <ebb9@byu.net>
141010         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Simplify by using AC_CHECK_DECLS.
141012 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
141014         * modules/inttypes (Depends-on): No longer depends on stdint.
141015         * modules/stdint (Description): Say more about assumptions.
141016         Say that the fast types might differ.  Say macros are used.
141017         (Files): Remove m4/size_max.m4, m4/wchar_t.m4.  Add m4/longlong.m4.
141018         (Makefile.am): Revise list of substituted symbols to match
141019         new stdint.m4.
141020         * modules/stdint-tests (Files): Add m4/wchar_t.m4, m4/wint_t.m4.
141021         (configure.ac): Add gt_TYPE_WCHAR_T, gt_TYPE_WINT_T.
141022         * tests/test-stdint.c (verify_same_types)
141023         [! (__GNUC__ >= 2 && DO_PEDANTIC)]: Put in a decl, so that
141024         the code conforms to C99/C89.
141025         Test for WCHAR_MIN and WCHAR_MAX only if HAVE_WCHAR_T.
141026         Test for WINT_MIN and WINT_MAX only if HAVE_WINT_T.
141028 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
141030         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Backport from Autoconf 2.60,
141031         but fix a bug, by requiring at least 64 bits.
141032         * m4/ulonglong.m4 (AC_TYPE_UNSIGNED_LONG_LONG_INT): Likewise.
141033         * m4/longlong.m4 (gl_AC_TYPE_LONG_LONG): Now just call
141034         AC_TYPE_LONG_LONG_INT.  This macro is obsolete and will go soon.
141035         * m4/ulonglong.m4 (gl_AC_TYPE_UNSIGNED_LONG_LONG): Likewise.
141037         * m4/stdint.m4 (gl_STDINT_H): Rewrite to accommodate stdint_.h
141038         changes.  Make 2.59 a prerequisite.  Check and substitute for
141039         HAVE_LONG_LONG_INT.  Rely on Autoconf to check for stdint.h and
141040         inttypes.h.  Do not use special include files; just use the
141041         defaults.  Check for sys/inttypes.h and sys/bitypes.h in the usual
141042         way now.  Remove no-longer-needed tests for HAVE_LONG_64BIT,
141043         HAVE_LONG_LONG_64BIT, int8_t, int16_t, int32_t, int64_t, uint8_t,
141044         uint16_t, uint32_t uint64_t, int_least8_t, int_least16_t,
141045         int_least32_t, int_least64_t, uint_least8_t, uint_least16_t,
141046         uint_least32_t, uint_least64_t, int_fast8_t, int_fast16_t,
141047         int_fast32_t, int_fast64_t, uint_fast8_t uint_fast16_t,
141048         uint_fast32_t, uint_fast64_t, intptr_t, uintptr_t, intmax_t,
141049         uintmax_t, INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX,
141050         UINT16_MAX, INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN,
141051         INT64_MAX, UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX,
141052         UINT_LEAST8_MAX, INT_LEAST16_MIN, INT_LEAST16_MAX,
141053         UINT_LEAST16_MAX, INT_LEAST32_MIN, INT_LEAST32_MAX,
141054         UINT_LEAST32_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX,
141055         UINT_LEAST64_MAX, INT_FAST8_MIN, INT_FAST8_MAX, UINT_FAST8_MAX,
141056         INT_FAST16_MIN, INT_FAST16_MAX, UINT_FAST16_MAX, INT_FAST32_MIN,
141057         INT_FAST32_MAX, UINT_FAST32_MAX, INT_FAST64_MIN, INT_FAST64_MAX,
141058         UINT_FAST64_MAX, INTPTR_MIN, INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN,
141059         INTMAX_MAX, UINTMAX_MAX, PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN,
141060         SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN,
141061         WINT_MAX.  Check for C99 conformance more strictly, by detecting
141062         bugs in glibc 2.4, Solaris 10, and OpenBSD 3.9.  On the other hand do
141063         not check for things that C99 does not require, e.g., int8_t.  If
141064         a test isn't needed unless <stdint.h> isn't working, and is
141065         unlikely to be needed for any other reason, then don't do it
141066         unless <stdint.h> isn't working.  Do not check for ptrdiff_t or
141067         size_t, since we assume C89 freestanding at least.  Do not check
141068         for sig_atomic_t, wchar_t, or wint_t, since the code now does
141069         the right thing even if the types are not defined.  Instead use:
141070         (gl_STDINT_TYPE_PROPERTIES): New macro.
141071         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H): Remove.  Don't bother
141072         testing whether <sys/types.h> clashes, as Autoconf does this for
141073         us now.  All uses removed.
141074         (gl_STDINT_CHECK_TYPES, gl_STDINT_MISSING_BOUND):
141075         (gl_STDINT_MISSING_BOUNDS, gl_STDINT_MISSING_BOUNDS2):
141076         (gl_CHECK_TYPE_SAME):
141077         Remove; no longer needed.
141078         (gl_STDINT_BITSIZEOF): Don't bother to check whether the type
141079         exists, since we'll return 0 anyway in that case.
141080         (gl_INTEGER_TYPE_SUFFIX, gl_STDINT_INCLUDES): New macros.
141082 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
141084         * lib/stdint_.h (_GL_STDINT_H): Renamed from _STDINT_H, to avoid
141085         possible collision with system files.
141086         (<stdio.h>, <time.h>, <wchar.h>) [defined __cplusplus && ! defined
141087         __STDC_CONSTANT_MACROS)]: Do not include, since we don't need
141088         WCHAR_MIN and WCHAR_MAX in this case.
141089         (<stddef.h>): Do not include; no longer needed.
141090         (<sys/types.h>): Include if @HAVE_SYS_TYPES_H@, not if
141091         (defined(__OpenBSD__) || defined(__bsdi__) || defined(__sgi)).
141092         (<sys/inttypes.h>): Include if @HAVE_SYS_INTTYPES_H@ &&
141093         !@HAVE_INTTYPES_H@, not if (defined(__FreeBSD__)
141094         && (__FreeBSD__ >= 3) && (__FreeBSD__ <= 4)).
141095         (__STDINT_H__) [@HAVE_STDINT_H@ && defined __sgi && ! defined
141096         __c99]: Define, to work around IRIX <stdint.h> incompatibility.
141097         (@FULL_PATH_STDINT_H@) [!(defined(__sgi) && @HAVE_INTTYPES_H@ &&
141098         !defined(__c99))]: Include in this case too, since it's harmless
141099         now.
141100         (<inttypes.h>) [@HAVE_INTTYPES_H@]: Include, since it's no longer
141101         dangerous to do so.
141102         (@FULL_PATH_INTTYPES_H@) [(defined(__hpux) || defined(_AIX)) &&
141103         @HAVE_INTTYPES_H@]: Do not include, since we now include <inttypes.h>.
141104         (_STDINT_MIN, _STDINT_MAX): New macros.
141105         (int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t):
141106         (uint64_t, int_least8_t, uint_least8_t, int_least16_t):
141107         (uint_least16_t, int_least32_t, uint_least32_t, int_least64_t):
141108         (uint_least64_t, int_fast8_t, uint_fast8_t, int_fast16_t):
141109         (uint_fast16_t, int_fast32_t, uint_fast32_t, int_fast64_t):
141110         (uint_fast64_t, intptr_t, uintptr_t, intmax_t, uintmax_t): Now
141111         macros, not typedefs; this simplifies things quite a bit.
141112         Use long int for all types narrower than int64_t.
141113         (intmax_t, uintmax_t, INTMAX_C, UINTMAX_C):
141114         Define in terms of long long int or int64_t or long int,
141115         not int64_t or int32_t.  This saves some compile-time testing.
141116         (INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX):
141117         (INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN, INT64_MAX):
141118         (UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX, UINT_LEAST8_MAX):
141119         (INT_LEAST16_MIN, INT_LEAST16_MAX, UINT_LEAST16_MAX):
141120         (INT_LEAST32_MIN, INT_LEAST32_MAX, UINT_LEAST32_MAX):
141121         (INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX, INT_FAST8_MIN):
141122         (INT_FAST8_MAX, UINT_FAST8_MAX, INT_FAST16_MIN, INT_FAST16_MAX):
141123         (UINT_FAST16_MAX, INT_FAST32_MIN, INT_FAST32_MAX, UINT_FAST32_MAX):
141124         (INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTPTR_MIN):
141125         (INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN, INTMAX_MAX, UINTMAX_MAX):
141126         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
141127         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
141128         undef any previous version and define our own version, for
141129         simplicity and consistency with the new macros for types.
141130         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
141131         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
141132         Simplify definitions by using _STDINT_MIN and _STDINT_MAX
141133         where appropriate.  Rely on new symbols @PTRDIFF_T_SUFFIX@,
141134         @SIG_ATOMIC_T_SUFFIX@, @SIZE_T_SUFFIX@, @WCHAR_T_SUFFIX@,
141135         @WINT_T_SUFFIX@ to keep things simple here.
141136         (UINT8_C, UINT16_C, UINT32_C, INT64_C, UINT64_C):
141137         Simplify by assuming typical 8/16/32/64 host, since we're
141138         already doing that elsewhere anyway.
141139         Use (LONG_MAX >> 31 >> 31 == 1) rather than @HAVE_LONG_64BIT@,
141140         and assume long long int is 64 bits if available.  This
141141         speeds up 'configure'.
141143 2006-07-01  Eric Blake  <ebb9@byu.net>
141145         * m4/stdarg.m4 (gl_STDARG_H): Use proper AH_VERBATIM.
141146         Reported by Andreas Buening.
141148 2006-07-01  Eric Blake  <ebb9@byu.net>
141150         * m4/stdarg.m4 (gl_STDARG_H): Properly parenthesize gl_va_copy.
141152 2006-06-30  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
141154         * lib/getaddrinfo.c: fixed typo
141156 2006-06-29  Jim Meyering  <jim@meyering.net>
141158         * modules/strftime (Maintainer): Add my name, since with the
141159         FPRINTFTIME changes strftime.c has forked from glibc.
141161 2006-06-29  Eric Blake  <ebb9@byu.net>
141163         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Use AC_C_INLINE.
141165 2006-06-29  Eric Blake  <ebb9@byu.net>
141167         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): New file.
141169 2006-06-29  Eric Blake  <ebb9@byu.net>
141171         * lib/stat_.h: New file.
141173 2006-06-29  Eric Blake  <ebb9@byu.net>
141175         * lib/stat_.h (rpl_mkdir): Declare inline, to avoid warnings about
141176         unused static function.
141178 2006-06-29  Eric Blake  <ebb9@byu.net>
141180         * doc/functions.texi (Function Portability): Document missing lstat
141181         on mingw.
141183 2006-06-29  Eric Blake  <ebb9@byu.net>
141185         * MODULES.html.sh: Add sys_stat.
141186         * modules/sys_stat: New module.
141187         * modules/mkstemp (Depends-on): Add sys_stat.
141189 2006-06-29  Derek R. Price  <derek@ximbiot.com>
141191         * m4/strftime.m4: Don't call AC_FUNC_STRFTIME.
141193 2006-06-29  Derek R. Price  <derek@ximbiot.com>
141195         * m4/c-bs-a.m4: Removed.
141197 2006-06-29  Derek R. Price  <derek@ximbiot.com>
141199         * lib/strftime.c: Assume strftime() exists.
141201 2006-06-29  Derek Price  <derek@ximbiot.com>
141203         * modules/c-bs-a: Removed - \a is C89.
141204         * MODULES.html.sh: Remove c-bs-a.
141206 2006-06-29  Bruno Haible  <bruno@clisp.org>
141208         * modules/wcwidth (License): Change to LGPL.
141210 2006-06-28  Simon Josefsson  <jas@extundo.com>
141212         * tests/test-getaddrinfo.c: Test getnameinfo too.  Call WSAStartup
141213         on _WIN32.
141215         * modules/getaddrinfo (Depends-on): Add inet_ntop, needed by
141216         getnameinfo.
141218 2006-06-28  Simon Josefsson  <jas@extundo.com>
141220         * m4/getaddrinfo.m4: Look for getnameinfo prototypes too.
141222 2006-06-28  Simon Josefsson  <jas@extundo.com>
141224         * lib/getaddrinfo.c: Try to load ws2_32.dll on Windows, to find the
141225         functions there.  It will succeed on Windows XP, but on Windows
141226         2000 and (presumably) earlier, it will fail, and use the internal
141227         re-implementation.
141228         (use_win32_p): New function.
141229         (getaddrinfo): Use strtoul on servname, to support numeric ports.
141230         Support AI_NUMERICSERV to disable getservbyname.
141231         (getnameinfo): New function, only supports
141232         NI_NUMERICHOST|NI_NUMERICSERV for now.
141234         * lib/getaddrinfo.h: Test and check for AI_* flags separately, MinGW
141235         only have some of them.  Add AI_NUMERICSERV.  Add prototype for
141236         getnameinfo.
141238 2006-06-28  Eric Blake  <ebb9@byu.net>
141240         * modules/wcwidth: New file.
141241         * modules/mbchar (Depends-on): Add wcwidth.
141242         * modules/mbswidth (Depends-on): Add wcwidth.
141243         * MODULES.html.sh: Add wcwidth.
141245 2006-06-28  Eric Blake  <ebb9@byu.net>
141247         * m4/mbswidth.m4 (gl_MBSDWIDTH): Move wcwidth from here...
141248         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): ...to this new file.
141250 2006-06-28  Eric Blake  <ebb9@byu.net>
141252         * lib/xvasprintf.h: Fix comments.
141254 2006-06-28  Eric Blake  <ebb9@byu.net>
141256         * lib/mbchar.h (wcwidth): Include wcwidth.h.
141257         * lib/mbswidth.c (wcwidth): Move from here...
141258         * lib/wcwidth.h: ...to this new file.
141260 2006-06-28  Derek R. Price  <derek@ximbiot.com>
141262         * m4/savedir.m4: Remove AC_FUNC_CLOSEDIR_VOID requirement.
141264         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't require AC_C_CONST, since
141265         it's obsolete.
141266         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Likewise.
141268 2006-06-28  Derek R. Price  <derek@ximbiot.com>
141270         * lib/savedir.c (CLOSEDIR): Remove.  All uses changed to closedir.
141271         Autoconf 2.60 says this stuff was obsolete.
141273 2006-06-28  Bruno Haible  <bruno@clisp.org>
141275         * modules/wcwidth (Files): Add m4/wchar_t.m4.
141277 2006-06-28  Bruno Haible  <bruno@clisp.org>
141279         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Also require AC_C_INLINE and
141280         gt_TYPE_WCHAR_T.
141282 2006-06-28  Bruno Haible  <bruno@clisp.org>
141284         * lib/wcwidth.h: Declare nothing if !HAVE_WCHAR_T. Provide a fallback
141285         declaration for wcwidth.
141286         * lib/mbswidth.c: Restore the includes of <wchar.h> and <wctype.h>.
141288 2006-06-28  Bruno Haible  <bruno@clisp.org>
141290         * lib/mkdtemp.c [MINGW]: Include <io.h>.
141291         (mkdir): Define using _mkdir.
141293 2006-06-28  Bruno Haible  <bruno@clisp.org>
141295         * lib/getaddrinfo.h: Fix POSIX URL.
141296         * lib/getaddrinfo.c (WIN32_NATIVE): New macro. Use it instead of
141297         _WIN32.
141298         (use_win32_p): Make static.
141299         (getaddrinfo): Reject service name if it is empty or does not consist
141300         solely of decimal digits, or if its value is > 65535.
141301         (getnameinfo): Remove useless casts.
141303 2006-06-27  Simon Josefsson  <jas@extundo.com>
141305         * modules/sys_select: New file, suggested by Bruno Haible, Paul
141306         Eggert and Martin Lambers.
141308 2006-06-27  Simon Josefsson  <jas@extundo.com>
141310         * m4/sys_select_h.m4: New file, suggested by Bruno Haible, Paul
141311         Eggert and Martin Lambers.
141313 2006-06-27  Bruno Haible  <bruno@clisp.org>
141315         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): For nonexistent types, set the
141316         result to 0, not to empty.
141317         Reported by Martin Neitzel <neitzel@sco.gaertner.de>.
141319 2006-06-27  Bruno Haible  <bruno@clisp.org>
141321         * lib/stdint_.h (intmax_t, uintmax_t): Undefine before typedef.
141323 2006-06-26  Simon Josefsson  <jas@extundo.com>
141325         * m4/inet_ntop.m4: Don't check for sys/types.h, we assume it is
141326         present.
141328 2006-06-26  Paul Eggert  <eggert@cs.ucla.edu>
141330         * lib/base64.c (B64): Use _ as the formal parameter, not x, to avoid
141331         bug in IBM C V6 for AIX.  Problem reported by Larry Jones in
141332         <http://lists.gnu.org/r/bug-gnulib/2006-06/msg00181.html>.
141334 2006-06-26  Mark D. Baushke  <mdb@gnu.org>
141336         * m4/stdint.m4 (gl_STDINT_H): Treat BSD/OS like OpenBSD.
141338 2006-06-26  Bruno Haible  <bruno@clisp.org>
141340         * modules/stdint (Makefile.am): Also substitute HAVE_WCHAR_H.
141342 2006-06-26  Bruno Haible  <bruno@clisp.org>
141344         * m4/stdint.m4 (gl_STDINT_H): Test also for <wchar.h>.
141346 2006-06-26  Bruno Haible  <bruno@clisp.org>
141348         * m4/stdint.m4 (gl_STDINT_H): Don't include <stdint.h> when using the
141349         SGI C compiler in pre-C99 mode.
141350         Suggested by Mark D. Baushke and Larry Jones.
141352 2006-06-26  Bruno Haible  <bruno@clisp.org>
141354         * lib/stdint_.h: Include <wchar.h> if necessary for WCHAR_MIN or
141355         WCHAR_MAX.
141356         Reported by Mark D. Baushke and Larry Jones.
141358 2006-06-26  Bruno Haible  <bruno@clisp.org>
141360         * lib/stdint_.h: Don't include <stdint.h> when using the SGI C compiler
141361         in pre-C99 mode.
141362         Suggested by Mark D. Baushke and Larry Jones.
141364 2006-06-23  Simon Josefsson  <jas@extundo.com>
141365             Bruno Haible  <bruno@clisp.org>
141367         * gnulib-tool (func_emit_lib_Makefile_am): Define MOSTLYCLEANDIRS.
141368         Emit mostlyclean-local rule.
141369         (func_emit_tests_Makefile_am): Likewise.
141370         * modules/sys_socket (Makefile.am): Use MOSTLYCLEANDIRS.
141372 2006-06-23  Mark D. Baushke  <mdb@gnu.org>
141374         * lib/stdint_.h: Treat BSD/OS like OpenBSD.
141376 2006-06-23  Bruno Haible  <bruno@clisp.org>
141378         * tests/test-stdint.c: Update to match ISO C 99 Technical
141379         Corrigendum 1.
141381 2006-06-23  Bruno Haible  <bruno@clisp.org>
141383         * m4/stdint.m4 (gl_STDINT_H): Treat IRIX like OpenBSD.
141385 2006-06-23  Bruno Haible  <bruno@clisp.org>
141387         * lib/stdint_.h: Treat IRIX like OpenBSD.
141389 2006-06-23  Bruno Haible  <bruno@clisp.org>
141391         * lib/stdint_.h (UINT8_C, UINT16_C, UINT32_C): Define according to
141392         ISO C 99 Technical Corrigendum 1.
141394 2006-06-22  Simon Josefsson  <jas@extundo.com>
141396         * m4/sockpfaf.m4: Include winsock2.h too, to make it work under
141397         MinGW.
141399 2006-06-22  Paul Eggert  <eggert@cs.ucla.edu>
141401         * lib/glob.c (collated_compare): Remove 'const' uses that weren't
141402         needed.  Some compiler complained about some of them.  Problem reported
141403         by Larry Jones in
141404         <http://lists.gnu.org/r/bug-gnulib/2006-06/msg00172.html>.
141406 2006-06-21  Simon Josefsson  <jas@extundo.com>
141408         * tests/test-getaddrinfo.c: New file.
141410         * modules/getaddrinfo-tests: New file.
141412         * MODULES.html.sh: Add inet_pton.
141414         * modules/inet_pton: New file.
141416 2006-06-21  Simon Josefsson  <jas@extundo.com>
141418         * m4/getaddrinfo.m4: Don't define WINVER.  Look for gethostbyname in
141419         -lws2_32 too.  Fixes getaddrinfo on Windows 2000, with the price
141420         of using the (limited) gnulib implementation on Windows XP.
141422         * m4/inet_pton.m4: New file.
141424 2006-06-21  Simon Josefsson  <jas@extundo.com>
141426         * lib/getaddrinfo.c (getaddrinfo): Set ai_family in the return
141427         variable.
141429         * lib/socket_.h: Don't define WINVER.
141431         * lib/inet_pton.h, inet_pton.c: New file, taken from glibc but
141432         slightly modified to work in gnulib.
141434 2006-06-21  Simon Josefsson  <jas@extundo.com>
141436         * doc/gnulib.texi (Windows sockets): Add.
141438 2006-06-21  Paul Eggert  <eggert@cs.ucla.edu>
141440         * lib/read-file.c (fread_file): Start with buffer allocation of
141441         0 bytes rather than 1 byte; this simplifies the code.
141442         Don't invoke feof; it's not needed.  Refactor to avoid duplicate
141443         code to free buffer and save/restore errno.
141444         (internal_read_file): Remove unused local.
141446 2006-06-20  Paul Eggert  <eggert@cs.ucla.edu>
141448         * lib/openat.c (openat): Use ?:, not if, to work around GCC bug 4210
141449         <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210>.
141450         Problem reported by Denis Excoffier in
141451         <http://lists.gnu.org/r/bug-tar/2006-06/msg00023.html>.
141453 2006-06-19  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
141455         * modules/sys_socket, modules/socklen: Include sys/types since
141456         FreeBSD 4.x's sys/socket.h needs it.
141458 2006-06-19  Simon Josefsson  <jas@extundo.com>
141460         * lib/inet_ntop.c: Always build inet_ntop4, since inet_ntop6 calls it.
141462 2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
141464         * lib/alloca_.h (alloca) [defined alloca]: Don't define or declare.
141466 2006-06-19  Bruno Haible  <bruno@clisp.org>
141468         * m4/stdint.m4 (gl_STDINT_H): Enclose the values of FULL_PATH_STDINT_H
141469         and FULL_PATH_INTTYPES_H in angle brackets.
141470         Reported by Mark D. Baushke <mdb@gnu.org>.
141472 2006-06-17  Eric Blake  <ebb9@byu.net>
141474         * m4/rmdir-errno.m4 (gl_FUNC_FMDIR_NOTEMPTY): Assume errno.h declares
141475         errno.
141477 2006-06-17  Bruno Haible  <bruno@clisp.org>
141479         * m4/stdint.m4 (gl_STDINT_H) [FreeBSD >= 5]: Don't include
141480         <sys/inttypes.h>.
141482 2006-06-17  Bruno Haible  <bruno@clisp.org>
141484         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove test
141485         whether errno is declared. Assume <errno.h> declares errno.
141487 2006-06-17  Bruno Haible  <bruno@clisp.org>
141489         * lib/stdint_.h [FreeBSD >= 5]: Don't include <sys/inttypes.h>.
141491 2006-06-17  Bruno Haible  <bruno@clisp.org>
141493         * lib/stdint_.h (_UINT8_T, _UINT32_T, _UINT64_T): New macros. Fixes a
141494         problem on Solaris 2.5.1.
141496 2006-06-16  Eric Blake  <ebb9@byu.net>
141498         * lib/unsetenv.c [!defined errno]: Assume errno.h declares errno.
141499         * lib/unicodeio.c [!defined errno]: Likewise.
141500         * lib/strtol.c [!defined errno]: Likewise.
141501         * lib/strtod.c [!defined errno]: Likewise.
141503 2006-06-15  Eric Blake  <ebb9@byu.net>
141505         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Work in spite of -Werror.
141507 2006-06-15  Eric Blake  <ebb9@byu.net>
141509         * config/srclist.txt (ssize_t.m4): Lose sync.
141511 2006-06-15  Bruno Haible  <bruno@clisp.org>
141513         * modules/stdint (Files): Include m4/full-header-path.m4,
141514         m4/size_max.m4, m4/wchar_t.m4.
141515         (Makefile.am): Many more substitutions.
141516         * modules/stdint-tests: New file.
141517         * tests/test-stdint.c: New file.
141519 2006-06-15  Bruno Haible  <bruno@clisp.org>
141521         * m4/stdint.m4 (gl_STDINT_H): Rewritten to produce a complete stdint.h.
141522         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H, gl_STDINT_CHECK_TYPES,
141523         gl_STDINT_MISSING_BOUND, gl_STDINT_MISSING_BOUNDS,
141524         gl_STDINT_MISSING_BOUNDS2, gl_STDINT_BITSIZEOF, gl_CHECK_TYPES_SIGNED,
141525         gl_CHECK_TYPE_SAME): New macros.
141527 2006-06-15  Bruno Haible  <bruno@clisp.org>
141529         * m4/size_max.m4 (gl_SIZE_MAX): Make it work also when cross-compiling.
141531 2006-06-15  Bruno Haible  <bruno@clisp.org>
141533         * lib/stdint_.h: Rewritten to be fully auto-configured.
141534         Fixes bug on HP-UX/IA64.
141536 2006-06-11  Paul Eggert  <eggert@cs.ucla.edu>
141538         * lib/getdate.y (__attribute__): Don't define if already defined.
141539         Problem reported by Larry Jones.
141540         * lib/utimens.c (__attribute__): Likewise.
141542 2006-06-04  Paul Eggert  <eggert@cs.ucla.edu>
141544         * lib/regexec.c (group_nodes_into_DFAstates): Fix a buffer overrun
141545         reported by Andreas Schwab.
141547 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
141548             Bruno Haible  <bruno@clisp.org>
141550         * m4/strndup.m4 (gl_FUNC_STRNDUP): Replace the AC_REPLACE_FUNCS with a
141551         check for the declaration of strnlen and a run test that exposes the
141552         AIX 5.1 strnlen bug.  In the failure case, #define strndup to
141553         rpl_strndup.
141555 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
141556             Bruno Haible  <bruno@clisp.org>
141558         * lib/strndup.c (strndup) [!_LIBC]: Don't undefine macro definition.
141560 2006-05-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
141562         * m4/c-strtod.m4 (gl_C99_STRTOLD): Use a link test rather than a
141563         compile test, for Tru64 4.0D.
141565 2006-05-28  Karl Berry  <karl@gnu.org>
141567         * config/srclist.txt (printf-args.c): lose sync.
141569 2006-05-26  Martin Lambers  <marlam@marlam.de>
141571         * lib/getpass.c: Updates the test for the native W32 API, and adds
141572         missing includes, thus fixing compilation warnings.
141574 2006-05-25  Sergey Poznyakoff  <gray@gnu.org.ua>
141576         * lib/exclude.c (exclude_fnmatch): New function.
141577         (excluded_file_name): Call exclude_fnmatch.
141578         * lib/exclude.h (excluded_file_name): New prototype
141580 2006-05-25  Paul Eggert  <eggert@cs.ucla.edu>
141582         * lib/tempname.c (small_open, large_open): New macros.
141583         (__open, __open64) [!_LIBC]: Remove.
141584         (__gen_tempname): Use small_open and large_open instead of __open
141585         and __open64.  This fixes a portability bug on HP-UX 11.11i
141586         reported by Simon Wing-Tang in
141587         <http://lists.gnu.org/r/bug-coreutils/2006-05/msg00114.html>.
141589 2006-05-24  Bruno Haible  <bruno@clisp.org>
141591         * lib/printf-args.c (printf_fetchargs): Turn NULL pointers for
141592         TYPE_STRING and TYPE_WIDE_STRING into a non-NULL replacement.
141593         Reported by Thorsten Maerz <torte@netztorte.de> via
141594         Aaron Stone <aaron@serendipity.cx>.
141596 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
141598         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Rename cache variables to use
141599         gl_ rather than jm_.  Link, don't run, so that cross-compiles are
141600         allowed.  Check that resulting type is arithmetic.  Move AC_REQUIRE
141601         and AC_CHECK_HEADERS_ONCE outside of AC_CACHE_CHECK, since they're
141602         not really conditional on the cache.
141603         (gl_PREREQ_NANOSLEEP): Check for sys/select.h.
141605 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
141607         * lib/nanosleep.c [HAVE_SYS_SELECT_H]: Include <sys/select.h>.
141608         Use the usual Autoconf way to include <time.h> and/or sys/time.h.
141609         (my_usleep): Don't mishandle maximum value.
141611 2006-05-19  Jim Meyering  <jim@meyering.net>
141613         * lib/getugroups.c: Correct an outdated comment.  From Bruno Haible.
141615 2006-05-17  Bruno Haible  <bruno@clisp.org>
141617         Cygwin portability.
141618         * lib/classpath.c (PATH_SEPARATOR) [CYGWIN]: Define as ':'.
141620 2006-05-17  Bruno Haible  <bruno@clisp.org>
141622         * lib/stdint_.h: Fix recognition of Cygwin.
141624 2006-05-15  Bruno Haible  <bruno@clisp.org>
141626         * build-aux/config.rpath: Improve support for Sun C 5.9 on Linux, based
141627         on libtool patch by Ralf Wildenhues.
141629 2006-05-14  Paul Eggert  <eggert@cs.ucla.edu>
141631         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Fix overly-picky
141632         test for C99 conformance; (bool) 0.5 is an integer constant
141633         expression, but (bool) -0.5 is not.  Problem reported by Fedor
141634         Sergeev in <http://forum.sun.com/jive/thread.jspa?threadID=96202>.
141636 2006-05-11  Simon Josefsson  <jas@extundo.com>
141638         * m4/xvasprintf.m4: Fix obvious typo.
141640 2006-05-11  Jim Meyering  <jim@meyering.net>
141642         * lib/sha1.c (sha1_buffer): Correct comment: s/MD5/SHA1/.  From
141643         James Lemley.
141645 2006-05-10  Simon Josefsson  <jas@extundo.com>
141647         * lib/md4.c: Typo fix, update copyright years.
141648         (K1, K2): Don't use L because it turn computations into 64-bit on
141649         64-bit platforms.
141651 2006-05-10  Paul Eggert  <eggert@cs.ucla.edu>
141653         * lib/crc.c (crc32_update): Remove unnecessary L suffix.
141654         * lib/md4.c (rol): Cast right-shift arg to uint32_t to prevent
141655         unwanted sign propagation, e.g., on hosts with 64-bit int.
141656         There still are some problems with reeelly weird theoretical hosts
141657         (e.g., 33-bit int) but it's not worth worrying about now.
141658         * lib/sha1.c (rol): Likewise.
141659         (K1, K2, K3, K4): Remove unnecessary L suffix.
141661 2006-05-10  Bruno Haible  <bruno@clisp.org>
141663         * lib/des.c: Cast to avoid warnings.
141665 2006-05-09  Bruno Haible  <bruno@clisp.org>
141667         * modules/xvasprintf (Files): Add m4/xvasprintf.m4.
141668         (Depends-on): Depend also on xsize, stdarg.
141669         (configure.ac): Add gl_XVASPRINTF.
141671 2006-05-09  Bruno Haible  <bruno@clisp.org>
141673         * m4/xvasprintf.m4: New file.
141675 2006-05-09  Bruno Haible  <bruno@clisp.org>
141677         * lib/xvasprintf.c: Include limits.h, string.h, xsize.h.
141678         (EOVERFLOW): Define fallback value.
141679         (xstrcat): New function.
141680         (xvasprintf): Recognize the special case of a string concatenation.
141682 2006-05-08  Eric Blake  <ebb9@byu.net>
141684         * gnulib-tool (func_version): Base copyright year on CVS date.
141685         (func_emit_copyright_notice): New function.
141686         (func_emit_lib_Makefile_am): Use it.
141687         (func_emit_tests_Makefile_am): Likewise.
141688         (func_import): Likewise.
141690 2006-05-08  Bruno Haible  <bruno@clisp.org>
141692         * modules/stdarg: New file.
141693         * MODULES.html.sh (func_all_modules): Add section for <stdarg.h>.
141695 2006-05-08  Bruno Haible  <bruno@clisp.org>
141697         * m4/stdarg.m4: New file, from GNU gettext.
141699 2006-05-08  Bruno Haible  <bruno@clisp.org>
141701         * config/srclist.txt (build-aux/config.rpath): different from latest
141702         release.
141704 2006-05-08  Bruno Haible  <bruno@clisp.org>
141706         * build-aux/config.rpath: Add support for Sun C 5.9 on Linux.
141708 2006-05-05  Jim Meyering  <jim@meyering.net>
141710         * m4/warning.m4: New file, derived from bison's file by the same name.
141712 2006-05-03  Bruno Haible  <bruno@clisp.org>
141714         * lib/stdint_.h: Shorter URL.
141715         * lib/inttypes.h: Likewise.
141717 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
141719         * modules/inttypes (Maintainer): Change from Derek Price to 'all'.
141721 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
141723         * lib/verify.h: Document the internals better.  Most of this change
141724         was written by Bruno Haible.
141726 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
141728         * doc/verify.texi: New file, partly based on a proposal by
141729         Bruno Haible.
141731 2006-05-02  Bruno Haible  <bruno@clisp.org>
141733         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Move the include_next
141734         test from here...
141735         * m4/_inttypes_h.m4 (gl_INTTYPES_H): ... to here.
141737 2006-04-29  Bruno Haible  <bruno@clisp.org>
141739         * lib/gcd.c: Use WORD_T and GCD instead of unsigned long and gcd.
141740         Suggested by Oskar Liljeblad <oskar@osk.mine.nu>.
141742 2006-04-29  Bruno Haible  <bruno@clisp.org>
141744         * gnulib-tool: Make --update option actually work.
141746 2006-04-29  Bruno Haible  <bruno@clisp.org>
141748         * doc/gcd.texi: New file.
141749         * doc/gnulib.texi: Include it.
141751 2006-04-25  Paul Eggert  <eggert@cs.ucla.edu>
141753         * lib/getdate.y (get_date): When adding relative date, start with the
141754         initial time, not with the result of the first mktime call.
141756 2006-04-25  Bruno Haible  <bruno@clisp.org>
141758         * gnulib-tool (func_import): Output the include directives in three
141759         blocks, sorted separately.
141760         Reported by Ben Pfaff <blp@cs.stanford.edu>.
141762 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
141764         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use prototype
141765         to define main with arguments, for C++.  Reported by Eric Blake.
141766         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC):
141767         Prefer 'int main ()' to 'int main (void)', for C++.
141768         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
141769         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Specify a return type
141770         for 'main', for C99 and C++.
141772 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
141774         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Use return, not exit.
141775         Don't assume that exit status -1 is valid.
141776         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
141777         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
141778         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
141779         * m4/readdir.m4 (GL_FUNC_READDIR): Include <stdlib.h>.
141780         * m4/rename.m4 (vb_FUNC_RENAME): Likewise.
141781         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use AC_RUN_IFELSE,
141782         not AC_TRY_RUN.  Use return, not exit.  Don't assume that
141783         functions can be used without declaring them, or that you can
141784         exit with status -1.
141785         * m4/utimes-null.m4 (gl_FUNC_UTIMES_NULL): Likewise.
141787 2006-04-24  Karl Berry  <karl@gnu.org>
141789         * config/srclist.txt (longdouble.m4): sync lost.
141791 2006-04-24  Eric Blake  <ebb9@byu.net>
141793         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Avoid unused variable warning.
141795 2006-04-24  Bruno Haible  <bruno@clisp.org>
141797         * m4/poll.m4 (gl_FUNC_POLL): When cross-compiling, reject also the
141798         poll() implementation in AIX.
141799         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
141801 2006-04-24  Bruno Haible  <bruno@clisp.org>
141803         * m4/poll.m4 (gl_FUNC_POLL): Rearrange code, so that POLL_H gets
141804         assigned exactly once.
141806 2006-04-23  Claudio Fontana  <claudio@gnu.org>
141807             Bruno Haible  <bruno@clisp.org>
141809         * modules/gettext (Makefile.am): Add a -I flag for <libintl.h>.
141810         * gnulib-tool (func_emit_lib_Makefile_am): Emit empty default value
141811         for AM_CPPFLAGS.
141813 2006-04-23  Bruno Haible  <bruno@clisp.org>
141815         * modules/copy-file: Depend on unistd.
141816         * modules/execute: Likewise.
141817         * modules/fatal-signal: Likewise.
141818         * modules/findprog: Likewise.
141819         * modules/mkdtemp : Likewise.
141820         * modules/pipe: Likewise.
141821         * modules/wait-process: Likewise.
141823 2006-04-23  Bruno Haible  <bruno@clisp.org>
141825         * lib/fwriteerror.c (fwriteerror): Call fclose also when an error
141826         condition was already detected.
141827         Reported by Ben Pfaff <blp@cs.stanford.edu>.
141829 2006-04-23  Bruno Haible  <bruno@clisp.org>
141831         * lib/copy-file.c: Include <unistd.h> unconditionally.
141832         * lib/execute.c: Likewise.
141833         * lib/fatal-signal.c: Likewise.
141834         * lib/findprog.c: Likewise.
141835         * lib/mkdtemp.c: Likewise.
141836         * lib/pipe.h: Likewise.
141837         * lib/pipe.c: Likewise.
141838         * lib/wait-process.h: Likewise.
141840 2006-04-23  Bruno Haible  <bruno@clisp.org>
141842         * gnulib-tool (func_usage): Fix --import description. Document
141843         --update.
141844         (func_import): Create temporary file in a temporary directory, if
141845         --dry-run is specified. Silence errors from 'grep' when there are no
141846         m4 files in $m4dir.
141847         (func_create_testdir): Silence errors from 'grep' when there are no
141848         m4 files in $m4dir.
141849         Reported by Karl Berry <karl@freefriends.org>.
141851 2006-04-20  Bruno Haible  <bruno@clisp.org>
141853         * m4/argp.m4 (gl_ARGP): Don't call AC_CHECK_DECLS_ONCE with more than
141854         one argument, so that the code will be portable to Autoconf 2.60.
141855         * m4/getlogin_r.m4 (gl_PREREQ_GETLOGIN_R): Likewise.
141856         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
141857         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO): Likewise.
141859 2006-04-19  Derek Price  <derek@ximbiot.com>
141860             Eric Blake  <ebb9@byu.net>
141862         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Use </full/path.h>
141863         rather than "/full/path.h".  Update comment to match.  Shorten &
141864         generalize m4_translit call via AS_TR_CPP.
141866 2006-04-19  Derek Price  <derek@ximbiot.com>
141867             Eric Blake  <ebb9@byu.net>
141869         * lib/inttypes.h: Correct grammar in comment.
141871 2006-04-18  Derek Price  <derek@ximbiot.com>
141872             Paul Eggert  <eggert@cs.ucla.edu>
141874         * modules/inttypes: New file.
141875         * modules/strtoimax, modules/strtoumax: Depend on inttypes.
141877 2006-04-18  Derek Price  <derek@ximbiot.com>
141878             Paul Eggert  <eggert@cs.ucla.edu>
141880         * m4/_inttypes_h.m4, m4/full-header-path.m4, m4/include_next.m4:
141881         New files.
141883 2006-04-18  Derek Price  <derek@ximbiot.com>
141884             Paul Eggert  <eggert@cs.ucla.edu>
141886         * lib/inttypes.h: New file.
141887         * lib/strtoimax.c: Assume <inttypes.h>.
141889 2006-04-15  Paul Eggert  <eggert@cs.ucla.edu>
141891         * lib/utimens.c (futimens): glibc futimesat messes up if /proc
141892         isn't mounted.  Problem reported by Kir Kolyshkin.
141894 2006-04-13  Paul Eggert  <eggert@cs.ucla.edu>
141896         * lib/regcomp.c (init_dfa): Don't use wchar_t or wctype_t if
141897         RE_ENABLE_I18N is not defined.  Problem reported by Mark D. Baushke via
141898         Derek R. Price.
141899         * lib/regex.h (RE_DUP_MAX): Update comment to match current
141900         implementation.
141902 2006-04-12  Eric Blake  <ebb9@byu.net>
141904         * modules/time_r (Makefile.am): Remove lib_SOURCES line, as this
141905         is now done automatically by the corresponding Autoconf macro.
141907 2006-04-11  Paul Eggert  <eggert@cs.ucla.edu>
141909         * m4/time_r.m4 (gl_TIME_R): Add AC_LIBSOURCES for time_r.c and
141910         time_r.h.
141912 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
141914         Merge regex changes from libc, removing some of our
141915         POSIX-conformance changes that were rejected and redoing them in a
141916         less-intrusive way.
141918         * lib/regcomp.c (re_compile_internal, init_dfa):
141919         Length arg is now size_t, not Idx.  All uses changed.
141920         (peek_token): Forward decl now says internal_function.
141921         (__re_error_msgid, __re_error_msgid_idx):
141922         Now static rather than extern with attribute_hidden.
141923         (re_compile_pattern) [!defined _LIBC]: Use K&R-style defn.
141924         For some reason libc prefers K&R style defns for external functions.
141925         (regerror) [!defined _LIBC]: Likewise.
141926         (re_set_syntax, re_compile_fastmap, regcomp, regfree, re_comp):
141927         (seek_collating_symbol_entry, lookup_collation_sequence_value):
141928         (build_range_exp, build_collating_symbol):
141929         Use K&R-style defn.
141930         (re_compile_fastmap): Use '\0' to memset, not 0.
141931         (utf8_sb_map): Make the calculations more obvious.
141932         (init_dfa, parse_bracket_exp, build_charclass_op):
141933         Call calloc and cast result, as glibc does.
141934         (init_word_char, fetch_token, peek_token, peek_token_bracket):
141935         (build_range_exp, build_collating_symbol):
141936         Now internal functions.
141938         * lib/regex.c [!defined _LIBC]: Allow compiling with C++ compilers.
141940         * lib/regex.h (__USE_GNU_REGEX): New macro.  Don't depend on
141941         _REGEX_SOURCE any more; depend on _GNU_SOURCE instead.
141942         Don't depend on VMS; depend on __VMS instead, for POSIX
141943         namespace cleanness.
141944         (regoff_t): Define to ssize_t, not long int.
141946         Remove the REG_ macros named below.  Instead, make the old names
141947         (e.g., RE_BACKSLASH_ESCAPE_IN_LISTS) visible only if
141948         __USE_GNU_REGEX.
141949         (REG_BACKSLASH_ESCAPE_IN_LISTS):
141950         (REG_BK_PLUS_QM, REG_CHAR_CLASSES, REG_CONTEXT_INDEP_ANCHORS):
141951         (REG_CONTEXT_INDEP_OPS, REG_CONTEXT_INVALID_OPS):
141952         (REG_DOT_NEWLINE, REG_DOT_NOT_NULL, REG_HAT_LISTS_NOT_NEWLINE):
141953         (REG_INTERVALS, REG_LIMITED_OPS, REG_NEWLINE_ALT):
141954         (REG_NO_BK_BRACES, REG_NO_BK_PARENS, REG_NO_BK_REFS):
141955         (REG_NO_BK_VBAR, REG_NO_EMPTY_RANGES):
141956         (REG_UNMATCHED_RIGHT_PAREN_ORD, REG_NO_POSIX_BACKTRACKING):
141957         (REG_NO_GNU_OPS, REG_DEBUG, REG_INVALID_INTERVAL_ORD):
141958         (REG_IGNORE_CASE, REG_CARET_ANCHORS_HERE):
141959         (REG_CONTEXT_INVALID_DUP, REG_NO_SUB, REG_SYNTAX_EMACS):
141960         (REG_SYNTAX_AWK, REG_SYNTAX_GNU_AWK, REG_SYNTAX_POSIX_AWK):
141961         (REG_SYNTAX_GREP, REG_SYNTAX_EGREP, REG_SYNTAX_POSIX_EGREP):
141962         (REG_SYNTAX_ED, REG_SYNTAX_SED, _REG_SYNTAX_POSIX_COMMON):
141963         (REG_SYNTAX_POSIX_BASIC, REG_SYNTAX_POSIX_MINIMAL_BASIC):
141964         (REG_SYNTAX_POSIX_EXTENDED, REG_SYNTAX_POSIX_MINIMAL_EXTENDED):
141965         (REG_DUP_MAX, REG_UNALLOCATED, REG_REALLOCATE, REG_FIXED):
141966         (REG_NREGS):
141967         Remove.  All uses replaced by the old RE_* names.
141968         (RE_BACKSLASH_ESCAPE_IN_LISTS):
141969         (RE_BK_PLUS_QM, RE_CHAR_CLASSES, RE_CONTEXT_INDEP_ANCHORS):
141970         (RE_CONTEXT_INDEP_OPS, RE_CONTEXT_INVALID_OPS):
141971         (RE_DOT_NEWLINE, RE_DOT_NOT_NULL, RE_HAT_LISTS_NOT_NEWLINE):
141972         (RE_INTERVALS, RE_LIMITED_OPS, RE_NEWLINE_ALT):
141973         (RE_NO_BK_BRACES, RE_NO_BK_PARENS, RE_NO_BK_REFS):
141974         (RE_NO_BK_VBAR, RE_NO_EMPTY_RANGES):
141975         (RE_UNMATCHED_RIGHT_PAREN_ORD, RE_NO_POSIX_BACKTRACKING):
141976         (RE_NO_GNU_OPS, RE_DEBUG, RE_INVALID_INTERVAL_ORD):
141977         (RE_IGNORE_CASE, RE_CARET_ANCHORS_HERE):
141978         (RE_CONTEXT_INVALID_DUP, RE_NO_SUB):
141979         Don't bother having these macros be independent of each others'
141980         values, since they no longer exist in the POSIX name space.
141982         Rename the following member names back to their old names,
141983         unless !__USE_GNU_REGEX.  All uses changed back.
141984         (buffer): Renamed from re_buffer.
141985         (allocated): Renamed from re_allocated.
141986         (used): Renamed from re_used.
141987         (syntax): Renamed from re_syntax.
141988         (fastmap): Renamed from re_fastmap.
141989         (translate): Renamed from re_translate.
141990         (can_be_null): Renamed from re_can_be_null.
141991         (regs_allocated): Renamed from re_regs_allocated.
141992         (fastmap_accurate): Renamed from re_fastmap_accurate.
141993         (no_sub): Renamed from re_no_sub.
141994         (not_bol): Renamed from re_not_bol.
141995         (not_eol): Renamed from re_not_eol.
141996         (newline_anchor): Renamed from re_newline_anchor.
141997         (num_regs): Renamed from rm_num_regs.
141998         (start): Renamed from rm_start.
141999         (end): Renamed from rm_end.
142001         (free_state): Move up a bit.
142003         * lib/regex_internal.h (inline) [__GNUC__ < 3 && defined _LIBC]:
142004         #define to be empty.
142005         (ASCII_CHARS): New macro, replacing all uses of 0x80 and/or SBC_MAX / 2
142006         when that is what is intended.
142007         (SBC_MAX): Define to UCHAR_MAX + 1, not 256.
142008         (__re_error_msgid, __re_error_msgid_idx): Remove decls; not needed.
142009         (MAX): New macro.
142010         (re_xmalloc, re_calloc, re_xrealloc, re_x2realloc): Remove.
142011         All uses changed back to re_malloc, etc.  It's now the caller's
142012         responsibility to check for overflow; all callers changed.
142013         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc, re_xnrealloc):
142014         (re_x2nrealloc): Remove.
142015         (free_state): Remove decl.
142017         * lib/regexc.c (regexec, re_match, re_search, re_match_2, re_search_2):
142018         (re_set_registers, re_exec):
142019         Use K&R-style defn.
142021         2006-01-31  Roland McGrath  <roland@redhat.com>
142023         * lib/regcomp.c (calc_eclosure_iter): Remove dead variables.
142024         Reported by Mike Frysinger <vapier@gentoo.org>.
142026         2006-01-15  Andreas Jaeger  <aj@suse.de>
142028         [BZ #1950]
142029         * lib/regex_internal.c (re_string_reconstruct): Adjust for
142030         build_wcs_upper_buffer change.
142031         (build_wcs_upper_buffer): Change return type.
142033         2005-12-10  Ulrich Drepper  <drepper@redhat.com>
142035         * lib/regex_internal.h: Include <stdint.h> if available.
142037         2005-12-06  Paolo Bonzini  <bonzini@gnu.org>
142039         * lib/regex_internal.h (SIZE_MAX): Provide a default definition.
142041         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
142043         * lib/regcomp.c: Adjust for changed secondary hash function.
142045         2005-09-30  Ulrich Drepper  <drepper@redhat.com>
142047         * lib/regex.h: Pretty printing.
142048         Clean up namespace a bit.
142050         2005-09-30  Jakub Jelinek  <jakub@redhat.com>
142052         * lib/regexec.c (update_cur_sifted_state, check_arrival,
142053         check_arrival_add_next_nodes): Avoid using uninitialized variable.
142055         2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
142056                     Ulrich Drepper  <drepper@redhat.com>
142058         [BZ #1302]
142059         * lib/regex_internal.h (bitset_t): Renamed from bitset.  All uses
142060         changed.
142061         (bitset_word_t): Renamed from bitset_word.  All uses changed.
142063         2005-09-22  Ulrich Drepper  <drepper@redhat.com>
142065         [BZ #281]
142066         * lib/regex.h: Define RE_TRANSLATE_TYPE as unsigned char *.
142067         * lib/regcomp.c: Remove unnecessary uses of
142068         unsigned RE_TRANSLATE_TYPE.
142069         * lib/regex_internal.h: Likewise.
142070         * lib/regex_internal.c: Likewise.
142071         * lib/regexec.c: Likewise.
142072         Based on a patch by Stepan Kasal <kasal@ucw.cz>.
142074         2005-09-07  Ulrich Drepper  <drepper@redhat.com>
142076         * lib/regexec.c (find_recover_state): Remove unnecessary
142077         initialization.
142078         (transit_state_bkref): Make DFA a const pointer.
142079         (get_subexp): Likewise.
142080         (check_arrival): Likewise.
142081         (update_cur_sifted_state): Likewise.
142082         (re_search_internal): Likewise.
142083         (prune_impossible_nodes): Likewise.
142084         (acquire_init_state_context): Likewise.
142085         (proceed_next_node): Likewise.
142086         (set_regs): Likewise.
142087         (free_fail_stack_return): Likewise.
142088         (check_arrival_expand_ecl): Mark DFA parameter as const.
142089         (check_arrival_expand_ecl_sub): Likewise.
142090         (check_subexp_limits): Likewise.
142091         (sub_epsilon_src_nodes):  Likewise.
142092         (add_epsilon_src_nodes):  Likewise.
142093         (merge_state_array): Likewise.
142094         (update_regs): Likewise.
142095         (build_trtable): Likewise.
142096         (sift_states_backward): Mark MCTX parameter as const.
142097         (build_sifted_states): Likewise.
142098         (update_cur_sifted_state): Likewise.
142099         (sift_states_mkref): Likewise.
142100         (check_arrival_expand_ecl): Mark eclosure as const.
142101         (check_dst_limits_calc_pos_1): Likewise.
142102         * lib/regex_internal.h (re_match_context_t): Make dfa a const
142103         pointer.
142105         2005-09-06  Ulrich Drepper  <drepper@redhat.com>
142107         * lib/regexec.c (merge_state_with_log): Define dfa as const pointer.
142108         (transit_state_sb): Likewise.
142109         (transit_state_mb): Likewise.
142110         (sift_states_iter_mb): Likewise.
142111         (check_arrival_add_next_nodes): Likewise.
142112         (check_node_accept_bytes): Change first parameter to pointer-to-const.
142113         [_LIBC] (re_search_2_stub): Use mempcpy.
142115         * lib/regex_internal.c (re_string_reconstruct): Avoid calling
142116         mbrtowc for very simple UTF-8 case.
142118         * lib/regex_internal.c (re_acquire_state): Make DFA pointer arg
142119         a pointer-to-const.
142120         (re_acquire_state_context): Likewise.
142121         * lib/regex_internal.h: Adjust prototypes.
142123         * lib/regex.c: Prevent using C++ compilers.
142125         * lib/regex_internal.c (re_acquire_state): Minor code rearrangement.
142126         (re_acquire_state_context): Likewise.
142128 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
142130         * modules/regex (Depends-on): Add ssize_t.
142132 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
142134         * m4/regex.m4 (gl_REGEX): Check for new glibc interface to
142135         translation table.
142137 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
142139         * doc/gnulib-tool.texi (Modified imports): pathname -> file name.
142141 2006-03-29  Mark D. Baushke  <mdb@gnu.org>
142142             Bruno Haible  <bruno@clisp.org>
142144         * lib/stdint_.h: On OpenBSD, don't redefine types already included in
142145         <sys/types.h> and <inttypes.h>.
142147 2006-03-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
142149         * m4/argz.m4 (gl_FUNC_ARGZ): If we define `error_t', also define
142150         `__error_t_defined', so argp.h will not typedef the former.
142152 2006-03-25  Paul Eggert  <eggert@cs.ucla.edu>
142154         * m4/regex.m4 (gl_REGEX): Don't insist on REG_SYNTAX_POSIX_EGREP,
142155         REG_SYNTAX_EMACS, and REG_IGNORE_CASE.  Settle for the traditional
142156         glibc names.  Even if glibc is changed to conform to POSIX, the
142157         traditional names will be available anyway, since regex depends on
142158         the extensions module.  Also, fix a longstanding typo in the
142159         implementation of Spencer ERE test #75 from grep 2.3.  Problems
142160         reported by Emanuele Giaquinta.  Also, change sense of cached
142161         variable, so that the message makes sense.
142163 2006-03-24  Simon Josefsson  <jas@extundo.com>
142165         * lib/base64.c: Fix problems reported by Eric Blake <ebb9@byu.net>,
142166         including some doc fixes.
142167         (base64_encode_alloc): Fix +1 bug on allocation failures.
142169 2006-03-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
142171         * lib/base64.c (base64_encode): Do not read past end of array with
142172         unsanitized input on systems with CHAR_BIT > 8.
142174 2006-03-24  Eric Blake  <ebb9@byu.net>
142176         * lib/time_r.c (copy_string_result): Remove, as it is no longer used.
142178 2006-03-22  Karl Berry  <karl@gnu.org>
142180         * config/srclist.txt (*setenv.[ch]): get from coreutils.
142181         * config/srclistvars.sh (COREUTILS): new var.
142183 2006-03-17  Jim Meyering  <jim@meyering.net>
142185         * m4/regex.m4 (gl_REGEX): Fix typo in last change:
142186         s/_REGEX_WIDE_OFFSETS/_REGEX_LARGE_OFFSETS/.
142188 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
142190         * m4/regex.m4 (gl_REGEX): Don't check for off_t, since the code
142191         no longer needs it.  Instead, check that regoff_t is as least
142192         as wide as ptrdiff_t.
142194         Don't define _REGEX_WIDE_OFFSETS unless using the included regex,
142195         so that our regex.h stays compatible with the installed regex.
142196         This is helpful for installers who configure --without-included-regex.
142197         Problem reported by Emanuele Giaquinta.
142199 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
142201         * lib/regex.h (regoff_t) [defined _REGEX_LARGE_OFFSETS]:
142202         Typedef to long int, not to off_, as POSIX will likely change
142203         in that direction.
142205 2006-03-15  Eric Blake  <ebb9@byu.net>
142207         * m4/dirfd.m4 (gl_FUNC_DIRFD): Use AC_REQUIRE for AC_HEADER_DIRENT.
142209 2006-03-13  Sergey Poznyakoff  <gray@gnu.org.ua>
142211         * lib/argp-help.c (validate_uparams): Fix typo
142212         * lib/argp-parse.c (argp_default_options): Consistently begin help
142213         messages with a lowercase letter.
142215 2006-03-11  Paul Eggert  <eggert@cs.ucla.edu>
142217         * lib/time_r.h (asctime_r, ctime_r): Remove.  These functions can
142218         overrun buffers and shouldn't be used (much as gets shouldn't be
142219         used).
142220         * lib/time_r.c (asctime_r, ctime_r): Likewise.
142222 2006-03-08  Simon Josefsson  <jas@extundo.com>
142224         * m4/gc-random.m4: Permit 'no' as variable values and fix warnings,
142225         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
142227 2006-03-08  Simon Josefsson  <jas@extundo.com>
142229         * m4/gc-random.m4: Call AC_CANONICAL_HOST and use $host_os instead of
142230         $target, suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
142232 2006-03-08  Simon Josefsson  <jas@extundo.com>
142234         * lib/gc-gnulib.c (randomize): Don't open files called 'no', they
142235         signal that configure disabled the device.
142237 2006-03-08  Simon Josefsson  <jas@extundo.com>
142239         * build-aux/maint.mk: Fix refresh-po, to handle no translated
142240         languages.
142242 2006-03-07  Simon Josefsson  <jas@extundo.com>
142244         * modules/getopt (Depends-on): Add unistd.
142246         * modules/unistd: New file.
142248 2006-03-07  Simon Josefsson  <jas@extundo.com>
142250         * modules/gc-random: New file.
142252 2006-03-07  Simon Josefsson  <jas@extundo.com>
142254         * m4/unistd_h.m4: New file.
142256 2006-03-07  Simon Josefsson  <jas@extundo.com>
142258         * m4/readline.m4 (gl_FUNC_READLINE): Rewrite the cached part of the
142259         test to be side-effect free by storing the result in the cache
142260         variable gl_cv_lib_readline, and moving the assignment of
142261         LIBREADLINE and LTLIBREADLINE outside the COMMANDS-TO-SET-IT.
142262         From Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
142264 2006-03-07  Simon Josefsson  <jas@extundo.com>
142266         * m4/gc-random.m4: New file, mostly from gc.m4.  Warn instead of
142267         error on missing devices (the functions will return an error).
142269         * m4/gc.m4: Move random stuff to gc-random.m4
142271 2006-03-07  Simon Josefsson  <jas@extundo.com>
142273         * lib/unistd_.h: New file.
142275 2006-03-07  Simon Josefsson  <jas@extundo.com>
142277         * lib/gc-libgcrypt.c, gc-gnulib.c: Use GC_USE_RANDOM.
142279 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
142281         * m4/unistd_h.m4 (gl_HEADER_UNISTD): Rename, to match modules file.
142282         Problem reported by Juan Manuel Guerrero.
142284 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
142286         * lib/c-stack.c: Include unistd.h unconditionally, since we now assume
142287         the unistd module.
142288         * lib/getlogin_r.c: Likewise.
142289         * lib/getlogin_r.h: Likewise.
142290         * lib/glob.c: Likewise.
142291         * lib/pagealign_alloc.c: Likewise.
142292         * lib/unistd_.h: Remove; no longer needed.
142294 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
142296         * MODULES.html.sh (Support for systems lacking POSIX:2001):
142297         Add unistd.
142298         * modules/c-stack (Depends-on): Add unistd.
142299         * modules/getlogin_r: Likewise.
142300         * modules/glob: Likewise.
142301         * modules/pagealign_alloc: Likewise.
142302         * modules/unistd (Files): Remove lib/unistd_.h.
142303         (EXTRA_DIST): Remove.
142304         (unistd.h): Create using 'echo' rather than 'cp', so that we don't
142305         need unistd_.h.
142306         (MOSTLYCLEANFILES): Remove unistd.h-t.
142308 2006-03-03  Simon Josefsson  <jas@extundo.com>
142310         * build-aux/maint.mk: Add several syntax checks from CoreUtils.
142312 2006-03-03  Simon Josefsson  <jas@extundo.com>
142314         * build-aux/maint.mk: Add refresh-po rule, based on ideas from
142315         libidn and bison.
142317 2006-03-03  Simon Josefsson  <jas@extundo.com>
142319         * build-aux/maint.mk: Add indent target.
142321 2006-03-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de> (tiny change)
142323         * m4/poll.m4 (gl_FUNC_POLL): If we deem poll(2) unacceptable, use
142324         our replacement poll.h in any case, to avoid a differing
142325         declaration from a system header.  Seen on AIX.
142327 2006-03-01  Simon Josefsson  <jas@extundo.com>
142329         * lib/readline.c: Fix typo, tiny patch from Stepan Kasal
142330         <kasal@ucw.cz>.
142332 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
142334         * modules/gettime (Depends-on): Add extensions module.
142335         * modules/nanosleep (Depends-on): Likewise.
142336         * modules/settime (Depends-on): Likewise.
142338 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
142340         * m4/clock_time.m4 (gl_CLOCK_TIME): Require gl_USE_SYSTEM_EXTENSIONS,
142341         not merely AC_GNU_SOURCE, for the benefit of Solaris 10 when compiled
142342         pedantically.
142343         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
142344         * m4/timespec.m4 (gl_TIMESPEC): Likewise.
142346         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use "=" with "test",
142347         not "==".  Reported by Ralf Wildenhues.
142349 2006-03-01  Karl Berry  <karl@gnu.org>
142351         * doc/Copyright/request-*: new files, synced from gnuorg.
142353 2006-03-01  Karl Berry  <karl@gnu.org>
142355         * config/srclist.txt (Copyright/*): new entries.
142357 2006-02-28  Simon Josefsson  <jas@extundo.com>
142359         * lib/getopt.c: Protect #include of unistd.h, for MSVS.
142361 2006-02-27  Simon Josefsson  <jas@extundo.com>
142363         * lib/base64.h: Indent #define's.  From Jim Meyering
142364         <jim@meyering.net>.
142366 2006-02-27  Jim Meyering  <jim@meyering.net>
142368         Revert the change of 2006-02-24, so these files can continue
142369         to be sync'd from gettext.
142370         * lib/mkdtemp.c, setenv.c, unsetenv.c: *Un*-normalize inclusion
142371         of `config.h'.
142373 2006-02-26  Paul Eggert  <eggert@cs.ucla.edu>
142375         * modules/intprops: New file.
142376         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
142377         Add intprops.
142378         * modules/getloadavg (Files): Remove lib/intprops.h.
142379         (Depends-on): Add intprops.
142380         * modules/human: Likewise.
142381         * modules/inttostr: Likewise.
142382         * modules/openat: Likewise.
142383         * modules/sig2str: Likewise.
142384         * modules/userspec: Likewise.
142385         * modules/utimecmp: Likewise.
142386         * modules/xnanosleep: Likewise.
142387         * modules/xstrtol: Likewise.
142389 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny changes)
142391         * modules/xstrtod: Omit xstrtod.h, xstrtod.c; they're in LIB_SOURCES.
142392         * modules/lock-tests (TESTS): Use $(EXEEXT).
142393         * modules/tls-tests: Likewise.
142394         * modules/argp-tests: Likewise.
142395         (check_PROGRAMS): New var, replacing...
142396         (noinst_PROGRAMS, test_argp_SOURCES): Remove.
142398 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
142400         * lib/mkdtemp.c, lib/setenv.c, lib/unsetenv.c: Normalize inclusion of
142401         `config.h'.
142403 2006-02-24  Paul Eggert  <eggert@cs.ucla.edu>
142405         * lib/glob.c: Say "invalid" rather than "illegal" in comments.
142407 2006-02-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
142409         Sync from coreutils.
142410         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Require gl_FUNC_LCHMOD and
142411         gl_CHDIR_SAFER.
142413 2006-02-22  Jim Meyering  <jim@meyering.net>
142415         Sync from coreutils.
142416         * m4/chdir-safer.m4: New file.
142418 2006-02-20  Paul Eggert  <eggert@cs.ucla.edu>
142420         * lib/getcwd.c (AT_FDCWD): Work around a bug in Solaris 9 and 10, where
142421         AT_FDCWD exceeds INT_MAX.
142422         * lib/openat.h (AT_FDCWD): Likewise.
142424 2006-02-17  Eric Blake  <address@hidden>
142426         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Fix caching error.
142428 2006-02-16  Simon Josefsson  <jas@extundo.com>
142430         * modules/getaddrinfo (Depends-on): Add sys_socket.
142432 2006-02-15  Simon Josefsson  <jas@extundo.com>
142434         * build-aux/maint.mk: Add dsyntax-check rule.
142436 2006-02-15  Eric Blake  <ebb9@byu.net>
142438         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Don't attempt using
142439         winsock2.h or ws2tcpip.h when sys/socket.h is present. Fixes
142440         'present but cannot compile' warnings on cygwin.
142441         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Use gl_HEADER_SYS_SOCKET.  Don't
142442         use ws2tcpip.h if sys/socket.h works.
142443         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Use gl_HEADER_SYS_SOCKET.
142444         (gl_GETADDRINFO): Don't use ws2tcpip.h when sys/socket.h is present.
142446 2006-02-14  Simon Josefsson  <jas@extundo.com>
142448         * modules/maintainer-makefile (Files): Rename.
142450         * build-aux/GNUmakefile: Rename Makefile.maint to maint.mk
142451         and (the local) Makefile.cfg to maint-cfg.mk.
142453         * build-aux/Makefile.maint, build-aux/maint.mk: Renamed the former
142454         to the latter.
142456         * modules/maintainer-makefile: New module.
142458         * build-aux/Makefile.maint: New file, from GNU CoreUtils, although
142459         severaly stripped to make it possible to build it up from scratch
142460         with reliable tests.
142462         * build-aux/GNUmakefile: New file, from GNU CoreUtils with some
142463         fixes to permit overriding the default actions when configure and
142464         makefile are not available.
142466 2006-02-14  Paul Eggert  <eggert@cs.ucla.edu>
142468         Sync from coreutils.
142469         * modules/lstat (Depends-on): Don't depend on xalloc.
142470         (License): Change from GPL to LGPL, since this is now simply a
142471         replacement for a libc function.
142473 2006-02-14  Jim Meyering  <jim@meyering.net>
142475         Sync from coreutils.
142477         Eliminate the unwelcome (albeit unlikely) possibility of xmalloc
142478         failure on deficient systems, and simplify gnulib lgpl dependencies.
142479         * lib/lstat.c (rpl_lstat): Rewrite to use stat() in place of the
142480         xmalloc/lstat combination.  Based on a patch from Bruno Haible.
142482         * lib/xalloc-die.c: Remove unused definition of N_.
142484 2006-02-14  Jim Meyering  <jim@meyering.net>
142486         Sync from coreutils.
142487         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Invoke
142488         AC_CHECK_FUNCS(getmntent) unconditionally so that tests of
142489         $ac_cv_func_getmntent (e.g., in gl_LIST_MOUNTED_FILE_SYSTEMS) need not
142490         double-quote uses of that variable, to accommodate the rare case in
142491         which getmntent is available in none of the libraries checked.  This
142492         happens at least on FreeBSD 5.0.
142494 2006-02-13  Simon Josefsson  <jas@extundo.com>
142496         * gnulib-tool (Usage): Fix --import, from
142497         karl@freefriends.org (Karl Berry).
142499 2006-02-13  Sergey Poznyakoff  <gray@gnu.org.ua>
142501         * lib/argp-fmtstream.c: Restore another bugfix lost on 2005-12-12
142503 2006-02-07  Sergey Poznyakoff  <gray@gnu.org.ua>
142505         * lib/argp-namefrob.h: Restore changes accidentally lost during the
142506         "autoupdate" on 2005-12-12.
142508 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
142510         * modules/closeout (Depends-on): Remove atexit.
142512 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
142514         * lib/closeout.c (close_stdout): Don't assume 'bool' converts nonzero
142515         ints to 0 or 1, as this isn't true for the stdbool.h substitute.
142517 2006-02-05  Paul Eggert  <eggert@cs.ucla.edu>
142519         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Don't #define
142520         __EXTENSIONS__ if this causes compilation to fail.  Problem
142521         reported by Nelson H. F. Beebe with Solaris 10 and Sun C 5.7
142522         c89 -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED.
142524 2006-01-27  Paul Eggert  <eggert@cs.ucla.edu>
142526         * lib/fnmatch.c (L_): Renamed from L, to work around a bug in
142527         Mac OS X 10.3.9 with GCC 3 reported by Claudio Fontana in
142528         <http://lists.gnu.org/r/bug-gnulib/2006-01/msg00074.html>.
142529         All uses changed.
142531 2006-01-26  Simon Josefsson  <jas@extundo.com>
142533         * lib/socket_.h: Set WINVER to 0x0501, to make sure getaddrinfo
142534         prototype is visible on mingw32.
142536         * lib/getaddrinfo.h: Define EAI_ADDRFAMILY and EAI_SYSTEM if not set,
142537         for mingw32.
142539         * lib/gai_strerror.c, getaddrinfo.h: Protect netdb.h #include (for
142540         mingw32).
142542 2006-01-26  Paul Eggert  <eggert@cs.ucla.edu>
142544         * lib/fts.c (diropen): Open with O_NOCTTY | O_NONBLOCK too.  Don't
142545         attempt to open for write; this always fails, at least on POSIX
142546         hosts.  This reinstates the 2006-01-09 change, which was
142547         inadvertently removed.
142549 2006-01-26  Bruno Haible  <bruno@clisp.org>
142551         * gnulib-tool (func_import): Use "trap 'exit $?' instead of "trap :".
142552         Reported by Paul Eggert.
142554 2006-01-26  Bruno Haible  <bruno@clisp.org>
142555             Paul Eggert  <eggert@cs.ucla.edu>
142557         * lib/stdbool_.h (_Bool)
142558         [(! (defined __cplusplus || defined __BEOS__)
142559           && !defined __GNUC__
142560           && !(defined __HP_cc || defined __xlc__
142561                || (defined __SUNPRO_C && (__SUNPRO_C < 0x550 || __STDC__ == 1))
142562                || defined __sgi))]:
142563         #define to signed char in these cases too; this simplifies
142564         the code (so that we don't have to worry about HP-UX, AIX, SunPRO,
142565         etc., separately) and makes it more conservative.
142567 2006-01-25  Simon Josefsson  <jas@extundo.com>
142569         * m4/getaddrinfo.m4: Look for getaddrinfo inside ws2tcip.h and
142570         -lws2_32.  Protect sys/socket.h and netdb.h #include's.  Include
142571         ws2tcpip.h with WINVER=0x0501.  All for mingw32.
142573 2006-01-25  Sergey Poznyakoff  <gray@gnu.org.ua>
142575         * lib/argp-namefrob.h: Bugfix. Remove stray #
142577 2006-01-25  Paul Eggert  <eggert@cs.ucla.edu>
142579         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for xlc bug if __GCC__ too,
142580         so that we test the test.
142581         Check for yet another HP-UX cc bug involving *bool |= bool.
142583 2006-01-25  Karl Berry  <karl@gnu.org>
142585         * config/srclist.txt (vasnprintf.c): sync lost.
142587 2006-01-25  Jim Meyering  <jim@meyering.net>
142589         Sync from the stable (b5) branch of coreutils:
142591         * lib/fts.c (fts_children): Don't let close() clobber errno from
142592         failed fchdir().
142594         * lib/fts.c (fts_stat): When following a symlink-to-directory,
142595         don't necessarily interpret stat-fails+lstat-succeeds as indicating
142596         a dangling symlink.  That can also happen at least for ELOOP.
142597         The fix: return FTS_SLNONE only when the stat errno is ENOENT.
142598         FYI, this bug predates the inclusion of fts.c in coreutils.
142600         * lib/fts.c (fts_open): Put new maxarglen declaration and uses
142601         in their own block, so pre-c99 compilers don't object.
142603         Avoid the double-free (first in fts_read, second in fts_close) that
142604         would occur when an `active' directory is made inaccessible (e.g.,
142605         via chmod a-x) during a traversal.
142606         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
142607         before returning.  Reproduce this failure by
142608         mkdir -p a/b; cd a; chmod a-x . b
142609         Reported by Stavros Passas.
142611 2006-01-25  Jim Meyering  <jim@meyering.net>
142613         * lib/fileblocks.c: Remove more useless parentheses.
142614         * lib/readutmp.h: Likewise.
142616 2006-01-25  Bruno Haible  <bruno@clisp.org>
142618         * lib/stdbool_.h (_Bool) [IRIX cc]: Define as 'signed char', to avoid
142619         warnings.
142620         Reported by Paul Eggert.
142622 2006-01-25  Bruno Haible  <bruno@clisp.org>
142624         * gnulib-tool (func_import): Use "trap :" instead of "trap -" to get
142625         rid of a trap command. For Solaris sh.
142626         Reported by Mark D. Baushke <mdb@gnu.org>.
142628 2006-01-24  Simon Josefsson  <jas@extundo.com>
142630         * lib/socket_.h (SHUT_WR, SHUT_RDWR): Don't hardcode, suggested by
142631         Bruno.
142633 2006-01-24  Karl Berry  <karl@gnu.org>
142635         * config/srclist.txt (argp-namefrob.h): sync lost.
142637 2006-01-24  Jim Meyering  <jim@meyering.net>
142639         * modules/openat (Files): Add lib/intprops.h.
142640         From Mark D. Baushke.
142642 2006-01-24  Jim Meyering  <jim@meyering.net>
142644         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBSOURCES([intprops.h]).
142645         Reported by Mark D. Baushke.
142647 2006-01-24  Jim Meyering  <jim@meyering.net>
142649         * lib/socket_.h: Remove useless parentheses in uses of cpp `defined'.
142651 2006-01-24  Bruno Haible  <bruno@clisp.org>
142653         * modules/strnlen (Maintainer): Change from glibc to all.
142655 2006-01-24  Bruno Haible  <bruno@clisp.org>
142657         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for IBM and HP-UX bugs.
142658         Patch by Paul Eggert.
142660 2006-01-24  Bruno Haible  <bruno@clisp.org>
142662         * lib/stdbool_.h (_Bool) [__cplusplus]: Don't define if the compiler
142663         already has it.
142664         Report and patch by Albert Chin-A-Young  <china@thewrittenword.com> on
142665         2005-11-26.
142667         * lib/stdbool_.h (_Bool) [HP-UX cc, AIX cc,xlc]: Define as
142668         'signed char' to avoid problems with the built-in _Bool type.
142669         Reported by Paul Eggert on 2005-11-26.
142671 2006-01-24  Bruno Haible  <bruno@clisp.org>
142673         * gnulib-tool (func_import): Avoid constructing complicated sed
142674         expressions inside backquote.
142675         Report and solution by Mark D. Baushke <mdb@gnu.org>.
142677 2006-01-23  Ulrich Drepper  <drepper@redhat.com>
142679         These changes imported from libc.
142680         * lib/getopt.c: Use __fxprintf instead of inline stream orientation
142681         test and two separate function calls.
142682         * lib/strndup.c (__strndup): Add libc_hidden_def.
142684 2006-01-23  Simon Josefsson  <jas@extundo.com>
142686         * modules/lock-tests: Use check_PROGRAMS instead of noinst_PROGRAMS.
142687         Remove the test_*_SOURCES variable: automake infers it by default.
142688         * modules/tls-tests: Likewise.
142690 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
142692         Work around porting bugs reported by Dieter in
142693         <http://lists.gnu.org/r/bug-bison/2006-01/msg00049.html>.
142694         * lib/getopt.c (_NOPROTO): Remove; no longer needed.
142695         Include <stdlib.h> and <unistd.h> in all environments; it's safe now.
142696         Include "getopt.h" first, to check interface.
142697         (getenv): Declare only if defined HAVE_DECL_GETENV &&
142698         !HAVE_DECL_GETENV.
142699         * lib/strndup.c [!_LIBC]: Include "strndup.h" to get prototype.
142700         (__strndup): Revert to K&R-style function dfns, the glibc style.
142701         * lib/strnlen.c: Don't claim it's taken from glibc; it's not.
142702         (strnlen, __strnlen): Remove #defines and #undefs; not needed.
142703         Include strnlen.h first, to get prototype properly.
142704         (strnlen): Renamed from __strnlen.
142705         Remove weak alias.
142707 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
142709         * m4/getopt.m4 (gl_PREREQ_GETOPT): Check for getenv decl.
142711 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
142713         * config/srclist.txt: Adjust to reflect glibc reorganization.
142714         This affects only comments.
142716 2006-01-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
142718          * gnulib-tool, build-aux/csharpcomp.sh.in: Do not pass `-q' to mktemp.
142719          Reported by Bruce Korb <bkorb@gnu.org>.
142721 2006-01-22  Paul Eggert  <eggert@cs.ucla.edu>
142723         * lib/quotearg.c (quotearg_buffer_restyled): Add "default: break;"
142724         to pacify gcc -Wswitch-default.
142726 2006-01-22  Bruno Haible  <bruno@clisp.org>
142728         * lib/vasnprintf.c (VASNPRINTF): In the computation of the size of the
142729         temporary buffer for sprintf, take into account the precision also
142730         for 'd', 'i', 'u', 'o', 'x', 'X'.
142732 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
142734         * modules/argp-tests: New module
142735         * tests/test-argp.c: New file
142736         * tests/test-argp-2.sh: New file
142738 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
142740         * lib/argp-help.c (usage_long_opt): Do not print DOC options.
142741         (__argp_base_name): Removed
142742         * lib/argp-namefrob.h (__argp_basename): Removed definition. Was a
142743         typo.
142744         (__argp_base_name): Provide macro definition or extern declaration
142745         depending on the configuration
142747 2006-01-20  Simon Josefsson  <jas@extundo.com>
142749         * modules/inet_ntop (Depends-on): Depend on sys_socket.
142751 2006-01-20  Simon Josefsson  <jas@extundo.com>
142753         * lib/inet_ntop.h: Unconditionally include sys/socket.h.
142755 2006-01-20  Paul Eggert  <eggert@cs.ucla.edu>
142757         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Use -Wl,-z,ignore
142758         rather than -Xlinker -z -Xlinker ignore, as it's more portable.
142759         Suggested by Bruno Haible.
142761 2006-01-20  Karl Berry  <karl@gnu.org>
142763         * config/srclist.txt (argp-fmtstream.h, localcharset.c): comment out
142764         until changes propagate, I guess.
142766 2006-01-19  Simon Josefsson  <jas@extundo.com>
142768         * m4/socklen.m4: Look in ws2tcpip.h too, for mingw32.
142770 2006-01-19  Simon Josefsson  <jas@extundo.com>
142772         * lib/socket_.h: Map SHUT_RD, SHUT_WR, SHUT_RDWR correctly.
142774 2006-01-19  Simon Josefsson  <jas@extundo.com>
142776         * gnulib-tool: Set check_PROGRAMS.
142778         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
142779         modules/des-tests, modules/gc-arcfour-tests,
142780         modules/gc-arctwo-tests, modules/gc-des-tests,
142781         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
142782         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
142783         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
142784         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
142785         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
142786         modules/md5-tests, modules/readline, modules/rijndael-tests: Use
142787         check_PROGRAMS instead of noinst_PROGRAMS to be able to remove
142788         test_*_SOURCES.
142790 2006-01-18  Simon Josefsson  <jas@extundo.com>
142792         * modules/socklen (Depends-on): Depend on sys_socket.
142794 2006-01-18  Simon Josefsson  <jas@extundo.com>
142796         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
142797         modules/des-tests, modules/gc-arcfour-tests,
142798         modules/gc-arctwo-tests, modules/gc-des-tests,
142799         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
142800         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
142801         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
142802         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
142803         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
142804         modules/md5-tests, modules/readline, modules/rijndael-tests: Add
142805         $(EXEEXT) to automake TESTS variable, for mingw32.
142807 2006-01-17  Simon Josefsson  <jas@extundo.com>
142809         * modules/socklen (Include): Need sys/socket.h.
142811 2006-01-17  Bruno Haible  <bruno@clisp.org>
142813         * modules/ssize_t (Include): Add <sys/types.h>.
142815 2006-01-16  Paul Eggert  <eggert@cs.ucla.edu>
142817         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Don't use ldd, as
142818         it's not portable and it doesn't work with cross-compiles.
142819         Problem reported by Bruno Haible.  Fix missing-$ typo in
142820         'test "gl_cv_ignore_unused_libraries" ...' that prevented
142821         -zignore from being used with Sun's C compiler.
142823 2006-01-12  Simon Josefsson  <jas@extundo.com>
142825         * lib/base64.c: Fix warning, reported by Bruno Haible
142826         <bruno@clisp.org> and patch by Paul Eggert <eggert@CS.UCLA.EDU>.
142828 2006-01-12  Bruno Haible  <bruno@clisp.org>
142830         * modules/ldd: New file.
142831         * build-aux/ldd.sh.in: New file.
142832         * MODULES.html.sh (Support for building libraries and executables): Add
142833         ldd.
142835 2006-01-12  Bruno Haible  <bruno@clisp.org>
142837         * m4/ldd.m4: New file.
142839 2006-01-12  Bruno Haible  <bruno@clisp.org>
142841         * gnulib-tool (func_import, func_create_testdir): Don't go into an
142842         endless loop while replacing $auxdir with build-aux.
142844 2006-01-11  Simon Josefsson  <jas@extundo.com>
142846         * lib/stdint_.h (SIZE_MAX): Add missing (.
142848 2006-01-11  Paul Eggert  <eggert@cs.ucla.edu>
142850         Sync from coreutils.
142851         * lib/md5.c: Fix commentary typos.
142852         (alignof, UNALIGNED_P): No need for a GCC-specific version.
142853         * lib/md5.h (__attribute__): Remove; unused.
142854         * lib/sha1.c: Fix commentary to match md5 better.
142855         * lib/sha1.h (struct sha1_ctx): Use a word buffer, not a byte buffer,
142856         so that we don't need to worry about alignment.  All uses changed.
142857         This merges the 2005-10-28 md5 change into sha1.
142859 2006-01-11  Jim Meyering  <jim@meyering.net>
142861         Sync from coreutils.
142862         * lib/md5.c (OP): Fix spacing.
142864 2006-01-11  Bruno Haible  <bruno@clisp.org>
142866         Ensure automatic ordering between gl_LOCK and gl_ARGP.
142867         * m4/lock.m4 (gl_LOCK_BODY): Renamed from gl_LOCK.
142868         (gl_LOCK): New macro, requiring gl_LOCK_BODY.
142870 2006-01-11  Bruno Haible  <bruno@clisp.org>
142872         Ensure automatic ordering between gl_LOCK and gl_ARGP.
142873         * gnulib-tool (func_import, func_create_testdir): Put gl_LOCK into
142874         the "early" section as well.
142876 2006-01-11  Bruno Haible  <bruno@clisp.org>
142878         Avoid "ar: no archive members specified" error on MacOS X.
142879         * gnulib-tool (func_modules_add_dummy): New function.
142880         (func_import, func_create_testdir): Invoke it.
142882 2006-01-11  Bruno Haible  <bruno@clisp.org>
142884         * gnulib-tool (func_import, func_create_testdir): Replace build-aux
142885         with $auxdir in AC_CONFIG_FILES statements.
142887 2006-01-11  Bruno Haible  <bruno@clisp.org>
142889         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
142890         Initialize also noinst_HEADERS to empty.
142892 2006-01-11  Bruno Haible  <bruno@clisp.org>
142894         * gnulib-tool (AUTOMAKEPATH, AUTOCONF, ACLOCAL, AUTOMAKE): New
142895         variables.
142896         (func_create_megatestdir): Call aclocal, autoconf, automake here, not
142897         autoreconf.
142899 2006-01-11  Bruno Haible  <bruno@clisp.org>
142901         * gnulib-tool (AUTOCONF, ACLOCAL, AUTOMAKE, AUTORECONF): Make
142902         overridable by the user.
142903         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
142905 2006-01-10  Simon Josefsson  <jas@extundo.com>
142907         * modules/sys_socket: New file.
142909 2006-01-10  Simon Josefsson  <jas@extundo.com>
142911         * m4/sys_socket_h.m4: New file.
142913 2006-01-10  Simon Josefsson  <jas@extundo.com>
142915         * lib/socket_.h: New file.
142917 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
142919         * modules/readutmp (Maintainer): Add myself.
142921 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
142923         * m4/memcoll.m4 (gl_MEMCOLL): Don't require AC_FUNC_MEMCMP, undoing
142924         the 2002-12-31 change.  Problem and fix reported by Bruno Haible.
142925         People who are still concerned with buggy memcmp implementations
142926         can invoke gl_FUNC_MEMCMP themselves.
142928 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
142930         * lib/regex_internal.h (BITSET_WORD_BITS):
142931         Work around a bug in 64-bit PGC (before version 6.1-2), where the
142932         preprocessor mishandles large unsigned values as if they were signed.
142933         Problem reported by Claudio Fontana in
142934         <http://lists.gnu.org/r/bug-gnulib/2005-12/msg00061.html>.
142936 2006-01-10  Jim Meyering  <jim@meyering.net>
142938         Avoid the double-free (first in fts_read, second in fts_close) that
142939         would occur when an `active' directory is made inaccessible (e.g.,
142940         via chmod a-x) during a traversal.
142941         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
142942         before returning.  Reproduce this failure by
142943         mkdir -p a/b; cd a; chmod a-x . b
142944         Reported by Stavros Passas.
142946         Sync from coreutils.
142947         * lib/sha1.c: Tweak grammar in a comment.
142949 2006-01-10  Jim Meyering  <jim@meyering.net>
142951         * m4/fpending.m4: Also include <stdio.h>, for Dragonfly.
142952         Patch by Joerg Sonnenberger.
142954 2006-01-10  Bruno Haible  <bruno@clisp.org>
142956         * modules/readutmp: Depend on module free.
142957         * modules/strtok_r: Depend on module restrict.
142959 2006-01-10  Bruno Haible  <bruno@clisp.org>
142961         * modules/gettext (configure.ac): Add an invocation of
142962         AM_GNU_GETTEXT_VERSION. Needed since autoreconf is used by gnulib-tool.
142964 2006-01-10  Bruno Haible  <bruno@clisp.org>
142966         * m4/localcharset.m4 (gl_LOCALCHARSET): Also test for getc_unlocked.
142967         Reported by Werner Lemberg <wl@gnu.org>.
142969 2006-01-10  Bruno Haible  <bruno@clisp.org>
142971         * lib/localcharset.c: Update from GNU gettext.
142973 2006-01-10  Bruno Haible  <bruno@clisp.org>
142975         * lib/argp.h (__const): Remove macro. Use const instead.
142976         * lib/argp-fmtstream.h (__const): Likewise.
142977         * lib/glob_.h (__const): Remove macro.
142978         * lib/glob-libc.h: Use const instead of __const.
142980 2006-01-10  Bruno Haible  <bruno@clisp.org>
142982         * gnulib-tool (func_emit_tests_Makefile_am): Emit an empty SUBDIR
142983         variable.
142984         Needed to avoid an automake error regarding the 'gettext' module.
142986 2006-01-09  Simon Josefsson  <jas@extundo.com>
142988         * modules/inet_ntop (Depends-on): Add restrict.
142990 2006-01-09  Simon Josefsson  <jas@extundo.com>
142992         * modules/gc-rijndael-tests (License): Put under LGPL.
142994         * modules/gc-des-tests (License): Likewise.
142996         * modules/gc-arcfour-tests (License): Likewise.
142998         * modules/gc-arctwo-tests (License): Likewise.
143000         * modules/gc-pbkdf2-sha1-tests (License): Likewise.
143002         * modules/gc-hmac-sha1-tests (Files): Likewise.
143004         * modules/gc-hmac-md5-tests (License): Likewise.
143006         * modules/gc-sha1-tests (License): Likewise.
143008         * modules/gc-md5-tests (License): Likewise.
143010         * modules/gc-md4-tests (License): Likewise.
143012         * modules/gc-md2-tests (License): Likewise.
143014         * modules/gc-tests (License): Likewise.
143016         * modules/des-tests (License): Likewise.
143018         * modules/md4-tests (License): Likewise.
143020         * modules/md2-tests (License): Likewise.
143022 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
143024         Sync from coreutils:
143026         * MODULES.html.sh (build_lib): New section, with new lib-ignore module.
143027         * modules/lib-ignore: New file.
143028         * modules/mkdir-p (Files): Add chdir-safer.c, chdir-safer.h, lchmod.h,
143029         chdir-safer.m4, lchmod.m4.
143030         * modules/openat: Add mkdirat.c, openat-priv.h.
143032 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
143034         Sync from coreutils.
143035         * m4/lib-ignore.m4: New file.
143036         * m4/lchmod.m4: New file.
143038 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
143040         Sync from coreutils.
143041         * lib/chdir-long.c (cdb_free): Don't bother trying to open directory
143042         for write access: POSIX says that must fail.
143043         * lib/fts.c (diropen): Likewise.
143044         * lib/save-cwd.c (save_cwd): Likewise.
143045         * lib/chdir-long.c (cdb_free): Open with O_NOCTTY | O_NONBLOCK as
143046         well, for minor improvements on hosts that lack O_DIRECTORY.
143047         * lib/chown.c (rpl_chown) [CHOWN_MODIFIES_SYMLINK]:
143048         Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
143049         Fall back on chown if open failed with EACCES.
143051         * lib/gettime.c (gettime) [!defined OK_TO_USE_1S_CLOCK]:
143052         Report an error at compile-time if only a 1-second nominal clock
143053         resolution is found.
143055         * lib/lchmod.h: New file.
143056         * lib/mkdir-p.c: Include lchmod.h, lchown.h.
143057         (make_dir_parents): Use lchown rather than chown, and
143058         lchmod rather than chmod.
143060         * lib/mountlist.c (ME_DUMMY): "none" and "proc" file systems are
143061         dummies too.  Problem with "none" reported by Bob Proulx.  Problem with
143062         "proc" reported by n0dalus.
143064         * lib/mountlist.c: Include <limits.h>.
143065         (dev_from_mount_options)
143066         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]:
143067         New function.  It no longer assumes "dev=" has the System V meaning
143068         on Linux (since it doesn't).  It also parses "dev=" more carefully.
143069         (read_file_system_list)
143070         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]: Use it.
143071         MOUNTED_GETMNTENT2 is new here; the code didn't used to look for
143072         dev= in that case.
143074         * lib/posixtm.h (PDS_PRE_2000): New macro.
143075         * lib/posixtm.c (year): Arg is now syntax_bits rather than
143076         allow_century.  All usages changed.  Reject dates outside the range
143077         1969-1999 if PDS_PRE_2000 is used.
143079 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
143081         Sync from coreutils.
143082         * doc/getdate.texi (General date syntax): Invalid dates are rejected.
143083         (Time of day items): Mention the possibility of leap seconds.
143084         Problem reported by Dr. David Alan Gilbert.
143086 2006-01-09  Jim Meyering  <jim@meyering.net>
143088         Sync from coreutils.
143090         * lib/version-etc.c (COPYRIGHT_YEAR): Update to 2006.
143092         * lib/chdir-safer.h, lib/chdir-safer.c: New files.
143094         * lib/modechange.c (mode_compile): Reject an invalid mode string
143095         that starts with an octal digit.  From Andreas Gruenbacher.
143097         * lib/openat.c: Include "fcntl--.h" and "unistd--.h", to map open
143098         and dup to open_safer and dup_safer, respectively.
143099         (openat_permissive): Fix typo in comment.
143101         * lib/openat.c: Don't include <stdlib.h>, <unistd.h>, <fcntl.h>,
143102         "gettext.h"; either no longer needed or are guaranteed by openat.h.
143103         (_): Remove; no longer needed.
143104         (openat): Renamed from rpl_openat; no need for rpl_openat
143105         since openat.h renames openat for us.
143106         Replace most of the body with a call to openat_permissive,
143107         to avoid duplicate code.
143108         Port to (probably hypothetical) environments were mode_t is
143109         wider than int.
143110         (openat_permissive): Require mode arg, so that we can check
143111         types better.  Put it just after flags.  Change cwd failure
143112         indicator from pointer-to-bool to pointer-to-errno-value.
143113         All callers changed.
143114         Invoke openat_save_fail and/or openat_restore_fail if
143115         cwd_errno is null, so that openat can call us.
143116         (openat_permissive, fdopendir, fstatat, unlinkat):
143117         Simplify errno handling to avoid some duplicate code,
143118         as it's OK to set errno on success.
143119         * lib/openat.h: Revamp code so that function macros depend on
143120         __OPENAT_PREFIX only, not also on AT_FDCWD.
143121         (openat_ro): Remove.  Caller changed to use openat_permissive.
143122         (openat_permissive): Now a macro, if not a function.
143123         (openat_restore_fail, openat_save_fail): Now always functions,
143124         since mkdirat needs them even if __OPENAT_PREFIX is defined.
143126         * lib/openat-priv.h: New file, defining macros used by mkdirat.c
143127         and openat.c.
143128         * lib/mkdirat.c: Include openat-priv.h.
143129         Remove definitions of macros defined therein.
143130         * lib/openat.c: Likewise.
143132         * lib/mkdirat.c (mkdirat): New file and function.
143133         * lib/openat.h (mkdirat): Declare.
143135         * lib/openat.c (fdopendir): Don't change errno when returning non-NULL.
143137         * lib/openat.h (openat_permissive): Declare.
143138         (openat_ro): Define.
143140         * lib/openat.c (EXPECTED_ERRNO): New macro.
143141         (openat_permissive): New function -- used in remove.c rewrite.
143142         (all functions): Set errno just before returning, only if there
143143         was an actual failure.
143144         Use EXPECTED_ERRNO rather than comparing against only ENOTDIR.
143146         Emulate openat-family functions using Linux's procfs, if possible.
143147         Idea and some code based on Ulrich Drepper's glibc changes.
143149         * lib/openat.c: (BUILD_PROC_NAME): New macro.
143150         Include <stdio.h>, <string.h>, "alloca.h" and "intprops.h".
143151         (rpl_openat): Emulate by trying to open /proc/self/fd/%d/%s,
143152         before falling back on save_cwd and restore_cwd.
143153         (fdopendir, fstatat, unlinkat): Likewise.
143155         * lib/openat.c (fstatat, unlinkat): Perform the syscall directly,
143156         skipping the save_cwd...restore_cwd overhead, if FILE is absolute.
143158         * lib/openat.c (rpl_openat): Use the promoted type (int), not mode_t,
143159         as second argument to va_arg.  Otherwise, some versions of gcc
143160         warn that `if this code is reached, the program will abort'.
143162 2006-01-09  Jim Meyering  <jim@meyering.net>
143164         Sync from coreutils.
143165         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile mkdirat.c.
143166         Require openat-priv.h.
143168 2006-01-09  Bruno Haible  <bruno@clisp.org>
143170         * modules/strnlen (Include): Use strnlen.h.
143172 2006-01-09  Bruno Haible  <bruno@clisp.org>
143174         * m4/stdint.m4 (gl_STDINT_H): Also test for <sys/bitypes.h>.
143176 2006-01-09  Bruno Haible  <bruno@clisp.org>
143178         * lib/sysexit_.h (EX_OK): New macro.
143179         Suggested by Martin Lambers <marlam@marlam.de>.
143181 2006-01-09  Bruno Haible  <bruno@clisp.org>
143183         * lib/stdint_.h: On Linux libc4 and libc5, include <sys/bitypes.h> and
143184         don't define _STDINT_H_NEED_SIGNED_INT_TYPES.
143186 2006-01-09  Bruno Haible  <bruno@clisp.org>
143188         * lib/stdint_.h (SIZE_MAX): Write the value without involving negative
143189         numbers.
143191 2006-01-09  Bruno Haible  <bruno@clisp.org>
143193         * lib/javacomp.sh.in: Move to ../build-aux/javacomp.sh.in.
143194         * lib/javaexec.sh.in: Move to ../build-aux/javaexec.sh.in.
143195         * lib/csharpcomp.sh.in: Move to ../build-aux/csharpcomp.sh.in.
143196         * lib/csharpexec.sh.in: Move to ../build-aux/csharpexec.sh.in.
143198 2006-01-09  Bruno Haible  <bruno@clisp.org>
143200         * build-aux/javacomp.sh.in: New file, moved from lib/.
143201         * modules/javacomp-script (Files): Update.
143202         (configure.ac): Add AC_CONFIG_FILES invocation.
143203         (EXTRA_DIST): Remove variable.
143205         * build-aux/javaexec.sh.in: New file, moved from lib/.
143206         * modules/javaexec (Files): Update.
143207         (configure.ac): Add AC_CONFIG_FILES invocation.
143208         (EXTRA_DIST): Remove javaexec.sh.in.
143210         * build-aux/csharpcomp.sh.in: New file, moved from lib/.
143211         * modules/csharpcomp-script (Files): Update.
143212         (configure.ac): Add AC_CONFIG_FILES invocation.
143213         (EXTRA_DIST): Remove variable.
143215         * build-aux/csharpexec.sh.in: New file, moved from lib/.
143216         * modules/csharpexec (Files): Update.
143217         (configure.ac): Add AC_CONFIG_FILES invocation.
143218         (EXTRA_DIST): Remove csharpexec.sh.in.
143220 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
143222         Sync from coreutils.
143224         Add POSIX ACL support
143225         * lib/acl.h (copy_acl, set_acl): Add declarations.
143226         * lib/acl.c (acl_entries): Add fallback implementation for POSIX ACL
143227         systems other than Linux.
143228         (chmod_or_fchmod): New function: use fchmod when possible,
143229         and chmod otherwise.
143230         (file_has_acl): Add a POSIX ACL implementation, with a
143231         Linux-specific subcase.
143232         (copy_acl): Add: copy an acl and S_ISUID, S_ISGID, and
143233         S_ISVTX from one file to another.  Fall back to fchmod/chmod when
143234         acls are unsupported.
143235         (set_acl): Add: set a file's acl and S_ISUID, S_ISGID, and
143236         S_ISVTX to a defined value.  Fall back to fchmod/chmod when acls
143237         are unsupported.
143239 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
143241         Sync from coreutils.
143242         * m4/acl.m4 (AC_FUNC_ACL): Add POSIX ACL and Linux-specific acl tests.
143244 2006-01-07  Bruno Haible  <bruno@clisp.org>
143246         * gnulib-tool (func_import): Add an AC_PROG_RANLIB dependency to
143247         gl_EARLY.
143249 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
143251         * lib/strftime.c (tzname): Don't declare if it is already #defined.
143252         Problem reported for Mingw by Mark Junker.
143254 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
143256         * README: Gnulib normally doesn't generate a tarball.
143258 2006-01-03  Paul Eggert  <eggert@cs.ucla.edu>
143260         * lib/xtime.h (xtime_make, xtime_nonnegative_nsec, xtime_nsec): Use
143261         long int, not int, for nanosecond counts, so that people who are
143262         used to POSIX struct timespec won't be surprised.  Reported by Jim
143263         Meyering.
143265 2005-12-28  Bruno Haible  <bruno@clisp.org>
143267         * build-aux/config.rpath: Update from GNU gettext.
143269 2005-12-16  Jim Meyering  <jim@meyering.net>
143271         * modules/fprintftime: New module.
143272         * MODULES.html.sh (Date and time <time.h>): Add fprintftime.
143274 2005-12-16  Jim Meyering  <jim@meyering.net>
143276         * m4/fprintftime.m4: New file.
143278 2005-12-16  Jim Meyering  <jim@meyering.net>
143280         * lib/fprintftime.c, lib/fprintftime.h: New files.
143282 2005-12-15  Simon Josefsson  <jas@extundo.com>
143284         * modules/socklen (configure.ac): Fix M4 macro name, to align with
143285         new m4/socklen.m4.
143287 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
143289         * m4/argp.m4: Define HAVE_DECL_PROGRAM_INVOCATION_NAME and
143290         HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
143292 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
143294         * lib/argp-fmtstream.c (__argp_fmtstream_update): Fix coredump
143295         * lib/argp-help.c (fill_in_uparams): Check if the constructed
143296         struct uparams is valid. Fall back to the default values if it is
143297         not.
143299 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
143301         * modules/argp (Files): Add argp-pin.c
143302         (Depends-on): dirname
143303         (lib_SOURCES): Add argp-pin.c
143305 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
143307         * m4/argp.m4:  Check if program_invocation_name and
143308         program_invocation_short_name are declared and define appropriate
143309         macros if they are not.
143311 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
143313         * lib/argp-help.c (__argp_base_name): New function
143314         (__argp_short_program_name): Rewrite using __argp_base_name
143315         * lib/argp-namefrob.h: Define program_invocation_name and
143316         program_invocation_short_name if requested
143317         (__argp_base_name): Add prototype
143318         * lib/argp-parse.c (argp_def): Use gettext wrappers
143319         (argp_default_parser): Use __argp_base_name
143320         * lib/argp-pin.c: New file. Defines program_invocation_name and
143321         program_invocation_short_name on systems that lack them.
143323 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
143325         * m4/stat-time.m4 (gl_STAT_TIME): Add check for
143326         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
143327         porting problem reported by Georg Schwarz in
143328         <http://lists.gnu.org/r/bug-coreutils/2005-12/msg00083.html>.
143330 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
143332         * lib/stat-time.h (STATE_TIMESPEC, STAT_TIMESPEC_NS): Add check for
143333         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
143334         porting problem reported by Georg Schwarz in
143335         <http://lists.gnu.org/r/bug-coreutils/2005-12/msg00083.html>.
143337 2005-12-05  Bruno Haible  <bruno@clisp.org>
143339         * lib/csharpcomp.sh.in (options_csc): For -l option, add a .dll suffix.
143340         * lib/csharpcomp.c (compile_csharp_using_sscli): Likewise.
143341         Reported by Mark Junker <mjscod@gmx.de>.
143343 2005-12-02  Paul Eggert  <eggert@cs.ucla.edu>
143345         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Renamed from gl_SOCKLEN_T.
143346         Use implementation from Albert Chin, with some
143347         comments/corrections by Stepan Kasal and myself.
143349 2005-12-02  Bruno Haible  <bruno@clisp.org>
143351         * gnulib-tool (func_import): Accept GPLed build tool modules when
143352         --lgpl is given.
143353         * modules/csharpcomp-script: New file.
143354         * modules/csharpcomp: Depend on it.
143355         * modules/javacomp-script: New file.
143356         * modules/javacomp: Depend on it.
143357         Suggested by Simon Josefsson.
143359 2005-12-01  Paul Eggert  <eggert@cs.ucla.edu>
143361         * m4/regex.m4 (gl_REGEX): Check whether off_t can be used in a switch
143362         statement, to work around an HP-UX 10.20 compiler bug reported by
143363         Peter O'Gorman.
143365 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
143367         * modules/savedir (Depends-on): Add openat.
143369 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
143371         * lib/stdint_.h (intmax_t) [defined intmax_t]: Do not declare.
143372         (uintmax_t) [defined uintmax_t]: Do not declare.
143373         (SIZE_MAX) [defined SIZE_MAX]: Do not define.
143374         This works around a problem if intmax_t.m4 and/or uintmax_t.m4
143375         and/or size_max.m4 are also used.  Problem reported by Mark D. Baushke.
143376         (SIZE_MAX): Define to ((size_t) -1), not (~(size_t)0), for the
143377         sake of portability to weird hosts that C allows (though we don't
143378         know of any practical examples).
143380         * lib/savedir.h (fdsavedir): New decl.
143381         * lib/savedir.c (fdsavedir, savedirstream): New functions; the latter
143382         contains most of the former guts of savedir.
143383         (savedir): Use savedirstream.
143384         Include "openat.h".
143386 2005-11-25  Paul Eggert  <eggert@cs.ucla.edu>
143388         * modules/obstack (Files): Add m4/ulonglong.m4.
143389         Problem reported by Davide Angelocola.
143391 2005-11-15  Paul Eggert  <eggert@cs.ucla.edu>
143393         * lib/xstrtod.c: Don't bother with #pragma STDC FENV_ACCESS ON, as
143394         coreutils no longer futzes with rounding modes.
143396 2005-11-14  Jim Meyering  <jim@meyering.net>
143398         * lib/mkstemp-safer.c: Include <config.h>, required for possible
143399         replacement of mkstemp.
143401 2005-11-10  Simon Josefsson  <jas@extundo.com>
143403         * lib/readline.c: Remove EOL.
143405 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
143407         * modules/gethrxtime (Depends-on): Add gettime.
143409 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
143411         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Don't require AC_HEADER_TIME
143412         or gettimeofday; no longer needed.
143414 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
143416         * lib/gethrxtime.c: Include "timespec.h" rather than the sys/time /
143417         time business.
143418         (gethrxtime) [! (HAVE_NANOUPTIME
143419         || (defined CLOCK_MONOTONIC && HAVE_CLOCK_GETTIME)
143420         || HAVE_MICROUPTIME)]: Fall back on gettime rather than rolling
143421         our own approximation.
143423 2005-11-08  Eric Blake  <ebb9@byu.net>
143425         * lib/inet_ntop.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
143427 2005-11-08  Eric Blake  <ebb9@byu.net>
143429         * lib/getaddrinfo.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
143431 2005-11-04  Bruno Haible  <bruno@clisp.org>
143433         * gnulib-tool: Implement --update mode.
143435 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
143437         Fix porting problem reported by Theodoros V. Kalamatianos.
143438         * lib/utimens.c (futimens) [HAVE_WORKING_UTIMES && HAVE_FUTIMES]:
143439         Don't assume that futimes failing means we must fail.
143441 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
143443         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Revamp wording and local
143444         variables to suggest the intended function of the PATH_MAX check.
143446 2005-10-30  Kean Johnston  <jkj@sco.com>
143448         Trivial changes to support SCO systems.
143449         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Check for MAXPATHLEN as well
143450         as PATH_MAX.
143451         * m4/fpending.m4 (gl_FUNC_FPENDING): Correct check for SCO systems,
143452         where __ptr is null when no I/O is pending.
143454 2005-10-29  Paul Eggert  <eggert@cs.ucla.edu>
143456         * lib/getcwd.c (__getcwd): Don't assume that system calls after readdir
143457         leave errno alone.  Problem reported by Dmitry V. Levin.
143459 2005-10-28  Simon Josefsson  <jas@extundo.com>
143461         * tests/test-gc-md4.c, tests/test-gc-md5.c, tests/test-gc-sha1.c:
143462         Test more.
143464         * tests/test-gc-md2.c, tests/test-md2.c: New files.
143466         * modules/md2, modules/md2-tests: New files.
143468 2005-10-28  Simon Josefsson  <jas@extundo.com>
143470         * m4/inet_ntop.m4: More tests.
143472         * m4/gc-md2.m4, md2.m4: New file.
143474 2005-10-28  Simon Josefsson  <jas@extundo.com>
143476         * lib/inet_ntop.h, inet_ntop.c: Make it work under mingw32: Add
143477         "restrict" keywords, as per POSIX.  Protect the function
143478         declaration around HAVE_DECL_INET_NTOP rather than HAVE_INET_NTOP.
143479         Don't use K&R prototypes.  Check the sprintf return values.
143480         Re-define EAFNOSUPPORT if not present.  Indent.
143482         * lib/md5.h, md5.c: Simplify buffer handling visavi alignment,
143483         suggested by Bruno Haible <bruno@clisp.org>.
143485         * lib/gc-gnulib.c, gc-libgcrypt.c: Check calloc return value.
143487         * lib/gc.h: Add MD2 and RMD160 length defines.  Add prototypes.
143489         * lib/gc-libgcrypt.c: Add MD2 (which is not available through
143490         libgcrypt).
143492         * lib/gc-gnulib.c: Add MD2.  Implement gc_hash_* API.
143494         * lib/md2.h, lib/md2.c: New files.
143496 2005-10-28  Paul Eggert  <eggert@cs.ucla.edu>
143498         * lib/savedir.c (savedir): Don't assume that xrealloc etc. leave
143499         errno alone.  Problem reported by Frederic Jolliton.
143501 2005-10-27  Paul Eggert  <eggert@cs.ucla.edu>
143503         * modules/verify (License): Change from GPL to LGPL.  This is a
143504         tiny module and there are apparently near-equivalents that are
143505         under the BSD license.
143507 2005-10-24  Simon Josefsson  <jas@extundo.com>
143509         * modules/sha1: Relicense to LGPL.
143511 2005-10-24  Simon Josefsson  <jas@extundo.com>
143513         * lib/md4.h: Shrink buffer size, now that we changed the type.
143515 2005-10-23  Simon Josefsson  <jas@extundo.com>
143517         * gnulib-tool (func_import): Fix --tests-base.
143519 2005-10-22  Simon Josefsson  <jas@extundo.com>
143521         * modules/arcfour (Depends-on): Need stdint.
143523 2005-10-22  Simon Josefsson  <jas@extundo.com>
143525         * m4/gc.m4: Don't be fooled by --disable-*random-device parameters,
143526         suggested by Bruno Haible <bruno@clisp.org>.  Fix error messages.
143528 2005-10-22  Simon Josefsson  <jas@extundo.com>
143530         * lib/md4.h, md4.c: Simplify buffer handling visavi alignment,
143531         suggested by Bruno Haible <bruno@clisp.org>.
143533 2005-10-22  Simon Josefsson  <jas@extundo.com>
143535         * lib/crc.h: Include stddef.h, for size_t.
143537 2005-10-22  Simon Josefsson  <jas@extundo.com>
143539         * lib/arcfour.h, arcfour.c: Use fixed size indices in the
143540         arcfour_context struct (simplify test vector testing in GNU
143541         Shishi).
143543 2005-10-21  Simon Josefsson  <jas@extundo.com>
143545         * modules/des, modules/des-tests: New files.
143547         * modules/gc-des, modules/gc-des-tests: New files.
143549         * tests/test-des.c, tests/test-gc-des.c: New file.
143551 2005-10-21  Simon Josefsson  <jas@extundo.com>
143553         * modules/arctwo, modules/arctwo-tests: New files.
143555         * tests/test-arctwo.c: New file.
143557         * modules/gc-arctwo, modules/gc-arctwo-tests: New files.
143559         * tests/test-gc-arctwo.c: New file.
143561 2005-10-21  Simon Josefsson  <jas@extundo.com>
143563         * m4/gc.m4: Don't use libgcrypt if gcrypt.h isn't found, suggested by
143564         Bruno Haible <bruno@clisp.org>.
143566         * m4/gc-des.m4: New file.
143568 2005-10-21  Simon Josefsson  <jas@extundo.com>
143570         * m4/arctwo.m4: New file.
143572         * m4/gc-arctwo.m4: New file.
143574 2005-10-21  Simon Josefsson  <jas@extundo.com>
143576         * lib/rijndael-api-fst.c: Fix bugs in CBC mode for more than one
143577         block.
143579 2005-10-21  Simon Josefsson  <jas@extundo.com>
143581         * lib/hmac-md5.c (hmac_md5): Add comments, suggested by Bruno Haible
143582         <bruno@clisp.org>.
143584         * lib/hmac-sha1.c (hmac_sha1): Likewise.
143586         * lib/crc.c (crc32_update): Actually use crc parameter, suggested by
143587         Bruno Haible <bruno@clisp.org>.
143589         * lib/crc.h: Include stdint.h directly, suggested by Bruno Haible
143590         <bruno@clisp.org>.
143592 2005-10-21  Simon Josefsson  <jas@extundo.com>
143594         * lib/gc-libgcrypt.c (gc_cipher_open): Handle ECB.
143596 2005-10-21  Simon Josefsson  <jas@extundo.com>
143598         * lib/gc-gnulib.c: Support ARCTWO in CBC mode.
143600 2005-10-21  Simon Josefsson  <jas@extundo.com>
143602         * lib/des.h, lib/des.c: New files.
143604         * lib/gc-gnulib.c: Support DES.c
143606 2005-10-21  Simon Josefsson  <jas@extundo.com>
143608         * lib/arctwo.h, lib/arctwo.c: New files.
143610         * lib/gc-gnulib.c: Support ARCTWO.
143612 2005-10-21  Simon Josefsson  <jas@extundo.com>
143614         * lib/arctwo.h (arctwo_setkey): Protect variable in CPP macro,
143615         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
143617 2005-10-21  Simon Josefsson  <jas@extundo.com>
143619         * gnulib-tool (func_import, func_create_testdir): Define automake
143620         conditional GL_COND_LIBTOOL if libtool is used (to be used by modules
143621         Makefile.am snippet),
143622         suggested by Bruno Haible <bruno@clisp.org>.
143624         * modules/gc (Makefile.am): Use it.
143626 2005-10-21  Bruno Haible  <bruno@clisp.org>
143628         * gnulib-tool (func_import, func_create_testdir): Add quoting to last
143629         patch.
143631 2005-10-19  Simon Josefsson  <jas@extundo.com>
143633         * tests/test-gc-rijndael.c: New file.
143635         * modules/gc-rijndael, modules/gc-rijndael-test: New files.
143637 2005-10-19  Simon Josefsson  <jas@extundo.com>
143639         * tests/test-gc-md4.c, tests/test-gc-md5.c: Test gc_hash_buffer
143640         interface too.
143642 2005-10-19  Simon Josefsson  <jas@extundo.com>
143644         * tests/test-gc-arcfour.c: New file.
143646         * modules/gc-arcfour, modules/gc-arcfour-tests: New files.
143648 2005-10-19  Simon Josefsson  <jas@extundo.com>
143650         * modules/gc-md4, modules/gc-md4-tests: New file.
143652         * tests/test-gc-md4.c: New file.
143654 2005-10-19  Simon Josefsson  <jas@extundo.com>
143656         * m4/gc-md4.m4: New file.
143658 2005-10-19  Simon Josefsson  <jas@extundo.com>
143660         * m4/gc-hmac-md5.m4, gc-hmac-sha1.m4, gc-md4.m4,
143661         gc-md5.m4, gc-sha1.m4: Fix typo, suggested by Stepan Kasal
143662         <kasal@ucw.cz>.
143664 2005-10-19  Simon Josefsson  <jas@extundo.com>
143666         * m4/gc-arcfour.m4: New file.
143668         * m4/gc-rijndael.m4: New file.
143670 2005-10-19  Simon Josefsson  <jas@extundo.com>
143672         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support MD4.
143674 2005-10-19  Simon Josefsson  <jas@extundo.com>
143676         * lib/gc-gnulib.c: Support ARCFOUR.
143678 2005-10-19  Simon Josefsson  <jas@extundo.com>
143680         * lib/gc-gnulib.c: Implement gc_cipher_* API, currently only with AES
143681         support.
143683         * lib/gc.h: Add ECB enum type.
143685         * lib/hmac-md5.c, hmac-sha1.c: Include memxor.h.
143687 2005-10-18  Simon Josefsson  <jas@extundo.com>
143689         * tests/test-md5.c: New file.
143691         * modules/md5-tests: New file.
143693 2005-10-18  Simon Josefsson  <jas@extundo.com>
143695         * tests/test-md4.c: New file.
143697         * modules/md4, modules/md4-tests: New files.
143699 2005-10-18  Simon Josefsson  <jas@extundo.com>
143701         * m4/md4.m4: New file.
143703 2005-10-18  Simon Josefsson  <jas@extundo.com>
143705         * lib/md4.h, lib/md4.c: New files, based on md5.?.
143707 2005-10-17  Stepan Kasal  <kasal@ucw.cz>
143709         * gnulib-tool (func_create_testdir): Omit the second check whether
143710         BUILT_SOURCES in nonempty.
143712 2005-10-17  Simon Josefsson  <jas@extundo.com>
143714         * tests/test-rijndael.c: New file.
143716 2005-10-17  Simon Josefsson  <jas@extundo.com>
143718         * modules/sha1: Depend on stdint instead of md5.
143720         * modules/md5: Depend on stdint, remove uint32_t.
143722 2005-10-17  Simon Josefsson  <jas@extundo.com>
143724         * modules/gc-sha1-tests: New file.
143726         * tests/test-gc-sha1.c: New file.
143728 2005-10-17  Simon Josefsson  <jas@extundo.com>
143730         * m4/md5.m4: Remove call to uint32_t.m4.
143732 2005-10-17  Simon Josefsson  <jas@extundo.com>
143734         * lib/sha1.c: Use uint32_t instead of md5_uint32.t
143736         * lib/sha1.h: Use stdint.h and uint32_t instead of md5_uint32 from
143737         md5.h.
143739         * lib/md5.c: Use uin32_t.  Fix non-gcc UNALIGNED_P macro.
143741         * lib/md5.h: Use stdint.h and uint32_t.  Doc fix.
143743 2005-10-17  Simon Josefsson  <jas@extundo.com>
143745         * lib/gc.h, gc-libgcrypt.c: Add more hash types/functions.
143747 2005-10-17  Simon Josefsson  <jas@extundo.com>
143749         * lib/gc.h, gc-libgcrypt.c: Add ciphers.
143751 2005-10-17  Simon Josefsson  <jas@extundo.com>
143753         * lib/gc-libgcrypt.c (gc_hmac_sha1): Fix assert.
143755         * lib/gc.h (gc_nonce, gc_pseudo_random, gc_random): Add prototypes.
143757 2005-10-17  Bruno Haible  <bruno@clisp.org>
143759         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Change the return statement so
143760         that it can also be used in a test.
143762 2005-10-16  Bruno Haible  <bruno@clisp.org>
143764         * gnulib-tool (func_emit_tests_Makefile_am): Also define
143765         TESTS_ENVIRONMENT, so that individual tests can augment it.
143767         * gnulib-tool (func_create_testdir): Use an intermediate target for
143768         building $(BUILT_SOURCES). Needed because BUILT_SOURCES can contain
143769         macros, like $(ALLOCA_H), which cannot be passed through the command
143770         line.
143772 2005-10-15  Simon Josefsson  <jas@extundo.com>
143774         * modules/rijndael-tests: New file.
143776         * modules/rijndael: New file.
143778 2005-10-15  Simon Josefsson  <jas@extundo.com>
143780         * m4/rijndael.m4: New file.
143782 2005-10-15  Simon Josefsson  <jas@extundo.com>
143784         * lib/rijndael-api-fst.h, lib/rijndael-api-fst.c: New files.
143786         * lib/rijndael-alg-fst.h, lib/rijndael-alg-fst.c: New files.
143788 2005-10-14  Simon Josefsson  <jas@extundo.com>
143790         * tests/test-arcfour.c: New file.
143792         * modules/arcfour, modules/arcfour-tests: New files.
143794 2005-10-14  Simon Josefsson  <jas@extundo.com>
143796         * m4/arcfour.m4: New file.
143798 2005-10-14  Simon Josefsson  <jas@extundo.com>
143800         * lib/arcfour.h, lib/arcfour.c: New files.
143802 2005-10-14  Roland McGrath  <roland@redhat.com>
143804         Import from libc.  [BZ #1331]
143805         * lib/obstack.h [!__STDC__] (obstack_int_grow_fast): Fix misnamed
143806         macro argument.
143807         Reported by Matej Vela <vela@debian.org>.
143809 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
143811         * lib/obstack.c [defined _LIBC && defined USE_IN_LIBIO]: Don't
143812         include <wchar.h>; no longer needed.
143814 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
143816         * config/srclist.txt: Add glibc bug 321 for obstack.c, obstack.h.
143818 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
143819         and  Ulrich Drepper  <drepper@redhat.com>
143821         Import from libc.
143822         * lib/obstack.c (print_and_abort) [defined _LIBC]: Use __fxprintf
143823         instead of inline stream orientation test and two separate
143824         function calls.  Pay no attention to USE_IN_LIBIO.
143826 2005-10-13  Simon Josefsson  <jas@extundo.com>
143828         * modules/gc-hmac-md5-tests: New file.
143830         * tests/test-gc-hmac-sha1.c: New file.
143832         * tests/test-gc.c (main): Remove MD5 and HMAC-MD5 tests.
143834         * modules/gc-hmac-md5-tests: New file.
143836         * tests/test-gc-md5.c: New file.
143838         * modules/gc-md5-tests: New file.
143840 2005-10-13  Simon Josefsson  <jas@extundo.com>
143842         * lib/gc-pbkdf2-sha1.c (gc_pbkdf2_sha1): Optimize CEIL computation.
143843         Move memory allocation outside of loop.
143845 2005-10-13  Paul Eggert  <eggert@cs.ucla.edu>
143847         * lib/mkdir-p.c (make_dir_parents): Don't report an error if an
143848         intermediate directory is in a read-only file system.  Problem
143849         reported by Eric Blake.
143851 2005-10-13  Oskar Liljeblad  <oskar@osk.mine.nu>
143853         * modules/human (Depends-on): Depend on xstrtoumax, not xstrtol.
143855 2005-10-12  Simon Josefsson  <jas@extundo.com>
143857         * tests/test-hmac-sha1.c: New file.
143859         * modules/hmac-sha1-tests: New file.
143861         * modules/hmac-sha1: New file.
143863 2005-10-12  Simon Josefsson  <jas@extundo.com>
143865         * modules/gc-sha1: New file.
143867 2005-10-12  Simon Josefsson  <jas@extundo.com>
143869         * modules/gc-pbkdf2-sha1, modules/gc-pbkdf2-sha1-tests: New files.
143871         * tests/test-gc-pbkdf2-sha1.c: New file.
143873 2005-10-12  Simon Josefsson  <jas@extundo.com>
143875         * modules/gc-md5, modules/gc-hmac-md5: New files.
143877         * modules/gc (Files): Remove md5, memxor and hmac files.
143879 2005-10-12  Simon Josefsson  <jas@extundo.com>
143881         * m4/gc-pbkdf2-sha1.m4: New file.
143883         * m4/gc-hmac-sha1.m4: New file.
143885         * m4/gc-sha1: New file.
143887         * m4/hmac-sha1.m4: New file.
143889 2005-10-12  Simon Josefsson  <jas@extundo.com>
143891         * m4/gc-md5.m4, m4/gc-hmac-md5.m4: New files.
143893         * m4/gc.m4: Don't call gl_MD5, gl_MEMXOR or gl_HMAC_MD5.
143895 2005-10-12  Simon Josefsson  <jas@extundo.com>
143897         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Use Gc_rc for return types,
143898         suggested by Bruno Haible <bruno@clisp.org>.
143900 2005-10-12  Simon Josefsson  <jas@extundo.com>
143902         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support SHA-1.
143904 2005-10-12  Simon Josefsson  <jas@extundo.com>
143906         * lib/gc-pbkdf2-sha1.c: New file.
143908         * lib/gc.h: Add gc_pbkdf2_sha1 prototype.
143910 2005-10-12  Simon Josefsson  <jas@extundo.com>
143912         * lib/gc-libgcrypt.c (gc_hmac_sha1): New function.
143914         * lib/gc-gnulib.c (gc_hmac_sha1): New function.
143916 2005-10-12  Simon Josefsson  <jas@extundo.com>
143918         * lib/gc-gnulib.c: Condition MD5 and HMAC-MD5 use on GC_USE_MD5 and
143919         GC_USE_HMAC_MD5, respectively.
143921         * lib/gc-libgcrypt.c (gc_md5): Fix assert call.
143922         (gc_md5): Fix typo.
143924         * lib/gc.h (gc_hash_buffer): Use gc_hash in prototype.
143926         * lib/gc-libgcrypt.c (gc_hash_buffer): Ditto.
143928         * lib/gc-gnulib.c (gc_hash_buffer): Ditto.
143930 2005-10-12  Bruno Haible  <bruno@clisp.org>
143932         * m4/stdbool.m4 (gl_STDBOOL_H): Define as an alias of AM_STDBOOL_H.
143933         Reported by Stepan Kasal <kasal@ucw.cz>.
143935 2005-10-11  Simon Josefsson  <jas@extundo.com>
143937         * tests/test-crc.c: New file.
143939         * modules/crc, modules/crc-tests: New files.
143941 2005-10-11  Simon Josefsson  <jas@extundo.com>
143943         * m4/crc.m4: New file.
143945 2005-10-11  Simon Josefsson  <jas@extundo.com>
143947         * lib/gc.h: Add gc_hash and gc_hash_buffer.
143949         * lib/gc-gnulib.c (gc_hash_buffer): Add.  Reorder #include's.
143951         * lib/gc-libgcrypt.c (gc_hash_buffer): Add.
143953 2005-10-11  Simon Josefsson  <jas@extundo.com>
143955         * lib/crc.h, lib/crc.c: New files.
143957         * lib/gc.h (gc_hash_buffer): Add doc.
143959 2005-10-11  Bruno Haible  <bruno@clisp.org>
143961         * modules/c-strcasestr: New file.
143962         * MODULES.html.sh (String handling <string.h>): Add c-strcasestr.
143964 2005-10-11  Bruno Haible  <bruno@clisp.org>
143966         * modules/c-strcase: New file.
143967         * MODULES.html.sh (String handling <string.h>): Add c-strcase.
143969 2005-10-11  Bruno Haible  <bruno@clisp.org>
143971         * lib/strcasecmp.c: Include limits.h.
143972         (strcasecmp): Avoid integer overflow on exotic platforms.
143973         * lib/strncasecmp.c: Include limits.h.
143974         (strncasecmp): Avoid integer overflow on exotic platforms.
143975         Reported by Paul Eggert.
143977 2005-10-11  Bruno Haible  <bruno@clisp.org>
143979         * lib/c-strcasestr.h: New file, from GNU gettext.
143980         * lib/c-strcasestr.c: New file, from GNU gettext.
143982 2005-10-11  Bruno Haible  <bruno@clisp.org>
143984         * lib/c-strcase.h: New file, from GNU gettext.
143985         * lib/c-strcasecmp.c: New file, from GNU gettext.
143986         * lib/c-strncasecmp.c: New file, from GNU gettext.
143988 2005-10-10  Paul Eggert  <eggert@cs.ucla.edu>
143990         * modules/mempcpy (License): GPL -> LGPL.
143991         * modules/strchrnul (License): Likewise.
143992         * modules/sysexits (License): Likewise.
143994 2005-10-08  Simon Josefsson  <jas@extundo.com>
143996         * config/srclist.txt: Bug 1423 is closed, but 1439 remains.
143998 2005-10-07  Simon Josefsson  <jas@extundo.com>
144000         * m4/memxor.m4: Remove gl_C_RESTRICT call.
144002 2005-10-06  Simon Josefsson  <jas@extundo.com>
144004         * tests/test-hmac-md5.c: New file.
144006         * modules/hmac-md5-tests: New file.
144008         * modules/hmac-md5: New file.
144010 2005-10-06  Simon Josefsson  <jas@extundo.com>
144012         * m4/hmac-md5.m4: New file.
144014         * m4/memxor.m4: Require gl_C_RESTRICT.
144016 2005-10-06  Simon Josefsson  <jas@extundo.com>
144018         * lib/memxor.c (memxor): Avoid casts and warnings.
144020 2005-10-06  Simon Josefsson  <jas@extundo.com>
144022         * lib/hmac-md5.c: New file.
144024         * lib/hmac.h: New file.
144026 2005-10-06  Paul Eggert  <eggert@cs.ucla.edu>
144028         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check that bool
144029         promotes to int, not unsigned int, to catch the AIX 5.3
144030         compiler bug.
144032 2005-10-05  Simon Josefsson  <jas@extundo.com>
144034         * modules/memxor: New file.
144036         * modules/iconv (Files): Move config.rpath to havelib, it is used
144037         there.
144039         * modules/havelib (Files): Add config.rpath.
144041 2005-10-05  Simon Josefsson  <jas@extundo.com>
144043         * m4/memxor.m4: New file.
144045 2005-10-05  Simon Josefsson  <jas@extundo.com>
144047         * lib/memxor.c (memxor): Fix compiler error.
144049         * lib/md5.h (MD5_DIGEST_SIZE, MD5_BLOCK_SIZE): Add, see also
144050         <http://sourceware.org/bugzilla/show_bug.cgi?id=1423>.
144052         * lib/memxor.h, lib/memxor.c: New files.
144054         * lib/getaddrinfo.h: Don't protect sys/types.h with HAVE_SYS_TYPES_H,
144055         we assume all systems have it, suggested by Jim Meyering
144056         <jim@meyering.net>.  Remove HAVE_SYS_SOCKET_H test too, to see if
144057         any systems lack sys/socket.h; mingw32 is known to lack it, but we
144058         don't support it yet anyway.  Also remove HAVE_NETDB_H test, for
144059         same reasons.
144061 2005-10-05  Simon Josefsson  <jas@extundo.com>
144063         * config/srclist.txt: Add glibc bug 1423 for md5.h.
144065 2005-10-05  Paul Eggert  <eggert@cs.ucla.edu>
144067         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Don't check for
144068         sys/socket.h, netdb.h, sys/types.h; the checks areno longer
144069         needed, since the source code now assumes these .h files.
144071 2005-10-05  Derek Price  <derek@ximbiot.com>
144073         * lib/getdelim.c (SIZE_MAX): New macro, if not already defined.
144075 2005-10-05  Bruno Haible  <bruno@clisp.org>
144077         * modules/stdint (License): Change to LGPL.
144079 2005-10-04  Simon Josefsson  <jas@extundo.com>
144081         * lib/getaddrinfo.h: Move sys/types.h include first, reported by "Mark
144082         D. Baushke" <mdb@gnu.org>.
144084 2005-10-04  Bruno Haible  <bruno@clisp.org>
144086         * lib/verify.h (verify_true): Provide alternative definition for C++.
144088 2005-10-03  Paul Eggert  <eggert@cs.ucla.edu>
144090         * lib/getdelim.c: Include getdelim.h first.  Include <limits.h>.
144091         (SSIZE_MAX): New macro, if not already defined.
144092         (getdelim): Fix buffer overrun on 64-bit hosts with lines longer
144093         than 2 GiB.
144095 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
144097         Sync from coreutils.
144098         * m4/openat.m4 (gl_FUNC_OPENAT): Check for fdopendir.
144099         * m4/ullong_max.m4 (gl_ULLONG_MAX): Simplify so that it merely
144100         defines ULONG_MAX_LT_ULLONG_MAX.  Thomas M.Ott reports that
144101         ULLONG_MAX doesn't work with 2.7.2.1.
144103 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
144105         * modules/xreadlink (Makefile.am): Remove lib_SOURCES.
144106         From Ben Pfaff.
144108         * modules/exclude (Depends-on): Depend on verify.
144109         * modules/strtoimax (Depends-on): Likewise.
144110         * modules/utimecmp (Depends-on): Likewise.
144112 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
144114         * lib/exclude.c: Include verify.h.
144115         (verify): Remove.  All callers changed to use verify.h's version.
144116         * lib/strtoimax.c: Likewise.
144117         * lib/utimecmp.c: Likewis.e
144119         Sync from coreutils.
144120         * lib/.cppi-disable: Add getaddrinfo.h, getdelim.h, getline.h,
144121         getpass.c, mbchar.h, mbuiter.h, strcase.h, strnlen.h, strnlen1.h.
144122         * lib/.cvsignore: Add fts.h, search.h, t-fpending.
144123         * lib/settime.c (settime): Fix { typo in previous patch.  Also, don't
144124         bother returning ENOSYS if settimeofday or stime fails; just let
144125         them return whatever errno they want to return.
144126         * lib/utimens.c: Include unistd.h, for dup2.
144127         (futimens): Fix typo: HAVE_FUTIMESAT was misspelled in an #if.
144128         (futimens) [! HAVE_FUTIMESAT]: If !file, set errno before returning -1.
144130 2005-10-02  Jim Meyering  <jim@meyering.net>
144132         Sync from coreutils.
144133         * m4/utimes.m4 (gl_FUNC_UTIMES): Detect the version of utimes
144134         from glibc-2.2.5 that fails for read-only files.
144136 2005-10-02  Jim Meyering  <jim@meyering.net>
144138         Sync from coreutils.
144139         * lib/fts-cycle.c [HAVE_CONFIG_H]: Include <config.h>.
144140         * lib/openat-die.c: Use `#ifdef HAVE_CONFIG_H', not
144141         `#if HAVE_CONFIG_H'.
144142         * lib/openat.c (fdopendir): Do not define if HAVE_FDOPENDIR.
144143         Remove AT_FDCWD test.
144144         Do not consume the fd unless successful.
144145         * lib/openat.h (fdopendir): Do not define if HAVE_FDOPENDIR.
144146         * lib/settime.c (settime): Move the HAVE_STIME block `up' into an #elif
144147         block, so that we don't even try to compile it if settimeofday is
144148         available.  This works around a compilation failure on OSF1 V5.1,
144149         due to stime requiring a `long int*' while tv_sec is `int'.
144151 2005-10-02  Alfred M. Szmidt  <ams@gnu.org>
144153         Sync from coreutils.
144154         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Compare $gl_have_path...
144155         against `yes', rather than just testing for nonempty.
144157 2005-10-01  Simon Josefsson  <jas@extundo.com>
144159         * m4/getaddrinfo.m4: Include sys/types.h for sys/socket.h, on FreeBSD
144160         and Darwin.
144162         * m4/getaddrinfo.m4: Use AC_GNU_SOURCE, GNU only declare getaddrinfo
144163         as an (POSIX) extension.  Check for sys/types.h, sys/socket.h, and
144164         netdb.h too, needed by getaddrinfo.h.  Check if getaddrinfo,
144165         freeaddrinfo and gai_strerror are declared by the POSIX headers.
144166         Check if struct addrinfo is declared.
144168 2005-10-01  Simon Josefsson  <jas@extundo.com>
144170         * lib/getaddrinfo.h: Protect #include's of sys/socket.h and netdb.h.
144171         Only define struct addrinfo if !HAVE_STRUCT_ADDRINFO.  Protect
144172         AI_* and EAI_* definitions.  Protect function declarations.
144174 2005-10-01  Jim Meyering  <jim@meyering.net>
144176         Sync from coreutils.
144178         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Look for getservbyname in these
144179         libraries [inet nsl socket xnet].  Nelson Beebe reported that with
144180         native cc on Solaris 7, getaddrinfo.c requires -lsocket.
144181         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
144182         in the inet and nsl libraries.  Required on Solaris 5.7.
144184 2005-10-01  Jim Meyering  <jim@meyering.net>
144186         Sync from coreutils.
144187         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
144188         in the inet and nsl libraries.  Required on Solaris 5.7.
144190 2005-10-01  Eric Blake  <ebb9@byu.net>  (tiny change)
144192         * lib/getdelim.c (getdelim): Remove unused variables.
144194 2005-09-29  Paul Eggert  <eggert@cs.ucla.edu>
144196         * lib/xtime.h (XTIME_PRECISION): Now of type int, not long long int,
144197         so that the code works even with ancient cpp.  Portability problem
144198         with GCC 2.7.2.1 reported by Thomas M.Ott.
144200 2005-09-27  Paul Eggert  <eggert@cs.ucla.edu>
144202         * modules/regex (Depends-on): Add strcase.
144204         * modules/gethostname (Licence): Change from GPL to LGPL, since
144205         gethostname.c is a trivial implementation of a standard library
144206         function.
144207         * modules/poll (License): Change from GPL to LGPL, since it's
144208         derived from LGPL code.
144210 2005-09-27  Jim Meyering  <jim@meyering.net>
144212         * lib/getcwd.c: Change #ifdef<TAB>HAVE_CONFIG_H to #ifdef
144213         HAVE_CONFIG_H.
144215         * lib/intprops.h (signed_type_or_expr__): Define.
144216         (INT_STRLEN_BOUND) [__GNUC__]: Use a slightly tighter bound
144217         for unsigned types.
144219 2005-09-26  Paul Eggert  <eggert@cs.ucla.edu>
144221         * lib/verify.h (verify_expr): Remove, replacing with:
144222         (verify_true): New macro that returns true instead of void.
144223         (verify_type__): Remove.
144224         (verify): Use verify_true rather than verify_type__.
144226 2005-09-26  Bruno Haible  <bruno@clisp.org>
144228         * modules/mbchar (Include): Mention that HAVE_WCHAR_H && HAVE_WCTYPE_H
144229         is necessary.
144230         (lib_SOURCES): Remove mbchar.c.
144231         * modules/mbfile (Include): Mention that HAVE_MBRTOWC is necessary.
144232         (Files): Add m4/mbrtowc.m4.
144233         * modules/mbiter: Likewise.
144234         * modules/mbuiter: Likewise.
144236 2005-09-26  Bruno Haible  <bruno@clisp.org>
144238         * m4/mbchar.m4 (gl_MBCHAR): Check for wchar.h and wctype.h. Don't
144239         compile mbchar.c if they are not both present.
144240         * m4/mbfile.m4 (gl_MBFILE): Require gl_FUNC_MBRTOWC.
144241         * m4/mbiter.m4 (gl_MBITER): Likewise.
144242         * m4/strstr.m4 (gl_PREREQ_STRSTR): Use AC_REQUIRE.
144243         * m4/strcasestr.m4 (gl_PREREQ_STRCASESTR): Likewise.
144244         * m4/strcase.m4 (gl_PREREQ_STRCASECMP): Likewise.
144246 2005-09-25  Jim Meyering  <jim@meyering.net>
144248         * modules/inet_ntop (Depends-on): Add socklen, since inet_ntop.c
144249         also uses socklen_t.
144251 2005-09-24  Paul Eggert  <eggert@cs.ucla.edu>
144253         * lib/utimens.c (ENOSYS): Define if not already defined.
144254         (futimens): Support having a null PATH if the file descriptor
144255         is nonnegative.
144257         * lib/regex_internal.h (__GNUC_PREREQ, always_inline, inline, pure):
144258         Remove.
144259         (__attribute): Define to empty unless GCC 3.1 or later.
144260         This works around a core dump on OpenBSD 3.4, which has GCC
144261         2.95.3, which dumps core when given __attribute__(()).  It also
144262         simplifies other tests, since we really don't want to bother with
144263         worrying about which ancient version of GCC supported what.
144264         Original problem reported by Yoann Vandoorselaere, with part of
144265         the fix suggested by Derek Price.
144267 2005-09-24  Jim Meyering  <jim@meyering.net>
144269         * lib/verify.h (verify_type__): Use `unsigned int' as the bitfield type
144270         so we can once again use a positive bitfield width of 1 -- now we
144271         don't have to explain why we were using a bitfield width of 2.
144273 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
144275         * m4/regex.m4 (gl_REGEX): If replacing, define regcomp to rpl_regcomp,
144276         and similarly for the other external symbols.  Problem reported
144277         by James Gallager.
144279         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Catch Sun Studio 10u1 on Linux
144280         bug reported by Jim Meyering.
144282         * m4/utimens.m4 (gl_UTIMENS): Check for futimesat.
144283         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Undo previous change;
144284         not needed, since socklen is a prerequisite module.
144286 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
144288         * lib/getaddrinfo.c [HAVE_NETINET_IN_H]: Include <netinet/in.h>.
144289         Problem reported by Eric Blake.
144290         (getaddrinfo): Initialize se so that it's not garbage.
144291         Redo internal storage allocation so that it doesn't make unportable
144292         assumptions about alignment.
144293         Fix a memory leak.
144295         * lib/utimens.c (futimens): Use futimesat if available.
144296         Prefer it to futimes since it doesn't have the futimes bug.
144298         * lib/verify.h (GL_CONCAT0, GL_CONCAT): Remove.
144299         (verify): Don't use the __LINE__ trick, as it doesn't work in general.
144300         Instead, declare a function that returns a pointer to an array,
144301         and use verify_type__ to declare the size of the array.
144302         Problem and germ of a solution reported by Bruno Haible.
144303         (verify_type__): Use 2, not 1, for bitfield size, to avoid
144304         a warning with Irix 6.5 cc.  Problem reported by Bruno Haible.
144306 2005-09-23  Jim Meyering  <jim@meyering.net>
144308         Sync from coreutils.
144309         Correct build failure (socklen_t not defined) on at least
144310         mips-sgi-irix6.5 and alphaev67-dec-osf5.1.
144311         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Require gl_SOCKLEN_T.
144313 2005-09-23  Jim Meyering  <jim@meyering.net>
144315         * modules/getaddrinfo (Depends-on): Add socklen.
144317 2005-09-23  Bruno Haible  <bruno@clisp.org>
144319         * tests/test-verify.c: New file.
144321 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
144323         Sync from coreutils.
144325         * modules/argmatch (Depends-on): Add verify.
144326         * modules/getloadavg (Depends-on): Depend on fcntl-safer, not
144327         unistd-safer.
144328         * modules/save-cwd (Depends-on): Likewise.
144330         * modules/openat (Files): Add lib/openat-die.c.
144331         (Depends-on): Remove error, exitfail.
144332         Add dirname.
144334         * modules/verify: New file.
144335         * MODULES.html.sh (Diagnostics <assert.h>): New section,
144336         with "verify" module.
144338 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
144340         Sync from coreutils.
144342         * m4/backupfile.m4, calloc.m4, chown.m4, cloexec.m4, dup2.m4:
144343         * m4/fileblocks.m4, free.m4, ftruncate.m4, getcwd.m4, getpagesize.m4:
144344         * m4/getugroups.m4, group-member.m4, idcache.m4, link-follow.m4:
144345         * m4/mkstemp.m4, mktime.m4, mountlist.m4, nanosleep.m4, pathmax.m4:
144346         * m4/physmem.m4, posixver.m4, putenv.m4, safe-read.m4, same.m4:
144347         * m4/save-cwd.m4, stdio-safer.m4, unistd-safer.m4, unlinkdir.m4:
144348         * m4/userspec.m4, xgetcwd.m4, xreadlink.m4:
144349         Don't bother checking for string.h, stdlib.h, unistd.h.
144350         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't require
144351         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK; that's now the lstat
144352         module's job.
144353         * m4/jm-macros.m4 (gl_MACROS): Likewise.
144354         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_LSTAT.
144356         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): New macro.
144357         (gl_GETDATE): Use it.
144359         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Don't bother checking for unistd.h.
144361 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
144363         Sync from coreutils.
144365         * lib/.cppi-disable: Add regcomp.c, regex_internal.c, regex_internal.h,
144366         stat-time.h.
144367         * lib/argmatch.h: Include verify.h
144368         (ARGMATCH_VERIFY): Use verify rather than rolling our own.
144369         (ARGMATCH_ASSERT): Remove; unused.
144370         * lib/canonicalize.c: Assume STDC_HEADERS.
144371         * lib/exclude.c: Include "strcase.h".
144372         * lib/regex_internal.h [!defined _LIBC]: Likewise.
144373         * lib/getusershell.c: Include stdio--.h rather than stdio.h
144374         and stdio-safer.h.
144375         (getusershell): Call fopen, not fopen_safer.
144376         * lib/save-cwd.c: Include fcntl--.h rather than fcntl.h.
144377         Do not include unistd-safer.h.
144378         (save_cwd): Don't call fd_safer; no longer needed
144379         now that we include fcntl--.h.
144381         * lib/getdate.y (relative_time): New type.
144382         (RELATIVE_TIME_0): New constant.
144383         (parser_control): Use relative_time instead of doing it ourselves.
144384         (%union): Add new relative_time rel member.
144385         (tYEAR_UNIT, tMONTH_UNIT, tHOUR_UNIT, tMINUTE_UNIT, tSEC_UNIT):
144386         Now typeless.
144387         (relunit, relunit_snumber): Now of type rel.
144388         (zone, rel, relunit, get_date): Adjust to above changes.
144390         * lib/getloadavg.c: Include fcntl--.h rather than fcntl.h.
144391         Do not include unistd-safer.h.
144392         (getloadavg): Don't call fd_safer; no longer needed
144393         now that we include fcntl--.h.
144395         * lib/mkdir-p.c (ENOSYS): Define to EEXIST if not defined.
144396         (make_dir_parents): Treat ENOSYS like EEXIST.
144398         Improve quality of diagnostics on restore_cwd failure.
144399         * lib/mkdir-p.h (make_dir): Remove.  All uses replaced by mkdir.
144400         (make_dir_parents): Last arg is now int * (for errno), not bool *.
144401         * lib/mkdir-p.c (make_dir, make_dir_parents): Likewise.
144402         Rewrite "mkdir -p" algorithm to avoid the need for "stat"
144403         each time through the loop.  Do not diagnose restore_cwd failure;
144404         that is the caller's job (and perhaps the caller does not care).
144406         * lib/mkdir-p.c (CLEANUP_CWD, CLEANUP): Remove.
144407         (make_dir_parents): Revamp to avoid need for CLEANUP_CWD, CLEANUP.
144408         If the file already exists but is not a directory, don't bother
144409         to try to make its parents.
144410         Close potential file descriptor leak if we can't chdir("/") (!).
144411         Don't always return true if chdir($PWD) fails; return true only
144412         if the requested action was done successfully (except for the
144413         chdir($PWD)).
144414         Don't log final directory unless we actually made it.
144415         Refactor to avoid duplicate code to fix up permissions.
144416         Don't attempt to fix up parent permissions if chdir($PWD) fails.
144418         * lib/strftime.c (my_strftime): Rewrite the previous change slightly,
144419         to make it a bit faster and (I hope) clearer.
144420         * lib/strftime.c (my_strftime): Add support for %:z, %::z, %:::z.
144421         Fix bug in formats like %2N.
144423         * lib/verify.h: New file.
144425 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
144427         Sync from coreutils.
144428         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Check for netinet/in.h.
144430 2005-09-22  Jim Meyering  <jim@meyering.net>
144432         Sync from coreutils.
144434         * m4/lstat.m4 (gl_FUNC_LSTAT):
144435         Use AC_LIBSOURCES to require lstat.c and lstat.h.
144436         Remove obsolete comment.
144437         * m4/xreadlink.m4: Use AC_LIBSOURCES and AC_LIBOBJ.
144438         * m4/xstrtod.m4: Likewise.
144440         * m4/openat.m4 (gl_FUNC_OPENAT): Add openat-die.c.
144442 2005-09-22  Jim Meyering  <jim@meyering.net>
144444         Sync from coreutils.
144446         * lib/backupfile.c: Use ARGMATCH_VERIFY, just in case.
144448         * lib/posixtm.c (posixtime) [lint]: Initialize *all* of tm0, not just
144449         the .tm_year member, since otherwise gcc-4.0 would now warn about
144450         tm_zone, tm_gmtoff, tm_isdst, tm_yday, tm_wday.
144452         * lib/quotearg.c (quotearg_n_options): Change code to be suboptimal, in
144453         order to avoid an unsuppressible warning from gcc on 64-bit systems.
144455         * lib/getdate.y (get_date): Undo part of the 2005-04-04 change, so that
144456         the command "date -d'2005-03-27 +1 day'" succeeds once again, even
144457         when run in a time zone for which daylight savings time is in effect
144458         for the starting date.
144460         * lib/mkdir-p.c (make_dir_parents): Don't let a failed chdir($PWD)
144461         stop us from restricting permissions of just-created absolute-named
144462         directories.
144463         * lib/mkdir-p.c (CLEANUP_CWD): Return *true*, not false when failing
144464         to restore initial working directory.
144465         * lib/mkdir-p.c (make_dir_parents): New parameter:
144466         different_working_dir, to tell caller if/when we change the working
144467         directory and are unable to return to the initial one.
144468         * lib/mkdir-p.h (make_dir_parents): Update prototype.
144469         * lib/mkdir-p.c (CLEANUP_CWD): Change one more `return 1' to
144470         `return false'.  This fixes a bug introduced on 2004-07-30.
144472         * lib/openat.c (fdopendir): Be sure to close the supplied
144473         file descriptor before returning.  This makes our replacement
144474         implementation a little closer to Solaris's, where fdopendir
144475         ties the file descriptor to the returned DIR* pointer.
144476         * lib/openat.c (unlinkat): New function.
144477         * lib/openat.h (unlinkat): Add prototype.
144478         * lib/openat-die.c (openat_save_fail): Rename from openat_save_die.
144479         (openat_restore_fail): Rename from openat_restore_die.
144480         * lib/openat.c, openat.h: Reflect s/_die/_fail/ renaming.
144482         Provide an alternative to exiting immediately upon save_cwd or
144483         restore_cwd failure.  Now, an application can arrange e.g.,
144484         to perform a longjump in that case.
144485         * lib/openat.c: Include dirname.h.
144486         Use IS_ABSOLUTE_FILE_NAME rather than testing for leading slash.
144487         (rpl_openat, fdopendir, fstatat): Call openat_save_die
144488         and openat_restore_die rather than calling error directly.
144489         Don't include "error.h" or "exitfail.h"; they're no longer needed.
144491         * lib/openat-die.c (openat_save_die, openat_restore_die): New file.
144492         * lib/openat.h (openat_save_die, openat_restore_die): Declare and
144493         define.
144495         * lib/strftime.c [FPRINTFTIME] (fprintftime): Provide a new interface:
144496         size_t fprintftime (FILE *fp, char const *fmt, struct tm const *tm,
144497                             int utc, int nanoseconds);
144498         Background:
144499         date should not have to allocate a megabyte of virtual memory to
144500         handle a format argument like +%1048575T.  When implemented with
144501         strftime, it must allocate such a buffer, use strftime to fill it
144502         in, print it, then free it.
144503         With fprintftime, it simply prints everything and exits.
144504         With no need for memory allocation, that's one fewer way to fail.
144505         * lib/strftime.c (my_strftime): Parse the colons of %:::z *after* the
144506         optional field width, not before, so we accept %9:z, not %:9z.
144507         (my_strftime): Be sure to use L_('x') for literals.
144509         * lib/backupfile.c, lib/canon-host.c, lib/canonicalize.c, lib/chown.c:
144510         * lib/cloexec.c, lib/dup-safer.c, lib/dup2.c, lib/euidaccess.c:
144511         * lib/fd-safer.c, lib/fileblocks.c, lib/fopen-safer.c, lib/fsusage.c:
144512         * lib/ftruncate.c, lib/getcwd.c, lib/getcwd.h, lib/getloadavg.c:
144513         * lib/getopt_.h, lib/getpagesize.h, lib/getugroups.c:
144514         * lib/group-member.c, lib/human.h, lib/idcache.c, lib/mkdir-p.c:
144515         * lib/mountlist.c, lib/nanosleep.c, lib/pathmax.h, lib/physmem.c:
144516         * lib/posixver.c, lib/putenv.c, lib/raise.c, lib/safe-read.c:
144517         * lib/same.c, lib/save-cwd.c, lib/setenv.c, lib/settime.c:
144518         * lib/tempname.c, lib/unlinkdir.c, lib/unsetenv.c, lib/userspec.c:
144519         * lib/xgethostname.c, lib/xreadlink.c:
144520         Assume HAVE_UNISTD_H, i.e., include <unistd.h> unconditionally.
144522         * lib/chown.c, lib/cloexec.c, lib/dup-safer.c, lib/dup2.c:
144523         * lib/fsusage.c, lib/getcwd.c, lib/getloadavg.c, lib/mountlist.c:
144524         * lib/openat.h, lib/save-cwd.c, lib/tempname.c:
144525         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
144526         and don't include <sys/file.h>).
144528 2005-09-22  Eric Blake  <ebb9@byu.net>  (tiny change)
144530         Sync from coreutils.
144532         * lib/getloadavg.c (getloadavg) [__CYGWIN__]: Port to cygwin.
144533         [__linux__]: Allocate a big enough buffer for /proc/loadavg.
144534         [!LDAV_DONE]: Avoid unused variable warning.
144536 2005-09-21  Bruno Haible  <bruno@clisp.org>
144538         * lib/unicodeio.h (unicode_to_mb): New declaration.
144540 2005-09-20  Derek Price  <derek@ximbiot.com>
144542         * lib/getaddrinfo.c: Don't include <netdb.h> included from
144543         getaddrinfo.h.
144545 2005-09-20  Bruno Haible  <bruno@clisp.org>
144547         * gnulib-tool: Remove trailing slashes from the values specified for
144548         --source-base, --m4-base, --tests-base, --aux-dir.
144549         Suggested by Simon Josefsson <jas@extundo.com>.
144551 2005-09-20  Bruno Haible  <bruno@clisp.org>
144553         * gnulib-tool (func_all_modules, func_modules_transitive_closure,
144554         func_modules_to_filelist, func_import, func_create_testdir): Make all
144555         sorting results locale-independent, so that gnulib-cache.m4 doesn't
144556         change when gnulib-tool is invoked in a different locale.
144558 2005-09-19  Simon Josefsson  <jas@extundo.com>
144560         * m4/socklen.m4: Fix typo.
144562 2005-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
144564         Use a consistent style for including <config.h>.
144565         * lib/__fpending.c, lib/acl.c, lib/argmatch.c, lib/argp-help.c,
144566         lib/argp-parse.c, lib/argp-pvh.c, lib/backupfile.c, lib/basename.c,
144567         lib/c-stack.c, lib/calloc.c, lib/check-version.c, lib/cloexec.c,
144568         lib/closeout.c, lib/copy-file.c, lib/creat-safer.c, lib/cycle-check.c,
144569         lib/dirfd.c, lib/dirname.c, lib/dup-safer.c, lib/dup2.c,
144570         lib/euidaccess.c, lib/exclude.c, lib/exitfail.c, lib/fatal-signal.c,
144571         lib/fd-safer.c, lib/file-type.c, lib/fileblocks.c, lib/filemode.c,
144572         lib/filenamecat.c, lib/findprog.c, lib/fnmatch.c, lib/fopen-safer.c,
144573         lib/free.c, lib/fsusage.c, lib/ftruncate.c, lib/full-write.c,
144574         lib/fwriteerror.c, lib/getaddrinfo.c, lib/getcwd.c, lib/getdelim.c,
144575         lib/getline.c, lib/getlogin_r.c, lib/getndelim2.c, lib/getnline.c,
144576         lib/getopt1.c, lib/getpass.c, lib/group-member.c, lib/hard-locale.c,
144577         lib/hash-pjw.c, lib/hash.c, lib/human.c, lib/idcache.c,
144578         lib/inet_ntop.c, lib/isdir.c, lib/long-options.c, lib/malloc.c,
144579         lib/memcasecmp.c, lib/memcmp.c, lib/memcoll.c, lib/memcpy.c,
144580         lib/memmove.c, lib/mkdir-p.c, lib/modechange.c, lib/mountlist.c,
144581         lib/open-safer.c, lib/physmem.c, lib/pipe-safer.c, lib/pipe.c,
144582         lib/poll.c, lib/posixver.c, lib/progname.c, lib/progreloc.c,
144583         lib/putenv.c, lib/quote.c, lib/quotearg.c, lib/readline.c,
144584         lib/readlink.c, lib/realloc.c, lib/regex.c, lib/rename.c, lib/rmdir.c,
144585         lib/rpmatch.c, lib/safe-read.c, lib/same.c, lib/save-cwd.c,
144586         lib/savedir.c, lib/sig2str.c, lib/strcspn.c, lib/strerror.c,
144587         lib/stripslash.c, lib/strncasecmp.c, lib/strndup.c, lib/strnlen.c,
144588         lib/strnlen1.c, lib/strsep.c, lib/strstr.c, lib/strtod.c,
144589         lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c,
144590         lib/time_r.c, lib/userspec.c, lib/utimecmp.c, lib/version-etc-fsf.c,
144591         lib/version-etc.c, lib/wait-process.c, lib/xalloc-die.c, lib/xgetcwd.c,
144592         lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c, lib/xreadlink.c,
144593         lib/xsetenv.c, lib/xstrndup.c, lib/xstrtoimax.c, lib/xstrtol.c,
144594         lib/xstrtoumax.c, lib/yesno.c:
144595         Standardize inclusion of config.h.
144596         * lib/__fpending.h, lib/dirfd.h, lib/getdate.h, lib/human.h,
144597         lib/inttostr.h:  Removed inclusion of config.h from header files.
144598         * lib/inttostr.c:  Adjusted in-tree users.
144599         * lib/timespec.h: Remove superfluous warning to include config.h.
144600         * lib/atexit.c, lib/chdir-long.c, lib/chown.c, lib/fchown-stub.c,
144601         lib/getgroups.c, lib/gettimeofday.c, lib/lchown.c, lib/lstat.c,
144602         lib/mkdir.c, lib/mkstemp.c, lib/nanosleep.c, lib/openat.c, lib/raise.c,
144603         lib/readtokens0.c, lib/readutmp.c, lib/unlinkdir.c: Guard inclusion of
144604         config.h with HAVE_CONFIG_H.
144606 2005-09-19  Jim Meyering  <jim@meyering.net>
144608         * modules/pathmax (License): Change to LGPL.
144610 2005-09-19  Derek Price  <derek@ximbiot.com>
144612         * config/srclist.txt: glibc's glob.h is now in lib/glob-libc.h.
144614 2005-09-19  Bruno Haible  <bruno@clisp.org>
144616         * gnulib-tool (import): Provide default for --tests-base.
144618 2005-09-19  Bruno Haible  <bruno@clisp.org>
144620         * doc/quote.texi: New file, extracted from gnulib.texi.
144621         * doc/ctime.texi: New file, extracted from gnulib.texi.
144622         * doc/inet_ntoa.texi: New file, extracted from gnulib.texi.
144623         * doc/gnulib-tool.texi: New file, extracted from gnulib.texi.
144624         * doc/gnulib.texi: Include them.
144626 2005-09-18  Bruno Haible  <bruno@clisp.org>
144628         Portability fix.
144629         * gnulib-tool (func_readlink): New function.
144630         (func_ln_if_changed): Use it.
144632 2005-09-18  Bruno Haible  <bruno@clisp.org>
144634         * gnulib-tool: Support --with-tests also with --import.
144635         (func_emit_tests_Makefile_am): Use variables $m4base and $testsbase.
144636         (func_import): Use variables $testsbase and $inctests. Emit a
144637         gl_TESTS_BASE form into gnulib-cache.m4. Create $testsbase/Makefile.am.
144638         Remind the user to add AC_CONFIG_FILES($testsdir/Makefile) and
144639         SUBDIRS += $testsdir.
144640         (func_create_testdir): Update.
144642 2005-09-18  Bruno Haible  <bruno@clisp.org>
144644         * gnulib-tool: Revise --dry-run implementation. Use variable $doit
144645         instead of $dry_run.
144646         (func_cp_if_changed, func_mv_if_changed): Remove functions.
144647         (func_ln_if_changed): Don't handle dry-run here.
144648         (func_import): In dry-run mode, detect more precisely which actions
144649         would be performed, and don't use "...ing" verbs.
144651 2005-09-18  Bruno Haible  <bruno@clisp.org>
144653         * gnulib-tool (func_tmpdir): New function, taken from GNU gettextize.
144654         (func_import): Use join on two temporary files instead of three nested
144655         loops, in order to determine which files are new or old.
144657 2005-09-18  Bruno Haible  <bruno@clisp.org>
144659         * gnulib-tool (func_import): Comment out code that spits out the
144660         new files with --dry-run.
144662 2005-09-18  Bruno Haible  <bruno@clisp.org>
144664         * doc/gnulib.texi (Invoking gnulib-tool): 50% rewritten.
144666 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
144668         * lib/stat-time.h: New file.
144669         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP, ATIME_CMP, CTIME_CMP):
144670         (MTIME_CMP, TIMESPEC_NS): Remove.  Now done by stat-time.h,
144671         in a different way.
144672         (timespec_cmp): New function.
144673         * lib/utimecmp.c: Include stat-time.h.
144674         (SYSCALL_RESOLUTION): Depend on whether various struct stat
144675         members exist, not on the obsolescent ST_MTIM_NSEC.
144676         (utimecmp): Use the new stat-time functions rater than TIMESPEC_NS.
144678 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
144680         * config/srclist.txt: Remove glibc bug 1033 and uncomment mktime.c.
144682 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
144684         * MODULES.html.sh (File system functions): Add stat-time.
144685         * modules/stat-time: New file.
144686         * modules/timespec (Files): Remove m4/st_mtim.m4; this
144687         is now done in a different way, by the stat-time module.
144688         * modules/utimecmp (Depends-on): Add stat-time.
144690 2005-09-15  Paul Eggert  <eggert@cs.ucla.edu>
144692         * m4/st_mtim.m4: Remove.  Superseded by...
144693         * m4/stat-time.m4: New file.
144694         * m4/timespec.m4 (gl_TIMESPEC): Require AC_C_INLINE.
144695         Do not invoke AC_STRUCT_ST_MTIM_NSEC; no longer needed.
144697 2005-09-15  Derek Price  <derek@ximbiot.com>
144699         * m4/strstr.m4 (gl_FUNC_STRSTR): Don't define strstr here.
144701 2005-09-15  Derek Price  <derek@ximbiot.com>
144703         * lib/regex_internal.h: Blank `pure' for GNUC < 3.
144704         * lib/regex_internal.c: Ditto, using this...
144705         (__GNUC_PREREQ): ...new macro.
144706         * lib/regcomp.c, regexec.c: Blank `always_inline' for GNUC < 3.1
144707         using...
144708         (__GNUC_PREREQ): ...this new macro.
144710         * lib/strstr.h: Include string.h. Define strstr as a macro here.
144712 2005-09-15  Derek Price  <derek@ximbiot.com>
144713             Paul Eggert  <eggert@cs.ucla.edu>
144715         * lib/regcomp.c, regexec.c, regex_internal.c: Back out previous
144716         changes, consolidating in...
144717         * lib/regex_internal.h: ...this file.
144719 2005-09-13  Jim Meyering  <jim@meyering.net>
144721         * lib/canon-host.c: Filter through gnu indent and reword comments
144722         slightly.
144723         * lib/canon-host.h (ch_strerror_r): Tweak cpp indentation and spacing.
144725 2005-09-13  Derek Price  <derek@ximbiot.com>
144727         * lib/canon-host.c (canon_host_r): Set *cherror on memory allocation
144728         failure.
144729         Reported by Jim Meyering  <jim@meyering.net>.
144731 2005-09-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
144733         * lib/base64.c: Typo.
144734         (base64_encode): Put b64str in initialized data section.
144736 2005-09-12  Paul Eggert  <eggert@cs.ucla.edu>
144738         Merge glibc and coreutils changes into gnulib, plus a few
144739         extra fixes.
144740         * lib/md5.c: Use #error rather than a string.
144741         (CYCLIC): New macro, from glibc source.  Use it instead of rol.
144742         * lib/md5.h (__GNUC_PREREQ, __THROW): Define if not defined already.
144743         (__attribute__): Define to empty for non recent-GCC.
144744         (__md5_buffer, __md5_finish_ctx, __md5_init_ctx, __md5_process_block):
144745         (__md5_process_bytes, __md5_read_ctx, __md5_stream):
144746         Renamed from their non-__ counterparts, with new macros replacing
144747         them if not _LIBC.  Add __THROW attribute.
144748         (rol): Remove.
144749         (struct md5_ctx): Align buffer if using GCC.
144750         * lib/sha1.h (struct sha1_ctx): Likewise.
144751         * lib/sha1.c (SWAP): Renamed from the NOTSWAP.  All uses changed.
144752         The old name was backwards.
144753         (NOTSWAP): Remove; not used.
144754         (rol): New macro, moved here from md5.h.
144755         (sha1_process_block): Remove a FIXME that doesn't make sense.
144757 2005-09-12  Derek Price  <derek@ximbiot.com>
144759         Return usable errors from canon-host.
144760         * lib/canon-host.h: New file.
144761         * lib/canon-host.c (canon_host): Wrap...
144762         (canon_host_r): ...this new function, which now relies exclusively on
144763         getaddrinfo.
144764         (ch_strerror): New function.
144765         (last_cherror): New global.
144766         * lib/getaddrinfo.c: Move include of getaddrinfo.h first to test
144767         interface.
144768         (getaddrinfo): Add AI_CANONNAME functionality.  Don't do arithmetic on
144769         void *.
144770         (freeaddrinfo): Free ai->ai_canonname when set.
144772 2005-09-12  Derek Price  <derek@ximbiot.com>
144774         Make canon-host require getaddrinfo.
144775         * m4/canon-host.m4 (gl_CANON_HOST): Remove most dependencies.
144776         AC_LIBSOURCE canon-host.h.  Call...
144777         (gl_PREREQ_CANON_HOST): ...this new function, which requires
144778         gl_GETADDRINFO.
144779         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Compile gai_strerror when needed.
144781 2005-09-12  Derek Price  <derek@ximbiot.com>
144783         * modules/canon-host: Add canon-host.h.  Depend on getaddrinfo.  Make
144784         LGPL.
144785         * modules/getaddrinfo: Add link to opengroup spec.  Depend on strdup.
144787 2005-09-12  Derek Price  <derek@ximbiot.com>
144789         * lib/gai_strerror.c: Include config.h when available.  Include
144790         getaddrinfo.h before other headers to test interface.
144791         Reported by Larry Jones <lawrence.jones@ugs.com>.
144793 2005-09-12  Derek Price  <derek@ximbiot.com>
144794             Paul Eggert  <eggert@cs.ucla.edu>
144796         * modules/glob (Files): Add glob-libc.h.
144798 2005-09-12  Derek Price  <derek@ximbiot.com>
144799             Paul Eggert  <eggert@cs.ucla.edu>
144801         * m4/glob.m4 (gl_GLOB_SUBSTITUTE): AC_LIBSOURCES for glob.c,
144802         glob_.h, glob-libc.h.
144803         (gl_PREREQ_GLOB): Remove _SYS_CDEFS_H hack; no longer needed.
144805 2005-09-12  Derek Price  <derek@ximbiot.com>
144806             Paul Eggert  <eggert@cs.ucla.edu>
144808         * lib/glob-libc.h: Renamed from glob_.h.  The new version is
144809         taken from libc's glob.h, except with '#ifdef __GLOB_GNULIB'
144810         protecting things that should be done only in gnulib contexts.
144811         * lib/glob_.h: New file, containing only the glob things needed for
144812         gnulib.
144813         (GLOB_PREFIX): Remove.  All uses changed to look for __GLOB_GNULIB.
144814         (__GLOB_CONCAT, __GLOB_XCONCAT, __GLOB_ID): Remove; no longer needed.
144815         (glob, globfree, glob_pattern_p): Now defined simply in terms of
144816         rpl_glob, rpl_globfree, rpl_glob_pattern_p.
144817         (__GLOB_GNULIB): New macro, to keep the glob.h changes clearer
144818         and to respect the namespace rules better.
144820 2005-09-08  Simon Josefsson  <jas@extundo.com>
144822         * modules/socklen: New file.
144824 2005-09-08  Simon Josefsson  <jas@extundo.com>
144826         * m4/socklen.m4: New file.
144828 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
144830         * modules/utimens (Files): Add m4/utimbuf.m4, since
144831         m4/utimens.m4 requires gl_CHECK_TYPE_STRUCT_UTIMBUF.
144832         Reported by Sergey Poznyakoff.
144834 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
144836         * lib/glob.c (glob, globfree, __glob_pattern_p): Use old-style function
144837         definitions, since that's the preferred style in glibc.
144838         Fix a minor spacing issue, and update copyright notice to match
144839         glibc's.
144841 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
144843         * config/srclist.txt: Remove glibc bug 1061; it's been fixed.
144845 2005-09-06  Simon Josefsson  <jas@extundo.com>
144847         * lib/getpass.c (getpass): Fix typo, test for HAVE_TCSETATTR and not
144848         TCSETATTR.  Reported by Derek Price <derek@ximbiot.com>.
144850 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
144852         * lib/regex_internal.h (bitset_not): Add parens to avoid gcc -Wall
144853         warning.
144855 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
144857         * config/srclist.txt: Add glibc bug 1302.
144859 2005-09-05  Paul Eggert  <eggert@cs.ucla.edu>
144861         Change bitset word type from unsigned int to unsigned long int,
144862         as this has better performance on typical 64-bit hosts.
144863         Port bitset code to hosts with unusual word sizes.
144864         * lib/regcomp.c (build_equiv_class, build_charclass, build_range_exp):
144865         (build_collating_symbol):
144866         Prefer bitset to re_bitset_ptr_t in prototypes, when the actual
144867         argument is a bitset.  This is merely a style issue, but it makes
144868         it clearer that an entire array is expected.
144869         (re_compile_fastmap_iter, init_dfa, init_word_char, optimize_subexps):
144870         * lib/regcomp.c (lower_subexp, parse_bracket_exp, built_charclass_op):
144871         Port to the case where bitset_word is not the same as unsigned int.
144872         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
144873         (bitset_not, bitset_merge, bitset_set_all, bitset_mask):
144874         Likewise.
144875         * lib/regexec.c (check_dst_limits_calc_pos_1,
144876         check_subexp_matching_top):
144877         (build_trtable, group_nodes_into_DFAstates):
144878         Likewise.
144879         * lib/regcomp.c (re_compile_fastmap_iter, utf8_sb_map, optimize_utf8):
144880         Don't assume that SBC_MAX is a multiple of BITSET_WORD_BITS.
144881         * lib/regex_internal.h (bitset_set_all, bitset_not): Likewise.
144882         * lib/regexec.c (group_nodes_into_DFAstates): Likewise.
144883         * lib/regcomp.c (utf8_sb_map): Don't assume UINT_MAX == 0xffffffff.
144884         * lib/regcomp.c (optimize_subexps, lower_subexp):
144885         Work even if bitset_word has holes in its bitwise representation.
144886         * lib/regex_internal.h (BITSET_WORD_BITS): Likewise.
144887         * lib/regexec.c (check_dst_limits_calc_pos_1,
144888         check_subexp_matching_top):
144889         Likewise.
144890         * lib/regex_internal.c (re_string_reconstruct):
144891         Don't assume UCHAR_MAX == 255.
144892         * lib/regex_internal.h (bitset_set_all): Likewise.
144893         * lib/regex_internal.h (BITSET_WORD_BITS): Renamed from UINT_BITS.
144894         All uses changed.
144895         (BITSET_WORDS): Renamed from BITSET_UINTS.  All uses changed.
144896         (bitset_word): New type, replacing 'unsigned int' for bitset uses.
144897         All uses changed.
144898         (BITSET_WORD_MAX): New macro.
144899         (bitset_set, bitset_clear, bitset_contain, bitset_empty):
144900         (bitset_set_all, bitset_copy):  Now inline functions, not macros.
144901         (bitset_empty, bitset_copy):
144902         Prefer sizeof (bitset) to multiplying it out ourselves.
144903         (bitset_not_merge): Remove; unused.
144904         (bitset_contain): Return bool, not unsigned int with one bit on.
144905         All callers changed.
144906         * lib/regexec.c (build_trtable): Don't assume bitset has no stricter
144907         alignment than re_node_set; do this by defining a new internal
144908         type struct dests_alloc and using it to allocate memory.
144910 2005-09-05  Bruno Haible  <bruno@clisp.org>
144912         * gnulib-tool (func_import): Fix comparison in handling of symbolic
144913         links.
144915 2005-09-04  Martin Lambers  <marlam@marlam.de>  (tiny change)
144917         * modules/size_max (Makefile.am): Add size_max.h
144919 2005-09-04  Derek Price  <derek@ximbiot.com>
144921         * gnulib-tool (func_import): Fix reversed $symbolic logic.
144923 2005-09-03  Simon Josefsson  <jas@extundo.com>
144925         * gnulib-tool: Fix typo.
144927 2005-09-03  Simon Josefsson  <jas@extundo.com>
144929         * config/srclist.txt: Add glibc bug 1293.
144931 2005-09-03  Derek Price  <derek@ximbiot.com>
144933         * m4/getlogin_r (gl_GETLOGIN_R): Fix cut & paste error.
144934         From Larry Jones <lawrence.jones@ugs.com>.
144936 2005-09-02  Simon Josefsson  <jas@extundo.com>
144938         * modules/socklen: New file.
144940 2005-09-02  Simon Josefsson  <jas@extundo.com>
144942         * modules/havelib: New module.
144944         * modules/gettext, modules/iconv, modules/lock, modules/readline:
144945         Use havelib.
144947 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
144949         Check for arithmetic overflow when calculating sizes, to prevent
144950         some buffer-overflow issues.  These patches are conservative, in the
144951         sense that when I couldn't determine whether an overflow was possible,
144952         I inserted a run-time check.
144953         * lib/regex_internal.h (re_xmalloc, re_xrealloc, re_x2realloc): New
144954         macros.
144955         (SIZE_MAX) [!defined SIZE_MAX]: New macro.
144956         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc):
144957         (re_xnrealloc, re_x2nrealloc): New inline functions.
144958         * lib/regcomp.c (init_dfa, analyze, build_range_exp,
144959         parse_bracket_exp):
144960         (build_equiv_class, build_charclass): Check for arithmetic overflow
144961         in size expression calculations.
144962         * lib/regex_internal.c (re_string_realloc_buffers):
144963         (build_wcs_upper_buffer, re_node_set_add_intersect):
144964         (re_node_set_init_union, re_node_set_insert, re_node_set_insert_last):
144965         (re_dfa_add_node, register_state): Likewise.
144966         * lib/regexec.c (re_search_stub, re_copy_regs, re_search_internal):
144967         (prune_impossible_nodes, push_fail_stack, set_regs, check_arrival):
144968         (build_trtable, extend_buffers, match_ctx_init, match_ctx_add_entry):
144969         (match_ctx_add_subtop, match_ctx_add_sublast): Likewise.
144971 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
144973         * modules/inttostr (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
144974         m4/ulonglong.m4.  Problem reported by Martin Lambers.
144976 2005-09-02  Bruno Haible  <bruno@clisp.org>
144978         Support for lib vs. lib64 distinction on biarch platforms.
144979         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): New macro.
144980         (AC_LIB_PREFIX): Require it. Use $acl_libdirstem instead of 'lib'.
144981         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Likewise.
144983 2005-09-02  Bruno Haible  <bruno@clisp.org>
144985         * gnulib-tool (import): In the other first-use case, provide defaults
144986         as well.
144988 2005-09-02  Bruno Haible  <bruno@clisp.org>
144990         * config/srclist.txt: lib-link.m4 and lib-prefix.m4 currently have
144991         patches not yet found in the latest gettext release.
144993 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
144995         * lib/glob.c (GET_LOGIN_NAME_MAX): Renamed from LOGIN_NAME_MAX,
144996         to avoid a collision with bits/local_lim.h in glibc.
144997         All uses changed.  Problem reported by Dmitry V. Levin in
144998         <http://sources.redhat.com/bugzilla/show_bug.cgi?id=1060>.
145000         * lib/regex_internal.c (build_wcs_upper_buffer): Fix portability
145001         bugs in int versus size_t comparisons.
145002         (re_string_context_at): Fix bug where the code assumed that
145003         Idx is signed.
145005         Use bool where appropriate.
145006         * lib/regcomp.c (re_set_fastmap): ICASE arg is bool, not int.
145007         All callers changed.
145008         (calc_eclosure_iter): Likewise, for ROOT arg.
145009         (parse_bracket_element): Likewise, for ACCEPT_HYPHEN arg.
145010         (build_charclass_op): Likewise, for NON_MATCH arg.
145011         * lib/regex_internal.c (re_string_allocate, re_string_construct):
145012         (re_string_construct_common): Likewise, for ICASE arg.
145013         * lib/regexec.c (re_search_2_stub, re_search_stub):
145014         Likewise, for RET_LEN arg.
145015         (check_matching): Likewise, for FL_LONGEST_MATCH arg.
145016         (set_regs): Likewise, for FL_BACKTRACK arg.
145017         * lib/regcomp.c (re_compile_fastmap_iter, optimize_utf8):
145018         (duplicate_node_closure, calc_inveclosure, calc_eclosure):
145019         (calc_eclosure_iter, parse_bracket_exp):
145020         Use bool for internal variables that are booleans.
145021         * lib/regexec.c (re_search_internal, check_matching,
145022         proceed_next_node):
145023         (set_regs, build_sifted_states, sift_states_bkref):
145024         (check_arrival_add_next_nodes, check_arrival_expand_ecl_sub):
145025         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
145026         (find_collation_sequence_value):
145027         Likewise.
145028         * lib/regex_internal.c (re_node_set_insert, re_node_set_insert_last):
145029         (re_node_set_compare):
145030         Return bool, not int. All callers changed.
145031         * lib/regexec.c (check_halt_node_context, check_dst_limits):
145032         (build_trtable, check_node_accept): Likewise.
145033         * lib/regex_internal.h: Include stdbool.h.
145035         Fix bugs uncovered when converting to bool.
145036         * lib/regcomp.c (calc_eclosure_iter): Check for storage allocation
145037         failure instead of charging ahead blindly.
145038         * lib/regex_internal.c (register_state): Likewise.
145039         * lib/regexec.c (re_search_2_stub): Use simpler method than boolean
145040         for freeing internal storage.
145041         (group_nodes_into_DFA_states): Use unsigned int, not int, for
145042         bitset pieces used as boolean, to avoid undefined behavior
145043         on hosts that do int overflow checking.
145045 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
145047         * config/srclist.txt: Add glibc bugs 1285-1287.
145049 2005-09-01  Jim Meyering  <jim@meyering.net>
145051         * m4/lchown.m4: Require gl_FUNC_CHOWN, for the definition of
145052         CHOWN_MODIFIES_SYMLINK, which is used by lchown.c.
145053         Require gl_STAT_MACROS, too.
145055 2005-09-01  Bruno Haible  <bruno@clisp.org>
145057         * gnulib-tool (import): In the first-use case, provide defaults.
145059 2005-09-01  Bruno Haible  <bruno@clisp.org>
145061         * gnulib-tool (func_import): Remove the .tmp files.
145063 2005-09-01  Bruno Haible  <bruno@clisp.org>
145065         * gnulib-tool (func_import): Fix handling of symbolic links.
145067 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
145069         On 64-bit hosts (where size_t is 64 bits and int is 32 bits), the
145070         old glibc regex code mishandles strings longer than 2**31 bytes.
145071         This patch fixes this when the regex code is used in gnulib
145072         (i.e., outside glibc).
145074         This patch should not affect the use of the regex code inside
145075         glibc.  No doubt this problem also needs to be handled for glibc
145076         as well, but the result will be an incompatible change to the
145077         glibc ABI, and the old ABI will have to be supported too.  That
145078         can be the subject for another patch.
145080         * lib/regex.h (_REGEX_LARGE_OFFSETS): New feature-test macro,
145081         governing whether the rest of this patch is active.  By default,
145082         the macro is disabled and the patch has no effect.
145083         (regoff_t) [defined _REGEX_LARGE_OFFSETS]: Define to off_t, not int.
145084         (__re_idx_t, __re_size_t, __re_long_size_t): New types.
145085         (struct re_pattern_buffer, re_search, re_search_2, re_match):
145086         (re_match_2, re_set_registers): Use the new types.
145087         * lib/regex_internal.h (Idx, re_hashval_t): New types.
145088         (REG_MISSING, REG_ERROR, REG_VALID_INDEX, REG_VALID_NONZERO_INDEX):
145089         New macros.
145090         (re_node_set, re_charset_t, re_token_t, re_string_realloc_buffers):
145091         (re_string_context_at, bin_tree_t, re_dfastate_t):
145092         (struct re_state_table_entry, state_array_t, re_sub_match_last_t):
145093         (re_sub_match_top_t, re_match_context_t, re_sift_context_t):
145094         (struct re_fail_stack_ent_t, struct re_fail_stack_t, struct re_dfa_t):
145095         (re_string_char_size_at, re_string_wchar_at):
145096         (re_string_elem_size_at):
145097         Use the new types and macros to port to 64-bit hosts.
145098         Use unsigned types for internal values, so that the code
145099         mostly works even for arrays larger than SSIZE_MAX.
145100         * lib/regcomp.c (re_compile_internal, init_dfa, duplicate_node):
145101         (search_duplicated_node, calc_eclosure_iter, fetch_number):
145102         (parse_reg_exp, parse_branch, parse_expression, parse_sub_exp):
145103         (build_equiv_class, build_charclass, re_compile_fastmap_iter):
145104         (free_dfa_content, create_initial_state, optimize_utf8, analyze):
145105         (optimize_subexps, calc_first, link_nfa_nodes, duplicate_node_closure):
145106         (calc_inveclosure, parse_dup_op, build_range_exp):
145107         (build_collating_symbol, parse_bracket_exp, build_charclass_op):
145108         (fetch_number, create_token_tree, mark_opt_subexp):
145109         Likewise.
145110         * lib/regex_internal.c (re_string_construct_common,
145111         create_ci_newstate):
145112         (create_cd_newstate, re_string_allocate, re_string_construct):
145113         (re_string_realloc_buffers, build_wcs_upper_buffer):
145114         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
145115         (re_string_reconstruct, re_string_peek_byte_case):
145116         (re_string_fetch_byte_case, re_string_context_at):
145117         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
145118         (re_node_set_init_copy, re_node_set_add_intersect):
145119         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
145120         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
145121         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
145122         (re_acquire_state, re_acquire_state_context, register_state):
145123         Likewise.
145124         * lib/regex.c (match_ctx_init, match_ctx_add_entry,
145125         search_cur_bkref_entry):
145126         (match_ctx_add_subtop, match_ctx_add_sublast, sift_ctx_init):
145127         (re_search_internal, re_search_2_stub, re_search_stub)
145128         (re_copy_regs, check_matching, check_halt_state_context, update_regs):
145129         (push_fail_stack, sift_states_iter_mb, build_sifted_states):
145130         (update_cur_sifted_state, check_dst_limits):
145131         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
145132         (check_subexp_limits, sift_states_bkref, merge_state_array):
145133         (check_subexp_matching_top, get_subexp, get_subexp_sub):
145134         (find_subexp_node, check_arrival, check_arrival_add_next_nodes):
145135         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
145136         (expand_bkref_cache, check_node_accept_bytes):
145137         (group_nodes_into_DFAstates, check_node_accept, regexec, re_match):
145138         (re_search, re_match_2, re_search_2, prune_impossible_nodes):
145139         (acquire_init_state_context, check_halt_node_context):
145140         (proceed_next_node, pop_fail_stack, set_regs, free_fail_stack_return):
145141         (sift_states_backward, clean_state_log_if_needed):
145142         (sub_epsilon_src_nodes, add_epsilone_src_nodes, merge_state_with_log):
145143         (find_recover_state, transit_state_sb, transit_state_mb):
145144         (transit_state_bkref, build_trtable, match_ctx_clean):
145145         Likewise.
145146         * lib/regcomp.c (parse_dup_op): Add an extra test if Idx is unsigned,
145147         to work around an assumption that REG_MISSING is negative.
145149         * lib/regcomp.c (re_comp) [defined _REGEX_RE_COMP || defined _LIBC]:
145150         (seek_collating_symbol_entry) [defined _LIBC]:
145151         (lookup_collation_sequence_value) [defined _LIBC]:
145152         (build_range_exp, build_collating_symbol) [defined _LIBC]:
145153         Use prototypes rather than old-style function definitions.
145154         * lib/regexec.c (re_exec) [defined _REGEX_RE_COMP || defined _LIBC]:
145155         (transit_state_sb) [0]:
145156         (find_collation_sequence_value) [defined _LIBC]: Likewise.
145158         * lib/regexec.c (re_search_internal): Simplify update of rm_so and
145159         rm_eo.
145161         * lib/regcomp.c (re_compile_fastmap_iter, init_dfa, init_word_char):
145162         (optimize_subexps, lower_subexp):
145163         Don't assume 1<<31 has defined behavior on hosts with 32-bit int,
145164         since the signed shift might overflow.  Use 1u<<31 instead.
145165         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
145166         Likewise.
145167         * lib/regexec.c (check_dst_limits_calc_pos_1,
145168         check_subexp_matching_top): Likewise.
145170         * lib/regcomp.c (optimize_subexps, lower_subexp):
145171         Use CHAR_BIT rather than 8, for clarity.
145172         * lib/regexec.c (check_dst_limits_calc_pos_1):
145173         (check_subexp_matching_top): Likewise.
145174         * lib/regcomp.c (init_dfa): Make table_size unsigned, so that we don't
145175         have to worry about portability issues when shifting it left.
145176         Remove no-longer-needed test for table_size > 0.
145177         * lib/regcomp.c (parse_sub_exp): Do not shift more bits than there are
145178         in a word, as the resulting behavior is undefined.
145179         * lib/regexec.c (check_dst_limits_calc_pos_1): Likewise;
145180         in one case, a <= should have been an <, and in another case the
145181         whole test was missing.
145182         * lib/regex_internal.h (BYTE_BITS): Remove.  All uses changed to
145183         the standard name CHAR_BIT.
145184         * lib/regexec.c (match_ctx_add_entry): Don't assume that ~0 == -1;
145185         this is not true on one's complement and signed-magnitude hosts.
145187         * lib/regex_internal.h (re_sub_match_top_t): Remove unused member
145188         next_last_offset.
145189         (struct re_dfa_t): Remove unused member states_alloc.
145190         * lib/regcomp.c (init_dfa): Don't initialize unused members.
145192 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
145194         * m4/regex.m4 (gl_REGEX): Require AC_SYS_LARGEFILE, Define
145195         _REGEX_LARGE_OFFSETS).  Test for regoff_t/off_t bug in 64-bit
145196         and large-file glibc and in 32-bit large-file Solaris.
145198 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
145200         * lib/regex_internal.c (re_string_reconstruct): Don't assume buffer
145201         lengths fit in regoff_t; this isn't true if regoff_t is the same
145202         width as size_t.
145203         * lib/regex.c (re_search_internal): 5th arg is LAST_START
145204         (= START + RANGE) instead of RANGE.  This avoids overflow
145205         problems when regoff_t is the same width as size_t.
145206         All callers changed.
145207         (re_search_2_stub): Check for overflow when adding the
145208         sizes of the two strings.
145209         (re_search_stub): Check for overflow when adding START
145210         to RANGE; if it occurs, substitute the extreme value.
145212 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
145214         * config/srclist.txt: Add glibc bugs 1273, 1278-1282, 1284.
145216 2005-08-31  Jim Meyering  <jim@meyering.net>
145218         * lib/regcomp.c (search_duplicated_node): Make first pointer arg
145219         a pointer-to-const.
145220         * lib/regex_internal.c (create_ci_newstate, create_cd_newstate):
145221         (register_state): Likewise.
145222         * lib/regexec.c (search_cur_bkref_entry, check_dst_limits):
145223         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
145224         (group_nodes_into_DFAstates): Likewise.
145226 2005-08-31  Jim Meyering  <jim@meyering.net>
145228         * check-module: Add a FIXME comment.
145230 2005-08-31  Eric Blake  <ebb9@byu.net>
145232         * modules/unistd-safer (Files): Add unistd--.h.
145233         * modules/stdio-safer (Files): Add stdio--.h.
145235 2005-08-31  Derek Price  <derek@ximbiot.com>
145237         * lib/getdelim.c (getdelim): Return EOF on EOF.
145238         Reported by Larry Jones <lawrence.jones@ugs.com>.
145240 2005-08-31  Bruno Haible  <bruno@clisp.org>
145242         Avoid unnecessary diffs in the generated lib/Makefile.am.
145243         * gnulib-tool (func_emit_lib_Makefile_am): Don't write the cmd into
145244         the generated files.
145245         (func_import): Don't set cmd.
145247 2005-08-31  Bruno Haible  <bruno@clisp.org>
145249         * lib/strstr.c: Include <stddef.h>, for NULL.
145250         * lib/strcasestr.c: Likewise.
145251         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
145253 2005-08-31  Bruno Haible  <bruno@clisp.org>
145255         * gnulib-tool: New option --macro-prefix.
145256         (func_import): Use macro_prefix.
145257         (import): Handle option --macro-prefix.
145259 2005-08-31  Bruno Haible  <bruno@clisp.org>
145261         * gnulib-tool (import): Rename most ac_* variables to cached_*.
145262         Also use new variables cached_lgpl, cached_libtool.
145264 2005-08-31  Bruno Haible  <bruno@clisp.org>
145266         * gnulib-tool (func_import): Require AC_GNU_SOURCE etc. instead of
145267         always instantiating them.
145269 2005-08-31  Bruno Haible  <bruno@clisp.org>
145271         * gnulib-tool (func_import): Read the previous cached settings
145272         from gnulib-cache.m4 and gnulib-comp.m4. Remove files that were
145273         earlier added by gnulib but are now dropped. Warn when a gnulib file
145274         overwrites a non-gnulib file.
145276 2005-08-31  Bruno Haible  <bruno@clisp.org>
145278         * gnulib-tool (func_import): Generate two files gnulib-cache.m4 and
145279         gnulib-comp.m4 instead of a single gnulib.m4, to make it easy for
145280         projects that don't keep autogenerated files in CVS. Put into
145281         actioncmd only the specified modules, not the transitive closure.
145283 2005-08-31  Bruno Haible  <bruno@clisp.org>
145285         * gnulib-tool (func_import): Fix defaulting of $libname and $libtool.
145286         Create directories that shall be filled.
145287         (import): Don't look for gl_* macros in configure.ac. Recurse across
145288         all directories containing a gnulib-cache.m4 files, if meaningful.
145290 2005-08-31  Bruno Haible  <bruno@clisp.org>
145292         * gnulib-tool (func_import): Emit also a stub for gl_LIBTOOL.
145293         (import): Set seen_libtool when we see gl_LIBTOOL.
145295 2005-08-31  Bruno Haible  <bruno@clisp.org>
145297         * gnulib-tool (func_import): Also copy m4/gnulib-tool.m4. Omit
145298         declaration macro definitions from generated gnulib.m4.
145300 2005-08-30  Oskar Liljeblad  <oskar@osk.mine.nu>
145302         * lib/iconvme.h: Add prototype for iconv_alloc.
145304 2005-08-29  Simon Josefsson  <jas@extundo.com>
145306         * lib/iconvme.c: Fix errno.
145308 2005-08-29  Bruno Haible  <bruno@clisp.org>
145310         * gnulib-tool: Enclose all occurrences of $destdir in "...", so
145311         that it works when the directory contains spaces.
145313 2005-08-29  Bruno Haible  <bruno@clisp.org>
145315         * gnulib-tool (import): Avoid unnecessary spaces in $avoidlist.
145317 2005-08-29  Bruno Haible  <bruno@clisp.org>
145319         * gnulib-tool (func_import): Emit more comments into gnulib.m4.
145320         Emit more advice.
145322 2005-08-29  Bruno Haible  <bruno@clisp.org>
145323         and Stepan Kasal  <kasal@ucw.cz>
145325         * check-module: If more parameters are given, check each of them
145326         separately; add more exceptions, as noted by Jim Meyering.
145327         (check_module): New procedure.
145328         (%exempt_header): Now contains all exceptions.
145330 2005-08-29  Ben Pfaff  <blp@cs.stanford.edu>
145332         * modules/byteswap (Makefile.am): Fix rule to not assume GNU make.
145334 2005-08-29  Oskar Liljeblad  <oskar@osk.mine.nu>
145336         * lib/iconvme.c: Split iconv_string into iconv_alloc.
145338 2005-08-28  Bruno Haible  <bruno@clisp.org>
145340         * m4/gnulib-tool.m4: New file.
145342 2005-08-27  Jim Meyering  <jim@meyering.net>
145344         * modules/unistd-safer (Files): Add pipe-safer.c.
145345         * modules/fcntl-safer (Files): Add creat-safer.c.
145347 2005-08-27  Jim Meyering  <jim@meyering.net>
145349         * m4/stdlib-safer.m4: New file.  From coreutils.
145350         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add stdio--.h.
145351         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Add creat-safer.c to the
145352         AC_LIBSOURCES list and arrange to compile it via AC_LIBOBJ.
145353         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise, add pipe-safer.c.
145354         Add pipe-safer.c and unistd--.h to the AC_LIBSOURCES list.
145356 2005-08-27  Jim Meyering  <jim@meyering.net>
145358         * lib/fopen-safer.c: Merge minor changes from coreutils.
145359         * lib/dup-safer.c: Likewise.
145360         * lib/fd-safer.c: Likewise.
145362         Merge from coreutils.
145363         * lib/stdio--.h: New file.
145364         * lib/stdlib--.h: New file.
145365         * lib/mkstemp-safer.c: New file.
145367         GNU tar needs these.
145368         * lib/pipe-safer.c: New file.
145369         * lib/creat-safer.c: New file.
145370         * lib/fcntl--.h (creat): Define to creat_safer.
145371         * lib/fcntl-safer.h: Include <sys/types.h> and declare creat_safer.
145372         * lib/unistd--.h (pipe): Define to pipe_safer.
145373         * lib/unistd-safer.h: Declare pipe_safer.
145375 2005-08-26  Simon Josefsson  <jas@extundo.com>
145377         * lib/getpass.c: Use _WIN32 instead of WIN32, suggested by Bruno
145378         Haible <bruno@clisp.org>.
145380 2005-08-26  Paul Eggert  <eggert@cs.ucla.edu>
145382         * lib/regex_internal.h: Remove all references to
145383         RE_NO_INTERNAL_PROTOTYPES; no longer neeeded now that we assume C89
145384         or better.
145385         (bitset_not, bitset_merge, bitset_not_merge):
145386         (bitset_mask, re_string_allocate, re_string_construct):
145387         (re_string_reconstruct, re_string_destruct, re_string_elem_size_at):
145388         (re_string_char_size_at, re_string_wchar_at, re_string_peek_byte_case):
145389         (re_string_fetch_byte_case, re_node_set_alloc, re_node_set_init_1):
145390         (re_node_set_init_2, re_node_set_init_copy, re_node_set_add_intersect):
145391         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
145392         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
145393         (re_node_set_remove_at, re_dfa_add_node, re_acquire_state):
145394         (re_acquire_state_context):
145395         Remove unnecessary forward decls.
145396         (re_string_char_size_at, re_string_wchar_at, re_string_elem_size_at):
145397         Put __attribute at function definition,
145398         now that the function decl has been removed.
145399         * lib/regex_internal.c (re_string_peek_byte_case):
145400         (re_string_fetch_byte_case, re_node_set_compare, re_node_set_contains):
145401         Likewise.
145403 2005-08-25  Stepan Kasal  <kasal@ucw.cz>
145405         * m4/regex.m4: Add AC_PREREQ(2.50).
145406         (gl_REGEX): If --with-included-regex was given, skip the autodetection.
145408 2005-08-25  Simon Josefsson  <jas@extundo.com>
145410         * m4/getpass.m4: Check for termios.h, tcgetattr, tcsetattr, and
145411         __fsetlocking.
145413 2005-08-25  Simon Josefsson  <jas@extundo.com>
145415         * lib/getpass.c: Add WIN32 implementation.  Conditionalize use of
145416         termios.h, tcgetattr, tcsetattr and __fsetlocking.  Remove some
145417         GLIBC specific code.
145419 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
145421         Make regex safe for g++.  This fixes one real bug (an "err"
145422         that should have been "*err").  g++ problem reported by
145423         Sam Steingold.
145424         * lib/regex_internal.h (re_calloc): New macro, consistent with
145425         re_malloc etc.  All callers of calloc changed to use re_calloc.
145426         * lib/regex_internal.c (build_wcs_upper_buffer): Return reg_errcode_t,
145427         not int.  All callers changed.
145428         * lib/regcomp.c (re_compile_fastmap_iter): Don't use
145429         alloca (mb_cur_max); just use an array of size MB_LEN_MAX.
145430         * lib/regexec.c (push_fail_stack): Use re_realloc, not realloc.
145431         (find_recover_state): Change "err" to "*err"; this fixes what
145432         appears to be a real bug.
145433         (check_arrival_expand_ecl_sub): Be consistent about reg_errcode_t
145434         versus int.
145436 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
145438         * modules/regex (Depends-on): Add malloc, since the code
145439         assumes that !malloc(0) means failure.
145441 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
145443         * lib/regexec.c (set_regs): Don't alloca with an unbounded size.
145445         alloca modernization/simplification for regex.
145446         * lib/regex.c: Remove portability cruft for alloca.  This no longer
145447         needs to be at the start of the file, and can be moved into
145448         regex_internal.h and simplified.
145449         * lib/regex_internal.h: Include <alloca.h>.
145450         (__libc_use_alloca) [!defined _LIBC]: New macro.
145451         * lib/regexec.c (build_trtable): Remove "#ifdef _LIBC", since the code
145452         now works outside glibc.
145454 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
145456         * config/srclist.txt: Add glibc bugs 1241, 1245.
145458 2005-08-25  Jim Meyering  <jim@meyering.net>
145460         * lib/open-safer.c: Include <config.h>.
145461         Otherwise, we'd lose LARGEFILE support in any file using
145462         e.g. "fcntl--.h"
145464 2005-08-25  Bruno Haible  <bruno@clisp.org>
145466         * m4/minmax.m4: Require autoconf 2.52.
145467         (gl_MINMAX_IN_HEADER): Add comments. Use m4_pushdef/m4_popdef instead
145468         of define/undefine. Use AS_TR_SH and AS_TR_CPP as more robust
145469         alternatives of translit over the alphabet.
145470         Based on a patch from Stepan Kasal <kasal@ucw.cz>.
145472 2005-08-24  Simon Josefsson  <jas@extundo.com>
145474         * tests/test-getpass.c: New file.
145476 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
145478         * m4/regex.m4 (gl_REGEX): Use POSIX-compliant spellings when testing
145479         for GNU regex features.
145481 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
145483         * lib/regcomp.c (regerror): 2nd arg is 'restrict', as per POSIX.
145484         * lib/regex.h (regerror): Likewise.
145486         * lib/regex.c: Do not include <sys/types.h>, as POSIX no longer
145487         requires this.  (The code never needed it.)
145489         * lib/regcomp.c, regex_internal.c, regex_internal.h, regexec.c:
145490         All uses of recently-renamed identifiers changed to use the new,
145491         POSIX-compliant names.  The code will build and run just fine
145492         without these changes, but it's better to eat our own dog food
145493         and use the standard-conforming names.
145495         * lib/regex.h: Fix a multitude of POSIX name space violations.
145496         These changes have an effect only for programs that define
145497         _POSIX_C_SOURCE, _POSIX_SOURCE, or _XOPEN_SOURCE; they
145498         do not change anything for programs compiled in the normal way.
145499         Also, there is no effect on the ABI.
145501         (_REGEX_SOURCE): New macro.
145502         Do not include <stddef.h> if _XOPEN_SOURCE and VMS are both
145503         defined and _GNU_SOURCE is not; this fixes a name space violation.
145505         Rename the following macros to obey POSIX requirements.
145506         The old names are still visible as macros if _REGEX_SOURCE is defined.
145507         (REG_BACKSLASH_ESCAPE_IN_LISTS): renamed from
145508         RE_BACKSLASH_ESCAPE_IN_LISTS.
145509         (REG_BK_PLUS_QM): renamed from RE_BK_PLUS_QM.
145510         (REG_CHAR_CLASSES): renamed from RE_CHAR_CLASSES.
145511         (REG_CONTEXT_INDEP_ANCHORS): renamed from RE_CONTEXT_INDEP_ANCHORS.
145512         (REG_CONTEXT_INDEP_OPS): renamed from RE_CONTEXT_INDEP_OPS.
145513         (REG_CONTEXT_INVALID_OPS): renamed from RE_CONTEXT_INVALID_OPS.
145514         (REG_DOT_NEWLINE): renamed from RE_DOT_NEWLINE.
145515         (REG_DOT_NOT_NULL): renamed from RE_DOT_NOT_NULL.
145516         (REG_HAT_LISTS_NOT_NEWLINE): renamed from RE_HAT_LISTS_NOT_NEWLINE.
145517         (REG_INTERVALS): renamed from RE_INTERVALS.
145518         (REG_LIMITED_OPS): renamed from RE_LIMITED_OPS.
145519         (REG_NEWLINE_ALT): renamed from RE_NEWLINE_ALT.
145520         (REG_NO_BK_BRACES): renamed from RE_NO_BK_BRACES.
145521         (REG_NO_BK_PARENS): renamed from RE_NO_BK_PARENS.
145522         (REG_NO_BK_REFS): renamed from RE_NO_BK_REFS.
145523         (REG_NO_BK_VBAR): renamed from RE_NO_BK_VBAR.
145524         (REG_NO_EMPTY_RANGES): renamed from RE_NO_EMPTY_RANGES.
145525         (REG_UNMATCHED_RIGHT_PAREN_ORD): renamed from
145526         RE_UNMATCHED_RIGHT_PAREN_ORD.
145527         (REG_NO_POSIX_BACKTRACKING): renamed from RE_NO_POSIX_BACKTRACKING.
145528         (REG_NO_GNU_OPS): renamed from RE_NO_GNU_OPS.
145529         (REG_DEBUG): renamed from RE_DEBUG.
145530         (REG_INVALID_INTERVAL_ORD): renamed from RE_INVALID_INTERVAL_ORD.
145531         (REG_IGNORE_CASE): renamed from RE_ICASE.  This renaming is a bit
145532         unusual, since we can't clash with the POSIX REG_ICASE.
145533         (REG_CARET_ANCHORS_HERE): renamed from RE_CARET_ANCHORS_HERE.
145534         (REG_CONTEXT_INVALID_DUP): renamed from RE_CONTEXT_INVALID_DUP.
145535         (REG_NO_SUB): renamed from RE_NO_SUB.
145536         (REG_SYNTAX_EMACS): renamed from RE_SYNTAX_EMACS.
145537         (REG_SYNTAX_AWK): renamed from RE_SYNTAX_AWK.
145538         (REG_SYNTAX_GNU_AWK): renamed from RE_SYNTAX_GNU_AWK.
145539         (REG_SYNTAX_POSIX_AWK): renamed from RE_SYNTAX_POSIX_AWK.
145540         (REG_SYNTAX_GREP): renamed from RE_SYNTAX_GREP.
145541         (REG_SYNTAX_EGREP): renamed from RE_SYNTAX_EGREP.
145542         (REG_SYNTAX_POSIX_EGREP): renamed from RE_SYNTAX_POSIX_EGREP.
145543         (REG_SYNTAX_ED): renamed from RE_SYNTAX_ED.
145544         (REG_SYNTAX_SED): renamed from RE_SYNTAX_SED.
145545         (_REG_SYNTAX_POSIX_COMMON): renamed from _RE_SYNTAX_POSIX_COMMON.
145546         (REG_SYNTAX_POSIX_BASIC): renamed from RE_SYNTAX_POSIX_BASIC.
145547         (REG_SYNTAX_POSIX_MINIMAL_BASIC): renamed from
145548         RE_SYNTAX_POSIX_MINIMAL_BASIC.
145549         (REG_SYNTAX_POSIX_EXTENDED): renamed from RE_SYNTAX_POSIX_EXTENDED.
145550         (REG_SYNTAX_POSIX_MINIMAL_EXTENDED): renamed from
145551         RE_SYNTAX_POSIX_MINIMAL_EXTENDED.
145552         (REG_DUP_MAX): renamed from RE_DUP_MAX.  No need to undef it.
145553         (REG_UNALLOCATED): Renamed from REGS_UNALLOCATED.
145554         (REG_REALLOCATE): Renamed from REGS_REALLOCATE.
145555         (REG_FIXED): Renamed from REGS_FIXED.
145556         (REG_NREGS): Renamed from RE_NREGS.
145558         (REG_ICASE, REG_NEWLINE, REG_NOSUB): Do not depend on the values
145559         of other REG_* macros, since POSIX says the user is allowed to
145560         #undef these macros selectively.
145562         (reg_errcode_t): Update comment stating what other tables need
145563         to be consistent.
145565         Rename the following enum values to obey POSIX requirements.
145566         The old names are still visible as macros.
145567         (_REG_ENOSYS): Renamed from REG_ENOSYS.  Define even if _XOPEN_SOURCE
145568         is not defined, since GNU is supposed to be a superset of POSIX as
145569         much as possible, and since we want reg_errcode_t to be a signed
145570         type for implementation consistency.
145571         (_REG_NOERROR): Renamed from REG_NOERROR.
145572         (_REG_NOMATCH): Renamed from REG_NOMATCH.
145573         (_REG_BADPAT): Renamed from REG_BADPAT.
145574         (_REG_ECOLLATE): Renamed from REG_ECOLLATE.
145575         (_REG_ECTYPE): Renamed from REG_ECTYPE.
145576         (_REG_EESCAPE): Renamed from REG_EESCAPE.
145577         (_REG_ESUBREG): Renamed from REG_ESUBREG.
145578         (_REG_EBRACK): Renamed from REG_EBRACK.
145579         (_REG_EPAREN): Renamed from REG_EPAREN.
145580         (_REG_EBRACE): Renamed from REG_EBRACE.
145581         (_REG_BADBR): Renamed from REG_BADBR.
145582         (_REG_ERANGE): Renamed from REG_ERANGE.
145583         (_REG_ESPACE): Renamed from REG_ESPACE.
145584         (_REG_BADRPT): Renamed from REG_BADRPT.
145585         (_REG_EEND): Renamed from REG_EEND.
145586         (_REG_ESIZE): Renamed from REG_ESIZE.
145587         (_REG_ERPAREN): Renamed from REG_ERPAREN.
145588         (REG_ENOSYS, REG_NOERROR, REG_NOMATCH, REG_BADPAT, REG_ECOLLATE):
145589         (REG_ECTYPE, REG_EESCAPE, REG_ESUBREG, REG_EBRACK, REG_EPAREN):
145590         (REG_EBRACE, REG_BADBR, REG_ERANGE, REG_ESPACE, REG_BADRPT, REG_EEND):
145591         (REG_ESIZE, REG_ERPAREN): Now macros, not enum constants.
145593         (_REG_RE_NAME, _REG_RM_NAME): New macros.
145594         (REG_TRANSLATE_TYPE): Renamed from RE_TRANSLATE_TYPE.  All uses
145595         changed.  But support the old name if the new one is not defined
145596         and if _REGEX_SOURCE.
145598         Change the following member names in struct re_pattern_buffer.
145599         The old names are still supported if !_REGEX_SOURCE.
145600         The new names are always supported, regardless of _REGEX_SOURCE.
145601         (re_buffer): Renamed from buffer.
145602         (re_allocated): Renamed from allocated.
145603         (re_used): Renamed from used.
145604         (re_syntax): Renamed from syntax.
145605         (re_fastmap): Renamed from fastmap.
145606         (re_translate): Renamed from translate.
145607         (re_can_be_null): Renamed from can_be_null.
145608         (re_regs_allocated): Renamed from regs_allocated.
145609         (re_fastmap_accurate): Renamed from fastmap_accurate.
145610         (re_no_sub): Renamed from no_sub.
145611         (re_not_bol): Renamed from not_bol.
145612         (re_not_eol): Renamed from not_eol.
145613         (re_newline_anchor): Renamed from newline_anchor.
145615         Change the following member names in struct re_registers.
145616         The old names are still supported if !_REGEX_SOURCE.
145617         The new names are always supported, regardless of _REGEX_SOURCE.
145618         (rm_num_regs): Renamed from num_regs.
145619         (rm_start): Renamed from start.
145620         (rm_end): Renamed from end.
145622         (re_set_syntax, re_compile_pattern, re_compile_fastmap):
145623         (re_search, re_search_2, re_match, re_match_2, re_set_registers):
145624         Prepend __ to parameter names.
145626         Undo yesterday's changes.
145628 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
145630         * config/srclist.txt: Remove glibc bug 1233 and add 1236, which
145631         supersedes it. Add glibc bugs 1237, 1238, 1240.  Comment out
145632         lib/regex.c.
145634 2005-08-24  Jim Meyering  <jim@meyering.net>
145636         Sync from coreutils.
145637         * m4/fcntl-safer.m4: New file.
145639         * m4/xgetcwd.m4: Use AC_LIBSOURCES and AC_LIBOBJ to indicate source
145640         and object files for this module.
145642 2005-08-24  Jim Meyering  <jim@meyering.net>
145644         Sync from coreutils.
145645         * lib/fcntl--.h, lib/fcntl-safer.h, lib/open-safer.c: New files.
145647 2005-08-24  Jim Meyering  <jim@meyering.net>
145649         * modules/xgetcwd (Makefile.am): Remove `lib_SOURCES += ...' line,
145650         now that xgetcwd.m4 requires xgetcwd.c and xgetcwd.h.
145652 2005-08-24  Jim Meyering  <jim@meyering.net>
145654         * modules/fcntl-safer: New module.
145655         * modules/fts (Depends-on): Add fcntl-safer.
145656         * MODULES.html.sh (File descriptor based Input/Output):
145657         Add fcntl-safer.
145659 2005-08-24  Bruno Haible  <bruno@clisp.org>
145661         Support for unit test modules.
145662         * modules/README: Mention tests modules.
145663         * modules/TEMPLATE-TESTS: New file.
145664         * gnulib-tool: New options --extract-tests-module, --with-tests and
145665         --tests-base (unused for the moment).
145666         (testsbase, inctests): New variables.
145667         (func_all_modules): Exclude TEMPLATE-TESTS and *-tests.
145668         (func_verify_module): Exclude TEMPLATE-TESTS.
145669         (func_verify_nontests_module, func_verify_tests_module): New functions.
145670         (func_get_dependencies): Add implicit dependency for tests modules.
145671         (func_get_tests_module): New function.
145672         (func_modules_transitive_closure): When --with-tests was specified,
145673         include the unit tests as well, unless explicitly avoided.
145674         (func_emit_lib_Makefile_am): Ignore the tests modules here.
145675         (func_emit_tests_Makefile_am): New function.
145676         (func_create_testdir): When --with-tests was specified, emit a
145677         tests/ directory.
145678         * MODULES.html.sh (Future developments): Update.
145680 2005-08-24  Bruno Haible  <bruno@clisp.org>
145682         * modules/tls-tests: New file.
145683         * tests/test-tls.c: New file, from GNU gettext.
145685 2005-08-24  Bruno Haible  <bruno@clisp.org>
145687         * modules/lock-tests: New file.
145688         * tests/test-lock.c: New file, from GNU gettext.
145690 2005-08-24  Bruno Haible  <bruno@clisp.org>
145692         * lib/lock.h: Add multiple inclusion guard.
145693         * lib/tls.h: Add multiple inclusion guard.
145695 2005-08-24  Bruno Haible  <bruno@clisp.org>
145697         * gnulib-tool: Add support for the --aux-dir option to
145698         --create-testdir, --create-megatestdir, --test, --megatest.
145699         (func_create_testdir, func_create_megatestdir): Optionally emit a
145700         AC_CONFIG_AUX_DIR directive.
145701         (create-testdir, create-megatestdir, test, megatest): Provide a
145702         default value for $auxdir.
145704 2005-08-24  Bruno Haible  <bruno@clisp.org>
145706         * gnulib-tool (import): Use compound statement instead of subshell
145707         where possible.
145709 2005-08-24  Bruno Haible  <bruno@clisp.org>
145711         * gnulib-tool (import): Change --aux-dir default to "build-aux".
145713 2005-08-24  Bruno Haible  <bruno@clisp.org>
145715         * gnulib-tool (func_version): Update.
145717 2005-08-24  Bruno Haible  <bruno@clisp.org>
145719         * gnulib-tool (func_import, func_create_testdir,
145720         func_create_megatestdir): Quote all autoconf macro arguments.
145722 2005-08-24  Bruno Haible  <bruno@clisp.org>
145724         * gnulib-tool (func_create_megatestdir): Call autoreconf without the
145725         option --force, because --force causes the aclocal.m4 of each
145726         subdirectory to be newer than the corresponding config.h.in.
145728 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
145730         * m4/regex.m4 (gl_INCLUDED_REGEX): Remove; no longer used.
145731         All contents moved to gl_REGEX.
145732         (gl_REGEX): Don't bother checking whether lib/regex.c exists;
145733         assume that it does.
145735 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
145737         * lib/regex.h (REG_NOSYS)
145738         [!defined _XOPEN_SOURCE && 200112L <= _POSIX_C_SOURCE]:
145739         Define, since POSIX requires it as of 2001.
145740         (_REG_ENOSYS)
145741         [! (defined _XOPEN_SOURCE || 200112L <= _POSIX_C_SOURCE)]:
145742         New private symbol, used to keep the enum signed in all cases.
145743         * lib/regex.h (RE_NO_EMPTY_RANGES): Fix doc bug reported by James
145744         Youngman in
145745         <http://lists.gnu.org/r/bug-gnulib/2005-07/msg00132.html>.
145747         * lib/regex_internal.c (re_string_skip_chars, register_state):
145748         (calc_state_hash):
145749         Remove forward decls; no longer needed now that we use prototypes.
145750         * lib/regexec.c (acquire_init_state_context, check_halt_node_context):
145751         (proceed_next_node, pop_fail_stack, sub_epsilon_src_nodes):
145752         (clean_state_log_if_needed): Likewise.
145754 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
145756         * config/srclist.txt: Add glibc bugs 1231-1233.
145758 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
145760         Fix problems reported by Sam Steingold in
145761         <http://lists.gnu.org/r/bug-gnulib/2005-08/msg00007.html>.
145762         * lib/regexec.c (sift_states_bkref): Fix portability bug: the code
145763         assumed that reg_errcode_t is a signed type, which is not
145764         necessarily true if _XOPEN_SOURCE is not defined.
145765         * lib/regex_internal.c (calc_state_hash): Put 'inline' before type,
145766         since some compilers warn about it otherwise.
145768 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
145770         * lib/regcomp.c (create_initial_state): Remove duplicate decl.
145771         (init_word_char, create_initial_state, duplicate_node_closure):
145772         (fetch_token, peek_token_bracket, build_range_exp):
145773         (build_collating_symbol): Remove forward decls; no longer needed
145774         now that we use prototypes.
145776         * lib/regcomp.c:
145777         (re_compile_pattern, re_set_syntax, re_compile_fastmap):
145778         (re_compile_fastmap_iter, regcomp, regerror, regfree):
145779         (re_compile_internal, init_dfa, init_word_char, free_workarea_compile):
145780         (create_initial_state, optimize_utf8, analyze, postorder, preorder):
145781         (optimize_subexps, lower_subexps, lower_subexp, calc_first, calc_next):
145782         (link_nfa_nodes, duplicate_node_closure, search_duplicated_node):
145783         (duplicate_node, calc_inveclosure, calc_eclosure, calc_eclosure_iter):
145784         (fetch_token, peek_token, peek_token_bracket, parse, parse_reg_exp):
145785         (parse_branch, parse_expression, parse_sub_exp, parse_dup_op):
145786         (build_range_exp, build_collating_symbol, parse_bracket_exp):
145787         (parse_bracket_element, parse_bracket_symbol, build_equiv_class):
145788         (build_charclass, build_charclass_op, fetch_number, create_tree):
145789         (create_token_tree, mark_opt_subexp, duplicate_tree):
145790         Use prototypes rather than old-style definitions.
145792         * lib/regex_internal.c:
145793         (re_string_allocate, re_string_construct, re_string_realloc_buffers):
145794         (re_string_construct_common, build_wcs_buffer, build_wcs_upper_buffer):
145795         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
145796         (re_string_reconstruct, re_string_peek_byte_case):
145797         (re_string_fetch_byte_case, re_string_destruct, re_string_context_at):
145798         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
145799         (re_node_set_init_copy, re_node_set_add_intersect):
145800         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
145801         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
145802         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
145803         (re_acquire_state, re_acquire_state_context, register_state):
145804         (create_ci_newstate, create_cd_newstate, free_state):
145805         Likewise.
145806         * lib/regexec.c (regexec, re_match, re_search, re_match_2,
145807         re_search_2):
145808         (re_search_2_stub, re_search_stub, re_copy_regs, re_set_registers):
145809         (re_search_internal, prune_impossible_nodes):
145810         (acquire_init_state_context, check_matching, static):
145811         (check_halt_node_context, check_halt_state_context, proceed_next_node):
145812         (push_fail_stack, pop_fail_stack, set_regs, free_fail_stack_return):
145813         (update_regs, sift_states_backward, build_sifted_states):
145814         (clean_state_log_if_needed, merge_state_array):
145815         (update_cur_sifted_state, add_epsilon_src_nodes):
145816         (sub_epsilon_src_nodes, check_dst_limits, check_dst_limits_calc_pos_1):
145817         (check_dst_limits_calc_pos, check_subexp_limits, sift_states_bkref):
145818         (sift_states_iter_mb, transit_state, merge_state_with_log, static):
145819         (find_recover_state, check_subexp_matching_top, transit_state_mb):
145820         (transit_state_bkref, get_subexp, get_subexp_sub, find_subexp_node):
145821         (check_arrival, check_arrival_add_next_nodes):
145822         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
145823         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
145824         (check_node_accept_bytes, check_node_accept, extend_buffers):
145825         (match_ctx_init, match_ctx_clean, match_ctx_free, match_ctx_add_entry):
145826         (search_cur_bkref_entry, match_ctx_add_subtop, match_ctx_add_sublast):
145827         (sift_ctx_init):
145828         Likewise.
145830         * lib/regex_internal.h:
145831         (re_string_allocate, re_string_construct, re_string_reconstruct):
145832         (re_string_realloc_buffers, build_wcs_buffer, build_wcs_upper_buffer):
145833         (build_upper_buffer, re_string_translate_buffer, re_string_destruct):
145834         (re_string_elem_size_at, re_string_char_size_at, re_string_wchar_at):
145835         (re_string_context_at, re_string_peek_byte_case):
145836         (re_string_fetch_byte_case): Declare even if RE_NO_INTERNAL_PROTOTYPES
145837         is defined, since we now use prototypes always.
145839         * lib/regex.h (_RE_ARGS): Remove.  No longer needed, since we assume
145840         C89 or better.  All uses removed.
145842 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
145844         * config/srclist.txt: Add glibc bugs 1220-1227.
145846 2005-08-20  Jim Meyering  <jim@meyering.net>
145848         * lib/regexec.c (regexec, re_search_stub) [!_LIBC]: Omit declaration
145849         of unused local, dfa.
145851 2005-08-20  Bruno Haible  <bruno@clisp.org>
145853         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_GNU_SOURCE.
145855 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
145857         * lib/regex_internal.c (re_string_realloc_buffers, re_node_set_insert):
145858         (re_node_set_insert_last, re_dfa_add_node):
145859         Rename local variables to avoid GCC shadowing warnings.
145861 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
145863         * lib/regex_internal.c (re_acquire_state, re_acquire_state_context)
145864         [defined lint]: Suppress bogus uninitialized-variable warnings.
145866         * lib/regcomp.c (duplicate_node): Return new index, not an error code,
145867         and let the caller return REG_ESPACE if out of space.  This
145868         removes an uninitialied-variable warning with GCC 4.0.1, and also
145869         avoids taking the address of a local variable.  All callers
145870         changed.
145872 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
145874         * config/srclist.txt: Comment out $LIBCSRC/posix/regex_internal.c,
145875         $LIBCSRC/posix/regexec.c.
145876         Add glibc bug 1217 for regcomp.c.
145878 2005-08-19  Jim Meyering  <jim@meyering.net>
145880         * lib/regexec.c (proceed_next_node): Redo local variables to
145881         avoid GCC shadowing warnings.
145883 2005-08-18  Bruno Haible  <bruno@clisp.org>
145885         * lib/strstr.c (strstr): Fix return value in multibyte case.
145886         * lib/strcasestr.c (strcasestr): Likewise.
145888 2005-08-17  Paul Eggert  <eggert@cs.ucla.edu>
145890         * lib/regex.h: Remove useless space-before-tab.  From coreutils.
145892 2005-08-17  Jim Meyering  <jim@meyering.net>
145894         Make the %s format (seconds since the epoch) work for a negative
145895         number and when used with a zero-padded field width, e.g. %015s.
145897         * lib/strftime.c (my_strftime): Move the `do_number_sign_and_padding'
145898         label so that it precedes the code to set `digits'.  Otherwise,
145899         %0Ns wouldn't work.  Before this change, `date -d @-22 +%05s' would
145900         print `00-22'.  Now, it prints `-0022', as it should.
145902 2005-08-17  Bruno Haible  <bruno@clisp.org>
145904         * modules/strstr (Files): Add m4/mbrtowc.m4.
145905         (Depends-on): Add mbuiter.
145907 2005-08-17  Bruno Haible  <bruno@clisp.org>
145909         * modules/strcasestr: New file.
145910         * MODULES.html.sh (String handling, based on ANSI C 89): Add
145911         strcasestr.
145913 2005-08-17  Bruno Haible  <bruno@clisp.org>
145915         * modules/strcase (Depends-on): Add mbuiter. Remove strnlen1, mbchar.
145917 2005-08-17  Bruno Haible  <bruno@clisp.org>
145919         * modules/mbuiter: New file.
145920         * MODULES.html.sh (Extended multibyte and wide character utilities):
145921         Add mbuiter.
145923 2005-08-17  Bruno Haible  <bruno@clisp.org>
145925         * m4/strstr.m4 (gl_FUNC_STRSTR): Use the replacement function always.
145926         (gl_PREREQ_STRSTR): Use gl_FUNC_MBRTOWC.
145928 2005-08-17  Bruno Haible  <bruno@clisp.org>
145930         * m4/strcasestr.m4: New file.
145932 2005-08-17  Bruno Haible  <bruno@clisp.org>
145934         * lib/strstr.h: Ignore HAVE_STRSTR, always declare the gnulib function.
145935         * lib/strstr.c: Completely rewritten, with multibyte locale support.
145937 2005-08-17  Bruno Haible  <bruno@clisp.org>
145939         * lib/strcasestr.h: New file.
145940         * lib/strcasestr.c: New file.
145942 2005-08-17  Bruno Haible  <bruno@clisp.org>
145944         * lib/strcasecmp.c: Use mbuiter.h.
145946 2005-08-17  Bruno Haible  <bruno@clisp.org>
145948         * lib/mbuiter.h: New file.
145950 2005-08-16  Paul Eggert  <eggert@cs.ucla.edu>
145952         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Do not override the results
145953         of gl_GETOPT_SUBSTITUTE.  That way, if both gl_GETOPT_SUBSTITUTE
145954         and gl_GETOPT are both invoked via different paths (as happens
145955         with GNU tar CVS because it uses both argp and getopt), the former
145956         wins.
145958 2005-08-16  Bruno Haible  <bruno@clisp.org>
145960         * modules/tls: New file.
145961         * MODULES.html.sh (Multithreading): Add tls.
145963 2005-08-16  Bruno Haible  <bruno@clisp.org>
145965         * modules/strnlen1: New file.
145966         * MODULES.html.sh (String handling): Add strnlen1.
145968 2005-08-16  Bruno Haible  <bruno@clisp.org>
145970         * modules/strcase (Files): Add m4/mbrtowc.m4.
145971         (Depends-on): Add strnlen1, mbchar.
145973 2005-08-16  Bruno Haible  <bruno@clisp.org>
145975         * modules/mbiter: New file.
145976         * MODULES.html.sh (Extended multibyte and wide character utilities):
145977         Add mbiter.
145979 2005-08-16  Bruno Haible  <bruno@clisp.org>
145981         * modules/mbfile: New file.
145982         * MODULES.html.sh (Extended multibyte and wide character utilities):
145983         Add mbfile.
145985 2005-08-16  Bruno Haible  <bruno@clisp.org>
145987         * modules/mbchar: New file.
145988         * MODULES.html.sh (Extended multibyte and wide character utilities):
145989         New section.
145991 2005-08-16  Bruno Haible  <bruno@clisp.org>
145993         * m4/tls.m4: New file, from GNU gettext.
145995 2005-08-16  Bruno Haible  <bruno@clisp.org>
145997         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Use the replacement function
145998         always.
145999         (gl_PREREQ_STRCASECMP): Use gl_FUNC_MBRTOWC.
146001 2005-08-16  Bruno Haible  <bruno@clisp.org>
146003         * m4/mbiter.m4: New file.
146005 2005-08-16  Bruno Haible  <bruno@clisp.org>
146007         * m4/mbfile.m4: New file.
146009 2005-08-16  Bruno Haible  <bruno@clisp.org>
146011         * m4/mbchar.m4: New file.
146013 2005-08-16  Bruno Haible  <bruno@clisp.org>
146015         * lib/tls.h: New file, from GNU gettext.
146016         * lib/tls.c: New file, from GNU gettext.
146018 2005-08-16  Bruno Haible  <bruno@clisp.org>
146020         * lib/strnlen1.h: New file.
146021         * lib/strnlen1.c: New file.
146023 2005-08-16  Bruno Haible  <bruno@clisp.org>
146025         * lib/strcasecmp.c (struct mbiter_multi): Remove at_end field.
146026         (mbi_init): Update.
146027         (mbi_avail, mbi_advance): Let the iteration end before the terminating
146028         NUL byte, not after it.
146030 2005-08-16  Bruno Haible  <bruno@clisp.org>
146032         * lib/strcase.h (strcasecmp): Add note in comments.
146033         * lib/strncasecmp.c: Use code from strcasecmp.c.
146034         * lib/strcasecmp.c: Use mbchar module. Define private mbiter variant.
146035         (strcasecmp): Work correctly in multibyte locales.
146037 2005-08-16  Bruno Haible  <bruno@clisp.org>
146039         * lib/mbiter.h: New file.
146041 2005-08-16  Bruno Haible  <bruno@clisp.org>
146043         * lib/mbfile.h: New file.
146045 2005-08-16  Bruno Haible  <bruno@clisp.org>
146047         * lib/mbchar.h: New file.
146048         * lib/mbchar.c: New file.
146050 2005-08-16  Bruno Haible  <bruno@clisp.org>
146052         * lib/mbchar.h (mb_cmp, mb_casecmp): Order the invalid characters after
146053         the valid ones. Makes the comparison operations transitive:
146054         cmp (a, b) < 0 && cmp (b, c) < 0 ==> cmp (a, c) < 0.
146055         * lib/strcasecmp.c (strcasecmp): Use mb_casecmp.
146057 2005-08-15  Simon Josefsson  <jas@extundo.com>
146059         * modules/ssize_t (License): Change to 'unlimited'.
146061         * gnulib-tool (sed_extract_prog): Recognize 'unlimited' license.
146063 2005-08-15  Paul Eggert  <eggert@cs.ucla.edu>
146065         * config/srclist.txt: Comment out $LIBCSRC/posix/regex.h.
146066         Add comments for each pending glibc patch.
146068 2005-08-15  Bruno Haible  <bruno@clisp.org>
146070         * lib/regex.h (__restrict_arr): Don't define to __restrict if
146071         __cplusplus is defined.
146073 2005-08-14  Jim Meyering  <jim@meyering.net>
146075         Sync from coreutils.
146077         * lib/fts-cycle.c (setup_dir, enter_dir, leave_dir, free_dir):
146078         Use the hash-table-based cycle-detection code not just when
146079         FTS_TIGHT_CYCLE_CHECK if specified, but also with FTS_LOGICAL.
146080         Reported by James Youngman in
146081         <http://lists.gnu.org/r/bug-gnulib/2005-08/msg00011.html>.
146082         * lib/fts_.h: Mention that with FTS_LOGICAL, we use
146083         FTS_TIGHT_CYCLE_CHECK.
146084         * lib/fts.c (fts_cross_check) [FTS_DEBUG]:
146085         s/active_dir_ht/fts_cycle.ht/. This lets us compile with -DFTS_DEBUG,
146086         once again.
146087         * lib/fts.c [! _LIBC]: Include "lstat.h" rather than rolling our own.
146088         * lib/fts.c (fd_safer): Remove decl.
146089         Include fcntl--.h rather than unistd-safer.h
146090         (fts_safe_changedir): Don't call fd_safer; no longer needed
146091         now that we include fcntl--.h.
146093 2005-08-12  Simon Josefsson  <jas@extundo.com>
146095         * modules/getndelim2: Use ssize_t module.
146096         * modules/getnline: Likewise.
146097         * modules/safe-read: Likewise.
146098         * modules/xreadlink: Likewise.
146100         * modules/ssize_t: New file.
146102 2005-08-12  Simon Josefsson  <jas@extundo.com>
146104         * m4/readline.m4: Look for termcap, curses or ncurses if required.
146106 2005-08-12  Simon Josefsson  <jas@extundo.com>
146108         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
146109         ssize_t.
146111 2005-08-12  Simon Josefsson  <jas@extundo.com>
146113         * MODULES.html.sh (Extra functions based on ANSI C 89: Misc): Add
146114         readline, getdelim and check_version.
146115         (Support for systems lacking ISO C 99: Sizes of integer types):
146116         Add size_max.
146118 2005-08-12  Bruno Haible  <bruno@clisp.org>
146120         * m4/readline.m4 (gl_FUNC_READLINE): Look for ncurses first.
146122 2005-08-11  Simon Josefsson  <jas@extundo.com>
146124         * modules/readline: New file.
146126         * modules/strnlen (Files): Add strnlen.h.
146128 2005-08-11  Simon Josefsson  <jas@extundo.com>
146130         * m4/readline.m4: New file.
146132 2005-08-11  Simon Josefsson  <jas@extundo.com>
146134         * lib/readline.h, readline.c: New file.
146136 2005-08-11  Simon Josefsson  <jas@extundo.com>
146138         * doc/gnulib.texi (Initial import, Finishing touches): Mention
146139         gl_AVOID.
146141 2005-08-11  Bruno Haible  <bruno@clisp.org>
146143         * lib/strnlen.h (strnlen): Change parameter name to match comment.
146145 2005-08-10  Stepan Kasal  <kasal@ucw.cz>
146147         * m4/onceonly_2_57.m4: Really require Autoconf 2.57.
146149 2005-08-10  Simon Josefsson  <jas@extundo.com>
146151         * tests/test-iconvme.c: New file.
146153 2005-08-10  Simon Josefsson  <jas@extundo.com>
146155         * m4/strnlen.m4: New file.
146157         * m4/strndup.m4: Don't check for strnlen declaration, done in
146158         strnlen.m4.
146160 2005-08-10  Simon Josefsson  <jas@extundo.com>
146162         * lib/strndup.c: Use strnlen.h.
146164         * lib/strnlen.h: New file.
146166 2005-08-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
146168         * README: Typos.
146170 2005-08-02  Simon Josefsson  <jas@extundo.com>
146172         * modules/readline: New file.
146174 2005-08-02  Simon Josefsson  <jas@extundo.com>
146176         * modules/getdelim: New file.
146178         * modules/getline: Rewrite, don't use getndelim2.
146180 2005-08-02  Simon Josefsson  <jas@extundo.com>
146182         * m4/getline.m4: Separate out getdelim stuff into separate module.
146184         * m4/getdelim.m4: New file.
146186 2005-08-02  Simon Josefsson  <jas@extundo.com>
146188         * lib/getline.h, getline.c: Rewrite.
146190         * lib/getdelim.h, lib/getdelim.c: New files, ported from glibc.
146192 2005-07-31  Bruno Haible  <bruno@clisp.org>
146194         * lib/lock.h (gl_lock_initializer): New macro.
146195         (gl_lock_define_initialized): Use it.
146196         (gl_rwlock_initializer): New macro.
146197         (gl_rwlock_define_initialized): Use it.
146198         (gl_recursive_lock_initializer): New macro.
146199         (gl_recursive_lock_define_initialized): Use it.
146201 2005-07-30  Karl Berry  <karl@gnu.org>
146203         * doc/gnulib.texi (Initial import): mention -I$(top_builddir)/lib.
146204         Report from Ben Pfaff, regarding getopt.
146206 2005-07-26  Paul Eggert  <eggert@cs.ucla.edu>
146208         Add support to getopt for Emacs, which doesn't use LIBOBJS in the
146209         normal way.
146210         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE_HEADER): New macro.
146211         (gl_GETOPT_SUBSTITUTE): Use it.  Invoke gl_PREREQ_GETOPT.
146212         (gl_GETOPT_IFELSE, gl_GETOPT_CHECK_HEADERS): New macros.
146213         (gl_GETOPT): Use the new macros.  Most of the implementation
146214         is moved to the new macros.  This is for programs like Emacs
146215         that don't want all the functionality of gl_GETOPT.
146217 2005-07-26  Bruno Haible  <bruno@clisp.org>
146219         * m4/lock.m4: Update from GNU gettext.
146221 2005-07-26  Bruno Haible  <bruno@clisp.org>
146223         * lib/lock.h: Update from GNU gettext.
146224         * lib/lock.c: Update from GNU gettext.
146226 2005-07-25  Paul Eggert  <eggert@cs.ucla.edu>
146228         * m4/regex.m4 (gl_INCLUDED_REGEX): Use AC_RUN_IFELSE instead of the
146229         obsolescent AC_TRY_RUN.  Include the default includes files, for
146230         'exit'.
146232 2005-07-24  Bruno Haible  <bruno@clisp.org>
146234         * modules/visibility: New file.
146235         * MODULES.html.sh (Misc): Add visibility.
146237 2005-07-24  Bruno Haible  <bruno@clisp.org>
146239         * m4/visibility.m4: New file.
146241 2005-07-24  Bruno Haible  <bruno@clisp.org>
146243         * doc/visibility.texi: New file.
146245 2005-07-22  Bruno Haible  <bruno@clisp.org>
146247         * modules/alloca-opt (Makefile.am): Remove explicit dependency on
146248         $(ALLOCA_H), redundant through BUILT_SOURCES.
146249         * modules/argz (Makefile.am): Remove explicit dependency on $(ARGZ_H),
146250         redundant through BUILT_SOURCES.
146251         * modules/byteswap (Makefile.am): Remove explicit dependency on
146252         $(BYTESWAP_H), redundant through BUILT_SOURCES.
146253         * modules/fnmatch (Makefile.am): Remove explicit dependency on
146254         $(FNMATCH_H), redundant through BUILT_SOURCES.
146255         * modules/getopt (Makefile.am): Remove explicit dependency on
146256         $(GETOPT_H), redundant through BUILT_SOURCES.
146257         * modules/glob (Makefile.am): Remove explicit dependency on $(GLOB_H),
146258         redundant through BUILT_SOURCES.
146259         * modules/poll (Makefile.am): Remove explicit dependency on $(POLL_H),
146260         redundant through BUILT_SOURCES.
146261         * modules/stdbool (Makefile.am): Remove explicit dependency on
146262         $(STDBOOL_H), redundant through BUILT_SOURCES.
146263         * modules/stdint (Makefile.am): Remove explicit dependency on
146264         $(STDINT_H), redundant through BUILT_SOURCES.
146265         * modules/sysexits (Makefile.am): Add $(SYSEXITS_H) to BUILT_SOURCES.
146266         Remove explicit dependency on $(SYSEXITS_H).
146267         Reported by Alexandre Duret-Lutz <adl@src.lip6.fr>.
146269 2005-07-18  Simon Josefsson  <jas@extundo.com>
146271         * lib/check-version.c (check_version): Accept identical versions too.
146273 2005-07-18  Bruno Haible  <bruno@clisp.org>
146275         * modules/lock: New file.
146276         * MODULES.html.sh (Multithreading): New section.
146278 2005-07-18  Bruno Haible  <bruno@clisp.org>
146280         * m4/lock.m4: New file, from GNU gettext.
146282 2005-07-18  Bruno Haible  <bruno@clisp.org>
146284         * lib/lock.h: New file, from GNU gettext.
146285         * lib/lock.c: New file, from GNU gettext.
146287 2005-07-18  Bruno Haible  <bruno@clisp.org>
146289         * lib/lock.h (gl_once_t): New type.
146290         (gl_once_define, gl_once): New macros.
146291         * lib/lock.c (fresh_once): New variable.
146292         (glthread_once, glthread_once_call, glthread_once_singlethreaded): New
146293         functions.
146295 2005-07-16  Simon Josefsson  <jas@extundo.com>
146297         * doc/gnulib.texi (Library version handling): Add ELF symbol collision
146298         workaround, suggested by Bruno.
146300 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
146302         * modules/xalloc (Depends-on): Add xalloc-die.
146303         * modules/xvasprintf (Depends-on): Add xalloc-die.
146305 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
146307         * lib/quotearg.c: Add translator comment suggested by Bruno Haible,
146308         with a minor change.
146310 2005-07-15  Bruno Haible  <bruno@clisp.org>
146312         * m4/poll.m4 (gl_FUNC_POLL): Check against MacOS X 10.4 poll() bug.
146313         When using lib/poll.c, define poll as rpl_poll.
146315 2005-07-14  Paul Eggert  <eggert@cs.ucla.edu>
146317         * modules/argp (Depends-on): Remove unlocked-io.
146319 2005-07-14  Derek Price  <derek@ximbiot.com>
146321         * m4/glob.m4 (gl_GLOB): Cache glob interface check result.  Add check
146322         for glob symlink bug.
146324 2005-07-14  Bruno Haible  <bruno@clisp.org>
146326         * m4/argp.m4 (gl_ARGP): Remove invocation of gl_FUNC_GLIBC_UNLOCKED_IO.
146327         Instead, test for *_unlocked function declarations directly.
146329 2005-07-11  Simon Josefsson  <jas@extundo.com>
146331         * modules/size_max: New file.
146333         * modules/xsize: Depend on size_max module for size_max.m4.
146335 2005-07-11  Simon Josefsson  <jas@extundo.com>
146337         * lib/size_max.h: New file.
146339 2005-07-11  Paul Eggert  <eggert@cs.ucla.edu>
146341         * lib/version-etc-fsf.c (version_etc_copyright): Parameterize the
146342         copyright symbol and the year.
146343         * lib/version-etc.c (COPYRIGHT_YEAR): New constant.
146344         (version_etc_va): Use parameterized copyright notice.
146345         Reword to conform to the current GNU coding standards.
146347 2005-07-11  Karl Berry  <karl@gnu.org>
146349         * doc/gnulib.texi (Quoting): new node.
146350         (Initial import): more info, from Patrice.
146352 2005-07-11  Bruno Haible  <bruno@clisp.org>
146354         * gnulib-tool (func_usage): Document option --avoid.
146355         (Command line options): Handle --avoid.
146356         (func_acceptable): New function.
146357         (func_modules_transitive_closure): Use it.
146359 2005-07-11  Bruno Haible  <bruno@clisp.org>
146361         * MODULES.html.sh: Use shortcut URLs to the www.opengroup.org site.
146362         Reported by Jim Meyering.
146364 2005-07-10  Bruno Haible  <bruno@clisp.org>
146366         * m4/size_max.m4 (gl_SIZE_MAX): Cast ~(size_t)0 back to size_t.
146367         Needed when size_t is smaller than 'unsigned int'.
146368         Reported by Paul Eggert.
146370 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
146372         * modules/argp (Depends-on): Add unlocked-io
146374 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
146376         * lib/argp-namefrob.h: Include unlocked-io.h. Removed unnecessary
146377         block of defines.
146379 2005-07-08  Paul Eggert  <eggert@cs.ucla.edu>
146381         * config/srclist.txt: Comment out regcomp.c, since we have a porting
146382         fix now.
146384 2005-07-08  Eric Blake  <ebb9@byu.net>  (tiny change)
146385         and Paul Eggert  <eggert@cs.ucla.edu>
146387         * lib/regcomp.c (init_dfa, build_range_exp): Store __btowc value
146388         in wint_t, not wchar_t.  Remove now-unnecessary cast.
146390 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
146392         * modules/regex (Files): Add lib/regex_internal.c,
146393         lib/regex_internal.h, lib/regexec.c, lib/regcomp.c, m4/codeset.m4.
146394         (Depends-on): Add extensions.
146395         (Makefile.am): Remove lib_SOURCES; now done by m4 code.
146397 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
146399         * m4/backupfile.m4 (gl_BACKUPFILE): Use AC_CHECK_FUNCS_ONCE on
146400         pathconf.
146401         * m4/same.m4 (gl_SAME): Likewise.
146402         Require AC_SYS_LONG_FILE_NAMES; bug reported by Gerrit P. Haase.
146404         * m4/regex.m4: Adjust to new libc regex implementation.
146405         (gl_INCLUDED_REGEX): Add AC_LIBSOURCES for
146406         all the .c and .h parts of (the new) regex.
146407         Quote the m4 stuff better.
146408         Check for RE_ICASE bug of old gnulib.
146409         Check for REG_STARTEND of recent libc.
146410         Rename local variables from jm_* to gl_*.
146411         Quote operand of "test -f".
146412         Say "recent enough" version of libc, not "version 2".
146413         (gl_PREREQ_REGEX): Remove AC_FUNC_ALLOCA, since alloca is a
146414         prerequisite module.  Remove AC_HEADER_STDC; no longer needed.
146415         Check for locale.h, isblank, mbrtowc, wcrtomb, wcscoll.
146416         Remove check for btowc, isascii.
146417         Require AM_LANGINFO_CODESET.
146419 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
146421         * lib/regex.c, regex.h: Sync from libc.
146422         * lib/regcomp.c, lib/regexec_internal.c, lib/regex_internal.h:
146423         * lib/regexec.c:
146424         New files, synced from libc, except that regex_internal.h
146425         currently has a small porting fix.
146427 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
146429         * config/srclist.txt: Add regcomp.c, regex.c, regex.h,
146430         regex_internal.c, regexec.c.
146431         Add regex_internal.h too, but as a comment, since the libc version
146432         is currently broken in gnulib mode.
146434 2005-07-06  Paul Eggert  <eggert@cs.ucla.edu>
146436         Support programs like Emacs that use gnulib but not gettext.
146437         * MODULES.html.sh (Internationalization functions): Add gettext-h.
146438         * modules/gettext-h: New file.
146439         * modules/gettext (Files): Remove lib/gettext.h.
146440         (Depends-on): Add gettext-h.
146441         (Makefile.am): Remove lib_SOURCES.
146442         * modules/argmatch, modules/c-stack, modules/closeout:
146443         * modules/copy-file, modules/csharpcomp, modules/csharpexec:
146444         * modules/execute, modules/file-type, modules/getaddrinfo:
146445         * modules/getopt, modules/human, modules/javacomp:
146446         * modules/javaexec, modules/mkdir-p, modules/obstack:
146447         * modules/openat, modules/pagealign_alloc, modules/pipe:
146448         * modules/quotearg, modules/regex, modules/rpmatch:
146449         * modules/unicodeio, modules/userspec, modules/version-etc:
146450         * modules/wait-process, modules/xalloc-die, modules/xmemcoll:
146451         * modules/xsetenv:
146452         Depend on gettext-h, not gettext.
146454 2005-07-05  Paul Eggert  <eggert@cs.ucla.edu>
146456         * gnulib-tool (func_import): Add support for 'public domain' license.
146457         * modules/alloca, modules/atexit, modules/memmove:
146458         Now public domain, not GPL.
146459         * modules/dup2, modules/getpagesize, modules/malloc, modules/memset:
146460         * modules/realloc, modules/strerror, modules/strtod:
146461         Now LGPL, not GPL.
146463 2005-07-05  Bruno Haible  <bruno@clisp.org>
146465         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): Upgrade to version from current
146466         autoconf CVS. Needed for mingw.
146468 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
146470         Remove the dependency of the strftime module on the tzset module.
146471         * modules/strftime (Depends-on): Remove dependency on tzset.
146473 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
146475         Remove the dependency of the strftime module on the tzset module.
146476         * m4/strftime.m4 (gl_FUNC_STRFTIME): Don't require
146477         gl_FUNC_TZSET_CLOBBER.
146479 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
146481         Remove the dependency of the strftime module on the tzset module.
146482         * lib/strftime.c (my_strftime)
146483         [! defined _LIBC && ! HAVE_RUN_TZSET_TEST]:
146484         Copy the input structure, to work around some of the bug with
146485         Solaris 2.5.1 and Solaris 2.6.  If you still care about these old
146486         Solaris releases, you should also use the tzset module, but we won't
146487         require it as a dependency any more since we don't want LGPLed code
146488         to depend on GPLed code.
146490 2005-07-02  Jim Meyering  <jim@meyering.net>
146492         * m4/chown.m4, cloexec.m4, dup2.m4, fsusage.m4:
146493         * m4/getcwd-path-max.m4, getcwd.m4, mkstemp.m4, mountlist.m4:
146494         * m4/pagealign_alloc.m4, save-cwd.m4, unistd-safer.m4:
146495         Don't check for fcntl.h, and don't test for HAVE_FCNTL_H.
146497 2005-07-02  Jim Meyering  <jim@meyering.net>
146499         * lib/backupfile.c (backup_args): Change a `0' to NULL.
146501 2005-07-01  Paul Eggert  <eggert@cs.ucla.edu>
146503         * lib/xnanosleep.c: Include timespec.h, since OpenBSD 3.4 <time.h>
146504         declares only 'struct timespec;' (!).
146506 2005-07-01  Jim Meyering  <jim@meyering.net>
146508         * lib/chown.c, cloexec.c, dup-safer.c, dup2.c, fsusage.c, getcwd.c:
146509         * lib/getloadavg.c, mountlist.c, openat.h, pagealign_alloc.c:
146510         * lib/save-cwd.c, tempname.c:
146511         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
146512         and don't include <sys/file.h>).
146514 2005-06-29  Jim Meyering  <jim@meyering.net>
146516         * lib/mkdir-p.c (make_dir_parents): Don't apply sizeof to a hard-coded
146517         type name.  Use the variable name instead.
146518         * lib/idcache.c (getuser, getuidbyname, getgroup, getgidbyname):
146519         Likewise.
146521 2005-06-28  Simon Josefsson  <jas@extundo.com>
146523         * modules/check-version (Files): Add check-version.m4.
146525 2005-06-28  Simon Josefsson  <jas@extundo.com>
146527         * m4/check-version.m4: New file, suggested by Jim Meyering
146528         <jim@meyering.net>.
146530 2005-06-28  Simon Josefsson  <jas@extundo.com>
146532         * lib/check-version.h, lib/check-version.c: New files.
146534 2005-06-28  Simon Josefsson  <jas@extundo.com>
146536         * lib/base64.c (base64_encode): Indent.  Rename 'b64' to avoid
146537         collision with global variable.  Better indentation.  Don't
146538         increment buffer pointer beyond buffer end.  Based on comments
146539         from Paul Eggert <eggert@cs.ucla.edu>.
146541         * lib/base64.h: Indent.
146543 2005-06-28  Simon Josefsson  <jas@extundo.com>
146545         * doc/gnulib.texi (Library version handling): New section.
146547 2005-06-28  Jim Meyering  <jim@meyering.net>
146549         * check-module (find_included_lib_files): Hard-code another
146550         pair of exceptions: fts.c includes fts-cycle.c and unistd-safer.h
146551         but modules/fts-lgpl (correctly) does not list those files.
146553         * modules/canonicalize (Files): Add lib/pathmax.h.
146555 2005-06-25  Simon Josefsson  <jas@extundo.com>
146557         * modules/check-version: New file.
146559 2005-06-24  Paul Eggert  <eggert@cs.ucla.edu>
146561         * lib/canon-host.c (canon-host): Append trailing "," to 0 in
146562         initializer of struct addrinfo, as an indication that we don't
146563         care how many members the structure has.
146565 2005-06-24  Derek Price  <derek@ximbiot.com>
146566         and Bruno Haible  <bruno@clisp.org>
146568         Remove stat module & update lstat.
146569         * m4/lstat.m4 (gl_FUNC_LSTAT): Drop AC_FUNC_LSTAT in favor of
146570         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
146571         * m4/stat.m4: Remove this file.
146573 2005-06-24  Derek Price  <derek@ximbiot.com>
146574         and Bruno Haible  <bruno@clisp.org>
146576         Remove stat module & update lstat.
146577         * lib/stat.c: Remove this file...
146578         (slash_aware_lstat): ...moving this content and its support...
146579         * lib/lstat.c (rpl_lstat): ...into here.
146580         * lib/lstat.h: New file.
146582 2005-06-24  Derek Price  <derek@ximbiot.com>
146583         and Bruno Haible  <bruno@clisp.org>
146585         Remove stat module & update lstat.
146586         * config/srclist.txt (libc sources): Remove stat.
146588 2005-06-24  Derek Price  <derek@ximbiot.com>
146589         and Bruno Haible  <bruno@clisp.org>
146591         Remove stat module & update lstat.
146592         * MODULES.html.sh (stat): Remove.
146593         * MODULES.html: Regenerated.
146594         * modules/lstat (Description): Correct function name.
146595         (Files): Add "lstat.h".
146596         (Depends-on): Remove stat, add xalloc, stat-macros.
146597         * modules/stat: Remove this file.
146598         (Include): Add "lstat.h", remove <sys/stat.h>.
146600 2005-06-23  Paul Eggert  <eggert@cs.ucla.edu>
146602         * lib/mktime.c: Include <string.h> even if !DEBUG.  (From glibc.)
146603         (ranged_convert): Don't save conversion in a temporary struct.
146604         This causes a warning with GCC 4.0.0, and anyway in the typical
146605         case it's not worth the extra 100 bytes or so of code.
146606         (ranged_convert, __mktime_internal): When calling a function via a
146607         pointer P, use P () rather than (*P) (), as we now assume C89 or
146608         better.
146610 2005-06-22  Paul Eggert  <eggert@cs.ucla.edu>
146612         * lib/readutmp.c (desirable_utmp_entry): Fix bug where "who -b" and
146613         "who -r" failed to give output.  Problem reported by Tim Waugh.
146615         * lib/xmalloc.c (HAVE_GNU_CALLOC): New constant.
146616         (xcalloc): Use it to avoid needless tests.
146617         Problem reported by Jim Meyering.
146619 2005-06-20  Derek Price  <derek@ximbiot.com>
146621         * m4/bison.m4: Note that precious decls of YACC & YFLAGS will be
146622         unnecessary for Autoconfs > 2.59c.
146624 2005-06-16  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
146626         * lib/argp.h (__option_is_short): Check upper limit of
146627         __key. Isprint() requires its argument to have the value
146628         of an unsigned char or EOF.
146630 2005-06-16  Jim Meyering  <jim@meyering.net>
146632         * lib/calloc.c (rpl_calloc): Allocate a 1-byte buffer (not 1xS or Nx1)
146633         when either N or S is zero.
146635 2005-06-16  Derek Price  <derek@ximbiot.com>
146637         * m4/bison.m4: Declare YACC & YFLAGS precious.
146639 2005-06-10  Paul Eggert  <eggert@cs.ucla.edu>
146641         * lib/fnmatch.c (fnmatch): If there is an encoding error in a
146642         multibyte string or pattern, fall back on unibyte matching.
146643         Problem reported by James Youngman.
146645 2005-06-08  Bruno Haible  <bruno@clisp.org>
146647         * modules/csharpcomp: New file.
146648         * MODULES.html.sh (C#): Add csharpcomp.
146650 2005-06-08  Bruno Haible  <bruno@clisp.org>
146652         * m4/csharpcomp.m4: New file, from GNU gettext.
146654 2005-06-08  Bruno Haible  <bruno@clisp.org>
146656         * lib/csharpcomp.h: New file, from GNU gettext.
146657         * lib/csharpcomp.c: New file, from GNU gettext.
146658         * lib/csharpcomp.sh.in: New file, from GNU gettext.
146660 2005-06-08  Bruno Haible  <bruno@clisp.org>
146662         * lib/binary-io.h (fileno): Undefine before defining it. Avoids a gcc
146663         warning on mingw.
146665 2005-06-07  Derek Price  <derek@ximbiot.com>
146667         Sync from CVS.
146668         * lib/glob_.h: Indent nested #ifdef.
146670 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
146672         Sync from coreutils.
146673         Use "file name" when talking about file names, instead of "filename"
146674         or "path", as per the GNU coding standards.
146675         * lib/mkdir-p.c: Renamed from makepath.c.
146676         (make_dir_parents): Renamed from make_path.  All callers changed.
146677         * lib/mkdir-p.h: Likewise.  All includers changed.
146678         * lib/filenamecat.c: Renamed from path-concat.c.
146679         (file_name_concat): Renamed from path_concat.  All callers changed.
146680         [TEST_FILE_NAME_CONCAT]: Renamed from TEST_PATH_CONCAT.
146681         * lib/filenamecat.h: Likewise.  All includers changed.
146682         * lib/acl.c: Don't use "path" or "filename" to mean "file name"
146683         in comments or local variable names.
146684         * lib/basename.c: Likewise.
146685         * lib/canonicalize.c, canonicalize.h: Likewise.
146686         * lib/dirname.c, dirname.h: Likewise.
146687         * lib/euidaccess.c: Likewise.
146688         * lib/exclude.c: Likewise
146689         * lib/fnmatch_.h, fnmatch_loop.c: Likewise.
146690         * lib/fsusage.c, fsuage.h: Likewise.
146691         * lib/fts.c, fts_.h: Likewise.
146692         * lib/getcwd.c: Likewise.
146693         * lib/getloadavg.c: Likewise.
146694         * lib/mkstemp.c: Likewise.
146695         * lib/mountlist.c, mountlist.h: Likewise.
146696         * lib/openat.c, openat.h: Likewise.
146697         * lib/readlink-stub.c: Likewise.
146698         * lib/readutmp.c, readutmp.h: Likewise.
146699         * lib/rename.c: Likewise.
146700         * lib/rmdir.c: Likewise.
146701         * lib/same.c: Likewise.
146702         * lib/savedir.c: Likewise.
146703         * lib/stripslash.c: Likewise.
146704         * lib/tempname.c: Likewise.
146705         * lib/xreadlink.c: Likewise.
146706         * lib/exclude.c (excluded_file_name): Renamed from excluded_filename.
146707         All uses changed.
146708         * lib/exclude.h: Likewise.
146710         * lib/euidaccess.c (getuid, getgid, getuid, getegid)
146711         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
146712         * lib/idcache.c (getpwuid, getpwnam, getgrgid, getgrnam)
146713         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
146714         * lib/pathmax.h: Include <limits.h> unconditionally, since other
146715         files have been getting away with it for years (MORE/BSD 4.3
146716         is extinct now).
146717         * lib/userspec.c (getpwnam, getgrnam, getgrgid)
146718         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
146720         * lib/pathmax.h (_POSIX_PATH_MAX) [!defined _POSIX_PATH_MAX]:
146721         Define to 256, not 255, as per modern POSIX.
146723 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
146725         Sync from coreutils.
146726         Use "file name" when talking about file names, instead of "filename"
146727         or "path", as per the GNU coding standards.
146728         * MODULES.html.sh: mkdir-p renamed from makepath.
146729         filenamecat renamed from path-concat.
146730         * modules/filenamecat: Renamed from modules/path-concat.
146731         (Files): filenamecat.h and filenamecat.c renamed from
146732         path-concat.h and path-concat.c.
146733         (configure.ac): gl_FILE_NAME_CONCAT, not gl_PATH_CONCAT.
146734         (Include): filenamecat.h, not path-concat.h.
146735         * modules/mkdir-p: Renamed from modules/makepath.
146736         (Files): mkdir-p.h and mkdir-p.c renamed from makepath.h and
146737         makepath.c.
146738         (configure.ac): gl_MKDIR_PARENTS, not gl_MAKEPATH.
146739         (Include): mkdir-p.h, not makepath.h.
146741 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
146743         Sync from coreutils.
146744         * m4/mkdir-p.m4: Renamed from makepath.m4.
146745         (gl_MKDIR_PARENTS): Renamed from gl_MAKEPATH.  All uses changed.
146746         Rename files from makepath.c to mkdir-p.c, and from
146747         makepath.h to mkdir-p.h.
146748         * m4/filenamecat.m4: Renamed from path-concat.m4.
146749         (gl_FILE_NAME_CONCAT): Renamed from gl_PATH_CONCAT.  All uses changed.
146750         Rename files from path-concat.c to filenamecat.c,
146751         and from path-concat.h to filenamecat.h.
146752         * m4/getcwd-path-max.m4: Don't use "path" or "filename" to mean
146753         "file name" in local variables or comments.
146754         * m4/rename.m4: Likewise.
146756 2005-06-01  Bruno Haible  <bruno@clisp.org>
146758         * modules/csharpexec: New file.
146759         * MODULES.html.sh (C#): New section.
146761 2005-06-01  Bruno Haible  <bruno@clisp.org>
146763         * m4/csharp.m4: New file, from GNU gettext.
146764         * m4/csharpexec.m4: New file, from GNU gettext.
146766 2005-06-01  Bruno Haible  <bruno@clisp.org>
146768         * lib/csharpexec.h: New file, from GNU gettext.
146769         * lib/csharpexec.c: New file, from GNU gettext.
146770         * lib/csharpexec.sh.in: New file, from GNU gettext.
146772 2005-05-31  Derek Price  <derek@ximbiot.com>
146773             Paul Eggert  <eggert@cs.ucla.edu>
146775         Sync from cvs.
146776         * m4/glob.m4: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
146778 2005-05-31  Derek Price  <derek@ximbiot.com>
146779             Paul Eggert  <eggert@cs.ucla.edu>
146781         Sync from cvs.
146782         * lib/glob_.h: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
146784 2005-05-29  Derek Price  <derek@ximbiot.com>
146786         * config/srclist.txt (glob_.h, glob.c): Add these files.
146788 2005-05-29  Derek Price  <derek@ximbiot.com>
146790         * MODULES.html.sh: Add glob to Enhanced POSIX.2001 section.
146791         * modules/glob: New file.
146792         * modules/getlogin_r: Add link to POSIX spec in description.
146794 2005-05-29  Derek Price  <derek@ximbiot.com>
146795             Paul Eggert  <eggert@cs.ucla.edu>
146797         * m4/glob.m4: New file.
146799 2005-05-29  Derek Price  <derek@ximbiot.com>
146800             Paul Eggert  <eggert@cs.ucla.edu>
146802         * lib/glob_.h, lib/glob.c: New files.
146804 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
146806         * modules/fts (Files): Remove m4/inttypes-pri.m4.
146807         * modules/fts-lgpl (Depends-on): Remove gettext.
146809 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
146811         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't check for inttypes.h or stdint.h,
146812         and don't require gt_INTTYPES_PRI.
146814 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
146816         * lib/getlogin_r.c (getlogin_r): Don't set errno to 0 on return.
146818         * lib/fts.c: Don't worry about debugging on pre-C99-compatible hosts;
146819         the configuration hassle isn't worth it.
146820         Include inttypes.h and stdint.h unconditionally if FTS_DEBUG.
146821         (LONGEST_MODIFIER, PRIuMAX): Remove.
146823 2005-05-27  Bruno Haible  <bruno@clisp.org>
146825         * lib/getlogin_r.h: Remove second include of <stddef.h>.
146827 2005-05-26  Paul Eggert  <eggert@cs.ucla.edu>
146829         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Define
146830         _POSIX_PTHREAD_SEMANTICS for Solaris.
146832 2005-05-25  Derek Price  <derek@ximbiot.com>
146834         * MODULES.html.sh: Add getlogin_r to POSIX.2001 support section.
146836 2005-05-25  Derek Price  <derek@ximbiot.com>
146837             Paul Eggert  <eggert@cs.ucla.edu>
146839         * modules/getlogin_r, m4/getlogin_r.m4: New files.
146840         * lib/getlogin_r.c, getlogin_r.h: New files.
146842 2005-05-25  Bruno Haible  <bruno@clisp.org>
146843             Derek Price  <derek@ximbiot.com>
146845         * lib/getlogin_r.h: Simplify API documentation.
146847 2005-05-23  Derek Price  <derek@ximbiot.com>
146849         * modules/minmax (Files): Add m4/minmax.m4.
146850         (configure.ac): Add gl_MINMAX.
146852 2005-05-22  Paul Eggert  <eggert@cs.ucla.edu>
146854         * lib/fts.c (fd_safer) [_LGPL_PACKAGE]: New static function,
146855         so that unistd-safer.h (GPL'ed code) need not be included.
146857 2005-05-22  Bruno Haible  <bruno@clisp.org>
146859         * m4/minmax.m4: New file.
146860         Based on a patch by Derek Price <derek@ximbiot.com>.
146862 2005-05-22  Bruno Haible  <bruno@clisp.org>
146864         * lib/stdint_.h (_STDINT_H_HAVE_INT64): New macro. Use it in #ifdefs.
146865         (INT64_MIN): Fix definition.
146866         Suggested by Paul Eggert <eggert@cs.ucla.edu>.
146868         * lib/stdint_.h (_STDINT_H_NEED_SIGNED_INT_TYPES): Renamed from
146869         NEED_SIGNED_INT_TYPES.
146871         * lib/stdint_.h (_STDINT_H_HAVE_SYSTEM_INTTYPES): Renamed from
146872         HAVE_SYSTEM_INTTYPES.
146874 2005-05-22  Bruno Haible  <bruno@clisp.org>
146876         * lib/minmax.h: Include <limits.h> only when it defines MIN, MAX.
146877         Also include <sys/param.h> if it defines MIN, MAX.
146878         Based on a patch by Derek Price <derek@ximbiot.com>.
146880 2005-05-21  Jim Meyering  <jim@meyering.net>
146882         * modules/fts (Files): Add m4/inttypes-pri.m4.
146883         (Depends-on): Add lstat and remove gettext.  Alphabetize.
146885 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
146887         New fts module.
146888         * lib/fts.c: Don't include "cycle-check.h" or "hash.h".
146889         (setup_dir, free_dir): New functions.
146890         (enter_dir, leave_dir): Define trivial
146891         alternatives of _LGPL_PACKAGE.  Move to fts-cycle.c if !_LGPL_PACKAGE.
146892         (HT_INITIAL_SIZE, ENTER_DIR): Remove.  All uses removed.
146893         (LEAVE_DIR): Fix typo: pass Fts and Ent to leave_dir.
146894         (struct Active_dir, AD_compare, AD_hash, enter_dir, leave_dir):
146895         Move to fts-cycle.c.
146896         (fts_open): Use setup_dir.
146897         (fts_close): Use free_dir.
146898         (fts_read): Have just one copy of the ENTER_DIR code rather than three.
146899         This adds a label and some gotos, but the alternatives were messier.
146900         Check for memory allocation failure when entering a dir.
146901         (fts_stat) [_LGPL_PACKAGE]: Bring back glibc cycle detection code.
146902         * lib/fts_.h (_LGPL_PACKAGE) [defined _LIBC]: New macro.
146903         (FTS): New member fts_cycle, that is a union that contains the
146904         old active_dir_ht and cycle_state.  All uses changed to mention
146905         fts_cycle.ht and fts_cycle.state.
146906         * lib/fts-cycle.c: New file, containing GPL'ed code migrated out of
146907         fts.c, with the following changes:
146908         (setup_dir, free_dir): New functions.
146909         (enter_dir): Now returns bool.  Return true if successful, false
146910         if memory exhausted.  All callers changed.
146911         Do not bother partly cleaning up on
146912         memory allocation failure; that is free_dir's job.
146913         However, free ad if hash_insert fails, to avoid memory leak.
146914         (enter_dir, leave_dir): Accommodate change to FTS by inspecting
146915         fts->fts_options to see which union member to use.
146917 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
146919         * m4/fts.m4 (gl_FUNC_FTS_CORE): Renamed from gl_FUNC_FTS.
146920         (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): New macros.
146922 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
146924         * MODULES.html.sh (File system functions): Add fts, fts-lgpl.
146926 2005-05-20  Jim Meyering  <jim@meyering.net>
146928         * lib/unlinkdir.h (cannot_unlink_dir) [UNLINK_CANNOT_UNLINK_DIR]:
146929         Now a macro, to pacify GCC.
146931 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
146933         * m4/chown.m4 (gl_FUNC_CHOWN): Correct sense of test for honoring IDs
146934         of -1.
146936 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
146938         * lib/chown.c (rpl_chown): Return -1 on failure.
146940 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
146942         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME]):
146943         Don't check for stddef.h.
146944         * m4/fts.m4 (gl_FUNC_FTS): Don't require AC_HEADER_STDC, as we
146945         don't use its results.
146946         Don't check for fcntl.h, stddef.h, stdlib.h, string.h, unistd.h,
146947         since we include them unconditionally.  Don't require
146948         AM_STDBOOL_H, since stdbool is a prerequisite.
146949         Don't require AC_C_CONST, AC_TYPE_SIZE_T or check for ptrdiff_t
146950         since we assume C89 or better.
146951         Don't require AC_FUNC_CLOSEDIR_VOID, AC_FUNC_LSTAT, or AC_FUNC_STAT,
146952         as we don't use their results.
146953         Don't check for fchdir, memmove, memset, strrchr, as we use
146954         them unconditionally.
146955         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't define
146956         GETTIMEOFDAY_CLOBBERS_LOCALTIME_BUFFER, since nobody uses it.
146958 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
146960         * lib/canonicalize.c: Include canonicalize.h first, to test interface.
146961         Include <stddef.h> unconditionally, since we assume C89 now.
146962         All uses of PTR_INT_TYPE replaced by ptrdiff_t.
146963         * lib/fts.c: Include fts_.h first, to check interface.
146964         Do not include intprops.h; no longer needed.
146965         Include cycle-check.h and hash.h, since fts_.h no longer does.
146966         Remove unnecessary casts of closedir to void.
146967         (fts_build): Use a simpler method (not involving TYPE_SIGNED) to
146968         decide whether to decrement nlinks.
146969         * lib/fts_.h: Do not include hash.h or cycle-check.h; no longer needed.
146970         (FTS): Use struct hash_table * instead of Hash_table, so that
146971         we no longer need to include hash.h here.
146973 2005-05-18  Jim Meyering  <jim@meyering.net>
146975         * modules/dirfd (License): Change to LGPL.  Most of the code
146976         is already in the public domain.
146978 2005-05-18  Jim Meyering  <jim@meyering.net>
146980         * m4/fts.m4 (AC_LIBSOURCES): Add intprops.h to the list.
146981         Reported by Yoann Vandoorselaere.
146983 2005-05-17  Jim Meyering  <jim@meyering.net>
146985         * m4/fts.m4: New file, from coreutils.
146987 2005-05-17  Jim Meyering  <jim@meyering.net>
146989         * lib/fts.c, lib/fts_.h: New files, from coreutils.
146991 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
146993         Sync from coreutils.
146994         * m4/unlinkdir.m4: New file.
146996 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
146998         Sync from coreutils.
146999         * lib/unlinkdir.c, lib/unlinkdir.h: New files.
147000         * lib/gethrxtime.c, lib/gethrxtime.h, lib/getpass.h, lib/mountlist.h,
147001         lib/path-concat.c, lib/regex.h, lib/unlocked-io.h, lib/xtime.h:
147002         White space changes only.
147003         * lib/makepath.c (make_path): Port to hosts where leading "//" is
147004         special.
147005         * lib/yesno.c: Include getline.h, not ctype.h.
147006         (yesno): Don't remove leading white space; POSIX doesn't allow it.
147007         Use getline to remove arbitrary restriction on response length.
147009 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
147011         * config/srclist-update: Spell out "Street" in FSF postal
147012         mail address; this is the style the FSF seems to prefer.
147014         * build-aux/depcomp, build-aux/install-sh, build-aux/mdate-sh,
147015         build-aux/missing, build-aux/mkinstalldirs: Sync from Automake;
147016         this updates FSF postal mail address.
147018         Sync from coreutils.
147019         * modules/unlinkdir: New file.
147020         * modules/yesno (Depends-on): Add getline.
147021         * MODULES.html.sh (File system functions): Add unlinkdir.
147023 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
147025         * lib/byteswap_.h, lib/getsubopt.h, lib/iconvme.h, lib/strsep.c,
147026         lib/strsep.h:
147027         Change the initial comment to refer to GPL, not LGPL.
147028         gnulib-tool will change it to LGPL as needed.
147030         * lib/__fpending.c, lib/acl.c, lib/acl.h, lib/alloca_.h, lib/allocsa.c,
147031         lib/allocsa.h, lib/argmatch.c, lib/argmatch.h, lib/argp-ba.c,
147032         lib/argp-eexst.c, lib/argp-fmtstream.c, lib/argp-fmtstream.h,
147033         lib/argp-fs-xinl.c, lib/argp-help.c, lib/argp-namefrob.h,
147034         lib/argp-parse.c, lib/argp-pv.c, lib/argp-pvh.c, lib/argp-xinl.c,
147035         lib/argp.h, lib/argz.c, lib/argz_.h, lib/asnprintf.c, lib/asprintf.c,
147036         lib/atanl.c, lib/backupfile.c, lib/backupfile.h, lib/base64.c,
147037         lib/base64.h, lib/basename.c, lib/binary-io.h, lib/byteswap_.h,
147038         lib/c-ctype.c, lib/c-ctype.h, lib/c-stack.c, lib/c-stack.h,
147039         lib/c-strtod.c, lib/calloc.c, lib/canon-host.c, lib/canonicalize.c,
147040         lib/canonicalize.h, lib/ceill.c, lib/chdir-long.c, lib/chdir-long.h,
147041         lib/chown.c, lib/classpath.c, lib/classpath.h, lib/cloexec.c,
147042         lib/closeout.c, lib/closeout.h, lib/concatpath.c, lib/config.charset,
147043         lib/copy-file.c, lib/copy-file.h, lib/cycle-check.c, lib/cycle-check.h,
147044         lib/diacrit.c, lib/diacrit.h, lib/dirfd.c, lib/dirfd.h, lib/dirname.c,
147045         lib/dirname.h, lib/dummy.c, lib/dup-safer.c, lib/dup2.c, lib/eealloc.h,
147046         lib/error.c, lib/error.h, lib/euidaccess.c, lib/exclude.c,
147047         lib/exclude.h, lib/execute.c, lib/execute.h, lib/exit.h,
147048         lib/exitfail.c, lib/exitfail.h, lib/expl.c, lib/fatal-signal.c,
147049         lib/fatal-signal.h, lib/fd-safer.c, lib/file-type.c, lib/file-type.h,
147050         lib/fileblocks.c, lib/filemode.c, lib/filemode.h, lib/findprog.c,
147051         lib/findprog.h, lib/floorl.c, lib/fnmatch.c, lib/fnmatch_.h,
147052         lib/fnmatch_loop.c, lib/fopen-safer.c, lib/free.c, lib/frexpl.c,
147053         lib/fsusage.c, lib/fsusage.h, lib/full-read.c, lib/full-read.h,
147054         lib/full-write.c, lib/full-write.h, lib/fwriteerror.c,
147055         lib/fwriteerror.h, lib/gai_strerror.c, lib/gcd.c, lib/gcd.h,
147056         lib/getaddrinfo.c, lib/getaddrinfo.h, lib/getcwd.c, lib/getcwd.h,
147057         lib/getdate.h, lib/getdate.y, lib/getdomainname.c, lib/getdomainname.h,
147058         lib/getgroups.c, lib/gethostname.c, lib/gethrxtime.c, lib/gethrxtime.h,
147059         lib/getline.c, lib/getline.h, lib/getloadavg.c, lib/getndelim2.c,
147060         lib/getndelim2.h, lib/getnline.c, lib/getnline.h, lib/getopt.c,
147061         lib/getopt1.c, lib/getopt_.h, lib/getopt_int.h, lib/getpagesize.h,
147062         lib/getpass.c, lib/getpass.h, lib/getsubopt.c, lib/getsubopt.h,
147063         lib/gettext.h, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c,
147064         lib/getusershell.c, lib/group-member.c, lib/group-member.h,
147065         lib/hard-locale.c, lib/hard-locale.h, lib/hash-pjw.c, lib/hash-pjw.h,
147066         lib/hash.c, lib/hash.h, lib/human.c, lib/human.h, lib/iconvme.c,
147067         lib/iconvme.h, lib/idcache.c, lib/inet_ntop.h, lib/intprops.h,
147068         lib/inttostr.c, lib/inttostr.h, lib/isdir.c, lib/javacomp.c,
147069         lib/javacomp.h, lib/javacomp.sh.in, lib/javaexec.c, lib/javaexec.h,
147070         lib/javaexec.sh.in, lib/lbrkprop.h, lib/lchown.c, lib/ldexpl.c,
147071         lib/linebreak.c, lib/linebreak.h, lib/linebuffer.c, lib/linebuffer.h,
147072         lib/localcharset.c, lib/localcharset.h, lib/logl.c, lib/long-options.c,
147073         lib/long-options.h, lib/lstat.c, lib/makepath.c, lib/makepath.h,
147074         lib/malloc.c, lib/mathl.h, lib/mbswidth.c, lib/mbswidth.h, lib/md5.c,
147075         lib/md5.h, lib/memcasecmp.c, lib/memcasecmp.h, lib/memchr.c,
147076         lib/memcmp.c, lib/memcoll.c, lib/memcoll.h, lib/memcpy.c, lib/memmem.c,
147077         lib/memmem.h, lib/mempcpy.c, lib/mempcpy.h, lib/memrchr.c,
147078         lib/memrchr.h, lib/memset.c, lib/minmax.h, lib/mkdir.c, lib/mkdtemp.c,
147079         lib/mkdtemp.h, lib/mkstemp.c, lib/mktime.c, lib/modechange.c,
147080         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
147081         lib/obstack.c, lib/obstack.h, lib/openat.c, lib/openat.h,
147082         lib/pagealign_alloc.c, lib/pagealign_alloc.h, lib/path-concat.c,
147083         lib/path-concat.h, lib/pathmax.h, lib/pathname.h, lib/physmem.c,
147084         lib/physmem.h, lib/pipe.c, lib/pipe.h, lib/poll.c, lib/poll_.h,
147085         lib/posixtm.c, lib/posixtm.h, lib/posixver.c, lib/printf-args.c,
147086         lib/printf-args.h, lib/printf-parse.c, lib/printf-parse.h,
147087         lib/progname.c, lib/progname.h, lib/progreloc.c, lib/putenv.c,
147088         lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h, lib/raise.c,
147089         lib/readlink.c, lib/readtokens.c, lib/readtokens.h, lib/readtokens0.c,
147090         lib/readtokens0.h, lib/readutmp.c, lib/readutmp.h, lib/realloc.c,
147091         lib/ref-add.sin, lib/ref-del.sin, lib/regex.c, lib/regex.h,
147092         lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c,
147093         lib/safe-read.h, lib/safe-write.c, lib/safe-write.h, lib/same.c,
147094         lib/same.h, lib/save-cwd.c, lib/save-cwd.h, lib/savedir.c,
147095         lib/savedir.h, lib/setenv.c, lib/setenv.h, lib/settime.c,
147096         lib/sh-quote.c, lib/sh-quote.h, lib/sha1.c, lib/sha1.h, lib/sig2str.c,
147097         lib/sig2str.h, lib/sincosl.c, lib/snprintf.c, lib/snprintf.h,
147098         lib/sqrtl.c, lib/stat-macros.h, lib/stat.c, lib/stdbool_.h,
147099         lib/stdint_.h, lib/stdio-safer.h, lib/stpcpy.c, lib/stpcpy.h,
147100         lib/stpncpy.c, lib/stpncpy.h, lib/strcase.h, lib/strcasecmp.c,
147101         lib/strchrnul.c, lib/strchrnul.h, lib/strcspn.c, lib/strdup.c,
147102         lib/strdup.h, lib/strerror.c, lib/strftime.c, lib/strftime.h,
147103         lib/stripslash.c, lib/strndup.c, lib/strndup.h, lib/strnlen.c,
147104         lib/strpbrk.c, lib/strpbrk.h, lib/strsep.c, lib/strsep.h, lib/strstr.c,
147105         lib/strstr.h, lib/strtod.c, lib/strtoimax.c, lib/strtok_r.c,
147106         lib/strtok_r.h, lib/strtol.c, lib/strtoll.c, lib/strtoul.c,
147107         lib/strtoull.c, lib/strverscmp.c, lib/strverscmp.h, lib/sysexit_.h,
147108         lib/tempname.c, lib/time_r.c, lib/time_r.h, lib/timegm.c, lib/timegm.h,
147109         lib/timespec.h, lib/trigl.c, lib/trigl.h, lib/ucs4-utf16.h,
147110         lib/ucs4-utf8.h, lib/unicodeio.c, lib/unicodeio.h, lib/unistd-safer.h,
147111         lib/unlocked-io.h, lib/unsetenv.c, lib/userspec.c, lib/utf16-ucs4.h,
147112         lib/utf8-ucs4.h, lib/utime.c, lib/utimecmp.c, lib/utimecmp.h,
147113         lib/utimens.c, lib/vasnprintf.c, lib/vasnprintf.h, lib/vasprintf.c,
147114         lib/vasprintf.h, lib/version-etc-fsf.c, lib/version-etc.c,
147115         lib/version-etc.h, lib/vsnprintf.c, lib/vsnprintf.h, lib/w32spawn.h,
147116         lib/wait-process.c, lib/wait-process.h, lib/xalloc-die.c, lib/xalloc.h,
147117         lib/xallocsa.c, lib/xallocsa.h, lib/xasprintf.c, lib/xgetcwd.c,
147118         lib/xgetcwd.h, lib/xgetdomainname.c, lib/xgetdomainname.h,
147119         lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c,
147120         lib/xreadlink.c, lib/xreadlink.h, lib/xsetenv.c, lib/xsetenv.h,
147121         lib/xsize.h, lib/xstrndup.c, lib/xstrndup.h, lib/xstrtod.c,
147122         lib/xstrtod.h, lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h,
147123         lib/xstrtoumax.c, lib/xtime.h, lib/xvasprintf.c, lib/xvasprintf.h,
147124         lib/yesno.c, lib/yesno.h:
147125         Update FSF postal mail address.
147127 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
147129         * MODULES.html.sh, README, gnulib-tool, tests/test-base64.c,
147130         tests/test-memmem.c, tests/test-stpncpy.c:
147131         Update FSF postal mail address.
147133 2005-05-13  Bruno Haible  <bruno@clisp.org>
147135         * lib/stdint_.h (int64_t, uint64_t, int_least64_t, uint_least64_t,
147136         int_fast64_t, uint_fast64_t, intmax_t, uintmax_t, INT64_MIN, INT64_MAX,
147137         UINT64_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX,
147138         INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTMAX_MIN,
147139         INTMAX_MAX, UINTMAX_MAX, INT64_C, UINT64_C, INTMAX_C, UINTMAX_C):
147140         Add support for 64-bit integers in the MSVC compiler.
147142 2005-05-12  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
147144         * modules/getdate (Makefile.am): Add getdate.c to EXTRA_DIST
147146 2005-05-12  Eric Blake  <ebb9@byu.net>  (tiny change)
147148         * gnulib-tool (func_import): Sort and uniquify recommended includes.
147150 2005-05-11  Paul Eggert  <eggert@cs.ucla.edu>
147152         * doc/getdate.texi (General date syntax): Don't say that date
147153         date --iso-8601=ns generates acceptable dates; it doesn't yet.
147154         Problem reported by Nic Ferrier.
147156 2005-05-10  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
147158         * lib/getaddrinfo.c: Don't fail when SOCK_STREAM or SOCK_DGRAM are
147159         specified in ai_socktype. Fix invalid ai_protocol
147160         check. ai_protocol is usually set to 0 or depending on
147161         ai_family/ai_socktype to IPPROTO_TCP / IPPROTO_UDP.  Checking for
147162         SOCK_STREAM / SOCK_DGRAM in ai_protocol was invalid.  Set
147163         ai_socktype / ai_protocol in the returned addrinfo structure.
147165 2005-05-10  Simon Josefsson  <jas@extundo.com>
147167         * m4/getaddrinfo.m4: Look in libnsl/libsocket for getaddrinfo, from
147168         Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
147170 2005-05-10  Karl Berry  <karl@gnu.org>
147172         * doc/fdl.texi, gpl.texi, lgpl.texi, COPYING: update FSF address
147173         (from http://www.gnu.org/licenses).
147174         * doc/COPYING.LIB: also rename to COPYING.LESSER.
147175         * doc/COPYING.DOC: remove; per rms, only needed in doc files, so
147176         fdl.texi suffices.
147178 2005-05-10  Karl Berry  <karl@gnu.org>
147180         * config/srclist.txt (COPYING.LESSER): rename from COPYING.LIB.
147181         (COPYING.DOC): remove.
147183         * config/srclist-update: new FSF address.
147185 2005-05-10  Derek Price  <derek@ximbiot.com>
147187         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 bug, not decl, when
147188         possible.
147190 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
147191             Bruno Haible  <bruno@clisp.org>
147193         * modules/inet_ntop: New file.
147194         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
147195         inet_ntop.
147197 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
147198             Bruno Haible  <bruno@clisp.org>
147200         * m4/inet_ntop.m4: New file.
147202 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
147203             Bruno Haible  <bruno@clisp.org>
147205         * lib/inet_ntop.h: New file.
147206         * lib/inet_ntop.c: New file, from glibc with modifications.
147208 2005-05-09  Paul Eggert  <eggert@cs.ucla.edu>
147210         * modules/time_r (License): Change to LGPL.
147211         * modules/extensions (License): Change to LGPL.  Actually,
147212         the license is more permissive than that, but currently gnulib-tool
147213         doesn't know how to handle more-permissive licenses.
147215         * modules/stat-macros (Depends-on): Don't depend on stat-macros (!).
147216         Problem reported by Dave Love.
147218 2005-05-08  Jim Meyering  <jim@meyering.net>
147220         * lib/classpath.c (PATH_SEPARATOR): Remove insignificant trailing
147221         blank.
147223 2005-05-06  Paul Eggert  <eggert@cs.ucla.edu>
147225         * modules/argmatch (Depends-on): Add stdbool.
147226         * modules/backupfile (Depends-on): Likewise.
147227         * modules/chdir-long (Depends-on): Likewise.
147228         * modules/closeout (Depends-on): Likewise.
147229         * modules/cycle-check (Depends-on): Likewise.
147230         * modules/dirname (Depends-on): Likewise.
147231         * modules/fnmatch (Depends-on): Likewise.
147232         * modules/fsusage (Depends-on): Likewise.
147233         * modules/fwriteerror (Depends-on): Likewise.
147234         * modules/getcwd (Depends-on): Likewise.
147235         * modules/getloadavg (Depends-on): Likewise.
147236         * modules/hard-locale (Depends-on): Likewise.
147237         * modules/makepath (Depends-on): Likewise.
147238         * modules/mountlist (Depends-on): Likewise.
147239         * modules/nanosleep (Depends-on): Likewise.
147240         * modules/posixtm (Depends-on): Likewise.
147241         * modules/quotearg (Depends-on): Likewise.
147242         * modules/readtokens (Depends-on): Likewise.
147243         * modules/readtokens0 (Depends-on): Likewise.
147244         * modules/readutmp (Depends-on): Likewise.
147245         * modules/save-cwd (Depends-on): Likewise.
147246         * modules/strftime (Depends-on): Likewise.
147247         * modules/userspec (Depends-on): Likewise.
147248         * modules/utimecmp (Depends-on): Likewise.
147249         * modules/xgetcwd (Depends-on): Likewise.
147250         * modules/xnanosleep (Depends-on): Likewise.
147251         * modules/xstrtod (Depends-on): Likewise.
147252         * modules/yesno (Depends-on): Likewise.
147254 2005-05-05  Paul Eggert  <eggert@cs.ucla.edu>
147256         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 getopt, and avoid
147257         needless checks.
147259 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
147261         Merge from coreutils.  Among other things,
147262         add bulletproofing for cases where stdin, stdout, or stderr are closed.
147263         * lib/fd-safer.c: New file.
147264         * lib/fcntl-safer.h, open-safer.c: Remove.
147265         * lib/chdir-long.c: Fix comment "fetish" -> "coreutils".
147266         * lib/dup-safer.c: Include unistd-safer.h first.
147267         Don't include errno.h.
147268         (dup_safer) [!defined F_DUPFD]: Let fd_safer do the real work.
147269         * lib/file-type.h: Don't assume invoker included sys/stat.h first.
147270         * lib/file-type.c: Rely on file-type.h change.
147271         * lib/getloadavg.c: Include unistd-safer.h.
147272         (getloadavg): Use safer open.
147273         * lib/getusershell.c: Include "stdio-safer.h".
147274         (getusershell): Use safer fopen.
147275         * lib/long-options.c (long_options): Use NULL rather than 0.
147276         * lib/modechange.h (mode_free): Remove; all callers changed to invoke
147277         'free'.
147278         * lib/modechange.c: Likewise.
147279         xstrtol.h, stdbool.h, stddef.h: Don't include; no longer needed.
147280         (MODE_DONE): New constant.
147281         (struct mode_change): Remove 'next' member.
147282         (make_node_op_equals): New function; like the old one of the
147283         same name, except it allocates an array.
147284         (mode_compile, mode_create_from_ref): Use it.
147285         (mode_compile): Allocate result as an array, not a linked list.
147286         Parse octal string ourself, so that we catch mistakes like "+0".
147287         (mode_adjust): Arg is an array, not a linked list.
147288         * lib/modechange.c: Include stat-macros.h, xalloc.h.
147289         (S_ISDIR, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR):
147290         (S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, S_IRXWU):
147291         (S_IRWXG, S_IRWXO, CHMOD_MODE_BITS):
147292         Remove.  This is now stat-macros.h's job.
147293         (talloc): Remove.  All callers replaced by xalloc, so that
147294         our invokers don't have to worry about reporting memory failures.
147295         (make_node_op_equals): Remove.
147296         (MODE_ORDINARY_CHAGE, MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
147297         New constants.
147298         (struct mode_change): Moved here from modechange.h.
147299         (mode_append_entry): Remove.
147300         (mode_compile): Remove MASKED_OPS arg, since it encouraged
147301         apps to have incorrect behavior.  Use simpler algorithm for head
147302         and tail.  Don't futz with umask; that's now the job of mode_adjust.
147303         Detect more invalid usages rather than having somewhat-random behavior.
147304         Don't insert an "a=" action, as that leads to incorrect behavior.
147305         (mode_compile, mode_create_from_ref): Return NULL on error instead
147306         of an enum, since now there's only one way to have an error.  All
147307         callers changed.
147308         (mode_adjust): Accept new arg UMASK_VALUE, and interpret it
147309         at the correct time.  Simplify calculation of "+u" and its ilk.
147310         Don't mishandle "+X".
147311         (mode_free): Remove "register" and localize decls.
147312         * lib/modechange.h (MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
147313         (struct mode_change): Move to modechange.c; callers don't
147314         need to see this stuff.
147315         (MODE_MASK_EQUALS, MODE_MASK_PLUS, MODE_MASK_MINUS, MODE_MASK_ALL):
147316         (MODE_INVALID, MODE_MEMORY_EXHAUSTED, MODE_BAD_REFERENCE): Remove.
147317         (mode_change, mode_adjust): Reflect the new signatures noted above.
147318         * lib/nanosleep.c (rpl_nanosleep): Include "timespec.h" before macros
147319         that might redefine system include files.
147320         (siginterrupt) [!HAVE_SIGINTERRUPT]: New macro.
147321         (my_usleep): Use NULL rather than (void *) 0.
147322         (rpl_nanosleep) [!defined SA_NOCLDSTOP]:
147323         Use siginterrupt to specify that system calls should be interrupted.
147324         (rpl_nanosleep): Move initialization of suspended closer to call of
147325         my_usleep.
147326         * lib/readutmp.h (read_utmp): New arg OPTIONS.  All uses changed.
147327         * lib/readutmp.c: Likewise.  Include signal.h, stdbool.h.
147328         (desirable_utmp_entry): New function.
147329         (read_utmp) [defined UTMP_NAME_FUNCTION]: Redo memory allocation
147330         using x2nrealloc, to simplify logic.
147331         (read_utmp) [!defined UTMP_NAME_FUNCTION]: Check for overflow in
147332         size calculation.  Do not assume utmp file is a regular file.
147333         * lib/readutmp.h (UT_PID): Moved here from ../src/who.c.
147334         (READ_UTMP_CHECK_PIDS): New constant.
147335         * lib/save-cwd.c: Include unistd-safer.h.
147336         (save_cwd): Use fd_safer.
147337         * lib/tempname.c (S_ISDIR, S_IRUSR, S_IRUSR, S_IWUSR, S_IXUSR): Remove.
147338         [!_LIBC] Include "stat-macros.h" instead.
147339         * lib/unistd-safer.h (fd_safer): New decl.
147341 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
147343         * modules/getloadavg (Depends-on): Add unistd-safer.
147344         * modules/getusershell (Depends-on): Add stdio-safer.
147345         * modules/lstat (Depends-on): Remove xalloc.
147346         * modules/mkstemp (Depends-on): Add stat-macros.
147347         * modules/modechange (Depends-on): Remove xstrtol.
147348         Add stat-macros, xalloc.
147349         * modules/save-cwd (Depends-on): Add unistd-safer.
147350         * modules/stdio-safer (Makefile.am): Remove lib_SOURCES.
147351         * modules/unistd-safer (Files): Add lib/fd-safer.c
147352         (Makefile.am): Remove lib_SOURCES.
147354         * MODULES.html.sh (Enhancements for POSIX:2001 functions):
147355         Remove fcntl-safer; unistd-safer supersedes it.
147357 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
147359         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Don't require
147360         AC_HEADER_STAT.
147361         * m4/lchown.m4 (gl_FUNC_CHOWN): Likewise.
147362         (gl_PREREQ_CHOWN): Remove.
147363         * m4/lstat.m4 (gl_FUNC_LSTAT): Require AC_FUNC_LSTAT instead of calling
147364         it.  Don't require AC_HEADER_STAT.
147365         (gl_PREREQ_LSTAT): Remove.
147366         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Check stdint.h only once.
147367         Don't require AC_HEADER_STAT.
147368         * m4/rmdir.m4 (gl_FUNC_RMDIR): Don't require AC_HEADER_STAT.
147369         (gl_PREREQ_RMDIR): Remove.
147370         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Don't
147371         mention stat-macros.h or AC_HEADER_STAT, since we'll make
147372         the stat-macros module a prerequisite.
147373         * m4/file-type.m4 (gl_FILE_TYPE): Likewise.
147374         * m4/filemode.m4 (gl_FILEMODE): Likewise.
147375         * m4/makepath.m4 (gl_MAKEPATH): Likewise.
147376         * m4/modechange.m4 (gl_MODECHANGE): Likewise.
147377         * m4/clock_time.m4 (gl_CLOCK_TIME): Use gl_ rather than fetish_ for
147378         variable names.
147379         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Renamed from
147380         fetish_FUNC_RMDIR_NOTEMPTY.  All uses changed.  Use gl_ for
147381         variable prefixes.
147382         * m4/fcntl-safer.m4: Remove.
147383         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Use AC_LIBSOURCES and AC_LIBOBJ.
147384         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise.
147385         Invoke gl_PREREQ_FD_SAFER.
147386         (gl_PREREQ_FD_SAFER): New macro.
147387         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): Check for siginterrupt.
147388         * m4/readutmp.m4 (gl_READUTMP): Require AC_C_INLINE.
147389         Use AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE when possible.
147390         Remove duplicate call to AC_LIBOBJ(readutmp).
147391         (gl_PREREQ_READUTMP): Remove.  All uses inlined.
147393         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Check for message, not for
147394         MAP_ANON.  Problem reported by Moriyoshi Koizumi to bug-cvs.
147396 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
147398         * MODULES.html.sh (Misc): Add byteswap.
147400 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
147402         * modules/getcwd (Depends-on): Add extensions.
147403         * modules/openat (Depends-on): Likewise.
147405 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
147407         * modules/byteswap: New file.
147409 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
147411         * m4/byteswap.m4: New file.
147413 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
147415         * lib/byteswap_.h: New file.
147417 2005-04-25  Karl Berry  <karl@gnu.org>
147419         * m4/gettext.m4: Update from GNU gettext 0.14.4.
147421 2005-04-25  Albert Chin  <china@thewrittenword.com>
147423         * lib/regex.c: Include <stdio.h>, as a workaround to a Compaq Desktop
147424         Toolkit C bug.
147426 2005-04-21  Oskar Liljeblad  <oskar@osk.mine.nu>
147428         * gnulib-tool (Options): Add -s for --symlink/--symbolic.
147429         (func_ln_if_changed): Remove forcibly for no error message
147430         in case file does not exist.
147432 2005-04-19  Simon Josefsson  <jas@extundo.com>
147434         * gnulib-tool (Options): Make --symlink mean --symbolic.
147436 2005-04-18  Oskar Liljeblad  <oskar@osk.mine.nu>
147438         * doc/gnulib.texi (Initial import): Fix.  Mention --aux-dir.
147440 2005-04-16  Simon Josefsson  <jas@extundo.com>
147442         * modules/getpass-gnu (Makefile.am): Don't mention getpass.h.
147444 2005-04-15  Simon Josefsson  <jas@extundo.com>
147446         * m4/getpass.m4 (gl_FUNC_GETPASS): Use AC_LIBSOURCES.
147448 2005-04-15  Simon Josefsson  <jas@extundo.com>
147450         * gnulib-tool: Rename --symlink to --symbolic.
147452 2005-04-15  Oskar Liljeblad  <oskar@osk.mine.nu>
147454         * gnulib-tool: Add -s, --symlink option to gnulib-tool to make
147455         symbolic links to files instead of copying/moving.  Add --aux-dir,
147456         specifying directory relative --dir where auxiliary build tools
147457         are placed.
147459 2005-04-14  Bruno Haible  <bruno@clisp.org>
147461         * modules/allocsa (License): Change to LGPL.
147462         Requested by Yoann Vandoorselaere <yoann@prelude-ids.org>.
147464 2005-04-13  Paul Eggert  <eggert@cs.ucla.edu>
147466         * lib/getdate.y (zone): Allow relunit_snumber after tZONE, so
147467         that "UTC +1 second" continues to work.  Problem reported
147468         by Dmitry V. Levin.
147469         (relunit_snumber): New rule.
147470         (relunit): Use it.
147472 2005-04-12  Paul Eggert  <eggert@cs.ucla.edu>
147474         * lib/getdate.y (universal_time_zone_table): New constant.
147475         (time_zone_table): Remove GMT, UT, UTC entries; they're now in
147476         universal_time_zone_table.
147477         (lookup_zone): Prefer universal_time_zone_table to
147478         local_time_zone_table, so that "GMT" time stamps are allowed in
147479         London during the summer.  Problem reported by Ian Abbott.
147481 2005-04-12  Jim Meyering  <jim@meyering.net>
147483         * lib/human.c (humblock): Set *options even when returning due to
147484         xstrtoumax conversion failure.  Thanks to a used-uninitialized
147485         warning from gcc-4.
147487 2005-04-09  Jim Meyering  <jim@meyering.net>
147489         * lib/posixtm.c (posixtime) [lint]: Avoid spurious warning from gcc-4's
147490         -Wuninitialized: initialize tm0.tm_year.
147492 2005-04-04  Paul Eggert  <eggert@cs.ucla.edu>
147494         * lib/getdate.y (parser_control): rels_seen is now a boolean, not a
147495         count, since there's no maximum.  All uses changed.
147496         Add member dsts_seen.
147497         (local_zone): Accumulate dsts_seen rather than relying on tm_isdst
147498         not being INT_MAX.
147499         (get_date): Initialize dsts_seen, and check that it doesn't go over 1.
147500         Use pc_rels_seen to decide whether a date is absolute.
147502         * lib/getdate.y (number): Don't overwrite year.
147503         (get_date): Initialize pc.year.digits to 0, not 4, to enable above
147504         check.
147506 2005-04-02  Simon Josefsson  <jas@extundo.com>
147508         * lib/getaddrinfo.h: Fix OpenBSD compilation failure, inspired by tiny
147509         patch from Yoann Vandoorselaere <yoann@prelude-ids.org>.
147511 2005-03-28  Eric Blake  <ebb9@byu.net>  (tiny change)
147513         * m4/getcwd-path-max.m4: Return success on systems such as Cygwin
147514         where no absolute path name can be longer than PATH_MAX.
147516 2005-03-27  Jim Meyering  <jim@meyering.net>
147518         * lib/argmatch.c: Clarify comment: null-terminated -> NULL-terminated.
147520 2005-03-26  Paul Eggert  <eggert@cs.ucla.edu>
147522         * lib/intprops.h (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND):
147523         "one's complement" -> "ones' complement" in comment, as per Knuth.
147524         "value of type" -> "type or expression" in comment.
147525         * lib/mktime.c, strftime.c: Propagate intprops.h comment nits.
147527 2005-03-26  Jim Meyering  <jim@meyering.net>
147529         Comment nits.
147530         * lib/intprops.h: Add the apostrophe in `(one|two)'s complement'.
147531         Correct typos: s/or/of/.
147533 2005-03-26  Jim Meyering  <jim@meyering.net>
147535         * modules/check-include-files: Move to ../ and rename to...
147536         * check-module: ...this.
147538 2005-03-25  Jim Meyering  <jim@meyering.net>
147540         * modules/xvasprintf (Files): Add xalloc.h.
147542 2005-03-23  Paul Eggert  <eggert@cs.ucla.edu>
147544         * modules/gettext (Files): config/config.rpath ->
147545         build-aux/config.rpath
147546         * modules/iconv (Files): Likewise.
147547         Problem reported by Oskar Liljeblad.
147549 2005-03-23  Jim Meyering  <jim@meyering.net>
147551         * modules/check-include-files: New script to check for
147552         missing dependencies, multiple includes, etc.
147554         * modules/c-strtold (Depends-on): Add xalloc.
147555         * modules/c-strtod (Depends-on): Add xalloc.
147556         * modules/hash (Depends-on): Add xalloc.
147557         (Files): Remove lib/xalloc.h.
147559         * modules/gethrxtime (Files): Add lib/gethrxtime.h.
147560         * modules/userspec (Files): Add lib/inttostr.h.
147562 2005-03-23  Jim Meyering  <jim@meyering.net>
147564         * lib/canonicalize.c: Remove duplicate `#include "stat-macros.h"'.
147566 2005-03-22  Jim Meyering  <jim@meyering.net>
147568         * modules/stat-macros: New module.
147569         * modules/canonicalize, modules/euidaccess, modules/file-type,
147570         * modules/filemode, modules/lchown, modules/makepath,
147571         * modules/rmdir, modules/stat: Depend on new stat-macros module
147572         rather than listing lib/stat-macros.h manually.
147573         Don't add stat-macros.h to lib_SOURCES or list it in Files: section.
147575 2005-03-22  Jim Meyering  <jim@meyering.net>
147577         * m4/stat-macros.m4 (gl_STAT_MACROS): New file/macro.
147579 2005-03-22  Bruno Haible  <bruno@clisp.org>
147581         * config/srclist.txt: Replace target directory 'config' with
147582         'build-aux'.
147583         * config/config.guess, config.sub, config.rpath, depcomp, install-sh:
147584         * config/mdate-sh, missing, mkinstalldirs, texinfo.tex: Move to
147585         ../build-aux/.
147587 2005-03-21  Paul Eggert  <eggert@cs.ucla.edu>
147589         * modules/chdir-long (Depends-on): Add mempcpy.
147591         * modules/acl, modules/backupfile, modules/c-strtod,
147592         modules/c-strtold, modules/canon-host, modules/canonicalize,
147593         modules/cloexec, modules/closeout, modules/dirfd, modules/dirname,
147594         modules/exclude, modules/exitfail, modules/file-type,
147595         modules/filemode, modules/fpending, modules/fsusage, modules/getcwd,
147596         modules/getdate, modules/getline, modules/getpagesize,
147597         modules/getpass, modules/getugroups, modules/group-member,
147598         modules/hard-locale, modules/hash, modules/human, modules/idcache,
147599         modules/inttostr, modules/long-options, modules/makepath,
147600         modules/md5, modules/memcasecmp, modules/memcoll,
147601         modules/modechange, modules/mountlist, modules/path-concat,
147602         modules/pathmax, modules/physmem, modules/posixtm, modules/posixver,
147603         modules/quote, modules/quotearg, modules/readtokens, modules/readutmp,
147604         modules/safe-read, modules/safe-write, modules/same, modules/savedir,
147605         modules/settime, modules/sha1, modules/sig2str, modules/strdup,
147606         modules/strftime, modules/strndup, modules/strverscmp,
147607         modules/timespec, modules/unlocked-io, modules/userspec,
147608         modules/utimecmp, modules/utimens, modules/xalloc, modules/xstrtol,
147609         modules/yesno:
147610         Remove lib_SOURCES line from Makefile.am section, as this is now
147611         done automatically by the corresponding Autoconf macro.
147613 2005-03-21  Jim Meyering  <jim@meyering.net>
147615         Changes imported from coreutils.
147617         * lib/cycle-check.c: Don't include xalloc.h.
147619         * lib/path-concat.c: Don't include assert.h.
147620         (path_concat): Remove assertion that would have triggered
147621         for ABASE starting with more than one slash.
147622         Reported by Andreas Schwab.
147624         * lib/path-concat.c (path_concat): Set *BASE_IN_RESULT
147625         properly when ABASE is an absolute file name.
147626         Correct the description of this function.
147627         Include <assert.h>.
147628         Add an assertion and a test driver.
147629         This fixes a bug introduced on 2004-07-02.
147630         Andreas Schwab reported the resulting failure of cp --parents:
147631         http://lists.gnu.org/r/bug-coreutils/2005-01/msg00130.html
147633 2005-03-21  Jim Meyering  <jim@meyering.net>
147635         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Invoke gl_FUNC_MEMRCHR.
147636         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Check for memrchr decl.
147638 2005-03-21  Jim Meyering  <jim@meyering.net>
147639         and  Paul Eggert  <eggert@cs.ucla.edu>
147641         * m4/acl.m4, m4/backupfile.m4, m4/c-strtod.m4, m4/canon-host.m4,
147642         m4/canonicalize.m4, m4/cloexec.m4, m4/closeout.m4, m4/dirfd.m4,
147643         m4/dirname.m4, m4/exclude.m4, m4/exitfail.m4, m4/file-type.m4,
147644         m4/filemode.m4, m4/fpending.m4, m4/fsusage.m4, m4/getcwd.m4,
147645         m4/getdate.m4, m4/getline.m4, m4/getpagesize.m4, m4/getpass.m4,
147646         m4/getugroups.m4, m4/group-member.m4, m4/hard-locale.m4, m4/hash.m4,
147647         m4/human.m4, m4/idcache.m4, m4/inttostr.m4, m4/long-options.m4,
147648         m4/makepath.m4, m4/md5.m4, m4/memcasecmp.m4, m4/memcoll.m4,
147649         m4/modechange.m4, m4/mountlist.m4, m4/nanosleep.m4, m4/path-concat.m4,
147650         m4/pathmax.m4, m4/physmem.m4, m4/posixtm.m4, m4/posixver.m4,
147651         m4/quote.m4, m4/quotearg.m4, m4/readtokens.m4, m4/readutmp.m4,
147652         m4/safe-read.m4, m4/safe-write.m4, m4/same.m4, m4/savedir.m4,
147653         m4/settime.m4, m4/sha1.m4, m4/sig2str.m4, m4/strdup.m4, m4/strftime.m4,
147654         m4/strndup.m4, m4/strverscmp.m4, m4/timespec.m4, m4/unlocked-io.m4,
147655         m4/userspec.m4, m4/utimecmp.m4, m4/utimens.m4, m4/xalloc.m4,
147656         m4/xnanosleep.m4, m4/xstrtol.m4, m4/yesno.m4:
147657         Use AC_LIBSOURCES and AC_LIBOBJ to indicate source and object files
147658         for these modules.
147660 2005-03-18  Paul Eggert  <eggert@cs.ucla.edu>
147662         * lib/strftime.c (my_strftime): If the underlying strftime returns 0
147663         (which shouldn't happen), generate nothing instead of returning 0
147664         immediately, so that nstrftime (NULL, ...) doesn't return 0.
147666 2005-03-16  Bruno Haible  <bruno@clisp.org>
147668         * modules/stdint (Makefile.am): Use HAVE_LONG_LONG_64BIT instead of
147669         HAVE_LONGLONG_64BIT.
147671 2005-03-16  Bruno Haible  <bruno@clisp.org>
147673         * m4/stdint.m4 (gl_STDINT_H): Define HAVE_LONG_LONG_64BIT instead of
147674         HAVE_LONGLONG_64BIT.
147676 2005-03-16  Bruno Haible  <bruno@clisp.org>
147678         * lib/stdint_.h: Use HAVE_LONG_LONG_64BIT instead of
147679         HAVE_LONGLONG_64BIT.
147681 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
147683         * lib/strftime.c (my_strftime): Prepend space to format so that we can
147684         reliably distinguish strftime failure from empty output on POSIX
147685         hosts.
147687 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
147689         * lib/iconvme.c (SIZE_MAX): New macro, if not already defined.
147690         (iconv_string): Don't guess a size-zero buffer, as that might cause
147691         buffer overrun.  Instead, avoid multiplying by MB_LEN_MAX if the
147692         result would be 'too large', where 'too large' is (heuristically)
147693         the square root of SIZE_MAX, divided by MB_LEN_MAX to allay
147694         overflow concerns.  This will prevent some unwanted malloc failures
147695         when the inputs are very large.
147697 2005-03-15  Karl Berry  <karl@gnu.org>
147699         * config/srclist.txt (config.rpath): from gettext.
147700         * config/config.rpath: update.
147702 2005-03-15  Bruno Haible  <bruno@clisp.org>
147704         * lib/regex.c (byte_re_match_2_internal): Rename local variable 'not'
147705         to 'negate'.
147707         * lib/regex.c (byte_re_match_2_internal): Reduce scope of same_str_p
147708         variable.
147710         * lib/regex.c (EXTEND_BUFFER, regcomp): Cast the realloc/malloc
147711         results.
147713 2005-03-14  Simon Josefsson  <jas@extundo.com>
147715         * lib/timegm.h: Use proper prototype CPP guards, reported by Dave Love
147716         <fx@gnu.org>.
147718 2005-03-14  Paul Eggert  <eggert@cs.ucla.edu>
147720         * lib/mktime.c (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT,
147721         TYPE_SIGNED_MAGNITUDE, TYPE_MINIMUM, TYPE_MAXIMUM): Sync from
147722         intprops.h.
147723         * lib/strtol.c: Likewise.
147725 2005-03-14  Jim Meyering  <jim@meyering.net>
147727         * lib/strftime.c (my_strftime) [HAVE_STRFTIME && ! (_NL_CURRENT
147728         && HAVE_STRUCT_ERA_ENTRY)]: Initialize the first byte of ubuf[]
147729         to be nonzero so that we (and caller) can detect the difference
147730         between a valid zero-length expansion and an error return, even
147731         when the underlying strftime fails before writing anything into
147732         that location.
147734 2005-03-14  Bruno Haible  <bruno@clisp.org>
147736         * m4/lib-link.m4, gettext.m4, nls.m4, po.m4:
147737         Update from GNU gettext 0.14.3.
147739 2005-03-10  Jim Meyering  <jim@meyering.net>
147741         * m4/save-cwd.m4 (gl_SAVE_CWD): Check for fchdir.
147743 2005-03-10  Jim Meyering  <jim@meyering.net>
147745         * lib/save-cwd.c [!HAVE_FCHDIR]: Define open, fchdir, and chdir_long
147746         so that this module works on systems without fchdir.
147748 2005-03-09  Paul Eggert  <eggert@cs.ucla.edu>
147750         Factor int-properties macros into a single file, except for
147751         glibc-related files.
147752         * lib/intprops.h: New file.
147753         * lib/getloadavg.c: Include it instead of limits.h.
147754         (INT_STRLEN_BOUND): Remove.
147755         * lib/human.c: Include intprops.h.
147756         (group_number): Use INT_STRLEN_BOUND instead of rolling it ourself.
147757         * lib/human.h (LONGEST_HUMAN_READABLE): Use 146/485 rather than
147758         302/1000.
147759         * lib/inttostr.h: Include intprops.h instead of limits.h.
147760         (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND): Remove.
147761         * lib/mktime.c (TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT): New macros,
147762         for consistency with intprops.h.
147763         (time_t_is_integer, twos_complement_arithmetic): Use them.
147764         * lib/sig2str.h: Include <signal.h>, intprops.h.
147765         (INT_STRLEN_BOUND): Remove.
147766         * lib/strftime.c (TYPE_SIGNED): Remove.
147767         (INT_STRLEN_BOUND): Switch to same implementation as intprops.h.
147768         * lib/strtol.c: Adjust comments to match intprops.h.
147769         * lib/userspec.c: Include intprops.h.
147770         (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove.
147771         * lib/utimecmp.c, xnanosleep.c, xstrtol.c: Likewise.
147772         * lib/utimecmp.c (utimecmp): Use TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT
147773         instead of rolling our own expressions.
147774         * lib/xstrtol.c: Include xstrtol.h first, to test interface.
147776         * lib/strftime.c: Include <stdbool.h>.  Use bool where appropriate,
147777         instead of int.
147778         (my_strftime): Do not mishandle years close to INT_MAX, by doing
147779         the right thing even if adding 1900 would overflow.  Similarly
147780         for tm_mon + 1 and tm_yday + 1.
147781         Make %Y always equivalent to %C%y, and similarly for %G and %g.
147782         (DO_NUMBER, DO_NUMBER_SPACEPAD): Set digits to d, not a conditional.
147783         (DO_SIGNED_NUMBER): New macro.
147784         (my_strftime) [HAVE_TZNAME]: Don't dump core if tp->tm_dst > 1.
147786 2005-03-07  Bruno Haible  <bruno@clisp.org>
147788         * m4/mmap-anon.m4 (MAP_FILE, MAP_FAILED): Remove definitions.
147790 2005-03-07  Bruno Haible  <bruno@clisp.org>
147792         * lib/pagealign_alloc.c (MAP_FILE, MAP_FAILED): Define fallbacks.
147794 2005-03-04  Derek R. Price  <derek@ximbiot.com>
147796         * gnulib-tool (func_cp_if_changed, func_mv_if_changed): New functions.
147797         (func_import): Only replace files via --import when they have actually
147798         changed.
147800 2005-03-03  Derek R. Price  <derek@ximbiot.com>
147802         * m4/mmap-anon.m4: New file.
147803         * m4/pagealign_alloc.m4: New file.
147805 2005-03-03  Derek R. Price  <derek@ximbiot.com>
147806             Bruno Haible  <bruno@clisp.org>
147808         * modules/pagealign_alloc: New file.
147809         * MODULES.html.sh (Memory management functions): Add pagealign_alloc.
147811 2005-03-03  Derek R. Price  <derek@ximbiot.com>
147812             Bruno Haible  <bruno@clisp.org>
147814         * lib/pagealign_alloc.h: New file.
147815         * lib/pagealign_alloc.c: New file.
147817 2005-03-03  Bruno Haible  <bruno@clisp.org>
147819         * m4/inttypes.m4, isc-posix.m4, once-only.m4:
147820         Use an all-permissive copyright notice, recommended by RMS.
147822 2005-03-02  Bruno Haible  <bruno@clisp.org>
147824         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Undo the replacement here. Because
147825         of AIX, the replacement has to be done only after <string.h> is
147826         included, therefore not in config.h. stpncpy.h does the replacement,
147827         and stpncpy.c uses it.
147829 2005-03-02  Bruno Haible  <bruno@clisp.org>
147831         * lib/stpncpy.h (stpncpy): Define as a macro without arguments, so that
147832         stpncpy.c uses it.
147834 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
147836         Remove workaround for bug in Linux kernel 2.6.8 or thereabouts.
147837         The workaround isn't strictly needed for POSIX conformance, and
147838         it's too much of a pain to configure and maintain.  We'll ask
147839         people to fix their kernels instead.
147840         * lib/xnanosleep.c: Don't include gethrxtime.h or xtime.h.
147841         (NANOSLEEP_BUG_WORKAROUND): Remove.
147842         (xnanosleep): Remove the workaround.
147844 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
147846         * modules/gettime (Makefile.am): Remove lib_SOURCES line.
147847         Reported by Derek Price.
147848         (Include): Add "timespec.h".
147850         * modules/xnanosleep (Depends-on): Remove gethrxtime.
147852 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
147854         * m4/xnanosleep.m4 (gl_XNANOSLEEP): Remove configuration attempting
147855         to detect nanosleep bug.
147857 2005-03-01  Bruno Haible  <bruno@clisp.org>
147859         * lib/vasnprintf.c (EOVERFLOW): Define to a fallback if needed.
147861 2005-02-26  Paul Eggert  <eggert@cs.ucla.edu>
147863         * modules/gethrxtime: New file.
147864         * modules/xnanosleep (Files): Add m4/xnanosleep.m4.
147865         (Depends-on): Add gethrxtime.
147866         (configure.ac): Add gl_XNANOSLEEP.
147867         (Makefile.am): Remove lib_SOURCES line.
147869 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
147871         * m4/gethrxtime.m4, m4/xnanosleep.m4: New files.
147872         * m4/gettime.m4 (gl_GETTIME): Check for nanotime.
147874 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
147876         * lib/gethrxtime.h, lib/gethrxtime.c, lib/xtime.h: New files.
147877         * lib/timespec.h (gettime): Return void, since it always
147878         succeeds now.  All uses changed.
147879         * lib/gettime.c (gettime): Likewise.
147880         [HAVE_NANOTIME]: Prefer nanotime.
147881         Assume gettimeofday succeeds, as POSIX requires.
147882         Assime time () succeeds, since other code already does.
147883         * lib/xnanosleep.c: Include xtime.h and gethrxtime.h, not xalloc.h.
147884         (timespec_subtract): Remove.
147885         (NANOSLEEP_BUG_WORKAROUND): New constant.
147886         (xnanosleep): Use gethrxtime rather than gettime; this simplifies
147887         things considerably.  Use it only on GNU/Linux hosts, since the
147888         workaround shouldn't be needed elsewhere.
147890 2005-02-24  Bruno Haible  <bruno@clisp.org>
147892         * modules/gettext (Files): Add m4/glibc2.m4.
147894 2005-02-24  Bruno Haible  <bruno@clisp.org>
147896         * m4/gettext.m4, intdiv0.m4, intmax.m4, inttypes-pri.m4, lcmessage.m4:
147897         * m4/lib-link.m4, lib-prefix.m4, nls.m4, po.m4, printf-posix.m4:
147898         * m4/progtest.m4:
147899         Update from GNU gettext 0.14.2.
147900         * m4/glibc2.m4: New file, from GNU gettext 0.14.2.
147902 2005-02-24  Bruno Haible  <bruno@clisp.org>
147904         * lib/localcharset.c: Update from GNU gettext 0.14.2.
147905         * lib/config.charset: Update from GNU gettext 0.14.2.
147907 2005-02-24  Bruno Haible  <bruno@clisp.org>
147909         * lib/gettext.h: Update from GNU gettext 0.14.2.
147911 2005-02-23  Simon Josefsson  <jas@extundo.com>
147913         * m4/iconvme.m4: New file.
147915 2005-02-23  Jim Meyering  <jim@meyering.net>
147917         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Revert yesteday's
147918         change.
147919         Thanks to Bruno Haible for catching it.
147921 2005-02-22  Simon Josefsson  <jas@extundo.com>
147923         * modules/iconvme: New file.
147925         * MODULES.html.sh: Add iconvme.
147927 2005-02-22  Simon Josefsson  <jas@extundo.com>
147929         * lib/iconvme.h, lib/iconvme.c: New files, from libc.
147931 2005-02-22  Simon Josefsson  <jas@extundo.com>
147933         * config/srclist.txt: Sync iconvme.h, iconvme.c from libc.
147935 2005-02-22  Jim Meyering  <jim@meyering.net>
147937         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Fix typo:
147938         s/ifndef/ifdef/.
147940 2005-02-20  Neil Conway  <neilc@samurai.com>
147942         * lib/xgethostname.c (xgethostname): Check for ENOMEM, which is
147943         returned by OSX/Darwin if the specified buffer is not large
147944         enough for the hostname.
147946 2005-02-03  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
147948         * lib/argp-help.c (__argp_help): Create a fake struct argp_state and
147949         pass it to _help, otherwise the latter coredumps trying to
147950         dereference state.root_argp.
147952 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
147954         * modules/chdir-long (Depends-on): Add memrchr.
147955         * modules/memrchr (Files): Add lib/memrchr.h.
147956         (Include): "memrchr.h".
147958 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
147960         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Add AC_LIBSOURCES, for memrchr.h.
147962 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
147964         * lib/memrchr.h: New file.
147965         * lib/chdir-long.c: Include it.
147966         * lib/memrchr.c [!defined _LIBC]: Include it rather than <string.h>
147967         Don't bother including stddef.h.
147969 2005-02-01  Paul Eggert  <eggert@cs.ucla.edu>
147971         * lib/mountlist.h (MOUNTLIST_H_): New macro, to protect against double
147972         inclusion.
147973         Include <sys/types.h>, for dev_t.
147974         (ME_DUMMY, ME_REMOTE): Move from here....
147975         * lib/mountlist.c (ME_DUMMY, ME_REMOTE): To here.
147976         (ME_DUMMY): Count "subfs" as a dummy.  Problem reported by
147977         Dmitry V. Levin.
147978         Include mountlist.h first, to test the interface.
147980 2005-01-29  Bruno Haible  <bruno@clisp.org>
147982         * lib/progname.c (program_name): Initialize.
147983         Needed when linking statically on MacOS X.
147985 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
147987         Sync from coreutils.
147988         * modules/getloadavg (Files): Remove m4/getloadavg.m4.
147989         (Depends-on): Add c-strtod.
147990         (configure.ac): Replace gl_FUNC_GETLOADAVG with AC_FUNC_GETLOADAVG.
147992 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
147994         Sync from coreutils.
147995         * m4/getloadavg.m4, glibc.m4, search-libs.m4: Remove.
147997         Remove files that are specific to coreutils.
147998         * m4/check-decl.m4, jm-macros.m4, lib-check.m4, prereq.m4: Remove.
148000 2005-01-28  Bruno Haible  <bruno@clisp.org>
148002         * modules/javacomp: New file.
148003         * MODULES.html.sh (Java): Add javacomp.
148005 2005-01-28  Bruno Haible  <bruno@clisp.org>
148007         * m4/javacomp.m4: New file, from GNU gettext.
148009 2005-01-28  Bruno Haible  <bruno@clisp.org>
148011         * lib/javacomp.sh.in: New file, from GNU gettext.
148012         * lib/javacomp.h: New file, from GNU gettext.
148013         * lib/javacomp.c: New file, from GNU gettext.
148015 2005-01-26  Simon Josefsson  <jas@extundo.com>
148017         * lib/gai_strerror.c: Use GPL in header.
148019 2005-01-26  Bruno Haible  <bruno@clisp.org>
148021         * modules/javaexec: New file.
148022         * MODULES.html.sh (Java): Add javaexec.
148024 2005-01-26  Bruno Haible  <bruno@clisp.org>
148026         * m4/javaexec.m4: New file, from GNU gettext.
148028 2005-01-26  Bruno Haible  <bruno@clisp.org>
148030         * lib/javaexec.sh.in: New file, from GNU gettext.
148031         * lib/javaexec.h: New file, from GNU gettext.
148032         * lib/javaexec.c: New file, from GNU gettext.
148034 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
148036         * modules/lchown (Depends-on): Remove lchown.h
148038 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
148040         * m4/sysexits.m4 (gl_SYSEXITS): Reverted logic. SYSEXITS_H
148041         must be defined if the header file was not found, in order
148042         to provide a replacement. Reported by Todd Vierling <tv@duh.org>
148044 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
148046         * lib/argp-help.c (hol_entry_help): Avoid using non-constant
148047         initializers for struct pentry_state.
148048         (__argp_error): Check return value of __asprintf
148049         (__argp_failure): Translate error message
148051         * lib/argp-parse.c: Removed braces around the expansion of N_()
148053 2005-01-23  Paul Eggert  <eggert@cs.ucla.edu>
148055         * m4/acl.m4, afs.m4, alloca.m4, argp.m4, assert.m4, atexit.m4,
148056         backupfile.m4, base64.m4, bison.m4, c-bs-a.m4, c-stack.m4,
148057         c-strtod.m4, calloc.m4, canon-host.m4, canonicalize.m4,
148058         clock_time.m4, cloexec.m4, closeout.m4, d-ino.m4, d-type.m4,
148059         dirfd.m4, dirname.m4, dos.m4, dup2.m4, error.m4, euidaccess.m4,
148060         exclude.m4, exitfail.m4, extensions.m4, fcntl-safer.m4,
148061         file-type.m4, fileblocks.m4, filemode.m4, fnmatch.m4, fpending.m4,
148062         free.m4, fstypename.m4, fsusage.m4, ftruncate.m4, getaddrinfo.m4,
148063         getcwd-path-max.m4, getcwd.m4, getdate.m4, getdomainname.m4,
148064         getgroups.m4, gethostname.m4, getline.m4, getndelim2.m4,
148065         getnline.m4, getopt.m4, getpagesize.m4, getpass.m4, getsubopt.m4,
148066         gettime.m4, gettimeofday.m4, getugroups.m4, getusershell.m4,
148067         group-member.m4, hard-locale.m4, hash.m4, host-os.m4, human.m4,
148068         idcache.m4, inttostr.m4, isdir.m4, jm-winsz1.m4, jm-winsz2.m4,
148069         link-follow.m4, long-options.m4, ls-mntd-fs.m4, lstat.m4,
148070         makepath.m4, mathl.m4, md5.m4, memcasecmp.m4, memchr.m4,
148071         memcmp.m4, memcoll.m4, memcpy.m4, memmem.m4, memmove.m4,
148072         memrchr.m4, memset.m4, mkdir-slash.m4, mkstemp.m4, mktime.m4,
148073         modechange.m4, mountlist.m4, nanosleep.m4, obstack.m4,
148074         path-concat.m4, pathmax.m4, perl.m4, physmem.m4, poll.m4,
148075         posixtm.m4, posixver.m4, putenv.m4, quote.m4, quotearg.m4,
148076         readdir.m4, readtokens.m4, readutmp.m4, regex.m4, rename.m4,
148077         restrict.m4, rmdir-errno.m4, rmdir.m4, rpmatch.m4, same.m4,
148078         savedir.m4, settime.m4, sha1.m4, sig2str.m4, snprintf.m4,
148079         sockpfaf.m4, st_dm_mode.m4, st_mtim.m4, stat.m4, stdint.m4,
148080         stdio-safer.m4, strchrnul.m4, strdup.m4, strerror.m4,
148081         strerror_r.m4, strftime.m4, strndup.m4, strnlen.m4, strsep.m4,
148082         strtod.m4, strtoimax.m4, strtok_r.m4, strtol.m4, strtoll.m4,
148083         strtoul.m4, strtoull.m4, strtoumax.m4, strverscmp.m4, sysexits.m4,
148084         time_r.m4, timegm.m4, timespec.m4, tm_gmtoff.m4, tzset.m4,
148085         uint32_t.m4, uintptr_t.m4, unistd-safer.m4, unlink-busy.m4,
148086         unlocked-io.m4, uptime.m4, userspec.m4, utimbuf.m4, utime.m4,
148087         utimecmp.m4, utimens.m4, utimes-null.m4, vsnprintf.m4, xalloc.m4,
148088         xgetcwd.m4, xreadlink.m4, xstrndup.m4, xstrtod.m4, xstrtoimax.m4,
148089         xstrtol.m4, xstrtoumax.m4, yesno.m4:
148090         Use an all-permissive copyright notice, recommended by RMS.
148092 2005-01-21  Paul Eggert  <eggert@cs.ucla.edu>
148094         * modules/chdir-long (Depends-on): Remove mempcpy.
148096 2005-01-21  Jim Meyering  <jim@meyering.net>
148098         * lib/openat.h (AT_SYMLINK_NOFOLLOW): Define to 4096, so it's the
148099         same value as for Solaris 9.
148101         * lib/chdir-long.c (chdir_long): Rewrite to remove limitation on
148102         component length.  This included changing the parameter to be
148103         of type `char *' rather than `char const *'.
148104         * lib/chdir-long.h (chdir_long): Update prototype.
148106         * lib/openat.c (fdopendir, fstatat): New functions.
148107         * lib/openat.h: Include headers required for use of DIR and struct
148108         stat.
148109         [AT_SYMLINK_NOFOLLOW]: Define.
148110         (fdopendir, fstatat): Add prototypes.
148112 2005-01-21  Bruno Haible  <bruno@clisp.org>
148114         * modules/classpath: New file.
148115         * MODULES.html.sh (Java): Add classpath.
148117 2005-01-21  Bruno Haible  <bruno@clisp.org>
148119         * lib/classpath.h: New file, from GNU gettext.
148120         * lib/classpath.c: New file, from GNU gettext.
148122 2005-01-20  Simon Josefsson  <jas@extundo.com>
148124         * modules/version-etc-fsf: New file.
148126 2005-01-20  Simon Josefsson  <jas@extundo.com>
148128         * lib/version-etc-fsf.c: New file, with version_etc_copyright.
148129         * lib/version-etc.c: Remove version_etc_copyright.
148130         * lib/version-etc.h (version_etc_copyright): Use [] instead of * in
148131         prototype, suggested by Paul Eggert <eggert@CS.UCLA.EDU>.
148133 2005-01-20  Simon Josefsson  <jas@extundo.com>
148135         * lib/base64.h (isbase64): Add.
148137         * lib/base64.c (isb64): Rename to isbase64, use to_uchar instead of
148138         using a unsigned prototype, don't inline.
148139         (base64_decode): Use it.
148141 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
148143         * m4/save-cwd.m4 (gl_SAVE_CWD): Remove check for fcntl; we now assume
148144         it.
148146 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
148148         * lib/save-cwd.c (save_cwd): Remove code to support the case
148149         where fchdir is missing or flaky.
148151 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
148153         * MODULES.html.sh (Command-line arguments): Add version-etc-fsf.
148155 2005-01-19  Paul Eggert  <eggert@cs.ucla.edu>
148157         * modules/mempcpy (Makefile.am): Remove mention of mempcpy.h;
148158         AC_LIBSOURCES now does this.
148159         * MODULES.html.sh (Sizes of integer types <limits.h>): New element,
148160         with new ullong_max module.
148162 2005-01-19  Bruno Haible  <bruno@clisp.org>
148164         * modules/sh-quote: New file.
148165         * MODULES.html.sh (Executing programs): Add sh-quote.
148167 2005-01-19  Bruno Haible  <bruno@clisp.org>
148169         * lib/sh-quote.h: New file, from GNU gettext.
148170         * lib/sh-quote.c: New file, from GNU gettext.
148172 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
148174         Merge from coreutils.
148175         * m4/ullong_max.m4: New file.
148176         * m4/jm-macros.m4 (gl_MACROS): Require gl_ULLONG_MAX.
148177         (gl_MACROS): Assume localeconv exists.
148179 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
148181         Merge changes from coreutils, as described below in several
148182         changelogs dated today.
148184         * lib/save-cwd.c: Include "save-cwd.h" before other include files.
148185         (O_DIRECTORY): Remove; not needed here, since "." must be
148186         a directory.  All uses removed.
148187         (save_cwd): Use __sgi || __sun, not sun || __sun.  __sun is
148188         universal on Suns, and we also need to test for IRIX.
148189         Revamp code to use 'if' rather than '#if'.
148190         Avoid unnecessary comparison of cwd->desc to 0.
148192         * lib/utimens.c (futimens): Robustify the previous patch, by checking
148193         for known valid error numbers rather than observed invalid ones.
148195 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
148197         * modules/ullong_max: New file.
148199         * modules/chdir-long, modules/openat: New files.
148200         * modules/save-cwd (Depends-on): Depend on chdir-long.
148201         (Makefile.am): Remove lib_SOURCES; now handled by AC_LIBSOURCES.
148203 2005-01-18  Jim Meyering  <jim@meyering.net>
148205         Merge from coreutils.
148206         * m4/chdir-long.m4, m4/openat.m4: New files.
148207         * m4/save-cwd.m4 (gl_SAVE_CWD): Add AC_LIBSOURCES for save-cwd.c,
148208         save-cwd.h.  Add AC_LIBOBJ for save-cwd.
148209         * m4/chown.m4 (gl_FUNC_CHOWN): When cross-compiling, assume that chown
148210         is sane and DOES follow symlinks.  Besides, testing 20 different
148211         systems found no broken chown implementations.
148212         Prompted by a change in rsync's copy of this macro.
148213         * m4/jm-macros.m4 (gl_MACROS): Require gl_FUNC_CHDIR_LONG.
148215         * m4/lchown.m4 (gl_FUNC_LCHOWN): Use AC_LIBSOURCES.
148217         * m4/utimes.m4: Work around tests/touch/empty-file failure on a system
148218         (sparc64, Linux-2.4.28, glibc-2.3.3) that didn't honor utimes'
148219         NULL-means-set-to-current-time semantics.
148220         Remove temporary file immediately, rather than waiting
148221         for configure's at-exit trap code to do it.
148223 2005-01-18  Jim Meyering  <jim@meyering.net>
148225         * lib/version-etc.c (version_etc_copyright): Update copyright date.
148227         * lib/utimens.c (futimens): Account for the fact that futimes
148228         can also fail with errno == ENOSYS or errno == ENOENT.
148229         Patch from Dmitry V. Levin.
148231         Change the name of the robust chdir function from chdir to chdir_long.
148232         * lib/save-cwd.c: Include chdir-long.h rather than chdir.h.
148233         (restore_cwd): Use chdir_long, not chdir.
148234         * lib/chdir-long.c: Renamed from chdir.c.
148235         * lib/chdir-long.h: Renamed from chdir.h.
148236         [!defined PATH_MAX]: Define chdir_long to chdir on systems like the
148237         Hurd.
148239 2005-01-18  Bruno Haible  <bruno@clisp.org>
148241         * m4/allocsa.m4, m4/codeset.m4, m4/copy-file.m4, m4/eaccess.m4:
148242         * m4/eealloc.m4, m4/eoverflow.m4, m4/execute.m4, m4/fatal-signal.m4:
148243         * m4/findprog.m4, m4/glibc21.m4, m4/iconv.m4, m4/intmax_t.m4:
148244         * m4/inttypes_h.m4, m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4:
148245         * m4/linebreak.m4, m4/localcharset.m4, m4/longdouble.m4:
148246         * m4/longlong.m4, m4/mbrtowc.m4, m4/mbstate_t.m4, m4/mbswidth.m4:
148247         * m4/mkdtemp.m4, m4/pipe.m4, m4/readlink.m4, m4/safe-read.m4:
148248         * m4/safe-write.m4, m4/setenv.m4, m4/sig_atomic_t.m4:
148249         * m4/signalblocking.m4, m4/signed.m4, m4/size_max.m4, m4/ssize_t.m4:
148250         * m4/stdbool.m4, m4/stdint_h.m4, m4/stpcpy.m4, m4/stpncpy.m4:
148251         * m4/strcase.m4, m4/strcspn.m4, m4/strpbrk.m4, m4/strstr.m4:
148252         * m4/ucs4-utf.m4, m4/uintmax_t.m4, m4/ulonglong.m4, m4/unicodeio.m4:
148253         * m4/utf-ucs4.m4, m4/vasnprintf.m4, m4/vasprintf.m4:
148254         * m4/wait-process.m4, m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4:
148255         Use an all-permissive copyright notice, recommended by RMS.
148257 2005-01-18  Bob Proulx  <bob@proulx.com>
148259         * lib/obstack.c [DEFAULT_ALIGNMENT]: Use an intermediate type to
148260         simplify offsetof() macro construct to avoid compile failure with
148261         native HP-UX 11.0 ANSI C compiler.
148263 2005-01-17  Bruno Haible  <bruno@clisp.org>
148265         * lib/stpncpy.c: Remove HAVE_STPNCPY and gnu_stpncpy renaming,
148266         redundant because stpncpy.m4 takes care of it.
148268 2005-01-17  Bruno Haible  <bruno@clisp.org>
148270         * lib/progreloc.c: Include xalloc.h instead of xmalloc.h.
148272 2005-01-17  Bruno Haible  <bruno@clisp.org>
148274         * lib/progreloc.c (xstrdup): Define as strdup if no xmalloc should be
148275         used.
148277 2005-01-17  Bruno Haible  <bruno@clisp.org>
148279         * lib/fwriteerror.h (fwriteerror): Change specification to include
148280         fclose.
148281         * lib/fwriteerror.c: Include <stdbool.h>.
148282         (fwriteerror): At the end, close the file stream. Record whether
148283         stdout was already closed.
148285 2005-01-17  Bruno Haible  <bruno@clisp.org>
148287         * lib/execute.c (environ): Declare if needed.
148288         * lib/pipe.c (environ): Likewise.
148289         Reported by Michael Schloh von Bennewitz <michael.schloh@cw.com>.
148291 2005-01-11  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
148293         * modules/argp: Depend on vsnprintf
148295 2005-01-10  Jim Meyering  <jim@meyering.net>
148297         * modules/closeout (Depends-on): Add atexit.
148299 2005-01-06  Bruno Haible  <bruno@clisp.org>
148301         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Rename stpncpy to gnu_stpncpy here.
148303 2005-01-04  Paul Eggert  <eggert@cs.ucla.edu>
148305         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Move these conditional
148306         definitions to be after all include files, to avoid collisions.
148307         Problem reported by Bob Proulx.
148309 2005-01-04  Jim Meyering  <jim@meyering.net>
148311         Changes imported from coreutils.
148312         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Rather than using "conftestXXXXXX"
148313         as the mkstemp template, use a temporary directory and an
148314         8.3-friendly template to avoid trouble on systems like DJGPP.
148315         Reported by Juan M. Guerrero via Stepan Kasal.
148316         * m4/(gl_FUNC_MKSTEMP): Include <unistd.h> for the declaration of
148317         close. Remove the temporary directory right away, rather than waiting
148318         for configure's at-exit trap code to do it.
148319         Suggestion from Stepan Kasal.
148321 2005-01-01  Simon Josefsson  <jas@extundo.com>
148323         * gnulib-tool: Print #include directives when --import'ing.
148325 2004-12-28  Simon Josefsson  <jas@extundo.com>
148327         * tests/test-base64.c: Include required header files.  Remove
148328         unused variables.
148330 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
148332         * modules/error (Depends-on): Remove gettext.
148334 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
148336         * lib/error.c [!_LIBC && !ENABLE_NLS]: Do not include "gettext.h";
148337         not needed.  This removes a dependency on the gettext module.
148338         [defined _LIBC]: Do not include <libintl.h>; not needed.
148340 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
148342         * m4/c-strtod.m4 (gl_C99_STRTOLD): New macro.
148343         (gl_C_STRTOD): Use it instead of AC_CHECK_DECLS_ONCE(strtold).
148345 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
148347         * lib/c-strtod.c (STRTOD): Depend on HAVE_C99_STRTOLD, not
148348         HAVE_DECL_STRTOLD.
148350 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
148352         * modules/getdate (Depends-on): Remove alloca-opt.
148354 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
148356         * m4/getdate.m4 (gl_GETDATE): Remove AC_FUNC_ALLOCA.
148358 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
148360         * lib/argp-parse.c: Include <stddef.h>.
148361         (alignof, alignto): New macros.
148362         (parser_init): Don't assume that void * is aligned sufficiently
148363         for struct option.
148365         * lib/getdate.y (YYSTACK_USE_ALLOCA): Define to 0, since there's no
148366         need to extend the stack.
148367         (YYINITDEPTH): New macro, so that the initial stack isn't overly
148368         large.
148370 2004-12-22  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
148372         * lib/argp-parse.c (parser_init): Avoid arithmetics on void pointers.
148374 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
148376         * modules/regex (lib_SOURCES): Remove regex.c, undoing previous
148377         (2004-10-24) change.  Apparently this was a false alarm.
148379         * modules/getdate: Depend on alloca-opt, not alloca.
148381 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
148383         * lib/alloca_.h: Conditionalize on _GNULIB_ALLOCA_H, not _ALLOCA_H.
148384         Remove now-obsolete comment about AIX.
148385         * lib/getdate.y: Include <alloca.h> only if HAVE_ALLOCA.
148386         (YYSTACK_USE_ALLOCA): Define to 0 if !HAVE_ALLOCA.
148387         (YYMAXDEPTH): New macro.
148389 2004-12-18  Simon Josefsson  <jas@extundo.com>
148391         * modules/alloca: Depend on alloca-opt, instead of duplicating it.
148393 2004-12-18  Bruno Haible  <bruno@clisp.org>
148395         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Also test for sigaction.
148397 2004-12-18  Bruno Haible  <bruno@clisp.org>
148399         * lib/fatal-signal.c (fatal_signals): Make non-const.
148400         (init_fatal_signals): New function.
148401         (uninstall_handlers, install_handlers): Ignore signals that were set to
148402         SIG_IGN.
148403         (at_fatal_signal): Call init_fatal_signals.
148404         (init_fatal_signal_set): Likewise. Ignore signals that were set to
148405         SIG_IGN.
148406         Reported by Paul Eggert.
148408 2004-12-18  Bruno Haible  <bruno@clisp.org>
148410         * doc/alloca.texi: New file.
148411         * doc/alloca-opt.texi: New file.
148413 2004-12-17  Jim Meyering  <jim@meyering.net>
148415         * config/install-sh: Use `(exit N); exit N', not `(exit N); exit'.
148416         Otherwise, install-sh could exit with improper exit status when
148417         exiting via a trapped interrupt.  Thanks to a report from Bob Proulx.
148419 2004-12-16  Simon Josefsson  <jas@extundo.com>
148421         * tests/test-base64.c: Add license.
148423 2004-12-15  Stepan Kasal  <address@hidden>
148425         * gnulib-tool (func_emit_lib_Makefile_am): Shorten a long sed command.
148427 2004-12-12  Paul Eggert  <eggert@cs.ucla.edu>
148429         * modules/getcwd (Files): Add m4/d-ino.m4.
148430         Suggested by Mark D. Baushke.
148432 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
148434         * lib/getdate.y (textint): New member "negative".
148435         (time_zone_hhmm): New function.
148436         Expect 14 shift-reduce conflicts, not 13.
148437         (o_colon_minutes): New rule.
148438         (time, zone): Use it to add support for +HH:MM, UTC+HH:MM.
148439         (yylex): Set the "negative" member of signed numbers.
148441 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
148443         * doc/getdate.texi (Time of day items, Time zone items):
148444         Describe new formats +00:00, UTC+00:00.
148446 2004-12-07  Paul Eggert  <eggert@cs.ucla.edu>
148448         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Fix typo in previous change:
148449         spurious "-l"s.  Problem reported by Stepan Kasal.
148451 2004-12-06  Paul Eggert  <eggert@cs.ucla.edu>
148453         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): New macro, to work around bug
148454         in Autoconf 2.59.  Problem reported by Mark D. Baushke.
148456 2004-12-04  Simon Josefsson  <jas@extundo.com>
148458         * modules/getaddrinfo (License): Add LGPL, reported by Yoann
148459         Vandoorselaere <yoann@prelude-ids.org>.
148461 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
148463         Changes imported from coreutils.
148464         * m4/hard-locale.m4 (gl_HARD_LOCALE): Assume locale.h and setlocale
148465         exist.
148466         * m4/human.m4 (gl_HUMAN): Assume locale.h and localeconv exist.
148468 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
148470         Changes imported from coreutils.
148471         * lib/hard-locale.c: Assume <locale.h> exists.
148472         Include "strdup.h".
148473         (GLIBC_VERSION): New macro.
148474         (hard_locale): Assume setlocale exists.
148475         Rewrite to avoid #ifdef.
148476         Use strdup rather than malloc + strcpy.
148477         * lib/human.c: Assume <locale.h> exists.
148478         (human_readable): Assume localeconv exists.
148480 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
148482         * modules/hard-locale (Depends-on): Add strdup.
148484 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
148486         * lib/mktime.c (__mktime_internal): If SEC_REQUESTED != SEC,
148487         convert T2, not T.  (Imported from libc.)
148489 2004-11-30  Simon Josefsson  <jas@extundo.com>
148491         * modules/restrict (License): Change to LGPL.
148493 2004-11-30  Simon Josefsson  <jas@extundo.com>
148495         * m4/restrict.m4: Add copyright and copying conditions.
148497 2004-11-30  Simon Josefsson  <jas@extundo.com>
148499         * m4/base64.m4: New file.
148501 2004-11-30  Simon Josefsson  <jas@extundo.com>
148503         * MODULES.html.sh (Extra functions based on ANSI C 89): Add
148504         base64.
148506         * tests/test-base64.c: New file.
148508         * modules/base64: New file.
148510 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
148512         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX):
148513         Define HAVE_PARTLY_WORKING_GETCWD if getcwd is partly working.
148515         * m4/readutmp.m4 (gl_READUTMP): Don't check for sys/param.h.
148517 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
148519         * lib/getcwd.c (is_ENAMETOOLONG): New macro.
148520         (__getcwd.c): Don't restore errno; glibc doesn't.
148521         [HAVE_PARTLY_WORKING_GETCWD && !defined AT_FDCWD]: Try system getcwd
148522         first, falling back to our code only if its results look suspicious.
148523         Ensure that the resulting buffer is only as large as necessary.
148525         * lib/readutmp.c: Include readutmp.h first.
148526         Include <errno.h>, since readutmp.h no longer does that.
148527         * lib/readutmp.h: Don't include <errno.h>,
148528         <sys/param.h>, <time.h>; not needed to establish interface.
148529         (errno): Remove decl.
148530         (HAVE_STRUCT_XTMP_UT_TYPE): Remove; no longer needed.
148531         (UT_TYPE_EQ, UT_TYPE_NOT_DEFINED, UT_TYPE_BOOT_TIME,
148532         UT_TYPE_USER_PROCESS, IS_USER_PROCESS): New macros.
148534 2004-11-28  Simon Josefsson  <jas@extundo.com>
148536         * lib/base64.h, base64.c: New file.
148538 2004-11-27  Paul Eggert  <eggert@cs.ucla.edu>
148540         * lib/getcwd.h: New file, which I forgot to check in on 2004-11-25.
148542 2004-11-26  Paul Eggert  <eggert@cs.ucla.edu>
148544         * modules/getcwd (Files): Add lib/getcwd.h, m4/getcwd.m4.
148545         (Depends-on): Remove pathmax, same.  Add mempcpy.
148546         (configure.ac): GL_FUNC_GETCWD_PATH_MAX -> gl_FUNC_GETCWD.
148547         (Makefile.am): Append getcwd.h to lib_SOURCES.
148548         (Include): Add getcwd.h.
148549         (Maintainer): Change from Jim Meyering to "all, glibc",
148550         since getdate now uses intended-for-glibc code.
148551         * modules/xgetcwd (Files): Remove m4/getcwd.m4.
148552         (Depends-on): Depend on getcwd.  Do not depend on pathmax.
148554 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
148556         Fix problems reported by Scott S. Tinsley for HP-UX 11.11 using
148557         HP's ANSI C compiler.
148558         * lib/fsusage.c (statvfs) [HAVE_SYS_STATVFS_H]: Remove decl.
148559         Declaring int functions causes warnings on some modern systems and
148560         shouldn't be needed to compile on ancient ones.
148561         * lib/same.c (MIN) [defined MIN]: Don't define, since it's already
148562         defined.
148564         * lib/getcwd.c: Replace by a copy of glibc/sysdeps/posix/getcwd.c, but
148565         with the following changes.
148566         (__set_errno): Parenthesize properly.
148567         Include <stdbool.h>.
148568         (MIN, MAX, MATCHING_INO): New macros.
148569         (__getcwd): Define with prototype, not K&R form.
148570         Use heuristics to allocate default buffer on stack if possible.
148571         If AT_FDCWD is defined, use openat and fstatat to avoid O(N**2)
148572         behavior, and to avoid the PATH_MAX limit when computing
148573         ../../../../...
148574         Use MATCHING_INO to compare inode number to file.
148575         Check for arithmetic overflow in size calculations.
148576         Fix bug in reallocation of dot array that caused getcwd to fail
148577         on directories nested deeper than 75.
148578         Be more careful about saving errno on error.
148579         Do not use realloc; use only free+malloc, as this is a bit
148580         more flexible and avoids a needless copy operation.
148581         Do not inspect st_dev and st_ino for symbolic links; POSIX
148582         doesn't specify the latter.
148583         Check for closedir errors.
148584         Avoid needless casts.
148585         Use "#ifdef weak_alias" around weak_alias, to be like other
148586         glibc code.
148587         The following changes to getcwd.c have effect only when used in
148588         gnulib; they have no effect inside glibc proper.
148589         (#pragma alloca) [defined _AIX && !defined __GNUC__]: Remove,
148590         as alloca isn't used.
148591         (alloca, __alloca): Likewise.
148592         [!_LIBC]: Include "getcwd.h", "mempcpy.h".
148593         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
148594         unconditionally, as gnulib assumes C89 or better.
148595         Do not include <sys/param.h>.
148596         (errno) [!defined __GNU_LIBRARY__ && !defined STDC_HEADERS]: Remove
148597         no-longer-necessary 'extern int errno' decl; gnulib assumes C89 or
148598         better.
148599         (NULL) [!defined NULL]: Remove; we assume C89 or better.
148600         Include <dirent.h> in a way that is compatible with modern Autoconf.
148601         (_D_ALLOC_NAMELEN, _D_EXACT_NAMLEN):
148602         New macros, if not already defined.
148603         Include <unistd.h> if _LIBC, not if __GNU_LIBRARY__.
148604         Use "_LIBC", not "defined _LIBC", for consistency.
148605         (HAVE_MEMPCPY): Remove; no longer needed now that gnulib has
148606         a mempcpy module.
148607         (__lstat, __closedir, __opendir, __readdir) [!_LIBC]: New macros.
148608         (GETCWD_RETURN_TYPE): Remove.  All uses replaced by char *.
148609         * lib/xgetcwd.c: David MacKenzie's old code was removed, so give
148610         credit only to Jim Meyering and adjust the copyright dates.
148611         Do not include <limits.h>, <stdio.h>, <sys/types.h>,
148612         <stdlib.h>, <unistd.h>, "pathmax.h".
148613         Instead, include "xgetcwd.h" (first) and "getcwd.h".
148614         (INITIAL_BUFFER_SIZE): Remove.
148615         (xgetcwd): Rely on getcwd, since we now depend on a reliable one.
148617 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
148619         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Renamed from
148620         GL_FUNC_GETCWD_PATH_MAX for consistency.  All uses changed.
148621         Use the _ONCE methods, for efficiency.
148622         Check for fcntl.h.  In test program, include <errno.h>
148623         and <fcntl.h> if available.  Remove old K&R cruft from
148624         test program.  Check for common errors in GNU/Linux,
148625         OpenBSD, and Solaris.  Just set gl_cv_func_getcwd_path_max;
148626         don't do AC_LIBOBJ, as that's getcwd.m4's job.
148627         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Renamed from
148628         AC_FUNC_GETCWD_NULL.  All used changed.  Change cache variable
148629         name accordingly.
148630         (gl_FUNC_GETCWD, gl_PREREQ_GETCWD): New macros.  Revamp to
148631         accommodate new getcwd.c.
148632         * m4/jm-macros.m4 (gl_MACROS): Don't require GL_FUNC_GETCWD_PATH_MAX.
148633         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_MEMPCPY.
148634         * m4/xgetcwd.m4 (gl_XGETCWD): Replace with gl_FUNC_GETCWD, since
148635         that's all we need now.
148637 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
148639         * m4/argp.m4 (gl_ARGP): Require gl_GETOPT_SUBSTITUTE unconditionally:
148640         argp-parse.c depends on getopt internals, that means we should
148641         always use our getopt, to be on the safe side.
148642         * m4/getopt.m4 (gl_GETOPT): Check if GETOPT_H is already set, in
148643         order not to spoil the result of an eventual previous invocation
148644         of gl_GETOPT_SUBSTITUTE.
148646 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
148648         * lib/getopt_.h: Re-addition of __getopt_argv_const caused
148649         redefinition warnings. To avoid them, include the defines
148650         in `#if !defined __need_getopt ... #endif'. The only place
148651         where __getopt_argv_const is used is in definitions
148652         of getopt_long and getopt_long_only below, which are as well
148653         protected by `#ifndef __need_getopt'.
148654         [defined __GETOPT_PREFIX && !defined __need_getopt]: Undef
148655         __need_getopt after including <stdio.h> and <unistd.h> These
148656         headers might have defined it.
148658 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
148660         * m4/utimens.m4 (gl_UTIMENS): Check for futimes function.
148662 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
148664         * lib/utimens.c (__attribute__, ATTRIBUTE_UNUSED): New macros.
148665         (futimens): New function, which uses futimes if available.
148666         (futimens, utimens): Support timespec==NULL, with same semantics
148667         as utime and utimens.
148668         * lib/utimens.h (futimens): New decl.
148670 2004-11-23  Jim Meyering  <jim@meyering.net>
148672         * lib/getopt_.h: Remove trailing blanks.
148674 2004-11-23  Jim Meyering  <jim@meyering.net>
148676         * lib/__fpending.c: Add comment.
148678 2004-11-22  Paul Eggert  <eggert@cs.ucla.edu>
148680         * modules/canonicalize (Depends-on): Add xreadlink.
148681         Problem reported by James Youngman.
148683 2004-11-20  Paul Eggert  <eggert@cs.ucla.edu>
148685         * lib/getopt_.h (__GETOPT_CONCAT, __GETOPT_XCONCAT, __GETOPT_ID):
148686         New macros.
148687         (getopt, getopt_long, getopt_long_only, optarg, opterr, optind,
148688         optopt): Use them instead of invoking ## directly; otherwise, the
148689         symbols will be __GETOPT_PREFIXgetopt rather than rpl_getopt.
148691 2004-11-19  Bruno Haible  <bruno@clisp.org>
148693         * lib/strtok_r.c: Move comments from here...
148694         * lib/strtok_r.h: ... to here.
148696 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
148698         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Check for buggy calloc
148699         implementations that mishandle size_t overflow.
148701 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
148703         * lib/realloc.c (rpl_realloc): Call 'free' if n==0, since realloc
148704         might fail.  Problem reported by Yoann Vandoorselaere.
148705         * lib/calloc.c (rpl_calloc): Defend against buggy calloc
148706         implementations that mishandle size_t overflow.
148708 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
148710         * modules/canon-host (Depends-on): Add strdup.
148712 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
148714         * m4/canon-host.m4 (gl_CANON_HOST): Check for getaddrinfo.
148716 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
148718         * lib/canon-host.c: Include "strdup.h".
148719         (canon_host): Use getaddrinfo if available, so that IPv6 works.
148720         Use strdup instead of malloc/strcpy to duplicate strings.
148722         * lib/human.h (LONGEST_HUMAN_READABLE): Add 1 for space before unit.
148723         (human_space_before_unit): New constant.
148724         * lib/human.c (human_readable): Support it.
148726         * lib/xgetcwd.c: Include <limits.h>, for PATH_MAX.
148727         (xgetcwd): Set errno correctly when failing.
148728         Work around Solaris 9 bug: getcwd sets errno==ERANGE even though
148729         the failure is actually due to a PATH_MAX problem.
148731         Further getopt changes to make it more likely that glibc will
148732         buy the changes back.
148733         * lib/getopt.c (POSIXLY_CORRECT): New constant.
148734         (getopt): Use it, so to preserve glibc semantic
148735         * lib/getopt1.c (getopt_long, getopt_long_only): Arg is char * const *
148736         when compiling for libc.
148737         * lib/getopt_.h (__getopt_argv_const): Bring it back.
148738         (getopt_long, getopt_long_only): Use it.
148740         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
148741         _getopt_internal): New arg POSIXLY_CORRECT.  All callers changed.
148742         (getopt): Argv is now char * const *, as per standard.
148743         (_getopt_internal_r, _getopt_internal): Argv is now char **,
148744         not char *__getopt_argv_const *.
148745         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
148746         _getopt_long_only_r): Likewise.
148747         * lib/getopt_.h (getopt, getopt_long, geopt_long_only): Likewise.
148748         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
148749         _getopt_long_r, _getopt_long_only_r): Likewise.
148750         * lib/getopt_.h (__getopt_argv_const): Remove.
148751         (getopt): Argv is now char * const *, as per standard.
148753         * lib/getdate.y (tORDINAL): New token.
148754         (day, relunit): Allow it for relative times.
148755         (relative_time_table): Use tORDINAL for ordinals.
148757 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
148759         * doc/getdate.texi (General date syntax): "next" is 1, not 2.
148760         Document that "second" isn't allowed as an ordinal number.
148762 2004-11-16  Jim Meyering  <jim@meyering.net>
148764         * modules/closeout (Depends-on): Add fpending.
148766 2004-11-15  Jim Meyering  <jim@meyering.net>
148768         * lib/closeout.c: Include "__fpending.h" once again.
148769         Include <stdbool.h>.
148770         (close_stdout): Don't fail just because stdout was closed initially,
148771         since some programs don't write to stdout in the normal course of
148772         operation (other than --version and --help), and we don't want this
148773         function to make e.g. `touch file >&-' fail.
148774         But do fail if it was closed and someone has tried to write to it.
148775         E.g., `printf foo >&-' must fail.
148777 2004-11-13  Jim Meyering  <jim@meyering.net>
148779         * m4/jm-macros.m4: Do require gl_FUNC_FPENDING.
148781 2004-11-12  Simon Josefsson  <jas@extundo.com>
148783         * config/srclist.txt: Add strtok_r.c, glibc bought our changes, but a
148784         small doc fix is still pending.
148786 2004-11-11  Simon Josefsson  <jas@extundo.com>
148788         * modules/strtok_r: New file.
148790         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
148791         strtok_r.
148793 2004-11-11  Simon Josefsson  <jas@extundo.com>
148795         * m4/strtok_r.m4: New file.
148797         * m4/getopt.m4: Replace opterr.
148799 2004-11-11  Simon Josefsson  <jas@extundo.com>
148801         * lib/strtok_r.h, strtok_r.c: New file.
148803 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
148805         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): Define __GETOPT_PREFIX instead
148806         of replacing opterr, getopt, etc.  This should handle the
148807         powerpc-apple-darwin5.5 problem recently noted by Simon Josefsson.
148809 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
148811         * lib/getopt_.h (__getopt_argv_const): New macro, to be used so that
148812         we can stop lying to compilers about the constness of argv when we
148813         are compiled outside glibc.
148814         (getopt, getopt_long, getopt_long_only): Use it.
148815         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
148816         _getopt_internal, getopt): Likewise.
148817         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
148818         _getopt_long_only_r): Likewise.
148819         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
148820         _getopt_long_r, _getopt_long_only_r): Likewise.
148822         * lib/getopt_.h [defined __GETOPT_PREFIX && !defined __need_getopt]:
148823         Include <stdlib.h> and <stdio.h>, and <unistd.h> if available.
148824         Then rename getopt to __GETOPT_PREFIX##getopt, and so forth for
148825         the other external symbols.
148826         (getopt) [!defined __GNU_LIBRARY]: Use prototype, not old-style
148827         declaration, since the above renaming now works around collisions.
148829 2004-11-11  Jim Meyering  <jim@meyering.net>
148831         * lib/linebreak.c: Remove trailing blanks.
148832         * lib/alloca_.h: Likewise.
148833         * lib/acosl.c: Likewise.
148834         * lib/euidaccess.c: Likewise.
148835         * lib/allocsa.h: Likewise.
148837 2004-11-10  Simon Josefsson  <jas@extundo.com>
148839         * m4/getaddrinfo.m4: New file.
148841 2004-11-10  Simon Josefsson  <jas@extundo.com>
148843         * lib/getaddrinfo.h, lib/getaddrinfo.c: New files.
148845 2004-11-10  Simon Josefsson  <jas@extundo.com>
148847         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
148848         getaddrinfo.
148850         * modules/getaddrinfo: New file.
148852 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
148854         * m4/prereq.m4 (gl_PREREQ): Require gt_FUNC_SETENV.
148856 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
148858         * lib/mktime.c (SHR): New macro, which is a portable
148859         substitute for >> that should work even on Crays.
148860         (TIME_T_MIDPOINT, ydhms_diff, __mktime_internal): Use it.
148861         Problem reported by Mark D. Baushke in
148862         <http://lists.gnu.org/r/bug-gnulib/2004-11/msg00071.html>.
148863         * lib/getdate.y (SHR): Likewise.
148864         (tm_diff): Use it.
148865         * lib/strftime.c (SHR): Likewise.
148866         (tm_diff): Use it.
148867         * lib/quotearg.c (struct quoting_options): Use unsigned int for
148868         quote_these_too, so that right shifts are well defined.  All uses
148869         changed.
148871 2004-11-10  Jim Meyering  <jim@meyering.net>
148873         Ensure that no close failure goes unreported.
148874         * lib/closeout.c (close_stdout): Always close stdout.  I.e., don't
148875         return early when it seems there's nothing to flush.
148876         Don't include __fpending.h.
148878 2004-11-10  Jim Meyering  <jim@meyering.net>
148880         * modules/closeout (Depends-on): Remove fpending.
148882 2004-11-10  Jim Meyering  <jim@meyering.net>
148884         * m4/jm-macros.m4 (gl_MACROS): Don't require gl_FUNC_FPENDING.
148886 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
148888         * m4/strftime.m4 (_gl_STRFTIME_PREREQS): Remove.  Move its body to
148889         gl_FUNC_STRFTIME.
148890         (gl_FUNC_STRFTIME): Use AC_CHECK_FUNCS_ONCE and AC_CHECK_HEADERS_ONCE
148891         and AC_REQUIRE when possible, to avoid duplicate checks.
148892         Check for <wchar.h>.
148894 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
148896         * lib/strftime.c (DO_MULTIBYTE): Check for wchar.h, too.
148898 2004-11-09  Bruno Haible  <bruno@clisp.org>
148900         * m4/sockpfaf.m4: New file.
148902 2004-11-05  Bruno Haible  <bruno@clisp.org>
148904         * lib/readlink.c: Include stddef.h, needed for size_t on Woe32.
148905         Reported by Mark D. Baushke <mdb@cvshome.org>.
148907 2004-11-04  Bruno Haible  <bruno@clisp.org>
148909         2004-09-11  Bruno Haible  <bruno@clisp.org>
148910                 * allocsa.valgrind: New file.
148911         2004-02-06  Bruno Haible  <bruno@clisp.org>
148912                 * allocsa.h (sa_alignof): Define differently with HP-UX cc, to
148913                 avoid a bug of this cc on HP-UX 10.20 dealing with enums.
148914                 Reported by Christopher Seip <chris.seip@hp.com>.
148916 2004-11-04  Bruno Haible  <bruno@clisp.org>
148918         * modules/allocsa (Files): Add lib/allocsa.valgrind.
148919         (Makefile.am): Distribute it.
148921 2004-11-03  Paul Eggert  <eggert@cs.ucla.edu>
148923         * lib/xreadlink.c (xreadlink): AIX and HP-UX readlink return -1
148924         with errno == ERANGE if the buffer is too small.
148925         Problem reported by Mark D. Baushke.
148927 2004-11-03  Albert Chin  <china@thewrittenword.com>
148928             Paul Eggert  <eggert@cs.ucla.edu>
148930         * m4/uint32_t.m4 (gl_AC_TYPE_UINT32_T): When determining uint32_t
148931         equivalent, substitute $ac_type for equivalent type rather than
148932         blindly using uint32_t *always* which won't work if uint32_t is not
148933         available.  Define _UINT32_T to work around typedef of uint32_t if
148934         <sys/sched.h>, <pthread.h>, or <semaphore.h> used on Solaris
148935         2.5.1.
148937 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
148939         * m4/jm-macros.m4: Sync from coreutils.
148940         (gl_MACROS): Check for mbrlen, for pathchk.
148941         (gl_CHECK_ALL_TYPES): Require AC_TYPE_MBSTATE_T, for pathchk.
148943 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
148945         * lib/xreadlink.c (MAXSIZE): New macro.
148946         (xreadlink): Use it instead of SSIZE_MAX.  Ensure initial buffer
148947         size does not exceed MAXSIZE.  Avoid cast.
148948         As suggested by Mark D. Baushke in
148949         <http://lists.gnu.org/r/bug-gnulib/2004-11/msg00009.html>,
148950         if readlink fails with buffer size just under MAXSIZE, try again
148951         with MAXSIZE.
148953 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
148955         * config/srclist.txt: Add mktime.c; glibc bought all our changes.
148957 2004-11-02  Derek R. Price  <derek@ximbiot.com>
148958         and  Paul Eggert  <eggert@cs.ucla.edu>
148960         * lib/getdate.y [!TEST]: Include <stdio.h>, since we use sprintf now.
148961         (get_date): Overparenthesize to avoid GCC warning.
148963 2004-11-02  Bruno Haible  <bruno@clisp.org>
148965         * m4/setenv.m4 (gt_FUNC_SETENV): Define VOID_UNSETENV if unsetenv()
148966         returns void.
148968 2004-11-02  Bruno Haible  <bruno@clisp.org>
148970         * lib/setenv.h (unsetenv): Define as a macro if the system's unsetenv()
148971         function returns void.
148973 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
148975         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for declarations of
148976         fflush_unlocked, flockfile, funlockfile, funlockfile,
148977         fputs_unlocked, putc_unlocked.
148979 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
148981         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
148982         (funlockfile, fputs_unlocked, putc_unlocked): Don't define if
148983         already declared.
148985 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
148987         * modules/getdate (Files): Add doc/getdate.texi.
148988         (Depends-on): Add setenv, xalloc.
148990 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
148992         * lib/getdate.y: Add support for TZ="foo" within a date string.
148993         Fix some bugs near time_t boundaries.  Reject dates with
148994         out-of-range components, e.g., "Sept 31".
148995         Include <stdlib.h>, "setenv.h", "xalloc.h".
148996         (ISDIGIT_LOCALE): Remove; unused.
148997         Note that the TZ and time functions used here are not reentrant.
148998         (mktime_ok, get_tz): New functions.
148999         (TZBUFSIZE): New constant.
149000         (get_date): Parse leading TZ="foo".  Reject out-of-range components;.
149001         This requires that we sometimes generate our own TZ="XXX..." setting.
149003 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
149005         * doc/getdate.texi: New file, from coreutils with modifications for
149006         the new TZ parsing.
149008 2004-10-27  Derek R. Price  <derek@ximbiot.com>
149010         * lib/mktime.c (not_equal_tm): Remove redundant check.
149012 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
149014         * modules/regex (lib_SOURCES): Add regex.c.
149015         Reported by James Youngman in
149016         <http://lists.gnu.org/r/bug-gnulib/2004-10/msg00199.html>.
149018 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
149020         * lib/getdate.y: Use Bison 1.875 features, and some minor
149021         code cleanups.  This change does not affect semantics.
149022         Don't include <stdlib.h>; no longer needed.
149023         Don't include unlocked-io.h; only the "#if TEST" code uses
149024         stdio, and performance isn't crucial there.
149025         (PC, YYLEX_PARAM, YYPARSE_PARAM): Remove; replaced by
149026         Bison 1.875 features as described below.
149027         All uses of "PC." replaced by "pc->".
149028         (YYSTYPE): Add a forward declaration.
149029         (yylex, yyerror): Use full prototypes in forward decls.
149030         Use "%pure-parser" rather than obsolescent "%pure_parser".
149031         Use %parse-param and %lex-param instead of obsolescent
149032         YYPARSE_PARAM and YYLEX_PARAM.
149033         (meridian_table, month_and_day_table, time_units_table,
149034         relative_time_table, time_zone_table, military_table,
149035         lookup_zone, lookup_word, get_date):
149036         Use NULL instead of 0 where appropriate.
149037         (to_hour): Avoid abort (), to avoid a dependency on
149038         stdlib.h.
149039         (yyerror, yylex): Now accepts parser_control * arg.
149040         (main) [TEST]: Use '\0' rather than 0 for char.
149042 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
149044         * m4/getpagesize.m4 (gl_GETPAGESIZE): Check for <sys/param.h>.
149046 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
149048         * lib/getpagesize.c (getpagesize): Don't assume <sys/param.h> exists.
149049         It's now the caller's responsibility to handle the case where
149050         !HAVE_GETPAGESIZE && !defined getpagesize.
149052         * lib/mktime.c (leapyear): Arg is long int, not int.
149054 2004-10-18  Paul Eggert  <eggert@cs.ucla.edu>
149056         * lib/argp-fs-xinl.c, argp-xinl.c: Update from glibc.
149058 2004-10-17  Paul Eggert  <eggert@cs.ucla.edu>
149060         * gnulib-tool (func_emit_lib_Makefile_am): Fix typo: a $ was
149061         missing.  Problem reported by James Youngman.
149063 2004-10-16  Simon Josefsson  <jas@extundo.com>
149065         * gnulib-tool: Fix comments.  Fix parse problem.
149066         (func_emit_lib_Makefile_am): Don't hard code a in libgl_a_SOURCES.
149068 2004-10-15  Paul Eggert  <eggert@cs.ucla.edu>
149070         * m4/getopt.m4 (gl_GETOPT): Detect and reject the incompatible BSD
149071         implementation of getopt_long.  Problem reported by Alexander Taler in:
149072         http://lists.gnu.org/r/bug-gnulib/2004-10/msg00103.html
149074 2004-10-15  Bruno Haible  <bruno@clisp.org>
149076         * gnulib-tool: Untabify. Initialize supplied_libname.
149077         (func_usage): More homogenous output.
149078         (func_modules_transitive_closure, func_modules_to_filelist,
149079         func_emit_lib_Makefile_am): New functions.
149080         (func_import): New function, extracted from big case statement. Use
149081         func_get_license, func_modules_transitive_closure,
149082         func_modules_to_filelist, func_emit_lib_Makefile_am. Initialize
149083         opt_lgpl. Don't use test -a, as it's not portable.
149084         (func_create_testdir): Use func_modules_transitive_closure,
149085         func_modules_to_filelist, func_emit_lib_Makefile_am.
149087 2004-10-15  Bruno Haible  <bruno@clisp.org>
149089         * gnulib-tool (func_import): Let gl_INIT define LTALLOCA when needed.
149091 2004-10-15  Bruno Haible  <bruno@clisp.org>
149093         * gnulib-tool (func_emit_lib_Makefile_am): Add markers to separate
149094         the portions belonging to each module.
149095         Suggested by Derek Robert Price <derek@ximbiot.com>.
149097 2004-10-12  Simon Josefsson  <jas@extundo.com>
149099         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
149100         (fputs_unlocked, putc_unlocked) [!_LIBCS && !USE_UNLOCKED_IO]: Map
149101         to real functions.
149103 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
149105         * modules/vsnprintf: New file.
149107 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
149109         * m4/vsnprintf.m4: New file.
149111 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
149113         * lib/vsnprintf.h: New file.
149114         * lib/vsnprintf.c: New file.
149116 2004-10-11  Bruno Haible  <bruno@clisp.org>
149118         * MODULES.html.sh (Support for systems lacking ISO C 99): Add
149119         vsnprintf.
149121 2004-10-10  Paul Eggert  <eggert@cs.ucla.edu>
149123         * config/srclistvars.sh: Add GNUSTANDARDS (for eggert only).
149125 2004-10-07  Bruno Haible  <bruno@clisp.org>
149127         * lib/snprintf.c (snprintf): Avoid a memory allocation if the result
149128         fits into the provided buffer.
149130 2004-10-06  Paul Eggert  <eggert@cs.ucla.edu>
149132         * lib/diacrit.c, diacrit.h: Add GPL notice.
149134         * lib/atanl.c, logl.c: Add GPL notice, to match glibc's added LGPL
149135         notice.
149136         * lib/atanl.c (atanl): Keep the code as similar to glibc as possible.
149137         * lib/logl.c (logl): Keep the code as similar to glibc as possible.
149138         This avoids a potential constant-folding bug.
149140 2004-10-05  Bruno Haible  <bruno@clisp.org>
149142         * m4/strsep.m4 (gl_FUNC_STRSEP): Require AC_GNU_SOURCE. Don't check
149143         for the declaration of strsep.
149145 2004-10-05  Bruno Haible  <bruno@clisp.org>
149147         * lib/strsep.h: Don't declare strsep() if HAVE_STRSEP.
149149 2004-10-04  Simon Josefsson  <jas@extundo.com>
149151         * modules/memmem: New file.
149152         * tests/test-memmem.c: New file.
149153         * MODULES.html.sh (Extra functions based on ANSI C 89): Add memmem.
149155 2004-10-04  Simon Josefsson  <jas@extundo.com>
149157         * m4/memmem.m4: New file.
149159 2004-10-04  Simon Josefsson  <jas@extundo.com>
149161         * lib/memmem.h: New file.
149162         * lib/memmem.c: New file, taken from glibc.
149164 2004-10-04  Simon Josefsson  <jas@extundo.com>
149166         * lib/error.c, md5.c, regex.c: Use '#if USE_UNLOCKED_IO' instead of
149167         '#ifdef USE_UNLOCKED_IO'.
149169 2004-10-04  Simon Josefsson  <jas@extundo.com>
149171         * config/srclist.txt: Add memmem from glibc.
149173 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
149175         * modules/xalloc (Files, Makefile.am): Remove xstrdup.c.
149177         * modules/argmatch, modules/argp, modules/closeout, modules/error,
149178         modules/exclude, modules/getdate, modules/getline,
149179         modules/getndelim2, modules/getpass, modules/getpass-gnu,
149180         modules/getusershell, modules/linebuffer, modules/md5,
149181         modules/mountlist, modules/posixtm, modules/readtokens,
149182         modules/readutmp, modules/regex, modules/sha1,
149183         modules/version-etc, modules/yesno:
149184         Remove dependency on unlocked-io.
149186 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
149188         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Remove.  All uses removed.
149190         * m4/unlocked-io.m4: Add copyright notice.
149191         (gl_FUNC_GLIBC_UNLOCKED_IO): Define USE_UNLOCKED_IO.
149193 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
149195         * lib/xalloc.h (xmemdup): Renamed from xclone.  All uses changed.
149196         * lib/xmalloc.c (xmemdup): Likewise.
149197         * lib/xalloc.h (CCLONE, CLONE, NEW, XCALLOC, XMALLOC, XREALLOC,
149198         XFREE): Remove these long-obsolescent macros.
149199         * lib/xmalloc.c (xstrdup): Implementation moved here from xstrdup.c
149200         * lib/xstrdup.c: Remove.
149202         * lib/regex.c (re_comp): Cast gettext return value to char *,
149203         Problem reported by Martin Neitzel via Mark D. Baushke.
149205 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
149207         * lib/argmatch.c, closeout.c, error.c, exclude.c, getdate.y,
149208         getndelim2.c, getpass.c, getusershell.c, linebuffer.c,
149209         md5.c, mountlist.c, posixtm.c, readtokens.c, readutmp.c,
149210         regex.c, sha1.c, version-etc.c, yesno.c:
149211         Include "unlocked-io.h" only if USE_UNLOCKED_IO.
149212         * lib/unlocked-io.h: Don't worry about USE_UNLOCKED_IO; that's now
149213         the includer's responsibility.
149215         Sync from coreutils.
149217         * lib/modechange.c (mode_compile): Don't decrement a pointer that
149218         points to the start of a string, as the C Standard says the
149219         resulting behavior is undefined.
149221         * lib/backupfile.h (enum backuptype): Rename none -> no_backups,
149222         simple -> simple_backups, numbered_existing ->
149223         numbered_existing_backups, numbered -> numbered_backups
149224         to avoid shadowing problems.  All uses changed.
149225         * lib/argmatch.c (enum backuptype) [defined TEST]: Likewise.
149226         * lib/backupfile.c (check_extension, numbered_backup):
149227         Rename locals to avoid shadowing 'basename'.
149228         * lib/backupfile.h (VALID_BACKUP_TYPE): Don't evaluate arg more than
149229         once.
149231         * lib/.cppi-disable: Add getopt_.h, getopt_int.h.
149232         * lib/.cvsignore: Add getopt.h.
149234 2004-10-04  Bruno Haible  <bruno@clisp.org>
149236         * modules/README: New file.
149237         * gnulib-tool (func_all_modules, func_verify_module): modules/README is
149238         not a module.
149240 2004-10-02  Jim Meyering  <jim@meyering.net>
149242         * lib/dirfd.h, getpagesize.h: Add copyright notice.
149244 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
149246         * modules/strsep: New file.
149248 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
149250         * m4/strsep.m4: New file.
149252 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
149254         * lib/strsep.h: New file.
149255         * lib/strsep.c: New file.
149257 2004-10-01  Simon Josefsson  <jas@extundo.com>
149259         * lib/snprintf.c (snprintf): Handle size==0.
149261 2004-10-01  Simon Josefsson  <jas@extundo.com>
149262             Bruno Haible  <bruno@clisp.org>
149264         * lib/snprintf.c: Include <stdarg.h>, <stdlib.h>, <string.h>.
149265         (snprintf): Declare 'args'.
149267 2004-10-01  Paul Eggert  <eggert@cs.ucla.edu>
149269         * lib/snprintf.c: Remove comments as to why each header is needed.
149271 2004-10-01  Bruno Haible  <bruno@clisp.org>
149273         * MODULES.html.sh: Add strsep.
149275 2004-09-30  Simon Josefsson  <jas@extundo.com>
149277         * modules/snprintf: New file.
149279 2004-09-30  Simon Josefsson  <jas@extundo.com>
149281         * m4/snprintf.m4: New file.
149283 2004-09-30  Simon Josefsson  <jas@extundo.com>
149285         * lib/snprintf.h, lib/snprintf.c: New files.
149287 2004-09-30  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
149289         * lib/argp-help.c (canon_doc_option): Fixed coredump if *name==NULL
149290         (hol_entry_help): Never translate an empty string.
149291         Do not translate option tag (opt->name) if OPTION_NO_TRANS is set
149292         * lib/argp.h (OPTION_NO_TRANS): New option.
149294 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
149296         * modules/argp (Maintainer): Replace Simon Josefsson
149297         by Sergey Poznyakoff.
149299 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
149301         * config/srclist.txt: Comment-out argp/argp.h, until we get the argp
149302         changes merged back into glibc.
149304 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
149306         * MODULES.html.sh (Support for systems lacking ISO C 99): Add snprintf.
149308 2004-09-29  Oskar Liljeblad  <oskar@osk.mine.nu>
149310         * lib/xvasprintf.c: Include xalloc.h.
149311         (xvasprintf): Use xalloc_die, not xmalloc_die.
149313 2004-09-29  Bruno Haible  <bruno@clisp.org>
149315         * modules/alloca-opt: New file, derived from modules/alloca.
149316         * modules/allocsa: Depend on alloca-opt instead of alloca.
149317         * modules/setenv: Likewise.
149318         * modules/vasnprintf: Likewise.
149319         * MODULES.html.sh: Add alloca-opt.
149321 2004-09-28  Simon Josefsson  <jas@extundo.com>
149323         * gnulib-tool: New parameter --lgpl, to asseert that modules are
149324         LGPL, and to replace license template from GPL to LGPL.
149326 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
149328         * modules/dummy: Change license to LGPL.
149330 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
149332         * lib/dummy.c: Change copyright notice to FSF, and license to GPL.
149334 2004-09-24  Simon Josefsson  <jas@extundo.com>
149336         * modules/minmax (License): Change from GPL to LGPL.
149338 2004-09-23  Simon Josefsson  <jas@extundo.com>
149340         * gnulib-tool (--import): Typo.
149342 2004-09-23  Simon Josefsson  <jas@extundo.com>
149344         * gnulib-tool (--import): Make sure *.m4 end up in m4/ by default.
149346 2004-09-22  Bruno Haible  <bruno@clisp.org>
149348         * modules/*: Add 'License' field.
149349         * gnulib-tool: Accept --extract-license option.
149350         (func_get_license): New function.
149352 2004-09-21  Bruno Haible  <bruno@clisp.org>
149354         * modules/vasnprintf (Files): Add m4/stdint_h.m4, m4/inttypes_h.m4.
149355         Reported by Simon Josefsson.
149357 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
149359         * modules/inttostr (Files): Add m4/longlong.m4, since it uses
149360         gl_AC_TYPE_LONG_LONG.
149362 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
149364         * config/srclist.txt: Add getsubopt.c, since libc bought our changes.
149366 2004-09-18  Simon Josefsson  <jas@extundo.com>
149367         and  Paul Eggert  <eggert@cs.ucla.edu>
149369         * gnulib-tool: Replace various ad-hoc automake/autoconf/aclocal
149370         calls with autoreconf.  Define GL_LIB.
149372 2004-09-14  Karl Berry  <karl@gnu.org>
149374         * config/srclist.txt: unsync setenv.c, sigh.
149376 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
149378         * lib/argp-pvh.c (argp_program_version_hook): Provide initial value.
149379         Problem reported by Bruno Haible in:
149380         http://lists.gnu.org/r/bug-tar/2004-09/msg00023.html
149382 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
149384         * config/srclist.txt: Comment out argp-pvh.c.
149386 2004-09-11  Paul Eggert  <eggert@cs.ucla.edu>
149388         * lib/mempcpy.h: Wrap the entire include file inside #ifndef mempcpy,
149389         in case some system header has #define'd it.  Problem reported by
149390         Soeren D. Schulze in
149391         <http://lists.gnu.org/r/bug-gnulib/2004-09/msg00017.html>.
149393 2004-09-09  Karl Berry  <karl@gnu.org>
149395         * regex.[ch]: delete from the root.  These were supposed to be
149396                 synced with emacs cvs, but this has not happened for about
149397                 a year, and anyway nothing else uses emacs regex.[ch].
149398                 bug-gnulib mail from Jeff Bailey, 9 Sep 2004 15:49:24 -0700.
149399                 lib/regex[.ch] is untouched.
149401 2004-09-09  Bruno Haible  <bruno@clisp.org>
149403         * modules/vasnprintf (Files): Add m4/eoverflow.m4.
149405 2004-09-09  Bruno Haible  <bruno@clisp.org>
149407         * m4/eoverflow.m4: New file, taken from GNU libiconv eilseq.m4 with
149408         modifications.
149409         * m4/vasnprintf.m4 (gl_FUNC_VASNPRINTF): Require gl_EOVERFLOW.
149411 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
149413         * modules/xvasprintf: New file.
149414         * MODULES.html.sh (Extra functions based on ANSI C 89): Add vasprintf.
149416 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
149418         * lib/xvasprintf.h: New file.
149419         * lib/xvasprintf.c: New file.
149420         * lib/xasprintf.c: New file.
149422 2004-09-08  Bruno Haible  <bruno@clisp.org>
149424         * m4/stdint.m4: New file, taken from GNU clisp with modifications.
149426 2004-09-08  Bruno Haible  <bruno@clisp.org>
149428         * lib/vasnprintf.c (VASNPRINTF): Signal EOVERFLOW if the resulting
149429         length is > INT_MAX.
149430         * lib/vasprintf.c (vasprintf): Don't test for length > INT_MAX any
149431         more.
149433 2004-09-08  Bruno Haible  <bruno@clisp.org>
149435         * lib/stdint_.h: New file, taken from GNU clisp.
149437 2004-09-08  Bruno Haible  <bruno@clisp.org>
149438             Oskar Liljeblad  <oskar@osk.mine.nu>
149440         * modules/stdint: New file.
149441         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdint.
149443 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
149445         Import from coreutils.
149446         * lib/userspec.c: Don't use <alloca.h>, so that we don't use alloca on
149447         strings on unbounded length.  alloca's performance benefits aren't
149448         that important here.
149449         (V_STRDUP): Remove.
149450         (parse_with_separator): New function, with most of the internals
149451         of the old parse_user_spec.  Allow user to omit both user and group,
149452         for compatibility with FreeBSD.
149453         Clone only the user name, not the entire spec.
149454         Do not set *uid, *gid unless entirely successful.
149455         Avoid memory leak in some failing cases.
149456         Fix regression for USER.GROUP reported by Dmitry V. Levin in
149457         <http://lists.gnu.org/r/bug-coreutils/2004-08/msg00102.html>
149458         (parse_user_spec): Rewrite to use parse_with_separator.
149460 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
149462         * modules/userspec: Don't depend on alloca.
149464 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
149466         * m4/userspec.m4 (gl_USERSPEC): Don't require AC_FUNC_ALLOCA.
149468 2004-08-17  Paul Eggert  <eggert@cs.ucla.edu>
149470         * MODULES.html.sh: Add xalloc-die, c-strtod, c-strtold, raise,
149471         readtokens0, getcwd, fcntl-safer, canonicalize, cycle-check,
149472         utimecmp, utimens, xnanosleep.  Rename sha to sha1.
149474 2004-08-16  Simon Josefsson  <jas@extundo.com>
149476         * gnulib-tool: Use sed instead of autoconf --trace, inspired by
149477         libtoolize behaviour by "Gary V. Vaughan" <gary@gnu.org>.
149478         Add --dry-run for --import.
149479         Let user provided command line parameters override configure.ac
149480         settings.
149482 2004-08-12  Simon Josefsson  <jas@extundo.com>
149484         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): New macro,
149485         as discussed with Paul Eggert in threads rooted at
149486         <http://lists.gnu.org/r/bug-gnulib/2004-06/msg00039.html>
149487         and
149488         <http://lists.gnu.org/r/bug-gnulib/2004-07/msg00001.html>.
149489         Before, the test was empty, and relied on ELIDE_CODE in source
149490         code.)
149491         (gl_PREREQ_GETOPT): New macro.
149492         (gl_GETOPT): Use them.
149494 2004-08-12  Simon Josefsson  <jas@extundo.com>
149496         * lib/getopt.c, getopt1.c: Remove ELIDE_CODE hack.
149497         * lib/getopt_.h: Renamed from getopt.h.
149499 2004-08-12  Simon Josefsson  <jas@extundo.com>
149501         * gnulib-tool: Add --source-base, --m4-base, --libtool options.
149502         Change default library name from libfoo to libgnu.
149503         Now, if you have a configure.ac that says:
149504                 gl_SOURCE_BASE(gl)
149505                 gl_M4_BASE(gl/m4)
149506                 gl_MODULES(error getopt etcetera)
149507                 gl_INIT
149508         you can import all you need by running:
149509                 ../gnulib/gnulib-tool --import
149511         * modules/getopt (Files): Rename getopt.h to getopt_.h.
149512         (Makefile.am): Rewrite, use logic from argz.
149513         (Include): Use <getopt.h> instead of "getopt.h".
149515 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
149517         * modules/argp (Files): Add m4/unlocked-io.m4.
149518         (Depends-on): Add extensions.
149520 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
149522         * m4/argp.m4 (gl_ARGP): Do not check for argp.h or argp_parse; nobody
149523         uses HAVE_ARGP_H or HAVE_ARGP_PARSE.
149524         Require gl_FUNC_GLIBC_UNLOCKED_IO, gl_USE_SYSTEM_EXTENSIONS.
149525         Check for program_invocation_name, program_invocation_short_name,
149526         flockfile, funlockfile, features.h, _getopt_long_only_r.
149528 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
149530         * lib/argp-help.c, argp-parse.c: Use "gettext.h" instead of
149531         its complicated substitute.
149532         * lib/argp-help.c: Include <errno.h>, for program_invocation_short_name
149533         and program_invocation_name.
149534         (__argp_basename) [!_LIBC]: Remove; the only use was
149535         replaced by its body.
149536         (__argp_short_program_name): Change condition from
149537         !defined __argp_short_program_name to
149538         ! (defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME),
149539         to match argp-namefrob.h.
149540         (__argp_failure): Don't assume strerror_r returns char *.
149541         * lib/argp-parse.c (N_): Define unconditionally.
149542         (argp_default_options): Fill out initializers with 0 to avoid
149543         gcc warnings.
149545 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
149547         * config/srclist.txt: Remove getopt.c, getopt.h (renamed to getopt_.h),
149548         getopt1.c.
149550 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
149552         Merge from coreutils.
149554         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for wmemchr and wmemcpy.
149556         * m4/obstack.m4 (gl_PREREQ_OBSTACK): Require
149557         gl_AC_HEADER_INTTYPES_H, gl_AC_HEADER_STDINT_H, gl_AC_TYPE_UINTMAX_T.
149559 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
149561         Merge from coreutils.
149563         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Don't set to 1 if missing
149564         wmemchr or wmemcpy.  Problem reported by Robert Dahlem
149565         for Reliant Unix 5.43.
149567         * lib/obstack.c: Include <inttypes.h> and <stdint.h> if available.
149568         (union fooround): Use uintmax_t, not long int.
149569         The rest is a merge from libc:
149570         [defined _LIBC]: Include <shlib-compat.h>.
149571         (_obstack) [defined _LIBC]: Remove after 2.3.4.
149573         * lib/settime.c (settime): Recode to avoid warning with
149574         Sun Forte C 6U2.
149576         * lib/strverscmp.c: Convert to UTF-8.
149578 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
149580         * modules/obstack (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
149581         m4/uintmax_t.m4.
149583 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
149585         * modules/xalloc-die: New file.
149586         * modules/xalloc: Remove dependencies on error, gettext, exitfail.
149588         * modules/md5 (Files): Add m4/uint32_t.m4.
149589         * modules/sha1: Renamed from modules/sha.
149590         (Files):
149591         Rename lib/sha.h to lib/sha1.h.
149592         Rename lib/sha.c to lib/sha1.c.
149593         Rename m4/sha.m4 to m4/sha1.m4.
149594         (lib_SOURCES): Likewise.
149595         (configure.ac): Rename gl_SHA to gl_SHA1.
149596         (Include): sha.h -> sha1.h.
149598 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
149600         * m4/uint32_t.m4, m4/uintptr_t.m4: New files.
149601         * m4/sha1.m4: Renamed from sha.m4.
149602         (gl_SHA1): Renamed from gl_SHA.  All uses changed.
149604 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
149606         * lib/obstack.h (obstack_empty_p):
149607         Don't assume that chunk->contents is suitably aligned.
149608         * lib/obstack.c (_obstack_begin, _obstack_begin_1, _obstack_newchunk):
149609         Likewise. Problem reported by Benno in
149610         <http://sources.redhat.com/ml/libc-alpha/2004-08/msg00055.html>.
149612         * lib/chown.c (rpl_chown): Work even if the file is writeable but not
149613         readable.  This could be improved further but it'd take some work.
149615 2004-08-08  Simon Josefsson  <jas@extundo.com>
149617         * modules/xgethostname (Depends-on): Remove exit and error (not
149618         used).
149620         * modules/getpass-gnu: Add getpass.h.
149621         (Depends-on): Add stdbool.
149622         * modules/getpass: Add getpass.h.
149624 2004-08-08  Simon Josefsson  <jas@extundo.com>
149626         * m4/getpass.m4 (gl_FUNC_GETPASS, gl_FUNC_GETPASS_GNU):
149627         Check getpass declaration.
149629 2004-08-08  Simon Josefsson  <jas@extundo.com>
149631         * lib/xgethostname.c: Don't include error.h (not used).
149633         * lib/getpass.h: Add.
149634         * lib/getpass.c: Include getpass.h first.
149636 2004-08-08  Paul Eggert  <eggert@cs.ucla.edu>
149638         * lib/xalloc-die.c: New file.
149639         * lib/xalloc.h (xalloc_fail_func, xalloc_msg_memory_exhausted): Remove.
149640         All uses removed.
149641         * lib/xmalloc.c (xalloc_fail_func, xalloc_msg_memory_exhausted):
149642         Likewise. Move inclusions of gettext.h, error.h, exitfail.h to
149643         xalloc-die.c.
149644         (_, N_, xalloc_die): Move to xalloc-die.c.
149645         * lib/userspec.c (parse_user_spaec): Use xstrdup rather than strdup,
149646         so that we needn't mess with xalloc_msg_memory_exhausted.
149648         * lib/sha1.h: Renamed from sha.h.
149649         (SHA1_H): Renamed from _SHA_H.
149650         (sha1_ctx): Renamed from sha_ctx.
149651         (sha1_init_ctx): Renamed from sha_init_ctx.
149652         (sha1_process_block): Renamed from sha_process_block.
149653         (sha1_process_bytes): Renamed from sha_process_bytes.
149654         (sha1_finish_ctx): Renamed from sha_finish_ctx.
149655         (sha1_read_ctx): Renamed from sha_read_ctx.
149656         (sha1_stream): Renamed from sha_stream.
149657         (sha1_buffer): Renamed from sha_buffer.
149658         * lib/sha1.c: Likewise; renamed from sha.c.
149659         Do not include <sys/types.h>.
149660         Include <stddef.h> rather than <stdlib.h>.
149662 2004-08-08  Bruno Haible  <bruno@clisp.org>
149664         * lib/pathname.h (FILE_SYSTEM_PREFIX_LEN): Renamed from
149665         FILESYSTEM_PREFIX_LEN.
149666         * lib/progreloc.c: Likewise.
149667         * lib/concatpath.c (concatenated_pathname): Use FILE_SYSTEM_PREFIX_LEN.
149669 2004-08-06  Simon Josefsson  <jas@extundo.com>
149671         * modules/progname (Depends-on): Don't depend on stdbool.
149673 2004-08-06  Simon Josefsson  <jas@extundo.com>
149675         * modules/getsubopt: New file.
149676         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
149677         getsubopt.
149679 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
149681         More merge from coreutils.
149683         * m4/utimens.m4, m4/utimecmp.m4: New files.
149684         * m4/backupfile.m4, euidacces.m4, acl.m4, afs.m4, calloc.m4, dirfd.m4,
149685         fsusage.m4, jm-macros.m4, ls-mntd-fs.m4, md5.m4, mountlist.m4,
149686         prereq.m4, sha.m4: Import changes from coreutils.
149688 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
149690         More merge from coreutils.
149691         * modules/raise, modules/readtokens0, modules/utimens:
149692         * modules/utimecmp, module/xnanosleep: New files.
149693         * modules/strftime: Add lib/strftime.h.
149694         Change include from <time.h> to "strftime.h".
149695         * modules/yesno: Add lib/yesno.h.
149696         * modules/backupfile: Remove lib/addext.c.
149697         * modules/euidaccess: Add stat-macros.h.
149698         * modules/canonicalize, modules/euidaccess,
149699         modules/filemode, modules/lchown, modules/makepath,
149700         modules/rmdir, modules/stat: Likewise.
149702 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
149704         Merge from tar.
149705         * lib/argp-help.c (make_hol, hol_append): Don't assume that
149706         SIZE_MAX is a valid preprocessor constant.
149707         (__argp_basename): Change from "#ifndef _LIBC"
149708         to "#ifndef __argp_short_program_name", so that
149709         we don't compile these functions for tar.
149711         More merges from coreutils.
149712         * lib/raise.c, lib/readtokens0.h, lib/readtokens0.c, lib/strftime.h:
149713         * lib/utimens.h, lib/utimens.c, lib/utimecmp.h, lib/utimecmp.c:
149714         * lib/xnanosleep.h, lib/xnanosleep.c, lib/yesno.h: New files.
149715         * lib/addext.c: Remove; no longer needed.
149716         * lib/yesno.c, lib/argmatch.h, lib/argmatch.c, lib/backupfile.h,
149717         lib/backupfile.c, lib/euidaccess.c, lib/filemode.c, lib/closeout.c,
149718         lib/dup2.c, lib/exclude.c, lib/fileblocks.c, lib/filemode.c,
149719         lib/fnmatch.c, lib/fnmtahc_loop.c, lib/fopen-safer.c, lib/fsusage.c,
149720         lib/fsusage.h, lib/ftruncate.c, lib/full-write.c, lib/getdate.y,
149721         lib/getloadavg.c, lib/getugroups.c, lib/hard-locale.c,
149722         lib/hard-locale.h, lib/hash.c, lib/human.c, lib/human.h, lib/lchown.c,
149723         lib/lchown.h, lib/makepath.c, lib/makepath.h, lib/md5.c, lib/md5.h,
149724         lib/memchr.c, lib/memcoll.c, lib/memrchr.c, lib/modechange.c,
149725         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
149726         lib/posixtm.c, lib/putenv.c, quotearg.c, lib/quotearg.h,
149727         lib/readtokens.c, lib/readutmp.c, lib/readutmp.h, lib/rmdir.c,
149728         lib/safe-read.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c,
149729         lib/sig2str.c, lib/stat.c, lib/strtoimax.c, lib/strverscmp.c,
149730         lib/userspec.c, lib/utime.c, lib/version-etc.c., lib/xgethostname.c,
149731         lib/xmemcoll.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtod.h,
149732         lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h, lib/xstrtoumax.c:
149733         Import changes from coreutils.
149735 2004-08-05  Simon Josefsson  <jas@extundo.com>
149737         * m4/strdup.m4: Always run gl_PREREQ_STRDUP, since strdup.h need it.
149739 2004-08-05  Simon Josefsson  <jas@extundo.com>
149741         * m4/getsubopt.m4: New file.
149743 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
149745         Merge from coreutils.
149747         * m4/c-strtod.m4, m4/canonicalize.m4, m4/fcntl-safer.m4:
149748         * m4/getcwd-path-max.m4: New files.
149750         * m4/dos.m4 (gl_AC_DOS): filesystem -> file system renaming.
149751         FILESYSTEM_PREFIX_LEN ->
149752         FILE_SYSTEM_PREFIX_LEN.
149753         FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX ->
149754         FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX.
149755         FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR ->
149756         FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR.
149758         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't require gl_AC_DOS, the
149759         prerequisite modules now handle the DOS stuff.
149760         Don't check for unistd.h.
149762 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
149764         Merge from coreutils.
149766         * lib/.gdb-history: Remove; this doesn't belong here.
149768         * lib/c-strtod.c, lib/c-strtod.h, lib/c-strtold.c, lib/cycle-check.c:
149769         * lib/cycle-check.h, lib/dev-ino.h, lib/canonicalize.h:
149770         * lib/canonicalize.c, lib/fcntl-safer.h, lib/fcntl-safer.c:
149771         * lib/getcwd.c: New files.
149773         * lib/dirname.h: Include <stdbool.h>.
149774         (FILE_SYSTEM_PREFIX_LEN): Renamed from FILESYSTEM_PREFIX_LEN,
149775         for consistency with POSIX terminology.  All uses changed.
149776         (IS_ABSOLUTE_FILE_NAME, IS_RELATIVE_FILE_NAME): New macros.
149777         (strip_trailing_slashes): Use bool for booleans.
149778         * lib/stripslash.c (strip_trailing_slashes): Likewise.
149780         * lib/error.c: Work around bug in OpenBSD 3.4 sterror_r: it
149781         sometimes returns a positive errno value even when it succeeds.
149782         (print_errno_message) [!LIBC]: Fall back on strerror if
149783         __strerror_r fails.
149785         * lib/path-concat.c (mempcpy): Don't define if a system header defines
149786         it. Don't include stdio.h, stdlib.h, unistd.h, strdup.h.
149787         (longest_relative_suffix): New function.
149788         (path_concat): Use it.  Assume first argument is not NULL.
149789         Port to DOS.  Omit redundant separators.
149790         Report an error instead of returning NULL.
149791         Use mempcpy instead of memcpy.
149792         (xpath_concat): Remove: not declared or used.
149794         * lib/same.h: Include <stdbool.h>
149795         (same_name): Return bool, not int.
149796         * lib/same.c (same_name): Likewise.
149797         (errno): Don't declare; we assume C89 or better now.
149799         * lib/stat-macros (S_ISCTG, S_ISOFD, S_ISOFL): New macros,
149800         if not already defined.
149802         * lib/xgetcwd.c (errno): Don't declare; we assume C89 or better now.
149803         * lib/dup-safer.c (errno): Likewise.
149805 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
149807         Merge from coreutils.
149808         * modules/c-strtod, modules/c-strtold, modules/canonicalize:
149809         * modules/cycle-check, modules/fcntl-safer, modules/getcwd: New files.
149810         * modules/path-concat: Don't depend on strdup.
149812 2004-08-03  Simon Josefsson  <jas@extundo.com>
149814         * lib/strdup.h: Only use HAVE_DECL_STRDUP if defined.
149815         * lib/progname.h: Don't include stdbool.h.
149817 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
149819         * modules/fatal: Remove, as the "fatal" module wasn't used or working.
149820         * MODULES.html.sh (func_all_modules): Remove fatal.
149822 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
149824         * m4/fatal.m4: Remove, as the "fatal" module wasn't used or working.
149826 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
149828         * lib/fatal.c, fatal.h: Remove as the "fatal" module wasn't used or
149829         working.
149831 2004-08-02  Simon Josefsson  <jas@extundo.com>
149833         * lib/getsubopt.h: New file, with comments from Bruno Haible.
149834         * lib/getsubopt.c: New file, from glibc, but slightly modified based on
149835         suggestions from Paul Eggert <eggert@cs.ucla.edu>.
149837 2004-08-01  Simon Josefsson  <jas@extundo.com>
149839         * lib/xgetdomainname.c: Include stdlib.h, for free().
149841 2004-07-19  Bruno Haible  <bruno@clisp.org>
149843         * MODULES.html.sh (func_all_modules): Add dummy.
149845 2004-07-16  Simon Josefsson  <jas@extundo.com>
149847         * modules/dummy: New file.
149849 2004-07-16  Simon Josefsson  <jas@extundo.com>
149851         * lib/dummy.c: New file.
149853 2004-07-16  Bruno Haible  <bruno@clisp.org>
149855         * lib/backupfile.h: Add extern "C" for C++.
149856         * lib/closeout.h: Likewise.
149857         * lib/copy-file.h: Likewise.
149858         * lib/findprog.h: Likewise.
149859         * lib/full-write.h: Likewise.
149860         * lib/pathname.h: Likewise.
149861         * lib/progname.h: Likewise.
149862         * lib/stpcpy.h: Likewise.
149863         * lib/stpncpy.h: Likewise.
149864         * lib/strcase.h: Likewise.
149865         * lib/strstr.h: Likewise.
149866         * lib/xalloc.h: Likewise.
149868         * lib/mbswidth.h: Add extern "C" for C++.
149869         Reported by Albert Chin-A-Young <china@thewrittenword.com>.
149871 2004-07-13  Robert Millan  <robertmh@gnu.org>
149873         * m4/host-os.m4: s/KNetBSD/kNetBSD/g and s/KFreeBSD/kFreeBSD/g.
149875 2004-07-09  Simon Josefsson  <jas@extundo.com>
149877         * lib/getndelim2.c: Include stddef.h, for ptrdiff_t.  (FreeBSD 4.9
149878         failed without this.)
149880 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
149882         * modules/chown (Files): Add lib/fchown-stub.c, since
149883         gl_PREREQ_CHOWN invokes AC_LIBOBJ(fchown-stub).
149885 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
149887         * lib/fchown-stub.c: New file.
149889 2004-06-24  Jim Meyering  <jim@meyering.net>
149891         * lib/obstack.h (obstack_base): Cast to (void *), per documentation.
149893 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
149895         * modules/argz: Omit "#include".
149897         * MODULES.html.sh (func_all_modules): Add calloc, to match
149898         2004-06-01 addition of calloc module.
149900 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
149902         * m4/argz.m4: New file, which is autoupdated from libtool.
149904 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
149906         * lib/argz.c, lib/argz_.h: New files, which are autoupdated from
149907         libtool.
149909 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
149911         * config/srclist-update: Don't insist on "USA." before the
149912         close-comment, as libtool omits the period and puts the */ on a
149913         separate line.
149914         * config/srclist.txt: Add argz.c, argz_.h, argz.m4.
149915         * config/srclistvars.sh: Add LIBTOOL (for eggert only).
149917 2004-06-22  Gary V. Vaughan  <gary@gnu.org>
149919         * modules/argz: New file.
149920         * MODULES.html.sh (func_all_modules): Add argz.
149922 2004-06-12  Jim Meyering  <jim@meyering.net>
149923         and  Paul Eggert  <eggert@cs.ucla.edu>
149925         * modules/hash (Files): Add lib/xalloc.h.
149926         * modules/pipe (Depends-on): Add wait-process.
149927         * modules/stat (Depends-on): Add xalloc.
149928         * modules/userspec (Files): Add lib/userspec.h.
149929         * modules/xstrtol (Depends-on): Add error.
149931 2004-06-10  Jim Meyering  <jim@meyering.net>
149933         * lib/calloc.c: New file.
149935 2004-06-06  Paul Eggert  <eggert@cs.ucla.edu>
149937         * lib/getdate.y (yylex): Allow space between sign and number.
149938         Problem reported by Dan Jacobson.
149940 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
149942         Merge from coreutils CVS.
149944         * m4/backupfile.m4, dirname.m4, human.m4, inttypes.m4, longlong.m4,
149945         makepath.m4, memchr.m4, memcmp.m4, mountlist.m4, path-concat.m4,
149946         putenv.m4, quotearg.m4, readutmp.m4, strtoimax.m4, strtoll.m4,
149947         strtoull.m4, strtoumax.m4, ulonglong.m4, vasnprintf.m4,
149948         xstrtol.m4: Fix copyright date and/or serial number.
149950         * m4/chown.m4 (gl_PREREQ_CHOWN): Check for fcntl.h.
149951         See if we need an fchown replacement.
149952         (gl_FUNC_CHOWN_FOLLOWS_SYMLINK): New macro.
149953         (gl_FUNC_CHOWN): Require gl_FUNC_CHOWN_FOLLOWS_SYMLINK,
149954         and use the replacement function if we detect either defect.
149956         * m4/prereq.m4 (gl_PREREQ): Add gl_ALLOCSA, gl_CLOEXEC, gl_INTTOSTR,
149957         gl_UTIMECMP.
149959 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
149960         and  Jim Meyering  <jim@meyering.net>
149962         Merge from coreutils CVS.
149964         * lib/stat-macros.h: New file, with contents from file-type.h
149965         and coreutils' system.h.
149966         * lib/file-type.c: Include "stat-macros.h".
149967         * lib/file-type.h (file_type): Move all macro definitions to new file,
149968         stat-macros.h.
149969         * modules/file-type: Add lib/stat-macros.h.
149971         * lib/chown.c (rpl_chown) [CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE]:
149972         Wrap old code with this conditional.
149973         [CHOWN_MODIFIES_SYMLINK]: Try to work around a chown
149974         function that does not dereference symlinks.
149975         * lib/lchown.c (lchown) [CHOWN_MODIFIES_SYMLINK]: Just call chown.
149977         * lib/xreadlink.c: Include xreadlink.h first, to catch .h file
149978         dependency problems.
149979         (xreadlink): Accept new arg SIZE, for efficiency.
149980         All decls and uses changed.
149981         * lib/xreadlink.h: Include <stddef.h>, for size_t.
149983         * lib/.cppi-disable: Add alloca_.h, allocsa.h, exit.h, getndelim2.h,
149984         gettext.h, localcharset.h, strdup.h, strndup.h, strtoul.c, time_r.h.
149986         * lib/.cvsignore: Add alloca.h, fnmatch.h, poll.h, stdbool.h,
149987         sysexits.h.
149989 2004-06-01  Jim Meyering  <jim@meyering.net>
149991         * m4/calloc.m4: New file.
149992         * modules/calloc: New file.
149994 2004-05-31  Paul Eggert  <eggert@cs.ucla.edu>
149996         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Detect _Bool bug in HP aC++/ANSI
149997         C B3910B A.05.55 [Dec 04 2003].  Problem reported by Jim Meyering.
149998         Also, fix a typo in a diagnostic.
150000 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
150002         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Do not require AC_FUNC_MALLOC
150003         or AC_FUNC_REALLOC.
150005 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
150007         * modules/hash (Depends-on): Remove malloc, realloc.
150008         * modules/xalloc (Depends-on): Likewise.
150010         * README: Mention that the 'free' module works around the
150011         problem with 'free (0)'.
150012         Mention LIA-1 and C99.
150013         Add a copyright notice.
150015         * lib/xmalloc.c (HAVE_MALLOC, HAVE_REALLOC): Do not require these
150016         macros to be defined.
150017         (xnmalloc_inline, xnrealloc_inline, xcalloc): Do not die if
150018         the allocator returns NULL because the requested size is zero.
150020 2004-05-20  Paul Eggert  <eggert@cs.ucla.edu>
150022         * lib/malloc/obstack.c (_obstack) [defined _LIBC]: Bring back this
150023         var.  Add comment explaining why libc still defines it.  This
150024         merges the following patch from glibc:
150025         http://sources.redhat.com/ml/libc-alpha/2004-05/msg00157.html
150027 2004-05-20  Andreas Schwab  <schwab@suse.de>
150029         * m4/free.m4: Replace free if it not known to work, not the other
150030         way round.
150032 2004-05-19  Paul Eggert  <eggert@cs.ucla.edu>
150034         * lib/obstack.c (_obstack): Remove unused variable.  It hasn't been
150035         present in glibc since revision 1.1 of this file.
150036         * lib/obstack.h (_obstack_free, obstack_1grow, obstack_1grow_fast,
150037         obstack_alignment_mask, obstack_alloc, obstack_base,
150038         obstack_blank, obstack_blank_fast, obstack_chunk_size,
150039         obstack_copy, obstack_copy0, obstack_finish, obstack_grow,
150040         obstack_grow0, obstack_init, obstack_int_grow,
150041         obstack_int_grow_fast, obstack_make_room, obstack_memory_used,
150042         obstack_next_free, obstack_object_size, obstack_ptr_grow,
150043         obstack_ptr_grow_fast, obstack_room): Remove declarations of
150044         nonexistent functions.
150046 2004-05-18  Karl Berry  <karl@gnu.org>
150048         * config/srclist.txt: break link for vasnprintf.c.
150050 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
150052         Port obstack to the AS/400, where pointers are 16 bytes wide and
150053         you cannot cast an integer to a valid pointer.  This patch is
150054         currently waiting to be integrated into glibc; see
150055         <http://sources.redhat.com/ml/libc-alpha/2004-05/msg00073.html>.
150057         * lib/obstack.h (__PTR_TO_INT, __INT_TO_PTR): Remove.
150058         All uses of __INT_TO_PTR (PTR_TO_INT ...) replaced by __PTR_ALIGN.
150059         (__BPTR_ALIGN, __PTR_ALIGN): New macros.
150060         (struct obstack): temp member is now a union of a pointer and
150061         an integer, instead of an integer.  All integer uses changed.
150062         This does not affect the physical layout of struct obstack,
150063         except on hosts (like the AS/400) where the size or alignment of
150064         void * is greater than that of ptrdiff_t.
150065         (obstack_finish) [! (defined __GNUC__ && defined __STDC__ &&
150066         __STDC__)]: Store temporary in pointer member of union, not
150067         integer member.
150068         * lib/obstack.c: Include <stddef.h>, for offsetof.
150069         (struct fooalign): Remove; it doesn't need a name.
150070         (union fooround): Change double to long double, and add void *.
150071         (DEFAULT_ALIGNMENT): Use offsetof to compute.
150072         (DEFAULT_ALIGNMENT, DEFAULT_ROUNDING): Now an enum constant,
150073         not a macro.  Hence the values are always int; so remove all
150074         casts-to-int in uses.
150076 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
150078         * config/srclist.txt: Break link for argp-help.c and argp-parse.c until
150079         we can get this patch merged into glibc.
150081 2004-05-17  Derek R. Price  <derek@ximbiot.com>
150082             Paul Eggert  <eggert@cs.ucla.edu>
150084         * m4/argp: Depend on alloca.
150086 2004-05-17  Derek R. Price  <derek@ximbiot.com>
150087             Paul Eggert  <eggert@cs.ucla.edu>
150089         * lib/argp-help.c, argp-parse.c: Assume <alloca.h> rather than
150090         freecoding.
150092 2004-05-17  Bruno Haible  <bruno@clisp.org>
150094         * lib/vasnprintf.c (VASNPRINTF): Correctly handle the case of a
150095         precision that consists of a '.' followed by an empty digit string.
150096         Patch by Tor Lillqvist <tml@iki.fi>.
150098 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
150100         * modules/getdate: Depend on alloca.
150101         * modules/setenv: Likewise.
150103 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
150105         * m4/alloca.m4 (gl_FUNC_ALLOCA): Define HAVE_ALLOCA_H always,
150106         for backward compatibility with older code.  We need our own
150107         alloca.h if _AIX is defined.  Define HAVE_ALLOCA if we discover
150108         it under some other name, and our alloca.h will define it.
150110 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
150111             Derek Price  <derek@ximbiot.com>
150113         * lib/alloca.c: Include <alloca.h>, to get our interface.
150114         * lib/alloca_.h: Use __alloca on AIX, so that we don't have to
150115         include <alloca.h> first.  Use C89 prototype for alloca; this
150116         requires including <stddef.h> for size_t.  Use extern "C" if C++.
150117         Use #elif for simplicity, since we can assume C89 now.
150118         Don't try to source the system alloca.h since it will not be found
150119         and to prevent recursively including its replacement.
150120         * lib/fnmatch.c: Include <alloca.h> instead of opencoding.
150121         * lib/regex.c: Likewise.
150123 2004-05-16  Derek Price  <derek@ximbiot.com>
150124             Paul Eggert  <eggert@cs.ucla.edu>
150126         getline cleanup.  This changes the getndelim2 API: both order of
150127         arguments, and meaning of delim2 (now uses EOF, not 0, to indicate
150128         no delimiter).
150130         * lib/getline.c: Don't include stddef.h or stdio.h, since our
150131         interface does that.
150132         (getline): Always use getdelim, so that we don't have two
150133         copies of this code.
150134         * lib/getndelim2.c: Include <limits.h>, <inttypes.h>, <stdint.h>
150135         if available.
150136         (PTRDIFF_MAX, SIZE_MAX, SSIZE_MAX): Define if not defined.
150137         (GETNDELIM2_MAXIMUM): New macro.
150138         (getndelim2): Reorder arguments.  delim==EOF now means no delimiter,
150139         instead of the old practice of delim2==0.  All callers changed.
150140         Return -1 on overflow, instead of returning junk.
150141         Do not set *linesize unless allocation succeeds.
150142         * lib/getndelim2.h: Do not include stddef.h; no longer needed, now
150143         that we include sys/types.h.
150144         * lib/getnline.h: Likewise.
150145         * lib/getndelim2.h (GETNLINE_NO_LIMIT): New macro.
150146         (getndelim2): Reorder arguments.
150147         * lib/getnline.c (getnline, getndelim):
150148         Don't discard the NMAX argument.
150149         (getnline): Invoke getndelim, to avoid code duplication.
150150         * lib/getnline.h (GETNLINE_NO_LIMIT): New macro, used instead
150151         of (size_t) -1 by callers of the getnline family.
150153 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
150155         * m4/gettime.m4 (gl_GETTIME): Require gl_TIMESPEC.
150156         Check for gettimeofday.
150157         * m4/settime.m4 (gl_SETTIME): Require gl_TIMESPEC.
150158         Check for settimeofday, stime.
150160 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
150162         * lib/nanosleep.c (suspended): Change its type from int to
150163         sig_atomic_t volatile.
150164         (first_call): Make it private to rpl_nanosleep, and have it
150165         be zero initially as that's a bit faster.
150166         (my_usleep): Round up fractional times instead of truncating them,
150167         as this is the usual meaning for 'sleep'.
150169         * lib/gettime.c (gettime): Fall back on `time' if `gettimeofday'
150170         doesn't work.
150171         * lib/settime.c: Include <unistd.h>, for stime (on Solaris 8, anyway).
150172         (ENOSYS): Define if not defined.
150173         (settime): Fall back on stime if it exists and settimeofday fails.
150174         But don't bother with fallbacks if a method fails with errno == EPERM.
150176 2004-05-11  Jim Meyering  <jim@meyering.net>
150178         Prior to this change, the save_cwd caller required read access to the
150179         current directory on most systems (ones with the fchdir function).
150181         * lib/save-cwd.c (save_cwd) [HAVE_FCHDIR]: If opening `.' read-only
150182         fails, try write-only, and finally, resort to using xgetcwd.
150184 2004-05-06  Paul Eggert  <eggert@cs.ucla.edu>
150186         * lib/obstack.c, obstack.h: Import changes from libc.
150188 2004-05-04  Derek Price  <derek@ximbiot.com>
150190         * modules/argp: Remove dependency on alloca.
150192 2004-04-28  Bruno Haible  <bruno@clisp.org>
150194         * lib/findprog.c (find_in_path): Treat Cygwin like Windows, since it
150195         also implicitly appends .exe to executables.
150196         * lib/localcharset.c (ISSLASH): Treat Cygwin like Windows, since it now
150197         accepts Windows pathnames.
150198         * lib/pathname.h (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
150199         Treat Cygwin like Windows, since it now accepts Windows pathnames.
150200         * lib/progreloc.c (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
150201         Treat Cygwin like Windows, since it now accepts Windows pathnames.
150202         Reported by Derek Robert Price <derek@ximbiot.com>.
150204 2004-04-27  Derek Price  <derek@ximbiot.com>
150206         * m4/dos.m4 (gl_AC_DOS): Add Cygwin to list of Windows/DOS
150207         environments that accept backslashes and drive letters in paths.
150209 2004-04-21  Karl Berry  <karl@gnu.org>
150211         * config/srclist.txt (localcharset.c): break sync.
150213 2004-04-20  Paul Eggert  <eggert@twinsun.com>
150215         * m4/host-os.m4: Add a copyright notice.
150217 2004-04-20  Jim Meyering  <jim@meyering.net>
150219         * modules/dirfd: Change UTILS_ macro name prefix to gl_.
150220         * modules/mkstemp: Likewise.
150221         * modules/mkdir: Likewise.
150223         Change UTILS_ to gl_ in AC_DEFINE'd names.
150224         Change utils_- and jm_-prefixed variables, too.
150225         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Renamed from
150226         UTILS_FUNC_MKDIR_TRAILING_SLASH.
150227         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Renamed from UTILS_FUNC_MKSTEP.
150229         * m4/dirfd.m4 (gl_FUNC_DIRFD): Rename from UTILS_FUNC_DIRFD.
150230         Don't emit trailing blanks.
150231         Also rename jm_-prefixed variables to have gl_ prefix.
150233         * m4/host-os.m4 (gl_HOST_OS): Rename from UTILS_HOST_OS.
150234         Also rename jm_-prefixed variables to have gl_ prefix.
150236         * m4/jm-macros.m4: Reflect the renamings.
150237         * m4/prereq.m4: Likewise.
150239 2004-04-20  Jim Meyering  <jim@meyering.net>
150241         * lib/getndelim2.c (getndelim2): Upon realloc failure, don't leak
150242         memory.
150244 2004-04-20  Jim Meyering  <jim@meyering.net>
150245             Bruno Haible  <bruno@clisp.org>
150247         * lib/localcharset.c (get_charset_aliases) [!VMS && !WIN32]: Don't leak
150248         memory when realloc fails.
150250 2004-04-19  Jim Meyering  <jim@meyering.net>
150252         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Require gl_FUNC_FREE,
150253         now that readutmp.c may call `free (0)'.
150255 2004-04-19  Bruno Haible  <bruno@clisp.org>
150257         * m4/mbrtowc.m4: Change jm_ to gl_ in cache variables as well.
150258         * m4/inttypes_h.m4: Likewise.
150259         * m4/stdint_h.m4: Likewise.
150260         * m4/intmax_t.m4: Likewise.
150261         * m4/uintmax_t.m4: Likewise.
150263 2004-04-18  Jim Meyering  <jim@meyering.net>
150265         * m4/prereq.m4: Don't forbid jm_ prefix.
150267         * m4/afs.m4, m4/allocsa.m4, m4/assert.m4, m4/backupfile.m4:
150268         * m4/bison.m4, m4/check-decl.m4, m4/chown.m4, m4/d-ino.m4:
150269         * m4/d-type.m4, m4/dirname.m4, m4/dos.m4, m4/error.m4, m4/fpending.m4:
150270         * m4/fstypename.m4, m4/fsusage.m4, m4/ftruncate.m4, m4/getdate.m4:
150271         * m4/getgroups.m4, m4/gettext.m4, m4/glibc21.m4, m4/group-member.m4:
150272         * m4/human.m4, m4/intmax.m4, m4/intmax_t.m4, m4/inttostr.m4:
150273         * m4/inttypes.m4, m4/inttypes_h.m4, m4/jm-macros.m4, m4/jm-winsz1.m4:
150274         * m4/jm-winsz2.m4, m4/lchown.m4, m4/lib-check.m4, m4/link-follow.m4:
150275         * m4/localcharset.m4, m4/longlong.m4, m4/ls-mntd-fs.m4, m4/lstat.m4:
150276         * m4/makepath.m4, m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4:
150277         * m4/memcmp.m4, m4/mkdtemp.m4, m4/mkstemp.m4, m4/mountlist.m4:
150278         * m4/nanosleep.m4, m4/path-concat.m4, m4/perl.m4, m4/prereq.m4:
150279         * m4/putenv.m4, m4/quotearg.m4, m4/regex.m4, m4/stat.m4:
150280         * m4/stdint_h.m4, m4/strftime.m4, m4/strtoimax.m4, m4/strtoll.m4:
150281         * m4/strtoull.m4, m4/strtoumax.m4, m4/timespec.m4, m4/uintmax_t.m4:
150282         * m4/ulonglong.m4, m4/unlink-busy.m4, m4/unlocked-io.m4, m4/uptime.m4,
150283         * m4/utimbuf.m4, m4/utime.m4, m4/utimes-null.m4, m4/vasnprintf.m4:
150284         * m4/xstrtoimax.m4, m4/xstrtol.m4, m4/xstrtoumax.m4:
150285         Change jm_ to gl_ in AC_DEFINE'd names. Update all uses.
150287 2004-04-18  Jim Meyering  <jim@meyering.net>
150289         * lib/readutmp.c (read_utmp) [UTMP_NAME_FUNCTION]: Upon realloc
150290         failure, don't leak memory and do call END_UTMP_ENT.
150292 2004-04-18  Jim Meyering  <jim@meyering.net>
150294         Change jm_ to gl_ in AC_DEFINE'd names.
150295         * modules/assert, modules/chown, modules/fpending:
150296         * modules/ftruncate, modules/getgroups, modules/group-member:
150297         * modules/lchown, modules/lstat, modules/memcmp:
150298         * modules/nanosleep, modules/putenv, modules/stat:
150299         * modules/strftime, modules/unlocked-io, modules/utime:
150300         * modules/xstrtoimax, modules/xstrtoumax:
150302 2004-04-16  Jim Meyering  <jim@meyering.net>
150304         * m4/prereq.m4 (jm_PREREQ_STAT): Remove macro.  It is specific to
150305         coreutils' stat program.
150306         (gl_PREREQ): Don't require jm_PREREQ_STAT.
150308 2004-04-12  Paul Eggert  <eggert@twinsun.com>
150310         * config/srclist.txt: Restore setenv.c, unsetenv.c from gettext.
150311         Add intmax.m4, printf-posix.m4, sig_atomic_t.m4,
150312         signalblocking.m4, ssize_t.m4.
150313         * lib/unsetenv.c: Regenerate: this subtracts 1 from the
150314         copyright year (!).
150315         * m4/printf-posix.m4: Regenerate.
150317         * modules/inttostr (EXTRA_DIST): Move inttostr.c here....
150318         (lib_SOURCES): from here.
150319         * modules/getopt (lib_SOURCES): Add getopt_int.h.
150321 2004-04-12  Jim Meyering  <jim@meyering.net>
150323         * MODULES.html.sh (func_all_modules): Add cloexec, inttostr, free,
150324         tzset.
150326 2004-04-11  Paul Eggert  <eggert@twinsun.com>
150328         * lib/inttostr.h: Include <limits.h> unconditionally, since we assume
150329         C89.
150330         (CHAR_BIT): Remove, since we assume C89.
150331         Include <stdint.h> if available, as per current Autoconf CVS advice.
150333 2004-03-31  Jim Meyering  <jim@meyering.net>
150335         * m4/prereq.m4: Require AC_FUNC_MALLOC, not jm_FUNC_MALLOC.
150336         Require AC_FUNC_REALLOC, not jm_FUNC_REALLOC.
150337         * m4/xalloc.m4: Likewise.
150339 2004-03-30  Paul Eggert  <eggert@twinsun.com>
150341         Merge from coreutils.
150343         * m4/inttostr.m4: New file.
150344         * m4/getdate.m4 (gl_GETDATE): Remove time-related stuff.
150345         Require AM_STDBOOL_H and gl_TIMESPEC instead.
150346         Require gl_CLOCK_TIME.
150347         * m4/clock_time.m4 (gl_CLOCK_TIME): Require AC_GNU_SOURCE.
150349 2004-03-30  Paul Eggert  <eggert@twinsun.com>
150351         * lib/cloexec.h, cloexec.c (set_cloexec_flag): Return int
150352         not bool, to be more consistent with Unix conventions.
150353         Suggested by Bruno Haible.
150355         Merge from coreutils.
150357         * modules/inttostr: New file.
150358         * lib/imaxtostr.c, lib/inttostr.c, lib/inttostr.h, lib/offtostr.c:
150359         * lib/umaxtostr.c: New files.
150361         * modules/getdate: Depend on timespec, stdbool, gettime.
150362         * lib/getdate.h: Include stdbool.h, and timespec.h instead of
150363         the usual <time.h> dance.
150364         (get_date): Change signature to support fractional time stamps.
150365         All callers changed.
150366         * lib/getdate.y: Include "getdate.h" first, as we can now
150367         assume C89 and don't need to worry about 'const'.
150368         Similarly, include "unlocked-io.h" near start, not in middle.
150369         Include <limits.h>.
150370         (textint.value): Use long int rather than int.
150371         (textint.digits): Use size_t rather than int.
150372         (BILLION, LOG10_BILLION): New constants.
150373         (parser_control): New member rel_ns.  Members day_ordinal,
150374         time_zone, month, day, hour, minutes, rel_year, rel_month,
150375         rel_day, rel_hour, rel_minutes, rel_seconds
150376         are now long int, not int.  Member seconds is now struct timespec,
150377         not int.  New member timespec_seen.  Members dates_seen, days_seen,
150378         local_zones_seen, rels_seen, times_seen, zones_seen are now size_t,
150379         not int.
150380         (%union.intval): Now long int, not int.
150381         New member timespec.
150382         (tSDECIMAL_NUMBER, tUDECIMAL_NUMBER): New tokens.
150383         (seconds, signed_seconds, unsigned_seconds): New nonterminals.
150384         (spec): Now is a timespec or an item list.
150385         (timespec, items): New nonterminals.
150386         (time, rel, relunit, number, get_date):
150387         Add support for fractional seconds.
150388         (time): Fix bug: seconds weren't cleared in "00:00 +0000" syntax.
150389         (gmtime, localtime, mktime): Remove decls; not needed with C89.
150390         (to_hour): First arg is now long int, not int.
150391         (to_year): Returns long int, not int.
150392         Don't treat year -70 like 70.
150393         (tm_diff): Returns long int, not int.
150394         (lookup_word): Use bool instead of int when appropriate.
150395         (yylex): Use size_t for count, not int.
150396         Detect overflow when parsing large integer constants.
150397         Add support for fractions.
150398         (get_date): Make pointers 'const' if possible.
150399         Use more-portable code to detect integer overflow.
150400         (main) [TEST]: Adjust to above changes.  Test for localtime failure.
150401         Don't use ctime; it's not reliable if the year has >4 digits.
150403         * lib/human.c (humblock): Inspect BLOCKSIZE if BLOCK_SIZE isn't set.
150404         This is for compatibility with BSD.
150406         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP): Define.
150407         (ATIME_CMP, CTIME_CMP, MTIME_CMP, TIMESPEC_NS): Likewise.
150408         From coreutils' system.h.
150410         * lib/userspec.c: Don't include "posixver.h".
150411         (parse_user_spec): Fall back on USER.GROUP parsing, regardless
150412         of POSIX version, as POSIX 1003.1-2001 allows that behavior as a
150413         compatible extension.  Simplify code by removing a boolean int
150414         that was always nonzero if a string was nonnull.
150416 2004-03-30  Jim Meyering  <jim@meyering.net>
150418         Merge from coreutils.
150420         Avoid a configure-time warning about sys/ucred.h on OSF V4.0.
150421         * m4/ls-mntd-fs.m4: Test for sys/ucred.h separately, since
150422         on some systems one must include <grp.h> before it.
150423         Reported by Christian Krackowizer.
150425 2004-03-30  Jim Meyering  <jim@meyering.net>
150427         Merge from coreutils.
150429         * lib/mountlist.c [HAVE_SYS_UCRED_H]: Include grp.h before sys/ucred.h.
150431         * lib/readtokens.c (readtoken): Don't leak 64 bytes when reading
150432         an empty input stream.
150434         * lib/readtokens.c: Include <stdbool.h>.
150435         (readtoken): Use `size_t' rather than int/long.
150436         All callers adjusted.
150437         Use `bool' rather than `int' where appropriate.
150438         Use memset rather than an explicit loop.
150439         Use x2nrealloc rather than xrealloc.
150440         Allow the use of `\0' as a delimiter.
150441         (readtokens): Likewise.
150442         * lib/readtokens.h (readtoken, readtokens): Update prototypes.
150444 2004-03-30  Jim Meyering  <jim@meyering.net>
150446         * modules/realloc (Files): Remove m4/realloc.m4.
150447         (configure.ac): Depend on AC_FUNC_REALLOC, rather than jm_FUNC_REALLOC.
150448         * modules/malloc (Files): Remove m4/malloc.m4.
150449         (configure.ac): Depend on AC_FUNC_MALLOC, rather than jm_FUNC_MALLOC.
150450         * m4/realloc.m4: Remove file, since now it does no more than
150451         AC_REQUIRE([AC_FUNC_REALLOC]), and that can be done via
150452         the `configure.ac' section of module/realloc.
150453         * m4/malloc.m4: Likewise, but for AC_FUNC_MALLOC.
150455 2004-03-30  Bruno Haible  <bruno@clisp.org>
150457         * lib/getloadavg.c (getloadavg): Don't assume setlocale returns
150458         nonnull.
150460 2004-03-29  Paul Eggert  <eggert@twinsun.com>
150462         Merge changes to getloadavg.c from coreutils and Emacs.
150464         * modules/getloadvg: Depend on cloexec and xalloc.
150465         * lib/getloadavg.c [!defined HAVE_SETLOCALE] (setlocale):
150466         Define to an expression, not to the empty string.
150467         Include cloexec.h and xalloc.h.
150468         (getloadavg): Restore LC_NUMERIC locale after setting it temporarily.
150469         Use set_cloexec_flag rather than rolling our own.
150470         * lib/cloexec.c, lib/cloexec.h: New files.
150472 2004-03-29  Paul Eggert  <eggert@twinsun.com>
150474         * m4/cloexec.m4: New file.
150476 2004-03-18  Paul Eggert  <eggert@twinsun.com>
150478         * lib/getopt.h: Sync with libc CVS.
150480 2004-03-18  Paul Eggert  <eggert@twinsun.com>
150481             Bruno Haible  <bruno@clisp.org>
150483         * m4/mbswidth.m4 (gl_MBSWIDTH): Also test whether <wchar.h> declares
150484         mbswidth.
150486 2004-03-18  Paul Eggert  <eggert@twinsun.com>
150487             Bruno Haible  <bruno@clisp.org>
150489         * lib/mbswidth.h: Include <wchar.h> only if
150490         HAVE_DECL_MBSWIDTH_IN_WCHAR_H, not on all platforms that have
150491         <wchar.h>.
150492         * lib/mbswidth.c: Include <stdio.h> and <time.h> before <wchar.h>.
150494 2004-03-09  Paul Eggert  <eggert@twinsun.com>
150496         * modules/getopt: Add lib/getopt_int.h.
150497         * lib/argp-parse.c, getopt.c, getopt.h, getopt1.c:
150498         Sync with libc CVS.
150499         * lib/getopt_int.h: New file, also synced from libc.
150501 2004-03-09  Paul Eggert  <eggert@twinsun.com>
150503         * config/srclistvars.sh: Add GNUWWWLICENSES for eggert.
150504         * config/srclist.txt: Sync getopt with libc.  Add getopt_int.h.
150505         Bring back getopt.c, getopt.h, getopt1.c.
150507 2004-03-07  Paul Eggert  <eggert@twinsun.com>
150509         * m4/c-stack.m4 (gl_PREREQ_C_STACK): Renamed from jm_PREREQ_C_STACK.
150510         All uses changed.  Check for sa_sigaction member; this fixes
150511         a bug first reported by Jason Andrade in
150512         <http://mail.gnu.org/r/bug-textutils/2003-03/msg00027.html>.
150514 2004-03-07  Paul Eggert  <eggert@twinsun.com>
150516         * lib/c-stack.c (SIGACTION_WORKS): New macro.  Use it instead of long
150517         '#if' expressions.  Unlike the code it replaces, it does not
150518         depend on (defined _SC_PAGESIZE).  However, it does depend on
150519         HAVE_STRUCT_SIGACTION_SA_SIGACTION; this last change fixes a bug
150520         first reported by Jason Andrade in
150521         <http://mail.gnu.org/r/bug-textutils/2003-03/msg00027.html>.
150523 2004-02-25  Simon Josefsson  <jas@extundo.com>
150525         * m4/strdup.m4 (gl_PREREQ_STRDUP): Check whether strdup is declared.
150527 2004-02-25  Simon Josefsson  <jas@extundo.com>
150529         * lib/strdup.h: New file.
150530         * lib/strdup.c: Include it.
150531         * lib/path-concat.c: Include strdup.h. Drop strdup declaration.
150532         * lib/userspec.c: Include strdup.h. Drop strdup declaration.
150534 2004-02-23  Karl Berry  <karl@gnu.org>
150536         * doc/maintain.texi, doc/standards.texi, doc/make-stds.texi: new files
150537         (from fencepost.gnu.org:/gd/gnuorg).
150539 2004-02-23  Karl Berry  <karl@gnu.org>
150541         * config/srclistvars.sh (GNUORG) [karl]: redefine.
150542         * config/srclist.txt: add maintain/standards documents.
150544 2004-02-22  Bruno Haible  <bruno@clisp.org>
150546         * modules/xalloc: Remove dependency on stdbool.
150547         Reported by Derek Robert Price <derek@ximbiot.com>.
150549 2004-02-18  Bruno Haible  <bruno@clisp.org>
150551         * m4/xsize.m4 (gl_XSIZE): Require AC_C_INLINE.
150552         Reported by Derek Robert Price <derek@ximbiot.com>.
150554 2004-02-16  Karl Berry  <karl@gnu.org>
150556         * config/mkinstalldirs, install-sh: update from automake.
150558 2004-02-06  Karl Berry  <karl@gnu.org>
150560         * m4/po.m4: update from gettext 0.14.1.
150562 2004-02-06  Karl Berry  <karl@gnu.org>
150564         * lib/config.charset: update from gettext 0.14.1.
150566 2004-02-05  Paul Eggert  <eggert@twinsun.com>
150568         Add comments and code, prompted by suggestions from Bruno Haible
150569         for sh-quote.
150570         * lib/quotearg.h (quotearg_alloc): New decl.  Improve the comments
150571         describing the enum quoting_style values.
150572         * lib/quotearg.c (quotearg_alloc): New function.
150573         (quotearg_buffer_restyled): Treat lone { and } as special.
150574         Treat = as special.  Work around bug with older shells
150575         that "see" a '\' that is really the 2nd byte of a multibyte char.
150576         Quote empty string with shell_quoting_style.
150578 2004-02-03  Bruno Haible  <bruno@clisp.org>
150580         * modules/pipe: New file.
150581         * MODULES.html.sh (func_all_modules): Add pipe.
150582         * m4/pipe.m4: New file, from GNU gettext.
150584 2004-02-03  Bruno Haible  <bruno@clisp.org>
150586         * lib/pipe.h: New file, from GNU gettext.
150587         * lib/pipe.c: New file, from GNU gettext.
150589 2004-01-27  Bruno Haible  <bruno@clisp.org>
150591         * modules/execute: New file.
150592         * MODULES.html.sh (func_all_modules): Add execute.
150593         * m4/execute.m4: New file, from GNU gettext.
150595 2004-01-27  Bruno Haible  <bruno@clisp.org>
150597         * lib/execute.h: New file, from GNU gettext.
150598         * lib/execute.c: New file, from GNU gettext.
150599         * lib/w32spawn.h: New file, from GNU gettext.
150601 2004-01-24  Paul Eggert  <eggert@twinsun.com>
150603         Merge from diffutils.
150605         * lib/file-type.c (file_type): Add typed memory objects.
150606         * lib/file-type.h (S_TYPEISTMO): New macro.
150608         * lib/c-stack.h (c_stack_action): Remove argv argument.
150609         * lib/c-stack.c (c_stack_action): Likewise.  All uses changed.
150610         (die): Don't calculate message unless segv_action returns.
150611         (get_stack_location, min_address_from_argv, max_address_from_argv,
150612         volatile stack_base, volatile_stack_size): Remove.
150613         (segv_handler): If ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC, assume
150614         that every segmentation violation is a stack overflow.  (Ouch!)
150615         See Debian bug 136249 (still outstanding) for more info about why
150616         HAVE_XSI_STACK_OVERFLOW_HEURISTIC fails on Linux kernels.
150618 2004-01-24  Paul Eggert  <eggert@twinsun.com>
150620         Exit-status fix from coreutils.
150622         Use exit_failure consistently in place of EXIT_FAILURE,
150623         so that program exit statuses are consistent on failure.
150625         * lib/argmatch.c (ARGMATCH_DIE) [! defined ARGMATCH_DIE]:
150626         Include "exitfail.h", and use exit_failure rather than EXIT_FAILURE.
150627         * lib/argmatch.h: Comment fix to match the above.
150628         * lib/obstack.c (obstack_exit_failure) [!defined _LIBC]:
150629         Now a macro referring to exit_failure, instead of a separate
150630         variable.  Include "exitfail.h" to get it.
150631         * lib/xstrtol.h: Include "exitfail.h".
150632         (STRTOL_FATAL_ERROR): Exit with status exit_failure, not 2.
150634         * lib/long-options.c (parse_long_options): Use prototype
150635         for usage function arg.  Pass it EXIT_SUCCESS rather than 0,
150636         for clarity.
150638 2004-01-23  Paul Eggert  <eggert@twinsun.com>
150640         * modules/argmatch, modules/obstack, modules/xstrtol:
150641         Depend on exitfail.
150643 2004-01-21  Jim Meyering  <jim@meyering.net>
150645         * lib/mktime.c (__mktime_internal) [!_LIBC]: Define to mktime_internal
150646         so as not to conflict with a different-sized __mktime_internal
150647         function in GNU libc.
150648         * lib/timegm.c (__mktime_internal) [!_LIBC]: Likewise.
150649         Problem building statically-linked `ls' reported by Michael Brunnbauer.
150651 2004-01-20  Karl Berry  <karl@gnu.org>
150653         * config/config.guess: update from config.
150655         * config/srclistvars.sh: GNUWWWLICENSES for karl.
150657 2004-01-20  Bruno Haible  <bruno@clisp.org>
150659         Safer stack allocation.
150660         * modules/setenv: Depend on allocsa instead of alloca.
150661         * lib/setenv.c: Include allocsa.h.
150662         (alloca): Remove fallback definition.
150663         (freea): Remove macro.
150664         (__add_to_environ) [!_LIBC]: Use allocsa instead of alloca. Use freesa
150665         instead of freea.
150667 2004-01-20  Bruno Haible  <bruno@clisp.org>
150669         * m4/eealloc.m4: New file, from GNU gettext.
150671 2004-01-20  Bruno Haible  <bruno@clisp.org>
150673         * m4/allocsa.m4: New file, from GNU gettext.
150675 2004-01-20  Bruno Haible  <bruno@clisp.org>
150677         * modules/xallocsa: New file.
150678         * MODULES.html.sh (func_all_modules): Add xallocsa.
150679         * lib/xallocsa.h: New file, from GNU gettext.
150680         * lib/xallocsa.c: New file, from GNU gettext.
150682 2004-01-20  Bruno Haible  <bruno@clisp.org>
150684         * lib/wait-process.c: On Windows, include windows.h. Needed on mingw.
150686 2004-01-20  Bruno Haible  <bruno@clisp.org>
150688         * lib/wait-process.c (wait_subprocess): Add ignore_sigpipe argument.
150689         * lib/wait-process.c (wait_subprocess): Likewise. Handle SIGPIPE
150690         specially.
150692 2004-01-20  Bruno Haible  <bruno@clisp.org>
150694         * lib/wait-process.c (wait_process): Disable the 2003-10-31 waitid()
150695         patch.
150697 2004-01-20  Bruno Haible  <bruno@clisp.org>
150699         * lib/wait-process.c (cleanup_slaves): Use ANSI C declaration.
150701 2004-01-20  Bruno Haible  <bruno@clisp.org>
150703         * modules/eealloc: New file.
150704         * MODULES.html.sh (func_all_modules): Add eealloc.
150705         * lib/eealloc.h: New file.
150707 2004-01-20  Bruno Haible  <bruno@clisp.org>
150709         * lib/binary-io.h: Avoid warnings on Cygwin.
150711 2004-01-20  Bruno Haible  <bruno@clisp.org>
150713         * modules/allocsa: New file.
150714         * MODULES.html.sh (func_all_modules): Add allocsa.
150715         * lib/allocsa.h: New file, from GNU gettext.
150716         * lib/allocsa.c: New file, from GNU gettext.
150718 2004-01-18  Karl Berry  <karl@gnu.org>
150720         * doc/gpl.texi, doc/lgpl.texi: new files.
150722 2004-01-18  Karl Berry  <karl@gnu.org>
150724         * config/srclistvars.sh (GNUWWWLICENSES): new variable.
150725         * config/srclist.txt ({fdl,gpl,lgpl}.text): get from there.
150727 2004-01-18  Simon Josefsson  <jas@extundo.com>
150729         * modules/strdup (Files, Makefile.am): Add strdup.h.
150731 2004-01-15  Paul Eggert  <eggert@twinsun.com>
150733         * modules/poll: Add BUILT_SOURCES.
150734         Prefer "$@" to "poll.h" in rule for building poll.h.
150735         All this is for consistency with alloca and fnmatch.
150737         * modules/same: Depend on stdbool.
150739 2004-01-15  Paul Eggert  <eggert@twinsun.com>
150741         Merge from coreutils.
150743         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for uintptr_t.
150744         * m4/posixver.m4 (gl_POSIXVER): Require gl_DEFAULT_POSIX2_VERSION.
150745         (gl_DEFAULT_POSIX2_VERSION): Move
150746         the documentation from 'configure' into 'config.hin',
150747         so that 'configure --help' isn't burdened by it and
150748         we don't have to worry about its formatting there.
150749         Reword the documentation so that it's more succinct
150750         and can be run together into a single paragraph.
150751         * m4/same.m4 (gl_SAME): Check for pathconf.
150753 2004-01-15  Paul Eggert  <eggert@twinsun.com>
150755         Merge from coreutils.
150757         * lib/posixver.c: Include posixver.h.
150759         * lib/same.c: Include <stdbool.h>, <limits.h>.
150760         (_POSIX_NAME_MAX): Define if not defined.
150761         (MIN): New macro.
150762         (same_name): If file names are silently truncated, report
150763         that the file names are the same if they are the same after
150764         the silent truncation.
150766         * lib/xstrtod.h (xstrtod): Accept an extra arg, specifying the
150767         conversion function.
150768         * lib/xstrtod.c (xstrtod): Likewise.  All callers changed to
150769         include c-strtod.h and use c_strtod.  Don't include stdlib.h; no
150770         longer needed.
150772 2004-01-15  Jim Meyering  <jim@meyering.net>
150774         Merge from coreutils.
150776         * m4/clock_time.m4 (gl_CLOCK_TIME): Don't set LIB_CLOCK_GETTIME
150777         if no library is required.
150778         * m4/jm-macros.m4: Don't require UTILS_SYS_OPEN_MAX.
150779         * m4/jm-macros.m4 (jm_MACROS): Require gl_FUNC_FREE.
150780         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.58.
150781         (AC_LANG_SOURCE): Remove definition, now that we require autoconf-2.58.
150782         * m4/jm-macros.m4 (jm_MACROS): Don't require AC_FUNC_FTW.
150783         * m4/lib-check.m4 (jm_LIB_CHECK): Do not set LIB_CRYPT to the
150784         value, $ac_cv_search_crypt, if it's "none required".
150785         * m4/posixver.m4 (gl_DEFAULT_POSIX2_VERSION): New macro.
150786         * m4/prereq.m4 (jm_PREREQ): Require AC_FUNC_GETLOADAVG,
150787         not gl_FUNC_GETLOADAVG.
150788         * m4/prereq.m4 (jm_PREREQ): Require gl_READTOKENS, gl_MD5, gl_MAKEPATH,
150789         gl_LONG_OPTIONS, and gl_IDCACHE, gl_GETUGROUPS.
150791 2004-01-15  Jim Meyering  <jim@meyering.net>
150793         Merge from coreutils.
150795         * lib/md5.h (rol) [__GNUC__ && __i386__]: Don't use `asm' code.  These
150796         days, gcc-3.x does better all by itself.  Patch from Dean Gaudet:
150797         http://mail.gnu.org/r/bug-coreutils/2003-11/msg00144.html
150799         * lib/posixver.c (DEFAULT_POSIX2_VERSION): Use definition of new,
150800         optional configure-time default.
150802         * lib/version-etc.c (version_etc_copyright): Update copyright date.
150804         * lib/xreadlink.c (xreadlink): Correct outdated comment.
150806 2004-01-15  Alexandre Duret-Lutz  <adl@gnu.org>
150808         Merge from coreutils.
150810         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Do not set LIB_NANOSLEEP to the
150811         value, $ac_cv_search_nanosleep, if it's "none required".
150813 2004-01-14  Paul Eggert  <eggert@twinsun.com>
150815         * lib/fnmatch_loop.c (ALLOCA_LIMIT): Remove macro, which collided
150816         with like-named macro in fnmatch.c.
150817         (EXT): Use an internal constant instead.
150819         Merge fnmatch patches from glibc.
150820         * lib/fnmatch.c (mbsinit): Remove define.
150821         Add libc_hidden_ver (__fnmatch, fnmatch).
150822         * lib/fnmatch_loop.c (FCT): Cast to int32_t and UCHAR when appropriate.
150823         Adjust to renaming of collseq_table_lookup to __collseq_table_lookup.
150825 2004-01-14  Karl Berry  <karl@gnu.org>
150827         * config/install-sh: update from automake.
150829 2004-01-13  Karl Berry  <karl@gnu.org>
150831         * config/install-sh: update from automake.
150833 2004-01-09  Karl Berry  <karl@gnu.org>
150835         * config/install-sh: update from automake.
150837 2004-01-05  Karl Berry  <karl@gnu.org>
150839         * config/config.{sub,guess}: update from config.
150841 2003-12-31  Karl Berry  <karl@gnu.org>
150843         * config/depcomp: update from automake.
150845 2003-12-14  Karl Berry  <karl@gnu.org>
150847         * lib/config.charset: update from gettext-runtime.
150849 2003-12-03  Paul Eggert  <eggert@twinsun.com>
150851         * lib/getgroups.c (getgroups): xmalloc takes one argument, not two.
150852         Bug reported by Alfred M. Szmidt.
150854 2003-12-03  Bruno Haible  <bruno@clisp.org>
150856         Upgrade from gettext-0.13.
150857         * modules/gettext (Files): Add m4/intmax.m4, m4/longdouble.m4,
150858         m4/longlong.m4, m4/printf-posix.m4, m4/signed.m4, m4/size_max.m4,
150859         m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4.
150860         * m4/gettext.m4: Upgrade from gettext-0.13.
150861         * m4/po.m4: Upgrade from gettext-0.13.
150862         * m4/size_max.m4 (gl_SIZE_MAX): Don't use the _ONCE macros here.
150863         * m4/intmax.m4: New file, from gettext-0.13.
150864         * m4/printf-posix.m4: New file, from gettext-0.13.
150866 2003-11-29  Karl Berry  <karl@gnu.org>
150868         * lib/argp-{help.c,parse.c,namefrob.h}, argp.h: update from libc.
150870 2003-11-25  Paul Eggert  <eggert@twinsun.com>
150871             Bruno Haible  <bruno@clisp.org>
150873         * lib/printf-parse.h: Don't include sys/types.h.
150874         (ARG_NONE): New macro.
150875         (char_directive): Change type of *arg_index fields to size_t.
150876         * lib/printf-parse.c: Don't include sys/types.h.
150877         (SSIZE_MAX): Remove macro.
150878         (PRINTF_PARSE): Change the type of the arg_index variables to size_t.
150879         Remove unnecessary overflow check.
150880         * lib/vasnprintf.c (VASNPRINTF): Update for type change of *arg_index
150881         fields.
150883 2003-11-25  Bruno Haible  <bruno@clisp.org>
150885         * modules/vasnprintf (Files): Remove m4/ssize_t.m4.
150887 2003-11-25  Bruno Haible  <bruno@clisp.org>
150889         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Don't require
150890         gt_TYPE_SSIZE_T.
150892 2003-11-24  Paul Eggert  <eggert@twinsun.com>
150894         * modules/alloca: Remove dependency on xalloc.
150896 2003-11-24  Paul Eggert  <eggert@twinsun.com>
150898         * lib/alloca.c: Remove dependency on xalloc module.
150899         (xalloc_die): Remove.
150900         (memory_full) [!defined emacs]: New macro.
150901         [!defined emacs]: Don't include xalloc.h.
150902         (alloca): Invoke memory_full, not xalloc_die, if malloc fails or
150903         address arithmetic overflows.  Change datatypes a bit to avoid
150904         unnecessary casts.
150906 2003-11-22  Jim Meyering  <jim@meyering.net>
150908         * lib/xmalloc.c (x2nrealloc_inline): Fix typos in comments:
150909         s/size/size_t/.
150911 2003-11-21  Karl Berry  <karl@gnu.org>
150913         * config/config.{sub,guess}: update from config.
150915 2003-11-18  Karl Berry  <karl@gnu.org>
150917         * config/config.{sub,guess}: update from config.
150919         * config/(printf-{parse,args}.[ch]): sync broken, sigh.
150921 2003-11-17  Paul Eggert  <eggert@twinsun.com>
150923         * README: Mention that S+T cannot overflow if S is the size of
150924         an existing object and T is sufficiently small.
150926 2003-11-17  Jim Meyering  <jim@meyering.net>
150928         On systems without utime and without a utimes function capable of
150929         dealing with a NULL struct utimbuf* argument, this utime replacement
150930         could -- in unusual circumstances -- leak a file descriptor.
150931         * lib/utime.c: Include <unistd.h> and <errno.h>.
150932         (utime_null): Be sure to close `fd' and to preserve errno.
150933         Reported by Geoff Collyer via Arnold Robbins.
150935 2003-11-17  Bruno Haible  <bruno@clisp.org>
150937         * modules/vasnprintf (Files): Add m4/ssize_t.m4.
150938         (Depends-on): Add xsize.
150940 2003-11-17  Bruno Haible  <bruno@clisp.org>
150942         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Require gt_TYPE_SSIZE_T.
150944 2003-11-17  Bruno Haible  <bruno@clisp.org>
150946         * lib/vasnprintf.c (alloca): Remove fallback definition.
150947         (freea): Remove definition.
150948         (VASNPRINTF): Use alloca only for small sizes, say <= 4000 bytes.
150949         Reported by Paul Eggert.
150951 2003-11-16  Paul Eggert  <eggert@twinsun.com>
150952             Bruno Haible  <bruno@clisp.org>
150954         Protect against address arithmetic overflow.
150955         * lib/printf-args.h: Include stddef.h.
150956         (arguments): Change type of field 'count' to size_t.
150957         * lib/printf-args.c (printf_fetchargs): Use size_t instead of
150958         'unsigned int' where appropriate.
150959         * lib/printf-parse.h: Include sys/types.h.
150960         (char_directive): Change type of *arg_index fields to ssize_t.
150961         (char_directives): Change type of fields 'count', max_*_length to
150962         size_t.
150963         * lib/printf-parse.c: Include sys/types.h and xsize.h.
150964         (SSIZE_MAX): Define fallback value.
150965         (PRINTF_PARSE): Use size_t instead of 'unsigned int' and ssize_t
150966         instead of 'int' where appropriate. Check a_allocated, d_allocated
150967         against overflow. Reject %m$ argument numbers > SSIZE_MAX + 1.
150968         * lib/vasnprintf.c: Include xsize.h.
150969         (VASNPRINTF): Use size_t instead of 'unsigned int' where appropriate.
150970         Check alloca, malloc, realloc, ENSURE_ALLOCATION arguments against
150971         overflow. Avoid wraparound when converting a width or precision from
150972         decimal to binary.
150974 2003-11-16  Bruno Haible  <bruno@clisp.org>
150976         Update from GNU gettext.
150977         * lib/printf-parse.c: Generalize to it can be compiled for wide
150978         strings.
150979         (PRINTF_PARSE, CHAR_T, DIRECTIVE, DIRECTIVES): New macros.
150980         * lib/vasnprintf.c: Generalize to it can be compiled for wide strings.
150981         (VASNPRINTF, CHAR_T, DIRECTIVE, DIRECTIVES, PRINTF_PARSE, USE_SNPRINTF,
150982         SNPRINTF): New macros.
150983         Don't include <alloca.h> if the file is used inside libintl.
150984         (local_wcslen): New function, for Solaris 2.5.1.
150985         (VASNPRINTF): Use it instead of wcslen.
150987 2003-11-16  Bruno Haible  <bruno@clisp.org>
150989         * lib/xsize.h (xmax): New function.
150990         (xsum, xsum3, xsum4): Declare as "pure" functions.
150992 2003-11-12  Paul Eggert  <eggert@twinsun.com>
150994         * modules/xalloc (Files): Undo latest change, since xalloc.h
150995         no longer needs SIZE_MAX or PTRDIFF_MAX.
150997 2003-11-12  Paul Eggert  <eggert@twinsun.com>
150999         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Do not require gl_SIZE_MAX or
151000         gl_PTRDIFF_MAX.
151002 2003-11-12  Paul Eggert  <eggert@twinsun.com>
151004         * lib/xstrtol.c (__xstrtol): Remove "break" immediately after
151005         "return", to pacify some unknown compiler.  Problem reported
151006         by Joerg Schilling.
151008 2003-11-12  Paul Eggert  <eggert@twinsun.com>
151010         * lib/xalloc.h: Do not include <limits.h> or <stdint.h>.
151011         (xalloc_oversized): Use sizeof (ptrdiff_t) and sizeof (size_t) for
151012         the heuristic, rather than PTRDIFF_MAX and SIZE_MAX.  This
151013         heuristic is just as accurate as far as we know, and it removes a
151014         dependency on size_max.m4 and ptrdiff_max.m4.
151016 2003-11-11  Bruno Haible  <bruno@clisp.org>
151018         * modules/xsize (Files): Add m4/size_max.m4.
151019         * modules/xalloc (Files): Add m4/size_max.m4, m4/ptrdiff_max.m4.
151021 2003-11-11  Bruno Haible  <bruno@clisp.org>
151023         * m4/size_max.m4: New file.
151024         * m4/ptrdiff_max.m4: New file.
151025         * m4/xsize,m4 (gl_XSIZE): Require gl_SIZE_MAX.
151026         * m4/xalloc.m4 (gl_PREREQ_XALLOC): New macro.
151027         (gl_XALLOC): Invoke it.
151029 2003-11-11  Bruno Haible  <bruno@clisp.org>
151031         * lib/xsize.h (SIZE_MAX): Remove fallback definition.
151032         * lib/xalloc.h: Include limits.h. Assume SIZE_MAX and PTRDIFF_MAX are
151033         defined.
151035 2003-11-10  Paul Eggert  <eggert@twinsun.com>
151037         * lib/xalloc.h (xalloc_oversized): [! (defined PTRDIFF_MAX &&
151038         PTRDIFF_MAX < SIZE_MAX)]: Fix off-by-one error that would have
151039         rejected some allocations of exactly SIZE_MAX - 2 bytes.
151040         From Bruno Haible.
151041         [defined PTRDIFF_MAX && PTRDIFF_MAX < SIZE_MAX]: Use SIZE_MAX,
151042         not (size_t) -1, since it's defined here.
151044 2003-11-09  Karl Berry  <karl@gnu.org>
151046         * config/mkinstalldirs, depcomp, mdate-sh: update from automake.
151048 2003-11-06  Paul Eggert  <eggert@twinsun.com>
151050         * lib/xalloc.h [HAVE_STDINT_H]: Include <stdint.h>.
151051         (xalloc_oversized) [! (PTRDIFF_MAX < SIZE_MAX)]:
151052         Reject sizes of exactly SIZE_MAX bytes.
151053         * lib/xreadlink.c: Include "xalloc.h" before checking whether SIZE_MAX
151054         is defined, since "xalloc.h" now defines SIZE_MAX on modern hosts.
151056 2003-11-05  Bruno Haible  <bruno@clisp.org>
151058         * lib/xsize.h: Include limits.h, to avoid a possible collision with
151059         SIZE_MAX defined in <limits.h> on Solaris.
151061 2003-11-04  Jim Meyering  <jim@meyering.net>
151063         * modules/sysexits: Use the `$(VAR)' notation for AC_SUBST'd
151064         variable names, rather than @VAR@.
151065         * modules/poll: Likewise.
151067 2003-11-04  Bruno Haible  <bruno@clisp.org>
151069         * modules/xsize: New file.
151070         * modules/linebreak: Depend on xsize.
151071         * MODULES.html.sh (func_all_modules): Add xsize.
151073 2003-11-04  Bruno Haible  <bruno@clisp.org>
151075         * m4/xsize.m4: New file.
151077 2003-11-04  Bruno Haible  <bruno@clisp.org>
151079         * lib/xsize.h: New file.
151080         * lib/linebreak.c: Include xsize.h.
151081         (mbs_possible_linebreaks, mbs_width_linebreaks): Check malloc()
151082         argument for overflow.
151083         Suggested by Paul Eggert.
151085 2003-11-03  Karl Berry  <karl@gnu.org>
151087         * config/config.{guess,sub}: update from config.
151089 2003-11-03  Jim Meyering  <jim@meyering.net>
151091         * modules/userspec (lib_SOURCES): Add userspec.h.
151092         (Include): Add "userspec.h".
151093         Improve description.
151095 2003-11-03  Jim Meyering  <jim@meyering.net>
151097         * lib/userspec.c: Include "userspec.h".
151098         * lib/userspec.h: New file.
151100 2003-11-03  Bruno Haible  <bruno@clisp.org>
151102         * m4/wait-process.m4 (gl_WAIT_PROCESS): Also check for waitid.
151104 2003-11-03  Bruno Haible  <bruno@clisp.org>
151106         * lib/wait-process.c (wait_process): Use waitid with WNOWAIT if
151107         available, to avoid (extremely rare) race condition.
151108         Suggested by Paul Eggert.
151110 2003-11-02  Karl Berry  <karl@gnu.org>
151112         * config/srclist.txt (vasprintf.c): sync broken, sigh.
151114 2003-10-31  Paul Eggert  <eggert@twinsun.com>
151116         * lib/mountlist.h (struct mount_entry.me_type_malloced): New member.
151117         * lib/mountlist.c (SIZE_MAX): Define if not defined already.
151118         (read_filesystem_list): Set and use me_type_malloced.
151119         Use "sizeof *me" rather than "sizeof (struct mount_entry)" (or
151120         whatever the type happens to be), for brevity and consistency.
151121         Check for size calculation overflow on Alphas running OSF/1.
151123 2003-10-31  Jim Meyering  <jim@meyering.net>
151125         * lib/hash.c: Include "xalloc.h" for use of xalloc_oversized.
151127         * lib/linebuffer.c: Include <string.h> for declaration of memset.
151129 2003-10-30  Paul Eggert  <eggert@twinsun.com>
151130             Bruno Haible  <bruno@clisp.org>
151132         * lib/vasprintf.c: Include <limits.h>, <stdlib.h>.
151133         (vasprintf): Fail if the resulting length doesn't fit in an 'int'.
151135 2003-10-30  Paul Eggert  <eggert@cs.ucla.edu>
151137         * m4/host-os.m4 (UTILS_HOST_OS): Change netbsd*-gnu pattern back to
151138         netbsd*-gnu*.  Suggested by Robert Millan.
151140 2003-10-29  Paul Eggert  <eggert@twinsun.com>
151142         * modules/group-member: Depend on stdbool.
151144 2003-10-29  Paul Eggert  <eggert@twinsun.com>
151146         * m4/xalloc.m4 (gl_XALLOC): Undo previous change.
151148 2003-10-29  Paul Eggert  <eggert@twinsun.com>
151150         * m4/host-os.m4 (UTILS_HOST_OS): Resurrect netbsd*-gnu.  Add comments
151151         to it, and to knetbsd*-gnu and kfreebsd*-gnu.  Remove the '*' from
151152         after the 'gnu' in these cases.  This fixes some bugs in the
151153         previous change, and is based on suggestions by Robert Millan.
151155 2003-10-29  Paul Eggert  <eggert@twinsun.com>
151157         * lib/xalloc.h (xalloc_oversized): Now a macro, not a function,
151158         so that it works even if SIZE_MAX < N.  Do not include <stdbool.h>;
151159         no longer needed.
151160         * lib/quotearg.c (quotearg_n_options): Use it.
151161         * lib/group-member.c: Include <stdbool.h>.
151162         (free_group_info): Arg is now const *; don't free arg.
151163         (get_group_info): Now returns bool and accepts struct group_info *,
151164         rather than returning a malloc'ed struct group_info *.
151165         All uses changed.  Check for overflow in internal size calculation.
151167         * lib/getusershell.c (readname): Simplify the code by using x2nrealloc
151168         rather than xmalloc/xrealloc.
151169         * lib/linebuffer.c (initbuffer, readlinebuffer): Simplify the code by
151170         using x2realloc rather than xmalloc/xrealloc.  Also, fix a C
151171         conformance bug: the old code used a pointer after freeing the
151172         storage that it addressed.
151173         * lib/hash.c (hash_initialize): Simplify the code by using
151174         xalloc_oversized rather than doing it by hand.
151175         * lib/getgroups.c (getgroups): Don't use xrealloc, since we don't need
151176         the buffer preserved.  Use free and xmalloc instead.
151177         * lib/quotearg.c (quotearg_n_options): Likewise.
151178         Use a simpler test for size overflow.  Don't use xalloc_oversized
151179         because unsigned int might be wider than size_t (!); this suggests
151180         that we should switch from unsigned int to size_t for slot numbers.
151182 2003-10-28  Paul Eggert  <eggert@twinsun.com>
151184         * m4/host-os.m4 (UTILS_HOST_OS): Identify GNU/KFreeBSD and
151185         GNU/KNetBSD.  These implementations use glibc atop the FreeBSD and
151186         NetBSD kernels.  Requested by Richard Stallman.
151188 2003-10-27  Paul Eggert  <eggert@twinsun.com>
151190         * lib/exclude.c (new_exclude): Use xzalloc rather than xmalloc
151191         to allocate the returned structure.  Do not allocate a subarray,
151192         as x2nrealloc will do that.
151193         (add_exclude): Use x2nrealloc to reallocate ex->exclude,
151194         instead of xnrealloc.
151195         (add_exclude_file): Use x2realloc instead of malloc + xnrealloc.
151197 2003-10-27  Bruno Haible  <bruno@clisp.org>
151199         * lib/stdbool_.h: Better support for BeOS.
151201 2003-10-26  Paul Eggert  <eggert@twinsun.com>
151203         * m4/xalloc.m4 (gl_XALLOC): Requore AC_C_INLINE, since xalloc.h
151204         now uses inline.
151206 2003-10-26  Paul Eggert  <eggert@twinsun.com>
151208         * lib/xalloc.h (xalloc_oversized): New static inline function, for
151209         callers that want to do their own size-overflow checking.  Include
151210         <stdbool.h>, since xalloc_oversized returns bool.
151211         * lib/xalloc.c (array_size_overflow): Remove.  All callers changed
151212         to use xalloc_oversized.
151214         Add two functions x2realloc, x2nrealloc, for programs that grow
151215         arrays dynamically by doubling their sizes.
151216         * lib/xalloc.h (x2realloc, x2nrealloc): New decls.
151217         * lib/xmalloc.c (x2nrealloc_inline, x2nrealloc, x2realloc):
151218         New functions.
151220         Port to C99 semantics for 'inline' of external functions.
151221         Bug reported by Bruno Haible.
151222         * lib/xmalloc.c (xnmalloc_inline): New static inline function,
151223         with the old contents of xnmalloc.
151224         (xnmalloc, xmalloc): Use it.
151225         (xnrealloc_inline): New static inline function,
151226         with the old contents of xnrealloc.
151227         (xnrealloc, xrealloc): Use it.
151229         * lib/alloc.c (alloca): xmalloc cannot return NULL, so don't test for
151230         that.
151232 2003-10-26  Karl Berry  <karl@gnu.org>
151234         * config/srclist.txt (COPYING.DOC): no longer available from
151235         /gd/gnuorg; don't know where the ultimate source is.
151237 2003-10-25  Paul Eggert  <eggert@twinsun.com>
151239         Fix several address-calculation bugs in the hash modules,
151240         plus some minor code cleanup.
151242         * lib/hash.h: Include <stdbool.h>, for bool.
151243         * lib/hash.c: Don't include <stdbool.h>, since hash.h does it now.
151244         * lib/hash.h (Hash_hasher, hash_get_n_buckets, hash_get_n_buckets_used,
151245         hash_get_n_entries, hash_get_max_bucket_length,
151246         hash_get_entries, hash_do_for_each, hash_string, hash_initialize,
151247         hash_rehash): Use size_t rather than unsigned.
151248         * lib/hash.c (struct hash_table, hash_get_n_buckets,
151249         hash_get_n_buckets_used, hash_get_n_entries,
151250         hash_get_max_bucket_length, hash_table_ok, hash_print_statistics,
151251         hash_get_entries, hash_do_for_each, hash_string, is_prime,
151252         next_prime, hash_initialize, hash_rehash, hash_delete, hash_print):
151253         Likewise.
151254         (SIZE_MAX): Define if not defined.
151255         (hash_get_max_bucket_length, hash_table_ok, hash_lookup,
151256         hash_get_first, hash_get_next, hash_get_entries, hash_do_for_each,
151257         hash_print):
151258         Use const * when possible.
151259         (hash_string): Use (unsigned char) *P rather than *(unsigned char *) P.
151260         (check_tuning): Fix bug: if tuning parameters were very close to
151261         0 or 1, rounding errors could have caused subscript violations.
151262         (hash_initialize, allocate_entry, hash_print): Remove unnecessary cast.
151263         (hash_initialize): Add 'fail:' label
151264         to free table and return NULL, and use it to simplify code.
151265         Use calloc rather than clearing the storage ourself.
151266         (hash_initialize, hash_rehash): Check for arithmetic overflow in
151267         buffer size calculations.
151268         * lib/hash-pjw.h (hash_pjw): Use size_t, not unsigned.
151269         Include <stddef.h>, for size_t.
151270         * lib/hash-pjw.c (hash_pjw): Likewise.
151271         Switch to method described by Bruno Haible.
151272         Include <limits.h>, for CHAR_BIT.
151273         (SIZE_BITS): New macro.
151275 2003-10-23  Paul Eggert  <eggert@twinsun.com>
151277         * m4/getline.m4 (AM_FUNC_GETLINE):
151278         Don't include getndelim2.o twice into LIBOBJS; this breaks on some
151279         hosts.  Problem reported by Derek Robert Price in
151280         <http://mail.gnu.org/r/bug-gnulib/2003-10/msg00092.html>.
151281         This patch can be withdrawn after Autoconf 2.58 is required for gnulib.
151282         * m4/getndelim2.m4 (gl_GETNDELIM2): Likewise.
151284 2003-10-21  Paul Eggert  <eggert@twinsun.com>
151286         * lib/getndelim2.c (getndelim2): When size calculation overflows,
151287         ceiling the allocation at NMAX bytes rather than silently
151288         discarding input bytes before NMAX is reached.  This makes
151289         a difference only if NMAX exceeds SIZE_MAX / 2.
151291         * lib/obstack.c: Merge from glibc.
151292         [defined _LIBC]: Include <obstack.h>, not "obstack.h".
151293         Add libc_hidden_def (_obstack_newchunk).
151294         (_obstack_free) [! defined _LIBC]: Remove.
151295         [defined _LIBC]: Make a strong alias from obstack_free, rather than
151296         a clone of the function body.
151297         (fputs) [defined _LIBC && defined USE_IN_LIBIO]: Remove.
151298         [defined _LIBC && !defined USE_IN_LIBIO]: Include <libio/iolibio.h>.
151300         * lib/obstack.h: Indenting cleanup, to make it easier to merge with
151301         glibc.
151302         (obstack_grow, obstack_grow0): Remove unnecessary parentheses around
151303         arg to memcpy.
151305         * lib/obstack.h (obstack_1grow_fast): Properly parenthesize arg.
151306         (obstack_ptr_grow_fast, obstack_int_grow_fast):
151307         Don't use lvalue casts, as GCC plans to remove support for them
151308         in GCC 3.5.  Reported by Joseph S. Myers.  This bug
151309         was also present in the non-GCC version, indicating that this
151310         code had always been buggy and had never been widely used.
151311         (obstack_1grow, obstack_ptr_grow, obstack_int_grow, obstack_blank):
151312         Use the fast variant of each macro, rather than copying the
151313         definiens of the fast variant; that way, we'll be more likely to
151314         catch future bugs in the fast variants.
151316 2003-10-20  Bruno Haible  <bruno@clisp.org>
151318         * modules/wait-process: New file.
151319         * MODULES.html.sh (func_all_modules): Add wait-process.
151321 2003-10-20  Bruno Haible  <bruno@clisp.org>
151323         * m4/wait-process.m4: New file.
151325 2003-10-20  Bruno Haible  <bruno@clisp.org>
151327         * lib/wait-process.h: New file, from GNU gettext.
151328         * lib/wait-process.c: New file, from GNU gettext.
151330 2003-10-19  Jim Meyering  <jim@meyering.net>
151332         * lib/vasnprintf.c (vasnprintf): Work around losing snprintf on
151333         HPUX 10.20.
151335 2003-10-18  Karl Berry  <karl@gnu.org>
151337         * config/config.guess: update from config.
151339 2003-10-16  Paul Eggert  <eggert@twinsun.com>
151341         * lib/getgroups.c: Include <errno.h>, <stdlib.h>.
151342         (getgroups): First arg is int, not size_t.
151343         Don't let 'free' mangle errno.
151345 2003-10-16  Paul Eggert  <eggert@twinsun.com>
151347         * README: Mention that gnulib assumes that (foo *) NULL + 0 == NULL.
151349 2003-10-16  Karl Berry  <karl@gnu.org>
151351         * config/config.{guess,sub}: update from config.
151353 2003-10-16  Jim Meyering  <jim@meyering.net>
151355         * lib/xmalloc.c: Include <string.h>, for declarations of memset and
151356         memcpy.
151358 2003-10-15  Paul Eggert  <eggert@twinsun.com>
151360         * lib/exclude.c: Do not include <inttypes.h> or <stdint.h>.
151361         (SIZE_MAX): Remove.
151362         (new_exclude, add_exclude_file): Initial size no longer needs to
151363         be a power of 2.
151364         (add_exclude, add_exclude_file): Use xnrealloc instead of rolling
151365         our own address arithmetic overflow checking.
151367         * lib/fnmatch.c (SIZE_MAX): Define if standard headers don't.
151368         (fnmatch): Do not alloca more than 2000 wide characters;
151369         instead, use malloc for large buffers.
151370         Check for address arithmetic overflow, and return -1
151371         with errno set to ENOMEM in that case.
151372         * lib/fnmatch_loop.c (ALLOCA_LIMIT): New macro.
151373         (NEW_PATTERN): Do not alloca more than 8000 bytes;
151374         instead, return -1.  Check for address arithmetic overflow.
151376 2003-10-14  Paul Eggert  <eggert@twinsun.com>
151378         Handle invalid suffixes and overflow independently, so that
151379         callers can treat them independently as needed.  Fix some bugs in
151380         suffix handling, e.g., "100k@" was not diagnosed as an invalid
151381         suffix for a human-readable blocksize.  The major caller-visible
151382         change is the addition of a new
151383         LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW enum value, indicating
151384         that both overflow and suffix chars were found.
151386         * lib/human.c (humblock): Don't check separately for invalid suffix
151387         char; that is xstrtoumax's job (now that its bug is fixed).
151388         * lib/xstrtoimax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [defined
151389         INTMAX_MAX]: New macros.
151390         * lib/xstrtol.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM, TYPE_MINIMUM,
151391         TYPE_MAXIMUM): New macros.
151392         (bkm_scale, bkm_scale_by_power): Return strtol_error, not int.
151393         (bkm_scale, bkm_scale_by_power, __xstrtol): Return maximal values
151394         if overflow occurs, as it's what __strtol does and it's more useful
151395         in practice.
151396         (__xstrtol): If __strtol reports some error other than ERANGE,
151397         reflect it to the caller as LONGINT_INVALID.  If it reports
151398         ERANGE, continue the rest of parsing, and report LONGINT_OVERFLOW
151399         | LONGINT_INVALID_SUFFIX_CHAR if both errors occur.
151400         * lib/xstrtol.h (LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW): New enum
151401         value.
151402         (_STRTOL_ERROR): Handle it.  Abort when given unknown error codes.
151403         * lib/xstrtoul.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM): New macros.
151404         * lib/xstrtoumax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM)
151405         [defined UINTMAX_MAX]: New macros.
151407 2003-10-14  Bruno Haible  <bruno@clisp.org>
151409         * modules/fatal-signal: Add m4/sig_atomic_t.m4 to file list.
151411 2003-10-14  Bruno Haible  <bruno@clisp.org>
151413         * m4/sig_atomic_t: New file, from GNU gettext.
151414         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Require gt_TYPE_SIG_ATOMIC_T.
151416 2003-10-14  Bruno Haible  <bruno@clisp.org>
151418         * lib/fatal-signal.h: Improved comments. Suggested by Paul Eggert.
151419         * lib/fatal-signal.c: Use sig_atomic_t. Suggested by Paul Eggert.
151420         Also use volatile where needed.
151422 2003-10-12  Paul Eggert  <eggert@twinsun.com>
151424         * modules/xalloc: Do not depend on 'exit'.  Depend on 'stdbool'.
151425         Change maintainer from Bruno Haible to 'all'.
151427 2003-10-12  Paul Eggert  <eggert@twinsun.com>
151429         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Require AC_C_INLINE.
151431 2003-10-12  Paul Eggert  <eggert@twinsun.com>
151433         * lib/xalloc.h (xnmalloc, xzalloc, xnrealloc, xclone): New decls.
151434         (XMALLOC, XCALLOC, XREALLOC, XFREE, CCLONE, CLONE): Deprecate,
151435         and define in terms of the other primitives.
151436         * lib/xmalloc.c: Include stdbool.h; do not include exit.h.
151437         (SIZE_MAX): Define if not already defined.
151438         (array_size_overflow): New function.
151439         (xalloc_die): Abort instead of exiting if 'error' returns.
151440         (xnmalloc, xnrealloc, xzalloc, xclone): New functions.
151441         (xmalloc, xrealloc): Use them.
151442         (xcalloc): Check for address arithmetic overflow.
151443         * lib/xstrdup.c (xstrdup): Use xclone, since memcpy should be
151444         a bit faster than strcpy.
151446 2003-10-10  Simon Josefsson  <jas@extundo.com>
151448         * modules/argp (Depends-on): Add restrict and strcase.
151450 2003-10-10  Simon Josefsson  <jas@extundo.com>
151452         * m4/argp.m4: Add AC_C_INLINE.
151454 2003-10-08  Paul Eggert  <eggert@twinsun.com>
151456         Merge getpass from libc, plus a few fixes.
151458         * lib/getpass.c (HAVE_STDIO_EXT) [_LIBC]: Define to 1.
151459         Include <stdbool.h>.
151460         Include <stdio_ext.h> if HAVE_STDIO_H, otherwise define
151461         __fsetlocking to empty.
151462         [_LIBC]: Do not include "getline.h" or "unlocked-io.h", but
151463         do include <bits/libc-lock.h>.
151464         Do not include <fcntl.h>; not needed.
151465         [_LIBC]: Include <wchar.h>.
151466         (NOTCANCEL_MODE): New macro.
151467         (flockfile, funlockfile) [_LIBC]: New macros.
151468         (__libc_cleanup_push, __libc_cleanup_pop, __getline, __tcgetattr)
151469         [!_LIBC]: New macros.
151470         (call_fclose): New function.
151471         (getpass): Use it.  Save tty stream separately; this simplifies the
151472         code and makes it more reliable if stdin happens to equal stdout.
151473         Invoke __fsetlocking on tty.
151474         Handle thread cancellation if needed.
151475         Namespace cleanup (use __tcgetattr, __getline).
151476         Use bool for Booleans.
151477         [USE_IN_LIBIO]: Handle wide streams.
151478         [!_LIBC]: Unconditionally do the fseek, since we don't know what
151479         stream might go where.
151481         * lib/unlocked-io.h: Include <stdio.h>, so that the caller
151482         doesn't have to include <stdio.h> before us.
151483         (clearerr_unlocked, feof_unlocked, ferror_unlocked,
151484         fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked,
151485         fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
151486         putc_unlocked, putchar_unlocked): Define to the unlocked counterpart
151487         if not declared, so that we can use getpass.c code from libc without
151488         rewriting it.
151489         (flockfile, ftrylockfile, funlockfile): New macros.
151491 2003-10-08  Paul Eggert  <eggert@twinsun.com>
151493         * modules/getpass: Depend on stdbool.
151495 2003-10-08  Paul Eggert  <eggert@twinsun.com>
151497         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for stdio_ext.h.
151499 2003-10-07  Karl Berry  <karl@gnu.org>
151501         * config/config.{guess,sub}: update from config.
151503 2003-10-06  Jim Meyering  <jim@meyering.net>
151504             Bruno Haible  <bruno@clisp.org>
151506         This lets translators provide better translations for the
151507         "Written by ..." part of --version output.
151508         * lib/version-etc.h: Include stdarg.h.
151509         (version_etc_copyright): Declare as readonly.
151510         (version_etc): Make this function variadic with a NULL-terminated list
151511         of author name strings.
151512         (version_etc_va): New declaration.
151513         * lib/version-etc.c: Include stdarg.h, stdlib.h.
151514         (version_etc_copyright): Declare as readonly.
151515         (version_etc_va): New function. Provide a different translatable string
151516         for each possible number of authors < 10. Abbreviate when there are 10
151517         authors or more.
151518         (version_etc): Make this function variadic. Call version_etc_va.
151519         Suggestion from Gary V. Vaughan.
151521         * lib/long-options.h (parse_long_options): Change prototype: the
151522         authors string is moved to the end and becomes variadic.
151523         * lib/long-options.c: Include stdarg.h.
151524         (parse_long_options): Make this function variadic, too.
151525         Call version_etc_va, not version_etc.
151527 2003-10-06  Bruno Haible  <bruno@clisp.org>
151529         * modules/version-etc-2: Remove file.
151530         * MODULES.html.sh (func_all_modules): Remove version-etc-2.
151532 2003-10-06  Bruno Haible  <bruno@clisp.org>
151534         * modules/fatal-signal: New file.
151535         * MODULES.html.sh (func_all_modules): Add fatal-signal.
151537 2003-10-06  Bruno Haible  <bruno@clisp.org>
151539         * m4/fatal-signal.m4: New file.
151540         * m4/signalblocking.m4: New file, from GNU gettext.
151542 2003-10-06  Bruno Haible  <bruno@clisp.org>
151544         * lib/version-etc-2.h: Remove file.
151545         * lib/version-etc-2.c: Remove file.
151547 2003-10-06  Bruno Haible  <bruno@clisp.org>
151549         * lib/fatal-signal.h: New file, from GNU gettext.
151550         * lib/fatal-signal.c: New file, from GNU gettext.
151552 2003-10-05  Paul Eggert  <eggert@twinsun.com>
151554         * README: Rework advice for preventing empty .o files.
151555         Don't recommend ELIDE constructs.  Recommend <stddef.h>,
151556         not <sys/types.h>.
151558 2003-10-04  Karl Berry  <karl@gnu.org>
151560         * lib/argp*: update from libc.
151562 2003-10-04  Karl Berry  <karl@gnu.org>
151564         * config/config.{guess,sub}: update from config.
151566 2003-10-02  Bruno Haible  <bruno@clisp.org>
151568         * modules/lchown (Include): Add lchown.h.
151569         * modules/time_r (Include): Use "..." syntax.
151570         * modules/xgetdomainname (Include): Add xgetdomainname.h.
151572 2003-10-01  Simon Josefsson  <jas@extundo.com>
151574         * MODULES.html.sh (func_all_modules): Move gethostname from section
151575         'based on' to section 'lacking' POSIX:2001.
151577 2003-10-01  Larry Jones  <lawrence.jones@eds.com>
151579         * lib/getpass.c (getpass): Use a no-op fseek when switching from input
151580         to output mode on the same stream.
151582 2003-09-29  Paul Eggert  <eggert@twinsun.com>
151584         * lib/strftime.c (tm_diff) [! HAVE_TM_GMTOFF]:
151585         Fix arg typo in previous patch.
151587 2003-09-28  Jim Meyering  <jim@meyering.net>
151589         * lib/error.c: Correct cpp indentation.
151591 2003-09-27  Paul Eggert  <eggert@twinsun.com>
151593         * modules/free: New file.
151595 2003-09-27  Paul Eggert  <eggert@twinsun.com>
151597         * m4/free.m4: New file.
151599 2003-09-27  Paul Eggert  <eggert@twinsun.com>
151601         * lib/minmax.h (MIN, MAX)
151602         [__STDC__ && defined __GNUC__ && __GNUC__ >= 2]:
151603         Omit the special code that used __typeof__, since we worry that
151604         it could be more trouble than it's worth.  See:
151605         http://mail.gnu.org/r/bug-gnulib/2003-01/msg00090.html
151606         http://mail.gnu.org/r/bug-gnulib/2003-01/msg00095.html
151608         * lib/free.c: New file.
151610 2003-09-27  Oskar Liljeblad  <oskar@osk.mine.nu>
151612         Trivial fixes to Makefile.am parts of module listings.
151613         * modules/strstr: Append strstr.h to lib_SOURCES.
151614         * modules/strcase: Likewise, for strcase.h.
151616 2003-09-27  Karl Berry  <karl@gnu.org>
151618         * config/mkinstalldirs: update from automake.
151620 2003-09-26  Paul Eggert  <eggert@twinsun.com>
151622         * lib/error.c (SIZE_MAX) [!defined SIZE_MAX]: Define.
151623         (error_tail): Do not loop, reallocating temporary buffer, since
151624         the output cannot contain more wide characters than the input
151625         contains bytes, the size must be big enough already.  This avoids
151626         one potential size overflow calculation.  Check for size overflow
151627         when calculating temporary buffer size.  Free temporary buffer
151628         when done, if it was allocated with malloc; this plugs a memory
151629         leak.  Remove casts from void * to pointers, that are no longer
151630         needed now that we're assuming C89 or better.
151632         Merge error changes from glibc.
151634         * lib/error.c, error.h: Update copyright notice header to match glibc.
151635         * lib/error.c [defined _LIBC]: Include <errno.h>, <bits/libc-lock.h>.
151636         (error, error_at_line) [defined _LIBC && defined __libc_ptf_call]:
151637         Disable cancellation while printing error.
151638         * lib/error.h: Prepend __ to parameter names.
151640 2003-09-26  Jim Meyering  <jim@meyering.net>
151642         * lib/error.c (error_tail): Move some declarations
151643         into inner scope where the local variables are used.
151645 2003-09-26  Bruno Haible  <bruno@clisp.org>
151647         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Add comments about the AIX
151648         stpncpy().
151649         Don't define stpncpy through config.h; it's now done through stpncpy.h.
151651 2003-09-26  Bruno Haible  <bruno@clisp.org>
151653         * lib/stpncpy.h (gnu_stpncpy): New declaration.
151654         (stpncpy): Define as alias for gnu_stpncpy.
151655         * lib/stpncpy.c [!_LIBC]: Define gnu_stpncpy, not stpncpy.
151657 2003-09-25  Simon Josefsson  <jas@extundo.com>
151659         * lib/xgetdomainname.h: New file.
151660         * lib/xgetdomainname.c: New file.
151662 2003-09-25  Simon Josefsson  <jas@extundo.com>
151663             Bruno Haible  <bruno@clisp.org>
151665         * modules/getdomainname: New file.
151666         * modules/xgetdomainname: New file.
151667         * MODULES.html.sh (func_all_modules): Add getdomainname,
151668         xgetdomainname.
151670 2003-09-25  Simon Josefsson  <jas@extundo.com>
151671             Bruno Haible  <bruno@clisp.org>
151673         * m4/getdomainname.m4: New file.
151675 2003-09-25  Simon Josefsson  <jas@extundo.com>
151676             Bruno Haible  <bruno@clisp.org>
151678         * lib/getdomainname.h: New file.
151679         * lib/getdomainname.c: New file.
151681 2003-09-25  Karl Berry  <karl@gnu.org>
151683         * lib/argp-fmtstream.c, argp-help.c: update from libc.
151685 2003-09-25  Karl Berry  <karl@gnu.org>
151687         * config/install-sh: update from automake.
151689 2003-09-25  Bruno Haible  <bruno@clisp.org>
151691         * modules/version-etc-2: New file, from modules/version-etc with
151692         modifications.
151693         * MODULES.html.sh (func_all_modules): Add version-etc-2.
151695 2003-09-25  Bruno Haible  <bruno@clisp.org>
151697         * lib/version-etc-2.h: New file, from version-etc.h with modifications.
151698         * lib/version-etc-2.c: New file, from version-etc.c with modifications.
151700 2003-09-24  Simon Josefsson  <jas@extundo.com>
151702         * modules/xgethostname: Add xgethostname.h.
151704 2003-09-24  Paul Eggert  <eggert@twinsun.com>
151706         * lib/linebuffer.c (freebuffer): Don't free the argument, just
151707         the buffer associated with the argument.  Bug reported by
151708         Simon Josefsson.
151710 2003-09-24  Paul Eggert  <eggert@twinsun.com>
151712         * README: Document assumptions that 'int' is at least 32 bits
151713         wide, that integer arithmetic is 2's complement without overflow,
151714         that there are no holes in integer values, that adding sizes of
151715         two nonoverlapping objects can't overflow, and that all-bits-zero
151716         yields scalar zero.  Fix spelling and capitalization typos.
151718 2003-09-19  Karl Berry  <karl@gnu.org>
151720         * lib/argp.h: update from libc.
151722 2003-09-17  Paul Eggert  <eggert@twinsun.com>
151724         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Call AC_BEFORE first,
151725         to avoid spurious warnings like "AC_RUN_IFELSE was called before
151726         gl_USE_SYSTEM_EXTENSIONS" from autoreconf.
151728 2003-09-17  Paul Eggert  <eggert@twinsun.com>
151730         * gnulib-tool: Use "test -h", not "test -L", for portability
151731         to Solaris 8 /bin/sh.  (This bug is fixed in Solaris 9.)
151732         (tags_regexp): Remove, since \| doesn't conform to POSIX.
151733         (sed_extract_prog): Issue s commands one-by-one, rather than
151734         using \| in one s command.
151736 2003-09-16  Paul Eggert  <eggert@twinsun.com>
151738         * lib/linebuffer.c (readlinebuffer): Return NULL immediately upon
151739         input error, instead of returning NULL the next time we are called
151740         (and therefore losing track of errno).
151742 2003-09-16  Bruno Haible  <bruno@clisp.org>
151744         * gnulib-tool (func_create_testdir): Warn about duplicated
151745         dependencies.
151747 2003-09-15  Paul Eggert  <eggert@twinsun.com>
151749         * modules/argmatch, modules/fatal, modules/obstack,
151750         modules/xalloc, modules/xgethostname: Sort dependencies by
151751         importance, not alphabetically.
151753 2003-09-15  Paul Eggert  <eggert@twinsun.com>
151755         * lib/getndelim2.c (getndelim2): Don't trash errno when a read
151756         fails, so that the caller gets the proper errno.
151758         * lib/readutmp.c (read_utmp): Likewise.
151759         Check for fstat error.  Close stream and free storage
151760         when failing.
151762 2003-09-14  Karl Berry  <karl@gnu.org>
151764         * config/srclist.txt (strdup.c): disable for c89 changes.
151766 2003-09-14  Jim Meyering  <jim@meyering.net>
151768         * lib/getloadavg.c: Correct cpp indentation.
151769         * lib/strdup.c: Likewise.
151770         * lib/vasnprintf.c: Likewise.
151772 2003-09-14  Bruno Haible  <bruno@clisp.org>
151774         * modules/fwriteerror: New file.
151775         * MODULES.html.sh (func_all_modules): Add fwriteerror.
151777 2003-09-14  Bruno Haible  <bruno@clisp.org>
151779         * lib/fwriteerror.h: New file.
151780         * lib/fwriteerror.c: New file.
151782 2003-09-12  Paul Eggert  <eggert@twinsun.com>
151784         * modules/argmatch, modules/exitfail, modules/fatal, modules/obstack,
151785         modules/xgethostname, modules/xalloc: Depend on exit.
151787 2003-09-12  Paul Eggert  <eggert@twinsun.com>
151789         * m4/error.m4: Require AC_FUNC_STRERROR_R rather than invoking it.
151791         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Require AC_AIX
151792         and AC_MINIX, too, so that their extensions are available.
151794         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Remove.  All uses removed.
151795         This macro has been superseded by gl_BACKUPFILE.
151797         More patches to assume C89 or better.
151799         * m4/error.m4 (gl_ERROR): Don't check for vprintf.
151801         * m4/check-decl.m4 (jm_CHECK_DECLS): Include <string.h>, <stdlib.h>
151802         unconditionally.
151803         * m4/closeout.m4 (gl_CLOSEOUT): Don't check for stdlib.h.
151804         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER):
151805         Include <string.h>, <stdlib.h> unconditionally.
151806         * m4/lstat.m4 (gl_PREREQ_LSTAT): Don't check for stdlib.h, free.
151807         * m4/readdir.m4 (GL_FUNC_READDIR): Don't check for string.h.
151808         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Don't check for standard C
151809         headers or for string.h.
151810         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Don't check for stdlib.h
151811         or strtoul.
151813         * m4/mkstemp.m4 (jm_PREREQ_TEMPNAME): Do not require standard C
151814         headers.
151815         * m4/strdup.m4 (gl_PREREQ_STRDUP): Likewise.
151816         * m4/userspec.m4 (gl_USERSPEC): Likewise.
151817         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Likewise.
151818         * m4/xstrtod.m4 (gl_XSTRTOD): Likewise.
151819         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
151820         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't check for limits.h,
151821         memcpy, memset.
151822         (jm_FUNC_GNU_STRFTIME): Don't require standard C headers.
151823         * m4/strtod.m4 (gl_FUNC_STRTOD): Do not check for float.h.
151824         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Do not check for stdlib.h,
151825         strtol.
151826         * m4/strtol.m4 (gl_FUNC_STRTOL): Do not check for limits.h.
151827         * m4/userspec.m4 (gl_USERSPEC): Do not check for string.h.
151828         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Do not check for string.h, strtol,
151829         strtoul.
151831 2003-09-12  Paul Eggert  <eggert@twinsun.com>
151833         * lib/argmatch.c, fatal.c, xgethostname.c, xmalloc.c: Include exit.h.
151834         * lib/obstack.c [!defined _LIBC]: Likewise.
151835         * lib/argmatch.c (EXIT_FAILURE): Remove; now done by exit.h
151836         * lib/exitfail.c, fatal.c, xgethostname.c, xmalloc.c: Likewise.
151837         * lib/exitfail.c: Don't include stdlib.h; no longer needed.
151839         More changes to assume C89 or better.
151841         * lib/error.c (error_tail): Assume vprintf.
151843         * lib/argmatch.c (getenv): Remove decl.
151844         * lib/progreloc.c (get_full_program_name): Define via prototype.
151845         * lib/setenv.c (clearenv): Likewise.
151846         * lib/stpncpy.c: Do not include <string.h> or <sys/types.h>; not
151847         needed.
151848         * lib/strdup.c: Include <stdlib.h>, <string.h> unconditionally.
151849         (malloc, memcpy): Remove decls.
151850         * lib/strftime.c (HAVE_LIMITS_H, STDC_HEADERS) [defined _LIBC]: Remove.
151851         (HAVE_MEMCPY) [defined emacs && !defined HAVE_BCOPY]: Remove.
151852         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
151853         (memcpy): Remove macro.
151854         (MEMCPY) [!defined COMPILE_WIDE]: Define to memcpy unconditionally.
151855         (__P): Remove.  All uses removed.
151856         (PTR): Remove.  All uses changed to void *.
151857         (CHAR_BIT, NULL): Remove.
151858         (spaces, zeros, memset_space, memset_zero)
151859         [!defined memset && !defined HAVE_MEMSET && !defined _LIBC]:
151860         Remove.
151861         (LOCALE_PARAM, LOCALE_PARAM_DECL): Remove.
151862         (memcpy_lowcase, memcpy_uppcase, tm_diff, iso_week_days):
151863         Define with prototype.
151864         Remove now-unnecessary prototype decl.
151865         (extra_args_spec): Assume ANSI C.  All uses changed.
151866         (extra_args_spec_iso): Remove.
151867         (my_strftime, emacs_strftimeu): Define via prototype.
151868         * lib/strtod.c: Include <float.h>, <stdlib.h>, <string.h>
151869         unconditionally.
151870         (DBL_MAX, DBL_MIN, HUGE_VAL, NULL): Remove decls.
151871         * lib/strtoimax.c: Include <stdlib.h> unconditionally.
151872         (strtoul, strtol): Remove decls.
151873         * lib/strtol.c (STDC_HEADERS, HAVE_LIMITS_H, NULL, ULONG_MAX,
151874         LONG_MAX): Remove.
151875         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
151876         (LOCALE_PARAM_DECL): Remove.  All uses changed to LOCALE_PARAM_PROTO.
151877         (LOCALE_PARAM_PROTO): New macro.
151878         (INTERNAL, INTERNAL1, WEAKNAME): Assume ANSI C, not K&R.
151879         (INTERNAL (strtol), strtol): Define with a prototype.
151880         (PARAMS): Remove.  All uses removed.
151881         * lib/tempname.c: Include <string.h> unconditionally.
151882         * lib/userspec.c: Include <stdlib.h>, <string.h> unconditionally.
151883         * lib/xgethostname.c (main): Define with a prototype.
151884         * lib/xmalloc.c: Include "xalloc.h" first, to check interface.
151885         Include <stdlib.h> unconditionally.
151886         (calloc, malloc, realloc, free): Remove decls.
151887         * lib/xstrtod.c: Include "xstrtod.h" first, to check interface.
151888         Include <stdlib.h> unconditionally.  Sort include file names.
151889         (strtod): Remove.
151890         (xstrtod): Define with a prototype.
151891         * lib/xstrtol.c: Include <stdlib.h>, <string.h> unconditionally.
151892         (strtol, strtoul): Remove decls.
151894 2003-09-11  Paul Eggert  <eggert@twinsun.com>
151896         More patches to assume C89 or better.
151897         * m4/strndup.m4 (gl_PREREQ_STRNDUP): Remove STDC_HEADERS check.
151898         * m4/strnlen.m4 (gl_PREREQ_STRNLEN): Don't check for memory.h,
151899         string.h, memchr, STDC_HEADERS.
151901 2003-09-11  Paul Eggert  <eggert@twinsun.com>
151903         * lib/strndup.c: Don't include <stdio.h>, <sys/types.h>.
151904         Include <stdlib.h>, <string.h> unconditionally.
151905         Remove now-unnecessary cast to char *.
151906         * lib/strnlen.c: Include <string.h> unconditionally.
151907         * lib/yesno.c (yesno): Define with a prototype.
151909 2003-09-11  Bruno Haible  <bruno@clisp.org>
151911         * config/srclist.txt (setenv.c, unsetenv.c): Disable for the moment.
151913 2003-09-10  Jim Meyering  <jim@meyering.net>
151915         * lib/error.c: Correct indentation of cpp directives.
151917 2003-09-10  Bruno Haible  <bruno@clisp.org>
151919         * m4/strcspn.m4 (gl_PREREQ_STRCSPN): Remove <string.h> check.
151920         * m4/strpbrk.m4 (gl_PREREQ_STRPBRK): Remove <string.h> check.
151921         * m4/strstr.m4 (gl_PREREQ_STRSTR): Remove <string.h> check.
151922         * m4/unicodeio.m4 (gl_UNICODEIO): Remove <string.h> check.
151923         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove
151924         <stdlib.h> and <string.h> checks.
151925         * m4/xreadlink.m4 (gl_XREADLINK): Remove <stdlib.h> check.
151926         * m4/yesno.m4 (gl_YESNO): Remove <stdlib.h> check.
151928 2003-09-10  Bruno Haible  <bruno@clisp.org>
151930         * lib/strcspn.c: Include <string.h> unconditionally.
151931         * lib/strpbrk.c: Include <string.h> unconditionally.
151932         * lib/strstr.c: Include <string.h> unconditionally.
151933         * lib/unicodeio.c: Include <string.h> unconditionally.
151934         * lib/setenv.c: Include <stdlib.h> and <string.h> unconditionally.
151935         * lib/unsetenv.c: Likewise.
151936         * lib/xreadlink.c: Include <stdlib.h> unconditionally.
151937         * lib/yesno.c: Include <stdlib.h> unconditionally.
151938         (rpmatch): Add prototype.
151940 2003-09-09  Paul Eggert  <eggert@twinsun.com>
151942         More patches to assume C89 or better.
151943         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Don't check for stdlib.h.
151944         * m4/getopt.m4 (gl_GETOPT): Don't check for string.h.
151945         * m4/getugroups.m4 (gl_GETUGROUPS): Do not check for standard C headers
151946         or for string.h.
151947         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Do not check for
151948         stdlib.h.
151949         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): Do not require standard
151950         C headers.
151951         * m4/hard-locale.m4 (gl_HARD_LOCALE): Do not check for stdlib.h,
151952         string.h.
151953         * m4/hash.m4 (gl_HASH): Do not check for stdlib.h, malloc, free.
151954         * m4/human.m4 (gl_HUMAN): Do not check for stdlib.h, string.h, getenv.
151955         * m4/idcache.m4 (gl_IDCACHE): Do not check for standard C headers,
151956         or for string.h.
151957         * m4/long-options.m4 (gl_LONG_OPTIONS): Do not check for stdlib.h.
151958         * m4/makepath.m4 (gl_MAKEPATH): Do not check for string.h or standard
151959         C headers.
151960         * m4/md5.m4 (gl_MD5): Don't check for limits.h, standard C headers,
151961         memcpy.
151962         * m4/sha.m4 (gl_SHA): Don't check for standard Cheaders, memcpy.
151963         * m4/memchr.m4 (jm_PREREQ_MEMCHR): Don't check for limits.h, stdlib.h.
151964         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): Don't check for string.h.
151965         * m4/memcoll.m4 (gl_MEMCOLL): Likewise.
151966         * m4/memrchr.c (gl_PREREQ_MEMRCHR): Don't check for limits.h.
151967         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): Don't check for stdlib.h,
151968         string.h, free.
151969         * m4/mktime.m4 (gl_PREREQ_MKTIME): Don't check for standard C headers.
151970         * m4/modechange.m4 (gl_MODECHANGE): Don't check for standard C headers.
151971         * m4/mountlist.m4 (gl_PREREQ_MOUNTLIST_EXTRA): Don't check for standard
151972         C headers, or for string.h.
151973         * m4/obstack.m4 (gl_OBSTACK): Don't check for stddefe.h, string.h.
151974         (gl_PREREQ_OBSTACK): Don't check for stdlib.h.
151975         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't check for standard C
151976         headers, memory.h, stdlib.h, string.h, strings.h.
151977         * m4/posixtm.m4 (gl_POSIXTM): Don't check for stdlib.h, string.h.
151978         * m4/posixver.m4 (gl_POSIXVER): Don't check for getenv.
151979         * m4/putenv.m4 (gl_PREREQ_PUTENV): Don't check for string.h, memcpy,
151980         strchr.
151981         * m4/readtokens.m4 (gl_READTOKENS): Don't check for standard C
151982         headers, memory.h, string.h.
151983         * m4/regex.m4 (jm_PREREQ_REGEX): Do not check for limits.h, string.h.
151984         * m4/rename.m4 (gl_PREREQ_RENAME): Do not check for stdlib.h, string.h,
151985         free.
151986         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Don't check for standard C
151987         headers.
151988         * m4/same.m4 (gl_SAME): Don't check for stdlib.h, string.h, free.
151989         * m4/save-cwd.m4 (gl_SAVE_CWD): Don't check for standard C headers.
151990         * m4/savedir.m4 (gl_SAVEDIR): Don't check for standard C headers.
151991         * m4/strchrnul.m4 (gl_PREREQ_STRCHRNUL): Don't check for string.h.
151992         * m4/xgetcwd.m4 (gl_XGETCWD): Don't check for stdlib.h.
151994 2003-09-09  Paul Eggert  <eggert@twinsun.com>
151996         More K&R removal.
151998         * lib/acosl.c (main): Use a prototype.
151999         * lib/asinl.c, cosl.c, expl.c, frexpl.c, ldexpl.c, sinl.c,
152000         tanl.c: Likewise.
152002         * lib/getloadavg.c (getloadavg, main): Define via prototypes.
152004         * lib/getopt.h (struct option.name): Assume C89, and use 'const'.
152005         (getopt, etopt_long, getopt_long_only, _getopt_internal)
152006         [defined __GNU_LIBRARY__]: Assume C89, so we can always declare
152007         with a prototype.
152008         * lib/getopt.c (const): Remove macro.
152009         Include <string.h> unconditionally.
152010         (my_index): Remove; all uses changed to strchr.
152011         (strlen): Remove decl.
152012         (exchange): Remove forward decl; no longer needed.
152013         (exchange, _getopt_initialize, _getopt_internal, getopt, main):
152014         Define with prototype.
152015         * lib/getopt1.c (const): Remove macro.
152016         (getopt_long, getopt_long_only, main): Define with prototype.
152018         * lib/getugroups.c: Include <string.h> unconditionally.
152020         * lib/getusershell.c: Include <stdlib.h> unconditionally.
152021         (getusershell, setusershell, endusershell, readname, main):
152022         Define with prototypes.
152024         * lib/group-member.c: Include group-member.h first.
152025         Include <stdlib.h> unconditionally.
152027         * lib/hard-locale.c: Include hard-locale.h first.
152028         Include <stdlib.h>, <string.h> unconditionally.
152030         * lib/hash.c (free, malloc): Remove decls.
152031         Include <stdlib.h> unconditionally.
152033         * lib/human.c: Include <stdlib.h>, <string.h> unconditionally.
152034         (getenv): Do not declare.
152036         * lib/idcache.c: Include <string.h> unconditionally.
152038         * lib/long-options.c: Include long-options.h first, to test interface.
152039         Include <stdlib.h> unconditionally.
152041         * lib/makepath.c: Include makepath.h first, to test interface.
152042         Include <stdlib.h> and <string.h> unconditionally.
152044         * lib/linebuffer.c: Include <stdlib.h>.
152045         (free): Remove decl.
152047         * lib/malloc.c: Include <stdlib.h>, for malloc; don't bother with
152048         stddef.h. rpl_malloc returns void *, not char *.
152049         * lib/realloc.c (rpl_realloc): Likewise.  Also, define with a
152050         prototype.
152052         * lib/md5.h: Include <limits.h> unconditionally.
152053         (UINT_MAX_32_BITS): Don't worry about non-__STDC__ case.
152054         (__P): Remove; all uses removed.
152055         * lib/md5.c: Include "md5.h" first.
152056         (md5_init_ctx, md5_read_ctx, md5_finish_ctx, md5_stream,
152057         md5_buffer, md5_process_bytes, md5_process_block):
152058         Define with prototypes.
152059         * lib/sha.h (__P): Remove all uses.  (It wasn't defined??)
152060         * lib/sha.c: Include "sha.h" first.
152061         Include <stdlib.h>, <string.h> unconditionally.
152063         * lib/memchr.c (__ptr_t): Remove; all uses changed to void *.
152064         * lib/memcmp.c (__ptr_t): Likewise.
152065         * lib/memrchr.c (__ptr_t): Likewise.
152066         * lib/memchr.c, memcmp.c, memcoll.c, memrchr.c:
152067         Include <string.h> unconditionally.
152068         * lib/memchr.c, memrchr.c: Include <limits.h> unconditionally.
152069         * lib/memchr.c: Include <stdlib.h> unconditionally.
152070         * lib/memchr.c (LONG_MAX): Remove.
152071         * lib/memrchr.c (LONG_MAX): Likewise.
152072         * lib/memchr.c (__memchr): Define via a prototype.
152073         * lib/memrchr.c (__memrchr): Likewise.
152074         * lib/memcmp.c (__P): Remove, and remove all uses.
152075         (memcmp_bytes, memcmp_common_alignment, memcmp_not_common_alignment):
152076         Remove forward decls; no longer needed.
152077         * lib/memcpy.c, memmove.c, memset.c: Include <stddef.h>.
152078         Use types required by C89 in prototype.
152080         * lib/mkdir.c: Include <stdlib.h>, <string.h> unconditionally.
152081         * lib/savedir.c: Likewise.
152082         * lib/mkdir.c (free): Remove decl.
152083         * lib/rmdir.c (rmdir): Define with a prototype.
152084         * lib/savedir.c: Include savedir.h first, to test interface.
152086         * lib/mktime.c (STDC_HEADERS): Remove.
152087         Include <stdlib.h>, <string.h> unconditionally.
152089         * lib/modechange.c: Include <stdlib.h> unconditionally.
152090         (malloc): Remove decl.
152092         * lib/mountlist.c: Include <stdlib.h>, <string.h> unconditionally.
152093         (free): Remove decl.
152095         * lib/obstack.h (PTR_INT_TYPE) [!defined __PTRDIFF_TYPE__]:
152096         Define to ptrdiff_t, without bothering to check HAVE_STDDEF_H.
152097         (This type really should be intptr_t, but that's a C99ism.)
152098         (_obstack_memcpy): Remove: all uses changed to memcpy.
152099         Include <string.h> unconditionally.
152100         (struct obstack): Assume __STDC__ for types of members
152101         chunkfun, freefun, extra_arg.
152102         (_obstack_newchunk, _obstack_free, _obstack_begin, _obstack_begin_1,
152103         _obstack_memory_used, obstack_alloc_failed_handler, obstack_init,
152104         obstack_begin, obstack_specify_allocation,
152105         obstack_specify_allocation_with_arg, obstack_chunkfun,
152106         obstack_freefun, obstack_free) [! (defined __STDC__ && __STDC__)]:
152107         Remove unprototyped decls and the macros that use them.
152108         * lib/obstack.c (POINTER): Remove.  All uses changed to void *.
152109         (obstack_alloc_failed_handler, CALL_CHUNKFUN, CALL_FREEFUN,
152110         _obstack_begin, _obstack_begin_1, _obstack_allocated_p)
152111         (defined __STDC__ && __STDC__)]:
152112         Remove nonprototyped code.
152113         Include <stdlib.h> unconditionally.
152114         (_obstack_begin, _obstack_begin_1, _obstack_newchunk,
152115         _obstack_allocated_p, _obstack_free, obstack_free,
152116         _obstack_memory_used, print_and_abort):
152117         Define using prototypes.
152118         (obstack_1grow, obstack_1grow_fast, obstack_alloc, obstack_base,
152119         obstack_blank, obstack_blank_fast, obstack_copy, obstack_copy0,
152120         obstack_finish, obstack_grow, obstack_grow0, obstack_make_room,
152121         obstack_next_free, obstack_object_size, obstack_room) [0]:
152122         Remove unused, unprototyped code.
152124         * lib/path-concat.c: Include <stdlib.h>, <string.h> unconditionally.
152126         * lib/physmem.c (physmem_total, physmem_available, main): Define
152127         with prototypes.
152129         * lib/posixtm.c: Include <stdlib.h>, <string.h> unconditionally.
152130         (main): Define with a prototype.
152132         * lib/posixver.c (getenv): Remove decl.
152134         * lib/putenv.c (malloc): Returns void *, not char *.
152135         Include <string.h> unconditionally.
152136         (strchr, memcpy, NULL): Do not define.
152138         * lib/readtokens.c: Include readtokens.h first, to test interface.
152139         Include <stdlib.h>, <string.h> unconditionally.
152140         (init_tokenbuffer): Define with a prototype.
152142         * lib/regex.c (PARAMS): Remove.  All uses removed.
152143         All uses of _RE_ARGS removed, too.
152144         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
152145         unconditionally.
152146         (bzero): Assume memset exists.
152147         (memcmp, memcpy, NULL): Remove.
152148         (SIGN_EXTEND_CHAR): Remove; all uses replaced by casts to signed
152149         char, or assignments to local vars of type signed char.
152150         (init_syntax_once, PREFIX(extract_number_and_incr),
152151         PREFIX(print_partial_compiled_pattern),
152152         PREFIX(print_compiled_pattern), PREFIX(print_double_string),
152153         convert_mbs_to_wcs, print_fastmap, re_set_syntax,
152154         PREFIX(regex_grow_registers), PREFIX(regex_compile),
152155         PREFIX(store_op1), PREFIX(store_op2), PREFIX(insert_op1),
152156         PREFIX(insert_op2), PREFIX(at_begline_loc_p),
152157         PREFIX(at_endline_loc_p), group_in_compile_stack, insert_space,
152158         wcs_compile_range, byte_compile_range, truncate_wchar,
152159         PREFIX(re_compile_fastmap), re_compile_fastmap, re_set_registers,
152160         re_search, re_search_2, PREFIX(re_search_2), re_match, re_match_2,
152161         count_mbs_length, wcs_re_match_2_internal,
152162         byte_re_match_2_internal, PREFIX(group_match_null_string_p),
152163         PREFIX(alt_match_null_string_p),
152164         PREFIX(common_op_match_null_string_p), PREFIX(bcmp_translate),
152165         re_compile_pattern, re_comp, re_exec, regcomp, regexec, regerror,
152166         regfree, PREFIX(extract_number)): Define with prototype.  Remove
152167         now-unnecessary declaration, if any.
152168         (byte_compile_range, PREFIX(regex_compile), re_comp, re_exec,
152169         regcomp, regexec):
152170         Remove now-unnecessary casts among pointer types.
152171         * lib/regex.h (_RE_ARGS): Remove.  All uses removed.
152173         * lib/rename.c: Include <stdlib.h>, <string.h> unconditionally.
152174         (free): Remove decl.
152176         * lib/rpmatch.c: Include <stdlib.h> unconditionally.
152178         * lib/same.c: Include <stdlib.h>, <string.h> unconditionally.
152179         (free): Remove decl.
152181         * lib/save-cwd.c: Include <stdlib.h> unconditionally.
152182         * lib/xgetcwd.c: Likewise.
152184         * lib/stat.c: Include <stdlib.h>, <string.h> unconditionally.
152185         (free): Remove decl.
152187         * lib/strchrnul.c (strchrnul): Define with a prototype.
152188         Fix bug: c_in was not converted to char before searching.
152190         The following changes are not K&R related:
152192         * lib/group-member.h: Include <sys/types.h>, so that this file is
152193         self-contained.
152194         * lib/makepath.h: Likewise.
152196         * lib/getusershell.c (readname, default_index, line_size, readname):
152197         Use size_t, not int, for sizes.
152198         (readname): If the size overflows, report an error instead of
152199         looping forever.
152201 2003-09-09  Paul Eggert  <eggert@twinsun.com>
152203         * config/srclist.txt: Do not get getopt.h, getopt1.c, or regex.h from
152204         libc.
152206 2003-09-09  Paul Eggert  <eggert@twinsun.com>
152208         * README: New section: portability guidelines.
152210 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
152212         * m4/getndelim2.m4 (gl_PREREQ_GETNDELIM2): Assume stdlib.h per the
152213         C89 spec.
152215 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
152217         * lib/getndelim2.c: Assume stdlib.h per the C89 spec.
152219 2003-09-08  Paul Eggert  <eggert@twinsun.com>
152221         Assume C89 or better; remove K&R cruft.
152222         A few of these changes were first proposed by Derek Robert Price
152223         in <http://mail.gnu.org/r/bug-gnulib/2003-07/msg00105.html>.
152225         * lib/addext.c: Include <string.h> unconditionally.
152226         * lib/backupfile.c: Include <string.h>, <stdlib.h> unconditionally.
152227         Don't declare getenv or malloc.
152229         * lib/alloca.c: Include <string.h>, <stdlib.h> unconditionally.
152230         (POINTER_TYPE, pointer): Remove; all uses changed to void *.
152231         (NULL): Remove.
152232         (find_stack_direction, alloca): Use prototypes.
152234         * lib/atexit.c (atexit): Define using a prototype.
152236         * lib/basename.c, dirname.c, stripslash.c:
152237         Include <string.h> unconditionally.
152239         * lib/bcopy.c: Include <stddef.h>.
152240         (bcopy): Define with prototype, using 'const' and 'void' and 'size_t'.
152242         * lib/canon-host.c: Include <stdlib.h>, <string.h> unconditionally.
152244         * lib/error.h (error, error_at_line, error_print_progname)
152245         [! (defined (__STDC__) && __STDC__)]: Remove decls.
152246         * lib/error.c: Include error.h first, to check interface.
152247         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
152248         (VA_START): Remove; all uses changeed to va_start.
152249         (exit, strerror): Remove decls.
152250         (error_print_progname): Prototype uncondionally.
152251         Don't include <errno.h>; no longer needed.
152252         (private_strerror): Remove.
152253         (error_tail): Always define.
152254         (error, error_at_line): Assume C89 or better; always use prototypes.
152255         * lib/fatal.c: Include "fatal.h" first, to test interface.
152256         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
152257         (VA_START): Remove; all uses changed to va_start.
152258         [! (HAVE_VPRINTF || HAVE_DOPRNT || _LIBC)]: Remove support for
152259         this case.
152260         (exit): Remove decl.
152261         (fatal): Prototype unconditionally.  Assume va_start works.
152262         Abort at end, to pacify gcc.
152264         * lib/euidaccess.c (main): Define with a prototype.
152266         * lib/exclude.c: Include <stdlib.h>, <string.h> unconditionally.
152268         * lib/exitfail.c: Include <stdlib.h> unconditionally.
152270         * lib/fnmatch_.h (__P): Remove.  All uses changed to assume
152271         prototypes.
152272         * lib/fnmatch.c: Include fnmatch.h first, to test interface.
152273         Include <string.h>, <stddef.h>, <stdlib.h> unconditionally.
152274         (getenv): Remove decl.
152275         (fnmatch): Define using a prototype.
152276         * lib/fnmatch_loop.c (FCT): Remove forward decl; no longer needed.
152277         (FCT): Define using a prototype.
152279         * lib/getdate.y: Include <stdlib.h>, <string.h> unconditionally.
152281         * lib/gethostname.c: Include <stddef.h>.
152282         (gethostname): Define with prototype.  Length is size_t, not int.
152284 2003-09-08  Paul Eggert  <eggert@twinsun.com>
152286         Assume C89 or better; remove K&R cruft.
152287         * m4/alloca.m4 (gl_PREREQ_ALLOCA): Don't check for stdlib.h, string.h.
152288         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for stdlib.h,
152289         string.h, getenv, malloc.
152290         * m4/dirname.m4 (gl_DIRNAME): Don't check for string.h or C standard
152291         headers.
152292         * m4/canon-host.m4 (gl_CANON_HOST): Don't check for string.h, stdlib.h.
152293         * m4/error.m4 (jm_PREREQ_ERROR): Do not require STDC headers, and
152294         do not check for strerror.
152295         * m4/exclude.m4: Do not check for stdlib.h, string.h, strings.h.
152296         * m4/exitfail.m4 (gl_EXITFAIL): Do not check for stdlib.h.
152297         * m4/fatal.m4 (gl_FATAL): Do not require STDC headers, and
152298         do not check for doprnt or vprintf.
152299         * m4/fnmatch.m4 (gl_PREREQ_FNMATCH_EXTRA): Remove.  All uses removed.
152300         * m4/getdate.m4 (gl_GETDATE): Don't check for stdlib.h or string.h.
152302 2003-09-08  Paul Eggert  <eggert@twinsun.com>
152304         * lib/getversion.c: Remove; was migrated to backupfile.c in 1997.
152305         getversion.c should have been removed then, but was accidentally
152306         preserved.
152308         * lib/utime.c [!HAVE_UTIMES_NULL]: Include <sys/stat.h>, <fcntl.h>.
152309         (utime_null): Fix typo: 'st' was sometimes called 'sb'.
152311 2003-09-08  Karl Berry  <karl@gnu.org>
152313         * config/config.sub, config.guess, srclistvars.sh: update from savannah
152314                 config, forget about prep.
152316         * config/depcomp, missing: update from automake.
152318 2003-09-07  Paul Eggert  <eggert@twinsun.com>
152320         * modules/time_r: Depend on 'restrict'.  Fix from Simon Josefsson in
152321         <http://mail.gnu.org/r/bug-gnulib/2003-09/msg00028.html>.
152323 2003-09-07  Paul Eggert  <eggert@twinsun.com>
152325         * lib/time_r.c (gmtime_r, localtime_r): Fix silly typo: missing arg to
152326         copy_tm_result.  Bug reported by Simon Josefsson in
152327         <http://mail.gnu.org/r/bug-gnulib/2003-09/msg00028.html>.
152329 2003-09-06  Paul Eggert  <eggert@twinsun.com>
152331         * m4/time_r.m4: New file.
152332         * m4/mktime.m4 (gl_PREREQ_MKTIME): Remove check for limits.h.
152333         * m4/timegm.m4 (gl_FUNC_TIMEGM): Assume that timegm is buggy if mktime
152334         is. Check for timegm declaration.
152335         (gl_PREREQ_TIMEGM): Require gl_FUNC_MKTIME.
152336         Do not check for gmtime_r.
152337         Replace mktime if __mktime_internal does not exist and if mktime
152338         hasn't been replaced already.
152340 2003-09-06  Paul Eggert  <eggert@twinsun.com>
152342         * lib/time_r.c, lib/time_r.h: New files.
152344         * lib/mktime.c (my_mktime_localtime_r): Remove; all uses changed to
152345         __localtime_r.
152346         (__localtime_r) [!defined _LIBC]: New macro.  Include <time_r.h>.
152347         (__mktime_internal) [!defined _LIBC]: Now extern, not static.
152349         * lib/strftime.c (my_strftime_gmtime_r): Remove; all uses changed to
152350         __gmtime_r.
152351         (my_strftime_localtime_r): Remove; all uses changed to __localtime_r.
152352         (__gtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: New macros.
152353         Include <time_r.h>.
152355         * lib/timegm.c: Switch to glibc implementation, with the following
152356         changes:
152357         [defined HAVE_CONFIG_H]: Include <config.h>.
152358         [!defined _LIBC]: Include "timegm.h" rather than <time.h>.
152359         (__mktime_internal) [!defined _LIBC]: New decl.
152360         (__gmtime_r) [!defined _LIBC]: New macro and function.
152361         (timegm): Use a prototype, since gnulib assumes C89.
152362         Do not bother declaring tmp to be const, as it's not really usefu.
152363         * lib/timegm.h: Hoist "#include <time.h>" out of #ifdef.
152364         (timegm): Declare only if HAVE_DECL_TIMEGM.
152366 2003-09-06  Paul Eggert  <eggert@twinsun.com>
152368         * MODULES.html.sh (func_all_modules): Add time_r.
152369         * modules/time_r: New file.
152370         * modules/mktime, modules/strftime, modules/timegm: Depend on time_r.
152371         * modules/timegm: Depend on mktime.  Change maintainer to "all, glibc".
152373 2003-09-03  Paul Eggert  <eggert@twinsun.com>
152375         * lib/human.c (human_readable): Fix bug that rounded 10501 to 10k.
152376         Bug reported by Lute Kamstra in
152377         <http://mail.gnu.org/r/bug-gnulib/2003-09/msg00003.html>.
152379         * lib/getdate.y (relative_time_table): Use tDAY_UNIT for "tomorrow",
152380         "yesterday", "today", and "now" rather than tMINUTE_UNIT.  Of
152381         course with correspondingly smaller numbers for tomorrow and
152382         yesterday.  From Tadayoshi Funaba.  Originally installed into
152383         sh-utils on 1999-08-07, but the patch got lost (I guess during the
152384         coreutils merge?).
152386 2003-08-31  Simon Josefsson  <jas@extundo.com>
152388         * modules/timegm: New file.
152389         * MODULES.html.sh (func_all_modules): Add timegm.
152391 2003-08-31  Simon Josefsson  <jas@extundo.com>
152393         * m4/timegm.m4: New file.
152395 2003-08-31  Simon Josefsson  <jas@extundo.com>
152397         * lib/timegm.h: New file.
152398         * lib/timegm.c: New file.  Based on
152399         wget-1.8.2/src/http.c:mktime_from_utc.
152401 2003-08-31  Karl Berry  <karl@gnu.org>
152403         * lib/argp.h: update from libc.
152405 2003-08-28  Bruno Haible  <bruno@clisp.org>
152407         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Remove AC_DEFINE of fnmatch here.
152408         This avoids havoc on compilers for which '#define fnmatch rpl_fnmatch'
152409         followed by '#define fnmatch fnmatch_posix' gives an error.
152411 2003-08-28  Bruno Haible  <bruno@clisp.org>
152413         * lib/binary-io.h: Undefine O_BINARY before defining it. This avoids a
152414         warning on QNX, which defines O_BINARY to 000000.
152416 2003-08-27  Jim Meyering  <jim@meyering.net>
152418         * m4/mkstemp.m4: Require that the system mkstemp be able to create
152419         70 temporary files, not just 30.  Tru64 V4.0F's mkstemp function
152420         would fail after 32.  Reported by Danny Levinson.  Details here:
152421         http://mail.gnu.org/r/bug-coreutils/2003-08/msg00124.html
152423 2003-08-24  Bruno Haible  <bruno@clisp.org>
152425         * lib/binary-io.h: Include <stdio.h>, to avoid a compilation error when
152426         MSVC7 <stdio.h> is included later.
152428 2003-08-22  Simon Josefsson  <jas@extundo.com>
152430         * modules/strndup (Makefile.am): Add strndup.h to lib_SOURCES.
152432 2003-08-20  Karl Berry  <karl@gnu.org>
152434         * m4/lib-ld.m4: serial 1003 from gettext, no changes besides serial.
152436 2003-08-20  Bruno Haible  <bruno@clisp.org>
152438         * modules/progname: New file.
152439         * MODULES.html.sh (func_all_modules): Add progname.
152441 2003-08-20  Bruno Haible  <bruno@clisp.org>
152443         * lib/progname.h: New file, from GNU gettext.
152444         * lib/progname.c: New file, from GNU gettext.
152445         * lib/progreloc.c: New file, from GNU gettext.
152447 2003-08-19  Jim Meyering  <jim@meyering.net>
152449         * m4/lib-ld.m4: Revert yesterday's change, per Bruno's request here:
152450         http://mail.gnu.org/r/bug-gnulib/2003-08/msg00155.html
152452 2003-08-19  Bruno Haible  <bruno@clisp.org>
152454         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Don't check for <string.h> any
152455         more.
152457 2003-08-19  Bruno Haible  <bruno@clisp.org>
152459         * lib/xstrdup.c: Assume <string.h> exists.
152461 2003-08-18  Paul Eggert  <eggert@twinsun.com>
152463         * modules/stdbool: Add BUILT_SOURCES.  Prefer $@ to target name
152464         in makefile rules.
152466 2003-08-18  Jim Meyering  <jim@meyering.net>
152468         * m4/getloadavg.m4: Use [\t ], not [ \t] (where \t is a literal TAB).
152469         * m4/lib-ld.m4: Likewise.
152471 2003-08-18  Jim Meyering  <jim@meyering.net>
152473         * lib/setenv.h: Indent nested cpp directive.
152474         * lib/vasnprintf.c: Remove trailing blanks.
152476 2003-08-17  Simon Josefsson  <jas@extundo.com>
152478         * modules/xstrndup: New file.
152479         * MODULES.html.sh (func_all_modules): Add xstrndup.
152481 2003-08-17  Simon Josefsson  <jas@extundo.com>
152483         * modules/argp: Fix autoconf macro name. Add more dependencies.
152485 2003-08-17  Simon Josefsson  <jas@extundo.com>
152487         * m4/xstrndup.m4: New file.
152489 2003-08-17  Simon Josefsson  <jas@extundo.com>
152491         * m4/argp.m4: New file.
152493 2003-08-17  Simon Josefsson  <jas@extundo.com>
152494             Bruno Haible  <bruno@clisp.org>
152496         * lib/xstrndup.h: New file.
152497         * lib/xstrndup.c: New file.
152499 2003-08-17  Bruno Haible  <bruno@clisp.org>
152501         * modules/strndup (Files, Include): Add lib/strndup.h.
152503 2003-08-17  Bruno Haible  <bruno@clisp.org>
152505         * modules/euidaccess (Files): Add lib/euidaccess.h.
152507 2003-08-17  Bruno Haible  <bruno@clisp.org>
152509         * lib/strndup.h: New file.
152511 2003-08-17  Bruno Haible  <bruno@clisp.org>
152513         * gnulib-tool (func_create_testdir): Handle gl_USE_SYSTEM_EXTENSIONS
152514         like AC_GNU_SOURCE.
152515         * modules/extensions (configure.ac): Comment out the invocation of
152516         gl_USE_SYSTEM_EXTENSIONS.
152518 2003-08-16  Paul Eggert  <eggert@twinsun.com>
152520         Merges from coreutils, etc.
152521         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Insert ':' to prevent a syntax
152522         error in gl_FUNC_MATCH.  This fixes a bug I introduced on 2003-05-28.
152523         * m4/readlink.m4 (gl_PREREQ_READLINK): Renamed from gl_PREREQ_READLINE,
152524         fixing a typo.
152525         * m4/host-os.m4 (UTILS_HOST_OS): Add GNU/NetBSD, GNU/FreeBSD.
152526         * m4/hash.m4 (gl_HASH): Use AM_STDBOOL_H, not AC_HEADER_STDBOOL.
152528 2003-08-16  Paul Eggert  <eggert@twinsun.com>
152530         Document merge from coreutils.
152531         * modules/alloca: Append $(ALLOCA_H) to BUILT_SOURCES.
152532         * modules/fnmatch: Append $(FNMATCH_H) to BUILT_SOURCES.
152533         * modules/utime: Add m4/utimes-null.m4.
152535 2003-08-16  Paul Eggert  <eggert@twinsun.com>
152537         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Do not normalize white
152538         space, undoing this 2003-08-12 change:
152539         <http://mail.gnu.org/r/bug-gnulib/2003-08/msg00080.html>
152541 2003-08-16  Paul Eggert  <eggert@twinsun.com>
152543         * config/srclist.txt: Get regex.h, strdup.c, strtoll.c,
152544         strtoul.c from libc, undoing this 2003-08-12 change:
152545         <http://mail.gnu.org/r/bug-gnulib/2003-08/msg00080.html>
152547 2003-08-16  Jim Meyering  <jim@meyering.net>
152549         Merges from coreutils.
152550         * m4/readdir.m4 (GL_FUNC_READDIR): Change name to have GL_ (not jm_)
152551         prefix.  Adjust cache variables similarly.  Create 500 rather than
152552         just 300 files, to exercise bug on Darwin6.5, too.
152553         * m4/perl.m4 (jm_PERL): Use $am_missing_run, not undefined
152554         $missing_dir.
152555         * m4/jm-winsz1.m4: Require AC_SYS_POSIX_TERMIOS, not
152556         AM_SYS_POSIX_TERMIOS.
152557         Reported by mkc@mathdogs.com.
152558         Also change use of $am_cv_sys_posix_termios
152559         to $ac_cv_sys_posix_termios.  Reported by Andreas Schwab.
152560         * m4/getgroups.m4 (jm_FUNC_GETGROUPS): Rewrite to use AC_FUNC_GETGROUPS
152561         and (if needed) to call AC_LIBOBJ and to set GETGROUPS_LIB.
152562         * m4/fsusage.m4 [__GLIBC__]: GNU libc's statvfs stats each mount point
152563         in /proc/mounts until it finds one with matching device number.  This
152564         is unnecessary when the FILE argument *is* a mount point.  No stat call
152565         is necessary in that case.  So, disable the statvfs-testing code on
152566         systems with GNU libc.  Reported by Andrei Gaponenko via Tim Waugh
152567         as RedHat bug# 84846.
152568         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
152569         to 1MB, so as not to render systems with no stack size limit (e.g.,
152570         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
152571         Include <unistd.h>.  On some systems,
152572         it is required for the definition of _SC_PAGESIZE.
152574 2003-08-16  Jim Meyering  <jim@meyering.net>
152576         Merge from coreutils.
152577         * lib/xstrtoimax.c: #else #if -> #elif.
152578         * lib/xstrtoumax.c: Likewise.
152580 2003-08-16  Jim Meyering  <jim@meyering.net>
152582         * m4/utimes.m4 (gl_FUNC_UTIMES): New file.
152583         * m4/utimes.m4: Removed.
152584         * m4/utimes-null.m4: Renamed from utimes.m4.
152586         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
152587         to 1MB, so as not to render systems with no stack size limit (e.g.,
152588         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
152589         Include <unistd.h>.  On some systems,
152590         it is required for the definition of _SC_PAGESIZE.
152592 2003-08-16  Jim Meyering  <jim@meyering.net>
152593         and Paul Eggert  <eggert@cs.ucla.edu>
152595         Merges from coreutils, etc.
152597         * m4/jm-macros.m4 (AC_LANG_SOURCE(C)): New macro, undefine, then define
152598         using the latest version from cvs.  This avoids problems with #line
152599         directives using a vendor (Sun) compiler.
152600         (jm_MACROS): Bump prerequisite from 2.52g to 2.57.
152601         Don't set GETGROUPS_LIB here; now it's
152602         done via getgroups.m4's wrapper function.
152603         AC_SUBST OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, and MAN here,
152604         rather than just in sh-util/configure.in, so that the
152605         now-shared-by-fileutils-and-textutils lib/Makefile.am are all the
152606         same.
152607         Use AC_CONFIG_LIBOBJ_DIR(lib) to tell the new
152608         AC_FUNC_GETLOADAVG where to find getloadavg.c.
152609         Require AC_FUNC_FTW, gt_INTTYPES_PRI, gl_CLOCK_TIME,
152610         UTILS_SYS_OPEN_MAX, GL_FUNC_GETCWD_PATH_MAX, GL_FUNC_READDIR,
152611         gl_FSUSAGE, gl_MOUNTLIST, AC_FUNC_CANONICALIZE_FILE_NAME.
152612         Remove code that is now done by the newly-required macros.
152613         Append $(EXEEXT) to DF_PROG.
152614         AC_LIBOBJ fchdir-stub if fchdir doesn't exist; similarly for fchown.
152615         Do not invoke or require the following here,
152616         since prereq.m4 or some gnulib .m4 now does this for us:
152617         gl_REGEX, UTILS_FUNC_MKDIR_TRAILING_SLASH, jm_BISON, gl_FUNC_MKTIME,
152618         jm_FUNC_LSTAT, jm_FUNC_STAT, jm_FUNC_REALLOC, jm_FUNC_MALLOC,
152619         jm_FUNC_NANOSLEEP, jm_FUNC_READDIR, jm_FUNC_MEMCMP,
152620         jm_FUNC_GLIBC_UNLOCKED_IO, AC_FUNC_FNMATCH_GNU, jm_FUNC_PUTENV,
152621         jm_AC_PREREQ_XSTRTOUMAX, jm_AC_PREREQ_XSTRTOIMAX,
152622         AC_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, AC_FUNC_VPRINTF,
152623         vb_FUNC_RENAME, UTILS_FUNC_MKSTEP, jm_FUNC_UTIME, AM_FUNC_GETLINE,
152624         AC_FUNC_OBSTACK.
152625         Do not replace the following functions, as this is now the job
152626         of some gnulib .m4: strcasecmp, strncasecmp, dup2, gethostname,
152627         getusershell, sig2str, strcspn, stpcpy, strstr, strtol, strtoul
152628         strpbrk, euidaccess, memcmp, rmdir, rpmatch, strndup, strverscmp,
152629         atexit getpass, strdup, getpagesize.
152630         Replace 'raise'.
152631         Do not check for the following functions, as this is now the job
152632         of some gnulib .m4: bcopy, canonicalize_file_name, fchdir, ftime,
152633         getcwd, getmntinfo, resolvepath.  But check for sysctl, setreuid,
152634         setregid.
152635         (jm_CHECK_ALL_HEADERS): Do not check for fenv.h.
152636         Check for sys/sysctl.h.
152637         (jm_CHECK_ALL_TYPES): Do not require AC_STRUCT_TM, AC_STRUCT_TIMEZONE,
152638         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Invoke gt_TYPE_SSIZE_T instead
152639         of checking for ssize_t ourselves.
152641         * m4/prereq.m4 (jm_PREREQ): Don't invoke macros; AC_REQUIRE them.
152642         Require every macro that gnulib/modules/* suggests for us.
152643         (jm_PREREQ_ADDEXT): New macro.
152644         (jm_PREREQ_STAT): Check for 'struct statfs' on Ultrix 4.4.
152645         Require jm_AC_TYPE_LONG_LONG instead of invoking it.
152647         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): New macro.
152648         (gl_PHYSMEM): Use it.
152649         Also check for `table' function.
152650         Check for new headers and functions.
152651         Add check for sys/sysmp.h.
152652         With suggestions from Kaveh Ghazi.
152653         Ignore headers that are present but cannot be compiled.  This
152654         avoids spurious warnings on Solaris 9 sparc with Forte Developer 7
152655         C 5.4.
152657 2003-08-15  Paul Eggert  <eggert@twinsun.com>
152659         Document merge from coreutils.
152660         * modules/userspec: Depend on posixver.
152661         * modules/strftime: Depend on tzset.
152663 2003-08-15  Paul Eggert  <eggert@twinsun.com>
152665         * lib/config.charset, ref-add.sin, ref-del.sin: Use three spaces,
152666         rather than tab, after '#' in shell-script copyright notices.
152667         Suggested by Bruno Haible.
152669 2003-08-15  Paul Eggert  <eggert@twinsun.com>
152671         * config/srclist-update: Use three spaces, rather than tab, after '#'
152672         in shell-script copyright notices.  Suggested by Bruno Haible.
152673         Remove unnecessary parenthesization in regular expression.
152675 2003-08-15  Jim Meyering  <jim@meyering.net>
152677         Merge from coreutils.
152678         * lib/xgethostname.c: Include <stdlib.h>.
152679         (xghostname): Don't exit for anything other than memory-related
152680         failure; just return NULL.
152681         * lib/userspec.c: Include "posixver.h".
152682         (parse_user_spec): Accept `.' as a separator only
152683         in pre-POSIX-200112 mode.
152684         * lib/strtoimax.c: Use #elif rather than #else #if.
152685         * lib/strftime.c (my_strftime) [!_LIBC && HAVE_TZNAME && HAVE_TZSET]:
152686         Remove function, now that we can rely on a working tzset function.
152687         [!_LIBC]: Ensure that the required autoconf test has been run.
152688         [!defined _NL_CURRENT && HAVE_STRFTIME]:
152689         Use underlying_strftime for %r.
152690         * lib/sha.c: Merge in some clean-up and optimization changes from
152691         glibc.
152692         * lib/sha.c (sha_stream) [BLOCKSIZE]: Move definition to top of file.
152693         Ensure that it is a multiple of 64.
152694         Rearrange loop exit tests so as to avoid performing an
152695         additional fread after encountering an error or EOF.
152696         * lib/realloc.c: Update copyright date.
152698 2003-08-15  Jim Meyering  <jim@meyering.net>
152699         and Paul Eggert  <eggert@twinsun.com>
152701         Merge from coreutils.
152702         * lib/readutmp.h (HAVE_UTMPX_H): Undef if struct utmp has the ut_exit
152703         member but strut utmpx does not.  Needed for AIX 4.3.3.
152704         (UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Define.
152706 2003-08-15  Jim Meyering  <jim@meyering.net>
152707         and Paul Eggert  <eggert@cs.ucla.edu>
152709         Merges from coreutils, etc.
152710         * m4/strftime.m4 (_jm_STRFTIME_PREREQS):
152711         Require gl_FUNC_TZSET_CLOBBER.
152712         * m4/readutmp.m4 (gl_READUTMP): Check for ut_exit.ut_exit,
152713         ut_exit.e_exit, ut_exit.ut_termination, and ut_exit.e_termination
152714         members.
152716 2003-08-14  Paul Eggert  <eggert@twinsun.com>
152718         Help the merge from coreutils.
152719         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): New macro.
152720         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use it.
152721         * m4/tzset.m4: Use it too.
152723 2003-08-14  Paul Eggert  <eggert@twinsun.com>
152725         * modules/tzset: New file.
152727 2003-08-14  Jim Meyering  <jim@meyering.net>
152729         Merges from coreutils.
152730         * modules/fnmatch: Use the `$(FNMATCH_H)' notation for AC_REPLACED
152731         variable names, rather than @FNMATCH_H@.
152732         * modules/alloca: Likewise for $(ALLOCA_H).
152734         * modules/fnmatch (fnmatch.h): Use `$@' in the commands, in place of
152735         the three copies of the literal target, `fnmatch.h'.
152736         * modules/alloca (alloca.h): Likewise.
152738 2003-08-14  Jim Meyering  <jim@meyering.net>
152740         Merge from coreutils.
152741         * m4/tzset.m4: New file.
152742         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Move the
152743         MOUNTED_VMOUNT test to precede the MOUNTED_GETMNTENT1 tests, since
152744         otherwise, AIX 5.1 systems would end up using the latter.
152745         MOUNTED_GETMNTENT1 support is inadequate on such systems: 1) detecting
152746         whether a file system is remote doesn't work  2) the MOUNTED_VMOUNT
152747         code reports the HOSTNAME:/MOUNT_POINT, while the MOUNTED_GETMNTENT1
152748         code reports merely /MOUNT_POINT.  Reported by Mike Jetzer.
152750 2003-08-14  Jim Meyering  <jim@meyering.net>
152752         Merge from coreutils.
152753         * lib/obstack.h: Whitespace changes.
152754         * lib/mountlist.c: Remove anachronistic casts of xmalloc, xrealloc,
152755         and xcalloc return values.
152756         (read_filesystem_list) [MOUNTED_GETFSSTAT]:
152757         Use MNT_NOWAIT, rather than MNT_WAIT.  Otherwise, `df DIR' could
152758         hang on OSF/1 5.1 for DIR on both local and remote file systems.
152759         Reported by (and fix confirmed by) Nelson H. F. Beebe.
152760         (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
152761         error from mntctl.
152762         Use mntctl's return value to drive the entry-processing loop, since
152763         we can't rely on the value of the vmt_length member in the last
152764         entry.  On some systems doing so could result in exhausting
152765         virtual memory.  Based in part on a patch from Mike Jetzer.
152767 2003-08-14  Jim Meyering  <jim@meyering.net>
152768         and Paul Eggert  <eggert@twinsun.com>
152770         Merges from coreutils, plus other fixes.
152771         * lib/physmem.c: Merge in portability changes from gcc/libiberty
152772         to support AIX, IRIX, Tru64, and Windows.  See the ChangeLog there
152773         for credits and details.  Thanks to Kaveh Ghazi for helping
152774         to keep these files in sync.
152775         (ARRAY_SIZE): Define it.
152776         (physmem_total, physmem_available): Add comments. From Kaveh Ghazi.
152777         * lib/memcasecmp.c: Remove unnecessary parentheses after 'defined'.
152778         (memcasecmp): Don't assume size_t fits in unsigned int.
152779         Remove casts and duplicate code.
152780         * lib/md5.c: Include <string.h> and <stdlib.h> unconditionally.
152781         (memcpy): Remove definition.
152782         Merge in some clean-up and optimization changes from glibc.
152783         [BLOCKSIZE]: Move definition to top of file.
152784         Ensure that it is a multiple of 64.
152785         Rearrange loop exit tests so as to avoid performing an
152786         additional fread after encountering an error or EOF.
152787         * lib/md5.h (md5_uintptr): Define.
152788         * lib/makepath.c (CLEANUP_CWD): Report an error if we failed to
152789         return to the initial working directory.  Preserve errno
152790         for caller.
152791         * lib/idcache.c: Include "xalloc.h".
152792         (xmalloc, xrealloc): Remove decls.
152793         (getuser): Remove casts no longer required in C89.
152794         * lib/human.c: Include stdio.h, for sprintf.
152795         * lib/group-member.c: Include "xalloc.h".
152796         (xmalloc, xrealloc): Remove decls.
152797         (get_group_info): Remove casts no longer required in C89.
152798         * lib/getusershell.c (readname): Remove casts no longer required in
152799         C89.
152800         * lib/gettimeofday.c (rpl_gmtime, rpl_tzset): New functions.
152801         * lib/getline.c: Whitespace fix, from coreutils.
152803 2003-08-13  Paul Eggert  <eggert@twinsun.com>
152805         * m4/exclude.m4 (gl_EXCLUDE): Require AC_C_INLINE, AC_HEADER_STDC.
152806         Check for isascii.
152808         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
152809         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
152810         Undo previous (whitespace-only) change.
152812 2003-08-13  Paul Eggert  <eggert@twinsun.com>
152814         * lib/exclude.c: Include <ctype.h>
152815         (IN_CTYPE_DOMAIN): New macro.
152816         (is_space): New fn.
152817         (add_exclude_file): If LINE_END is a space, ignore trailing spaces
152818         and empty lines.
152820         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
152821         Undo previous (whitespace-only) change.
152823 2003-08-13  Paul Eggert  <eggert@twinsun.com>
152825         * config/srclist-update: Change update back to the old behavior,
152826         leaving whitespace alone.  Use one 'sed' command rather than a
152827         pipeline.
152828         (fixlicense): Now a variable, not a function.
152829         (remove_trailing_blanks): Remove.
152830         (fixfile): Don't invoke unexpand or cat, or remove trailing blanks.
152831         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
152832         Undo previous (whitespace-only) change.
152834 2003-08-12  Paul Eggert  <eggert@twinsun.com>
152836         Merge from coreutils.
152837         * modules/euidaccess: Add lib_SOURCES, include for new
152838         file euidaccess.h
152840 2003-08-12  Paul Eggert  <eggert@twinsun.com>
152842         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
152843         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
152844         Normalize leading white space and remove trailing white space.
152846         Merge from coreutils
152847         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): Check for euidaccess decl.
152849         * m4/lib-ld.m4, lib-link.m4, lib-prefix.m4: Regenerate from gettext
152850         0.12.1.  These files are now being upgraded automatically by
152851         ../config/srclist-update.
152853 2003-08-12  Paul Eggert  <eggert@twinsun.com>
152855         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
152856         Normalize leading white space and remove trailing white space.
152857         * lib/ref-add.sin, ref-del.sin: Use '#' before empty line in copyright
152858         notice, as per ../config/srclist-update.
152860         Merge from coreutils.
152861         * lib/euidaccess.h: New file.
152862         * lib/euidaccess.c: Include it.
152863         * lib/.cppi-disable: Add printf-args.h, printf-parse.h, stdbool_.h,
152864         vasnprintf.h, vasprintf.h.  Remove strdup.c, gettext.h.
152865         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Normalize white space.
152867 2003-08-12  Paul Eggert  <eggert@twinsun.com>
152869         * config/srclist-update: Add copyright notice.
152870         (remove_id_lines, remove_trailing_blanks): New constants.
152871         (fixfile): Use them to normalize spacing a bit in copied files.
152872         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
152873         Normalize leading white space and remove trailing white space.
152875         * config/texinfo.tex: Sync with texinfo.
152877         * config/srclist.txt: Don't get regex.h, strdup.c, strtoll.c,
152878         strtoul.c from libc, to merge coreutils whitespace changes.
152880         * config/srclist.txt: Get the following m4 files from gettext:
152881         codeset.m4, gettext.m4, glibc21.m4, iconv.m4, intdiv0.m4,
152882         inttypes-pri.m4, lcmessage.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4,
152883         longdouble.m4, nls.m4, po.m4, progtest.m4, signed.m4, wchar_t.m4,
152884         wint_t.m4.
152886 2003-08-12  Karl Berry  <karl@gnu.org>
152888         * config/srclist.txt: can't sync vasnprintf.c any more, changes have
152889         been made.
152891 2003-08-11  Paul Eggert  <eggert@twinsun.com>
152893         * modules/gnu-source, m4/gnu-source.m4:
152894         Remove; we're assuming Autoconf 2.54 or later now.
152895         Suggested by Bruno Haible.
152896         * MODULES.html.sh (func_all_modules): Remove gnu-source.
152898 2003-08-11  Bruno Haible  <bruno@clisp.org>
152900         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Also check for wcslen.
152902 2003-08-11  Bruno Haible  <bruno@clisp.org>
152904         * lib/vasnprintf.c (local_wcslen): New function, for Solaris 2.5.1.
152905         (vasnprintf): Use it instead of wcslen.
152907 2003-08-11  Bruno Haible  <bruno@clisp.org>
152909         * lib/stdbool_.h (_Bool): Undo last change; instead use a negative enum
152910         value to ensure that _Bool promotes to int. Use #define for _Bool when
152911         using the Solaris C compiler. Adds comments suggested by Paul Eggert.
152913 2003-08-10  Karl Berry  <karl@gnu.org>
152915         * lib/regex.h: update from libc (whitespace fix).
152917 2003-08-09  Paul Eggert  <eggert@twinsun.com>
152919         Merge some files from coreutils.  These changes were
152920         originally made by Jim Meyering.
152921         * lib/acl.c: Include <sys/types.h> before <sys/stat.h>;
152922         many older Unixes require this.
152923         * lib/alloca.c (alloca): Remove cast to argument of free;
152924         no longer needed in C89.
152925         * lib/alloca_.h, regex.h: Fix white space to match
152926         what GNU indent does.
152928 2003-08-09  Paul Eggert  <eggert@twinsun.com>
152930         * m4/regex.m4 (jm_INCLUDED_REGEX): Change "\201" to "\371";
152931         apparently Emacs's Unicode mode got confused before my 2003-08-05
152932         checkin.
152934 2003-08-08  Paul Eggert  <eggert@twinsun.com>
152936         * m4/extensions.m4: New file.
152937         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC):
152938         Require gl_USE_SYSTEM_EXTENSIONS.
152939         * m4/unlocked-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO):
152940         Require gl_USE_SYSTEM_EXTENSIONS rather than AC_GNU_SOURCE.
152942 2003-08-08  Paul Eggert  <eggert@twinsun.com>
152944         * MODULES.html.sh (func_all_modules): Add extensions, gnu-source.
152945         * modules/extensions, modules/gnu-source: New files.
152946         * modules/timespec, modules/unlocked-io: Depend on extensions.
152948 2003-08-07  Paul Eggert  <eggert@twinsun.com>
152950         * modules/restrict: New file.
152951         * MODULES.html.sh (func_all_modules): Add restrict.
152952         * modules/regex: Depend on restrict.
152954 2003-08-07  Paul Eggert  <eggert@twinsun.com>
152956         * m4/restrict.m4: New file.
152957         * m4/regex.m4 (jm_PREREQ_REGEX): Add gl_C_RESTRICT.
152959 2003-08-07  Bruno Haible  <bruno@clisp.org>
152961         * modules/getndelim2 (Makefile.am): Add the files to EXTRA_DIST, not
152962         lib_SOURCES, because getndelim2.m4 now uses AC_LIBOBJ(getndelim2).
152964 2003-08-07  Bruno Haible  <bruno@clisp.org>
152966         * m4/getndelim2.m4 (gl_GETNDELIM2): Use AC_LIBOBJ(getndelim2). This
152967         makes the module 'getndelim2' compatible with the module 'getline'.
152969 2003-08-05  Paul Eggert  <eggert@twinsun.com>
152971         * m4/regex.m4 (jm_INCLUDED_REGEX): Replace a single non-ASCII
152972         byte with "\201" to avoid glitches when editing that source file
152973         with multi-gnome-terminal.
152975 2003-08-05  Paul Eggert  <eggert@twinsun.com>
152977         * lib/bumpalloc.h: Remove.
152979 2003-08-05  Paul Eggert  <eggert@twinsun.com>
152981         * MODULES.html.sh (func_all_modules): Remove bumpalloc.
152982         * modules/bumpalloc: Remove.
152984 2003-08-04  Paul Eggert  <eggert@twinsun.com>
152986         * lib/getloadavg.c: Change copyright notice and spacing to conform to
152987         GNU coding style.
152989         Merge from coreutils.
152990         * lib/error.c [!USE_IN_LIBIO]: Omit this case; assume USE_IN_LIBIO is
152991         1. From glibc.
152992         * lib/getdate.y (date): Also accept dates like May-23-2003; suggestion
152993         from Karl Berry, implemented by Jim Meyering.
152994         * lib/getgroups.c: Include "xalloc.h" instead of declaring xalloc fns;
152995         from Dmitry V. Levin.
152996         Remove anachronistic cast of xrealloc.
152997         * lib/fnmatch_.h (__const): Remove.  Use 'const'.
152998         * lib/fnmatch_loop.c (NEW_PATTERN): Cast alloca return value to proper
152999         type. Otherwise, it wouldn't compile with at least /bin/cc on
153000         ymp-cray-unicos9.0.2.X.
153001         Combine two mostly-identical uses of alloca into one.
153002         Thanks to the Cray-Cyber project for access to a Cray Y-MP.
153004 2003-08-04  Dave Love  <d.love@dl.ac.uk>
153006         [From Emacs.]
153008         * lib/getloadavg.c: Check `__unix' as well as `unix'.  Use #ifdef, not
153009         #if.  Check HAVE_LIBKSTAT as well as LOAD_AVE_TYPE.  Check
153010         F_SETFD, not FD_SETFD.  Use HAVE_STRUCT_NLIST_N_UN_N_NAME, not
153011         obsolete NLIST_NAME_UNION.
153012         [__GNU__]: Undef BSD and FSCALE.
153013         [!NLIST_STRUCT]: Remove conditional definition of NLIST_STRUCT.
153015 2003-08-03  Paul Eggert  <eggert@twinsun.com>
153017         * lib/stdbool_.h (_Bool): Make it signed char, instead of
153018         an enum type, so that it's guaranteed to promote to int.  See:
153019         <http://mail.gnu.org/r/bug-gnulib/2003-07/msg00124.html>
153021 2003-08-03  Karl Berry  <karl@gnu.org>
153023         * config/depcomp: update from automake.
153025 2003-07-31  Paul Eggert  <eggert@twinsun.com>
153027         * lib/strerror.c: Include config.h, limits.h.  Declare sprintf.
153028         (strerror): Don't assume that a printable int fits in 14 bytes.
153030 2003-07-31  Bruno Haible  <bruno@clisp.org>
153032         * modules/getpass-gnu: New file.
153033         * MODULES.html.sh (func_all_modules): Add getpass-gnu.
153035 2003-07-31  Bruno Haible  <bruno@clisp.org>
153037         * m4/getpass.m4 (gl_FUNC_GETPASS_GNU): New macro.
153039 2003-07-24  Karl Berry  <karl@gnu.org>
153041         * config/missing: update from automake.
153043 2003-07-24  Derek Robert Price  <derek@ximbiot.com>
153044             Bruno Haible  <bruno@clisp.org>
153046         * lib/getline.h (getline, getdelim): Change return type to ssize_t.
153047         * lib/getline.c (getline, getdelim): Likewise.
153048         Remove _GNU_SOURCE define; now it's defined in config.h through
153049         m4/getline.m4.
153051 2003-07-23  Karl Berry  <karl@gnu.org>
153053         * config/config.sub: update from prep.
153055 2003-07-22  Paul Eggert  <eggert@twinsun.com>
153057         * modules/xalloc (Depends-on): Add exitfail.
153058         * modules/xmemcoll: Likewise.
153060 2003-07-22  Paul Eggert  <eggert@twinsun.com>
153062         * lib/xalloc.h (XCALLOC, XREALLOC, CCLONE): Fix under- and
153063         over-parenthesization in macros.
153065         Sync with coreutils.
153067         * lib/xalloc.h (XMALLOC, XCALLOC, XREALLOC): Remove casts not
153068         required by C99.
153070         Use `exit_failure' for xalloc and xmemcoll instead of their own
153071         private exit-failure variables.
153072         * lib/xalloc.h (xalloc_exit_failure): Remove.
153073         * lib/xmalloc.c: Likewise.  Include exitfail.h.
153074         (xalloc_die): Use exit_failure instead of xalloc_exit_failure.
153075         * lib/xmemcoll.h (xmemcoll_exit_failure): Remove.
153076         * lib/xmemcoll.c: Likewise.  Include exitfail.h.
153077         (xmemcoll): Use exit_failure instead of xalloc_exit_failure.
153079 2003-07-20  Jim Meyering  <jim@meyering.net>
153081         * modules/closeout (Depends-on): Add exitfail.
153082         Suggestion from Bruno Haible.
153084 2003-07-19  Karl Berry  <karl@gnu.org>
153086         * config/config.sub: update from prep.
153088 2003-07-18  Paul Eggert  <eggert@twinsun.com>
153090         * lib/closeout.h (close_stdout_set_status, close_stdout_status):
153091         Remove.
153092         * lib/closeout.c: Likewise.  Include "closeout.h" right after config.h,
153093         to test that it can stand by itself.  Include "exitfail.h".
153094         Clients should set exit_failure instead.
153095         (EXIT_FAILURE): Remove; no longer needed.  Do not include <stdlib.h>.
153097 2003-07-18  Bruno Haible  <bruno@clisp.org>
153099         * modules/getndelim2: New file.
153100         * modules/getline: Share files with module getndelim2.
153101         * modules/getnline: Depend on getndelim2 instead of sharing files with
153102         it. Add getnline.c to lib_SOURCES.
153103         * MODULES.html.sh (func_all_modules): Add getndelim2.
153105 2003-07-18  Bruno Haible  <bruno@clisp.org>
153107         * m4/getndelim2.m4: New file.
153108         * m4/getline.m4 (AM_FUNC_GETLINE): Add AC_LIBOBJ of getndelim2.c and
153109         invoke gl_PREREQ_GETNDELIM2.
153110         (gl_PREREQ_GETLINE): Drop AC_HEADER_STDC, now done by
153111         gl_PREREQ_GETNDELIM2.
153112         * m4/getnline.m4 (gl_GETNLINE): Drop AC_HEADER_STDC, now done by
153113         gl_GETNDELIM2.
153115 2003-07-18  Bruno Haible  <bruno@clisp.org>
153117         * lib/getndelim2.h: New file.
153118         * lib/getndelim2.c: Make into a module of its own. Include config.h,
153119         getndelim2.h.
153120         (getndelim2): Make non-static. Change return type to ssize_t.
153121         * lib/getline.h: Change argument names.
153122         * lib/getline.c: Include getndelim2.h instead of getndelim2.c.
153123         * lib/getnline.c: Include getndelim2.h.
153125 2003-07-18  Andreas Schwab  <schwab@suse.de>
153127         * lib/memcoll.c (memcoll) [!HAVE_STRCOLL]: Clear errno.
153129 2003-07-17  Karl Berry  <karl@gnu.org>
153131         * config/config.sub: update from prep.
153133 2003-07-17  Bruno Haible  <bruno@clisp.org>
153135         * modules/getnline: New file.
153136         * modules/getline: Add lib/getndelim2.c to source file list.
153137         * MODULES.html.sh (func_all_modules): Add getnline.
153139 2003-07-17  Bruno Haible  <bruno@clisp.org>
153141         * m4/getnline.m4: New file.
153143 2003-07-17  Bruno Haible  <bruno@clisp.org>
153145         * m4/Makefile.am.in: Remove file.
153146         * m4/Makefile.am: Remove file.
153147         * m4/Makefile.in: Remove file.
153149 2003-07-17  Bruno Haible  <bruno@clisp.org>
153151         * lib/getnline.h: New file.
153152         * lib/getnline.c: New file.
153153         * lib/getndelim2.c: New file, extracted from getline.c.
153154         (getndelim2): Renamed from getdelim2, with added nmax argument.
153155         * lib/getline.c: Include getndelim2.c.
153156         (getdelim2): Moved out to getndelim2.c.
153157         (getline, getdelim): Update.
153159 2003-07-17  Bruno Haible  <bruno@clisp.org>
153161         * lib/Makefile.am: Remove file.
153162         * lib/Makefile.in: Remove file.
153164 2003-07-17  Bruno Haible  <bruno@clisp.org>
153166         * configure.in: Remove file.
153167         * Makefile.in: Remove file.
153169 2003-07-17  Bruno Haible  <bruno@clisp.org>
153171         * MODULES.html.sh: Put the </BODY> right before </HTML>.
153173 2003-07-16  Karl Berry  <karl@gnu.org>
153175         * config/srclist-update: was running fixlicense twice, which caused
153176                 texinfo.tex to be nullified for some reason.  Simplify,
153177                 $gplsrc is no longer needed as far as I can see?
153179 2003-07-16  Jim Meyering  <jim@meyering.net>
153181         * modules/save-cwd: Depend on xgetcwd.  From Derek Price.
153183 2003-07-15  Paul Eggert  <eggert@twinsun.com>
153185         * config/srclist.txt: Get the following files from gettext-runtime/intl
153186         instead: config.charset, localcharset.c, localcharset.h, ref-add.sin,
153187         ref-del.sin.  From Bruno Haible.
153188         * config/srclist-update (fixfile): Change grep pattern again, since the
153189         previous fix didn't work (there was another trailing $).  Use
153190         '[$]' to escape the $s.
153192 2003-07-15  Karl Berry  <karl@gnu.org>
153194         * lib/vasnprintf.c: update from gettext.
153196 2003-07-15  Karl Berry  <karl@gnu.org>
153198         * config/srclist-update (fixfile): Change grep pattern, since 'Id'
153199         gets expanded when surrounded by '$'.
153201 2003-07-15  Jim Meyering  <jim@meyering.net>
153203         * modules/save-cwd: Don't depend on error.  From Derek Price.
153205 2003-07-15  Jim Meyering  <jim@meyering.net>
153207         * lib/makepath.c (make_path): Enclose diagnostic in _(...).
153209 2003-07-14  Simon Josefsson  <jas@extundo.com>
153211         * modules/mempcpy: New file.
153212         * MODULES.html.sh (func_all_modules): Add mempcpy.
153214 2003-07-14  Simon Josefsson  <jas@extundo.com>
153216         * m4/mempcpy.m4: New file.
153218 2003-07-14  Simon Josefsson  <jas@extundo.com>
153220         * lib/mempcpy.h: New file.
153221         * lib/mempcpy.c: New file.
153223 2003-07-14  Paul Eggert  <eggert@twinsun.com>
153225         * modules/getdate, modules/posixtm: Depend on mktime.
153227 2003-07-14  Paul Eggert  <eggert@twinsun.com>
153229         * lib/ceill.c, expl.c, floorl.c, frexpl.c, ldexpl.c, mathl.h,
153230         sincosl.c, sqrtl.c, trigl.c, trigl.h, poll.c, poll_.h, mkstemp.c,
153231         unicodeio.c, unicodeio.h, unlocked-io.h:
153232         Switch from LGPL to GPL.
153234 2003-07-14  Paul Eggert  <eggert@twinsun.com>
153236         * lib/asnprintf.c, asprintf.c, config.charset, gettext.h,
153237         localcharset.c, localcharset.h, mkdtemp.c, printf-args.c,
153238         printf-args.h, printf-parse.c, printf-parse.h, ref-add.sin,
153239         ref-del.sin, setenv.c, unsetenv.c, vasnprintf.c, vasnprintf.h,
153240         vasprintf.c, vasprintf.h: Regenerate.  These files are now being
153241         updated automatically by ../config/srclist-update.  This changes
153242         their license from LPGL to GPL.
153244 2003-07-14  Paul Eggert  <eggert@twinsun.com>
153246         * config/srclist.txt: Add tons more gettext files.  $GETTEXT is now
153247         assumed to refer to the root of the most recent stable gettext version.
153248         * config/srclistvars.sh: Add defaults for eggert.
153249         * config/srclist-update: Convert LGPL to GPL in shell scripts, too.
153250         Match "This program" as well as "The program".  This is needed
153251         for gettext.
153253 2003-07-14  Jim Meyering  <jim@meyering.net>
153255         Don't emit diagnostics.  Let callers do that.
153256         * lib/save-cwd.c: Don't include "error.h".
153257         (save_cwd): Don't call error.  Ensure that errno is valid
153258         when returning nonzero.
153260         * lib/save-cwd.h (restore_cwd): Update prototype.
153261         * lib/save-cwd.c (restore_cwd): Remove two parameters.
153262         Simplify.  Don't call error upon failure.  Let callers do that.
153263         (save_cwd): Mention that Irix 5.3 has the same problem as SunOS 4
153264         when auditing is enabled.  But don't bother updating the #if.
153266 2003-07-11  Alexandre Duret-Lutz  <adl@gnu.org>
153268         * lib/obstack.h (__INT_TO_PTR): Revert change of 2003-03-13;
153269         it breaks C++ compilation.
153270         [!__GNUC__ || !__STDC__] (obstack_finish): Cast result to void*.
153272 2003-07-10  Simon Josefsson  <jas@extundo.com>
153274         * modules/strchrnul (Makefile.am): Add strchrnul.h.
153276 2003-07-10  Jim Meyering  <jim@meyering.net>
153278         * m4/clock_time.m4: Remove trailing blank.
153279         * m4/intmax_t.m4: Likewise.
153281 2003-07-10  Jim Meyering  <jim@meyering.net>
153283         * lib/vasnprintf.c: Remove trailing blanks.
153284         Make cpp indentation consistent.
153286 2003-07-09  Paul Eggert  <eggert@twinsun.com>
153288         * lib/alloca_.h, euidaccess.c, getpass.c, memrchr.c, obstack.h,
153289         posixver.c, strftime.c, strnlen.c, strverscmp.c:
153290         Switch from LGPL to GPL.
153292 2003-07-09  Paul Eggert  <eggert@twinsun.com>
153294         * config/srclist.txt: Sort sublists.  Add
153295         $LIBCSRC/sysdeps/generic/strtoul.c. In comments, add more libc files
153296         that differ from gnulib for one reason or another; we'd like this list
153297         to be smaller but for now let's document what we have.
153299 2003-07-08  Paul Eggert  <eggert@twinsun.com>
153301         * config/srclist-update: Port to POSIX 1003.1-2001 hosts by avoiding
153302         the use of GNU extensions.  Change "x=`eval echo $x`" to the shorter
153303         and sweeter "eval x=$x".
153304         * config/srclist.txt: Get lib/argp* from glibc.
153306 2003-07-07  Paul Eggert  <eggert@twinsun.com>
153308         * lib/mktime.c: Fix some boundary cases and remove need for floating
153309         point.
153311         Issue a compile-time diagnostic if time_t is floating point, or if
153312         two's complement arithmetic is not in effect, or if arithmetic
153313         right shift does not propagate the sign.  These assumptions were
153314         all in the original code but they weren't checked.
153316         (TIME_T_MIDPOINT, verify): New macros.
153317         (__isleap): Remove; it has integer overflow problems.
153318         (leapyear): New function, without those problems.
153319         (ydhms_tm_diff): Remove; splitting into two parts.
153320         (ydhms_diff): New function, containing the arithmetic part of
153321         the old ydhms_tm_diff function.  Issue a compile-time
153322         diagnostic if we are not using C99 integer division.
153323         Avoid casts when possible.
153324         (guess_time_tm): New function, containing the checking part of
153325         the old ydhms_tm_diff function.  Return the new value, rather than
153326         the difference between it and the old.  Accept a new argument T
153327         so that *T specifies the old value.  Check for overflow in the result.
153329         (__mktime_internal): Use a time_t offset, not a long int offset.
153330         This undoes the 2003-06-04 change, which is no longer needed now
153331         that we have better overflow checking.
153332         (localtime_offset): Likewise.
153334         (__mktime_internal): Avoid harmful overflow on hosts where time_t
153335         and long are 64-bit but int is only 32-bit.
153336         (ydhms_diff): Use long int to store year1 and yday1.
153337         Issue a compile-time diagnostic if long int is not wide enough.
153339         (__mktime_internal): Use long int to store adjusted year and yday.
153340         Use plain C rather than preprocessor commands, if that doesn't
153341         affect efficiency.
153342         Check for overflow (and try to repair) after each probe
153343         rather than checking only at the very end.  This avoids some bugs
153344         (e.g., southern hemisphere, behind GMT, and GMT offset at minimum time
153345         does not equal GMT offset at maximum time).
153346         Use integer to check for overflow rather than floating point; this
153347         is more portable to non-IEEE hosts, and is a tad faster.
153348         When we detect that we are oscillating between two values,
153349         don't check whether tm_isdst has the requested value, since
153350         we already know the answer.  When tm_isdst has the wrong value,
153351         use a different heuristic to find the right one, based on the
153352         extreme values actually observed in practice in tz2003a,
153353         rather than the (overly optimistic) "previous 3 calendar quarters".
153355         (not_equal_tm, print_tm, check_result): Use "const T" rather than
153356         "T const" to accommodate glibc style.
153357         (check_result): Use less-confusing report format.  "long" -> "long int.
153358         (main): Likewise.
153359         Don't loop if the iteration overflows time_t.
153360         Allow a negative step in the iteration.
153362 2003-07-06  Karl Berry  <karl@gnu.org>
153364         * config/depcomp: update from automake.
153365         * config/config.sub: update from prep.
153367 2003-07-03  Karl Berry  <karl@gnu.org>
153369         * config/config.guess: update from prep.
153371 2003-07-01  Paul Eggert  <eggert@twinsun.com>
153373         * m4/xreadlink.m4 (gl_XREADLINK): Don't check for sys/types.h, since
153374         xreadlink.c now includes it unconditionally.
153376 2003-07-01  Paul Eggert  <eggert@twinsun.com>
153378         * lib/xreadlink.c: Include <sys/types.h> unconditionally, instead of
153379         having it depend on HAVE_SYS_TYPES_H.
153381 2003-07-01  Bruno Haible  <bruno@clisp.org>
153383         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Don't include <unistd.h>.
153384         <sys/types.h> should be sufficient.
153385         Reported by Paul Eggert.
153387 2003-06-26  Karl Berry  <karl@gnu.org>
153389         * config/depcomp: update from automake.
153391 2003-06-26  Bruno Haible  <bruno@clisp.org>
153393         * modules/human: Depend on module stdbool.
153395 2003-06-25  Bruno Haible  <bruno@clisp.org>
153397         * modules/readlink: New file.
153398         * modules/xreadlink: Depend on it.
153399         * MODULES.html.sh (func_all_modules): Add readlink.
153401 2003-06-25  Bruno Haible  <bruno@clisp.org>
153403         * m4/readlink.m4: New file.
153405 2003-06-25  Bruno Haible  <bruno@clisp.org>
153407         * lib/readlink.c: New file.
153409 2003-06-22  Karl Berry  <karl@gnu.org>
153411         * config/srclist.txt: update mkinstalldirs from automake.
153412         * config/mkinstalldirs: update.
153414 2003-06-22  Bruno Haible  <bruno@clisp.org>
153416         Portability to mingw32.
153417         * m4/ssize_t.m4: New file, from GNU gettext.
153418         * m4/safe-read.m4 (gl_PREREQ_SAFE_READ): Require gt_TYPE_SSIZE_T.
153419         * m4/xreadlink.m4 (gl_XREADLINK): Require gt_TYPE_SSIZE_T.
153421 2003-06-22  Bruno Haible  <bruno@clisp.org>
153423         * modules/safe-read: Add m4/ssize_t.m4.
153424         * modules/xreadlink: Add m4/ssize_t.m4.
153426 2003-06-20  Bruno Haible  <bruno@clisp.org>
153428         Assume C89, so PARAMS isn't needed.
153429         * lib/unicodeio.h (PARAMS): Remove.
153430         * lib/unicodeio.c: Don't use PARAMS.
153432 2003-06-18  Karl Berry  <karl@gnu.org>
153434         * config/config.{guess,sub}: update from prep.
153436 2003-06-18  Jim Meyering  <jim@meyering.net>
153438         Merge changes from coreutils.
153439         * lib/readutmp.c: Include <string.h> and <stdlib.h> unconditionally.
153440         Remove explicit declarations of xmalloc and realloc.
153441         Include xalloc.h.
153442         (read_utmp): Remove anachronistic cast of xmalloc.
153444 2003-06-17  Paul Eggert  <eggert@twinsun.com>
153446         Assume C89, so PARAMS isn't needed.
153447         * lib/backupfile.h (PARAMS): Remove.  All uses removed.
153448         * lib/closeout.h, lib/dirname.h, lib/filemode.h, lib/fsusage.h,
153449         lib/getdate.h, lib/getline.h, lib/group-member.h, lib/hard-locale.h,
153450         lib/hash.h, lib/linebuffer.h, lib/long-options.h, lib/makepath.h,
153451         lib/memcasecmp.h, lib/memcoll.h, lib/modechange.h, lib/mountlist.h,
153452         lib/path-concat.h, lib/physmem.h, lib/posixtm.h, lib/quote.h,
153453         lib/readutmp.h, lib/same.h, lib/save-cwd.h, lib/savedir.h,
153454         lib/stdio-safer.h, lib/strtoimax.c, lib/strverscmp.h,
153455         lib/unistd-safer.h, lib/version-etc.h, lib/xalloc.h, lib/xreadlink.h,
153456         lib/xstrtod.h, lib/xstrtol.h: Likewise.
153457         * lib/filemode.h, lib/hard-locale.h, lib/memcoll.h, lib/modechange.h,
153458         lib/physmem.h, lib/same.h, lib/strverscmp.h: Do not include config.h;
153459         no longer needed. Anyway, config.h should always be included before any
153460         other file.
153462 2003-06-11  Simon Josefsson  <jas@extundo.com>
153464         * modules/sysexits: New file.
153465         * MODULES.html.sh (func_all_modules): Add sysexits.
153467 2003-06-11  Simon Josefsson  <jas@extundo.com>
153469         * lib/sysexit_.h: New file.
153471 2003-06-11  Derek Price  <derek@ximbiot.com>
153473         * lib/stat.c [LSTAT]: Compile/use slash_aware_lstat only if it is
153474         necessary.
153476 2003-06-11  Bruno Haible  <bruno@clisp.org>
153478         * m4/sysexits.m4: New file.
153480 2003-06-10  Simon Josefsson  <jas@extundo.com>
153482         * lib/argp.h: New file, from glibc.
153483         * lib/argp-ba.c: New file, from glibc.
153484         * lib/argp-eexst.c: New file, from glibc.
153485         * lib/argp-fmtstream.c: New file, from glibc.
153486         * lib/argp-fmtstream.h: New file, from glibc.
153487         * lib/argp-fs-xinl.c: New file, from glibc.
153488         * lib/argp-help.c: New file, from glibc.
153489         * lib/argp-namefrob.h: New file, from glibc.
153490         * lib/argp-parse.c: New file, from glibc.
153491         * lib/argp-pv.c: New file, from glibc.
153492         * lib/argp-pvh.c: New file, from glibc.
153493         * lib/argp-xinl.c: New file, from glibc.
153495 2003-06-10  Simon Josefsson  <jas@extundo.com>
153497         * modules/strchrnul: New file.
153499 2003-06-10  Simon Josefsson  <jas@extundo.com>
153501         * modules/argp: New file.
153503 2003-06-10  Simon Josefsson  <jas@extundo.com>
153505         * m4/strchrnul.m4: New file.
153507 2003-06-10  Simon Josefsson  <jas@extundo.com>
153509         * lib/strchrnul.h: New file.
153510         * lib/strchrnul.c: New file.
153512 2003-06-10  Bruno Haible  <bruno@clisp.org>
153514         * MODULES.html.sh (func_all_modules): Add strchrnul and argp.
153516 2003-06-07  Karl Berry  <karl@gnu.org>
153518         * config/config.{guess,sub}: update from prep.
153520 2003-06-07  Jim Meyering  <jim@meyering.net>
153522         * modules/strtod: Use $(...) notation, not @...@ for
153523         AC_REPLACE'd variables.
153524         * modules/localcharset: Likewise.
153526 2003-06-07  Jim Meyering  <jim@meyering.net>
153528         * lib/readtokens.h: Put `Free Software Foundation, Inc.'
153529         in place of my name in the copyright comment.
153530         Remove definition and uses of __P.
153532         From coreutils.
153533         * lib/stat.c: Don't declare xmalloc explicitly.
153534         Instead, include "xalloc.h".
153535         * lib/readtokens.c (readtokens): Remove anachronistic casts of xmalloc,
153536         xrealloc, and xcalloc return values.
153537         * lib/xgetcwd.c (xgetcwd): Include "xgetcwd.h".
153538         Improve comment.
153539         * lib/xgetcwd.h: Remove definition/uses of PARAMS.
153541 2003-06-07  Bruno Haible  <bruno@clisp.org>
153543         * modules/poll (Makefile.am): Use explicit creation rule for poll.h, to
153544         avoid AC_CONFIG_LINKS.
153545         * modules/fnmatch (Makefile.am): Use explicit creation rule for
153546         fnmatch.h, to avoid AC_CONFIG_LINKS.
153547         * modules/alloca (Makefile.am): Make creation of alloca.h Ctrl-C safe.
153549 2003-06-07  Bruno Haible  <bruno@clisp.org>
153551         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH, gl_FUNC_FNMATCH_POSIX,
153552         gl_FUNC_FNMATCH_GNU): Set FNMATCH_H instead of invoking
153553         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
153554         directory.
153555         * m4/poll.m4 (gl_FUNC_POLL): Set POLL_H instead of invoking
153556         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
153557         directory.
153559 2003-06-06  Jim Meyering  <jim@meyering.net>
153561         Merge from coreutils.
153562         * lib/same.c: (same_name): Declare *_basename locals to be `const'.
153563         Consolidate declarations and initializations of *_base* locals.
153565         Merge from coreutils.
153566         This avoids a core dump on systems without GNU putenv,
153567         when running `env -u SOME_ALREADY_UNSET_VARIABLE'.
153568         * lib/putenv.c (__set_errno, LOCK, UNLOCK): Define.
153569         (unsetenv): New static function, from GNU libc.
153570         (rpl_putenv): Use it.
153572         * lib/modechange.c: Remove trailing blanks.
153574         Merge from coreutils.
153575         * lib/fsusage.c: Remove declaration of statfs.
153576         It conflicted with one from OSF/1 5.1 in <sys/mount.h>.
153578         * lib/posixtm.c: Include <stdbool.h> unconditionally.
153580 2003-06-06  Jim Meyering  <jim@meyering.net>
153582         * lib/stdbool_.h: Renamed from stdbool.h.in.
153584 2003-06-06  Jim Meyering  <jim@meyering.net>
153585             Bruno Haible  <bruno@clisp.org>
153587         * modules/stdbool: Reflect renaming: stdbool.h.in -> stdbool_.h.
153588         Adjust Makefile.am snippet not to redirect directly to target.
153589         Use $(STDBOOL_H) notation, not @STDBOOL_H@ for AC_REPLACE'd variables.
153591 2003-06-05  Paul Eggert  <eggert@twinsun.com>
153593         * lib/mktime.c (__mktime_internal): When resolving a tm_isdst
153594         mismatch, look in future quarters as well as past.  This fixes a
153595         bug when processing fall-backwards gaps immediately after a long
153596         period of daylight-saving time.
153598         * lib/mktime.c: Assume freestanding C89 or better.
153599         (HAVE_LIMITS_H): Remove.  Assume it's 1.
153600         (__P): Remove; not used.
153601         (CHAR_BIT, INT_MIN, INT_MAX): Remove; <limits.h> defines them.
153602         (mktime, not_equal_tm, print_tm, check_result,
153603         main): Use prototypes.  Use const * where appropriate.
153604         (main): Fix typo in testing code that uncovered by above changes.
153605         (Local Variables): Remove -DHAVE_LIMITS_H from compile-command.
153607 2003-06-04  Paul Eggert  <eggert@twinsun.com>
153609         * m4/human.m4 (gl_HUMAN): Require AM_STDBOOL_H.  Check for
153610         locale.h, localeconv.  This merges changes from coreutils.
153612         * m4/mktime.m4 (AC_FUNC_MKTIME): New macro, taken from Autoconf CVS.
153613         It can be removed after the next Autoconf is released.
153614         * m4/exclude.m4 (gl_EXCLUDE): Don't check for sys/types.h; no loner
153615         needed.
153617 2003-06-04  Paul Eggert  <eggert@twinsun.com>
153619         * lib/mktime.c: Fix Debian bug 177940
153620         <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=177940>.
153621         (localtime_offset): Now long int, not time_t, because we want it
153622         to be guaranteed to be signed.  All uses changed.
153623         (__mktime_internal): If overflow would occur when adding offset,
153624         don't add it.
153626         Merge 'human' changes from coreutils.  Rewrite to support
153627         locale-specific notations like thousands separators.
153628         * lib/human.c: Simplify authorship notice.
153629         Include human.h immediately after config.h.
153630         <sys/types.h>, <stdio.h>: Do not include; no longer needed.
153631         <limits.h>: Do not include, since human.h does.
153632         (SIZE_MAX, UINTMAX_MAX): New macros.
153633         <strings.h>: Include if HAVE_STRINGS_H, not if !HAVE_STRING_H.
153634         <locale.h>: Include if HAVE_LOCALE_H and HAVE_LOCALECONV.
153635         (HUMAN_READABLE_SUFFIX_LENGTH_MAX): New macro.
153636         (power_letter): Renamed from suffixes.
153637         (generate_suffix_backwards): Remove.
153638         (adjust_value): Now takes int style (because of human.h changes)
153639         and long double value (for greater precision on some platforms).
153640         (group_number): New function.
153641         (human_readable): Use it.  Use integer options, not enum.
153642         Put the options before the sizes in the arg list.
153643         Support all the new options.
153644         The old human_readable function has been removed;
153645         use inttostr.h instead.
153646         (human_readable, default_block_size, humblock):
153647         Use uintmax_t, not int, for block sizes.
153648         (human_readable_inexact, block_size_types): Remove.
153649         (block_size_opts): New constant.
153650         (human_options): Renamed from human_block_size, with new signature
153651         that allows block sizes up to UINTMAX_MAX.  All callers changed.
153652         * lib/human.h: Add copyright and authorship notice.
153653         Include <limits.h> and <stdbool.h> unconditionally.
153654         (PARAMS): Remove.  All uses removed.
153655         (LONGEST_HUMAN_READABLE): Add support for thousands separator.
153656         (enum human_inexact_style): Remove tag; now a nameless enum.
153657         (human_floor, human_ceiling, human_round_to_even): Now have
153658         values 2, 0, 1 rather than -1, 1, 0.
153659         (human_group_digits, human_suppress_point_zero, human_autoscale,
153660         human_base_1024, human_SI, human_B): New constants.
153661         (human_readable_inexact, human_block_size): Remove.
153662         (human_readable): Size args are now uintmax_t, not int.
153663         (human_options): New decl.
153665         * lib/exclude.c: (new_exclude, add_exclude): Remove casts that are
153666         unnecessary now that we assume C89 or better.  This change
153667         imported from coreutils.
153669         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
153670         arbitrarily.  This is the same patch as 2003-05-28, but it got lost
153671         in the 2003-05-30 sync from glibc.
153673         .h files should stand alone, but we shouldn't include <sys/types.h>
153674         if we can get away with just <stddef.h>.
153676         * lib/__fpending.h, addext.c, backupfile.c, exclude.c, getline.c,
153677         malloc.c, putenv.c, realloc.c, strcasecmp.c: Include <stddef.h>
153678         rather than <sys/types.h>, as we merely need size_t.
153679         * lib/dirname.h, memcoll.h, xalloc.h, xmemcoll.h: Include <stddef.h>,
153680         to get size_t.
153681         * lib/hash.h, linebuffer.h, readtokens.h, stdio-safer.h, version-etc.h:
153682         Include <stdio.h>, to get FILE.
153683         * lib/memcasecmp.c: Don't include <sys/types.h>, as we can assume
153684         memcasecmp.h has included <stddef.h> and all we need is size_t.
153685         * lib/memcoll.c: Include "memcoll.h", which gets us size_t and checks
153686         our interface, instead of including <sys/types.h>
153688 2003-06-04  Paul Eggert  <eggert@twinsun.com>
153690         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): Comment out for
153691         now, as glibc mktime is buggy on non-glibc systems.
153693 2003-06-03  Karl Berry  <karl@gnu.org>
153695         * config/config.sub: update from prep.
153697 2003-06-02  Paul Eggert  <eggert@twinsun.com>
153699         [from coreutils]
153700         Fix some minor time-related bugs with POSIX time arguments.
153701         Some valid time stamps were being rejected (notably -1, and
153702         time stamps before 1900 on 64-bit hosts).  And some invalid
153703         time stamps were being accepted, e.g. September 31.
153705         * lib/posixtm.h (posixtime): Return bool instead of time_t, so
153706         that we can return (time_t) -1 successfully.
153707         * lib/posixtm.c: Likewise.
153708         [HAVE_STDBOOL_H]: Include <stdbool.h>.
153709         (bool, false, true) [!HAVE_STDBOOL_H]: New type.
153710         (t): Remove static var.
153711         (year, posix_time_parse): Now takes struct tm * arg to modify, instead
153712         of static var.  All uses changed.
153713         (year): Do not reject years before 1900; they can occur with
153714         64-bit time_t.
153715         (posix_time_parse): Do not check for out-of-range components;
153716         that is now the caller's responsibility, since our checks were
153717         only approximations.
153718         (posixtime): Use mktime to check for out-of-range components,
153719         since it knows them exactly.
153720         If mktime returns (time_t) -1, check whether an error actually occurred
153721         by invoking localtime on -1.
153722         (main) [TEST_POSIXTIME]: Check for input data errors, and report
153723         posixtime failures better.
153724         Improve the test data (in comments only).
153726 2003-06-02  Karl Berry  <karl@gnu.org>
153728         * config/mkinstalldirs (version): new variable.
153729         (--version): new option.
153730         (usage): improve message.
153732 2003-05-30  Karl Berry  <karl@gnu.org>
153734         * lib/mktime.c: update from libc.
153736 2003-05-30  Bruno Haible  <bruno@clisp.org>
153738         * modules/gettext: Add files m4/nls.m4 and m4/po.m4.
153739         * config/config.rpath: Upgrade to gettext-0.12.1.
153741 2003-05-30  Bruno Haible  <bruno@clisp.org>
153743         * m4/gettext.m4: Upgrade to gettext-0.12.1.
153744         * m4/nls.m4: New file, from gettext-0.12.1.
153745         * m4/po.m4: New file, from gettext-0.12.1.
153746         * m4/progtest.m4: Upgrade to gettext-0.12.1.
153748 2003-05-30  Bruno Haible  <bruno@clisp.org>
153750         * lib/config.charset: Upgrade to gettext-0.12.1 and libiconv-1.9.1.
153751         * lib/localcharset.h: Likewise.
153752         * lib/localcharset.c: Likewise.
153754 2003-05-29  Karl Berry  <karl@gnu.org>
153756         * config/config.rpath: update from gettext.
153758 2003-05-28  Paul Eggert  <eggert@twinsun.com>
153760         Assume the headers required for C89 freestanding compilers.
153761         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for limits.h.
153762         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Likewise.
153763         * m4/human.m4 (gl_HUMAN): Likewise.
153764         * m4/pathmax.m4 (gl_PATHMAX): Likewise.
153765         * m4/rpmatch.m4 (gl_FUNC_RPMATCH): Likewise.
153766         * m4/userspec.m4 (gl_USERSPEC): Likewise.
153767         * m4/xreadlink.m4 (gl_XREADLINK): Likewise.
153768         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
153769         * m4/quote.m4 (gl_QUOTE): Don't check for stddef.h.
153771 2003-05-28  Paul Eggert  <eggert@twinsun.com>
153773         Assume the headers required for C89 freestanding compilers.
153774         * lib/addext.c, lib/backupfile.c, lib/fsusage.c, lib/human.c,
153775         lib/pathmax.h, lib/rpmatch.c, lib/userspec.c, lib/xreadlink.c,
153776         lib/xstrtol.c: Include <limits.h> without checking for HAVE_LIMITS_H.
153777         * lib/backupfile.c, lib/fsusage.c, lib/hash.c, lib/human.c,
153778         lib/safe-read.c, lib/userspec.c, lib/xstrtol.c (CHAR_BIT): Don't
153779         define, since <limits.h> is guaranteed to do that.
153780         * lib/fatal.c: Include <stdarg.h> without checking for __STDC__.
153781         * lib/exclude.c: Include <stdbool.h> unconditionally.
153782         * lib/tempname.c: Include <stddef.h> unconditionally.
153783         * lib/hash.c: Include <limits.h>, since we no longer define CHAR_BIT.
153784         * lib/modechange.c, rpmatch.c (NULL): Don't define, since
153785         <stddef.h> does that.
153786         * lib/quote.c: Dont include <stddef.h> or <sys/types.h>; not needed.
153787         * lib/safe-read.c (INT_MAX): Don't define, since <limits.h> does that.
153788         * lib/safe-read.c (TYPE_MINIMUM, TYPE_MAXIMUM): Remove; no longer
153789         needed.
153790         * lib/xstrtol.c: Likewise.
153791         * lib/safe-read.c: Remove TYPE_SIGNED; no longer needed.
153792         * lib/savedir.c: Include <stddef.h> instead of defining NULL.
153794         * lib/addext.c (addext): Use assignment rather than cast, to avoid
153795         warnings on some platforms.
153797         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
153798         arbitrarily.
153800 2003-05-26  Jim Meyering  <jim@meyering.net>
153802         Merge in a change from coreutils:
153803         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Test the cache variable, not one
153804         that is guaranteed to be `no'.  Use `no_such_member' to indicate
153805         that condition, rather than `-1' which is slightly misleading.
153806         Change the name of the cache variable to have the gl_ prefix.
153807         Prompted by a patch from Richard Dawe for DJGPP.
153809 2003-05-24  Karl Berry  <karl@gnu.org>
153811         * config/config.guess: update from prep.
153813 2003-05-22  Karl Berry  <karl@gnu.org>
153815         * gnulib-tool (func_usage): =LIBRARY not =libRARY in help msg.
153817 2003-05-20  Karl Berry  <karl@gnu.org>
153819         * config/config.guess: update from prep.
153821 2003-05-18  Karl Berry  <karl@gnu.org>
153823         * config/srclistvars.sh (TEXMF): use TEXMFROOT instead, since TEXMF
153824         might actually be set by the user.
153826         * config/depcomp, install-sh, mdate-sh: update from automake.
153828 2003-05-17  Bruno Haible  <bruno@clisp.org>
153830         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Fix a quoting bug leading to an
153831         invalid expansion for AC_EGREP_CPP.
153832         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Likewise.
153833         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Likewise.
153834         Suggested by Akim Demaille <akim@epita.fr> in
153835         http://mail.gnu.org/r/bug-autoconf/2003-05/threads.html
153837 2003-05-12  Jim Meyering  <jim@meyering.net>
153839         * lib/strftime.c (my_strftime): Let the `-' (no-pad) flag affect
153840         the space-padded-by-default conversion specifiers, %e, %k, %l.
153842 2003-05-12  Bruno Haible  <bruno@clisp.org>
153844         * lib/linebreak.c (iconv_string_length): Don't return -1 just because
153845         the string is longer than 4 KB.
153847 2003-05-11  Karl Berry  <karl@gnu.org>
153849         * config/config.{guess,sub}: update from prep.
153851 2003-05-09  Bruno Haible  <bruno@clisp.org>
153853         * modules/error: Add m4/strerror_r.m4 to file list.
153855 2003-05-03  Bruno Haible  <bruno@clisp.org>
153857         Upgrade to Unicode-4.0.
153858         * lib/linebreak.c (nonspacing_table_data): Change width of U+00AD,
153859         U+0350..U+0357, U+035D..U+035F, U+0600..U+0603, U+0610..U+0615,
153860         U+0656..U+0658, U+0A01, U+0AE2..U+0AE3, U+0CBC, U+17B4..U+17B5,
153861         U+17DD, U+1920..U+1922, U+1927..U+192B, U+1932, U+1939..U+193B
153862         from 1 to 0. Change width of U+0CBF, U+0CC6, U+180E from 0 to 1.
153863         (uc_width): Change width of U+4DC0..U+4DFF from 2 to 1. Change width
153864         of U+2A6D7..U+2F7FF, U+2FA1E..U+2FFFD, U+30000..U+3FFFD from 1 to 2.
153865         Change width of U+E0100..U+E01EF from 1 to 0.
153867 2003-04-25  Jim Meyering  <jim@meyering.net>
153869         * lib/copy-file.c (copy_file_preserving): Declare buf_size to be
153870         of type size_t, not int.
153872 2003-04-25  Bruno Haible  <bruno@clisp.org>
153874         * lib/copy-file.c: Include <stddef.h>, for size_t.
153876 2003-04-21  Paul Eggert  <eggert@twinsun.com>
153878         * m4/error.m4 (gl_ERROR): Do not put under dynamic conditions some
153879         code which expansion is under static control.  Patch imported from
153880         Akim Demaille's patch to Bison; see
153881         <http://mail.gnu.org/r/bison-patches/2003-03/msg00057.html>.
153883 2003-04-14  Bruno Haible  <bruno@clisp.org>
153885         * m4/error.m4 (jm_PREREQ_ERROR): Use AC_FUNC_VPRINTF.
153887 2003-04-11  Jim Meyering  <jim@meyering.net>
153889         Merge changes from Coreutils.
153891         2003-03-22  Jim Meyering  <jim@meyering.net>
153893         * lib/strftime.c (widen): Cast alloca return value to proper type.
153895         2003-01-19  Ulrich Drepper  <drepper@redhat.com>
153897         From GNU libc.
153898         * lib/strftime.c (my_strftime): Handle very large width
153899         specifications for numeric values correctly.  Improve checks for
153900         overflow.
153902         2003-01-19  Jim Meyering  <jim@meyering.net>
153904         * lib/strftime.c (widen) [COMPILE_WIDE]: Merge nearly-identical
153905         definitions.
153906         (nl_get_alt_digit) [! defined my_strftime]: Define.
153907         (my_strftime) [_NL_CURRENT]: Merge nearly-identical uses of
153908         _nl_get_alt_digit and _nl_get_walt_digit.
153910         * lib/strftime.c (my_strftime): Merge in locale-related changes from
153911         libc. These changes have no effect outside of _LIBC.
153913 2003-04-10  Bruno Haible  <bruno@clisp.org>
153915         * modules/findprog: New file.
153916         * MODULES.html.sh (func_all_modules): Add it.
153918 2003-04-10  Bruno Haible  <bruno@clisp.org>
153920         * m4/findprog.m4: New file.
153921         * m4/eaccess.m4: New file.
153923 2003-04-10  Bruno Haible  <bruno@clisp.org>
153925         * lib/findprog.h: New file, from GNU gettext.
153926         * lib/findprog.c: New file, from GNU gettext.
153928 2003-04-05  Jim Meyering  <jim@meyering.net>
153930         Merge changes from Coreutils.
153932         * lib/exclude.h (PARAMS): Remove definition and uses.
153933         * lib/exclude.c: Remove uses of `PARAMS'.
153935         * lib/dirname.c [TEST_DIRNAME]: Update build instructions for test.
153936         Add test-cases for DOS filenames. Declare program_name.
153937         (main): Set up program_name.  Patch by Rich Dawe.
153939         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
153940         error from mntctl.
153941         Use mntctl's return value to drive the entry-processing loop, since
153942         we can't rely on the value of the vmt_length member in the last
153943         entry.  On some systems doing so could result in exhausting
153944         virtual memory.  Based in part on a patch from Mike Jetzer.
153946 2003-04-04  Bruno Haible  <bruno@clisp.org>
153948         * modules/linebreak: New file.
153949         * MODULES.html.sh (func_all_modules): Add it.
153951 2003-04-04  Bruno Haible  <bruno@clisp.org>
153953         * m4/linebreak.m4: New file.
153955 2003-04-04  Bruno Haible  <bruno@clisp.org>
153957         * lib/linebreak.h: New file, from GNU gettext.
153958         * lib/linebreak.c: New file, from GNU gettext with slight
153959         modifications.
153960         * lib/lbrkprop.h: New file, from GNU gettext.
153962 2003-04-03  Bruno Haible  <bruno@clisp.org>
153964         * modules/utf8-ucs4: New file.
153965         * modules/utf16-ucs4: New file.
153966         * modules/ucs4-utf8: New file.
153967         * modules/ucs4-utf16: New file.
153968         * MODULES.html.sh (func_all_modules): Add them.
153970 2003-04-03  Bruno Haible  <bruno@clisp.org>
153972         * m4/utf-ucs4.m4: New file.
153973         * m4/ucs4-utf.m4: New file.
153975 2003-04-03  Bruno Haible  <bruno@clisp.org>
153977         * lib/utf8-ucs4.h: New file, from GNU gettext.
153978         * lib/utf16-ucs4.h: New file, from GNU gettext.
153979         * lib/ucs4-utf8.h: New file, from GNU gettext.
153980         * lib/ucs4-utf16.h: New file, from GNU gettext.
153982 2003-04-02  Bruno Haible  <bruno@clisp.org>
153984         * modules/binary-io: New file.
153985         * MODULES.html.sh (func_all_modules): Add it.
153987 2003-04-02  Bruno Haible  <bruno@clisp.org>
153989         * lib/binary-io.h: New file, from GNU gettext.
153991 2003-04-01  Bruno Haible  <bruno@clisp.org>
153993         * modules/pathname: New file.
153994         * MODULES.html.sh (func_all_modules): Add it.
153996 2003-04-01  Bruno Haible  <bruno@clisp.org>
153998         * lib/pathname.h: New file, from GNU gettext.
153999         * lib/concatpath.c: New file, from GNU gettext.
154001 2003-03-30  Bruno Haible  <bruno@clisp.org>
154003         * m4/copy-file.m4 (gl_COPY_FILE): Add check for chown().
154005 2003-03-30  Bruno Haible  <bruno@clisp.org>
154007         * lib/copy-file.c (copy_file_preserving): Don't set owner if the
154008         function chown() doesn't exist.
154010 2003-03-28  Bruno Haible  <bruno@clisp.org>
154012         * modules/copy-file: New file.
154013         * MODULES.html.sh (func_all_modules): Add it.
154015 2003-03-28  Bruno Haible  <bruno@clisp.org>
154017         * m4/copy-file.m4: New file.
154019 2003-03-28  Bruno Haible  <bruno@clisp.org>
154021         * lib/copy-file.h: New file, from GNU gettext.
154022         * lib/copy-file.c: New file, from GNU gettext.
154024 2003-03-18  Jim Meyering  <jim@meyering.net>
154026         * lib/quote.c (quote_n): Fix typo in comment.
154028 2003-03-18  Bruno Haible  <bruno@clisp.org>
154030         * m4/onceonly.m4: Use m4_defn instead of defn, for better error
154031         checking.
154032         * m4/onceonly_2_57.m4: Likewise.
154034 2003-03-17  Bruno Haible  <bruno@clisp.org>
154036         * m4/onceonly.m4: Require autoconf 2.54 or newer.
154037         (m4_quote): Remove macro.
154038         * m4/onceonly_2_57.m4: Require autoconf 2.54 or newer.
154040 2003-03-14  Jim Meyering  <jim@meyering.net>
154042         Merge changes from Coreutils.
154043         * lib/obstack.h (obstack_object_size): Declare temporary, __o,
154044         to be const, in order to avoid warnings.
154045         (obstack_room): Likewise.
154046         (obstack_empty_p): Likewise.
154048 2003-03-14  Bruno Haible  <bruno@clisp.org>
154050         * m4/onceonly_2_57.m4 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE,
154051         AC_CHECK_DECLS_ONCE): Quote AC_FOREACH variable-expansions properly.
154053 2003-03-13  Paul Eggert  <eggert@twinsun.com>
154055         Merge changes from Bison.
154056         * lib/obstack.h: (__INT_TO_PTR) [__STDC__]: Cast result to
154057         (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
154058         when compiling Bison 1.875's `bitset bset = obstack_alloc
154059         (bobstack, bytes);'.  Problem reported by Nelson H. F. Beebe.
154060         * lib/hash.c: Include <stdbool.h> unconditionally.
154062 2003-03-13  Paul Eggert  <eggert@twinsun.com>
154064         * m4/onceonly.m4 (m4_quote): New macro.
154065         (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
154066         Quote AC_FOREACH variable-expansions properly.
154068 2003-03-13  Paul Eggert  <eggert@twinsun.com>
154070         * doc/COPYING.DOC, fdl.texi: Sync with latest FSF version.
154072 2003-03-09  Paul Eggert  <eggert@twinsun.com>
154074         * lib/argmatch.c (EXIT_FAILURE): Define if the system doesn't.
154075         Reported by Bruce Becker; see:
154076         http://mail.gnu.org/r/bug-bison/2003-03/msg00017.html
154078 2003-03-03  Paul Eggert  <eggert@twinsun.com>
154079             Bruno Haible  <bruno@clisp.org>
154081         * lib/mbswidth.h: Include <wchar.h>. Needed for UnixWare 7.1.1.
154082         Reported by John Hughes, see
154083         http://mail.gnu.org/r/bug-bison/2003-02/msg00030.html
154085 2003-02-20  Bruno Haible  <bruno@clisp.org>
154087         * MODULES.html.sh (func_all_modules): Add poll.
154089 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
154091         * modules/poll: New file.
154093 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
154095         * lib/poll_.h: New file.
154096         * lib/poll.c: New file.
154098 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
154100         * m4/poll.m4: New file.
154102 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
154104         * modules/mathl: New file.
154106 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
154108         * lib/mathl.h: New file.
154109         * lib/acosl.c: New file.
154110         * lib/asinl.c: New file.
154111         * lib/atanl.c: New file.
154112         * lib/ceill.c: New file.
154113         * lib/cosl.c: New file.
154114         * lib/expl.c: New file.
154115         * lib/floorl.c: New file.
154116         * lib/frexpl.c: New file.
154117         * lib/ldexpl.c: New file.
154118         * lib/logl.c: New file.
154119         * lib/sincosl.c: New file.
154120         * lib/sinl.c: New file.
154121         * lib/sqrtl.c: New file.
154122         * lib/tanl.c: New file.
154123         * lib/trigl.c: New file.
154124         * lib/trigl.h: New file.
154126 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
154128         * m4/mathl.m4: New file.
154130 2003-02-18  Bruno Haible  <bruno@clisp.org>
154132         * MODULES.html.sh (func_all_modules): Add mathl.
154134 2003-02-17  Bruno Haible  <bruno@clisp.org>
154136         * modules/mkdtemp: New module.
154137         * MODULES.html.sh (func_all_modules): Add it.
154139 2003-02-17  Bruno Haible  <bruno@clisp.org>
154141         * m4/mkdtemp.m4: New file, from GNU gettext with modifications.
154143 2003-02-17  Bruno Haible  <bruno@clisp.org>
154145         * lib/mkdtemp.h: New file, from GNU gettext.
154146         * lib/mkdtemp.c: New file, from GNU gettext.
154148 2003-02-02  Jim Meyering  <jim@meyering.net>
154150         * m4/regex.m4 (jm_INCLUDED_REGEX): Detect broken re_search in
154151         e.g. glibc-2.2.93.
154153 2003-01-31  Bruno Haible  <bruno@clisp.org>
154155         * m4/rename.m4 (vb_FUNC_RENAME): Add a redirection from 'rename' to
154156         'rpl_rename'.
154157         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Add a redirection from 'strnlen' to
154158         'rpl_strnlen'.
154159         * m4/strtod.m4 (gl_FUNC_STRTOD): Add a redirection from 'strtod' to
154160         'rpl_strtod'.
154161         * m4/utime.m4 (jm_FUNC_UTIME): Add a redirection from 'utime' to
154162         'rpl_utime'.
154164 2003-01-31  Bruno Haible  <bruno@clisp.org>
154166         * lib/rename.c: #undef rename before defining rpl_rename.
154167         * lib/strnlen.c: #undef strnlen, define rpl_strnlen instead of strnlen.
154169 2003-01-30  Bruno Haible  <bruno@clisp.org>
154171         * modules/vasnprintf, modules/vasprintf: New modules.
154172         * MODULES.html.sh (func_all_modules): Add them.
154174 2003-01-30  Bruno Haible  <bruno@clisp.org>
154176         * m4/signed.m4: New file, from GNU gettext.
154177         * m4/longdouble.m4: New file, from GNU gettext.
154178         * m4/wchar_t.m4: New file, from GNU gettext.
154179         * m4/wint_t.m4: New file, from GNU gettext.
154180         * m4/vasnprintf.m4: New file.
154181         * m4/vasprintf.m4: New file.
154183 2003-01-30  Bruno Haible  <bruno@clisp.org>
154185         * lib/printf-args.h: New file, from GNU gettext.
154186         * lib/printf-args.c: New file, from GNU gettext.
154187         * lib/printf-parse.h: New file, from GNU gettext.
154188         * lib/printf-parse.c: New file, from GNU gettext.
154189         * lib/vasnprintf.h: New file, from GNU gettext.
154190         * lib/vasnprintf.c: New file, from GNU gettext.
154191         * lib/asnprintf.c: New file, from GNU gettext.
154192         * lib/vasprintf.h: New file, from GNU gettext with modifications.
154193         * lib/vasprintf.c: New file, from GNU gettext.
154194         * lib/asprintf.c: New file, from GNU gettext.
154196 2003-01-29  Bruno Haible  <bruno@clisp.org>
154198         * modules/stpncpy: New module.
154199         * MODULES.html.sh (func_all_modules): Add it.
154201 2003-01-29  Bruno Haible  <bruno@clisp.org>
154203         * m4/stpncpy.m4: New file.
154205 2003-01-29  Bruno Haible  <bruno@clisp.org>
154207         * lib/stpncpy.h: New file, from GNU gettext with modifications.
154208         * lib/stpncpy.c: New file, from GNU gettext with modifications.
154210 2003-01-28  Bruno Haible  <bruno@clisp.org>
154212         * modules/c-ctype: New module.
154213         * MODULES.html.sh (func_all_modules): Add it.
154215 2003-01-28  Bruno Haible  <bruno@clisp.org>
154217         * lib/c-ctype.h: New file, from GNU gettext, with changes suggested by
154218         Paul Eggert.
154219         * lib/c-ctype.c: New file, from GNU gettext, with changes suggested by
154220         Paul Eggert.
154222 2003-01-27  Bruno Haible  <bruno@clisp.org>
154224         * modules/xsetenv: New module.
154225         * MODULES.html.sh (func_all_modules): Add it.
154227 2003-01-27  Bruno Haible  <bruno@clisp.org>
154229         * lib/xsetenv.h: New file, from GNU gettext.
154230         * lib/xsetenv.c: New file, from GNU gettext.
154232 2003-01-23  Jim Meyering  <jim@meyering.net>
154234         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Correct typo: s/-1/no/ that kept this
154235         from working on systems without dirfd (at least Irix and OSF1/Tru64).
154237 2003-01-23  Bruno Haible  <bruno@clisp.org>
154239         * modules/minmax: New module.
154240         * MODULES.html.sh (func_all_modules): Add it.
154242 2003-01-23  Bruno Haible  <bruno@clisp.org>
154244         * lib/minmax.h: New file, from GNU gettext, with comments from Paul
154245         Eggert.
154247 2003-01-22  Bruno Haible  <bruno@clisp.org>
154249         * modules/exit: New module.
154250         * MODULES.html.sh (func_all_modules): Add it.
154252 2003-01-22  Bruno Haible  <bruno@clisp.org>
154254         * lib/exit.h: New file, from GNU gettext.
154256 2003-01-19  Bruno Haible  <bruno@clisp.org>
154258         * gnulib-tool: Recognize option --extract-maintainer.
154259         (func_get_maintainer): New function.
154260         * modules/*: Add Maintainer entry.
154262 2003-01-16  Jim Meyering  <jim@meyering.net>
154264         * m4/regex.m4: The `regex' struct is both input and output.
154265         Initialize it before each use.  Patch by Tim Waugh.
154267 2003-01-16  Bruno Haible  <bruno@clisp.org>
154269         * MODULES.html.sh: Add a table of contents. Add the module name as
154270         leftmost column. Add hyperlinks.
154272 2003-01-15  Bruno Haible  <bruno@clisp.org>
154274         * m4/md5.m4 (gl_MD5): Require AC_C_INLINE.
154276 2003-01-15  Bruno Haible  <bruno@clisp.org>
154278         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): Also test the LL suffix.
154279         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Also test the ULL
154280         suffix.
154282 2003-01-15  Bruno Haible  <bruno@clisp.org>
154284         * m4/alloca.m4 (gl_FUNC_ALLOCA): Invoke AC_EGREP_CPP prerequisites.
154286 2003-01-15  Bruno Haible  <bruno@clisp.org>
154288         * lib/stpcpy.h (stpcpy): Use ANSI C function declarations.
154289         * lib/strcase.h (strcasecmp, strncasecmp): Likewise.
154291 2003-01-14  Jim Meyering  <jim@meyering.net>
154293         * lib/same.c (same_name): Tweak a comment.
154295 2003-01-14  Bruno Haible  <bruno@clisp.org>
154297         * lib/same.c (same_name): Reorder tests so as to avoid calling stat()
154298         when a string comparison is sufficient.
154300 2003-01-14  Bruno Haible  <bruno@clisp.org>
154302         * lib/readtokens.c (readtoken): Cast character to 'unsigned char', not
154303         'unsigned int'.
154305 2003-01-14  Bruno Haible  <bruno@clisp.org>
154307         * lib/hash-pjw.c: Add comment about low quality of this function.
154309 2003-01-13  Bruno Haible  <bruno@clisp.org>
154311         * modules/stpcpy: Distribute lib/stpcpy.h.
154312         * modules/setenv: Depend on alloca. Distribute lib/setenv.h.
154314 2003-01-13  Bruno Haible  <bruno@clisp.org>
154316         * modules/*: Add a description.
154317         * modules/strpbrk: Fix Makefile.am snippet.
154318         * modules/strtoimax: Fix dependencies.
154319         * modules/strtoumax: Likewise.
154321 2003-01-13  Bruno Haible  <bruno@clisp.org>
154323         * gnulib-tool (func_create_testdir): Substitute lib_OBJECTS.
154324         * modules/alloca (Makefile.am): All object files depend on alloca.h.
154325         * modules/stdbool (Makefile.am): All object files depend on stdbool.h.
154327 2003-01-13  Bruno Haible  <bruno@clisp.org>
154329         * gnulib-tool (func_create_testdir): Store config/* files in the main
154330         directory.
154331         * config.rpath: Move to ...
154332         * config/config.rpath: ... here.
154333         * modules/gettext: Contains config/config.rpath, not config.rpath.
154334         * modules/iconv: Likewise.
154336 2003-01-12  Paul Eggert  <eggert@twinsun.com>
154338         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
154339         to avoid collisions with libcurses and libreadline.
154341         * m4/getstr.m4: Remove.
154342         * m4/getline.m4 (gl_PREREQ_GETLINE): Require AC_HEADER_STDC.
154344 2003-01-12  Paul Eggert  <eggert@twinsun.com>
154346         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
154347         to avoid collisions with libcurses and libreadline.
154349         * lib/Makefile.am (libfetish_a_SOURCES): Remove getstr.c, getstr.h.
154350         * lib/getstr.h, getstr.c: Remove.
154351         * lib/getline.c: Include "getline.h", to check interface.
154352         Move body of old getstr.c here: this defines MIN_CHUNK and
154353         declares getdelim2, which is renamed from getstr.
154354         (getline, getdelim): Adjust to renaming of getstr -> getdelim2.
154356         * lib/linebuffer.c (readlinebuffer): Renamed from readline.
154357         All uses changed.
154358         * lib/linebuffer.h: Likewise.
154359         (readline): Remove backward-compatibility macro.
154361 2003-01-12  Paul Eggert  <eggert@twinsun.com>
154363         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
154364         to avoid collisions with libcurses and libreadline.
154365         * getstr: Remove.
154366         * MODULES.html.sh: Remove getstr.
154367         * modules/getline: Depend on unlocked-io, not getstr.
154369 2003-01-12  Jim Meyering  <jim@meyering.net>
154371         * lib/makepath.c: Don't test HAVE_ERRNO_H.  It's not necessary.
154373 2003-01-10  Bruno Haible  <bruno@clisp.org>
154375         * modules/alloca: Change Makefile.am requirements. Simplify Include
154376         requirements. Add lib/alloca_.h to file list.
154378 2003-01-10  Bruno Haible  <bruno@clisp.org>
154380         * m4/alloca.m4 (gl_FUNC_ALLOCA): Also define ALLOCA_H.
154382 2003-01-10  Bruno Haible  <bruno@clisp.org>
154384         * lib/alloca_.h: New file.
154385         * lib/getdate.y: Unconditionally include alloca.h.
154386         * lib/makepath.c: Likewise.
154387         * lib/setenv.c: Likewise.
154388         * lib/userspec.c: Likewise.
154390 2003-01-09  Karl Berry  <karl@gnu.org>
154392         * MODULES.html.sh: include `dirname $0` in PATH, to find
154393         gnulib-tool.
154395 2003-01-09  Bruno Haible  <bruno@clisp.org>
154397         * modules/stdbool: Change configure.ac, Makefile.am requirements.
154398         Simplify Include requirements. Add lib/stdbool.h.in to file list.
154400 2003-01-09  Bruno Haible  <bruno@clisp.org>
154402         * m4/stdbool.m4 (AM_STDBOOL_H): New macro.
154404 2003-01-09  Bruno Haible  <bruno@clisp.org>
154406         * lib/stdbool.h.in: New file.
154408 2003-01-09  Bruno Haible  <bruno@clisp.org>
154410         * gnulib-tool (func_all_modules): Ignore files ending in ~.
154411         * MODULES.html.sh: Likewise.
154413 2003-01-08  Jim Meyering  <jim@meyering.net>
154415         * lib/full-write.c: Undefine and define-away `const' after inclusion
154416         of errno.h, not before.  Suggestion from Bruno Haible.
154418 2003-01-08  Bruno Haible  <bruno@clisp.org>
154420         * modules/full-read: Depend on full-write.
154422 2003-01-08  Bruno Haible  <bruno@clisp.org>
154424         * lib/safe-read.c: Include specification header first, to ensure its
154425         selfcontainedness.
154426         * lib/full-write.c: Likewise.
154428 2003-01-07  Jim Meyering  <jim@meyering.net>
154430         * lib/full-write.c: Rework so that it may serve to define full_read,
154431         too.
154432         * lib/full-read.c: Simply #define FULL_READ and include full-write.c.
154434 2003-01-07  Bruno Haible  <bruno@clisp.org>
154436         * lib/strtoimax.c: Include <stdint.h> as an alternative to
154437         <inttypes.h>.
154438         * lib/xstrtol.h: Likewise.
154439         * lib/xstrtoimax.c: Likewise.
154440         * lib/xstrtoumax.c: Likewise.
154441         * lib/human.h: Likewise.
154443         * lib/tempname.c: Include <inttypes.h> too. Avoids a compilation error
154444         on systems that have <inttypes.h> but not <stdint.h>.
154446 2003-01-07  Bruno Haible  <bruno@clisp.org>
154448         * MODULES.html.sh: Add copyright notice.
154449         (missed_files): Omit CVS directory entries.
154450         (func_module): Make it work with sed-3.02.
154451         * MODULES.txt: Remove file.
154453 2003-01-06  Jim Meyering  <jim@meyering.net>
154455         * lib/version-etc.c: Update year in translatable copyright string.
154457 2003-01-03  Karl Berry  <karl@gnu.org>
154459         * config/config.{guess,sub}: update from prep.
154461 2003-01-02  Karl Berry  <karl@gnu.org>
154463         * doc/COPYING.DOC: belatedly updated to 1.2.
154465 2003-01-01  Karl Berry  <karl@gnu.org>
154467         * gnulib-tool (func_verify_module): report module name $module in
154468         error message, not $1.
154469         * gnulib-tool (create-testdir): don't complain if destdir couldn't
154470         be created, only if it doesn't exist.
154471         * gnulib-tool (last_checkin_date): don't expand the $Date here.
154473 2002-12-31  Paul Eggert  <eggert@twinsun.com>
154475         * m4/memcoll.m4 (gl_MEMCOLL): Require AC_FUNC_MEMCMP.
154477 2002-12-31  Paul Eggert  <eggert@twinsun.com>
154479         * lib/memcoll.c (memcoll): Fall back on a simple algorithm using
154480         memcmp if strcoll doesn't work.
154482 2002-12-31  Bruno Haible  <bruno@clisp.org>
154484         * lib/utime.c (utime_null): No need to call ftruncate if the file was
154485         nonempty.
154487 2002-12-31  Bruno Haible  <bruno@clisp.org>
154489         * lib/memcoll.c (STRCOLL): New macro.
154490         (memcoll): Use it.
154492 2002-12-31  Bruno Haible  <bruno@clisp.org>
154494         * lib/localcharset.h: New file.
154495         * lib/localcharset.c: Include it.
154496         * lib/unicodeio.c: Likewise.
154498 2002-12-31  Bruno Haible  <bruno@clisp.org>
154500         * lib/getstr.h (getstr): Define, to avoid clash with libcurses.
154501         * lib/linebuffer.h (readline): Define, to avoid clash with libreadline.
154503 2002-12-31  Bruno Haible  <bruno@clisp.org>
154505         * lib/getline.h: Include <stddef.h>, for size_t.
154507         * lib/unicodeio.h: Include <stddef.h>, for size_t.
154508         * lib/unicodeio.c: Don't include <stddef.h>.
154510 2002-12-31  Bruno Haible  <bruno@clisp.org>
154512         * lib/getdate.y (get_date): Test HAVE_STRUCT_TM_TM_ZONE, not
154513         HAVE_TM_ZONE.
154515 2002-12-24  Karl Berry  <karl@gnu.org>
154517         * config/config.guess: update from prep.
154519 2002-12-24  Bruno Haible  <bruno@clisp.org>
154521         General infrasructure.
154522         * m4/README: Rewritten.
154523         * m4/onceonly.m4: New file.
154524         * m4/onceonly_2_57.m4: New file.
154526         Module atexit.
154527         * m4/atexit.m4: New file.
154529         Module strtod.
154530         * m4/strtod.m4: New file.
154532         Module strtol.
154533         * m4/strtol.m4: New file.
154535         Module strtoul.
154536         * m4/strtoul.m4: New file.
154538         Module memchr.
154539         * m4/memchr.m4: New file.
154541         Module memcmp.
154542         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): New macro.
154543         (jm_FUNC_MEMCMP): Invoke it.
154545         Module memcpy.
154546         * m4/memcpy.m4: New file.
154548         Module memmove.
154549         * m4/memmove.m4: New file.
154551         Module memset.
154552         * m4/memset.m4: New file.
154554         Module strcspn.
154555         * m4/strcspn.m4: New file.
154557         Module strpbrk.
154558         * m4/strpbrk.m4: New file.
154560         Module strstr.
154561         * m4/strstr.m4: New file.
154563         Module strerror.
154564         * m4/strerror.m4: New file.
154566         Module mktime.
154567         * m4/mktime.m4: Renamed from jm-mktime.m4.
154568         (gl_PREREQ_MKTIME): New macro.
154569         (gl_FUNC_MKTIME): Renamed from jm_FUNC_MKTIME. Invoke gl_PREREQ_MKTIME.
154571         Module malloc.
154572         * m4/malloc.m4 (gl_PREREQ_MALLOC): New macro.
154573         (jm_FUNC_MALLOC): Use AC_FUNC_MALLOC. Invoke gl_PREREQ_MALLOC.
154574         Don't define HAVE_DONE_WORKING_MALLOC_CHECK, since nothing uses it.
154576         Module realloc.
154577         * m4/realloc.m4 (gl_PREREQ_REALLOC): New macro.
154578         (jm_FUNC_REALLOC): Use AC_FUNC_REALLOC. Invoke gl_PREREQ_REALLOC.
154579         Don't define HAVE_DONE_WORKING_REALLOC_CHECK, since nothing uses it.
154581         Module strftime.
154582         * m4/tm_gmtoff.m4: New file, extracted from strftime.m4.
154583         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Use AC_FUNC_STRFTIME.
154584         Don't test for bcopy (we are not emacs). Invoke AC_TYPE_MBSTATE_T and
154585         gl_TM_GMTOFF.
154586         (_jm_STRFTIME_PREREQS, jm_FUNC_GNU_STRFTIME): Use onceonly macros.
154588         Module xalloc.
154589         * m4/xalloc.m4: New file.
154591         Module alloca.
154592         * m4/alloca.m4: New file.
154594         Module putenv.
154595         * m4/putenv.m4 (gl_PREREQ_PUTENV): New macro.
154596         (jm_FUNC_PUTENV): Invoke it.
154598         Module setenv.
154599         * m4/setenv.m4 (gt_FUNC_SETENV): New macro.
154600         (gt_CHECK_VAR_DECL): Fix quoting error that led to infinite loop in m4
154601         when invoked twice.
154602         (gt_PREREQ_SETENV, gt_PREREQ_UNSETENV): New macros, replacing old
154603         gt_FUNC_SETENV.
154605         Module memrchr.
154606         * m4/memrchr.m4: New file.
154608         Module stpcpy.
154609         * m4/stpcpy.m4: New file.
154611         Module strcase.
154612         * m4/strcase.m4: New file.
154614         Module strdup.
154615         * m4/strdup.m4: New file.
154617         Module strnlen.
154618         * m4/strnlen.m4: New file.
154620         Module strndup.
154621         * m4/strndup.m4: New file.
154623         Module xstrtod.
154624         * m4/xstrtod.m4: New file.
154626         Module xstrtol.
154627         * m4/xstrtol.m4: New file.
154629         Module getdate.
154630         * m4/getdate.m4: New file.
154632         Module unlocked-io.
154633         * m4/unlocked-io.m4: Renamed from jm-glibc-io.m4.
154634         (jm_FUNC_GLIBC_UNLOCKED_IO): Invoke AC_GNU_SOURCE. Use onceonly macros.
154635         * m4/jm-glibc-io.m4n: Remove file.
154637         Module long-options.
154638         * m4/long-options.m4: New file.
154640         Module md5.
154641         * m4/md5.m4: New file.
154643         Module sha.
154644         * m4/sha.m4: New file.
154646         Module getstr.
154647         * m4/getstr.m4: New file.
154649         Module getline.
154650         * m4/getline.m4 (gl_PREREQ_GETLINE): New macro.
154651         (AM_FUNC_GETLINE): Invoke AC_GNU_SOURCE. Use <stdlib.h>, not
154652         <sys/types.h>, for size_t. Use the function name gnu_getline, not
154653         simply getline. Infoke gl_PREREQ_GETLINE.
154655         Module obstack.
154656         * m4/obstack.m4: New file.
154658         Module hash.
154659         * m4/hash.m4: New file.
154661         Module readtokens.
154662         * m4/readtokens.m4: New file.
154664         Module strverscmp.
154665         * m4/strverscmp.m4: New file.
154667         Module stdbool.
154668         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Add test for _Bool. Needed for
154669         OSF/1.
154671         Module strtoll.
154672         * m4/strtoll.m4: New file.
154674         Module strtoull.
154675         * m4/strtoull.m4: New file.
154677         Module strtoimax.
154678         * m4/strtoimax.m4: New file.
154680         Module strtoumax.
154681         * m4/strtoumax.m4: New file.
154683         Module xstrtoimax.
154684         * m4/xstrtoimax.m4 (jm_XSTRTOIMAX): Renamed from
154685         jm_AC_PREREQ_XSTRTOIMAX.
154686         Moved the strtol prerequisites to strtol.m4.
154687         Moved the strtoll prerequisites to strtoll.m4.
154688         Moved the strtoimax prerequisites to strtoimax.m4.
154690         Module xstrtoumax.
154691         * m4/xstrtoumax.m4 (jm_XSTRTOUMAX): Renamed from
154692         jm_AC_PREREQ_XSTRTOUMAX.
154693         Moved the strtoul prerequisites to strtoul.m4.
154694         Moved the strtoull prerequisites to strtoull.m4.
154695         Moved the strtoumax prerequisites to strtoumax.m4.
154697         Module chown.
154698         * m4/chown.m4 (gl_PREREQ_CHOWN): New macro.
154699         (jm_FUNC_CHOWN): Use AC_FUNC_CHOWN. Invoke gl_PREREQ_CHOWN.
154701         Module dup2.
154702         * m4/dup2.m4: New file.
154704         Module ftruncate.
154705         * m4/ftruncate.m4 (gl_PREREQ_FTRUNCATE): New macro.
154706         (jm_FUNC_FTRUNCATE): Use AC_REPLACE_FUNCS. Invoke gl_PREREQ_FTRUNCATE.
154708         Module getgroups.
154709         * m4/getgroups.m4 (gl_PREREQ_GETGROUPS): New macro.
154710         (jm_FUNC_GETGROUPS): Use AC_FUNC_GETGROUPS. Invoke gl_PREREQ_GETGROUPS.
154712         Module gettimeofday.
154713         * m4/gettimeofday.m4 (gl_PREREQ_GETTIMEOFDAY): New macro.
154714         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use onceonly macros. Invoke
154715         gl_PREREQ_GETTIMEOFDAY.
154717         Module mkdir.
154718         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): New macro.
154719         (UTILS_FUNC_MKDIR_TRAILING_SLASH): Invoke gl_PREREQ_MKDIR.
154721         Module mkstemp.
154722         * m4/mkstemp.m4 (gl_PREREQ_MKSTEMP): New macro.
154723         (jm_PREREQ_TEMPNAME): New macro, from prereq.m4. Also invoke
154724         jm_AC_TYPE_UINTMAX_T.
154725         (UTILS_FUNC_MKSTEMP): Invoke gl_PREREQ_MKSTEMP and jm_PREREQ_TEMPNAME.
154727         Module stat.
154728         * m4/stat.m4 (gl_PREREQ_STAT): New macro.
154729         (jm_FUNC_STAT): Use AC_FUNC_STAT. Invoke gl_PREREQ_STAT.
154731         Module lstat.
154732         * m4/lstat.m4 (gl_PREREQ_LSTAT): New macro.
154733         (jm_FUNC_LSTAT): Use AC_FUNC_LSTAT. Invoke gl_PREREQ_LSTAT.
154735         Module timespec.
154736         * m4/timespec.m4 (gl_TIMESPEC): New macro.
154737         (jm_CHECK_TYPE_STRUCT_TIMESPEC): Add check for <sys/time.h>.
154738         * m4/st_mtim.m4: Indentation.
154740         Module nanosleep.
154741         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): New macro.
154742         (jm_FUNC_NANOSLEEP): Add check for <sys/time.h>. Invoke
154743         gl_PREREQ_NANOSLEEP.
154745         Module regex.
154746         * m4/regex.m4 (jm_PREREQ_REGEX): New macro.
154747         (jm_INCLUDED_REGEX): Invoke jm_PREREQ_REGEX.
154748         (gl_REGEX): New macro.
154750         Module rename.
154751         * m4/rename.m4 (gl_PREREQ_RENAME): New macro.
154752         (vb_FUNC_RENAME): Invoke gl_PREREQ_RENAME.
154754         Module rmdir.
154755         * m4/rmdir.m4: New file.
154757         Module utime.
154758         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Use onceonly macros.
154759         * m4/utime.m4 (gl_PREREQ_UTIME): New macro.
154760         (jm_FUNC_UTIME): Invoke gl_PREREQ_UTIME.
154762         Module dirname.
154763         * m4/dirname.m4: New file.
154765         Module getopt.
154766         * m4/getopt.m4: New file.
154768         Module unistd-safer.
154769         * m4/unistd-safer.m4: New file.
154771         Module fnmatch.
154772         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Include <stdlib.h>, for exit()
154773         declaration.
154774         (gl_PREREQ_FNMATCH_EXTRA): New macro.
154775         (gl_FUNC_FNMATCH_POSIX): New macro.
154776         (gl_FUNC_FNMATCH_GNU): Renamed from AC_FUNC_FNMATCH_GNU. Invoke
154777         gl_PREREQ_FNMATCH_EXTRA. Use the function name gnu_fnmatch, not
154778         simply fnmatch.
154780         Module exclude.
154781         * m4/exclude.m4: New file.
154783         Module human.
154784         * m4/human.m4: New file.
154786         Module acl.
154787         * m4/acl.m4: Nop.
154789         Module backupfile.
154790         * m4/backupfile.m4: New file.
154791         * m4/d-ino.m4: Indentation.
154793         Module fsusage.
154794         * m4/fsusage.m4 (gl_FSUSAGE): New macro.
154795         (jm_STATFS_TRUNCATES): New macro, from coreutils-4.5.4/configure.ac.
154796         (gl_PREREQ_FSUSAGE_EXTRA): New macro.
154798         Module dirfd.
154799         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Invoke some AC_EGREP_CPP
154800         requirements.
154802         Module euidaccess.
154803         * m4/euidaccess.m4: New file.
154805         Module file-type.
154806         * m4/file-type.m4: New file.
154808         Module fileblocks.
154809         * m4/fileblocks.m4: New file.
154811         Module filemode.
154812         * m4/filemode.m4: New file.
154814         Module isdir.
154815         * m4/isdir.m4: New file.
154817         Module lchown.
154818         * m4/lchown.m4 (gl_PREREQ_LCHOWN): New macro.
154819         (jm_FUNC_LCHOWN): Invoke gl_PREREQ_LCHOWN.
154821         Module makepath.
154822         * m4/makepath.m4: New file.
154824         Module modechange.
154825         * m4/modechange.m4: New file.
154827         Module mountlist.
154828         * m4/mountlist.m4: New file.
154829         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Use onceonly macros.
154830         Indentation.
154832         Module path-concat.
154833         * m4/path-concat.m4: New file.
154835         Module pathmax.
154836         * m4/pathmax.m4: New file.
154838         Module same.
154839         * m4/same.m4: New file.
154841         Module save-cwd.
154842         * m4/save-cwd.m4: New file.
154844         Module savedir.
154845         * m4/savedir.m4: New file.
154847         Module xgetcwd.
154848         * m4/xgetcwd.m4: New file.
154849         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Use onceonly macros.
154851         Module xreadlink.
154852         * m4/xreadlink.m4: New file.
154854         Module safe-read.
154855         * m4/safe-read.m4: New file.
154857         Module safe-write.
154858         * m4/safe-write.m4: New file.
154860         Module closeout.
154861         * m4/closeout.m4: New file.
154863         Module stdio-safer.
154864         * m4/stdio-safer.m4: New file.
154866         Module getpass.
154867         * m4/getpass.m4: New file.
154869         Module getugroups.
154870         * m4/getugroups.m4: New file.
154872         Module group-member.
154873         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): New macro.
154874         (jm_FUNC_GROUP_MEMBER): Invoke AC_GNU_SOURCE, gl_PREREQ_GROUP_MEMBER.
154876         Module idcache.
154877         * m4/idcache.m4: New file.
154879         Module userspec.
154880         * m4/userspec.m4: New file.
154882         Module gettime.
154883         * m4/clock_time.m4: New file.
154884         * m4/gettime.m4: New file.
154886         Module settime.
154887         * m4/settime.m4: New file.
154889         Module posixtm.
154890         * m4/posixtm.m4: New file.
154892         Module gethostname.
154893         * m4/gethostname.m4: New file.
154895         Module canon-host.
154896         * m4/canon-host.m4: New file.
154898         Module gettext.
154899         * m4/codeset.m4: New file, from gettext-0.11.5.
154900         * m4/gettext.m4: New file, from gettext-0.11.5.
154901         * m4/glibc21.m4: New file, from gettext-0.11.5.
154902         * m4/iconv.m4: New file, from gettext-0.11.5.
154903         * m4/intdiv0.m4: New file, from gettext-0.11.5.
154904         * m4/inttypes-pri.m4: New file, from gettext-0.11.5.
154905         * m4/inttypes.m4: New file, from gettext-0.11.5.
154906         * m4/inttypes_h.m4: New file, from gettext-0.11.5 with modifications.
154907         * m4/isc-posix.m4: New file, from gettext-0.11.5.
154908         * m4/lcmessage.m4: New file, from gettext-0.11.5.
154909         * m4/lib-ld.m4: New file, from gettext-0.11.5.
154910         * m4/lib-link.m4: New file, from gettext-0.11.5.
154911         * m4/lib-prefix.m4: New file, from gettext-0.11.5.
154912         * m4/progtest.m4: New file, from gettext-0.11.5.
154913         * m4/stdint_h.m4: New file, from gettext-0.11.5 with modifications.
154914         * m4/uintmax_t.m4: New file, from gettext-0.11.5 with modifications.
154915         * m4/ulonglong.m4: New file, from gettext-0.11.5 with modifications.
154917         Module localcharset.
154918         * m4/localcharset.m4: New file.
154920         Module hard-locale.
154921         * m4/hard-locale.m4: New file.
154923         Module mbswidth.
154924         * m4/mbswidth.m4 (gl_MBSWIDTH): Renamed from jm_PREREQ_MBSWIDTH. Use
154925         onceonly macros.
154926         * m4/mbrtowc.m4: Add comment.
154928         Module memcasecmp.
154929         * m4/memcasecmp.m4: New file.
154931         Module memcoll.
154932         * m4/memcoll.m4: New file.
154934         Module unicodeio.
154935         * m4/unicodeio.m4: New file.
154937         Module rpmatch.
154938         * m4/rpmatch.m4: New file.
154940         Module yesno.
154941         * m4/yesno.m4: New file.
154943         Module exitfail.
154944         * m4/exitfail.m4: New file.
154946         Module c-stack.
154947         * m4/c-stack.m4 (gl_C_STACK): New macro.
154948         (jm_PREREQ_C_STACK): Check for <sys/time.h>. Use onceonly macros.
154950         Module error.
154951         * m4/error.m4 (gl_ERROR): New macro.
154952         (jm_PREREQ_ERROR): Use onceonly macros.
154954         Module fatal.
154955         * m4/fatal.m4: New file.
154957         Module getloadavg.
154958         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Use onceonly macros.
154959         (gl_FUNC_GETLOADAVG, gl_PREREQ_GETLOADAVG): New macros.
154961         Module getpagesize.
154962         * m4/getpagesize.m4: New file.
154964         Module getusershell.
154965         * m4/getusershell.m4: New file.
154967         Module physmem.
154968         * m4/physmem.m4: New file.
154970         Module posixver.
154971         * m4/posixver.m4: New file.
154973         Module quotearg.
154974         * m4/quotearg.m4: New file.
154976         Module quote.
154977         * m4/quote.m4: New file.
154979         Module readutmp.
154980         * m4/readutmp.m4: New file, based on jm_PREREQ_READUTMP from prereq.m4.
154982         Module sig2str.
154983         * m4/sig2str.m4: New file.
154985         Other.
154986         * m4/longlong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Remove, moved to
154987         ulonglong.m4.
154988         * m4/intmax_t.m4: New file.
154989         * m4/d-type.m4: Indentation.
154990         * m4/jm-macros.m4: Update.
154991         * m4/prereq.m4 (jm_PREREQ): Update.
154992         (jm_PREREQ_ADDEXT): Remove, obsoleted by backupfile.m4.
154993         (jm_PREREQ_CANON_HOST): Remove, obsoleted by canon-host.m4.
154994         (jm_PREREQ_DIRNAME): Remove, obsoleted by dirname.m4.
154995         (jm_PREREQ_EXCLUDE): Remove, obsoleted by exclude.m4.
154996         (jm_PREREQ_GETPAGESIZE): Remove, obsoleted by getpagesize.m4.
154997         (jm_PREREQ_HARD_LOCALE): Remove, obsoleted by hard-locale.m4.
154998         (jm_PREREQ_HASH): Remove, obsoleted by hash.m4.
154999         (jm_PREREQ_HUMAN): Remove, obsoleted by human.m4.
155000         (jm_PREREQ_MEMCHR): Remove, obsoleted by memchr.m4.
155001         (jm_PREREQ_PHYSMEM): Remove, obsoleted by physmem.m4.
155002         (jm_PREREQ_POSIXVER): Remove, obsoleted by posixver.m4.
155003         (jm_PREREQ_QUOTEARG): Remove, obsoleted by quotearg.m4.
155004         (jm_PREREQ_READUTMP): Remove, obsoleted by readutmp.m4.
155005         (jm_PREREQ_REGEX): Remove, obsoleted by regex.m4.
155006         (jm_PREREQ_STRNLEN): Remove, obsoleted by strnlen.m4.
155007         (jm_PREREQ_TEMPNAME): Remove, obsoleted by mkstemp.m4.
155008         (jm_PREREQ_XGETCWD): Remove, obsoleted by xgetcwd.m4.
155009         (jm_PREREQ_XREADLINK): Remove, obsoleted by xreadlink.m4.
155010         * m4/readdir.m4 (jm_FUNC_READDIR): Use onceonly macros.
155012 2002-12-24  Bruno Haible  <bruno@clisp.org>
155014         * MODULES.txt: Update according to m4/ changes.
155016         Module gettext.
155017         * config.rpath: New file, from gettext-0.11.5.
155019         * modules/*: New module descriptions.
155020         * gnulib-tool: New file.
155021         * MODULES.html.sh: New file.
155023 2002-12-21  Karl Berry  <karl@gnu.org>
155025         * doc/fdl.texi: update to version 1.2.
155027 2002-12-19  Karl Berry  <karl@gnu.org>
155029         * config/config.guess: update from prep.
155031 2002-12-18  Bruno Haible  <bruno@clisp.org>
155033         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't test for localtime_r.
155034         * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Likewise.
155036 2002-12-17  Bruno Haible  <bruno@clisp.org>
155038         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Remove checks for limits.h,
155039         stdlib.h, string.h.
155041 2002-12-17  Bruno Haible  <bruno@clisp.org>
155043         * lib/canon-host.c (strdup): Remove unused declaration.
155045         * lib/fsusage.c: Include full_read.h.
155046         (get_fs_usage): Use full_read instead of safe_read.
155048         * lib/utime.c (utime_null): Use SAFE_READ_ERROR.
155050 2002-12-12  Karl Berry  <karl@gnu.org>
155052         * config/config.guess: update from prep.
155054 2002-12-11  Bruno Haible  <bruno@clisp.org>
155056         * m4/setenv.m4: New file, from gettext-0.11.5.
155058 2002-12-11  Bruno Haible  <bruno@clisp.org>
155060         * lib/setenv.h: Rewritten to cope with systems that have setenv() but
155061         not unsetenv().
155062         * lib/setenv.c, unsetenv.c: Taken from glibc-2.2.4 with the following
155063         modifications:
155065         2002-12-11  Bruno Haible  <bruno@clisp.org>
155067                 * setenv.c (alloca): Fall back to malloc.
155068                 (freea): New macro.
155069                 (setenv): Use freea() to free memory allocated with alloca().
155071         2002-11-13  Bruno Haible  <bruno@clisp.org>
155073                 * setenv.c (compar_fn_t, __add_to_environ, setenv): Use ANSI C
155074                 function declarations.
155075                 * unsetenv.c (unsetenv): Likewise.
155077         2002-03-04  Bruno Haible  <bruno@clisp.org>
155079                 Portability to AIX 4.3.3.
155080                 * unsetenv.c: New file, extracted from setenv.c.
155081                 * setenv.c: Move the unsetenv() function to unsetenv.c.
155083         2001-12-20  Bruno Haible  <bruno@clisp.org>
155085                 * setenv.c (__add_to_environ): Don't call realloc(NULL,...),
155086                 use malloc instead. For SunOS 4.
155088         2001-12-11  Bruno Haible  <bruno@clisp.org>
155090                 * setenv.c: Declare alloca.
155091                 (compar_fn_t): New typedef.
155092                 (KNOWN_VALUE, STORE_VALUE): Use it.
155094         * lib/Makefile.am (libfetish_a_SOURCES): Add setenv.c, unsetenv.c,
155095         setenv.h.
155097 2002-12-10  Paul Eggert  <eggert@twinsun.com>
155099         Port exclude.c and exclude.h to more non-GNU systems, e.g. Solaris 7.
155100         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS):
155101         Choose values that are less likely to collide with system fnmatch
155102         options.
155103         * lib/exclude.c (FNM_CASEFOLD, FNM_LEADING_DIR): Define to 0 if not
155104         defined (e.g., a pure POSIX system).
155105         (EXCLUDE_macros_do_not_collide_with_FNM_macros): Use FNM_PATHNAME
155106         instead of FNM_FILE_NAME, for compatibility with pure POSIX sytems.
155108 2002-12-06  Paul Eggert  <eggert@twinsun.com>
155110         Undo the 2001-07-02 change for jm-glibc-io, as it was too much of
155111         a pain in practice to deal with generated m4 files.  This change
155112         goes together with the 2002-12-04 unlocked-io.h change in ../lib.
155114         * m4/Makefile.am.in (Makefile.am): Don't mention jm-glibc-io.m4n
155115         and jm-glibc-io.m4, as they are no longer a special case.
155116         * m4/jm-glibc-io.m4: Rename from jm-glibc-io.m4n, and remove the
155117         kludge and the auto-generation stuff.  Check only whether the
155118         functions are declared, not whether they exist, since older hosts
155119         that don't declare the functions can't use the optimization anyway.
155121 2002-12-06  Jim Meyering  <jim@meyering.net>
155123         * lib/error.c: Be consistent: change `#ifndef _LIBC' to `#if !_LIBC'.
155125         Merge in changes from libc's misc/error.c, in preparation
155126         for the merge of gnulib's changes back into libc.
155128         * lib/error.c (_): Define only if not already defined.
155129         Move definition to follow all #include directives.
155130         Include unlocked-io.h only if !_LIBC.
155131         [_LIBC]: Include <libio/libioP.h>.
155132         [USE_IN_LIBIO]: Include <libio/iolibio.h>
155133         (fflush): Tweak definition to use INTUSE.
155134         (putc): Define.
155136 2002-12-05  Paul Eggert  <eggert@twinsun.com>
155138         * lib/alloca.c [defined emacs]: Include "lisp.h".
155139         (xalloc_die) [defined emacs]: New macro.
155140         (free) [defined emacs && defined EMACS_FREE]: Define to EMACS_FREE.
155141         [! defined emacs]: Include <xalloc.h>.
155142         (POINTER_TYPE) [!defined POINTER_TYPE]: New macro.
155143         (pointer): Typedef to POINTER_TYPE *.
155144         (malloc): Remove decl; we now always use xmalloc.
155145         (alloca): Use old-style definition, since Emacs needs this.
155146         Check for arithmetic overflow when computing combined size.
155148 2002-12-04  Paul Eggert  <eggert@twinsun.com>
155150         Do not generate unlocked-io.h automatically, since it's easier to
155151         maintain it by hand.
155153         * lib/unlocked-io.h: New file, from GNU diffutils,
155154         but with proper copyright notice and attribution.
155155         * lib/gen-uio: Remove.
155156         * lib/Makefile.am: Add copyright notice.
155157         (libfetish_a_SOURCES): Add unlocked-io.h.
155158         (BUILT_SOURCES, all-local): Remove unlocked-io.h.
155159         (DISTCLEANFILES, io_functions): Remove macros.
155160         (EXTRA_DIST): Remove gen_uio.
155161         (unlocked-io.h): Remove rule.
155163 2002-12-04  Jim Meyering  <jim@meyering.net>
155165         Reflect the fact that stat.c and lstat.c are no longer generated.
155166         * lib/Makefile.am (BUILT_SOURCES): Remove stat.c and lstat.c.
155167         (DISTCLEANFILES): Likewise.
155168         (EXTRA_DIST): Likewise.
155169         (all_local): Don't depend on stat.c or lstat.c.
155170         (stat.c, lstat.c): Remove rules.
155171         (EXTRA_DIST): Remove xstat.in.
155173         * lib/xstat.in: Remove file.  Contents moved into stat.c.
155174         * lib/stat.c: New file.  Contents mostly from xstat.in.
155175         * lib/stat.c: Rework so that it may serve to define rpl_lstat, too.
155176         * lib/lstat.c: New file. Simply #define LSTAT and include stat.c.
155178         * lib/safe-read.c: Rework so that it may serve to define safe_write,
155179         too.
155180         * lib/safe-write.c: Simply #define SAFE_WRITE and include safe-read.c.
155182 2002-12-03  Jim Meyering  <jim@meyering.net>
155184         * lib/safe-read.c, safe-write.c: Change variable names and comments,
155185         but not semantics, to minimize the differences between these two files.
155186         (safe_read): Change comment to mention SAFE_READ_ERROR.
155188         * lib/safe-read.c (IS_EINTR): Define.
155189         (safe_read): Use IS_EINTR in place of in-function cpp directives.
155191 2002-12-02  Jim Meyering  <jim@meyering.net>
155193         * lib/safe-read.c (EINTR): Define.
155194         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
155195         (INT_MAX): Provide fallback.
155196         (safe_read): Rewrite to iterate IFF the read fails with EINTR.
155198         * lib/safe-read.h (SAFE_READ_ERROR): Define.
155200 2002-12-02  Bruno Haible  <bruno@clisp.org>
155202         * lib/safe-write.c (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM):
155203         Define, taken from safe-read.c.
155204         (INT_MAX): Provide fallback.
155205         (safe_write): Rewrite to iterate IFF the write fails with EINTR.
155206         * lib/safe-write.h (SAFE_WRITE_ERROR): Define.
155208         * lib/safe-read.c (EINTR): Remove definition.
155209         (safe_read): Don't use EINTR if it is absent.
155211 2002-12-01  Jim Meyering  <jim@meyering.net>
155213         * lib/safe-read.c: (safe_read): Also exit the loop when read returns
155214         zero.
155215         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX): Define.
155217 2002-11-27  Paul Eggert  <eggert@twinsun.com>
155219         * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
155220         hash_find_entry, hash_rehash): Replace `if (limit <= value) abort ();'
155221         with `if (! (value < limit)) abort ();', for readability.
155223 2002-11-26  Karl Berry  <karl@gnu.org>
155225         * lib/strdup.c: copy from libc again, with jim's ok.
155226         * lib/.cppi-disable: re-add strdup.c
155228 2002-11-25  Karl Berry  <karl@gnu.org>
155230         * lib/strtoll.c: copy from libc, meaning we now #include <strtol.c>
155231         instead of "strtol.c".
155233 2002-11-25  Karl Berry  <karl@gnu.org>
155235         * config/install-sh: update from automake for variable quoting, $0 in
155236         error msgs, etc.
155238         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): new entry.
155239         * config/srclist.txt ($LIBCSRC/sysdeps/generic/strtoll.c lib gpl): new
155240         entry.
155242 2002-11-25  Jim Meyering  <jim@meyering.net>
155244         * lib/mktime.c: Sync from libc, now that it has the latest fix.
155246 2002-11-24  Karl Berry  <karl@gnu.org>
155248         * lib/error.c, getopt.c, getopt.h, getopt1.c, obstack.c, regex.c,
155249         regex.h, strdup.c, strtoll.c, tempname.c: change license to gpl.
155251 2002-11-24  Jim Meyering  <jim@meyering.net>
155253         Update from coreutils:
155255         * lib/mktime.c: Merge in changes from libc.
155257         Avoid a link-time failure on some Linux systems.
155258         * lib/mktime.c (STATIC): Define to be empty (_LIBC) or `static'
155259         (otherwise).
155260         (__mon_yday): Declare with the STATIC attribute.
155261         (__mktime_internal): Likewise.
155262         Based on a report from Greg Schafer.
155264 2002-11-23  Jim Meyering  <jim@meyering.net>
155266         * lib/sig2str.c (str2signum, sig2str): Avoid a warning from gcc:
155267         Use `unsigned', not `int', as type of index.
155269         * lib/xstat.in [@BEGIN_LSTAT_ONLY@]: Include <string.h>.
155271         * lib/fsusage.c: Remove unneeded parentheses around operands of
155272         `defined'.
155274 2002-11-22  Paul Eggert  <eggert@twinsun.com>
155276         * lib/quotearg.h: Allow multiple inclusion by surrounding with
155277         "#ifndef QUOTEARG_H_".  Include <stddef.h>, for size_t,
155278         so that we can be included first.
155279         (PARAMS): Remove; we now assume C89 or later.  All uses removed.
155280         * lib/quotearg.c: Include quotearg.h immediately after config.h.
155281         No need to include stddef.h or sys/types.h any more.
155282         Surround local include files with "", not "<>".
155283         Assume HAVE_LIMITS_H unconditionally, as we assume C89.
155284         Similarly, assume HAVE_C_BACKSLASH_A, CHAR_BIT, UCHAR_MAX, UINT_MAX,
155285         HAVE_STDLIB_H, HAVE_STRING_H, STDC_HEADERS.
155286         (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
155287         (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
155288         (ISPRINT): Remove; no longer needed now that we assume C89.
155290         (clone_quoting_options, quotearg_buffer, quotearg_n_options):
155291         Preserve errno.
155293         (quotearg_buffer_restyled, quotearg_n, quotearg_n_style,
155294         quotearg_char): Use SIZE_MAX rather than
155295         (size_t) -1 when we are talking about "infinity".
155297         (quotearg_buffer_restyled): Fix bug when quoting trigraphs.
155299 2002-11-22  Paul Eggert  <eggert@twinsun.com>
155301         * lib/hash.c: Avoid use of <assert.h>, as the GNU Coding Standards
155302         hint that one should use `if (! x) abort ();' rather than `assert
155303         (x);', and anyway it's one less thing to worry about configuring.
155304         (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
155305         hash_rehash, hash_insert): Use abort rather than assert.
155307 2002-11-22  Bruno Haible  <bruno@clisp.org>
155309         * lib/safe-read.h: Assume C89. Add comments.
155310         (safe_read): Change return type to size_t.
155311         * lib/safe-read.c (safe_read): Change return type to size_t. Handle
155312         byte counts > SSIZE_MAX correctly.
155313         * lib/safe-write.h: New file.
155314         * lib/safe-write.c: New file.
155315         * lib/full-read.h: New file.
155316         * lib/full-read.c: New file.
155317         * lib/full-write.h: Assume C89. Add comments.
155318         * lib/full-write.c: Include safe-write.h.
155319         (full_write): Rewritten to use safe_write.
155320         Suggested by Jim Meyering and Paul Eggert.
155322 2002-11-21  Jim Meyering  <jim@meyering.net>
155324         * lib/strdup.c (strdup): Tweak comment and initial #if/#include.
155326         Merge in changes from the coreutils.
155328         2002-09-25  Paul Eggert  <eggert@twinsun.com>
155329         * lib/fsusage.c [! HAVE_INTTYPES_H && HAVE_STDINT_H] Include
155330         <stdint.h>.
155331         (UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro.
155332         (PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than
155333         int.  Work more efficiently if X is the same width as uintmax_t.
155334         Do not compare X to -1, to avoid bogus compiler warning.
155335         (get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast.
155336         Don't assume that f_frsize and f_bsize are the same type.
155338         * lib/mountlist.c: #undef MNT_IGNORE before defining it, to avoid
155339         warning on FreeBSD.
155341         * lib/makepath.c (make_path): Restore umask *before* creating the final
155342         component.
155343         (make_path): Minor reformatting.
155345         * lib/xmalloc.c: Adjust to work with new autoconf macros,
155346         AC_FUNC_MALLOC and AC_FUNC_REALLOC: test #ifndef
155347         HAVE_MALLOC/HAVE_REALLOC.
155349         * lib/mountlist.h (ME_DUMMY): Don't count entries of type `auto' as
155350         dummy ones.  At least on GNU/Linux systems, `auto' means something
155351         else.
155352         From Michael Stone.
155354 2002-11-21  Bruno Haible  <bruno@clisp.org>
155356         Remove case insensitive option matching.
155357         * lib/argmatch.h (argcasematch): Remove declaration.
155358         (ARGCASEMATCH): Remove macro.
155359         (__xargmatch_internal): Remove case_sensitive argument.
155360         (XARGMATCH): Update.
155361         (XARGCASEMATCH): Remove macro.
155362         * lib/argmatch.c (argmatch): Renamed from __argmatch_internal. Remove
155363         case_sensitive argument.
155364         (argcasematch): Remove function.
155365         (__xargmatch_internal): Remove case_sensitive argument.
155366         (main): Use XARGMATCH instead of XARGCASEMATCH.
155368         * lib/xmalloc.c: Change compile-time error message. Add comment about
155369         required autoconf version.
155371 2002-11-20  Paul Eggert  <eggert@twinsun.com>
155373         Merge argmatch cleanups from Bison.  Assume C89.
155375         * lib/argmatch.c: Include config.h here, not in argmatch.h.
155376         Include stdlib.h, for EXIT_FAILURE.
155377         Always include <string.h>, since we assume C89.
155378         (EXIT_FAILURE): Remove pre-C89 bug workaround.
155379         * lib/argmatch.h: Do not include <config.h> or <sys/types.h>.
155380         Include <stddef.h> instead, since it's all we need for size_t.
155381         (PARAMS): Remove.  All uses removed.
155382         (ARRAY_CARDINALITY): Do not bother to #undef.
155383         (ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg,
155384         ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
155385         Remove unnecessary parentheses.
155386         (ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
155387         Insert necessary parentheses.
155388         (ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros.
155389         (ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT.
155391 2002-11-19  Bruno Haible  <bruno@clisp.org>
155393         * lib/mbswidth.c: Include mbswidth.h right at the beginning.
155394         * lib/mbswidth.h: Include <stddef.h>, for size_t.
155396         * lib/mbswidth.h (PARAMS): Remove macro.
155397         (mbswidth, mbsnwidth): Use ANSI C function declarations.
155398         * lib/mbswidth.c (mbswidth, mbsnwidth): Likewise.
155400         * lib/gcd.h (PARAMS): Remove macro.
155401         (gcd): Use ANSI C function declarations.
155402         * lib/gcd.c (gcd): Likewise.
155404 2002-11-15  Bruno Haible  <bruno@clisp.org>
155406         * lib/strcspn.c: Include <stddef.h>.
155407         (strcspn): Use ANSI C function declaration. Change return type to
155408         size_t. Use NULL.
155409         * lib/strpbrk.c: Minimize diffs to glibc. Include <stddef.h>.
155410         (strpbrk): Use NULL.
155411         * lib/strpbrk.h (PARAMS): Remove macro.
155412         (strpbrk): Use ANSI C function declaration.
155413         * lib/strstr.c: Don't include <sys/types.h>.
155414         * lib/strstr.h (PARAMS): Remove macro.
155415         (strstr): Use ANSI C function declarations.
155417 2002-11-14  Karl Berry  <karl@gnu.org>
155419         * config/mkinstalldirs: `do' on separate line, instead of
155420         `for var; do'.
155422 2002-11-06  Bruno Haible  <bruno@clisp.org>
155424         * lib/gcd.h (gcd): Change argument type to 'unsigned long'.
155425         * lib/gcd.c (gcd): Likewise.
155427 2002-11-05  Bruno Haible  <bruno@clisp.org>
155429         * lib/gcd.h: New file, from gettext-0.11.5.
155430         * lib/gcd.c: New file, from gettext-0.11.5.
155432 2002-11-05  Bruno Haible  <bruno@clisp.org>
155434         * lib/error.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
155435         * lib/getopt.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
155436         * lib/obstack.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
155437         * lib/regex.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
155439         * lib/argmatch.c: Include gettext.h instead of <locale.h> and
155440         <libintl.h>.
155441         * lib/makepath.c: Include gettext.h instead of <locale.h> and
155442         <libintl.h>.
155444         * lib/closeout.c: Include gettext.h instead of <libintl.h>.
155445         * lib/human.c: Include gettext.h instead of <libintl.h>.
155446         * lib/quotearg.c: Include gettext.h instead of <libintl.h>.
155447         * lib/rpmatch.c: Include gettext.h instead of <libintl.h>.
155448         * lib/unicodeio.c: Include gettext.h instead of <libintl.h>.
155449         * lib/userspec.c: Include gettext.h instead of <libintl.h>.
155450         * lib/version-etc.c: Include gettext.h instead of <libintl.h>.
155451         * lib/xmalloc.c: Include gettext.h instead of <libintl.h>.
155452         (textdomain): Remove definition.
155453         * lib/xmemcoll.c: Include gettext.h instead of <libintl.h>.
155455         * lib/long-options.c: Remove include of <libintl.h> and definition of
155456         _.
155457         * lib/same.c: Remove include of <libintl.h> and definition of _.
155459 2002-11-04  Owen Taylor  <otaylor@redhat.com>
155461         * lib/config.charset: A few additions for Solaris.
155463 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
155465         Make it possible to build libcharset with CC=gcc CFLAGS="-x c++".
155466         * lib/localcharset.c (locale_charset): Declare as extern "C".
155468 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
155470         * lib/config.charset: msdos in uk_UA uses CP1125.
155472 2002-11-04  Bruno Haible  <bruno@clisp.org>
155474         * lib/stpcpy.h: New file, from GNU gettext-0.11.5.
155475         * lib/strcase.h: New file, from GNU gettext-0.11.5.
155476         * lib/strpbrk.h: New file, from GNU gettext-0.11.5.
155477         * lib/strstr.h: New file, from GNU gettext-0.11.5.
155478         * lib/xgetcwd.h: New file, from GNU gettext-0.11.5.
155480 2002-11-04  Bruno Haible  <bruno@clisp.org>
155482         * lib/localcharset.c (locale_charset): Don't return an empty string.
155484 2002-11-04  Bruno Haible  <bruno@clisp.org>
155486         * lib/localcharset.c (get_charset_aliases): Add more Windows specific
155487         aliases.
155489 2002-11-04  Bruno Haible  <bruno@clisp.org>
155491         * lib/config.charset: Update for newest glibc. Add canonical names
155492         ISO-8859-14, KOI8-T, TCVN5712-1, GEORGIAN-PS.
155494 2002-11-04  Bruno Haible  <bruno@clisp.org>
155496         * lib/config.charset: Add support for NetBSD.
155498 2002-11-04  Bruno Haible  <bruno@clisp.org>
155500         * lib/config.charset [msdosdjgpp]: For Russian, use CP866.
155502 2002-11-01  Bruno Haible  <bruno@clisp.org>
155504         * configure.in: Add AC_CONFIG_AUX_DIR call.
155505         (AC_OUTPUT): Add m4/Makefile, lib/Makefile. Remove doc/Makefile,
155506         test/Makefile.
155507         * Makefile.in (subdirs): Add m4, lib. Remove doc, test.
155509 2002-09-28  Karl Berry  <karl@gnu.org>
155511         * config/srclist.txt: can't copy install-sh/mkinstalldirs from
155512         installed automake until the next release, since changes have been
155513         made.
155515 2002-09-25  Karl Berry  <karl@gnu.org>
155517         * lib/strdup.c: copy from libc/string (via ../config/srclist*).
155518         * lib/getopt*: copy from libc/posix.
155519         * lib/gettext.h: copy from gettext.
155520         * lib/.cppi-disable: add strdup.c, gettext.h.
155522 2002-09-25  Karl Berry  <karl@gnu.org>
155524         * config/srclist.txt: enable gettext.h check.
155525         * config/config.{guess,sub}: update from prep.
155526         * config/depcomp, install-sh, mdate-sh, missing, mkinstalldirs: update
155527                 from automake 1.6.3.
155528         See srclist*.
155530 2002-08-23  Stefan Monnier  <monnier@cs.yale.edu>
155532         * regex.c (PATFETCH): Remove the translating fetch.
155533         (PATFETCH_RAW): Rename to PATFETCH.
155534         (set_image_of_range): New fun.
155535         (SET_RANGE_TABLE_WORK_AREA): Use it.
155536         (regex_compile): Don't translate the pattern chars so eagerly.
155537         Only do it when inserting an `exactn' bytecode or when handling
155538         a char-range.
155539         (mutually_exclusive_p): Avoid empty statement.
155541 2002-07-06  Jim Meyering  <meyering@lucent.com>
155543         * m4/README: Don't mention Makefile.am.in.
155544         Outline how I've tested changes to .m4 files.  Yep, it's a pain.
155546 2002-07-01  Jim Meyering  <meyering@lucent.com>
155548         * lib/c-stack.c: Include sys/time.h.
155549         From Volker Borchert.
155551 2002-06-26  Paul Eggert  <eggert@twinsun.com>
155553         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for btowc.
155555 2002-06-26  Paul Eggert  <eggert@twinsun.com>
155557         * lib/fnmatch.c, fnmatch_loop.c (WIDE_CHAR_SUPPORT):
155558         New macro.  Use it uniformly instead of
155559         (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
155560         It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
155561         reported by Vin Shelton.
155563 2002-06-22  Paul Eggert  <eggert@twinsun.com>
155565         * lib/c-stack.h (segv_handler, c_stack_action) [! defined SA_SIGINFO]:
155566         Do not assume SA_SIGINFO behavior.
155567         Bug reported by Jim Meyering on NetBSD 1.5.2.
155569 2002-06-22  Jim Meyering  <meyering@lucent.com>
155571         * m4/c-stack.m4: New file, from diffutils-2.8.2.
155572         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_C_STACK.
155574         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Don't require AC__GNU_SOURCE,
155575         now that configure.ac uses AC_GNU_SOURCE.
155576         (jm_MACROS): Rename: jm_FUNC_FNMATCH to AC_FUNC_FNMATCH_GNU.
155577         * m4/prereq.m4 (jm_PREREQ_EXCLUDE): Likewise, wrt jm_FUNC_FNMATCH.
155579         Update to latest tools.  Suggestions from Paul Eggert.
155580         * m4/stdbool.m4: New file, from diffutils-2.8.2.
155581         * m4/gnu-source.m4: Update from diffutils-2.8.2.
155582         * m4/fnmatch.m4: Likewise.
155583         * m4/prereq.m4: Change each use of AC_CHECK_HEADERS(stdbool.h)
155584         to AC_HEADER_STDBOOL
155586 2002-06-22  Jim Meyering  <meyering@lucent.com>
155588         * lib/fnmatch.c (ISASCII, ISPRINT): Undefine, to avoid warning about
155589         redefinition due to Solaris 2.6's definition in /usr/include/sys/euc.h.
155591 2002-06-22  Jim Meyering  <meyering@lucent.com>
155593         * lib/c-stack.c, lib/c-stack.h: New files, from diffutils-2.8.2.
155595         * lib/exitfail.c, exitfail.h: Likewise.
155596         * lib/Makefile.am (libfetish_a_SOURCES): Add exitfail.c and exitfail.h.
155598         * lib/Makefile.am (libfetish_a_SOURCES): Add fnmatch_.h in place
155599         of fnmatch.h.
155600         (EXTRA_DIST): Add fnmatch_loop.c.
155601         (libfetish_a_SOURCES): Add c-stack.c and c-stack.h.
155603         * lib/fnmatch_loop.c: New file, from diffutils-2.8.2.
155604         * lib/fnmatch.c: Update from diffutils-2.8.2.
155605         * lib/fnmatch_.h: New file.  From diffutils-2.8.2.
155606         * lib/fnmatch.h: Remove file.
155608 2002-06-21  Jim Meyering  <meyering@lucent.com>
155610         * m4/c-bs-a.m4: Add comment, from diffutils-2.8.2.
155611         * m4/mbrtowc.m4: Likewise.
155613         * m4/mbstate_t.m4: Update from diffutils-2.8.2.
155614         * m4/mbswidth.m4: Reflect name change:
155615         s/AC_MBSTATE_T/AC_TYPE_MBSTATE_T.
155616         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
155618         * m4/lib-link.m4: Update from gettext-0.11.2.
155619         * m4/gettext.m4: Likewise.
155621         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for hurd.h.
155622         From Alfred M. Szmidt.
155624 2002-06-18  Paul Eggert  <eggert@twinsun.com>
155626         * lib/file-type.h: Report an error if neither S_ISREG nor
155627         S_IFREG is defined, instead of using a test specific to glibc
155628         2.2.  This should be safe, since POSIX requires S_ISREG and
155629         Unix Version 7 had S_IFREG.  We don't need to check for
155630         <sys/types.h> since we don't use any symbols that it defines.
155632 2002-06-15  Richard Dawe  <richdawe@bigfoot.com>
155634         * lib/Makefile.am (lstat.c, stat.c, .sin.sed): Use t-$@, rather than
155635         $@-t, so that each temporary file name is unique and valid in the first
155636         8 characters, for operation under DOS.
155638 2002-06-15  Paul Eggert  <eggert@twinsun.com>
155640         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for st_author.
155642 2002-06-15  Jim Meyering  <meyering@lucent.com>
155644         Work even with DJGPP 2.03, which lacks support for symlinks.
155645         From Richard Dawe.
155646         * lib/xstat.in (S_ISLNK): Define to 0 if neither S_ISLNK nor S_IFLNK
155647         is defined.
155648         * lib/lchown.c (S_ISLNK): Likewise.
155650 2002-06-15  Jim Meyering  <meyering@lucent.com>
155652         * lib/file-type.h (FILE_TYPE_H): Guard entire contents with #ifndef.
155653         For GNU libc 2.2 and newer, ensure that <sys/types.h> and <sys/stat.h>
155654         have been included before this file.
155656 2002-06-14  Jim Meyering  <meyering@lucent.com>
155658         * lib/file-type.h: Use the version from diffutils-2.8.2.
155659         * lib/file-type.c: Likewise.
155661 2002-06-07  Jim Meyering  <meyering@lucent.com>
155663         * m4/prereq.m4 (jm_PREREQ_STAT): Check for sys/param.h and sys/mount.h.
155664         They're needed at least for NetBSD 1.5.2.
155665         ($statxfs_includes): Include those same headers.
155666         ($statxfs_includes): Include sys/vfs.h if available.
155667         ($statxfs_includes): Likewise for sys/statvfs.h.
155668         Check for the following members in both structs statfs and statvfs:
155669         f_basetype, f_type, f_fsid.__val, f_namemax, f_namelen.
155671 2002-06-01  Jim Meyering  <meyering@lucent.com>
155673         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename macro:
155674         s/D_TYPE_IN_DIRENT/HAVE_STRUCT_DIRENT_D_TYPE/.
155676 2002-05-28  Jim Meyering  <meyering@lucent.com>
155678         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `mkdir', not `rmdir'.
155679         Reported by Volker Borchert.
155681 2002-05-27  Jim Meyering  <meyering@lucent.com>
155683         Fix a problem seen only on nonconforming systems whereby ls.c's
155684         use of localtime, and then of gettimeofday would cause trouble:
155685         the localtime call used to initialize rpl_gettimeofday's save
155686         mechanism would clobber ls's current local time information so
155687         that in any long listing the first file would always be listed
155688         with date 1970-01-01.  Analysis by Volker Borchert.
155690         * lib/gettimeofday.c (localtime): Undefine.
155691         (rpl_localtime): New function.
155693 2002-05-27  Jim Meyering  <meyering@lucent.com>
155695         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Also replace
155696         localtime.
155698         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `rmdir' so we don't try to
155699         use the replacement function; it wouldn't resolve at link time.
155700         Reported by Volker Borchert.
155702 2002-05-22  Jim Meyering  <meyering@lucent.com>
155704         * lib/Makefile.am (libfetish_a_SOURCES): Add file-type.c and
155705         file-type.h.
155706         * lib/file-type.h: New file.
155707         * lib/file-type.c (file_type): New file/function.  Extracted from
155708         diffutils.
155710 2002-04-30  Jim Meyering  <meyering@lucent.com>
155712         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_STAT.
155714 2002-04-29  Paul Eggert  <eggert@twinsun.com>
155716         * m4/prereq.m4 (jm_PREREQ_SIG2STR): Remove; all callers changed.
155718 2002-04-29  Paul Eggert  <eggert@twinsun.com>
155720         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): Check for stdlib.h.
155721         Do not check for alloca.h (no longer used) or stdbool.h (was never
155722         used?).  Add AM_C_PROTOTYPES since hard-locale.h uses it.
155724 2002-04-29  Paul Eggert  <eggert@twinsun.com>
155726         * lib/hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1.
155728 2002-04-29  Jim Meyering  <meyering@lucent.com>
155730         * m4/jm-macros.m4 (jm_MACROS): Remove use of AC_FUNC_STRNLEN.
155731         * m4/prereq.m4: Add jm_PREREQ_STRNLEN.
155732         Use AC_FUNC_STRNLEN here instead.
155734         * m4/jm-macros.m4: Don't AC_REQUIRE([AC_PROG_CC_STDC]).
155735         With autoconf-2.53a, it's part of AC_PROG_CC.
155737 2002-04-28  Paul Eggert  <eggert@twinsun.com>
155739         * m4/jm-macros.m4 (jm_MACROS): Add AC_REPLACE_FUNCS(sig2str).
155740         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_SIG2STR.
155742 2002-04-28  Paul Eggert  <eggert@twinsun.com>
155744         * lib/sig2str.h, lib/sig2str.c: New files.
155745         * lib/Makefile.am (libfetish_a_SOURCES): Add sig2str.h.
155747 2002-04-28  Paul Eggert  <eggert@twinsun.com>
155749         * lib/sig2str.h (SIGNUM_BOUND): Do not use WTERMSIG, to avoid
155750         depending on <sys/wait.h> and WTERMSIG.  Default to 64 instead
155751         of 127, since 64 is the largest conceivable number for ancient
155752         nonstandard hosts.
155753         * lib/sig2str.c: Do not include <sys/wait.h>; no longer needed.
155755 2002-04-28  Jim Meyering  <meyering@lucent.com>
155757         * lib/sig2str.c (WTERMSIG): Remove definition (unused).
155759 2002-04-24  Jim Meyering  <meyering@lucent.com>
155761         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): New macro.
155762         (jm_PREREQ): Use it.
155764         * m4/getloadavg.m4: Check for these headers: locale.h unistd.h
155765         mach/mach.h fcntl.h.
155766         Check for this function: setlocale.
155768 2002-04-24  Jim Meyering  <meyering@lucent.com>
155770         * lib/gettext.h: New file, from Gettext.
155771         * lib/Makefile.am (INCLUDES): Remove -I../intl.
155772         (libfetish_a_SOURCES): Add gettext.h.
155774 2002-04-16  Jim Meyering  <meyering@lucent.com>
155776         * m4/prereq.m4 (jm_PREREQ_READUTMP): Also check for these members:
155777         ut_pid, ut_id, ut_exit.
155779 2002-04-16  Jim Meyering  <meyering@lucent.com>
155781         * lib/readutmp.h (UT_TYPE): Remove definition (now in who.c).
155782         (HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID): Define.
155783         (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_TYPE): Define.
155785 2002-04-12  Jim Meyering  <meyering@lucent.com>
155787         * m4/ls-mntd-fs.m4 (checking for getmntinfo function...): Remove
155788         now-bogus check for f_type in sys/mount.h.  Instead, just test for the
155789         existence of the getmntinfo function.  Needed for Darwin 5.3.
155791         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Also detect when dirfd is a macro.
155792         This is necessary at least on Darwin 5.3.
155794         * m4/jm-macros.m4: Don't AC_REPLACE(strnlen), now that we use
155795         AC_FUNC_STRNLEN.  Otherwise, we'd end up putting two copies of
155796         strnlen.o in the library, and that makes some versions of ranlib
155797         object.
155799 2002-04-12  Jim Meyering  <meyering@lucent.com>
155801         * lib/dirfd.h (dirfd): Elide prototype if dirfd is a macro.
155803 2002-04-09  Jim Meyering  <meyering@lucent.com>
155805         * m4/malloc.m4: (jm_FUNC_MALLOC): Change the `checking ...' message
155806         to be more precise.  Rather than saying we're checking whether the
155807         function `works', say what we're testing.
155808         * m4/realloc.m4 (jm_FUNC_REALLOC): Likewise.
155809         Reported by Bruno Haible.
155811 2002-03-10  Jim Meyering  <meyering@lucent.com>
155813         * lib/makepath.c (make_path): Remove a comma from a diagnostic.
155814         Suggestion from Santiago Vila.
155816 2002-03-08  Jim Meyering  <meyering@lucent.com>
155818         * lib/rename.c: Mention that this wrapper is needed also on
155819         mips-dec-ultrix4.4 systems.
155821 2002-03-02  Jim Meyering  <meyering@lucent.com>
155823         * lib/gettime.c (gettime): Test HAVE_CLOCK_GETTIME,
155824         not HAVE_CLOCK_SETTIME.
155826 2002-02-27  Paul Eggert  <eggert@twinsun.com>
155828         * m4/jm-macros.m4 (jm_MACROS): Do not replace stime; no longer used.
155829         Check for clock_settime.
155831 2002-02-27  Paul Eggert  <eggert@twinsun.com>
155833         * lib/nanosleep.h: Rename to....
155834         * lib/timespec.h: New name for nanosleep.h.  All uses changed.
155836         * lib/gettime.c: New file.
155837         * lib/settime.c: New file.
155838         * lib/stime.c: Remove.
155840         * lib/Makefile.am (libfetish_a_SOURCES): Add gettime.c, settime.c,
155841         timespec.h.  Remove nanosleep.h.
155843 2002-02-25  Paul Eggert  <eggert@twinsun.com>
155845         * m4/acl.m4: New file.
155846         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_ACL.
155847         Do not check for acl or sys/acl.h, as AC_FUNC_ACL does that now.
155849 2002-02-25  Paul Eggert  <eggert@twinsun.com>
155851         * lib/acl.c, lib/acl.h: New files.
155852         * lib/Makefile.am (libfetish_a_SOURCES): Add acl.h, acl.c.
155854 2002-02-24  Jim Meyering  <meyering@lucent.com>
155856         * lib/strnlen.c (strnlen): Define-away/undef so that an inconsistent
155857         prototype in string.h (on at least AIX4.3.2.0 w/gcc-2.95.3) doesn't
155858         cause trouble.  Reported by Nelson Beebe.
155860 2002-02-23  Paul Eggert  <eggert@twinsun.com>
155862         * lib/path-concat.c (xpath_concat): Reorder code to pacify
155863         compilers that don't know that xalloc_die never returns.
155865 2002-02-20  Jim Meyering  <meyering@lucent.com>
155867         * lib/getdate.c: Regenerate using bison-1.33.
155869 2002-02-17  Jim Meyering  <meyering@lucent.com>
155871         * config/config.guess (main): Don't use `head -1'; it's no longer
155872         portable. Use `sed 1q' instead.
155874 2002-02-16  gettextize  <bug-gnu-gettext@gnu.org>
155876         * m4/codeset.m4: Upgrade to gettext-0.11.
155877         * m4/gettext.m4: Upgrade to gettext-0.11.
155878         * m4/glibc21.m4: Upgrade to gettext-0.11.
155879         * m4/iconv.m4: Upgrade to gettext-0.11.
155880         * m4/isc-posix.m4: Upgrade to gettext-0.11.
155881         * m4/lcmessage.m4: Upgrade to gettext-0.11.
155882         * m4/lib-ld.m4: New file, from gettext-0.11.
155883         * m4/lib-link.m4: New file, from gettext-0.11.
155884         * m4/lib-prefix.m4: New file, from gettext-0.11.
155885         * m4/progtest.m4: Upgrade to gettext-0.11.
155887 2002-02-15  Paul Eggert  <eggert@twinsun.com>
155889         * m4/prereq.m4 (jm_PREREQ_POSIXVER): New macro.
155890         (jm_PREREQ): Use it.
155892 2002-02-15  Paul Eggert  <eggert@twinsun.com>
155894         * lib/posixver.c, lib/posixver.h: New files.
155895         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
155897 2002-02-02  Paul Eggert  <eggert@twinsun.com>
155898             Bruno Haible  <bruno@clisp.org>
155900         * lib/unicodeio.h (print_unicode_char): Add exit_on_error argument.
155901         (fwrite_success_callback): New declaration.
155902         * lib/unicodeio.c (unicode_to_mb): New function, extracted from
155903         print_unicode_char. Call failure callback instead of error.
155904         (fwrite_success_callback): New function.
155905         (exit_failure_callback): New function.
155906         (fallback_failure_callback): New function.
155907         (print_unicode_char): Call unicode_to_mb.
155909 2002-01-26  Jim Meyering  <meyering@lucent.com>
155911         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.52g.
155912         * m4/strnlen.m4: Remove file, now that it's part of autoconf.
155914 2002-01-26  Jim Meyering  <meyering@lucent.com>
155916         * lib/Makefile.am (getdate$U.o): Depend on unlocked-io.h.
155918 2002-01-22  Paul Eggert  <eggert@twinsun.com>
155920         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_FSEEKO.
155922 2002-01-22  Jim Meyering  <meyering@lucent.com>
155924         * lib/Makefile.am (Makefile): Don't depend on $(BUILT_SOURCES).
155925         Otherwise, some versions of automake would omit the rule that makes
155926         Makefile from Makefile.in.
155928 2002-01-21  Paul Eggert  <eggert@twinsun.com>
155930         * lib/xmemcoll.h, lib/xmemcoll.c: New files.
155931         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
155932         * lib/memcoll.c: Include errno.h, and declare errno if not defined.
155933         (memcoll): Set errno to zero if there is no error.
155935         * lib/quotearg.c (quotearg_buffer_restyled):
155936         Fix bug with quoting buffers containing NUL when backslashing escapes.
155937         This bug was exposed by the other changes in this patch.
155938         (quotearg_n_options): New arg ARGSIZE.
155939         All callers changed.
155940         (quoting_options_from_style): New function.
155941         (quotearg_n_style): Use it.
155942         (quotearg_n_style_mem): New function.
155944         * lib/quotearg.h (quotearg_n_style_mem): New function.
155946 2002-01-19  Jim Meyering  <meyering@lucent.com>
155948         * m4/jm-macros.m4 (jm_MACROS): Use AC_FUNC_STRNLEN.
155949         Remove useless quotes: DF_PROG="df".
155950         * m4/strnlen.m4: New file.
155952 2002-01-16  Paul Eggert  <eggert@twinsun.com>
155954         * lib/backupfile.c (ISDIGIT): Comment fix.
155955         * lib/getdate.y (ISDIGIT): Likewise.
155956         * lib/posixtm.c (ISDIGIT, year): Likewise.
155957         * lib/strverscmp.c (ISDIGIT): Likewise.
155958         * lib/userspec.c (ISDIGIT): Likewise.
155960 2002-01-16  Jim Meyering  <meyering@lucent.com>
155962         * lib/getdate.y: Add three semicolons, each just before a closing
155963         brace. Bison (as of version 1.31) no longer papers over that mistake.
155965 2002-01-05  Jim Meyering  <meyering@lucent.com>
155967         * lib/version-etc.c (version_etc_copyright): Update copyright year.
155969 2001-12-19  Paul Eggert  <eggert@twinsun.com>
155971         * lib/closeout.c (close_stdout_status): If ferror (stdout), do
155972         not silently exit merely because the output buffer happens to
155973         have nothing pending.
155975 2001-12-18  Paul Eggert  <eggert@twinsun.com>
155977         See the big note in ../ChangeLog.
155978         * lib/human.c (suffixes): Prefer K to k for 1024.
155979         (generate_suffix_backwards): New function.
155980         (human_readable_inexact): Use it.
155981         * lib/xstrtol.c (__xstrtol): If there is no number but there
155982         is a valid suffix, assume 1.  "MB" now means decimal, "MiB" binary.
155983         Accept 'K' as well as 'k'.
155985 2001-12-15  Jim Meyering  <meyering@lucent.com>
155987         * lib/regex.h (__restrict_arr): Update from libc.
155989         * lib/mountlist.h (ME_REMOTE): Recognize file systems of type smbfs
155990         as `remote' if the name starts with `//'.  Suggested by Michael Stone.
155991         (STREQ): Define.
155993 2001-12-14  Jim Meyering  <meyering@lucent.com>
155995         * m4/jm-macros.m4 (jm_MACROS): Check for iswspace.
155996         Suggestion from Bruno Haible.
155998 2001-12-10  Jim Meyering  <meyering@lucent.com>
156000         * lib/linebuffer.c: Remove explicit declarations of xmalloc and
156001         xrealloc, Instead, include "xalloc.h".
156002         (initbuffer): Don't cast xmalloc return value to char*.
156003         (readline): Reword comment.
156004         Don't cast xrealloc return value to char*
156005         Return NULL, not 0.
156007 2001-12-09  Jim Meyering  <meyering@lucent.com>
156009         * lib/modechange.c (mode_compile): Add cast to avoid pedantic warning
156010         about `signed and unsigned type in conditional expression'.
156011         * lib/posixtm.c (posix_time_parse): Likewise.
156013         * lib/xreadlink.c (xreadlink): Add cast to avoid a pedantic warning.
156015         * lib/readtokens.c (readtoken): Declare an index to be of type unsigned
156016         to avoid a pedantic warning.
156018         * lib/getstr.c: Don't include assert.h.
156019         (getstr): Remove warning-evoking assertions.
156020         Return -1 if offset parameter is out of bounds.
156021         Change the type of a local from int to size_t.
156023         * lib/strftime.c (my_strftime_localtime_r): Include this function
156024         definition in the `#if ! HAVE_TM_GMTOFF' block.
156026         * lib/xgethostname.c: Remove declarations of xmalloc and xrealloc.
156027         Include xalloc.h instead.
156029 2001-12-02  Jim Meyering  <meyering@lucent.com>
156031         * lib/tempname.c: Don't declare getenv, thus reverting the change of
156032         2001-11-18.  It's no longer necessary, now that stdlib.h is always
156033         included.
156035         * lib/regex.c [!__BOUNDED_POINTERS__]: Define away __bounded,
156036         __unbounded, and __ptrvalue.  Reported by Uwe H. Steinfeld.
156038 2001-11-30  Akim Demaille  <akim@epita.fr>
156040         * lib/xstrdup.c: Include xalloc.h, so that xstrdup is declared
156041         before being defined.
156043 2001-11-27  Paul Eggert  <eggert@twinsun.com>
156045         * lib/quotearg.h (quotearg_n, quotearg_n_style):
156046         First arg is int, not unsigned.
156047         * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
156048         (SIZE_MAX, UINT_MAX): New macros.
156049         (quotearg_n_options): Abort if N is negative.
156050         Avoid overflow check on hosts where size_t is 64 bits and int
156051         is 32 bits, as overflow is impossible there.
156052         Fix off-by-one typo that caused unnecessary reallocation.
156054 2001-11-27  Jim Meyering  <meyering@lucent.com>
156056         * lib/tempname.c: Merge with version from libc.
156057         * lib/regex.c: Likewise.
156059         * lib/tempname.c: Include stdlib.h unconditionally.  On some old
156060         systems for which STDC_HEADERS is 0, it was not included, resulting in
156061         a warning about an integer-to-pointer conversion problem with getenv.
156062         Reported by Volker Borchert.
156064 2001-11-26  Jim Meyering  <meyering@lucent.com>
156066         * lib/gtod.h: Remove file.
156067         * lib/Makefile.am (libfetish_a_SOURCES): Remove gtod.h.
156068         * lib/gettimeofday.c: Don't include gtod.h.
156069         (GTOD_init): Remove function.
156070         (rpl_gettimeofday): Do its job here instead, rather than aborting.
156071         Suggestion from Volker Borchert.
156073 2001-11-23  Jim Meyering  <meyering@lucent.com>
156075         * lib/hash.h (struct hash_table): Don't define here.  Merely declare
156076         it.
156077         * lib/hash.c (struct hash_table): Define it here instead.
156079 2001-11-22  Jim Meyering  <meyering@lucent.com>
156081         * lib/hash.h: Bracket contents of file with #ifndef HASH_H_ ... #endif.
156083 2001-11-20  Jim Meyering  <meyering@lucent.com>
156085         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Update comment to reflect that
156086         SunOS 4.1.4 and Solaris 2.5.1 lose, too.
156088 2001-11-19  Jim Meyering  <meyering@lucent.com>
156090         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Don't bother with a temporary
156091         directory.  Use "conftestXXXXXX" as the template.
156092         Suggestion from Paul Eggert.
156094         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Close each descriptor
156095         immediately, so the test doesn't mistakenly hit the max-open-files
156096         limit.
156098 2001-11-18  Paul Eggert  <eggert@twinsun.com>
156100         * lib/tempname.c (TMP_MAX): Remove; no longer needed.
156101         (TEMPORARIES): New macro.
156102         (__gen_tempname): Use TEMPORARIES rather than TMP_MAX.  This
156103         removes an artificial limitation (e.g. HP-UX 10.20, where
156104         TMP_MAX is 17576).
156106 2001-11-18  Jim Meyering  <meyering@lucent.com>
156108         * m4/prereq.m4 (jm_PREREQ_TEMPNAME): Check for declaration of getenv.
156110 2001-11-18  Jim Meyering  <meyering@lucent.com>
156112         * lib/tempname.c [!HAVE_DECL_GETENV]: Declare getenv to avoid warning
156113         on SunOS 4.
156115         * lib/Makefile.am (Makefile): Depend on $(BUILT_SOURCES), so those
156116         files will be created before anything else.
156118 2001-11-17  Paul Eggert  <eggert@twinsun.com>
156120         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): Do not define
156121         WINSIZE_IN_PTEM if <termios.h> defines struct winsize.
156123 2001-11-17  Jim Meyering  <meyering@lucent.com>
156125         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): New file and macro.
156126         Prompted by a report from Bob Proulx.
156128         * m4/jm-macros.m4 (jm_MACROS): Don't test for mkstemp here.
156129         Instead, require UTILS_FUNC_MKSTEMP.
156131 2001-11-17  Jim Meyering  <meyering@lucent.com>
156133         * m4/jm-macros.m4 (jm_MACROS): Remove code to set POW_LIBM.
156134         Now, that's done as part of AC_FUNC_STRTOD.
156136 2001-11-17  Jim Meyering  <meyering@lucent.com>
156138         * lib/modechange.c (mode_adjust): Fix error introduced on 1999-04-26
156139         that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
156140         rather than group writable.  Patch by Juan F. Codagnone.
156142         * lib/readtokens.c: Remove explicit declarations of xmalloc and
156143         xrealloc, Instead, include "xalloc.h".
156145         * lib/mountlist.c: Include unlocked-io.h after all system headers.
156146         Remove explicit declarations of xmalloc, xrealloc,
156147         and xstrdup.  Instead, include "xalloc.h".
156149         * lib/argmatch.c, closeout.c, error.c, exclude.c: Include
156150         unlocked-io.h.
156151         * lib/fatal.c, getdate.y, getpass.c, getstr.c, getusershell.c:
156152         Likewise.
156153         * lib/mountlist.c, posixtm.c, readtokens.c, readutmp.c: Likewise.
156155         * lib/regex.c, sha.c, version-etc.c, yesno.c: Likewise.
156156         Reported by Padraig Brady.
156158         * lib/mkstemp.c: #undef mkstemp.
156159         Include config.h.
156160         (rpl_mkstemp): Rename from mkstemp.
156161         Protoize.
156163 2001-11-16  Jim Meyering  <meyering@lucent.com>
156165         * lib/physmem.c [HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>.
156166         (physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to
156167         determine the amount of total physical memory, use pstat_getstatic.
156168         HPUX-11 doesn't define _SC_PHYS_PAGES.
156169         (physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]:
156170         If sysconf couldn't be used to determine the amount of available
156171         physical memory, use both pstat_getstatic and pstat_getdynamic.
156172         Based on a patch from Bob Proulx.
156174 2001-11-10  Jim Meyering  <meyering@lucent.com>
156176         * m4/prereq.m4 (jm_PREREQ_PHYSMEM): New function.
156177         (jm_PREREQ): Use it.
156179 2001-11-09  Jim Meyering  <meyering@lucent.com>
156181         * m4/jm-macros.m4: Require autoconf-2.52f.
156182         (AC_FUNC_ERROR_AT_LINE, AC_FUNC_OBSTACK, AC_FUNC_STRTOD):
156183         Use these AC_-prefixed names, not the AM_-prefixed ones.
156185         * m4/afs.m4 (jm_AFS): Quote the body.  Patch by Akim Demaille.
156187 2001-11-05  Jim Meyering  <meyering@lucent.com>
156189         * lib/xstat.in (slash_aware_lstat): Correct a misleading comment.
156191 2001-11-04  Jim Meyering  <meyering@lucent.com>
156193         * m4/fpending.m4: Remove unused cruft that saved, set, and restored
156194         $DEFS.
156196 2001-11-03  Jim Meyering  <meyering@lucent.com>
156198         * m4/jm-glibc-io.m4n (jm_FUNC_GLIBC_UNLOCKED_IO): Quote first arg
156199         of AC_DEFUN.
156201         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Rework so dirfd.c doesn't have to
156202         know the name of the variable in the macro definition.
156204 2001-11-03  Jim Meyering  <meyering@lucent.com>
156206         * lib/argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args
156207         in argmatch_to_argument call.
156209         * lib/dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an
156210         argument.
156212         * lib/hash.c (hash_clear): Fix a bug that could lead to an infloop or
156213         e.g., a fault due to an attempt to free a NULL pointer.
156215 2001-11-01  Jim Meyering  <meyering@lucent.com>
156217         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): New macro.
156218         * m4/jm-macros.m4 (jm_MACROS): Require UTILS_FUNC_DIRFD.
156220 2001-11-01  Jim Meyering  <meyering@lucent.com>
156222         * lib/dirfd.c, lib/dirfd.h: New files.
156223         * lib/Makefile.am (libfetish_a_SOURCES): Add dirfd.h.
156225         * lib/hash.c (hash_print) [TESTING]: Clean up.
156227 2001-10-22  Paul Eggert  <eggert@twinsun.com>
156229         * lib/hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__,
156230         to avoid a warning if -Wall.
156232 2001-10-22  Jeff Bailey  <jbailey@outpost.dnsalias.org>
156234         * README: New file
156235         * doc/*: Add COPYING, COPYING.LIB, COPYING.DOC, fdl.texi
156236         (per RMS's instructions, this is now the canonical source)
156237         * lgpl/, gpl/: New directories.
156239 2001-10-21  Paul Eggert  <eggert@twinsun.com>
156241         * lib/regex.c (uintptr_t): Remove macro and decl; it's config.h's job.
156243 2001-10-21  Jim Meyering  <meyering@lucent.com>
156245         * lib/obstack.c (_): Honor the setting of ENABLE_NLS.  Otherwise,
156246         this code would end up calling gettext even in packages built
156247         with --disable-nls.
156248         * lib/getopt.c (_): Likewise.
156249         * lib/regex.c (_): Likewise.
156251 2001-10-20  Paul Eggert  <eggert@twinsun.com>
156253         * m4/error.m4 (jm_PREREQ_ERROR):
156254         Do not invoke AC_CHECK_FUNCS with strerror_r, as
156255         AC_FUNC_STRERROR_R does that.
156256         Check for strerror declaration.
156258         * m4/strerror_r.m4: Add copyright notice, as nontrivial m4 files
156259         are supposed to have them these days.
156260         (AC_FUNC_STRERROR_R): Always do char* test, so that it gets cached.
156261         Merge changes from latest Autoconf CVS.
156262         Rename ac_cv_func_strerror_r_works to ac_cv_func_strerror_r_char_p,
156263         and rename HAVE_WORKING_STRERROR_R to STRERROR_R_CHAR_P, since
156264         POSIX decided to standardize on the int flavor of strerror_r.
156266 2001-10-20  Paul Eggert  <eggert@twinsun.com>
156268         * lib/error.c (strerror_r): Do not declare unless !_LIBC.
156269         Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
156270         Use strerror_r that is only a macro, even if it is not a function.
156271         (strerror): Check for HAVE_DECL_STRERROR before declaring.
156272         (private_strerror): Use prototypes, not old-style function definition.
156273         (print_errno_message): New function.
156274         Support the POSIX 'int'-flavored strerror_r, as well as the traditional
156275         char*-flavored one.
156276         (error_tail, error, error_at_line): Use it.
156278 2001-10-11  Jim Meyering  <meyering@lucent.com>
156280         * lib/argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
156281         and quote_n (1, ... to avoid clobbering a buffer.
156283 2001-10-05  Jim Meyering  <meyering@lucent.com>
156285         * lib/Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and
156286         hash-pjw.h.
156287         * lib/hash-pjw.c: New file (factored out of fileutils' remove.c).
156288         * lib/hash-pjw.h: New file.
156290 2001-09-30  Jim Meyering  <meyering@lucent.com>
156292         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): See if
156293         `struct fsstat' has the `f_fstypename' member.
156294         Use that to define FS_TYPE, which is now used to make
156295         the getfsstat link test tighter.
156297 2001-09-30  Jim Meyering  <meyering@lucent.com>
156299         * lib/mountlist.c [MOUNTED_GETFSSTAT]:
156300         Include <sys/ucred.h>, for Apple Darwin.
156301         Include sys/mount.h and sys/fs_types.h only if available.
156302         (FS_TYPE): Define.
156303         (read_filesystem_list): Use FS_TYPE.
156305 2001-09-29  Paul Eggert  <eggert@twinsun.com>
156307         * lib/exclude.c (excluded_filename): 0 -> false, since it's
156308         a boolean context.
156310 2001-09-29  Jim Meyering  <meyering@lucent.com>
156312         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
156313         [one-argument getmntent function]): Include stdio.h before mntent.h.
156314         SunOS 4.1.x needs it for the declaration of `FILE'.
156315         Patch by Volker Borchert.
156317         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
156318         Check for these headers: sys/param.h sys/ucred.h sys/mount.h
156319         sys/fs_types.h, and make the link-test for getfsstat guard #include
156320         directives with appropriate #if HAVE_*_H tests so that we can
156321         detect getfsstat on Apple Darwin1.3.7 systems.
156322         Reported by Nelson Beebe.
156323         Fix harmless typo in cache variable name: s/getsstat/getfsstat/.
156325 2001-09-28  Paul Eggert  <eggert@twinsun.com>
156327         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
156328         #defines strtoimax.  Also treat the other strto* functions
156329         like strtoimax.
156331         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
156332         Check for strtoul and strtoumax,
156333         as those declarations are made even in the signed case.
156334         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
156335         Likewise, for strtol and strtoimax.
156337 2001-09-28  Paul Eggert  <eggert@twinsun.com>
156339         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
156340         #defines strtoimax.  Also treat the other strto* functions
156341         like strtoimax.
156343         * lib/xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL.
156344         (strtoul): Do not declare if HAVE_DECL_STRTOUL.
156345         (strtoimax, strtoumax): Do not declare if already defined as a macro.
156347 2001-09-26  Jim Meyering  <meyering@lucent.com>
156349         Most macros in unlocked-io.h had the wrong number of arguments.
156350         * lib/gen-uio: New script.
156351         (USE_UNLOCKED_IO): Define to 1 if not already defined.
156352         * lib/unlocked-io.hin: Remove file.
156353         * lib/Makefile.am (unlocked-io.h): Rewrite to use a separate script,
156354         rather than trying to embed it here.
156355         (EXTRA_DIST): Add gen-uio.  Remove unlocked-io.hin
156356         Reported by Padraig Brady.
156358 2001-09-25  Volker Borchert  <bt@teknon.de>
156360         * lib/gettimeofday.c (rpl_gettimeofday): Declare local variable
156361         `result'.
156363 2001-09-24  Jim Meyering  <meyering@lucent.com>
156365         * m4/gettext.m4: Use the version from gettext-0.10.40, not CVS.
156367 2001-09-23  Jim Meyering  <meyering@lucent.com>
156369         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add a compile-test
156370         instead of the mere test for existence of mntent.h.  The latter
156371         would get a false-positive on AIX 3.4 systems.
156372         In the outer getmntent if-block, don't die if neither of the getmntent
156373         tests succeeds.  Instead, just fall through and continue with the
156374         remaining tests.
156376 2001-09-23  Jim Meyering  <meyering@lucent.com>
156378         * lib/mountlist.c: Remove useless parentheses in #if directives.
156379         (MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
156380         the deprecated MOUNTED symbol is no longer defined in mntent.h.
156382 2001-09-22  Jim Meyering  <meyering@lucent.com>
156384         * m4/gettext.m4: New file.  From gettext.
156385         * m4/lcmessage.m4: Sync with gettext -- this changes only comments.
156386         * m4/progtest.m4: Likewise
156387         * m4/isc-posix.m4: Decrement serial number to sync with gettext.
156388         * m4/glibc21.m4: Likewise.
156390         * m4/libintl.m4: Remove.  No longer used.
156392 2001-09-22  Jim Meyering  <meyering@lucent.com>
156394         * lib/localcharset.c: Update from latest gettext.
156395         * lib/config.charset: Likewise.
156397 2001-09-20  Jim Meyering  <meyering@lucent.com>
156399         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX): Check for declaration of
156400         strtoimax.
156401         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check for declaration of
156402         strtoumax.
156404 2001-09-20  Jim Meyering  <meyering@lucent.com>
156406         * lib/xstrtol.c (strtoimax): Guard declaration with
156407         `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
156408         The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
156409         have their own, conflicting declaration of strtoimax in sys/inttypes.h.
156410         (strtoumax): Likewise, for completeness (it wasn't necessary).
156412 2001-09-17  Paul Eggert  <eggert@twinsun.com>
156414         * lib/strtoimax.c (HAVE_LONG_LONG):
156415         Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
156416         (strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
156417         to work around bug in IBM C compiler.
156419 2001-09-17  Jim Meyering  <meyering@lucent.com>
156421         * m4/chown.m4, fstypename.m4, getgroups.m4, gettimeofday.m4,
156422         * m4/jm-mktime.m4, lstat.m4, malloc.m4, memcmp.m4, mkdir-slash.m4,
156423         * m4/nanosleep.m4, putenv.m4, readdir.m4, realloc.m4, rename.m4,
156424         * m4/st_dm_mode.m4, stat.m4, strerror_r.m4, timespec.m4, utimbuf.m4,
156425         * m4/utimes.m4: Use AC_DEFINE rather than AC_DEFINE_UNQUOTED,
156426         whenever the right hand side need not be expanded by the shell.
156428 2001-09-16  Paul Eggert  <eggert@twinsun.com>
156430         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): Remove test for GNU C
156431         library.  It's not correct, as some older glibcs are buggy.
156432         fnmatch wasn't fixed until glibc 2.2.
156434         Use AC_DEFINE, not AC_DEFINE_UNQUOTED, as there's no
156435         special shell magic here.
156437 2001-09-16  Jim Meyering  <meyering@lucent.com>
156439         * m4/mkdir-slash.m4 (UTILS_FUNC_MKDIR_TRAILING_SLASH): New file/macro.
156440         * m4/jm-macros.m4: Require it.
156442 2001-09-16  Jim Meyering  <meyering@lucent.com>
156444         * lib/mkdir.c: New file.
156446 2001-09-15  Jim Meyering  <meyering@lucent.com>
156448         * m4/jm-macros.m4: Check for help2man.
156450 2001-09-11  Jim Meyering  <meyering@lucent.com>
156452         * m4/host-os.m4 (UTILS_HOST_OS): New file/macro.
156453         The body, by Paul Eggert, was moved here from configure.in.
156454         * m4/jm-macros.m4: Require UTILS_HOST_OS.
156456 2001-09-04  Paul Eggert  <eggert@twinsun.com>
156458         * m4/prereq.m4 (jm_PREREQ_XREADLINK): New macro.
156459         (jm_PREREQ): Use it.
156461 2001-09-04  Paul Eggert  <eggert@twinsun.com>
156463         * lib/xreadlink.c (xreadlink): Omit size_t* arg.  All uses changed.
156464         Use ssize_t, not int, to store result of readlink.
156465         Check for ssize_t overflow as well as size_t overflow,
156466         as POSIX says the result of readlink is implementation-defined
156467         when ssize_t overflows.
156468         Remove unnecessary cast to char*.
156469         Use free+malloc instead of realloc, as the storage doesn't need
156470         to be preserved and it's clearer and can be more efficient that way.
156471         (SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
156472         * lib/xreadlink.h (xreadlink): Update prototype.
156474 2001-09-04  Paul Eggert  <eggert@twinsun.com>
156476         * lib/xgetcwd.c: Revert some of the previous change; intead,
156477         fix the HAVE_GETCWD_NULL code to behave more like the
156478         !HAVE_GETCWD_NULL code used to.
156480         Include "xalloc.h".
156481         (xgetcwd): Do not return NULL when memory is exhausted; instead,
156482         invoke xalloc_die.
156484 2001-09-03  Paul Eggert  <eggert@twinsun.com>
156486         * m4/prereq.m4 (jm_PREREQ_XGETCWD): Check for limits.h and
156487         sys/param.h, as pathmax.h includes them.
156489 2001-09-03  Paul Eggert  <eggert@twinsun.com>
156491         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD.
156492         (jm_PREREQ_XGETCWD): New macro.
156494         * m4/getcwd.m4: New file.
156496 2001-09-03  Paul Eggert  <eggert@twinsun.com>
156498         * lib/xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more
156499         like the HAVE_GETCWD_NULL code.
156500         Include pathmax.h if not HAVE_GETCWD.
156501         Do not include xalloc.h.
156502         (INITIAL_BUFFER_SIZE): New symbol.
156503         Do not use xmalloc / xrealloc, since the caller is responsible for
156504         handling errors.  Preserve errno around `free' during failure.
156505         Do not overrun buffer when using getwd.
156507 2001-09-03  Paul Eggert  <eggert@twinsun.com>
156509         * lib/xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined
156510         __GLIBC__ && __GLIBC__ >= 2), to decide whether to use
156511         getcwd (NULL, 0).
156513 2001-09-03  Paul Eggert  <eggert@twinsun.com>
156515         * lib/exclude.c (fnmatch_no_wildcards): Fix confusion between
156516         usage of FNM_CASEFOLD and FNM_LEADING_DIR.  The bug was
156517         spotted by Jim Meyering.
156519 2001-09-03  Jim Meyering  <meyering@lucent.com>
156521         * lib/xreadlink.c (xreadlink): Preserve errno around `free' during
156522         failure.
156524 2001-09-02  Jim Meyering  <meyering@lucent.com>
156526         * lib/error.c: Update from GNU libc.
156528 2001-09-01  Jim Meyering  <meyering@lucent.com>
156530         * m4/jm-macros.m4 (jm_MACROS): Check for canonicalize_file_name.
156531         Used by df.
156533 2001-09-01  Jim Meyering  <meyering@lucent.com>
156535         * lib/xreadlink.c: New file.
156536         * lib/xreadlink.h: New file.
156537         * lib/Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and
156538         xreadlink.h.
156540         * lib/regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
156541         doesn't conflict with sparc Solaris 7's definition in
156542         /usr/include/sys/int_types.h.
156544         * lib/exclude.c: Use `""', not `<>' to #include non-system header
156545         files.
156546         (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
156547         and strncasecmp as r-values.  Unixware didn't have declarations.
156549 2001-08-31  Paul Eggert  <eggert@twinsun.com>
156551         * lib/xstrtol.h: Add copyright notice.
156552         (_DECLARE_XSTRTOL): Improve quality of diagnostic for
156553         LONGINT_INVALID_SUFFIX_CHAR.
156555 2001-08-31  Paul Eggert  <eggert@twinsun.com>
156557         * lib/xstrtol.c (strtoimax): New decl.
156559 2001-08-31  Paul Eggert  <eggert@twinsun.com>
156561         * lib/xgetcwd.c: Don't include pathmax.h.
156562         Include stdlib.h and unistd.h if available.
156563         Include xalloc.h.
156564         (xmalloc, xstrdup, free): Remove decls.
156565         (xgetcwd): Don't assume sizes fit in unsigned.
156566         Check for overflow when computing sizes.
156567         Simplify reallocation code.
156569 2001-08-31  Paul Eggert  <eggert@twinsun.com>
156571         * lib/savedir.c (savedir): Remove size parameter, as POSIX says that
156572         a directory's st_size can have an arbitrary value, so the old
156573         usage could waste an arbitrary amount of memory.  All uses
156574         changed.
156575         * lib/savedir.h: Update prototype.
156577 2001-08-31  Paul Eggert  <eggert@twinsun.com>
156579         * lib/Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
156581         * lib/strtoimax.c: Renamed from strtoxmax.c, removing the
156582         old strtoimax.c.
156584         Also, make the following further changes to make this file's
156585         configuration more similar to that of strtol.c:
156586         (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.  All uses changed.
156587         (strtoumax, uintmax_t, strtoull, strtol): Remove.
156588         (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
156589         (strtoimax): Renamed from strtoumax.  All uses of unsigned values
156590         changed to signed values.
156592         And make the following changes as well:
156593         Fix copyright notice, as 1999 was missing.
156594         (verify): New macro.
156595         (strtoimax): Check sizes at compile-time, not run-time.
156596         Prefer strtol to strtoll if both work.
156597         (main): Remove; it was not that useful and was a pain to maintain.
156599         * lib/strtoumax.c: Include strtoimax.c, not strtouxmax.c.
156601 2001-08-31  Jim Meyering  <meyering@lucent.com>
156603         * lib/xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
156604         Use an initial, malloc'd, buffer of length 128 rather than
156605         a statically allocated one of length 1024.
156607 2001-08-30  Paul Eggert  <eggert@twinsun.com>
156609         Simplify code, partly by assuming autoconf 2.52 semantics.
156611         * m4/Makefile.am (EXTRA_DIST): Remove uintmax_t.m4.
156613         * m4/inttypes.m4 (AC_PREREQ): Bump to 2.52.
156614         (jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf in 2.52.
156615         All uses removed.
156616         (jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T):
156617         Move AC_REQUIRE to next-to-top level, to avoid confusion.
156618         Use 2.52's AC_CHECK_TYPE instead of merely looking for the header.
156619         * m4/prereq.m4 (jm_PREREQ_HUMAN): Don't require
156620         jm_AC_HEADER_INTTYPES_H.
156621         * m4/jm-macros.m4 (jm_MACROS): Likewise.
156623         * m4/uintmax_t.m4: Remove, as it duplicates inttypes.m4.
156625         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
156626         Quote first arg of AC_DEFUN.
156627         Require jm_AC_TYPE_UINTMAX_T and jm_AC_TYPE_UNSIGNED_LONG_LONG
156628         since they are needed to parse the include file even if we need
156629         only xstrtoimax.  Simplify logic behind the args to AC_REPLACE.
156630         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Likewise,
156631         but with opposite signedness.
156633 2001-08-30  Paul Eggert  <eggert@twinsun.com>
156635         Merge 'exclude' changes from tar 1.13.22.
156636         This fixes one or two unlikely storage allocation overflow bugs,
156637         but doesn't change user-visible behavior otherwise.
156639 2001-08-30  Paul Eggert  <eggert@twinsun.com>
156641         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_EXCLUDE.
156642         (jm_PREREQ_EXCLUDE): New macro.
156644 2001-08-30  Paul Eggert  <eggert@twinsun.com>
156646         * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
156647         tm to be declared.
156649 2001-08-30  Paul Eggert  <eggert@twinsun.com>
156651         * lib/hash.c: Remove '2001' from copyright notice.
156653 2001-08-30  Paul Eggert  <eggert@twinsun.com>
156655         * lib/full-write.h: New file.
156656         * lib/Makefile.am (libfetish_a_SOURCES): Add full-write.h.
156657         * lib/full-write.c: Correct credits, as cccp.c no longer
156658         exists and anyway it was so heavily changed from the old cccp
156659         code as to be unrecognizable.  Include full-write.h.
156660         (full_write): Return size_t, with short writes meaning failure.
156661         All callers changed.  This fixes a bug with large buffers
156662         on 64-bit hosts.
156663         * lib/utime.c: Include full-write.h.
156665 2001-08-30  Paul Eggert  <eggert@twinsun.com>
156667         * lib/exclude.c (bool): Declare, perhaps by including stdbool.h.
156668         (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
156669         (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
156670         Include if available.
156671         (<xalloc.h>): Include
156672         (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
156673         (verify): New macro.  Use it to verify that EXCLUDE macros do not
156674         collide with FNM macros.
156675         (struct patopts): New struct.
156676         (struct exclude): Use it, as exclude patterns now come with options.
156677         (new_exclude): Support above changes.
156678         (new_exclude, add_exclude_file):
156679         Initial size must now be a power of two to simplify overflow checking.
156680         (free_exclude, fnmatch_no_wildcards): New function.
156681         (excluded_filename): No longer requires options arg, as the options
156682         are determined by add_exclude.  Now returns bool, not int.
156683         (excluded_filename, add_exclude):
156684         Add support for the fancy new exclusion options.
156685         (add_exclude, add_exclude_file): Now takes int options arg.
156686         Check for arithmetic overflow when computing sizes.
156687         (add_exclude_file): xrealloc might modify errno, so don't
156688         realloc until after errno might be used.
156690         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
156691         New macros.
156692         (free_exclude): New decl.
156693         (add_exclude, add_exclude_file): Now takes int options arg.
156694         (excluded_filename): No longer requires options arg, as the options
156695         are determined by add_exclude.  Now returns bool, not int.
156697 2001-08-30  Paul Eggert  <eggert@twinsun.com>
156699         * lib/alloca.c (alloca): Arg is of type size_t, not unsigned.
156701 2001-08-27  Jim Meyering  <meyering@lucent.com>
156703         * lib/Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
156705         * lib/version-etc.c (N_): Remove definition.
156706         Revert most of last change.
156707         Instead, simply don't mark the `Copyright...' string for translation.
156708         Based on advice from Paul Eggert.
156710         * lib/strtoxmax.c: Tweak comment.
156712 2001-08-26  Jim Meyering  <meyering@lucent.com>
156714         * m4/jm-macros.m4: Require jm_AC_PREREQ_XSTRTOIMAX.
156716         * m4/xstrtoimax.m4: New file.
156717         * m4/xstrtoumax.m4: Add comments explaining why we
156718         AC_REPLACE_FUNCS(strtol).
156720 2001-08-26  Jim Meyering  <meyering@lucent.com>
156722         * lib/version-etc.c (version_etc_copyright_fmt): Replace literal year
156723         of copyright with `%s' so translators don't get an untranslated
156724         message in 2002.
156725         (COPYRIGHT_YEAR): Define.
156726         (version_etc): Use fprintf rather than fputs.
156727         Suggestion from Ulrich Drepper.
156729         * lib/Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
156731         * lib/strtoll.c: New file, from GNU libc.
156732         * lib/xstrtoimax.c: New file.
156734         * lib/xstrtol.h: Add xstrtoimax.
156735         * lib/strtoumax.c: New file.  Simply include "strtoumax.c".
156736         * lib/strtoimax.c: New file.  Likewise, but first define
156737         STRTOUXMAX_SIGNED.
156739         * lib/strtoumax.c: Factor to work both for unsigned and signed types,
156740         ...
156741         * lib/strtoxmax.c: ... then renamed to this.
156743 2001-08-18  Paul Eggert  <eggert@twinsun.com>
156745         * m4/inttypes.m4: Add AC_PREREQ(2.13).
156746         (jm_AC_HEADER_INTTYPES_H): Test for intmax_t, too.
156747         (jm_AC_TYPE_INTMAX_T): New macro.
156748         (jm_AC_TYPE_UINTMAX_T): Moved here from uintmax_t.m4.
156750         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): New macro.
156752         * m4/longlong.m4: Renamed from ulonglong.m4.
156753         * m4/inttypes.m4: Renamed from inttypes_h.m4.
156754         * m4/uintmax_t.m4: Removed.
156756 2001-08-13  Paul Eggert  <eggert@twinsun.com>
156758         * lib/Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
156759         Port to Solaris 8, where 'sed' requires a space after the 'r'
156760         command, and where sh dislikes "$/".  Clean up the spacing a bit.
156761         Redirect output to $tmp just once.
156763 2001-08-12  Paul Eggert  <eggert@sic.twinsun.com>
156765         * lib/addext.c (<errno.h>): Include.
156766         (errno): Declare if not defined.
156767         (addext): Work correctly when pathconf returns -1 and leaves
156768         errno alone because there is no limit.  Also, work even if
156769         pathconf returns a value greater than SIZE_MAX.
156771 2001-08-12  Jim Meyering  <meyering@lucent.com>
156773         * m4/afs.m4, assert.m4, bison.m4, check-decl.m4, chown.m4, d-ino.m4,
156774         d-type.m4, dos.m4, error.m4, fnmatch.m4, fpending.m4, fstypename.m4,
156775         fsusage.m4, ftruncate.m4, getgroups.m4, glibc.m4, gnu-source.m4,
156776         group-member.m4, jm-glibc-io.m4, jm-macros.m4, jm-mktime.m4,
156777         jm-winsz1.m4, jm-winsz2.m4, lchown.m4, lib-check.m4, libintl.m4,
156778         link-follow.m4, ls-mntd-fs.m4, lstat.m4, malloc.m4, mbrtowc.m4,
156779         mbstate_t.m4, mbswidth.m4, memcmp.m4, nanosleep.m4, perl.m4,
156780         prereq.m4, putenv.m4, readdir.m4, realloc.m4, regex.m4, rename.m4,
156781         rmdir-errno.m4, search-libs.m4, st_dm_mode.m4, st_mtim.m4, stat.m4,
156782         strftime.m4, timespec.m4, unlink-busy.m4, uptime.m4, utimbuf.m4,
156783         utime.m4, utimes.m4, xstrtoumax.m4:
156784         Quote the first argument in each use of AC_DEFUN.
156786 2001-08-12  Jim Meyering  <meyering@lucent.com>
156788         * lib/xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
156789         Simply `return getcwd (NULL, 0);'.
156790         [! (defined __GLIBC__ && __GLIBC__ >= 2)]:
156791         Use 1300 as initial value for length, not PATH_MAX.
156793         * lib/pathmax.h: Clean up cpp syntax.
156795 2001-08-12  Jim Meyering  <meyering@lucent.com>
156797         * lib/gettimeofday.c: New file.
156798         * lib/gtod.h: New file.
156799         * lib/Makefile.am (libfetish_a_SOURCES): Add gtod.h.
156801 2001-08-05  Jim Meyering  <meyering@lucent.com>
156803         * m4/jm-macros.m4: Require autoconf-2.52.
156805 2001-08-04  Jim Meyering  <meyering@lucent.com>
156807         * lib/error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if
156808         stmt, to get in sync with glibc.
156810 2001-08-03  Paul Eggert  <eggert@twinsun.com>
156812         The following changes are from gettext 0.10.39 as maintained by
156813         Bruno Haible.
156815         * lib/mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
156816         Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
156817         with inverted sense.  All uses changed.
156819         * lib/mbswidth.c: Don't include <limits.h>.
156820         Include <stdlib.h> and <string.h> unconditionally.
156821         (iswcntrl, mbsinit, ISCNTRL): New macros.
156822         (mbsnwidth): Use K&R style function declarations.
156823         Don't bother checking for MB_LEN_MAX == 1, since the compiler
156824         can optimize it when MB_CUR_MAX == 1.
156825         The width of control characters is zero, not 1.
156827 2001-08-03  Paul Eggert  <eggert@twinsun.com>
156829         The following changes are from gettext 0.10.39 as maintained by
156830         Bruno Haible, except that getline.m4 continues to use AC_LIBOBJ.
156832         * m4/codeset.m4: Upgrade to serial AM1.
156833         (AM_LANGINFO_CODESET): Renamed from jm_LANGINFO_CODESET;
156834         all uses changed.  Quote first arg of AC_DEFUN.
156835         (am_cv_langinfo_codeset): Renamed from jm_cv_langinfo_codeset.
156837         * m4/iconv.m4: Upgrade to serial AM2.
156838         (AM_ICONV): Renamed from jm_ICONV; all uses changed.
156839         Add --with-libconv-prefix.
156840         Quote first arg of AC_DEFUN.  Add description for ICONV_CONST.
156841         (am_cv_func_iconv): Renamed from jm_cv_func_iconv.
156842         (am_cv_lib_iconv): Renamed from jm_cv_lib_iconv.
156843         (am_cv_proto_iconv): Renamed from jm_cv_proto_iconv.
156844         * m4/jm-macros.m4 (jm_MACROS): Reflect s/jm_/AM_/ renamings.
156846         * m4/c-bs-a.m4 (AC_C_BACKSLASH_A): Quote first arg of AC_DEFUN.
156847         * m4/getline.m4 (AM_FUNC_GETLINE): Likewise.
156848         * m4/glibc21.m4 (jm_GLIBC21): Likewise.
156849         * m4/inttypes_h.m4 (jm_AC_HEADER_INTTYPES_H): Likewise.
156850         * m4/isc-posix.m4 (AC_ISC_POSIX): Likewise.
156851         * m4/lcmessage.m4 (AM_LC_MESSAGES): Likewise.
156852         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): Likewise.
156853         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Likewise.
156854         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Likewise.
156856         * m4/getline.m4 (AM_FUNC_GETLINE): Don't bother checking for
156857         string.h any more.
156859         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): If not found, print "no",
156860         not the default value.
156862         2001-06-25  Bruno Haible  <haible@clisp.cons.org>
156863         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Don't require AM_C_PROTOTYPES.
156864         Also check for mbsinit.  Needed for SCO 3.2v5.0.2.
156865         Also include <string.h>; this is where AIX 3.2.5 declares wcwidth.
156866         Also check for iswcntrl, used for wcwidth fallback.
156867         Use AC_TRY_COMPILE to emulate AC_CHECK_DECLS, for portability
156868         to Autoconf 2.13.
156870 2001-08-03  Jim Meyering  <meyering@lucent.com>
156872         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Use `#include', not `@%:@include',
156873         as it was in the original.  Reported by Paul Eggert.
156875 2001-07-16  Jim Meyering  <meyering@lucent.com>
156877         * m4/gettimeofday.m4: New file.
156878         Prompted by a report from Bernhard Baehr.
156880 2001-07-15  Jim Meyering  <meyering@lucent.com>
156882         * m4/Makefile.am.in (Makefile.am): Remove most of the unlocked-io.h
156883         stuff. Now it's in ../Makefile.cfg.
156885 2001-07-15  Jim Meyering  <meyering@lucent.com>
156887         * lib/Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
156888         (BUILT_SOURCES): Add unlocked-io.h.
156889         (io_functions): Define.
156890         (unlocked-io.h): New rule.
156891         (DISTCLEANFILES): Add unlocked-io.h.
156892         (all-local): Depend on unlocked-io.h, to ensure it is created.
156894         * lib/unlocked-io.hin: New file
156896         * lib/regex.c: Update from glibc.
156898 2001-07-05  Jim Meyering  <meyering@lucent.com>
156900         * lib/Makefile.am (noinst_HEADERS): Remove definition, per new automake
156901         recommendation.
156902         (libfetish_a_SOURCES): Put all .h files here instead.
156903         Remove a thus-exposed (better checks in automake) duplicate and
156904         two unnecessary .h files.
156906 2001-07-04  Jim Meyering  <meyering@lucent.com>
156908         * m4/Makefile.am.in (glibc-io.struct): New target.  Rework the code
156909         that generates jm-glibc-io.m4 so that it doesn't trigger any make
156910         distcheck failure.
156912 2001-07-02  Jim Meyering  <meyering@lucent.com>
156914         The following changes were prompted by suggestions from Bruno Haible.
156916         * m4/jm-glibc-io.m4n: New file, the template from which jm-glibc-io.m4
156917         is now generated.
156918         * m4/Makefile.am.in (Makefile.am): Include jm-glibc-io.m4n in emitted
156919         definition of EXTRA_DIST.
156920         (Makefile.am): Emit the dependency, `all-local: jm-glibc-io.m4' to
156921         ensure that the generated file is created/updated whenever the list
156922         of $(unlocked_functions) is changed.
156923         (jm-glibc-io.m4): New rule.
156924         (unlocked-io.h): New rule -- currently unused.
156926 2001-06-24  Jim Meyering  <meyering@lucent.com>
156928         * m4/regex.m4 (jm_INCLUDED_REGEX): Use a quadrigraph to represent an
156929         unmatched right bracket, rather than kludging it with an extra,
156930         falsely-matching quote in a comment.  Patch by Akim Demaille.
156932 2001-06-11  Jim Meyering  <meyering@lucent.com>
156934         * lib/regex.c: Update from GNU libc.
156936 2001-05-27  Jim Meyering  <meyering@lucent.com>
156938         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for ut_type in struct utmpx.
156939         Check for ut_type in struct utmp.
156941 2001-05-27  Jim Meyering  <meyering@lucent.com>
156943         * lib/readutmp.h (UT_TYPE): Define.
156945 2001-05-24  Jim Meyering  <meyering@lucent.com>
156947         * lib/argmatch.c: Include "quote.h".
156948         (argmatch_invalid): Remove explicit `' quotes.  Instead, use the
156949         quote function.  Reported by Göran Uddeborg.
156951 2001-05-22  Jim Meyering  <meyering@lucent.com>
156953         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't use AC_LIBOBJ(strftime),
156954         now that we use the package-supplied version unconditionally.
156955         (jm_FUNC_STRFTIME): Don't replace strftime, for the same reason.
156957 2001-05-21  Jim Meyering  <meyering@lucent.com>
156959         * m4/regex.m4: Change a couple backticks to single quotes to avoid
156960         shell syntax errors.
156962 2001-05-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
156964         * m4/dos.m4 (jm_AC_DOS): Check for _WIN32, __WIN32__, and __MSDOS__.
156966 2001-05-20  Paul Eggert  <eggert@twinsun.com>
156968         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME):
156969         Don't bother to check library strftime, since
156970         we'll be using our own my_strftime function anyway.
156971         Define my_strftime instead of strftime.
156973 2001-05-20  Alexandre Duret-Lutz  <duret_g@epita.fr>
156975         * lib/dirname.c (dir_name): Compute append_dot using path, not newpath
156976         which is not yet declared.
156978 2001-05-15  Jim Meyering  <meyering@lucent.com>
156980         * m4/regex.m4: Use proper quoting so brackets appear in the test
156981         program.
156982         Reported by, and with help from, Bruno Haible.
156984 2001-05-13  Jim Meyering  <meyering@lucent.com>
156986         * m4/jm-macros.m4 (major_t, minor_t): Define to unsigned int if
156987         undefined.
156989 2001-05-11  Paul Eggert  <eggert@twinsun.com>
156991         dirname code cleanup.  base_name now behaves more compatibly
156992         with POSIX basename when given file names that have trailing
156993         slashes, and similarly for dir_name.  Add new primitives
156994         base_len and dir_len.  Put the directory-name-related decls
156995         into dirname.h.
156997         * lib/addext.c (ISSLASH, base_name): Remove; now in dirname.h.
156998         * lib/backupfile.c (base_name): Likewise.
156999         * lib/basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
157000         * lib/dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
157001         * lib/makepath.c (strip_trailing_slashes): Likewise.
157002         * lib/path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN,
157003         ISSLASH): Likewise.
157004         * lib/rename.c (strip_trailing_slashes): Likewise.
157005         * lib/same.c (base_name): Likewise.
157006         * lib/stripslash.c (ISSLASH): Likewise.
157008         * lib/addext.c: Include <dirname.h> after size_t is defined.
157009         * lib/backupfile.c: Likewise.
157011         * lib/addext.c (addext): Use base_len to trim redundant
157012         trailing slashes instead of doing it ourselves.
157013         But do not trim the last slash if it is not redundant.
157015         * lib/backupfile.c (find_backup_file_name,
157016         max_backup_version): Use base_len instead of rolling it ourselves.
157017         Handle the case of "" and (on DOS) "C:" correctly.
157019         * lib/basename.c: Do not include <stdio.h>, <assert.h>; no longer
157020         needed. Include <string.h>, <dirname.h>.
157021         (base_name): Allow file names ending in slashes, other than names
157022         that are all slashes.  In this case, return the basename followed
157023         by the slashes.  This is more general, and can be used in places
157024         where the original base_name purposely had an assertion failure.
157025         (base_len): New function.
157027         * lib/dirname.c: Include <string.h> instead of <stdlib.h>.
157028         Do not include <assert.h>; no longer needed.
157029         Include xalloc.h.
157030         (memrchr): Remove decl.
157031         (dir_name_r): Remove.
157032         (dir_len): Renamed from dirlen.  All callers changed.
157033         Rewrite in terms of base_name, for simplicity and consistency.
157034         (dir_name): Never return NULL.  All callers changed.
157035         Do not include <stdlib.h> in test program; no longer needed.
157036         return 0; is fine for test program.
157038         * lib/dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
157039         New macros.
157040         (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
157042         * lib/path-concat.c (path_concat): Use base_len to compute
157043         base length, not strlen; this means we cannot rely on memcpy
157044         to null-terminate.
157046         * lib/same.c (STREQ): Remove.
157047         (same_name): Handle the case where the basename ends in trailing '/'.
157049         * lib/stripslash.c (strip_trailing_slashes): Return nonzero if
157050         a slash was stripped.  Do not strip the last slash after a
157051         file system prefix.
157053 2001-05-11  Paul Eggert  <eggert@twinsun.com>
157055         * lib/Makefile.am (libfetish_a_SOURCES):
157056         Add strftime.c, since we now compile it on all hosts.
157058         * lib/strftime.c (my_strftime):
157059         Define to nstrftime if emacs, but only if my_strftime is not defined.
157060         (extra_args, extra_args_spec, extra_args_spec_iso): Rename from
157061         ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
157062         Add one more extra argument: a nanoseconds value.
157063         All uses changed.
157064         (ns): New macro.
157065         (my_strftime function): Add %N format.
157066         (emacs_strftimeu): Renamed from emacs_strftime,
157067         with extra ut argument.
157069 2001-05-09  Paul Eggert  <eggert@twinsun.com>
157071         * m4/jm-macros.m4 (jm_MACROS): Do not check for fseeko; no longer used.
157073 2001-04-21  Jim Meyering  <meyering@lucent.com>
157075         * m4/rmdir-errno.m4: Write to a new file, so that a restrictive umask
157076         doesn't interfere.
157078 2001-04-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
157080         * m4/ftruncate.m4: Check for chsize.
157081         Link with ftruncate.o unconditionally if ftruncate is missing.
157082         This was required when cross-compiling to i586-mingw32msvc.
157084 2001-04-08  Jim Meyering  <meyering@lucent.com>
157086         * lib/getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
157087         recomputed; that's necessary when the offset spans a DST transition.
157088         Patch by David J. MacKenzie.  Reported by Hon-Yin Kok.
157090 2001-04-02  Jim Meyering  <meyering@lucent.com>
157092         * lib/regex.h, regex.c: Update from GNU libc.
157094 2001-03-24  Jim Meyering  <meyering@lucent.com>
157096         * m4/jm-macros.m4: Require autoconf-2.49d.
157098 2001-03-20  Bruno Haible  <haible@clisp.cons.org>
157100         * m4/iconv.m4 (jm_ICONV): Recommend GNU libiconv.
157102 2001-03-19  Paul Eggert  <eggert@twinsun.com>
157104         * lib/version-etc.c (version_etc_copyright): Update to 2001.
157106 2001-03-17  Jim Meyering  <meyering@lucent.com>
157108         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Remove my copy of AC_FUNC_MEMCMP,
157109         now that the version in autoconf is equivalent.
157110         (jm_FUNC_MEMCMP): Adjust to use AC_FUNC_MEMCMP.
157112         * m4/error.m4 (jm_PREREQ_ERROR): Invoke AC_FUNC_STRERROR_R.
157113         Suggestion from Akim Demaille.
157115         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_TEMPNAME.
157116         (jm_PREREQ_TEMPNAME): New function.
157118 2001-03-16  Paul Eggert  <eggert@twinsun.com>
157120         * lib/tempname.c (uint64_t): Define to uintmax_t if
157121         not defined, and if UINT64_MAX is not defined.
157122         Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
157123         Reported by John David Anglin.
157125 2001-03-15  Bruno Haible  <haible@clisp.cons.org>
157127         * lib/localcharset.c (locale_charset): Allow wildcard syntax. Also
157128         resolve alias if codeset is empty.
157129         * lib/config.charset (BeOS): Use wildcard syntax.
157131 2001-03-13  Jim Meyering  <meyering@lucent.com>
157133         * lib/path-concat.c (path_concat)
157134         [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't insert a backslash when
157135         concatenating e.g., `C:' and `foo'.
157136         From Bruno Haible.
157138 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
157140         * lib/localcharset.c (locale_charset): Don't use
157141         setlocale(LC_CTYPE,NULL). Don't return NULL.
157142         * lib/unicodeio.c (print_unicode_char): Simplify accordingly.
157144 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
157146         * lib/config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
157147         support for DOS/DJGPP.
157149 2001-03-01  Paul Eggert  <eggert@twinsun.com>
157151         * m4/jm-macros.m4 (jm_MACROS): Use mkstemp replacement if the system
157152         lacks mkstemp.  Compile our own tempname.c if we compile our own
157153         mkstemp.c, as mkstemp relies on tempname.
157155 2001-03-01  Jim Meyering  <meyering@lucent.com>
157157         * m4/dos.m4 (jm_AC_DOS): Remove extra backslashes, now that
157158         AH_VERBATIM really does output its argument verbatim.
157160 2001-02-28  Paul Eggert  <eggert@twinsun.com>
157162         * lib/Makefile.am (libfetish_a_SOURCES):
157163         Add dup-safer.c, fopen-safer.c.
157164         (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
157166         * lib/dup-safer.c, lib/fopen-safer.c, lib/stdio-safer.h:
157167         * lib/unistd-safer.h: New files.
157169 2001-02-25  Paul Eggert  <eggert@twinsun.com>
157171         The mkstemp replacement is taken from glibc 2.2.2, with some
157172         portability fixes for use outside glibc, as follows:
157174         * lib/tempname.c (struct_stat64): New macro.
157175         (direxists, __gen_tempname): Use it.
157176         This avoids a portability problem with Solaris 8.
157178         * lib/tempname.c (<config.h>): Include if HAVE_CONFIG_H.
157179         (<stddef.h>, <stdint.h>, <string.h>):
157180         Include only if STDC_HEADERS || _LIBC.
157181         (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
157182         (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
157183         (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
157184         (__set_errno): Define this macro if <errno.h> doesn't.
157185         (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
157186         Define these macros if <stdio.h> doesn't.
157187         (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
157188         Define these macros if <sys/stat.h>
157189         doesn't.  Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
157190         (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
157191         __xstat64): Define if not _LIBC.
157192         (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
157193         (__gen_tempname): Invoke gettimeofday only if
157194         HAVE_GETTIMEOFDAY || _LIBC;
157195         otherwise, fall back on plain "time".
157196         Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
157198         * lib/mkstemp.c (__GT_FILE): Define to zero if not defined.
157200         * lib/mkstemp.c, lib/tempname.c: New files, taken from glibc 2.2.2.
157202 2001-02-18  Paul Eggert  <eggert@twinsun.com>
157204         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for sys/resource.h.
157206 2001-02-17  Paul Eggert  <eggert@twinsun.com>
157208         * m4/mbrtowc.m4: New file, defining jm_FUNC_MBRTOWC.
157209         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH):
157210         Use jm_FUNC_MBRTOWC, not AC_CHECK_FUNCS(mbrtowc).
157211         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
157213 2001-02-17  Paul Eggert  <eggert@twinsun.com>
157215         * lib/mbswidth.c, quotearg.c (mbrtowc, mbsinit):
157216         Remove workaround macros for hosts that have mbrtowc but not
157217         mbstate_t, as we now insist on proper declarations for both
157218         before using mbrtowc.
157220 2001-02-17  Jim Meyering  <meyering@lucent.com>
157222         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Don't check for
157223         getmntent via AC_CHECK_FUNCS, since that would get a `no' and disrupt
157224         further attempts by AC_FUNC_GETMNTENT to check with e.g., -lgen on
157225         UnixWare 7.1.1.
157227         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Adapt to use AC_CACHE_CHECK etc.,
157228         rather than AC_CACHE_VAL.
157230 2001-02-17  Jim Meyering  <meyering@lucent.com>
157232         * lib/strtoul.c: Sync from GNU libc.  Use double quotes, not <...>
157233         around included file name.
157235         * lib/strnlen.c (__strnlen): Merge in a change from GNU libc.
157237         * lib/strftime.c: Update from GNU libc (the only changes were to
157238         comments).
157240 2001-02-17  Jim Meyering  <meyering@lucent.com>
157242         * lib/regex.c: Update from libc.
157244 2001-02-17  Bruno Haible  <haible@clisp.cons.org>
157246         * lib/mbswidth.h (mbswidth): Also define as macro, to avoid prototype
157247         clash.
157249 2001-02-16  Paul Eggert  <eggert@twinsun.com>
157251         * lib/alloca.c (malloc): Undef before defining, since stdlib.h
157252         may have defined it.  Needed for Encore Umax-3.0.9.16b systems.
157253         Reported by Mark Hounschell via Paul Eggert.
157255 2001-02-07  Jim Meyering  <meyering@lucent.com>
157257         * m4/regex.m4 (jm_INCLUDED_REGEX): Add a test for the latest bug.
157259 2001-02-05  Jim Meyering  <meyering@lucent.com>
157261         * m4/jm-macros.m4: Require autoconf-2.14d (not yet released), because
157262         it includes the patch required for `large file' support with at least
157263         HP-UX's 10.20 /bin/cc.
157265 2001-02-03  Jim Meyering  <meyering@lucent.com>
157267         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Restore prior use of
157268         AS_IF, now that it works once again (mysteriously).
157269         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
157271 2001-01-30  Jim Meyering  <meyering@lucent.com>
157273         Don't use filenames that are 8.3-equivalent to "conftest" on DOS.
157274         * m4/chown.m4: Rename conftestchown to conftest.chown.
157275         * m4/rename.m4: s/conftestdir/conftest.d1/ and
157276         s/conftestdir2/conftest.d2/.
157277         * m4/utimes.m4: s/conftestdata/conftest.data/
157278         Inspired by Pavel Roskin's change in autoconf.
157280 2001-01-30  Bruno Haible  <haible@clisp.cons.org>
157282         * lib/config.charset: Update for FreeBSD 4.2.
157284 2001-01-27  Jim Meyering  <meyering@lucent.com>
157286         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Open-code what was
157287         a use of AS_IF.
157288         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
157290 2001-01-26  Jim Meyering  <meyering@lucent.com>
157292         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for stddef.h, now that
157293         quotearg.c includes it.
157295 2001-01-26  Jim Meyering  <meyering@lucent.com>
157297         * lib/quotearg.c: Include stddef.h.
157298         * lib/quote.c: Include stddef.h.
157299         Reported by Axel Kittenberger.
157301         * lib/xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
157302         line in double quotes so that it evokes a better diagnostic.
157303         [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
157304         Reported by Axel Kittenberger.
157306 2001-01-24  Stefan Monnier  <monnier@cs.yale.edu>
157308         * regex.c (mutually_exclusive_p): Don't blindly handle `charset_not'
157309         as if it was a `charset'.
157311 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
157313         * m4/iconv.m4 (jm_ICONV): Also check whether the iconv declaration
157314         has const.
157316 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
157318         * lib/unicodeio.c (print_unicode_char): Cast the second iconv() arg,
157319         to avoid a warning.  Add back 'const' to inptr.
157321 2001-01-20  Jim Meyering  <meyering@lucent.com>
157323         Be sure that headers are checked before used in code compiled
157324         for the type checks.
157325         * m4/jm-macros.m4 (jm_MACROS): Remove all header checks.
157326         In place of that, invoke jm_CHECK_ALL_TYPES.
157327         (jm_CHECK_ALL_HEADERS): New functions with the above checks.
157328         (jm_CHECK_ALL_TYPES): Require jm_CHECK_ALL_HEADERS.
157329         Alan Iwi reported a build failure on an f300-fujitsu-uxpv4.1_ES;
157330         The check for ssize_t was mistakenly run before the test for unistd.h.
157332         The configure-time check for stdbool.h was missing.
157333         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_HASH.
157334         (jm_PREREQ_HASH): New function.
157336 2001-01-17  Jim Meyering  <meyering@lucent.com>
157338         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use AS_IF, not AS_IFELSE,
157339         for autoconf-2.49c.
157340         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Likewise.
157342 2001-01-16  Jim Meyering  <meyering@lucent.com>
157344         * lib/basename.c: Include <stdio.h>, needed by assert on SunOS 4.
157345         From Bruno Haible.
157347 2001-01-14  Jim Meyering  <meyering@lucent.com>
157349         * m4/rename.m4: Use temporary directories named conftestdir{,2}, not
157350         foo and bar.  Create conftestdir/ in the script, not in the C code.
157351         Remove directories in the script, not in the C code.
157352         Remove conftestdir{,2} before trying to create the directory.
157353         Make the entire configure script fail if the mkdir fails.
157355 2001-01-14  Jim Meyering  <meyering@lucent.com>
157357         * lib/rename.c: New file.  From Volker Borchert.
157358         Include stdlib.h, string.h or strings.h, and xalloc.h.
157359         Use strip_trailing_slashes rather than open-coding it.
157361 2001-01-03  Paul Eggert  <eggert@twinsun.com>
157363         * lib/strftime.c: Sync with glibc time/strftime.c 1.81.
157365 2001-01-03  Jim Meyering  <meyering@lucent.com>
157367         * lib/unicodeio.c (print_unicode_char): Remove `const' from declaration
157368         of local `inptr' to avoid warning with some system declarations of
157369         iconv.
157371 2001-01-02  Volker Borchert  <bt@teknon.de>
157373         * m4/rename.m4: New file.
157374         * m4/jm-macros.m4 (jm_MACROS): Require vb_FUNC_RENAME.
157376 2001-01-01  Jim Meyering  <meyering@lucent.com>
157378         * m4/prereq.m4 (jm_PREREQ_READUTMP): Include utmp.h (if available),
157379         even on systems with utmpx.h.  It's necessary for the declaration of
157380         utmp's ut_user member.  Reported by Andreas Jaeger.
157382         * m4/check-decl.m4 (jm_CHECK_DECLS): Include grp.h and pwd.h if
157383         available. They are required for the declarations of getgrgid and
157384         getpwuid resp.
157385         (_jm_DECL_HEADERS): Check for grp.h and pwd.h.
157386         Reported by Andreas Jaeger.
157388 2001-01-01  Alexandre Duret-Lutz  <duret_g@epita.fr>
157390         * m4/libintl.m4 (AM_GNU_GETTEXT): Define MKINSTALLDIRS by
157391         expanding the value of $ac_aux_dir, as in AM_MISSING_HAS_RUN,
157392         so `make install' also works in VPATH builds.
157394 2000-12-31  Alexandre Duret-Lutz  <duret_g@epita.fr>
157396         * m4/libintl.m4 (AM_WITH_NLS): When using AC_CONFIG_AUX_DIR,
157397         prepend $(top_srcdir) to the value of MKINSTALLDIRS so that it
157398         can be used in subdirectories.
157400 2000-12-29  Paul Eggert  <eggert@twinsun.com>
157402         * lib/modechange.c: Do not assume that mode_t uses the
157403         traditional octal encoding.  E.g. "chmod 1 FOO" should set
157404         the other-execute bit of FOO even if S_IXOTH != 1.
157406         (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
157407         WOTH, XOTH, ALLM): New macros.
157408         (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
157409          S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
157410         Use them.
157411         (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
157412         (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
157413         (mode_compile):
157414         No need to use uintmax_t; unsigned long is long enough.
157415         Don't bother to get suffix since we don't use it.
157417 2000-12-26  Jim Meyering  <meyering@lucent.com>
157419         * m4/dos.m4 (jm_AC_DOS): Rewrite (though it's still a stub) to work
157420         better with autoheader.
157422 2000-12-24  Jim Meyering  <meyering@lucent.com>
157424         * lib/hash.c (is_prime): Return explicit boolean values.
157425         (hash_get_first): Return NULL to appease Irix5.6's 89.
157426         Reported by Nelson Beebe.
157428 2000-12-19  Bruno Haible  <haible@clisp.cons.org>
157430         * lib/localcharset.c (locale_charset): Add support for Win32.
157432 2000-12-18  Paul Eggert  <eggert@twinsun.com>
157434         * lib/physmem.h, lib/physmem.c: New files.
157436         * lib/Makefile.am (libfetish_a_SOURCES): Add physmem.c.
157437         (noinst_HEADERS): Add physmem.h.
157439         * lib/xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
157440         't' for compatibility with Solaris 8 sort.
157442 2000-12-18  Bruno Haible  <haible@clisp.cons.org>
157444         * lib/config.charset: Add support for BeOS.
157446 2000-12-17  Jim Meyering  <meyering@lucent.com>
157448         * m4/dos.m4 (jm_AC_DOS): New file and macro.
157449         * m4/jm-macros.m4 (jm_MACROS): Require jm_AC_DOS.
157451 2000-12-16  Jim Meyering  <meyering@lucent.com>
157453         This bug had a serious impact on chown: `chown N:M FILE' (for integer
157454         N and M) would have treated it like `chown N:N FILE'.
157456         * lib/userspec.c (parse_user_spec): Fix typo: s/u/g/.
157458 2000-12-16  Jim Meyering  <meyering@lucent.com>
157460         * lib/getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
157461         SHELLS_FILE to a file name that's useful on djgpp systems.
157462         Include stdlib.h.
157463         (ADDITIONAL_DEFAULT_SHELLS): Define.
157464         (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
157465         Based mostly on a patch from Prashant TR.
157467 2000-12-16  Bruno Haible  <haible@clisp.cons.org>
157469         * lib/config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB,
157470         VISCII, CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256,
157471         CP1257 to the list of canonical encodings. Rename EUC-CN to GB2312.
157473 2000-12-08  Andreas Schwab  <schwab@suse.de>
157475         * lib/mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
157476         invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
157478 2000-12-07  Jim Meyering  <meyering@lucent.com>
157480         * lib/stripslash.c (ISSLASH): Define.
157481         (strip_trailing_slashes): Use ISSLASH rather than comparing against
157482         `/'.
157483         From Prashant TR.
157485         * lib/dirname.c (FILESYSTEM_PREFIX_LEN): Define.
157486         (dir_name_r): Declare this function as static.
157487         [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
157488         manifest itself on a name containing a mix of slashes and
157489         backslashes.
157490         Make this function work with names starting with a DOS-style
157491         drive letter and colon prefix.
157492         (dir_name): Append `.' if necessary.
157493         Based mostly on patches from Prashant TR and Eli Zaretskii.
157495         * lib/dirname.h (dir_name_r): Remove prototype.
157497 2000-12-06  Paul Eggert  <eggert@twinsun.com>
157499         * m4/off_t-format.m4: Remove this file.
157500         * m4/jm-macros.m4 (jm_MACROS): Remove jm_SYS_OFF_T_PRINTF_FORMAT.
157502 2000-12-06  Jim Meyering  <meyering@lucent.com>
157504         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): If we need the
157505         replacement strtoull, we may well need the replacement strtoul, too.
157506         Check for declarations of strtoul and strtoull.
157507         Check for strtol.  Mainly as a cue to cause automake to include
157508         strtol.c -- that file is included by each of strtoul.c and strtoull.c.
157509         Check for limits.h -- strtol.c needs it.
157511 2000-12-05  Jim Meyering  <meyering@lucent.com>
157513         * lib/dirname.c (dir_name_r): Add `const' in a few local declarations.
157515 2000-12-04  Jim Meyering  <meyering@lucent.com>
157517         * lib/path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
157518         Also include memory.h, stdlib.h, unistd.h if appropriate.
157519         Reported by Andreas Jaeger (conflicting declaration of malloc).
157521 2000-12-02  Jim Meyering  <meyering@lucent.com>
157523         * m4/off_t-format.m4 (OFF_T_PRINTF_FORMAT_STRING): New file/macro.
157524         * m4/jm-macros.m4 (jm_MACROS): require it.
157526 2000-12-02  Jim Meyering  <meyering@lucent.com>
157528         * lib/closeout.h: Make idempotent, to avoid some obscure warnings.
157530 2000-12-01  Paul Eggert  <eggert@twinsun.com>
157532         * lib/memrchr.c: Include <config.h> before any system include file.
157534 2000-11-30  Jim Meyering  <meyering@lucent.com>
157536         * m4/jm-macros.m4 (jm_MACROS): Check for stdint.h.
157538 2000-11-30  Jim Meyering  <meyering@lucent.com>
157540         * m4/getloadavg.m4: s/ifval/m4_ifval/ to accommodate new autoconf.
157542 2000-11-29  Paul Eggert  <eggert@twinsun.com>
157544         * lib/dirname.c (dir_name_r): Fix typo: int -> size_t.
157546 2000-11-26  Jim Meyering  <meyering@lucent.com>
157548         * lib/memcoll.c: Include sys/types.h.  From Werner Almesberger.
157550 2000-11-22  Paul Eggert  <eggert@twinsun.com>
157552         * lib/strftime.c (my_strftime): Do not invoke mbrlen with a
157553         size of (size_t) -1; it's not portable.
157555 2000-11-17  Jim Meyering  <meyering@lucent.com>
157557         * lib/strstr.c: Update from GNU libc.
157559 2000-11-17  Akim Demaille  <akim@epita.fr>
157561         * lib/obstack.h: Formatting changes.
157562         (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
157563         prevent type checking.
157564         (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
157565         cast the value to (void *): assigning a `foo *' to a `void *'
157566         variable is valid.
157567         (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
157569 2000-11-16  Jim Meyering  <meyering@lucent.com>
157571         * lib/strverscmp.c: Incorporate weak-alias-related changes from glibc.
157573 2000-11-11  Jim Meyering  <meyering@lucent.com>
157575         * lib/error.c: Add a couple #includes, merging from GNU libc version.
157577 2000-11-10  Jim Meyering  <meyering@lucent.com>
157579         * lib/obstack.h: Update from GNU libc.
157580         * lib/obstack.c: Likewise.
157582 2000-11-08  Bruno Haible  <haible@clisp.cons.org>
157584         * m4/jm-macros.m4 (jm_MACROS): Add test for wcrtomb.
157586 2000-11-06  Paul Eggert  <eggert@twinsun.com>
157588         * lib/getusershell.c (setusershell): Use rewind rather than
157589         fseek/fseeko, to avoid configuration hassles with fseeko.
157590         Don't bother opening SHELLS_FILE if shellstream is NULL;
157591         it's not necessary.
157593 2000-11-05  Jim Meyering  <meyering@lucent.com>
157595         * lib/makepath.h (make_dir): Declare.
157596         * lib/makepath.c (make_dir): Remove `static' attribute.
157597         Tweak a comment.
157599 2000-11-04  Jim Meyering  <meyering@lucent.com>
157601         * m4/regex.m4: Use the `m4_' prefix on `syscmd' and `m4_sysval'.
157603 2000-11-04  Alexandre Duret-Lutz  <duret_g@epita.fr>
157605         * lib/hash.c (hash_get_next): Fix a thinko:  when ENTRY is the
157606         last one in a bucket, advance to the next bucket.
157608 2000-11-02  Vesselin Atanasov  <vesselin@bgnet.bg>
157610         * lib/fnmatch.c: Do not comment out all the code if we are using
157611         the GNU C library, because in some cases we are replacing buggy
157612         code in the GNU C library itself.
157614 2000-10-30  Stefan Monnier  <monnier@cs.yale.edu>
157616         * regex.c (re_iswctype, re_wctype_to_bit): Fix braino.
157617         (regex_compile): Catch bogus \(\1\).
157619 2000-10-30  Paul Eggert  <eggert@twinsun.com>
157621         * lib/fnmatch.c (FOLD): Do not assume that characters are unsigned.
157622         (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
157623         e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
157625 2000-10-30  Paul Eggert  <eggert@twinsun.com>
157627         * lib/error.h, getline.h, modechange.h:
157628         Remove "2000" from Copyright line, as the file hasn't been
157629         changed this year other than in the copyright notice.
157631         * lib/xalloc.h: Add "2000" to Copyright line, as this file
157632         was changed this year.
157634 2000-10-29  Jim Meyering  <meyering@lucent.com>
157636         * m4/fsusage.m4: s/AC_SHELL_IFELSE/AS_IFELSE/ to match autoconf
157637         renaming.
157638         * m4/ls-mntd-fs.m4: Likewise
157640 2000-10-29  Jim Meyering  <meyering@lucent.com>
157642         * lib/xstat.in: Fix grammar in comment.
157644 2000-10-29  Greg Louis  <glouis@dynamicro.on.ca>
157646         * lib/regex.h (__restrict_arr): Move definition out of #ifndef block.
157647         Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
157648         doesn't define __restrict_arr.
157650 2000-10-28  Jim Meyering  <meyering@lucent.com>
157652         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_MEMCHR.
157653         (jm_PREREQ_MEMCHR): New function.
157655 2000-10-28  Jim Meyering  <meyering@lucent.com>
157657         * lib/memchr.c: Update from libc.
157658         Adjust for portability:
157659         [HAVE_STDLIB_H]: Include stdlib.h.
157660         [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
157661         Undef __memchr, too.
157662         [!weak_alias]: Define __memchr to memchr.
157664         * lib/regex.c: Update from libc.
157665         * lib/regex.h: Likewise.
157666         * lib/getopt1.c: Likewise.
157667         * lib/memcmp.c: Likewise.
157669         * lib/getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
157670         Avoid using fseek, when possible -- it's broken by design.
157671         Patch by Ulrich Drepper.
157673 2000-10-27  Stefan Monnier  <monnier@cs.yale.edu>
157675         * regex.c (POP_FAILURE_REG_OR_COUNT, re_match_2_internal)
157676         (re_match_2_internal, re_match_2_internal, re_match_2_internal):
157677         Giving in to popular pressure to shut up the compiler with casts.
157679 2000-10-26  Jim Meyering  <meyering@lucent.com>
157681         * lib/strftime.c: Update from libc.
157683 2000-10-25  Stefan Monnier  <monnier@cs.yale.edu>
157685         * regex.c: More `unsigned char' -> `re_char' changes.
157686         Also change several `int' into `re_wchar_t'.
157687         (PATTERN_STACK_EMPTY, PUSH_PATTERN_OP, POP_PATTERN_OP): Remove.
157688         (PUSH_FAILURE_POINTER): Don't cast any more.
157689         (POP_FAILURE_REG_OR_COUNT): Remove the cast that strips `const'.
157690         We want GCC to complain, since this piece of code makes
157691         re_match non-reentrant, which *should* be fixed.
157692         (GET_BUFFER_SPACE): Use size_t rather than unsigned long.
157693         (EXTEND_BUFFER): Use RETALLOC.
157694         (SET_LIST_BIT): Don't cast.
157695         (re_wchar_t): New type.
157696         (re_iswctype, re_wctype_to_bit): Make it crystal clear to GCC
157697         that those two functions will always properly return.
157698         (IMMEDIATE_QUIT_CHECK): Cast to void.
157699         (analyse_first): Use recursion rather than an explicit stack.
157700         (re_compile_fastmap): Can't fail anymore.
157701         (re_search_2): Don't check re_compile_fastmap for failure.
157702         (PUSH_NUMBER): Renamed from PUSH_FAILURE_COUNT.
157703         Now also sets the new value (passed in a new argument).
157704         (re_match_2_internal): Use it.
157705         Also, use a new var `reg' of type size_t when looping through regs
157706         rather than reuse the inappropriate `mcnt'.
157708 2000-10-25  Jim Meyering  <meyering@lucent.com>
157710         * lib/obstack.c: Update from libc.
157712 2000-10-24  Kenichi Handa  <handa@etl.go.jp>
157714         * regex.c (regex_compile): Change the way of handling a range from
157715         a char less than 256 to a char not less than 256.
157717 2000-10-24  Andrew Innes  <andrewi@gnu.org>
157719         * regex.c (IMMEDIATE_QUIT_CHECK): New macro, which does QUIT on
157720         NT-Emacs only.
157721         (re_match_2_internal): Use IMMEDIATE_QUIT_CHECK instead of QUIT,
157722         so that re_search functions only quit when callers expect them to.
157724 2000-10-23  Jim Meyering  <meyering@lucent.com>
157726         * lib/hard-locale.c (hard_locale): Revert last change -- it was simply
157727         wrong.  That set_locale call must not have any side effects.
157728         From Paul Eggert.
157730 2000-10-22  Jim Meyering  <meyering@lucent.com>
157732         * lib/md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
157733         [CYCLIC]: Remove now-unused definition.
157735         * lib/save-cwd.c (O_DIRECTORY): Define, if needed.
157736         (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
157737         Suggestion from Ulrich Drepper.
157739 2000-10-21  Jim Meyering  <meyering@lucent.com>
157741         * m4/check-decl.m4 (jm_CHECK_DECLS): Also check for memrchr.
157742         * m4/prereq.m4 (jm_PREREQ_DIRNAME): New macro.
157743         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memrchr.
157745 2000-10-21  Jim Meyering  <meyering@lucent.com>
157747         * lib/dirname.c (memrchr): Declare if necessary.
157748         (dir_name): Remove the restriction that there be no
157749         trailing slashes.  Now, this code skips past them, effectively
157750         ignoring them.
157751         [TEST_DIRNAME] (main): New unit tests.
157753         * lib/memrchr.c: New file from GNU libc.
157754         Undef __memrchr, too.
157755         [!weak_alias]: Define __memrchr to memrchr.
157756         Guard weak_alias use with `#ifdef weak_alias'.
157758 2000-10-21  Jim Meyering  <meyering@lucent.com>
157760         * lib/dirname.c (dir_name_r): New function, factored out of dir_name.
157761         (dir_name): Use dir_name_r.
157762         * lib/dirname.h (dir_name_r): Declare it.
157764 2000-10-17  Jim Meyering  <meyering@lucent.com>
157766         * lib/quote.h (PARAMS): Define and use.
157767         Reported by Akim Demaille.
157769         * lib/getopt.c: Update from libc.
157771 2000-10-16  Jim Meyering  <meyering@lucent.com>
157773         * lib/hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to
157774         setlocale.
157775         From Jan Fedak.
157777 2000-10-15  Stefan Monnier  <monnier@cs.yale.edu>
157779         * regex.c (WIDE_CHAR_SUPPORT): Define if _LIBC as well.
157781 2000-09-25  Jim Meyering  <meyering@lucent.com>
157783         * lib/md5.h (rol): Define (from GnuPG).
157785         * lib/sha.c: Give credit (GnuPG) where due.
157786         (M): Use rol rather than open-coding it.
157787         Add a FIXME comment.
157789 2000-09-21  Jim Meyering  <meyering@lucent.com>
157791         * lib/userspec.c (parse_user_spec): Remove debugging printf I'd added.
157792         Reported by Michael Stone.
157794 2000-09-20  Jim Meyering  <meyering@lucent.com>
157796         * lib/Makefile.am (libfetish_a_SOURCES): Add sha.c.
157797         (noinst_HEADERS): Add sha.h.
157798         Based on code from Scott G. Miller and from GnuPG.
157800 2000-09-18  Jim Meyering  <meyering@lucent.com>
157802         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Restore the initial value of
157803         LIBS. Otherwise, everyone ends up linking with -lelf for some
157804         configurations.
157805         Reported by Mike Stone.
157807 2000-09-15  Jim Meyering  <meyering@lucent.com>
157809         * lib/regex.c: Update from libc.
157811 2000-09-10  Jim Meyering  <meyering@lucent.com>
157813         * lib/getopt.c (_getopt_internal): Update from glibc.
157815 2000-09-09  Jim Meyering  <meyering@lucent.com>
157817         * lib/quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
157818         think it should be used as a general replacement for isascii.
157819         * lib/fnmatch.c: Likewise.
157820         * lib/mbswidth.c: Likewise
157821         * lib/regex.c: Likewise.
157823         Don't use atoi.
157824         * lib/userspec.c: Include sys/param.h and limits.h.
157825         Include xstrtol.h.
157826         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
157827         (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
157828         (parse_user_spec): Use xstrtoul, not atoi when converting numeric
157829         UID, GID.  Check range.
157831 2000-09-06  Jim Meyering  <meyering@lucent.com>
157833         * lib/getopt.c (_getopt_internal): Update from glibc.
157835 2000-08-30  Jim Meyering  <meyering@lucent.com>
157837         * lib/strftime.c: Merge in changes from GNU libc.
157839 2000-08-26  Jim Meyering  <meyering@lucent.com>
157841         * m4/jm-macros.m4: Use jm_FUNC_FPENDING.
157842         * m4/fpending.m4: New file.
157844 2000-08-26  Jim Meyering  <meyering@lucent.com>
157846         * lib/closeout.c: Include "__fpending.h".
157847         (close_stdout_status): Return right away if there's nothing to flush.
157849         * lib/Makefile.am (noinst_HEADERS): Add __fpending.h.
157850         * lib/__fpending.c: New file.
157851         * lib/__fpending.h: New file.
157853 2000-08-20  Jim Meyering  <meyering@lucent.com>
157855         * m4/check-decl.m4: Include utmp.h `#if HAVE_UTMP_H', rather than
157856         `#if !HAVE_UTMPX_H'.  The latter would lose on systems with neither
157857         utmp.h nor utmpx.h.  Reported by Eli Zaretskii.
157859 2000-08-11  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
157861         Improve fileutils installation on systems where running
157862         programs (like install) can't be unlinked.
157863         * m4/unlink-busy.m4 (jm_FUNC_UNLINK_BUSY_TEXT): New file/macro.
157864         * m4/jm-macros.m4: Use jm_FUNC_UNLINK_BUSY_TEXT.
157866 2000-08-07  Paul Eggert  <eggert@twinsun.com>
157868         Standardize on "memory exhausted" instead of "Memory exhausted"
157869         or "virtual memory exhausted".
157870         * lib/obstack.c (print_and_abort): Use "memory exhausted", not
157871         "virtual memory exhausted".
157872         * lib/same.c (same_name): Invoke xalloc_die instead of printing
157873         our own message.
157874         * lib/userspec.c (parse_user_spec): Likewise.
157875         * lib/bumpalloc.h: comment fix
157876         * lib/same.c, userspec.c: Include xalloc.h.
157878         * lib/xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
157879         not char *const and pointing to a constant array.
157880         * lib/xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
157881         (xrealloc): Comment fix.
157883         * lib/userspec.c (parse_user_spec):
157884         Don't translate a message until just before returning,
157885         to avoid unnecessary translation.
157887 2000-08-07  Jim Meyering  <meyering@lucent.com>
157889         * lib/addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
157890         chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
157891         fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
157892         getgroups.c, gethostname.c, getopt.h, group-member.c,
157893         hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
157894         linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
157895         memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
157896         pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
157897         stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
157898         strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
157899         utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
157900         yesno.c: Back out Copyright date changes for each file with no change
157901         this year.  This eases coordination with other programs using the same
157902         source code modules.  From Paul Eggert.
157904 2000-08-06  Paul Eggert  <eggert@twinsun.com>
157906         * m4/mbstate_t.m4 (AC_MBSTATE_T): Define mbstate_t to be int,
157907         not char, for compatibility with glibc 2.1.3 strftime.c.
157909 2000-08-03  Greg McGary  <greg@mcgary.org>
157911         * lib/regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
157912         ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
157913         (EXTEND_BUFFER): Use them.
157915 2000-08-01  Jim Meyering  <meyering@lucent.com>
157917         * lib/dirname.c (ISSLASH): Define.
157918         (BACKSLASH_IS_PATH_SEPARATOR): Define.
157919         (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
157920         both `\' and `/' may be use as path separators.
157921         Based on a patch from Prashant TR.
157923 2000-07-31  Paul Eggert  <eggert@twinsun.com>
157925         * lib/quotearg.c (quotearg_n_options): Don't make the initial
157926         slot vector a constant, since it might get modified.
157928 2000-07-31  Jim Meyering  <meyering@lucent.com>
157930         * lib/xmalloc.c: Use `virtual memory exhausted', not
157931         `Memory exhausted'.
157932         * lib/obstack.c (print_and_abort): Likewise.
157934 2000-07-30  Paul Eggert  <eggert@twinsun.com>
157936         * lib/quotearg.c (quotearg_n_options): Preallocate a slot 0
157937         buffer, so that the caller can always quote one small
157938         component of a "memory exhausted" message in slot 0.
157939         From a suggestion by Jim Meyering.
157941 2000-07-30  Jim Meyering  <meyering@lucent.com>
157943         * lib/makepath.c (make_path): Quote the other instance, too.
157945         * lib/quotearg.c (N_STATIC_SLOTVECS): Define.
157946         (STATIC_BUF_SIZE): Define.
157947         (quotearg_n_options): Use only statically allocated storage when
157948         N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
157949         than STATIC_BUF_SIZE.
157951 2000-07-29  Jim Meyering  <meyering@lucent.com>
157953         * lib/diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
157954         * lib/dirname.c (dir_name): Likewise.
157956         * lib/basename.c (base_name): Use ISSLASH rather than comparing against
157957         `/'.
157959         * lib/dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
157960         (dir_name): Assert that there are no trailing slashes.
157962 2000-07-29  Bruno Haible  <haible@clisp.cons.org>
157964         * lib/mbswidth.h (mbswidth): Add a flags argument.
157965         (mbswidth): New declaration.
157966         (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
157967         * lib/mbswidth.c (mbswidth): Add a flags argument.
157968         (mbsnwidth): New function.
157970 2000-07-24  Jim Meyering  <meyering@lucent.com>
157972         * lib/mbswidth.c: Remove useless #else.  From Bruno Haible.
157974 2000-07-23  Paul Eggert  <eggert@twinsun.com>
157976         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Check for wcwidth declaration.
157978 2000-07-23  Paul Eggert  <eggert@twinsun.com>
157980         * lib/quotearg.c: Streamline by invoking multibyte code only if needed.
157981         <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
157982         (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
157983         (quotearg_buffer_restyled): If a unibyte locale, don't bother to
157984         invoke multibyte primitives.
157986 2000-07-23  Paul Eggert  <eggert@twinsun.com>
157988         * lib/quotearg.c:
157989         Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
157990         so that mbstate_t is always defined.
157992         Do not inspect MB_LEN_MAX, since it's incorrectly defined to
157993         be 1 in at least one GCC installation, and this configuration
157994         error is likely to be common.  Ignoring MB_LEN_MAX hurts
157995         performance on hosts that have mbrtowc but have only unibyte
157996         locales, but I assume these hosts are rare.
157998 2000-07-23  Paul Eggert  <eggert@twinsun.com>
158000         * lib/mbswidth.c (_XOPEN_SOURCE):
158001         Don't define; this causes problems on Solaris 7.
158002         (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
158004 2000-07-23  Jim Meyering  <meyering@lucent.com>
158006         * m4/check-decl.m4 (jm_CHECK_DECLS): Check for declarations of these,
158007         too: getgrgid, getpwuid, getuid.
158009 2000-07-23  Jim Meyering  <meyering@lucent.com>
158011         * lib/basename.c (base_name): Add an assertion.
158013 2000-07-23  Bruno Haible  <haible@clisp.cons.org>
158015         * lib/quotearg.c: When the system forces us to redefine mbstate_t,
158016         shadow its mbsinit function.
158018 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
158020         * lib/mbswidth.h: New file.
158021         * lib/mbswidth.c: New file.
158022         * lib/Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
158023         (noinst_HEADERS): Add mbswidth.h.
158025 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
158027         * lib/config.charset: Add support for FreeBSD. Improve support for
158028         HP-UX and IRIX 6.
158030 2000-07-16  Bruno Haible  <haible@clisp.cons.org>
158032         * m4/mbswidth.m4: New file.
158033         * m4/prereq.m4 (jm_PREREQ): Call jm_PREREQ_MBSWIDTH.
158035 2000-07-15  Jim Meyering  <meyering@lucent.com>
158037         * lib/makepath.c: Include quote.h.
158038         (make_path): Convert "`%s'" in format strings to "%s", and wrap each
158039         corresponding argument in a `quote (...)' call.
158040         Give better diagnostics.
158042         * lib/Makefile.am (libfetish_a_SOURCES): Add quote.c.
158043         (noinst_HEADERS): Add quote.h.
158045         * lib/quote.c (quote, quote_n): New file.  Two functions taken verbatim
158046         from tar's src/misc.c.
158047         * lib/quote.h: New file.  Prototypes for same.
158049 2000-07-14  Paul Eggert  <eggert@twinsun.com>
158051         From a suggestion by Bruno Haible.
158052         * lib/quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
158053         Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
158054         to decide whether to define the BeOS workaround macro;
158055         this adjusts to the change to AC_MBSTATE_T.
158057 2000-07-14  Jim Meyering  <meyering@lucent.com>
158059         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Require
158060         jm_AC_TYPE_UINTMAX_T.
158062 2000-07-13  Paul Eggert  <eggert@twinsun.com>
158064         * lib/quotearg.h (enum quoting style): New enum clocale_quoting_style.
158066         * lib/quotearg.c (quoting_style_args, quoting_style_vals,
158067         quotearg_buffer_restyled): Add support for
158068         clocale_quoting_style.  Undo previous change to
158069         locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
158070         and "{RIGHT QUOTATION MARK}" msgids.
158072 2000-07-10  Paul Eggert  <eggert@twinsun.com>
158074         From a suggestion by Bruno Haible.
158075         * m4/mbstate_t.m4 (AC_MBSTATE_T):
158076         Renamed from AC_MBSTATE_T_OBJECT.  All uses changed.
158077         Change from a two-part test, which defines both HAVE_MBSTATE_T_OBJECT
158078         and mbstate_t, to a single-part test that simply defines mbstate_t.
158079         * m4/prereq.m4 (jm_PREREQ_QUOTEARG):
158080         s/AC_MBSTATE_T_OBJECT/AC_MBSTATE_T/.
158082 2000-07-10  Jim Meyering  <meyering@lucent.com>
158084         * m4/strerror_r.m4: Mirror the correction made in autoconf.
158086         * m4/gnu-source.m4: Output to confdefs.h directly.
158087         Suggestion from Akim Demaille.
158089 2000-07-09  Paul Eggert  <eggert@twinsun.com>
158091         The old behavior of quoting `like this' doesn't look good with
158092         newer, ISO-style fonts.  See:
158093         http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
158095         Instead, quote "like this" by default.  Let the translator
158096         tailor the locale-specific quoting behavior by providing
158097         translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
158099         * lib/quotearg.c (N_): New macro.
158100         (gettext_default): New function.
158101         (quotearg_buffer_restyled): Use
158102         gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
158103         gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
158105 2000-07-09  Jim Meyering  <meyering@lucent.com>
158107         * m4/jm-macros.m4 (jm_MACROS): Add a test to see if -lm is required
158108         to link seq.  If so, set SEQ_LIBM to -lm.  From Bruno Haible.
158110         * m4/gnu-source.m4 (AC__GNU_SOURCE): New file/macro.
158111         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require it.
158113 2000-07-09  Jim Meyering  <meyering@lucent.com>
158115         * lib/Most files: Update copyright dates to include 2000.
158117 2000-07-08  Jim Meyering  <meyering@lucent.com>
158119         * lib/xgethostname.c (ENAMETOOLONG): Define to an unlikely value
158120         if not defined.
158121         (xgethostname): Remove now-unnecessary #ifdef.
158122         Move declaration of `err' into loop where it's used.
158124 2000-07-05  Paul Eggert  <eggert@twinsun.com>
158125         and Bruno Haible  <haible@clisp.cons.org>
158127         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Test for mbstate_t
158128         only if the test for an object-type mbstate_t fails.  This
158129         prevents us from mistakenly reporting that mbstate_t is a
158130         system object type after we "#define mbstate_t int" to work
158131         around its lack.
158133 2000-07-05  Paul Eggert  <eggert@twinsun.com>
158134         and Bruno Haible  <haible@clisp.cons.org>
158136         * lib/quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
158138 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
158140         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Pass a reasonably large buffer
158141         to strerror_r.
158142         Include <ctype.h> for use of isalpha.
158144 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
158146         * lib/xgethostname.c (xgethostname): Protect against the SunOS 5.5 bug
158147         by allocating a larger buffer. Test the gethostname return value for
158148         being >= 0, not == 0, for BeOS.  Don't exhaust memory if gethostname
158149         returns an error and ENAMETOOLONG isn't defined.
158151 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
158153         * lib/quotearg.c (struct quoting_options): Simplify quote_these_too
158154         dimension.
158156 2000-07-04  Jim Meyering  <meyering@lucent.com>
158158         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use plain old `echo' instead
158159         of the deprecated AC_CHECKING.
158161 2000-07-04  Jim Meyering  <meyering@lucent.com>
158163         * lib/strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
158164         Reported by Bruno Haible.
158166 2000-07-04  Jim Meyering  <meyering@lucent.com>
158168         * lib/quotearg.c: Make inclusion of <wchar.h> independent of whether
158169         HAVE_MBRTOWC is set.  Required at least for irix-5.6, which
158170         lacks mbrtowc.
158172 2000-07-03  Paul Eggert  <eggert@twinsun.com>
158174         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Port to autoconf 2.13.
158175         Add AC_CHECK_HEADERS(stdlib.h), since we use HAVE_STDLIB_H.
158177 2000-07-03  Paul Eggert  <eggert@twinsun.com>
158178         and Bruno Haible  <haible@clisp.cons.org>
158180         * lib/quotearg.c (mbrtowc):
158181         Assign to *pwc, and return 1 only if result is nonzero.
158182         (iswprint): Use ISPRINT when substituting our own mbrtowc.
158184 2000-07-03  Jim Meyering  <meyering@lucent.com>
158186         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strnlen.
158188 2000-07-03  Jim Meyering  <meyering@lucent.com>
158190         * lib/readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
158191         This is necessary to get a definition of e.g., UTMP_FILE on
158192         HP-UX 10.20.
158193         From Bob Proulx.
158195 2000-07-02  Jim Meyering  <meyering@lucent.com>
158197         * m4/mbstate_t.m4: Also define mbstate_t, if necessary.
158199         * m4/chown.m4: Replace each use of AC_SUBST(LIBOBJS)/LIBOBJS=... with
158200         AC_LIBOBJ(function_name).
158201         * m4/chown.m4: Likewise.
158202         * m4/fnmatch.m4: Likewise.
158203         * m4/ftruncate.m4: Likewise.
158204         * m4/getgroups.m4: Likewise.
158205         * m4/getline.m4: Likewise.
158206         * m4/group-member.m4: Likewise.
158207         * m4/jm-macros.m4: Likewise.
158208         * m4/lstat.m4: Likewise.
158209         * m4/malloc.m4: Likewise.
158210         * m4/memcmp.m4: Likewise.
158211         * m4/nanosleep.m4: Likewise.
158212         * m4/putenv.m4: Likewise.
158213         * m4/realloc.m4: Likewise.
158214         * m4/regex.m4: Likewise.
158215         * m4/stat.m4: Likewise.
158216         * m4/strftime.m4: Likewise.
158218 2000-07-02  Jim Meyering  <meyering@lucent.com>
158220         * lib/quotearg.c (mbstate_t): Don't define here.
158222 2000-07-02  Jim Meyering  <meyering@lucent.com>
158224         * lib/nanosleep.c (SIGCONT): Define if not already defined.
158226 2000-07-01  Jim Meyering  <meyering@lucent.com>
158228         * m4/uptime.m4: Put double quotes around use of $cross_compiling.
158230 2000-07-01  Jim Meyering  <meyering@lucent.com>
158232         * m4/ls-mntd-fs.m4: Remove a `FIXME' comment and fix the associated
158233         problem.
158235 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
158237         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Rename BeOS specific
158238         macro from MOUNTED_NEXT_DEV to MOUNTED_FS_STAT_DEV.
158240 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
158242         * lib/mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
158243         per change in ../m4/ls-mntd-fs.m4.
158244         (read_filesystem_list): Ignore symbolic links.
158246 2000-06-29  Jim Meyering  <meyering@lucent.com>
158248         * lib/same.c: Include <string.h> or <strings.h>, as appropriate,
158249         for declaration of strcmp.
158251         * lib/long-options.c: Include <stdlib.h>, for declaration of exit.
158253         * lib/mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
158254         Avoid warning by casting result to `char *' to remove `const'.
158256 2000-06-28  Jim Meyering  <meyering@lucent.com>
158258         * m4/mbstate_t.m4: Use stdlib.h, not stdio.h.  The latter is not
158259         included by quotearg.c, for which we perform this test.  From
158260         Bruno Haible.
158262 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
158264         * m4/check-decl.m4 (_jm_DECL_HEADERS): Check for utmp.h as well.
158265         * m4/prereq.m4 (jm_PREREQ_READUTMP): Likewise. If either <utmp.h> or
158266         <utmpx.h> exists, put readutmp.o into LIBOBJS.
158268 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
158270         * lib/Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
158272 2000-06-26  Paul Eggert  <eggert@twinsun.com>
158274         savedir now sets errno on failure and invokes xmalloc to get memory.
158275         Fix a couple of other minor bugs while we're at it.
158277         * lib/savedir.c (<unistd.h>): Do not include; there's no need.
158278         (NAMLEN): Remove macro.
158279         (malloc, realloc): Remove decls.
158280         (stpcpy): Likewise.
158281         ("xalloc.h"): Include.
158282         (NAME_SIZE_DEFAULT): New macro.
158283         (savedir): Use xmalloc / xrealloc to allocate memory.
158284         Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
158285         Skip "" directory entries.
158286         Use strlen to calculate directory entry length, since the old method
158287         is rarely used these days and isn't worth supporting.
158288         Don't use a pointer after freeing it.
158289         Check for integer overflow when calculating allocation size.
158290         Use memcpy to copy entries, instead of stpcpy.
158291         Set errno properly when returning NULL.
158292         Check for readdir error.
158294 2000-06-26  Jim Meyering  <meyering@lucent.com>
158296         * lib/posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
158298 2000-06-25  Jim Meyering  <meyering@lucent.com>
158300         * m4/mbstate_t.m4: Include stdio.h before wchar.h to work around
158301         Linux header bug when _XOPEN_SOURCE is defined to 500.
158303 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
158305         * lib/unicodeio.c (print_unicode_char): Work around ansi2knr
158306         deficiency.
158308 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
158310         * lib/getusershell.c (xmalloc, xrealloc): Remove functions.
158311         Include xalloc.h.
158312         Don't include <stdlib.h>.  Don't declare malloc, realloc.
158314 2000-06-24  Jim Meyering  <meyering@lucent.com>
158316         * m4/strerror_r.m4: Revive this file -- to try out an experimental
158317         version of AC_FUNC_STRERROR_R that may work even on BeOS, a system
158318         for which strerror does return char*, but which lacks a conveniently
158319         accessible declaration of the function.  If the compile-test says
158320         strerror_r doesn't work, then resort to a `run'-test that works on
158321         BeOS and segfaults on DEC Unix.
158323 2000-06-24  Jim Meyering  <meyering@lucent.com>
158325         * lib/error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
158327 2000-06-23  Paul Eggert  <eggert@twinsun.com>
158329         * m4/mbstate_t.m4: New file, defining AC_MBSTATE_T_OBJECT.
158330         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Use it.  Add check for iswprint.
158332 2000-06-23  Paul Eggert  <eggert@twinsun.com>
158334         * lib/quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
158335         (mbrtowc, mbstate_t): Define substitutes if
158336         HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
158337         (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
158338         not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
158340 2000-06-23  Jim Meyering  <meyering@lucent.com>
158342         * m4/afs.m4: Add missing AC_MSG_RESULT.
158343         Reported by Bruno Haible.
158345         * m4/fsusage.m4: s/AC_MSG_CHECKING/AC_CHECKING/.
158346         Suggestion from Bruno Haible.
158348 2000-06-23  Jim Meyering  <meyering@lucent.com>
158350         * lib/getpass.c: New file, from Bruno Haible.  Required for BeOS.
158352 2000-06-21  Jim Meyering  <meyering@lucent.com>
158354         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add getpass.
158356 2000-06-21  Jim Meyering  <meyering@lucent.com>
158358         * lib/Makefile.am (libfetish_a_SOURCES): Add getstr.c.
158359         (noinst_HEADERS): Add getstr.h.
158361         * lib/getline.c (getstr): Move into a separate file.
158362         * lib/getstr.c (getstr): New file, extracted from getline.c, with
158363         the following changes: new parameter, delim2; both delim[12]
158364         parameters have type `int', not `char'.  The latter would lose
158365         with 8-bit delimiters.
158366         * lib/getstr.h: New file.
158368 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
158370         * lib/xgetcwd.c (xgetcwd): If the required pathname length is smaller
158371         than 1024, return a memory chunk of least possible size, instead
158372         of size PATH_MAX + 2. In the loop, increment the size proportionally.
158373         Use free/xmalloc instead of xrealloc to avoid copying for very long
158374         paths.
158376 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
158378         * lib/path-concat.c (path_concat): Don't access dir[-1] if dir is
158379         the empty string.
158381 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
158383         * lib/canon-host.c (canon_host): Use malloc and memcpy to copy an
158384         address, not strdup.  Include <stdlib.h> and don't declare free().
158386 2000-06-19  Jim Meyering  <meyering@lucent.com>
158388         * lib/getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
158390 2000-06-18  Jim Meyering  <meyering@lucent.com>
158392         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Remove mkdir.
158394         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): Change the
158395         `checking whether...' message to be consistent with that of the
158396         lstat test.
158398 2000-06-18  Jim Meyering  <meyering@lucent.com>
158400         * lib/mkdir.c: Remove file, due mainly to copyright incompatibility.
158401         Besides, these days every porting target provides a mkdir function.
158403         * lib/strnlen.c: Include memory.h, string.h, and/or strings.h as
158404         needed. (this snippet comes from src/system.h).
158406 2000-06-16  Bruno Haible  <haible@clisp.cons.org>
158408         * m4/glibc21.m4 (jm_GLIBC21): Define GLIBC21 for Makefiles, not for C.
158410 2000-06-15  Paul Eggert  <eggert@twinsun.com>
158412         * lib/human.c (adjust_value): New function.
158413         (human_readable_inexact): Apply rounding style even when
158414         printing approximate values.
158416 2000-06-14  Paul Eggert  <eggert@twinsun.com>
158418         * lib/human.c (human_readable_inexact): Allow an input block
158419         size that is not a multiple of the output block size, and vice versa.
158420         Reported by Piergiorgio Sartor.
158422 2000-06-14  Paul Eggert  <eggert@twinsun.com>
158424         * lib/getdate.y (get_date): Apply relative times after time
158425         zone indicator, not before.  Reported by Todd A. Jacobs.
158427 2000-06-13  Jim Meyering  <meyering@lucent.com>
158429         * lib/Makefile.am (all-local): Depend on lstat.c and stat.c.
158431         * lib/xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
158433 2000-06-12  Paul Eggert  <eggert@twinsun.com>
158435         * lib/xstat.in: Include <stdlib.h> in lstat, to declare "free".
158437 2000-06-12  Jim Meyering  <meyering@lucent.com>
158439         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Replace with
158440         AC_FUNC_GETLOADAVG from autoconf, and tweak the latter to accept an
158441         optional argument.
158442         * m4/jm-macros.m4: s/AM_FUNC_GETLOADAVG/AC_FUNC_GETLOADAVG/, and supply
158443         the optional argument, `lib'.
158445 2000-06-08  Jim Meyering  <meyering@lucent.com>
158447         * m4/largefile.m4: Remove file (now that it's part of autoconf).
158449 2000-06-04  Paul Eggert  <eggert@twinsun.com>
158451         Rewrite largefile configuration so that we don't need to run
158452         getconf and don't need AC_CANONICAL_HOST.  [I'm leaving the use of
158453         AC_CANONICAL_HOST in configure.in -- jmm]
158455         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS,
158456         AC_SYS_LARGEFILE_SPACE_APPEND): Remove.
158457         (AC_SYS_LARGEFILE_TEST_INCLUDES): New macro.
158458         (AC_SYS_LARGEFILE_MACRO_VALUE): Change arguments from
158459         CODE-TO-SET-DEFAULT to VALUE, INCLUDES, FUNCTION-BODY.
158460         All uses changed.
158461         Instead of inspecting the output of getconf, try to compile the
158462         test program without and with the macro definition.
158463         (AC_SYS_LARGEFILE): Do not require AC_CANONICAL_HOST or check
158464         for getconf.  Instead, check for the needed flags by compiling
158465         test programs.
158467 2000-06-04  Paul Eggert  <eggert@twinsun.com>
158469         * lib/strnlen.c: Include <config.h> if HAVE_CONFIG_H.
158471 2000-06-04  Jim Meyering  <meyering@lucent.com>
158473         * lib/getugroups.c (getugroups): Cast -1 to gid_t, for systems like
158474         SunOS 4.1.4 for which gid_t is an unsigned type.
158476 2000-06-03  Jim Meyering  <meyering@lucent.com>
158478         * m4/prereq.m4 (jm_PREREQ_HUMAN): Use []-quoted list in AC_CHECK_DECLS,
158479         now that autoconf requires that.
158481         * m4/jm-glibc-io.m4: Add a kludge to make autoheader emit the required
158482         #undefs.  E.g., #undef HAVE_DECL_FERROR_UNLOCKED.
158483         Use []-quoted list in AC_CHECK_DECLS, now that autoconf requires that.
158485 2000-06-03  Jim Meyering  <meyering@lucent.com>
158487         * lib/strnlen.c [!HAVE_DECL_MEMCHR]: Declare memchr.
158489 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
158491         * m4/glibc21.m4: New file.
158492         * m4/jm-macros.m4 (jm_MACROS): Call jm_GLIBC21.
158494 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
158496         * lib/Makefile.am (install-exec-local): On systems with glibc-2.1 or
158497         newer, don't install charset.alias.
158498         * lib/config.charset: Change the Linux/glibc rules so they become empty
158499         on glibc-2.1 or newer.
158501 2000-06-02  Jim Meyering  <meyering@lucent.com>
158503         * lib/mountlist.c: Back out last change.  Instead, do this...
158504         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Set the
158505         me_dummy member using the same `ignore'-testing code.
158506         * lib/mountlist.h (ME_DUMMY): Add `autofs' to the list of ignored
158507         fs_type strings.
158508         From Mark D. Roth.
158510 2000-05-29  Jim Meyering  <meyering@lucent.com>
158512         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Ignore
158513         mounts with the `ignore' attribute.  Based on a patch from
158514         Mark D. Roth.
158516 2000-05-28  Jim Meyering  <meyering@lucent.com>
158518         * m4/jm-macros.m4 (AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Rename from
158519         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
158520         * m4/stat.m4: Likewise.
158521         * m4/lstat.m4: Likewise.
158522         * m4/lstat-slash.m4: Remove file (absorbed into autoconf).
158524         * m4/jm-macros.m4 (AC_FUNC_STRERROR_R): Rename from jm_FUNC_STRERROR_R.
158525         * m4/strerror_r.m4: Remove file (absorbed into autoconf).
158527 2000-05-26  Jim Meyering  <meyering@lucent.com>
158529         * m4/uptime.m4: Use `$cross_compiling', not `$ac_cv_prog_cc_cross'.
158531 2000-05-24  Jim Meyering  <meyering@lucent.com>
158533         * m4/prereq.m4: Use []-quoted list in AC_CHECK_MEMBERS, now that
158534         autoconf requires that.
158535         * m4/lib-check.m4: Likewise.
158536         * m4/jm-macros.m4: Likewise.
158537         * m4/strftime.m4: Likewise.
158539         * m4/check-decl.m4 (jm_CHECK_DECLS): Use []-quoted list in
158540         AC_CHECK_DECLS, now that autoconf requires that.
158542 2000-05-22  Jim Meyering  <meyering@lucent.com>
158544         * m4/stat.m4: Require jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
158545         * m4/lstat.m4: Likewise.
158547 2000-05-22  Jim Meyering  <meyering@lucent.com>
158549         * lib/makepath.c: Remove old, now-unnecessary `#ifdef __MSDOS__' block.
158551 2000-05-20  Jim Meyering  <meyering@lucent.com>
158553         * m4/prereq.m4 (jm_PREREQ_HUMAN): New macro.
158554         (jm_PREREQ): Use it.
158556 2000-05-18  Jim Meyering  <meyering@lucent.com>
158558         * lib/hash.c (hash_rehash): Fix a nasty bug: copy the free entry list
158559         back, too, since it may have been modified by allocate_entry.
158560         (hash_delete): Rewrite to use neither the assignment operator
158561         nor the comma operator in an if-expression.
158563 2000-05-15  Paul Eggert  <eggert@twinsun.com>
158565         * lib/closeout.c:
158566         <sys/stat.h>, <sys/types.h>, <unistd.h>, (STDOUT_FILENO):
158567         Remove; no longer needed.
158568         "quotearg.h": Add include.
158569         (file_name): Do not bother to explicitly initialize to NULL; it's less
158570         efficient on some hosts.
158571         (close_stdout_status): Remove test as to whether stdout was already
158572         closed; it breaks for the case "echo x | sort >&-".
158573         Quote file name colons.
158574         Do not assume that _("write error") lacks format strings.
158576 2000-05-15  Jim Meyering  <meyering@lucent.com>
158578         * lib/version-etc.c (version_etc_copyright): Update the copyright
158579         string used in all --version output.
158581 2000-05-14  Jim Meyering  <meyering@lucent.com>
158583         * lib/closeout.c (close_stdout_set_file_name): New function.
158584         (close_stdout_status): Use new file-scoped global.
158585         Return right away if fstat says the stdout file descriptor is invalid.
158586         * lib/closeout.h (close_stdout_set_file_name): Declare.
158588 2000-05-10  Jim Meyering  <meyering@lucent.com>
158590         * lib/closeout.c [default_exit_status]: New file-scoped variable.
158591         (close_stdout_set_status): New function.
158592         * lib/closeout.h (close_stdout_set_status): Declare.
158594 2000-05-09  Jim Meyering  <meyering@lucent.com>
158596         * m4/gettext.m4: Rename this...
158597         * m4/libintl.m4: ...to this.
158599 2000-05-08  Jim Meyering  <meyering@lucent.com>
158601         * lib/long-options.c: Don't include closeout.h.
158602         (parse_long_options): Don't call close_stdout for --version.
158604 2000-05-06  Paul Eggert  <eggert@twinsun.com>
158606         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _XOPEN_SOURCE to
158607         be 500, instead of _GNU_SOURCE to be 1, to work around glibc
158608         2.1.3 bug.  This avoids a clash when files like regex.c define
158609         _GNU_SOURCE.
158611 2000-05-06  Jim Meyering  <meyering@lucent.com>
158613         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add atexit.
158614         (AC_REPLACE_FUNCS): Add strnlen.
158616         * m4/rmdir-errno.m4 (fetish_FUNC_RMDIR_NOTEMPTY): New macro and file.
158617         * m4/jm-macros.m4: Require fetish_FUNC_RMDIR_NOTEMPTY.
158619         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Save and restore LIBS around
158620         AC_SEARCH_LIBS call for nanosleep.
158621         (LIB_NANOSLEEP): Set and AC_SUBST.
158623 2000-05-06  Jim Meyering  <meyering@lucent.com>
158625         * lib/strnlen.c: Undefine __strnlen and strnlen.
158626         [!weak_alias]: Define __strnlen to strnlen.
158628         * lib/atexit.c: New file, from libiberty.
158630 2000-05-06  Jim Meyering  <meyering@lucent.com>
158632         * lib/closeout.c (close_stdout_status): Also check for errors on the
158633         stderr stream.
158635 2000-05-05  Jim Meyering  <meyering@lucent.com>
158637         * m4/jm-macros.m4 (jm_MACROS): Save and restore LIBS around
158638         AC_SEARCH_LIBS call for clock_gettime.
158639         (LIB_CLOCK_GETTIME): Set and AC_SUBST.
158641         * m4/search-libs.m4: Update from autoconf.
158643         su doesn't work on Solaris 2.6.
158644         * m4/lib-check.m4: When checking for struct spwd.sp_pwdp, also include
158645         <shadow.h>.  Reported by Dragos Harabor.
158647 2000-05-05  Bruno Haible  <haible@clisp.cons.org>
158649         * lib/localcharset.c (get_charset_aliases): Use malloc, realloc and
158650         memcpy instead of xmalloc, xrealloc, path_concat.
158651         (locale_charset): Treat empty environment variables as absent.
158652         (DIRECTORY_SEPARATOR, ISSLASH): New macros.
158654 2000-05-04  Jim Meyering  <meyering@lucent.com>
158656         * lib/getopt.c: Update from glibc.
158657         * lib/obstack.c: Likewise.
158658         * lib/obstack.h: Likewise.
158659         * lib/regex.c: Likewise.  NB: K&R compiler support is dropped for this
158660         file
158662         * lib/regex.h: Likewise.
158663         * lib/strndup.c: Likewise.
158664         * lib/strnlen.c: New file, from glibc.
158666 2000-05-03  Jim Meyering  <meyering@lucent.com>
158668         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strndup.
158670 2000-05-02  Paul Eggert  <eggert@twinsun.com>
158672         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _GNU_SOURCE if
158673         this is needed to make ftello visible (e.g. glibc 2.1.3).  Use
158674         compile-time test, rather than inspecting host and OS, to
158675         decide whether to define _LARGEFILE_SOURCE.
158677 2000-05-01  Jim Meyering  <meyering@lucent.com>
158679         * m4/fsusage.m4: Use AC_MSG_CHECKING instead of obsolete AC_CHECKING.
158681         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add BeOS support.
158682         Based on a patch from Bruno Haible.
158684 2000-05-01  Jim Meyering  <meyering@lucent.com>
158686         * lib/full-write.c (full_write): Remove `FIXME' part of comment.
158688 2000-04-29  Jim Meyering  <meyering@lucent.com>
158690         * lib/path-concat.c: Declare strdup only if it's not defined.
158691         * lib/canon-host.c: Likewise.
158693 2000-04-28  Jim Meyering  <meyering@lucent.com>
158695         * lib/rpmatch.c [HAVE_LIMITS_H]: Include limits.h before regex.h to
158696         avoid redefinition warning on some systems (HPUX).  Otherwise, regex.h
158697         is included first, then limits.h is included by locale.h by libintl.h.
158698         From John David Anglin.
158700 2000-04-25  Jim Meyering  <meyering@lucent.com>
158702         * lib/makepath.c (S_IRWXUGO): Define.
158703         (make_path): Always perform explicit chmod if MODE specifies any
158704         of the `special' permission bits.  Prompted by a bug report against
158705         install from Mate Wierdl and Joost van Baal.
158707 2000-04-18  Jim Meyering  <meyering@lucent.com>
158709         * m4/prereq.m4 (jm_PREREQ_GETPAGESIZE): New macro.
158710         (jm_PREREQ): Use it.
158712 2000-04-18  Jim Meyering  <meyering@lucent.com>
158714         * lib/README: New file.
158716         * lib/getpagesize.h [!getpagesize && HAVE_OS_H && B_PAGE_SIZE]: Define
158717         getpagesize.  For BeOS.  Based on a patch from Bruno Haible.
158719 2000-04-17  Jim Meyering  <meyering@lucent.com>
158721         Get it right :-)
158722         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Emit the
158723         actual #define via AH_VERBATIM.  Don't need separate AC_DEFINE.
158724         Suggestion from Akim Demaille.
158726 2000-04-17  Jim Meyering  <meyering@lucent.com>
158728         * lib/strftime.c (my_strftime) [strftime]: Declare strftime here, since
158729         the definition of it to rpl_strftime also defined-away the system's
158730         declaration.
158732 2000-04-15  Jim Meyering  <meyering@lucent.com>
158734         Use `C' to denote so-called `contiguous' files, the same way
158735         that tar does.
158736         * lib/filemode.c (S_ISCTG) [!S_ISCTG && S_IFCTG]: Define.
158737         (ftypelet): Use S_ISCTG.
158738         From Michael Deutschmann.
158740 2000-04-14  Jim Meyering  <meyering@lucent.com>
158742         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use the one-arg
158743         form of AC_DEFINE.  Otherwise, the #ifndef in AH_VERBATIM gets
158744         clobbered.
158746 2000-04-14  Jim Meyering  <meyering@lucent.com>
158748         * lib/strftime.c (my_strftime) [#ifdef strftime]: Declare strftime.
158750 2000-04-13  Jim Meyering  <meyering@lucent.com>
158752         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use new
158753         AH_VERBATIM to insert required #ifndef into config.h.in.
158754         Suggestion from Akim Demaille.
158756 2000-04-12  Jim Meyering  <meyering@lucent.com>
158758         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Use AC_CHECK_HEADERS, not
158759         `AC_CHECK_HEADER' to check for locale.h.  Thanks to a report from
158760         Christian Krackowizer.
158762         More code moved from ../configure.in into (jm_CHECK_ALL_TYPES).
158763         * m4/jm-macros.m4 (_GNU_SOURCE): Define.
158764         (AC_SYS_LARGEFILE): Require.
158765         (AM_C_PROTOTYPES): Require.
158767 2000-04-08  Jim Meyering  <meyering@lucent.com>
158769         * lib/Makefile.am (charset.alias): Use t-$@, not $@-t so the DOS 8.3
158770         names don't conflict.  Reported by Eli Zaretskii.
158772 2000-04-07  Jim Meyering  <meyering@lucent.com>
158774         * lib/putenv.c: Move inclusion of errno.h so it follows that of
158775         sys/types.h, to work around system header problems on AIX 3.2.5.
158776         From Bruno Haible.
158778 2000-04-07  Bruno Haible  <haible@clisp.cons.org>
158780         * lib/unicodeio.c (print_unicode_char): Avoid triggering Solaris iconv
158781         bug.  Deal with the different error behavior of Irix iconv.
158783 2000-04-05  Paul Eggert  <eggert@twinsun.com>
158785         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Don't use -n32 on
158786         IRIX if the installer said otherwise.
158788 2000-04-05  Jim Meyering  <meyering@lucent.com>
158790         Portability tweaks required for ultrix4.3.
158791         * m4/check-decl.m4 [!HAVE_UTMPX_H] (headers): Include <utmp.h>.
158792         (jm_CHECK_DECLS): Add getutent to the list of functions.
158793         (_jm_DECL_HEADERS): Add utmpx.h.
158794         From John David Anglin.
158796         * m4/strftime.m4: Back out the 2000-04-02 change.
158797         Instead of that change, simply undefine putenv in the test program.
158799 2000-04-05  Jim Meyering  <meyering@lucent.com>
158801         Portability tweaks required for ultrix4.3.
158802         * lib/readutmp.h [HAVE_UTMPX_H && !HAVE_DECL_GETUTENT]: Declare
158803         getutent.
158804         * lib/readutmp.c: Include sys/types.h before sys/stat.h.
158805         * lib/canon-host.c: Declare strdup.
158806         * lib/path-concat.c: Likewise.
158807         From John David Anglin.
158809 2000-04-04  Jim Meyering  <meyering@lucent.com>
158811         Be more DOS 8.3-friendly.
158812         * lib/ref-add.sin: Renamed from ref-add.sed.in.
158813         * lib/ref-del.sin: Renamed from ref-del.sed.in.
158814         * lib/Makefile.am: Reflect renaming.
158815         Reported by Eli Zaretskii.
158817         Use a temporary file name that won't clash with `charset.alias'
158818         in the DOS 8.3 name space.
158819         * lib/Makefile.am (charset_tmp): Define.
158820         (install-exec-local): Use $(charset_tmp) instead of $(charset_alias)-t.
158821         (uninstall-local): Likewise.
158822         Reported by Eli Zaretskii.
158824 2000-04-03  Jim Meyering  <meyering@lucent.com>
158826         * m4/gettext.m4: Fix typo in comment.
158828         * m4/codeset.m4 (AC_CHECK_HEADERS): Add langinfo.h (moved here from
158829         textutils/configure.in).  Suggestion from Paul Eggert.
158830         (AC_CHECK_FUNCS): Add nl_langinfo.  (also from textutils/configure.in)
158832 2000-04-02  Paul Eggert  <eggert@twinsun.com>
158834         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Set TZ environment
158835         variable in the shell rather than using putenv, which isn't
158836         portable.  This avoids the configure-time inter-test dependency
158837         on the potentially-renamed putenv function.
158839 2000-03-30  Paul Eggert  <eggert@twinsun.com>
158841         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Include <sys/stat.h>
158842         before checking struct stat.st_blksize, so that
158843         HAVE_STRUCT_STAT_ST_BLKSIZE is defined correctly.
158845 2000-03-29  Paul Eggert  <eggert@twinsun.com>
158847         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Check for strftime,
158848         since strftime.c uses HAVE_STRFTIME to decide whether to use
158849         the underlying strftime.
158851 2000-03-29  Paul Eggert  <eggert@twinsun.com>
158853         * lib/time/strftime.c (my_strftime): Make sure we call the system
158854         strftime, not ourselves, when invoking the underlying strftime.
158856 2000-03-24  Jim Meyering  <meyering@lucent.com>
158858         * lib/Makefile.am (EXTRA_DIST): Add ref-add.sed.in and ref-del.sed.in.
158859         (charset_alias): Define.
158860         (install-exec-local): Factor out common code.
158861         (uninstall-local): Split lines longer than 80.
158862         (ref-add.sed, ref-del.sed): Remove rules... (do the following instead)
158863         (SUFFIXES): Define.
158864         (.sed.in.sed): New rule.  Don't redirect directly to $@.
158865         (CLEANFILES): Add ref-add.sed and ref-del.sed.
158867 2000-03-19  Bruno Haible  <haible@clisp.cons.org>
158869         * lib/config.charset: Output a line containing "Packages using this
158870         file".
158871         * lib/ref-add.sed.in, lib/ref-del.sed.in: New files.
158872         * lib/Makefile.am (install-exec-local, uninstall-local, ref-add.sed,
158873         ref-del.sed): New rules.
158875 2000-03-17  Jim Meyering  <meyering@lucent.com>
158877         * lib/unicodeio.c (<string.h>): Include only #if HAVE_STRING_H.
158878         Otherwise, include <strings.h>
158880 2000-03-17  Bruno Haible  <haible@clisp.cons.org>
158882         * lib/unicodeio.c (utf8_wctomb): New function.
158883         (print_unicode_char): Pass the Unicode character to iconv in UTF-8
158884         format instead of in UCS-4 with platform dependent endianness.
158886 2000-03-10  Jim Meyering  <meyering@lucent.com>
158888         * m4/lib-check.m4: Look for getspnam in -lgen, too.
158889         From Marco Franzen.
158891 2000-03-07  Paul Eggert  <eggert@twinsun.com>
158893         * lib/savedir.c (savedir): Work even if directory size is
158894         negative; this can happen with some screwy NFS configurations.
158896 2000-03-06  Jim Meyering  <meyering@lucent.com>
158898         * lib/localcharset.c (get_charset_aliases): Don't try to free file_name
158899         if it's NULL (because we ran out of memory).  From Bruno Haible.
158901 2000-03-05  Jim Meyering  <meyering@lucent.com>
158903         * lib/localcharset.c ("path-concat.h"): Include.
158904         (get_charset_aliases): Use path_concat instead of ANSI string
158905         concatenation.
158907         * lib/unicodeio.h (PARAMS): Define.
158908         Use it to guard prototype.
158910 2000-03-04  Jim Meyering  <meyering@lucent.com>
158912         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require AC_C_VOLATILE,
158913         for lib/localcharset.c.
158915 2000-03-04  Jim Meyering  <meyering@lucent.com>
158917         * lib/Makefile.am (install-exec-local): Create $(libdir) before
158918         installing into it.
158919         (uninstall-local): Uncomment this rule so `make distcheck' works
158920         once again.
158922         * lib/unicodeio.c (<errno.h>): Include it.
158923         (errno): Declare if not defined.
158925         * lib/localcharset.c: Add Bruno's comment justifying use of volatile.
158927         * lib/config.charset: New version, incorporating remarks from a linux
158928         i18n mailing list.  From Bruno Haible.
158930 2000-03-04  Bruno Haible  <haible@clisp.cons.org>
158932         * m4/codeset.m4: New file.
158933         * m4/iconv.m4: New file.
158934         * m4/jm-macros.m4 (jm_MACROS): Call jm_LANGINFO_CODESET and jm_ICONV.
158936 2000-03-03  Jim Meyering  <meyering@lucent.com>
158938         * m4/regex.m4: Make sure re_compile_pattern accepts patterns like `{1'.
158940 2000-03-02  Jim Meyering  <meyering@lucent.com>
158942         * m4/timespec.m4: Require AC_HEADER_TIME before the cache check so
158943         the messages come out on separate lines.
158945         * m4/jm-glibc-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO): Use AC_CHECK_DECLS,
158946         rather than jm_CHECK_DECLARATIONS.
158947         * m4/decl.m4: Remove now-unused file.
158949         * m4/check-decl.m4 (AC_CHECK_DECLS): Add getlogin, ttyname, and
158950         geteuid.
158952 2000-03-02  Jim Meyering  <meyering@lucent.com>
158954         * lib/Makefile.am (EXTRA_DIST): Add config.charset.
158956 2000-03-01  Jim Meyering  <meyering@lucent.com>
158958         * lib/localcharset.c: Guard some #includes with `#if HAVE_...'.
158959         * lib/unicodeio.c: Likewise.
158961 2000-03-01  Bruno Haible  <haible@clisp.cons.org>
158963         * lib/config.charset: New file.
158964         * lib/localcharset.c: New file.
158965         * lib/unicodeio.h, lib/unicodeio.c: New files.
158966         * lib/Makefile.am (DEFS): Add -DLIBDIR=...
158967         (libfetish_a_SOURCES): Add localcharset.c and unicodeio.c.
158968         (noinst_HEADERS): Add unicodeio.h.
158969         (all-local, install-exec-local, charset.alias): New targets.
158971 2000-02-28  Paul Eggert  <eggert@twinsun.com>
158973         * lib/quotearg.c (ALERT_CHAR): New macro.
158974         (quotearg_buffer_restyled): Use it.
158976 2000-02-27  Jim Meyering  <meyering@lucent.com>
158978         * m4/check-decl.m4: Add getenv to the list.
158980 2000-02-27  Jim Meyering  <meyering@lucent.com>
158982         * lib/strtoumax.c: Fix typo in decl of strtoul: s/long long/long/.
158983         Guard declaration of strtoull also with `&& HAVE_UNSIGNED_LONG_LONG'.
158985         * lib/backupfile.c: Guard inclusion of stdlib.h with
158986         `#if HAVE_STDLIB_H', not `#if STDC_HEADERS'.
158987         Declare malloc if needed.
158989         * lib/backupfile.c: Use `#if !HAVE_DECL...' instead of
158990         `#ifndef HAVE_DECL..'
158991         now that autoconf always defines the HAVE_DECL_ symbols.
158992         * lib/human.c: Likewise.
158993         * lib/same.c: Likewise.
158994         * lib/strtoumax.c: Likewise.
158996         * lib/backupfile.c: Arrange for cpp to fail if the configure-time
158997         declaration check was not run.
158998         * lib/hash.c: Likewise.
158999         * lib/human.c: Likewise.
159000         * lib/same.c: Likewise.
159001         * lib/strtoumax.c: Likewise.
159003         * lib/userspec.c (parse_user_spec): If there is no `:' but there is a
159004         `.', then first look up the entire `.'-containing string as a login
159005         name.
159007 2000-02-23  Jim Meyering  <meyering@lucent.com>
159009         * m4/check-decl.m4: Now that we have the new AC_CHECK_DECLS, use it
159010         in place of my hack.
159012 2000-02-18  Paul Eggert  <eggert@twinsun.com>
159014         * lib/getdate.y: Handle two-digit years with leading zeros correctly.
159015         (textint): New typedef.
159016         (parser_control): Member year changed from int to textint.
159017         All uses changed.
159018         (YYSTYPE): Removed; replaced by %union with int and textint members.
159019         (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE, tMERIDIAN,
159020         tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER, tUNUMBER,
159021         tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
159022         (tSNUMBER, tUNUMBER): Now of type <textintval>.
159023         (date, number, to_year): Use width of number in digits, not its value,
159024         to determine whether it's a 2-digit year, or a 2-digit time.
159025         (yylex): Store number of digits of numeric tokens.
159026         Reported by John Kendall.
159028         (parser_control): Changed from struct parser_control to typedef (for
159029         consistency).  All uses changed.
159031         (tID): Removed; not used.
159032         (yylex): Return '?' for unknown identifiers, rather than (unused) tID.
159034 2000-02-14  Paul Eggert  <eggert@twinsun.com>
159036         * lib/getpagesize.h (getpagesize): Port to VMS for Alpha;
159037         adapted from changes to grep getpagesize.h by Martin P.J. Zinser.
159039 2000-02-12  Jim Meyering  <meyering@lucent.com>
159041         * lib/userspec.c (ISDIGIT): Define it.
159042         (isdigit): Remove definition.
159043         (is_number): Use ISDIGIT, not isdigit.
159044         <libintl.h>: Include.
159045         (_ and N_): Define.
159046         (parse_user_spec): Mark translatable strings.
159048 2000-02-10  Jim Meyering  <meyering@lucent.com>
159050         With these changes, nanosleep.[ch] are finally enough like the other
159051         lib/* replacement files to compile on a few more losing systems.
159053         * lib/nanosleep.h: Don't include config.h.
159054         Remove prototype from declaration of nanosleep.
159055         (PARAMS): Remove now-unneeded definition.
159056         * lib/nanosleep.c: #undef nanosleep.
159057         (rpl_nanosleep): Rename from nanosleep.
159059 2000-02-10  Jim Meyering  <meyering@lucent.com>
159061         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Rename replacement function from
159062         gnu_nanosleep to rpl_nanosleep.
159064 2000-02-09  Jim Meyering  <meyering@lucent.com>
159066         * m4/lib-check.m4 (jm_LIB_CHECK): Fix typo: check for sp_pwdp in
159067         struct spwd, rather than in struct passwd.  Reported by Gaël Quéri.
159069 2000-02-08  Akim Demaille  <akim@epita.fr>
159071         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Quote square brackets with
159072         `[' and `]' and remove uses of `changequote'.
159073         (AC_SYS_LARGEFILE_MACRO_VALUE): Likewise.
159074         (AC_SYS_LARGEFILE): Likewise.
159075         * m4/gettext.m4 (AM_GNU_GETTEXT): Likewise.
159076         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Remove now-unnecessary use
159077         of changequote.
159078         * m4/regex.m4 (jm_INCLUDED_REGEX): Likewise.
159079         * m4/readdir.m4 (jm_FUNC_READDIR): Likewise
159080         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Likewise, and add `int' for main.
159081         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Likewise.
159083 2000-02-05  Jim Meyering  <meyering@lucent.com>
159085         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require most macros.
159086         Remove explicit use of AC_HEADER_TIME.  It is required by
159087         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Using AC_HEADER_TIME and
159088         `AC_REQUIRE'ing jm_CHECK_TYPE_STRUCT_TIMESPEC provoked a but
159089         in autoconf whereby the expansion of the latter ended up preceding
159090         the expansion of its prerequisite, AC_HEADER_TIME.
159091         Reported by Volker Borchert.
159093 2000-02-03  Jim Meyering  <meyering@lucent.com>
159095         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for utmpxname.
159097 2000-02-03  Jim Meyering  <meyering@lucent.com>
159099         * lib/readutmp.c (read_utmp): Guard with `#ifdef UTMP_NAME_FUNCTION',
159100         rather than with `#if HAVE_UTMPNAME'.
159102 2000-02-02  Jim Meyering  <meyering@lucent.com>
159104         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Fix typo that resulted in no
159105         definition of HAVE_PATHCONF: s/AC_CHECK_FUNC/AC_CHECK_FUNCS/.
159106         Reported by Eli Zaretskii.
159108 2000-02-01  Jim Meyering  <meyering@lucent.com>
159110         * lib/readutmp.h (UT_USER): Add parens.  From Andreas Schwab.
159112 2000-01-31  Jim Meyering  <meyering@lucent.com>
159114         * m4/check-decl.m4 (jm_CHECK_DECLS): Add nanosleep to the list of
159115         functions.  Add the time.h and sys/time.h headers along with the
159116         AC_REQUIRE'ment of AC_HEADER_TIME.
159118 2000-01-31  Jim Meyering  <meyering@lucent.com>
159120         * lib/nanosleep.h (nanosleep): Guard declaration with
159121         `#if ! HAVE_DECL_NANOSLEEP'.
159122         Without this, OFS gets a redeclaration error for rpl_nanosleep, due to
159123         the declaration in that vendor's sys/timers.h.
159124         Reported by Christian Krackowizer.
159126         * lib/quotearg.c (ISASCII): Add #undef and move definition to follow
159127         inclusion of wctype.h to work around Solaris 2.6 namespace pollution.
159128         (ISPRINT): Likewise.
159129         Reported by Tom Tromey.
159131 2000-01-30  Jim Meyering  <meyering@lucent.com>
159133         * m4/lib-check.m4: Clean up some kludgy old shadow password tests.
159135         * m4/prereq.m4 (utmp_includes): Define.
159136         Check for ut_user and ut_name members in both struct utmpx
159137         and struct utmp.
159139 2000-01-30  Jim Meyering  <meyering@lucent.com>
159141         * lib/readutmp.c (extract_trimmed_name): Use UT_USER instead of
159142         hard-coding uses of ->ut_name.  The latter doesn't work with new Linux
159143         header files where only utmpx.ut_user is declared.
159145         * lib/readutmp.h (UT_USER): Define.
159147 2000-01-29  Jim Meyering  <meyering@lucent.com>
159149         * m4/lib-check.m4: New file containing library-related checks from
159150         fileutils and sh-utils (textutils had none).
159152 2000-01-28  Jim Meyering  <meyering@lucent.com>
159154         * m4/perl.m4: Change format of warning message to look more like that
159155         from the missing script.  Suggestion from François Pinard.
159157 2000-01-25  Jim Meyering  <meyering@lucent.com>
159159         * m4/timespec.m4: Require AC_HEADER_TIME, and include sys/time.h as
159160         well as time.h in the compile check.
159161         * m4/nanosleep.m4: Require AC_HEADER_TIME rather than simply using it.
159162         Fix typo in cross-compiling case: s/yes/no/.
159164 2000-01-23  Jim Meyering  <meyering@lucent.com>
159166         * m4/jm-macros.m4: Move df-related tests here from
159167         fileutils/configure.in
159169         * m4/ls-mntd-fs.m4: s/list_mounted_fs/ac_list_mounted_fs/
159170         (jm_LIST_MOUNTED_FILESYSTEMS): Take two parameters.
159172         * m4/fsusage.m4: New file.  Extracted from fileutils/configure.in.
159173         s/space/ac_fsusage_space/.
159174         (jm_FILE_SYSTEM_USAGE): Take two parameters.
159176         * m4/ftruncate.m4: New file (derived from part of
159177         fileutils/configure.in).
159178         * m4/jm-macros.m4 (jm_FUNC_FTRUNCATE): AC_REQUIRE it.
159179         (jm_CHECK_ALL_TYPES): Require AC_HEADER_MAJOR and AC_HEADER_DIRENT.
159181         * m4/jm-macros.m4 (OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, MAN):
159182         AC_SUBST these here, rather than just in sh-util/configure.in, so
159183         that the now-shared-by-fileutils-and-textutils lib/Makefile.am are
159184         all the same.
159185         (AM_FUNC_OBSTACK): Add (from fileutils/configure.in).
159186         (AC_CHECK_FUNCS): Merge all checks from fileutils, textutils, sh-utils.
159187         (AM_FUNC_STRTOD): Added (from textutils', sh-utils' configure.in).
159188         (AC_SUBST(POW_LIBM)): Likewise.
159189         (AC_SUBST(DF_PROG)): Moved from fileutils/configure.in.
159191 2000-01-23  Jim Meyering  <meyering@lucent.com>
159193         * lib/Makefile.am (libfetish_a_SOURCES): Remove explicit mention of
159194         obstack.c.
159196 2000-01-22  Jim Meyering  <meyering@lucent.com>
159198         * m4/jm-macros.m4: Call AC_PROG_CC_STDC just before AC_C_CONST.
159200         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Add wctype.h.
159202         * m4/jm-macros.m4 (AC_CHECK_HEADERS): Add checks from fileutils'
159203         configure.in
159204         (AC_CHECK_HEADERS): Likewise for sh-utils.
159205         (AC_CHECK_HEADERS): Likewise for textutils.
159206         Merge the three lists of headers.
159208         * m4/prereq.m4 (jm_PREREQ_ADDEXT): New macro.  Parts moved here
159209         from fileutils' configure.in.
159211         * m4/decl.m4: Remove kludgy `test -z $ac_...AC_CHECK_HEADERS(...)'
159212         code. Moved tests into their own function (_jm_DECL_HEADERS) in
159213         check-decl.m4.
159215         * m4/check-decl.m4: Use #if rather than #ifdef.
159216         Add HAVE_DECL_STRTOUL and HAVE_DECL_STRTOULL.
159217         (jm_CHECK_DECLARATIONS): Add strtoul strtoull.
159218         (_jm_DECL_HEADERS): Define new function.
159219         (jm_CHECK_DECLARATIONS): Require it.
159221 2000-01-22  Jim Meyering  <meyering@lucent.com>
159223         * lib/strtoumax.c: [! HAVE_DECL_STRTOUL]: Declare strtoul.
159224         [! HAVE_DECL_STRTOULL]: Declare strtoull.
159225         Required for some AIX systems.  Reported by Christian Krackowizer.
159226         [TESTING] (main): New function.
159228         1997-10-17  Eli Zaretskii  <eliz@is.elta.co.il>
159229         * lib/dirname.c (dir_name): Support for DOS-style file names with drive
159230         letters.
159232         * lib/quotearg.c [HAVE_WCTYPE_H]: Include <wctype.h> for decl of
159233         iswprint.
159235         * lib/strverscmp.c (ISDIGIT): Define.
159236         (strverscmp): Use ISDIGIT, not isdigit.
159238 2000-01-19  Jim Meyering  <meyering@lucent.com>
159240         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Include <sys/time.h>, too.
159241         Use AC_HEADER_TIME.  Volker Borchert reported that OpenBSD-2.3/sparc
159242         defines `struct timespec' in <sys/time.h>
159244         * m4/c-bs-a.m4: Remove uses of changequote altogether.
159245         Thanks to Akim for explaining.
159247 2000-01-17  Paul Eggert  <eggert@twinsun.com>
159249         * lib/nanosleep.c (nanosleep):
159250         Don't use SA_INTERRUPT to decide whether to call sigaction, as
159251         POSIX.1 doesn't require SA_INTERRUPT and some systems
159252         (e.g. Solaris 7) don't define it.  Use SA_NOCLDSTOP instead;
159253         it's been part of POSIX.1 since day 1 (in 1988).
159255 2000-01-17  Jim Meyering  <meyering@lucent.com>
159257         * lib/interlock: Remove unused file.  Reported by François Pinard.
159259 2000-01-16  Paul Eggert  <eggert@twinsun.com>
159261         * lib/quotearg.c (quotearg_buffer_restyled): Do not quote
159262         alert, backslash, formfeed, and vertical tab unnecessarily in
159263         shell quoting style.
159265 2000-01-16  Jim Meyering  <meyering@lucent.com>
159267         * m4/jm-macros.m4: Require jm_FUNC_GROUP_MEMBER, jm_FUNC_PUTENV,
159268         AM_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, jm_FUNC_MKTIME,
159269         jm_FUNC_GETGROUPS AC_FUNC_VPRINTF, AC_FUNC_ALLOCA,
159270         AM_FUNC_GETLOADAVG, and jm_SYS_PROC_UPTIME.
159272 2000-01-16  Jim Meyering  <meyering@lucent.com>
159274         * m4/c-bs-a.m4: Use `changequote(<<,>>)', rather than `changequote(, )'
159275         because the latter didn't work.
159277 2000-01-15  Jim Meyering  <meyering@lucent.com>
159279         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add gethostname and getusershell.
159280         (AC_REPLACE_FUNCS): Add memcpy and memset.
159281         Add these, too: stime strcspn stpcpy strstr strtol strtoul.
159282         Add strpbrk.
159283         Add these: euidaccess memcmp mkdir rmdir rpmatch strndup strverscmp.
159285 2000-01-12  Jim Meyering  <meyering@lucent.com>
159287         * m4/prereq.m4 (jm_PREREQ_CANON_HOST): New macro.
159288         (jm_PREREQ): Use it.
159289         (jm_PREREQ_READUTMP): New macro.
159290         (jm_PREREQ): Use it.
159292 2000-01-11  Paul Eggert  <eggert@twinsun.com>
159294         Quote multibyte characters correctly.
159295         * m4/c-bs-a.m4: New file.
159296         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): New macro.
159297         (jm_PREREQ): Use it.
159299 2000-01-11  Paul Eggert  <eggert@twinsun.com>
159301         * m4/uintmax_t.m4: Port to autoconf 2.13.
159303 2000-01-08  Jim Meyering  <meyering@ascend.com>
159305         * m4/strerror_r.m4 (jm_FUNC_STRERROR_R): New file/macro.
159306         * m4/jm-macros.m4 (jm_FUNC_STRERROR_R): Require it.
159308 2000-01-04  Jim Meyering  <meyering@ascend.com>
159310         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename from
159311         jm_STRUCT_DIRENT_D_TYPE.
159312         * m4/d-ino.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Rename from
159313         jm_STRUCT_DIRENT_D_INO.
159314         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Rename from
159315         jm_STRUCT_UTIMBUF.
159316         * m4/jm-macros.m4: Reflect s/jm_STRUCT_/jm_CHECK_TYPE_STRUCT_/
159317         renamings.
159318         * m4/utime.m4: Likewise.
159320         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): New file, macro.
159321         * m4/jm-macros.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): Require it.
159323 2000-01-03  Paul Eggert  <eggert@twinsun.com>
159325         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Search for nanosleep in -lrt
159326         (for Solaris 7) and in -lposix4 (for Solaris 2.5.1).
159328 2000-01-02  Jim Meyering  <meyering@ascend.com>
159330         * m4/search-libs.m4: Escape `$' in $3 of dnl comment.  I no longer
159331         remember if this is necessary.
159333 1999-12-26  Jim Meyering  <meyering@ascend.com>
159335         * m4/jm-macros.m4: Use it here.
159336         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): New file/macro.
159338 1999-12-23  Jim Meyering  <meyering@ascend.com>
159340         * m4/jm-macros.m4: Check for clock_gettime (moved from
159341         fileutils/configure.in)
159342         Check for gettimeofday.
159344 1999-12-20  Jim Meyering  <meyering@ascend.com>
159346         * m4/strftime.m4: Remove kludge, now that I'm using the fixed
159347         autoconf-2.14a-1999-12-20.
159349 1999-12-19  Jim Meyering  <meyering@ascend.com>
159351         * m4/lstat-slash.m4: New file.
159352         * m4/jm-macros.m4: Use the new macro:
159353         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
159355 1999-12-07  Jim Meyering  <meyering@ascend.com>
159357         * m4/perl.m4: Require that File::Compare be available, too.
159358         Too many systems seem to lack it.
159360         * m4/strftime.m4: Add checks for most of the cpp macros tested in
159361         GNU's strftime.c.  Prompted by a patch from Paul Eggert.
159363 1999-11-18  Paul Eggert  <eggert@twinsun.com>
159365         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a
159366         problem with the QNX 4.25 shell, which doesn't propagate exit
159367         status of failed commands inside shell assignments.
159369 1999-11-17  Jim Meyering  <meyering@ascend.com>
159371         * m4/gettext.m4: Use new AC_CONFIG_LINKS in place of AC_LINK_FILES.
159373 1999-11-07  Jim Meyering  <meyering@ascend.com>
159375         * m4/getloadavg.m4: Add `, 1, [FIXME]' to each use of AC_DEFINE.
159377 1999-11-06  Jim Meyering  <meyering@ascend.com>
159379         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): New file/macro.
159380         * m4/jm-macros.m4 (jm_MACROS): Use it here.
159382 1999-11-05  Jim Meyering  <meyering@ascend.com>
159384         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Move some tests from
159385         configure.in of textutils, fileutils, and sh-utils into this one
159386         (shared between those packages) file.
159387         Use `AC_CHECK_MEMBERS((struct stat.st_blksize))' instead of deprecated
159388         AC_STRUCT_ST_BLKSIZE.
159390 1999-11-03  Jim Meyering  <meyering@ascend.com>
159392         * m4/ssize_t.m4: Remove file.  No longer needed since the new version
159393         of AC_CHECK_TYPE checks includes unistd.h.
159394         * m4/jm-macros.m4: Use straight `AC_CHECK_TYPE(ssize_t, int)'.
159395         Suggestion from Akim Demaille.
159397 1999-10-30  Jim Meyering  <meyering@ascend.com>
159399         * m4/uintmax_t.m4: Require 2.14a.  Remove backslash before backtick in
159400         m4-quoted string.
159401         * m4/ls-mntd-fs.m4: Likewise.
159402         * m4/jm-macros.m4: Likewise.  Also, use AC_TYPE_SSIZE_T instead
159403         * m4/jm-winsz1.m4: Likewise.
159405         * m4/const.m4: Remove file, since the fix made it into the experimental
159406         version of autoconf.
159407         * m4/mktime.m4: Likewise.
159409         * m4/check-type.m4: Remove file, now that the latest version of
159410         AC_CHECK_TYPE takes a third arg to specify additional #includes.
159412         * m4/ssize_t.m4: New file, requires experimental version of autoconf.
159413         * m4/jm-macros.m4: Use new AC_TYPE_SSIZE_T instead of my hacked
159414         AC_CHECK_TYPE.
159416 1999-10-04  Jim Meyering  <meyering@ascend.com>
159418         * m4/jm-macros.m4: Don't require autoconf-2.14.1.
159420 1999-09-22  Paul Eggert  <eggert@twinsun.com>
159422         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around GCC
159423         2.95.1 bug with HP-UX 10.20.
159425 1999-09-17  Jim Meyering  <meyering@ascend.com>
159427         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add strdup.
159428         Paul Nevai reported a link failure on a NeXT CUBE with NeXTSTEP 3.3
159429         due to missing strdup (against sh-utils-2.0).
159431 1999-08-29  Jim Meyering  <meyering@ascend.com>
159433         * m4/jm-macros.m4: Require jm_BISON.
159434         * m4/bison.m4: New file.
159436 1999-08-17  Paul Eggert  <eggert@twinsun.com>
159438         * m4/largefile.m4 (AC_SYS_LARGEFILE): Fix typo: missing comma
159439         in value for _FILE_OFFSET_BITS, which broke ports to HP-UX 10.20.
159441 1999-08-05  Jim Meyering  <meyering@ascend.com>
159443         * m4/getline.m4: Rename test file from conftestdata to conftest.data
159444         to avoid conflicts with `conftest' on 8+3 filesystems.
159445         Suggestion from Eli Zaretskii.
159447 1999-08-04  Jim Meyering  <meyering@ascend.com>
159449         * m4/jm-macros.m4: Move a 4-line block of code from the configure.in of
159450         fileutils and sh-utils (textutils's getline test was inadequate).
159451         (AM_FUNC_GETLINE): Run this test.
159452         (AC_CHECK_FUNCS): Check for getdelim.
159453         Reported by Bob Proulx.
159455 1999-08-02  Jim Meyering  <meyering@ascend.com>
159457         * m4/jm-macros.m4: Add a comment.
159459 1999-08-01  Paul Eggert  <eggert@twinsun.com>
159461         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check whether
159462         <inttypes.h> defines strtoumax as a macro (and not as a
159463         function).
159465 1999-08-01  Paul Eggert  <eggert@twinsun.com>
159467         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Make sure
159468         that we can shift, multiply and divide unsigned long long
159469         values; Ultrix cc can't do it.
159471 1999-08-01  Paul Eggert  <eggert@twinsun.com>
159473         * m4/mktime.m4: New file, which is a preview of what should appear
159474         in the next public autoconf release.
159476 1999-08-01  Paul Eggert  <eggert@twinsun.com>
159478         * m4/lfs.m4: Remove this file.
159479         * m4/largefile.m4: New file.  It contains the old contents of
159480         lfs.m4, except that all names with prefix AC_LFS have been
159481         changed to use the prefix AC_SYS_LARGEFILE instead, to be
159482         compatible with future autoconf versions.  Also, some minor m4
159483         quoting problems have been fixed.
159485 1999-08-01  Paul Eggert  <eggert@twinsun.com>
159487         * m4/gettext.m4 (AM_WITH_NLS): Remove unnecessary lines.
159488         Fix typo: $nls_cv_header_intl was misspelled as $nsl_cv_header_intl.
159489         (AM_GNU_GETTEXT): Fix problem with brackets and m4 quoting,
159490         and simplify the shell code.
159492 1999-08-01  Jim Meyering  <meyering@ascend.com>
159494         * m4/mktime.m4 (AC_FUNC_MKTIME): Undefine to avoid syntax errors from
159495         m4.
159497 1999-07-20  Jim Meyering  <meyering@ascend.com>
159499         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memmove.
159501 1999-07-15  Jim Meyering  <meyering@ascend.com>
159503         * m4/jm-macros.m4 (AC_CHECK_FUNCS): Check for getpagesize.
159505 1999-05-22  Jim Meyering  <meyering@ascend.com>
159507         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memchr.
159509 1999-05-20  Jim Meyering  <meyering@ascend.com>
159511         * m4/search-libs.m4 [AC_SEARCH_LIBS]: Quote name in undefine.
159512         Add a colon after each `then' in case $4 is empty.
159514 1999-05-16  Jim Meyering  <meyering@ascend.com>
159516         * m4/search-libs.m4: New file to override autoconf's AC_SEARCH_LIBS.
159518 1999-05-10  Jim Meyering  <meyering@ascend.com>
159520         * m4/jm-mktime.m4: Reflect renaming: AM_FUNC_MKTIME -> AC_FUNC_MKTIME.
159522         * m4/jm-macros.m4: Require 2.14.1, since we use newly-renamed
159523         AC_FUNC_MKTIME.
159525 1999-05-10  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
159527         * m4/jm-mktime.m4, putenv.m4: Fix typos in config.h comments.
159529 1999-05-04  Paul Eggert  <eggert@twinsun.com>
159531         * m4/lfs.m4 (AC_LFS): -n32, -o32, and -n64 should be in CFLAGS,
159532         not CPPFLAGS, so that linking works correctly in IRIX.
159534 1999-04-30  Paul Eggert  <eggert@twinsun.com>
159536         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add dup2.
159538 1999-04-20  Paul Eggert  <eggert@twinsun.com>
159540         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Move unsigned long
159541         long check into new jm_AC_TYPE_UNSIGNED_LONG_LONG macro.
159542         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require
159543         jm_AC_TYPE_UNSIGNED_LONG_LONG.
159544         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): New file/macro.
159546         * m4/lfs.m4: Port to AIX and HP-UX.  Support cross-compilation.
159548 1999-04-20  Jim Meyering  <meyering@ascend.com>
159550         * m4/xstrtoumax.m4: Require jm_AC_TYPE_UNSIGNED_LONG_LONG.
159551         AC_REPLACE xstroull if necessary.  From Paul Eggert.
159552         (AC_CHECK_FUNCS): Remove strtoull, strtoumax, strtouq.
159554 1999-04-18  Jim Meyering  <meyering@ascend.com>
159556         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): New file/macro.
159557         * m4/jm-macros.m4: Use it.
159559 1999-04-06  Jim Meyering  <meyering@ascend.com>
159561         * m4/strftime.m4: Remove test for %f.
159563 1999-03-29  Jim Meyering  <meyering@ascend.com>
159565         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): New macro, contains the
159566         superset of the AC_TYPE_* checks in the textutils, fileutils,
159567         and sh-utils, plus AC_TYPE_PID_T.  Paul Eggert suggested adding
159568         AC_TYPE_PID_T.
159570 1999-03-28  Jim Meyering  <meyering@ascend.com>
159572         * m4/jm-macros.m4: Define GNU_PACKAGE here.
159573         Be sure to AC_SUBST it, once again, so that @GNU_PACKAGE@ is
159574         replaced e.g., in the *.sh files of the sh-utils.
159576 1999-03-20  Jim Meyering  <meyering@ascend.com>
159578         * m4/jm-macros.m4: s/jm_WITH_REGEX/jm_INCLUDED_REGEX/.
159579         * m4/regex.m4 (jm_INCLUDED_REGEX): Rename from jm_WITH_REGEX.
159580         Don't depend on AM_GLIBC.  Suggestions from Alain Magloire.
159582 1999-03-19  Jim Meyering  <meyering@ascend.com>
159584         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): New macro.
159586 1999-03-12  Jim Meyering  <meyering@ascend.com>
159588         * m4/jm-macros.m4: Use AC_FUNC_SETVBUF_REVERSED.
159590 1999-03-07  Jim Meyering  <meyering@ascend.com>
159592         * m4/jm-glibc-io.m4: Use only those *_unlocked macros that are
159593         declared.
159595 1999-02-17  Jim Meyering  <meyering@ascend.com>
159597         * m4/gettext.m4 (AM_GNU_GETTEXT): Do `changequote' around use of
159598         brackets in macro definition.  From Eli Zaretskii and Alain Magloire.
159600 1999-02-07  Jim Meyering  <meyering@ascend.com>
159602         * m4/group-member.m4: New file -- extracted from sh-utils'
159603         configure.in.
159605         1999-02-05  Eli Zaretskii  <eliz@is.elta.co.il>
159606         * m4/gettext.m4: Support DOS-style d:/foo/bar absolute file names.
159608 1999-02-06  Jim Meyering  <meyering@ascend.com>
159610         * m4/chown.m4: Use `AC_SUBST(LIBOBJS)' since we set LIBOBJS.
159611         * m4/fnmatch.m4: Likewise.
159612         * m4/getgroups.m4: Likewise.
159613         * m4/lstat.m4: Likewise.
159614         * m4/malloc.m4: Likewise.
159615         * m4/putenv.m4: Likewise.
159616         * m4/realloc.m4: Likewise.
159617         * m4/regex.m4: Likewise.
159618         * m4/stat.m4: Likewise.
159619         * m4/strftime.m4: Likewise.
159620         Suggestion from Alain Magloire.
159622         * m4/chown.m4: Use `.$ac_objext', not `.o'.
159623         * m4/fnmatch.m4: Likewise.
159624         * m4/getgroups.m4: Likewise.
159625         * m4/getline.m4: Likewise.
159626         * m4/lstat.m4: Likewise.
159627         * m4/malloc.m4: Likewise.
159628         * m4/memcmp.m4: Likewise.
159629         * m4/putenv.m4: Likewise.
159630         * m4/realloc.m4: Likewise.
159631         * m4/regex.m4: Likewise.
159632         * m4/stat.m4: Likewise.
159633         * m4/strftime.m4: Likewise.
159634         Suggestion from Alain Magloire.
159636         * m4/jm-macros.m4: Actually invoke jm_WITH_REGEX now that it requires
159637         an argument.
159639         * m4/regex.m4: Add a run-time Test for proper operation of
159640         re_compile_pattern.
159642 1999-01-31  Jim Meyering  <meyering@ascend.com>
159644         * m4/getloadavg.m4: Check for locale.h and the function, setlocale.
159646 1999-01-30  Jim Meyering  <meyering@ascend.com>
159648         * m4/check-type.m4: Use 3-arg form of AC_DEFINE.
159650         * m4/jm-mktime.m4: Make this a wrapper around the official
159651         AM_FUNC_MKTIME rather than my private copy, now that the official one
159652         is up to date.
159653         * m4/mktime.m4: Remove file.
159655         * m4/getloadavg.m4: Use 3-arg form of AC_DEFINE.
159656         * m4/uptime.m4: Likewise.
159657         * m4/uintmax_t.m4: Likewise.
159659 1999-01-28  Jim Meyering  <meyering@ascend.com>
159661         * m4/jm-macros.m4: Use jm_AFS.
159662         * m4/afs.m4: New file (from fileutils' configure.in).
159664         * m4/assert.m4: Use the 3-argument forms of AC_DEFINE* macros.
159665         * m4/chown.m4: Likewise.
159666         * m4/d-ino.m4: Likewise.
159667         * m4/d-type.m4: Likewise.
159668         * m4/fnmatch.m4: Likewise.
159669         * m4/getgroups.m4: Likewise.
159670         * m4/gettext.m4: Likewise.
159671         * m4/jm-mktime.m4: Likewise.
159672         * m4/jm-winsz2.m4: Likewise.
159673         * m4/lcmessage.m4: Likewise.
159674         * m4/ls-mntd-fs.m4: Likewise.
159675         * m4/malloc.m4: Likewise.
159676         * m4/memcmp.m4: Likewise.
159677         * m4/putenv.m4: Likewise.
159678         * m4/realloc.m4: Likewise.
159679         * m4/st_mtim.m4: Likewise.
159680         * m4/strftime.m4: Likewise.
159682 1999-01-16  Jim Meyering  <meyering@ascend.com>
159684         * m4/jm-macros.m4 (ARGMATCH_DIE): Define.
159685         (ARGMATCH_DIE_DECL): Define.
159687 1999-01-12  Jim Meyering  <meyering@ascend.com>
159689         * m4/Makefile.am.in: Rewrite to avoid using fmt.
159690         Reported by Lars Hecking.
159692 1999-01-10  Jim Meyering  <meyering@ascend.com>
159694         * m4/fstypename.m4: Use the new 3-arg form of AC_DEFINE instead of my
159695         gross kludge.
159696         * m4/inttypes_h.m4: Likewise.
159697         * m4/lstat.m4: Likewise.
159698         * m4/malloc.m4: Likewise.
159699         * m4/readdir.m4: Likewise.
159700         * m4/realloc.m4: Likewise.
159701         * m4/st_dm_mode.m4: Likewise.
159702         * m4/stat.m4: Likewise.
159703         * m4/utimbuf.m4: Likewise.
159704         * m4/utimes.m4: Likewise.
159706         * m4/check-decl.m4: Use the new 3-arg form of AC_DEFINE instead of the
159707         AC_CHECK_FUNCS hack.  Now, it's still a hack, but at least the
159708         comments in config.h.in are meaningful.
159710         * m4/jm-macros.m4: Require autoconf-2.13 here.
159712         * m4/regex.m4: By default, don't use the included regex.c on systems
159713         with glibc 2.  Suggestion from Uli Drepper.
159715 1999-01-02  Jim Meyering  <meyering@ascend.com>
159717         * m4/jm-macros.m4: Replace strcasecmp and strncasecmp.
159719 1998-12-18  Jim Meyering  <meyering@ascend.com>
159721         * m4/Makefile.am.in (Makefile.am): Simplify rule.
159722         Based on a suggestion from Lars Hecking.
159724 1998-11-16  Paul Eggert  <eggert@twinsun.com>
159726         * m4/lfs.m4 (AC_LFS): Add support for HP-UX 10.20 and HP-UX 11.
159728 1998-11-16  Jim Meyering  <meyering@ascend.com>
159730         * m4/lfs.m4: Double-quote the `uname...` expression.
159732 1998-11-14  Jim Meyering  <meyering@ascend.com>
159734         * m4/lstat.m4: Correct comment.  POSIX does not permit it to succeed.
159735         * m4/stat.m4: Likewise.
159737 1998-11-03  Jim Meyering  <meyering@ascend.com>
159739         * m4/stat.m4: Rewrite to set HAVE_STAT_EMPTY_STRING_BUG.
159740         * m4/lstat.m4: Rewrite to set HAVE_LSTAT_EMPTY_STRING_BUG.
159742 1998-10-18  Jim Meyering  <meyering@ascend.com>
159744         * m4/check-decl.m4 (jm_CHECK_DECL_LOCALTIME_R): Remove macro.
159746 1998-10-17  Jim Meyering  <meyering@ascend.com>
159748         * m4/decl.m4 (jm_CHECK_DECLARATION): Don't hard-code which headers to
159749         include, though we still hard-code the `require'-like AC_CHECK_HEADERS
159750         calls for those previously hard-coded headers.  Instead, take a new
159751         parameter.
159752         (jm_CHECK_DECLARATIONS): Reflect interface change.
159753         * m4/check-decl.m4 (jm_CHECK_DECLS): Likewise.
159754         (jm_CHECK_DECL_LOCALTIME_R): New macro.
159756         * m4/mktime.m4: Test for spring-forward gap before long-running test.
159758 1998-10-14  Jim Meyering  <meyering@ascend.com>
159760         * m4/mktime.m4: Use the more portable "TZ=PST8PDT,M4.1.0,M10.5.0"
159761         instead of "TZ=America/Vancouver".  From Paul Eggert.
159763 1998-10-11  Jim Meyering  <meyering@ascend.com>
159765         * m4/mktime.m4 (jm_AM_FUNC_MKTIME): New file and macro.
159766         This adds a test for a recently added compatibility fix for mktime.c.
159767         * m4/jm-mktime.m4: Require jm_AM_FUNC_MKTIME, not AM_FUNC_MKTIME.
159769 1998-09-27  Jim Meyering  <meyering@ascend.com>
159771         * m4/jm-macros.m4 (jm_MACROS): Require jm_FUNC_FNMATCH.
159773         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): New file/macro.  Extracted from
159774         ../configure.in, including a change from Gordon Matzigkeit to allow
159775         cross-compiling for the Hurd.
159777         * m4/glibc.m4: New file/macro to test for the GNU C Library
159778         versions 1 and 2.  From Gordon Matzigkeit.
159779         Indent.
159781 1998-09-21  Jim Meyering  <meyering@ascend.com>
159783         * m4/chown.m4: Declare locals: before, after.  From Andries Brouwer.
159785 1998-08-18  Paul Eggert  <eggert@twinsun.com>
159787         Port nanosecond-resolution times to UnixWare 2.1.2 and
159788         pedantic Solaris 2.6.
159790         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC): Renamed from
159791         AC_STRUCT_ST_MTIM.
159792         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC):
159793         Generate name of ns member, instead of just 1 or undef.
159794         Allow for UnixWare 2.1.2 and Solaris 2.6 if in pedantic mode.
159796 1998-08-15  Jim Meyering  <meyering@ascend.com>
159798         * m4/ssize_t.m4 (jm_TYPE_SSIZE_T): Remove file.
159799         * m4/check-type.m4: New file.  Replacement for AC_CHECK_TYPE.
159800         * m4/jm-macros.m4: Use the new AC_CHECK_TYPE(ssize_t, int)
159801         instead of jm_TYPE_SSIZE_T.
159803 1998-08-12  Jim Meyering  <meyering@ascend.com>
159805         * m4/st_dm_mode.m4: New file.  From Johan Danielsson.
159807 1998-08-02  Jim Meyering  <meyering@ascend.com>
159809         * m4/st_mtim.m4: Use hack to avoid having to put #undef HAVE_ST_MTIM
159810         in acconfig.h manually.
159812 1998-07-31  Paul Eggert  <eggert@twinsun.com>
159814         * m4/st_mtim.m4: New file.
159816 1998-07-28  Jim Meyering  <meyering@ascend.com>
159818         * m4/utimes.m4: Undef stat.
159820 1998-07-25  Jim Meyering  <meyering@ascend.com>
159822         * m4/utime.m4 (jm_FUNC_UTIME): New file and macro.
159823         * m4/utimes.m4 (jm_FUNC_UTIMES_NULL): New file and macro.
159825 1998-07-09  Manfred Hollstein  <manfred@s-direktnet.de>
159827         * m4/chown.m4 (jm_FUNC_CHOWN): Add a check to verify that the
159828         uid and gid actually remain unchanged.
159830 1998-07-07  Jim Meyering  <meyering@ascend.com>
159832         * m4/jm-glibc-io.m4: Remove fclose_unlocked.
159834 1998-07-04  Jim Meyering  <meyering@ascend.com>
159836         * m4/regex.m4: Use syscmd, ifelse, and sysval.  Mainly as an exercise
159837         to prove that this macro can be used in packages without regex.c.
159839 1998-07-04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
159841         * m4/gettext.m4 (AM_WITH_NLS): Remove intl/libintl.h if <libintl.h>
159842         is to be used.
159844 1998-07-03  Jim Meyering  <meyering@ascend.com>
159846         * m4/gettext.m4: Add -lintl if it's found to be necessary.
159848         * m4/gettext.m4: New file -- from gettext-0.10.35.
159849         * m4/lcmessage.m4: Likewise.
159850         * m4/progtest.m4: Likewise.
159852         * m4/regex.m4 (jm_WITH_REGEX): New file and macro.
159853         * m4/jm-macros.m4: Require the new macro.
159855 1998-06-29  Jim Meyering  <meyering@ascend.com>
159857         * m4/fstypename.m4: Include sys/param.h.  NetBSD 1.3.1 requires this
159858         for the definition of NGROUPS (used in a system header included
159859         by sys/mount.h).
159861 1998-06-28  Jim Meyering  <meyering@ascend.com>
159863         * m4/ls-mntd-fs.m4: New file.
159864         * m4/fstypename.m4: New file.
159866         * m4/jm-macros.m4: Require the new macro.
159867         * m4/jm-glibc-io.m4: New file.
159869 1998-05-19  Jim Meyering  <meyering@ascend.com>
159871         * m4/jm-macros.m4: Add jm_FUNC_LCHOWN.
159872         * m4/lchown.m4: New file.
159874         * m4/Makefile.am.in: New file.
159875         * m4/Makefile.am (Makefile.am): Depend on Makefile.am.in.
159877 1998-05-14  Jim Meyering  <meyering@ascend.com>
159879         * m4/Makefile.am (EXTRA_DIST): Add them.
159880         * m4/jm-macros.m4: New file.
159881         * m4/utimbuf.m4: New file.
159883 1998-05-12  Jim Meyering  <meyering@ascend.com>
159885         * m4/Makefile.am (EXTRA_DIST): Add isc-posix.m4.
159887 1998-05-11  Jim Meyering  <meyering@ascend.com>
159889         * m4/isc-posix.m4: New file.
159891 1998-05-10  Jim Meyering  <meyering@ascend.com>
159893         * m4/jm-mktime.m4: Use AM_FUNC_MKTIME, now that it's up to date.
159895 1998-05-09  Jim Meyering  <meyering@ascend.com>
159897         * m4/Makefile.am (EXTRA_DIST): Add ssize_t.m4.
159898         (EXTRA_DIST): Remove mktime.m4, now that the new version is included
159899         with automake.
159901         * m4/ssize_t.m4: New file.
159902         * m4/mktime.m4: Remove file -- the new automake has this now.
159904 1998-04-26  Jim Meyering  <meyering@ascend.com>
159906         * m4/assert.m4: New file.
159907         * m4/Makefile.am (EXTRA_DIST): Add assert.m4.
159909 1998-04-05  Jim Meyering  <meyering@ascend.com>
159911         * m4/prereq.m4 (jm_PREREQ_REGEX): New macro.
159912         (jm_PREREQ): Use it here.
159914 1998-03-23  Jim Meyering  <meyering@eng.ascend.com>
159916         * m4/inttypes_h.m4: Kludges so I don't have to add HAVE_INTTYPES_H
159917         in acconfig.h.
159919 1998-03-15  Jim Meyering  <meyering@eng.ascend.com>
159921         * m4/prereq.m4: New file.
159922         * m4/error.m4: New file.
159923         * m4/Makefile.am (EXTRA_DIST): Add error.m4 and prereq.m4.
159925 1998-02-07  Jim Meyering  <meyering@eng.ascend.com>
159927         * m4/getline.m4: Don't set am_cv_func_working_getline before the
159928         cache-check for the same variable -- that defeated the purpose of
159929         the test; the test program was never run.  This was a problem only
159930         on systems with losing getline functions -- HP-UX 10.20 is one.
159931         Reported by Bjorn Helgaas.
159933 1998-02-06  Jim Meyering  <meyering@eng.ascend.com>
159935         * m4/Makefile.am (EXTRA_DIST): Add perl.m4.
159937 1998-01-10  Jim Meyering  <meyering@na-net.ornl.gov>
159939         * m4/Makefile.am (EXTRA_DIST): Add const.m4.
159941         * m4/const.m4: New file.  Use an initializer in this declaration
159942         typedef int charset[2]; const charset x;
159943         Reported by Bob Glickstein.
159945 1997-12-21  Jim Meyering  <meyering@na-net.ornl.gov>
159947         * m4/chown.m4: Fix reversed types on -1 args to chown.
159948         From Kaveh Ghazi.
159950 1997-12-14  Jim Meyering  <meyering@na-net.ornl.gov>
159952         * m4/check-decl.m4: s/DECLARATION_/DECL_/g.
159953         Add lseek and memchr.
159955         * m4/decl.m4: s/HAVE_DECLARATION_/HAVE_DECL_/g.
159956         T.E.Dickey <dickey@clark.net> said that some older preprocessors
159957         have a 20-character limit on names.
159959 1997-11-30  Jim Meyering  <meyering@na-net.ornl.gov>
159961         * m4/inttypes_h.m4: New file.
159962         * m4/uintmax_t.m4: New file.
159963         * m4/Makefile.am (EXTRA_DIST): Add inttypes_h.m4 and uintmax_t.m4.
159966         -----
159968         Local Variables:
159969         coding: utf-8
159970         End:
159972         Copyright (C) 1997-2024 Free Software Foundation, Inc.
159974         Copying and distribution of this file, with or without
159975         modification, are permitted provided the copyright notice
159976         and this notice are preserved.